1504 }, |
1504 }, |
1505 { text: '', datafield: 'Edit', columntype: 'button', width: 90, align: 'center', |
1505 { text: '', datafield: 'Edit', columntype: 'button', width: 90, align: 'center', |
1506 cellsrenderer: function() { |
1506 cellsrenderer: function() { |
1507 return 'Wijzig'; |
1507 return 'Wijzig'; |
1508 }, buttonclick: function(row) { |
1508 }, buttonclick: function(row) { |
1509 if (dataRecord.stage > 3) { |
1509 yeastRow = row; |
|
1510 yeastData = $('#yeastGrid').jqxGrid('getrowdata', yeastRow); |
|
1511 if ((dataRecord.stage > 3 && yeastData.y_use == 0) || |
|
1512 (dataRecord.stage > 4 && yeastData.y_use == 1) || |
|
1513 (dataRecord.stage > 5 && yeastData.y_use == 2) || |
|
1514 (dataRecord.stage > 6 && yeastData.y_use == 3)) { |
1510 alert('Ingredieënt is al verwerkt.'); |
1515 alert('Ingredieënt is al verwerkt.'); |
1511 } else { |
1516 } else { |
1512 yeastRow = row; |
|
1513 yeastData = $('#yeastGrid').jqxGrid('getrowdata', yeastRow); |
|
1514 if (yeastData.y_form == 0) { |
1517 if (yeastData.y_form == 0) { |
1515 $('#wy_pmpt_amount').html('Pak(ken):'); |
1518 $('#wy_pmpt_amount').html('Pak(ken):'); |
1516 $('#wy_amount').val(yeastData.y_amount); |
1519 $('#wy_amount').val(yeastData.y_amount); |
1517 $('#wy_amount').jqxNumberInput({ decimalDigits: 0 }); |
1520 $('#wy_amount').jqxNumberInput({ decimalDigits: 0 }); |
1518 } else if (yeastData.y_form == 1 || yeastData.y_form == 6) { |
1521 } else if (yeastData.y_form == 1 || yeastData.y_form == 6) { |