Compare commits
5 commits
Author | SHA1 | Date | |
---|---|---|---|
teutat3s | db4fccbd58 | ||
teutat3s | 4fc827e75c | ||
teutat3s | 017d7f3c0d | ||
teutat3s | 89eb9a324e | ||
teutat3s | e471677325 |
|
@ -1,76 +0,0 @@
|
||||||
# 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
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
tags
|
tags
|
||||||
|
result
|
||||||
|
|
|
@ -8,18 +8,10 @@ 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)
|
||||||
|
|
58
flake.lock
Normal file
58
flake.lock
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1717285511,
|
||||||
|
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1718229064,
|
||||||
|
"narHash": "sha256-ZFav8A9zPNfjZg/wrxh1uZeMJHELRfRgFP+meq01XYk=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "5c2ec3a5c2ee9909904f860dadc19bc12cd9cc44",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-23.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-lib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1717284937,
|
||||||
|
"narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
17
flake.nix
17
flake.nix
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
description = "b12f invoiceplane template";
|
description = "teutat3s invoiceplane template";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||||
|
@ -12,10 +12,13 @@
|
||||||
inputs.flake-parts.flakeModules.easyOverlay
|
inputs.flake-parts.flakeModules.easyOverlay
|
||||||
];
|
];
|
||||||
|
|
||||||
systems = [ "x86_64-linux" ];
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
|
|
||||||
perSystem = args@{ system, pkgs, lib, config, ... }: let
|
perSystem = { config, pkgs, final, ... }: {
|
||||||
invoiceplane-template = pkgs.stdenv.mkDerivation {
|
overlayAttrs = {
|
||||||
|
inherit (config.packages) invoiceplane-template;
|
||||||
|
};
|
||||||
|
packages.invoiceplane-template = pkgs.stdenv.mkDerivation {
|
||||||
name = "invoiceplane-template";
|
name = "invoiceplane-template";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -23,12 +26,6 @@
|
||||||
cp *.php $out/
|
cp *.php $out/
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in {
|
|
||||||
packages.default = invoiceplane-template;
|
|
||||||
packages.invoiceplane-template = invoiceplane-template;
|
|
||||||
overlayAttrs = {
|
|
||||||
inherit (config.packages) invoiceplane-template;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,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 (isset($custom_fields['invoice']['Leistungszeitraum-Anfang']) && isset($custom_fields['invoice']['Leistungszeitraum-Ende'])): ?>
|
<?php if ($custom_fields['invoice']['Leistungszeitraum-Anfang'] && $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 +237,7 @@ footer .notes {
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<?php if (isset($custom_fields['invoice']['Beschreibung'])): ?>
|
<?php if ($custom_fields['invoice']['Beschreibung']): ?>
|
||||||
<p>
|
<p>
|
||||||
<?php echo $custom_fields['invoice']['Beschreibung']; ?>
|
<?php echo $custom_fields['invoice']['Beschreibung']; ?>
|
||||||
</p>
|
</p>
|
Loading…
Reference in a new issue