www/import/from_brouwhulp.php

changeset 131
71f1ca48c551
parent 126
9999b3ce98cb
child 136
bcc4583fd013
equal deleted inserted replaced
130:601920b902e5 131:71f1ca48c551
683 if ($comma) 683 if ($comma)
684 $yeasts .= ','; 684 $yeasts .= ',';
685 $comma = TRUE; 685 $comma = TRUE;
686 $yeasts .= '{"y_name":"' . mysqli_real_escape_string($db, $yeast->NAME) . '"'; 686 $yeasts .= '{"y_name":"' . mysqli_real_escape_string($db, $yeast->NAME) . '"';
687 $yeasts .= ',"y_amount":' . floatval($yeast->AMOUNT); 687 $yeasts .= ',"y_amount":' . floatval($yeast->AMOUNT);
688 if ($yeast->COST) 688 if ($yeast->COST) {
689 $yeasts .= ',"y_cost":' . floatval($yeast->COST); 689 if (($yeast->FORM == "Liquid") && ($yeast->AMOUNT == "0.0588")) { // Packs
690 else 690 $yeasts .= ',"y_cost":' . floatval($yeast->COST) / 58.8;
691 } else {
692 $yeasts .= ',"y_cost":' . floatval($yeast->COST);
693 }
694 } else
691 $yeasts .= ',"y_cost":0'; 695 $yeasts .= ',"y_cost":0';
692 $yeasts .= ',"y_laboratory":"' . mysqli_real_escape_string($db, $yeast->LABORATORY) . '"'; 696 $yeasts .= ',"y_laboratory":"' . mysqli_real_escape_string($db, $yeast->LABORATORY) . '"';
693 $yeasts .= ',"y_product_id":"' . mysqli_real_escape_string($db, $yeast->PRODUCT_ID) . '"'; 697 $yeasts .= ',"y_product_id":"' . mysqli_real_escape_string($db, $yeast->PRODUCT_ID) . '"';
694 $yeasts .= ',"y_type":"' . mysqli_real_escape_string($db, $yeast->TYPE) . '"'; 698 $yeasts .= ',"y_type":"' . mysqli_real_escape_string($db, $yeast->TYPE) . '"';
695 $yeasts .= ',"y_form":"' . mysqli_real_escape_string($db, $yeast->FORM) . '"'; 699 $yeasts .= ',"y_form":"' . mysqli_real_escape_string($db, $yeast->FORM) . '"';

mercurial