mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
Merge branch 'version-12-hotfix' into email-camp-end-date-hotfix
This commit is contained in:
@@ -241,6 +241,7 @@ def get_pricing_rule_for_item(args, price_list_rate=0, doc=None, for_validate=Fa
|
|||||||
if pricing_rule.mixed_conditions or pricing_rule.apply_rule_on_other:
|
if pricing_rule.mixed_conditions or pricing_rule.apply_rule_on_other:
|
||||||
item_details.update({
|
item_details.update({
|
||||||
'apply_rule_on_other_items': json.dumps(pricing_rule.apply_rule_on_other_items),
|
'apply_rule_on_other_items': json.dumps(pricing_rule.apply_rule_on_other_items),
|
||||||
|
'price_or_product_discount': pricing_rule.price_or_product_discount,
|
||||||
'apply_rule_on': (frappe.scrub(pricing_rule.apply_rule_on_other)
|
'apply_rule_on': (frappe.scrub(pricing_rule.apply_rule_on_other)
|
||||||
if pricing_rule.apply_rule_on_other else frappe.scrub(pricing_rule.get('apply_on')))
|
if pricing_rule.apply_rule_on_other else frappe.scrub(pricing_rule.get('apply_on')))
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -643,8 +643,7 @@ def get_itemised_tax_breakup_html(doc):
|
|||||||
itemised_tax=itemised_tax,
|
itemised_tax=itemised_tax,
|
||||||
itemised_taxable_amount=itemised_taxable_amount,
|
itemised_taxable_amount=itemised_taxable_amount,
|
||||||
tax_accounts=tax_accounts,
|
tax_accounts=tax_accounts,
|
||||||
conversion_rate=doc.conversion_rate,
|
doc=doc
|
||||||
currency=doc.currency
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1374,7 +1374,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
me.frm.doc.items.forEach(d => {
|
me.frm.doc.items.forEach(d => {
|
||||||
if (in_list(data.apply_rule_on_other_items, d[data.apply_rule_on])) {
|
if (in_list(data.apply_rule_on_other_items, d[data.apply_rule_on])) {
|
||||||
for(var k in data) {
|
for(var k in data) {
|
||||||
if (in_list(fields, k) && data[k]) {
|
if (in_list(fields, k) && data[k] && (data.price_or_product_discount === 'price' || k === 'pricing_rules')) {
|
||||||
frappe.model.set_value(d.doctype, d.name, k, data[k]);
|
frappe.model.set_value(d.doctype, d.name, k, data[k]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,11 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{{ item }}</td>
|
<td>{{ item }}</td>
|
||||||
<td class='text-right'>
|
<td class='text-right'>
|
||||||
{{ frappe.utils.fmt_money(itemised_taxable_amount.get(item, 0), None, currency) }}
|
{% if doc.get('is_return') %}
|
||||||
|
{{ frappe.utils.fmt_money((itemised_taxable_amount.get(item, 0))|abs, None, doc.currency) }}
|
||||||
|
{% else %}
|
||||||
|
{{ frappe.utils.fmt_money(itemised_taxable_amount.get(item, 0), None, doc.currency) }}
|
||||||
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
{% for tax_account in tax_accounts %}
|
{% for tax_account in tax_accounts %}
|
||||||
{% set tax_details = taxes.get(tax_account) %}
|
{% set tax_details = taxes.get(tax_account) %}
|
||||||
@@ -25,7 +29,11 @@
|
|||||||
{% if tax_details.tax_rate or not tax_details.tax_amount %}
|
{% if tax_details.tax_rate or not tax_details.tax_amount %}
|
||||||
({{ tax_details.tax_rate }}%)
|
({{ tax_details.tax_rate }}%)
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ frappe.utils.fmt_money(tax_details.tax_amount / conversion_rate, None, currency) }}
|
{% if doc.get('is_return') %}
|
||||||
|
{{ frappe.utils.fmt_money((tax_details.tax_amount / doc.conversion_rate)|abs, None, doc.currency) }}
|
||||||
|
{% else %}
|
||||||
|
{{ frappe.utils.fmt_money(tax_details.tax_amount / doc.conversion_rate, None, doc.currency) }}
|
||||||
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td></td>
|
<td></td>
|
||||||
|
|||||||
Reference in New Issue
Block a user