Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Standard Cost on stockmoves
06-23-2015, 07:17 AM,
#1
Standard Cost on stockmoves
There are some reports that I use (and developed) that use stockmoves.standardcost to calculate Margin on invoices. We have some issues where we sometimes ship the material to a customer BEFORE we enter the supplier invoice. Thus the stockmoves record contains the old cost.
I see in SupplierInvoice.php that this situation is accounted for salesanalysis and stockmoves tables.

PHP Code:
if ($EnteredGRN->This_QuantityInv $TotalQuantityOnHand){
/* The variance to the extent of the quantity invoiced should also be written off against the sales analysis cost - as sales analysis would have been created using the cost at the time the sale was made... this was incorrect as hind-sight has shown here. However, how to determine when these were last sold? To update the sales analysis cost. Work through the last 6 months sales analysis from the latest period in which this invoice is being posted and prior.

The assumption here is that the goods have been sold prior to the purchase invoice  being entered so it is necessary to back track on the sales analysis cost.
* Note that this will mean that posting to GL COGS will not agree to the cost of sales from the sales analysis
* Of course the price variances will need to be included in COGS as well
* */ 

Our issue is that we repackage the goods from Part A to Part B and then sell them. So the loops in the code above don't pick up the new Part#. I was thinking to do the following:
1) Run the Std Cost Update on any items the purchased item is included as part of an effective BOM, capturing the "before" and "after" cost of the parent item. Then run the same 2 loops on salesanalysis and stockmoves for each parent recursively up the list.

Experts - need your advice and warnings here. Right now we handle this by doing a credit on the item we sold, roll the cost, re-invoice the item under its new cost.
This isn't a feasible solution long term for us.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)