projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fbfb1ee
)
No display of shipping if there are no shipping costs on sales documents or views.
author
Joe Hunt
<joe.hunt.consulting@gmail.com>
Mon, 23 Nov 2015 08:26:48 +0000
(09:26 +0100)
committer
Joe Hunt
<joe.hunt.consulting@gmail.com>
Mon, 23 Nov 2015 08:26:48 +0000
(09:26 +0100)
reporting/rep107.php
patch
|
blob
|
history
reporting/rep109.php
patch
|
blob
|
history
reporting/rep110.php
patch
|
blob
|
history
reporting/rep111.php
patch
|
blob
|
history
reporting/rep113.php
patch
|
blob
|
history
sales/view/view_credit.php
patch
|
blob
|
history
sales/view/view_dispatch.php
patch
|
blob
|
history
sales/view/view_invoice.php
patch
|
blob
|
history
sales/view/view_sales_order.php
patch
|
blob
|
history
diff --git
a/reporting/rep107.php
b/reporting/rep107.php
index d3f74dd7999b3e826cc0443fa59196c95edd2b8c..58b1509fd7eaa54065c88147318892b6770649ed 100644
(file)
--- a/
reporting/rep107.php
+++ b/
reporting/rep107.php
@@
-145,7
+145,6
@@
function print_invoices()
}
$DisplaySubTot = number_format2($SubTotal,$dec);
}
$DisplaySubTot = number_format2($SubTotal,$dec);
- $DisplayFreight = number_format2($sign*$myrow["ov_freight"],$dec);
$rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
$doctype = ST_SALESINVOICE;
$rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
$doctype = ST_SALESINVOICE;
@@
-153,9
+152,13
@@
function print_invoices()
$rep->TextCol(3, 6, _("Sub-total"), -2);
$rep->TextCol(6, 7, $DisplaySubTot, -2);
$rep->NewLine();
$rep->TextCol(3, 6, _("Sub-total"), -2);
$rep->TextCol(6, 7, $DisplaySubTot, -2);
$rep->NewLine();
- $rep->TextCol(3, 6, _("Shipping"), -2);
- $rep->TextCol(6, 7, $DisplayFreight, -2);
- $rep->NewLine();
+ if ($myrow['ov_freight'] != 0.0)
+ {
+ $DisplayFreight = number_format2($sign*$myrow["ov_freight"],$dec);
+ $rep->TextCol(3, 6, _("Shipping"), -2);
+ $rep->TextCol(6, 7, $DisplayFreight, -2);
+ $rep->NewLine();
+ }
$tax_items = get_trans_tax_details(ST_SALESINVOICE, $i);
$first = true;
while ($tax_item = db_fetch($tax_items))
$tax_items = get_trans_tax_details(ST_SALESINVOICE, $i);
$first = true;
while ($tax_item = db_fetch($tax_items))
diff --git
a/reporting/rep109.php
b/reporting/rep109.php
index 8b22697ad9a52a0a153d08fe22a1760c0ecba751..e4592a788ad25db46f0aa8bc26695a65b080c014 100644
(file)
--- a/
reporting/rep109.php
+++ b/
reporting/rep109.php
@@
-144,7
+144,6
@@
function print_sales_orders()
$rep->TextColLines(1, 5, $myrow['comments'], -2);
}
$DisplaySubTot = number_format2($SubTotal,$dec);
$rep->TextColLines(1, 5, $myrow['comments'], -2);
}
$DisplaySubTot = number_format2($SubTotal,$dec);
- $DisplayFreight = number_format2($myrow["freight_cost"],$dec);
$rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
$doctype = ST_SALESORDER;
$rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
$doctype = ST_SALESORDER;
@@
-152,10
+151,13
@@
function print_sales_orders()
$rep->TextCol(3, 6, _("Sub-total"), -2);
$rep->TextCol(6, 7, $DisplaySubTot, -2);
$rep->NewLine();
$rep->TextCol(3, 6, _("Sub-total"), -2);
$rep->TextCol(6, 7, $DisplaySubTot, -2);
$rep->NewLine();
- $rep->TextCol(3, 6, _("Shipping"), -2);
- $rep->TextCol(6, 7, $DisplayFreight, -2);
- $rep->NewLine();
-
+ if ($myrow['freight_cost'] != 0.0)
+ {
+ $DisplayFreight = number_format2($myrow["freight_cost"],$dec);
+ $rep->TextCol(3, 6, _("Shipping"), -2);
+ $rep->TextCol(6, 7, $DisplayFreight, -2);
+ $rep->NewLine();
+ }
$DisplayTotal = number_format2($myrow["freight_cost"] + $SubTotal, $dec);
if ($myrow['tax_included'] == 0) {
$rep->TextCol(3, 6, _("TOTAL ORDER EX VAT"), - 2);
$DisplayTotal = number_format2($myrow["freight_cost"] + $SubTotal, $dec);
if ($myrow['tax_included'] == 0) {
$rep->TextCol(3, 6, _("TOTAL ORDER EX VAT"), - 2);
diff --git
a/reporting/rep110.php
b/reporting/rep110.php
index bfc1e4e6ccc4850b23b92172c42a62e046a93c2f..f32b1264605166b1bb8894233acfc5051a304452 100644
(file)
--- a/
reporting/rep110.php
+++ b/
reporting/rep110.php
@@
-150,7
+150,6
@@
function print_deliveries()
}
$DisplaySubTot = number_format2($SubTotal,$dec);
}
$DisplaySubTot = number_format2($SubTotal,$dec);
- $DisplayFreight = number_format2($myrow["ov_freight"],$dec);
$rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
$doctype=ST_CUSTDELIVERY;
$rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
$doctype=ST_CUSTDELIVERY;
@@
-159,9
+158,13
@@
function print_deliveries()
$rep->TextCol(3, 6, _("Sub-total"), -2);
$rep->TextCol(6, 7, $DisplaySubTot, -2);
$rep->NewLine();
$rep->TextCol(3, 6, _("Sub-total"), -2);
$rep->TextCol(6, 7, $DisplaySubTot, -2);
$rep->NewLine();
- $rep->TextCol(3, 6, _("Shipping"), -2);
- $rep->TextCol(6, 7, $DisplayFreight, -2);
- $rep->NewLine();
+ if ($myrow['ov_freight'] != 0.0)
+ {
+ $DisplayFreight = number_format2($myrow["ov_freight"],$dec);
+ $rep->TextCol(3, 6, _("Shipping"), -2);
+ $rep->TextCol(6, 7, $DisplayFreight, -2);
+ $rep->NewLine();
+ }
$tax_items = get_trans_tax_details(ST_CUSTDELIVERY, $i);
$first = true;
while ($tax_item = db_fetch($tax_items))
$tax_items = get_trans_tax_details(ST_CUSTDELIVERY, $i);
$first = true;
while ($tax_item = db_fetch($tax_items))
diff --git
a/reporting/rep111.php
b/reporting/rep111.php
index 6eeda915e4b3e4d73d5b0a32002308bc0d988e78..65352501f479402b38a8474f0aecbc3da47117bd 100644
(file)
--- a/
reporting/rep111.php
+++ b/
reporting/rep111.php
@@
-147,7
+147,6
@@
function print_sales_quotations()
$rep->TextColLines(1, 5, $myrow['comments'], -2);
}
$DisplaySubTot = number_format2($SubTotal,$dec);
$rep->TextColLines(1, 5, $myrow['comments'], -2);
}
$DisplaySubTot = number_format2($SubTotal,$dec);
- $DisplayFreight = number_format2($myrow["freight_cost"],$dec);
$rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
$doctype = ST_SALESQUOTE;
$rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
$doctype = ST_SALESQUOTE;
@@
-155,10
+154,13
@@
function print_sales_quotations()
$rep->TextCol(3, 6, _("Sub-total"), -2);
$rep->TextCol(6, 7, $DisplaySubTot, -2);
$rep->NewLine();
$rep->TextCol(3, 6, _("Sub-total"), -2);
$rep->TextCol(6, 7, $DisplaySubTot, -2);
$rep->NewLine();
- $rep->TextCol(3, 6, _("Shipping"), -2);
- $rep->TextCol(6, 7, $DisplayFreight, -2);
- $rep->NewLine();
-
+ if ($myrow['freight_cost'] != 0.0)
+ {
+ $DisplayFreight = number_format2($myrow["freight_cost"],$dec);
+ $rep->TextCol(3, 6, _("Shipping"), -2);
+ $rep->TextCol(6, 7, $DisplayFreight, -2);
+ $rep->NewLine();
+ }
$DisplayTotal = number_format2($myrow["freight_cost"] + $SubTotal, $dec);
if ($myrow['tax_included'] == 0) {
$rep->TextCol(3, 6, _("TOTAL ORDER EX VAT"), - 2);
$DisplayTotal = number_format2($myrow["freight_cost"] + $SubTotal, $dec);
if ($myrow['tax_included'] == 0) {
$rep->TextCol(3, 6, _("TOTAL ORDER EX VAT"), - 2);
diff --git
a/reporting/rep113.php
b/reporting/rep113.php
index c73388abf565650c4c097d4fa0c84f9bfe0cabda..107b210bef4e1678d7e72f8dda232c0270fb8c76 100644
(file)
--- a/
reporting/rep113.php
+++ b/
reporting/rep113.php
@@
-139,7
+139,6
@@
function print_credits()
}
$DisplaySubTot = number_format2($SubTotal,$dec);
}
$DisplaySubTot = number_format2($SubTotal,$dec);
- $DisplayFreight = number_format2($sign*$myrow["ov_freight"],$dec);
$rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
$doctype = ST_CUSTCREDIT;
$rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
$doctype = ST_CUSTCREDIT;
@@
-147,9
+146,13
@@
function print_credits()
$rep->TextCol(3, 6, _("Sub-total"), -2);
$rep->TextCol(6, 7, $DisplaySubTot, -2);
$rep->NewLine();
$rep->TextCol(3, 6, _("Sub-total"), -2);
$rep->TextCol(6, 7, $DisplaySubTot, -2);
$rep->NewLine();
- $rep->TextCol(3, 6, _("Shipping"), -2);
- $rep->TextCol(6, 7, $DisplayFreight, -2);
- $rep->NewLine();
+ if ($myrow['ov_freight'] != 0.0)
+ {
+ $DisplayFreight = number_format2($sign*$myrow["ov_freight"],$dec);
+ $rep->TextCol(3, 6, _("Shipping"), -2);
+ $rep->TextCol(6, 7, $DisplayFreight, -2);
+ $rep->NewLine();
+ }
$tax_items = get_trans_tax_details(ST_CUSTCREDIT, $i);
$first = true;
while ($tax_item = db_fetch($tax_items))
$tax_items = get_trans_tax_details(ST_CUSTCREDIT, $i);
$first = true;
while ($tax_item = db_fetch($tax_items))
diff --git
a/sales/view/view_credit.php
b/sales/view/view_credit.php
index 7fba678bf433216f497c557c22b04edb9d31884d..5c360eed4ec0e3f1d223f993f451ccf37935f491 100644
(file)
--- a/
sales/view/view_credit.php
+++ b/
sales/view/view_credit.php
@@
-126,7
+126,6
@@
else
display_note(_("There are no line items on this credit note."), 1, 2);
$display_sub_tot = price_format($sub_total);
display_note(_("There are no line items on this credit note."), 1, 2);
$display_sub_tot = price_format($sub_total);
-$display_freight = price_format($myrow["ov_freight"]);
$credit_total = $myrow["ov_freight"]+$myrow["ov_gst"]+$myrow["ov_amount"]+$myrow["ov_freight_tax"];
$display_total = price_format($credit_total);
$credit_total = $myrow["ov_freight"]+$myrow["ov_gst"]+$myrow["ov_amount"]+$myrow["ov_freight_tax"];
$display_total = price_format($credit_total);
@@
-135,8
+134,12
@@
$display_total = price_format($credit_total);
if ($sub_total != 0)
label_row(_("Sub Total"), $display_sub_tot, "colspan=6 align=right",
"nowrap align=right width='15%'");
if ($sub_total != 0)
label_row(_("Sub Total"), $display_sub_tot, "colspan=6 align=right",
"nowrap align=right width='15%'");
-label_row(_("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right");
+if ($myrow["ov_freight"] != 0.0)
+{
+ $display_freight = price_format($myrow["ov_freight"]);
+ label_row(_("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right");
+}
$tax_items = get_trans_tax_details(ST_CUSTCREDIT, $trans_id);
display_customer_trans_tax_details($tax_items, 6);
$tax_items = get_trans_tax_details(ST_CUSTCREDIT, $trans_id);
display_customer_trans_tax_details($tax_items, 6);
diff --git
a/sales/view/view_dispatch.php
b/sales/view/view_dispatch.php
index d089282b3a95d282272bd2f9d850fee599be11fa..260212853ebb3e0d84aee3d4fd4ad9d9a12205e6 100644
(file)
--- a/
sales/view/view_dispatch.php
+++ b/
sales/view/view_dispatch.php
@@
-150,10
+150,11
@@
if (db_num_rows($result) > 0)
else
display_note(_("There are no line items on this dispatch."), 1, 2);
else
display_note(_("There are no line items on this dispatch."), 1, 2);
-$display_freight = price_format($myrow["ov_freight"]);
-
-label_row(_("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right");
-
+if ($myrow['ov_freight'] != 0.0)
+{
+ $display_freight = price_format($myrow["ov_freight"]);
+ label_row(_("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right");
+}
$tax_items = get_trans_tax_details(ST_CUSTDELIVERY, $trans_id);
display_customer_trans_tax_details($tax_items, 6);
$tax_items = get_trans_tax_details(ST_CUSTDELIVERY, $trans_id);
display_customer_trans_tax_details($tax_items, 6);
diff --git
a/sales/view/view_invoice.php
b/sales/view/view_invoice.php
index 2d128a518d7a3af7996b39cef6b73fb1d5f3891d..4bd251fa870c7457fa1a64bc2e2d5b77481d9054 100644
(file)
--- a/
sales/view/view_invoice.php
+++ b/
sales/view/view_invoice.php
@@
-151,11
+151,13
@@
if (db_num_rows($result) > 0)
else
display_note(_("There are no line items on this invoice."), 1, 2);
else
display_note(_("There are no line items on this invoice."), 1, 2);
-$display_freight = price_format($myrow["ov_freight"]);
/*Print out the invoice text entered */
/*Print out the invoice text entered */
-label_row(_("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right");
-
+if ($myrow['ov_freight'] != 0.0)
+{
+ $display_freight = price_format($myrow["ov_freight"]);
+ label_row(_("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right");
+}
$tax_items = get_trans_tax_details(ST_SALESINVOICE, $trans_id);
display_customer_trans_tax_details($tax_items, 6);
$tax_items = get_trans_tax_details(ST_SALESINVOICE, $trans_id);
display_customer_trans_tax_details($tax_items, 6);
diff --git
a/sales/view/view_sales_order.php
b/sales/view/view_sales_order.php
index 3276b9582b89fb0a45e391dc207b98dbdac431a5..5c925b26c676f5abf0ab852750d216ec11eba387 100644
(file)
--- a/
sales/view/view_sales_order.php
+++ b/
sales/view/view_sales_order.php
@@
-224,8
+224,9
@@
foreach ($_SESSION['View']->line_items as $stock_item) {
end_row();
}
end_row();
}
-label_row(_("Shipping"), price_format($_SESSION['View']->freight_cost),
- "align=right colspan=6", "nowrap align=right", 1);
+if ($_SESSION['View']->freight_cost != 0.0)
+ label_row(_("Shipping"), price_format($_SESSION['View']->freight_cost),
+ "align=right colspan=6", "nowrap align=right", 1);
$sub_tot = $_SESSION['View']->get_items_total() + $_SESSION['View']->freight_cost;
$sub_tot = $_SESSION['View']->get_items_total() + $_SESSION['View']->freight_cost;