Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Supplier Credit Note - average cost
03-24-2016, 03:20 AM,
#1
Supplier Credit Note - average cost
When entering a supplier credit note against a GRN that initially caused a Cost adjustment the system sets the stockmaster.materialcost field incorrectly.
This line in SupplierCredit.php is the same as the SupplierInvoice.php program and it should be multiplied by -1. All other gltrans are created correctly.

PHP Code:
$CostIncrement = ($PurchPriceVar $WriteOffToVariances) / $TotalQuantityOnHand

So if you have an item that has a material cost of 1.00 and you enter an invoice that lowers the average cost by .05 you will get a statement like
Code:
UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost,
                       materialcost=materialcost+-0.05
                              WHERE stockid='Item#'
And if you enter a Credit you will get the SAME UPDATE statement and the materialcost field will end up being .90.




Reply
03-24-2016, 11:41 AM,
#2
RE: Supplier Credit Note - average cost
[undefined=undefined]Hi, Andrew, [/undefined]
Thank you for your report.
If there is no misunderstanding, it has been fixed in the trunk at version 7354 since last September.
Thanks and best regards!

Exson
(03-24-2016, 03:20 AM)agaluski Wrote: When entering a supplier credit note against a GRN that initially caused a Cost adjustment the system sets the stockmaster.materialcost field incorrectly.
This line in SupplierCredit.php is the same as the SupplierInvoice.php program and it should be multiplied by -1. All other gltrans are created correctly.

PHP Code:
$CostIncrement = ($PurchPriceVar $WriteOffToVariances) / $TotalQuantityOnHand

So if you have an item that has a material cost of 1.00 and you enter an invoice that lowers the average cost by .05 you will get a statement like
Code:
UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost,
                       materialcost=materialcost+-0.05
                              WHERE stockid='Item#'
And if you enter a Credit you will get the SAME UPDATE statement and the materialcost field will end up being .90.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)