diff --git a/README.md b/README.md index e69de29..8c1e2d8 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,18 @@ +## Invoiceplane Template for Heinrich-Malerbetrieb.de + +### Setup + +Run development server + +``` +nix run +``` + +Visit http://localhost:8080 , run the setup and after login browse to system settings. In the sub menu invoice, change default PDF template to `heinrichmalerbetrieb`. + +### Configuration + +General default settings which should be set + + - User profile (company contact information), such as mail, address, phone and mail + - System settings in general and invoice: Upload company logo for login and invoice logo diff --git a/flake.lock b/flake.lock index 1d293d7..2dfc896 100644 --- a/flake.lock +++ b/flake.lock @@ -2,17 +2,18 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1735531152, - "narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=", - "owner": "NixOS", + "lastModified": 1736100068, + "narHash": "sha256-wtipqLxpphkpxTGJvVuej+msDzABUfWm5TeO31d00MY=", + "owner": "onny", "repo": "nixpkgs", - "rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b", + "rev": "68a0940f753446728b57c74db999ab08421e9d46", "type": "github" }, "original": { - "id": "nixpkgs", - "ref": "nixos-24.11", - "type": "indirect" + "owner": "onny", + "ref": "invoiceplane-https", + "repo": "nixpkgs", + "type": "github" } }, "root": { diff --git a/flake.nix b/flake.nix index 035f772..36f3cd5 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,8 @@ { description = "Invoiceplane invoice template development shell"; - inputs.nixpkgs.url = "nixpkgs/nixos-24.11"; + #inputs.nixpkgs.url = "nixpkgs/nixos-24.11"; + inputs.nixpkgs.url = "github:onny/nixpkgs/invoiceplane-https"; outputs = { self, nixpkgs, ... }@inputs: let @@ -33,12 +34,18 @@ services.invoiceplane.sites."localhost" = { enable = true; - settings.IP_URL = "http://localhost:8080"; + settings = { + IP_URL = "http://localhost:8080"; + #DISABLE_SETUP = true; + #SETUP_COMPLETED = true; + }; }; + services.caddy.virtualHosts."localhost".hostName = "http://localhost"; + nixos-shell.mounts.extraMounts = { "/var/lib/invoiceplane/localhost/pdf" = { - target = /home/onny/projects/invoiceplane-heinrichmalerbetrieb; + target = ./.; cache = "none"; }; }; diff --git a/heinrichmalerbetrieb.php b/heinrichmalerbetrieb.php index 4c0f64d..acb394f 100755 --- a/heinrichmalerbetrieb.php +++ b/heinrichmalerbetrieb.php @@ -6,11 +6,23 @@ +
- -
-
user_name); ?>
+
user_address_1) { echo '
' . htmlsc($invoice->user_address_1) . '
'; } @@ -65,14 +73,11 @@ } 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 htmlsc($invoice->user_zip) . ' '; + } + if ($invoice->user_city) { + echo htmlsc($invoice->user_city); } echo '
'; } @@ -80,8 +85,6 @@ echo '
' . get_country_name(trans('cldr'), $invoice->user_country) . '
'; } - echo '
'; - if ($invoice->user_vat_id) { echo '
' . trans('vat_id_short') . ': ' . $invoice->user_vat_id . '
'; } @@ -89,14 +92,18 @@ echo '
' . trans('tax_code_short') . ': ' . $invoice->user_tax_code . '
'; } - 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) . '
'; } + if ($invoice->user_email) { + echo '
' . htmlsc($invoice->user_email) . '
'; + } + if ($invoice->user_web) { + echo '
' . htmlsc($invoice->user_web) . '
'; + } ?>
@@ -129,22 +136,6 @@

invoice_number; ?>

- format('d.m.Y'); - $leistung_bis = $leistung_bis->format('d.m.Y'); - echo '
Leistungszeitraum: ' . $leistung_von . ' bis ' . $leistung_bis . '
'; - } - if ($leistungsort) { - echo '
Leistungsort: ' . $leistungsort . '
'; - } - ?> - diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..0e786c8 Binary files /dev/null and b/logo.png differ diff --git a/logo.webp b/logo.webp new file mode 100644 index 0000000..fbdc420 Binary files /dev/null and b/logo.webp differ