X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=blobdiff_plain;f=inventory%2Fcost_update.php;h=f4fa70ba0f0fec5cf7b2ecb1b4372a794edd346e;hp=35347000c7eaa2b570a5aeec9328cc566bd58dd3;hb=2f3375b4493c1b1e0b17c2801298275f22f8d76e;hpb=5189bc26f377d678d0a3d88a2b623d69c0e1a278 diff --git a/inventory/cost_update.php b/inventory/cost_update.php index 35347000..f4fa70ba 100644 --- a/inventory/cost_update.php +++ b/inventory/cost_update.php @@ -126,13 +126,15 @@ div_start('cost_table'); start_table(TABLESTYLE2); $dec1 = $dec2 = $dec3 = 0; -$_POST['material_cost'] = price_decimal_format($myrow["material_cost"], $dec1); -$_POST['labour_cost'] = price_decimal_format($myrow["labour_cost"], $dec2); -$_POST['overhead_cost'] = price_decimal_format($myrow["overhead_cost"], $dec3); +if ($myrow) { + $_POST['material_cost'] = price_decimal_format($myrow["material_cost"], $dec1); + $_POST['labour_cost'] = price_decimal_format($myrow["labour_cost"], $dec2); + $_POST['overhead_cost'] = price_decimal_format($myrow["overhead_cost"], $dec3); +} amount_row(_("Unit cost"), "material_cost", null, "class='tableheader2'", null, $dec1); -if ($myrow["mb_flag"]=='M') +if ($myrow && $myrow["mb_flag"]=='M') { amount_row(_("Standard Labour Cost Per Unit"), "labour_cost", null, "class='tableheader2'", null, $dec2); amount_row(_("Standard Overhead Cost Per Unit"), "overhead_cost", null, "class='tableheader2'", null, $dec3);