-function display_controls()
-{
- global $table_style2;
- start_form(false, true);
-
- if (!isset($_POST['supplier_id']))
- $_POST['supplier_id'] = get_global_supplier(false);
- if (!isset($_POST['DatePaid']))
- {
- $_POST['DatePaid'] = Today();
- if (!is_date_in_fiscalyear($_POST['DatePaid']))
- $_POST['DatePaid'] = end_fiscalyear();
- }
- //start_table($table_style2, 5, 7);
- //echo "<tr><td valign=top>"; // outer table
- start_outer_table($table_style2, 5);
-
- //echo "<table>";
- table_section(1);
-
- bank_accounts_list_row(_("From Bank Account:"), 'bank_account', null, true);
-
- amount_row(_("Amount of Payment:"), 'amount');
- amount_row(_("Amount of Discount:"), 'discount');
-
- date_row(_("Date Paid") . ":", 'DatePaid', '', null, 0, 0, 0, null, true);
-
- table_section(2);
- //echo "</table>";
- //echo "</td><td valign=top class='tableseparator'>"; // outer table
- //echo "<table>";
-
- supplier_list_row(_("Payment To:"), 'supplier_id', null, false, true);
-
- set_global_supplier($_POST['supplier_id']);
-
- $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);
- }
-
- ref_row(_("Reference:"), 'ref', '', references::get_next(22));
-
- text_row(_("Memo:"), 'memo_', null, 52,50);
-
- //echo "</table>";
-
- //echo "</td></tr>";
- end_outer_table(1); // outer table
-
- submit_center('ProcessSuppPayment',_("Enter Payment"), true, '', true);
-
- if ($bank_currency != $supplier_currency)
- {
- display_note(_("The amount and discount are in the bank account's currency."), 2, 0);
- }
-
- end_form();
-}
-
-//----------------------------------------------------------------------------------------
-