fix: test case and semicolons
This commit is contained in:
committed by
deepeshgarg007
parent
c552d74746
commit
4dacb89da6
@@ -5,7 +5,7 @@ frappe.ui.form.on("Sales Invoice", {
|
|||||||
filters: {
|
filters: {
|
||||||
'is_transporter': 1
|
'is_transporter': 1
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
frm.set_query('driver', function(doc) {
|
frm.set_query('driver', function(doc) {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ frappe.listview_settings['Sales Invoice'].onload = function (doclist) {
|
|||||||
frappe.msgprint(__("Please enable pop-ups")); return;
|
frappe.msgprint(__("Please enable pop-ups")); return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
doclist.page.add_actions_menu_item(__('Generate e-Way Bill JSON'), action, false);
|
doclist.page.add_actions_menu_item(__('Generate e-Way Bill JSON'), action, false);
|
||||||
};
|
};
|
||||||
@@ -608,7 +608,7 @@ def get_itemised_tax_breakup_data(doc):
|
|||||||
|
|
||||||
return itemised_tax, itemised_taxable_amount
|
return itemised_tax, itemised_taxable_amount
|
||||||
|
|
||||||
def get_itemised_tax(taxes):
|
def get_itemised_tax(taxes, with_tax_account=False):
|
||||||
itemised_tax = {}
|
itemised_tax = {}
|
||||||
for tax in taxes:
|
for tax in taxes:
|
||||||
if getattr(tax, "category", None) and tax.category=="Valuation":
|
if getattr(tax, "category", None) and tax.category=="Valuation":
|
||||||
@@ -630,10 +630,12 @@ def get_itemised_tax(taxes):
|
|||||||
|
|
||||||
itemised_tax[item_code][tax.description] = frappe._dict(dict(
|
itemised_tax[item_code][tax.description] = frappe._dict(dict(
|
||||||
tax_rate = tax_rate,
|
tax_rate = tax_rate,
|
||||||
tax_amount = tax_amount,
|
tax_amount = tax_amount
|
||||||
tax_account = tax.account_head
|
|
||||||
))
|
))
|
||||||
|
|
||||||
|
if with_tax_account:
|
||||||
|
itemised_tax[item_code][tax.description].tax_account = tax.account_head
|
||||||
|
|
||||||
return itemised_tax
|
return itemised_tax
|
||||||
|
|
||||||
def get_itemised_taxable_amount(items):
|
def get_itemised_taxable_amount(items):
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ def get_itemised_tax_breakup_header(item_doctype, tax_accounts):
|
|||||||
return [_("Item"), _("Taxable Amount")] + tax_accounts
|
return [_("Item"), _("Taxable Amount")] + tax_accounts
|
||||||
|
|
||||||
def get_itemised_tax_breakup_data(doc, account_wise=False):
|
def get_itemised_tax_breakup_data(doc, account_wise=False):
|
||||||
itemised_tax = get_itemised_tax(doc.taxes)
|
itemised_tax = get_itemised_tax(doc.taxes, with_tax_account=account_wise)
|
||||||
|
|
||||||
itemised_taxable_amount = get_itemised_taxable_amount(doc.items)
|
itemised_taxable_amount = get_itemised_taxable_amount(doc.items)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user