+//----------------------------------------------------------------------------------------
+
+start_form();
+
+ start_outer_table(TABLESTYLE2, "width=60%", 5);
+
+ table_section(1);
+
+ supplier_list_row(_("Payment To:"), 'supplier_id', null, false, true);
+
+ set_global_supplier($_POST['supplier_id']);
+
+ bank_accounts_list_row(_("From Bank Account:"), 'bank_account', null, true);
+
+ table_section(2);
+
+ ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_SUPPAYMENT));
+
+ date_row(_("Date Paid") . ":", 'DatePaid', '', true, 0, 0, 0, null, true);
+
+ table_section(3);
+
+ $supplier_currency = get_supplier_currency($_POST['supplier_id']);
+ $bank_currency = get_bank_account_currency($_POST['bank_account']);
+ if ($bank_currency != $supplier_currency)
+ {
+ exchange_rate_display($bank_currency, $supplier_currency, $_POST['DatePaid'], true);
+ }
+
+ amount_row(_("Bank Charge:"), 'charge');
+
+
+ end_outer_table(1); // outer table
+
+ if ($bank_currency == $supplier_currency) {
+ div_start('alloc_tbl');
+ show_allocatable(false);
+ div_end();
+ }
+
+ start_table(TABLESTYLE, "width=60%");
+ amount_row(_("Amount of Discount:"), 'discount');
+ amount_row(_("Amount of Payment:"), 'amount');
+ textarea_row(_("Memo:"), 'memo_', null, 22, 4);
+ end_table(1);
+
+ if ($bank_currency != $supplier_currency)
+ {
+ display_note(_("The amount and discount are in the bank account's currency."), 0, 1);
+ }
+
+ submit_center('ProcessSuppPayment',_("Enter Payment"), true, '', 'default');
+
+end_form();