diff --git a/src/Api/Entity/PaymentFactory.php b/src/Api/Entity/PaymentFactory.php index be4cdf1..bff1b1d 100755 --- a/src/Api/Entity/PaymentFactory.php +++ b/src/Api/Entity/PaymentFactory.php @@ -187,6 +187,8 @@ public static function create($data, $validators = []) 'dan2' => 'taxReducedRateFirst', 'zakl_dan3' => 'taxBaseReducedRateSecond', 'dan3' => 'taxReducedRateSecond', + 'urceno_cerp_zuct' => 'subsequentDrawing', + 'cerp_zuct' => 'subsequentlyDrawn', ], $data['eet']); $eetSum = $eet->getSum(); @@ -196,7 +198,9 @@ public static function create($data, $validators = []) + $eet->getTaxBaseReducedRateFirst() + $eet->getTaxReducedRateFirst() + $eet->getTaxBaseReducedRateSecond() - + $eet->getTaxReducedRateSecond(); + + $eet->getTaxReducedRateSecond() + + $eet->getSubsequentDrawing() + + $eet->getSubsequentlyDrawn(); if ($validators[self::V_PRICES] === TRUE) { if (number_format($eetSum, 8) !== number_format($eetTotal, 8)) { diff --git a/src/Api/Objects/Eet.php b/src/Api/Objects/Eet.php index ff87f26..74089cf 100644 --- a/src/Api/Objects/Eet.php +++ b/src/Api/Objects/Eet.php @@ -34,6 +34,12 @@ class Eet extends AbstractObject /** @var string */ public $currency; + /** @var float|null */ + public $subsequentDrawing; + + /** @var float|null */ + public $subsequentlyDrawn; + /** * @return float */ @@ -162,6 +168,22 @@ public function getTaxBaseNoVat() return $this->taxBaseNoVat; } + /** + * @return float|null + */ + public function getSubsequentDrawing() + { + return $this->subsequentDrawing; + } + + /** + * @return float|null + */ + public function getSubsequentlyDrawn() + { + return $this->subsequentlyDrawn; + } + /** * @param float $sum * @return void @@ -279,6 +301,14 @@ public function toArray() $data['dan3'] = $this->getTaxReducedRateSecondInCents(); } + if ($this->getSubsequentDrawing() !== NULL) { + $data['urceno_cerp_zuct'] = $this->getSubsequentDrawing(); + } + + if ($this->getSubsequentlyDrawn() !== NULL) { + $data['cerp_zuct'] = $this->getSubsequentlyDrawn(); + } + return $data; }