165 $fermentables .= ',"f_type":0'; |
165 $fermentables .= ',"f_type":0'; |
166 else if ($fermentable->TYPE == 'Sugar') |
166 else if ($fermentable->TYPE == 'Sugar') |
167 $fermentables .= ',"f_type":1'; |
167 $fermentables .= ',"f_type":1'; |
168 else if ($fermentable->TYPE == 'Extract') |
168 else if ($fermentable->TYPE == 'Extract') |
169 $fermentables .= ',"f_type":2'; |
169 $fermentables .= ',"f_type":2'; |
170 else if ($fermentable->TYPE == 'Dry extract') |
170 else if (($fermentable->TYPE == 'Dry extract') || ($fermentable->TYPE == 'Dry Extract')) |
171 $fermentables .= ',"f_type":3'; |
171 $fermentables .= ',"f_type":3'; |
172 else if ($fermentable->TYPE == 'Adjunct') |
172 else if ($fermentable->TYPE == 'Adjunct') |
173 $fermentables .= ',"f_type":4'; |
173 $fermentables .= ',"f_type":4'; |
174 else |
174 else |
175 echo "Unknown TYPE " . $fermentable->TYPE . "<br / >"; |
175 echo "Unknown TYPE " . $fermentable->TYPE . "<br / >"; |
211 $fermentables .= ',"f_graintype":1'; |
211 $fermentables .= ',"f_graintype":1'; |
212 else if ($fermentable->GRAINTYPE == 'Crystal') |
212 else if ($fermentable->GRAINTYPE == 'Crystal') |
213 $fermentables .= ',"f_graintype":2'; |
213 $fermentables .= ',"f_graintype":2'; |
214 else if ($fermentable->GRAINTYPE == 'Kilned') |
214 else if ($fermentable->GRAINTYPE == 'Kilned') |
215 $fermentables .= ',"f_graintype":3'; |
215 $fermentables .= ',"f_graintype":3'; |
216 else if ($fermentable->GRAINTYPE == 'Sour malt') |
216 else if (($fermentable->GRAINTYPE == 'Sour malt') || ($fermentable->GRAINTYPE == 'Sour Malt')) |
217 $fermentables .= ',"f_graintype":4'; |
217 $fermentables .= ',"f_graintype":4'; |
218 else if ($fermentable->GRAINTYPE == 'Special') |
218 else if ($fermentable->GRAINTYPE == 'Special') |
219 $fermentables .= ',"f_graintype":5'; |
219 $fermentables .= ',"f_graintype":5'; |
220 else if ($fermentable->GRAINTYPE == 'No malt') |
220 else if (($fermentable->GRAINTYPE == 'No malt') || ($fermentable->GRAINTYPE == 'No Malt')) |
221 $fermentables .= ',"f_graintype":6'; |
221 $fermentables .= ',"f_graintype":6'; |
222 else |
222 else |
223 $fermentables .= ',"f_graintype":0'; // Base, default |
223 $fermentables .= ',"f_graintype":0'; // Base, default |
224 |
224 |
225 if ($fermentable->ADDED == 'Boil') |
225 if ($fermentable->ADDED == 'Boil') |
351 $miscs .= ',"m_amount":' . floatval($misc->AMOUNT); |
351 $miscs .= ',"m_amount":' . floatval($misc->AMOUNT); |
352 if ($misc->COST) { |
352 if ($misc->COST) { |
353 $miscs .= ',"m_cost":' . floatval($misc->COST); |
353 $miscs .= ',"m_cost":' . floatval($misc->COST); |
354 } else { |
354 } else { |
355 /* Brouwhulp bug, added water agents have no cost field. */ |
355 /* Brouwhulp bug, added water agents have no cost field. */ |
356 if ($misc->TYPE == "Water agent") { |
356 if (($misc->TYPE == "Water agent") || ($misc->TYPE == "Water Agent")) { |
357 $miscs .= ',"m_cost":'. get_miscs_cost($mname); |
357 $miscs .= ',"m_cost":'. get_miscs_cost($mname); |
358 } else { |
358 } else { |
359 $miscs .= ',"m_cost":0'; |
359 $miscs .= ',"m_cost":0'; |
360 } |
360 } |
361 } |
361 } |
368 $miscs .= ',"m_type":2'; |
368 $miscs .= ',"m_type":2'; |
369 else if ($misc->TYPE == 'Fining') |
369 else if ($misc->TYPE == 'Fining') |
370 $miscs .= ',"m_type":3'; |
370 $miscs .= ',"m_type":3'; |
371 else if (($misc->TYPE == 'Water agent') || ($misc->TYPE == 'Water Agent')) |
371 else if (($misc->TYPE == 'Water agent') || ($misc->TYPE == 'Water Agent')) |
372 $miscs .= ',"m_type":4'; |
372 $miscs .= ',"m_type":4'; |
373 else if ($misc->TYPE == 'Yeast nutrient') |
373 else if (($misc->TYPE == 'Yeast nutrient') || ($misc->TYPE == 'Yeast Nutrient')) |
374 $miscs .= ',"m_type":5'; |
374 $miscs .= ',"m_type":5'; |
375 else if ($misc->TYPE == 'Other') |
375 else if ($misc->TYPE == 'Other') |
376 $miscs .= ',"m_type":6'; |
376 $miscs .= ',"m_type":6'; |
377 else |
377 else |
378 echo "Unknown TYPE " . $misc->TYPE . "<br />"; |
378 echo "Unknown TYPE " . $misc->TYPE . "<br />"; |