Same item but different cost of purchases

Let’s say I have multiple same items purchases from

  • Costco at $1
  • Amazon at $2

I believe we should add both items into the same inventory as they are the same item.

But once selling, since both items have different cost price, let’s assume I want a 30% margin, is there a way I sell the Costco at 1.30$ and Amazon at 2.60$?

I am not sure how that works.

How do you track cost of good sold since it’s 2 different cost price?

You cannot do it if you’re using moving average as when you add stock the valuation rate will get averaged out. So at the end of the day, it’s cost of goods sold will be the average valuation rate. You can sell both items at the same selling price as the Amazon item

that takes too long to modify each item if each item has a different price everytime.

is there a way to track like once the item is sold after a x number, it goes back to the other price?

Can’t be done out of the box, it need customization. We have done something on these lines for a client

since sales price is different you should create two items code.
say itemcode1 onhand is 20 costco 15 ea and amazon 5 ea.
you got a sales order of 20, what sales price system should use in this case?

It is better we make this item as batched. So that you can define the prices for individual batch. At the time of transactions you select the batch to refer to which one you are selling and the pricing is fetched accordingly.

Agree with @mujeerhashmi: If product is physically identical: use a single Item.

To track an specific transaction for an Item, separately from all the other transactions? Use Batch and Serials.

In other ERPs, I’ve seen a system of “marking” a SO line and PO line together, creating a pair. In which case, the cost of the SO line is inherited from the PO line. Instead of being an Average or FIFO cost. Would be nice to see ERPNext get there someday.

that seems a smart idea so every order we will need to create a new batch i guess. so the pos will allow us to select the batch? in which section is the batch?

Be aware that even with FIFO valuation and batched item, ERPNext won’t fetch specific batch price. Actual FIFO logic doesn’t account for batches.
ex: You receive batch 1, then receive batch 2, then consume/sell batch 2, price of batch 1 will be fetched.