mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Allow late fee invoices for locked invoice regions
This commit is contained in:
parent
1ada503031
commit
a8b65671f0
@ -203,6 +203,9 @@ class InvoiceSumInclusive
|
|||||||
return $this->invoice;
|
return $this->invoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Invoice | RecurringInvoice | Quote | Credit | PurchaseOrder
|
||||||
|
*/
|
||||||
public function getInvoice()
|
public function getInvoice()
|
||||||
{
|
{
|
||||||
//Build invoice values here and return Invoice
|
//Build invoice values here and return Invoice
|
||||||
@ -212,6 +215,9 @@ class InvoiceSumInclusive
|
|||||||
return $this->invoice;
|
return $this->invoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Invoice | RecurringInvoice | Quote | Credit | PurchaseOrder
|
||||||
|
*/
|
||||||
public function getQuote()
|
public function getQuote()
|
||||||
{
|
{
|
||||||
//Build invoice values here and return Invoice
|
//Build invoice values here and return Invoice
|
||||||
@ -221,6 +227,9 @@ class InvoiceSumInclusive
|
|||||||
return $this->invoice;
|
return $this->invoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Invoice | RecurringInvoice | Quote | Credit | PurchaseOrder
|
||||||
|
*/
|
||||||
public function getCredit()
|
public function getCredit()
|
||||||
{
|
{
|
||||||
//Build invoice values here and return Invoice
|
//Build invoice values here and return Invoice
|
||||||
@ -230,6 +239,9 @@ class InvoiceSumInclusive
|
|||||||
return $this->invoice;
|
return $this->invoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Invoice | RecurringInvoice | Quote | Credit | PurchaseOrder
|
||||||
|
*/
|
||||||
public function getPurchaseOrder()
|
public function getPurchaseOrder()
|
||||||
{
|
{
|
||||||
//Build invoice values here and return Invoice
|
//Build invoice values here and return Invoice
|
||||||
|
@ -110,7 +110,7 @@ class ReminderJob implements ShouldQueue
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function sendReminderForInvoice($invoice)
|
private function sendReminderForInvoice(Invoice $invoice)
|
||||||
{
|
{
|
||||||
App::forgetInstance('translator');
|
App::forgetInstance('translator');
|
||||||
$t = app('translator');
|
$t = app('translator');
|
||||||
@ -181,6 +181,7 @@ class ReminderJob implements ShouldQueue
|
|||||||
$fee += round($over_due_invoice->balance * $percent / 100, 2);
|
$fee += round($over_due_invoice->balance * $percent / 100, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @var \App\Models\Invoice $invoice */
|
||||||
$invoice = InvoiceFactory::create($over_due_invoice->company_id, $over_due_invoice->user_id);
|
$invoice = InvoiceFactory::create($over_due_invoice->company_id, $over_due_invoice->user_id);
|
||||||
$invoice->client_id = $over_due_invoice->client_id;
|
$invoice->client_id = $over_due_invoice->client_id;
|
||||||
$invoice->date = now()->format('Y-m-d');
|
$invoice->date = now()->format('Y-m-d');
|
||||||
@ -206,10 +207,6 @@ class ReminderJob implements ShouldQueue
|
|||||||
->markSent()
|
->markSent()
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
// nlog('adjusting client balance and invoice balance by #'.$invoice->number.' '.$invoice->balance);
|
|
||||||
// $invoice->client->service()->updateBalance($invoice->balance);
|
|
||||||
// $invoice->ledger()->updateInvoiceBalance($invoice->balance, "Late Fee Adjustment for invoice {$invoice->number}");
|
|
||||||
|
|
||||||
$invoice->service()->touchPdf(true);
|
$invoice->service()->touchPdf(true);
|
||||||
|
|
||||||
$enabled_reminder = 'enable_'.$reminder_template;
|
$enabled_reminder = 'enable_'.$reminder_template;
|
||||||
@ -232,7 +229,6 @@ class ReminderJob implements ShouldQueue
|
|||||||
|
|
||||||
$invoice->service()->setReminder()->save();
|
$invoice->service()->setReminder()->save();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user