webERP Forum

Full Version: Fixed Assets purchase order
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I don't know if this is a bug or how-to.

I am doing the following :

1. Create an asset in "Asset Manager"
2. Create a PO (Add a PO)
3. Receive PO using non-stock item of type asset.
4. Add Invoice for supplier against po.

I can see all correct transactions in GL, however Asset manager shows asses cost to be zero?!

Any help is appreciated.

Thanks
turns out that this is a bug in the code, I found it.

AssetID was inserted in Supplier_partno wrongly.

I fixed it in PO_Items.php

thanks.
Can you show me what lines you had to fix?
Thanks
Hello Phil,

Yes, this the bit of code I changed:

if ($AllowUpdate == true){
//adding the non-stock item

$_SESSION['PO'.$identifier]->add_to_order($_SESSION['PO'.$identifier]->LinesOnOrder+1,
'',
0, /*Serialised */
0, /*Controlled */
filter_number_format($_POST['Qty']),
$_POST['ItemDescription'],
filter_number_format($_POST['Price']),
$_POST['SuppliersUnit'],
$_POST['GLCode'],
$_POST['ReqDelDate'],
'',
0,
'',
0,
0,
$GLAccountName,
2,
$_POST['SuppliersUnit'],
1,
'',
'',
$_POST['AssetID']);
Looks like this is already fixed in svn ... thanks for sharing though.
The change log lists the change as:
Quote:27/4/13 Samudaya: PO_Items.php When purchasing a non-stock item (asset), AssetID goes to wrong column in purchorderdetails table (Column name - suppliers_partno). Fixed the bug and now save the AssetID in the correct assetid column.
Reference URL's