Fixes for tests

This commit is contained in:
David Bomba 2025-08-03 12:21:29 +10:00
parent 33be9515f8
commit 669a342451
2 changed files with 6 additions and 0 deletions

View File

@ -387,6 +387,9 @@ class HtmlEngine
$data['$total'] = ['value' => Number::formatMoney($this->entity_calc->getTotal(), $this->client) ?: ' ', 'label' => ctrans('texts.total')];
$data['$amount'] = &$data['$total'];
$data['$amount_bgn_eur'] = ['value' => Number::formatValue($this->entity_calc->getTotal()/1.95583, app('currencies')->first(function ($currency) {
return $currency->code == 'EUR';
})) ?: ' ', 'label' => ''];
$data['$amount_due'] = ['value' => &$data['$balance_due']['value'], 'label' => ctrans('texts.amount_due')];
$data['$quote.total'] = &$data['$total'];
$data['$invoice.total'] = ['value' => Number::formatMoney($this->entity_calc->getTotal(), $this->client) ?: ' ', 'label' => ctrans('texts.invoice_total')];

View File

@ -215,6 +215,7 @@ $response = $this->withHeaders([
]
],
'auto_bill' => true,
'next_run' => now()->addDay()->format('Y-m-d'),
];
$response = $this->withHeaders([
@ -262,6 +263,7 @@ $response = $this->withHeaders([
]
],
'auto_bill' => true,
'next_run' => now()->addDay()->format('Y-m-d'),
];
$response = $this->withHeaders([
@ -297,6 +299,7 @@ $response = $this->withHeaders([
'frequency_id' => 5, // Monthly
'remaining_cycles' => 3,
'auto_bill' => false,
'next_run' => now()->addDay()->format('Y-m-d'),
];
$response = $this->withHeaders([