mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
[Report][Item-Wise Purchase Receipt]
This commit is contained in:
@@ -120,6 +120,10 @@ wn.module_page["Buying"] = [
|
|||||||
route: "query-report/Purchase Order Trends",
|
route: "query-report/Purchase Order Trends",
|
||||||
doctype: "Purchase Order"
|
doctype: "Purchase Order"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label":wn._("Item-wise Last Purchase Rate"),
|
||||||
|
route: "query-report/Item-wise Last Purchase Rate",
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"creation": "2013-06-18 11:24:36",
|
||||||
|
"docstatus": 0,
|
||||||
|
"modified": "2013-06-18 15:28:57",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"owner": "Administrator"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"doctype": "Report",
|
||||||
|
"is_standard": "Yes",
|
||||||
|
"name": "__common__",
|
||||||
|
"query": "select * from (select \n result.item_code as \"Item Code:Link/Item:120\",\n result.item_name as \"Item Name::120\",\n result.description as \"Description::150\",\n result.posting_date as \"Date::150\",\n result.purchase_ref_rate as \"Price List Rate::180\", \n result.discount_rate as \"Discount::120\", \n result.purchase_rate as \"Rate::120\"\nfrom (\n (select \n po_item.item_code,\n po_item.item_name,\n po_item.description,\n po.transaction_date as posting_date,\n po_item.purchase_ref_rate, \n po_item.discount_rate, \n po_item.purchase_rate\n from `tabPurchase Order` po, `tabPurchase Order Item` po_item\n where po.name = po_item.parent and po.docstatus = 1)\n union\n (select \n pr_item.item_code,\n pr_item.item_name,\n pr_item.description,\n pr.posting_date,\n pr_item.purchase_ref_rate,\n pr_item.discount_rate,\n pr_item.purchase_rate\n from `tabPurchase Receipt` pr, `tabPurchase Receipt Item` pr_item\n where pr.name = pr_item.parent and pr.docstatus = 1)\n) result\norder by result.item_code asc, result.posting_date desc) result_wrapper\ngroup by `Item Code:Link/Item:120`\n",
|
||||||
|
"ref_doctype": "Purchase Order",
|
||||||
|
"report_name": "Item-wise Last Purchase Rate",
|
||||||
|
"report_type": "Query Report"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"doctype": "Report",
|
||||||
|
"name": "Item-wise Last Purchase Rate"
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -224,13 +224,13 @@ def basedon_wise_colums_query(based_on, trans):
|
|||||||
bon = ["Supplier:Link/Supplier:120", "Supplier Type:Link/Supplier Type:120"]
|
bon = ["Supplier:Link/Supplier:120", "Supplier Type:Link/Supplier Type:120"]
|
||||||
query_details = "t1.supplier, t3.supplier_type,"
|
query_details = "t1.supplier, t3.supplier_type,"
|
||||||
basedon = 't1.supplier'
|
basedon = 't1.supplier'
|
||||||
sup_tab = ',`tabSupplier` t3'
|
sup_tab = '`tabSupplier` t3',
|
||||||
|
|
||||||
elif based_on == 'Supplier Type':
|
elif based_on == 'Supplier Type':
|
||||||
bon = ["Supplier Type:Link/Supplier Type:120"]
|
bon = ["Supplier Type:Link/Supplier Type:120"]
|
||||||
query_details = "t3.supplier_type,"
|
query_details = "t3.supplier_type,"
|
||||||
basedon = 't3.supplier_type'
|
basedon = 't3.supplier_type'
|
||||||
sup_tab = ',`tabSupplier` t3'
|
sup_tab ='`tabSupplier` t3',
|
||||||
|
|
||||||
elif based_on == "Territory":
|
elif based_on == "Territory":
|
||||||
bon = ["Territory:Link/Territory:120"]
|
bon = ["Territory:Link/Territory:120"]
|
||||||
|
|||||||
Reference in New Issue
Block a user