5 include_once($path_to_root . "/includes/session.inc");
7 page(_("View Customer Payment"), true);
9 include_once($path_to_root . "/includes/date_functions.inc");
10 include_once($path_to_root . "/includes/ui.inc");
11 include_once($path_to_root . "/sales/includes/sales_db.inc");
13 if (isset($_GET["trans_no"]))
15 $trans_id = $_GET["trans_no"];
18 $receipt = get_customer_trans($trans_id, systypes::cust_payment());
20 display_heading(sprintf(_("Customer Payment #%d"),$trans_id));
23 start_table("$table_style width=80%");
25 label_cells(_("From Customer"), $receipt['DebtorName'], "class='tableheader2'");
26 label_cells(_("Into Bank Account"), $receipt['bank_account_name'], "class='tableheader2'");
27 label_cells(_("Date of Deposit"), sql2date($receipt['tran_date']), "class='tableheader2'");
30 label_cells(_("Payment Currency"), $receipt['curr_code'], "class='tableheader2'");
31 label_cells(_("Amount"), price_format($receipt['ov_amount']), "class='tableheader2'");
32 label_cells(_("Discount"), price_format($receipt['ov_discount']), "class='tableheader2'");
35 label_cells(_("Payment Type"),
36 bank_account_types::transfer_type($receipt['BankTransType']), "class='tableheader2'");
37 label_cells(_("Reference"), $receipt['reference'], "class='tableheader2'", "colspan=4");
39 comments_display_row(systypes::cust_payment(), $trans_id);
43 $voided = is_voided_display(systypes::cust_payment(), $trans_id, _("This customer payment has been voided."));
47 display_allocations_from(payment_person_types::customer(), $receipt['debtor_no'], systypes::cust_payment(), $trans_id, $receipt['Total']);