[0000098] Unable issue of credit note for invoice with removed line
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 9 Dec 2008 10:29:51 +0000 (10:29 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 9 Dec 2008 10:29:51 +0000 (10:29 +0000)
items.

sales/customer_credit_invoice.php

index ca1db0bd210799716d1f993205418c85d495fea5..12b12a484fcbb3d3cdf2dbc7fe56a8452a1f95ed 100644 (file)
@@ -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);