mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
refactor: logic moved to standard template
Previously print_settings.py controller decided which template to use. Now standard template decides what to print according to settings.
This commit is contained in:
@@ -1,6 +1,15 @@
|
|||||||
{% if (doc.uom and not doc.is_print_hide("uom")) %}
|
{% set qty_first=frappe.db.get_single_value("Print Settings", "print_uom_after_quantity") %}
|
||||||
<small class="pull-left">{{ _(doc.uom) }}</small>
|
{% if qty_first %}
|
||||||
{% elif (doc.stock_uom and not doc.is_print_hide("stock_uom")) %}
|
{{ doc.get_formatted("qty", doc) }}
|
||||||
<small class="pull-left">{{ _(doc.stock_uom) }}</small>
|
{% 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 %}
|
||||||
|
{% else %}
|
||||||
|
{% if (doc.uom and not doc.is_print_hide("uom")) %}
|
||||||
|
<small class="pull-left">{{ _(doc.uom) }}</small>
|
||||||
|
{% elif (doc.stock_uom and not doc.is_print_hide("stock_uom")) %}
|
||||||
|
<small class="pull-left">{{ _(doc.stock_uom) }}</small>
|
||||||
|
{%- endif %}
|
||||||
|
{{ doc.get_formatted("qty", doc) }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{{ doc.get_formatted("qty", doc) }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user