mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
Merge branch 'wsgi' of https://github.com/webnotes/erpnext into i18n
Conflicts: accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js public/js/complete_setup.js selling/doctype/opportunity/opportunity.js selling/doctype/quotation/quotation.js
This commit is contained in:
@@ -55,7 +55,7 @@ def get_stock_ledger_entries(filters):
|
||||
from `tabStock Ledger Entry`"""
|
||||
|
||||
if filters.get("company"):
|
||||
query += """ and company=%(company)s"""
|
||||
query += """ where company=%(company)s"""
|
||||
|
||||
query += " order by item_code desc, warehouse desc, posting_date desc, posting_time desc, name desc"
|
||||
|
||||
|
||||
@@ -81,12 +81,12 @@ def get_tax_accounts(item_list, columns):
|
||||
if account_head not in tax_accounts:
|
||||
tax_accounts.append(account_head)
|
||||
|
||||
invoice = item_tax.setdefault(parent, {})
|
||||
if item_wise_tax_detail:
|
||||
try:
|
||||
item_wise_tax_detail = json.loads(item_wise_tax_detail)
|
||||
for item, tax_amount in item_wise_tax_detail.items():
|
||||
invoice.setdefault(item, {})[account_head] = flt(tax_amount)
|
||||
item_tax.setdefault(parent, {}).setdefault(item, {})[account_head] = \
|
||||
flt(tax_amount[1])
|
||||
|
||||
except ValueError:
|
||||
continue
|
||||
|
||||
@@ -9,7 +9,7 @@ def execute(filters=None):
|
||||
if not filters: filters = {}
|
||||
columns = get_columns()
|
||||
last_col = len(columns)
|
||||
|
||||
|
||||
item_list = get_items(filters)
|
||||
item_tax, tax_accounts = get_tax_accounts(item_list, columns)
|
||||
|
||||
@@ -21,7 +21,7 @@ def execute(filters=None):
|
||||
|
||||
for tax in tax_accounts:
|
||||
row.append(item_tax.get(d.parent, {}).get(d.item_code, {}).get(tax, 0))
|
||||
|
||||
|
||||
total_tax = sum(row[last_col:])
|
||||
row += [total_tax, d.amount + total_tax]
|
||||
|
||||
@@ -71,19 +71,19 @@ def get_tax_accounts(item_list, columns):
|
||||
tax_details = webnotes.conn.sql("""select parent, account_head, item_wise_tax_detail
|
||||
from `tabSales Taxes and Charges` where parenttype = 'Sales Invoice'
|
||||
and docstatus = 1 and ifnull(account_head, '') != ''
|
||||
and parent in (%s)""" % ', '.join(['%s']*len(item_list)), tuple([item.parent for item in item_list]))
|
||||
and parent in (%s)""" % ', '.join(['%s']*len(item_list)),
|
||||
tuple([item.parent for item in item_list]))
|
||||
|
||||
for parent, account_head, item_wise_tax_detail in tax_details:
|
||||
if account_head not in tax_accounts:
|
||||
tax_accounts.append(account_head)
|
||||
|
||||
invoice = item_tax.setdefault(parent, {})
|
||||
|
||||
if item_wise_tax_detail:
|
||||
try:
|
||||
item_wise_tax_detail = json.loads(item_wise_tax_detail)
|
||||
for item, tax_amount in item_wise_tax_detail.items():
|
||||
invoice.setdefault(item, {})[account_head] = flt(tax_amount)
|
||||
|
||||
item_tax.setdefault(parent, {}).setdefault(item, {})[account_head] = \
|
||||
flt(tax_amount[1])
|
||||
except ValueError:
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user