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-Tag: 2.3-final~1360 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=3907e2692e61b6cf1d8d4bad9fcd526d2347ed0b;p=fa-stable.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 ca1db0bd..12b12a48 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);