Fix expense to be nullable without raw material.

This commit is contained in:
2026-06-10 14:25:23 +07:00
parent d0c090a657
commit 1718c5adab
24 changed files with 342 additions and 233 deletions
@@ -11,16 +11,20 @@ import (
)
func validCreatePurchaseOrderRequest() *contract.CreatePurchaseOrderRequest {
ingredientID := uuid.New()
quantity := 1.0
unitID := uuid.New()
return &contract.CreatePurchaseOrderRequest{
VendorID: uuid.New(),
PONumber: "PO-001",
TransactionDate: "2026-05-29",
Items: []contract.CreatePurchaseOrderItemRequest{
{
IngredientID: uuid.New(),
IngredientID: &ingredientID,
PurchaseCategoryID: uuid.New(),
Quantity: 1,
UnitID: uuid.New(),
Quantity: &quantity,
UnitID: &unitID,
Amount: 1000,
},
},