|
|
@@ -20,7 +20,7 @@ class ProcurementCheckSheetFilters
|
|
|
protected $supplierQuery;
|
|
|
protected $array_filter;
|
|
|
protected $filters = [
|
|
|
- 'id','status','signed_at','supplier_id'
|
|
|
+ 'id','status','signed_at','supplier_id',
|
|
|
];
|
|
|
protected $params = [];
|
|
|
|
|
|
@@ -91,7 +91,7 @@ class ProcurementCheckSheetFilters
|
|
|
|
|
|
public function supplier_id($supplier_id)
|
|
|
{
|
|
|
- $this->searchWay($this->getSupplierQuery(),$supplier_id,'supplier_id');
|
|
|
+ $this->searchWay($this->getSupplierQuery(),$supplier_id,'id');
|
|
|
}
|
|
|
public function signed_at($signed_at)
|
|
|
{
|
|
|
@@ -108,14 +108,16 @@ class ProcurementCheckSheetFilters
|
|
|
|
|
|
public function afterApply()
|
|
|
{
|
|
|
- if($this->procurementDeliveryQuery)
|
|
|
- $this->queryBuilder->whereIn('procurement_delivery_id',$this->procurementDeliveryQuery);
|
|
|
+
|
|
|
+ if($this->supplierQuery)
|
|
|
+ $this->getProcurementQuery()->whereIn('supplier_id',$this->supplierQuery);
|
|
|
|
|
|
if($this->procurementQuery)
|
|
|
- $this->getProcurementQuery()->whereIn('procurement_id',$this->procurementQuery);
|
|
|
+ $this->getProcurementDeliveryQuery()->whereIn('procurement_id',$this->procurementQuery);
|
|
|
+
|
|
|
+ if($this->procurementDeliveryQuery)
|
|
|
+ $this->queryBuilder->whereIn('procurement_delivery_id',$this->procurementDeliveryQuery);
|
|
|
|
|
|
- if($this->supplierQuery)
|
|
|
- $this->getSupplierQuery()->whereIn('supplier_id',$this->supplierQuery);
|
|
|
|
|
|
}
|
|
|
}
|