diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 1d07f21b41..f32a1dd44f 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -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')]; diff --git a/tests/Feature/Scheduler/SchedulerTest.php b/tests/Feature/Scheduler/SchedulerTest.php index 855dc78d9c..09aa665eff 100644 --- a/tests/Feature/Scheduler/SchedulerTest.php +++ b/tests/Feature/Scheduler/SchedulerTest.php @@ -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([