diff --git a/erpnext/accounts/print_format/gst_pos_invoice/gst_pos_invoice.json b/erpnext/accounts/print_format/gst_pos_invoice/gst_pos_invoice.json index 051a1238d92..5debb5c9782 100644 --- a/erpnext/accounts/print_format/gst_pos_invoice/gst_pos_invoice.json +++ b/erpnext/accounts/print_format/gst_pos_invoice/gst_pos_invoice.json @@ -1,5 +1,5 @@ { - "align_labels_left": 0, + "align_labels_right": 0, "creation": "2017-08-08 12:33:04.773099", "custom_format": 1, "disabled": 0, @@ -10,7 +10,7 @@ "html": "\n\n
\n\t{{ doc.company }}
\n\t{% if doc.company_address_display %}\n\t\t{% set company_address = doc.company_address_display.replace(\"\\n\", \" \").replace(\"
\", \" \") %}\n\t\t{% if \"GSTIN\" not in company_address %}\n\t\t\t{{ company_address }}\n\t\t\t{{ _(\"GSTIN\") }}:{{ doc.company_gstin }}\n\t\t{% else %}\n\t\t\t{{ company_address.replace(\"GSTIN\", \"
GSTIN\") }}\n\t\t{% endif %}\n\t{% endif %}\n\t
\n\t{{ doc.select_print_heading or _(\"Invoice\") }}
\n
\n\t{{ _(\"Receipt No\") }}: {{ doc.name }}
\n\t{{ _(\"Date\") }}: {{ doc.get_formatted(\"posting_date\") }}
\n\t{% if doc.grand_total > 50000 %}\n\t\t{% set customer_address = doc.address_display.replace(\"\\n\", \" \").replace(\"
\", \" \") %}\n\t\t{{ _(\"Customer\") }}:
\n\t\t{{ doc.customer_name }}
\n\t\t{{ customer_address }}\n\t{% endif %}\n
| {{ _(\"Item\") }} | \n\t\t\t{{ _(\"Qty\") }} | \n\t\t\t{{ _(\"Amount\") }} | \n\t\t
|---|---|---|
| \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.gst_hsn_code -%}\n\t\t\t\t\t {{ _(\"HSN/SAC\") }}: {{ item.gst_hsn_code }}\n\t\t\t\t{%- endif -%}\n\t\t\t\t{%- if item.serial_no -%}\n\t\t\t\t\t {{ _(\"Serial No\") }}: {{ item.serial_no }}\n\t\t\t\t{%- endif -%}\n\t\t\t | \n\t\t\t{{ item.qty }} @ {{ item.rate }} | \n\t\t\t{{ item.get_formatted(\"amount\") }} | \n\t\t
| \n\t\t\t\t{{ _(\"Net Total\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"net_total\") }}\n\t\t\t | \n\t\t
| \n\t\t\t\t{{ row.description }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ row.get_formatted(\"tax_amount\", doc) }}\n\t\t\t | \n\t\t
| \n\t\t\t\t{{ _(\"Discount\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"discount_amount\") }}\n\t\t\t | \n\t\t
| \n\t\t\t\t{{ _(\"Grand Total\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ doc.get_formatted(\"grand_total\") }}\n\t\t\t | \n\t\t
Tax Breakup:
\n{{ doc.terms or \"\" }}
\n{{ _(\"Thank you, please visit again.\") }}
", "idx": 0, "line_breaks": 0, - "modified": "2017-08-29 15:54:19.467642", + "modified": "2017-09-14 15:54:19.467642", "modified_by": "Administrator", "module": "Accounts", "name": "GST POS Invoice", diff --git a/erpnext/accounts/print_format/point_of_sale/point_of_sale.json b/erpnext/accounts/print_format/point_of_sale/point_of_sale.json index 28c853cc48d..49696d253fc 100644 --- a/erpnext/accounts/print_format/point_of_sale/point_of_sale.json +++ b/erpnext/accounts/print_format/point_of_sale/point_of_sale.json @@ -1,5 +1,5 @@ { - "align_labels_left": 0, + "align_labels_right": 0, "creation": "2016-05-05 17:16:18.564460", "custom_format": 1, "disabled": 0, @@ -10,7 +10,7 @@ "html": "\n\n\n\t{{ company }}
\n\t{{ __(\"POS No : \") }} {{ offline_pos_name }}
\n
\n\t{{ __(\"Customer\") }}: {{ customer }}
\n
\n\t{{ __(\"Date\") }}: {{ dateutil.global_date_format(posting_date) }}
\n
| {{ __(\"Item\") }} | \n\t\t\t{{ __(\"Qty\") }} | \n\t\t\t{{ __(\"Amount\") }} | \n\t\t
|---|---|---|
| \n\t\t\t\t{{ item.item_name }}\n\t\t\t | \n\t\t\t{{ format_number(item.qty, null,precision(\"difference\")) }} @ {{ format_currency(item.rate, currency) }} | \n\t\t\t{{ format_currency(item.amount, currency) }} | \n\t\t
| \n\t\t\t\t{{ __(\"Net Total\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(total, currency) }}\n\t\t\t | \n\t\t
| \n\t\t\t\t{{ row.description }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(row.tax_amount, currency) }}\n\t\t\t | \n\t\t
| \n\t\t\t\t{{ __(\"Discount\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(discount_amount, currency) }}\n\t\t\t | \n\t\t
| \n\t\t\t\t{{ __(\"Grand Total\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(grand_total, currency) }}\n\t\t\t | \n\t\t
| \n\t\t\t\t{{ __(\"Paid Amount\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(paid_amount, currency) }}\n\t\t\t | \n\t\t
{{ terms }}
\n{{ __(\"Thank you, please visit again.\") }}
", "idx": 0, "line_breaks": 0, - "modified": "2017-05-19 14:36:04.740728", + "modified": "2017-09-14 14:36:04.740728", "modified_by": "Administrator", "module": "Accounts", "name": "Point of Sale", diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 5a0b967bd1d..9cc061677e0 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -16,6 +16,8 @@ from erpnext.controllers.stock_controller import StockController class BuyingController(StockController): def __setup__(self): if hasattr(self, "taxes"): + self.flags.print_taxes_with_zero_amount = cint(frappe.db.get_single_value("Print Settings", + "print_taxes_with_zero_amount")) self.print_templates = { "taxes": "templates/print_formats/includes/taxes.html" } diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 10b3607df91..d8b42027046 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -14,6 +14,8 @@ from erpnext.controllers.stock_controller import StockController class SellingController(StockController): def __setup__(self): if hasattr(self, "taxes"): + self.flags.print_taxes_with_zero_amount = cint(frappe.db.get_single_value("Print Settings", + "print_taxes_with_zero_amount")) self.print_templates = { "taxes": "templates/print_formats/includes/taxes.html" } diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 31ecd294e57..5bfd34e8695 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -435,4 +435,5 @@ erpnext.patches.v8_5.remove_project_type_property_setter erpnext.patches.v8_7.add_more_gst_fields erpnext.patches.v8_7.fix_purchase_receipt_status erpnext.patches.v8_6.rename_bom_update_tool -erpnext.patches.v8_9.set_default_customer_group +erpnext.patches.v8_9.set_print_zero_amount_taxes +erpnext.patches.v8_9.set_default_customer_group \ No newline at end of file diff --git a/erpnext/patches/v8_9/set_print_zero_amount_taxes.py b/erpnext/patches/v8_9/set_print_zero_amount_taxes.py new file mode 100644 index 00000000000..33d3cedc487 --- /dev/null +++ b/erpnext/patches/v8_9/set_print_zero_amount_taxes.py @@ -0,0 +1,7 @@ +from __future__ import unicode_literals +import frappe + +from erpnext.setup.install import create_print_zero_amount_taxes_custom_field + +def execute(): + create_print_zero_amount_taxes_custom_field() \ No newline at end of file diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index 9bf15cee648..81f909aa845 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -5,6 +5,8 @@ from __future__ import print_function, unicode_literals import frappe from frappe import _ +from frappe.desk.page.setup_wizard.setup_wizard import add_all_roles_to +from frappe.custom.doctype.custom_field.custom_field import create_custom_field default_mail_footer = """