feat: stock take, reorder proposal and warehouse rebuild (#60)

A physical stock take freezes the book quantity and cost of a warehouse at a
date, takes counts typed or read from a scanner file, and posts the gains and
losses as INVP/INVN movements at that date. The reorder proposal lists the
items whose available and ordered quantity no longer covers the reorder point
and turns the accepted lines into draft supplier orders, one per supplier.
The warehouse can be rebuilt from its documents on demand and every Sunday
night, as a safety net after imports or corrections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-12 21:35:34 +01:00
1 parent f8b72f4d17
commit eb301fa570
13 files changed
+975 -2

No files matched your search

@@ -148,6 +148,9 @@ internal static class KhaemhatServices
services.AddSingleton<Khaemhat.Application.Items.ItemService>();
services.AddSingleton<Khaemhat.Application.Inventory.InventoryService>();
services.AddSingleton<Khaemhat.Application.Purchases.PurchaseService>();
services.AddSingleton<Khaemhat.Application.Inventory.StockTakeService>();
services.AddSingleton<Khaemhat.Application.Inventory.ReorderService>();
services.AddSingleton<IScheduledJob, Khaemhat.Application.Inventory.InventoryRebuildJob>();
services.AddSingleton<Khaemhat.Application.Items.PriceListService>();
// The document engine (ADR 0032): one engine, the copies, a typed service per family.
@@ -13,5 +13,19 @@
"Hints": {
"Movement": "La causale decide se il movimento carica, scarica o trasferisce; senza deposito vale quello dell’articolo."
}
},
"inventory": {
"stock-take": {
"not-open": "L'inventario è già stato registrato o annullato: non si può più modificare.",
"nothing-counted": "Non hai contato nessun articolo: inserisci almeno una quantità prima di registrare.",
"negative": "Una quantità contata non può essere negativa.",
"reason-missing": "Mancano le causali di rettifica inventariale INVP e INVN: aggiornale da Tabelle azienda, Aggiorna tabelle di base."
},
"warehouse": {
"missing": "Il deposito non esiste più."
},
"reorder": {
"choice-invalid": "Ogni riga da ordinare deve avere un fornitore e una quantità maggiore di zero."
}
}
}
@@ -11,5 +11,16 @@
"SupplierNumber": "Il numero scritto dal fornitore sulla sua fattura o sul DDT.",
"VatDate": "Il mese in cui l’IVA entra in detrazione; vuota, vale la data di registrazione."
}
},
"purchase": {
"self-invoice": {
"not-needed": "Per questa fattura non serve un'autofattura: il fornitore applica già l'IVA italiana."
}
},
"incoming": {
"not-readable": "Il file non è una fattura elettronica leggibile: carica un XML FatturaPA, un file firmato .p7m o uno ZIP che li contiene.",
"not-invoice": "Il file XML non è una FatturaPA.",
"signature-broken": "La firma del file .p7m non è valida: il contenuto potrebbe essere stato alterato.",
"invalid": "La fattura elettronica non è conforme al tracciato FatturaPA."
}
}