From: Janusz Dobrowolski Date: Tue, 9 Dec 2008 10:29:51 +0000 (+0000) Subject: [0000098] Unable issue of credit note for invoice with removed line X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=7afd62844cd883cf92d2dd7cc2255165eaf7b37e;p=textcart.git [0000098] Unable issue of credit note for invoice with removed line items. --- diff --git a/sales/customer_credit_invoice.php b/sales/customer_credit_invoice.php index ca1db0b..12b12a4 100644 --- a/sales/customer_credit_invoice.php +++ b/sales/customer_credit_invoice.php @@ -142,6 +142,9 @@ function check_quantities() { $ok =1; foreach ($_SESSION['Items']->line_items as $line_no=>$itm) { + if ($itm->quantity == $itm->qty_done) { + continue; // this line was fully credited/removed + } if (isset($_POST['Line'.$line_no])) { if (check_num('Line'.$line_no, 0, $itm->quantity)) { $_SESSION['Items']->line_items[$line_no]->qty_dispatched = @@ -275,8 +278,8 @@ function display_credit_items() $k = 0; //row colour counter foreach ($_SESSION['Items']->line_items as $line_no=>$ln_itm) { - if ($ln_itm->quantity==$ln_itm->qty_done) { - continue; // this line was fully credited + if ($ln_itm->quantity == $ln_itm->qty_done) { + continue; // this line was fully credited/removed } alt_table_row_color($k);