feat: post documents to the warehouse at weighted average cost (#59)
Confirmed delivery notes, invoices that move goods, supplier receipts and warehouse movements now write stock movements in the same transaction; cancelling removes them. Each change re-runs the history of the items touched, so balances per warehouse, committed and ordered quantities and the average and last cost stay consistent even when an old document is cancelled. Supplier invoices give their cost to the receipts they invoice. Immediate invoices, supplier invoices and credit notes get their warehouse reasons; the self-invoice types TD20-TD29 join the base tables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
20b2421eea
commit
eeabb12f96
14 files changed
+1753
-5
No files matched your search
@@ -146,6 +146,7 @@ internal static class KhaemhatServices
|
||||
services.AddSingleton<AutoFillService>();
|
||||
services.AddSingleton<Khaemhat.Application.Parties.PartyService>();
|
||||
services.AddSingleton<Khaemhat.Application.Items.ItemService>();
|
||||
services.AddSingleton<Khaemhat.Application.Inventory.InventoryService>();
|
||||
services.AddSingleton<Khaemhat.Application.Items.PriceListService>();
|
||||
|
||||
// The document engine (ADR 0032): one engine, the copies, a typed service per family.
|
||||
|
||||
Reference in new issue
Block a user