Code cleanup
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 21 Oct 2010 10:07:00 +0000 (10:07 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 21 Oct 2010 10:07:00 +0000 (10:07 +0000)
sales/view/view_dispatch.php
sales/view/view_invoice.php

index 14a7e7e249ed4cf5cfa045d121fc1caf475351a1..7ed8c3041e58e8374923722f7fe25825b30f44ff 100644 (file)
@@ -142,17 +142,16 @@ if (db_num_rows($result) > 0)
         amount_cell($value);
        end_row();
        } //end while there are line items to print out
+       $display_sub_tot = price_format($sub_total);
+       label_row(_("Sub-total"), $display_sub_tot, "colspan=6 align=right",
+               "nowrap align=right width=15%");
 
 }
 else
        display_note(_("There are no line items on this dispatch."), 1, 2);
 
-$display_sub_tot = price_format($sub_total);
 $display_freight = price_format($myrow["ov_freight"]);
 
-/*Print out the delivery note text entered */
-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");
 
 $tax_items = get_trans_tax_details(ST_CUSTDELIVERY, $trans_id);
index 35e1eba9fc4a16c4171652e018805343a68b730e..61fc0b56fb88f0974ba980dd1bf2d0f7d67413ac 100644 (file)
@@ -144,16 +144,16 @@ if (db_num_rows($result) > 0)
                end_row();
        } //end while there are line items to print out
 
+       $display_sub_tot = price_format($sub_total);
+       label_row(_("Sub-total"), $display_sub_tot, "colspan=6 align=right",
+               "nowrap align=right width=15%");
 }
 else
        display_note(_("There are no line items on this invoice."), 1, 2);
 
-$display_sub_tot = price_format($sub_total);
 $display_freight = price_format($myrow["ov_freight"]);
 
 /*Print out the invoice text entered */
-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");
 
 $tax_items = get_trans_tax_details(ST_SALESINVOICE, $trans_id);