www/js/prod_divide.js

Fri, 18 Oct 2019 20:49:07 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 18 Oct 2019 20:49:07 +0200
changeset 525
8bbc5730aaa8
parent 500
8d53ad389204
child 533
be8691b7d634
permissions
-rw-r--r--

Code cleanup and manual compress

498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /*****************************************************************************
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 * Copyright (C) 2019
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 *
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 * Michiel Broek <mbroek at mbse dot eu>
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 *
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 * This file is part of BMS
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 *
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 * This is free software; you can redistribute it and/or modify it
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 * under the terms of the GNU General Public License as published by the
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 * Free Software Foundation; either version 2, or (at your option) any
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 * later version.
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 *
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 * BrewCloud is distributed in the hope that it will be useful, but
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 * General Public License for more details.
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 *
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 * along with ThermFerm; see the file COPYING. If not, write to the Free
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21 *****************************************************************************/
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23
525
8bbc5730aaa8 Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents: 500
diff changeset
24 $(document).ready(function() {
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26 $('#divide_type').jqxDropDownList({
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27 theme: theme,
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28 source: SplitAdapter,
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29 valueMember: 'id',
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 displayMember: 'nl',
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 width: 180,
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 height: 23,
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33 autoDropDownHeight: true
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34 });
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
35
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
36 // Calculate the volume in the main batch.
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
37 function calcLeftover() {
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
38 rows = $('#splitGrid').jqxGrid('getrows');
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
39 leftover = Round(available, 1);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
40 for (i = 0; i < rows.length; i++) {
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
41 row = rows[i];
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
42 leftover -= row.split_size;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
43 //console.log('i:' + i + ' split_size:' + row.split_size);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
44 }
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
45 $('#leftover').val(leftover);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
46 //console.log('calcLeftover():' + leftover);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
47 }
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
48
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
49 // Calculate available volume but ignore the current row.
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
50 function calcRoom(r) {
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
51 var rows, row, i, vol = 0;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
52
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
53 rows = $('#splitGrid').jqxGrid('getrows');
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
54 for (i = 0; i < rows.length; i++) {
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
55 row = rows[i];
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
56 if (i != r)
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
57 vol += row.split_size;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
58 }
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
59 maxvolume = Round(available - minvolume - vol, 1);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
60 console.log('calcRoom(' + r + '):' + vol + ' room:' + maxvolume);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
61 }
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
62
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
63 var dataRecord = {},
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
64 i,
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
65 available = 0,
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
66 leftover = 0,
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
67 minvolume = 0,
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
68 maxvolume = 0,
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
69 url = 'includes/db_product.php',
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
70
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
71 // Prepare the data
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
72 source = {
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
73 datatype: 'json',
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
74 cache: false,
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
75 datafields: [
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
76 // From prod_main
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
77 { name: 'record', type: 'number' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
78 { name: 'uuid', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
79 { name: 'name', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
80 { name: 'code', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
81 { name: 'birth', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
82 { name: 'stage', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
83 { name: 'notes', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
84 { name: 'log_brew', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
85 { name: 'log_fermentation', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
86 { name: 'inventory_reduced', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
87 { name: 'locked', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
88 { name: 'eq_name', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
89 { name: 'eq_boil_size', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
90 { name: 'eq_batch_size', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
91 { name: 'eq_tun_volume', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
92 { name: 'eq_tun_weight', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
93 { name: 'eq_tun_specific_heat', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
94 { name: 'eq_tun_material', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
95 { name: 'eq_tun_height', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
96 { name: 'eq_top_up_water', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
97 { name: 'eq_trub_chiller_loss', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
98 { name: 'eq_evap_rate', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
99 { name: 'eq_boil_time', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
100 { name: 'eq_calc_boil_volume', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
101 { name: 'eq_top_up_kettle', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
102 { name: 'eq_hop_utilization', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
103 { name: 'eq_notes', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
104 { name: 'eq_lauter_volume', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
105 { name: 'eq_lauter_height', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
106 { name: 'eq_lauter_deadspace', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
107 { name: 'eq_kettle_volume', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
108 { name: 'eq_kettle_height', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
109 { name: 'eq_mash_volume', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
110 { name: 'eq_mash_max', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
111 { name: 'eq_efficiency', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
112 { name: 'brew_date_start', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
113 { name: 'brew_mash_ph', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
114 { name: 'brew_mash_sg', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
115 { name: 'brew_mash_efficiency', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
116 { name: 'brew_sparge_est', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
117 { name: 'brew_sparge_ph', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
118 { name: 'brew_preboil_volume', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
119 { name: 'brew_preboil_sg', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
120 { name: 'brew_preboil_ph', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
121 { name: 'brew_preboil_efficiency', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
122 { name: 'brew_aboil_volume', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
123 { name: 'brew_aboil_sg', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
124 { name: 'brew_aboil_ph', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
125 { name: 'brew_aboil_efficiency', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
126 { name: 'brew_cooling_method', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
127 { name: 'brew_cooling_time', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
128 { name: 'brew_cooling_to', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
129 { name: 'brew_whirlpool9', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
130 { name: 'brew_whirlpool7', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
131 { name: 'brew_whirlpool6', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
132 { name: 'brew_whirlpool2', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
133 { name: 'brew_fermenter_volume', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
134 { name: 'brew_fermenter_extrawater', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
135 { name: 'brew_fermenter_tcloss', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
136 { name: 'brew_aeration_time', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
137 { name: 'brew_aeration_speed', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
138 { name: 'brew_aeration_type', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
139 { name: 'brew_fermenter_sg', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
140 { name: 'brew_fermenter_ibu', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
141 { name: 'brew_fermenter_color', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
142 { name: 'brew_date_end', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
143 { name: 'og', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
144 { name: 'fg', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
145 { name: 'primary_start_temp', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
146 { name: 'primary_max_temp', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
147 { name: 'primary_end_temp', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
148 { name: 'primary_end_sg', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
149 { name: 'primary_end_date', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
150 { name: 'secondary_temp', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
151 { name: 'secondary_end_sg', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
152 { name: 'secondary_end_date', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
153 { name: 'tertiary_temp', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
154 { name: 'package_date', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
155 { name: 'package_volume', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
156 { name: 'package_infuse_amount', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
157 { name: 'package_infuse_abv', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
158 { name: 'package_infuse_notes', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
159 { name: 'package_abv', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
160 { name: 'package_ph', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
161 { name: 'bottle_amount', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
162 { name: 'bottle_carbonation', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
163 { name: 'bottle_priming_water', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
164 { name: 'bottle_priming_amount', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
165 { name: 'bottle_carbonation_temp', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
166 { name: 'keg_amount', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
167 { name: 'keg_carbonation', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
168 { name: 'keg_priming_water', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
169 { name: 'keg_priming_amount', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
170 { name: 'keg_carbonation_temp', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
171 { name: 'keg_forced_carb', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
172 { name: 'keg_pressure', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
173 { name: 'taste_notes', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
174 { name: 'taste_rate', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
175 { name: 'taste_date', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
176 { name: 'taste_color', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
177 { name: 'taste_transparency', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
178 { name: 'taste_head', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
179 { name: 'taste_aroma', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
180 { name: 'taste_taste', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
181 { name: 'taste_mouthfeel', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
182 { name: 'taste_aftertaste', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
183 { name: 'st_name', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
184 { name: 'st_letter', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
185 { name: 'st_guide', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
186 { name: 'st_category', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
187 { name: 'st_category_number', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
188 { name: 'st_type', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
189 { name: 'st_og_min', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
190 { name: 'st_og_max', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
191 { name: 'st_fg_min', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
192 { name: 'st_fg_max', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
193 { name: 'st_ibu_min', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
194 { name: 'st_ibu_max', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
195 { name: 'st_color_min', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
196 { name: 'st_color_max', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
197 { name: 'st_carb_min', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
198 { name: 'st_carb_max', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
199 { name: 'st_abv_min', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
200 { name: 'st_abv_max', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
201 { name: 'type', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
202 { name: 'batch_size', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
203 { name: 'boil_size', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
204 { name: 'boil_time', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
205 { name: 'efficiency', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
206 { name: 'est_og', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
207 { name: 'est_fg', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
208 { name: 'est_abv', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
209 { name: 'est_color', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
210 { name: 'color_method', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
211 { name: 'est_ibu', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
212 { name: 'ibu_method', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
213 { name: 'est_carb', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
214 { name: 'sparge_temp', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
215 { name: 'sparge_ph', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
216 { name: 'sparge_volume', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
217 { name: 'sparge_source', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
218 { name: 'sparge_acid_type', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
219 { name: 'sparge_acid_perc', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
220 { name: 'sparge_acid_amount', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
221 { name: 'mash_ph', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
222 { name: 'mash_name', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
223 { name: 'calc_acid', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
224 { name: 'w1_name', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
225 { name: 'w1_amount', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
226 { name: 'w1_calcium', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
227 { name: 'w1_sulfate', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
228 { name: 'w1_chloride', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
229 { name: 'w1_sodium', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
230 { name: 'w1_magnesium', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
231 { name: 'w1_total_alkalinity', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
232 { name: 'w1_ph', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
233 { name: 'w1_cost', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
234 { name: 'w2_name', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
235 { name: 'w2_amount', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
236 { name: 'w2_calcium', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
237 { name: 'w2_sulfate', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
238 { name: 'w2_chloride', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
239 { name: 'w2_sodium', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
240 { name: 'w2_magnesium', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
241 { name: 'w2_total_alkalinity', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
242 { name: 'w2_ph', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
243 { name: 'w2_cost', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
244 { name: 'wg_amount', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
245 { name: 'wg_calcium', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
246 { name: 'wg_sulfate', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
247 { name: 'wg_chloride', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
248 { name: 'wg_sodium', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
249 { name: 'wg_magnesium', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
250 { name: 'wg_total_alkalinity', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
251 { name: 'wg_ph', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
252 { name: 'wb_calcium', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
253 { name: 'wb_sulfate', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
254 { name: 'wb_chloride', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
255 { name: 'wb_sodium', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
256 { name: 'wb_magnesium', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
257 { name: 'wb_total_alkalinity', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
258 { name: 'wb_ph', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
259 { name: 'wa_acid_name', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
260 { name: 'wa_acid_perc', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
261 { name: 'wa_base_name', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
262 { name: 'starter_enable', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
263 { name: 'starter_type', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
264 { name: 'starter_sg', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
265 { name: 'starter_viability', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
266 { name: 'starter_viability', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
267 { name: 'prop1_type', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
268 { name: 'prop1_volume', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
269 { name: 'prop2_type', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
270 { name: 'prop2_volume', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
271 { name: 'prop3_type', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
272 { name: 'prop3_volume', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
273 { name: 'prop4_type', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
274 { name: 'prop4_volume', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
275 { name: 'divide_type', type: 'int' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
276 { name: 'divide_size', type: 'float' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
277 { name: 'divide_parts', type: 'int' },
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
278 { name: 'fermentables', type: 'string' },
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
279 { name: 'hops', type: 'string' },
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
280 { name: 'miscs', type: 'string' },
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
281 { name: 'yeasts', type: 'string' },
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
282 { name: 'mashs', type: 'string' }
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
283 ],
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
284 id: 'record',
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
285 url: url + '?record=' + my_record
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
286 },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
287
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
288 // Load data and select one record.
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
289 dataAdapter = new $.jqx.dataAdapter(source, {
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
290 loadComplete: function() {
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
291 var records = dataAdapter.records;
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
292 dataRecord = records[0];
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
293 // Hidden record uuid
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
294 $('#name').val(dataRecord.name);
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
295 $('#code').val(dataRecord.code);
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
296 $('#stage').val(StageData[dataRecord.stage].nl);
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
297 // Disable stages that are already done.
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
298 for (i = 0; i < SplitData.length; i++) {
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
299 console.log('i:' + i + ' ok:' + SplitData[i].ok + ' stage:' + dataRecord.stage);
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
300 if (SplitData[i].ok < dataRecord.stage)
525
8bbc5730aaa8 Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents: 500
diff changeset
301 $('#divide_type').jqxDropDownList('disableAt', i);
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
302 }
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
303 },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
304 loadError: function(jqXHR, status, error) {
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
305 },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
306 beforeLoadComplete: function(records) {
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
307 $('#jqxLoader').jqxLoader('open');
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
308 }
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
309 });
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
310
500
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
311 durl = 'includes/db_divides.php',
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
312
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
313 // Prepare the data
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
314 dividerec = {
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
315 datatype: 'json',
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
316 cache: false,
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
317 datafields: [
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
318 // From prod_main
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
319 { name: 'record', type: 'number' },
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
320 { name: 'divide_from', type: 'string' },
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
321 { name: 'divide_type', type: 'int' },
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
322 { name: 'divide_size', type: 'float' },
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
323 { name: 'name', type: 'string' },
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
324 { name: 'code', type: 'string' }
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
325 ],
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
326 id: 'record',
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
327 url: durl + '?record=' + my_record
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
328 };
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
329
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
330 var editSplit = function(data) {
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
331 var splitSource = {
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
332 datatype: 'local',
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
333 cache: false,
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
334 async: false,
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
335 datafields: [
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
336 { name: 'split_code', type: 'string' },
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
337 { name: 'split_name', type: 'string' },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
338 { name: 'split_size', type: 'float' }
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
339 ],
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
340 addrow: function(rowid, rowdata, position, commit) {
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
341 console.log('split addrow ' + rowid);
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
342 commit(true);
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
343 },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
344 deleterow: function(rowid, commit) {
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
345 console.log('split deleterow ' + rowid);
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
346 commit(true);
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
347 }
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
348 },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
349 splitAdapter = new $.jqx.dataAdapter(splitSource, {});
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
350 $('#splitGrid').jqxGrid({
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
351 width: 1240,
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
352 height: 375,
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
353 source: splitAdapter,
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
354 editable: true,
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
355 enabletooltips: true,
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
356 selectionmode: 'singlecell',
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
357 editmode: 'click',
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
358 theme: theme,
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
359 showtoolbar: true,
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
360 rendertoolbar: function(toolbar) {
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
361 var container = $('<div style="overflow: hidden; position: relative; margin: 5px;"></div>');
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
362 toolbar.append(container);
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
363 container.append('<input style="float: left; margin-left: 165px;" id="saddrowbutton" type="button" value="Nieuwe splitsing" />');
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
364 container.append('<input style="float: left; margin-left: 565px;" id="sdeleterowbutton" type="button" value="Verwijder splitsing" />');
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
365 $('#saddrowbutton').jqxButton({ template: 'primary', theme: theme, disabled: true, height: 27, width: 150 });
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
366 $('#saddrowbutton').on('click', function() {
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
367 var row = {}, rowscount = $('#splitGrid').jqxGrid('getdatainformation').rowscount;
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
368 row['split_code'] = dataRecord.code + '-' + (rowscount + 1);
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
369 row['split_name'] = dataRecord.name + ' ' + (rowscount + 1);
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
370 row['split_size'] = 0;
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
371 $('#splitGrid').jqxGrid('addrow', null, row);
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
372 $('#sdeleterowbutton').jqxButton({ disabled: false }); // Enable delete
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
373 $('#divide_type').jqxDropDownList({ disabled: true }); // Disable dropdown
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
374 });
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
375 // Delete last added split
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
376 $('#sdeleterowbutton').jqxButton({ template: 'danger', theme: theme, disabled: true, height: 27, width: 150 });
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
377 $('#sdeleterowbutton').on('click', function() {
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
378 var rowscount, id, row;
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
379 rowscount = $('#splitGrid').jqxGrid('getdatainformation').rowscount;
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
380 id = $('#splitGrid').jqxGrid('getrowid', rowscount - 1);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
381 // First, give back this batch volume.
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
382 row = $('#splitGrid').jqxGrid('getrowdata', id);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
383 leftover += row.split_size;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
384 if (leftover > available)
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
385 leftover = available;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
386 $('#leftover').val(leftover);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
387 // Then delete the row.
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
388 $('#splitGrid').jqxGrid('deleterow', id);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
389 if (rowscount == 1) {
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
390 $('#sdeleterowbutton').jqxButton({ disabled: true }); // No more rows
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
391 $('#divide_type').jqxDropDownList({ disabled: false });
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
392 }
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
393 });
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
394 },
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
395 columns: [
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
396 { text: 'Splits code', datafield: 'split_code', width: 120, editable: false },
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
397 { text: 'Splits naam', datafield: 'split_name' },
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
398 { text: 'Splits volume', datafield: 'split_size', width: 120, align: 'right', cellsalign: 'right', cellsformat: 'f1', columntype: 'numberinput',
525
8bbc5730aaa8 Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents: 500
diff changeset
399 validation: function(cell, value) {
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
400 if (value < 0 || value > maxvolume) {
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
401 return { result: false, message: 'Volume should be between 0 and ' + maxvolume + ' liter' };
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
402 }
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
403 return true;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
404 },
525
8bbc5730aaa8 Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents: 500
diff changeset
405 createeditor: function(row, cellvalue, editor) {
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
406 editor.jqxNumberInput({ decimalDigits: 1, digits: 3 });
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
407 }
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
408 }
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
409 ]
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
410 });
525
8bbc5730aaa8 Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents: 500
diff changeset
411 $('#splitGrid').on('cellbeginedit', function(event) {
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
412 var args = event.args;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
413 calcRoom(args.rowindex); // Make maxvolume available.
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
414 });
525
8bbc5730aaa8 Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents: 500
diff changeset
415 $('#splitGrid').on('cellvaluechanged', function(event) {
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
416 var args = event.args;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
417 //console.log("cellvaluechanged, Column: " + args.datafield + ", Row: " + (1 + args.rowindex) + ", Value: " + args.value);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
418 calcLeftover();
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
419 });
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
420 };
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
421
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
422 dataAdapter.dataBind();
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
423 editSplit(dataRecord);
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
424
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
425 // initialize the input fields.
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
426 $('#name').jqxTooltip({ content: 'De naam voor dit product.' });
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
427 $('#name').jqxInput({ theme: theme, width: 640, height: 23 });
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
428 $('#code').jqxTooltip({ content: 'Product code nummer.' });
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
429 $('#code').jqxInput({ theme: theme, width: 100, height: 23 });
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
430 $('#stage').jqxTooltip({ content: 'De productie fase van dit product.' });
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
431 $('#stage').jqxInput({ theme: theme, width: 100, height: 23 });
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
432 $('#available').jqxNumberInput(Show1dec);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
433 $('#leftover').jqxNumberInput(Show1dec);
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
434 $('#divide_type').val(0);
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
435 $('#divide_type').on('change', function(event) {
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
436 var index = event.args.index;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
437 console.log('divide_type:' + index);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
438 dataRecord.divide_type = index;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
439 switch (index) {
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
440 case 0:
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
441 available = 0;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
442 break;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
443 case 1:
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
444 available = dataRecord.boil_size;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
445 break;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
446 case 2:
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
447 available = dataRecord.batch_size;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
448 break;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
449 case 3:
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
450 available = dataRecord.brew_fermenter_volume;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
451 break;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
452 case 4:
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
453 case 5:
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
454 available = Round(dataRecord.brew_fermenter_volume * 0.92, 1); // Estimate volume without yeast trub
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
455 break;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
456 case 6:
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
457 available = dataRecord.package_volume;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
458 break;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
459 }
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
460 leftover = available;
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
461 minvolume = Round(0.1 * available, 1);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
462 $('#available').val(available);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
463 $('#leftover').val(leftover);
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
464 if (index != 0) {
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
465 $('#saddrowbutton').jqxButton({ disabled: false });
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
466 } else {
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
467 $('#saddrowbutton').jqxButton({ disabled: true });
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
468 }
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
469 });
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
470
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
471 $('#Cancel').jqxButton({ template: 'primary', width: '80px', theme: theme });
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
472 $('#Cancel').bind('click', function() {
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
473 window.location.href = my_return;
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
474 });
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
475
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
476 $('#Save').jqxButton({ template: 'success', width: '80px', theme: theme });
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
477 $('#Save').bind('click', function() {
500
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
478 var rows, row, i, div, data;
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
479 if (leftover != available) {
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
480 console.log('Save and there are splits');
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
481
500
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
482 // Record 0, the master data
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
483 div = {};
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
484 div.divide_from = dataRecord.uuid;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
485 div.divide_type = dataRecord.divide_type;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
486 div.divide_size = leftover;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
487 div.divide_part = 0;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
488 div.name = dataRecord.name;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
489 div.code = dataRecord.code;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
490 data = 'insert=true&' + $.param(div);
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
491 $.ajax({
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
492 dataType: 'json',
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
493 url: durl,
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
494 cache: false,
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
495 data: data,
525
8bbc5730aaa8 Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents: 500
diff changeset
496 type: 'POST',
8bbc5730aaa8 Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents: 500
diff changeset
497 success: function(data, status, xhr) {
500
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
498 console.log('insert divides: 0');
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
499 },
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
500 error: function(jqXHR, textStatus, errorThrown) {
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
501 console.log('insert divides: ' + textStatus);
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
502 }
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
503 });
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
504
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
505 rows = $('#splitGrid').jqxGrid('getrows');
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
506 for (i = 0; i < rows.length; i++) {
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
507 row = rows[i];
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
508 console.log('split ' + i);
500
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
509 div = {};
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
510 div.divide_from = dataRecord.uuid;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
511 div.divide_type = dataRecord.divide_type;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
512 div.divide_size = row.split_size;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
513 div.divide_part = i + 1;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
514 div.name = row.split_name;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
515 div.code = row.split_code;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
516 data = 'insert=true&' + $.param(div);
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
517 $.ajax({
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
518 dataType: 'json',
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
519 url: durl,
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
520 cache: false,
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
521 data: data,
525
8bbc5730aaa8 Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents: 500
diff changeset
522 type: 'POST',
8bbc5730aaa8 Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents: 500
diff changeset
523 success: function(data, status, xhr) {
500
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
524 console.log('insert divides: ' + i);
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
525 },
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
526 error: function(jqXHR, textStatus, errorThrown) {
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
527 console.log('insert divides: ' + textStatus);
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
528 }
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
529 });
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
530 }
500
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
531
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
532 div = {};
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
533 div.record = dataRecord.record;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
534 div.divide_type = dataRecord.divide_type;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
535 div.divide_size = leftover;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
536 div.divide_parts = i;
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
537 data = 'splitit=true&' + $.param(div);
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
538 $.ajax({
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
539 dataType: 'json',
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
540 url: url,
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
541 cache: false,
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
542 data: data,
525
8bbc5730aaa8 Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents: 500
diff changeset
543 type: 'POST',
8bbc5730aaa8 Code cleanup and manual compress
Michiel Broek <mbroek@mbse.eu>
parents: 500
diff changeset
544 success: function(data, status, xhr) {
500
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
545 console.log('updated products');
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
546 },
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
547 error: function(jqXHR, textStatus, errorThrown) {
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
548 console.log('updated products: ' + textStatus);
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
549 }
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
550 });
499
4f14a18b581e Finished the logic in the split batch screen
Michiel Broek <mbroek@mbse.eu>
parents: 498
diff changeset
551 }
500
8d53ad389204 Reworked the splitted batches, the data is now in a separate table and there is only one product record.
Michiel Broek <mbroek@mbse.eu>
parents: 499
diff changeset
552 window.location.href = my_return;
498
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
553 });
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
554
10c6eeee60ce Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
555 });

mercurial