mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -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) {
|
foreach ($invoices as $invoice) {
|
||||||
if ($reminder = $account->getInvoiceReminder($invoice, false)) {
|
if ($reminder = $account->getInvoiceReminder($invoice, false)) {
|
||||||
$this->info('Charge fee: ' . $invoice->id);
|
$this->info('Charge fee: ' . $invoice->id);
|
||||||
|
$account->loadLocalizationSettings($invoice->client); // support trans to add fee line item
|
||||||
$number = preg_replace('/[^0-9]/', '', $reminder);
|
$number = preg_replace('/[^0-9]/', '', $reminder);
|
||||||
|
|
||||||
$amount = $account->account_email_settings->{"late_fee{$number}_amount"};
|
$amount = $account->account_email_settings->{"late_fee{$number}_amount"};
|
||||||
$percent = $account->account_email_settings->{"late_fee{$number}_percent"};
|
$percent = $account->account_email_settings->{"late_fee{$number}_percent"};
|
||||||
$this->invoiceRepo->setLateFee($invoice, $amount, $percent);
|
$this->invoiceRepo->setLateFee($invoice, $amount, $percent);
|
||||||
|
@ -1171,7 +1171,7 @@ class InvoiceRepository extends BaseRepository
|
|||||||
|
|
||||||
$sql = implode(' OR ', $dates);
|
$sql = implode(' OR ', $dates);
|
||||||
$invoices = Invoice::invoiceType(INVOICE_TYPE_STANDARD)
|
$invoices = Invoice::invoiceType(INVOICE_TYPE_STANDARD)
|
||||||
->with('invoice_items')
|
->with('client', 'invoice_items')
|
||||||
->whereHas('client', function ($query) {
|
->whereHas('client', function ($query) {
|
||||||
$query->whereSendReminders(true);
|
$query->whereSendReminders(true);
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user