Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Credit_Invoice.php for Assembly items
01-25-2014, 11:55 AM (This post was last modified: 01-26-2014 05:34 AM by srdjanm.)
Post: #1
Credit_Invoice.php for Assembly items
For Assembly items with decimal value the Credit invoice post wrong $ amount in General Ledger gltrans, table.

Here is example:
Item: A - Purtchased , unit cost: $ 7,581.60
Item B - Asembled,:
from Item A amount 0.003 , cost: A*0.003 = $22.74

Now, I produce invoice and in General Ledger trail balance:
5000 Cost of Sale $22.74
1460 Finish Goods Inventory: $ -22.74

Now, I credit this invoice and return item. The new value in General Ledger are:
5000 Cost of Sale $-7553.09
1460 Finish Goods Inventory: $ 7553.09

In addition to gltrans table following table are also effected:
- salesanalysis : Item B gets cost of $ -7553.09 . This should be $-22.74
- stockmoves: Itme B gets standardcost $7581.60

Someone with good php knowledge would be able to fix this? I'm trying...

I'm on 4.07 version
Thanks
Srdjan

I think I found one problematic line, #700, standard cost calculation for component
$StandardCost += $AssParts['standard'];
Instead this should be calculated:
$StandardCost += $AssParts['standard'] * $AssParts['quantity'];
Find all posts by this user
Quote this message in a reply
01-26-2014, 07:38 AM
Post: #2
RE: Credit_Invoice.php for Assembly items
And solution is to change line #700 ; webERP v4.07
from
$StandardCost += ($AssParts['standard']
to:
$StandardCost += ($AssParts['standard'] * $AssParts['quantity']);
Find all posts by this user
Quote this message in a reply
01-27-2014, 10:59 AM
Post: #3
RE: Credit_Invoice.php for Assembly items
Hi,

Thank you for your report!

I think it has been fixed at least in the trunk now.

Best regards!

Exson
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)