X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fview%2Fview_credit.php;h=f800c3a730ecaad9475ba87cbf4cabf411c5faf1;hb=4d4371fb200bb27fd6b680ebd2d1aaa450a0be7e;hp=0ba000898ee19fd0bf02ee549352e2f8e1e85bce;hpb=0ad7b92c6cf2e4e65ca0fa94ba31f30f7b292ba8;p=fa-stable.git diff --git a/sales/view/view_credit.php b/sales/view/view_credit.php index 0ba00089..f800c3a7 100644 --- a/sales/view/view_credit.php +++ b/sales/view/view_credit.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 1; $path_to_root="../.."; include_once($path_to_root . "/includes/session.inc"); @@ -17,7 +26,7 @@ page(_("View Credit Note"), true, false, "", $js); if (isset($_GET["trans_no"])) { $trans_id = $_GET["trans_no"]; -} +} elseif (isset($_POST["trans_no"])) { $trans_id = $_POST["trans_no"]; @@ -80,38 +89,39 @@ if (db_num_rows($result) > 0) { $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Price"), _("Discount %"), _("Total")); - table_header($th); + table_header($th); $k = 0; //row colour counter $sub_total = 0; while ($myrow2 = db_fetch($result)) { - + if ($myrow2["quantity"] == 0) continue; alt_table_row_color($k); - $value = ((1 - $myrow2["discount_percent"]) * $myrow2["unit_price"] * $myrow2["quantity"]); + $value = round2(((1 - $myrow2["discount_percent"]) * $myrow2["unit_price"] * $myrow2["quantity"]), + user_price_dec()); $sub_total += $value; if ($myrow2["discount_percent"] == 0) { $display_discount = ""; - } - else + } + else { $display_discount = percent_format($myrow2["discount_percent"]*100) . "%"; } label_cell($myrow2["stock_id"]); label_cell($myrow2["StockDescription"]); - qty_cell($myrow2["quantity"]); + qty_cell($myrow2["quantity"], false, get_qty_dec($myrow2["stock_id"])); label_cell($myrow2["units"], "align=right"); amount_cell($myrow2["unit_price"]); label_cell($display_discount, "align=right"); amount_cell($value); end_row(); } //end while there are line items to print out -} +} else display_note(_("There are no line items on this credit note."), 1, 2); @@ -127,7 +137,7 @@ if ($sub_total != 0) "nowrap align=right width=15%"); label_row(_("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right"); -$tax_items = get_customer_trans_tax_details(11, $trans_id); +$tax_items = get_trans_tax_details(11, $trans_id); display_customer_trans_tax_details($tax_items, 6); label_row("" . _("TOTAL CREDIT") . "