diff --git a/README.md b/README.md index 103995b..d32283b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,16 @@ -FusionInvoice-templates-area -============================ +#FusionInvoice area templates + +Free invoice and quote templates to use with [FusionInvoice](https://www.fusioninvoice.com/) + +##How to use +- Download this repository by clicking the "Download Zip" button on the right +- Upload the app/ folder in the root folder of your FusionInvoice installation +- Change the default invoice and quote template in your FusionInvoice system settings +- If you have a logo, recommended height is 150px + +##TODO / Known Issues +- $quote->amount->total_tax not working (FusionInvoce core issue) +- Taxes details only work when an invoice tax rate is defined (not with items taxes) (FusionInvoce core issue) +- Mixing invoice tax rate and items taxes make taxes details incorrect (FusionInvoce core issue) +- Translations for "Total taxes", "Total excluding taxes", "Total including taxes" (FusionInvoce core issue) +- Set a fixed height for the details table ([DomPDF issue](https://github.com/dompdf/dompdf/issues/857)) \ No newline at end of file diff --git a/app/FI/Modules/Templates/Views/templates/invoices/area.blade.php b/app/FI/Modules/Templates/Views/templates/invoices/area.blade.php new file mode 100644 index 0000000..29e25f4 --- /dev/null +++ b/app/FI/Modules/Templates/Views/templates/invoices/area.blade.php @@ -0,0 +1,252 @@ + + + + + {{ trans('fi.invoice') }} {{ $invoice->number }} + + + + + +
+ + + + + + + + + + + + + +
+

+ + @if ($invoice->user->company) {{ $invoice->user->company }} + @else {{ $invoice->user->name }} @endif + +

+

+ {{ $invoice->user->formatted_address }} +

+

+ @if ($invoice->user->company) {{ $invoice->user->name }}
@endif + {{ $invoice->user->email }} +

+

+ @if ($invoice->user->phone) {{ trans('fi.phone') }}: {{ $invoice->user->phone }}
@endif + @if ($invoice->user->mobile) {{ trans('fi.mobile') }}: {{ $invoice->user->mobile }}
@endif + @if ($invoice->user->fax) {{ trans('fi.fax') }}: {{ $invoice->user->fax }} @endif +

+

+ {{ $invoice->user->web }} +

+
+

+ {{ $invoice->client->name }} +

+

+ {{ $invoice->client->formatted_address }} +

+

+ {{ $invoice->client->email }} +

+

+ @if ($invoice->client->phone) {{ trans('fi.phone') }}: {{ $invoice->client->phone }}
@endif + @if ($invoice->client->mobile) {{ trans('fi.mobile') }}: {{ $invoice->client->mobile }}
@endif + @if ($invoice->client->fax) {{ trans('fi.fax') }}: {{ $invoice->client->fax }} @endif +

+

+ {{ $invoice->client->web }} +

