Skip to content

Commit

Permalink
feat: new print format "Zahlungsbeleg" (LAN-849)
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra committed Sep 23, 2024
1 parent f5ebe5c commit 452e2a3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Empty file.
33 changes: 33 additions & 0 deletions landa/landa_sales/print_format/zahlungsbeleg/zahlungsbeleg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"absolute_value": 0,
"align_labels_right": 0,
"creation": "2024-09-23 17:02:42.526084",
"css": ".print-format{padding:0;position:relative}.print-format #header{text-align:right;width:100%;height:35mm;margin-top:-10mm;overflow:hidden;position:relative}.print-format #logo{display:block;height:20mm;margin:0;padding:0;position:absolute;bottom:0;right:20mm}.print-format .contact-row{position:relative;overflow:hidden;left:20mm;height:45mm;width:170mm}.print-format #sender{position:relative;font-size:50%;height:17.7mm}.print-format #sender p{position:absolute;width:85mm;top:3mm}.print-format #address{float:left;width:85mm;padding-left:5mm}.print-format #contact{float:right;width:75mm;margin-top:9mm}.print-format #contact>table{width:100%}.print-format #contact tr td:first-child{font-weight:bold}.print-format #contact td{padding:1pt !important;font-size:8pt !important;text-align:right}.print-format #subject{margin-bottom:2em;height:5mm;font-weight:bold;font-size:12pt}.print-format .din-mark{width:3mm;height:1pt;background-color:#000;position:absolute;left:10mm}.print-format #fold-mark-1{top:95mm}.print-format #punch-mark{top:138.5mm}.print-format #fold-mark-2{top:200mm}.print-format #text{margin-top:8.46mm;margin-left:25mm;margin-right:20mm}.print-format #text .invoice table td,.print-format #text .invoice table th{font-size:9pt}.print-format .text-right{text-align:right}.print-format .text-small{font-size:10px}.print-format .black-border{border-top:solid #000 1px;border-bottom:solid #000 1px}.print-format .w-100{width:100%}.print-format table{page-break-inside:auto}.print-format table tr{page-break-inside:avoid;page-break-after:auto}.print-format table thead{display:table-header-group}.print-format table tfoot{display:table-footer-group}.print-format .epilogue{text-align:justify}.print-format .epilogue .salutation{page-break-inside:avoid}.print-format .ql-editor{font-family:inherit;color:inherit;line-height:inherit}.print-format .ql-editor p{margin-top:5pt}.print-format-footer{margin-left:25mm;padding-right:20mm}#pagenum{text-align:right;margin-right:20mm;margin-top:4.23mm;margin-bottom:4.23mm}body,html{padding:0;margin:0;width:100%;height:100%}/*# sourceMappingURL=sales_order.css.map */\n",
"custom_format": 1,
"default_print_language": "de",
"disabled": 0,
"doc_type": "Payment Entry",
"docstatus": 0,
"doctype": "Print Format",
"font": "Default",
"font_size": 14,
"html": "<style>\n .print-format {\n margin-left: 0mm;\n margin-right: 0mm;\n margin-top: 10mm;\n margin-bottom: 60mm;\n font-size: 10pt;\n }\n</style>\n\n{% set company = frappe.get_doc(\"Company\", doc.company) %}\n{% set customer = frappe.get_doc(\"Customer\", doc.party) %}\n{% set company_address_name = frappe.db.get_value(\"Dynamic Link\", {\"parenttype\": \"Address\", \"link_doctype\": \"Company\", \"link_name\": doc.company}, \"parent\") %}\n{% set company_address = frappe.get_doc(\"Address\", company_address_name) if company_address_name else None %}\n{% set pay_addr = frappe.get_doc(\"Address\", customer.default_billing_address) if customer.default_billing_address else None %}\n\n{% if customer.default_billing_contact %}\n {% set contact = frappe.get_doc(\"Contact\", customer.default_billing_contact) %}\n{% endif %}\n\n<!-- HEAD -->\n<div id=\"header\">\n {% if company.company_logo %}\n <img id=\"logo\" src=\"{{company.company_logo}}\">\n {% endif %}\n</div>\n\n<div class=\"contact-row\">\n <div id=\"address\">\n <div id=\"sender\">\n <p>{{ company.name }}<br>\n {% if company_address %}\n {{ company_address.address_line1 }} &#183;\n {% if company_address.address_line2 %}{{ company_address.address_line2 }} <br>{% endif %}\n {{ company_address.pincode }} {{ company_address.city }}\n {% if company_address.country and company_address.country != pay_addr.country -%}\n &#183; {{ company_address.country.upper() }}\n {%- endif %}\n {% else %}\n <i>{{ _(\"Address not set!\") }}</i>\n {% endif %}\n </p>\n </div>\n {% if contact %}\n <strong>{{ contact.first_name }}{% if contact.last_name %} {{ contact.last_name }}{% endif %}</strong><br>\n {{ customer.customer_name }}<br/>\n {% else %}\n <strong>{{ customer.customer_name }}</strong><br />\n {% endif %}\n {% if not pay_addr %}\n <i>{{ _(\"Address not set!\") }}</i>\n {% else %}\n {{ pay_addr.address_line1 }}<br>\n {% if pay_addr.address_line2 %}{{ pay_addr.address_line2 }}<br>{% endif %}\n {{ pay_addr.pincode }} {{ pay_addr.city }}\n {% if pay_addr.country and company_address and pay_addr.country != company_address.country -%}\n &#183; {{ pay_addr.country.upper() }}\n {%- endif %}\n {% endif %}\n </div>\n\n <div id=\"contact\">\n <table>\n <tr>\n <td class=\"text-right\">{{ _(\"Date\") }}:</td>\n <td class=\"text-right\">{{ frappe.utils.formatdate(doc.posting_date, \"dd. MMMM yyyy\") }}</td>\n </tr>\n <tr>\n <td class=\"text-right\">{{ _(\"Phone\") }}:</td>\n <td class=\"text-right\">{{ company.phone_no }}</td>\n </tr>\n <tr>\n <td class=\"text-right\">{{ _(\"Email\") }}:</td>\n <td class=\"text-right\">{{ company.email }}</td>\n </tr>\n <tr>\n <td class=\"text-right\">{{ _(\"Organization ID\") }}:</td>\n <td class=\"text-right\">{{ customer.organization }}</td>\n </tr>\n <tr>\n <td class=\"text-right\">{{ _(\"Year of Settlement\") }}:</td>\n <td class=\"text-right\">{{ doc.year_of_settlement }}</td>\n </tr>\n </table>\n </div>\n</div>\n\n<div class=\"din-mark\" id=\"fold-mark-1\"></div>\n<div class=\"din-mark\" id=\"punch-mark\"></div>\n<div class=\"din-mark\" id=\"fold-mark-2\"></div>\n\n<!-- CONTENT -->\n<div id=\"text\" class=\"\">\n\t<div id=\"subject\">\n\t\t<strong>Zahlungsbeleg</strong>\n </div>\n <div class=\"salutation\">\n {% if doc.payment_type == \"Receive\" %}\n <p>Hiermit best\u00e4tigen wir den Erhalt Ihrer Zahlung \u00fcber {{ doc.get_formatted(\"paid_amount\") }}.</p>\n {% elif doc.payment_type == \"Pay\" %}\n <p>Hiermit best\u00e4tigen wir die Zahlung von {{ doc.get_formatted(\"paid_amount\") }}.</p>\n {% endif %}\n\n {% if doc.references %}\n <br>\n <p>Davon entfallen auf:</p>\n <ul>\n {% for entry in doc.references %}\n <li>{{ entry.reference_name }}: {{ frappe.utils.fmt_money(entry.allocated_amount, currency=doc.paid_to_account_currency) }}</li>\n {% endfor %}\n </ul>\n {% endif %}\n <br>\n <p>Mit freundlichen Gr\u00fc\u00dfen</p>\n <p>{{ doc.company }} </p>\n </div>\n</div>\n\n<!-- FOOTER -->\n<div id=\"footer-html\" class=\"visible-pdf\">\n <p id=\"pagenum\">\n {{ _(\"Page {0} of {1}\").format('<span class=\"page\"></span>', '<span class=\"topage\"></span>') }}\n </p>\n <div class=\"print-format-footer\">\n {{ footer }}\n </div>\n</div>",
"idx": 0,
"line_breaks": 0,
"margin_bottom": 15.0,
"margin_left": 15.0,
"margin_right": 15.0,
"margin_top": 15.0,
"modified": "2024-09-23 17:30:06.771415",
"modified_by": "Administrator",
"module": "LANDA Sales",
"name": "Zahlungsbeleg",
"owner": "Administrator",
"page_number": "Hide",
"print_format_builder": 0,
"print_format_builder_beta": 0,
"print_format_type": "Jinja",
"raw_printing": 0,
"show_section_headings": 0,
"standard": "Yes"
}

0 comments on commit 452e2a3

Please sign in to comment.