Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Supplier Credit Note - average cost
03-24-2016, 03:20 AM
Post: #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.
Find all posts by this user
Quote this message in a reply
Post Reply 


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

Forum Jump:


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