1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Fixes for tests

This commit is contained in:
David Bomba 2023-10-11 15:38:18 +11:00
parent 35f7e125fb
commit bf2670635f
4 changed files with 5 additions and 7 deletions

View File

@ -52,7 +52,6 @@ class AddGatewayFee extends AbstractService
$invoice_items = collect($invoice_items)->filter(function ($item) {
return $item->type_id != '3';
});
// })->toArray();
$this->invoice->line_items = $invoice_items;

View File

@ -414,10 +414,9 @@ class InvoiceService
})->toArray();
$this->invoice->line_items = array_values($items);
$this->invoice = $this->invoice->calc()->getInvoice();
// $this->deletePdf();
$this->deleteEInvoice();
$this->deleteEInvoice(); //@deprecated
/* 24-03-2022 */
$new_balance = $this->invoice->balance;

View File

@ -38,7 +38,9 @@
@endcomponent
@endif
@include('portal.ninja2020.gateways.includes.pay_now')
@if (count($tokens) > 0)
@include('portal.ninja2020.gateways.includes.pay_now')
@endif
@endsection
@push('footer')

View File

@ -177,7 +177,6 @@ class LateFeeTest extends TestCase
});
$invoices = Invoice::whereIn('id', $ids)->cursor()->map(function ($invoice){
nlog("line item count = ".count($invoice->line_items));
$this->assertGreaterThan(0, count($invoice->line_items));
$invoice->service()->removeUnpaidGatewayFees();
@ -188,7 +187,6 @@ class LateFeeTest extends TestCase
});
$invoices->each(function ($invoice) {
nlog($invoice->line_items);
$this->assertGreaterThan(0, count($invoice->line_items));
});