From f450df9ead1bdbf3c70e1f43731571d1a61e19c3 Mon Sep 17 00:00:00 2001 From: Hilmy <54829572+anhilmy@users.noreply.github.com> Date: Thu, 29 Feb 2024 13:12:14 +0700 Subject: [PATCH] Feat/printing format (#118) * feat: add bill print * feat: add print receipt * fix address --- inn/hooks.py | 3 +- .../inn_hotels_setting.json | 22 +++++++++++++- .../inn_pos_usage/inn_extended_bill.py | 30 +++++++++++++++++++ .../doctype/inn_pos_usage/inn_pos_usage.json | 4 ++- .../doctype/inn_pos_usage/inn_pos_usage.py | 1 + inn/inn_hotels/doctype/inn_room/inn_room.js | 4 +-- .../pos_extended_bill/pos_extended_bill.json | 5 ++-- .../pos_extended_captain_order.json | 6 ++-- .../pos_extended_invoice.json | 5 ++-- .../pos_extended_table_order.json | 2 +- 10 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 inn/inn_hotels/doctype/inn_pos_usage/inn_extended_bill.py diff --git a/inn/hooks.py b/inn/hooks.py index 98066db..a3ac7b8 100644 --- a/inn/hooks.py +++ b/inn/hooks.py @@ -134,7 +134,8 @@ "inn.inn_hotels.doctype.inn_reservation.inn_reservation.get_date", "inn.inn_hotels.doctype.inn_pos_usage.inn_pos_usage.print_list_order", - "inn.inn_hotels.page.pos_extended.pos_extended.get_table_number" + "inn.inn_hotels.page.pos_extended.pos_extended.get_table_number", + "inn.inn_hotels.doctype.inn_pos_usage.inn_extended_bill.extended_bil_extra_data" ] } diff --git a/inn/inn_hotels/doctype/inn_hotels_setting/inn_hotels_setting.json b/inn/inn_hotels/doctype/inn_hotels_setting/inn_hotels_setting.json index bc19fa1..a08eaef 100644 --- a/inn/inn_hotels/doctype/inn_hotels_setting/inn_hotels_setting.json +++ b/inn/inn_hotels/doctype/inn_hotels_setting/inn_hotels_setting.json @@ -45,6 +45,9 @@ "profit_sharing_account", "profit_sharing_transaction_type", "service_charge_account", + "inn_pos_extended_section", + "tax_name_pos_receipt", + "pos_receipt_remarks", "master_data_generator_sb", "bed_type_generator", "room_type_generator", @@ -321,11 +324,28 @@ "label": "Number of Floor", "non_negative": 1, "reqd": 1 + }, + { + "fieldname": "inn_pos_extended_section", + "fieldtype": "Section Break", + "label": "Inn POS Extended" + }, + { + "default": "Tax&Service (21%)", + "fieldname": "tax_name_pos_receipt", + "fieldtype": "Data", + "label": "Tax Name POS Receipt", + "reqd": 1 + }, + { + "fieldname": "pos_receipt_remarks", + "fieldtype": "Small Text", + "label": "POS Receipt Remarks" } ], "issingle": 1, "links": [], - "modified": "2024-02-27 09:29:10.285393", + "modified": "2024-02-29 11:35:51.569635", "modified_by": "Administrator", "module": "Inn Hotels", "name": "Inn Hotels Setting", diff --git a/inn/inn_hotels/doctype/inn_pos_usage/inn_extended_bill.py b/inn/inn_hotels/doctype/inn_pos_usage/inn_extended_bill.py new file mode 100644 index 0000000..d8afb1f --- /dev/null +++ b/inn/inn_hotels/doctype/inn_pos_usage/inn_extended_bill.py @@ -0,0 +1,30 @@ +import frappe +from frappe import utils + + +def extended_bil_extra_data(invoice): + + tax_name = frappe.db.get_single_value("Inn Hotels Setting", "tax_name_pos_receipt", True) + + address = frappe.get_all("Dynamic Link", filters={"link_doctype": "Company", "link_name": invoice.company,"parenttype":"Address"}, fields=["parent"]) + if address: + address = frappe.get_value("Address", filters=address[0].parent, fieldname="address_line1", as_dict=True) + + order_id = frappe.get_value("Inn POS Usage", filters={"pos_invoice": invoice.name}, fieldname="name", as_dict=True) + + total_tax = 0 + for tax in invoice.taxes: + total_tax += tax.tax_amount + total_tax = utils.fmt_money(total_tax, 2, "Rp") + + remarks = frappe.db.get_single_value("Inn Hotels Setting", "pos_receipt_remarks", True) + + return { + "address": address.address_line1, + "order_id": order_id.name, + "tax": { + "name": tax_name, + "total": total_tax + }, + "remarks": remarks + } \ No newline at end of file diff --git a/inn/inn_hotels/doctype/inn_pos_usage/inn_pos_usage.json b/inn/inn_hotels/doctype/inn_pos_usage/inn_pos_usage.json index 3074a8d..0a0e52f 100644 --- a/inn/inn_hotels/doctype/inn_pos_usage/inn_pos_usage.json +++ b/inn/inn_hotels/doctype/inn_pos_usage/inn_pos_usage.json @@ -1,6 +1,7 @@ { "actions": [], "allow_rename": 1, + "autoname": "format:FB-{DD}/{MM}/{YY}-{####}", "creation": "2024-02-12 11:06:40.509746", "doctype": "DocType", "engine": "InnoDB", @@ -51,10 +52,11 @@ ], "index_web_pages_for_search": 1, "links": [], - "modified": "2024-02-13 12:38:30.114825", + "modified": "2024-02-28 14:17:01.329170", "modified_by": "Administrator", "module": "Inn Hotels", "name": "Inn POS Usage", + "naming_rule": "Expression", "owner": "Administrator", "permissions": [ { diff --git a/inn/inn_hotels/doctype/inn_pos_usage/inn_pos_usage.py b/inn/inn_hotels/doctype/inn_pos_usage/inn_pos_usage.py index 3ab43f0..65166ea 100644 --- a/inn/inn_hotels/doctype/inn_pos_usage/inn_pos_usage.py +++ b/inn/inn_hotels/doctype/inn_pos_usage/inn_pos_usage.py @@ -13,6 +13,7 @@ class InnPOSUsage(Document): def print_list_order(pos_invoice): order_dict = frappe.get_last_doc('Inn POS Usage', filters={'pos_invoice': pos_invoice}) res = { + "name": order_dict.name, "table": order_dict.table, "items": order_dict.new_item } diff --git a/inn/inn_hotels/doctype/inn_room/inn_room.js b/inn/inn_hotels/doctype/inn_room/inn_room.js index d2fa978..ef0650d 100644 --- a/inn/inn_hotels/doctype/inn_room/inn_room.js +++ b/inn/inn_hotels/doctype/inn_room/inn_room.js @@ -3,9 +3,7 @@ frappe.ui.form.on('Inn Room', { refresh: function (frm, cdt, cdn) { - set_option_floor_plan(frm) - if (frappe.user.has_role('Housekeeping') || frappe.user.has_role('Housekeeping Assistant') || frappe.user.has_role('Housekeeping Supervisor') || @@ -116,6 +114,7 @@ frappe.ui.form.on('Inn Room', { let form_control_field; async function set_option_floor_plan(frm) { + frm.set_df_property("floor", "hidden", true) wrapper = $(".layout-main-section").find('div[data-fieldname="room_detail"]').find('.section-body').find('div[data-fieldname="column_break"').find("form") if (!wrapper.find('[data-fieldname="floor_choice"]').length) { await create_choice_field_floor(frm, wrapper) @@ -127,7 +126,6 @@ async function set_option_floor_plan(frm) { } async function create_choice_field_floor(frm, wrapper) { - frm.set_df_property("floor", "hidden", true) let opt_floor = [""] await frappe.db.get_single_value("Inn Hotels Setting", "number_of_floor",) diff --git a/inn/inn_hotels/print_format/pos_extended_bill/pos_extended_bill.json b/inn/inn_hotels/print_format/pos_extended_bill/pos_extended_bill.json index 373ec7c..47adab3 100644 --- a/inn/inn_hotels/print_format/pos_extended_bill/pos_extended_bill.json +++ b/inn/inn_hotels/print_format/pos_extended_bill/pos_extended_bill.json @@ -2,6 +2,7 @@ "absolute_value": 0, "align_labels_right": 0, "creation": "2024-02-12 15:19:53.428647", + "css": ".heading {\n border-bottom: dashed;\n padding-bottom: 0.5rem;\n box-sizing: content-box;\n}\n\n.detail {\n border-top: dashed;\n padding: 0.5rem 0;\n}\n\n.item-container {\n border-top: thin dashed;\n border-bottom: thin dashed;\n padding: 0 0.5rem 1rem;\n}\n\n.item-name {\n line-height: 1rem;\n}\n\n.item-quantity {\n display: flex;\n justify-content: flex-end;\n}\n\n.item-quantity > div {\n margin-left: 3rem;\n}\n\n.line-height-2px {\n line-height: 2px;\n}\n\n.footer {\n margin: 0.5rem;\n}\n\n.footer > div {\n display: flex;\n justify-content: space-between;\n}\n\n.nominal {\n text-align: end;\n}\n\n@media screen {\n\t.print-format {\n\t\twidth: 4in;\n\t\tpadding: 0.25in;\n\t\tmin-height: 1in;\n\t}\n}", "custom_format": 1, "default_print_language": "en", "disabled": 0, @@ -9,14 +10,14 @@ "docstatus": 0, "doctype": "Print Format", "font_size": 14, - "html": "\n\n{% if letter_head %}\n {{ letter_head }}\n{% endif %}\n\n

\n\t{{ doc.company }}
\n\t{{ _(\"Bill\") }}
\n

\n

\n\t{{ _(\"Receipt No\") }}: {{ doc.name }}
\n\t{{ _(\"Cashier\") }}: {{ doc.owner }}
\n\t{{ _(\"Customer\") }}: {{ doc.customer_name }}
\n\t{% set table_number = get_table_number(doc.name) %}\n\n\t{{ _(\"Table\") }}: {{ table_number if table_number else \"None\" }}
\n\t{{ _(\"Date\") }}: {{ doc.get_formatted(\"posting_date\") }}
\n\t{{ _(\"Time\") }}: {{ doc.get_formatted(\"posting_time\") }}
\n

\n\n
\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t{%- for item in doc.items -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endfor -%}\n\t\n
{{ _(\"Item\") }}{{ _(\"Qty\") }}{{ _(\"Amount\") }}
\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
{{ item.item_name }}\n\t\t\t\t{%- endif -%}\n\t\t\t\t{%- if item.serial_no -%}\n\t\t\t\t\t
{{ _(\"SR.No\") }}:
\n\t\t\t\t\t{{ item.serial_no | replace(\"\\n\", \", \") }}\n\t\t\t\t{%- endif -%}\n\t\t\t
{{ item.qty }}
@ {{ item.get_formatted(\"rate\") }}
{{ item.get_formatted(\"amount\") }}
\n\n\t\n\t\t\n\t\t\t{% if doc.flags.show_inclusive_tax_in_print %}\n\t\t\t\t\n\t\t\t\t\n\t\t\t{% else %}\n\t\t\t\t\n\t\t\t\t\n\t\t\t{% endif %}\n\t\t\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\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t {%- endif -%}\n\t\t{%- endfor -%}\n\n\t\t{%- if doc.discount_amount -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endif -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- if doc.rounded_total -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endif -%}\n\t\n
\n\t\t\t\t\t{{ _(\"Total Excl. Tax\") }}\n\t\t\t\t\n\t\t\t\t\t{{ doc.get_formatted(\"net_total\", doc) }}\n\t\t\t\t\n\t\t\t\t\t{{ _(\"Total\") }}\n\t\t\t\t\n\t\t\t\t\t{{ doc.get_formatted(\"total\", doc) }}\n\t\t\t\t
\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\n\t\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t\t
\n\t\t\t\t{{ _(\"Discount\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"discount_amount\") }}\n\t\t\t
\n\t\t\t\t{{ _(\"Grand Total\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"grand_total\") }}\n\t\t\t
\n\t\t\t\t{{ _(\"Rounded Total\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"rounded_total\") }}\n\t\t\t
\n
\n

{{ doc.terms or \"\" }}

", + "html": "{% set extra = extended_bil_extra_data(doc) %}\n\n

\n\t{{ doc.company }}
\n\t{{ extra.address }}
\n

\n\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Tanggal: {{doc.get_formatted(\"posting_date\") }} {{doc.get_formatted(\"posting_time\")}}
Nama: {{ doc.title }}
Order: {{ extra.order_id }}
Kasir: {{ doc.owner }}
\n
\n\n
\n{%- for item in doc.items -%}\n\t
\n\t\t
\n\t\t
{{ item.item_name }}\n\t\t
\n\t\t
\n \t
{{ item.qty }} @ {{ item.get_formatted(\"rate\") }}
\n \t
{{ item.get_formatted(\"amount\") }}
\n\t\t
\n\t
\n{%- endfor -%}\n
\n\n\n
\n
\n
\n

{{_(\"Subtotal\")}}

\n
\n
\n

{{ doc.get_formatted(\"total\", doc) }}

\n
\n
\n \n {%- if extra.tax.name -%}\n
\n
\n

{{ extra.tax.name }}

\n
\n
\n

{{ extra.tax.total }}

\n
\n
\n\t{%- endif -%}\n\t\n {%- if doc.discount_amount -%}\n
\n
\n

{{_(\"Discount\")}}

\n
\n
\n

{{ doc.get_formatted(\"discount_amount\") }}

\n
\n
\n\t{%- endif -%}\n\t\n
\n
\n

{{_(\"Grand Total\")}}

\n
\n
\n

{{ doc.get_formatted(\"grand_total\") }}

\n
\n
\n \n \n\t{%- if doc.rounded_total -%}\n\t\n
\n
\n

{{_(\"Rounded Total\")}}

\n
\n
\n

{{ doc.get_formatted(\"rounded_total\") }}

\n
\n
\n\t{%- endif -%}\n \n
\n", "idx": 0, "line_breaks": 0, "margin_bottom": 15.0, "margin_left": 15.0, "margin_right": 15.0, "margin_top": 15.0, - "modified": "2024-02-13 16:00:18.302763", + "modified": "2024-02-29 11:29:21.776161", "modified_by": "Administrator", "module": "Inn Hotels", "name": "POS Extended Bill", diff --git a/inn/inn_hotels/print_format/pos_extended_captain_order/pos_extended_captain_order.json b/inn/inn_hotels/print_format/pos_extended_captain_order/pos_extended_captain_order.json index acb7339..1e87318 100644 --- a/inn/inn_hotels/print_format/pos_extended_captain_order/pos_extended_captain_order.json +++ b/inn/inn_hotels/print_format/pos_extended_captain_order/pos_extended_captain_order.json @@ -2,7 +2,7 @@ "absolute_value": 0, "align_labels_right": 0, "creation": "2024-02-13 10:57:02.837376", - "css": ".print-format table, .print-format tr, \n.print-format td, .print-format div, .print-format p {\n\tfont-family: Monospace;\n\tline-height: 200%;\n\tvertical-align: middle;\n}\n@media screen {\n\t.print-format {\n\t\twidth: 4in;\n\t\tpadding: 0.25in;\n\t\tmin-height: 8in;\n\t}\n}", + "css": ".print-format table, .print-format tr, \n.print-format td, .print-format div, .print-format p {\n\tfont-family: Monospace;\n\tline-height: 200%;\n\tvertical-align: middle;\n}\n@media screen {\n\t.print-format {\n\t\twidth: 4in;\n\t\tpadding: 0.25in;\n\t\tmin-height: 8in;\n\t}\n}\n\n.title {\n text-align: center;\n}\n\n.top-divider {\n border-top: dashed;\n}\n\ninput[type=\"checkbox\"] {\n transform:scale(1.5, 1.5);\n}", "custom_format": 1, "default_print_language": "en", "disabled": 0, @@ -11,14 +11,14 @@ "doctype": "Print Format", "font": "Default", "font_size": 0, - "html": "{% set list = print_list_order(doc.name) %}\n

\n\tOrder ID: {{doc.name}}
\n\tTable No: {{list.table}}
\n

\n
\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t{% for item in list[\"items\"] %}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{% endfor %}\n\t\n
QtyItem
{{ item.quantity }}{{ item.item_name }}
\n", + "html": "{% set list = print_list_order(doc.name) %}\n

\n\tORDER: {{list.name}}
\n\tTABLE: {{list.table}}
\n

\n

\n\n
\n

PESANAN

\n
\n\n\t\n\t\t\n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t{% for item in list[\"items\"] %}\n\t\t\n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t\n\t\t{% endfor %}\n\t\n

{{ item.quantity }}

{{ item.item_name }}

\n", "idx": 0, "line_breaks": 0, "margin_bottom": 0.0, "margin_left": 0.0, "margin_right": 0.0, "margin_top": 0.0, - "modified": "2024-02-13 14:10:30.526511", + "modified": "2024-02-28 14:50:01.251509", "modified_by": "Administrator", "module": "Inn Hotels", "name": "POS Extended Captain Order", diff --git a/inn/inn_hotels/print_format/pos_extended_invoice/pos_extended_invoice.json b/inn/inn_hotels/print_format/pos_extended_invoice/pos_extended_invoice.json index 6f6edb4..d67c2a3 100644 --- a/inn/inn_hotels/print_format/pos_extended_invoice/pos_extended_invoice.json +++ b/inn/inn_hotels/print_format/pos_extended_invoice/pos_extended_invoice.json @@ -2,6 +2,7 @@ "absolute_value": 0, "align_labels_right": 0, "creation": "2024-02-12 14:59:39.188116", + "css": ".heading {\n border-bottom: dashed;\n padding-bottom: 0.5rem;\n box-sizing: content-box;\n}\n\n.detail {\n border-top: dashed;\n padding: 0.5rem 0;\n}\n\n.item-container {\n border-top: thin dashed;\n border-bottom: thin dashed;\n padding: 0 0.5rem 1rem;\n}\n\n.item-name {\n line-height: 1rem;\n}\n\n.item-quantity {\n display: flex;\n justify-content: flex-end;\n}\n\n.item-quantity > div {\n margin-left: 3rem;\n}\n\n.line-height-2px {\n line-height: 2px;\n}\n\n.footer {\n border-bottom: thin dashed;\n padding: 0.5rem;\n}\n\n.footer > div {\n display: flex;\n justify-content: space-between;\n}\n\n.nominal {\n text-align: end;\n}\n\n.payment {\n border-bottom: thin dashed;\n padding: 0.5rem 0;\n}\n\n\n.remarks {\n white-space: pre-line;\n text-align: center;\n}\n\n@media screen {\n\t.print-format {\n\t\twidth: 4in;\n\t\tpadding: 0.25in;\n\t\tmin-height: 1in;\n\t}\n}", "custom_format": 1, "default_print_language": "en", "disabled": 0, @@ -9,14 +10,14 @@ "docstatus": 0, "doctype": "Print Format", "font_size": 14, - "html": "\n\n{% if letter_head %}\n {{ letter_head }}\n{% endif %}\n\n

\n\t{{ doc.company }}
\n\t{{ doc.select_print_heading or _(\"Invoice\") }}
\n

\n

\n\t{{ _(\"Receipt No\") }}: {{ doc.name }}
\n\t{{ _(\"Cashier\") }}: {{ doc.owner }}
\n\t{{ _(\"Customer\") }}: {{ doc.customer_name }}
\n\t{{ _(\"Table\") }}: {{ frappe.db.get_value(doctype=\"Inn POS Usage\", filters={\"pos_invoice\": doc.name}, fieldname=[\"table\"]) }}
\n\t{{ _(\"Date\") }}: {{ doc.get_formatted(\"posting_date\") }}
\n\t{{ _(\"Time\") }}: {{ doc.get_formatted(\"posting_time\") }}
\n

\n\n
\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t\n\t\t{%- for item in doc.items -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endfor -%}\n\t\n
{{ _(\"Item\") }}{{ _(\"Qty\") }}{{ _(\"Amount\") }}
\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
{{ item.item_name }}\n\t\t\t\t{%- endif -%}\n\t\t\t\t{%- if item.serial_no -%}\n\t\t\t\t\t
{{ _(\"SR.No\") }}:
\n\t\t\t\t\t{{ item.serial_no | replace(\"\\n\", \", \") }}\n\t\t\t\t{%- endif -%}\n\t\t\t
{{ item.qty }}
@ {{ item.get_formatted(\"rate\") }}
{{ item.get_formatted(\"amount\") }}
\n\n\t\n\t\t\n\t\t\t{% if doc.flags.show_inclusive_tax_in_print %}\n\t\t\t\t\n\t\t\t\t\n\t\t\t{% else %}\n\t\t\t\t\n\t\t\t\t\n\t\t\t{% endif %}\n\t\t\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\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t {%- endif -%}\n\t\t{%- endfor -%}\n\n\t\t{%- if doc.discount_amount -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endif -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- if doc.rounded_total -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- endif -%}\n\t\t{%- for row in doc.payments -%}\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t{%- endfor -%}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t{%- if doc.change_amount -%}\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t{%- endif -%}\n\t\n
\n\t\t\t\t\t{{ _(\"Total Excl. Tax\") }}\n\t\t\t\t\n\t\t\t\t\t{{ doc.get_formatted(\"net_total\", doc) }}\n\t\t\t\t\n\t\t\t\t\t{{ _(\"Total\") }}\n\t\t\t\t\n\t\t\t\t\t{{ doc.get_formatted(\"total\", doc) }}\n\t\t\t\t
\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\n\t\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t\t
\n\t\t\t\t{{ _(\"Discount\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"discount_amount\") }}\n\t\t\t
\n\t\t\t\t{{ _(\"Grand Total\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"grand_total\") }}\n\t\t\t
\n\t\t\t\t{{ _(\"Rounded Total\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"rounded_total\") }}\n\t\t\t
\n\t\t\t\t {{ row.mode_of_payment }}\n\t\t\t\t\n\t\t\t\t\t{{ row.get_formatted(\"amount\", doc) }}\n\t\t\t\t
\n\t\t\t\t{{ _(\"Paid Amount\") }}\n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"paid_amount\") }}\n\t\t\t
\n\t\t\t\t\t{{ _(\"Change Amount\") }}\n\t\t\t\t\n\t\t\t\t\t{{ doc.get_formatted(\"change_amount\") }}\n\t\t\t\t
\n
\n

{{ doc.terms or \"\" }}

\n

{{ _(\"Thank you, please visit again.\") }}

", + "html": "{% set extra = extended_bil_extra_data(doc) %}\n\n

\n\t{{ doc.company }}
\n\t{{ extra.address }}
\n

\n\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Tanggal: {{doc.get_formatted(\"posting_date\") }} {{doc.get_formatted(\"posting_time\")}}
Nomor Resi: {{doc.name }}
Order: {{ extra.order_id }}
Nama: {{ doc.title }}
Kasir: {{ doc.owner }}
\n
\n\n
\n{%- for item in doc.items -%}\n\t
\n\t\t
\n\t\t
{{ item.item_name }}\n\t\t
\n\t\t
\n \t
{{ item.qty }} @ {{ item.get_formatted(\"rate\") }}
\n \t
{{ item.get_formatted(\"amount\") }}
\n\t\t
\n\t
\n{%- endfor -%}\n
\n\n\n
\n
\n
\n

{{_(\"Subtotal\")}}

\n
\n
\n

{{ doc.get_formatted(\"total\", doc) }}

\n
\n
\n \n {%- if extra.tax.name -%}\n
\n
\n

{{ extra.tax.name }}

\n
\n
\n

{{ extra.tax.total }}

\n
\n
\n\t{%- endif -%}\n\t\n {%- if doc.discount_amount -%}\n
\n
\n

{{_(\"Discount\")}}

\n
\n
\n

{{ doc.get_formatted(\"discount_amount\") }}

\n
\n
\n\t{%- endif -%}\n\t\n
\n
\n

{{_(\"Grand Total\")}}

\n
\n
\n

{{ doc.get_formatted(\"grand_total\") }}

\n
\n
\n \n \n\t{%- if doc.rounded_total -%}\n\t\n
\n
\n

{{_(\"Rounded Total\")}}

\n
\n
\n

{{ doc.get_formatted(\"rounded_total\") }}

\n
\n
\n\t{%- endif -%}\n \n
\n\n
\n \n\t\t{%- for row in doc.payments -%}\n\t {%- if row.amount != 0 -%}\n \n \n \n \n \n {%- endif -%}\n\t {%- endfor -%}\n \n \n \n \n \n \n \n \n \n \n \n
Payment:{{ row.mode_of_payment }}
Paid Amt:{{ doc.get_formatted(\"paid_amount\", doc) }}
Change:{{ doc.get_formatted(\"change_amount\", doc) }}
\n
\n\n\n
\n {{ extra.remarks }}\n
", "idx": 0, "line_breaks": 0, "margin_bottom": 15.0, "margin_left": 15.0, "margin_right": 15.0, "margin_top": 15.0, - "modified": "2024-02-12 15:04:16.995259", + "modified": "2024-02-29 13:03:16.782428", "modified_by": "Administrator", "module": "Inn Hotels", "name": "POS Extended Invoice", diff --git a/inn/inn_hotels/print_format/pos_extended_table_order/pos_extended_table_order.json b/inn/inn_hotels/print_format/pos_extended_table_order/pos_extended_table_order.json index 6bc6300..58c10bf 100644 --- a/inn/inn_hotels/print_format/pos_extended_table_order/pos_extended_table_order.json +++ b/inn/inn_hotels/print_format/pos_extended_table_order/pos_extended_table_order.json @@ -18,7 +18,7 @@ "margin_left": 0.0, "margin_right": 0.0, "margin_top": 0.0, - "modified": "2024-02-13 14:14:53.144872", + "modified": "2024-02-28 13:16:00.543267", "modified_by": "Administrator", "module": "Inn Hotels", "name": "POS Extended Table Order",