mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
feat: condition based item code column
This commit is contained in:
@@ -208,18 +208,15 @@ print_heading_template=None) -%}
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- Items Table -->
|
<!-- Items Table -->
|
||||||
|
{% set item_naming_by = frappe.db.get_single_value("Stock Settings", "item_naming_by") %}
|
||||||
<table class="items-table mt-15">
|
<table class="items-table mt-15">
|
||||||
<colgroup>
|
|
||||||
<col style="width: 5%" />
|
|
||||||
<col style="width: 35%" />
|
|
||||||
<col style="width: 10%" />
|
|
||||||
<col style="width: 20%" />
|
|
||||||
<col style="width: 15%" />
|
|
||||||
</colgroup>
|
|
||||||
<thead class="highlight-bg">
|
<thead class="highlight-bg">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-center">{{ _("No") }}</td>
|
<td class=" text-center">{{ _("No") }}</td>
|
||||||
<td class="text-left">{{ _("Item") }}</td>
|
<td class="text-left">{{ _("Item") }}</td>
|
||||||
|
{% if item_naming_by != "Item Code" %}
|
||||||
|
<td class="text-left">{{ _("Item Code") }}</td>
|
||||||
|
{% endif %}
|
||||||
<td class="text-right">{{ _("Quantity") }}</td>
|
<td class="text-right">{{ _("Quantity") }}</td>
|
||||||
<td class="text-right">{{ _("Rate") }}</td>
|
<td class="text-right">{{ _("Rate") }}</td>
|
||||||
<td class="text-right">{{ _("Amount") }}</td>
|
<td class="text-right">{{ _("Amount") }}</td>
|
||||||
@@ -239,10 +236,8 @@ print_heading_template=None) -%}
|
|||||||
alt="{{ item.item_name }}"
|
alt="{{ item.item_name }}"
|
||||||
style="
|
style="
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
max-height: 24px;
|
height: 24px;
|
||||||
min-height: 24px;
|
width: 24px !important;
|
||||||
max-width: 24px;
|
|
||||||
min-width: 24px;
|
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
"
|
"
|
||||||
@@ -258,6 +253,9 @@ print_heading_template=None) -%}
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
{% if item_naming_by != "Item Code" %}
|
||||||
|
<td class="text-left">{{ item.item_code }}</td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<td class="text-right">{{ item.get_formatted("qty", 0) }} {{ item.uom }}</td>
|
<td class="text-right">{{ item.get_formatted("qty", 0) }} {{ item.uom }}</td>
|
||||||
<td class="text-right">{{ item.get_formatted("net_rate", doc) }}</td>
|
<td class="text-right">{{ item.get_formatted("net_rate", doc) }}</td>
|
||||||
|
|||||||
@@ -236,18 +236,15 @@ print_heading_template=None) -%}
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- Items Table -->
|
<!-- Items Table -->
|
||||||
|
{% set item_naming_by = frappe.db.get_single_value("Stock Settings", "item_naming_by") %}
|
||||||
<table class="items-table mt-15" style="width: 100%">
|
<table class="items-table mt-15" style="width: 100%">
|
||||||
<colgroup>
|
|
||||||
<col style="width: 5%" />
|
|
||||||
<col style="width: 40%" />
|
|
||||||
<col style="width: 15%" />
|
|
||||||
<col style="width: 20%" />
|
|
||||||
<col style="width: 20%" />
|
|
||||||
</colgroup>
|
|
||||||
<thead class="table-header">
|
<thead class="table-header">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-center">{{ _("No") }}</td>
|
<td class="text-center">{{ _("No") }}</td>
|
||||||
<td class="text-left">{{ _("Item") }}</td>
|
<td class="text-left">{{ _("Item") }}</td>
|
||||||
|
{% if item_naming_by != "Item Code" %}
|
||||||
|
<td class="text-left">{{ _("Item Code") }}</td>
|
||||||
|
{% endif %}
|
||||||
<td class="text-right">{{ _("Quantity") }}</td>
|
<td class="text-right">{{ _("Quantity") }}</td>
|
||||||
<td class="text-right">{{ _("Rate") }}</td>
|
<td class="text-right">{{ _("Rate") }}</td>
|
||||||
<td class="text-right">{{ _("Amount") }}</td>
|
<td class="text-right">{{ _("Amount") }}</td>
|
||||||
@@ -258,6 +255,9 @@ print_heading_template=None) -%}
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="text-center text-dark">{{ loop.index }}</td>
|
<td class="text-center text-dark">{{ loop.index }}</td>
|
||||||
<td>{{ item.item_name }}</td>
|
<td>{{ item.item_name }}</td>
|
||||||
|
{% if item_naming_by != "Item Code" %}
|
||||||
|
<td class="text-left">{{ item.item_code }}</td>
|
||||||
|
{% endif %}
|
||||||
<td class="text-right text-dark">{{ item.get_formatted("qty", 0) }} {{ item.uom }}</td>
|
<td class="text-right text-dark">{{ item.get_formatted("qty", 0) }} {{ item.uom }}</td>
|
||||||
<td class="text-right text-dark">{{ item.get_formatted("net_rate", doc) }}</td>
|
<td class="text-right text-dark">{{ item.get_formatted("net_rate", doc) }}</td>
|
||||||
<td class="text-right" style="color: #171717">
|
<td class="text-right" style="color: #171717">
|
||||||
|
|||||||
Reference in New Issue
Block a user