diff --git a/app/admin/controller/warehouse_order/WarehouseOrderController.php b/app/admin/controller/warehouse_order/WarehouseOrderController.php index 54dfe5a4..07eac52e 100644 --- a/app/admin/controller/warehouse_order/WarehouseOrderController.php +++ b/app/admin/controller/warehouse_order/WarehouseOrderController.php @@ -106,6 +106,7 @@ class WarehouseOrderController extends BaseAdminController 'admin_id' => $this->adminId, 'type' => $type, 'order_type' => 0, + 'code' => $code, ]; $storeProduct = StoreProduct::where('id', $arr['id'])->find(); $data['total_price'] = bcmul($arr['stock'], $storeProduct['purchase'], 2); diff --git a/app/admin/logic/warehouse_product/WarehouseProductLogic.php b/app/admin/logic/warehouse_product/WarehouseProductLogic.php index e3acc8ca..376af570 100644 --- a/app/admin/logic/warehouse_product/WarehouseProductLogic.php +++ b/app/admin/logic/warehouse_product/WarehouseProductLogic.php @@ -55,7 +55,7 @@ class WarehouseProductLogic extends BaseLogic $total_price = bcmul($after_nums, $storeProduct['purchase'], 2); } WarehouseProductStorege::update(['nums' => $after_nums, 'total_price' => $total_price], ['id' => $storege['id']]); - SqlChannelLog('WarehouseProductStorege', $storege['id'], $after_nums, 1, Request()->url(),$admin_id); + SqlChannelLog('WarehouseProductStorege', $storege['id'], $params['nums'], 1, Request()->url(),$admin_id); } } else { @@ -149,7 +149,7 @@ class WarehouseProductLogic extends BaseLogic $after_nums = bcsub($storege['nums'], $params['nums']); $total_price = bcmul($after_nums, $params['purchase'], 2); WarehouseProductStorege::update(['nums' => bcsub($storege['nums'], $params['nums']), 'total_price' => $total_price], ['id' => $storege['id']]); - SqlChannelLog('WarehouseProductStorege', $storege['id'], bcsub($storege['nums'], $params['nums']), -1, Request()->url(),$admin_id); + SqlChannelLog('WarehouseProductStorege', $storege['id'], $params['nums'], -1, Request()->url(),$admin_id); } else { $data = [ 'warehouse_id' => $params['warehouse_id'], @@ -158,7 +158,7 @@ class WarehouseProductLogic extends BaseLogic 'total_price' => 0 ]; $storege = WarehouseProductStorege::create($data); - SqlChannelLog('WarehouseProductStorege', $storege->id, -$params['nums'], -1, Request()->url(),$admin_id); + SqlChannelLog('WarehouseProductStorege', $storege->id, $params['nums'], -1, Request()->url(),$admin_id); } } else { $storege['nums'] = 0;