Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Supplier Credit Note - average cost
03-24-2016, 03:20 AM,
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
UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost,
                              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.


Messages In This Thread
Supplier Credit Note - average cost - by agaluski - 03-24-2016, 03:20 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)