diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..5bc357d --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,31 @@ +name: Deploy Docs + +on: + push: + branches: + - main + - master + paths: + - 'docs/**' + - 'mkdocs.yml' + - 'requirements.txt' + workflow_dispatch: + +permissions: + contents: write + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Deploy to GitHub Pages + run: mkdocs gh-deploy --force diff --git a/.gitignore b/.gitignore index 92bc51f..3efaff9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ _ide_helper.php .env .idea +/site +__pycache__ +*.pyc diff --git a/app/Http/Controllers/WikiController.php b/app/Http/Controllers/WikiController.php index dc635ce..f5ca0b3 100644 --- a/app/Http/Controllers/WikiController.php +++ b/app/Http/Controllers/WikiController.php @@ -2,109 +2,172 @@ namespace App\Http\Controllers; +use App\WikiPage; use Illuminate\Support\Facades\Config; class WikiController extends Controller { + /** + * @var WikiPage + */ + protected $wikiPage; + + public function __construct(WikiPage $wikiPage) + { + $this->wikiPage = $wikiPage; + } + public function getPage($locale, $version = '', $dir = '', $page = '') { - // Get default vars first - $default_locale = Config::get('app.locale'); + $default_locale = Config::get('app.locale'); $default_version = Config::get('app.version'); - // Check if the requested page has a redirect + // Check if the requested page has a redirect configured. $redirects = Config::get('routes.redirects'); - if (isset($redirects[$version][$dir][$page])) { return redirect()->to($redirects[$version][$dir][$page]); } - // Redirect to the default locale if the requested one is not available + // Redirect to the default locale if the requested one is not available. $locales = Config::get('app.available_locales'); - if (!isset($locales[$locale])) { + if (! isset($locales[$locale])) { $redirect_url = $default_locale; - if ($version) { - $redirect_url .= '/' . $version; - } - if ($dir) { - $redirect_url .= '/' . $dir; - } - if ($page) { - $redirect_url .= '/' . $page; - } + if ($version) { $redirect_url .= '/' . $version; } + if ($dir) { $redirect_url .= '/' . $dir; } + if ($page) { $redirect_url .= '/' . $page; } return redirect()->to($redirect_url); } - // Redirect to the default version if the requested one is not available + // Normalize version to underscore format (1.6 → 1_6). $versions = Config::get('app.versions'); - $version = str_replace('.', '_', $version); - if (empty($version) || !in_array($version, $versions)) { + $version = str_replace('.', '_', $version); + + if (empty($version) || ! in_array($version, $versions)) { $redirect_url = $locale . '/' . str_replace('_', '.', $default_version); - if (!empty($dir)) { - $redirect_url .= '/' . $dir; + if (! empty($dir)) { $redirect_url .= '/' . $dir; } + if (! empty($page)) { $redirect_url .= '/' . $page; } + return redirect()->to($redirect_url); + } + + // Build the sub-path used by the topbar version switcher. + if (! empty($dir) && ! empty($page)) { + $current_url = '/' . $dir . '/' . $page; + } elseif (! empty($dir)) { + $current_url = '/' . $dir; + } else { + $current_url = '/'; + } + + view()->share([ + 'current_dir' => $dir, + 'current_page' => $page, + 'current_url' => $current_url, + 'current_version' => str_replace('_', '.', $version), + ]); + + if ($this->usesMarkdown($version)) { + return $this->serveMarkdown($locale, $version, $dir, $page, $current_url, $versions, $default_version); + } + + return $this->serveBlade($locale, $version, $dir, $page, $current_url, $versions, $default_version); + } + + /** + * Serve a page from a Markdown file. + * Used for versions >= 1.7. + * Falls back only within the markdown version pool. + */ + protected function serveMarkdown($locale, $version, $dir, $page, $current_url, $versions, $default_version) + { + $markdown_versions = array_values(array_filter($versions, function ($v) { + return $this->usesMarkdown($v); + })); + + // Try requested version first, then older markdown versions newest-first. + $try_order = array_merge( + [$version], + array_values(array_diff(array_reverse($markdown_versions), [$version])) + ); + + foreach ($try_order as $try_version) { + if (! $this->wikiPage->exists($locale, $try_version, $dir, $page)) { + continue; } - if (!empty($page)) { - $redirect_url .= '/' . $page; + + // Found in an older version — redirect rather than serve cross-version. + if ($try_version !== $version) { + return redirect()->to( + '/' . $locale . '/' . str_replace('_', '.', $try_version) . $current_url + ); } - return redirect()->to($redirect_url); + + $sidebar_view = $locale . '.' . $version . '.sidebar'; + + return view('wiki.page', [ + 'content' => $this->wikiPage->get($locale, $version, $dir, $page), + 'page_title' => $this->wikiPage->title($locale, $version, $dir, $page), + 'sidebar_content' => view()->exists($sidebar_view) ? view($sidebar_view) : null, + ]); } - // Check if the requested page exists, if not redirect to home + return redirect()->to('/' . $locale . '/' . str_replace('_', '.', $default_version)); + } + + /** + * Serve a page from a Blade template. + * Used for versions <= 1.6. + * Falls back only within the blade version pool. + */ + protected function serveBlade($locale, $version, $dir, $page, $current_url, $versions, $default_version) + { + // Build the dot-notation view name from URL segments. if (empty($dir) && empty($page)) { $requested_view = '.root'; - $current_url = '/'; } elseif (empty($page)) { $requested_view = '.' . str_replace('-', '_', $dir); - $current_url = '/' . $dir; } else { $requested_view = '.' . str_replace('-', '_', $dir) . '.' . str_replace('-', '_', $page); - $current_url = '/' . $dir . '/' . $page; } $requested_page = $locale . '.' . $version . $requested_view; - // Check if the view exists - if (!view()->exists($requested_page)) { - - // Check if the page exists for an older version - $reverse_versions = array_reverse($versions); + if (! view()->exists($requested_page)) { + // Fall back through older blade-only versions (newest first). + $blade_versions = array_values(array_filter($versions, function ($v) { + return ! $this->usesMarkdown($v); + })); - foreach($reverse_versions as $old_version) { - $requested_page = $locale . '.' . $old_version . $requested_view; + foreach (array_reverse($blade_versions) as $old_version) { + $candidate = $locale . '.' . $old_version . $requested_view; - if (view()->exists($requested_page)) { - // View found, redirect to the page - return redirect()->to('/' . $locale . '/' . str_replace('_', '.', $old_version) . $current_url); + if (view()->exists($candidate)) { + return redirect()->to( + '/' . $locale . '/' . str_replace('_', '.', $old_version) . $current_url + ); } - - $requested_page = ''; - continue; } + return redirect()->to('/' . $locale . '/' . str_replace('_', '.', $default_version)); } - // Load the page if found - if ($requested_page) { - $sidebar_content_view = $locale . '.' . $version . '.sidebar'; - - view()->share([ - 'current_dir' => $dir, - 'current_page' => $page, - 'current_url' => $current_url, - 'current_version' => str_replace('_', '.', $version), - ]); + $sidebar_view = $locale . '.' . $version . '.sidebar'; - return view($requested_page)->with([ - 'sidebar_content' => view($sidebar_content_view), - ]); - } + return view($requested_page)->with([ + 'sidebar_content' => view($sidebar_view), + ]); + } - // Load the default page - return redirect()->to('/' . $locale . '/' . str_replace('_', '.', $default_version)); + /** + * Versions >= 1.7 are served from Markdown files in docs/. + * Versions <= 1.6 are served from Blade templates in wiki/. + */ + protected function usesMarkdown(string $version): bool + { + return version_compare(str_replace('_', '.', $version), '1.7', '>='); } public function getTestPage() { - return "TEST"; + return 'TEST'; } } diff --git a/app/Markdown/GithubFlavoredMarkdownConverter.php b/app/Markdown/GithubFlavoredMarkdownConverter.php new file mode 100644 index 0000000..2e869d5 --- /dev/null +++ b/app/Markdown/GithubFlavoredMarkdownConverter.php @@ -0,0 +1,24 @@ + 'allow', + 'allow_unsafe_links' => false, + ]); + + $environment->addExtension(new CommonMarkCoreExtension()); + $environment->addExtension(new GithubFlavoredMarkdownExtension()); + + return (string) (new MarkdownConverter($environment))->convert($markdown); + } +} diff --git a/app/WikiPage.php b/app/WikiPage.php new file mode 100644 index 0000000..0fc754e --- /dev/null +++ b/app/WikiPage.php @@ -0,0 +1,108 @@ +files = $files; + $this->cache = $cache; + } + + /** + * Return the rendered HTML for a wiki page, or null if the markdown file + * does not exist. + * + * @param string $locale e.g. 'en' + * @param string $version internal underscore format, e.g. '1_6' + * @param string $dir e.g. 'getting-started' + * @param string $page e.g. 'requirements' + * @return string|null + */ + public function get(string $locale, string $version, string $dir = '', string $page = ''): ?string + { + $key = 'wiki.' . implode('.', array_filter([$locale, $version, $dir, $page])); + + return $this->cache->remember($key, 5, function () use ($locale, $version, $dir, $page) { + $path = $this->resolvePath($locale, $version, $dir, $page); + + if (! $this->files->exists($path)) { + return null; + } + + return (new GithubFlavoredMarkdownConverter())->convert( + $this->files->get($path) + ); + }); + } + + /** + * Return whether a markdown file exists for the given page. + */ + public function exists(string $locale, string $version, string $dir = '', string $page = ''): bool + { + return $this->files->exists($this->resolvePath($locale, $version, $dir, $page)); + } + + /** + * Extract the page title from the first # heading in the markdown source. + */ + public function title(string $locale, string $version, string $dir = '', string $page = ''): string + { + $key = 'wiki.' . implode('.', array_filter([$locale, $version, $dir, $page])) . '.title'; + + return $this->cache->remember($key, 5, function () use ($locale, $version, $dir, $page) { + $path = $this->resolvePath($locale, $version, $dir, $page); + + if (! $this->files->exists($path)) { + return ''; + } + + preg_match('/^# (.+)$/m', $this->files->get($path), $matches); + + return $matches[1] ?? ''; + }); + } + + /** + * Build the filesystem path for a markdown file. + * + * Internal underscore version (1_6) is converted to dot format (1.6) to + * match the docs/ directory structure. + * + * Examples: + * en, 1_6, '', '' → docs/en/1.6/index.md + * en, 1_6, 'getting-started', '' → docs/en/1.6/getting-started/index.md + * en, 1_6, 'getting-started', 'requirements' → docs/en/1.6/getting-started/requirements.md + */ + protected function resolvePath(string $locale, string $version, string $dir, string $page): string + { + $versionDir = str_replace('_', '.', $version); + $base = base_path("docs/{$locale}/{$versionDir}"); + + if (empty($dir) && empty($page)) { + return "{$base}/index.md"; + } + + if (empty($page)) { + return "{$base}/{$dir}/index.md"; + } + + return "{$base}/{$dir}/{$page}.md"; + } +} diff --git a/composer.json b/composer.json index 6c1e810..7b7f890 100644 --- a/composer.json +++ b/composer.json @@ -5,8 +5,9 @@ "license": "MIT", "type": "project", "require": { - "php": ">=7.0.0", + "php": ">=7.4.0", "laravel/framework": "5.3.*", + "league/commonmark": "^2.4", "predis/predis": "^1.1" }, "require-dev": { diff --git a/config/app.php b/config/app.php index 3f1e926..aceabfa 100644 --- a/config/app.php +++ b/config/app.php @@ -99,7 +99,7 @@ |-------------------------------------------------------------------------- */ - 'version' => '1_6', + 'version' => '1_7', /* |-------------------------------------------------------------------------- @@ -110,7 +110,8 @@ 'versions' => array( '1_0', '1_5', - '1_6' + '1_6', + '1_7', ), /* diff --git a/convert_wiki.py b/convert_wiki.py new file mode 100644 index 0000000..e87a679 --- /dev/null +++ b/convert_wiki.py @@ -0,0 +1,269 @@ +#!/usr/bin/env python3 +"""Convert wiki/en/1_6 blade.php files to Markdown files in docs/en/1.6/.""" + +import os +import re +import sys +from pathlib import Path + +try: + from markdownify import markdownify as md +except ImportError: + print("Please install markdownify: pip install markdownify") + sys.exit(1) + +REPO_ROOT = Path(__file__).parent +SRC_DIR = REPO_ROOT / "wiki" / "en" / "1_6" +OUT_DIR = REPO_ROOT / "docs" / "en" / "1.6" + +# Blade source file → output markdown path (relative to OUT_DIR) +FILE_MAP = { + "root.blade.php": "index.md", + "getting_started.blade.php": "getting-started/index.md", + "modules.blade.php": "modules/index.md", + "settings.blade.php": "settings/index.md", + "system.blade.php": "system/index.md", + "templates.blade.php": "templates/index.md", + "general/about.blade.php": "general/about.md", + "general/changelog.blade.php": "general/changelog.md", + "general/faq.blade.php": "general/faq.md", + "general/license.blade.php": "general/license.md", + "getting_started/installation.blade.php": "getting-started/installation.md", + "getting_started/quickstart.blade.php": "getting-started/quickstart.md", + "getting_started/requirements.blade.php": "getting-started/requirements.md", + "getting_started/updating_ip.blade.php": "getting-started/updating-ip.md", + "help/setup_cron.blade.php": "help/setup-cron.md", + "modules/clients.blade.php": "modules/clients.md", + "modules/invoices.blade.php": "modules/invoices.md", + "modules/payments.blade.php": "modules/payments.md", + "modules/quotes.blade.php": "modules/quotes.md", + "modules/recurring_invoices.blade.php": "modules/recurring-invoices.md", + "modules/tasks_projects.blade.php": "modules/tasks-projects.md", + "settings/custom_fields.blade.php": "settings/custom-fields.md", + "settings/email.blade.php": "settings/email.md", + "settings/email_templates.blade.php": "settings/email-templates.md", + "settings/general.blade.php": "settings/general.md", + "settings/invoice_groups.blade.php": "settings/invoice-groups.md", + "settings/invoices.blade.php": "settings/invoices.md", + "settings/online_payments.blade.php": "settings/online-payments.md", + "settings/payment_methods.blade.php": "settings/payment-methods.md", + "settings/quotes.blade.php": "settings/quotes.md", + "settings/taxes.blade.php": "settings/taxes.md", + "settings/taxrates.blade.php": "settings/taxrates.md", + "settings/updatecheck.blade.php": "settings/updatecheck.md", + "settings/user_accounts.blade.php": "settings/user-accounts.md", + "system/importing_data.blade.php": "system/importing-data.md", + "system/translation_localization.blade.php": "system/translation-localization.md", + "system/upgrade_from_fusioninvoice.blade.php": "system/upgrade-from-fusioninvoice.md", + "templates/customize_templates.blade.php": "templates/customize-templates.md", + "templates/using_templates.blade.php": "templates/using-templates.md", +} + + +def extract_title(content: str) -> str: + m = re.search(r"@section\('title'\)\s*(.*?)\s*@endsection", content, re.DOTALL) + if m: + return m.group(1).strip() + return "" + + +def extract_body(content: str) -> str: + m = re.search(r"@section\('content'\)(.*?)@stop", content, re.DOTALL) + if m: + return m.group(1).strip() + return "" + + +def demote_headings(html: str) -> str: + """Shift h3→h2, h4→h3, h5→h4 in a single pass (h2.page-title already stripped).""" + def _open(m): + lvl = int(m.group(1)) + return f'' + + html = re.sub(r'])', _open, html, flags=re.IGNORECASE) + html = re.sub(r'', _close, html, flags=re.IGNORECASE) + return html + + +def preprocess(html: str) -> str: + # Remove PHP comment blocks + html = re.sub(r"<\?php\s*//[^\?]*\?>", "", html) + + # Remove IP::headlineLink calls (PHP echo) + html = re.sub(r"<\?=\s*IP::headlineLink\([^)]+\);\s*\?>", "", html) + + # Remove PHP trans() calls + html = re.sub(r"<\?php\s+echo\s+trans\([^)]+\)\s+\?>", "", html) + + # Remove entire PHP blocks (article_pagination arrays, etc.) + html = re.sub(r"<\?php\b.*?\?>", "", html, flags=re.DOTALL) + + # Convert Blade url() helper to plain URL + html = re.sub(r"\{\{\s*url\('([^']+)'\)\s*\}\}", r"/\1", html) + + # Convert Blade date() helpers to placeholders + html = re.sub(r"\{\{\s*date\('Y'\)\s*\}\}", "YYYY", html) + html = re.sub(r"\{\{\s*date\('m'\)\s*\}\}", "MM", html) + html = re.sub(r"\{\{\s*date\('d'\)\s*\}\}", "DD", html) + + # Protocol-relative image/link URLs → https + html = re.sub(r'(src|href)="//invoiceplane\.com/', r'\1="https://invoiceplane.com/', html) + html = re.sub(r'href="//invoiceplane\.com/', 'href="https://invoiceplane.com/', html) + + # Unwrap lightbox/thumbnail link wrappers (keep alt text from inner img) + # These are + # markdownify will handle them fine as image links + + # Remove h1 elements that are purely logo/image containers (e.g. root page logo) + html = re.sub(r']*>\s*(?:]*/?>|]*>.*?|\s)*', '', html, flags=re.DOTALL) + + # Remove Font Awesome icon spans/elements (they don't render in markdown) + html = re.sub(r']*>', "", html) + html = re.sub(r']*>', "", html) + html = re.sub(r']*>.*?', "", html, flags=re.DOTALL) + + # Convert alert divs to simpler HTML that markdownify can handle + html = re.sub( + r']*>(.*?)', + r'
Warning:\1
', + html, flags=re.DOTALL + ) + html = re.sub( + r']*>(.*?)', + r'
Note:\1
', + html, flags=re.DOTALL + ) + html = re.sub( + r']*>(.*?)', + r'
Danger:\1
', + html, flags=re.DOTALL + ) + html = re.sub( + r']*>(.*?)', + r'
Info:\1
', + html, flags=re.DOTALL + ) + + # Unwrap card containers (FAQ cards etc.) — just keep inner content + html = re.sub(r']+class="[^"]*card-header[^"]*"[^>]*>', '

', html) + html = re.sub(r']+class="[^"]*card-block[^"]*"[^>]*>', '
', html) + html = re.sub(r']+class="[^"]*card-body[^"]*"[^>]*>', '
', html) + html = re.sub(r']+class="[^"]*card[^"]*"[^>]*>', '
', html) + + # Unwrap table-responsive divs + html = re.sub(r']+class="table-responsive"[^>]*>', '
', html) + + # Unwrap feature grid divs (about page) + html = re.sub(r']+class="[^"]*col[^"]*"[^>]*>', '
', html) + html = re.sub(r']+class="[^"]*row[^"]*"[^>]*>', '
', html) + html = re.sub(r']+class="[^"]*jumbotron[^"]*"[^>]*>', '
', html) + html = re.sub(r']+class="[^"]*changelog[^"]*"[^>]*>', '
', html) + + # Remove remaining class/style/data attributes from divs to clean up + html = re.sub(r']+>', '
', html) + + # Remove id attributes from headings (markdownify will handle plain headings) + html = re.sub(r'(]+class="[^"]*(?:status|text)[^"]*"[^>]*>(.*?)', r'\1', html, flags=re.DOTALL) + html = re.sub(r']*>', '', html) + html = re.sub(r'', '', html) + + # Remove small tags (keep content) + html = re.sub(r'(.*?)', r'\1', html, flags=re.DOTALL) + + # Fix broken HTML attribute in about page + html = html.replace('target?"_blank"', 'target="_blank"') + + # Strip target="_blank" attributes (not relevant in markdown) + html = re.sub(r'\s+target="_blank"', '', html) + html = re.sub(r'\s+class="ext"', '', html) + html = re.sub(r'\s+class="thumbnail"', '', html) + html = re.sub(r'\s+data-lightbox="[^"]*"', '', html) + html = re.sub(r'\s+rel="lightbox"', '', html) + + # Handle that are inside - keep the link but add meaningful alt + # markdownify handles this natively + + # Strip the h2.page-title element — the title is prepended separately. + # If a page-title h2 is present, also demote other headings (h3→h2, h4→h3, h5→h4) + # so sections end up at ##. Root page has no page-title h2, so no demotion needed. + has_page_title = bool(re.search(r']+class="page-title"[^>]*>', html)) + html = re.sub(r']+class="page-title"[^>]*>.*?

