From 7e5e10e5f14f7b7b78e4ca7b4bb12d97372ef52a Mon Sep 17 00:00:00 2001 From: Nikola Cirkovic Date: Sun, 5 Jun 2022 05:58:29 +0200 Subject: [PATCH] INA-6 | Add applyNumber and setStatus in purchase order service --- .../PurchaseOrder/PurchaseOrderService.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/app/Services/PurchaseOrder/PurchaseOrderService.php b/app/Services/PurchaseOrder/PurchaseOrderService.php index ffb2cb84d164..b86ced3750c7 100644 --- a/app/Services/PurchaseOrder/PurchaseOrderService.php +++ b/app/Services/PurchaseOrder/PurchaseOrderService.php @@ -52,6 +52,30 @@ class PurchaseOrderService $this->purchase_order->public_notes = $this->purchase_order->client->public_notes; + return $this; + } + + public function setStatus($status) + { + $this->purchase_order->status_id = $status; + + return $this; + } + + public function markSent() + { + $this->purchase_order = (new MarkSent($this->purchase_order->client, $this->purchase_order))->run(); + + return $this; + } + /** + * Applies the purchase order number. + * @return $this PurchaseOrderService object + */ + public function applyNumber() + { + $this->purchase_order = (new ApplyNumber($this->purchase_order->client, $this->purchase_order))->run(); + return $this; } }