+
+ + + + + + + + @if ($invoice->amount->total_tax > 0)@endif + + + + + @foreach ($invoice->items as $item) + + + + + @if ($invoice->amount->total_tax > 0)@endif + + + @endforeach + + + {{--*/ $colspan = 3 /*--}} + @if ($invoice->amount->total_tax > 0) + {{--*/ $colspan = 4 /*--}} + + + + + @foreach ($invoice->taxRates as $invoiceTaxRate) + + + + + @endforeach + + + + + @endif + + + + + @if ($invoice->amount->paid > 0) + + + + + + + + + @endif + +
{{ trans('fi.product') }}{{ trans('fi.quantity') }}{{ trans('fi.price') }}{{ trans('fi.tax_rate') }}{{ trans('fi.subtotal') }}
+ {{ $item->name }} +
{{ $item->formatted_description }}
+
{{ $item->formatted_quantity }}{{ $item->formatted_price }}@if ($item->taxRate) {{ $item->taxRate->formatted_percent }} @endif{{ $item->amount->formatted_subtotal }}
{{ trans('fi.subtotal') }}{{ $invoice->amount->formatted_item_subtotal }}
{{ $invoiceTaxRate->taxRate->name }} {{ $invoiceTaxRate->taxRate->formatted_percent }}{{ $invoiceTaxRate->formatted_tax_total }}
{{ trans('fi.total') }} {{ trans('fi.tax') }}{{ $invoice->amount->formatted_total_tax }}
{{ trans('fi.total') }}{{ $invoice->amount->formatted_total }} @if ($invoice->is_foreign_currency) ({{ $invoice->amount->formatted_converted_total }}) @endif
{{ trans('fi.paid') }}{{ $invoice->amount->formatted_paid }} @if ($invoice->is_foreign_currency) ({{ $invoice->amount->formatted_converted_paid }}) @endif
{{ trans('fi.balance') }}{{ $invoice->amount->formatted_balance }} @if ($invoice->is_foreign_currency) ({{ $invoice->amount->formatted_converted_balance }}) @endif
+ + + + + +
+ @if ($invoice->terms) {{ $invoice->formatted_terms }} @endif +
+ +
+ + + + + \ No newline at end of file diff --git a/app/FI/Modules/Templates/Views/templates/quotes/area.blade.php b/app/FI/Modules/Templates/Views/templates/quotes/area.blade.php new file mode 100644 index 0000000..b4d3df7 --- /dev/null +++ b/app/FI/Modules/Templates/Views/templates/quotes/area.blade.php @@ -0,0 +1,241 @@ + + + + + {{ trans('fi.quote') }} {{ $quote->number }} + + + + + +
+ + + + + + + + + + + + + +
+

+ + @if ($quote->user->company) {{ $quote->user->company }} + @else {{ $quote->user->name }} @endif + +

+

+ {{ $quote->user->formatted_address }} +

+

+ @if ($quote->user->company) {{ $quote->user->name }}
@endif + {{ $quote->user->email }} +

+

+ @if ($quote->user->phone) {{ trans('fi.phone') }}: {{ $quote->user->phone }}
@endif + @if ($quote->user->mobile) {{ trans('fi.mobile') }}: {{ $quote->user->mobile }}
@endif + @if ($quote->user->fax) {{ trans('fi.fax') }}: {{ $quote->user->fax }} @endif +

+

+ {{ $quote->user->web }} +

+
+

+ {{ $quote->client->name }} +

+

+ {{ $quote->client->formatted_address }} +

+

+ {{ $quote->client->email }} +

+

+ @if ($quote->client->phone) {{ trans('fi.phone') }}: {{ $quote->client->phone }}
@endif + @if ($quote->client->mobile) {{ trans('fi.mobile') }}: {{ $quote->client->mobile }}
@endif + @if ($quote->client->fax) {{ trans('fi.fax') }}: {{ $quote->client->fax }} @endif +

+

+ {{ $quote->client->web }} +

+
+ + + + + + + + @if ($quote->amount->formatted_total_tax != '')@endif + + + + + @foreach ($quote->items as $item) + + + + + @if ($quote->amount->formatted_total_tax != '')@endif + + + @endforeach + + + {{--*/ $colspan = 3 /*--}} + @if ($quote->amount->formatted_total_tax != '') + {{--*/ $colspan = 4 /*--}} + + + + + @foreach ($quote->taxRates as $quoteTaxRate) + + + + + @endforeach + + + + + @endif + + + + + +
{{ trans('fi.product') }}{{ trans('fi.quantity') }}{{ trans('fi.price') }}{{ trans('fi.tax_rate') }}{{ trans('fi.subtotal') }}
+ {{ $item->name }} +
{{ $item->formatted_description }}
+
{{ $item->formatted_quantity }}{{ $item->formatted_price }}@if ($item->taxRate) {{ $item->taxRate->formatted_percent }} @endif{{ $item->amount->formatted_subtotal }}
{{ trans('fi.subtotal') }}{{ $quote->amount->formatted_item_subtotal }}
{{ $quoteTaxRate->taxRate->name }} {{ $quoteTaxRate->taxRate->formatted_percent }}{{ $quoteTaxRate->formatted_tax_total }}
{{ trans('fi.total') }} {{ trans('fi.tax') }}{{ $quote->amount->formatted_total_tax }}
{{ trans('fi.total') }}{{ $quote->amount->formatted_total }} @if ($quote->is_foreign_currency) ({{ $quote->amount->formatted_converted_total }}) @endif
+ + + + + +
+ @if ($quote->terms) {{ $quote->formatted_terms }} @endif +
+ +
+ + + + + \ No newline at end of file diff --git a/invoice-example.pdf b/invoice-example.pdf new file mode 100644 index 0000000..0b8ea6e Binary files /dev/null and b/invoice-example.pdf differ diff --git a/quote-example.pdf b/quote-example.pdf new file mode 100644 index 0000000..ecb8eeb Binary files /dev/null and b/quote-example.pdf differ