', '', html, flags=re.DOTALL) + if has_page_title: + html = demote_headings(html) + + # Remove inline styles + html = re.sub(r'\s+style="[^"]*"', '', html) + + return html + + +def blade_to_markdown(src_path: Path) -> str: + content = src_path.read_text(encoding="utf-8") + + title = extract_title(content) + body_html = extract_body(content) + + if not body_html: + return f"# {title}\n" + + body_html = preprocess(body_html) + + markdown = md( + body_html, + heading_style="ATX", + bullets="-", + code_language="", + strip=["script", "style"], + ) + + # Prepend the page title as h1 + if title: + markdown = f"# {title}\n\n" + markdown + + # Collapse 3+ consecutive blank lines to 2 + markdown = re.sub(r'\n{3,}', '\n\n', markdown) + + # Strip leading/trailing whitespace per line (but preserve code blocks) + lines = markdown.split('\n') + cleaned = [] + in_code = False + for line in lines: + if line.startswith('```'): + in_code = not in_code + if not in_code: + cleaned.append(line.rstrip()) + else: + cleaned.append(line) + markdown = '\n'.join(cleaned) + + return markdown.strip() + '\n' + + +def main(): + created = [] + for src_rel, out_rel in FILE_MAP.items(): + src_path = SRC_DIR / src_rel + out_path = OUT_DIR / out_rel + + if not src_path.exists(): + print(f" SKIP (not found): {src_rel}") + continue + + out_path.parent.mkdir(parents=True, exist_ok=True) + markdown = blade_to_markdown(src_path) + out_path.write_text(markdown, encoding="utf-8") + created.append(out_rel) + print(f" OK: {src_rel} → {out_rel}") + + print(f"\nConverted {len(created)} files to {OUT_DIR}") + + +if __name__ == "__main__": + main() diff --git a/docs/en/1.6/general/about.md b/docs/en/1.6/general/about.md new file mode 100644 index 0000000..db29ef2 --- /dev/null +++ b/docs/en/1.6/general/about.md @@ -0,0 +1,38 @@ +# About InvoicePlane + +![Preview for InvoicePlane](https://invoiceplane.com/assets/img/preview.jpg) + +InvoicePlane is a self-hosted open source application for managing your quotes, invoices, clients, tasks and +payments. +Downloaded more than 100 000 times from 196 countries. + +## Quotes, Invoices, Payments + +InvoicePlane is a solid app to manage your complete billing circle: from quotes over invoices to +payments. + +## Manage your Clients + +The application provides CRM-like management for your clients. Enter contact details, notes or +add custom fields to add any information you want. + +## Customize InvoicePlane + +You can customize InvoicePlane to make sure it fits your needs: amount format, languages, email +and PDF templates and many more. + +## One-Click Online Payments + +Let your clients pay the invoices by using Stripe (other payment providers to come, please open an issue on [GitHub](https://github.com/InvoicePlane/InvoicePlane/issues) if you are missing a provider). + +## Multilanguage Interface + +InvoicePlane is fully translated into 23 languages by community members and more languages are +coming soon. + +## Projects and Tasks + +Create projects for different clients, add some task and you can reference them directly inside +invoices. + +[Learn more on InvoicePlane.com](https://invoiceplane.com/) diff --git a/docs/en/1.6/general/changelog.md b/docs/en/1.6/general/changelog.md new file mode 100644 index 0000000..ec638c7 --- /dev/null +++ b/docs/en/1.6/general/changelog.md @@ -0,0 +1,121 @@ +# Changelog + +## v1.6.4 — 2025-01-19 + +### Added +- PayPal Advanced Credit Cards and Venmo are now available as payment methods. See [Online Payments](/en/1.6/settings/online-payments). +- Open invoices are now visible to guest users on their index page. +- Invoice and quote templates now support named footers. +- A default ordering option has been added for [Recurring Invoices](/en/1.6/modules/recurring-invoices). + +### Changed +- QR code image width reduced to 100 px for better display proportions. +- Email address fields now accept comma-separated and semicolon-separated lists. See [Email Settings](/en/1.6/settings/email). +- `$show_item_discounts` is now available in the `InvoicePlane_Web.php` public template. + +### Fixed +- Multiple email address sending no longer produces errors. +- File access validation added across controllers to prevent unauthorised file access through direct URL manipulation. +- Version checking and logging added for e-invoicing client fields. +- Format_number function prevented from returning non-numeric values. +- Quote/invoice guest download attachment button corrected. +- Alpine Docker image compatibility resolved. + +--- + +## v1.6.3 — 2024-08-05 + +### Added +- "Invoices per client" report. See [Reports](/en/1.6/modules/index). +- Pagination added to the invoice and quote template lists in Settings. +- E-invoicing infrastructure updates: legacy calculation setup step added, client overview now reflects e-invoicing state correctly. +- Custom fields integrated into Settings controllers. + +### Changed +- `node-sass` replaced with `sass` for improved build compatibility. +- Invoice and quote sorting now prioritises date over ID. +- European number formats (decimal comma) now handled correctly across the application. + +### Fixed +- PDF download filename handling in invoices. +- Full-page loader spinner visibility. +- QR code rendering conditions for invoice balances. +- Client summary deletion button navigation. +- SMTP password now re-encrypted correctly after saving settings. See [Email Settings](/en/1.6/settings/email). +- Email template rendering compatibility with PHP 8.2. +- Email templates now work correctly with custom single-choice fields. +- Various table and client view styling inconsistencies. + +--- + +## v1.6.2 — 2022-12-30 + +### Added +- Pagination for tabs in the client detail view. See [Clients](/en/1.6/modules/clients). +- Copy functionality extended to quote fields. +- Additional digit support for quantity entries in line items. +- PHP 8.2 dynamic property support. +- Docker publishing workflow. + +### Fixed +- Payment form no longer allows amounts exceeding the invoice total. +- QR code variable errors resolved. +- File download function corrected. +- Database query issue during setup resolved. +- Broken client link in the projects dashboard widget. +- Database migration issues and setup configuration problems. + +--- + +## v1.6.1 — 2022-12-16 + +### Added +- Payment QR codes available in both web and PDF templates. See [Using Templates](/en/1.6/templates/using-templates). +- Keyboard shortcut Ctrl+S to save forms. +- Product fields are now available in quote templates. See [Quotes](/en/1.6/modules/quotes). +- Encryption key is now generated automatically during installation. + +### Fixed +- Logo display in PDF generation was broken in v1.6.0 — now restored. +- Stripe loading corrected for installations not using clean URLs. +- Email template variable insertion bug resolved. See [Email Templates](/en/1.6/settings/email-templates). +- Required fields validation improvements. +- Session handling improvements for mobile environments. +- Client search now trims whitespace before searching. + +--- + +## v1.6.0 — 2022-12-04 + +First release of the 1.6 series. The primary goal of this release was compatibility with PHP 8 and MySQL 8, which the previous 1.5 series did not support. + +### Added +- PHP 8.0 and 8.1 compatibility. See [Requirements](/en/1.6/getting-started/requirements). +- Responsive layout for invoices and quotes. +- `SECURITY.md` added to the repository. + +### Changed +- Online payments: only Stripe is supported in this release. PayPal and other gateways from 1.5 are not available. See [Online Payments](/en/1.6/settings/online-payments). + +### Fixed +- Discount handling for recurring invoices — discounts were being dropped. See [Recurring Invoices](/en/1.6/modules/recurring-invoices). +- Payment method select display. +- Client surname display in recurring invoices. +- PDF template selection for guest users. +- ZUGFeRD PDF generation: client name is now correctly escaped. +- Minor display issues in the quotes item list. + +--- + +## v1.5.11 — 2019-04-17 + +Final release of the 1.5 series. + +- PHP 7.4 support added. +- Performance improvements. +- Several security fixes. + +Upgrading from 1.5.11 to 1.6 requires running the setup wizard to apply database migrations. See [Updating InvoicePlane](/en/1.6/getting-started/updating-ip). + +> **Note:** +> Changelogs for versions prior to 1.5.11 are in the relevant older version sections of this wiki. diff --git a/docs/en/1.6/general/faq.md b/docs/en/1.6/general/faq.md new file mode 100644 index 0000000..6e9c367 --- /dev/null +++ b/docs/en/1.6/general/faq.md @@ -0,0 +1,107 @@ +# FAQ - Frequently Asked Questions + +## General + +### Can I sell / redistribute InvoicePlane? + +InvoicePlane is a free software and it will never be a commercial product! We +appeal everyone to respect the open source InvoicePlane project and our work and refrain from +selling the application as their own product! +What you can do: offer paid professional support or hosting for InvoicePlane. + +However InvoicePlane is an open source software released under [MIT license](http://choosealicense.com/licenses/mit/). This means that you can use +the code *but* the InvoicePlane name and the logo are copyright by Invoiceplane.com and +Kovah.de +This means you **have to** use another name and logo for the product and include the original InvoicePlane license in the code. + +For more information about licensing please visit the [InvoicePlane website](https://invoiceplane.com/license-copyright). + +## Errors + +### You have problems and need help? Use the debug mode. + +You have a problem with some errors, you are stuck and need help? We would like to help you but first +we need some help from you: error logs. + +1. Enable the debug mode by replacing `ENABLE_DEBUG=false` with + `ENABLE_DEBUG=true` in the `/ipconfig.php` file. +2. Try again what caused the error, e.g. creating a new invoice which does not work. +3. Get the log files: + - Open the folder `/application/logs/`, open the log file with the current date + and copy the whole content. + - Take a look at your web server error logs. + - Open the console of your browser ([tutorial](http://webmasters.stackexchange.com/a/77337/20720)), the + error may be logged there. +4. Save the content of the log files and the output of the browser console to [Paste.InvoicePlane.com](https://paste.invoiceplane.com/) and post this link + with a detailed description to the [Community + Forums](https://community.invoiceplane.com). + You will get further help there. + +### I copied InvoicePlane to my webserver but I get blank pages or an error 404 or 500 + +Please make sure you copied the .htaccess file (hidden file on Unix systems) and you installed and +enabled mod\_rewrite for Apache. + +If you want to install InvoicePlane in a sub-directory like `yourdomain.com/invoices/` +please follow the instructions for the [installation in a +subdirectory](/en/1.5/getting-started/installation#subdir). + +### There is a large spinning cog () after I clicked a button and now nothing happens + +This problem occurs if the application is stuck because of an error. Please follow the instructions +for the [debug mode](#debugmode) + +### I can't add more than 3 or 4 items to quotes or invoices + +This problem may occurs because of a configuration of your nginx webserver. The server error should +look like this: + +``` +upstream sent too big header while reading response header from upstream +``` + +To solve this problem you should try to add / update your nginx configuration with the following +settings: + +``` +proxy_buffer_size 128k; +proxy_buffers 4 256k; +proxy_busy_buffers_size 256k; +``` + +or + +``` +fastcgi_buffer_size 128k; +fastcgi_buffers 4 256k; +fastcgi_busy_buffers_size 256k; +``` + +Please check [this comment](http://stackoverflow.com/a/27551259/1203515) for +more details. + +## Settings + +### Where can I set the default invoice / quote groups? + +You can set the default invoice / quote groups at `System settings > Invoices > Default Invoice +Group` for invoices and `System settings > Quotes > Default Quote Group` for +quotes. + +## Customization + +### How can I customize the templates? + +You can find all templates in the following directories: + +**Invoices** + +`/application/views/invoice_templates/` + +**Quotes** + +`/application/views/quote_templates/` + +The templates are using basic HTML, CSS and PHP. If you just want to change the styling you just need +some knowledge of HTML and CSS. +If you want to include Custom Fields into the templates please refer to the [Custom Fields page](/en/1.5/settings/custom-fields#add-to-template). diff --git a/docs/en/1.6/general/license.md b/docs/en/1.6/general/license.md new file mode 100644 index 0000000..e43e259 --- /dev/null +++ b/docs/en/1.6/general/license.md @@ -0,0 +1,113 @@ +# License for InvoicePlane + +## Copyright + +The name 'InvoicePlane' and the InvoicePlane logo are original copyright +of InvoicePlane.com / Kovah.de and the following restrictions apply to +both of them: + +**You are allowed to:** + +- use the name 'InvoicePlane' or the InvoicePlane logo in any context directly + related to the application or the project. This includes the application itself, + local communities and news or blog posts about InvoicePlane or +- use the name 'InvoicePlane' or the InvoicePlane logo to provide professional support or hosting for the InvoicePlane application. + +**You are not allowed to:** + +- use the name 'InvoicePlane' or the InvoicePlane logo in any context that is **not** related to the project, +- alter the name 'InvoicePlane' or the InvoicePlane logo in any way or +- sell or redistribute the application under the name 'InvoicePlane' and the InvoicePlane logo. + +--- + +## InvoicePlane Usage Permits + +- [Softaculous](http://www.softaculous.com/) is permitted to add InvoicePlane to their AutoInstaller. + +--- + +## License + +================================================== +License for InvoicePlane +================================================== +Copyright (c) 2012-2014 InvoicePlane.com + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +The name (InvoicePlane) and the logo can be used in any context related to +InvoicePlane as application or project but may not be changed / altered in +any way. The name and the logo are both original copyright by InvoicePlane.com +and Kovah.de + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +================================================== +License for CodeIgniter +================================================== +Copyright (c) 2008 - 2011, EllisLab, Inc. +All rights reserved. + +This license is a legal agreement between you and EllisLab Inc. for the use +of CodeIgniter Software (the "Software"). By obtaining the Software you +agree to comply with the terms and conditions of this license. + +PERMITTED USE +You are permitted to use, copy, modify, and distribute the Software and its +documentation, with or without modification, for any purpose, provided that +the following conditions are met: + +1. A copy of this license agreement must be included with the distribution. + +2. Redistributions of source code must retain the above copyright notice in +all source code files. + +3. Redistributions in binary form must reproduce the above copyright notice +in the documentation and/or other materials provided with the distribution. + +4. Any files that have been modified must carry notices stating the nature +of the change and the names of those who changed them. + +5. Products derived from the Software must include an acknowledgment that +they are derived from CodeIgniter in their documentation and/or other +materials provided with the distribution. + +6. Products derived from the Software may not be called "CodeIgniter", +nor may "CodeIgniter" appear in their name, without prior written +permission from EllisLab, Inc. + +INDEMNITY +You agree to indemnify and hold harmless the authors of the Software and +any contributors for any direct, indirect, incidental, or consequential +third-party claims, actions or suits, as well as any related expenses, +liabilities, damages, settlements or fees arising from your use or misuse +of the Software, or a violation of any terms of this license. + +DISCLAIMER OF WARRANTY +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR +IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF QUALITY, PERFORMANCE, +NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. + +LIMITATIONS OF LIABILITY +YOU ASSUME ALL RISK ASSOCIATED WITH THE INSTALLATION AND USE OF THE SOFTWARE. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS OF THE SOFTWARE BE LIABLE +FOR CLAIMS, DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION +WITH THE SOFTWARE. LICENSE HOLDERS ARE SOLELY RESPONSIBLE FOR DETERMINING THE +APPROPRIATENESS OF USE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE, INCLUDING +BUT NOT LIMITED TO THE RISKS OF PROGRAM ERRORS, DAMAGE TO EQUIPMENT, LOSS OF +DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS. diff --git a/docs/en/1.6/getting-started/index.md b/docs/en/1.6/getting-started/index.md new file mode 100644 index 0000000..3125f5f --- /dev/null +++ b/docs/en/1.6/getting-started/index.md @@ -0,0 +1,6 @@ +# Getting Started + +- [Requirements](/en/1.6/getting-started/requirements) +- [Installation](/en/1.6/getting-started/installation) +- [Quickstart (Tutorial)](/en/1.6/getting-started/quickstart) +- [Updating InvoicePlane](/en/1.6/getting-started/updating-ip) diff --git a/docs/en/1.6/getting-started/installation.md b/docs/en/1.6/getting-started/installation.md new file mode 100644 index 0000000..856bd5b --- /dev/null +++ b/docs/en/1.6/getting-started/installation.md @@ -0,0 +1,53 @@ +# Installation + +For those of you comfortable with installing web applications, installing InvoicePlane should take 5 minutes or +less. + +1. [Download](https://invoiceplane.com/downloads) and extract the archive. +2. Create an empty database on your web server. +3. Upload the files to your web server, either into a subdirectory or into the public root of the web server. +4. Make a copy of the `ipconfig.php.example` file and rename the copy to `ipconfig.php` +5. Open the `ipconfig.php` file and add your URL in it like described in the file. +6. Comment out the first line of the `ipconfig.php` file by adding a `#` at the beginning of the line as described at **pt. 2** [here](updating-ip#160-2-replace-files) +7. Run the InvoicePlane installer from your web browser and follow his instructions: `http://your-domain.com/index.php/setup` + +Once the installer finished, the installation is complete and you may log into InvoicePlane using the email +address and password you have chosen during the installation. + +## Run InvoicePlane in a sub directory + +If you want to run InvoicePlane in a sub directory (e.g. `http://yourdomain.com/invoices/`) you have +to modify the `.htaccess` file which is located in the root directory. You must add the line + +``` +RewriteBase /sub-directory +``` + +where `sub-directory` is the directory you want to use. The content of the file should look like this: + +``` +RewriteEngine on +RewriteBase /sub-directory +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule . index.php [L] +``` + +After that, open your `ipconfig.php` file and add the sub directory to your URL like this: + +``` +http://your-domain.com/sub-directory +``` + +Notice that there is **no** trailing slash. + +## Remove index.php from the URL + +Please notice that this step is entirely optional and does not affect the application in any way. + +1. Make sure that [mod\_rewrite](https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html) is enabled on your web + server. +2. Open the file `ipconfig.php` +3. Search for `REMOVE_INDEXPHP=false` in this file and replace it with + `REMOVE_INDEXPHP=true` +4. Rename the `htaccess` file to `.htaccess` diff --git a/docs/en/1.6/getting-started/quickstart.md b/docs/en/1.6/getting-started/quickstart.md new file mode 100644 index 0000000..9510110 --- /dev/null +++ b/docs/en/1.6/getting-started/quickstart.md @@ -0,0 +1,77 @@ +# Quickstart + +## Logging In + +If InvoicePlane was installed into the root of your web server: + +`http://www.your-domain.com` + +If InvoicePlane was installed into its own subdirectory of your web server: + +`http://www.your-domain.com/the-subdirectory` + +--- + +## Configure the Application + +Before you start with invoicing you should check the application settings on `http://www.your-domain.com/settings` +and set for example the currency, how the amounts should be formatted and so on. + +More information about available settings can be found on the [Settings](/en/1.6/modules/settings) +page. + +--- + +## Adding a Client + +Click `Clients` from the main menu at the top of the page and select `Add Client`. Fill in +as much information as needed and submit the form. + +More information about the client management can be found on the [Clients](/en/1.6/modules/clients) +page. + +--- + +## Adding Products + +If you have products which should appear on your invoices or quotes you can create them form the +`Products` menu. + +More information about products can be found on the [Products](/en/1.6/modules/products) +page. + +--- + +## Creating an Invoice + +Click `Invoices` from the main menu at the top of the page and select `Create Invoice`. +Start typing the client name into the `Client` box. If the client already exists in InvoicePlane, +select the client from the list which appears after you start typing. If the client does not already exist in +InvoicePlane, continue typing the client\'s name and that client will be added as a new record. +Then choose the invoice date and invoice group and submit the form. + +If you added some products before you can simply add them via the `Add Product` button left from the +`Save` button. If you want to enter some items manually you can use the empty row or +add new rows with the `Add new Row` button. + +### Send the invoice + +If viewing a list of invoices, click the `Options` button on the row of the invoice to send. If +viewing a single invoice, click the Options button near the top right of the page. Select `Send +Email` from the `Options` button, review the information and submit the form. The client +will receive an email with the invoice attached as a PDF. + +--- + +## Entering a Payment + +Offline payments are entered by clicking `Payments` from the main menu at the top of the page and +selecting `Enter Payment`. Fill in the appropriate information and submit the form to enter the +payment. + +Online payments allow a client to pay their invoice online. When an online payment occurs, the payment is +automatically entered back into InvoicePlane, eliminating the need to manually enter an offline payment. Online +payments require additional setup before they can be used. + +More information about payments can be found on the [Payments](/en/1.6/modules/payments) +page. diff --git a/docs/en/1.6/getting-started/requirements.md b/docs/en/1.6/getting-started/requirements.md new file mode 100644 index 0000000..685c75d --- /dev/null +++ b/docs/en/1.6/getting-started/requirements.md @@ -0,0 +1,28 @@ +# Requirements + +If you want to use InvoicePlane you have to follow these requirements to use the application. + +- A webserver / shared hosting with the following specifications: + - MySQL >= 5.5 or the equivalent version of MariaDB + - Apache >= 2.4 or Ngnix >= 1.20.0 + - PHP >= 8.0 and <= 8.1 + - The following PHP extensions must be installed and activated: + - php-bcmath + - php-dom + - php-gd + - php-hash + - php-json + - php-mbstring + - php-mcrypt + - php-mysqli + - php-openssl + - php-recode + - php-xml + - php-xmlrpc + - php-zlib +- An up-to-date web browser. We do recommend using either [Firefox](https://www.mozilla.org/en-US/firefox/new/), [Microsoft Edge](https://www.microsoft.com/en-us/edge), the latest version of + [Safari](https://www.apple.com/safari) or any of the other leading browsers around the internet. Please note that since Microsoft introduced [Microsoft Edge](https://www.microsoft.com/en-us/edge), Internet Explorer is not supported anymore. + +> **Warning:** +> Please notice that PHP < 8 is no longer supported and should **not** be used anymore for producton +> environments! (see [php version support](https://www.php.net/supported-versions.php) for more information) diff --git a/docs/en/1.6/getting-started/updating-ip.md b/docs/en/1.6/getting-started/updating-ip.md new file mode 100644 index 0000000..23bf966 --- /dev/null +++ b/docs/en/1.6/getting-started/updating-ip.md @@ -0,0 +1,83 @@ +# Update InvoicePlane + +## Contents + +- [Upgrade information](#general) +- [Breaking changes](#16-breaking-changes) +- [**Upgrade instructions (v1.6.2 to v1.6.3)**](#162-163-instructions) + 1. Preliminary operations + 2. Replace files & test +- [Upgrade instructions (v1.5.11 to v1.6.0)](#1511-16-instructions) + 1. Preliminary operations + 2. Replace files & test + +--- + +## Upgrade information + +#### Breaking changes (v1.6.0) + +InvoicePlane 1.6 is based (as its versions before) on CodeIgniter v3 which officially still does not support PHP >=8.0. The InvoicePlane Community updated InvoicePlane specific components to make InvoicePlane PHP >=8.0 compatible, but not all features could be successfully ported; we will continue to put our efforts into porting the features we could not port with this upgrade. The breaking changes are: + +- InvoicePlane 1.6.0 supports only Stripe as a payment gateway for online payments (please let us know what payment method you are missing at [GitHub](https://github.com/InvoicePlane/InvoicePlane/issues)). + +## Instructions to upgrade to 1.6.3 from 1.6.2 + +#### 1. Preliminary operations + +Follow the procedure outlined in [Upgrade 1.6.0 from 1.5.11](#160-1-preliminary-operations) + +#### 2. Replace files & test + +1. Copy all files to the root directory of your InvoicePlane installation but **do not** overwrite the + following files: + - The `ipconfig.php` file + - Customized templates in the `application/views/` folder + - The files for custom styles: `assets/core/css/custom.css` and `assets/core/css/custom-pdf.css` + - Uploaded images in the `uploads/` folder (e. g. your company logo) + - Custom language keys at `application/language/COUNTRY/custom_lang.php` + > **Note:** + > + > **Hint:** An *easy* way of performing this operation is to upload the whole new InvoicePlane version in a different folder, outside of your current installation root folder, and copy the above mentioned files in the new folder you just uploaded. Afterwards just rename your current folder to something like `my_current_folder_old` and rename your new-version-folder with the name of `my_current_folder`. +2. Open `http://yourdomain.com/index.php/setup` and follow the instructions. The app will run all + updates on its own. + - If you encounter any errors when upgrading the table, press "Try Again" to resolve those errors and continue with the setup. +3. Now that the update is installed, moved and protected, it's time to log in and see if everything is working: login again and check if everything is working. + +## Instructions to upgrade to 1.6.0 from 1.5.11 + +#### 1. Preliminary operations + +1. Make a backup of your database and all files. (This is **very important** to prevent any data loss) +2. Download the latest version from [InvoicePlane.com](https://invoiceplane.com/downloads). + +#### 2. Replace files & test + +1. Copy all files to the root directory of your InvoicePlane installation but **do not** overwrite the + following files: + - The `ipconfig.php` file + - Customized templates in the `application/views/` folder + - The files for custom styles: `assets/core/css/custom.css` and `assets/core/css/custom-pdf.css` + - Uploaded images in the `uploads/` folder (e. g. your company logo) + - Custom language keys at `application/language/COUNTRY/custom_lang.php` + > **Note:** + > + > **Hint:** An *easy* way of performing this operation is to upload the whole new InvoicePlane version in a different folder, outside of your current installation root folder, and copy the above mentioned files in the new folder you just uploaded. Afterwards just rename your current folder to something like `my_current_folder_old` and rename your new-version-folder with the name of `my_current_folder`. +2. Now that the files are placed, it's time to fix the `ipconfig.php` file. + + - open `ipconfig.php` and comment out the top line in the file by adding a `#` at the beginning of the first line. The result should be like this: + + ``` + # + ``` + - close the `ipconfig.php` file +3. #### Open `http://yourdomain.com/index.php/setup` and follow the instructions + + . The app will run all + updates on its own. + - If you encounter any errors when upgrading the table, press "Try Again" to resolve those errors and continue with the setup. +4. Now that the `ipconfig.php` file is fixed, moved and protected, it's time to log in and see if everything is working + - Login again and check if everything is working. + - If you were using the online payments module please navigate to `//your-domain.com/settings` and to the tab `online payment` and disable all payment methods that are not *stripe*. InvoicePlane 1.6 at the moment supports only Stripe as a payment gateway. + +> **Note:** diff --git a/docs/en/1.6/help/setup-cron.md b/docs/en/1.6/help/setup-cron.md new file mode 100644 index 0000000..92648f6 --- /dev/null +++ b/docs/en/1.6/help/setup-cron.md @@ -0,0 +1,43 @@ +# Help: Setup a Cron + +If you want to use [recurring invoices](/en/1.6/modules/recurring-invoices) you have to +setup a cron +that opens the URL listed on the recurring invoices page. A cron is basically a script that runs on predefined +times. You can setup a cron that runs every minute, every third hour per day or yearly. For recurring invoices +you should run the cron daily. + +There are two different ways on how to setup a cron: + +- use you own web server or +- use an online service that runs the cron for you. + +### Use your own Server + +As there are various different types of operating software for web servers (e.g. Ubuntu, CentOS, Windows Server +or even Mac OSX Server) there is not *one* tutorial on how to setup a cron. Because of this we listed +tutorials for the most used systems below and wrote an example for Unix-based operating systems. + +- [Ubuntu](https://help.ubuntu.com/community/CronHowto) +- [CentOS](https://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-autotasks.html) +- [Windows Server (2008)](http://www.myscienceisbetter.info/add-new-cron-job-on-windows-2008-server-using-task-scheduler.html) + +**Example for Unix-based systems** + +Open the crontab file with `crontab -e` and paste the following line: + +``` +0 0 * * * wget -O - https://yoursite.com/invoices/cron/recur/your-cron-key >/dev/null 2>&1 +``` + +where `yoursite.com` is the domain you use for InvoicePlane and `your-cron-key` the cron +key from your settings. + +### Use an Online Service + +There are a lot of online services that offer running a cron for you, for example +[cron-job.org](https://cron-job.org/en/), +[FastCron](https://www.fastcron.com/tutorials/invoiceplane-cron) +or any other. + +Please read the documentation of the service you use to know how to setup a cron with their +system. diff --git a/docs/en/1.6/index.md b/docs/en/1.6/index.md new file mode 100644 index 0000000..f75a38f --- /dev/null +++ b/docs/en/1.6/index.md @@ -0,0 +1,56 @@ +# InvoicePlane Wiki + +## Welcome to the InvoicePlane Wiki + +If you want to know how to use InvoicePlane or if you have any +questions take a look at this wiki. You should find a lot of useful information about the software and each +module. + +## About InvoicePlane + +- [What is InvoicePlane?](/en/1.6/general/about) +- [Changelog](/en/1.6/general/changelog) +- [License](/en/1.6/general/license) +- [FAQ](/en/1.6/general/faq) + +## Getting started + +- [Requirements](/en/1.6/getting-started/requirements) +- [Installation](/en/1.6/getting-started/installation) +- [Quickstart (Tutorial)](/en/1.6/getting-started/quickstart) +- [Updating InvoicePlane](/en/1.6/getting-started/updating-ip) + +## Modules + +- [Clients](/en/1.6/modules/clients) +- [Quotes](/en/1.6/modules/quotes) +- [Invoices](/en/1.6/modules/invoices) +- [Recurring Invoices](/en/1.6/modules/recurring-invoices) +- [Payments](/en/1.6/modules/payments) + +## Settings + +- [General Settings](/en/1.6/settings/general) +- [Invoice Settings](/en/1.6/settings/invoices) +- [Quotes Settings](/en/1.6/settings/quotes) +- [Tax Settings](/en/1.6/settings/taxes) +- [eMail Settings](/en/1.6/settings/email) +- [Online Payments](/en/1.6/settings/online-payments) +- [Updatecheck](/en/1.6/settings/updatecheck) +- [Custom Fields](/en/1.6/settings/custom-fields) +- [eMail Templates](/en/1.6/settings/email-templates) +- [Invoice Groups](/en/1.6/settings/invoice-groups) +- [Payment Methods](/en/1.6/settings/payment-methods) +- [Taxrates](/en/1.6/settings/taxrates) +- [User Accounts](/en/1.6/settings/user-accounts) + +## Templates + +- [Using Templates](/en/1.6/templates/using-templates) +- [Customize Templates](/en/1.6/templates/customize-templates) + +## System + +- [Translation / Localization](/en/1.6/system/translation-localization) +- [Importing Data](/en/1.6/system/importing-data) +- [Upgrade from FusionInvoice](/en/1.6/system/upgrade-from-fusioninvoice) diff --git a/docs/en/1.6/modules/clients.md b/docs/en/1.6/modules/clients.md new file mode 100644 index 0000000..c88767f --- /dev/null +++ b/docs/en/1.6/modules/clients.md @@ -0,0 +1,37 @@ +# Clients + +## View Clients + +To view the client list, click `Clients` from the main menu and select `View Clients`. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_clients.jpg)](https://invoiceplane.com/content/screenshots/web/ip_clients.jpg) + +By default, the client list will be filtered to active clients only. The filter can be set to either +`Active`, `Inactive` or `All` by choosing the filter from the submenu bar. +To navigate between pages, use the pager buttons located on the submenu bar. + +The `Options` button at the end of each row displays a menu with a number of items when clicked: + +- `View` - View the client +- `Edit` - Edit the client +- `Create Quote` - Create a quote for the client +- `Create Invoice` - Create an invoice for the client +- `Delete` - Delete the client + +## Add new Clients + +To add a new client, either choose `Clients` from the main menu and select `Add Client`, or +from the client list, click the `New` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_clients_add.jpg)](https://invoiceplane.com/content/screenshots/web/ip_clients_add.jpg) + +When adding a new client, the only field required is the `Client Name` field, although if you plan to +email invoices and quotes to your clients, the `Email Address` field should be filled in as well. Any +[custom fields](/en/1.6/settings/custom-fields) created for client records will display at the bottom +of the client form. + +## Client Logins + +Clients can be granted permission to log into InvoicePlane to view their quotes and invoices, approve or reject +quotes and pay their invoices. See the `Guest Account` section of the [User Accounts](/en/1.6/settings/user-accounts) page for instructions on creating logins for +your clients. diff --git a/docs/en/1.6/modules/index.md b/docs/en/1.6/modules/index.md new file mode 100644 index 0000000..daa55ea --- /dev/null +++ b/docs/en/1.6/modules/index.md @@ -0,0 +1,7 @@ +# Modules + +- [Clients](/en/1.6/modules/clients) +- [Invoices](/en/1.6/modules/quotes) +- [Invoices](/en/1.6/modules/invoices) +- [Recurring Invoices](/en/1.6/modules/recurring-invoices) +- [Payments](/en/1.6/modules/payments) diff --git a/docs/en/1.6/modules/invoices.md b/docs/en/1.6/modules/invoices.md new file mode 100644 index 0000000..d737dd8 --- /dev/null +++ b/docs/en/1.6/modules/invoices.md @@ -0,0 +1,157 @@ +# Invoices + +## The Invoice Lifecycle + +Invoice statuses follow the lifecycle of an invoice from draft to paid and allow you to keep track of where each +of your invoices are in their lifecycle. Each of the statuses listed below are automatically set for you when +specific activity occurs with an invoice, but you may also choose to manually change the status at any time +during the invoice lifecycle. + +- Draft + When an invoice is first created, it is placed in Draft status by default. Sending an invoice by email will + automatically change the status from Draft to Sent. Clients cannot view any invoices when they are in Draft + status. +- Sent + When InvoicePlane sends an invoice to a client by email, it will place the invoice in Sent status. This + occurs when using the Send Email function and it also occurs when a recurring invoice is automatically + emailed. Clients can view any of their invoices when they are in Sent status. +- Viewed + When a client views the invoice by either using the Guest URL to view the invoice or by using their Guest + Login account (if they have one), the invoice will be placed in Viewed status. This allows you to keep track + of which invoices a client has looked at. +- Paid + Once an online or offline payment has been made in full against an invoice, the invoice will be placed in + Paid status. +- Overdue + Any invoice with a due date prior to the current date will be visible as being overdue. Overdue invoices + appear in invoice lists with a red due date so they are easily seen. + +Besides this lifecycle an invoice can have two other statuses: + +- Read Only + An invoice will be set to read-only if the status was changed to paid. The invoice can't be edited anymore + but you can create a credit invoice if something went wrong or needs to be changed. +- Credit Invoice + A credit invoice can be created from an existing invoice and will make a duplicate of the invoice but with a + negative amount. This means by default that the balance of both invoices is zero. + +## Viewing Invoices + +To view the invoice list, click `Invoices` from the main menu and select `View Invoices`. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_invoices.jpg)](https://invoiceplane.com/content/screenshots/web/ip_invoices.jpg) + +By default, the invoice list will show all invoices. The filter can be set to `All`, `Draft`, `Sent`, `Viewed`, +`Paid` or `Overdue` by choosing the filter from +the submenu bar. +To navigate between pages, use the pager buttons located on the submenu bar. + +The `Options` button at the end of each row displays a menu with a number of items when clicked: + +- `Edit` - View the quote +- `Download PDF` - Download a copy of the quote as PDF +- `Send Email` - Send the quote to the client via email +- `Enter Payment` - Enter a payment for this invoice +- `Delete` - Delete the invoice\* + +\* This is only available for invoices with the draft status or if Invoice Deletion was enabled. + +## Creating an Invoice + +To create a new invoice, either choose `Invoices` from the main menu and select `Create +Invoice`, or from the invoice list, click the `New` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_invoices_add.jpg)](https://invoiceplane.com/content/screenshots/web/ip_invoices_add.jpg) + +When creating a invoice, start typing the name of the client to create the invoice for. If it\'s an existing +client, choose their name from the list that appears. If it's a new client, type their full name or business +name. Choose the date and invoice group and press the `Submit` button. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_invoices_edit.jpg)](https://invoiceplane.com/content/screenshots/web/ip_invoices_edit.jpg) + +The `Options` button near the top of the edit invoice page displays a menu with a number of items when +clicked: + +- `Add Invoice Tax` - Apply a tax to the entire invoice +- `Enter Payment` - Enter a payment for the invoice +- `Download PDF` - Download a copy of the invoice as PDF +- `Send Email` - Send the invoice to the client via email +- `Copy Invoice` - Create a copy of the invoice +- `Create Recurring` - Set the invoice to recurring +- `Delete` - Delete the invoice\* + +\* Invoice deletion is not available for all invoices. Please read the information for [invoice deletion](/en/1.6/modules/invoices#delete). + +### Add Products + +To add saved products, press the `Add Product` button. Choose the product you want to add and mark the +checkbox on the left, then press `Submit` to insert the products into the quote. +You can edit the quantity, prices or taxes for each product. When finished, press the `Save` button. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_add_product.jpg)](https://invoiceplane.com/content/screenshots/web/ip_add_product.jpg) + +### Changing Item Order + +The order in which an item appears on a quote or invoice can be changed by dragging the row to a new position +with the icon. + +### Discounts + +With the release of InvoicePlane 1.4.0 we introduced discounts for each quotes and invoices. There are two separate types of discounts which can by applied: + +- Item Discounts +- Invoice Discounts + +#### Item Discounts + +Item discounts can be added for each item itself as an amount that will be subtract from the item subtotal. Item discounts can only be added as an amount, not as an percentage. + +#### Invoice Discounts + +Invoice discounts can be added for the whole invoice directly above the invoice total. You can either choose to add a discount as an amount (e.g. 200 $) or as a percentage of the subtotal (e.g. 5%). + +### Adding Taxes + +To apply a tax against the entire invoice, choose `Add Invoice Tax` from the Options button. Choose +the appropriate tax rate and placement from the window that appears and press the `Submit` button. +That tax will be calculated against the invoice total. + +> **Warning:** +> Caution! Do not mix item and invoice taxes. Both tax methods were implemented for countries with different law structures and do not work together very well. If you use both tax method at the same time we can't promise that all calculations are executed correctly. +> +> Also, do **not** use item taxes to apply any service charges or similar extra charges. If you need to apply charges, add a new item or calculate the charges manually. + +### Copying an Invoice + +To copy an invoice, choose `Copy Invoice` from the `Options` menu. Change the client name, +if appropriate, and then select the invoice date and invoice group and press the `Submit` button. All items, taxes and amounts from the source invoice will be copied +to a new invoice. + +--- + +## Invoice Deletion + +By default InvoicePlane prevents the deletion of invoices because it's legally forbidden to delete invoices that +were sent to customers. We decided that it should be not possible to delete invoices that are beyond the `Draft` status. +But you can still enable invoice deletion even if it's not recommended. Open `/application/config/config.php` +and replace +`$config['enable_invoice_deletion'] = FALSE;` +with +`$config['enable_invoice_deletion'] = TRUE;` +To see the delete option in the pulldown, you also need to replace +`$config['disable_read_only'] = FALSE;` +with +`$config['disable_read_only'] = TRUE;` + + +Read only needs to be disabled, otherwise the options menu is not complete. + +## Read-only + +InvoicePlane will set invoices to read-only based on its status and the invoice can't be changed anymore. You can +change the status that will be used for the read-only mode in the settings. +If you don't want invoices to be set to read-only you can disable this feature. Open `/application/config/config.php` +and replace +`$config['disable_read_only'] = FALSE;` +with +`$config['disable_read_only'] = TRUE;` diff --git a/docs/en/1.6/modules/payments.md b/docs/en/1.6/modules/payments.md new file mode 100644 index 0000000..295d13c --- /dev/null +++ b/docs/en/1.6/modules/payments.md @@ -0,0 +1,45 @@ +# Payments + +## View Payments + +To view the payment list, click `Payments` from the main menu and select `View Payments`. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_payments.jpg)](https://invoiceplane.com/content/screenshots/web/ip_payments.jpg) + +To navigate between pages, use the pager buttons located on the submenu bar. + +## Entering a Payment + +To enter a payment, either choose `Payments` from the main menu and select `Enter Payment`, +or from the payment list, click the `New` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_payments_form.jpg)](https://invoiceplane.com/content/screenshots/web/ip_payments_form.jpg) + +When entering a payment, first select the invoice to enter the payment for. This will default the invoice amount +into the Amount field. Adjust the date and amount, if necessary, and optionally select the payment method and +enter any pertinent notes and press the `Save` button near the top right of the page. + +## Online Payments + +InvoicePlane can be configured to allow clients to make payments online. The only payment gateway currently +tested with InvoicePlane is Stripe. + +### Configure Stripe for Online Payments + +To configure InvoicePlane integration with Stripe, you must first have a valid Stripe API Secret Key. If you +don't, follow [these +instructions](https://stripe.com/docs/keys#create-api-secret-key) first to obtain the credentials. + +Once you have your API credentials, perform the following in InvoicePlane: + +1. Click the `Settings` icon and choose the `System Settings` entry. +2. Click the `online payment` tab. +3. Set `Enable Online Payments` to `Yes`. +4. Choose `Stripe` as a merchant driver (only one available in InvoicePlane 1.6). +5. Enter the Secret Key and the Publishable Key obtained from Stripe. +6. Select the appropriate currency code. +7. Press the `Save` button. + +Once configured, send your client the `Guest URL` (found at the bottom of the Invoice Edit screen) and +they will be able to pay their invoice from the link. Optionally, you can also create a Guest User account in +which the client can log into and view and pay their invoices. diff --git a/docs/en/1.6/modules/quotes.md b/docs/en/1.6/modules/quotes.md new file mode 100644 index 0000000..b4364cd --- /dev/null +++ b/docs/en/1.6/modules/quotes.md @@ -0,0 +1,124 @@ +# Quotes + +## The Quote Lifecycle + +Quote statuses follow the lifecycle of a quote from draft to approved and allow you to keep track of where each +of your quotes are in their lifecycle. Each of the statuses listed below are automatically set for you when +specific activity occurs with a quote but you may also choose to manually change the status at any time during +the quote lifecycle. + +- Draft + When a quote is first created, it is placed in Draft status by default. Sending a quote by email will + automatically change the status from Draft to Sent. Clients cannot view any quotes when they are in Draft + status. +- Sent + When InvoicePlane sends a quote to a client by email the status will be changed to Sent. +- Viewed + When a client views the quote by either using the Guest URL to view quote or by using their Guest Login + account (if they have one), the quote will be placed in Viewed status. This allows you to keep track of + which quotes a client has looked at. +- Approved + When a client uses the guest URL to view a quote or logs in using a guest account and views a quote, they + are able to either approve or reject the quote. When a client approves a quote, the status is changed to + Approved. +- Rejected + When a client uses the guest URL to view a quote or logs in using a guest account and views a quote, they + are able to either approve or reject the quote. When a client rejects a quote, the status is changed to + Rejected. +- Canceled + This status can be used for quotes that are not going to make it to the invoicing stage but need to be kept + for reference purposes. Clients are not able to see quotes in this status. + +## Viewing Quotes + +To view the quote list, click `Quotes` from the main menu and select `View Quotes`. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_quotes.jpg)](https://invoiceplane.com/content/screenshots/web/ip_quotes.jpg) + +By default, the quote list will be filtered to all quotes. The filter can be set to `All`, `Draft`, `Sent`, `Viewed`, +`Approved`, `Rejected` or `Canceled` by choosing the filter from the submenu bar. +To navigate between pages, use the pager buttons located on the submenu bar. + +The `Options` button at the end of each row displays a menu with a number of items when clicked: + +- `Edit` - View the quote +- `Download PDF` - Download a copy of the quote as PDF +- `Send Email` - Send the quote to the client via email +- `Delete` - Delete the quote + +## Creating a Quote + +To create a new quote, either choose `Quotes` from the main menu and select `Create Quote`, +or from the quote list, click the `New` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_quotes_add.jpg)](https://invoiceplane.com/content/screenshots/web/ip_quotes_add.jpg) + +When creating a quote, start typing the name of the client to create the quote for. If it's an existing client, +choose their name from the list that appears. If it's a new client, type their full name or business name. +Choose the date and invoice group and submit the form. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_quotes_edit.jpg)](https://invoiceplane.com/content/screenshots/web/ip_quotes_edit.jpg) + +The `Options` button near the top of the edit quotes page displays a menu with a number of items when +clicked: + +- `Add Quote Tax` - Apply a tax to the entire quote +- `Download PDF` - Download a copy of the quote as PDF +- `Send Email` - Send the quote to the client via email +- `Quote to Invoice` - Convert the quote to an invoice +- `Copy Quote` - Create a copy of the quote +- `Delete` - Delete the quote + +### Adding Products + +To add saved products, press the `Add Product` button. Choose the product you want to add and mark the +checkbox on the left, then press `Submit` to insert the products into the quote. +You can edit the quantity, prices or taxes for each product. When finished, press the `Save` button. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_add_product.jpg)](https://invoiceplane.com/content/screenshots/web/ip_add_product.jpg) + +### Changing Item Order + +The order in which an item appears on a quote or invoice can be changed by dragging the row to a new position +with the icon. + +### Discounts + +With the release of InvoicePlane 1.4.0 we introduced discounts for each quotes and invoices. There are two separate types of discounts which can by applied: + +- Item Discounts +- Quote Discounts + +#### Item Discounts + +Item discounts can be added for each item itself as an amount that will be subtract from the item subtotal. Item discounts can only be added as an amount, not as an percentage. + +#### Quote Discounts + +Quote discounts can be added for the whole quote directly above the quote total. You can either choose to add a discount as an amount (e.g. 200 $) or as a percentage of the subtotal (e.g. 5%). + +### Add Tax to Quote + +To apply a tax against the entire quote, choose `Add Quote Tax` from the `Options` button. +Choose the appropriate tax rate and placement from the window that appears and press the `Submit` +button. That tax will be calculated against the quote total. + +> **Warning:** +> Caution! Do not mix item and quote taxes. Both tax methods were implemented for countries with different law structures and do not work together very well. If you use both tax method at the same time we can't promise that all calculations are executed correctly. +> +> Also, do **not** use item taxes to apply any service charges or similar extra charges. If you need to apply charges, add a new item or calculate the charges manually. + +### Copying the Quote + +To copy a quote, choose `Copy Quote` from the `Options` button on the edit quote page. +Change the client name, if appropriate, and then select the quote date and quote group and submit the form. All +items, taxes and amounts from the source quote will be copied to a new quote. + +### Generate Invoice from Quote + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_quotes_quote_to_invoice.jpg)](https://invoiceplane.com/content/screenshots/web/ip_quotes_quote_to_invoice.jpg) + +When a client accepts a quote, you can convert that quote to an invoice by using the `Quote to +Invoice` menu item from the `Options` button. Choose the invoice date and invoice group and +press the `Submit` button. The items from the quote will be copied over to your new +invoice. diff --git a/docs/en/1.6/modules/recurring-invoices.md b/docs/en/1.6/modules/recurring-invoices.md new file mode 100644 index 0000000..a955e02 --- /dev/null +++ b/docs/en/1.6/modules/recurring-invoices.md @@ -0,0 +1,40 @@ +# Recurring Invoices + +Oftentimes instead of sending an invoice as a one time charge, you need to send an email to a client on a +schedule. For example, you may be offering web hosting to your clients, and most likely they are paying for your +services once a month, once a year, etc. It would be a bummer to have to remember to create these invoices every +month, wouldn't it? InvoicePlane can keep this sorted for you. + +## Requirements + +For recurring invoices to generate properly, you must create a [CRON job](/en/1.6/help/setup_cron) or +a scheduled task that opens the following URL once per day: + +``` +http://your-domain.com/invoices/cron/recur/your-cron-key-here +``` + +Replace `your-cron-key-here` with the generated cron key in [System +Settings](/en/1.6/settings/general). + +## Create a recurring Invoice + +To create an invoice which will automatically recur at a specific frequency, the first step is to create the +first invoice and get it sent to your client as you normal would. Once the first invoice has been created, it +can be set up as a recurring invoice by selecting `Create Recurring` from the `Options` +menu. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_invoices_make_recurring.jpg)](https://invoiceplane.com/content/screenshots/web/ip_invoices_make_recurring.jpg) + +The invoice can be set to recur every week, month, year, quarter or six months. Since the first invoice has +already been created, the start date should be set to the next date this particular invoice should recur on. +Generally the start date should be a date in the future. If the invoice should stop recurring on a particular +date, then enter an end date as well. If the invoice should recur perpetually, then leave the end date +empty. + +## Viewing Recurring Invoices + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_invoices_recurring.jpg)](https://invoiceplane.com/content/screenshots/web/ip_invoices_recurring.jpg) + +The list of recurring invoices displays each recurring invoice set up in your system. Recurring invoices may be +stopped or deleted from the `Options` button in the list of recurring invoices. diff --git a/docs/en/1.6/modules/tasks-projects.md b/docs/en/1.6/modules/tasks-projects.md new file mode 100644 index 0000000..8eaa5c5 --- /dev/null +++ b/docs/en/1.6/modules/tasks-projects.md @@ -0,0 +1,38 @@ +# Tasks and Projects + +InvoicePlane provides basic task management that is integrated into the invoice workflow. You can link tasks to projects and projects to clients to structure everthing. + +## Projects + +Projects can be added from the navigation bar. You can chose the project name and a client. Choosing a client is optional. If you choose a client, tasks that are assigned to this project can onl be added to invoices for the same client. + +## Tasks + +Tasks can be added from the navigation bar. They have several fields that are explained in the following table. + +| Field | Description | +| --- | --- | +| Task name | The title or name of the task. Normally a short headword or sentence | +| Task description | Can contain a long text that discribes the task. Can also be used to store notes. | +| Task price | The price set here will be used in invoices to properly store tasks. The task price is the same as the product price. | +| Tax Rate | Task tax rates are the same like product tax rates. It will be added to the task price if added to an invoice. | +| Finish date | Also called deadline, it defines the date where the task should be finished. Tasks are displayed as overdue (red color) if the finish date has already passed. | +| Status | The task status defines the current state of the task. More information can be found below. | +| Project | This optional select can be used to link tasks to projects. | + +### Task Status + +A task can have one off the following statuses. Please notice that only completed tasks can be added to invoices. + +| Status | Description | +| --- | --- | +| Not started | The title or name of the task. Normally a short headword or sentence | +| In progress | The task is currently in progress. Someone works on the task. | +| Completed | The task was completed and is ready to be added to an invoice. | + +### Tasks in Invoices + +Inside invoices you can add tasks to an invoice. Therefore, use the "Add Task" button. This will open a new panel where all available tasks will be listed. Please notice that the following requirements must be fullfilled for a tasks to be available: + +- the task must be have the status Completed. +- the task must either have no linked project or the client of the current invoice must match theclient that is assigned to the linked project. diff --git a/docs/en/1.6/settings/custom-fields.md b/docs/en/1.6/settings/custom-fields.md new file mode 100644 index 0000000..ca9cebd --- /dev/null +++ b/docs/en/1.6/settings/custom-fields.md @@ -0,0 +1,28 @@ +# Custom Fields + +Custom fields can be created to store information which InvoicePlane doesn\'t provide fields for. Custom fields +can be created for: + +- Clients +- Quotes +- Invoices +- Payments +- User Accounts + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_custom_fields.jpg)](https://invoiceplane.com/content/screenshots/web/ip_custom_fields.jpg) + +## Adding a Custom Field + +To add a new custom field click on the settings icon in the menubar and +then choose `Custom Fields`. On the overview click on `New` in the top right. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_custom_fields_form.jpg)](https://invoiceplane.com/content/screenshots/web/ip_custom_fields_form.jpg) + +When adding custom fields, it is recommended to only use alpha and numeric characters for the label name. Once a +custom field has been added to an object, the custom field will display at the bottom of the form for that +object (so a custom field created for the client object will appear on the client form). + +## Adding Custom Fields to Templates + +Please take a look at the [Customize Templates +page](/en/1.6/templates/customize-templates#custom-fields) for more information about custom fields in templates. diff --git a/docs/en/1.6/settings/email-templates.md b/docs/en/1.6/settings/email-templates.md new file mode 100644 index 0000000..49f5b0f --- /dev/null +++ b/docs/en/1.6/settings/email-templates.md @@ -0,0 +1,31 @@ +# Email Templates + +Instead of having to type the body of an email each time an invoice or quote is emailed from InvoicePlane, email templates can be customized to your liking, giving you a set of predefined templates to choose from. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_email_templates.jpg)](https://invoiceplane.com/content/screenshots/web/ip_email_templates.jpg) + +## Creating an Email Template + +To create a new email template, click the settings icon near the right hand side of the main menu, select `Email Templates`, and click the `New` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_email_templates.jpg)](https://invoiceplane.com/content/screenshots/web/ip_email_templates.jpg) + +Template variables can be inserted into the body of your email by clicking the name of the variable to include from the list below the form. The example above shows what an email template for a new invoice might look like. + +## Setting Default Email Templates + +To access the settings for your default templates, click the settings icon , select `System Settings`, and choose either the `Invoices` or the `Quotes` tab + +**Invoices** + +- Default Email Template - The selected template would be used for invoices in draft, sent and viewed statuses. +- Paid Email Template - The selected template would be used for invoices in paid status. +- Overdue Email Template - The selected template would be used for invoices which are overdue. + +**Quotes** + +- Default Email Template - The selected template would be used for all quotes in any status. +- Paid Email Template - The selected template would be used for invoices in paid status. +- Overdue Email Template - The selected template would be used for invoices which are overdue. + +When manually sending an invoice or quote from within InvoicePlane, the appropriate email template will be selected prior to sending. Of course, you may make any last minute adjustments to the content of the email before sending it. Since recurring invoices send email on their own without any manual intervention, it is helpful to have a set of email templates created and the default settings configured so InvoicePlane knows which template to use each time it sends them out. diff --git a/docs/en/1.6/settings/email.md b/docs/en/1.6/settings/email.md new file mode 100644 index 0000000..99833bd --- /dev/null +++ b/docs/en/1.6/settings/email.md @@ -0,0 +1,12 @@ +# Email Settings + +Before InvoicePlane can send emails you have to configure he email settings here. You can choose between three different ways to send emails. +If you don't want that invoice and quote pdf files are automatically attached to emails disable this feature by changing `Attach Quote/Invoice on email?` to `No` + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_settings_mail.jpg)](https://invoiceplane.com/content/screenshots/web/ip_settings_mail.jpg) + +| Method | Description | +| --- | --- | +| PHP Mail | Uses the built-in email sending method of PHP which allows to send mails without any configuration. | +| Sendmail | Like PHP Mail all emails will be sent without the need to configure anything. Please choose Sendmail only if you are sure that your server has Sendmail installed, enabled and configured because it is possible that your servers OS does not ship with Sendmail by default. | +| SMTP | You can also use a SMTP server to send mails. Using SMTP allows you to send emails via external servers. You will need the SMTP server's hostname, login credentials and the used port and security method. | diff --git a/docs/en/1.6/settings/general.md b/docs/en/1.6/settings/general.md new file mode 100644 index 0000000..a6064e8 --- /dev/null +++ b/docs/en/1.6/settings/general.md @@ -0,0 +1,45 @@ +# General Settings + +The general settings page sets a lot of options that will change the look & feel of the whole application or +that are needed for some special purposes. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_settings_general.jpg)](https://invoiceplane.com/content/screenshots/web/ip_settings_general.jpg) + +## General settings + +| Setting | Description | +| --- | --- | +| Language | Choose the [language](/en/1.6/system/translation-localization) for the application | +| First day of the Week | Choose if the week should start on sunday or monday | +| Default Country | Select the country that will be used automatically when adding clients | +| Date Format | Choose the date format of the application | +| Currency Symbol | Choose the currency symbol like `€` or `$`. You can also use any letters like `AUD` or `CHF` | +| Currency Symbol Placement | Choose if the currency symbol should be placed before or after amounts | +| Thousand Separator | Select if thousands should be separated by `,` or `.` | +| Decimal Point | Select if the decimals point should be `,` or `.` | +| Tax Rate Decimal Places | Select how much placed after the decimal point should be used for tax rates. | + +## Dashboard settings + +| Setting | Description | +| --- | --- | +| Quote Overview Period | Select the period that should be used for quotes on the quote overview | +| Invoice Overview Period | Select the period that should be used for invoices on the invoice overview | + +## Interface settings + +| Setting | Description | +| --- | --- | +| Disable the Sidebar | Choose if the sidebar should be disabled | +| Custom Title | Set a custom title which will be shown on browser tabs | +| Use Monospace font for Amounts | Choose if the application should use a monospace font for amounts. Example: `1.345,23 €` | +| Login Logo | Upload an image that will be displayed above the login form. Recommended size: about 300px width | +| Cron Key | You will need this cron key to setup [recurring invoices](/en/1.6/modules/recurring-invoices). | + +## System settings + +| | | +| --- | --- | +| Send all outgoing emails as BCC to the admin account | If you enable this option **every** outgoing email is sent as an anonymous copy (BCC) to the administrator. The administrator is the user that was created during the InvoicePlane setup. | +| Cron Key | You will need this cron key to setup [recurring invoices](/en/1.6/modules/recurring-invoices) | +| Enable Debug Mode | The debug mode enables logging for the application. The logs can be found in the `/application/logs` folder or in your browser console. | diff --git a/docs/en/1.6/settings/index.md b/docs/en/1.6/settings/index.md new file mode 100644 index 0000000..38e1cc2 --- /dev/null +++ b/docs/en/1.6/settings/index.md @@ -0,0 +1,15 @@ +# Settings + +- [General Settings](/en/1.6/settings/general) +- [Invoice Settings](/en/1.6/settings/invoices) +- [Quotes Settings](/en/1.6/settings/quotes) +- [Tax Settings](/en/1.6/settings/taxes) +- [eMail Settings](/en/1.6/settings/email) +- [Online Payments](/en/1.6/settings/online-payments) +- [Updatecheck](/en/1.6/settings/updatecheck) +- [Custom Fields](/en/1.6/settings/custom-fields) +- [eMail Templates](/en/1.6/settings/email-templates) +- [Invoice Groups](/en/1.6/settings/invoice-groups) +- [Payment Methods](/en/1.6/settings/payment-methods) +- [Taxrates](/en/1.6/settings/taxrates) +- [User Accounts](/en/1.6/settings/user-accounts) diff --git a/docs/en/1.6/settings/invoice-groups.md b/docs/en/1.6/settings/invoice-groups.md new file mode 100644 index 0000000..4ac882d --- /dev/null +++ b/docs/en/1.6/settings/invoice-groups.md @@ -0,0 +1,41 @@ +# Invoice Groups + +When a new invoice or quote is created, InvoicePlane uses invoice groups to determine the next invoice or quote number and how it should be structured. InvoicePlane comes with two default invoice groups - Invoice Default and Quote Default. Both groups will generate simple incremental ID's starting at the number 1, but the Quote Default will be prefixed with "QUO". + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_invoice_groups.jpg)](https://invoiceplane.com/content/screenshots/web/ip_invoice_groups.jpg) + +## Configure an Invoice Group + +These default groups can be customized and any number of new groups can be created. Each group has a number of options. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_invoice_groups_form.jpg)](https://invoiceplane.com/content/screenshots/web/ip_invoice_groups_form.jpg) + +| Setting | Description | +| --- | --- | +| Name | The name if the invoice group that will be used in the settings | +| Identifier formatting | The identifier is used to generate invoices or quotes and can consist of alpha-numeric characters | +| Next ID | Set the ID for the next invoice. Please notice that you should not set the next ID to a number below the ID of the last generated ID. Example: You created 59 invoices but you want the next invoice to have the ID 100 so set the Next ID to 100. | +| Left Pad | The left padding can be used to generate IDs that contain zeros to the left of the ID. The left padding contains the invoice ID itself. Example: you set the left padding to 5 which would lead to invoice IDs like 00056 or 00397. | + +### Format the Identifier + +> **Warning:**Caution! The identifier **must** contain the `{{{ID}}}` tag no matter where! + +There are some template tags that can be used to create a custom identifier. + +| Name | Tag | Description | +| --- | --- | --- | +| ID | `{{{ID}}}` | Inserts the increasing ID of the invoice | +| Current Year | `{{{year}}}` | Inserts the current year with 4 digits | +| Current month | `{{{month}}}` | Inserts the current month with 2 digits | +| Current day | `{{{day}}}` | Inserts the current day with 2 digits | + +### Formatting Examples + +| Template | Output | +| --- | --- | +| `{{{year}}}/{{{ID}}}` | YYYY/456 | +| `{{{year}}}_{{{month}}}_{{{ID}}}` | YYYY\_MM\_456 | +| `{{{year}}}-{{{month}}}-{{{day}}}-{{{ID}}}` | YYYY-MM-DD-456 | +| `IN{{{year}}}{{{ID}}}` | INYYYY456 | +| `IPQ-{{{day}}}{{{ID}}}` | IPQ-DD456 | diff --git a/docs/en/1.6/settings/invoices.md b/docs/en/1.6/settings/invoices.md new file mode 100644 index 0000000..7970766 --- /dev/null +++ b/docs/en/1.6/settings/invoices.md @@ -0,0 +1,21 @@ +# Invoice Settings + +On the invoice settings page you can set a lot of options to control how invoices should behave. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_settings_invoices.jpg)](https://invoiceplane.com/content/screenshots/web/ip_settings_invoices.jpg) + +## General settings + +| Setting | Description | +| --- | --- | +| Default Invoicegroup | Select the [Invoicegroup](/en/1.6/settings/invoicegroups) that should be used by default | +| Set the Invoice to read-only on | Select on which state an invoice should be set to read-only | +| Invoice due after | Select after how many days an invoice should be set to due | +| Default Terms | You can enter the default terms for any invoice here | +| Automatically email recurring invoices | If you have recurring invoices you can choose if InvoicePlane should send an email with the invoice attached to the client automatically | +| Mark Invoices as sent when PDF is generated | Choose if InvoicePlane should set the status of an invoice to `Sent` when you download the PDF | +| Invoice Logo | Upload an image that should be placed on templates. | + +## Templates + +All following settings allow you to set default PDF and email templates for different states and purposes. At the end in the PDF Footer you can enter information that should be placed at the bottom of each PDF template. diff --git a/docs/en/1.6/settings/online-payments.md b/docs/en/1.6/settings/online-payments.md new file mode 100644 index 0000000..bc107b6 --- /dev/null +++ b/docs/en/1.6/settings/online-payments.md @@ -0,0 +1,25 @@ +# Merchant Account Settings + +InvoicePlane 1.6 supports only **Stripe** by default as a payment gateway. The reason why the other providers were dropped can be found [here](/en/1.6/getting-started/updating-ip#16-breaking-changes). Please let us know what payment method you are missing at [GitHub](https://github.com/InvoicePlane/InvoicePlane/issues) + +### Configure your payment provider + +To configure your payment provider, select the provider from the dropdown list. If you don't know which provider should be selected please contact your provider. We cannot offer any support for specific provider settings. + +After selecting a provider InvoicePlane will show you a configuration box will all needed settings. Make sure to enable the provider first. After that fill all needed information. Again: if you are not shure which fields to fill, contact your provider. + +> **Warning:**It is highly recommended to test if the online payment is working correctly using the **Test Mode** if available. This allows you to pay online without transfering real money. + +### Configure **Stripe** as a payment provider + +1. Login or regiser for an account at [stripe.com](https://stripe.com) +2. Once you logged in, on the top search bar look for the `API Keys` page. +3. Create a new *secret key*. +4. Now, open the `settings` in your InvoicePlane installation and navigate to the `online payment` tab. +5. Tick the `Enable Online Payments` checkbox. +6. From the dropdown list select `Stripe` as a payment provider. +7. Tick the `enable` checkbox on the stripe card that appeared when you selected stripe as a payment provider in the last step. +8. Insert the secret key and the publishable key in the corrisponding fields. The secret key must be set in the field that hides the characters (like a password). +9. Click on **save**, and you are done! + +Please take note that InvoicePlane is in no way affiliated to Stripe and that we are not able to help with Stripe specific issues. These instructions only concern integrating Stripe as a payment gateway in InvoicePlane. diff --git a/docs/en/1.6/settings/payment-methods.md b/docs/en/1.6/settings/payment-methods.md new file mode 100644 index 0000000..c700cbf --- /dev/null +++ b/docs/en/1.6/settings/payment-methods.md @@ -0,0 +1,13 @@ +# Payment Methods + +Payment Methods + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_payment_methods.jpg)](https://invoiceplane.com/content/screenshots/web/ip_payment_methods.jpg) + +## Add a Payment Method + +To add a new payment method, click the settings icon near the right hand side of the main menu, select `Payment Methods`, and click the `New` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_payment_methods_form.jpg)](https://invoiceplane.com/content/screenshots/web/ip_payment_methods_form.jpg) + +Simply enter the name of the payment method and click on `Save` button. The method will be available when adding a payment. diff --git a/docs/en/1.6/settings/quotes.md b/docs/en/1.6/settings/quotes.md new file mode 100644 index 0000000..29a9c3c --- /dev/null +++ b/docs/en/1.6/settings/quotes.md @@ -0,0 +1,17 @@ +# Quote Settings + +The general settings page sets a lot of options that will change the look & feel of the whole application or that are needed for some special purposes. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_settings_quotes.jpg)](https://invoiceplane.com/content/screenshots/web/ip_settings_quotes.jpg) + +## General settings + +| Setting | Description | +| --- | --- | +| Quote expires after | Choose after how many days a quote should be set to expired | +| Default Quotegroup | Select the [Quotegroup (aka Invoicegroups)](/en/1.6/settings/invoicegroups) that should be used by default | +| Mark Quotes as sent when PDF is generated | Choose if InvoicePlane should set the status of an quote to `Sent` when you download the PDF | + +## Templates + +All following settings allow you to set default PDF and email templates for different states and purposes. diff --git a/docs/en/1.6/settings/taxes.md b/docs/en/1.6/settings/taxes.md new file mode 100644 index 0000000..163d399 --- /dev/null +++ b/docs/en/1.6/settings/taxes.md @@ -0,0 +1,11 @@ +# Tax Settings + +The general settings page sets a lot of options that will change the look & feel of the whole application or that are needed for some special purposes. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_settings_taxes.jpg)](https://invoiceplane.com/content/screenshots/web/ip_settings_taxes.jpg) + +| Setting | Description | +| --- | --- | +| Default Invoice Tax Rate | Choose the [Taxrate](/en/1.6/settings/taxrates) that should be applied to an invoice by default | +| Default Invoice Tax Rate | Choose where to place the invoice tax | +| Default Invoice Tax Rate | Choose the [Taxrate](/en/1.6/settings/taxrates) that should be applied to every product of an invoice by default | diff --git a/docs/en/1.6/settings/taxrates.md b/docs/en/1.6/settings/taxrates.md new file mode 100644 index 0000000..575271d --- /dev/null +++ b/docs/en/1.6/settings/taxrates.md @@ -0,0 +1,13 @@ +# Taxrates + +If you want to add taxes to products / items or invoices you have to configure them on the Taxrates settings page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_taxrates.jpg)](https://invoiceplane.com/content/screenshots/web/ip_taxrates.jpg) + +## Add a new Taxrate + +To add a new taxrate, click the settings icon near the right hand side of the main menu, select `Taxrates`, and click the `New` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_taxrates_form.jpg)](https://invoiceplane.com/content/screenshots/web/ip_taxrates_form.jpg) + +First enter the official name of the taxrate. Be careful as this will be displayed on quotes or invoices as a description of the taxrate. Then enter the percentage of the taxrate and click on `Save`. diff --git a/docs/en/1.6/settings/updatecheck.md b/docs/en/1.6/settings/updatecheck.md new file mode 100644 index 0000000..ff440fa --- /dev/null +++ b/docs/en/1.6/settings/updatecheck.md @@ -0,0 +1,6 @@ +# Updatecheck + +On the updatecheck page InvoicePlane checks for updates with contacting our website. The result of the check will be displayed below the version. +Additionally the latest news will be displayed below the updatecheck. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_settings_updates.jpg)](https://invoiceplane.com/content/screenshots/web/ip_settings_updates.jpg) diff --git a/docs/en/1.6/settings/user-accounts.md b/docs/en/1.6/settings/user-accounts.md new file mode 100644 index 0000000..cd79dc2 --- /dev/null +++ b/docs/en/1.6/settings/user-accounts.md @@ -0,0 +1,70 @@ +# User Accounts + +InvoicePlane can contain an unlimited number of user accounts (both Administrator and Guest), but there is no +real level of ownership or separation between different administrator accounts. Each administrator account has +full access to the entire system and can see all data system-wide. Guest accounts are read-only and can be +restricted to see invoices, quotes and payments for the client or clients you specify. + +## User Types + +**Administrator** + +An administrator account has full access to the entire system. Administrators can create and delete clients, +invoices, payments, users, and everything else in the system. The account created during installation is an +administrator account. If you don't want somebody having full access to all of your data, do not create an +administrator account for them. + +**Guest (Read Only)** + +There may be times where you need to allow a user into your system, but with limited access. Guest accounts allow +you to create a user account which can only view quotes, invoices and payments for one or more clients. A guest +account may be created for a particular client, in which case you would create the account and grant access to +only that client. A guest account may also be created for an accountant, in which case you might create the +account and grant access to more than just one client. + +## Viewing Users + +To view the user list, click the settings icon near the right hand side +of the main menu and select `User Accounts`. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_useraccounts.jpg)](https://invoiceplane.com/content/screenshots/web/ip_useraccounts.jpg) + +To navigate between pages, use the pager buttons located on the submenu bar. + +The `Options` button at the end of each row displays a menu from which you can edit or delete an user. + +## Add an User Account + +To add a new user account, click the settings icon near the right hand +side of the main menu, select `User Accounts`, and click the `New` button near the top +right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_useraccounts_form.jpg)](https://invoiceplane.com/content/screenshots/web/ip_useraccounts_form.jpg) + +To create the user account, provide the user's name (typically their full name), email address (this is what +they'll use to log in with), password and password verification. When selecting the user type, choose between +`Administrator` or `Guest`. Once the user type has been selected, the rest of the form +will display below the initial form. + +If `Administrator` was selected as the user type, several fields will be made available to complete, +such as their address and location information and contact information. Fill in the fields and press the `Save` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_useraccounts_form.jpg)](https://invoiceplane.com/content/screenshots/web/ip_useraccounts_form.jpg) + +If `Guest` was selected as the user type, an area will be made available from which you can give +access to one or more clients for the `Guest` user account. To provide access to a single client, +press the `Add Client` button, begin typing the name of the client in to the form and select the +client when they appear in the list. Press the `Submit` button. If you want you can add +another client to the user account. If not press `Cancel`. Don't forget to save the user +account. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_useraccounts_add_client.jpg)](https://invoiceplane.com/content/screenshots/web/ip_useraccounts_add_client.jpg) + +If a guest account is not a client, but instead an accountant, you will probably want to provide them with access +to more than just a single client. In that case, press the `Add Client` button, begin typing the name +of the first client in to the form and select the client when they appear in the list. Press the `Submit` button and begin typing the next client name. Rinse, wash and repeat until +each client the guest should have access to has been added to the list. Press the Close button and then press +the `Save` button near the top of the page when finished. + +No matter if the account is an Administrator account or a Guest account, all users use the same URL to log in. Be +sure and provide your login URL to any users who you create accounts for. diff --git a/docs/en/1.6/system/importing-data.md b/docs/en/1.6/system/importing-data.md new file mode 100644 index 0000000..f252793 --- /dev/null +++ b/docs/en/1.6/system/importing-data.md @@ -0,0 +1,57 @@ +# Importing Data + +InvoicePlane can import data from any system as long as it is provided in comma delimited CSV format and is +structured according to the details below. The data import tool can be accessed by clicking the Settings icon +and choosing the Import Data item. + +The import tool assumes the following: + +The file names will be exactly as they are listed below. +All of the columns listed below must be present in the files, even if there is no data in the column. +The first row of each file must contain the file headings, and those headings must be named exactly as they are +listed below. +The files must all be in comma delimited CSV format. +The files to import must be located in your uploads/import folder. +The email address in the invoice file must be an email address of an actual user account currently in +InvoicePlane. +If any of the rules above are not met, the import will not work as expected. + +**File names and columns** + +- clients.csv + - client\_name + - client\_address\_1 + - client\_address\_2 + - client\_city + - client\_state + - client\_zip + - client\_country + - client\_phone + - client\_fax + - client\_mobile + - client\_email + - client\_web + - client\_vat\_id + - client\_tax\_code + - client\_active (1 for active, 0 for inactive) +- invoices.csv + - user\_email + - client\_name + - invoice\_date\_created (yyyy-mm-dd format) + - invoice\_date\_due (yyyy-mm-dd format) + - invoice\_number + - invoice\_terms +- invoice\_items.csv + - invoice\_number + - item\_tax\_rate (ex: 7.8 would indicate 7.8%) + - item\_date\_added (yyyy-mm-dd format) + - item\_name + - item\_description + - item\_quantity + - item\_price (without any currency symbols) +- payments.csv + - invoice\_number + - payment\_method (ex: Cash, Credit or PayPal) + - payment\_date (yyyy-mm-dd format) + - payment\_amount (without any currency symbols) + - payment\_note diff --git a/docs/en/1.6/system/index.md b/docs/en/1.6/system/index.md new file mode 100644 index 0000000..8148219 --- /dev/null +++ b/docs/en/1.6/system/index.md @@ -0,0 +1,5 @@ +# System + +- [Translation / Localization](/en/1.6/system/translation-localization) +- [Importing Data](/en/1.6/system/importing-data) +- [Upgrade from FusionInvoice](/en/1.6/system/upgrade-from-fusioninvoice) diff --git a/docs/en/1.6/system/translation-localization.md b/docs/en/1.6/system/translation-localization.md new file mode 100644 index 0000000..5593632 --- /dev/null +++ b/docs/en/1.6/system/translation-localization.md @@ -0,0 +1,63 @@ +# Translation / Localization + +InvoicePlane comes with the English language by default. To contribute to or to download other language packs +please visit the [translation repository](https://crowdin.com/project/invoiceplane). + +## Install a new translation + +> **Warning:** +> Please notice: some translations are not complete so some texts will be displayed in English. So do not delete +> the english language folder! + +1. Download the translation pack from the [translation + repository](https://crowdin.com/project/invoiceplane) +2. Open the folder of the language you want to install (`de` = German) +3. Copy the folder that should be called something like `de_DE`, `fr_FR` or + `es_AR` +4. Paste the folder to the following directory of your InvoicePlane installation: + `/application/language/` +5. Apply the language in your [general settings](/en/1.6/settings/general). + +Your folder structure should look like this: + +``` +├── application/ +│ ├── ... +│ ├── language/ +│ │ ├── english/ +│ │ └── Deutsch/ +│ │ ├── custom_lang.php +│ │ ├── ip_lang.php +│ │ ├── merchant_lang.php +│ │ └── ... +│ └── ... +├── assets/ +└── ... +``` + +## Customize translations + +You are able to replace all language strings in the application with your own strings. We added a file called `custom_lang.php` which is located in every language folder (see above). + +To replace or alter a translation, search for the string in the main language files (ip\_lang.php). You have to copy the whole line with the string into the `custom_lang.php` file that it looks like this: + +``` + 'Actual content of the Language String', + +); +``` + +Now, simply change the translation to whatever you need. But keep in mind that some strings are designed to fit into special spaces. Try to keep the character count or the original string. + +> **Danger:** +> If you want to use the `'` character in your string you have to replace it with `\'`. +> Example: `'language_string_key' => 'Description with \'quotes\'',` diff --git a/docs/en/1.6/system/upgrade-from-fusioninvoice.md b/docs/en/1.6/system/upgrade-from-fusioninvoice.md new file mode 100644 index 0000000..bc426af --- /dev/null +++ b/docs/en/1.6/system/upgrade-from-fusioninvoice.md @@ -0,0 +1,32 @@ +# Upgrade form FusionInvoice + +If you used FusionInvoice v.1x to manage your invoices you can migrate to InvoicePlane. +Follow these steps to +migrate your installation. + +## Make a full Backup + +Actually you don't have to make a full backup of your FusionInvoice setup but we recommend to do so. We can not +guarantee that the [Migrationtool](https://github.com/InvoicePlane/Migrationtool) is working without +problems. +Make a complete copy of the folder that holds your installation and make a backup of your +database. + +## Use the Migrationtool + +1. [Download the Migrationtool](https://github.com/InvoicePlane/Migrationtool/archive/master.zip) + and unzip it to any directory on your webserver or your local machine and check if you copied the `.htaccess` + file. +2. If you want to run the tool in a subdirectory please set the directory in the `config.php` file. +3. Then open the URL which can access the Migrationtool and follow the instructions. + +> **Warning:**Please do **not** use multiple directories like `yourdomain.com/tools/migration/migrationtool` +> as the tool only supports one directory at the moment. + +## Run the InvoicePlane Updates + +After converting the database it's very important that you open the setup wizard +of your InvoicePlane installation located at `yourdomain.com/setup`. Follow the instructions and the +setup will run any necessary database updates. Without these updates InvoicePlane will not run. + +> **Note:** diff --git a/docs/en/1.6/templates/customize-templates.md b/docs/en/1.6/templates/customize-templates.md new file mode 100644 index 0000000..856e2da --- /dev/null +++ b/docs/en/1.6/templates/customize-templates.md @@ -0,0 +1,160 @@ +# Customize Templates + +For the customization you just need some little knowledge of HTML and CSS. PHP knowledge is not needed by +default but may help if you want to achieve special layouts or functions. + +> **Warning:** +> Please remember: Before doing any customizations, make a copy of a default template! If you make changes in the +> default templates they will be overwritten on updates. + +> **Note:** +> Hint: PDF templates will be generated with a PDF engine called mPDF. This means that some styles may not work +> because of conversion from HTML to PDF. If you need help with styling please refer to the [mPDF documentation](https://mpdf.github.io/). + +## Customize the Look and Feel + +First of all please remember that there is a basic styling for each template. The files use two CSS stylesheets +and some hardcoded styles. If you want to customize your template you should make changes in the hardcoded part +which means: edit the content between `` only. Do not +edit the templates.css as changes will be overwritten on updates. + +## First Steps + +InvoicePlane already provides a lot of data for all templates. The table below gives you an overview on which +variables are available in the templates. + +### Invoice Templates + +| Variable | Description | +| --- | --- | +| `$invoice` | It holds data about the invoice itself, the user that created the invoice and the client that is selected for the invoice. It also provides all payments if there are any in the database. | +| `$invoice_tax_rates` | Provides information about all tax rates that were applied to the invoice | +| `$items` | Contains all invoice items with their corresponding data. | +| `$payment_method` | Provides information about the selected payment method. | +| `$custom_fields` | Contains custom fields for the invoice, the user, the client and if available for the parent quote. | +| `$show_item_discounts` | Is true if there are any items with a discount, is false if not. Can be used to display the additional discount column only if there are discounts to display. | + +### Quote Templates + +| Variable | Description | +| --- | --- | +| `$quote` | It holds data about the quotes itself, the user that created the quote and the client that is selected for the quotes. | +| `$quote_tax_rates` | Provides information about all tax rates that were applied to the quote. | +| `$items` | Contains all quote items with their corresponding data. | +| `$custom_fields` | Contains custom fields for the quote, the user and the client. | +| `$show_item_discounts` | Is true if there are any items with a discount, is false if not. Can be used to display the additional discount column only if there are discounts to display. | + +If you want to know which data is available in every variable go to the bottom of the template and add the +following code directly above the `` tag. Replace *invoice* with the name of the +variable your want to look up. + +``` +
+``` + +If you load the template now you will see something like this but with hundred more lines: + +``` +stdClass Object +( + [client_id] => 13 + [invoice_id] => 24 + [user_id] => 2 + [invoice_group_id] => 8 +... +``` + +This is the list of all available variables where the part in the brackets (e.g. `invoice_id`) is the +name of the variable and the part after the `=>` is the content of the variable. + +## Adding Custom Fields + +Custom fields work in a special way. As custom fields are added by the user there is no way to define which +fields will be available. Therefore InvoicePlane searches for all available custom fields before printing the +template. All fields are stored in the `$custom_fields` variable that may look like this: + +``` +Array +( + [invoice] => Array + ( + [Sent at] => 2016-11-15 + [Contributors] => [ + 0 => Marty McFly + 1 => Jennifer McFly + ] + ) + [client] => Array + ( + [CRM ID] => 346999-13400 + [has Supervisor] => 1 + [Supervisors] => 1 + ) + [user] => Array + () + [quote] => Array + ( + [Sent at] => 2016-11-10 + [Special discount offered?] => 0 + ) +) +``` + +The `$custom_fields` variable is a collection of all custom field types that group all available +custom fields. As you can see in the example, the invoice has a custom field named *Sent at*, the client +has a field called *CRM ID* and so on. + +To access a specific custom field, you have to use the followng code example: + +``` + +``` + +where *client* should be the group and *CRM ID* should be the label of your custom field. Using the +code example would simply output `346999-13400` in your template. + +### Yes / No Custom Fields + +Yes/no fields will have the value `1` for yes and `0` for no. This way you can use the custom field in conditional statements like this: + +``` + +``` + +## Code Examples + +Here is a list of some examples for code that can be used to display variables. +Replace `invoice` with `quote` when editing quote templates. +Replace `variable_name` with the actual name of the variable. + +| Description | Code | +| --- | --- | +| **Add a new Variable** To add a new variable to the template. Replace `variable_name` with the actual name of the variable. | ``` variable_name; ?> ``` | +| **Format amounts** If you want to display amounts you have to use this code in order to display the amount in the correct format. | ``` variable_name); ?> ``` | +| **Conditional Statements** Only display code if a variable is not empty. This could be used for example if you don't want to display the taxes column if there are no taxes. | ``` variable_name)): ?> -- display any HTML or variables here -- ``` | +| **Display the Invoice Logo** The logo can be set in the System Settings. | ``` ``` | + +## Debugging Templates + +The PDF engine is not that good in handling errors or HTML that is broken due to PHP errors. You may get output +like this: + +``` +Severity: Notice +Message: Undefined offset: 2 +Filename: src/Tag.php +Line Number: 1806 +... +``` + +To know what is wrong with your template, you have to add a small code line in your template helper. Open the +file `application/helpers/pdf_helper.php` and add + +Place `print_r($html);exit;` at line 98 for invoice templates. + +Place `print_r($html);exit;` at line 250 for quote templates. + +This will output the plain HTML that will be used to generate your PDF files. If there are any problems with +missing or faulty variables or wrong PHP code, you should see the corresponding output here. diff --git a/docs/en/1.6/templates/index.md b/docs/en/1.6/templates/index.md new file mode 100644 index 0000000..3bb935b --- /dev/null +++ b/docs/en/1.6/templates/index.md @@ -0,0 +1,4 @@ +# Templates + +- [Using Templates](/en/1.6/templates/using-templates) +- [Customize Templates](/en/1.6/templates/customize-templates) diff --git a/docs/en/1.6/templates/using-templates.md b/docs/en/1.6/templates/using-templates.md new file mode 100644 index 0000000..5d12bcd --- /dev/null +++ b/docs/en/1.6/templates/using-templates.md @@ -0,0 +1,17 @@ +# Using Templates + +First of all, the templates shipped with InvoicePlane are what they are called: templates. You *can* use them directly for your business but they are meant to be duplicated and customized. + +There are two main types of templates which are used: + +- PDF Templates - Used to generate the quote and invoices PDF files +- Web Templates - Used to display the quotes and invoices in a web browser for guest users (clients) + +## Using PDF Templates + +All PDF templates can be found in the following folders of the application: + +- `/application/views/invoice_templates/pdf` for invoices +- `/application/views/quote_templates/pdf` for quotes + +You can select which templates should be used in the system settings for either [Invoices](/en/1.5/settings/invoices) or [Quotes](/en/1.5/settings/quotes). You can find the select boxes below the headline "Templates". Simply select the template, save and the template will be used for the next quote or invoice. diff --git a/docs/en/1.7/e-invoicing/cii.md b/docs/en/1.7/e-invoicing/cii.md new file mode 100644 index 0000000..2c0a92a --- /dev/null +++ b/docs/en/1.7/e-invoicing/cii.md @@ -0,0 +1,160 @@ +# CII — Cross Industry Invoice + +## What is CII? + +**CII** (Cross Industry Invoice) is an XML format defined by **UN/CEFACT** (United Nations Centre for Trade Facilitation and Electronic Business). It is designed to represent invoices across industry sectors and national boundaries. + +The version used in European e-invoicing is **UN/CEFACT CII D16B**, published in 2016. CII is one of two XML syntaxes recognised by the European e-invoicing standard **EN 16931** (the other being [UBL](/en/1.7/e-invoicing/ubl)). + +--- + +## EN 16931 and CII + +EN 16931 defines the **semantic data model** for a European invoice — what information it must contain and what it means. It does not prescribe an XML syntax. CII D16B is one of the two authorised syntaxes for expressing an EN 16931 invoice. + +All CII-based formats below are EN 16931 compliant at their core (with some adding optional extensions beyond the standard). + +--- + +## Profiles and derivatives + +### Factur-X (France) + +Factur-X is a French standard that embeds a CII XML file inside a PDF/A-3 document. The recipient receives a single PDF file that is both human-readable and machine-processable. Factur-X is EN 16931 compliant. + +The embedded XML filename must be **`factur-x.xml`**. + +This is a built-in template in InvoicePlane 1.7. See the dedicated [Factur-X and ZUGFeRD page](/en/1.7/e-invoicing/factur-x) for profiles, how embedding works, and how to select a profile. + +### ZUGFeRD 2.x (Germany) + +ZUGFeRD (Zentraler User Guide des Forums elektronische Rechnung Deutschland) is technically the same standard as Factur-X. The XML schema and profiles are identical. The only practical differences are: + +- The embedded XML filename is **`ZUGFeRD-invoice.xml`** (instead of `factur-x.xml`) +- The branding and some namespace metadata differ slightly + +ZUGFeRD is used in Germany for B2B invoices. This is a built-in template in InvoicePlane 1.7. + +See [Factur-X and ZUGFeRD](/en/1.7/e-invoicing/factur-x) for the shared documentation. + +### XRechnung (Germany, B2G) + +XRechnung is a German national profile of CII EN 16931 for **business-to-government invoices**. Unlike Factur-X and ZUGFeRD, XRechnung is a **standalone CII XML file** — it is not embedded in a PDF. The German federal government and most state governments only accept XRechnung for their procurement portals. + +Key differences from ZUGFeRD: +- No PDF embedding — just the XML file +- Stricter field requirements (many optional EN 16931 fields become mandatory) +- Must be submitted via the federal OZG-RE portal or the relevant state portal +- Identified by the `CustomizationID`: `urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_X.X` + +**Template in InvoicePlane:** `XRechnungv30` (or similar) — download from the [InvoicePlane e-invoices repository](https://github.com/InvoicePlane/InvoicePlane-e-invoices). + +--- + +## CII XML structure + +A CII invoice follows this top-level structure: + +```xml + + + + + urn:cen.eu:en16931:2017 + + + + + INV-2025-0042 + 380 + ... + + + + ... + ... + ... + ... + + + +``` + +For Factur-X and ZUGFeRD, the `GuidelineSpecifiedDocumentContextParameter/ID` includes the profile URN, such as `urn:factur-x.eu:1p0:en16931`. + +--- + +## When to use CII + +Choose CII-based formats when: + +- Your client is a German company (use ZUGFeRD — see [Factur-X and ZUGFeRD](/en/1.7/e-invoicing/factur-x)) +- You are invoicing a French company or the French government (use Factur-X — see [Factur-X and ZUGFeRD](/en/1.7/e-invoicing/factur-x)) +- You are invoicing the German federal or state government (use XRechnung — see examples below) +- Your client or their country specifically requires a CII-syntax invoice + +For countries using the Peppol network (Belgium, Sweden, Czech B2G, etc.), use [UBL via Peppol BIS Billing 3.0](/en/1.7/e-invoicing/ubl). + +--- + +## Examples + +### XRechnung — Germany B2G + +XRechnung is mandatory for invoices to German federal and state government entities. It is a standalone CII XML file — no PDF embedding. Stricter field requirements than ZUGFeRD EN16931. + +**Template:** `XRechnungv30` — download from the [InvoicePlane e-invoices repository](https://github.com/InvoicePlane/InvoicePlane-e-invoices). + +German VAT numbers start with `DE` followed by 9 digits. + +#### Federal government example + +| Field | Value | +|---|---| +| Company name | Bundesministerium der Finanzen | +| Street address | Wilhelmstraße 97 | +| Postal code | 10117 | +| City | Berlin | +| Country | Germany | +| Tax ID / VAT number | DE122256884 | +| Leitweg-ID | 991-00001-06 | +| E-Invoicing version | XRechnung 3.0 | + +**Leitweg-ID:** A routing identifier that tells the portal which department should receive the invoice. It is provided by the contracting authority in the purchase order or on their supplier portal. Format: `{RouteCode}-{SubRoute}-{CheckDigit}`. Without it, the OZG-RE portal will reject the upload. + +**Delivery:** Upload the XML file at [www.ozg-re.de](https://www.ozg-re.de) (federal) or the relevant state portal listed in the purchase order. + +--- + +#### State government example (Bavaria) + +| Field | Value | +|---|---| +| Company name | Bayerisches Staatsministerium für Finanzen | +| Street address | Odeonsplatz 4 | +| Postal code | 80539 | +| City | München | +| Country | Germany | +| Tax ID / VAT number | DE811335839 | +| Leitweg-ID | 09-0000-0 | +| E-Invoicing version | XRechnung 3.0 | + +**Note:** Some Bavarian municipal entities accept ZUGFeRD instead of XRechnung. Confirm with the contracting authority before generating the invoice. + +--- + +#### Validation + +- **KoSIT Validator** — the official German XRechnung validator: [projekte.kosit.org/kosit/validator](https://projekte.kosit.org/kosit/validator) +- Validate before every first submission to a new government entity — field requirements vary slightly between federal and state portals. + +--- + +## Related pages + +- [Factur-X and ZUGFeRD](/en/1.7/e-invoicing/factur-x) — CII embedded in PDF; built-in templates (Germany B2B, France) +- [UBL](/en/1.7/e-invoicing/ubl) — the other EN 16931 syntax; basis of Peppol +- [Setup guide](/en/1.7/e-invoicing/setup) diff --git a/docs/en/1.7/e-invoicing/custom-templates.md b/docs/en/1.7/e-invoicing/custom-templates.md new file mode 100644 index 0000000..b9819ca --- /dev/null +++ b/docs/en/1.7/e-invoicing/custom-templates.md @@ -0,0 +1,155 @@ +# Custom XML Templates + +InvoicePlane's e-invoicing system is built around pairs of files: one that describes the format and one that generates the XML. This makes it straightforward to add support for any e-invoicing standard that isn't already covered by the built-in templates or the community repository. + +--- + +## The two-file system + +Each e-invoicing format requires two files: + +| File | Location | Role | +|---|---|---| +| Configuration file | `application/helpers/XMLconfigs/` | Tells InvoicePlane how to display and handle this format | +| Generator file | `application/libraries/XMLtemplates/` | Produces the actual XML output | + +Both files use the same **short identifier** as their base name. The generator adds `Xml` before the extension. For a format identified as `MyFormatv10`: + +- Config: `application/helpers/XMLconfigs/MyFormatv10.php` +- Generator: `application/libraries/XMLtemplates/MyFormatv10Xml.php` + +The short identifier can be up to 25 characters, letters and numbers only, no spaces or special characters. + +--- + +## Configuration file + +Create `application/helpers/XMLconfigs/MyFormatv10.php`: + +```php + 'My Country E-Invoice v1.0', + 'countrycode' => 'XX', + 'embedXML' => false, + 'XMLname' => 'invoice.xml', +]; +``` + +### Required keys + +| Key | Type | Description | +|---|---|---| +| `full-name` | string | Display name shown in the E-Invoicing version dropdown on client records | +| `countrycode` | string | ISO 3166-1 alpha-2 country code (e.g. `DE`, `FR`, `CZ`, `IT`) | +| `embedXML` | bool | `true` = embed XML inside a PDF/A-3; `false` = produce standalone XML | +| `XMLname` | string | Filename for the XML file; used as the embedded attachment name when `embedXML` is `true` | + +### Optional keys + +| Key | Type | Description | +|---|---|---| +| `generator` | string | Override the generator filename (default: `{ShortID}Xml.php`) | +| `options` | mixed | Pass additional configuration values to the generator | +| `legacy_calculation` | bool | Force legacy tax and discount calculation mode | + +### Dynamic filenames + +You can include `{{{invoice_number}}}` in `XMLname` to embed the invoice number in the filename: + +```php +'XMLname' => 'invoice-{{{invoice_number}}}.xml', +``` + +### Embedding into PDF/A-3 + +When `embedXML` is `true`, InvoicePlane generates a PDF/A-3 archive file and attaches the XML inside it according to the ISO 19005-3 standard, including the required XMP metadata. This is the mechanism used by Factur-X and ZUGFeRD. The `XMLname` value becomes the filename of the attachment inside the PDF. + +--- + +## Generator file + +Create `application/libraries/XMLtemplates/MyFormatv10Xml.php`: + +```php +formatOutput = true; + + $root = $dom->createElementNS('urn:example:myformat:1.0', 'Invoice'); + $dom->appendChild($root); + + // Invoice number + $id = $dom->createElement('ID', htmlspecialchars($invoice['invoice_number'])); + $root->appendChild($id); + + // Issue date + $date = $dom->createElement('IssueDate', $invoice['invoice_date_created']); + $root->appendChild($date); + + // ... add all required elements + + return $dom->saveXML(); + } +} +``` + +### Method signature + +The generator class must have a public `xml()` method. InvoicePlane calls it with: + +| Parameter | Type | Contents | +|---|---|---| +| `$invoice` | array | Invoice header data (number, date, totals, tax amounts, currency, etc.) | +| `$client` | array | Client record (name, address, VAT number, e-invoicing fields) | +| `$items` | array | Array of line items (description, quantity, unit price, tax rate, line total) | +| `$options` | array | Values from the `options` key in the config file, if any | + +The method must return the XML string. + +### Using DOMDocument + +PHP's built-in `DOMDocument` class is recommended for building XML. It handles character encoding, namespace declarations, and well-formedness automatically. Avoid building XML by string concatenation — it is easy to produce invalid or unescaped output. + +### Reference implementations + +Study the built-in templates before writing your own: + +- `application/libraries/XMLtemplates/FacturXv1Xml.php` — Factur-X EN16931 (CII + PDF/A embedding) +- `application/libraries/XMLtemplates/ZUGFeRDv21Xml.php` — ZUGFeRD 2.1 EN16931 + +Community templates in the [InvoicePlane e-invoices repository](https://github.com/InvoicePlane/InvoicePlane-e-invoices) cover Peppol BIS Billing 3.0, ISDOC, FatturaPA, Facturae, and XRechnung. + +--- + +## Testing your template + +1. Create a test client with all required fields filled in +2. Enable e-invoicing on the client and select your new template +3. Create a test invoice +4. Download the PDF (for embedded formats) or the XML file (for standalone formats) +5. Validate the output using the appropriate schema validator for your format: + - Peppol BIS Billing 3.0: [OpenPeppol Validator](https://peppol.org/technical-documentation/) + - ZUGFeRD / Factur-X: [Mustang Project Validator](https://www.mustangproject.org/validator/) + - XRechnung: [KoSIT Validator](https://projekte.kosit.org/kosit/validator) + - FatturaPA: the [Fatture e Corrispettivi portal](https://ivaservizi.agenziaentrate.gov.it) has a built-in validator + - Facturae: the Spanish [AEAT Facturae validator](https://www.facturae.gob.es) + +--- + +## Sharing your template + +If your template may be useful to other InvoicePlane users, consider contributing it to the [InvoicePlane e-invoices repository](https://github.com/InvoicePlane/InvoicePlane-e-invoices) via a pull request. + +--- + +## Related pages + +- [E-invoicing overview](/en/1.7/e-invoicing) — standards map +- [Setup guide](/en/1.7/e-invoicing/setup) — installing templates +- [Factur-X and ZUGFeRD](/en/1.7/e-invoicing/factur-x) — built-in template reference diff --git a/docs/en/1.7/e-invoicing/factur-x.md b/docs/en/1.7/e-invoicing/factur-x.md new file mode 100644 index 0000000..bdb4239 --- /dev/null +++ b/docs/en/1.7/e-invoicing/factur-x.md @@ -0,0 +1,171 @@ +# Factur-X and ZUGFeRD + +Factur-X and ZUGFeRD are the same technical standard: a **PDF/A-3 document with a [CII](/en/1.7/e-invoicing/cii) XML file embedded inside**. The recipient receives one file that is both human-readable as a PDF and machine-processable as structured XML. + +Both formats are built in to InvoicePlane 1.7 — no extra files need to be installed. + +--- + +## Factur-X vs ZUGFeRD + +| | Factur-X | ZUGFeRD | +|---|---|---| +| Origin | France (FNFE-MPE) | Germany (Forum elektronische Rechnung) | +| XML schema | CII D16B | CII D16B — identical | +| Profiles | MINIMUM, BASIC WL, BASIC, EN 16931, EXTENDED | Same profiles | +| Embedded XML filename | `factur-x.xml` | `ZUGFeRD-invoice.xml` | +| Conformance URN | `urn:factur-x.eu:1p0:{profile}` | `urn:factur-x.eu:1p0:{profile}` — same URN | + +The two standards were deliberately harmonised. A ZUGFeRD 2.1 invoice is a valid Factur-X invoice and vice versa — the only distinguishing factor is the embedded filename and which country's accounting software expects which name. + +In InvoicePlane: +- Use the **Factur-X** template for France (embedded filename: `factur-x.xml`) +- Use the **ZUGFeRD** template for Germany (embedded filename: `ZUGFeRD-invoice.xml`) + +--- + +## Profiles + +Both standards offer five profiles, each representing a different level of data completeness. A higher profile contains more structured data but requires more fields to be filled in on the invoice. + +| Profile | Description | Typical use | +|---|---|---| +| **MINIMUM** | Basic invoice identification only — no line items, no tax breakdown | Archiving; not sufficient for processing | +| **BASIC WL** | Header-level totals and tax, no line items | Summary invoices | +| **BASIC** | Line items included but with limited detail | Simple invoices | +| **EN 16931** | Full EN 16931 compliance — all required and recommended fields | Standard business invoices (most common) | +| **EXTENDED** | EN 16931 plus optional extended fields | Complex invoices with logistics or project data | + +**InvoicePlane's built-in templates use the EN 16931 profile.** This is the right choice for most business invoices and satisfies the mandatory e-invoicing requirements in Germany and France. + +--- + +## How PDF embedding works + +A PDF/A-3 document is a PDF that conforms to the ISO 19005-3 archival standard. Unlike regular PDFs, PDF/A-3 allows structured XML attachments to be embedded in the file's metadata in a way that software tools can reliably detect and extract. + +InvoicePlane handles the PDF/A compliance and the RDF metadata that links the XML to the PDF automatically. You do not need to do anything extra — generate the invoice as usual, and the embedding happens behind the scenes. + +The embedded file is visible in Adobe Acrobat Reader under: +> View → Show/Hide → Navigation Panes → Attachments + +Third-party tools such as [Factur-X Python](https://github.com/akretion/factur-x) or [Mustang](https://www.mustangproject.org/) can extract and validate the embedded XML from the command line. + +--- + +## Selecting the Factur-X profile on a client record + +The InvoicePlane built-in templates are: + +- **Factur-X EN16931** — for French clients; embedded filename `factur-x.xml` +- **ZUGFeRD 2.1 EN16931** — for German clients; embedded filename `ZUGFeRD-invoice.xml` + +To switch to a different profile (for example MINIMUM or EXTENDED), you would need to [create a custom template](/en/1.7/e-invoicing/custom-templates) with the appropriate profile URN in the XML. + +--- + +## Validation + +Before sending, you can validate the XML output: + +- **Mustang Project Validator** — validates ZUGFeRD and Factur-X XML against the official schema +- **Factur-X online validator** (FNFE-MPE) — French official validator +- **EN 16931 validation rules** — published by the European Commission, implemented in many tools + +--- + +## Required client fields + +See [Setup — Step 3](/en/1.7/e-invoicing/setup#step-3--fill-in-the-required-client-fields) for the base set of required fields. Factur-X and ZUGFeRD do not require any fields beyond the standard set. + +--- + +## Examples + +### Germany — ZUGFeRD B2B invoice (built-in template) + +ZUGFeRD is the dominant format for domestic B2B invoices between German companies. Mandatory from 1 January 2025 under § 14 UStG. + +German VAT numbers (**USt-IdNr.**) start with `DE` followed by 9 digits. + +| Field | Value | +|---|---| +| Company name | Muster GmbH | +| Street address | Unter den Linden 1 | +| Postal code | 10117 | +| City | Berlin | +| Country | Germany | +| Tax ID / VAT number | DE123456789 | +| E-Invoicing version | ZUGFeRD 2.1 EN16931 | + +**Delivery:** Send the PDF by email or file transfer. The XML is embedded inside it. German ERP systems (SAP, DATEV, Lexware, Sage, Sevdesk) extract and import it automatically. To verify the embedded file, open in Adobe Acrobat Reader → Attachments panel — you should see `ZUGFeRD-invoice.xml`. + +> German B2G invoices require **XRechnung** (standalone CII), not ZUGFeRD. See [CII → XRechnung](/en/1.7/e-invoicing/cii#xrechnung--germany-b2g). + +--- + +### France — Factur-X B2B invoice (built-in template) + +Factur-X is France's standard for B2B invoices. Mandatory in phases: large companies from September 2026, others following. + +French VAT numbers (**numéro TVA**) start with `FR` followed by 2 alphanumeric characters and 9 digits. + +| Field | Value | +|---|---| +| Company name | Dupont SARL | +| Street address | 10 Rue de Rivoli | +| Postal code | 75001 | +| City | Paris | +| Country | France | +| Tax ID / VAT number | FR12345678901 | +| E-Invoicing version | Factur-X EN16931 | + +**Delivery:** Send the PDF by email or upload to your PDP (Plateforme de Dématérialisation Partenaire) platform. The embedded XML filename is `factur-x.xml`. + +--- + +### France — B2G via Chorus Pro + +Government invoices go through **Chorus Pro**, the French government e-invoice portal. Factur-X is accepted; the portal validates the embedded XML and routes it to the correct department. + +| Field | Value | +|---|---| +| Company name | Direction Générale des Finances Publiques | +| Street address | 139 Rue de Bercy | +| Postal code | 75572 | +| City | Paris Cedex 12 | +| Country | France | +| Tax ID / VAT number | FR83000017594 | +| E-Invoicing version | Factur-X EN16931 | + +**Before generating:** the government entity must provide you with their **service code** (SIRET + service identifier) and **engagement number** from the purchase order. Include these in the invoice's reference fields. + +**Delivery:** Log in to [chorus-pro.gouv.fr](https://chorus-pro.gouv.fr), upload the Factur-X PDF, and note the receipt tracking number. + +--- + +### Austria — ZUGFeRD (cross-border, alternative to Peppol) + +Austria uses Peppol for B2G, but German-speaking companies sometimes exchange ZUGFeRD invoices directly for B2B. + +Austrian VAT numbers start with `AT` followed by `U` and 8 digits. + +| Field | Value | +|---|---| +| Company name | Wien Holding GmbH | +| Street address | Franz-Josefs-Kai 47 | +| Postal code | 1010 | +| City | Wien | +| Country | Austria | +| Tax ID / VAT number | ATU12345678 | +| E-Invoicing version | ZUGFeRD 2.1 EN16931 | + +**Note:** Austrian B2G requires Peppol BIS Billing 3.0, not ZUGFeRD. Use ZUGFeRD only for direct B2B exchanges where both parties agree on the format. + +--- + +## Related pages + +- [CII](/en/1.7/e-invoicing/cii) — the underlying XML syntax; also covers XRechnung (Germany B2G) +- [Custom XML templates](/en/1.7/e-invoicing/custom-templates) — how to create a template for a different profile +- [Setup guide](/en/1.7/e-invoicing/setup) diff --git a/docs/en/1.7/e-invoicing/facturae.md b/docs/en/1.7/e-invoicing/facturae.md new file mode 100644 index 0000000..f01084a --- /dev/null +++ b/docs/en/1.7/e-invoicing/facturae.md @@ -0,0 +1,247 @@ +# Facturae — Spanish E-Invoice Format + +## What is Facturae? + +**Facturae** is the Spanish national e-invoice format, defined by the Spanish Tax Agency (AEAT) and the Ministry of Industry. It uses its own XML schema and is separate from the international UBL and CII standards. + +The current version is **Facturae 3.2.1**, which has been the stable version since 2015. Version 3.2 is also still accepted by some portals. + +--- + +## Legal requirement + +### B2G (business to government) + +E-invoicing via Facturae is **mandatory for all invoices to Spanish public administrations** (central government, regional governments, and local governments) since 2015. All such invoices must be submitted through the **FACe** portal or a compatible regional portal. + +### B2B (business to business) + +Private-sector B2B e-invoicing is being introduced in stages: +- Large companies (turnover > €8M): mandatory from 2025 +- Medium and small companies: mandatory from 2026 +- Micro-enterprises and freelancers: later phase (dates subject to change) + +The B2B mandate uses an updated format called **Facturae B2B**, delivered via the **Verifactu** system or compatible platforms. + +--- + +## Digital signature requirement + +This is the most important difference between Facturae and other e-invoice formats: **Facturae files must be digitally signed** before submission. An unsigned Facturae XML is not legally valid. + +The required signature format is **XAdES-EPES** (XML Advanced Electronic Signature — Explicitly Policy-related Electronic Signatures), using a qualified digital certificate issued by a recognised Spanish certification authority (FNMT, ACCV, Camerfirma, and others). + +InvoicePlane generates the **unsigned** Facturae XML. You must sign it using a separate tool before uploading to FACe or sending to a B2B recipient. + +**Signing tools:** + +- **@firma** — free signing tool provided by the Spanish government +- **AutoFirma** — browser-integrated signing tool (Spanish government) +- **MiniApplet firma** — web-based signing via browser plugin +- Signing APIs offered by intermediary providers + +--- + +## The FACe portal + +**FACe** (Punto General de Entrada de Facturas Electrónicas de la Administración General del Estado) is the central e-invoice receiving portal for the Spanish central government and many regional administrations. + +To submit via FACe: + +1. Sign the Facturae XML using your digital certificate +2. Log in to [face.gob.es](https://face.gob.es) with your digital certificate +3. Upload the signed `.xsig` file +4. FACe validates the invoice and routes it to the relevant government department +5. You receive a reception acknowledgement; track the status in your FACe account + +Regional governments may use their own portals (e.g. e.FACT in Catalonia, OVACEN in Valencia) but most also accept FACe. + +--- + +## Facturae XML structure + +Facturae uses a distinct XML namespace and structure: + +```xml + + + + + 3.2.1 + I + EU + + INV-2025-0001 + 1 + ... + + + + + + + J + R + ESB12345678 + + ... + + ... + + + + + + 2025-0001 + INV + FC + OO + ... + + ... + ... + ... + ... + + + + +``` + +The digital signature is attached to the document root after signing, adding a `` block. + +--- + +## InvoicePlane template + +**Template name:** `Facturaev32` — download from the [InvoicePlane e-invoices repository](https://github.com/InvoicePlane/InvoicePlane-e-invoices). + +The template generates unsigned XML. You sign it separately before submitting. + +--- + +## Required client fields for Facturae + +In addition to the [standard required fields](/en/1.7/e-invoicing/setup#step-3--fill-in-the-required-client-fields): + +| Field | Notes | +|---|---| +| Tax ID / VAT number | Spanish NIF/VAT: `ES` + 9 characters (letter, 7 digits, letter or digit). Example: `ESB12345678` | +| Official supplier code (DIR3) | Required for B2G invoices. Three codes identify the administrative unit: Órgano gestor, Unidad tramitadora, Oficina contable. Ask the government entity for their DIR3 codes. | + +DIR3 codes for B2G invoices are provided by the contracting authority in the purchase order or contract. Without them, FACe cannot route the invoice to the correct department. + +--- + +## Peppol as an alternative + +For cross-border invoices to foreign clients, Peppol BIS Billing 3.0 is simpler than Facturae and does not require a digital signature. Use Facturae specifically for Spanish B2G and domestic B2B invoices. + +--- + +## Examples + +All examples use the **`Facturaev32`** template. The signing step after generating the XML applies to every Facturae invoice. + +Spanish VAT numbers (**NIF/CIF**) start with `ES` followed by 9 characters. + +| Entity type | Format | Example | +|---|---|---| +| Legal entity (CIF) | `ES` + letter + 7 digits + letter/digit | `ESB12345678` | +| Individual (NIF) | `ES` + 8 digits + letter | `ES12345678Z` | +| Foreign entity (NIE) | `ES` + X/Y/Z + 7 digits + letter | `ESX1234567Z` | + +--- + +### B2G invoice — Spanish central government via FACe + +DIR3 codes are required. They are always provided in the purchase order from the contracting authority. + +| Field | Value | +|---|---| +| Company name | Agencia Estatal de Administración Tributaria | +| Street address | Calle Alcalá 5 | +| Postal code | 28014 | +| City | Madrid | +| Country | Spain | +| Tax ID / VAT number | ESQ2826004J | +| Órgano gestor (DIR3) | E00120001 | +| Unidad tramitadora (DIR3) | E00120101 | +| Oficina contable (DIR3) | E00120102 | +| E-Invoicing version | Facturae 3.2.1 | + +**Delivery:** +1. Generate XML in InvoicePlane +2. Open AutoFirma, load the XML, sign with your certificate — produces a `.xsig` file +3. Log in to [face.gob.es](https://face.gob.es) and upload the `.xsig` +4. Note the tracking number for status follow-up + +--- + +### B2G invoice — Spanish municipality + +Municipalities are on FACe too. The DIR3 codes for each municipality are in the [DIR3 directory](https://administracionelectronica.gob.es/ctt/dir3). + +| Field | Value | +|---|---| +| Company name | Ayuntamiento de Barcelona | +| Street address | Plaça de Sant Jaume 1 | +| Postal code | 08002 | +| City | Barcelona | +| Country | Spain | +| Tax ID / VAT number | ESP0801933J | +| Órgano gestor (DIR3) | L01080193 | +| Unidad tramitadora (DIR3) | L01080193 | +| Oficina contable (DIR3) | L01080193 | +| E-Invoicing version | Facturae 3.2.1 | + +--- + +### B2B invoice — Spanish private company + +The Verifactu system (B2B mandate from 2025/2026) uses Facturae. The signing requirement is the same. + +| Field | Value | +|---|---| +| Company name | García Construcciones SL | +| Street address | Calle Mayor 5 | +| Postal code | 28013 | +| City | Madrid | +| Country | Spain | +| Tax ID / VAT number | ESB12345678 | +| E-Invoicing version | Facturae 3.2.1 | + +**Delivery:** Sign the XML with AutoFirma and send the `.xsig` file to the client by email or via a B2B e-invoicing platform. The client's accounting software imports the signed XML directly. + +--- + +### B2G invoice — Catalonia regional government via e.FACT + +Catalonia has its own portal, [e.FACT](https://efact.eacat.cat), which accepts Facturae. The workflow is the same as FACe — sign, then upload. DIR3 codes still apply. + +| Field | Value | +|---|---| +| Company name | Departament de Salut, Generalitat de Catalunya | +| Street address | Travessera de les Corts 131-159 | +| Postal code | 08028 | +| City | Barcelona | +| Country | Spain | +| Tax ID / VAT number | ESQ0801175A | +| Órgano gestor (DIR3) | A09018933 | +| Unidad tramitadora (DIR3) | A09018933 | +| Oficina contable (DIR3) | A09018933 | +| E-Invoicing version | Facturae 3.2.1 | + +--- + +### Cross-border invoice from Spain — use Peppol instead + +For invoices to foreign clients (EU or otherwise), use Peppol BIS Billing 3.0. It requires no digital signature and is delivered via the Peppol network. See [Peppol](/en/1.7/e-invoicing/peppol). + +--- + +## Related pages + +- [Peppol](/en/1.7/e-invoicing/peppol) — for cross-border invoices from Spain +- [Setup guide](/en/1.7/e-invoicing/setup) diff --git a/docs/en/1.7/e-invoicing/fatturaPA.md b/docs/en/1.7/e-invoicing/fatturaPA.md new file mode 100644 index 0000000..2290add --- /dev/null +++ b/docs/en/1.7/e-invoicing/fatturaPA.md @@ -0,0 +1,276 @@ +# FatturaPA — Italian E-Invoice Format + +## What is FatturaPA? + +**FatturaPA** (Fattura Pubblica Amministrazione, literally "public administration invoice") is Italy's mandatory national e-invoice format. Despite the name, it is used for **all** domestic B2B and B2C invoices in Italy — not just government invoices. + +FatturaPA uses its own XML schema defined by the Italian Revenue Agency (Agenzia delle Entrate). It is not derived from UBL or CII. + +--- + +## Legal requirement + +E-invoicing via FatturaPA is **mandatory for all VAT-registered Italian businesses** for: + +- B2B domestic invoices (since 1 January 2019) +- B2G invoices (since 2015) +- B2C invoices (since 2019 for private individuals too) + +Failure to issue invoices in FatturaPA format results in tax penalties. There is no opt-out. + +Foreign companies invoicing Italian customers are not legally required to use FatturaPA (they are not Italian VAT-registered), but many Italian clients will request it for easier processing. + +--- + +## The SdI system + +FatturaPA invoices are not sent directly to the customer. They must go through the **SdI** (Sistema di Interscambio — Interchange System), the Italian Revenue Agency's document hub. + +The flow: + +``` +[Sender] ──▶ [SdI] ──▶ [Recipient] + validates forwards + signs (or rejects) + timestamps +``` + +1. You submit the FatturaPA XML to SdI (directly or via a certified intermediary) +2. SdI validates the document and affixes a digital receipt timestamp +3. SdI forwards the invoice to the recipient using their routing address (codice destinatario or PEC) +4. SdI notifies you of acceptance or rejection within 5 business days +5. A rejected invoice must be corrected and resubmitted + +**The SdI validation is legally binding.** An invoice that was not routed through SdI does not exist for tax purposes. + +--- + +## Routing the invoice to the recipient + +To route the invoice, SdI needs the recipient's address. There are two options: + +### Codice destinatario + +A **codice destinatario** is a 7-character alphanumeric code assigned to a company's SdI inbox. Large companies and intermediary service providers have one. Ask your Italian client for their codice destinatario before generating the first invoice. + +Example: `ABC1234` + +If the client gives you `0000000` (seven zeros), they use a PEC address instead. + +### PEC (Posta Elettronica Certificata) + +A **PEC** is a certified email address. FatturaPA invoices can be routed to a company's PEC address as an alternative to the codice destinatario. Ask your client which they prefer. + +Example: `fatture@pec.azienda.it` + +--- + +## FatturaPA XML structure + +FatturaPA has a different XML structure from UBL or CII: + +```xml + + + + + + + IT + 12345678901 + + 00001 + FPR12 + ABC1234 + + ... + ... + + + + + + TD01 + EUR + 2025-06-01 + INV-2025-0001 + + + ... + ... + + + +``` + +The `TipoDocumento` code identifies the document type: +- `TD01` — standard invoice +- `TD04` — credit note +- `TD05` — debit note + +--- + +## InvoicePlane template + +**Template name:** `FatturaPAv12` (or similar) — download from the [InvoicePlane e-invoices repository](https://github.com/InvoicePlane/InvoicePlane-e-invoices). + +This template generates a standalone XML file. It does **not** embed XML in a PDF — SdI accepts only the XML file. + +--- + +## Required client fields for FatturaPA + +In addition to the [standard required fields](/en/1.7/e-invoicing/setup#step-3--fill-in-the-required-client-fields): + +| Field | Notes | +|---|---| +| Tax ID / VAT number | Italian VAT number (Partita IVA): `IT` followed by 11 digits. Example: `IT12345678901` | +| Codice destinatario | 7 alphanumeric characters. Use `0000000` if the client uses PEC instead | +| PEC address | Certified email for routing; only required if codice destinatario is `0000000` | +| Codice fiscale | Fiscal code (16 chars for individuals; same as Partita IVA for companies); required for B2C | + +--- + +## Submitting to SdI + +You have two options: + +### Via a certified intermediary (recommended) + +An intermediary (intermediario) is a service provider certified by the Italian Revenue Agency. They accept your FatturaPA XML and handle the SdI submission, error handling, and storage on your behalf. Most Italian accounting software providers and many European SaaS platforms offer this service. + +### Direct submission + +You can submit directly to SdI via: +- The **Fatture e Corrispettivi** web portal (portal.agenziaentrate.gov.it) — manual upload +- The **SdI API** — requires a qualified digital certificate (firma digitale) for authentication + +Direct submission is practical only if you are an Italian VAT-registered business or have an Italian digital certificate. + +--- + +## Storage obligations + +Italian law requires you to store FatturaPA invoices for at least **10 years**. SdI stores invoices for 15 years; you can retrieve them from the portal if needed. Many intermediary services include long-term archival. + +--- + +## Examples + +All examples use the **`FatturaPAv12`** template. The Partita IVA format (`IT` + 11 digits) is consistent across all entity types; what changes is the routing address (codice destinatario vs PEC) and the document type. + +Italian VAT numbers (**Partita IVA**) start with `IT` followed by 11 digits. + +--- + +### B2B invoice — routing via codice destinatario + +Most companies that regularly receive e-invoices have a 7-character codice destinatario registered with SdI. Ask your client for it before generating the first invoice. + +| Field | Value | +|---|---| +| Company name | Bianchi S.r.l. | +| Street address | Via Roma 10 | +| Postal code | 00100 | +| City | Roma | +| Country | Italy | +| Tax ID / VAT number | IT12345678901 | +| Codice destinatario | XJ5ETH7 | +| E-Invoicing version | FatturaPA v1.2 | + +**Delivery:** Submit the XML via your SdI intermediary or the Fatture e Corrispettivi portal. SdI routes it directly to the client's SdI inbox. + +--- + +### B2B invoice — routing via PEC (certified email) + +Smaller companies may not have a codice destinatario. Enter `0000000` in that field and fill in their PEC address instead. SdI delivers to the PEC. + +| Field | Value | +|---|---| +| Company name | Studio Rossi SRL | +| Street address | Corso Umberto I 15 | +| Postal code | 20121 | +| City | Milano | +| Country | Italy | +| Tax ID / VAT number | IT98765432109 | +| Codice destinatario | 0000000 | +| PEC address | studio.rossi@pec.it | +| E-Invoicing version | FatturaPA v1.2 | + +--- + +### B2B invoice — client not registered with SdI + +Enter `0000000` for the codice destinatario and leave PEC blank. SdI marks the invoice as delivered and the client must retrieve it themselves from the SdI web area using their tax credentials. This is the fallback for clients who are slow to set up SdI routing. + +| Field | Value | +|---|---| +| Company name | Artigiano Verdi | +| Codice destinatario | 0000000 | +| PEC address | (leave blank) | +| E-Invoicing version | FatturaPA v1.2 | + +--- + +### B2G invoice — Italian central government + +Government entities have a **codice IPA** (from the IPA directory) that maps to their SdI inbox. The codice IPA is also a 6-character alphanumeric code and is used as the codice destinatario for public administration. + +| Field | Value | +|---|---| +| Company name | Ministero dell'Economia e delle Finanze | +| Street address | Via XX Settembre 97 | +| Postal code | 00187 | +| City | Roma | +| Country | Italy | +| Tax ID / VAT number | IT97735020584 | +| Codice destinatario | UFUHP5 | +| Codice CIG / CUP | CIG: 12345678AB (from contract) | +| E-Invoicing version | FatturaPA v1.2 | + +**CIG/CUP codes:** Public procurement invoices must include the CIG (Codice Identificativo Gara, from the tender) and/or CUP (Codice Unico di Progetto, from the project). These are provided in the purchase order. Without them, the government entity will reject the invoice. + +--- + +### B2G invoice — Italian municipality + +| Field | Value | +|---|---| +| Company name | Comune di Firenze | +| Street address | Piazza della Signoria 1 | +| Postal code | 50122 | +| City | Firenze | +| Country | Italy | +| Tax ID / VAT number | IT01307110484 | +| Codice destinatario | UFE0V1 | +| E-Invoicing version | FatturaPA v1.2 | + +The codice IPA for each municipality is in the [IPA directory](https://indicepa.gov.it). + +--- + +### B2C invoice — private individual + +For invoices to private individuals, use the **codice fiscale** (fiscal code) instead of a Partita IVA. The codice fiscale is 16 alphanumeric characters. + +| Field | Value | +|---|---| +| First / Last name | Mario Rossi | +| Street address | Via Garibaldi 5 | +| Postal code | 50123 | +| City | Firenze | +| Country | Italy | +| Codice fiscale | RSSMRA80A01H501Z | +| Codice destinatario | 0000000 | +| E-Invoicing version | FatturaPA v1.2 | + +SdI delivers the invoice to the individual's personal fiscal area on the Revenue Agency website. + +--- + +## Related pages + +- [CII](/en/1.7/e-invoicing/cii) — for comparison: the international CII-based formats +- [Setup guide](/en/1.7/e-invoicing/setup) diff --git a/docs/en/1.7/e-invoicing/index.md b/docs/en/1.7/e-invoicing/index.md new file mode 100644 index 0000000..3743335 --- /dev/null +++ b/docs/en/1.7/e-invoicing/index.md @@ -0,0 +1,99 @@ +# E-Invoicing + +E-invoicing in InvoicePlane means generating structured XML data alongside or embedded within PDF invoices. This XML is machine-readable, which allows receiving companies and government portals to import it directly into their accounting systems without manual data entry. + +--- + +## Standards landscape + +E-invoicing standards come in two layers: the **syntax** (the XML format) and the **transport** (how the file reaches the other party). InvoicePlane generates the XML; transport is a separate step that varies by country. + +### Syntax standards + +There are two international XML syntaxes and several national formats derived from them. + +``` +UBL (Universal Business Language — OASIS) +├── Peppol BIS Billing 3.0 profile used on the Peppol network +├── ISDOC Czech national format (UBL-derived) +└── UBL.BE Belgian profile (essentially Peppol BIS) + +CII (Cross Industry Invoice — UN/CEFACT) +├── Factur-X France — CII embedded inside a PDF/A-3 file +├── ZUGFeRD 2.x Germany — identical to Factur-X, different embedded filename +└── XRechnung Germany (B2G only) — standalone CII, not embedded + +National proprietary formats +├── FatturaPA Italy — mandatory for all domestic invoices, own XML schema +└── Facturae Spain — B2G, own XML schema, requires digital signature +``` + +### EN 16931 — the European semantic standard + +EN 16931 is the European standard that defines **what data an invoice must contain**. It does not define the XML format; it can be expressed in either UBL or CII syntax. Peppol BIS Billing 3.0, Factur-X, ZUGFeRD, and XRechnung are all EN 16931-compliant profiles — they differ in syntax and additional rules but share the same core data model. + +### Transport + +Peppol is the main transport network for EU e-invoicing. It carries UBL or CII documents between certified access points. Italy (SdI) and Spain (FACe) have their own national delivery hubs with different submission procedures. + +--- + +## Which format do I need? + +| Situation | Format to use | +|---|---| +| Invoicing a German company (B2B) | [ZUGFeRD 2.x](/en/1.7/e-invoicing/factur-x) | +| Invoicing the German government (B2G) | [XRechnung](/en/1.7/e-invoicing/cii) via OZG-RE portal | +| Invoicing a French company | [Factur-X](/en/1.7/e-invoicing/factur-x) | +| Invoicing any company via the Peppol network | [Peppol BIS Billing 3.0](/en/1.7/e-invoicing/peppol) | +| Invoicing in Belgium (mandatory since 2026) | [Peppol BIS Billing 3.0](/en/1.7/e-invoicing/peppol) | +| Invoicing in Sweden (B2G mandatory) | [Peppol BIS Billing 3.0](/en/1.7/e-invoicing/peppol) | +| Invoicing in Italy (mandatory for all domestic) | [FatturaPA](/en/1.7/e-invoicing/fatturaPA) via SdI | +| Invoicing the Spanish government (B2G) | [Facturae](/en/1.7/e-invoicing/facturae) via FACe | +| Invoicing a Czech company (B2B domestic) | [ISDOC](/en/1.7/e-invoicing/isdoc) | +| Invoicing the Czech government (B2G) | [Peppol BIS Billing 3.0](/en/1.7/e-invoicing/peppol) via NIPEZ | + +--- + +## Documentation sections + +### Setup and configuration + +- [Setup guide](/en/1.7/e-invoicing/setup) — requirements, installing templates, enabling e-invoicing on a client, generating and verifying output +- [Custom XML templates](/en/1.7/e-invoicing/custom-templates) — how to create your own format using the config + generator file pair + +### Standards reference + +Each standard page includes worked examples covering every country where that standard is used. + +- [UBL](/en/1.7/e-invoicing/ubl) — Universal Business Language; the syntax behind Peppol BIS Billing 3.0 and ISDOC +- [CII](/en/1.7/e-invoicing/cii) — Cross Industry Invoice; the syntax behind Factur-X, ZUGFeRD, and XRechnung; includes XRechnung examples (Germany B2G) +- [Factur-X and ZUGFeRD](/en/1.7/e-invoicing/factur-x) — CII embedded in PDF/A-3; built-in templates; includes examples for Germany (ZUGFeRD B2B), France (Factur-X B2B and Chorus Pro B2G), Austria +- [Peppol](/en/1.7/e-invoicing/peppol) — the EU transport network; includes examples for Belgium, Sweden, Czech Republic (B2G), Netherlands, Norway, Finland +- [ISDOC](/en/1.7/e-invoicing/isdoc) — Czech national format; includes examples for s.r.o., a.s., and OSVČ clients +- [FatturaPA](/en/1.7/e-invoicing/fatturaPA) — Italy's mandatory format and SdI hub; includes examples for B2B (codice destinatario and PEC), B2G (central and municipal), and B2C +- [Facturae](/en/1.7/e-invoicing/facturae) — Spain's national format and FACe portal; includes examples for central government, municipality, private company, and Catalonia regional portal + +--- + +## Country → standard lookup + +| Country | Scenario | Standard | Page | +|---|---|---|---| +| Czech Republic | B2B domestic | ISDOC | [ISDOC](/en/1.7/e-invoicing/isdoc) | +| Czech Republic | B2G (NIPEZ) | Peppol BIS Billing 3.0 | [Peppol](/en/1.7/e-invoicing/peppol) | +| Czech Republic | Cross-border | Peppol BIS Billing 3.0 | [Peppol](/en/1.7/e-invoicing/peppol) | +| Belgium | B2G and B2B (mandatory from 2026) | Peppol BIS Billing 3.0 | [Peppol](/en/1.7/e-invoicing/peppol) | +| Germany | B2B domestic | ZUGFeRD 2.1 EN16931 | [Factur-X and ZUGFeRD](/en/1.7/e-invoicing/factur-x) | +| Germany | B2G (federal and state) | XRechnung | [CII](/en/1.7/e-invoicing/cii) | +| France | B2B | Factur-X EN16931 | [Factur-X and ZUGFeRD](/en/1.7/e-invoicing/factur-x) | +| France | B2G (Chorus Pro) | Factur-X EN16931 | [Factur-X and ZUGFeRD](/en/1.7/e-invoicing/factur-x) | +| Italy | B2B, B2G, B2C | FatturaPA via SdI | [FatturaPA](/en/1.7/e-invoicing/fatturaPA) | +| Spain | B2G (FACe and regional portals) | Facturae 3.2.1 | [Facturae](/en/1.7/e-invoicing/facturae) | +| Spain | B2B domestic | Facturae 3.2.1 | [Facturae](/en/1.7/e-invoicing/facturae) | +| Spain | Cross-border | Peppol BIS Billing 3.0 | [Peppol](/en/1.7/e-invoicing/peppol) | +| Sweden | B2G (mandatory) and B2B | Peppol BIS Billing 3.0 | [Peppol](/en/1.7/e-invoicing/peppol) | +| Netherlands | B2G (mandatory) | Peppol BIS Billing 3.0 | [Peppol](/en/1.7/e-invoicing/peppol) | +| Norway | B2G (mandatory) | Peppol BIS Billing 3.0 | [Peppol](/en/1.7/e-invoicing/peppol) | +| Finland | B2G (mandatory) | Peppol BIS Billing 3.0 | [Peppol](/en/1.7/e-invoicing/peppol) | +| Austria | B2G | Peppol BIS Billing 3.0 | [Peppol](/en/1.7/e-invoicing/peppol) | diff --git a/docs/en/1.7/e-invoicing/isdoc.md b/docs/en/1.7/e-invoicing/isdoc.md new file mode 100644 index 0000000..8df6303 --- /dev/null +++ b/docs/en/1.7/e-invoicing/isdoc.md @@ -0,0 +1,166 @@ +# ISDOC — Czech E-Invoice Format + +## What is ISDOC? + +**ISDOC** (Information System Document) is the Czech national e-invoice format. It was developed by the Czech Chamber of Commerce and the Czech software industry consortium (ICT Unie) and has been in use since 2009. + +ISDOC is based on **UBL 2.1** — it uses the UBL XML schema as its foundation and adds Czech-specific extensions for local tax identifiers, bank account formats, and other requirements. This means any software that can process UBL 2.1 can generally read an ISDOC invoice with minimal adaptation. + +The current version is **ISDOC 6.0.1**. + +--- + +## Who uses ISDOC? + +ISDOC is the format of choice for domestic **B2B** invoices between Czech companies. It is natively supported by the dominant Czech accounting and ERP software packages, including: + +- POHODA (Stormware) +- Money S3 / Money S4 (Seyfor) +- Helios (Asseco) +- Abra +- Pohoda +- FlexiBee + +Sending invoices as ISDOC XML allows your clients to import them directly into their accounting system without manually re-entering the data. + +--- + +## ISDOC vs Peppol — which to use? + +| Situation | Format | +|---|---| +| B2B domestic invoice to a Czech company | ISDOC | +| B2G invoice to a Czech government entity | Peppol BIS Billing 3.0 (via NIPEZ) | +| B2B cross-border invoice to a foreign company | Peppol BIS Billing 3.0 | +| Czech company invoicing in the EU on Peppol | Peppol BIS Billing 3.0 | + +The Czech government's public procurement portal NIPEZ accepts both ISDOC and Peppol BIS Billing 3.0 for B2G submissions, but Peppol BIS Billing 3.0 is the recommended standard for new implementations. + +--- + +## ISDOC structure + +ISDOC uses UBL 2.1 namespaces with an additional ISDOC namespace for extensions. A simplified example: + +```xml + + + + ISDOC:6.0.1 + INV-2025-0001 + 2025-06-01 + 380 + ... + + 123456-0987654321/0800 + ... + +``` + +--- + +## InvoicePlane template + +**Template name:** `ISDOCv6` (or similar) — download from the [InvoicePlane e-invoices repository](https://github.com/InvoicePlane/InvoicePlane-e-invoices). + +Install the two files (config + generator) as described in [Setup — Step 2](/en/1.7/e-invoicing/setup#step-2--install-additional-xml-templates). + +--- + +## Required client fields for ISDOC + +In addition to the [standard required fields](/en/1.7/e-invoicing/setup#step-3--fill-in-the-required-client-fields): + +| Field | Notes | +|---|---| +| Tax ID / VAT number | Czech VAT number: `CZ` followed by 8–10 digits. Example: `CZ12345678` | +| Czech business ID (IČO) | 8-digit company registration number. Example: `12345678` — enter in the custom fields if available | + +Czech companies have two identifiers: +- **DIČ** (Daňové identifikační číslo) — the VAT number, starts with `CZ`. This is the standard Tax ID / VAT number field. +- **IČO** (Identifikační číslo osoby) — the company registration number, 8 digits, no prefix. Some ISDOC validators require this. + +--- + +## Delivering an ISDOC invoice + +ISDOC files are typically sent directly to the recipient: + +- **By email** — attach the `.isdoc` XML file (and optionally a PDF) to your email +- **Via a data box (datová schránka)** — Czech government-mandated secure messaging system. Many larger Czech companies use data boxes for business document exchange. +- **Via a B2B platform** — some Czech e-invoicing platforms (e.g. eDoklady, Ariba) accept ISDOC uploads + +There is no central hub for ISDOC the way Italy has SdI. The recipient imports the XML directly into their accounting software. + +--- + +## Examples + +ISDOC is used exclusively for domestic Czech B2B invoices. The same template covers all scenarios; only the client data changes. + +**Template:** `ISDOCv6` — download from the [InvoicePlane e-invoices repository](https://github.com/InvoicePlane/InvoicePlane-e-invoices). + +Czech VAT numbers (**DIČ**) start with `CZ` followed by 8–10 digits. Czech companies also have an IČO (company registration number) of 8 digits without any prefix. + +--- + +### B2B invoice to a Czech s.r.o. (private limited company) + +| Field | Value | +|---|---| +| Company name | Novák s.r.o. | +| Street address | Václavské náměstí 1 | +| Postal code | 110 00 | +| City | Praha 1 | +| Country | Czech Republic | +| Tax ID / VAT number | CZ12345678 | +| E-Invoicing version | ISDOC v6.0.1 | + +**Delivery:** Email the `.isdoc` XML file, or send via the client's datová schránka (data box) if they prefer that channel. Most Czech accounting software (POHODA, Money S3, Helios) will import the ISDOC file on the client's end automatically. + +--- + +### B2B invoice to a Czech a.s. (joint-stock company) + +| Field | Value | +|---|---| +| Company name | Průmysl a.s. | +| Street address | Průmyslová 15 | +| Postal code | 612 00 | +| City | Brno | +| Country | Czech Republic | +| Tax ID / VAT number | CZ987654321 | +| E-Invoicing version | ISDOC v6.0.1 | + +--- + +### B2B invoice to a Czech sole trader (OSVČ) + +Sole traders in the Czech Republic have a DIČ based on their birth number (rodné číslo), which is 10 digits. + +| Field | Value | +|---|---| +| Company name | Jan Kovář — živnostník | +| Street address | Náměstí Míru 5 | +| Postal code | 301 00 | +| City | Plzeň | +| Country | Czech Republic | +| Tax ID / VAT number | CZ6512311234 | +| E-Invoicing version | ISDOC v6.0.1 | + +--- + +### B2G invoice to a Czech government entity — use Peppol instead + +Czech public bodies receive e-invoices via Peppol BIS Billing 3.0 through the NIPEZ portal, not via ISDOC. For B2G invoices, switch to the Peppol template and submit through a Peppol access point. See [Peppol — Czech Republic B2G example](/en/1.7/e-invoicing/peppol#czech-republic--b2g-via-nipez). + +--- + +## Related pages + +- [UBL](/en/1.7/e-invoicing/ubl) — the underlying XML syntax ISDOC derives from +- [Peppol](/en/1.7/e-invoicing/peppol) — for B2G and cross-border invoices from Czech Republic +- [Setup guide](/en/1.7/e-invoicing/setup) diff --git a/docs/en/1.7/e-invoicing/peppol.md b/docs/en/1.7/e-invoicing/peppol.md new file mode 100644 index 0000000..fa357b3 --- /dev/null +++ b/docs/en/1.7/e-invoicing/peppol.md @@ -0,0 +1,275 @@ +# Peppol + +## What is Peppol? + +**Peppol** (Pan-European Public Procurement On-Line) is a network infrastructure for exchanging e-invoices, orders, and other business documents between companies and governments across Europe and beyond. It is not an XML format — it is a **transport layer** that carries [UBL](/en/1.7/e-invoicing/ubl) or CII XML documents. + +Think of Peppol as a secure postal network for business documents: you hand your document to your certified carrier (access point), and it is delivered to the recipient's carrier, who hands it to the recipient. + +Peppol is managed by the **OpenPeppol** association and is mandatory for public-sector procurement in many EU member states. + +--- + +## Peppol BIS Billing 3.0 — the invoice format + +The invoice format used on the Peppol network is **Peppol BIS Billing 3.0** (BIS = Business Interoperability Specification). It is a constrained profile of [UBL 2.1](/en/1.7/e-invoicing/ubl) that is fully EN 16931 compliant. + +The `CustomizationID` in a Peppol BIS Billing 3.0 invoice is: + +``` +urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 +``` + +**Template in InvoicePlane:** `PeppolBISv3` (or similar) — download from the [InvoicePlane e-invoices repository](https://github.com/InvoicePlane/InvoicePlane-e-invoices). See [Setup — Step 2](/en/1.7/e-invoicing/setup#step-2--install-additional-xml-templates). + +--- + +## The four-corner model + +Peppol uses a **four-corner model** for delivery: + +``` +Corner 1 Corner 2 Corner 3 Corner 4 +[Sender] ──────▶ [Sender's AP] ──────▶ [Receiver's AP] ──────▶ [Receiver] +(you) (your access (their access (your client) + point provider) point provider) +``` + +You generate the UBL XML in InvoicePlane (corner 1). Your access point provider (corner 2) validates the document, looks up the receiver's access point in the Peppol directory (SMP), and delivers the document to the receiver's access point (corner 3), which then delivers it to the recipient (corner 4). + +You do not contact the receiver's access point directly. + +--- + +## What you need to send via Peppol + +### 1. A Peppol access point provider + +A Peppol access point (AP) is a certified service provider that connects your system to the Peppol network. You contract with an AP provider in your country and use their platform to submit invoices. + +When selecting a provider, check: +- Which countries they support (important if your clients are in multiple countries) +- Whether they offer a web upload interface, an API, or both +- Pricing model (per document, monthly flat fee, etc.) + +Lists of certified access point providers are published by each country's Peppol authority. For Czech Republic: search for "Peppol přístupový bod" on the NIPEZ portal. For Belgium: see the Hermes e-procurement portal. + +### 2. A Peppol participant ID + +A **Peppol participant ID** is a registered identifier that allows other parties on the network to find you. It is registered in the Peppol directory (SML/SMP). + +Common formats: + +| Format | Example | Used in | +|---|---|---| +| VAT-based | `9925:BE0123456789` | Belgium, Germany, Austria | +| GLN-based | `0088:1234567890123` | Sweden, Denmark, many others | +| IBAN-based | (rare) | Some specific use cases | +| National ID | `0106:CZ12345678` | Czech Republic | + +Your access point provider will help you register your participant ID when you sign up. + +### 3. Your client's Peppol participant ID + +To send an invoice to a client via Peppol, you need **their** participant ID. Ask your client for it directly, or look them up in the [Peppol directory](https://directory.peppol.eu/). + +If the client is not registered in the Peppol directory, they cannot receive Peppol invoices — you would need to send the invoice another way (email, postal) or wait until they register. + +--- + +## CIUS — country-specific Peppol profiles + +A CIUS (Core Invoice Usage Specification) is a national or sector-specific set of additional rules on top of Peppol BIS Billing 3.0. CIUS documents do not change the XML format — they restrict or extend the allowed values. + +| CIUS | Country | Notes | +|---|---|---| +| CIUS-BE | Belgium | Minor additional requirements | +| CIUS-SE | Sweden | Swedish-specific rules | +| CIUS-AT | Austria | Austrian government procurement | +| CIUS-DE | Germany (B2G via Peppol) | Rarely used — XRechnung is more common for Germany B2G | + +For most cross-border B2B and B2G invoices, the base Peppol BIS Billing 3.0 template works without a CIUS. Your access point provider will inform you if a specific CIUS is required for a particular recipient. + +--- + +## InvoicePlane's role + +InvoicePlane generates the UBL XML document (corners 1 and the handoff to corner 2). The actual delivery over the Peppol network is handled by your access point provider. InvoicePlane does not connect to Peppol directly. + +**Typical workflow:** + +1. Generate the invoice in InvoicePlane — the UBL XML is produced automatically +2. Download the XML file +3. Upload it to your access point provider's portal (or submit via their API) +4. Your access point delivers it to the recipient +5. You receive a delivery confirmation from your access point + +--- + +## Countries using Peppol + +| Country | Mandate | Scope | +|---|---|---| +| Belgium | Since 2019 (B2G); 2026 (B2B) | B2G mandatory; B2B mandatory from 1 Jan 2026 | +| Sweden | Since 2019 | B2G mandatory for central and regional government | +| Norway | Since 2019 | B2G mandatory | +| Denmark | Since 2005 (OIOUBL, migrated to Peppol) | B2G mandatory | +| Netherlands | Since 2020 | B2G mandatory | +| Finland | Since 2020 | B2G mandatory | +| Austria | Since 2014 (ebInterface, migrated to Peppol) | B2G mandatory | +| Czech Republic | B2G via NIPEZ | B2G mandatory for central government | +| Germany | Available | XRechnung preferred for B2G; Peppol optional | +| France | Available | Chorus Pro preferred for B2G; Peppol optional | + +--- + +## Examples + +All examples use the same template: **`PeppolBISv3`** (Peppol BIS Billing 3.0, UBL 2.1). The client record fields are the same across countries — only the VAT number format and Peppol participant ID format differ. + +### Belgium — B2B invoice (mandatory from 2026) + +Belgian VAT numbers start with `BE` followed by 10 digits. Peppol participant IDs use the VAT-based scheme `9925:`. + +| Field | Value | +|---|---| +| Company name | ACME Belgium NV | +| Street address | Wetstraat 16 | +| Postal code | 1000 | +| City | Brussel | +| Country | Belgium | +| Tax ID / VAT number | BE0123456789 | +| E-Invoicing version | Peppol BIS Billing 3.0 | + +Recipient's Peppol participant ID: `9925:0123456789` + +--- + +### Belgium — B2G invoice (mandatory since 2019) + +Same format as B2B. Government entities appear in the [Peppol directory](https://directory.peppol.eu/). + +| Field | Value | +|---|---| +| Company name | FOD Financiën | +| Street address | Wetstraat 24 | +| Postal code | 1000 | +| City | Brussel | +| Country | Belgium | +| Tax ID / VAT number | BE0308357159 | +| E-Invoicing version | Peppol BIS Billing 3.0 | + +Recipient's Peppol participant ID: look up in the Peppol directory. + +--- + +### Sweden — private company + +Swedish VAT numbers start with `SE` followed by 12 digits (last two are always `01`). Participant IDs use GLN (Global Location Number) with scheme `0088:`. + +| Field | Value | +|---|---| +| Company name | Andersson AB | +| Street address | Kungsgatan 1 | +| Postal code | 111 43 | +| City | Stockholm | +| Country | Sweden | +| Tax ID / VAT number | SE123456789001 | +| E-Invoicing version | Peppol BIS Billing 3.0 | + +Recipient's Peppol participant ID: `0088:{13-digit GLN}` — look up in the [Peppol directory](https://directory.peppol.eu/) or ask the client for their GLN. + +--- + +### Sweden — B2G (mandatory since 2008 for central government) + +| Field | Value | +|---|---| +| Company name | Skatteverket | +| Street address | Solna Strandväg 22 | +| Postal code | 171 94 | +| City | Solna | +| Country | Sweden | +| Tax ID / VAT number | SE202100517901 | +| E-Invoicing version | Peppol BIS Billing 3.0 | + +Recipient's Peppol participant ID: look up Skatteverket in the Peppol directory. Swedish municipalities sometimes centralise through a shared service — confirm with the contracting entity which ID to use. + +--- + +### Czech Republic — B2G via NIPEZ + +Czech VAT numbers (**DIČ**) start with `CZ` followed by 8–10 digits. Czech Peppol participant IDs use the national ID scheme `0106:` with the company's IČO (registration number). + +| Field | Value | +|---|---| +| Company name | Ministerstvo financí | +| Street address | Letenská 15 | +| Postal code | 118 10 | +| City | Praha 1 | +| Country | Czech Republic | +| Tax ID / VAT number | CZ00006947 | +| E-Invoicing version | Peppol BIS Billing 3.0 | + +Recipient's Peppol participant ID: `0106:00006947` (scheme `0106:` + IČO without leading zeros may vary — look up in the Peppol directory or the NIPEZ portal). + +--- + +### Netherlands — B2G (mandatory since 2020) + +Dutch VAT numbers start with `NL` followed by 12 characters (9 digits + `B` + 2 digits). Participant IDs use GLN (`0088:`) or KVK-based schemes. + +| Field | Value | +|---|---| +| Company name | Ministerie van Financiën | +| Street address | Korte Voorhout 7 | +| Postal code | 2511 CW | +| City | Den Haag | +| Country | Netherlands | +| Tax ID / VAT number | NL001234567B01 | +| E-Invoicing version | Peppol BIS Billing 3.0 | + +Recipient's Peppol participant ID: look up in the Peppol directory. Dutch government entities are registered under GLN or OIN (Organisatie-identificatienummer) scheme `0190:`. + +--- + +### Norway — B2G (mandatory since 2019) + +Norwegian VAT numbers start with `NO` followed by 9 digits and the suffix `MVA`. In e-invoicing fields, the suffix is often omitted — use the 9-digit number only. Participant IDs use the organisation number scheme `0192:`. + +| Field | Value | +|---|---| +| Company name | Skatteetaten | +| Street address | Postboks 9200 Grønland | +| Postal code | 0134 | +| City | Oslo | +| Country | Norway | +| Tax ID / VAT number | NO974761076 | +| E-Invoicing version | Peppol BIS Billing 3.0 | + +Recipient's Peppol participant ID: `0192:974761076` + +--- + +### Finland — B2G (mandatory since 2020) + +Finnish VAT numbers start with `FI` followed by 8 digits. Participant IDs use the business ID scheme `0037:`. + +| Field | Value | +|---|---| +| Company name | Verohallinto | +| Street address | PL 325 | +| Postal code | 00052 | +| City | Vero | +| Country | Finland | +| Tax ID / VAT number | FI02454022 | +| E-Invoicing version | Peppol BIS Billing 3.0 | + +Recipient's Peppol participant ID: `0037:0245402-2` — Finnish business IDs are 7 digits + hyphen + check digit. Confirm the participant ID in the Peppol directory. + +--- + +## Related pages + +- [UBL](/en/1.7/e-invoicing/ubl) — the XML format that Peppol carries +- [Setup guide](/en/1.7/e-invoicing/setup) diff --git a/docs/en/1.7/e-invoicing/setup.md b/docs/en/1.7/e-invoicing/setup.md new file mode 100644 index 0000000..aded475 --- /dev/null +++ b/docs/en/1.7/e-invoicing/setup.md @@ -0,0 +1,109 @@ +# E-Invoicing Setup + +This page covers the steps that apply to every e-invoicing format. For format-specific details and country-specific requirements, follow the links at the end of each step. + +--- + +## Requirements + +- InvoicePlane 1.7 or later +- PHP 8.1 or higher + +Check the version shown in the application footer. If you are on 1.6 or earlier, upgrade first — see [Updating InvoicePlane](/en/1.7/getting-started/updating-ip). + +--- + +## Step 1 — Check which templates are available + +InvoicePlane ships with two e-invoicing templates built in: + +| Template name | Standard | Countries | +|---|---|---| +| Factur-X EN16931 | Factur-X (CII in PDF/A-3) | France, and other countries accepting Factur-X | +| ZUGFeRD 2.1 EN16931 | ZUGFeRD (CII in PDF/A-3) | Germany (B2B), and other countries accepting ZUGFeRD | + +For all other formats — Peppol BIS Billing 3.0, ISDOC, FatturaPA, Facturae, XRechnung — you need to install additional template files. + +--- + +## Step 2 — Install additional XML templates + +The InvoicePlane project maintains community templates in the [InvoicePlane e-invoices repository](https://github.com/InvoicePlane/InvoicePlane-e-invoices). Each template consists of two files. + +**To install a template:** + +1. Find the template for your format in the repository +2. Download the configuration file from the `XMLconfigs/` folder in the repository +3. Copy it to `application/helpers/XMLconfigs/` in your InvoicePlane installation +4. Download the generator file from the `XMLtemplates/` folder +5. Copy it to `application/libraries/XMLtemplates/` +6. Reload the browser — the new format appears in the **E-Invoicing version** dropdown on client records + +If you need a format that is not in the repository, you can [create a custom template](/en/1.7/e-invoicing/custom-templates). + +--- + +## Step 3 — Fill in the required client fields + +Before e-invoicing can work for a client, the following fields on the client record must be filled in: + +| Field | Notes | +|---|---| +| Company name | Full legal name of the receiving company | +| Street address | Registered address | +| Postal / ZIP code | | +| City | | +| Country | Must match the country where the client is registered for VAT | +| Tax ID / VAT number | Format varies by country — see country guides | + +InvoicePlane will display a validation message listing any missing fields when you try to generate an invoice with e-invoicing active. + +Some formats require additional fields on the client record (for example, Italian invoices need a codice destinatario). These are described in the format-specific pages and country guides. + +--- + +## Step 4 — Enable e-invoicing on the client record + +1. Open the client record +2. Scroll to the **E-Invoicing** section +3. Switch **E-Invoicing active** to enabled +4. Select the format from the **E-Invoicing version** dropdown +5. Save + +Once saved, every new invoice for this client will include the XML output for the selected format. + +--- + +## Step 5 — Generate an invoice and check the output + +Create an invoice for the client as usual. After saving, download the PDF. + +**For embedded formats (Factur-X, ZUGFeRD):** +The XML is inside the PDF file. To inspect it, open the PDF in Adobe Acrobat Reader and go to View → Show/Hide → Navigation Panes → Attachments. You should see a file named `factur-x.xml` or `ZUGFeRD-invoice.xml`. + +**For standalone XML formats (Peppol, XRechnung, ISDOC, FatturaPA, Facturae):** +InvoicePlane saves the XML file alongside the PDF. Download the XML file and open it in a text editor or an online validator to check the output before sending. + +--- + +## Step 6 — Deliver the invoice + +How you send the e-invoice depends on the format and country: + +| Format | Delivery method | +|---|---| +| Factur-X / ZUGFeRD | Send the PDF directly to the recipient by email or file transfer | +| Peppol BIS Billing 3.0 | Submit via a Peppol access point — see [Peppol](/en/1.7/e-invoicing/peppol) | +| FatturaPA (Italy) | Submit via SdI (Italian tax authority hub) — see [FatturaPA](/en/1.7/e-invoicing/fatturaPA) | +| XRechnung (Germany B2G) | Upload to OZG-RE or state procurement portal | +| Facturae (Spain B2G) | Upload signed XML to FACe portal — see [Facturae](/en/1.7/e-invoicing/facturae) | +| ISDOC (Czech Republic) | Send the XML file directly to the recipient | + +--- + +## Useful links + +- [Standards overview](/en/1.7/e-invoicing) — which format to choose +- [Factur-X and ZUGFeRD](/en/1.7/e-invoicing/factur-x) — built-in templates +- [Peppol](/en/1.7/e-invoicing/peppol) — access points and participant IDs +- [Custom XML templates](/en/1.7/e-invoicing/custom-templates) — create your own format diff --git a/docs/en/1.7/e-invoicing/ubl.md b/docs/en/1.7/e-invoicing/ubl.md new file mode 100644 index 0000000..7245596 --- /dev/null +++ b/docs/en/1.7/e-invoicing/ubl.md @@ -0,0 +1,86 @@ +# UBL — Universal Business Language + +## What is UBL? + +**UBL** (Universal Business Language) is an XML vocabulary developed by OASIS, the international open standards consortium. It defines a library of standard electronic business documents — invoices, orders, despatch advice, and many others — in a single, consistent XML format. + +The version used in e-invoicing is **UBL 2.1**, published in 2013. UBL 2.1 is the syntax behind Peppol BIS Billing 3.0 and several national formats. + +UBL is one of two XML syntaxes recognised by the European e-invoicing standard **EN 16931** (the other being [CII](/en/1.7/e-invoicing/cii)). + +--- + +## Profiles and derivatives + +UBL 2.1 is a broad specification. In practice, e-invoicing always uses a more tightly constrained **profile** that restricts which fields are mandatory and which values are allowed. + +### Peppol BIS Billing 3.0 + +Peppol BIS Billing 3.0 (BIS = Business Interoperability Specification) is the most widely deployed UBL profile in Europe. It is a UBL 2.1 invoice constrained to full EN 16931 compliance, with additional Peppol-specific requirements. + +This is the format you use when sending invoices over the [Peppol network](/en/1.7/e-invoicing/peppol). It is used for: + +- B2G (business to government) in Belgium, Sweden, Czech Republic, Norway, Denmark, Finland, Austria, and many others +- B2B in Belgium (mandatory since January 2026) and increasingly common elsewhere + +**Template in InvoicePlane:** `PeppolBISv3` — download from the [InvoicePlane e-invoices repository](https://github.com/InvoicePlane/InvoicePlane-e-invoices). + +### ISDOC — Czech national format + +ISDOC is the Czech national e-invoice standard. Its XML structure is directly derived from UBL 2.1, extended with Czech-specific elements (for example, the Czech bank account number in IBAN/BBAN format and Czech tax identifiers). ISDOC invoices can be read by most Czech accounting and ERP software. + +See the dedicated [ISDOC page](/en/1.7/e-invoicing/isdoc) for details. + +### UBL.BE — Belgian UBL profile + +Belgium uses a UBL profile called UBL.BE, which for e-invoicing is effectively identical to Peppol BIS Billing 3.0. When working with Belgian clients via Peppol, the Peppol BIS Billing 3.0 template covers the requirement. + +--- + +## Key fields in a UBL invoice + +UBL invoice documents follow this top-level structure: + +```xml + + + urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 + urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 + INV-2025-0042 + 2025-06-01 + 2025-07-01 + 380 + ... + ... + ... + ... + ... + ... + +``` + +The `CustomizationID` and `ProfileID` at the top identify which profile the document follows. InvoicePlane fills these automatically based on the template. + +--- + +## When to use UBL + +Choose UBL (Peppol BIS Billing 3.0) when: + +- Your client or their country requires Peppol delivery +- You are invoicing a government body in Belgium, Sweden, Czech Republic, Norway, Denmark, Netherlands, Finland, or Austria +- You are a Belgian company invoicing any other Belgian company (mandatory from 2026) +- Your client specifically asks for UBL format + +For Germany and France, [CII-based formats](/en/1.7/e-invoicing/cii) (ZUGFeRD / Factur-X) are the dominant choice. + +--- + +## Related pages + +- [Peppol](/en/1.7/e-invoicing/peppol) — transport network that carries UBL invoices +- [ISDOC](/en/1.7/e-invoicing/isdoc) — Czech national format derived from UBL +- [CII](/en/1.7/e-invoicing/cii) — the other major XML syntax for EN 16931 +- [Country guides](/en/1.7/e-invoicing) — per-country standard choices diff --git a/docs/en/1.7/general/about.md b/docs/en/1.7/general/about.md new file mode 100644 index 0000000..db29ef2 --- /dev/null +++ b/docs/en/1.7/general/about.md @@ -0,0 +1,38 @@ +# About InvoicePlane + +![Preview for InvoicePlane](https://invoiceplane.com/assets/img/preview.jpg) + +InvoicePlane is a self-hosted open source application for managing your quotes, invoices, clients, tasks and +payments. +Downloaded more than 100 000 times from 196 countries. + +## Quotes, Invoices, Payments + +InvoicePlane is a solid app to manage your complete billing circle: from quotes over invoices to +payments. + +## Manage your Clients + +The application provides CRM-like management for your clients. Enter contact details, notes or +add custom fields to add any information you want. + +## Customize InvoicePlane + +You can customize InvoicePlane to make sure it fits your needs: amount format, languages, email +and PDF templates and many more. + +## One-Click Online Payments + +Let your clients pay the invoices by using Stripe (other payment providers to come, please open an issue on [GitHub](https://github.com/InvoicePlane/InvoicePlane/issues) if you are missing a provider). + +## Multilanguage Interface + +InvoicePlane is fully translated into 23 languages by community members and more languages are +coming soon. + +## Projects and Tasks + +Create projects for different clients, add some task and you can reference them directly inside +invoices. + +[Learn more on InvoicePlane.com](https://invoiceplane.com/) diff --git a/docs/en/1.7/general/changelog.md b/docs/en/1.7/general/changelog.md new file mode 100644 index 0000000..091e841 --- /dev/null +++ b/docs/en/1.7/general/changelog.md @@ -0,0 +1,72 @@ +# Changelog + +## v1.7.2 — 2026-04-06 + +The main focus of this release was hardening the application across a broad range of areas. If you are upgrading from 1.7.0 or 1.7.1, read [Updating InvoicePlane](/en/1.7/getting-started/updating-ip) before proceeding — custom PDF templates now require registration in `ipconfig.php`. + +### Added +- Custom PDF templates can now be stored outside the web root and registered in `ipconfig.php` via `CUSTOM_TEMPLATES_FOLDER` and the `CUSTOM_*_TEMPLATES_*` settings. See [Custom PDF Templates](/en/1.7/templates/pdf-template-allowlist). +- Password reset links now expire. The default is 15 minutes; configurable via `PASSWORD_RESET_TOKEN_EXPIRY_MINUTES` in `ipconfig.php`. See [User Accounts](/en/1.7/settings/user-accounts#password-reset). +- Optional EXIF metadata stripping for uploaded images. Enable with `SEC_STRIP_EXIF_FROM_IMAGES=true` in `ipconfig.php`. See [General Settings](/en/1.7/settings/general#logo-upload). +- PHP 8.3 compatibility confirmed. InvoicePlane 1.7.2 supports PHP 8.1, 8.2, and 8.3. + +### Changed +- PDF template loading now uses a fixed list rather than scanning the templates directory. Built-in templates are unchanged; custom templates must be declared in `ipconfig.php`. See [Custom PDF Templates](/en/1.7/templates/pdf-template-allowlist). +- The email template preview now shows the raw template source instead of rendering it as HTML. See [Email Templates](/en/1.7/settings/email-templates). +- `phpmail_send()` now returns `false` when delivery fails. Previously it always returned `true`. Custom code calling this function should be updated to handle the failure case. See [Email Settings](/en/1.7/settings/email#delivery-failures). +- Setup wizard is automatically disabled after a successful installation. See [Installation](/en/1.7/getting-started/installation). +- Password reset tokens are now generated with `random_bytes(32)` for stronger entropy. +- Open redirect prevention: redirect targets are now validated to be internal URLs. Affects the payment flow, custom fields, and filter modules. +- File deletion for logo removal is now confined to the `uploads/` directory. +- SMTP debug output is sanitised before being written to logs. +- AJAX filter controllers now validate table name and ID parameters extracted from request headers. +- Guest payment queries now use explicit integer casting for all ID values. + +### Fixed +- XSS: output escaping added to invoice number in the payment form. +- XSS: tax rate name, payment method name, and custom field values now correctly escaped in all views. +- Binary data handling in `Cryptor::decryptString()` — replaced multibyte string functions with byte-safe equivalents, which could cause decryption failures. +- Paths passed to the logo removal function are now validated before `unlink()` is called. + +### Removed +- No features removed in this release. + +--- + +## v1.7.1 — 2026-02-16 + +### Changed +- SVG files are no longer accepted for logo uploads. Accepted formats are PNG, JPG/JPEG, GIF, and WEBP. Replace any existing SVG logos before or after upgrading. See [General Settings](/en/1.7/settings/general#logo-upload). +- QR code image width reduced to 100 px. + +### Fixed +- Output escaping added across invoice numbers, quote numbers, tax rate names, payment method names, custom field labels, client addresses, and several other fields to prevent stored content from being interpreted as HTML. +- Email address fields now accept comma-separated and semicolon-separated lists. See [Email Settings](/en/1.7/settings/email). + +--- + +## v1.7.0 — 2025-01-19 + +First release of the 1.7 series. The 1.7 series requires PHP 8.1 or higher and adds full compatibility with PHP 8.2 and 8.3. See [Requirements](/en/1.7/getting-started/requirements). + +### Added +- PHP 8.2 and 8.3 compatibility. InvoicePlane 1.7.0 is tested on PHP 8.1, 8.2, and 8.3. +- PayPal Advanced Credit Cards and Venmo are now available as payment methods alongside Stripe. See [Online Payments](/en/1.7/settings/online-payments). +- Open invoices are now visible to guest users on their index page. +- Invoice and quote templates now support named footers. +- A default ordering option for [Recurring Invoices](/en/1.7/modules/recurring-invoices). +- QR code image width reduced to 100 px. +- Email address fields now accept comma-separated and semicolon-separated lists. See [Email Settings](/en/1.7/settings/email). +- `$show_item_discounts` is now available in the `InvoicePlane_Web.php` public template. + +### Fixed +- File access validation added across controllers to prevent unauthorised file access through direct URL manipulation. +- E-invoicing: version checking and logging for client e-invoicing fields. +- Multiple email address sending no longer produces errors. +- Format_number prevented from returning non-numeric values. +- Quote/invoice guest download attachment corrected. + +--- + +> **Note:** +> Changelogs for older versions of InvoicePlane can be found in the relevant section of this wiki. For the 1.6 series see [Changelog — 1.6](/en/1.6/general/changelog). diff --git a/docs/en/1.7/general/faq.md b/docs/en/1.7/general/faq.md new file mode 100644 index 0000000..6e9c367 --- /dev/null +++ b/docs/en/1.7/general/faq.md @@ -0,0 +1,107 @@ +# FAQ - Frequently Asked Questions + +## General + +### Can I sell / redistribute InvoicePlane? + +InvoicePlane is a free software and it will never be a commercial product! We +appeal everyone to respect the open source InvoicePlane project and our work and refrain from +selling the application as their own product! +What you can do: offer paid professional support or hosting for InvoicePlane. + +However InvoicePlane is an open source software released under [MIT license](http://choosealicense.com/licenses/mit/). This means that you can use +the code *but* the InvoicePlane name and the logo are copyright by Invoiceplane.com and +Kovah.de +This means you **have to** use another name and logo for the product and include the original InvoicePlane license in the code. + +For more information about licensing please visit the [InvoicePlane website](https://invoiceplane.com/license-copyright). + +## Errors + +### You have problems and need help? Use the debug mode. + +You have a problem with some errors, you are stuck and need help? We would like to help you but first +we need some help from you: error logs. + +1. Enable the debug mode by replacing `ENABLE_DEBUG=false` with + `ENABLE_DEBUG=true` in the `/ipconfig.php` file. +2. Try again what caused the error, e.g. creating a new invoice which does not work. +3. Get the log files: + - Open the folder `/application/logs/`, open the log file with the current date + and copy the whole content. + - Take a look at your web server error logs. + - Open the console of your browser ([tutorial](http://webmasters.stackexchange.com/a/77337/20720)), the + error may be logged there. +4. Save the content of the log files and the output of the browser console to [Paste.InvoicePlane.com](https://paste.invoiceplane.com/) and post this link + with a detailed description to the [Community + Forums](https://community.invoiceplane.com). + You will get further help there. + +### I copied InvoicePlane to my webserver but I get blank pages or an error 404 or 500 + +Please make sure you copied the .htaccess file (hidden file on Unix systems) and you installed and +enabled mod\_rewrite for Apache. + +If you want to install InvoicePlane in a sub-directory like `yourdomain.com/invoices/` +please follow the instructions for the [installation in a +subdirectory](/en/1.5/getting-started/installation#subdir). + +### There is a large spinning cog () after I clicked a button and now nothing happens + +This problem occurs if the application is stuck because of an error. Please follow the instructions +for the [debug mode](#debugmode) + +### I can't add more than 3 or 4 items to quotes or invoices + +This problem may occurs because of a configuration of your nginx webserver. The server error should +look like this: + +``` +upstream sent too big header while reading response header from upstream +``` + +To solve this problem you should try to add / update your nginx configuration with the following +settings: + +``` +proxy_buffer_size 128k; +proxy_buffers 4 256k; +proxy_busy_buffers_size 256k; +``` + +or + +``` +fastcgi_buffer_size 128k; +fastcgi_buffers 4 256k; +fastcgi_busy_buffers_size 256k; +``` + +Please check [this comment](http://stackoverflow.com/a/27551259/1203515) for +more details. + +## Settings + +### Where can I set the default invoice / quote groups? + +You can set the default invoice / quote groups at `System settings > Invoices > Default Invoice +Group` for invoices and `System settings > Quotes > Default Quote Group` for +quotes. + +## Customization + +### How can I customize the templates? + +You can find all templates in the following directories: + +**Invoices** + +`/application/views/invoice_templates/` + +**Quotes** + +`/application/views/quote_templates/` + +The templates are using basic HTML, CSS and PHP. If you just want to change the styling you just need +some knowledge of HTML and CSS. +If you want to include Custom Fields into the templates please refer to the [Custom Fields page](/en/1.5/settings/custom-fields#add-to-template). diff --git a/docs/en/1.7/general/license.md b/docs/en/1.7/general/license.md new file mode 100644 index 0000000..e43e259 --- /dev/null +++ b/docs/en/1.7/general/license.md @@ -0,0 +1,113 @@ +# License for InvoicePlane + +## Copyright + +The name 'InvoicePlane' and the InvoicePlane logo are original copyright +of InvoicePlane.com / Kovah.de and the following restrictions apply to +both of them: + +**You are allowed to:** + +- use the name 'InvoicePlane' or the InvoicePlane logo in any context directly + related to the application or the project. This includes the application itself, + local communities and news or blog posts about InvoicePlane or +- use the name 'InvoicePlane' or the InvoicePlane logo to provide professional support or hosting for the InvoicePlane application. + +**You are not allowed to:** + +- use the name 'InvoicePlane' or the InvoicePlane logo in any context that is **not** related to the project, +- alter the name 'InvoicePlane' or the InvoicePlane logo in any way or +- sell or redistribute the application under the name 'InvoicePlane' and the InvoicePlane logo. + +--- + +## InvoicePlane Usage Permits + +- [Softaculous](http://www.softaculous.com/) is permitted to add InvoicePlane to their AutoInstaller. + +--- + +## License + +================================================== +License for InvoicePlane +================================================== +Copyright (c) 2012-2014 InvoicePlane.com + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +The name (InvoicePlane) and the logo can be used in any context related to +InvoicePlane as application or project but may not be changed / altered in +any way. The name and the logo are both original copyright by InvoicePlane.com +and Kovah.de + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +================================================== +License for CodeIgniter +================================================== +Copyright (c) 2008 - 2011, EllisLab, Inc. +All rights reserved. + +This license is a legal agreement between you and EllisLab Inc. for the use +of CodeIgniter Software (the "Software"). By obtaining the Software you +agree to comply with the terms and conditions of this license. + +PERMITTED USE +You are permitted to use, copy, modify, and distribute the Software and its +documentation, with or without modification, for any purpose, provided that +the following conditions are met: + +1. A copy of this license agreement must be included with the distribution. + +2. Redistributions of source code must retain the above copyright notice in +all source code files. + +3. Redistributions in binary form must reproduce the above copyright notice +in the documentation and/or other materials provided with the distribution. + +4. Any files that have been modified must carry notices stating the nature +of the change and the names of those who changed them. + +5. Products derived from the Software must include an acknowledgment that +they are derived from CodeIgniter in their documentation and/or other +materials provided with the distribution. + +6. Products derived from the Software may not be called "CodeIgniter", +nor may "CodeIgniter" appear in their name, without prior written +permission from EllisLab, Inc. + +INDEMNITY +You agree to indemnify and hold harmless the authors of the Software and +any contributors for any direct, indirect, incidental, or consequential +third-party claims, actions or suits, as well as any related expenses, +liabilities, damages, settlements or fees arising from your use or misuse +of the Software, or a violation of any terms of this license. + +DISCLAIMER OF WARRANTY +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR +IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF QUALITY, PERFORMANCE, +NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. + +LIMITATIONS OF LIABILITY +YOU ASSUME ALL RISK ASSOCIATED WITH THE INSTALLATION AND USE OF THE SOFTWARE. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS OF THE SOFTWARE BE LIABLE +FOR CLAIMS, DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION +WITH THE SOFTWARE. LICENSE HOLDERS ARE SOLELY RESPONSIBLE FOR DETERMINING THE +APPROPRIATENESS OF USE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE, INCLUDING +BUT NOT LIMITED TO THE RISKS OF PROGRAM ERRORS, DAMAGE TO EQUIPMENT, LOSS OF +DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS. diff --git a/docs/en/1.7/getting-started/index.md b/docs/en/1.7/getting-started/index.md new file mode 100644 index 0000000..fde26db --- /dev/null +++ b/docs/en/1.7/getting-started/index.md @@ -0,0 +1,6 @@ +# Getting Started + +- [Requirements](/en/1.7/getting-started/requirements) +- [Installation](/en/1.7/getting-started/installation) +- [Quickstart (Tutorial)](/en/1.7/getting-started/quickstart) +- [Updating InvoicePlane](/en/1.7/getting-started/updating-ip) diff --git a/docs/en/1.7/getting-started/installation.md b/docs/en/1.7/getting-started/installation.md new file mode 100644 index 0000000..bca10ac --- /dev/null +++ b/docs/en/1.7/getting-started/installation.md @@ -0,0 +1,52 @@ +# Installation + +For those of you comfortable with installing web applications, installing InvoicePlane should take 5 minutes or +less. + +1. [Download](https://invoiceplane.com/downloads) and extract the archive. +2. Create an empty database on your web server. +3. Upload the files to your web server, either into a subdirectory or into the public root of the web server. +4. Make a copy of the `ipconfig.php.example` file and rename the copy to `ipconfig.php` +5. Open the `ipconfig.php` file and add your URL in it like described in the file. +6. Comment out the first line of the `ipconfig.php` file by adding a `#` at the beginning of the line as described at **pt. 2** [here](updating-ip#160-2-replace-files) +7. Run the InvoicePlane installer from your web browser and follow his instructions: `http://your-domain.com/index.php/setup` + +Once the installer finishes, the installation is complete and you may log into InvoicePlane using the email address and password you chose during installation. The setup wizard is automatically disabled after a successful installation — navigating to `/index.php/setup` afterwards will return a 403 error. + +## Run InvoicePlane in a sub directory + +If you want to run InvoicePlane in a sub directory (e.g. `http://yourdomain.com/invoices/`) you have +to modify the `.htaccess` file which is located in the root directory. You must add the line + +``` +RewriteBase /sub-directory +``` + +where `sub-directory` is the directory you want to use. The content of the file should look like this: + +``` +RewriteEngine on +RewriteBase /sub-directory +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule . index.php [L] +``` + +After that, open your `ipconfig.php` file and add the sub directory to your URL like this: + +``` +http://your-domain.com/sub-directory +``` + +Notice that there is **no** trailing slash. + +## Remove index.php from the URL + +Please notice that this step is entirely optional and does not affect the application in any way. + +1. Make sure that [mod\_rewrite](https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html) is enabled on your web + server. +2. Open the file `ipconfig.php` +3. Search for `REMOVE_INDEXPHP=false` in this file and replace it with + `REMOVE_INDEXPHP=true` +4. Rename the `htaccess` file to `.htaccess` diff --git a/docs/en/1.7/getting-started/quickstart.md b/docs/en/1.7/getting-started/quickstart.md new file mode 100644 index 0000000..c787c8f --- /dev/null +++ b/docs/en/1.7/getting-started/quickstart.md @@ -0,0 +1,77 @@ +# Quickstart + +## Logging In + +If InvoicePlane was installed into the root of your web server: + +`http://www.your-domain.com` + +If InvoicePlane was installed into its own subdirectory of your web server: + +`http://www.your-domain.com/the-subdirectory` + +--- + +## Configure the Application + +Before you start with invoicing you should check the application settings on `http://www.your-domain.com/settings` +and set for example the currency, how the amounts should be formatted and so on. + +More information about available settings can be found on the [Settings](/en/1.7/modules/settings) +page. + +--- + +## Adding a Client + +Click `Clients` from the main menu at the top of the page and select `Add Client`. Fill in +as much information as needed and submit the form. + +More information about the client management can be found on the [Clients](/en/1.7/modules/clients) +page. + +--- + +## Adding Products + +If you have products which should appear on your invoices or quotes you can create them form the +`Products` menu. + +More information about products can be found on the [Products](/en/1.7/modules/products) +page. + +--- + +## Creating an Invoice + +Click `Invoices` from the main menu at the top of the page and select `Create Invoice`. +Start typing the client name into the `Client` box. If the client already exists in InvoicePlane, +select the client from the list which appears after you start typing. If the client does not already exist in +InvoicePlane, continue typing the client\'s name and that client will be added as a new record. +Then choose the invoice date and invoice group and submit the form. + +If you added some products before you can simply add them via the `Add Product` button left from the +`Save` button. If you want to enter some items manually you can use the empty row or +add new rows with the `Add new Row` button. + +### Send the invoice + +If viewing a list of invoices, click the `Options` button on the row of the invoice to send. If +viewing a single invoice, click the Options button near the top right of the page. Select `Send +Email` from the `Options` button, review the information and submit the form. The client +will receive an email with the invoice attached as a PDF. + +--- + +## Entering a Payment + +Offline payments are entered by clicking `Payments` from the main menu at the top of the page and +selecting `Enter Payment`. Fill in the appropriate information and submit the form to enter the +payment. + +Online payments allow a client to pay their invoice online. When an online payment occurs, the payment is +automatically entered back into InvoicePlane, eliminating the need to manually enter an offline payment. Online +payments require additional setup before they can be used. + +More information about payments can be found on the [Payments](/en/1.7/modules/payments) +page. diff --git a/docs/en/1.7/getting-started/requirements.md b/docs/en/1.7/getting-started/requirements.md new file mode 100644 index 0000000..aeb5419 --- /dev/null +++ b/docs/en/1.7/getting-started/requirements.md @@ -0,0 +1,28 @@ +# Requirements + +If you want to use InvoicePlane you have to follow these requirements to use the application. + +- A webserver / shared hosting with the following specifications: + - MySQL >= 5.5 or the equivalent version of MariaDB + - Apache >= 2.4 or Ngnix >= 1.20.0 + - PHP >= 8.1 + - The following PHP extensions must be installed and activated: + - php-bcmath + - php-dom + - php-gd + - php-hash + - php-json + - php-mbstring + - php-mcrypt + - php-mysqli + - php-openssl + - php-recode + - php-xml + - php-xmlrpc + - php-zlib +- An up-to-date web browser. We do recommend using either [Firefox](https://www.mozilla.org/en-US/firefox/new/), [Microsoft Edge](https://www.microsoft.com/en-us/edge), the latest version of + [Safari](https://www.apple.com/safari) or any of the other leading browsers around the internet. Please note that since Microsoft introduced [Microsoft Edge](https://www.microsoft.com/en-us/edge), Internet Explorer is not supported anymore. + +> **Warning:** +> Please notice that PHP < 8.1 is no longer supported and should **not** be used anymore for production +> environments! (see [php version support](https://www.php.net/supported-versions.php) for more information) diff --git a/docs/en/1.7/getting-started/updating-ip.md b/docs/en/1.7/getting-started/updating-ip.md new file mode 100644 index 0000000..ab4c927 --- /dev/null +++ b/docs/en/1.7/getting-started/updating-ip.md @@ -0,0 +1,133 @@ +# Update InvoicePlane + +## Contents + +- [What changed in 1.7](#what-changed-in-17) +- [New ipconfig.php settings](#new-ipconfigphp-settings) +- [**Upgrade instructions (v1.6.x to v1.7.0)**](#upgrade-instructions) + 1. Take stock of your custom templates + 2. Preliminary operations + 3. Replace files & run setup + 4. Lock down template directories + +--- + +## What changed in 1.7 + +### Custom PDF templates must be registered + +InvoicePlane 1.7 changes how PDF templates are discovered. Instead of scanning the templates directory automatically, the application now works from a declared list. Built-in templates continue to work without any configuration. Custom templates — any template you created yourself — must be declared in `ipconfig.php` before they will appear in the template selector. + +See [Custom PDF Templates](/en/1.7/templates/pdf-template-allowlist) for the full setup. + +### SVG logo files are no longer accepted + +The logo upload fields now accept JPG, JPEG, PNG, GIF, and WEBP only. If you currently use an SVG file as your company logo or login logo, you will need to replace it with one of the accepted formats. + +### PHP version + +InvoicePlane 1.7 requires **PHP 8.1 or higher**. PHP 8.2 and 8.3 are also supported and recommended. + +### `phpmail_send()` now reports delivery failures + +If you have custom code that calls the internal `phpmail_send()` function, note that it now returns `false` when delivery fails. Prior to 1.7 it always returned `true`. Update any custom code that relies on the old behaviour. + +--- + +## New ipconfig.php settings + +Add these to your `ipconfig.php` after upgrading. All are optional, but review each one. + +```ini +; Path to a directory outside the web root containing custom PDF templates. +; Required if you have custom templates. Must include trailing slash. +CUSTOM_TEMPLATES_FOLDER=/srv/invoiceplane-templates/ + +; Comma-separated names of custom templates to make available (no .php extension). +CUSTOM_INVOICE_TEMPLATES_PDF=My Invoice,My Invoice - Detailed +CUSTOM_INVOICE_TEMPLATES_PUBLIC=My Invoice Web +CUSTOM_QUOTE_TEMPLATES_PDF=My Quote +CUSTOM_QUOTE_TEMPLATES_PUBLIC=My Quote Web + +; How long a password reset link stays valid, in minutes (default: 15). +PASSWORD_RESET_TOKEN_EXPIRY_MINUTES=15 + +; Strip EXIF metadata from uploaded images (default: false). +SEC_STRIP_EXIF_FROM_IMAGES=false +``` + +--- + +## Upgrade instructions + +### 1. Take stock of your custom templates + +Before upgrading, list the template files in your installation: + +```bash +ls application/views/invoice_templates/pdf/ +ls application/views/invoice_templates/public/ +ls application/views/quote_templates/pdf/ +ls application/views/quote_templates/public/ +``` + +Built-in files you can ignore: `InvoicePlane.php`, `InvoicePlane - paid.php`, `InvoicePlane - overdue.php`, `InvoicePlane_Web.php`. + +Any other `.php` files are custom templates. For each one, decide how to handle it after the upgrade: + +**Option A — Move to an external folder (recommended)** + +1. Create a directory outside your web root, e.g. `/srv/invoiceplane-templates/` +2. Copy your templates there, preserving the sub-directory structure (`invoice/pdf/`, `quote/pdf/`, etc.) +3. Add the `CUSTOM_TEMPLATES_FOLDER` and `CUSTOM_*_TEMPLATES_*` settings to `ipconfig.php` — see [Custom PDF Templates](/en/1.7/templates/pdf-template-allowlist) + +**Option B — Keep them inside the application** + +Add each template name to the `ALLOWED_INVOICE_TEMPLATES` or `ALLOWED_QUOTE_TEMPLATES` constant in `application/modules/invoices/models/Mdl_templates.php`. You will need to reapply this edit every time you upgrade. + +Also check the template settings stored in the database and confirm they match one of the built-in or custom template names you are keeping: + +```sql +SELECT setting_key, setting_value +FROM ip_settings +WHERE setting_key IN ('default_invoice_template', 'default_quote_template', + 'public_invoice_template', 'public_quote_template'); +``` + +### 2. Preliminary operations + +1. Make a backup of your database and all files. (This is **very important** to prevent any data loss) +2. Download the latest version from [InvoicePlane.com](https://invoiceplane.com/downloads). + +### 3. Replace files & run setup + +1. Copy all files to the root directory of your InvoicePlane installation but **do not** overwrite: + - `ipconfig.php` + - Custom template files (if keeping them inside the application — Option B above) + - Custom styles: `assets/core/css/custom.css` and `assets/core/css/custom-pdf.css` + - Uploaded images in the `uploads/` folder (e.g. your company logo) + - Custom language keys at `application/language/COUNTRY/custom_lang.php` + + > **Tip:** Upload the new version into a separate folder, copy the above files into it, then rename the folders to swap them. + +2. Add the new `ipconfig.php` settings listed in [New ipconfig.php settings](#new-ipconfigphp-settings). +3. Open `http://yourdomain.com/index.php/setup` and follow the instructions. The app runs all database migrations automatically. + - If you see errors, press "Try Again" to continue. +4. Log in and verify the application works correctly, including template selection for invoices and quotes. + +### 4. Lock down template directories + +Set the template directories and files to read-only: + +```bash +chmod 555 application/views/invoice_templates/pdf/ +chmod 555 application/views/invoice_templates/public/ +chmod 555 application/views/quote_templates/pdf/ +chmod 555 application/views/quote_templates/public/ +chmod 444 application/views/invoice_templates/pdf/*.php +chmod 444 application/views/invoice_templates/public/*.php +chmod 444 application/views/quote_templates/pdf/*.php +chmod 444 application/views/quote_templates/public/*.php +``` + +If you are using `CUSTOM_TEMPLATES_FOLDER`, apply the same permissions to those directories. diff --git a/docs/en/1.7/help/setup-cron.md b/docs/en/1.7/help/setup-cron.md new file mode 100644 index 0000000..681324b --- /dev/null +++ b/docs/en/1.7/help/setup-cron.md @@ -0,0 +1,43 @@ +# Help: Setup a Cron + +If you want to use [recurring invoices](/en/1.7/modules/recurring-invoices) you have to +setup a cron +that opens the URL listed on the recurring invoices page. A cron is basically a script that runs on predefined +times. You can setup a cron that runs every minute, every third hour per day or yearly. For recurring invoices +you should run the cron daily. + +There are two different ways on how to setup a cron: + +- use you own web server or +- use an online service that runs the cron for you. + +### Use your own Server + +As there are various different types of operating software for web servers (e.g. Ubuntu, CentOS, Windows Server +or even Mac OSX Server) there is not *one* tutorial on how to setup a cron. Because of this we listed +tutorials for the most used systems below and wrote an example for Unix-based operating systems. + +- [Ubuntu](https://help.ubuntu.com/community/CronHowto) +- [CentOS](https://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-autotasks.html) +- [Windows Server (2008)](http://www.myscienceisbetter.info/add-new-cron-job-on-windows-2008-server-using-task-scheduler.html) + +**Example for Unix-based systems** + +Open the crontab file with `crontab -e` and paste the following line: + +``` +0 0 * * * wget -O - https://yoursite.com/invoices/cron/recur/your-cron-key >/dev/null 2>&1 +``` + +where `yoursite.com` is the domain you use for InvoicePlane and `your-cron-key` the cron +key from your settings. + +### Use an Online Service + +There are a lot of online services that offer running a cron for you, for example +[cron-job.org](https://cron-job.org/en/), +[FastCron](https://www.fastcron.com/tutorials/invoiceplane-cron) +or any other. + +Please read the documentation of the service you use to know how to setup a cron with their +system. diff --git a/docs/en/1.7/index.md b/docs/en/1.7/index.md new file mode 100644 index 0000000..4c4cd04 --- /dev/null +++ b/docs/en/1.7/index.md @@ -0,0 +1,62 @@ +# InvoicePlane Wiki + +## Welcome to the InvoicePlane Wiki + +If you want to know how to use InvoicePlane or if you have any +questions take a look at this wiki. You should find a lot of useful information about the software and each +module. + +## About InvoicePlane + +- [What is InvoicePlane?](/en/1.7/general/about) +- [Changelog](/en/1.7/general/changelog) +- [License](/en/1.7/general/license) +- [FAQ](/en/1.7/general/faq) + +## Getting started + +- [Requirements](/en/1.7/getting-started/requirements) +- [Installation](/en/1.7/getting-started/installation) +- [Quickstart (Tutorial)](/en/1.7/getting-started/quickstart) +- [Updating InvoicePlane](/en/1.7/getting-started/updating-ip) + +## Modules + +- [Clients](/en/1.7/modules/clients) +- [Quotes](/en/1.7/modules/quotes) +- [Invoices](/en/1.7/modules/invoices) +- [Recurring Invoices](/en/1.7/modules/recurring-invoices) +- [Payments](/en/1.7/modules/payments) +- [E-Invoicing](/en/1.7/modules/e-invoicing) + +## Settings + +- [General Settings](/en/1.7/settings/general) +- [Invoice Settings](/en/1.7/settings/invoices) +- [Quotes Settings](/en/1.7/settings/quotes) +- [Tax Settings](/en/1.7/settings/taxes) +- [eMail Settings](/en/1.7/settings/email) +- [Online Payments](/en/1.7/settings/online-payments) +- [Updatecheck](/en/1.7/settings/updatecheck) +- [Custom Fields](/en/1.7/settings/custom-fields) +- [eMail Templates](/en/1.7/settings/email-templates) +- [Invoice Groups](/en/1.7/settings/invoice-groups) +- [Payment Methods](/en/1.7/settings/payment-methods) +- [Taxrates](/en/1.7/settings/taxrates) +- [User Accounts](/en/1.7/settings/user-accounts) + +## Templates + +- [Using Templates](/en/1.7/templates/using-templates) +- [Customize Templates](/en/1.7/templates/customize-templates) +- [PDF Template Allow List](/en/1.7/templates/pdf-template-allowlist) + +## Security + +- [Security Changes in 1.7](/en/1.7/security) + +## System + +- [Translation / Localization](/en/1.7/system/translation-localization) +- [Importing Data](/en/1.7/system/importing-data) +- [Upgrade from FusionInvoice](/en/1.7/system/upgrade-from-fusioninvoice) diff --git a/docs/en/1.7/modules/clients.md b/docs/en/1.7/modules/clients.md new file mode 100644 index 0000000..b80c165 --- /dev/null +++ b/docs/en/1.7/modules/clients.md @@ -0,0 +1,37 @@ +# Clients + +## View Clients + +To view the client list, click `Clients` from the main menu and select `View Clients`. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_clients.jpg)](https://invoiceplane.com/content/screenshots/web/ip_clients.jpg) + +By default, the client list will be filtered to active clients only. The filter can be set to either +`Active`, `Inactive` or `All` by choosing the filter from the submenu bar. +To navigate between pages, use the pager buttons located on the submenu bar. + +The `Options` button at the end of each row displays a menu with a number of items when clicked: + +- `View` - View the client +- `Edit` - Edit the client +- `Create Quote` - Create a quote for the client +- `Create Invoice` - Create an invoice for the client +- `Delete` - Delete the client + +## Add new Clients + +To add a new client, either choose `Clients` from the main menu and select `Add Client`, or +from the client list, click the `New` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_clients_add.jpg)](https://invoiceplane.com/content/screenshots/web/ip_clients_add.jpg) + +When adding a new client, the only field required is the `Client Name` field, although if you plan to +email invoices and quotes to your clients, the `Email Address` field should be filled in as well. Any +[custom fields](/en/1.7/settings/custom-fields) created for client records will display at the bottom +of the client form. + +## Client Logins + +Clients can be granted permission to log into InvoicePlane to view their quotes and invoices, approve or reject +quotes and pay their invoices. See the `Guest Account` section of the [User Accounts](/en/1.7/settings/user-accounts) page for instructions on creating logins for +your clients. diff --git a/docs/en/1.7/modules/e-invoicing.md b/docs/en/1.7/modules/e-invoicing.md new file mode 100644 index 0000000..2a7fe7d --- /dev/null +++ b/docs/en/1.7/modules/e-invoicing.md @@ -0,0 +1,38 @@ +# E-Invoicing + +InvoicePlane 1.7 includes a built-in e-invoicing system that generates structured XML alongside or embedded within PDF invoices. + +The e-invoicing documentation is organised into dedicated sections covering standards, setup, and country-specific guidance. + +--- + +## Where to start + +- **[E-Invoicing overview](/en/1.7/e-invoicing)** — standards map, which format to use for your country, and links to all sub-pages +- **[Setup guide](/en/1.7/e-invoicing/setup)** — step-by-step: requirements, installing templates, enabling on a client, generating and delivering + +--- + +## Standards + +| Standard | Format | Built in | Page | +|---|---|---|---| +| Factur-X | CII embedded in PDF/A-3 | Yes | [Factur-X and ZUGFeRD](/en/1.7/e-invoicing/factur-x) | +| ZUGFeRD 2.x | CII embedded in PDF/A-3 | Yes | [Factur-X and ZUGFeRD](/en/1.7/e-invoicing/factur-x) | +| Peppol BIS Billing 3.0 | UBL 2.1 (via Peppol network) | Download | [Peppol](/en/1.7/e-invoicing/peppol) | +| XRechnung | Standalone CII | Download | [CII](/en/1.7/e-invoicing/cii) | +| ISDOC | UBL-derived (Czech national) | Download | [ISDOC](/en/1.7/e-invoicing/isdoc) | +| FatturaPA | Italian national format | Download | [FatturaPA](/en/1.7/e-invoicing/fatturaPA) | +| Facturae | Spanish national format | Download | [Facturae](/en/1.7/e-invoicing/facturae) | + +--- + +## Country → standard + +Each standard page includes worked examples for every country that uses it. See the [country lookup table](/en/1.7/e-invoicing#country--standard-lookup) on the overview page. + +--- + +## Adding custom formats + +See [Custom XML Templates](/en/1.7/e-invoicing/custom-templates) for instructions on adding any e-invoicing format using InvoicePlane's config + generator file pair system. diff --git a/docs/en/1.7/modules/index.md b/docs/en/1.7/modules/index.md new file mode 100644 index 0000000..f443683 --- /dev/null +++ b/docs/en/1.7/modules/index.md @@ -0,0 +1,8 @@ +# Modules + +- [Clients](/en/1.7/modules/clients) +- [Quotes](/en/1.7/modules/quotes) +- [Invoices](/en/1.7/modules/invoices) +- [Recurring Invoices](/en/1.7/modules/recurring-invoices) +- [Payments](/en/1.7/modules/payments) +- [E-Invoicing](/en/1.7/modules/e-invoicing) diff --git a/docs/en/1.7/modules/invoices.md b/docs/en/1.7/modules/invoices.md new file mode 100644 index 0000000..bbc3c3d --- /dev/null +++ b/docs/en/1.7/modules/invoices.md @@ -0,0 +1,157 @@ +# Invoices + +## The Invoice Lifecycle + +Invoice statuses follow the lifecycle of an invoice from draft to paid and allow you to keep track of where each +of your invoices are in their lifecycle. Each of the statuses listed below are automatically set for you when +specific activity occurs with an invoice, but you may also choose to manually change the status at any time +during the invoice lifecycle. + +- Draft + When an invoice is first created, it is placed in Draft status by default. Sending an invoice by email will + automatically change the status from Draft to Sent. Clients cannot view any invoices when they are in Draft + status. +- Sent + When InvoicePlane sends an invoice to a client by email, it will place the invoice in Sent status. This + occurs when using the Send Email function and it also occurs when a recurring invoice is automatically + emailed. Clients can view any of their invoices when they are in Sent status. +- Viewed + When a client views the invoice by either using the Guest URL to view the invoice or by using their Guest + Login account (if they have one), the invoice will be placed in Viewed status. This allows you to keep track + of which invoices a client has looked at. +- Paid + Once an online or offline payment has been made in full against an invoice, the invoice will be placed in + Paid status. +- Overdue + Any invoice with a due date prior to the current date will be visible as being overdue. Overdue invoices + appear in invoice lists with a red due date so they are easily seen. + +Besides this lifecycle an invoice can have two other statuses: + +- Read Only + An invoice will be set to read-only if the status was changed to paid. The invoice can't be edited anymore + but you can create a credit invoice if something went wrong or needs to be changed. +- Credit Invoice + A credit invoice can be created from an existing invoice and will make a duplicate of the invoice but with a + negative amount. This means by default that the balance of both invoices is zero. + +## Viewing Invoices + +To view the invoice list, click `Invoices` from the main menu and select `View Invoices`. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_invoices.jpg)](https://invoiceplane.com/content/screenshots/web/ip_invoices.jpg) + +By default, the invoice list will show all invoices. The filter can be set to `All`, `Draft`, `Sent`, `Viewed`, +`Paid` or `Overdue` by choosing the filter from +the submenu bar. +To navigate between pages, use the pager buttons located on the submenu bar. + +The `Options` button at the end of each row displays a menu with a number of items when clicked: + +- `Edit` - View the quote +- `Download PDF` - Download a copy of the quote as PDF +- `Send Email` - Send the quote to the client via email +- `Enter Payment` - Enter a payment for this invoice +- `Delete` - Delete the invoice\* + +\* This is only available for invoices with the draft status or if Invoice Deletion was enabled. + +## Creating an Invoice + +To create a new invoice, either choose `Invoices` from the main menu and select `Create +Invoice`, or from the invoice list, click the `New` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_invoices_add.jpg)](https://invoiceplane.com/content/screenshots/web/ip_invoices_add.jpg) + +When creating a invoice, start typing the name of the client to create the invoice for. If it\'s an existing +client, choose their name from the list that appears. If it's a new client, type their full name or business +name. Choose the date and invoice group and press the `Submit` button. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_invoices_edit.jpg)](https://invoiceplane.com/content/screenshots/web/ip_invoices_edit.jpg) + +The `Options` button near the top of the edit invoice page displays a menu with a number of items when +clicked: + +- `Add Invoice Tax` - Apply a tax to the entire invoice +- `Enter Payment` - Enter a payment for the invoice +- `Download PDF` - Download a copy of the invoice as PDF +- `Send Email` - Send the invoice to the client via email +- `Copy Invoice` - Create a copy of the invoice +- `Create Recurring` - Set the invoice to recurring +- `Delete` - Delete the invoice\* + +\* Invoice deletion is not available for all invoices. Please read the information for [invoice deletion](/en/1.7/modules/invoices#delete). + +### Add Products + +To add saved products, press the `Add Product` button. Choose the product you want to add and mark the +checkbox on the left, then press `Submit` to insert the products into the quote. +You can edit the quantity, prices or taxes for each product. When finished, press the `Save` button. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_add_product.jpg)](https://invoiceplane.com/content/screenshots/web/ip_add_product.jpg) + +### Changing Item Order + +The order in which an item appears on a quote or invoice can be changed by dragging the row to a new position +with the icon. + +### Discounts + +With the release of InvoicePlane 1.4.0 we introduced discounts for each quotes and invoices. There are two separate types of discounts which can by applied: + +- Item Discounts +- Invoice Discounts + +#### Item Discounts + +Item discounts can be added for each item itself as an amount that will be subtract from the item subtotal. Item discounts can only be added as an amount, not as an percentage. + +#### Invoice Discounts + +Invoice discounts can be added for the whole invoice directly above the invoice total. You can either choose to add a discount as an amount (e.g. 200 $) or as a percentage of the subtotal (e.g. 5%). + +### Adding Taxes + +To apply a tax against the entire invoice, choose `Add Invoice Tax` from the Options button. Choose +the appropriate tax rate and placement from the window that appears and press the `Submit` button. +That tax will be calculated against the invoice total. + +> **Warning:** +> Caution! Do not mix item and invoice taxes. Both tax methods were implemented for countries with different law structures and do not work together very well. If you use both tax method at the same time we can't promise that all calculations are executed correctly. +> +> Also, do **not** use item taxes to apply any service charges or similar extra charges. If you need to apply charges, add a new item or calculate the charges manually. + +### Copying an Invoice + +To copy an invoice, choose `Copy Invoice` from the `Options` menu. Change the client name, +if appropriate, and then select the invoice date and invoice group and press the `Submit` button. All items, taxes and amounts from the source invoice will be copied +to a new invoice. + +--- + +## Invoice Deletion + +By default InvoicePlane prevents the deletion of invoices because it's legally forbidden to delete invoices that +were sent to customers. We decided that it should be not possible to delete invoices that are beyond the `Draft` status. +But you can still enable invoice deletion even if it's not recommended. Open `/application/config/config.php` +and replace +`$config['enable_invoice_deletion'] = FALSE;` +with +`$config['enable_invoice_deletion'] = TRUE;` +To see the delete option in the pulldown, you also need to replace +`$config['disable_read_only'] = FALSE;` +with +`$config['disable_read_only'] = TRUE;` + + +Read only needs to be disabled, otherwise the options menu is not complete. + +## Read-only + +InvoicePlane will set invoices to read-only based on its status and the invoice can't be changed anymore. You can +change the status that will be used for the read-only mode in the settings. +If you don't want invoices to be set to read-only you can disable this feature. Open `/application/config/config.php` +and replace +`$config['disable_read_only'] = FALSE;` +with +`$config['disable_read_only'] = TRUE;` diff --git a/docs/en/1.7/modules/payments.md b/docs/en/1.7/modules/payments.md new file mode 100644 index 0000000..295d13c --- /dev/null +++ b/docs/en/1.7/modules/payments.md @@ -0,0 +1,45 @@ +# Payments + +## View Payments + +To view the payment list, click `Payments` from the main menu and select `View Payments`. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_payments.jpg)](https://invoiceplane.com/content/screenshots/web/ip_payments.jpg) + +To navigate between pages, use the pager buttons located on the submenu bar. + +## Entering a Payment + +To enter a payment, either choose `Payments` from the main menu and select `Enter Payment`, +or from the payment list, click the `New` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_payments_form.jpg)](https://invoiceplane.com/content/screenshots/web/ip_payments_form.jpg) + +When entering a payment, first select the invoice to enter the payment for. This will default the invoice amount +into the Amount field. Adjust the date and amount, if necessary, and optionally select the payment method and +enter any pertinent notes and press the `Save` button near the top right of the page. + +## Online Payments + +InvoicePlane can be configured to allow clients to make payments online. The only payment gateway currently +tested with InvoicePlane is Stripe. + +### Configure Stripe for Online Payments + +To configure InvoicePlane integration with Stripe, you must first have a valid Stripe API Secret Key. If you +don't, follow [these +instructions](https://stripe.com/docs/keys#create-api-secret-key) first to obtain the credentials. + +Once you have your API credentials, perform the following in InvoicePlane: + +1. Click the `Settings` icon and choose the `System Settings` entry. +2. Click the `online payment` tab. +3. Set `Enable Online Payments` to `Yes`. +4. Choose `Stripe` as a merchant driver (only one available in InvoicePlane 1.6). +5. Enter the Secret Key and the Publishable Key obtained from Stripe. +6. Select the appropriate currency code. +7. Press the `Save` button. + +Once configured, send your client the `Guest URL` (found at the bottom of the Invoice Edit screen) and +they will be able to pay their invoice from the link. Optionally, you can also create a Guest User account in +which the client can log into and view and pay their invoices. diff --git a/docs/en/1.7/modules/quotes.md b/docs/en/1.7/modules/quotes.md new file mode 100644 index 0000000..b4364cd --- /dev/null +++ b/docs/en/1.7/modules/quotes.md @@ -0,0 +1,124 @@ +# Quotes + +## The Quote Lifecycle + +Quote statuses follow the lifecycle of a quote from draft to approved and allow you to keep track of where each +of your quotes are in their lifecycle. Each of the statuses listed below are automatically set for you when +specific activity occurs with a quote but you may also choose to manually change the status at any time during +the quote lifecycle. + +- Draft + When a quote is first created, it is placed in Draft status by default. Sending a quote by email will + automatically change the status from Draft to Sent. Clients cannot view any quotes when they are in Draft + status. +- Sent + When InvoicePlane sends a quote to a client by email the status will be changed to Sent. +- Viewed + When a client views the quote by either using the Guest URL to view quote or by using their Guest Login + account (if they have one), the quote will be placed in Viewed status. This allows you to keep track of + which quotes a client has looked at. +- Approved + When a client uses the guest URL to view a quote or logs in using a guest account and views a quote, they + are able to either approve or reject the quote. When a client approves a quote, the status is changed to + Approved. +- Rejected + When a client uses the guest URL to view a quote or logs in using a guest account and views a quote, they + are able to either approve or reject the quote. When a client rejects a quote, the status is changed to + Rejected. +- Canceled + This status can be used for quotes that are not going to make it to the invoicing stage but need to be kept + for reference purposes. Clients are not able to see quotes in this status. + +## Viewing Quotes + +To view the quote list, click `Quotes` from the main menu and select `View Quotes`. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_quotes.jpg)](https://invoiceplane.com/content/screenshots/web/ip_quotes.jpg) + +By default, the quote list will be filtered to all quotes. The filter can be set to `All`, `Draft`, `Sent`, `Viewed`, +`Approved`, `Rejected` or `Canceled` by choosing the filter from the submenu bar. +To navigate between pages, use the pager buttons located on the submenu bar. + +The `Options` button at the end of each row displays a menu with a number of items when clicked: + +- `Edit` - View the quote +- `Download PDF` - Download a copy of the quote as PDF +- `Send Email` - Send the quote to the client via email +- `Delete` - Delete the quote + +## Creating a Quote + +To create a new quote, either choose `Quotes` from the main menu and select `Create Quote`, +or from the quote list, click the `New` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_quotes_add.jpg)](https://invoiceplane.com/content/screenshots/web/ip_quotes_add.jpg) + +When creating a quote, start typing the name of the client to create the quote for. If it's an existing client, +choose their name from the list that appears. If it's a new client, type their full name or business name. +Choose the date and invoice group and submit the form. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_quotes_edit.jpg)](https://invoiceplane.com/content/screenshots/web/ip_quotes_edit.jpg) + +The `Options` button near the top of the edit quotes page displays a menu with a number of items when +clicked: + +- `Add Quote Tax` - Apply a tax to the entire quote +- `Download PDF` - Download a copy of the quote as PDF +- `Send Email` - Send the quote to the client via email +- `Quote to Invoice` - Convert the quote to an invoice +- `Copy Quote` - Create a copy of the quote +- `Delete` - Delete the quote + +### Adding Products + +To add saved products, press the `Add Product` button. Choose the product you want to add and mark the +checkbox on the left, then press `Submit` to insert the products into the quote. +You can edit the quantity, prices or taxes for each product. When finished, press the `Save` button. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_add_product.jpg)](https://invoiceplane.com/content/screenshots/web/ip_add_product.jpg) + +### Changing Item Order + +The order in which an item appears on a quote or invoice can be changed by dragging the row to a new position +with the icon. + +### Discounts + +With the release of InvoicePlane 1.4.0 we introduced discounts for each quotes and invoices. There are two separate types of discounts which can by applied: + +- Item Discounts +- Quote Discounts + +#### Item Discounts + +Item discounts can be added for each item itself as an amount that will be subtract from the item subtotal. Item discounts can only be added as an amount, not as an percentage. + +#### Quote Discounts + +Quote discounts can be added for the whole quote directly above the quote total. You can either choose to add a discount as an amount (e.g. 200 $) or as a percentage of the subtotal (e.g. 5%). + +### Add Tax to Quote + +To apply a tax against the entire quote, choose `Add Quote Tax` from the `Options` button. +Choose the appropriate tax rate and placement from the window that appears and press the `Submit` +button. That tax will be calculated against the quote total. + +> **Warning:** +> Caution! Do not mix item and quote taxes. Both tax methods were implemented for countries with different law structures and do not work together very well. If you use both tax method at the same time we can't promise that all calculations are executed correctly. +> +> Also, do **not** use item taxes to apply any service charges or similar extra charges. If you need to apply charges, add a new item or calculate the charges manually. + +### Copying the Quote + +To copy a quote, choose `Copy Quote` from the `Options` button on the edit quote page. +Change the client name, if appropriate, and then select the quote date and quote group and submit the form. All +items, taxes and amounts from the source quote will be copied to a new quote. + +### Generate Invoice from Quote + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_quotes_quote_to_invoice.jpg)](https://invoiceplane.com/content/screenshots/web/ip_quotes_quote_to_invoice.jpg) + +When a client accepts a quote, you can convert that quote to an invoice by using the `Quote to +Invoice` menu item from the `Options` button. Choose the invoice date and invoice group and +press the `Submit` button. The items from the quote will be copied over to your new +invoice. diff --git a/docs/en/1.7/modules/recurring-invoices.md b/docs/en/1.7/modules/recurring-invoices.md new file mode 100644 index 0000000..68d1947 --- /dev/null +++ b/docs/en/1.7/modules/recurring-invoices.md @@ -0,0 +1,40 @@ +# Recurring Invoices + +Oftentimes instead of sending an invoice as a one time charge, you need to send an email to a client on a +schedule. For example, you may be offering web hosting to your clients, and most likely they are paying for your +services once a month, once a year, etc. It would be a bummer to have to remember to create these invoices every +month, wouldn't it? InvoicePlane can keep this sorted for you. + +## Requirements + +For recurring invoices to generate properly, you must create a [CRON job](/en/1.7/help/setup_cron) or +a scheduled task that opens the following URL once per day: + +``` +http://your-domain.com/invoices/cron/recur/your-cron-key-here +``` + +Replace `your-cron-key-here` with the generated cron key in [System +Settings](/en/1.7/settings/general). + +## Create a recurring Invoice + +To create an invoice which will automatically recur at a specific frequency, the first step is to create the +first invoice and get it sent to your client as you normal would. Once the first invoice has been created, it +can be set up as a recurring invoice by selecting `Create Recurring` from the `Options` +menu. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_invoices_make_recurring.jpg)](https://invoiceplane.com/content/screenshots/web/ip_invoices_make_recurring.jpg) + +The invoice can be set to recur every week, month, year, quarter or six months. Since the first invoice has +already been created, the start date should be set to the next date this particular invoice should recur on. +Generally the start date should be a date in the future. If the invoice should stop recurring on a particular +date, then enter an end date as well. If the invoice should recur perpetually, then leave the end date +empty. + +## Viewing Recurring Invoices + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_invoices_recurring.jpg)](https://invoiceplane.com/content/screenshots/web/ip_invoices_recurring.jpg) + +The list of recurring invoices displays each recurring invoice set up in your system. Recurring invoices may be +stopped or deleted from the `Options` button in the list of recurring invoices. diff --git a/docs/en/1.7/modules/tasks-projects.md b/docs/en/1.7/modules/tasks-projects.md new file mode 100644 index 0000000..8eaa5c5 --- /dev/null +++ b/docs/en/1.7/modules/tasks-projects.md @@ -0,0 +1,38 @@ +# Tasks and Projects + +InvoicePlane provides basic task management that is integrated into the invoice workflow. You can link tasks to projects and projects to clients to structure everthing. + +## Projects + +Projects can be added from the navigation bar. You can chose the project name and a client. Choosing a client is optional. If you choose a client, tasks that are assigned to this project can onl be added to invoices for the same client. + +## Tasks + +Tasks can be added from the navigation bar. They have several fields that are explained in the following table. + +| Field | Description | +| --- | --- | +| Task name | The title or name of the task. Normally a short headword or sentence | +| Task description | Can contain a long text that discribes the task. Can also be used to store notes. | +| Task price | The price set here will be used in invoices to properly store tasks. The task price is the same as the product price. | +| Tax Rate | Task tax rates are the same like product tax rates. It will be added to the task price if added to an invoice. | +| Finish date | Also called deadline, it defines the date where the task should be finished. Tasks are displayed as overdue (red color) if the finish date has already passed. | +| Status | The task status defines the current state of the task. More information can be found below. | +| Project | This optional select can be used to link tasks to projects. | + +### Task Status + +A task can have one off the following statuses. Please notice that only completed tasks can be added to invoices. + +| Status | Description | +| --- | --- | +| Not started | The title or name of the task. Normally a short headword or sentence | +| In progress | The task is currently in progress. Someone works on the task. | +| Completed | The task was completed and is ready to be added to an invoice. | + +### Tasks in Invoices + +Inside invoices you can add tasks to an invoice. Therefore, use the "Add Task" button. This will open a new panel where all available tasks will be listed. Please notice that the following requirements must be fullfilled for a tasks to be available: + +- the task must be have the status Completed. +- the task must either have no linked project or the client of the current invoice must match theclient that is assigned to the linked project. diff --git a/docs/en/1.7/security/index.md b/docs/en/1.7/security/index.md new file mode 100644 index 0000000..fb3ec28 --- /dev/null +++ b/docs/en/1.7/security/index.md @@ -0,0 +1,70 @@ +# What changed in 1.7 + +This page summarises the changes in InvoicePlane 1.7 that affect how you configure and run the application. Each item links to the feature documentation where it is explained in context. + +## Things you need to act on + +### Custom PDF templates must be registered + +PDF templates are no longer picked up automatically from the templates directory. If you have custom templates, you need to declare their names in `ipconfig.php` before upgrading. Built-in templates (InvoicePlane, InvoicePlane - paid, InvoicePlane_Web) continue to work without any configuration. + +→ [Custom PDF Templates](/en/1.7/templates/pdf-template-allowlist) + +### SVG logos are no longer accepted + +SVG is no longer an accepted format for logo uploads. If your installation uses an SVG company logo or login logo, replace it with a PNG, JPG, GIF, or WEBP file. + +→ [Logo upload formats](/en/1.7/settings/general#logo-upload) + +### Custom integrations calling `phpmail_send()` + +`phpmail_send()` previously returned `true` regardless of whether the email was actually delivered. It now returns the real result. If you have any custom code that calls this function, update it to handle `false` as a delivery failure. + +--- + +## Changes that work automatically after upgrading + +### Password reset links now expire + +Password reset links expire after 15 minutes by default. The expiry time is configurable in `ipconfig.php`. + +→ [Password reset](/en/1.7/settings/user-accounts#password-reset) + +### Email template preview shows source + +The email template preview no longer renders the template as HTML. It shows the raw template source instead, so what you see is what you edit, not a rendered result. + +→ [Email Templates](/en/1.7/settings/email-templates) + +### Setup wizard is locked after installation + +After a successful installation, the setup wizard (`/index.php/setup`) is automatically disabled. It is no longer accessible once setup is complete. + +→ [Installation](/en/1.7/getting-started/installation) + +### Image metadata stripping (opt-in) + +Uploaded images can have embedded metadata (EXIF) stripped automatically. This is disabled by default and can be enabled in `ipconfig.php`. + +→ [Logo upload](/en/1.7/settings/general#logo-upload) + +--- + +## New `ipconfig.php` settings + +```ini +; Custom template directory outside the web root (optional) +CUSTOM_TEMPLATES_FOLDER=/srv/invoiceplane-templates/ + +; Comma-separated names of custom templates to make available (no .php extension) +CUSTOM_INVOICE_TEMPLATES_PDF= +CUSTOM_INVOICE_TEMPLATES_PUBLIC= +CUSTOM_QUOTE_TEMPLATES_PDF= +CUSTOM_QUOTE_TEMPLATES_PUBLIC= + +; How long a password reset link remains valid, in minutes (default: 15, max: 1440) +PASSWORD_RESET_TOKEN_EXPIRY_MINUTES=15 + +; Strip EXIF/image metadata from uploaded images (default: false) +SEC_STRIP_EXIF_FROM_IMAGES=false +``` diff --git a/docs/en/1.7/settings/custom-fields.md b/docs/en/1.7/settings/custom-fields.md new file mode 100644 index 0000000..9255978 --- /dev/null +++ b/docs/en/1.7/settings/custom-fields.md @@ -0,0 +1,28 @@ +# Custom Fields + +Custom fields can be created to store information which InvoicePlane doesn\'t provide fields for. Custom fields +can be created for: + +- Clients +- Quotes +- Invoices +- Payments +- User Accounts + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_custom_fields.jpg)](https://invoiceplane.com/content/screenshots/web/ip_custom_fields.jpg) + +## Adding a Custom Field + +To add a new custom field click on the settings icon in the menubar and +then choose `Custom Fields`. On the overview click on `New` in the top right. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_custom_fields_form.jpg)](https://invoiceplane.com/content/screenshots/web/ip_custom_fields_form.jpg) + +When adding custom fields, it is recommended to only use alpha and numeric characters for the label name. Once a +custom field has been added to an object, the custom field will display at the bottom of the form for that +object (so a custom field created for the client object will appear on the client form). + +## Adding Custom Fields to Templates + +Please take a look at the [Customize Templates +page](/en/1.7/templates/customize-templates#custom-fields) for more information about custom fields in templates. diff --git a/docs/en/1.7/settings/email-templates.md b/docs/en/1.7/settings/email-templates.md new file mode 100644 index 0000000..61d9859 --- /dev/null +++ b/docs/en/1.7/settings/email-templates.md @@ -0,0 +1,35 @@ +# Email Templates + +Instead of having to type the body of an email each time an invoice or quote is emailed from InvoicePlane, email templates can be customized to your liking, giving you a set of predefined templates to choose from. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_email_templates.jpg)](https://invoiceplane.com/content/screenshots/web/ip_email_templates.jpg) + +## Creating an Email Template + +To create a new email template, click the settings icon near the right hand side of the main menu, select `Email Templates`, and click the `New` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_email_templates.jpg)](https://invoiceplane.com/content/screenshots/web/ip_email_templates.jpg) + +Template variables can be inserted into the body of your email by clicking the name of the variable to include from the list below the form. The example above shows what an email template for a new invoice might look like. + +## Setting Default Email Templates + +To access the settings for your default templates, click the settings icon , select `System Settings`, and choose either the `Invoices` or the `Quotes` tab + +**Invoices** + +- Default Email Template - The selected template would be used for invoices in draft, sent and viewed statuses. +- Paid Email Template - The selected template would be used for invoices in paid status. +- Overdue Email Template - The selected template would be used for invoices which are overdue. + +**Quotes** + +- Default Email Template - The selected template would be used for all quotes in any status. +- Paid Email Template - The selected template would be used for invoices in paid status. +- Overdue Email Template - The selected template would be used for invoices which are overdue. + +When manually sending an invoice or quote from within InvoicePlane, the appropriate email template will be selected prior to sending. Of course, you may make any last minute adjustments to the content of the email before sending it. Since recurring invoices send email on their own without any manual intervention, it is helpful to have a set of email templates created and the default settings configured so InvoicePlane knows which template to use each time it sends them out. + +## Template Preview + +The preview button shows the raw template source — the actual text and variable placeholders as they are stored, not a rendered result with real data substituted in. This lets you review and verify the template structure before it is used. diff --git a/docs/en/1.7/settings/email.md b/docs/en/1.7/settings/email.md new file mode 100644 index 0000000..916fab4 --- /dev/null +++ b/docs/en/1.7/settings/email.md @@ -0,0 +1,16 @@ +# Email Settings + +Before InvoicePlane can send emails you have to configure he email settings here. You can choose between three different ways to send emails. +If you don't want that invoice and quote pdf files are automatically attached to emails disable this feature by changing `Attach Quote/Invoice on email?` to `No` + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_settings_mail.jpg)](https://invoiceplane.com/content/screenshots/web/ip_settings_mail.jpg) + +| Method | Description | +| --- | --- | +| PHP Mail | Uses the built-in email sending method of PHP which allows to send mails without any configuration. | +| Sendmail | Like PHP Mail all emails will be sent without the need to configure anything. Please choose Sendmail only if you are sure that your server has Sendmail installed, enabled and configured because it is possible that your servers OS does not ship with Sendmail by default. | +| SMTP | You can also use a SMTP server to send mails. Using SMTP allows you to send emails via external servers. You will need the SMTP server's hostname, login credentials and the used port and security method. | + +## Delivery failures + +When an email cannot be delivered, InvoicePlane logs the failure. If you have custom code that calls the internal `phpmail_send()` function, check that it handles a `false` return value — prior to version 1.7 this function always returned `true`, so code written for older versions may assume delivery always succeeded. diff --git a/docs/en/1.7/settings/general.md b/docs/en/1.7/settings/general.md new file mode 100644 index 0000000..2091ac4 --- /dev/null +++ b/docs/en/1.7/settings/general.md @@ -0,0 +1,57 @@ +# General Settings + +The general settings page sets a lot of options that will change the look & feel of the whole application or +that are needed for some special purposes. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_settings_general.jpg)](https://invoiceplane.com/content/screenshots/web/ip_settings_general.jpg) + +## General settings + +| Setting | Description | +| --- | --- | +| Language | Choose the [language](/en/1.7/system/translation-localization) for the application | +| First day of the Week | Choose if the week should start on sunday or monday | +| Default Country | Select the country that will be used automatically when adding clients | +| Date Format | Choose the date format of the application | +| Currency Symbol | Choose the currency symbol like `€` or `$`. You can also use any letters like `AUD` or `CHF` | +| Currency Symbol Placement | Choose if the currency symbol should be placed before or after amounts | +| Thousand Separator | Select if thousands should be separated by `,` or `.` | +| Decimal Point | Select if the decimals point should be `,` or `.` | +| Tax Rate Decimal Places | Select how much placed after the decimal point should be used for tax rates. | + +## Dashboard settings + +| Setting | Description | +| --- | --- | +| Quote Overview Period | Select the period that should be used for quotes on the quote overview | +| Invoice Overview Period | Select the period that should be used for invoices on the invoice overview | + +## Interface settings + +| Setting | Description | +| --- | --- | +| Disable the Sidebar | Choose if the sidebar should be disabled | +| Custom Title | Set a custom title which will be shown on browser tabs | +| Use Monospace font for Amounts | Choose if the application should use a monospace font for amounts. Example: `1.345,23 €` | +| Login Logo | Upload an image that will be displayed above the login form. Recommended size: about 300px width. Accepted formats: JPG, JPEG, PNG, GIF, WEBP. | +| Cron Key | You will need this cron key to setup [recurring invoices](/en/1.7/modules/recurring-invoices). | + +## System settings + +| | | +| --- | --- | +| Send all outgoing emails as BCC to the admin account | If you enable this option **every** outgoing email is sent as an anonymous copy (BCC) to the administrator. The administrator is the user that was created during the InvoicePlane setup. | +| Cron Key | You will need this cron key to setup [recurring invoices](/en/1.7/modules/recurring-invoices) | +| Enable Debug Mode | The debug mode enables logging for the application. The logs can be found in the `/application/logs` folder or in your browser console. | + +## Logo upload + +The login logo and company logo fields accept JPG, JPEG, PNG, GIF, and WEBP files. SVG files are not accepted. + +Uploaded images may contain embedded metadata (EXIF) added by cameras or editing tools, including information such as GPS coordinates and device identifiers. To have this metadata stripped automatically on upload, add the following to `ipconfig.php`: + +```ini +SEC_STRIP_EXIF_FROM_IMAGES=true +``` + +This is disabled by default. When enabled, stripping is applied to JPEG, PNG, GIF, and WEBP files. If stripping is not possible on your server, the image is still saved — only a warning is logged. diff --git a/docs/en/1.7/settings/index.md b/docs/en/1.7/settings/index.md new file mode 100644 index 0000000..dbccd15 --- /dev/null +++ b/docs/en/1.7/settings/index.md @@ -0,0 +1,15 @@ +# Settings + +- [General Settings](/en/1.7/settings/general) +- [Invoice Settings](/en/1.7/settings/invoices) +- [Quotes Settings](/en/1.7/settings/quotes) +- [Tax Settings](/en/1.7/settings/taxes) +- [eMail Settings](/en/1.7/settings/email) +- [Online Payments](/en/1.7/settings/online-payments) +- [Updatecheck](/en/1.7/settings/updatecheck) +- [Custom Fields](/en/1.7/settings/custom-fields) +- [eMail Templates](/en/1.7/settings/email-templates) +- [Invoice Groups](/en/1.7/settings/invoice-groups) +- [Payment Methods](/en/1.7/settings/payment-methods) +- [Taxrates](/en/1.7/settings/taxrates) +- [User Accounts](/en/1.7/settings/user-accounts) diff --git a/docs/en/1.7/settings/invoice-groups.md b/docs/en/1.7/settings/invoice-groups.md new file mode 100644 index 0000000..4ac882d --- /dev/null +++ b/docs/en/1.7/settings/invoice-groups.md @@ -0,0 +1,41 @@ +# Invoice Groups + +When a new invoice or quote is created, InvoicePlane uses invoice groups to determine the next invoice or quote number and how it should be structured. InvoicePlane comes with two default invoice groups - Invoice Default and Quote Default. Both groups will generate simple incremental ID's starting at the number 1, but the Quote Default will be prefixed with "QUO". + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_invoice_groups.jpg)](https://invoiceplane.com/content/screenshots/web/ip_invoice_groups.jpg) + +## Configure an Invoice Group + +These default groups can be customized and any number of new groups can be created. Each group has a number of options. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_invoice_groups_form.jpg)](https://invoiceplane.com/content/screenshots/web/ip_invoice_groups_form.jpg) + +| Setting | Description | +| --- | --- | +| Name | The name if the invoice group that will be used in the settings | +| Identifier formatting | The identifier is used to generate invoices or quotes and can consist of alpha-numeric characters | +| Next ID | Set the ID for the next invoice. Please notice that you should not set the next ID to a number below the ID of the last generated ID. Example: You created 59 invoices but you want the next invoice to have the ID 100 so set the Next ID to 100. | +| Left Pad | The left padding can be used to generate IDs that contain zeros to the left of the ID. The left padding contains the invoice ID itself. Example: you set the left padding to 5 which would lead to invoice IDs like 00056 or 00397. | + +### Format the Identifier + +> **Warning:**Caution! The identifier **must** contain the `{{{ID}}}` tag no matter where! + +There are some template tags that can be used to create a custom identifier. + +| Name | Tag | Description | +| --- | --- | --- | +| ID | `{{{ID}}}` | Inserts the increasing ID of the invoice | +| Current Year | `{{{year}}}` | Inserts the current year with 4 digits | +| Current month | `{{{month}}}` | Inserts the current month with 2 digits | +| Current day | `{{{day}}}` | Inserts the current day with 2 digits | + +### Formatting Examples + +| Template | Output | +| --- | --- | +| `{{{year}}}/{{{ID}}}` | YYYY/456 | +| `{{{year}}}_{{{month}}}_{{{ID}}}` | YYYY\_MM\_456 | +| `{{{year}}}-{{{month}}}-{{{day}}}-{{{ID}}}` | YYYY-MM-DD-456 | +| `IN{{{year}}}{{{ID}}}` | INYYYY456 | +| `IPQ-{{{day}}}{{{ID}}}` | IPQ-DD456 | diff --git a/docs/en/1.7/settings/invoices.md b/docs/en/1.7/settings/invoices.md new file mode 100644 index 0000000..a11b0b5 --- /dev/null +++ b/docs/en/1.7/settings/invoices.md @@ -0,0 +1,21 @@ +# Invoice Settings + +On the invoice settings page you can set a lot of options to control how invoices should behave. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_settings_invoices.jpg)](https://invoiceplane.com/content/screenshots/web/ip_settings_invoices.jpg) + +## General settings + +| Setting | Description | +| --- | --- | +| Default Invoicegroup | Select the [Invoicegroup](/en/1.7/settings/invoicegroups) that should be used by default | +| Set the Invoice to read-only on | Select on which state an invoice should be set to read-only | +| Invoice due after | Select after how many days an invoice should be set to due | +| Default Terms | You can enter the default terms for any invoice here | +| Automatically email recurring invoices | If you have recurring invoices you can choose if InvoicePlane should send an email with the invoice attached to the client automatically | +| Mark Invoices as sent when PDF is generated | Choose if InvoicePlane should set the status of an invoice to `Sent` when you download the PDF | +| Invoice Logo | Upload an image that should be placed on templates. | + +## Templates + +All following settings allow you to set default PDF and email templates for different states and purposes. At the end in the PDF Footer you can enter information that should be placed at the bottom of each PDF template. diff --git a/docs/en/1.7/settings/online-payments.md b/docs/en/1.7/settings/online-payments.md new file mode 100644 index 0000000..359e956 --- /dev/null +++ b/docs/en/1.7/settings/online-payments.md @@ -0,0 +1,25 @@ +# Merchant Account Settings + +InvoicePlane 1.6 supports only **Stripe** by default as a payment gateway. The reason why the other providers were dropped can be found [here](/en/1.7/getting-started/updating-ip#16-breaking-changes). Please let us know what payment method you are missing at [GitHub](https://github.com/InvoicePlane/InvoicePlane/issues) + +### Configure your payment provider + +To configure your payment provider, select the provider from the dropdown list. If you don't know which provider should be selected please contact your provider. We cannot offer any support for specific provider settings. + +After selecting a provider InvoicePlane will show you a configuration box will all needed settings. Make sure to enable the provider first. After that fill all needed information. Again: if you are not shure which fields to fill, contact your provider. + +> **Warning:**It is highly recommended to test if the online payment is working correctly using the **Test Mode** if available. This allows you to pay online without transfering real money. + +### Configure **Stripe** as a payment provider + +1. Login or regiser for an account at [stripe.com](https://stripe.com) +2. Once you logged in, on the top search bar look for the `API Keys` page. +3. Create a new *secret key*. +4. Now, open the `settings` in your InvoicePlane installation and navigate to the `online payment` tab. +5. Tick the `Enable Online Payments` checkbox. +6. From the dropdown list select `Stripe` as a payment provider. +7. Tick the `enable` checkbox on the stripe card that appeared when you selected stripe as a payment provider in the last step. +8. Insert the secret key and the publishable key in the corrisponding fields. The secret key must be set in the field that hides the characters (like a password). +9. Click on **save**, and you are done! + +Please take note that InvoicePlane is in no way affiliated to Stripe and that we are not able to help with Stripe specific issues. These instructions only concern integrating Stripe as a payment gateway in InvoicePlane. diff --git a/docs/en/1.7/settings/payment-methods.md b/docs/en/1.7/settings/payment-methods.md new file mode 100644 index 0000000..c700cbf --- /dev/null +++ b/docs/en/1.7/settings/payment-methods.md @@ -0,0 +1,13 @@ +# Payment Methods + +Payment Methods + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_payment_methods.jpg)](https://invoiceplane.com/content/screenshots/web/ip_payment_methods.jpg) + +## Add a Payment Method + +To add a new payment method, click the settings icon near the right hand side of the main menu, select `Payment Methods`, and click the `New` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_payment_methods_form.jpg)](https://invoiceplane.com/content/screenshots/web/ip_payment_methods_form.jpg) + +Simply enter the name of the payment method and click on `Save` button. The method will be available when adding a payment. diff --git a/docs/en/1.7/settings/quotes.md b/docs/en/1.7/settings/quotes.md new file mode 100644 index 0000000..a939f0a --- /dev/null +++ b/docs/en/1.7/settings/quotes.md @@ -0,0 +1,17 @@ +# Quote Settings + +The general settings page sets a lot of options that will change the look & feel of the whole application or that are needed for some special purposes. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_settings_quotes.jpg)](https://invoiceplane.com/content/screenshots/web/ip_settings_quotes.jpg) + +## General settings + +| Setting | Description | +| --- | --- | +| Quote expires after | Choose after how many days a quote should be set to expired | +| Default Quotegroup | Select the [Quotegroup (aka Invoicegroups)](/en/1.7/settings/invoicegroups) that should be used by default | +| Mark Quotes as sent when PDF is generated | Choose if InvoicePlane should set the status of an quote to `Sent` when you download the PDF | + +## Templates + +All following settings allow you to set default PDF and email templates for different states and purposes. diff --git a/docs/en/1.7/settings/taxes.md b/docs/en/1.7/settings/taxes.md new file mode 100644 index 0000000..e5c158f --- /dev/null +++ b/docs/en/1.7/settings/taxes.md @@ -0,0 +1,11 @@ +# Tax Settings + +The general settings page sets a lot of options that will change the look & feel of the whole application or that are needed for some special purposes. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_settings_taxes.jpg)](https://invoiceplane.com/content/screenshots/web/ip_settings_taxes.jpg) + +| Setting | Description | +| --- | --- | +| Default Invoice Tax Rate | Choose the [Taxrate](/en/1.7/settings/taxrates) that should be applied to an invoice by default | +| Default Invoice Tax Rate | Choose where to place the invoice tax | +| Default Invoice Tax Rate | Choose the [Taxrate](/en/1.7/settings/taxrates) that should be applied to every product of an invoice by default | diff --git a/docs/en/1.7/settings/taxrates.md b/docs/en/1.7/settings/taxrates.md new file mode 100644 index 0000000..575271d --- /dev/null +++ b/docs/en/1.7/settings/taxrates.md @@ -0,0 +1,13 @@ +# Taxrates + +If you want to add taxes to products / items or invoices you have to configure them on the Taxrates settings page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_taxrates.jpg)](https://invoiceplane.com/content/screenshots/web/ip_taxrates.jpg) + +## Add a new Taxrate + +To add a new taxrate, click the settings icon near the right hand side of the main menu, select `Taxrates`, and click the `New` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_taxrates_form.jpg)](https://invoiceplane.com/content/screenshots/web/ip_taxrates_form.jpg) + +First enter the official name of the taxrate. Be careful as this will be displayed on quotes or invoices as a description of the taxrate. Then enter the percentage of the taxrate and click on `Save`. diff --git a/docs/en/1.7/settings/updatecheck.md b/docs/en/1.7/settings/updatecheck.md new file mode 100644 index 0000000..ff440fa --- /dev/null +++ b/docs/en/1.7/settings/updatecheck.md @@ -0,0 +1,6 @@ +# Updatecheck + +On the updatecheck page InvoicePlane checks for updates with contacting our website. The result of the check will be displayed below the version. +Additionally the latest news will be displayed below the updatecheck. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_settings_updates.jpg)](https://invoiceplane.com/content/screenshots/web/ip_settings_updates.jpg) diff --git a/docs/en/1.7/settings/user-accounts.md b/docs/en/1.7/settings/user-accounts.md new file mode 100644 index 0000000..cda6584 --- /dev/null +++ b/docs/en/1.7/settings/user-accounts.md @@ -0,0 +1,86 @@ +# User Accounts + +InvoicePlane can contain an unlimited number of user accounts (both Administrator and Guest), but there is no +real level of ownership or separation between different administrator accounts. Each administrator account has +full access to the entire system and can see all data system-wide. Guest accounts are read-only and can be +restricted to see invoices, quotes and payments for the client or clients you specify. + +## User Types + +**Administrator** + +An administrator account has full access to the entire system. Administrators can create and delete clients, +invoices, payments, users, and everything else in the system. The account created during installation is an +administrator account. If you don't want somebody having full access to all of your data, do not create an +administrator account for them. + +**Guest (Read Only)** + +There may be times where you need to allow a user into your system, but with limited access. Guest accounts allow +you to create a user account which can only view quotes, invoices and payments for one or more clients. A guest +account may be created for a particular client, in which case you would create the account and grant access to +only that client. A guest account may also be created for an accountant, in which case you might create the +account and grant access to more than just one client. + +## Viewing Users + +To view the user list, click the settings icon near the right hand side +of the main menu and select `User Accounts`. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_useraccounts.jpg)](https://invoiceplane.com/content/screenshots/web/ip_useraccounts.jpg) + +To navigate between pages, use the pager buttons located on the submenu bar. + +The `Options` button at the end of each row displays a menu from which you can edit or delete an user. + +## Add an User Account + +To add a new user account, click the settings icon near the right hand +side of the main menu, select `User Accounts`, and click the `New` button near the top +right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_useraccounts_form.jpg)](https://invoiceplane.com/content/screenshots/web/ip_useraccounts_form.jpg) + +To create the user account, provide the user's name (typically their full name), email address (this is what +they'll use to log in with), password and password verification. When selecting the user type, choose between +`Administrator` or `Guest`. Once the user type has been selected, the rest of the form +will display below the initial form. + +If `Administrator` was selected as the user type, several fields will be made available to complete, +such as their address and location information and contact information. Fill in the fields and press the `Save` button near the top right of the page. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_useraccounts_form.jpg)](https://invoiceplane.com/content/screenshots/web/ip_useraccounts_form.jpg) + +If `Guest` was selected as the user type, an area will be made available from which you can give +access to one or more clients for the `Guest` user account. To provide access to a single client, +press the `Add Client` button, begin typing the name of the client in to the form and select the +client when they appear in the list. Press the `Submit` button. If you want you can add +another client to the user account. If not press `Cancel`. Don't forget to save the user +account. + +[![](https://invoiceplane.com/content/screenshots/web_thumb/ip_useraccounts_add_client.jpg)](https://invoiceplane.com/content/screenshots/web/ip_useraccounts_add_client.jpg) + +If a guest account is not a client, but instead an accountant, you will probably want to provide them with access +to more than just a single client. In that case, press the `Add Client` button, begin typing the name +of the first client in to the form and select the client when they appear in the list. Press the `Submit` button and begin typing the next client name. Rinse, wash and repeat until +each client the guest should have access to has been added to the list. Press the Close button and then press +the `Save` button near the top of the page when finished. + +No matter if the account is an Administrator account or a Guest account, all users use the same URL to log in. Be +sure and provide your login URL to any users who you create accounts for. + +## Password Reset + +If a user forgets their password, they can request a reset from the login page by clicking **Forgot your password?** and entering their email address. InvoicePlane sends a reset link to that address. + +The reset link expires after 15 minutes. If the link has expired by the time the user clicks it, they need to request a new one. + +To change the expiry time, add the following to `ipconfig.php`: + +```ini +PASSWORD_RESET_TOKEN_EXPIRY_MINUTES=30 +``` + +The value is in minutes. The maximum is 1440 (24 hours). + +Rate limiting applies: a given IP address or email address can only request a limited number of resets within an hour. This prevents automated tools from flooding the reset flow. diff --git a/docs/en/1.7/system/importing-data.md b/docs/en/1.7/system/importing-data.md new file mode 100644 index 0000000..f252793 --- /dev/null +++ b/docs/en/1.7/system/importing-data.md @@ -0,0 +1,57 @@ +# Importing Data + +InvoicePlane can import data from any system as long as it is provided in comma delimited CSV format and is +structured according to the details below. The data import tool can be accessed by clicking the Settings icon +and choosing the Import Data item. + +The import tool assumes the following: + +The file names will be exactly as they are listed below. +All of the columns listed below must be present in the files, even if there is no data in the column. +The first row of each file must contain the file headings, and those headings must be named exactly as they are +listed below. +The files must all be in comma delimited CSV format. +The files to import must be located in your uploads/import folder. +The email address in the invoice file must be an email address of an actual user account currently in +InvoicePlane. +If any of the rules above are not met, the import will not work as expected. + +**File names and columns** + +- clients.csv + - client\_name + - client\_address\_1 + - client\_address\_2 + - client\_city + - client\_state + - client\_zip + - client\_country + - client\_phone + - client\_fax + - client\_mobile + - client\_email + - client\_web + - client\_vat\_id + - client\_tax\_code + - client\_active (1 for active, 0 for inactive) +- invoices.csv + - user\_email + - client\_name + - invoice\_date\_created (yyyy-mm-dd format) + - invoice\_date\_due (yyyy-mm-dd format) + - invoice\_number + - invoice\_terms +- invoice\_items.csv + - invoice\_number + - item\_tax\_rate (ex: 7.8 would indicate 7.8%) + - item\_date\_added (yyyy-mm-dd format) + - item\_name + - item\_description + - item\_quantity + - item\_price (without any currency symbols) +- payments.csv + - invoice\_number + - payment\_method (ex: Cash, Credit or PayPal) + - payment\_date (yyyy-mm-dd format) + - payment\_amount (without any currency symbols) + - payment\_note diff --git a/docs/en/1.7/system/index.md b/docs/en/1.7/system/index.md new file mode 100644 index 0000000..7a8a489 --- /dev/null +++ b/docs/en/1.7/system/index.md @@ -0,0 +1,5 @@ +# System + +- [Translation / Localization](/en/1.7/system/translation-localization) +- [Importing Data](/en/1.7/system/importing-data) +- [Upgrade from FusionInvoice](/en/1.7/system/upgrade-from-fusioninvoice) diff --git a/docs/en/1.7/system/translation-localization.md b/docs/en/1.7/system/translation-localization.md new file mode 100644 index 0000000..c00d15a --- /dev/null +++ b/docs/en/1.7/system/translation-localization.md @@ -0,0 +1,63 @@ +# Translation / Localization + +InvoicePlane comes with the English language by default. To contribute to or to download other language packs +please visit the [translation repository](https://crowdin.com/project/invoiceplane). + +## Install a new translation + +> **Warning:** +> Please notice: some translations are not complete so some texts will be displayed in English. So do not delete +> the english language folder! + +1. Download the translation pack from the [translation + repository](https://crowdin.com/project/invoiceplane) +2. Open the folder of the language you want to install (`de` = German) +3. Copy the folder that should be called something like `de_DE`, `fr_FR` or + `es_AR` +4. Paste the folder to the following directory of your InvoicePlane installation: + `/application/language/` +5. Apply the language in your [general settings](/en/1.7/settings/general). + +Your folder structure should look like this: + +``` +├── application/ +│ ├── ... +│ ├── language/ +│ │ ├── english/ +│ │ └── Deutsch/ +│ │ ├── custom_lang.php +│ │ ├── ip_lang.php +│ │ ├── merchant_lang.php +│ │ └── ... +│ └── ... +├── assets/ +└── ... +``` + +## Customize translations + +You are able to replace all language strings in the application with your own strings. We added a file called `custom_lang.php` which is located in every language folder (see above). + +To replace or alter a translation, search for the string in the main language files (ip\_lang.php). You have to copy the whole line with the string into the `custom_lang.php` file that it looks like this: + +``` + 'Actual content of the Language String', + +); +``` + +Now, simply change the translation to whatever you need. But keep in mind that some strings are designed to fit into special spaces. Try to keep the character count or the original string. + +> **Danger:** +> If you want to use the `'` character in your string you have to replace it with `\'`. +> Example: `'language_string_key' => 'Description with \'quotes\'',` diff --git a/docs/en/1.7/system/upgrade-from-fusioninvoice.md b/docs/en/1.7/system/upgrade-from-fusioninvoice.md new file mode 100644 index 0000000..bc426af --- /dev/null +++ b/docs/en/1.7/system/upgrade-from-fusioninvoice.md @@ -0,0 +1,32 @@ +# Upgrade form FusionInvoice + +If you used FusionInvoice v.1x to manage your invoices you can migrate to InvoicePlane. +Follow these steps to +migrate your installation. + +## Make a full Backup + +Actually you don't have to make a full backup of your FusionInvoice setup but we recommend to do so. We can not +guarantee that the [Migrationtool](https://github.com/InvoicePlane/Migrationtool) is working without +problems. +Make a complete copy of the folder that holds your installation and make a backup of your +database. + +## Use the Migrationtool + +1. [Download the Migrationtool](https://github.com/InvoicePlane/Migrationtool/archive/master.zip) + and unzip it to any directory on your webserver or your local machine and check if you copied the `.htaccess` + file. +2. If you want to run the tool in a subdirectory please set the directory in the `config.php` file. +3. Then open the URL which can access the Migrationtool and follow the instructions. + +> **Warning:**Please do **not** use multiple directories like `yourdomain.com/tools/migration/migrationtool` +> as the tool only supports one directory at the moment. + +## Run the InvoicePlane Updates + +After converting the database it's very important that you open the setup wizard +of your InvoicePlane installation located at `yourdomain.com/setup`. Follow the instructions and the +setup will run any necessary database updates. Without these updates InvoicePlane will not run. + +> **Note:** diff --git a/docs/en/1.7/templates/customize-templates.md b/docs/en/1.7/templates/customize-templates.md new file mode 100644 index 0000000..856e2da --- /dev/null +++ b/docs/en/1.7/templates/customize-templates.md @@ -0,0 +1,160 @@ +# Customize Templates + +For the customization you just need some little knowledge of HTML and CSS. PHP knowledge is not needed by +default but may help if you want to achieve special layouts or functions. + +> **Warning:** +> Please remember: Before doing any customizations, make a copy of a default template! If you make changes in the +> default templates they will be overwritten on updates. + +> **Note:** +> Hint: PDF templates will be generated with a PDF engine called mPDF. This means that some styles may not work +> because of conversion from HTML to PDF. If you need help with styling please refer to the [mPDF documentation](https://mpdf.github.io/). + +## Customize the Look and Feel + +First of all please remember that there is a basic styling for each template. The files use two CSS stylesheets +and some hardcoded styles. If you want to customize your template you should make changes in the hardcoded part +which means: edit the content between `` only. Do not +edit the templates.css as changes will be overwritten on updates. + +## First Steps + +InvoicePlane already provides a lot of data for all templates. The table below gives you an overview on which +variables are available in the templates. + +### Invoice Templates + +| Variable | Description | +| --- | --- | +| `$invoice` | It holds data about the invoice itself, the user that created the invoice and the client that is selected for the invoice. It also provides all payments if there are any in the database. | +| `$invoice_tax_rates` | Provides information about all tax rates that were applied to the invoice | +| `$items` | Contains all invoice items with their corresponding data. | +| `$payment_method` | Provides information about the selected payment method. | +| `$custom_fields` | Contains custom fields for the invoice, the user, the client and if available for the parent quote. | +| `$show_item_discounts` | Is true if there are any items with a discount, is false if not. Can be used to display the additional discount column only if there are discounts to display. | + +### Quote Templates + +| Variable | Description | +| --- | --- | +| `$quote` | It holds data about the quotes itself, the user that created the quote and the client that is selected for the quotes. | +| `$quote_tax_rates` | Provides information about all tax rates that were applied to the quote. | +| `$items` | Contains all quote items with their corresponding data. | +| `$custom_fields` | Contains custom fields for the quote, the user and the client. | +| `$show_item_discounts` | Is true if there are any items with a discount, is false if not. Can be used to display the additional discount column only if there are discounts to display. | + +If you want to know which data is available in every variable go to the bottom of the template and add the +following code directly above the `` tag. Replace *invoice* with the name of the +variable your want to look up. + +``` +
+``` + +If you load the template now you will see something like this but with hundred more lines: + +``` +stdClass Object +( + [client_id] => 13 + [invoice_id] => 24 + [user_id] => 2 + [invoice_group_id] => 8 +... +``` + +This is the list of all available variables where the part in the brackets (e.g. `invoice_id`) is the +name of the variable and the part after the `=>` is the content of the variable. + +## Adding Custom Fields + +Custom fields work in a special way. As custom fields are added by the user there is no way to define which +fields will be available. Therefore InvoicePlane searches for all available custom fields before printing the +template. All fields are stored in the `$custom_fields` variable that may look like this: + +``` +Array +( + [invoice] => Array + ( + [Sent at] => 2016-11-15 + [Contributors] => [ + 0 => Marty McFly + 1 => Jennifer McFly + ] + ) + [client] => Array + ( + [CRM ID] => 346999-13400 + [has Supervisor] => 1 + [Supervisors] => 1 + ) + [user] => Array + () + [quote] => Array + ( + [Sent at] => 2016-11-10 + [Special discount offered?] => 0 + ) +) +``` + +The `$custom_fields` variable is a collection of all custom field types that group all available +custom fields. As you can see in the example, the invoice has a custom field named *Sent at*, the client +has a field called *CRM ID* and so on. + +To access a specific custom field, you have to use the followng code example: + +``` + +``` + +where *client* should be the group and *CRM ID* should be the label of your custom field. Using the +code example would simply output `346999-13400` in your template. + +### Yes / No Custom Fields + +Yes/no fields will have the value `1` for yes and `0` for no. This way you can use the custom field in conditional statements like this: + +``` + +``` + +## Code Examples + +Here is a list of some examples for code that can be used to display variables. +Replace `invoice` with `quote` when editing quote templates. +Replace `variable_name` with the actual name of the variable. + +| Description | Code | +| --- | --- | +| **Add a new Variable** To add a new variable to the template. Replace `variable_name` with the actual name of the variable. | ``` variable_name; ?> ``` | +| **Format amounts** If you want to display amounts you have to use this code in order to display the amount in the correct format. | ``` variable_name); ?> ``` | +| **Conditional Statements** Only display code if a variable is not empty. This could be used for example if you don't want to display the taxes column if there are no taxes. | ``` variable_name)): ?> -- display any HTML or variables here -- ``` | +| **Display the Invoice Logo** The logo can be set in the System Settings. | ``` ``` | + +## Debugging Templates + +The PDF engine is not that good in handling errors or HTML that is broken due to PHP errors. You may get output +like this: + +``` +Severity: Notice +Message: Undefined offset: 2 +Filename: src/Tag.php +Line Number: 1806 +... +``` + +To know what is wrong with your template, you have to add a small code line in your template helper. Open the +file `application/helpers/pdf_helper.php` and add + +Place `print_r($html);exit;` at line 98 for invoice templates. + +Place `print_r($html);exit;` at line 250 for quote templates. + +This will output the plain HTML that will be used to generate your PDF files. If there are any problems with +missing or faulty variables or wrong PHP code, you should see the corresponding output here. diff --git a/docs/en/1.7/templates/index.md b/docs/en/1.7/templates/index.md new file mode 100644 index 0000000..8533880 --- /dev/null +++ b/docs/en/1.7/templates/index.md @@ -0,0 +1,5 @@ +# Templates + +- [Using Templates](/en/1.7/templates/using-templates) +- [Customize Templates](/en/1.7/templates/customize-templates) +- [PDF Template Allow List](/en/1.7/templates/pdf-template-allowlist) diff --git a/docs/en/1.7/templates/pdf-template-allowlist.md b/docs/en/1.7/templates/pdf-template-allowlist.md new file mode 100644 index 0000000..116ece1 --- /dev/null +++ b/docs/en/1.7/templates/pdf-template-allowlist.md @@ -0,0 +1,94 @@ +# Custom PDF Templates + +InvoicePlane comes with a set of built-in PDF templates for invoices and quotes. If you need a different look, you can create your own templates and make them available alongside the built-in ones. + +## Built-in templates + +The following templates are included and available without any configuration: + +| Template name | Used for | Format | +|---|---|---| +| `InvoicePlane` | Invoices & Quotes | PDF | +| `InvoicePlane - paid` | Invoices | PDF | +| `InvoicePlane - overdue` | Invoices | PDF | +| `InvoicePlane_Web` | Invoices & Quotes | Public link (HTML) | + +Template names are case-sensitive. The name stored in the database must match exactly. + +## How template loading works + +In InvoicePlane 1.7, templates are loaded from a fixed list rather than by scanning the templates directory. A template file that exists on disk will not appear in the selector and will not be loaded unless its name is declared in the configuration. This applies only to custom templates — the built-in templates listed above are always available. + +## Adding custom templates + +### Step 1 — Create a templates folder outside the web root + +Store your custom template files in a directory that is not served over HTTP. This keeps the files separate from the application and makes it straightforward to preserve them across upgrades. + +```ini +CUSTOM_TEMPLATES_FOLDER=/srv/invoiceplane-templates/ +``` + +The directory must follow this structure: + +``` +/srv/invoiceplane-templates/ + invoice/ + pdf/ ← custom invoice PDF templates + public/ ← custom invoice HTML (public link) templates + quote/ + pdf/ ← custom quote PDF templates + public/ ← custom quote HTML (public link) templates +``` + +### Step 2 — Declare the template names in `ipconfig.php` + +List every template name you want to make available. Names may contain letters, numbers, spaces, hyphens, and underscores. Do not include the `.php` file extension. Separate multiple names with commas. + +```ini +; Custom invoice templates +CUSTOM_INVOICE_TEMPLATES_PDF=My Invoice,My Invoice - Detailed +CUSTOM_INVOICE_TEMPLATES_PUBLIC=My Invoice Web + +; Custom quote templates +CUSTOM_QUOTE_TEMPLATES_PDF=My Quote +CUSTOM_QUOTE_TEMPLATES_PUBLIC=My Quote Web +``` + +Templates whose names are not listed here will not appear in the template selector, even if the file exists on disk. + +### Step 3 — Set file permissions + +Make the template directories and files read-only so they cannot be modified while the application is running: + +```bash +chmod 555 /srv/invoiceplane-templates/invoice/pdf/ +chmod 555 /srv/invoiceplane-templates/quote/pdf/ +chmod 444 /srv/invoiceplane-templates/invoice/pdf/*.php +chmod 444 /srv/invoiceplane-templates/quote/pdf/*.php +``` + +## Upgrading from 1.6 + +If you are upgrading from InvoicePlane 1.6 and have custom templates inside `application/views/invoice_templates/` or `application/views/quote_templates/`, they will not be available automatically after upgrading. You have two options: + +**Option A — Move them to the custom templates folder (recommended)** + +Move the template files to a directory outside the web root, set `CUSTOM_TEMPLATES_FOLDER` in `ipconfig.php`, and list the template names using the `CUSTOM_*_TEMPLATES_*` settings above. + +**Option B — Keep them in the application directory** + +Add each template name to the `ALLOWED_INVOICE_TEMPLATES` or `ALLOWED_QUOTE_TEMPLATES` constant in `application/modules/invoices/models/Mdl_templates.php`. You will need to reapply this change each time you upgrade. + +## Checking what templates are installed + +To see which template files are present in the built-in directories: + +```bash +ls application/views/invoice_templates/pdf/ +ls application/views/invoice_templates/public/ +ls application/views/quote_templates/pdf/ +ls application/views/quote_templates/public/ +``` + +The built-in directories should contain only the files that ship with InvoicePlane. Custom templates belong in the folder set by `CUSTOM_TEMPLATES_FOLDER`. diff --git a/docs/en/1.7/templates/using-templates.md b/docs/en/1.7/templates/using-templates.md new file mode 100644 index 0000000..5d12bcd --- /dev/null +++ b/docs/en/1.7/templates/using-templates.md @@ -0,0 +1,17 @@ +# Using Templates + +First of all, the templates shipped with InvoicePlane are what they are called: templates. You *can* use them directly for your business but they are meant to be duplicated and customized. + +There are two main types of templates which are used: + +- PDF Templates - Used to generate the quote and invoices PDF files +- Web Templates - Used to display the quotes and invoices in a web browser for guest users (clients) + +## Using PDF Templates + +All PDF templates can be found in the following folders of the application: + +- `/application/views/invoice_templates/pdf` for invoices +- `/application/views/quote_templates/pdf` for quotes + +You can select which templates should be used in the system settings for either [Invoices](/en/1.5/settings/invoices) or [Quotes](/en/1.5/settings/quotes). You can find the select boxes below the headline "Templates". Simply select the template, save and the template will be used for the next quote or invoice. diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..19451dc --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,83 @@ +site_name: InvoicePlane Wiki +site_description: Documentation for InvoicePlane - self-hosted invoicing application +site_url: https://invoiceplane.github.io/wiki/ +repo_url: https://github.com/invoiceplane/wiki +repo_name: invoiceplane/wiki + +docs_dir: docs +site_dir: site + +theme: + name: material + language: en + palette: + - scheme: default + primary: blue + accent: blue + features: + - navigation.tabs + - navigation.sections + - navigation.top + - search.suggest + - search.highlight + - content.code.copy + +plugins: + - search + +nav: + - Home: en/1.6/index.md + - General: + - About InvoicePlane: en/1.6/general/about.md + - Changelog: en/1.6/general/changelog.md + - License: en/1.6/general/license.md + - FAQ: en/1.6/general/faq.md + - Getting Started: + - Overview: en/1.6/getting-started/index.md + - Requirements: en/1.6/getting-started/requirements.md + - Installation: en/1.6/getting-started/installation.md + - Quickstart: en/1.6/getting-started/quickstart.md + - Updating InvoicePlane: en/1.6/getting-started/updating-ip.md + - Modules: + - Overview: en/1.6/modules/index.md + - Clients: en/1.6/modules/clients.md + - Quotes: en/1.6/modules/quotes.md + - Invoices: en/1.6/modules/invoices.md + - Recurring Invoices: en/1.6/modules/recurring-invoices.md + - Payments: en/1.6/modules/payments.md + - Tasks & Projects: en/1.6/modules/tasks-projects.md + - Settings: + - Overview: en/1.6/settings/index.md + - General Settings: en/1.6/settings/general.md + - Invoice Settings: en/1.6/settings/invoices.md + - Quote Settings: en/1.6/settings/quotes.md + - Tax Settings: en/1.6/settings/taxes.md + - Email Settings: en/1.6/settings/email.md + - Online Payments: en/1.6/settings/online-payments.md + - Updatecheck: en/1.6/settings/updatecheck.md + - Custom Fields: en/1.6/settings/custom-fields.md + - Email Templates: en/1.6/settings/email-templates.md + - Invoice Groups: en/1.6/settings/invoice-groups.md + - Payment Methods: en/1.6/settings/payment-methods.md + - Taxrates: en/1.6/settings/taxrates.md + - User Accounts: en/1.6/settings/user-accounts.md + - Templates: + - Overview: en/1.6/templates/index.md + - Using Templates: en/1.6/templates/using-templates.md + - Customize Templates: en/1.6/templates/customize-templates.md + - System: + - Overview: en/1.6/system/index.md + - Translation & Localization: en/1.6/system/translation-localization.md + - Importing Data: en/1.6/system/importing-data.md + - Upgrade from FusionInvoice: en/1.6/system/upgrade-from-fusioninvoice.md + - Help: + - Setup a Cron: en/1.6/help/setup-cron.md + +markdown_extensions: + - admonition + - tables + - toc: + permalink: true + - pymdownx.highlight: + anchor_linenums: true + - pymdownx.superfences diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..24933d3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +mkdocs>=1.5 +mkdocs-material>=9.0 +markdownify>=0.11 diff --git a/resources/views/wiki/page.blade.php b/resources/views/wiki/page.blade.php new file mode 100644 index 0000000..e13d22e --- /dev/null +++ b/resources/views/wiki/page.blade.php @@ -0,0 +1,9 @@ +@extends('layouts.master') + +@section('title') + {{ $page_title }} +@endsection + +@section('content') + {!! $content !!} +@stop