diff --git a/default_thai_company/fixtures/print_format.json b/default_thai_company/fixtures/print_format.json index ac29304..af0c635 100644 --- a/default_thai_company/fixtures/print_format.json +++ b/default_thai_company/fixtures/print_format.json @@ -104,7 +104,7 @@ { "absolute_value": 0, "align_labels_right": 0, - "css": "/* Thai text needs a font with Thai glyphs; ship Sarabun as in Default Standard Sales Invoice. */\n@font-face {\n\tfont-family: \"Sarabun\";\n\tfont-weight: 400;\n\tsrc: url(\"/assets/default_thai_company/fonts/Sarabun-Regular.ttf\");\n}\n@font-face {\n\tfont-family: \"Sarabun\";\n\tfont-weight: 700;\n\tsrc: url(\"/assets/default_thai_company/fonts/Sarabun-Bold.ttf\");\n}\n\n/* The Revenue Department form fills the whole A4 sheet: no page margins. frappe.utils.pdf reads\n these .print-format properties as the wkhtmltopdf page options. */\n.print-format {\n\tmargin-top: 0mm;\n\tmargin-bottom: 0mm;\n\tmargin-left: 0mm;\n\tmargin-right: 0mm;\n\tpage-size: A4;\n}\n/* On screen the standard sheet padding would clip the 595pt form. */\n@media screen {\n\t.print-format {\n\t\tpadding: 0;\n\t\tmax-width: 595pt;\n\t\tmin-height: 0;\n\t}\n}\n\n/* One sheet per copy; values are positioned in pt against the form's PDF coordinates. */\n.wht-page {\n\tposition: relative;\n\twidth: 595pt;\n\theight: 841pt;\n\toverflow: hidden;\n\tpage-break-after: always;\n\tfont-family: Sarabun, sans-serif;\n\tfont-size: 10pt;\n\tcolor: #000;\n}\n.wht-page:last-child {\n\tpage-break-after: auto;\n}\n.wht-form {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\twidth: 100%;\n\theight: 100%;\n}\n.wht-page .f {\n\tposition: absolute;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n/* Check mark drawn in CSS: the shipped font has no U+2713 and the PDF renderer sees no system fonts. */\n.wht-page .tick {\n\tposition: absolute;\n}\n.wht-page .tick:after {\n\tcontent: \"\";\n\tposition: absolute;\n\tleft: 4pt;\n\ttop: 0;\n\twidth: 4pt;\n\theight: 8pt;\n\tborder: solid #000;\n\tborder-width: 0 1.5pt 1.5pt 0;\n\t-webkit-transform: rotate(45deg);\n\ttransform: rotate(45deg);\n}", + "css": "/* Thai text needs a font with Thai glyphs; ship Sarabun as in Default Standard Sales Invoice. */\n@font-face {\n\tfont-family: \"Sarabun\";\n\tfont-weight: 400;\n\tsrc: url(\"/assets/default_thai_company/fonts/Sarabun-Regular.ttf\");\n}\n@font-face {\n\tfont-family: \"Sarabun\";\n\tfont-weight: 700;\n\tsrc: url(\"/assets/default_thai_company/fonts/Sarabun-Bold.ttf\");\n}\n\n/* The Revenue Department form fills the whole A4 sheet: no page margins. frappe.utils.pdf reads\n these .print-format properties as the wkhtmltopdf page options. */\n.print-format {\n\tmargin-top: 0mm;\n\tmargin-bottom: 0mm;\n\tmargin-left: 0mm;\n\tmargin-right: 0mm;\n\tpage-size: A4;\n}\n/* On screen the standard sheet padding would clip the 595pt form. */\n@media screen {\n\t.print-format {\n\t\tpadding: 0;\n\t\tmax-width: 595pt;\n\t\tmin-height: 0;\n\t}\n}\n\n/* One sheet per copy; values are positioned in pt against the form's PDF coordinates. */\n.wht-page {\n\tposition: relative;\n\twidth: 595pt;\n\theight: 841pt;\n\toverflow: hidden;\n\tpage-break-after: always;\n\tfont-family: Sarabun, sans-serif;\n\tfont-size: 10pt;\n\tcolor: #000;\n}\n.wht-page:last-child {\n\tpage-break-after: auto;\n}\n.wht-form {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\twidth: 100%;\n\theight: 100%;\n}\n.wht-page .f {\n\tposition: absolute;\n\twhite-space: nowrap;\n\toverflow: hidden;\n}\n/* Check mark drawn in CSS: the shipped font has no U+2713 and the PDF renderer sees no system fonts. */\n.wht-page .tick {\n\tposition: absolute;\n}\n.wht-page .tick:after {\n\tcontent: \"\";\n\tposition: absolute;\n\tleft: 4pt;\n\ttop: 0;\n\twidth: 4pt;\n\theight: 8pt;\n\tborder: solid #000;\n\tborder-width: 0 1.5pt 1.5pt 0;\n\t-webkit-transform: rotate(45deg);\n\ttransform: rotate(45deg);\n}\n\n/* Unsubmitted invoice: stamp every copy so a preview cannot pass for a certificate. */\n.wht-page .wht-draft {\n\tposition: absolute;\n\tleft: 0;\n\t/* a square centred on the sheet: the rotated text stays inside its own box */\n\ttop: 123pt;\n\twidth: 595pt;\n\theight: 595pt;\n\tline-height: 595pt;\n\ttext-align: center;\n\tfont-size: 120pt;\n\tfont-weight: 700;\n\tletter-spacing: 6pt;\n\t/* wkhtmltopdf drops opacity on transformed elements; an rgba colour keeps the form legible */\n\tcolor: rgba(204, 0, 0, 0.3);\n\t-webkit-transform: rotate(-35deg);\n\ttransform: rotate(-35deg);\n}", "custom_format": 1, "default_print_language": null, "disabled": 0, @@ -120,7 +120,7 @@ "margin_left": 0.0, "margin_right": 0.0, "margin_top": 0.0, - "modified": "2026-09-22 09:00:00.000000", + "modified": "2026-09-23 11:00:00.000000", "module": "Default Thai Company", "name": "Withholding Tax Certificate", "page_number": "Hide", diff --git a/default_thai_company/templates/print_formats/withholding_tax_certificate.html b/default_thai_company/templates/print_formats/withholding_tax_certificate.html index a03c44c..5b777f6 100644 --- a/default_thai_company/templates/print_formats/withholding_tax_certificate.html +++ b/default_thai_company/templates/print_formats/withholding_tax_certificate.html @@ -53,6 +53,9 @@ {%- for _ in range(2) -%}
+ {%- if doc.docstatus == 0 %}
+