X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep109.php;h=c8b4a1ef3e782f8ac34fc86df9d67742fa5d13e0;hb=fff65dd000727b3403f641cb265c7b327b4fe22d;hp=181a0344ecbf582bb5a55d531e989fe1fa7e74f5;hpb=91a637fe74ce0d78b9b4ce099b42449da87c6e71;p=fa-stable.git diff --git a/reporting/rep109.php b/reporting/rep109.php index 181a0344..c8b4a1ef 100644 --- a/reporting/rep109.php +++ b/reporting/rep109.php @@ -33,7 +33,7 @@ $print_as_quote = 0; function print_sales_orders() { - global $path_to_root, $print_as_quote; + global $path_to_root, $print_as_quote, $no_zero_lines_amount; include_once($path_to_root . "/reporting/includes/pdf_report.inc"); @@ -98,7 +98,7 @@ function print_sales_orders() else $rep->title = ($print_as_quote==1 ? _("QUOTE") : _("SALES ORDER")); - $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no']); + $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no'], false); $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESORDER, $contacts); $rep->NewPage(); @@ -124,11 +124,14 @@ function print_sales_orders() $rep->TextColLines(1, 2, $myrow2['description'], -2); $newrow = $rep->row; $rep->row = $oldrow; - $rep->TextCol(2, 3, $DisplayQty, -2); - $rep->TextCol(3, 4, $myrow2['units'], -2); - $rep->TextCol(4, 5, $DisplayPrice, -2); - $rep->TextCol(5, 6, $DisplayDiscount, -2); - $rep->TextCol(6, 7, $DisplayNet, -2); + if ($Net != 0.0 || !is_service($myrow2['mb_flag']) || !isset($no_zero_lines_amount) || $no_zero_lines_amount == 0) + { + $rep->TextCol(2, 3, $DisplayQty, -2); + $rep->TextCol(3, 4, $myrow2['units'], -2); + $rep->TextCol(4, 5, $DisplayPrice, -2); + $rep->TextCol(5, 6, $DisplayDiscount, -2); + $rep->TextCol(6, 7, $DisplayNet, -2); + } $rep->row = $newrow; //$rep->NewLine(1); if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))