MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
-$page_security = 11;
-$path_to_root="..";
+$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");
//echo get_gl_view_str(25, $grn, _("View the GL &Journal Entries for this Delivery"));
// echo "<br>";
+ 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();
$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;
}
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();
}
$grn = add_grn($_SESSION['PO'], $_POST['DefaultReceivedDate'],
$_POST['ref'], $_POST['Location']);
+ new_doc_date($_POST['DefaultReceivedDate']);
unset($_SESSION['PO']->line_items);
unset($_SESSION['PO']);
$_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);
echo '<br>';
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();