fix: test case and semicolons

This commit is contained in:
Sagar Vora
2019-03-13 10:08:41 +05:30
committed by deepeshgarg007
parent c552d74746
commit 4dacb89da6
4 changed files with 8 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ frappe.ui.form.on("Sales Invoice", {
filters: {
'is_transporter': 1
}
}
};
});
frm.set_query('driver', function(doc) {

View File

@@ -27,7 +27,7 @@ frappe.listview_settings['Sales Invoice'].onload = function (doclist) {
frappe.msgprint(__("Please enable pop-ups")); return;
}
}
};
doclist.page.add_actions_menu_item(__('Generate e-Way Bill JSON'), action, false);
};

View File

@@ -608,7 +608,7 @@ def get_itemised_tax_breakup_data(doc):
return itemised_tax, itemised_taxable_amount
def get_itemised_tax(taxes):
def get_itemised_tax(taxes, with_tax_account=False):
itemised_tax = {}
for tax in taxes:
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(
tax_rate = tax_rate,
tax_amount = tax_amount,
tax_account = tax.account_head
tax_amount = tax_amount
))
if with_tax_account:
itemised_tax[item_code][tax.description].tax_account = tax.account_head
return itemised_tax
def get_itemised_taxable_amount(items):

View File

@@ -70,7 +70,7 @@ def get_itemised_tax_breakup_header(item_doctype, tax_accounts):
return [_("Item"), _("Taxable Amount")] + tax_accounts
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)