Added support for tax included prices in transactions.
[fa-stable.git] / purchasing / includes / ui / invoice_ui.inc
index 0694cdaed82828180523bfb153d982fc5a12362a..3a6edd5f99bb207e11c0a993d080e9babc8a5e33 100644 (file)
@@ -144,7 +144,7 @@ function invoice_totals(&$supp_trans)
        label_row(_("Sub-total:"), price_format( $supp_trans->ov_amount), "colspan=$colspan align=right", "align=right");
 
     $taxes = $supp_trans->get_taxes($supp_trans->tax_group_id);
-    $tax_total = display_edit_tax_items($taxes, $colspan, 0); // tax_included==0 (we are the company)
+    $tax_total = display_edit_tax_items($taxes, $colspan, $supp_trans->tax_included);
 
     $display_total = price_format($supp_trans->ov_amount + $tax_total);
 
@@ -459,7 +459,8 @@ function display_grn_items(&$supp_trans, $mode=0)
        {
        $th = array(_("Delivery"), _("Sequence #"), _("P.O."), _("Item"), _("Description"),
                _("Received On"), _("Quantity Received"), _("Quantity Invoiced"),
-               _("Qty Yet To Invoice"), _("Order Price"), _("Total"), "");
+               _("Qty Yet To Invoice"), $supp_trans->tax_included ? _("Price after Tax") : _("Price before Tax"), 
+               _("Total"), "");
        if (($supp_trans->trans_type == ST_SUPPINVOICE) && $_SESSION["wa_current_user"]->can_access('SA_GRNDELETE'))    // Added 2008-10-18 by Joe Hunt. Only admins can remove GRNs
                $th[] = "";
                if ($supp_trans->trans_type == ST_SUPPCREDIT)