-function copy_to_po()
-{
- $_SESSION['PO']->supplier_id = $_POST['supplier_id'];
- $_SESSION['PO']->orig_order_date = $_POST['OrderDate'];
- $_SESSION['PO']->reference = $_POST['ref'];
- $_SESSION['PO']->requisition_no = $_POST['Requisition'];
- $_SESSION['PO']->Comments = $_POST['Comments'];
- $_SESSION['PO']->Location = $_POST['StkLocation'];
- $_SESSION['PO']->delivery_address = $_POST['delivery_address'];
+ $trans_no = $_GET['AddedGRN'];
+ $trans_type = ST_SUPPRECEIVE;
+
+ display_notification_centered(_("Direct GRN has been entered"));
+
+ display_note(get_trans_view_str($trans_type, $trans_no, _("&View this GRN")), 0);
+
+ $clearing_act = get_company_pref('grn_clearing_act');
+ if ($clearing_act)
+ display_note(get_gl_view_str($trans_type, $trans_no, _("View the GL Journal Entries for this Delivery")), 1);
+
+ hyperlink_params("$path_to_root/purchasing/supplier_invoice.php",
+ _("Entry purchase &invoice for this receival"), "New=1");
+
+ hyperlink_params("$path_to_root/admin/attachments.php", _("Add an Attachment"),
+ "filterType=$trans_type&trans_no=$trans_no");
+
+ hyperlink_params($_SERVER['PHP_SELF'], _("Enter &Another GRN"), "NewGRN=Yes");
+
+ display_footer_exit();
+
+} elseif (isset($_GET['AddedPI'])) {
+
+ $trans_no = $_GET['AddedPI'];
+ $trans_type = ST_SUPPINVOICE;
+
+ display_notification_centered(_("Direct Purchase Invoice has been entered"));
+
+ display_note(get_trans_view_str($trans_type, $trans_no, _("&View this Invoice")), 0);
+
+ display_note(get_gl_view_str($trans_type, $trans_no, _("View the GL Journal Entries for this Invoice")), 1);
+
+ hyperlink_params("$path_to_root/purchasing/supplier_payment.php", _("Entry supplier &payment for this invoice"),
+ "trans_type=$trans_type&PInvoice=".$trans_no);
+
+ hyperlink_params("$path_to_root/admin/attachments.php", _("Add an Attachment"),
+ "filterType=$trans_type&trans_no=$trans_no");
+
+ hyperlink_params($_SERVER['PHP_SELF'], _("Enter &Another Direct Invoice"), "NewInvoice=Yes");
+
+ display_footer_exit();