mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:24:31 -04:00
Fix late fee translation
This commit is contained in:
parent
869ba58fdc
commit
65369399bb
@ -101,7 +101,9 @@ class SendReminders extends Command
|
||||
foreach ($invoices as $invoice) {
|
||||
if ($reminder = $account->getInvoiceReminder($invoice, false)) {
|
||||
$this->info('Charge fee: ' . $invoice->id);
|
||||
$account->loadLocalizationSettings($invoice->client); // support trans to add fee line item
|
||||
$number = preg_replace('/[^0-9]/', '', $reminder);
|
||||
|
||||
$amount = $account->account_email_settings->{"late_fee{$number}_amount"};
|
||||
$percent = $account->account_email_settings->{"late_fee{$number}_percent"};
|
||||
$this->invoiceRepo->setLateFee($invoice, $amount, $percent);
|
||||
|
@ -1171,7 +1171,7 @@ class InvoiceRepository extends BaseRepository
|
||||
|
||||
$sql = implode(' OR ', $dates);
|
||||
$invoices = Invoice::invoiceType(INVOICE_TYPE_STANDARD)
|
||||
->with('invoice_items')
|
||||
->with('client', 'invoice_items')
|
||||
->whereHas('client', function ($query) {
|
||||
$query->whereSendReminders(true);
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user