From c077f98cf90a826c794d3cc026367ba4a4a3ecaf Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Fri, 3 Dec 2021 18:24:00 +0800 Subject: [PATCH] =?UTF-8?q?`Item`=20-=20=D0=BF=D0=B5=D1=80=D0=B5=D1=81?= =?UTF-8?q?=D1=87=D1=91=D1=82=20=D0=9D=D0=94=D0=A1=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D0=B8=20=D1=86?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B,=20=D0=BA=D0=BE=D0=BB=D0=B8=D1=87=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=B2=D0=B0=20=D0=B8=20=D0=B0=D0=BA=D1=86=D0=B8?= =?UTF-8?q?=D0=B7=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Entities/Item.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Entities/Item.php b/src/Entities/Item.php index 7fcc45e..010ce62 100644 --- a/src/Entities/Item.php +++ b/src/Entities/Item.php @@ -199,7 +199,7 @@ class Item extends Entity throw new NegativeItemPriceException($this->getName(), $rubles); } $this->price = $rubles; - //$this->calcSum(); + $this->getVat()?->setSum($this->getSum()); return $this; } @@ -232,6 +232,7 @@ class Item extends Entity throw new NegativeItemQuantityException($this->getName(), $quantity); } $this->quantity = $quantity; + $this->getVat()?->setSum($this->getSum()); return $this; } @@ -497,6 +498,7 @@ class Item extends Entity throw new NegativeItemExciseException($this->getName(), $excise); } $this->excise = $excise; + $this->getVat()?->setSum($this->getSum()); return $this; }