From a5d5e70bf4f256e70064fc710c8597b32077e68f Mon Sep 17 00:00:00 2001 From: Frappe ERPnext Date: Thu, 3 Sep 2020 17:30:25 +0200 Subject: [PATCH] Revert "feat: Option to print UOM after quantity" This reverts commit a787882a8f55333d7f41a4df9c09e01d05b540df. --- erpnext/controllers/print_settings.py | 12 +++--------- .../includes/item_table_qty_swapped.html | 5 ----- 2 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 erpnext/templates/print_formats/includes/item_table_qty_swapped.html diff --git a/erpnext/controllers/print_settings.py b/erpnext/controllers/print_settings.py index d24b69162b..c41db25253 100644 --- a/erpnext/controllers/print_settings.py +++ b/erpnext/controllers/print_settings.py @@ -7,15 +7,9 @@ from frappe.utils import cint def print_settings_for_item_table(doc): - if frappe.db.get_single_value("Print Settings", "print_uom_after_quantity") != 1: - doc.print_templates = { - "qty": "templates/print_formats/includes/item_table_qty.html" - } - else: - doc.print_templates = { - "qty": "templates/print_formats/includes/item_table_qty_swapped.html" - } - + doc.print_templates = { + "qty": "templates/print_formats/includes/item_table_qty.html" + } doc.hide_in_print_layout = ["uom", "stock_uom"] doc.flags.compact_item_print = cint(frappe.db.get_single_value("Print Settings", "compact_item_print")) diff --git a/erpnext/templates/print_formats/includes/item_table_qty_swapped.html b/erpnext/templates/print_formats/includes/item_table_qty_swapped.html deleted file mode 100644 index c6c70f2cf7..0000000000 --- a/erpnext/templates/print_formats/includes/item_table_qty_swapped.html +++ /dev/null @@ -1,5 +0,0 @@ -{{ doc.get_formatted("qty", doc) }} -{% if (doc.uom and not doc.is_print_hide("uom")) %}{{ _(doc.uom) }} -{% elif (doc.stock_uom and not doc.is_print_hide("stock_uom")) %}{{ _(doc.stock_uom) }} -{%- endif %} -