Fixes for tests

This commit is contained in:
David Bomba 2024-08-28 11:02:57 +10:00
parent 0905bd2f58
commit 5f43c5e2a2
4 changed files with 20 additions and 2 deletions

View File

@ -106,7 +106,17 @@ class Portal extends Component
if($r->successful())
{
$response = $r->json();
$_company = auth()->guard('user')->user()->account->companies()->where('company_id', $company_key)->first();
$_company->legal_entity_id = $response['id'];
$_company->save();
return;
}
$error = json_decode($r->getBody()->getContents(),true);
session()->flash('error', $error['message']);
}
private function getHeaders()

View File

@ -783,7 +783,7 @@ class Peppol extends AbstractService
*/
private function resolveTaxScheme(): string
{
return (new StorecoveRouter())->resolveTaxScheme($this->invoice->client->country->iso_3166_2, $this->invoice->client->classification)
return (new StorecoveRouter())->resolveTaxScheme($this->invoice->client->country->iso_3166_2, $this->invoice->client->classification);
// $rules = isset($this->routing_rules[$this->invoice->client->country->iso_3166_2]) ? $this->routing_rules[$this->invoice->client->country->iso_3166_2] : [false, false, false, false,];

View File

@ -39,6 +39,7 @@ class ClientBalanceReport extends BaseExport
'invoices',
'invoice_balance',
'credit_balance',
'payment_balance',
];
/**
@ -119,6 +120,7 @@ class ClientBalanceReport extends BaseExport
$query->count(),
$query->sum('balance'),
$client->credit_balance,
$client->payment_balance,
];
}
}

View File

@ -24,8 +24,14 @@
</div>
</div>
</div>
<div class="w-full flex-grow py-10 items-center justify-between">
@if (session()->has('error'))
<div class="mt-4 text-red-600 text-sm font-semibold">
{{ session('error') }}
</div>
@endif
<div class="grid lg:grid-cols-3 mx-6 md:mx-0 md:my-2 border border-gray-300 rounded-lg shadow-md bg-gray-100">