Minor fixes

This commit is contained in:
David Bomba 2023-11-02 16:23:33 +11:00
parent a6c044bf4f
commit da1fde0976
2 changed files with 10 additions and 1 deletions

View File

@ -181,6 +181,16 @@ class InvoiceController extends Controller
->with('message', ctrans('texts.no_payable_invoices_selected'));
}
//ensure all stale fees are removed.
$invoices->each(function ($invoice) {
$invoice->service()
->markSent()
->removeUnpaidGatewayFees()
->save();
});
$invoices = $invoices->fresh();
//iterate and sum the payable amounts either partial or balance
$total = 0;
foreach ($invoices as $invoice) {

View File

@ -442,7 +442,6 @@ class InvoiceService
$this->invoice->line_items = array_values($items);
$this->invoice = $this->invoice->calc()->getInvoice();
$this->deleteEInvoice(); //@deprecated
/* 24-03-2022 */
$new_balance = $this->invoice->balance;