Skip to content

Commit

Permalink
Add Material Transfer Request form
Browse files Browse the repository at this point in the history
  • Loading branch information
Saralrat committed Jan 23, 2025
1 parent f682386 commit 440b833
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"absolute_value": 0,
"align_labels_right": 0,
"creation": "2025-01-23 12:49:07.987238",
"css": "body {\n padding: 0mm 0 5mm !important;\n}\n.print-format {\n font-family: \"TH Sarabun New\";\n font-size: 16px;\n line-height: 1;\n margin-left: 5mm;\n margin-right: 5mm;\n}\n.print-format td, .print-format th {\n padding: 5px !important;\n}\n.print-format-preview{\n padding: 30px;\n}\ntable {\n width: 100%;\n}\n.summary, .note {\n page-break-inside: avoid;\n}\n.logo {\n width: 100px;\n}\n.text-color {\n color: #B048B5 !important;\n}\n.head-col {\n background-color: #B048B5;\n color: #FFFFFF !important;\n font-weight: bold !important;\n border-right: 1px solid #FFFFFF;\n}\n.with-border {\n border-bottom: 2px solid #d3d3d3;\n}\n.inv-detail h1 {\n margin-bottom: 0;\n}\n.inv-detail {\n line-height: 1.5;\n}\n.col-4, .col-6, .col-7 {\n width: 30%;\n} \n.col-1 {\n width: 5%;\n}\n.col-2 {\n width: 5%;\n}\n.col-3 {\n width: 5%;\n}\n.col-5 {\n width: 10%;\n}\n.inline-footer {\n border-top: 2px solid #d3d3d3;\n line-height: 2;\n}\n.original, .copy {\n display: none;\n}\n.form-container {\n line-height: 2;\n}\n.static-checkbox {\n width: 20px; \n height: 20px; \n border: 1px solid black; \n display: inline-block; \n margin-right: 10px; \n background-color: white;\n}\n.footer {\n visibility: hidden;\n}",
"custom_format": 1,
"default_print_language": "th",
"disabled": 0,
"doc_type": "Material Request",
"docstatus": 0,
"doctype": "Print Format",
"font_size": 14,
"html": "<script>\n document.title = \"{{ doc.name }}\";\n</script>\n\n<style>\n @font-face {\n font-family: \"TH Sarabun New\";\n src: url(\"{{ frappe.utils.get_url() }}/assets/menghua_co/fonts/th-sarabun-new/THSarabunNew.ttf\") format(\"truetype\");\n }\n</style>\n\n{% set company = frappe.db.get_value(\n \"Company\",\n {\"name\": doc.company},\n [\"company_logo\", \"company_name\", \"tax_id\"],\n as_dict=True) %}\n{% set parent_company_address = frappe.db.get_all(\n \"Dynamic Link\",\n {\"link_doctype\": \"Company\", \"link_name\": company.company_name},\n pluck=\"parent\") %}\n{% set company_address = frappe.db.get_value(\n \"Address\",\n {\"name\": (\"in\", parent_company_address), \"address_type\": \"Permanent\"},\n [\"address_line1\", \"address_line2\", \"city\", \"county\", \"state\", \"pincode\", \"phone\"],\n as_dict=True) %}\n{% set user = frappe.db.get_value(\"User\", doc.owner, \"full_name\") %}\n\n{% if doc.material_request_type == \"Material Transfer\" %} \n <div id=\"header-html\" class=\"hidden-pdf\">\n <br>\n <div class=\"row section-break\">\n <div class=\"col-xs-7\">\n <div class=\"row section-break\">\n <div class=\"col-xs-12\">\n <img class=\"logo\" src=\"{{ company.company_logo }}\" alt=\"Company Logo\"/>\n </div>\n </div>\n <br>\n <div class=\"row section-break\">\n <div class=\"col-xs-12\">\n <p>\n {{ company.company_name or \"-\" }}\n </p>\n <p>\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\n {% if company_address %}\n {{ company_address.address_line1 or \"\"}}\n {{ company_address.address_line2 or \"\"}}\n {{ company_address.city or \"\"}}\n {{ company_address.county or \"\"}}\n {{ company_address.state or \"\"}}\n {{ company_address.pincode or \"\"}}\n {% else %}\n -\n {% endif %}\n </p>\n <p>\n \u0e40\u0e25\u0e02\u0e1b\u0e23\u0e30\u0e08\u0e33\u0e15\u0e31\u0e27\u0e1c\u0e39\u0e49\u0e40\u0e2a\u0e35\u0e22\u0e20\u0e32\u0e29\u0e35 {{ company.tax_id or \"-\" }}\n </p>\n <p>\n \u0e42\u0e17\u0e23. {{ company_address.phone or \"-\" }}\n </p>\n </div>\n </div>\n </div>\n <div class=\"col-xs-5 inv-detail\">\n <div class=\"row section-break\">\n <div class=\"col-xs-12 text-center\">\n <h1>\n <strong class=\"text-color\">\n \u0e43\u0e1a\u0e02\u0e2d\u0e22\u0e49\u0e32\u0e22\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\n </strong>\n <br>\n <strong class=\"text-color\">\n Material Transfer Request\n </strong>\n </h1>\n <p>\n </p>\n </div>\n </div>\n <div class=\"row section-break\">\n <div class=\"col-xs-12\">\n <div class=\"with-border\"></div>\n </div>\n </div>\n <div class=\"row section-break\">\n <div class=\"col-xs-3 text-color\">\n \u0e40\u0e25\u0e02\u0e17\u0e35\u0e48\n </div>\n <div class=\"col-xs-9\">\n {{ doc.name or \"-\" }}\n </div>\n </div>\n <div class=\"row section-break\">\n <div class=\"col-xs-3 text-color\">\n \u0e27\u0e31\u0e19\u0e17\u0e35\u0e48\n </div>\n <div class=\"col-xs-9\">\n {{ doc.transaction_date and frappe.utils.getdate(doc.transaction_date).strftime(\"%d/%m/%Y\") or \"-\" }}\n </div>\n </div>\n <div class=\"row section-break\">\n <div class=\"col-xs-12\">\n <div class=\"with-border\"></div>\n </div>\n </div>\n </div>\n <div class=\"from\">\n <div class=\"col-xs-12 column-break\">\n <div class=\"row data-field\">\n <div class=\"col-xs-2 text-left\">\n <p class=\"text-color\" style=\"font-size: 16px;\">\n \u0e15\u0e49\u0e19\u0e17\u0e32\u0e07\n </p>\n </div>\n <div class=\"col-xs-10 text-left\" style=\"padding: 2px 0px 0px 0px\">\n {{doc.set_from_warehouse or '-'}}\n </div>\n </div>\n <div class=\"row data-field \">\n <div class=\"col-xs-2 text-left\" >\n <p class=\"text-color\" style=\"font-size: 16px;\">\n \u0e1b\u0e25\u0e32\u0e22\u0e17\u0e32\u0e07\n </p>\n </div>\n <div class=\"col-xs-10 text-left\" style=\"padding: 2px 0px 0px 0px\">\n {{doc.set_warehouse or '-'}}\n </div>\n </div>\n </div>\n </div>\n </div>\n <br>\n </div>\n <div id=\"detail-html\">\n <table>\n <thead>\n <tr>\n <th class=\"text-center head-col col-1\">#</th>\n <th class=\"text-center head-col col-4\">\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14</th>\n <th class=\"text-center head-col col-2\">\u0e08\u0e33\u0e19\u0e27\u0e19</th>\n <th class=\"text-center head-col col-3\"></th>\n \n </tr>\n </thead>\n <tbody>\n {% for item in doc.items %}\n <tr>\n <td class=\"text-center with-border\">\n {{ item.idx }}\n </td>\n <td class=\"with-border\">\n {{ item.item_code }} : {{ item.item_name }}\n </td>\n <td class=\"text-right with-border\">\n {{ item.qty | int if item.qty - item.qty | int == 0 else \"{:,.2f}\".format(item.qty) }}\n </td>\n <td class=\"with-border\">\n {{ item.uom }}\n </td>\n </tr>\n {% endfor %}\n </tbody>\n </table>\n <br>\n <div class=\"row section-break note\">\n <div class=\"col-xs-12\">\n <p class=\"text-color\">\n \u0e2b\u0e21\u0e32\u0e22\u0e40\u0e2b\u0e15\u0e38\n </p>\n <div>\n {{ doc.terms or \"-\" }}\n </div>\n </div>\n </div>\n </div>\n <div id=\"footer-html\" class=\"visible-pdf\">\n <script>\n window.onload = function() {\n var vars = {};\n var x = document.location.search.substring(1).split(\"&\");\n for (var i in x) {\n var z = x[i].split(\"=\", 2);\n vars[z[0]] = unescape(z[1]);\n }\n if (vars[\"page\"] == vars[\"topage\"]) {\n document.querySelectorAll(\".footer\")[0].style.visibility = \"visible\";\n }\n document.querySelectorAll(\".page-number\")[0].innerHTML = \"\u0e2b\u0e19\u0e49\u0e32\u0e17\u0e35\u0e48 \" + vars[\"page\"] + \"/\" + vars[\"topage\"];\n };\n </script>\n <div class=\"footer\">\n <div style=\"float: left; width: 40%; text-align: left;\">\n <br><br>\n <div style=\"justify-content: space-around; align-items: center; width: 100%;\">\n <div style=\"text-align: center; width: 55%;display: inline-block;margin-right: 35px;\">\n <br>\n <p>{{ user or \"-\" }}</p> \n <p style=\"border-top: 2px solid #d3d3d3; margin-bottom: 5px; width: 100%;\"></p>\n <p>\u0e1c\u0e39\u0e49\u0e08\u0e31\u0e14\u0e17\u0e33</p>\n </div>\n <div style=\"text-align: center; width: 25%;display: inline-block;\">\n {{ doc.transaction_date and frappe.utils.getdate(doc.transaction_date).strftime(\"%d/%m/%Y\") or \"-\" }}\n <p style=\"border-top: 2px solid #d3d3d3; margin-bottom: 5px; width: 100%;\"></p>\n <p>\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48</p>\n </div>\n </div>\n </div>\n <div style=\"float: left; width: 20%; text-align: center;\">\n <img src=\"/assets/menghua_co/images/menghua-book.png\" alt=\"\u0e20\u0e32\u0e1e\u0e17\u0e35\u0e48\u0e04\u0e2d\u0e25\u0e31\u0e21\u0e19\u0e4c 2\" style=\"width: 150px; height: auto;\">\n </div>\n <div style=\"float: left; width: 40%; text-align: right;\">\n <br><br>\n <div style=\"justify-content: space-between; align-items: center; width: 100%; height: 70px;\">\n <div style=\"text-align: center; width: 55%;display: inline-block;margin-right: 35px;\">\n <br><br>\n <p style=\"border-top: 2px solid #d3d3d3; margin-bottom: 5px; width: 100%;\"></p>\n <p>\u0e1c\u0e39\u0e49\u0e08\u0e31\u0e14\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32</p>\n </div>\n <div style=\"text-align: center; width: 25%;display: inline-block;\">\n <br><br>\n <p style=\"border-top: 2px solid #d3d3d3; margin-bottom: 5px; width: 100%;\"></p>\n <p>\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48</p>\n </div>\n </div>\n </div>\n </div>\n <p class=\"page-number\"></p>\n </div>\n \n {% endif %} ",
"idx": 0,
"line_breaks": 0,
"margin_bottom": 15.0,
"margin_left": 15.0,
"margin_right": 15.0,
"margin_top": 15.0,
"modified": "2025-01-23 13:50:50.809155",
"modified_by": "Administrator",
"module": "Menghua Co",
"name": "Material Transfer Request MH",
"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 440b833

Please sign in to comment.