function handle_add_payment() { $supp_currency = get_supplier_currency($_POST['supplier_id']); $bank_currency = get_bank_account_currency($_POST['bank_account']); $comp_currency = get_company_currency(); if ($comp_currency != $bank_currency && $bank_currency != $supp_currency) { $rate = 0; } else { $rate = input_num('_ex_rate'); } $payment_id = add_supp_payment($_POST['supplier_id'], $_POST['DatePaid'], $_POST['bank_account'], input_num('amount'), input_num('discount'), $_POST['ref'], $_POST['memo_'], $rate, input_num('charge')); new_doc_date($_POST['DatePaid']); $_SESSION['alloc']->trans_no = $payment_id; $_SESSION['alloc']->write(); //unset($_POST['supplier_id']); unset($_POST['bank_account']); unset($_POST['DatePaid']); unset($_POST['currency']); unset($_POST['memo_']); unset($_POST['amount']); unset($_POST['discount']); unset($_POST['ProcessSuppPayment']); meta_forward($_SERVER['PHP_SELF'], "AddedID={$payment_id}&supplier_id=" . $_POST['supplier_id']); }
function handle_add_payment() { $payment_id = add_supp_payment($_POST['supplier_id'], $_POST['DatePaid'], $_POST['PaymentType'], $_POST['bank_account'], input_num('amount'), input_num('discount'), $_POST['ref'], $_POST['memo_']); //unset($_POST['supplier_id']); unset($_POST['bank_account']); unset($_POST['DatePaid']); unset($_POST['PaymentType']); unset($_POST['currency']); unset($_POST['memo_']); unset($_POST['amount']); unset($_POST['discount']); unset($_POST['ProcessSuppPayment']); meta_forward($_SERVER['PHP_SELF'], "AddedID={$payment_id}&supplier_id=" . $_POST['supplier_id']); }