Merge pull request #5292 from neilLasrado/sales_purchase_register
Itemwise purchase and Itemwise sales
This commit is contained in:
commit
abfcefb52f
@ -126,9 +126,9 @@ def get_tax_accounts(item_list, columns):
|
|||||||
for d in item_row_map.get(parent, {}).get(item_code, [])])
|
for d in item_row_map.get(parent, {}).get(item_code, [])])
|
||||||
|
|
||||||
for d in item_row_map.get(parent, {}).get(item_code, []):
|
for d in item_row_map.get(parent, {}).get(item_code, []):
|
||||||
item_row_tax.setdefault(d.name, {})[account_head] = \
|
item_tax_amount = flt((tax_amount * d.base_net_amount) / item_net_amount) if item_net_amount else 0
|
||||||
flt((tax_amount * d.base_net_amount) / item_net_amount)
|
item_row_tax.setdefault(d.name, {})[account_head] = item_tax_amount
|
||||||
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
continue
|
continue
|
||||||
elif charge_type == "Actual" and tax_amount:
|
elif charge_type == "Actual" and tax_amount:
|
||||||
|
@ -116,14 +116,14 @@ def get_tax_accounts(item_list, columns):
|
|||||||
|
|
||||||
for item_code, tax_amount in item_wise_tax_detail.items():
|
for item_code, tax_amount in item_wise_tax_detail.items():
|
||||||
tax_amount = flt(tax_amount[1]) if isinstance(tax_amount, list) else flt(tax_amount)
|
tax_amount = flt(tax_amount[1]) if isinstance(tax_amount, list) else flt(tax_amount)
|
||||||
|
|
||||||
item_net_amount = sum([flt(d.base_net_amount)
|
item_net_amount = sum([flt(d.base_net_amount)
|
||||||
for d in item_row_map.get(parent, {}).get(item_code, [])])
|
for d in item_row_map.get(parent, {}).get(item_code, [])])
|
||||||
|
|
||||||
for d in item_row_map.get(parent, {}).get(item_code, []):
|
for d in item_row_map.get(parent, {}).get(item_code, []):
|
||||||
item_row_tax.setdefault(d.name, {})[account_head] = \
|
item_tax_amount = flt((tax_amount * d.base_net_amount) / item_net_amount) if item_net_amount else 0
|
||||||
flt((tax_amount * d.base_net_amount) / item_net_amount)
|
item_row_tax.setdefault(d.name, {})[account_head] = item_tax_amount
|
||||||
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
continue
|
continue
|
||||||
elif charge_type == "Actual" and tax_amount:
|
elif charge_type == "Actual" and tax_amount:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user