$power_by = "FrontAccounting";
$power_url = "http://frontaccounting.com";
+ /* Do not print zero lines amount of 0.00 in Sales Documents if service item. 1 = do not */
+ $no_zero_lines_amount = 1;
+
/* Use icon for editkey (=true) righ of combobox. 1 = use, 0 = do not use */
$use_icon_for_editkey = 0;
function print_invoices()
{
- global $path_to_root, $alternative_tax_include_on_docs, $suppress_tax_rates;
+ global $path_to_root, $alternative_tax_include_on_docs, $suppress_tax_rates, $no_zero_lines_amount;
include_once($path_to_root . "/reporting/includes/pdf_report.inc");
$rep->TextColLines(1, 2, $myrow2['StockDescription'], -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))
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");
$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))
function print_deliveries()
{
- global $path_to_root, $packing_slip, $alternative_tax_include_on_docs, $suppress_tax_rates;
+ global $path_to_root, $packing_slip, $alternative_tax_include_on_docs, $suppress_tax_rates, $no_zero_lines_amount;
include_once($path_to_root . "/reporting/includes/pdf_report.inc");
$rep->TextColLines(1, 2, $myrow2['StockDescription'], -2);
$newrow = $rep->row;
$rep->row = $oldrow;
- $rep->TextCol(2, 3, $DisplayQty, -2);
- $rep->TextCol(3, 4, $myrow2['units'], -2);
- if ($packing_slip == 0)
- {
- $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);
+ if ($packing_slip == 0)
+ {
+ $rep->TextCol(4, 5, $DisplayPrice, -2);
+ $rep->TextCol(5, 6, $DisplayDiscount, -2);
+ $rep->TextCol(6, 7, $DisplayNet, -2);
+ }
}
$rep->row = $newrow;
//$rep->NewLine(1);
function print_sales_quotations()
{
- global $path_to_root, $print_as_quote, $print_invoice_no;
+ global $path_to_root, $print_as_quote, $print_invoice_no, $no_zero_lines_amount;
include_once($path_to_root . "/reporting/includes/pdf_report.inc");
$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))
$sql = "SELECT ".TB_PREF."debtor_trans_details.*,
".TB_PREF."debtor_trans_details.unit_price+".TB_PREF."debtor_trans_details.unit_tax AS FullUnitPrice,
".TB_PREF."debtor_trans_details.description As StockDescription,
- ".TB_PREF."stock_master.units
- FROM ".TB_PREF."debtor_trans_details,".TB_PREF."stock_master
+ ".TB_PREF."stock_master.units, ".TB_PREF."stock_master.mb_flag
+ FROM ".TB_PREF."debtor_trans_details, ".TB_PREF."stock_master
WHERE (";
$tr=array();
.TB_PREF."sales_order_details.quantity,
discount_percent,
qty_sent as qty_done, "
- .TB_PREF."stock_master.units,
- ".TB_PREF."stock_master.material_cost + "
+ .TB_PREF."stock_master.units,"
+ .TB_PREF."stock_master.mb_flag,"
+ .TB_PREF."stock_master.material_cost + "
.TB_PREF."stock_master.labour_cost + "
.TB_PREF."stock_master.overhead_cost AS standard_cost
FROM ".TB_PREF."sales_order_details, ".TB_PREF."stock_master