diff --git a/InvoicePlane_DIN5008B - paid.php b/InvoicePlane_DIN5008B - paid.php new file mode 100644 index 0000000..c11366a --- /dev/null +++ b/InvoicePlane_DIN5008B - paid.php @@ -0,0 +1,329 @@ + + + + + <?php _trans('invoice'); ?> + + + + + + + +

+

+

+ +
+
+ user_name) . ' - ' . htmlsc($invoice->user_address_1) . ' - ' . htmlsc($invoice->client_zip) . ' ' . htmlsc($invoice->client_city); + ?> +
+
+
+ +
+ client_vat_id) { + echo '
' . trans('vat_id_short') . ': ' . $invoice->client_vat_id . '
'; + } + if ($invoice->client_tax_code) { + echo '
' . trans('tax_code_short') . ': ' . $invoice->client_tax_code . '
'; + } + if ($invoice->client_address_1) { + echo '
' . htmlsc($invoice->client_address_1) . '
'; + } + if ($invoice->client_address_2) { + echo '
' . htmlsc($invoice->client_address_2) . '
'; + } + if ($invoice->client_city || $invoice->client_state || $invoice->client_zip) { + echo '
'; + if ($invoice->client_city) { + echo htmlsc($invoice->client_city) . ' '; + } + if ($invoice->client_state) { + echo htmlsc($invoice->client_state) . ' '; + } + if ($invoice->client_zip) { + echo htmlsc($invoice->client_zip); + } + echo '
'; + } + if ($invoice->client_country) { + echo '
' . get_country_name(trans('cldr'), $invoice->client_country) . '
'; + } + + echo '
'; + + if ($invoice->client_phone) { + echo '
' . trans('phone_abbr') . ': ' . htmlsc($invoice->client_phone) . '
'; + } ?> +
+ +
+ + + + + +
+
user_name); ?>
+ user_vat_id) { + echo '
' . trans('vat_id_short') . ': ' . $invoice->user_vat_id . '
'; + } + if ($invoice->user_tax_code) { + echo '
' . trans('tax_code_short') . ': ' . $invoice->user_tax_code . '
'; + } + if ($invoice->user_address_1) { + echo '
' . htmlsc($invoice->user_address_1) . '
'; + } + if ($invoice->user_address_2) { + echo '
' . htmlsc($invoice->user_address_2) . '
'; + } + if ($invoice->user_city || $invoice->user_state || $invoice->user_zip) { + echo '
'; + if ($invoice->user_city) { + echo htmlsc($invoice->user_city) . ' '; + } + if ($invoice->user_state) { + echo htmlsc($invoice->user_state) . ' '; + } + if ($invoice->user_zip) { + echo htmlsc($invoice->user_zip); + } + echo '
'; + } + if ($invoice->user_country) { + echo '
' . get_country_name(trans('cldr'), $invoice->user_country) . '
'; + } + + echo '
'; + + if ($invoice->user_phone) { + echo '
' . trans('phone_abbr') . ': ' . htmlsc($invoice->user_phone) . '
'; + } + if ($invoice->user_fax) { + echo '
' . trans('fax_abbr') . ': ' . htmlsc($invoice->user_fax) . '
'; + } + ?> +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + +
invoice_date_created, true); ?>
invoice_date_due, true); ?>
invoice_balance); ?>
payment_method_name); ?>
+
+ +

invoice_number; ?>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + invoice_item_tax_total > 0) { ?> + + + + + + + + + + + + + + invoice_discount_percent != '0.00') : ?> + + + + + + invoice_discount_amount != '0.00') : ?> + + + + + + + + + + + + + + + + + + + +
item_name); ?>item_description)); ?> + item_quantity); ?> + item_product_unit) : ?> +
+ item_product_unit); ?> + +
+ item_price); ?> + + item_discount); ?> + + item_total); ?> +
class="text-right"> + + invoice_item_subtotal); ?>
class="text-right"> + + + invoice_item_tax_total); ?> +
class="text-right"> + invoice_tax_rate_name) . ' (' . format_amount($invoice_tax_rate->invoice_tax_rate_percent) . '%)'; ?> + + invoice_tax_rate_amount); ?> +
class="text-right"> + + + invoice_discount_percent); ?>% +
class="text-right"> + + + invoice_discount_amount); ?> +
class="text-right"> + + + invoice_total); ?> +
class="text-right"> + + + invoice_paid); ?> +
class="text-right"> + + + invoice_balance); ?> +
+ +
+ + + + + + + diff --git a/InvoicePlane_DIN5008B.php b/InvoicePlane_DIN5008B.php new file mode 100644 index 0000000..590a66a --- /dev/null +++ b/InvoicePlane_DIN5008B.php @@ -0,0 +1,327 @@ + + + + + <?php _trans('invoice'); ?> + + + + + + + +

+

+

