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

@@ -71,7 +71,7 @@ class OrderRepositoryQuery extends AbstractRepositoryQuery
public function filterIsOrderStatusNotDeleted(): self
{
$this->andWhere('order_status_alias != :status_deleted')
->params([':status_deleted' => OrderStatus::ALIAS_DELETED]);
->addParams([':status_deleted' => OrderStatus::ALIAS_DELETED]);

return $this;
}
@@ -92,7 +92,7 @@ class OrderRepositoryQuery extends AbstractRepositoryQuery
public function filterIsIncoming(): self
{
$this->andWhere('distribution.date >= :date_today')
->params([':date_today' => date('Y-m-d')]);
->addParams([':date_today' => date('Y-m-d')]);

return $this;
}
@@ -100,7 +100,7 @@ class OrderRepositoryQuery extends AbstractRepositoryQuery
public function filterIsPassed(): self
{
$this->andWhere('distribution.date < :date_today')
->params([':date_today' => date('Y-m-d')]);
->addParams([':date_today' => date('Y-m-d')]);

return $this;
}
@@ -108,7 +108,7 @@ class OrderRepositoryQuery extends AbstractRepositoryQuery
public function filterIsInvoiced(Invoice $invoice): self
{
$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;
}
@@ -116,7 +116,7 @@ class OrderRepositoryQuery extends AbstractRepositoryQuery
public function filterIsLinkedDeliveryNote(DeliveryNote $deliveryNote): self
{
$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;
}

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

@@ -151,7 +151,7 @@ $this->setTitle('Mes commandes') ;
}
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> '.
'<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>' : '') ;
}
}

Loading…
Cancel
Save