erpsetup: Vertragsbedingungen block on the Quotation print format #95

Merged
sharang merged 1 commits from feat/erpsetup-quotation-vertragsbedingungen into main 2026-10-27 14:32:54 +00:00
+15 -2
View File
@@ -273,7 +273,7 @@ var documentHTML = brand.Replace(`{%- set is_inv = doc.doctype == "Sales Invoice
{%- for t in doc.taxes %}{% if t.tax_amount_after_discount_amount %}
<tr><td>{{ t.description }}{% if t.rate and "%" not in t.description %} ({{ ("%g"|format(t.rate)) | replace(".", ",") }} %){% endif %}</td><td class="r">{{ t.get_formatted("tax_amount_after_discount_amount", doc) }}</td></tr>
{%- endif %}{% endfor %}
<tr class="grand"><td>Gesamtbetrag</td><td class="r">{{ doc.get_formatted("rounded_total" if doc.rounded_total else "grand_total") }}</td></tr>
<tr class="grand"><td>{% if doc.doctype == "Quotation" and interval == "monatlich" %}Monatlicher Gesamtbetrag{% else %}Gesamtbetrag{% endif %}</td><td class="r">{{ doc.get_formatted("rounded_total" if doc.rounded_total else "grand_total") }}</td></tr>
</table>
<div class="note">
@@ -282,6 +282,19 @@ var documentHTML = brand.Replace(`{%- set is_inv = doc.doctype == "Sales Invoice
{%- elif "Drittland" in tpl %}
<p>Nicht im Inland steuerbare Leistung.</p>
{%- endif %}
{%- if doc.doctype == "Quotation" %}
<p class="sepa-head"><b>Vertragsbedingungen</b></p>
<table class="meta" style="margin-top:2px;">
<tr><td class="k">Vertragsart</td><td>Monatlich wiederkehrende SaaS- und Hosting-Leistungen (Abonnement).</td></tr>
<tr><td class="k">Vertragsbeginn</td><td>{{ doc.get("contract_start") or "Mit Bereitstellung der gebuchten Dienste gemäß Auftragsbestätigung." }}</td></tr>
<tr><td class="k">Laufzeit / Kündigung</td><td>Keine Mindestlaufzeit; der Vertrag läuft auf unbestimmte Zeit. Monatlich kündbar mit einer Frist von einem Monat zum Monatsende.</td></tr>
<tr><td class="k">Abrechnung</td><td>Monatlich, jeweils zu Beginn des Leistungszeitraums.</td></tr>
<tr><td class="k">{% if interval == "monatlich" %}Monatliche Vergütung{% else %}Vergütung{% endif %}</td><td>{{ doc.get_formatted("net_total") }} netto zzgl. gesetzlicher Umsatzsteuer.{% if net_discount > 0.005 %} Der monatliche Nachlass von {{ frappe.utils.fmt_money(net_discount, currency=doc.currency) }} gilt dauerhaft, einschließlich etwaiger Verlängerungen.{% endif %}</td></tr>
<tr><td class="k">Mehrverbrauch</td><td>Über das gebuchte Kontingent hinausgehende Prüfungen werden je zusätzlicher Prüfung gesondert berechnet.</td></tr>
<tr><td class="k">Vertragsgrundlagen</td><td>{{ doc.get("vertragsgrundlage") or "Es gelten die SaaS-Vertragsbedingungen, die Leistungsbeschreibungen, das SLA und die AVV (Art. 28 DSGVO) in der jeweils vereinbarten Fassung; die Versionsstände sind in der Anlage bezeichnet." }}</td></tr>
<tr><td class="k">Annahme</td><td>Durch schriftliche oder elektronische Annahme dieses Angebots{% if doc.valid_till %} bis zum {{ frappe.utils.formatdate(doc.valid_till) }}{% endif %}.</td></tr>
</table>
{%- endif %}
{%- if is_inv and not doc.is_return %}
{%- if sepa and has_mandate %}
{%- set creditor = frappe.db.get_value("Company", doc.company, "sepa_creditor_id") %}
@@ -295,7 +308,7 @@ Bitte sorgen Sie für ausreichende Kontodeckung.</p>
{%- endif %}
{%- elif not is_inv and sepa %}
{%- set term = frappe.db.get_value("Payment Term", doc.payment_schedule[0].payment_term, ["credit_days", "due_date_based_on"], as_dict=1) if doc.payment_schedule[0].payment_term else None -%}
<p>Zahlungsart: SEPA-Lastschrift{% if term and term.credit_days and term.due_date_based_on == "Day(s) after invoice date" %}, Einzug {{ term.credit_days }} Tage nach Rechnungsdatum{% endif %}, {{ "gemäß erteiltem SEPA-Lastschriftmandat" if has_mandate else "nach Erteilung eines gültigen SEPA-Lastschriftmandats" }}.</p>
<p>Zahlungsart: SEPA-Lastschrift{% if term and term.credit_days and term.due_date_based_on == "Day(s) after invoice date" %}, Einzug {{ term.credit_days }} Tage nach Rechnungsdatum{% endif %}, {{ "gemäß erteiltem SEPA-Lastschriftmandat" if has_mandate else "nach Erteilung eines gültigen SEPA-Lastschriftmandats" }}. Vor jedem Einzug informieren wir Sie mindestens 14 Tage im Voraus über Betrag und Fälligkeit (Vorabinformation; kürzere Frist nach Vereinbarung).</p>
{%- elif not is_inv and transfer %}
{%- set term = frappe.db.get_value("Payment Term", doc.payment_schedule[0].payment_term, ["credit_days", "due_date_based_on"], as_dict=1) if doc.payment_schedule[0].payment_term else None -%}
<p>Zahlungsart: Überweisung{% if term and term.credit_days and term.due_date_based_on == "Day(s) after invoice date" %}, zahlbar innerhalb von {{ term.credit_days }} Tagen nach Rechnungsdatum{% endif %}.</p>