+ +
+
+ user_name) . ' - ' . htmlsc($invoice->user_address_1) . ' - ' . htmlsc($invoice->client_zip) . ' ' . htmlsc($invoice->client_city); + ?> +
+
+
+ +
+ client_vat_id) { + echo '
' . trans('vat_id_short') . ': ' . $invoice->client_vat_id . '
'; + } + if ($invoice->client_tax_code) { + echo '
' . trans('tax_code_short') . ': ' . $invoice->client_tax_code . '
'; + } + if ($invoice->client_address_1) { + echo '
' . htmlsc($invoice->client_address_1) . '
'; + } + if ($invoice->client_address_2) { + echo '
' . htmlsc($invoice->client_address_2) . '
'; + } + if ($invoice->client_city || $invoice->client_state || $invoice->client_zip) { + echo '
'; + if ($invoice->client_city) { + echo htmlsc($invoice->client_city) . ' '; + } + if ($invoice->client_state) { + echo htmlsc($invoice->client_state) . ' '; + } + if ($invoice->client_zip) { + echo htmlsc($invoice->client_zip); + } + echo '
'; + } + if ($invoice->client_country) { + echo '
' . get_country_name(trans('cldr'), $invoice->client_country) . '
'; + } + + echo '
'; + + if ($invoice->client_phone) { + echo '
' . trans('phone_abbr') . ': ' . htmlsc($invoice->client_phone) . '
'; + } ?> +
+ +
+ + + + + +
+
user_name); ?>
+ user_vat_id) { + echo '
' . trans('vat_id_short') . ': ' . $invoice->user_vat_id . '
'; + } + if ($invoice->user_tax_code) { + echo '
' . trans('tax_code_short') . ': ' . $invoice->user_tax_code . '
'; + } + if ($invoice->user_address_1) { + echo '
' . htmlsc($invoice->user_address_1) . '
'; + } + if ($invoice->user_address_2) { + echo '
' . htmlsc($invoice->user_address_2) . '
'; + } + if ($invoice->user_city || $invoice->user_state || $invoice->user_zip) { + echo '
'; + if ($invoice->user_city) { + echo htmlsc($invoice->user_city) . ' '; + } + if ($invoice->user_state) { + echo htmlsc($invoice->user_state) . ' '; + } + if ($invoice->user_zip) { + echo htmlsc($invoice->user_zip); + } + echo '
'; + } + if ($invoice->user_country) { + echo '
' . get_country_name(trans('cldr'), $invoice->user_country) . '
'; + } + + echo '
'; + + if ($invoice->user_phone) { + echo '
' . trans('phone_abbr') . ': ' . htmlsc($invoice->user_phone) . '
'; + } + if ($invoice->user_fax) { + echo '
' . trans('fax_abbr') . ': ' . htmlsc($invoice->user_fax) . '
'; + } + ?> +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + +
invoice_date_created, true); ?>
invoice_date_due, true); ?>
invoice_balance); ?>
payment_method_name); ?>
+
+ +

invoice_number; ?>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + invoice_item_tax_total > 0) { ?> + + + + + + + + + + + + + + invoice_discount_percent != '0.00') : ?> + + + + + + invoice_discount_amount != '0.00') : ?> + + + + + + + + + + + + + + + + + + + +
item_name); ?>item_description)); ?> + item_quantity); ?> + item_product_unit) : ?> +
+ item_product_unit); ?> + +
+ item_price); ?> + + item_discount); ?> + + item_total); ?> +
class="text-right"> + + invoice_item_subtotal); ?>
class="text-right"> + + + invoice_item_tax_total); ?> +
class="text-right"> + invoice_tax_rate_name) . ' (' . format_amount($invoice_tax_rate->invoice_tax_rate_percent) . '%)'; ?> + + invoice_tax_rate_amount); ?> +
class="text-right"> + + + invoice_discount_percent); ?>% +
class="text-right"> + + + invoice_discount_amount); ?> +
class="text-right"> + + + invoice_total); ?> +
class="text-right"> + + + invoice_paid); ?> +
class="text-right"> + + + invoice_balance); ?> +
+ +
+ + + + + diff --git a/README.MD b/README.MD new file mode 100644 index 0000000..9baf097 --- /dev/null +++ b/README.MD @@ -0,0 +1,14 @@ +# PDF Template for Invoiceplane German DIN 5008 Form B + +This Template is adopted from the original one wirh some changes: +- Adds Faltmarken as described in [DIN 5008 / Form B](https://de.wikipedia.org/wiki/Datei:DIN_5008_Form_B.svg) +- Adds Sender on top of cliens Address for Sichtfensterumschlag +- Moves client to place described in DIN 5008 + +## Installation + +Simply add the files into application/views/invoice_templates/pdf an select them in the invoiceplanes System Settings -> Invoices menu as templates. + +## Example + +![Screenshot](screenshot.png) \ No newline at end of file diff --git a/Screenshot.png b/Screenshot.png new file mode 100644 index 0000000..f4b79e3 Binary files /dev/null and b/Screenshot.png differ