Add ingredieints
This commit is contained in:
@@ -82,10 +82,6 @@ type PaymentMethodRepository interface {
|
||||
GetByID(ctx context.Context, id uuid.UUID) (*entities.PaymentMethod, error)
|
||||
}
|
||||
|
||||
type ProductVariantRepository interface {
|
||||
GetByID(ctx context.Context, id uuid.UUID) (*entities.ProductVariant, error)
|
||||
}
|
||||
|
||||
type CustomerRepository interface {
|
||||
GetByIDAndOrganization(ctx context.Context, id, organizationID uuid.UUID) (*entities.Customer, error)
|
||||
}
|
||||
@@ -111,7 +107,7 @@ type OrderProcessorImpl struct {
|
||||
paymentMethodRepo PaymentMethodRepository
|
||||
inventoryRepo repository.InventoryRepository
|
||||
inventoryMovementRepo repository.InventoryMovementRepository
|
||||
productVariantRepo ProductVariantRepository
|
||||
productVariantRepo repository.ProductVariantRepository
|
||||
outletRepo OutletRepository
|
||||
customerRepo CustomerRepository
|
||||
}
|
||||
@@ -125,7 +121,7 @@ func NewOrderProcessorImpl(
|
||||
paymentMethodRepo PaymentMethodRepository,
|
||||
inventoryRepo repository.InventoryRepository,
|
||||
inventoryMovementRepo repository.InventoryMovementRepository,
|
||||
productVariantRepo ProductVariantRepository,
|
||||
productVariantRepo repository.ProductVariantRepository,
|
||||
outletRepo OutletRepository,
|
||||
customerRepo CustomerRepository,
|
||||
) *OrderProcessorImpl {
|
||||
@@ -193,7 +189,7 @@ func (p *OrderProcessorImpl) CreateOrder(ctx context.Context, req *models.Create
|
||||
ProductID: itemReq.ProductID,
|
||||
ProductVariantID: itemReq.ProductVariantID,
|
||||
Quantity: itemReq.Quantity,
|
||||
UnitPrice: unitPrice, // Use price from database
|
||||
UnitPrice: unitPrice,
|
||||
TotalPrice: itemTotalPrice,
|
||||
UnitCost: unitCost,
|
||||
TotalCost: itemTotalCost,
|
||||
|
||||
Reference in New Issue
Block a user