Add Phase B: Inventory COGS auto-posting to GL on JobUsage transactions
When powder is consumed via a job (JobsController) or scan (InventoryController.LogUsage), debit the item's CogsAccountId and credit its InventoryAccountId for the cost of the quantity consumed (using AverageCost if available, else UnitCost). No-op when either GL account is not configured on the InventoryItem. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -138,7 +138,8 @@ public class QuoteAndReworkControllerFlowTests
|
||||
Mock.Of<IPricingCalculationService>(),
|
||||
new JobItemAssemblyService(),
|
||||
Mock.Of<IHubContext<NotificationHub>>(),
|
||||
Mock.Of<IHubContext<ShopHub>>());
|
||||
Mock.Of<IHubContext<ShopHub>>(),
|
||||
Mock.Of<IAccountBalanceService>());
|
||||
|
||||
var result = await controller.AddReworkRecord(new CreateReworkRecordDto
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user