forked from momo/invoiceplane-template
Compare commits
7 commits
db4fccbd58
...
27d180c69a
Author | SHA1 | Date | |
---|---|---|---|
teutat3s | 27d180c69a | ||
teutat3s | 222a5de94b | ||
teutat3s | 85d995a41f | ||
teutat3s | 0f7e0b6478 | ||
b12f | fa48775c39 | ||
Benjamin Yule Bädorf | 289362cb84 | ||
hensoko | df2785f62c |
76
.editorconfig
Normal file
76
.editorconfig
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
# Editor configuration, see http://editorconfig.org
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
# Ignore diffs/patches
|
||||||
|
[*.{diff,patch}]
|
||||||
|
end_of_line = unset
|
||||||
|
insert_final_newline = unset
|
||||||
|
trim_trailing_whitespace = unset
|
||||||
|
indent_size = unset
|
||||||
|
charset = unset
|
||||||
|
indent_style = unset
|
||||||
|
indent_size = unset
|
||||||
|
|
||||||
|
[{.*,secrets}/**]
|
||||||
|
end_of_line = unset
|
||||||
|
insert_final_newline = unset
|
||||||
|
trim_trailing_whitespace = unset
|
||||||
|
charset = unset
|
||||||
|
indent_style = unset
|
||||||
|
indent_size = unset
|
||||||
|
|
||||||
|
[*.rom]
|
||||||
|
end_of_line = unset
|
||||||
|
insert_final_newline = unset
|
||||||
|
trim_trailing_whitespace = unset
|
||||||
|
charset = unset
|
||||||
|
indent_style = unset
|
||||||
|
indent_size = unset
|
||||||
|
|
||||||
|
[*.py]
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
max_line_length = off
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
# Ignore diffs/patches
|
||||||
|
[*.{diff,patch}]
|
||||||
|
end_of_line = unset
|
||||||
|
insert_final_newline = unset
|
||||||
|
trim_trailing_whitespace = unset
|
||||||
|
indent_size = unset
|
||||||
|
charset = unset
|
||||||
|
indent_style = unset
|
||||||
|
indent_size = unset
|
||||||
|
|
||||||
|
[{.*,secrets}/**]
|
||||||
|
end_of_line = unset
|
||||||
|
insert_final_newline = unset
|
||||||
|
trim_trailing_whitespace = unset
|
||||||
|
charset = unset
|
||||||
|
indent_style = unset
|
||||||
|
indent_size = unset
|
||||||
|
|
||||||
|
[*.rom]
|
||||||
|
end_of_line = unset
|
||||||
|
insert_final_newline = unset
|
||||||
|
trim_trailing_whitespace = unset
|
||||||
|
charset = unset
|
||||||
|
indent_style = unset
|
||||||
|
indent_size = unset
|
||||||
|
|
||||||
|
[*.py]
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
max_line_length = off
|
||||||
|
trim_trailing_whitespace = false
|
|
@ -8,10 +8,18 @@ This Template is adopted from the original one with some minor changes:
|
||||||
- Altered spacing and fields due to DIN 5008
|
- Altered spacing and fields due to DIN 5008
|
||||||
- Moved zip-code in front of city
|
- Moved zip-code in front of city
|
||||||
|
|
||||||
|
This Template has hardcoded German text.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Simply add the files into `application/views/invoice_templates/pdf` and select them in Invoiceplane's *System Settings -> Invoices* as PDF templates.
|
Simply add the files into `application/views/invoice_templates/pdf` and select them in Invoiceplane's *System Settings -> Invoices* as PDF templates.
|
||||||
|
|
||||||
|
### Extra fields
|
||||||
|
|
||||||
|
You can add a "Leistungszeitraum" for any invoice by defining the two custom date fields: `Leistungszeitraum-Anfang` and `Leistungszeitraum-Ende`. These will not be shown on the invoice if either is not set.
|
||||||
|
|
||||||
|
You can also add a description text for the full invoice by adding a text custom field called `Beschreibung`.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
![Screenshot](screenshot.png)
|
![Screenshot](screenshot.png)
|
||||||
|
|
22
flake.lock
22
flake.lock
|
@ -5,11 +5,11 @@
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717285511,
|
"lastModified": 1727826117,
|
||||||
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
|
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
|
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -20,30 +20,30 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1718229064,
|
"lastModified": 1728193676,
|
||||||
"narHash": "sha256-ZFav8A9zPNfjZg/wrxh1uZeMJHELRfRgFP+meq01XYk=",
|
"narHash": "sha256-PbDWAIjKJdlVg+qQRhzdSor04bAPApDqIv2DofTyynk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5c2ec3a5c2ee9909904f860dadc19bc12cd9cc44",
|
"rev": "ecbc1ca8ffd6aea8372ad16be9ebbb39889e55b6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-23.11",
|
"ref": "nixos-24.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717284937,
|
"lastModified": 1727825735,
|
||||||
"narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=",
|
"narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
|
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
|
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
description = "teutat3s invoiceplane template";
|
description = "momo invoiceplane template";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -15,6 +15,11 @@
|
||||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
|
|
||||||
perSystem = { config, pkgs, final, ... }: {
|
perSystem = { config, pkgs, final, ... }: {
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
phpactor
|
||||||
|
];
|
||||||
|
};
|
||||||
overlayAttrs = {
|
overlayAttrs = {
|
||||||
inherit (config.packages) invoiceplane-template;
|
inherit (config.packages) invoiceplane-template;
|
||||||
};
|
};
|
||||||
|
|
|
@ -104,9 +104,11 @@ footer .notes {
|
||||||
|
|
||||||
<div id="client">
|
<div id="client">
|
||||||
<div id="sichtfenster-absender">
|
<div id="sichtfenster-absender">
|
||||||
<?php
|
<?php if (isset($invoice->user_company)): ?>
|
||||||
|
echo htmlsc($invoice->user_company) . ' - ' . htmlsc($invoice->user_address_1) . ' - ' . htmlsc($invoice->user_zip) . ' ' . htmlsc($invoice->user_city);
|
||||||
|
<?php else: ?>
|
||||||
echo htmlsc($invoice->user_name) . ' - ' . htmlsc($invoice->user_address_1) . ' - ' . htmlsc($invoice->user_zip) . ' ' . htmlsc($invoice->user_city);
|
echo htmlsc($invoice->user_name) . ' - ' . htmlsc($invoice->user_address_1) . ' - ' . htmlsc($invoice->user_zip) . ' ' . htmlsc($invoice->user_city);
|
||||||
?>
|
<?php endif; ?>
|
||||||
<hr />
|
<hr />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -229,7 +231,7 @@ footer .notes {
|
||||||
|
|
||||||
<p class="invoice-meta">
|
<p class="invoice-meta">
|
||||||
Rechnungsnummer: <?php echo $invoice->invoice_number; ?><br />
|
Rechnungsnummer: <?php echo $invoice->invoice_number; ?><br />
|
||||||
<?php if ($custom_fields['invoice']['Leistungszeitraum-Anfang'] && $custom_fields['invoice']['Leistungszeitraum-Ende']): ?>
|
<?php if (isset($custom_fields['invoice']['Leistungszeitraum-Anfang']) && isset($custom_fields['invoice']['Leistungszeitraum-Ende'])): ?>
|
||||||
Leistungszeitraum:
|
Leistungszeitraum:
|
||||||
<?php echo date_from_mysql($custom_fields['invoice']['Leistungszeitraum-Anfang'], true); ?>
|
<?php echo date_from_mysql($custom_fields['invoice']['Leistungszeitraum-Anfang'], true); ?>
|
||||||
-
|
-
|
||||||
|
@ -237,7 +239,7 @@ footer .notes {
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<?php if ($custom_fields['invoice']['Beschreibung']): ?>
|
<?php if (isset($custom_fields['invoice']['Beschreibung'])): ?>
|
||||||
<p>
|
<p>
|
||||||
<?php echo $custom_fields['invoice']['Beschreibung']; ?>
|
<?php echo $custom_fields['invoice']['Beschreibung']; ?>
|
||||||
</p>
|
</p>
|
||||||
|
@ -384,7 +386,12 @@ footer .notes {
|
||||||
<?php if (!$isPaid): ?>
|
<?php if (!$isPaid): ?>
|
||||||
<p>
|
<p>
|
||||||
Bitte überweisen Sie den Rechnungsbetrag innerhalb von <?php echo (-1 * $invoice->days_overdue); ?> Tagen auf untenstehendes Konto:<br />
|
Bitte überweisen Sie den Rechnungsbetrag innerhalb von <?php echo (-1 * $invoice->days_overdue); ?> Tagen auf untenstehendes Konto:<br />
|
||||||
Inhaber: <?php echo $invoice->user_name; ?><br />
|
Inhaber:
|
||||||
|
<?php if (isset($invoice->user_company)): ?>
|
||||||
|
echo $invoice->user_company; ?><br />
|
||||||
|
<?php else: ?>
|
||||||
|
echo $invoice->user_name; ?><br />
|
||||||
|
<?php endif; ?>
|
||||||
IBAN: <?php echo $invoice->user_iban; ?><br />
|
IBAN: <?php echo $invoice->user_iban; ?><br />
|
||||||
<?php echo invoice_qrcode($invoice->invoice_id); ?>
|
<?php echo invoice_qrcode($invoice->invoice_id); ?>
|
||||||
</p>
|
</p>
|
Loading…
Reference in a new issue