Skip to content

Commit

Permalink
Change in print format for pos
Browse files Browse the repository at this point in the history
  • Loading branch information
jfa-name committed Jan 27, 2024
1 parent 01b62d3 commit f7a749a
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 5 deletions.
16 changes: 15 additions & 1 deletion erpnext/accounts/doctype/pos_profile/pos_profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
"customer_groups",
"section_break_16",
"print_format",
"print_format_dn",
"print_format_for_online_dn",
"letter_head",
"column_break0",
"tc_name",
Expand Down Expand Up @@ -375,6 +377,18 @@
"fieldname": "disable_rounded_total",
"fieldtype": "Check",
"label": "Disable Rounded Total"
},
{
"fieldname": "print_format_dn",
"fieldtype": "Link",
"label": "Print Format DN",
"options": "Print Format"
},
{
"fieldname": "print_format_for_online_dn",
"fieldtype": "Link",
"label": "print_format_for_online_dn",
"options": "Print Format"
}
],
"icon": "icon-cog",
Expand Down Expand Up @@ -407,7 +421,7 @@
"link_fieldname": "pos_profile"
}
],
"modified": "2023-07-28 13:12:06.269392",
"modified": "2023-12-03 17:14:51.392291",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Profile",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
{
"absolute_value": 0,
"align_labels_right": 0,
"creation": "2020-05-14 17:02:44.207166",
"custom_format": 1,
"default_print_language": "en",
"disabled": 0,
"disabled": 1,
"doc_type": "POS Invoice",
"docstatus": 0,
"doctype": "Print Format",
"font": "Default",
"font_size": 14,
"html": "<style>\n\t.print-format table, .print-format tr, \n\t.print-format td, .print-format div, .print-format p {\n\t\tfont-family: Tahoma, sans-serif;\n\t\tline-height: 150%;\n\t\tvertical-align: middle;\n\t}\n\t@media screen {\n\t\t.print-format {\n\t\t\twidth: 4in;\n\t\t\tpadding: 0.25in;\n\t\t\tmin-height: 8in;\n\t\t}\n\t}\n</style>\n\n{% if letter_head %}\n {{ letter_head }}\n{% endif %}\n\n<p class=\"text-center\" style=\"margin-bottom: 1rem\">\n\t{{ doc.company }}<br>\n\t{{ doc.select_print_heading or _(\"Return Invoice\") }}<br>\n</p>\n<p>\n\t<b>{{ _(\"Receipt No\") }}:</b> {{ doc.name }}<br>\n\t<b>{{ _(\"Original Invoice\") }}:</b> {{ doc.return_against }}<br>\n\t<b>{{ _(\"Date\") }}:</b> {{ doc.get_formatted(\"posting_date\") }}<br>\n\t<b>{{ _(\"Customer\") }}:</b> {{ doc.customer_name }}\n</p>\n\n<hr>\n<table class=\"table table-condensed cart no-border\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th width=\"50%\">{{ _(\"Item\") }}</th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ _(\"Qty\") }}</th>\n\t\t\t<th width=\"25%\" class=\"text-right\">{{ _(\"Amount\") }}</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t\t{%- for item in doc.items -%}\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t{{ item.item_code }}\n\t\t\t\t{%- if item.item_name != item.item_code -%}\n\t\t\t\t\t<br>{{ item.item_name }}\n\t\t\t\t{%- endif -%}\n\t\t\t\t{%- if item.serial_no -%}\n\t\t\t\t\t<br><b>{{ _(\"SR.No\") }}:</b><br>\n\t\t\t\t\t{{ item.serial_no | replace(\"\\n\", \", \") }}\n\t\t\t\t{%- endif -%}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">{{ item.qty }}<br>@ {{ item.get_formatted(\"rate\") }}</td>\n\t\t\t<td class=\"text-right\">{{ item.get_formatted(\"amount\") }}</td>\n\t\t</tr>\n\t\t{%- endfor -%}\n\t</tbody>\n</table>\n<table class=\"table table-condensed no-border\">\n\t<tbody>\n\t\t<tr>\n\t\t\t{% if doc.flags.show_inclusive_tax_in_print %}\n\t\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t\t{{ _(\"Total Excl. Tax\") }}\n\t\t\t\t</td>\n\t\t\t\t<td class=\"text-right\">\n\t\t\t\t\t{{ doc.get_formatted(\"net_total\", doc) }}\n\t\t\t\t</td>\n\t\t\t{% else %}\n\t\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t\t{{ _(\"Total\") }}\n\t\t\t\t</td>\n\t\t\t\t<td class=\"text-right\">\n\t\t\t\t\t{{ doc.get_formatted(\"total\", doc) }}\n\t\t\t\t</td>\n\t\t\t{% endif %}\n\t\t</tr>\n\t\t{%- for row in doc.taxes -%}\n\t\t {%- if not row.included_in_print_rate or doc.flags.show_inclusive_tax_in_print -%}\n\t\t\t<tr>\n\t\t\t\t<td class=\"text-right\" style=\"width: 70%\">\n\t\t\t\t {% if '%' in row.description %}\n\t\t\t\t\t {{ row.description }}\n\t\t\t\t\t{% else %}\n\t\t\t\t\t {{ row.description }}@{{ row.rate }}%\n\t\t\t\t\t{% endif %}\n\t\t\t\t</td>\n\t\t\t\t<td class=\"text-right\">\n\t\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc)}}\n\t\t\t\t</td>\n\t\t\t<tr>\n\t\t {%- endif -%}\n\t\t{%- endfor -%}\n\n\t\t{%- if doc.discount_amount -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t{{ _(\"Discount\") }}\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"discount_amount\") }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- endif -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ _(\"Grand Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"grand_total\") }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- if doc.rounded_total -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ _(\"Rounded Total\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"rounded_total\") }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- endif -%}\n\t\t<tr>\n\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t<b>{{ _(\"Paid Amount\") }}</b>\n\t\t\t</td>\n\t\t\t<td class=\"text-right\">\n\t\t\t\t{{ doc.get_formatted(\"paid_amount\") }}\n\t\t\t</td>\n\t\t</tr>\n\t\t{%- if doc.change_amount -%}\n\t\t\t<tr>\n\t\t\t\t<td class=\"text-right\" style=\"width: 75%\">\n\t\t\t\t\t<b>{{ _(\"Change Amount\") }}</b>\n\t\t\t\t</td>\n\t\t\t\t<td class=\"text-right\">\n\t\t\t\t\t{{ doc.get_formatted(\"change_amount\")}}\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t{%- endif -%}\n\t</tbody>\n</table>\n<hr>\n<p>{{ doc.terms or \"\" }}</p>\n<p class=\"text-center\">{{ _(\"Thank you, please visit again.\") }}</p>",
"idx": 0,
"line_breaks": 0,
"modified": "2020-05-14 17:13:29.354015",
"margin_bottom": 15.0,
"margin_left": 15.0,
"margin_right": 15.0,
"margin_top": 15.0,
"modified": "2023-11-08 18:13:32.882432",
"modified_by": "Administrator",
"module": "Selling",
"name": "Return POS Invoice",
"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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"doctype": "Print Format",
"font": "Default",
"font_size": 14,
"html": "<h3>{{ doc.company }}</h3>\n<div>{{ doc.company_tax_id }}</div>\n<h4>{{ doc.get_formatted(\"doc.company_tax_id\") }}</h4>\n<div>\n{{ _(\"Nota de Entrega POS No\") }}: {{ doc.name }}<br>\n\t{{ _(\"Comercial\") }}: {{ doc.owner }}<br>\n\t{{ _(\"Customer\") }} : {{ doc.customer_name }}<br>\n\t{{ _(\"CIF\") }}: {{ doc.cif }}<br>\n\t{{ _(\"Date\") }}: {{ doc.get_formatted(\"posting_date\") }}<br>\n\t{{ _(\"Time\") }}: {{ doc.get_formatted(\"posting_time\") }}<br>\n</div>\n<br>\n<table class=\"table table-bordered\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<th>N.</th>\n\t\t\t<th>Descripcion</th>\n\t\t\t<th>Nombre</th>\n\t\t\t<th class=\"text-right\">Cantidad</th>\n\t\t\t<th class=\"text-right\">Precio</th>\n\t\t\t<th class=\"text-right\">Importe</th>\n\t\t</tr>\n\t\t{%- for row in doc.items -%}\n\t\t<tr>\n\t\t\t<td style=\"width: 3px;\">{{ row.idx }}</td>\n\t\t\t<td style=\"width: 18px;\">\n\t\t\t\t{{ row.item_name }}\n\t\t\t\t{% if row.item_code != row.item_name -%}\n\t\t\t\t<br>Item Code: {{ row.item_code}}\n\t\t\t\t{%- endif %}\n\t\t\t</td>\n\t\t\t<td style=\"width: 37px;\">\n\t\t\t\t<div1 style=\"border: 0px;\">{{ row.description }}</div1></td>\n\t\t\t<td style=\"width: 10px; text-align: right;\">{{ row.qty }}</td>\n\t\t\t<td style=\"width: 15px; text-align: right;\">{{\n\t\t\t\trow.get_formatted(\"rate\", doc) }}</td>\n\t\t\t<td style=\"width: 15px; text-align: right;\">{{\n\t\t\t\trow.get_formatted(\"amount\", doc) }}</td>\n\t\t</tr>\n\t\t{%- endfor -%}\n\t</tbody>\n</table>\n<div class=\"text-right\">\n {% if doc.flags.show_inclusive_tax_in_print %}\n {{ _(\"Total Excl. Tax\") }}\n {{ doc.get_formatted(\"net_total\", doc) }}\n {% else %}\n {{ _(\"Importe total\") }}: .{{ doc.get_formatted(\"total\", doc) }}\n {% endif %}<br>\n {%- for row in doc.taxes -%}\n {%- if not row.included_in_print_rate or doc.flags.show_inclusive_tax_in_print -%}\n {% if '%' in row.description %}\n {{ row.description }}\n {% else %}\n {{ row.description }}@{{ row.rate }}%\n {% endif %}: .{{ row.get_formatted(\"tax_amount\", doc) }}\n {%- endif -%}<br>\n {%- endfor -%}\n {%- if doc.discount_amount -%}\n {{ _(\"Discount\") }}\n {{ doc.get_formatted(\"discount_amount\") }}\n {%- endif -%}\n <b>{{ _(\"Grand Total\") }}</b>: .{{ doc.get_formatted(\"grand_total\") }}<br>\n</div>\n<div>{{ _(\"Direcci\u00f3n de empresa\") }}: {{ doc.get_formatted(\"customer_address\") }}</div>\n<div>{{ _(\"Direcci\u00f3n de env\u00edo\") }}: {{ doc.get_formatted(\"shipping_address_name\") }}</div>\n<div>{{ _(\"Persona de contacto\") }}: {{ doc.get_formatted(\"contact_person\") }}</div>\n<p>{{ doc.terms or \"\" }}</p>\n<h2 class=\"text-center\">{{ _(\"Gracies\") }}</h2>",
"html": "<h3>{{ doc.company }}</h3>\n<div>{{ doc.company_tax_id }}</div>\n<h4>{{ doc.get_formatted(\"doc.company_tax_id\") }}</h4>\n<div>\n{{ _(\"No\") }}: {{ doc.name }}<br>\n\t{{ _(\"Comercial\") }}: {{ doc.owner }}<br>\n\t{{ _(\"Customer\") }} : {{ doc.customer_name }}<br>\n\t{{ _(\"CIF\") }}: {{ doc.cif }}<br>\n\t{{ _(\"Date\") }}: {{ doc.get_formatted(\"posting_date\") }}<br>\n\t{{ _(\"Time\") }}: {{ doc.get_formatted(\"posting_time\") }}<br>\n</div>\n<br>\n<table class=\"table table-bordered\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<th>N.</th>\n\t\t\t<th>Descripcion</th>\n\t\t\t<th>Nombre</th>\n\t\t\t<th class=\"text-right\">Cantidad</th>\n\t\t\t<th class=\"text-right\">Precio</th>\n\t\t\t<th class=\"text-right\">Importe</th>\n\t\t</tr>\n\t\t{%- for row in doc.items -%}\n\t\t<tr>\n\t\t\t<td style=\"width: 3px;\">{{ row.idx }}</td>\n\t\t\t<td style=\"width: 18px;\">\n\t\t\t\t{{ row.item_name }}\n\t\t\t\t{% if row.item_code != row.item_name -%}\n\t\t\t\t<br>Item Code: {{ row.item_code}}\n\t\t\t\t{%- endif %}\n\t\t\t</td>\n\t\t\t<td style=\"width: 37px;\">\n\t\t\t\t<div1 style=\"border: 0px;\">{{ row.description }}</div1></td>\n\t\t\t<td style=\"width: 10px; text-align: right;\">{{ row.qty }}</td>\n\t\t\t<td style=\"width: 15px; text-align: right;\">{{\n\t\t\t\trow.get_formatted(\"rate\", doc) }}</td>\n\t\t\t<td style=\"width: 15px; text-align: right;\">{{\n\t\t\t\trow.get_formatted(\"amount\", doc) }}</td>\n\t\t</tr>\n\t\t{%- endfor -%}\n\t</tbody>\n</table>\n<div class=\"text-right\">\n {% if doc.flags.show_inclusive_tax_in_print %}\n {{ _(\"Total Excl. Tax\") }}\n {{ doc.get_formatted(\"net_total\", doc) }}\n {% else %}\n {{ _(\"Importe total\") }}: .{{ doc.get_formatted(\"total\", doc) }}\n {% endif %}<br>\n {%- for row in doc.taxes -%}\n {%- if not row.included_in_print_rate or doc.flags.show_inclusive_tax_in_print -%}\n {% if '%' in row.description %}\n {{ row.description }}\n {% else %}\n {{ row.description }}@{{ row.rate }}%\n {% endif %}: .{{ row.get_formatted(\"tax_amount\", doc) }}\n {%- endif -%}<br>\n {%- endfor -%}\n {%- if doc.discount_amount -%}\n {{ _(\"Discount\") }}\n {{ doc.get_formatted(\"discount_amount\") }}\n {%- endif -%}\n <b>{{ _(\"Grand Total\") }}</b>: .{{ doc.get_formatted(\"grand_total\") }}<br>\n</div>\n<div>{{ _(\"Direcci\u00f3n de empresa\") }}: {{ doc.get_formatted(\"customer_address\") }}</div>\n<div>{{ _(\"Direcci\u00f3n de env\u00edo\") }}: {{ doc.get_formatted(\"shipping_address_name\") }}</div>\n<div>{{ _(\"Persona de contacto\") }}: {{ doc.get_formatted(\"contact_person\") }}</div>\n<p>{{ doc.terms or \"\" }}</p>\n<h2 class=\"text-center\">{{ _(\"Gracies\") }}</h2>",
"idx": 0,
"line_breaks": 0,
"margin_bottom": 15.0,
"margin_left": 15.0,
"margin_right": 15.0,
"margin_top": 15.0,
"modified": "2023-08-07 09:58:05.124316",
"modified": "2023-12-03 17:27:38.933827",
"modified_by": "Administrator",
"module": "Stock",
"name": "POC Delivery Note",
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"absolute_value": 0,
"align_labels_right": 0,
"creation": "2023-12-03 17:11:37.376084",
"css": ".print-format div {\n font-size: 18px;\n }\n.print-format table tbody {\n font-size: 18px;\n }\n.print-format div2 {\n font-size: 20px;\n }\n.print-format div1 tr th {\n font-size: 18px;\n }",
"custom_format": 1,
"default_print_language": "es",
"disabled": 0,
"doc_type": "Delivery Note",
"docstatus": 0,
"doctype": "Print Format",
"font_size": 14,
"html": "<h3>{{ doc.company }}</h3>\n<div>{{ doc.company_tax_id }}</div>\n<h3>{{ _(\"Nota de Entrega\") }}</h3>\n<h4>{{ doc.get_formatted(\"doc.company_tax_id\") }}</h4>\n<div>\n{{ _(\"DN No\") }}: {{ doc.name }}<br>\n\t{{ _(\"Comercial\") }}: {{ doc.owner }}<br>\n\t{{ _(\"Customer\") }} : {{ doc.customer_name }}<br>\n\t{{ _(\"CIF\") }}: {{ doc.cif }}<br>\n\t{{ _(\"Date\") }}: {{ doc.get_formatted(\"posting_date\") }}<br>\n\t{{ _(\"Time\") }}: {{ doc.get_formatted(\"posting_time\") }}<br>\n</div>\n<br>\n<table class=\"table table-bordered\">\n\t<tbody>\n\t\t<tr>\n\t\t\t<th>N.</th>\n\t\t\t<th>Descripcion</th>\n\t\t\t<th>Nombre</th>\n\t\t\t<th class=\"text-right\">Cantidad</th>\n\t\t\t<th class=\"text-right\">Precio</th>\n\t\t\t<th class=\"text-right\">Importe</th>\n\t\t</tr>\n\t\t{%- for row in doc.items -%}\n\t\t<tr>\n\t\t\t<td style=\"width: 3px;\">{{ row.idx }}</td>\n\t\t\t<td style=\"width: 18px;\">\n\t\t\t\t{{ row.item_name }}\n\t\t\t\t{% if row.item_code != row.item_name -%}\n\t\t\t\t<br>Item Code: {{ row.item_code}}\n\t\t\t\t{%- endif %}\n\t\t\t</td>\n\t\t\t<td style=\"width: 37px;\">\n\t\t\t\t<div1 style=\"border: 0px;\">{{ row.description }}</div1></td>\n\t\t\t<td style=\"width: 10px; text-align: right;\">{{ row.qty }} {{ row.uom or row.stock_uom }}</td>\n\t\t\t<td style=\"width: 15px; text-align: right;\">{{\n\t\t\t\trow.get_formatted(\"rate\", doc) }}</td>\n\t\t\t<td style=\"width: 15px; text-align: right;\">{{\n\t\t\t\trow.get_formatted(\"amount\", doc) }}</td>\n\t\t</tr>\n\t\t{%- endfor -%}\n\t</tbody>\n</table>\n<div2 class=\"text-right\">\n {% if doc.flags.show_inclusive_tax_in_print %}\n {{ _(\"Total Excl. Tax\") }}\n {{ doc.get_formatted(\"net_total\", doc) }}\n {% else %}\n {{ _(\"Importe total\") }}: .{{ doc.get_formatted(\"total\", doc) }}\n {% endif %}<br>\n {%- for row in doc.taxes -%}\n {%- if not row.included_in_print_rate or doc.flags.show_inclusive_tax_in_print -%}\n {% if '%' in row.description %}\n {{ row.description }}\n {% else %}\n {{ row.description }}\n {% endif %}: .{{ row.get_formatted(\"tax_amount\", doc) }}\n {%- endif -%}<br>\n {%- endfor -%}\n {%- if doc.discount_amount -%}\n {{ _(\"Discount\") }}\n {{ doc.get_formatted(\"discount_amount\") }}\n {%- endif -%}\n <b>{{ _(\"Grand Total\") }}</b>: .{{ doc.get_formatted(\"grand_total\") }}<br>\n</div2>\n<p>{{ doc.terms or \"\" }}</p>\n<h2 class=\"text-center\">{{ _(\"Gracies\") }}</h2>",
"idx": 0,
"line_breaks": 0,
"margin_bottom": 15.0,
"margin_left": 15.0,
"margin_right": 15.0,
"margin_top": 15.0,
"modified": "2023-12-12 12:41:36.840678",
"modified_by": "Administrator",
"module": "Stock",
"name": "POS Delivery Note",
"owner": "Administrator",
"page_number": "Hide",
"print_format_builder": 0,
"print_format_builder_beta": 0,
"print_format_type": "JS",
"raw_printing": 0,
"show_section_headings": 0,
"standard": "Yes"
}

0 comments on commit f7a749a

Please sign in to comment.