schenke-io / laravel-invoice
Currency and Invoices in Laravel
v0.1.4
2025-09-10 13:11 UTC
Requires
- php: ^8.3
- archtechx/enums: ^v1.1
- illuminate/contracts: ^12.0
- illuminate/http: ^12.0
- illuminate/routing: ^12.0
- illuminate/support: ^12.0
- illuminate/validation: ^12.0
- livewire/livewire: ^3.0
- spatie/laravel-data: ^4.0
- spatie/laravel-package-tools: ^1.0
Requires (Dev)
- laravel/pint: ^1.24
- pestphp/pest: ^3.8
- phpstan/phpstan-phpunit: ^1.0
- schenke-io/packaging-tools: ^0.0
README
Laravel Invoice
Handling of:
- Currency
- Invoice
Currency
Public methods of Currency
method | summary |
---|---|
fromAny | static constructor from any value |
fromFloat | static constructor from a float value |
fromCents | static constructor from cents |
vatFromGross | VAT amount from the gross price, given a VAT rate. |
vatFromNet | Calculate the VAT amount from the net price, given a VAT rate. |
fromGrossToNet | convert a gross value to a net value using VAT |
fromNetToGross | Convert a net value to a gross value using VAT |
toFloat | exports to float |
str | exports to formatted currency string |
plus | adds two objects |
minus | subtracts two objects |
times | multiplies the object by a factor |
toLivewire | exports to Livewire format |
fromLivewire | static constructor from Livewire format |
isEmpty | Check if the object is empty (zero) |
Invoice
Public methods of Invoice
method | summary |
---|---|
addWeight | - |
addLine | cent based calculation to avoid numeric glitches |
vats | formats the VAT values in a readable format |
payMe | show pay me information |
isEmpty | the total is zero |
display | data for blade templates |