In standard print format, item name will now honour 'Print Hide' property
This commit is contained in:
parent
065badc54b
commit
8908543a9c
@ -101,7 +101,6 @@ def round_off_debit_credit(gl_map):
|
|||||||
debit_credit_diff += entry.debit - entry.credit
|
debit_credit_diff += entry.debit - entry.credit
|
||||||
|
|
||||||
debit_credit_diff = flt(debit_credit_diff, precision)
|
debit_credit_diff = flt(debit_credit_diff, precision)
|
||||||
print debit_credit_diff, 1.0 / (10**precision)
|
|
||||||
if abs(debit_credit_diff) >= (2.0 / (10**precision)):
|
if abs(debit_credit_diff) >= (2.0 / (10**precision)):
|
||||||
frappe.throw(_("Debit and Credit not equal for {0} #{1}. Difference is {2}.")
|
frappe.throw(_("Debit and Credit not equal for {0} #{1}. Difference is {2}.")
|
||||||
.format(gl_map[0].voucher_type, gl_map[0].voucher_no, debit_credit_diff))
|
.format(gl_map[0].voucher_type, gl_map[0].voucher_no, debit_credit_diff))
|
||||||
|
@ -183,8 +183,6 @@ class GrossProfitGenerator(object):
|
|||||||
my_sle = self.sle.get((item_code, row.warehouse))
|
my_sle = self.sle.get((item_code, row.warehouse))
|
||||||
for i, sle in enumerate(my_sle):
|
for i, sle in enumerate(my_sle):
|
||||||
# find the stock valution rate from stock ledger entry
|
# find the stock valution rate from stock ledger entry
|
||||||
print sle.voucher_type, row.parenttype, sle.voucher_no, row.parent, \
|
|
||||||
sle.voucher_detail_no, row.item_row
|
|
||||||
if sle.voucher_type == row.parenttype and row.parent == sle.voucher_no and \
|
if sle.voucher_type == row.parenttype and row.parent == sle.voucher_no and \
|
||||||
sle.voucher_detail_no == row.item_row:
|
sle.voucher_detail_no == row.item_row:
|
||||||
previous_stock_value = len(my_sle) > i+1 and \
|
previous_stock_value = len(my_sle) > i+1 and \
|
||||||
|
@ -31,7 +31,7 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"type": "help",
|
"type": "help",
|
||||||
"label": _("Opening Stock Balance"),
|
"label": _("Opening Stock Balance"),
|
||||||
"youtube_id": "yPgrtfeCTs"
|
"youtube_id": "0yPgrtfeCTs"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "help",
|
"type": "help",
|
||||||
@ -106,7 +106,7 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"type": "help",
|
"type": "help",
|
||||||
"label": _("Opening Stock Balance"),
|
"label": _("Opening Stock Balance"),
|
||||||
"youtube_id": "yPgrtfeCTs"
|
"youtube_id": "0yPgrtfeCTs"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "help",
|
"type": "help",
|
||||||
|
@ -266,7 +266,7 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"type": "help",
|
"type": "help",
|
||||||
"label": _("Opening Stock Balance"),
|
"label": _("Opening Stock Balance"),
|
||||||
"youtube_id": "yPgrtfeCTs"
|
"youtube_id": "0yPgrtfeCTs"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "help",
|
"type": "help",
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
{% if doc.in_format_data("item_code") and not doc.is_print_hide("item_code") -%}
|
{% if doc.in_format_data("item_code") and not doc.is_print_hide("item_code") -%}
|
||||||
<div class="primary">{{ doc.item_code }}</div>
|
<div class="primary">{{ doc.item_code }}</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% if (doc.in_format_data("item_name") and
|
{% if (doc.in_format_data("item_name") and not doc.is_print_hide("item_name") and
|
||||||
(not doc.in_format_data("item_code") or doc.is_print_hide("item_code")
|
(not doc.in_format_data("item_code") or doc.is_print_hide("item_code")
|
||||||
or doc.item_code != doc.item_name)) -%}
|
or doc.item_code != doc.item_name)) -%}
|
||||||
<div class="primary">{{ doc.get_formatted("item_name") }}</div>
|
<div class="primary">{{ doc.get_formatted("item_name") }}</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user