Added Customer Payment Attachments and Supplier Payment Attachments after operation.
[fa-stable.git] / purchasing / supplier_payment.php
index d516070a351f8d528c4831bcaecee677056cf932..2421bdfd4e1dd5ef836356a2c38257ce23eb6858 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,10 +96,15 @@ 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 &Supplier Invoice"), "/purchasing/supplier_invoice.php?New=1");
+       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");
        submenu_option(_("Bank Account &Transfer"), "/gl/bank_transfer.php");
+       submenu_option(_("Add an Attachment"), "/admin/attachments.php?filterType=".ST_SUPPAYMENT."&trans_no=$payment_id");
 
        display_footer_exit();
 }