ledgersmb / LedgerSMB

Double-entry accounting & ERP for the web
https://ledgersmb.org
Other
413 stars 150 forks source link

Negative COGS for assemblies #8351

Closed ehuelsmann closed 6 days ago

ehuelsmann commented 1 month ago

Version

1.11.15

What browsers are you seeing the problem on?

This problem isn't browser related

What happened?

When I perform the following steps:

  1. Create a customer and vendor
  2. Create a part and an assembly, the latter being composed of 2 items of the part
  3. Purchase 600 parts @ 1$ each
  4. Check balance sheet (shows correct: inventory 600$)
  5. Stock 10 assemblies
  6. Check balance sheet (shows no change -- which is expected: 20 parts taken out, but 10 assembly at the same cost added back)
  7. Sell 1 item of the assembly @ 6$
  8. Check the balance sheet

In the last step, the balance sheet shows $8 Current earnings and it shows inventory $602.

What should have happened?

In the last step, the Current earnings should have been $4 and inventory should have shown $598.

ehuelsmann commented 1 month ago

The branch currently assumes: