commit
fd67615d83
@ -203,7 +203,7 @@ class WarehouseOrderController extends BaseAdminController
|
||||
$credit_pay = 0;
|
||||
$cash_pay = 0;
|
||||
foreach ($data as $key => &$value) {
|
||||
$find = StoreProduct::where('id', $value->product_id)->find();
|
||||
$find = StoreProduct::where('id', $value->product_id)->withTrashed()->find();
|
||||
$value->store_name = $find['store_name'] ?? '';
|
||||
$value->store_info = $find['store_info'] ?? '';
|
||||
if (!empty($find['unit'])) {
|
||||
@ -248,9 +248,9 @@ class WarehouseOrderController extends BaseAdminController
|
||||
$total_price=0;
|
||||
foreach ($data as $key => &$value) {
|
||||
if(in_array($order['store_id'],[17,18])){
|
||||
$find = StoreBranchProduct::where('product_id', $value->product_id)->where('store_id',$order['store_id'])->find();
|
||||
$find = StoreBranchProduct::where('product_id', $value->product_id)->where('store_id',$order['store_id'])->withTrashed()->find();
|
||||
}else{
|
||||
$find = StoreProduct::where('id', $value->product_id)->find();
|
||||
$find = StoreProduct::where('id', $value->product_id)->withTrashed()->find();
|
||||
}
|
||||
$value->store_name = $find['store_name'] ?? '';
|
||||
$value->store_info = $find['store_info'] ?? '';
|
||||
@ -311,7 +311,7 @@ class WarehouseOrderController extends BaseAdminController
|
||||
$system_store = SystemStore::where('id', $warehouseOrder['store_id'])->value('introduction');
|
||||
$data = WarehouseProduct::where('oid', $id)->where('financial_pm',0)->field('oid,product_id,nums')->select()
|
||||
->each(function ($item) use ($system_store,$warehouseOrder) {
|
||||
$find = StoreProduct::where('id', $item['product_id'])->field('store_name,unit')->find();
|
||||
$find = StoreProduct::where('id', $item['product_id'])->field('store_name,unit')->withTrashed()->find();
|
||||
$unit_name = StoreProductUnit::where('id', $find['unit'])->value('name');
|
||||
$item['system_store'] = $system_store;
|
||||
$item['subtitle'] = $item['oid'].' '.convertStringToNumber($item['nums']).'/'.$unit_name;
|
||||
|
@ -30,8 +30,8 @@ class BeforehandOrderLists extends BaseAdminDataLists implements ListsSearchInte
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['store_id', 'paid', 'status', 'order_type', 'order_sn'],
|
||||
'%like' => ['order_id'],
|
||||
'=' => ['store_id', 'paid', 'status', 'order_type'],
|
||||
'%like' => ['order_id','order_sn'],
|
||||
'between_time' => 'create_time'
|
||||
];
|
||||
}
|
||||
|
@ -100,7 +100,8 @@ class StoreProductLists extends BaseAdminDataLists implements ListsSearchInterfa
|
||||
}
|
||||
$item['unit_name'] = StoreProductUnit::where('id', $item['unit'])->value('name');
|
||||
$stock = StoreBranchProduct::where('store_id', '<>', '4')->where('product_id', $item['id'])->sum('stock');
|
||||
$item['cate_name'] = StoreCategory::where('id', $item['cate_id'])->value('name');
|
||||
$category = StoreCategory::where('id','in',[$item['top_cate_id'],$item['two_cate_id'],$item['cate_id']])->column('name');
|
||||
$item['cate_name'] =implode('/', $category);
|
||||
if($is_warehouse==1){
|
||||
$item['stock'] = WarehouseProductStorege::where('product_id', $item['id'])->sum('nums');
|
||||
}else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user