Merge pull request #518 from saurabh6790/master
[Report]Pending so Items for purchase receipt
This commit is contained in:
commit
ab01b5ee5d
@ -35,7 +35,7 @@ def get_columns(filters, trans):
|
||||
["Total(Qty):Float:120", "Total(Amt):Currency:120"]
|
||||
|
||||
conditions = {"based_on_select": based_on_details["based_on_select"], "period_wise_select": period_select,
|
||||
"columns": columns, "group_by": based_on_details["based_on_group_by"], "grbc": group_by_cols, "trans": trans,
|
||||
"columns": columns, "group_by": based_on_details["based_on_group_by"], "grbc": group_by_cols, "trans": trans,
|
||||
"addl_tables": based_on_details["addl_tables"]}
|
||||
|
||||
return conditions
|
||||
@ -72,8 +72,8 @@ def get_data(filters, conditions):
|
||||
else :
|
||||
inc = 1
|
||||
data1 = webnotes.conn.sql(""" select %s from `tab%s` t1, `tab%s Item` t2 %s
|
||||
where t2.parent = t1.name and t1.company = %s
|
||||
and t1.fiscal_year = %s and t1.docstatus = 1 %s
|
||||
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s and
|
||||
t1.docstatus = 1 %s
|
||||
group by %s
|
||||
""" % (query_details, conditions["trans"], conditions["trans"], conditions["addl_tables"], "%s",
|
||||
"%s", cond, conditions["group_by"]), (filters.get("company"),
|
||||
@ -115,8 +115,8 @@ def get_data(filters, conditions):
|
||||
data.append(des)
|
||||
else:
|
||||
data = webnotes.conn.sql(""" select %s from `tab%s` t1, `tab%s Item` t2 %s
|
||||
where t2.parent = t1.name and t1.company = %s
|
||||
and t1.fiscal_year = %s and t1.docstatus = 1 %s
|
||||
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s and
|
||||
t1.docstatus = 1 %s
|
||||
group by %s
|
||||
""" %
|
||||
(query_details, conditions["trans"], conditions["trans"], conditions["addl_tables"],
|
||||
|
@ -190,6 +190,10 @@ wn.module_page["Selling"] = [
|
||||
route: "query-report/Sales Order Trends",
|
||||
doctype: "Sales Order"
|
||||
},
|
||||
{
|
||||
"label":wn._("Pending SO Items For Purchase Request"),
|
||||
route: "query-report/Pending SO Items For Purchase Request"
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -0,0 +1,22 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-06-21 12:07:36",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-06-21 14:47:37",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"doctype": "Report",
|
||||
"is_standard": "Yes",
|
||||
"name": "__common__",
|
||||
"query": "select \n so_item.item_code as \"Item Code:Link/Item:120\",\n so_item.item_name as \"Item Name::120\",\n so_item.description as \"Description::120\",\n so.`name` as \"S.O. No.:Link/Sales Order:120\",\n so.`transaction_date` as \"S.O. Date:Date:120\",\n mr.name as \"Request ID:Link/Material Request:120\",\n so.customer as \"Customer:Link/Customer:120\",\n so.territory as \"Terretory:Link/Territory:120\",\n so_item.qty as \"S.O. Qty:Float:100 \",\n SUM(mr_item.qty) as \"Requested Qty:Float:100\"\nfrom\n `tabSales Order` so, `tabSales Order Item` so_item, \n `tabMaterial Request` mr, `tabMaterial Request Item` mr_item\nwhere\n so_item.`parent` = so.`name` and so.docstatus = 1 \n and so.status != \"Stopped\" and mr_item.parent = mr.name\n and mr.status != \"Stopped\" and mr.docstatus = 1\n and mr_item.sales_order_no = so.name\ngroup by so.name\norder by so_item.item_code asc, so.`transaction_date`",
|
||||
"ref_doctype": "Sales Order",
|
||||
"report_name": "Pending SO Items For Purchase Request",
|
||||
"report_type": "Query Report"
|
||||
},
|
||||
{
|
||||
"doctype": "Report",
|
||||
"name": "Pending SO Items For Purchase Request"
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user