X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fsupplier_invoice_grns.php;h=3ba94c099f260d489b8802d05857a1c5f5b195f7;hb=41f4f83b97d8afc5f4c1be4afccd5049cd5641c0;hp=ecbfe1684bffefefa9a63e87a3e745d792f24de4;hpb=de3a75773afa86df1739d14f24399d6f7a46f809;p=fa-stable.git diff --git a/purchasing/supplier_invoice_grns.php b/purchasing/supplier_invoice_grns.php index ecbfe168..3ba94c09 100644 --- a/purchasing/supplier_invoice_grns.php +++ b/purchasing/supplier_invoice_grns.php @@ -47,12 +47,15 @@ function check_data() if ($check_price_charged_vs_order_price == True) { - if (input_num('ChgPrice')/$_POST['order_price'] > - (1 + (sys_prefs::over_charge_allowance() / 100))) - { + if ($_POST['order_price']!=input_num('ChgPrice')) { + if ($_POST['order_price']==0 || + input_num('ChgPrice')/$_POST['order_price'] > + (1 + (sys_prefs::over_charge_allowance() / 100))) + { display_error(_("The price being invoiced is more than the purchase order price by more than the allowed over-charge percentage. The system is set up to prohibit this. See the system administrator to modify the set up parameters if necessary.") . _("The over-charge percentage allowance is :") . sys_prefs::over_charge_allowance() . "%"); return false; + } } } @@ -164,7 +167,8 @@ function display_grn_items_for_selection() qty_cell($myrow["quantity_inv"]); qty_cell($myrow["qty_recd"] - $myrow["quantity_inv"]); amount_cell($myrow["unit_price"]); - amount_cell($myrow["unit_price"] * ($myrow["qty_recd"] - $myrow["quantity_inv"])); + amount_cell(round($myrow["unit_price"] * ($myrow["qty_recd"] - $myrow["quantity_inv"]), + user_price_dec())); end_row(); $i++;