Typo in ISO_8859-1 => ISO-8859-1. Fixed
[fa-stable.git] / purchasing / supplier_payment.php
index d516070a351f8d528c4831bcaecee677056cf932..8202016bc6fa32f73a034e9d3c9e44ef71d442d4 100644 (file)
@@ -63,8 +63,9 @@ if (!isset($_POST['bank_account'])) { // first page call
        $_SESSION['alloc'] = new allocation(ST_SUPPAYMENT, 0, get_post('supplier_id'));
 
        if (isset($_GET['PInvoice'])) {
+               $supp = isset($_POST['supplier_id']) ? $_POST['supplier_id'] : null;
                //  get date and supplier
-               $inv = get_supp_trans($_GET['PInvoice'], $_GET['trans_type']);
+               $inv = get_supp_trans($_GET['PInvoice'], $_GET['trans_type'], $supp);
                if ($inv) {
                        $_SESSION['alloc']->person_id = $_POST['supplier_id'] = $inv['supplier_id'];
                        $_SESSION['alloc']->read();
@@ -95,6 +96,9 @@ if (isset($_GET['AddedID'])) {
     display_note(get_gl_view_str(ST_SUPPAYMENT, $payment_id, _("View the GL &Journal Entries for this Payment")), 0, 1);
 
        submenu_option(_("Enter another supplier &payment"), "/purchasing/supplier_payment.php?supplier_id=".$_POST['supplier_id']);
+
+       submenu_option(_("Enter direct &Invoice"), "/purchasing/po_entry_items.php?NewInvoice=Yes");
+
        submenu_option(_("Enter Other &Payment"), "/gl/gl_bank.php?NewPayment=Yes");
        submenu_option(_("Enter &Customer Payment"), "/sales/customer_payments.php");
        submenu_option(_("Enter Other &Deposit"), "/gl/gl_bank.php?NewDeposit=Yes");