X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=purchasing%2Fpo_receive_items.php;h=cec4715f05c66b0224c93e0486f47fdbd9469bac;hb=902f1015d874c33bd7946b17de2ad80b4f2144b6;hp=14a017be94d95278fee23d703bb623e8682e1a26;hpb=bf00f0e16df5974ecba17b59be8bc660bdf6b8a8;p=fa-stable.git
diff --git a/purchasing/po_receive_items.php b/purchasing/po_receive_items.php
index 14a017be..cec4715f 100644
--- a/purchasing/po_receive_items.php
+++ b/purchasing/po_receive_items.php
@@ -1,6 +1,16 @@
.
+***********************************************************************/
+$page_security = 'SA_GRN';
+$path_to_root = "..";
include_once($path_to_root . "/purchasing/includes/po_class.inc");
include_once($path_to_root . "/includes/session.inc");
@@ -29,6 +39,8 @@ if (isset($_GET['AddedID']))
//echo get_gl_view_str(25, $grn, _("View the GL &Journal Entries for this Delivery"));
// echo "
";
+ hyperlink_params("$path_to_root/purchasing/supplier_invoice.php", _("Entry purchase &invoice for this receival"), "New=1");
+
hyperlink_no_params("$path_to_root/purchasing/inquiry/po_search.php", _("Select a different &purchase order for receiving items against"));
display_footer_exit();
@@ -68,7 +80,7 @@ function display_po_receive_items()
$qty_outstanding = $ln_itm->quantity - $ln_itm->qty_received;
- if ($ln_itm->receive_qty == 0)
+ if (!isset($_POST['Update']) && !isset($_POST['ProcessGoodsReceived']) && $ln_itm->receive_qty == 0)
{ //If no quantites yet input default the balance to be received
$ln_itm->receive_qty = $qty_outstanding;
}
@@ -92,7 +104,7 @@ function display_po_receive_items()
else
label_cell(number_format2($ln_itm->receive_qty, $dec), "align=right");
- amount_cell($ln_itm->price);
+ amount_decimal_cell($ln_itm->price);
amount_cell($line_total);
end_row();
}
@@ -238,6 +250,7 @@ function process_receive_po()
$grn = add_grn($_SESSION['PO'], $_POST['DefaultReceivedDate'],
$_POST['ref'], $_POST['Location']);
+ new_doc_date($_POST['DefaultReceivedDate']);
unset($_SESSION['PO']->line_items);
unset($_SESSION['PO']);
@@ -270,7 +283,7 @@ if (isset($_POST['Update']) || isset($_POST['ProcessGoodsReceived']))
$_POST[$line->line_no] = number_format2(0, get_qty_dec($line->stock_id));
if (!isset($_POST['DefaultReceivedDate']) || $_POST['DefaultReceivedDate'] == "")
- $_POST['DefaultReceivedDate'] = Today();
+ $_POST['DefaultReceivedDate'] = new_doc_date();
$_SESSION['PO']->line_items[$line->line_no]->receive_qty = input_num($line->line_no);
@@ -292,7 +305,7 @@ if (isset($_POST['ProcessGoodsReceived']))
//--------------------------------------------------------------------------------------------------
-start_form(false, true);
+start_form();
display_grn_summary($_SESSION['PO'], true);
display_heading(_("Items to Receive"));
@@ -300,7 +313,7 @@ display_po_receive_items();
echo '
';
submit_center_first('Update', _("Update"), '', true);
-submit_center_last('ProcessGoodsReceived', _("Process Receive Items"), _("Clear all GL entry fields"), true);
+submit_center_last('ProcessGoodsReceived', _("Process Receive Items"), _("Clear all GL entry fields"), 'default');
end_form();