[Fix] Incorrect rate in item-wise sales register (#12943)
This commit is contained in:
parent
5a947f38ab
commit
103c4e9b92
@ -50,10 +50,12 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
|
|||||||
row += [
|
row += [
|
||||||
d.customer_group, d.debit_to, ", ".join(mode_of_payments.get(d.parent, [])),
|
d.customer_group, d.debit_to, ", ".join(mode_of_payments.get(d.parent, [])),
|
||||||
d.territory, d.project, d.company, d.sales_order,
|
d.territory, d.project, d.company, d.sales_order,
|
||||||
delivery_note, d.income_account, d.cost_center, d.stock_qty, d.stock_uom,
|
delivery_note, d.income_account, d.cost_center, d.stock_qty, d.stock_uom
|
||||||
d.base_net_rate, d.base_net_amount
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
row += [d.base_net_rate/d.stock_qty, d.base_net_amount] \
|
||||||
|
if d.stock_uom != d.uom else [d.base_net_rate, d.base_net_amount]
|
||||||
|
|
||||||
total_tax = 0
|
total_tax = 0
|
||||||
for tax in tax_columns:
|
for tax in tax_columns:
|
||||||
item_tax = itemised_tax.get(d.name, {}).get(tax, {})
|
item_tax = itemised_tax.get(d.name, {}).get(tax, {})
|
||||||
@ -131,7 +133,7 @@ def get_items(filters, additional_query_columns):
|
|||||||
`tabSales Invoice Item`.stock_uom, `tabSales Invoice Item`.base_net_rate,
|
`tabSales Invoice Item`.stock_uom, `tabSales Invoice Item`.base_net_rate,
|
||||||
`tabSales Invoice Item`.base_net_amount, `tabSales Invoice`.customer_name,
|
`tabSales Invoice Item`.base_net_amount, `tabSales Invoice`.customer_name,
|
||||||
`tabSales Invoice`.customer_group, `tabSales Invoice Item`.so_detail,
|
`tabSales Invoice`.customer_group, `tabSales Invoice Item`.so_detail,
|
||||||
`tabSales Invoice`.update_stock {0}
|
`tabSales Invoice`.update_stock, `tabSales Invoice Item`.uom {0}
|
||||||
from `tabSales Invoice`, `tabSales Invoice Item`
|
from `tabSales Invoice`, `tabSales Invoice Item`
|
||||||
where `tabSales Invoice`.name = `tabSales Invoice Item`.parent
|
where `tabSales Invoice`.name = `tabSales Invoice Item`.parent
|
||||||
and `tabSales Invoice`.docstatus = 1 %s %s
|
and `tabSales Invoice`.docstatus = 1 %s %s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user