Item - пересчёт НДС при изменении цены, количества и акциза

This commit is contained in:
Anthony Axenov 2021-12-03 18:24:00 +08:00
parent 2260233e3f
commit c077f98cf9

View File

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