Hasnayeen / invobook

Self-hosted app for Time Tracking, Invoice Generation, Project & Client Management, built with Laravel & Filament.
MIT License
2.13k stars 610 forks source link

ApplyTax Error #1501

Open nickxhinobi opened 6 months ago

nickxhinobi commented 6 months ago

I'm not sure what causes this, what I tried to do to get this error by generating a new invoice and I received this error.

LaravelDaily\Invoices\Services\PricingService::applyTax(): Argument #1 ($target) must be of type float, null given, called in C:\Users\XXXX\invobook\vendor\laraveldaily\laravel-invoices\src\Traits\InvoiceHelpers.php on line 292

Hasnayeen commented 4 months ago

I'm not sure what causes this, what I tried to do to get this error by generating a new invoice and I received this error.

LaravelDaily\Invoices\Services\PricingService::applyTax(): Argument #1 ($target) must be of type float, null given, called in C:\Users\XXXX\invobook\vendor\laraveldaily\laravel-invoices\src\Traits\InvoiceHelpers.php on line 292

does this issue still happens?

AhmedHelalAhmed commented 4 months ago

I faced the same issue

AhmedHelalAhmed commented 4 months ago

in GenerateInvoicePdf

we need to set totalAmount with value in case we have vat

or remove totalTaxes to set tax with null

image

for my use case I don't need tax so I removed it https://github.com/AhmedHelalAhmed/invobook/commit/4a7b68bba10699d5eb8ce565582865da52b3d10c