|
|
|
|
|
|
|
|
public function filterIsOrderStatusNotDeleted(): self |
|
|
public function filterIsOrderStatusNotDeleted(): self |
|
|
{ |
|
|
{ |
|
|
$this->andWhere('order_status_alias != :status_deleted') |
|
|
$this->andWhere('order_status_alias != :status_deleted') |
|
|
->params([':status_deleted' => OrderStatus::ALIAS_DELETED]); |
|
|
|
|
|
|
|
|
->addParams([':status_deleted' => OrderStatus::ALIAS_DELETED]); |
|
|
|
|
|
|
|
|
return $this; |
|
|
return $this; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function filterIsIncoming(): self |
|
|
public function filterIsIncoming(): self |
|
|
{ |
|
|
{ |
|
|
$this->andWhere('distribution.date >= :date_today') |
|
|
$this->andWhere('distribution.date >= :date_today') |
|
|
->params([':date_today' => date('Y-m-d')]); |
|
|
|
|
|
|
|
|
->addParams([':date_today' => date('Y-m-d')]); |
|
|
|
|
|
|
|
|
return $this; |
|
|
return $this; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function filterIsPassed(): self |
|
|
public function filterIsPassed(): self |
|
|
{ |
|
|
{ |
|
|
$this->andWhere('distribution.date < :date_today') |
|
|
$this->andWhere('distribution.date < :date_today') |
|
|
->params([':date_today' => date('Y-m-d')]); |
|
|
|
|
|
|
|
|
->addParams([':date_today' => date('Y-m-d')]); |
|
|
|
|
|
|
|
|
return $this; |
|
|
return $this; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function filterIsInvoiced(Invoice $invoice): self |
|
|
public function filterIsInvoiced(Invoice $invoice): self |
|
|
{ |
|
|
{ |
|
|
$this->andWhere('order.id_invoice IS NOT NULL AND order.id_invoice = :id_invoice') |
|
|
$this->andWhere('order.id_invoice IS NOT NULL AND order.id_invoice = :id_invoice') |
|
|
->params([':id_invoice' => $invoice->id]); |
|
|
|
|
|
|
|
|
->addParams([':id_invoice' => $invoice->id]); |
|
|
|
|
|
|
|
|
return $this; |
|
|
return $this; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function filterIsLinkedDeliveryNote(DeliveryNote $deliveryNote): self |
|
|
public function filterIsLinkedDeliveryNote(DeliveryNote $deliveryNote): self |
|
|
{ |
|
|
{ |
|
|
$this->andWhere('order.id_delivery_note IS NOT NULL AND order.id_delivery_note = :id_delivery_note') |
|
|
$this->andWhere('order.id_delivery_note IS NOT NULL AND order.id_delivery_note = :id_delivery_note') |
|
|
->params([':id_delivery_note' => $deliveryNote->id]); |
|
|
|
|
|
|
|
|
->addParams([':id_delivery_note' => $deliveryNote->id]); |
|
|
|
|
|
|
|
|
return $this; |
|
|
return $this; |
|
|
} |
|
|
} |