Фикс исключения превышения количества ставок НДС в массиве

This commit is contained in:
Anthony Axenov 2020-05-28 00:38:48 +08:00
parent a619b06a48
commit 954843e3ad

View File

@ -105,7 +105,7 @@ class VatArray extends Entity
{ {
$max_items = SellSchema::get()->properties->receipt->properties->vats->maxItems; $max_items = SellSchema::get()->properties->receipt->properties->vats->maxItems;
if ((!empty($vats) && count($vats) >= $max_items) || count($this->vats) >= $max_items) { if ((!empty($vats) && count($vats) >= $max_items) || count($this->vats) >= $max_items) {
throw new AtolTooManyVatsException($max_items); throw new AtolTooManyVatsException(count($vats), $max_items);
} }
return true; return true;
} }