\n\t{{ company }}
\n\t{{ __(\"POS No : \") }}{{offline_pos_name}}
\n
\n\t{{ __(\"Date\") }}: {{ dateutil.global_date_format(posting_date) }}
\n
{{ __(\"Item\") }} | \n\t\t\t{{ __(\"Qty\") }} | \n\t\t\t{{ __(\"Amount\") }} | \n\t\t
---|---|---|
\n\t\t\t\t{{ item.item_name }}\n\t\t\t | \n\t\t\t{{ format_number(item.qty, precision(\"difference\")) }} @ {{ format_currency(item.rate, currency) }} | \n\t\t\t{{ format_currency(item.amount, currency) }} | \n\t\t
\n\t\t\t\t{{ __(\"Net Total\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(total, currency) }}\n\t\t\t | \n\t\t
\n\t\t\t\t{{ row.description }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(row.tax_amount, currency) }}\n\t\t\t | \n\t\t
\n\t\t\t\t{{ __(\"Discount\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(discount_amount, currency) }}\n\t\t\t | \n\t\t
\n\t\t\t\t{{ __(\"Grand Total\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(grand_total, currency) }}\n\t\t\t | \n\t\t
\n\t\t\t\t{{ __(\"Paid Amount\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(paid_amount, currency) }}\n\t\t\t | \n\t\t
{{ __(\"Thank you, please visit again.\") }}
", + "html": "\n\n\n\t{{ company }}
\n\t{{ __(\"POS No : \") }}{{offline_pos_name}}
\n
\n\t{{ __(\"Date\") }}: {{ dateutil.global_date_format(posting_date) }}
\n
{{ __(\"Item\") }} | \n\t\t\t{{ __(\"Qty\") }} | \n\t\t\t{{ __(\"Amount\") }} | \n\t\t
---|---|---|
\n\t\t\t\t{{ item.item_name }}\n\t\t\t | \n\t\t\t{{ format_number(item.qty, precision(\"difference\")) }} @ {{ format_currency(item.rate, currency) }} | \n\t\t\t{{ format_currency(item.amount, currency) }} | \n\t\t
\n\t\t\t\t{{ __(\"Net Total\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(total, currency) }}\n\t\t\t | \n\t\t
\n\t\t\t\t{{ row.description }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(row.tax_amount, currency) }}\n\t\t\t | \n\t\t
\n\t\t\t\t{{ __(\"Discount\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(discount_amount, currency) }}\n\t\t\t | \n\t\t
\n\t\t\t\t{{ __(\"Grand Total\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(grand_total, currency) }}\n\t\t\t | \n\t\t
\n\t\t\t\t{{ __(\"Paid Amount\") }}\n\t\t\t | \n\t\t\t\n\t\t\t\t{{ format_currency(paid_amount, currency) }}\n\t\t\t | \n\t\t
{{ terms }}
\n{{ __(\"Thank you, please visit again.\") }}
", "idx": 0, "line_breaks": 0, - "modified": "2016-12-27 17:22:17.391673", + "modified": "2017-01-12 14:56:12.571032", "modified_by": "Administrator", "module": "Accounts", "name": "Point of Sale", diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 8e59d8f99b..b7fef75de8 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -206,9 +206,12 @@ def get_count_on(account, fieldname, date): @frappe.whitelist() def add_ac(args=None): + from frappe.desk.treeview import make_tree_args + if not args: args = frappe.local.form_dict - args.pop("cmd") + + args = make_tree_args(**args) ac = frappe.new_doc("Account") @@ -233,9 +236,12 @@ def add_ac(args=None): @frappe.whitelist() def add_cc(args=None): + from frappe.desk.treeview import make_tree_args + if not args: args = frappe.local.form_dict - args.pop("cmd") + + args = make_tree_args(**args) cc = frappe.new_doc("Cost Center") cc.update(args) diff --git a/erpnext/controllers/status_updater.py b/erpnext/controllers/status_updater.py index 096bb2df71..4fbee58c84 100644 --- a/erpnext/controllers/status_updater.py +++ b/erpnext/controllers/status_updater.py @@ -103,6 +103,8 @@ class StatusUpdater(Document): def set_status(self, update=False, status=None, update_modified=True): if self.is_new(): + if self.get('amended_from'): + self.status = 'Draft' return if self.doctype in status_map: diff --git a/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json b/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json index e9192f77a2..1e68fab4d6 100644 --- a/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json +++ b/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.json @@ -10,11 +10,13 @@ "doctype": "DocType", "document_type": "Document", "editable_grid": 1, + "engine": "InnoDB", "fields": [ { "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "item_code", "fieldtype": "Link", "hidden": 0, @@ -32,6 +34,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 1, @@ -42,6 +45,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "item_name", "fieldtype": "Data", "hidden": 0, @@ -58,6 +62,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -68,8 +73,9 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "description", - "fieldtype": "Data", + "fieldtype": "Text Editor", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, @@ -85,6 +91,7 @@ "print_hide_if_no_value": 0, "print_width": "300px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -96,6 +103,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "schedule_details", "fieldtype": "Section Break", "hidden": 0, @@ -110,6 +118,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -120,6 +129,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "start_date", "fieldtype": "Date", "hidden": 0, @@ -136,6 +146,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 1, @@ -146,6 +157,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "end_date", "fieldtype": "Date", "hidden": 0, @@ -162,6 +174,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 1, @@ -172,6 +185,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "periodicity", "fieldtype": "Select", "hidden": 0, @@ -189,6 +203,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -199,6 +214,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "no_of_visits", "fieldtype": "Int", "hidden": 0, @@ -215,6 +231,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -225,6 +242,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "sales_person", "fieldtype": "Link", "hidden": 0, @@ -242,6 +260,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 1, "search_index": 0, @@ -252,6 +271,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "reference", "fieldtype": "Section Break", "hidden": 0, @@ -266,6 +286,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -276,6 +297,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "serial_no", "fieldtype": "Small Text", "hidden": 0, @@ -292,6 +314,7 @@ "print_hide": 0, "print_hide_if_no_value": 0, "read_only": 0, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 0, @@ -302,6 +325,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "columns": 0, "fieldname": "sales_order", "fieldtype": "Link", "hidden": 0, @@ -320,6 +344,7 @@ "print_hide_if_no_value": 0, "print_width": "150px", "read_only": 1, + "remember_last_selected_value": 0, "report_hide": 0, "reqd": 0, "search_index": 1, @@ -338,7 +363,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-07-11 03:28:02.260189", + "modified": "2017-01-11 12:02:38.449129", "modified_by": "Administrator", "module": "Maintenance", "name": "Maintenance Schedule Item", diff --git a/erpnext/patches.txt b/erpnext/patches.txt index ef1e2c12a9..462f198a5c 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -360,3 +360,5 @@ erpnext.patches.v7_1.set_sales_person_status erpnext.patches.v7_1.repost_stock_for_deleted_bins_for_merging_items execute:frappe.delete_doc('Desktop Icon', {'module_name': 'Profit and Loss Statment'}) erpnext.patches.v7_2.update_website_for_variant +erpnext.patches.v7_2.update_doctype_status +erpnext.patches.v7_2.update_salary_slips diff --git a/erpnext/patches/v7_2/update_doctype_status.py b/erpnext/patches/v7_2/update_doctype_status.py new file mode 100644 index 0000000000..c66f3f2e73 --- /dev/null +++ b/erpnext/patches/v7_2/update_doctype_status.py @@ -0,0 +1,11 @@ +# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + doctypes = ["Opportunity", "Quotation", "Sales Order", "Sales Invoice", "Purchase Invoice", "Purchase Order", "Delivery Note", "Purchase Receipt"] + for doctype in doctypes: + frappe.db.sql(""" update `tab{doctype}` set status = 'Draft' + where status = 'Cancelled' and docstatus = 0 """.format(doctype = doctype)) \ No newline at end of file diff --git a/erpnext/patches/v7_2/update_salary_slips.py b/erpnext/patches/v7_2/update_salary_slips.py new file mode 100644 index 0000000000..232de2892d --- /dev/null +++ b/erpnext/patches/v7_2/update_salary_slips.py @@ -0,0 +1,16 @@ +import frappe +from erpnext.hr.doctype.process_payroll.process_payroll import get_month_details + +def execute(): + salary_slips = frappe.db.sql("""select fiscal_year, month, name from `tabSalary Slip` + where (month is not null and month != '') + and (fiscal_year is not null and fiscal_year != '') and + (start_date is null or start_date = '') and + (end_date is null or end_date = '') and docstatus != 2""") + + for salary_slip in salary_slips: + get_start_end_date = get_month_details(salary_slip.fiscal_year, salary_slip.month) + start_date = get_start_end_date['month_start_date'] + end_date = get_start_end_date['month_end_date'] + frappe.db.sql("""update `tabSalary Slip` set start_date = %s, end_date = %s where name = %s""", + (start_date, end_date, salary_slip.name)) \ No newline at end of file diff --git a/erpnext/projects/doctype/project/project.json b/erpnext/projects/doctype/project/project.json index 37ca968ae9..38ebbcb4f8 100644 --- a/erpnext/projects/doctype/project/project.json +++ b/erpnext/projects/doctype/project/project.json @@ -10,6 +10,7 @@ "doctype": "DocType", "document_type": "Setup", "editable_grid": 0, + "engine": "InnoDB", "fields": [ { "allow_on_submit": 0, @@ -24,7 +25,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Project Name", "length": 0, "no_copy": 0, @@ -53,7 +53,6 @@ "ignore_xss_filter": 0, "in_filter": 1, "in_list_view": 0, - "in_standard_filter": 1, "label": "Status", "length": 0, "no_copy": 1, @@ -83,7 +82,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 1, "label": "Project Type", "length": 0, "no_copy": 0, @@ -113,7 +111,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 1, "label": "Is Active", "length": 0, "no_copy": 0, @@ -144,7 +141,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "% Complete Method", "length": 0, "no_copy": 0, @@ -173,7 +169,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -200,7 +195,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 1, "label": "Priority", "length": 0, "no_copy": 0, @@ -230,7 +224,6 @@ "ignore_xss_filter": 0, "in_filter": 1, "in_list_view": 0, - "in_standard_filter": 0, "label": "Expected Start Date", "length": 0, "no_copy": 0, @@ -259,7 +252,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Expected End Date", "length": 0, "no_copy": 0, @@ -288,7 +280,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "% Completed", "length": 0, "no_copy": 1, @@ -315,7 +306,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Customer Details", "length": 0, "no_copy": 0, @@ -344,7 +334,6 @@ "ignore_xss_filter": 0, "in_filter": 1, "in_list_view": 0, - "in_standard_filter": 0, "label": "Customer", "length": 0, "no_copy": 0, @@ -374,7 +363,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -401,7 +389,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Sales Order", "length": 0, "no_copy": 0, @@ -430,7 +417,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Users", "length": 0, "no_copy": 0, @@ -459,7 +445,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Users", "length": 0, "no_copy": 0, @@ -488,7 +473,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Tasks", "length": 0, "no_copy": 0, @@ -517,7 +501,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Tasks", "length": 0, "no_copy": 0, @@ -546,7 +529,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Notes", "length": 0, "no_copy": 0, @@ -575,7 +557,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Notes", "length": 0, "no_copy": 0, @@ -604,7 +585,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Start and End Dates", "length": 0, "no_copy": 0, @@ -632,7 +612,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Actual Start Date", "length": 0, "no_copy": 0, @@ -660,7 +639,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Actual Time (in Hours)", "length": 0, "no_copy": 0, @@ -688,7 +666,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -715,7 +692,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Actual End Date", "length": 0, "no_copy": 0, @@ -744,7 +720,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Costing and Billing", "length": 0, "no_copy": 0, @@ -773,7 +748,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 1, - "in_standard_filter": 0, "label": "Estimated Cost", "length": 0, "no_copy": 0, @@ -804,7 +778,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Total Costing Amount (via Time Logs)", "length": 0, "no_copy": 0, @@ -833,7 +806,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Total Expense Claim (via Expense Claims)", "length": 0, "no_copy": 0, @@ -861,7 +833,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Company", "length": 0, "no_copy": 0, @@ -889,7 +860,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Default Cost Center", "length": 0, "no_copy": 0, @@ -917,7 +887,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -945,7 +914,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Total Billing Amount (via Time Logs)", "length": 0, "no_copy": 0, @@ -973,7 +941,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Total Purchase Cost (via Purchase Invoice)", "length": 0, "no_copy": 0, @@ -1001,7 +968,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Margin", "length": 0, "no_copy": 0, @@ -1030,7 +996,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Gross Margin", "length": 0, "no_copy": 0, @@ -1060,7 +1025,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "length": 0, "no_copy": 0, "permlevel": 0, @@ -1087,7 +1051,6 @@ "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "in_standard_filter": 0, "label": "Gross Margin %", "length": 0, "no_copy": 0, @@ -1117,7 +1080,7 @@ "issingle": 0, "istable": 0, "max_attachments": 4, - "modified": "2016-11-07 05:55:56.179455", + "modified": "2017-01-10 16:33:54.691885", "modified_by": "Administrator", "module": "Projects", "name": "Project", @@ -1164,6 +1127,27 @@ "share": 0, "submit": 0, "write": 0 + }, + { + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "is_custom": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "Projects Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 } ], "quick_entry": 1, diff --git a/erpnext/public/js/pos/pos_bill_item.html b/erpnext/public/js/pos/pos_bill_item.html index d8833bb835..f5d1a7652e 100644 --- a/erpnext/public/js/pos/pos_bill_item.html +++ b/erpnext/public/js/pos/pos_bill_item.html @@ -2,7 +2,7 @@