@@ 173-179 (lines=7) @@ | ||
170 | 'currency' => $currency, |
|
171 | ]; |
|
172 | ||
173 | if ($purse->getBudget() >= $amount) { |
|
174 | echo $this->render('enough', $options); |
|
175 | } elseif ($purse->getBudget() > 0) { |
|
176 | echo $this->render('partial', array_merge($options, [ |
|
177 | 'amount' => $this->getPartialAmount($currency) |
|
178 | ])); |
|
179 | } |
|
180 | ||
181 | if ($purse->getBudget() < 0) { |
|
182 | echo $this->render('full_payment', array_merge($options, [ |
|
@@ 181-188 (lines=8) @@ | ||
178 | ])); |
|
179 | } |
|
180 | ||
181 | if ($purse->getBudget() < 0) { |
|
182 | echo $this->render('full_payment', array_merge($options, [ |
|
183 | 'amount' => $this->getFullAmount($currency), |
|
184 | 'debt' => -$purse->getBudget(), |
|
185 | ])); |
|
186 | } else { |
|
187 | echo $this->render('full_payment', $options); |
|
188 | } |
|
189 | } |
|
190 | ||
191 | private function getClientPurseByCurrency(string $currency): Purse |