From: Joe Date: Sun, 22 Jan 2023 16:06:17 +0000 (+0100) Subject: Cannot add received items to invoice if there are empty prev. items. Fixed. X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=a41fc3d75af89ab616e17ec42a116fcf201e5040 Cannot add received items to invoice if there are empty prev. items. Fixed. --- diff --git a/purchasing/supplier_invoice.php b/purchasing/supplier_invoice.php index d3cef151..fd86743b 100644 --- a/purchasing/supplier_invoice.php +++ b/purchasing/supplier_invoice.php @@ -283,7 +283,8 @@ function check_item_data($n) } } - if ($SysPrefs->check_qty_charged_vs_del_qty == true && ($_POST['qty_recd'.$n] != $_POST['prev_quantity_inv'.$n])) + if ($SysPrefs->check_qty_charged_vs_del_qty == true && ($_POST['qty_recd'.$n] != $_POST['prev_quantity_inv'.$n]) + && !empty($_POST['prev_quantity_inv'.$n])) { if (input_num('this_quantity_inv'.$n) / ($_POST['qty_recd'.$n] - $_POST['prev_quantity_inv'.$n]) > (1+ ($margin / 100)))