Merge pull request #11057 from turbo124/v5-develop
Fixes for client credit balance
This commit is contained in:
commit
8c25d0a5c0
|
|
@ -401,8 +401,10 @@ class HtmlEngine
|
||||||
$data['$credit.valid_until'] = ['value' => $this->translateDate($this->entity->due_date, $this->client->date_format(), $this->client->locale()), 'label' => ctrans('texts.valid_until')];
|
$data['$credit.valid_until'] = ['value' => $this->translateDate($this->entity->due_date, $this->client->date_format(), $this->client->locale()), 'label' => ctrans('texts.valid_until')];
|
||||||
|
|
||||||
$data['$balance'] = ['value' => Number::formatMoney($this->getBalance(), $this->client) ?: ' ', 'label' => ctrans('texts.balance')];
|
$data['$balance'] = ['value' => Number::formatMoney($this->getBalance(), $this->client) ?: ' ', 'label' => ctrans('texts.balance')];
|
||||||
|
|
||||||
$data['$credit.balance'] = ['value' => Number::formatMoney($this->entity_calc->getBalance(), $this->client) ?: ' ', 'label' => ctrans('texts.credit_balance')];
|
$data['$credit.balance'] = ['value' => Number::formatMoney($this->entity_calc->getBalance(), $this->client) ?: ' ', 'label' => ctrans('texts.credit_balance')];
|
||||||
$data['$client.credit_balance'] = &$data['$credit.balance'];
|
$data['$client.credit_balance'] = ['value' => Number::formatMoney($this->entity->client->credit_balance, $this->client) ?: ' ', 'label' => ctrans('texts.credit_balance')];
|
||||||
|
// $data['$client.credit_balance'] = &$data['$credit.balance'];
|
||||||
|
|
||||||
$data['$invoice.balance'] = &$data['$balance'];
|
$data['$invoice.balance'] = &$data['$balance'];
|
||||||
$data['$taxes'] = ['value' => Number::formatMoney($this->entity_calc->getItemTotalTaxes(), $this->client) ?: ' ', 'label' => ctrans('texts.taxes')];
|
$data['$taxes'] = ['value' => Number::formatMoney($this->entity_calc->getItemTotalTaxes(), $this->client) ?: ' ', 'label' => ctrans('texts.taxes')];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue