mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-22 06:15:44 +00:00
fixing report-counting-sapronak
This commit is contained in:
@@ -189,9 +189,6 @@ func (r *PurchaseRepositoryImpl) UpdateReceivingDetails(
|
||||
if upd.VehicleNumber != nil {
|
||||
data["vehicle_number"] = upd.VehicleNumber
|
||||
}
|
||||
if upd.ReceivedQty != nil {
|
||||
data["total_qty"] = upd.ReceivedQty
|
||||
}
|
||||
if upd.WarehouseID != nil && *upd.WarehouseID != 0 {
|
||||
data["warehouse_id"] = upd.WarehouseID
|
||||
}
|
||||
|
||||
@@ -814,7 +814,13 @@ func (s *purchaseService) ReceiveProducts(c *fiber.Ctx, id uint, req *validation
|
||||
|
||||
// Always ensure PW when qty > 0 so stockable has target.
|
||||
if prep.receivedQty > 0 {
|
||||
pwID, err := pwRepoTx.EnsureProductWarehouse(c.Context(), uint(item.ProductId), prep.warehouseID, purchase.CreatedBy)
|
||||
pwID, err := pwRepoTx.EnsureProductWarehouse(
|
||||
c.Context(),
|
||||
uint(item.ProductId),
|
||||
prep.warehouseID,
|
||||
item.ProjectFlockKandangId,
|
||||
purchase.CreatedBy,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user