Merge pull request #30080 from deepeshgarg007/item_wise_sales_history

fix: Item-wise sales history report
This commit is contained in:
Deepesh Garg 2022-03-09 10:18:14 +05:30 committed by GitHub
commit 9be3bc1dbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,24 +156,24 @@ def get_data(filters):
customer_record = customer_details.get(record.customer) customer_record = customer_details.get(record.customer)
item_record = item_details.get(record.item_code) item_record = item_details.get(record.item_code)
row = { row = {
"item_code": record.item_code, "item_code": record.get('item_code'),
"item_name": item_record.item_name, "item_name": item_record.get('item_name'),
"item_group": item_record.item_group, "item_group": item_record.get('item_group'),
"description": record.description, "description": record.get('description'),
"quantity": record.qty, "quantity": record.get('qty'),
"uom": record.uom, "uom": record.get('uom'),
"rate": record.base_rate, "rate": record.get('base_rate'),
"amount": record.base_amount, "amount": record.get('base_amount'),
"sales_order": record.name, "sales_order": record.get('name'),
"transaction_date": record.transaction_date, "transaction_date": record.get('transaction_date'),
"customer": record.customer, "customer": record.get('customer'),
"customer_name": customer_record.customer_name, "customer_name": customer_record.get('customer_name'),
"customer_group": customer_record.customer_group, "customer_group": customer_record.get('customer_group'),
"territory": record.territory, "territory": record.get('territory'),
"project": record.project, "project": record.get('project'),
"delivered_quantity": flt(record.delivered_qty), "delivered_quantity": flt(record.get('delivered_qty')),
"billed_amount": flt(record.billed_amt), "billed_amount": flt(record.get('billed_amt')),
"company": record.company "company": record.get('company')
} }
data.append(row) data.append(row)