|
|
@@ -457,6 +457,14 @@ class QuantizationService extends Service
|
|
|
|
|
|
if(! empty($data['type'])) $model->where('type', $data['type']);
|
|
|
if(! empty($data['id'])) $model->whereIn('id', $data['id']);
|
|
|
+ if(! empty($data['customer_supply_title'])){
|
|
|
+ list($status, $id) = (new CustomerSupplyService())->customerSupplyListForSearch(['title' => $data['customer_supply_title']], $user);
|
|
|
+ $model->whereIn('customer_supply_id', $id);
|
|
|
+ }
|
|
|
+ if(! empty($data['customer_supply_code'])){
|
|
|
+ list($status, $id) = (new CustomerSupplyService())->customerSupplyListForSearch(['code' => $data['customer_supply_code']], $user);
|
|
|
+ $model->whereIn('customer_supply_id', $id);
|
|
|
+ }
|
|
|
if(! empty($data['crt_time'][0]) && ! empty($data['crt_time'][1])) {
|
|
|
$return = $this->changeDateToTimeStampAboutRange($data['crt_time']);
|
|
|
$model->where('crt_time','>=',$return[0]);
|