Anpassung für oesterreichischen Kontenrahmen. Verhält sich neutral ggue. anderen...
[kivitendo-erp.git] / js / calculate_qty.js
1 function calculate_qty_selection_window(input_name, alu, formel, row) {
2   var parm = centerParms(600,500) + ",width=600,height=500,status=yes,scrollbars=yes";
3   var name = document.getElementsByName(input_name)[0].value;
4   if (document.getElementsByName(alu)[0].value == "1") {
5     var action = "calculate_alu";
6     var qty = document.getElementsByName("qty_" + row)[0].value;
7     var description = document.getElementsByName("description_" + row)[0].value;
8   }  else var action = "calculate_qty";
9   url = "common.pl?" +
10     "action=" + action + "&" +
11     "login=" + encodeURIComponent(document.getElementsByName("login")[0].value) + "&" +
12     "password=" + encodeURIComponent(document.getElementsByName("password")[0].value) + "&" +
13     "name=" + escape(name) + "&" +
14     "input_name=" + escape(input_name) + "&" +
15     "description=" + escape(description) + "&" +
16     "qty=" + escape(qty) + "&" +
17     "row=" + escape(row) + "&" +
18    "formel=" + escape(document.getElementsByName(formel)[0].value)
19   //alert(url);
20   window.open(url, "_new_generic", parm);
21 }