mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-18 12:39:18 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
@@ -115,6 +115,15 @@ wn.module_page["Buying"] = [
|
||||
"label":wn._("Requested Items To Be Ordered"),
|
||||
route: "query-report/Requested Items To Be Ordered",
|
||||
},
|
||||
{
|
||||
"label":wn._("Purchase Order Trends"),
|
||||
route: "query-report/Purchase Order Trends",
|
||||
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"
|
||||
}
|
||||
]
|
||||
0
buying/report/purchase_order_trends/__init__.py
Normal file
0
buying/report/purchase_order_trends/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
wn.require("app/js/purchase_trends_filters.js");
|
||||
|
||||
wn.query_reports["Purchase Order Trends"] = {
|
||||
filters: get_filters()
|
||||
}
|
||||
34
buying/report/purchase_order_trends/purchase_order_trends.py
Normal file
34
buying/report/purchase_order_trends/purchase_order_trends.py
Normal file
@@ -0,0 +1,34 @@
|
||||
# ERPNext - web based ERP (http://erpnext.com)
|
||||
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
from controllers.trends import get_columns,get_data
|
||||
|
||||
def execute(filters=None):
|
||||
if not filters: filters ={}
|
||||
data = []
|
||||
|
||||
trans = "Purchase Order"
|
||||
tab = ["tabPurchase Order","tabPurchase Order Item"]
|
||||
|
||||
details = get_columns(filters, trans)
|
||||
data = get_data(filters, tab, details)
|
||||
|
||||
if not data :
|
||||
webnotes.msgprint("Data not found for selected criterias")
|
||||
|
||||
return details["columns"], data
|
||||
@@ -0,0 +1,21 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-06-13 18:45:01",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-06-13 18:45:01",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"doctype": "Report",
|
||||
"is_standard": "Yes",
|
||||
"name": "__common__",
|
||||
"ref_doctype": "Purchase Order",
|
||||
"report_name": "Purchase Order Trends",
|
||||
"report_type": "Script Report"
|
||||
},
|
||||
{
|
||||
"doctype": "Report",
|
||||
"name": "Purchase Order Trends"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user