X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep107.php;h=e9df284d6d63eb519c40e410d05787ce6d925886;hb=508b54ee5cef13ac64f1532dfedfb7b242aa9077;hp=5d181090fe02a27242deaa06525bb61a51d1b79a;hpb=ebc600101ceab69c06eac4b1bd4d1782af45de05;p=fa-stable.git diff --git a/reporting/rep107.php b/reporting/rep107.php index 5d181090..e9df284d 100644 --- a/reporting/rep107.php +++ b/reporting/rep107.php @@ -113,6 +113,9 @@ function print_invoices() $SubTotal = 0; while ($myrow2=db_fetch($result)) { + if ($myrow2["quantity"] == 0) + continue; + $Net = round2($sign * ((1 - $myrow2["discount_percent"]) * $myrow2["unit_price"] * $myrow2["quantity"]), user_price_dec()); $SubTotal += $Net; @@ -176,7 +179,7 @@ function print_invoices() if ($tax_item['included_in_price']) { $rep->TextCol(3, 7, $doc_Included . " " . $tax_item['tax_type_name'] . - " (" . $tax_item['rate'] . "%) " . $doc_Amount . ":" . $DisplayTax, -2); + " (" . $tax_item['rate'] . "%) " . $doc_Amount . ": " . $DisplayTax, -2); } else { @@ -192,6 +195,12 @@ function print_invoices() $rep->Font('bold'); $rep->TextCol(3, 6, $doc_TOTAL_INVOICE, - 2); $rep->TextCol(6, 7, $DisplayTotal, -2); + $words = price_in_words($myrow['Total'], $j); + if ($words != "") + { + $rep->NewLine(1); + $rep->TextCol(1, 7, $myrow['curr_code'] . ": " . $words, - 2); + } $rep->Font(); if ($email == 1) {