Merge branch 'hotfix'
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 85ac910..2d1a24d 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
-__version__ = '7.1.20'
+__version__ = '7.1.21'
def get_default_company(user=None):
'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
index ccdd87f..4ac81b1 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -198,7 +198,7 @@
item_fields_stock = ['warehouse_section', 'received_qty', 'rejected_qty'];
cur_frm.fields_dict['items'].grid.set_column_disp(item_fields_stock,
- (cint(doc.update_stock)==1 ? true : false));
+ (cint(doc.update_stock)==1 || cint(doc.is_return)==1 ? true : false));
cur_frm.refresh_fields();
}
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 5609fce..57e0faa 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -307,7 +307,7 @@
item_fields_stock = ['serial_no', 'batch_no', 'actual_qty', 'expense_account', 'warehouse', 'expense_account', 'warehouse']
cur_frm.fields_dict['items'].grid.set_column_disp(item_fields_stock,
- (cint(doc.update_stock)==1 ? true : false));
+ (cint(doc.update_stock)==1 || cint(doc.is_return)==1 ? true : false));
// India related fields
if (frappe.boot.sysdefaults.country == 'India') unhide_field(['c_form_applicable', 'c_form_no']);
diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py
index a51e2b5..a0a718e 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.py
+++ b/erpnext/hr/doctype/leave_application/leave_application.py
@@ -38,6 +38,7 @@
self.validate_block_days()
self.validate_salary_processed_days()
self.validate_leave_approver()
+ self.validate_attendance()
def on_update(self):
if (not self.previous_doc and self.leave_approver) or (self.previous_doc and \
@@ -102,7 +103,7 @@
last_processed_pay_slip = frappe.db.sql("""
select start_date, end_date from `tabSalary Slip`
- where docstatus != 2 and employee = %s
+ where docstatus = 1 and employee = %s
and ((%s between start_date and end_date) or (%s between start_date and end_date))
order by modified desc limit 1
""",(self.employee, self.to_date, self.from_date))
@@ -212,6 +213,13 @@
elif self.docstatus==1 and len(leave_approvers) and self.leave_approver != frappe.session.user:
frappe.throw(_("Only the selected Leave Approver can submit this Leave Application"),
LeaveApproverIdentityError)
+
+ def validate_attendance(self):
+ attendance = frappe.db.sql("""select name from `tabAttendance` where employee = %s and (att_date between %s and %s)
+ and docstatus = 1""",
+ (self.employee, self.from_date, self.to_date))
+ if attendance:
+ frappe.throw(_("Attendance for employee {0} is already marked for this day").format(self.employee))
def notify_employee(self, status):
employee = frappe.get_doc("Employee", self.employee)
diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.js b/erpnext/hr/doctype/process_payroll/process_payroll.js
index 2ab6aef..35c097a 100644
--- a/erpnext/hr/doctype/process_payroll/process_payroll.js
+++ b/erpnext/hr/doctype/process_payroll/process_payroll.js
@@ -43,6 +43,16 @@
}
})
}
+ },
+ account: function(frm) {
+ var account_types = ["Bank", "Cash"];
+ return {
+ filters: {
+ "account_type": ["in", account_types],
+ "is_group": 0,
+ "company": frm.doc.company
+ }
+ }
}
})
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.js b/erpnext/hr/doctype/salary_slip/salary_slip.js
index bb27a42..e1120e8 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.js
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.js
@@ -114,22 +114,15 @@
}
cur_frm.cscript.amount = function(doc,dt,dn){
- calculate_earning_total(doc, dt, dn);
- calculate_net_pay(doc, dt, dn);
+ var child = locals[dt][dn];
+ if(!doc.salary_structure){
+ frappe.model.set_value(dt,dn, "default_amount", child.amount)
+ }
+ calculate_all(doc, dt, dn);
}
cur_frm.cscript.depends_on_lwp = function(doc,dt,dn){
calculate_earning_total(doc, dt, dn, true);
- calculate_net_pay(doc, dt, dn);
-}
-// Trigger on earning modified amount and depends on lwp
-// ------------------------------------------------------------------------
-cur_frm.cscript.amount = function(doc,dt,dn){
- calculate_ded_total(doc, dt, dn);
- calculate_net_pay(doc, dt, dn);
-}
-
-cur_frm.cscript.depends_on_lwp = function(doc, dt, dn) {
calculate_ded_total(doc, dt, dn, true);
calculate_net_pay(doc, dt, dn);
};
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py
index 1bceff7..34022bd 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.py
@@ -10,7 +10,6 @@
from frappe import msgprint, _
from erpnext.accounts.utils import get_fiscal_year
from erpnext.setup.utils import get_company_currency
-from erpnext.hr.utils import set_employee_name
from erpnext.hr.doctype.process_payroll.process_payroll import get_month_details
from erpnext.hr.doctype.employee.employee import get_holiday_list_for_employee
from erpnext.utilities.transaction_base import TransactionBase
@@ -84,6 +83,7 @@
if d.amount_based_on_formula:
if d.formula:
amount = eval(d.formula, None, data)
+ if amount:
data[d.abbr] = amount
return amount
@@ -230,10 +230,15 @@
if working_days < 0:
frappe.throw(_("There are more holidays than working days this month."))
+ actual_lwp = self.calculate_lwp(holidays, working_days)
if not lwp:
- lwp = self.calculate_lwp(holidays, working_days)
+ lwp = actual_lwp
+ elif lwp != actual_lwp:
+ frappe.msgprint(_("Leave Without Pay does not match with approved Leave Application records"))
+
self.total_days_in_month = working_days
self.leave_without_pay = lwp
+
payment_days = flt(self.get_payment_days(joining_date, relieving_date)) - flt(lwp)
self.payment_days = payment_days > 0 and payment_days or 0
@@ -315,7 +320,7 @@
def sum_components(self, component_type, total_field):
for d in self.get(component_type):
if cint(d.depends_on_lwp) == 1 and not self.salary_slip_based_on_timesheet:
- d.amount = rounded((flt(d.amount) * flt(self.payment_days)
+ d.amount = rounded((flt(d.default_amount) * flt(self.payment_days)
/ cint(self.total_days_in_month)), self.precision("amount", component_type))
elif not self.payment_days and not self.salary_slip_based_on_timesheet:
d.amount = 0
diff --git a/erpnext/hr/doctype/salary_slip/test_salary_slip.py b/erpnext/hr/doctype/salary_slip/test_salary_slip.py
index 8cf0688..57a3711 100644
--- a/erpnext/hr/doctype/salary_slip/test_salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/test_salary_slip.py
@@ -55,8 +55,8 @@
ss = frappe.get_doc("Salary Slip",
self.make_employee_salary_slip("test_employee@salary.com"))
- self.assertEquals(ss.total_days_in_month, 27)
- self.assertEquals(ss.payment_days, 27)
+ self.assertEquals(ss.total_days_in_month, 28)
+ self.assertEquals(ss.payment_days, 28)
self.assertEquals(ss.earnings[0].amount, 5000)
self.assertEquals(ss.earnings[0].default_amount, 5000)
self.assertEquals(ss.earnings[1].amount, 3000)
@@ -76,23 +76,23 @@
ss = frappe.get_doc("Salary Slip",
self.make_employee_salary_slip("test_employee@salary.com"))
- self.assertEquals(ss.total_days_in_month, 27)
- self.assertEquals(ss.payment_days, 27)
+ self.assertEquals(ss.total_days_in_month, 28)
+ self.assertEquals(ss.payment_days, 28)
# set relieving date in the same month
frappe.db.set_value("Employee", frappe.get_value("Employee", {"employee_name":"test_employee@salary.com"}, "name"), "relieving_date", "12-12-2016")
frappe.db.set_value("Employee", frappe.get_value("Employee", {"employee_name":"test_employee@salary.com"}, "name"), "status", "Left")
- self.assertEquals(ss.total_days_in_month, 27)
- self.assertEquals(ss.payment_days, 27)
+ self.assertEquals(ss.total_days_in_month, 28)
+ self.assertEquals(ss.payment_days, 28)
ss.save()
frappe.db.set_value("Employee", frappe.get_value("Employee", {"employee_name":"test_employee@salary.com"}, "name"), "relieving_date", None)
frappe.db.set_value("Employee", frappe.get_value("Employee", {"employee_name":"test_employee@salary.com"}, "name"), "status", "Active")
# Holidays included in working days
frappe.db.set_value("HR Settings", None, "include_holidays_in_total_working_days", 1)
- self.assertEquals(ss.total_days_in_month, 27)
- self.assertEquals(ss.payment_days, 27)
+ self.assertEquals(ss.total_days_in_month, 28)
+ self.assertEquals(ss.payment_days, 28)
ss.save()
#
# frappe.db.set_value("Employee", frappe.get_value("Employee", {"employee_name":"test_employee@salary.com"}, "name"), "date_of_joining", "2001-01-11")
diff --git a/erpnext/hr/report/employee_information/employee_information.json b/erpnext/hr/report/employee_information/employee_information.json
index 93b8cd2..51963d4 100644
--- a/erpnext/hr/report/employee_information/employee_information.json
+++ b/erpnext/hr/report/employee_information/employee_information.json
@@ -1,12 +1,14 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-05-06 18:43:53",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
- "json": "{\"filters\":[],\"columns\":[[\"name\",\"Employee\"],[\"employee_number\",\"Employee\"],[\"date_of_joining\",\"Employee\"],[\"branch\",\"Employee\"],[\"department\",\"Employee\"],[\"designation\",\"Employee\"],[\"gender\",\"Employee\"],[\"status\",\"Employee\"],[\"company\",\"Employee\"],[\"employment_type\",\"Employee\"],[\"reports_to\",\"Employee\"],[\"company_email\",\"Employee\"]],\"sort_by\":\"Employee.bank_ac_no\",\"sort_order\":\"desc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}",
- "modified": "2015-03-02 07:42:02.352823",
+ "json": "{\"add_total_row\": 0, \"sort_by\": \"Employee.bank_ac_no\", \"sort_order\": \"desc\", \"sort_by_next\": \"\", \"filters\": [], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Employee\"], [\"employee_number\", \"Employee\"], [\"date_of_joining\", \"Employee\"], [\"branch\", \"Employee\"], [\"department\", \"Employee\"], [\"designation\", \"Employee\"], [\"gender\", \"Employee\"], [\"status\", \"Employee\"], [\"company\", \"Employee\"], [\"employment_type\", \"Employee\"], [\"reports_to\", \"Employee\"], [\"company_email\", \"Employee\"]]}",
+ "modified": "2016-12-05 18:49:34.782552",
"modified_by": "Administrator",
"module": "HR",
"name": "Employee Information",
diff --git a/erpnext/hr/report/monthly_salary_register/monthly_salary_register.py b/erpnext/hr/report/monthly_salary_register/monthly_salary_register.py
index 6e1265e..1e9d03e 100644
--- a/erpnext/hr/report/monthly_salary_register/monthly_salary_register.py
+++ b/erpnext/hr/report/monthly_salary_register/monthly_salary_register.py
@@ -48,7 +48,7 @@
from `tabSalary Detail` sd, `tabSalary Component` sc
where sc.name=sd.salary_component and sd.amount != 0 and sd.parent in (%s)""" %
(', '.join(['%s']*len(salary_slips))), tuple([d.name for d in salary_slips]), as_dict=1):
- salary_components[component.type].append(component.salary_component)
+ salary_components[_(component.type)].append(component.salary_component)
columns = columns + [(e + ":Currency:120") for e in salary_components[_("Earning")]] + \
[ _("Arrear Amount") + ":Currency:120", _("Leave Encashment Amount") + ":Currency:150",
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 30e8e03..b578ac2 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -349,4 +349,5 @@
erpnext.patches.v7_1.update_invoice_status
erpnext.patches.v7_0.po_status_issue_for_pr_return
erpnext.patches.v7_1.update_missing_salary_component_type
-erpnext.patches.v7_0.update_autoname_field
\ No newline at end of file
+erpnext.patches.v7_0.update_autoname_field
+erpnext.patches.v7_0.update_status_of_po_so
\ No newline at end of file
diff --git a/erpnext/patches/v7_0/update_status_of_po_so.py b/erpnext/patches/v7_0/update_status_of_po_so.py
new file mode 100644
index 0000000..0e2dd74
--- /dev/null
+++ b/erpnext/patches/v7_0/update_status_of_po_so.py
@@ -0,0 +1,62 @@
+# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe.utils import cint, flt
+
+def execute():
+ update_po_per_received_per_billed()
+ update_so_per_delivered_per_billed()
+ update_status()
+
+def update_po_per_received_per_billed():
+ frappe.db.sql("""
+ update
+ `tabPurchase Order`
+ set
+ `tabPurchase Order`.per_received = round((select sum(if(qty > ifnull(received_qty, 0),
+ ifnull(received_qty, 0), qty)) / sum(qty) *100 from `tabPurchase Order Item`
+ where parent = `tabPurchase Order`.name), 2),
+ `tabPurchase Order`.per_billed = round((select sum( if(amount > ifnull(billed_amt, 0),
+ ifnull(billed_amt, 0), amount)) / sum(amount) *100 from `tabPurchase Order Item`
+ where parent = `tabPurchase Order`.name), 2)""")
+
+def update_so_per_delivered_per_billed():
+ frappe.db.sql("""
+ update
+ `tabSales Order`
+ set
+ `tabSales Order`.per_delivered = round((select sum( if(qty > ifnull(delivered_qty, 0),
+ ifnull(delivered_qty, 0), qty)) / sum(qty) *100 from `tabSales Order Item`
+ where parent = `tabSales Order`.name), 2),
+ `tabSales Order`.per_billed = round((select sum( if(amount > ifnull(billed_amt, 0),
+ ifnull(billed_amt, 0), amount)) / sum(amount) *100 from `tabSales Order Item`
+ where parent = `tabSales Order`.name), 2)""")
+
+def update_status():
+ frappe.db.sql("""
+ update
+ `tabSales Order`
+ set status = (Case when status = 'Closed' then 'Closed'
+ When per_delivered < 100 and per_billed < 100 and docstatus = 1 then 'To Deliver and Bill'
+ when per_delivered = 100 and per_billed < 100 and docstatus = 1 then 'To Bill'
+ when per_delivered < 100 and per_billed = 100 and docstatus = 1 then 'To Deliver'
+ when per_delivered = 100 and per_billed = 100 and docstatus = 1 then 'Completed'
+ when order_type = 'Maintenance' and per_billed = 100 and docstatus = 1 then 'Completed'
+ when docstatus = 2 then 'Cancelled'
+ else 'Draft'
+ End)""")
+
+ frappe.db.sql("""
+ update
+ `tabPurchase Order`
+ set status = (Case when status = 'Closed' then 'Closed'
+ when status = 'Delivered' then 'Delivered'
+ When per_received < 100 and per_billed < 100 and docstatus = 1 then 'To Receive and Bill'
+ when per_received = 100 and per_billed < 100 and docstatus = 1 then 'To Bill'
+ when per_received < 100 and per_billed = 100 and docstatus = 1 then 'To Receive'
+ when per_received = 100 and per_billed = 100 and docstatus = 1 then 'Completed'
+ when docstatus = 2 then 'Cancelled'
+ else 'Draft'
+ End)""")
\ No newline at end of file
diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py
index 02e5f18..5483320 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.py
+++ b/erpnext/projects/doctype/timesheet/timesheet.py
@@ -28,6 +28,7 @@
self.update_cost()
self.calculate_total_amounts()
self.calculate_percentage_billed()
+ self.set_dates()
def set_employee_name(self):
if self.employee and not self.employee_name:
@@ -86,9 +87,6 @@
self.start_date = getdate(start_date)
self.end_date = getdate(end_date)
- def before_submit(self):
- self.set_dates()
-
def before_cancel(self):
self.set_status()
diff --git a/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.json b/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.json
index f880508..f6a994d 100644
--- a/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.json
+++ b/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.json
@@ -5,12 +5,12 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
- "modified": "2014-06-03 07:18:17.229116",
+ "modified": "2016-12-01 09:18:17.229116",
"modified_by": "Administrator",
"module": "Projects",
"name": "Project wise Stock Tracking",
"owner": "Administrator",
"ref_doctype": "Project",
"report_name": "Project wise Stock Tracking ",
- "report_type": "Report Builder"
-}
\ No newline at end of file
+ "report_type": "Script Report"
+}
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js
index 6c8898d..466ff28 100644
--- a/erpnext/public/js/utils.js
+++ b/erpnext/public/js/utils.js
@@ -112,9 +112,9 @@
if(frm.doc.__onload && frm.doc.__onload.dashboard_info) {
var info = frm.doc.__onload.dashboard_info;
frm.dashboard.add_indicator(__('Annual Billing: {0}',
- [format_currency(info.billing_this_year, frm.doc.default_currency)]), 'blue');
+ [format_currency(info.billing_this_year, info.currency)]), 'blue');
frm.dashboard.add_indicator(__('Total Unpaid: {0}',
- [format_currency(info.total_unpaid, frm.doc.default_currency)]),
+ [format_currency(info.total_unpaid, info.currency)]),
info.total_unpaid ? 'orange' : 'green');
}
},
diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index 4ddeae9..48e2982 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -12,6 +12,7 @@
from erpnext.utilities.address_and_contact import load_address_and_contact
from erpnext.accounts.party import validate_party_accounts, get_timeline_data # keep this
from erpnext.accounts.party_status import get_party_status
+from erpnext import get_default_currency
class Customer(TransactionBase):
def get_feed(self):
@@ -24,7 +25,7 @@
def load_dashboard_info(self):
billing_this_year = frappe.db.sql("""
- select sum(debit_in_account_currency) - sum(credit_in_account_currency)
+ select sum(debit_in_account_currency) - sum(credit_in_account_currency), account_currency
from `tabGL Entry`
where voucher_type='Sales Invoice' and party_type = 'Customer'
and party=%s and fiscal_year = %s""",
@@ -36,6 +37,7 @@
info = {}
info["billing_this_year"] = billing_this_year[0][0] if billing_this_year else 0
+ info["currency"] = billing_this_year[0][1] if billing_this_year else get_default_currency()
info["total_unpaid"] = total_unpaid[0][0] if total_unpaid else 0
self.set_onload('dashboard_info', info)
diff --git a/erpnext/selling/doctype/customer/test_customer.py b/erpnext/selling/doctype/customer/test_customer.py
index 36e4819..23df503 100644
--- a/erpnext/selling/doctype/customer/test_customer.py
+++ b/erpnext/selling/doctype/customer/test_customer.py
@@ -16,6 +16,9 @@
test_records = frappe.get_test_records('Customer')
class TestCustomer(unittest.TestCase):
+ def tearDown(self):
+ frappe.db.set_value("Customer", '_Test Customer', 'credit_limit', 0.0)
+
def test_party_details(self):
from erpnext.accounts.party import get_party_details
diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py
index ac999ed..a7dfa7c 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.py
+++ b/erpnext/setup/doctype/email_digest/email_digest.py
@@ -233,7 +233,7 @@
"new_quotations","pending_quotations","sales_order","purchase_order","pending_sales_orders","pending_purchase_orders",
"invoiced_amount", "payables", "bank_balance", "credit_balance"):
if self.get(key):
- cache_key = "email_digest:card:{0}:{1}".format(self.company, key)
+ cache_key = "email_digest:card:{0}:{1}:{2}".format(self.company, self.frequency, key)
card = cache.get(cache_key)
if card:
diff --git a/erpnext/stock/report/item_shortage_report/item_shortage_report.json b/erpnext/stock/report/item_shortage_report/item_shortage_report.json
index b87a415..3abdead 100644
--- a/erpnext/stock/report/item_shortage_report/item_shortage_report.json
+++ b/erpnext/stock/report/item_shortage_report/item_shortage_report.json
@@ -1,12 +1,14 @@
{
+ "add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-08-20 13:43:30",
+ "disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
- "json": "{\"filters\":[[\"Bin\",\"projected_qty\",\"<\",\"0\"]],\"columns\":[[\"warehouse\",\"Bin\"],[\"item_code\",\"Bin\"],[\"actual_qty\",\"Bin\"],[\"ordered_qty\",\"Bin\"],[\"planned_qty\",\"Bin\"],[\"reserved_qty\",\"Bin\"],[\"projected_qty\",\"Bin\"]],\"sort_by\":\"Bin.projected_qty\",\"sort_order\":\"asc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}",
- "modified": "2014-06-03 07:18:17.092713",
+ "json": "{\"add_total_row\": 0, \"sort_by\": \"Bin.projected_qty\", \"sort_order\": \"asc\", \"sort_by_next\": \"\", \"filters\": [[\"Bin\", \"projected_qty\", \"<\", \"0\"]], \"sort_order_next\": \"desc\", \"columns\": [[\"warehouse\", \"Bin\"], [\"item_code\", \"Bin\"], [\"actual_qty\", \"Bin\"], [\"ordered_qty\", \"Bin\"], [\"planned_qty\", \"Bin\"], [\"reserved_qty\", \"Bin\"], [\"projected_qty\", \"Bin\"]]}",
+ "modified": "2016-12-05 18:49:41.909411",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Shortage Report",
diff --git a/erpnext/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.json b/erpnext/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.json
index 6a8ddc3..bcca0b4 100644
--- a/erpnext/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.json
+++ b/erpnext/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.json
@@ -7,8 +7,8 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
- "json": "{\"filters\":[],\"columns\":[[\"name\",\"Item Price\"],[\"price_list\",\"Item Price\"],[\"item_code\",\"Item Price\"],[\"item_name\",\"Item Price\"],[\"item_description\",\"Item Price\"],[\"price_list_rate\",\"Item Price\"],[\"buying\",\"Item Price\"],[\"selling\",\"Item Price\"],[\"currency\",\"Item Price\"]],\"sort_by\":\"Item Price.modified\",\"sort_order\":\"desc\",\"sort_by_next\":null,\"sort_order_next\":\"desc\"}",
- "modified": "2016-02-01 14:31:04.075909",
+ "json": "{\"add_total_row\": 0, \"sort_by\": \"Item Price.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Item Price\"], [\"price_list\", \"Item Price\"], [\"item_code\", \"Item Price\"], [\"item_name\", \"Item Price\"], [\"item_description\", \"Item Price\"], [\"price_list_rate\", \"Item Price\"], [\"buying\", \"Item Price\"], [\"selling\", \"Item Price\"], [\"currency\", \"Item Price\"]]}",
+ "modified": "2016-12-05 18:49:15.693076",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item-wise Price List Rate",
diff --git a/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json b/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json
index 5ab5e64..2879d98 100644
--- a/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json
+++ b/erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json
@@ -7,8 +7,8 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
- "json": "{\"filters\":[[\"Serial No\",\"delivery_document_type\",\"in\",[\"Delivery Note\",\"Sales Invoice\"]],[\"Serial No\",\"warehouse\",\"=\",\"\"]],\"columns\":[[\"name\",\"Serial No\"],[\"item_code\",\"Serial No\"],[\"amc_expiry_date\",\"Serial No\"],[\"maintenance_status\",\"Serial No\"],[\"delivery_document_no\",\"Serial No\"],[\"customer\",\"Serial No\"],[\"customer_name\",\"Serial No\"],[\"item_name\",\"Serial No\"],[\"description\",\"Serial No\"],[\"item_group\",\"Serial No\"],[\"brand\",\"Serial No\"]],\"sort_by\":\"Serial No.modified\",\"sort_order\":\"desc\",\"sort_by_next\":null,\"sort_order_next\":\"desc\"}",
- "modified": "2015-10-22 14:53:45.192497",
+ "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [[\"Serial No\", \"delivery_document_type\", \"in\", [\"Delivery Note\", \"Sales Invoice\"]], [\"Serial No\", \"warehouse\", \"=\", \"\"]], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"amc_expiry_date\", \"Serial No\"], [\"maintenance_status\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"]]}",
+ "modified": "2016-12-05 18:49:22.748446",
"modified_by": "Administrator",
"module": "Stock",
"name": "Serial No Service Contract Expiry",
diff --git a/erpnext/stock/report/serial_no_status/serial_no_status.json b/erpnext/stock/report/serial_no_status/serial_no_status.json
index dfc7afc..cb4e70d 100644
--- a/erpnext/stock/report/serial_no_status/serial_no_status.json
+++ b/erpnext/stock/report/serial_no_status/serial_no_status.json
@@ -7,8 +7,8 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
- "json": "{\"filters\":[],\"columns\":[[\"name\",\"Serial No\"],[\"item_code\",\"Serial No\"],[\"warehouse\",\"Serial No\"],[\"item_name\",\"Serial No\"],[\"description\",\"Serial No\"],[\"item_group\",\"Serial No\"],[\"brand\",\"Serial No\"],[\"purchase_document_no\",\"Serial No\"],[\"purchase_date\",\"Serial No\"],[\"customer\",\"Serial No\"],[\"customer_name\",\"Serial No\"],[\"purchase_rate\",\"Serial No\"],[\"delivery_document_no\",\"Serial No\"],[\"delivery_date\",\"Serial No\"],[\"supplier\",\"Serial No\"],[\"supplier_name\",\"Serial No\"]],\"sort_by\":\"Serial No.name\",\"sort_order\":\"desc\",\"sort_by_next\":null,\"sort_order_next\":\"desc\"}",
- "modified": "2015-10-22 14:49:29.491790",
+ "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.name\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"warehouse\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"], [\"purchase_document_no\", \"Serial No\"], [\"purchase_date\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"purchase_rate\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"delivery_date\", \"Serial No\"], [\"supplier\", \"Serial No\"], [\"supplier_name\", \"Serial No\"]]}",
+ "modified": "2016-12-05 18:49:31.424300",
"modified_by": "Administrator",
"module": "Stock",
"name": "Serial No Status",
diff --git a/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json b/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json
index 2a919af..6905671 100644
--- a/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json
+++ b/erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json
@@ -7,8 +7,8 @@
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
- "json": "{\"filters\":[[\"Serial No\",\"delivery_document_type\",\"in\",[\"Delivery Note\",\"Sales Invoice\"]],[\"Serial No\",\"warehouse\",\"=\",\"\"]],\"columns\":[[\"name\",\"Serial No\"],[\"item_code\",\"Serial No\"],[\"warranty_expiry_date\",\"Serial No\"],[\"warranty_period\",\"Serial No\"],[\"maintenance_status\",\"Serial No\"],[\"purchase_document_no\",\"Serial No\"],[\"purchase_date\",\"Serial No\"],[\"supplier\",\"Serial No\"],[\"supplier_name\",\"Serial No\"],[\"delivery_document_no\",\"Serial No\"],[\"delivery_date\",\"Serial No\"],[\"customer\",\"Serial No\"],[\"customer_name\",\"Serial No\"],[\"item_name\",\"Serial No\"],[\"description\",\"Serial No\"],[\"item_group\",\"Serial No\"],[\"brand\",\"Serial No\"]],\"sort_by\":\"Serial No.modified\",\"sort_order\":\"desc\",\"sort_by_next\":null,\"sort_order_next\":\"desc\"}",
- "modified": "2015-10-22 14:53:12.575608",
+ "json": "{\"add_total_row\": 0, \"sort_by\": \"Serial No.modified\", \"sort_order\": \"desc\", \"sort_by_next\": null, \"filters\": [[\"Serial No\", \"delivery_document_type\", \"in\", [\"Delivery Note\", \"Sales Invoice\"]], [\"Serial No\", \"warehouse\", \"=\", \"\"]], \"sort_order_next\": \"desc\", \"columns\": [[\"name\", \"Serial No\"], [\"item_code\", \"Serial No\"], [\"warranty_expiry_date\", \"Serial No\"], [\"warranty_period\", \"Serial No\"], [\"maintenance_status\", \"Serial No\"], [\"purchase_document_no\", \"Serial No\"], [\"purchase_date\", \"Serial No\"], [\"supplier\", \"Serial No\"], [\"supplier_name\", \"Serial No\"], [\"delivery_document_no\", \"Serial No\"], [\"delivery_date\", \"Serial No\"], [\"customer\", \"Serial No\"], [\"customer_name\", \"Serial No\"], [\"item_name\", \"Serial No\"], [\"description\", \"Serial No\"], [\"item_group\", \"Serial No\"], [\"brand\", \"Serial No\"]]}",
+ "modified": "2016-12-05 18:49:26.761364",
"modified_by": "Administrator",
"module": "Stock",
"name": "Serial No Warranty Expiry",