X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep109.php;h=c8b4a1ef3e782f8ac34fc86df9d67742fa5d13e0;hb=aed0d601bf245cda4ae5867b8c2f54925658644d;hp=3939459d9665b3374c4992617bbd13ae9560f898;hpb=565a41e2d7fd4b4a32848e4829c11dbbcb5881d1;p=fa-stable.git diff --git a/reporting/rep109.php b/reporting/rep109.php index 3939459d..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)) @@ -211,7 +214,7 @@ function print_sales_orders() $rep->Font(); if ($email == 1) { - $rep->End($email, '', $myrow); + $rep->End($email); } } if ($email == 0)