webERP Forum

Full Version: Update and Revising PO date creation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.

I am using weberp 4.10.1

i had a problem when our data entry trying to change PO Creation date..
so i add some modification to

PO_Items.php
PO_Header.php
Includes/Definepoclass.php

at Includes/Definepoclass.php i added a variable $PODate;


PO_Items.php
$sql = "UPDATE purchorders SET
.......................
orddate='" . ConvertSQLDate(($_SESSION['PO'.$identifier]->PODate)) . "',
......................

$sql = "INSERT INTO purchorders ( orderno, supplierno, comments, orddate, .....
...........
VALUES( '" . $_SESSION['PO'.$identifier]->OrderNo . "',
'" . $_SESSION['PO'.$identifier]->SupplierID . "',
'" . $_SESSION['PO'.$identifier]->Comments . "',
'" . $_SESSION['PO'.$identifier]->PODate ."'
........


PO_Header.php
$_POST['po_header_date'] = $_SESSION['PO' . $identifier]->Orig_OrderDate;
.............................
echo '<input type="text" class="date" alt="d/m/Y" name="po_header_date" size="11" value="';
if ($_SESSION['ExistingOrder'] != 0)
{ // jika modify order..
//$_SESSION['PO'.$identifier]->PODate=$_SESSION['PO'.$identifier]->Orig_OrderDate;
echo ConvertSQLDate($_SESSION['PO'.$identifier]->Orig_OrderDate);
} else
{
echo Date($_SESSION['DefaultDateFormat']);
}
echo '">';
..............


what do you all think? PO date creation suppose to be able to edit right?..
Dear All,
Without getting in the above scripting and technicalities, is it possible to modify the PO date after creation or at the time of creation of a Purchase Order?

I go on purchase order entry date and I can not modify the current system date. What if I want to work on older entries within the same month or year? I cant go back and create purchase orders back dated?

If anyone has any ideas on this aspect, please do let us know...

Thanks
Hi Muzammil,

Simple answer is that no it is not possible to alter this date. I seem to remember there is a good reason for this but right noww I am travelling and it is late so I can't remember why it is not a good idea.

Let me think about it and see what can be done.

Thanks
Tim
The thinking was in a multi-user environment that you really would not want POs being created retrospectively to let anyone off the hook for not purchasing stock they should have already placed the order for. Also, the delivery date defaults from the date of the order + the lead time for the item being purchased to derive a sensible delivery date - there is no point making up dates which are impossible for suppliers to meet. In a single user environment it might make sense to be able to create POs with a retrospective date but I can't see why you would want to allow this in a multi-user environment?
I can imagine scenarios where you might want to create an order for a prior date, or even for a future date. Maybe it is better to have a "date created" field as well as an order date field.

Should be easy enough to code up.

Tim
Reference URL's