Browse Source

Commandes : système de statut de commandes

feature/rotating_product
Guillaume Bourgeois 5 months ago
parent
commit
d902451661
2 changed files with 6 additions and 6 deletions
  1. +5
    -5
      domain/Order/Order/OrderRepositoryQuery.php
  2. +1
    -1
      producer/views/order/history.php

+ 5
- 5
domain/Order/Order/OrderRepositoryQuery.php View File

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;
} }

+ 1
- 1
producer/views/order/history.php View File

} }
else { else {
$html .= '<a data-bs-toggle="tooltip" data-bs-placement="top" title="Modifier" href="'.Yii::$app->urlManager->createUrl(['order/order','id'=>$order->id]).'" class="btn btn-secondary"><i class="bi bi-pencil"></i></a> '. $html .= '<a data-bs-toggle="tooltip" data-bs-placement="top" title="Modifier" href="'.Yii::$app->urlManager->createUrl(['order/order','id'=>$order->id]).'" class="btn btn-secondary"><i class="bi bi-pencil"></i></a> '.
'<a data-bs-toggle="tooltip" data-bs-placement="top" title="Annuler" href="'.Yii::$app->urlManager->createUrl(['order/cancel','id'=>$order->id]).'" class="btn btn-secondary"><i class="bi bi-trash"></i></a> '.
'<a data-bs-toggle="tooltip" data-bs-placement="top" title="'.$orderModule->getSolver()->getLabelDeleteAction($order).'" href="'.Yii::$app->urlManager->createUrl(['order/cancel','id'=>$order->id]).'" class="btn btn-secondary"><i class="bi bi-trash"></i></a> '.
(($order->id_subscription) ? '<a data-bs-toggle="tooltip" data-bs-placement="top" title="Modifier l\'abonnement associé" href="'.Yii::$app->urlManagerProducer->createUrl(['subscription/form','id'=>$order->id_subscription]).'" class="btn btn-secondary"><i class="bi bi-arrow-repeat"></i></a>' : '') ; (($order->id_subscription) ? '<a data-bs-toggle="tooltip" data-bs-placement="top" title="Modifier l\'abonnement associé" href="'.Yii::$app->urlManagerProducer->createUrl(['subscription/form','id'=>$order->id_subscription]).'" class="btn btn-secondary"><i class="bi bi-arrow-repeat"></i></a>' : '') ;
} }
} }

Loading…
Cancel
Save