Fixed bugs 312-314, imporved debug error handling, updated gettext template.
[fa-stable.git] / sales / view / view_invoice.php
index 2add8a65d365c2fd2f1b5b60a329c88c9686df87..61fc0b56fb88f0974ba980dd1bf2d0f7d67413ac 100644 (file)
@@ -71,11 +71,10 @@ end_table();
 echo "</td><td>"; // outer table
 
 start_table(TABLESTYLE, "width=100%");
-$th = array(_("Delivered To"));
-table_header($th);
-
-label_row(null, $sales_order["deliver_to"] . "<br>" . nl2br($sales_order["delivery_address"]),
-       "nowrap");
+$th = array(_("Payment Terms"));
+table_header($th); 
+$paym = get_payment_terms($myrow['payment_terms']);
+label_row(null, $paym["terms"], "nowrap");
 end_table();
 
 echo "</td><td>"; // outer table
@@ -145,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);