mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 03:09:09 +00:00
Merge branch 'master' of github.com:webnotes/erpnext into responsive
Conflicts: accounts/search_criteria/trend_analyzer/trend_analyzer.py buying/doctype/purchase_common/purchase_common.js
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-01-29 19:25:41",
|
||||
"creation": "2013-05-16 10:59:15",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-01-29 16:27:57",
|
||||
"modified": "2013-06-20 11:23:01",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"allow_attach": 1,
|
||||
"allow_rename": 1,
|
||||
"allow_rename": 0,
|
||||
"autoname": "field:serial_no",
|
||||
"description": "Distinct unit of an Item",
|
||||
"doctype": "DocType",
|
||||
@@ -31,7 +31,9 @@
|
||||
"parent": "Serial No",
|
||||
"parentfield": "permissions",
|
||||
"parenttype": "DocType",
|
||||
"permlevel": 0,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"submit": 0
|
||||
},
|
||||
{
|
||||
@@ -43,12 +45,14 @@
|
||||
"fieldname": "details",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Details",
|
||||
"oldfieldtype": "Section Break"
|
||||
"oldfieldtype": "Section Break",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break0",
|
||||
"fieldtype": "Column Break"
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"default": "In Store",
|
||||
@@ -75,6 +79,7 @@
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "serial_no",
|
||||
"oldfieldtype": "Data",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
@@ -88,13 +93,15 @@
|
||||
"oldfieldname": "item_code",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Item",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break1",
|
||||
"fieldtype": "Column Break"
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@@ -146,12 +153,14 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "purchase_details",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Purchase Details"
|
||||
"label": "Purchase Details",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break2",
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@@ -160,7 +169,8 @@
|
||||
"fieldtype": "Select",
|
||||
"label": "Purchase Document Type",
|
||||
"no_copy": 1,
|
||||
"options": "\nPurchase Receipt\nStock Entry"
|
||||
"options": "\nPurchase Receipt\nStock Entry",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@@ -168,7 +178,8 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"label": "Purchase Document No",
|
||||
"no_copy": 1
|
||||
"no_copy": 1,
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@@ -179,6 +190,7 @@
|
||||
"no_copy": 1,
|
||||
"oldfieldname": "purchase_date",
|
||||
"oldfieldtype": "Date",
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0
|
||||
},
|
||||
@@ -188,6 +200,7 @@
|
||||
"fieldtype": "Time",
|
||||
"label": "Incoming Time",
|
||||
"no_copy": 1,
|
||||
"read_only": 0,
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
@@ -200,6 +213,7 @@
|
||||
"oldfieldname": "purchase_rate",
|
||||
"oldfieldtype": "Currency",
|
||||
"options": "Company:company:default_currency",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0
|
||||
},
|
||||
@@ -207,6 +221,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break3",
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@@ -220,6 +235,7 @@
|
||||
"oldfieldname": "warehouse",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Warehouse",
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 1
|
||||
},
|
||||
@@ -230,7 +246,8 @@
|
||||
"in_filter": 1,
|
||||
"label": "Supplier",
|
||||
"no_copy": 1,
|
||||
"options": "Supplier"
|
||||
"options": "Supplier",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@@ -254,12 +271,14 @@
|
||||
"fieldname": "delivery_details",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Delivery Details",
|
||||
"oldfieldtype": "Column Break"
|
||||
"oldfieldtype": "Column Break",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break4",
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@@ -318,12 +337,14 @@
|
||||
"oldfieldname": "is_cancelled",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nYes\nNo",
|
||||
"read_only": 0,
|
||||
"report_hide": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break5",
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@@ -378,12 +399,14 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "warranty_amc_details",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Warranty / AMC Details"
|
||||
"label": "Warranty / AMC Details",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break6",
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@@ -396,6 +419,7 @@
|
||||
"oldfieldname": "maintenance_status",
|
||||
"oldfieldtype": "Select",
|
||||
"options": "\nUnder Warranty\nOut of Warranty\nUnder AMC\nOut of AMC",
|
||||
"read_only": 0,
|
||||
"search_index": 1,
|
||||
"width": "150px"
|
||||
},
|
||||
@@ -406,12 +430,14 @@
|
||||
"label": "Warranty Period (Days)",
|
||||
"oldfieldname": "warranty_period",
|
||||
"oldfieldtype": "Int",
|
||||
"read_only": 0,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break7",
|
||||
"fieldtype": "Column Break",
|
||||
"read_only": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
@@ -422,6 +448,7 @@
|
||||
"label": "Warranty Expiry Date",
|
||||
"oldfieldname": "warranty_expiry_date",
|
||||
"oldfieldtype": "Date",
|
||||
"read_only": 0,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
@@ -432,6 +459,7 @@
|
||||
"label": "AMC Expiry Date",
|
||||
"oldfieldname": "amc_expiry_date",
|
||||
"oldfieldtype": "Date",
|
||||
"read_only": 0,
|
||||
"search_index": 0,
|
||||
"width": "150px"
|
||||
},
|
||||
@@ -439,13 +467,15 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "more_info",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "More Info"
|
||||
"label": "More Info",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "serial_no_details",
|
||||
"fieldtype": "Text Editor",
|
||||
"label": "Serial No Details"
|
||||
"label": "Serial No Details",
|
||||
"read_only": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
@@ -454,6 +484,7 @@
|
||||
"in_filter": 1,
|
||||
"label": "Company",
|
||||
"options": "link:Company",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
@@ -464,6 +495,7 @@
|
||||
"in_filter": 1,
|
||||
"label": "Fiscal Year",
|
||||
"options": "link:Fiscal Year",
|
||||
"read_only": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
@@ -487,54 +519,10 @@
|
||||
"read_only": 1,
|
||||
"report_hide": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"match": "",
|
||||
"permlevel": 1,
|
||||
"report": 0,
|
||||
"role": "Material Manager",
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"report": 1,
|
||||
"role": "Material Manager",
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"match": "",
|
||||
"permlevel": 1,
|
||||
"report": 0,
|
||||
"role": "Material User",
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"report": 1,
|
||||
"role": "Material User",
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"report": 1,
|
||||
"role": "System Manager",
|
||||
"write": 1
|
||||
},
|
||||
@@ -542,8 +530,6 @@
|
||||
"cancel": 1,
|
||||
"create": 1,
|
||||
"doctype": "DocPerm",
|
||||
"permlevel": 0,
|
||||
"report": 1,
|
||||
"role": "Material Master Manager",
|
||||
"write": 1
|
||||
},
|
||||
@@ -552,17 +538,15 @@
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"match": "",
|
||||
"permlevel": 1,
|
||||
"role": "System Manager"
|
||||
"role": "Material Manager",
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"doctype": "DocPerm",
|
||||
"match": "",
|
||||
"permlevel": 1,
|
||||
"role": "Sales Master Manager"
|
||||
"role": "Material User",
|
||||
"write": 0
|
||||
}
|
||||
]
|
||||
@@ -223,6 +223,16 @@ wn.module_page["Stock"] = [
|
||||
route: "query-report/Itemwise Recommended Reorder Level",
|
||||
doctype: "Item"
|
||||
},
|
||||
{
|
||||
"label":wn._("Delivery Note Trends"),
|
||||
route: "query-report/Delivery Note Trends",
|
||||
doctype: "Delivery Note"
|
||||
},
|
||||
{
|
||||
"label":wn._("Purchase Receipt Trends"),
|
||||
route: "query-report/Purchase Receipt Trends",
|
||||
doctype: "Purchase Receipt"
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
0
stock/report/delivery_note_trends/__init__.py
Normal file
0
stock/report/delivery_note_trends/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
wn.require("app/js/sales_trends_filters.js");
|
||||
|
||||
wn.query_reports["Delivery Note Trends"] = {
|
||||
filters: get_filters()
|
||||
}
|
||||
34
stock/report/delivery_note_trends/delivery_note_trends.py
Normal file
34
stock/report/delivery_note_trends/delivery_note_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 = "Delivery Note"
|
||||
tab = ["tabDelivery Note","tabDelivery Note 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
|
||||
21
stock/report/delivery_note_trends/delivery_note_trends.txt
Normal file
21
stock/report/delivery_note_trends/delivery_note_trends.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-06-13 18:42:11",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-06-13 18:42:11",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"doctype": "Report",
|
||||
"is_standard": "Yes",
|
||||
"name": "__common__",
|
||||
"ref_doctype": "Delivery Note",
|
||||
"report_name": "Delivery Note Trends",
|
||||
"report_type": "Script Report"
|
||||
},
|
||||
{
|
||||
"doctype": "Report",
|
||||
"name": "Delivery Note Trends"
|
||||
}
|
||||
]
|
||||
@@ -69,10 +69,11 @@ def get_price_list():
|
||||
from `tabItem Price` where docstatus<2""", as_dict=1)
|
||||
|
||||
for j in price_list:
|
||||
if j.selling:
|
||||
rate.setdefault(j.parent, {}).setdefault("selling", []).append(j.price)
|
||||
if j.buying:
|
||||
rate.setdefault(j.parent, {}).setdefault("buying", []).append(j.price)
|
||||
if j.price:
|
||||
if j.selling:
|
||||
rate.setdefault(j.parent, {}).setdefault("selling", []).append(j.price)
|
||||
if j.buying:
|
||||
rate.setdefault(j.parent, {}).setdefault("buying", []).append(j.price)
|
||||
|
||||
item_rate_map = {}
|
||||
|
||||
@@ -99,8 +100,9 @@ def get_valuation_rate():
|
||||
|
||||
val_rate_map = {}
|
||||
|
||||
for d in webnotes.conn.sql("""select item_code, avg(valuation_rate) as val_rate
|
||||
from tabBin group by item_code""", as_dict=1):
|
||||
for d in webnotes.conn.sql("""select item_code,
|
||||
sum(actual_qty*valuation_rate)/sum(actual_qty) as val_rate
|
||||
from tabBin where actual_qty > 0 group by item_code""", as_dict=1):
|
||||
val_rate_map.setdefault(d.item_code, d.val_rate)
|
||||
|
||||
return val_rate_map
|
||||
0
stock/report/purchase_receipt_trends/__init__.py
Normal file
0
stock/report/purchase_receipt_trends/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
wn.require("app/js/purchase_trends_filters.js");
|
||||
|
||||
wn.query_reports["Purchase Receipt Trends"] = {
|
||||
filters: get_filters()
|
||||
}
|
||||
@@ -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 Receipt"
|
||||
tab = ["tabPurchase Receipt","tabPurchase Receipt 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:44",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-06-13 18:45:44",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"doctype": "Report",
|
||||
"is_standard": "Yes",
|
||||
"name": "__common__",
|
||||
"ref_doctype": "Purchase Receipt",
|
||||
"report_name": "Purchase Receipt Trends",
|
||||
"report_type": "Script Report"
|
||||
},
|
||||
{
|
||||
"doctype": "Report",
|
||||
"name": "Purchase Receipt Trends"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user