www/js/inv_yeasts.js

changeset 515
9d771385a8a0
parent 514
3c680d1dea35
child 528
202272a28052
equal deleted inserted replaced
514:3c680d1dea35 515:9d771385a8a0
45 $(document).ready(function() { 45 $(document).ready(function() {
46 46
47 function calcTotal() { 47 function calcTotal() {
48 48
49 $('#totval').val(dataRecord.cost * dataRecord.inventory); 49 $('#totval').val(dataRecord.cost * dataRecord.inventory);
50 if (dataRecord.form == 'Vloeibaar') { // Liquid 50 if (dataRecord.form == 'Vloeibaar') { // Liquid
51 $("#pmpt_cost").html('Prijs per pak:'); 51 $("#pmpt_cost").html('Prijs per pak:');
52 $("#pmpt_inventory").html('Voorraad pak(ken):'); 52 $("#pmpt_inventory").html('Voorraad pak(ken):');
53 $("#pmpt_cells").html('Miljard cellen per pak:'); 53 $("#pmpt_cells").html('Miljard cellen per pak:');
54 $("#inventory").jqxNumberInput({ decimalDigits: 0 }); 54 $("#inventory").jqxNumberInput({ decimalDigits: 0 });
55 } else if (dataRecord.form == 'Droog') { // Dry 55 } else if (dataRecord.form == 'Droog' || dataRecord.form == 'Gedroogd') { // Dry
56 $("#pmpt_cost").html('Prijs per kg:'); 56 $("#pmpt_cost").html('Prijs per kg:');
57 $("#pmpt_inventory").html('Voorraad gram:'); 57 $("#pmpt_inventory").html('Voorraad gram:');
58 $("#pmpt_cells").html('Miljard cellen per gram:'); 58 $("#pmpt_cells").html('Miljard cellen per gram:');
59 $("#inventory").jqxNumberInput({ decimalDigits: 1 }); 59 $("#inventory").jqxNumberInput({ decimalDigits: 1 });
60 } else { 60 } else {
172 $("#form").jqxDropDownList({ 172 $("#form").jqxDropDownList({
173 theme: theme, 173 theme: theme,
174 source: YeastFormAdapter, 174 source: YeastFormAdapter,
175 valueMember: 'nl', 175 valueMember: 'nl',
176 displayMember: 'nl', 176 displayMember: 'nl',
177 // selectedIndex: 0,
178 width: 180, 177 width: 180,
179 height: 23, 178 height: 23,
180 autoDropDownHeight: true 179 autoDropDownHeight: true
181 }); 180 });
182 $("#notes").jqxInput({ theme: theme, width: 800, height: 120 }); 181 $("#notes").jqxInput({ theme: theme, width: 800, height: 120 });
302 if (value > 0) { 301 if (value > 0) {
303 if ((rowdata.form == 'Vloeibaar') && (value > 1)) 302 if ((rowdata.form == 'Vloeibaar') && (value > 1))
304 amount = dataAdapter.formatNumber(value,"f0")+" pakken"; 303 amount = dataAdapter.formatNumber(value,"f0")+" pakken";
305 else if (rowdata.form == 'Vloeibaar') 304 else if (rowdata.form == 'Vloeibaar')
306 amount = dataAdapter.formatNumber(value,"f0")+" pak"; 305 amount = dataAdapter.formatNumber(value,"f0")+" pak";
307 else if (rowdata.form == 'Droog') 306 else if (rowdata.form == 'Droog' || rowdata.form == 'Gedroogd')
308 amount = dataAdapter.formatNumber(value * 1000,"f1")+" gram"; 307 amount = dataAdapter.formatNumber(value * 1000,"f1")+" gram";
309 else 308 else
310 amount = dataAdapter.formatNumber(value * 1000,"f1")+" ml"; 309 amount = dataAdapter.formatNumber(value * 1000,"f1")+" ml";
311 } 310 }
312 return "<span style='margin: 3px; margin-top: 6px; float: right;'>" + amount + "</span>"; 311 return "<span style='margin: 3px; margin-top: 6px; float: right;'>" + amount + "</span>";

mercurial