[Pending so Items for purchase receipt]
This commit is contained in:
parent
7989deda20
commit
36cb3caaa7
@ -72,8 +72,8 @@ def get_data(filters, conditions):
|
|||||||
else :
|
else :
|
||||||
inc = 1
|
inc = 1
|
||||||
data1 = webnotes.conn.sql(""" select %s from `tab%s` t1, `tab%s Item` t2 %s
|
data1 = webnotes.conn.sql(""" select %s from `tab%s` t1, `tab%s Item` t2 %s
|
||||||
where t2.parent = t1.name and t1.company = %s
|
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s and
|
||||||
and t1.fiscal_year = %s and t1.docstatus = 1 %s
|
t1.docstatus = 1 %s
|
||||||
group by %s
|
group by %s
|
||||||
""" % (query_details, conditions["trans"], conditions["trans"], conditions["addl_tables"], "%s",
|
""" % (query_details, conditions["trans"], conditions["trans"], conditions["addl_tables"], "%s",
|
||||||
"%s", cond, conditions["group_by"]), (filters.get("company"),
|
"%s", cond, conditions["group_by"]), (filters.get("company"),
|
||||||
@ -110,10 +110,9 @@ def get_data(filters, conditions):
|
|||||||
|
|
||||||
data.append(des)
|
data.append(des)
|
||||||
else:
|
else:
|
||||||
webnotes.errprint(["hii", conditions["addl_tables"]])
|
|
||||||
data = webnotes.conn.sql(""" select %s from `tab%s` t1, `tab%s Item` t2 %s
|
data = webnotes.conn.sql(""" select %s from `tab%s` t1, `tab%s Item` t2 %s
|
||||||
where t2.parent = t1.name and t1.company = %s
|
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s and
|
||||||
and t1.fiscal_year = %s and t1.docstatus = 1 %s
|
t1.docstatus = 1 %s
|
||||||
group by %s
|
group by %s
|
||||||
"""%(query_details, conditions["trans"], conditions["trans"], conditions["addl_tables"], "%s",
|
"""%(query_details, conditions["trans"], conditions["trans"], conditions["addl_tables"], "%s",
|
||||||
"%s", cond,conditions["group_by"]), (filters.get("company"),
|
"%s", cond,conditions["group_by"]), (filters.get("company"),
|
||||||
|
@ -190,6 +190,10 @@ wn.module_page["Selling"] = [
|
|||||||
route: "query-report/Sales Order Trends",
|
route: "query-report/Sales Order Trends",
|
||||||
doctype: "Sales Order"
|
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