mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 09:54:47 +00:00
chore: updated education config
This commit is contained in:
@@ -15,7 +15,7 @@ install:
|
|||||||
- sudo rm /etc/apt/sources.list.d/docker.list
|
- sudo rm /etc/apt/sources.list.d/docker.list
|
||||||
- sudo apt-get install hhvm && rm -rf /home/travis/.kiex/
|
- sudo apt-get install hhvm && rm -rf /home/travis/.kiex/
|
||||||
- sudo apt-get purge -y mysql-common mysql-server mysql-client
|
- sudo apt-get purge -y mysql-common mysql-server mysql-client
|
||||||
- nvm install v7.10.0
|
- nvm install 10
|
||||||
- pip install python-coveralls
|
- pip install python-coveralls
|
||||||
- wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
|
- wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
|
||||||
- sudo python install.py --develop --user travis --without-bench-setup
|
- sudo python install.py --develop --user travis --without-bench-setup
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import frappe
|
|||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
from frappe.utils import getdate
|
from frappe.utils import getdate
|
||||||
|
|
||||||
__version__ = '11.1.6'
|
__version__ = '11.1.14'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
|||||||
@@ -632,6 +632,39 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"depends_on": "eval:(doc.report_type == 'Profit and Loss' && !doc.is_group)",
|
||||||
|
"fieldname": "include_in_gross",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Include in gross",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"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,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
"has_web_view": 0,
|
||||||
@@ -645,7 +678,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2019-01-07 16:52:02.557837",
|
"modified": "2019-03-04 14:42:07.208893",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Account",
|
"name": "Account",
|
||||||
|
|||||||
@@ -1,434 +1,457 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_events_in_timeline": 0,
|
||||||
"allow_import": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_rename": 0,
|
"allow_import": 0,
|
||||||
"autoname": "naming_series:",
|
"allow_rename": 0,
|
||||||
"beta": 0,
|
"autoname": "naming_series:",
|
||||||
"creation": "2018-06-18 16:51:49.994750",
|
"beta": 0,
|
||||||
"custom": 0,
|
"creation": "2018-06-18 16:51:49.994750",
|
||||||
"docstatus": 0,
|
"custom": 0,
|
||||||
"doctype": "DocType",
|
"docstatus": 0,
|
||||||
"document_type": "",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"document_type": "",
|
||||||
"engine": "InnoDB",
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"default": "POS-CLO-",
|
"columns": 0,
|
||||||
"fieldname": "naming_series",
|
"default": "POS-CLO-",
|
||||||
"fieldtype": "Select",
|
"fieldname": "naming_series",
|
||||||
"hidden": 0,
|
"fieldtype": "Select",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 1,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_global_search": 1,
|
||||||
"in_standard_filter": 1,
|
"in_list_view": 0,
|
||||||
"label": "Series",
|
"in_standard_filter": 1,
|
||||||
"length": 0,
|
"label": "Series",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"options": "POS-CLO-",
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"options": "POS-CLO-",
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 1,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "user",
|
"columns": 0,
|
||||||
"fieldtype": "Link",
|
"fieldname": "user",
|
||||||
"hidden": 0,
|
"fieldtype": "Link",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 1,
|
"in_list_view": 1,
|
||||||
"label": "User",
|
"in_standard_filter": 1,
|
||||||
"length": 0,
|
"label": "User",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"options": "User",
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"options": "User",
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 1,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 1,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 1,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"default": "Today",
|
"columns": 0,
|
||||||
"fieldname": "date",
|
"default": "Today",
|
||||||
"fieldtype": "Date",
|
"fieldname": "date",
|
||||||
"hidden": 0,
|
"fieldtype": "Date",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 1,
|
"in_list_view": 0,
|
||||||
"label": "Date",
|
"in_standard_filter": 1,
|
||||||
"length": 0,
|
"label": "Date",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 1,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "from_time",
|
"columns": 0,
|
||||||
"fieldtype": "Time",
|
"fieldname": "from_time",
|
||||||
"hidden": 0,
|
"fieldtype": "Time",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 1,
|
"in_list_view": 0,
|
||||||
"label": "From Time",
|
"in_standard_filter": 1,
|
||||||
"length": 0,
|
"label": "From Time",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 1,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 1,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"default": "",
|
"columns": 0,
|
||||||
"fieldname": "time",
|
"default": "",
|
||||||
"fieldtype": "Time",
|
"fieldname": "time",
|
||||||
"hidden": 0,
|
"fieldtype": "Time",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 1,
|
"in_list_view": 0,
|
||||||
"label": "To Time",
|
"in_standard_filter": 1,
|
||||||
"length": 0,
|
"label": "To Time",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 1,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 1,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"default": "0.00",
|
"columns": 0,
|
||||||
"fieldname": "expense",
|
"default": "0.00",
|
||||||
"fieldtype": "Float",
|
"fieldname": "expense",
|
||||||
"hidden": 0,
|
"fieldtype": "Float",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "Expense",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Expense",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "2",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"default": "0.00",
|
"columns": 0,
|
||||||
"fieldname": "custody",
|
"default": "0.00",
|
||||||
"fieldtype": "Float",
|
"fieldname": "custody",
|
||||||
"hidden": 0,
|
"fieldtype": "Float",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "Custody",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Custody",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "2",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"default": "0.00",
|
"columns": 0,
|
||||||
"fieldname": "returns",
|
"default": "0.00",
|
||||||
"fieldtype": "Float",
|
"fieldname": "returns",
|
||||||
"hidden": 0,
|
"fieldtype": "Float",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "Returns",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Returns",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "2",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "2",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"default": "0.00",
|
"default": "0.00",
|
||||||
"fieldname": "outstanding_amount",
|
"fieldname": "outstanding_amount",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Outstanding Amount",
|
"label": "Outstanding Amount",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "2",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"default": "0.0",
|
"columns": 0,
|
||||||
"fieldname": "payments",
|
"default": "0.0",
|
||||||
"fieldtype": "Table",
|
"fieldname": "payments",
|
||||||
"hidden": 0,
|
"fieldtype": "Table",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 1,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "Payments",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Payments",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"options": "Cashier Closing Payments",
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"options": "Cashier Closing Payments",
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "net_amount",
|
"columns": 0,
|
||||||
"fieldtype": "Float",
|
"fieldname": "net_amount",
|
||||||
"hidden": 0,
|
"fieldtype": "Float",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 1,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 1,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 1,
|
"in_list_view": 1,
|
||||||
"label": "Net Amount",
|
"in_standard_filter": 1,
|
||||||
"length": 0,
|
"label": "Net Amount",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 1,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "amended_from",
|
"columns": 0,
|
||||||
"fieldtype": "Link",
|
"fieldname": "amended_from",
|
||||||
"hidden": 0,
|
"fieldtype": "Link",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "Amended From",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Amended From",
|
||||||
"no_copy": 1,
|
"length": 0,
|
||||||
"options": "Cashier Closing",
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"options": "Cashier Closing",
|
||||||
"print_hide": 1,
|
"permlevel": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 1,
|
||||||
"read_only": 1,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-10-21 14:26:15.812416",
|
"modified": "2019-02-19 08:35:24.157327",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Cashier Closing",
|
"name": "Cashier Closing",
|
||||||
"name_case": "",
|
"name_case": "",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"amend": 0,
|
"amend": 0,
|
||||||
"apply_user_permissions": 0,
|
"cancel": 0,
|
||||||
"cancel": 0,
|
"create": 1,
|
||||||
"create": 1,
|
"delete": 1,
|
||||||
"delete": 1,
|
"email": 1,
|
||||||
"email": 1,
|
"export": 1,
|
||||||
"export": 1,
|
"if_owner": 0,
|
||||||
"if_owner": 0,
|
"import": 0,
|
||||||
"import": 0,
|
"permlevel": 0,
|
||||||
"permlevel": 0,
|
"print": 1,
|
||||||
"print": 1,
|
"read": 1,
|
||||||
"read": 1,
|
"report": 1,
|
||||||
"report": 1,
|
"role": "System Manager",
|
||||||
"role": "System Manager",
|
"set_user_permissions": 0,
|
||||||
"set_user_permissions": 0,
|
"share": 1,
|
||||||
"share": 1,
|
"submit": 1,
|
||||||
"submit": 1,
|
|
||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"quick_entry": 0,
|
"quick_entry": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"show_name_in_global_search": 0,
|
"show_name_in_global_search": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"track_changes": 1,
|
"track_changes": 1,
|
||||||
"track_seen": 0
|
"track_seen": 0,
|
||||||
|
"track_views": 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
@@ -14,6 +15,7 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -41,10 +43,12 @@
|
|||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -63,7 +67,7 @@
|
|||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "2",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
@@ -72,6 +76,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -85,7 +90,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-09-02 14:45:36.303520",
|
"modified": "2019-02-19 08:34:20.268037",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Cashier Closing Payments",
|
"name": "Cashier Closing Payments",
|
||||||
@@ -99,5 +104,6 @@
|
|||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"track_changes": 1,
|
"track_changes": 1,
|
||||||
"track_seen": 0
|
"track_seen": 0,
|
||||||
|
"track_views": 0
|
||||||
}
|
}
|
||||||
@@ -52,6 +52,12 @@ class JournalEntry(AccountsController):
|
|||||||
self.update_loan()
|
self.update_loan()
|
||||||
self.update_inter_company_jv()
|
self.update_inter_company_jv()
|
||||||
|
|
||||||
|
def before_print(self):
|
||||||
|
self.gl_entries = frappe.get_list("GL Entry",filters={"voucher_type": "Journal Entry",
|
||||||
|
"voucher_no": self.name} ,
|
||||||
|
fields=["account", "party_type", "party", "debit", "credit", "remarks"]
|
||||||
|
)
|
||||||
|
|
||||||
def get_title(self):
|
def get_title(self):
|
||||||
return self.pay_to_recd_from or self.accounts[0].account
|
return self.pay_to_recd_from or self.accounts[0].account
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
@@ -398,7 +399,7 @@
|
|||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "6",
|
"precision": "9",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
@@ -911,7 +912,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-08-19 04:08:44.742510",
|
"modified": "2019-02-18 19:00:53.662788",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Journal Entry Account",
|
"name": "Journal Entry Account",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from __future__ import unicode_literals
|
|||||||
import frappe, erpnext, json
|
import frappe, erpnext, json
|
||||||
from frappe import _, scrub, ValidationError
|
from frappe import _, scrub, ValidationError
|
||||||
from frappe.utils import flt, comma_or, nowdate, getdate
|
from frappe.utils import flt, comma_or, nowdate, getdate
|
||||||
from erpnext.accounts.utils import get_outstanding_invoices, get_account_currency, get_balance_on
|
from erpnext.accounts.utils import get_outstanding_invoices, get_account_currency, get_balance_on, get_allow_cost_center_in_entry_of_bs_account
|
||||||
from erpnext.accounts.party import get_party_account
|
from erpnext.accounts.party import get_party_account
|
||||||
from erpnext.accounts.doctype.journal_entry.journal_entry import get_default_bank_cash_account
|
from erpnext.accounts.doctype.journal_entry.journal_entry import get_default_bank_cash_account
|
||||||
from erpnext.setup.utils import get_exchange_rate
|
from erpnext.setup.utils import get_exchange_rate
|
||||||
@@ -70,6 +70,12 @@ class PaymentEntry(AccountsController):
|
|||||||
self.update_advance_paid()
|
self.update_advance_paid()
|
||||||
self.update_expense_claim()
|
self.update_expense_claim()
|
||||||
|
|
||||||
|
def before_print(self):
|
||||||
|
self.gl_entries = frappe.get_list("GL Entry",filters={"voucher_type": "Payment Entry",
|
||||||
|
"voucher_no": self.name} ,
|
||||||
|
fields=["account", "party_type", "party", "debit", "credit", "remarks"]
|
||||||
|
)
|
||||||
|
|
||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
self.setup_party_account_field()
|
self.setup_party_account_field()
|
||||||
self.make_gl_entries(cancel=1)
|
self.make_gl_entries(cancel=1)
|
||||||
@@ -564,8 +570,8 @@ def get_outstanding_reference_documents(args):
|
|||||||
.format(frappe.db.escape(args["voucher_type"]), frappe.db.escape(args["voucher_no"]))
|
.format(frappe.db.escape(args["voucher_type"]), frappe.db.escape(args["voucher_no"]))
|
||||||
|
|
||||||
# Add cost center condition
|
# Add cost center condition
|
||||||
if args.get("cost_center"):
|
if args.get("cost_center") and get_allow_cost_center_in_entry_of_bs_account():
|
||||||
condition += " and cost_center='%s'" % args.get("cost_center")
|
condition += " and cost_center='%s'" % args.get("cost_center")
|
||||||
|
|
||||||
outstanding_invoices = get_outstanding_invoices(args.get("party_type"), args.get("party"),
|
outstanding_invoices = get_outstanding_invoices(args.get("party_type"), args.get("party"),
|
||||||
args.get("party_account"), condition=condition)
|
args.get("party_account"), condition=condition)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
@@ -425,7 +426,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "currency",
|
"options": "currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "2",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
@@ -1501,7 +1502,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-09-06 14:44:43.563367",
|
"modified": "2019-02-18 18:52:34.203239",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Request",
|
"name": "Payment Request",
|
||||||
|
|||||||
@@ -8,5 +8,6 @@ frappe.ui.form.on('Payment Terms Template', {
|
|||||||
frm.add_fetch("payment_term", "due_date_based_on", "due_date_based_on");
|
frm.add_fetch("payment_term", "due_date_based_on", "due_date_based_on");
|
||||||
frm.add_fetch("payment_term", "credit_days", "credit_days");
|
frm.add_fetch("payment_term", "credit_days", "credit_days");
|
||||||
frm.add_fetch("payment_term", "credit_months", "credit_months");
|
frm.add_fetch("payment_term", "credit_months", "credit_months");
|
||||||
|
frm.add_fetch("payment_term", "mode_of_payment", "mode_of_payment");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -33,6 +33,14 @@ frappe.ui.form.on('POS Profile', {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frm.set_query("account_for_change_amount", function() {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
account_type: ['in', ["Cash", "Bank"]]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
frm.set_query("print_format", function() {
|
frm.set_query("print_format", function() {
|
||||||
return { filters: { doc_type: "Sales Invoice", print_format_type: "Js"} };
|
return { filters: { doc_type: "Sales Invoice", print_format_type: "Js"} };
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -196,8 +196,9 @@ def get_pricing_rule_for_item(args):
|
|||||||
pricing_rule_rate = 0.0
|
pricing_rule_rate = 0.0
|
||||||
if pricing_rule.currency == args.currency:
|
if pricing_rule.currency == args.currency:
|
||||||
pricing_rule_rate = pricing_rule.rate
|
pricing_rule_rate = pricing_rule.rate
|
||||||
|
|
||||||
item_details.update({
|
item_details.update({
|
||||||
"price_list_rate": pricing_rule_rate,
|
"price_list_rate": pricing_rule_rate * args.get("conversion_factor"),
|
||||||
"discount_percentage": 0.0
|
"discount_percentage": 0.0
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -9,9 +9,12 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
|||||||
this.setup_posting_date_time_check();
|
this.setup_posting_date_time_check();
|
||||||
this._super(doc);
|
this._super(doc);
|
||||||
|
|
||||||
// formatter for material request item
|
// formatter for purchase invoice item
|
||||||
this.frm.set_indicator_formatter('item_code',
|
if(this.frm.doc.update_stock) {
|
||||||
function(doc) { return (doc.qty<=doc.received_qty) ? "green" : "orange" })
|
this.frm.set_indicator_formatter('item_code', function(doc) {
|
||||||
|
return (doc.qty<=doc.received_qty) ? "green" : "orange";
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onload: function() {
|
onload: function() {
|
||||||
this._super();
|
this._super();
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
}]
|
}]
|
||||||
|
|
||||||
def onload(self):
|
def onload(self):
|
||||||
|
super(PurchaseInvoice, self).onload()
|
||||||
supplier_tds = frappe.db.get_value("Supplier", self.supplier, "tax_withholding_category")
|
supplier_tds = frappe.db.get_value("Supplier", self.supplier, "tax_withholding_category")
|
||||||
self.set_onload("supplier_tds", supplier_tds)
|
self.set_onload("supplier_tds", supplier_tds)
|
||||||
|
|
||||||
@@ -53,6 +54,12 @@ class PurchaseInvoice(BuyingController):
|
|||||||
if not self.on_hold:
|
if not self.on_hold:
|
||||||
self.release_date = ''
|
self.release_date = ''
|
||||||
|
|
||||||
|
def before_print(self):
|
||||||
|
self.gl_entries = frappe.get_list("GL Entry",filters={"voucher_type": "Purchase Invoice",
|
||||||
|
"voucher_no": self.name} ,
|
||||||
|
fields=["account", "party_type", "party", "debit", "credit"]
|
||||||
|
)
|
||||||
|
|
||||||
def invoice_is_blocked(self):
|
def invoice_is_blocked(self):
|
||||||
return self.on_hold and (not self.release_date or self.release_date > getdate(nowdate()))
|
return self.on_hold and (not self.release_date or self.release_date > getdate(nowdate()))
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
3
erpnext/accounts/doctype/sales_invoice/regional/italy.js
Normal file
3
erpnext/accounts/doctype/sales_invoice/regional/italy.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{% include "erpnext/regional/italy/sales_invoice.js" %}
|
||||||
|
|
||||||
|
erpnext.setup_e_invoice_button('Sales Invoice')
|
||||||
@@ -201,7 +201,8 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
|||||||
get_query: function() {
|
get_query: function() {
|
||||||
var filters = {
|
var filters = {
|
||||||
docstatus: 1,
|
docstatus: 1,
|
||||||
company: me.frm.doc.company
|
company: me.frm.doc.company,
|
||||||
|
is_return: 0
|
||||||
};
|
};
|
||||||
if(me.frm.doc.customer) filters["customer"] = me.frm.doc.customer;
|
if(me.frm.doc.customer) filters["customer"] = me.frm.doc.customer;
|
||||||
return {
|
return {
|
||||||
@@ -555,6 +556,14 @@ frappe.ui.form.on('Sales Invoice', {
|
|||||||
frm.add_fetch('payment_term', 'invoice_portion', 'invoice_portion');
|
frm.add_fetch('payment_term', 'invoice_portion', 'invoice_portion');
|
||||||
frm.add_fetch('payment_term', 'description', 'description');
|
frm.add_fetch('payment_term', 'description', 'description');
|
||||||
|
|
||||||
|
frm.set_query("account_for_change_amount", function() {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
account_type: ['in', ["Cash", "Bank"]]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
frm.custom_make_buttons = {
|
frm.custom_make_buttons = {
|
||||||
'Delivery Note': 'Delivery',
|
'Delivery Note': 'Delivery',
|
||||||
'Sales Invoice': 'Sales Return',
|
'Sales Invoice': 'Sales Return',
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -205,6 +205,12 @@ class SalesInvoice(SellingController):
|
|||||||
def before_cancel(self):
|
def before_cancel(self):
|
||||||
self.update_time_sheet(None)
|
self.update_time_sheet(None)
|
||||||
|
|
||||||
|
def before_print(self):
|
||||||
|
self.gl_entries = frappe.get_list("GL Entry",filters={"voucher_type": "Sales Invoice",
|
||||||
|
"voucher_no": self.name} ,
|
||||||
|
fields=["account", "party_type", "party", "debit", "credit"]
|
||||||
|
)
|
||||||
|
|
||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
self.check_close_sales_order("sales_order")
|
self.check_close_sales_order("sales_order")
|
||||||
|
|
||||||
@@ -523,8 +529,8 @@ class SalesInvoice(SellingController):
|
|||||||
|
|
||||||
def validate_pos(self):
|
def validate_pos(self):
|
||||||
if self.is_return:
|
if self.is_return:
|
||||||
if flt(self.paid_amount) + flt(self.write_off_amount) - flt(self.grand_total) < \
|
if flt(self.paid_amount) + flt(self.write_off_amount) - flt(self.grand_total) > \
|
||||||
1/(10**(self.precision("grand_total") + 1)):
|
1.0/(10.0**(self.precision("grand_total") + 1.0)):
|
||||||
frappe.throw(_("Paid amount + Write Off Amount can not be greater than Grand Total"))
|
frappe.throw(_("Paid amount + Write Off Amount can not be greater than Grand Total"))
|
||||||
|
|
||||||
def validate_item_code(self):
|
def validate_item_code(self):
|
||||||
@@ -1012,9 +1018,10 @@ class SalesInvoice(SellingController):
|
|||||||
for serial_no in item.serial_no.split("\n"):
|
for serial_no in item.serial_no.split("\n"):
|
||||||
sales_invoice = frappe.db.get_value("Serial No", serial_no, "sales_invoice")
|
sales_invoice = frappe.db.get_value("Serial No", serial_no, "sales_invoice")
|
||||||
if sales_invoice and self.name != sales_invoice:
|
if sales_invoice and self.name != sales_invoice:
|
||||||
frappe.throw(_("Serial Number: {0} is already referenced in Sales Invoice: {1}".format(
|
sales_invoice_company = frappe.db.get_value("Sales Invoice", sales_invoice, "company")
|
||||||
serial_no, sales_invoice
|
if sales_invoice_company == self.company:
|
||||||
)))
|
frappe.throw(_("Serial Number: {0} is already referenced in Sales Invoice: {1}"
|
||||||
|
.format(serial_no, sales_invoice)))
|
||||||
|
|
||||||
def update_project(self):
|
def update_project(self):
|
||||||
if self.project:
|
if self.project:
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
@@ -13,11 +14,13 @@
|
|||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"depends_on": "eval:parent.doctype == 'POS Profile'",
|
"depends_on": "eval:parent.doctype == 'POS Profile'",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "default",
|
"fieldname": "default",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -40,15 +43,17 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "mode_of_payment",
|
"fieldname": "mode_of_payment",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -72,17 +77,19 @@
|
|||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"default": "0.0",
|
"default": "0",
|
||||||
"depends_on": "eval:parent.doctype == 'Sales Invoice'",
|
"depends_on": "eval:parent.doctype == 'Sales Invoice'",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "amount",
|
"fieldname": "amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -97,7 +104,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "currency",
|
"options": "currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "2",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
@@ -106,15 +113,17 @@
|
|||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "column_break_3",
|
"fieldname": "column_break_3",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -136,15 +145,17 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "account",
|
"fieldname": "account",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -168,16 +179,18 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fetch_from": "mode_of_payment.type",
|
"fetch_from": "mode_of_payment.type",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "type",
|
"fieldname": "type",
|
||||||
"fieldtype": "Read Only",
|
"fieldtype": "Read Only",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -201,15 +214,17 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "base_amount",
|
"fieldname": "base_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -233,15 +248,17 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "clearance_date",
|
"fieldname": "clearance_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -264,7 +281,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -278,7 +295,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-05-16 22:42:52.033991",
|
"modified": "2019-03-06 15:58:37.839241",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Invoice Payment",
|
"name": "Sales Invoice Payment",
|
||||||
@@ -292,5 +309,6 @@
|
|||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"track_changes": 0,
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0,
|
||||||
|
"track_views": 0
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"beta": 0,
|
"beta": 0,
|
||||||
@@ -12,6 +14,8 @@
|
|||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -39,9 +43,12 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -68,9 +75,12 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -88,7 +98,7 @@
|
|||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "2",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
@@ -97,9 +107,12 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 1,
|
"allow_on_submit": 1,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -126,20 +139,21 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
|
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-02-17 16:47:04.413420",
|
"modified": "2019-02-18 18:50:44.770361",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Invoice Timesheet",
|
"name": "Sales Invoice Timesheet",
|
||||||
@@ -153,5 +167,6 @@
|
|||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"track_changes": 1,
|
"track_changes": 1,
|
||||||
"track_seen": 0
|
"track_seen": 0,
|
||||||
|
"track_views": 0
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
{%- from "templates/print_formats/standard_macros.html" import add_header -%}
|
||||||
|
<style>
|
||||||
|
.table-bordered td.top-bottom {border-top: none !important;border-bottom: none !important;}
|
||||||
|
.table-bordered td.right{border-right: none !important;}
|
||||||
|
.table-bordered td.left{border-left: none !important;}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<div class="page-break">
|
||||||
|
{%- if not doc.get("print_heading") and not doc.get("select_print_heading")
|
||||||
|
and doc.set("select_print_heading", _("Payment Entry")) -%}{%- endif -%}
|
||||||
|
{{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }}
|
||||||
|
<div class="row margin-bottom">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<table>
|
||||||
|
<tr><td><strong>Voucher No: </strong></td><td>{{ doc.name }}</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<table>
|
||||||
|
<tr><td><strong>Date: </strong></td><td>{{ frappe.utils.formatdate(doc.creation) }}</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="margin-top">
|
||||||
|
<table class="table table-bordered table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>Account</th>
|
||||||
|
<th>Party Type</th>
|
||||||
|
<th>Party</th>
|
||||||
|
<th>Amount</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="top-bottom" colspan="5"><strong>Credit</strong></td>
|
||||||
|
</tr>
|
||||||
|
{% set total_credit = 0 -%}
|
||||||
|
{% for entries in doc.gl_entries %}
|
||||||
|
{% if entries.debit == 0.0 %}
|
||||||
|
<tr>
|
||||||
|
<td class="right top-bottom">{{ entries.account }}</td>
|
||||||
|
<td class="right left top-bottom">{{ entries.party_type }}</td>
|
||||||
|
<td class="right left top-bottom">{{ entries.party }}</td>
|
||||||
|
<td class="left top-bottom">{{ entries.credit }}</td>
|
||||||
|
{% set total_credit = total_credit + entries.credit -%}
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="top-bottom" colspan="4"><strong> Narration </strong><br>{{ entries.remarks }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="right" colspan="3"><strong>Total (credit) </strong></td>
|
||||||
|
<td class="left" >{{total_credit}}</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
<tr>
|
||||||
|
<td class="top-bottom" colspan="4"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="top-bottom" colspan="5"><strong>Debit</strong></td>
|
||||||
|
</tr>
|
||||||
|
{% set total_debit = 0 -%}
|
||||||
|
{% for entries in doc.gl_entries %}
|
||||||
|
{% if entries.credit == 0.0 %}
|
||||||
|
<tr>
|
||||||
|
<td class="right top-bottom">{{ entries.account }}</td>
|
||||||
|
<td class="right left top-bottom">{{ entries.party_type }}</td>
|
||||||
|
<td class="right left top-bottom">{{ entries.party }}</td>
|
||||||
|
{% set total_debit = total_debit + entries.debit -%}
|
||||||
|
<td class="left top-bottom">{{ entries.debit }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="top-bottom"colspan="4"><strong> Narration </strong><br>{{ entries.remarks }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="right" colspan="3" ><strong>Total (debit) </strong></td>
|
||||||
|
<td class="left" >{{total_debit}}</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
<div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"align_labels_right": 0,
|
||||||
|
"creation": "2019-02-15 11:49:08.608619",
|
||||||
|
"custom_format": 0,
|
||||||
|
"default_print_language": "en",
|
||||||
|
"disabled": 0,
|
||||||
|
"doc_type": "Payment Entry",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Print Format",
|
||||||
|
"font": "Default",
|
||||||
|
"idx": 0,
|
||||||
|
"line_breaks": 0,
|
||||||
|
"modified": "2019-02-15 11:49:08.608619",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Accounts",
|
||||||
|
"name": "Bank and Cash Payment Voucher",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"print_format_builder": 0,
|
||||||
|
"print_format_type": "Server",
|
||||||
|
"show_section_headings": 0,
|
||||||
|
"standard": "Yes"
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,76 @@
|
|||||||
|
{%- from "templates/print_formats/standard_macros.html" import add_header -%}
|
||||||
|
<style>
|
||||||
|
.table-bordered td.top-bottom {border-top: none !important;border-bottom: none !important;}
|
||||||
|
.table-bordered td.right{border-right: none !important;}
|
||||||
|
.table-bordered td.left{border-left: none !important;}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<div class="page-break">
|
||||||
|
{%- if not doc.get("print_heading") and not doc.get("select_print_heading")
|
||||||
|
and doc.set("select_print_heading", _("Journal Entry")) -%}{%- endif -%}
|
||||||
|
{{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }}
|
||||||
|
<div class="row margin-bottom">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<table>
|
||||||
|
<tr><td><strong>Voucher No: </strong></td><td>{{ doc.name }}</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<table>
|
||||||
|
<tr><td><strong>Date: </strong></td><td>{{ frappe.utils.formatdate(doc.creation) }}</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="margin-top">
|
||||||
|
<table class="table table-bordered table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>Account</th>
|
||||||
|
<th>Party Type</th>
|
||||||
|
<th>Party</th>
|
||||||
|
<th>Amount</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="top-bottom" colspan="5"><strong>Credit</strong></td>
|
||||||
|
</tr>
|
||||||
|
{% set total_credit = 0 -%}
|
||||||
|
{% for entries in doc.gl_entries %}
|
||||||
|
{% if entries.debit == 0.0 %}
|
||||||
|
<tr>
|
||||||
|
<td class="right top-bottom">{{ entries.account }}</td>
|
||||||
|
<td class="right left top-bottom">{{ entries.party_type }}</td>
|
||||||
|
<td class="right left top-bottom">{{ entries.party }}</td>
|
||||||
|
<td class="left top-bottom">{{ entries.credit }}</td>
|
||||||
|
{% set total_credit = total_credit + entries.credit -%}
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="right" colspan="3"><strong>Total (credit) </strong></td>
|
||||||
|
<td class="left" >{{total_credit}}</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
<tr>
|
||||||
|
<td class="top-bottom" colspan="4"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="top-bottom" colspan="5"><strong>Debit</strong></td>
|
||||||
|
</tr>
|
||||||
|
{% set total_debit = 0 -%}
|
||||||
|
{% for entries in doc.gl_entries %}
|
||||||
|
{% if entries.credit == 0.0 %}
|
||||||
|
<tr>
|
||||||
|
<td class="right top-bottom">{{ entries.account }}</td>
|
||||||
|
<td class="right left top-bottom">{{ entries.party_type }}</td>
|
||||||
|
<td class="right left top-bottom">{{ entries.party }}</td>
|
||||||
|
{% set total_debit = total_debit + entries.debit -%}
|
||||||
|
<td class="left top-bottom">{{ entries.debit }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="right" colspan="3" ><strong>Total (debit) </strong></td>
|
||||||
|
<td class="left" >{{total_debit}}</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
<div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"align_labels_right": 0,
|
||||||
|
"creation": "2019-02-15 14:13:05.721784",
|
||||||
|
"custom_format": 0,
|
||||||
|
"default_print_language": "en",
|
||||||
|
"disabled": 0,
|
||||||
|
"doc_type": "Journal Entry",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Print Format",
|
||||||
|
"font": "Default",
|
||||||
|
"idx": 0,
|
||||||
|
"line_breaks": 0,
|
||||||
|
"modified": "2019-02-15 14:13:05.721784",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Accounts",
|
||||||
|
"name": "Journal Auditing Voucher",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"print_format_builder": 0,
|
||||||
|
"print_format_type": "Server",
|
||||||
|
"show_section_headings": 0,
|
||||||
|
"standard": "Yes"
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
{%- from "templates/print_formats/standard_macros.html" import add_header -%}
|
||||||
|
<div class="page-break">
|
||||||
|
{%- if not doc.get("print_heading") and not doc.get("select_print_heading")
|
||||||
|
and doc.set("select_print_heading", _("Purchase Invoice")) -%}{%- endif -%}
|
||||||
|
{{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }}
|
||||||
|
<div class="row margin-bottom">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<table>
|
||||||
|
<tr><td><strong>Supplier Name: </strong></td><td>{{ doc.supplier }}</td></tr>
|
||||||
|
<tr><td><strong>Due Date: </strong></td><td>{{ frappe.utils.formatdate(doc.due_date) }}</td></tr>
|
||||||
|
<tr><td><strong>Address: </strong></td><td>{{doc.address_display}}</td></tr>
|
||||||
|
<tr><td><strong>Contact: </strong></td><td>{{doc.contact_display}}</td></tr>
|
||||||
|
<tr><td><strong>Mobile no: </strong> </td><td>{{doc.contact_mobile}}</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<table>
|
||||||
|
<tr><td><strong>Voucher No: </strong></td><td>{{ doc.name }}</td></tr>
|
||||||
|
<tr><td><strong>Date: </strong></td><td>{{ frappe.utils.formatdate(doc.creation) }}</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="margin-top margin-bottom">
|
||||||
|
<table class="table table-bordered table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>SL</th>
|
||||||
|
<th>Item Code</th>
|
||||||
|
<th>Item Name</th>
|
||||||
|
<th>UOM</th>
|
||||||
|
<th>Received Qty.</th>
|
||||||
|
<th>Rejected Qty</th>
|
||||||
|
<th>Qty</th>
|
||||||
|
<th>Basic Rate</th>
|
||||||
|
<th>Amount</th>
|
||||||
|
</tr>
|
||||||
|
{% for item in doc.items %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ loop.index }}</td>
|
||||||
|
<td>{{ item.item_code }}</td>
|
||||||
|
<td>{{ item.item_name }}</td>
|
||||||
|
<td>{{ item.uom }}</td>
|
||||||
|
<td>{{ item.received_qty }}</td>
|
||||||
|
<td>{{ item.rejected_qty }}</td>
|
||||||
|
<td>{{ item.qty}}</td>
|
||||||
|
<td>{{ item.rate }}</td>
|
||||||
|
<td>{{ item.amount }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="row margin-bottom">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<table>
|
||||||
|
<tr><td><strong>Total Quantity: </strong></td><td>{{ doc.total_qty }}</td></tr>
|
||||||
|
<tr><td><strong>Total: </strong></td><td>{{doc.total}}</td></tr>
|
||||||
|
<tr><td><strong>Net Weight: </strong></td><td>{{ doc.total_net_weight }}</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<table>
|
||||||
|
<tr><td><strong>Tax and Charges: </strong></td><td>{{doc.taxes_and_charges}}</td></tr>
|
||||||
|
{% for tax in doc.taxes %}
|
||||||
|
<tr><td><strong>{{ tax.account_head }}: </strong></td><td>{{ tax.tax_amount_after_discount_amount }}</td></tr>
|
||||||
|
{% endfor %}
|
||||||
|
<tr><td><strong> Taxes and Charges Added: </strong></td><td>{{ doc.taxes_and_charges_added }}</td></tr>
|
||||||
|
<tr><td><strong> Taxes and Charges Deducted: </strong></td><td>{{ doc.taxes_and_charges_deducted }}</td></tr>
|
||||||
|
<tr><td><strong> Total Taxes and Charges: </strong></td><td>{{ doc.total_taxes_and_charges }}</td></tr>
|
||||||
|
<tr><td><strong> Net Payable: </strong></td><td>{{ doc.grand_total }}</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="margin-top">
|
||||||
|
<table class='table table-bordered table-condensed'>
|
||||||
|
<tr>
|
||||||
|
<th>SL</th>
|
||||||
|
<th>Account</th>
|
||||||
|
<th>Party Type</th>
|
||||||
|
<th>Party</th>
|
||||||
|
<th>Credit Amount</th>
|
||||||
|
<th>Debit Amount</th>
|
||||||
|
</tr>
|
||||||
|
{% for entries in doc.gl_entries %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ loop.index }}</td>
|
||||||
|
<td>{{ entries.account }}</td>
|
||||||
|
<td>{{ entries.party_type }}</td>
|
||||||
|
<td>{{ entries.party }}</td>
|
||||||
|
<td>{{ entries.credit }}</td>
|
||||||
|
<td>{{ entries.debit }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"><strong>Total</strong></td>
|
||||||
|
<td>{{ doc.grand_total|flt }}</td>
|
||||||
|
<td>{{ doc.grand_total|flt }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"align_labels_right": 0,
|
||||||
|
"creation": "2019-02-14 14:42:35.151611",
|
||||||
|
"custom_format": 0,
|
||||||
|
"default_print_language": "en",
|
||||||
|
"disabled": 0,
|
||||||
|
"doc_type": "Purchase Invoice",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Print Format",
|
||||||
|
"font": "Default",
|
||||||
|
"idx": 0,
|
||||||
|
"line_breaks": 0,
|
||||||
|
"modified": "2019-02-14 14:42:35.151611",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Accounts",
|
||||||
|
"name": "Purchase Auditing Voucher",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"print_format_builder": 0,
|
||||||
|
"print_format_type": "Server",
|
||||||
|
"show_section_headings": 0,
|
||||||
|
"standard": "Yes"
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
{%- from "templates/print_formats/standard_macros.html" import add_header -%}
|
||||||
|
<div class="page-break">
|
||||||
|
{%- if not doc.get("print_heading") and not doc.get("select_print_heading")
|
||||||
|
and doc.set("select_print_heading", _("Sales Invoice")) -%}{%- endif -%}
|
||||||
|
{{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }}
|
||||||
|
<div class="row margin-bottom">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<table>
|
||||||
|
<tr><td><strong>Customer Name: </strong></td><td>{{ doc.customer }}</td></tr>
|
||||||
|
<tr><td><strong>Due Date: </strong></td><td>{{ frappe.utils.formatdate(doc.due_date) }}</td></tr>
|
||||||
|
<tr><td><strong>Address: </strong></td><td>{{doc.address_display}}</td></tr>
|
||||||
|
<tr><td><strong>Contact: </strong></td><td>{{doc.contact_display}}</td></tr>
|
||||||
|
<tr><td><strong>Mobile no: </strong> </td><td>{{doc.contact_mobile}}</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<table>
|
||||||
|
<tr><td><strong>Voucher No: </strong></td><td>{{ doc.name }}</td></tr>
|
||||||
|
<tr><td><strong>Date: </strong></td><td>{{ frappe.utils.formatdate(doc.creation) }}</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="margin-top margin-bottom">
|
||||||
|
<table class="table table-bordered table-condensed">
|
||||||
|
<tr>
|
||||||
|
<th>SL</th>
|
||||||
|
<th>Item Code</th>
|
||||||
|
<th>Item Name</th>
|
||||||
|
<th>UOM</th>
|
||||||
|
<th>Quantity</th>
|
||||||
|
<th>Basic Rate</th>
|
||||||
|
<th>Amount</th>
|
||||||
|
</tr>
|
||||||
|
{% for item in doc.items %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ loop.index }}</td>
|
||||||
|
<td>{{ item.item_code }}</td>
|
||||||
|
<td>{{ item.item_name }}</td>
|
||||||
|
<td>{{ item.uom }}</td>
|
||||||
|
<td>{{ item.qty}}</td>
|
||||||
|
<td>{{ item.rate }}</td>
|
||||||
|
<td>{{ item.amount }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="row margin-bottom">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<table>
|
||||||
|
<tr><td><strong>Total Quantity: </strong></td><td>{{ doc.total_qty }}</td></tr>
|
||||||
|
<tr><td><strong>Total: </strong></td><td>{{doc.total}}</td></tr>
|
||||||
|
<tr><td><strong>Net Weight: </strong></td><td>{{ doc.total_net_weight }}</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<table>
|
||||||
|
<tr><td><strong>Tax and Charges: </strong></td><td>{{doc.taxes_and_charges}}</td></tr>
|
||||||
|
{% for tax in doc.taxes %}
|
||||||
|
<tr><td><strong>{{ tax.account_head }}: </strong></td><td>{{ tax.tax_amount_after_discount_amount }}</td></tr>
|
||||||
|
{% endfor %}
|
||||||
|
<tr><td><strong> Total Taxes and Charges: </strong></td><td>{{ doc.total_taxes_and_charges }}</td></tr>
|
||||||
|
<tr><td><strong> Net Payable: </strong></td><td>{{ doc.grand_total }}</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="margin-top">
|
||||||
|
<table class='table table-bordered table-condensed'>
|
||||||
|
<tr>
|
||||||
|
<th>SL</th>
|
||||||
|
<th>Account</th>
|
||||||
|
<th>Party Type</th>
|
||||||
|
<th>Party</th>
|
||||||
|
<th>Credit Amount</th>
|
||||||
|
<th>Debit Amount</th>
|
||||||
|
</tr>
|
||||||
|
{% for entries in doc.gl_entries %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ loop.index }}</td>
|
||||||
|
<td>{{ entries.account }}</td>
|
||||||
|
<td>{{ entries.party_type }}</td>
|
||||||
|
<td>{{ entries.party }}</td>
|
||||||
|
<td>{{ entries.credit }}</td>
|
||||||
|
<td>{{ entries.debit }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"><strong>Total</strong></td>
|
||||||
|
<td>{{ doc.grand_total|flt }}</td>
|
||||||
|
<td>{{ doc.grand_total|flt }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"align_labels_right": 0,
|
||||||
|
"creation": "2019-02-15 15:02:51.454754",
|
||||||
|
"custom_format": 0,
|
||||||
|
"default_print_language": "en",
|
||||||
|
"disabled": 0,
|
||||||
|
"doc_type": "Sales Invoice",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Print Format",
|
||||||
|
"font": "Default",
|
||||||
|
"idx": 0,
|
||||||
|
"line_breaks": 0,
|
||||||
|
"modified": "2019-02-15 15:02:51.454754",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Accounts",
|
||||||
|
"name": "Sales Auditing Voucher",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"print_format_builder": 0,
|
||||||
|
"print_format_type": "Server",
|
||||||
|
"show_section_headings": 0,
|
||||||
|
"standard": "Yes"
|
||||||
|
}
|
||||||
@@ -495,6 +495,7 @@ class ReceivablePayableReport(object):
|
|||||||
values.append(self.filters.get(party_type_field))
|
values.append(self.filters.get(party_type_field))
|
||||||
|
|
||||||
if party_type_field=="customer":
|
if party_type_field=="customer":
|
||||||
|
account_type = "Receivable"
|
||||||
if self.filters.get("customer_group"):
|
if self.filters.get("customer_group"):
|
||||||
lft, rgt = frappe.db.get_value("Customer Group",
|
lft, rgt = frappe.db.get_value("Customer Group",
|
||||||
self.filters.get("customer_group"), ["lft", "rgt"])
|
self.filters.get("customer_group"), ["lft", "rgt"])
|
||||||
@@ -529,12 +530,18 @@ class ReceivablePayableReport(object):
|
|||||||
or (steam.parent = against_voucher and steam.parenttype = against_voucher_type)
|
or (steam.parent = against_voucher and steam.parenttype = against_voucher_type)
|
||||||
or (steam.parent = party and steam.parenttype = 'Customer')))""".format(lft, rgt))
|
or (steam.parent = party and steam.parenttype = 'Customer')))""".format(lft, rgt))
|
||||||
|
|
||||||
if party_type_field=="supplier":
|
elif party_type_field=="supplier":
|
||||||
|
account_type = "Payable"
|
||||||
if self.filters.get("supplier_group"):
|
if self.filters.get("supplier_group"):
|
||||||
conditions.append("""party in (select name from tabSupplier
|
conditions.append("""party in (select name from tabSupplier
|
||||||
where supplier_group=%s)""")
|
where supplier_group=%s)""")
|
||||||
values.append(self.filters.get("supplier_group"))
|
values.append(self.filters.get("supplier_group"))
|
||||||
|
|
||||||
|
accounts = [d.name for d in frappe.get_all("Account",
|
||||||
|
filters={"account_type": account_type, "company": self.filters.company})]
|
||||||
|
conditions.append("account in (%s)" % ','.join(['%s'] *len(accounts)))
|
||||||
|
values += accounts
|
||||||
|
|
||||||
return " and ".join(conditions), values
|
return " and ".join(conditions), values
|
||||||
|
|
||||||
def get_gl_entries_for(self, party, party_type, against_voucher_type, against_voucher):
|
def get_gl_entries_for(self, party, party_type, against_voucher_type, against_voucher):
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
height: 37px;
|
height: 37px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{% var letterhead= filters.letter_head || (frappe.get_doc(":Company", filters.company) && frappe.get_doc(":Company", filters.company).default_letter_head) || frappe.defaults.get_default("letter_head"); %}
|
{% var letterhead= filters.letter_head || (frappe.get_doc(":Company", filters.company) && frappe.get_doc(":Company", filters.company).default_letter_head) %}
|
||||||
{% if(letterhead) { %}
|
{% if(letterhead) { %}
|
||||||
<div style="margin-bottom: 7px;" class="text-center">
|
<div style="margin-bottom: 7px;" class="text-center">
|
||||||
{%= frappe.boot.letter_heads[letterhead].header %}
|
{%= frappe.boot.letter_heads[letterhead].header %}
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ def get_label(periodicity, from_date, to_date):
|
|||||||
def get_data(
|
def get_data(
|
||||||
company, root_type, balance_must_be, period_list, filters=None,
|
company, root_type, balance_must_be, period_list, filters=None,
|
||||||
accumulated_values=1, only_current_fiscal_year=True, ignore_closing_entries=False,
|
accumulated_values=1, only_current_fiscal_year=True, ignore_closing_entries=False,
|
||||||
ignore_accumulated_values_for_fy=False):
|
ignore_accumulated_values_for_fy=False , total = True):
|
||||||
|
|
||||||
accounts = get_accounts(company, root_type)
|
accounts = get_accounts(company, root_type)
|
||||||
if not accounts:
|
if not accounts:
|
||||||
@@ -154,7 +154,7 @@ def get_data(
|
|||||||
out = prepare_data(accounts, balance_must_be, period_list, company_currency)
|
out = prepare_data(accounts, balance_must_be, period_list, company_currency)
|
||||||
out = filter_out_zero_value_rows(out, parent_children_map)
|
out = filter_out_zero_value_rows(out, parent_children_map)
|
||||||
|
|
||||||
if out:
|
if out and total:
|
||||||
add_total_row(out, root_type, balance_must_be, period_list, company_currency)
|
add_total_row(out, root_type, balance_must_be, period_list, company_currency)
|
||||||
|
|
||||||
return out
|
return out
|
||||||
@@ -218,6 +218,9 @@ def prepare_data(accounts, balance_must_be, period_list, company_currency):
|
|||||||
"year_start_date": year_start_date,
|
"year_start_date": year_start_date,
|
||||||
"year_end_date": year_end_date,
|
"year_end_date": year_end_date,
|
||||||
"currency": company_currency,
|
"currency": company_currency,
|
||||||
|
"include_in_gross": d.include_in_gross,
|
||||||
|
"account_type": d.account_type,
|
||||||
|
"is_group": d.is_group,
|
||||||
"opening_balance": d.get("opening_balance", 0.0) * (1 if balance_must_be=="Debit" else -1),
|
"opening_balance": d.get("opening_balance", 0.0) * (1 if balance_must_be=="Debit" else -1),
|
||||||
"account_name": ('%s - %s' %(_(d.account_number), _(d.account_name))
|
"account_name": ('%s - %s' %(_(d.account_number), _(d.account_name))
|
||||||
if d.account_number else _(d.account_name))
|
if d.account_number else _(d.account_name))
|
||||||
@@ -270,7 +273,7 @@ def add_total_row(out, root_type, balance_must_be, period_list, company_currency
|
|||||||
for period in period_list:
|
for period in period_list:
|
||||||
total_row.setdefault(period.key, 0.0)
|
total_row.setdefault(period.key, 0.0)
|
||||||
total_row[period.key] += row.get(period.key, 0.0)
|
total_row[period.key] += row.get(period.key, 0.0)
|
||||||
row[period.key] = 0.0
|
row[period.key] = row.get(period.key, 0.0)
|
||||||
|
|
||||||
total_row.setdefault("total", 0.0)
|
total_row.setdefault("total", 0.0)
|
||||||
total_row["total"] += flt(row["total"])
|
total_row["total"] += flt(row["total"])
|
||||||
@@ -285,7 +288,7 @@ def add_total_row(out, root_type, balance_must_be, period_list, company_currency
|
|||||||
|
|
||||||
def get_accounts(company, root_type):
|
def get_accounts(company, root_type):
|
||||||
return frappe.db.sql("""
|
return frappe.db.sql("""
|
||||||
select name, account_number, parent_account, lft, rgt, root_type, report_type, account_name
|
select name, account_number, parent_account, lft, rgt, root_type, report_type, account_name, include_in_gross, account_type, is_group, lft, rgt
|
||||||
from `tabAccount`
|
from `tabAccount`
|
||||||
where company=%s and root_type=%s order by lft""", (company, root_type), as_dict=True)
|
where company=%s and root_type=%s order by lft""", (company, root_type), as_dict=True)
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ def validate_filters(filters, account_details):
|
|||||||
frappe.throw(_("Can not filter based on Account, if grouped by Account"))
|
frappe.throw(_("Can not filter based on Account, if grouped by Account"))
|
||||||
|
|
||||||
if (filters.get("voucher_no")
|
if (filters.get("voucher_no")
|
||||||
and filters.get("group_by") in [_('Group by Voucher'), _('Group by Voucher (Consolidated)')]):
|
and filters.get("group_by") in [_('Group by Voucher')]):
|
||||||
frappe.throw(_("Can not filter based on Voucher No, if grouped by Voucher"))
|
frappe.throw(_("Can not filter based on Voucher No, if grouped by Voucher"))
|
||||||
|
|
||||||
if filters.from_date > filters.to_date:
|
if filters.from_date > filters.to_date:
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
{% include "accounts/report/financial_statements.html" %}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
frappe.query_reports["Gross and Net Profit Report"] = {
|
||||||
|
"filters": [
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
frappe.require("assets/erpnext/js/financial_statements.js", function() {
|
||||||
|
frappe.query_reports["Gross and Net Profit Report"] = $.extend({},
|
||||||
|
erpnext.financial_statements);
|
||||||
|
|
||||||
|
frappe.query_reports["Gross and Net Profit Report"]["filters"].push(
|
||||||
|
{
|
||||||
|
"fieldname":"project",
|
||||||
|
"label": __("Project"),
|
||||||
|
"fieldtype": "MultiSelect",
|
||||||
|
get_data: function() {
|
||||||
|
var projects = frappe.query_report.get_filter_value("project") || "";
|
||||||
|
|
||||||
|
const values = projects.split(/\s*,\s*/).filter(d => d);
|
||||||
|
const txt = projects.match(/[^,\s*]*$/)[0] || '';
|
||||||
|
let data = [];
|
||||||
|
|
||||||
|
frappe.call({
|
||||||
|
type: "GET",
|
||||||
|
method:'frappe.desk.search.search_link',
|
||||||
|
async: false,
|
||||||
|
no_spinner: true,
|
||||||
|
args: {
|
||||||
|
doctype: "Project",
|
||||||
|
txt: txt,
|
||||||
|
filters: {
|
||||||
|
"name": ["not in", values]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
callback: function(r) {
|
||||||
|
data = r.results;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "accumulated_values",
|
||||||
|
"label": __("Accumulated Values"),
|
||||||
|
"fieldtype": "Check"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"add_total_row": 0,
|
||||||
|
"creation": "2019-02-08 10:58:55.763090",
|
||||||
|
"disable_prepared_report": 0,
|
||||||
|
"disabled": 0,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Report",
|
||||||
|
"idx": 0,
|
||||||
|
"is_standard": "Yes",
|
||||||
|
"modified": "2019-02-08 10:58:55.763090",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Accounts",
|
||||||
|
"name": "Gross and Net Profit Report",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"prepared_report": 0,
|
||||||
|
"ref_doctype": "GL Entry",
|
||||||
|
"report_name": "Gross and Net Profit Report",
|
||||||
|
"report_type": "Script Report",
|
||||||
|
"roles": [
|
||||||
|
{
|
||||||
|
"role": "Accounts User"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "Accounts Manager"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "Auditor"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,154 @@
|
|||||||
|
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
from frappe import _
|
||||||
|
from frappe.utils import flt
|
||||||
|
from erpnext.accounts.report.financial_statements import (get_period_list, get_columns, get_data)
|
||||||
|
import copy
|
||||||
|
|
||||||
|
|
||||||
|
def execute(filters=None):
|
||||||
|
period_list = get_period_list(filters.from_fiscal_year, filters.to_fiscal_year,
|
||||||
|
filters.periodicity, filters.accumulated_values, filters.company)
|
||||||
|
|
||||||
|
columns, data = [], []
|
||||||
|
|
||||||
|
income = get_data(filters.company, "Income", "Credit", period_list, filters = filters,
|
||||||
|
accumulated_values=filters.accumulated_values,
|
||||||
|
ignore_closing_entries=True, ignore_accumulated_values_for_fy= True, total= False)
|
||||||
|
|
||||||
|
expense = get_data(filters.company, "Expense", "Debit", period_list, filters=filters,
|
||||||
|
accumulated_values=filters.accumulated_values,
|
||||||
|
ignore_closing_entries=True, ignore_accumulated_values_for_fy= True, total= False)
|
||||||
|
|
||||||
|
columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company)
|
||||||
|
|
||||||
|
|
||||||
|
gross_income = get_revenue(income, period_list)
|
||||||
|
|
||||||
|
gross_expense = get_revenue(expense, period_list)
|
||||||
|
|
||||||
|
if(len(gross_income)==0 and len(gross_expense)== 0):
|
||||||
|
data.append({"account_name": "'" + _("Nothing is included in gross") + "'",
|
||||||
|
"account": "'" + _("Nothing is included in gross") + "'"})
|
||||||
|
|
||||||
|
return columns, data
|
||||||
|
|
||||||
|
data.append({"account_name": "'" + _("Included in Gross Profit") + "'",
|
||||||
|
"account": "'" + _("Included in Gross Profit") + "'"})
|
||||||
|
|
||||||
|
data.append({})
|
||||||
|
data.extend(gross_income or [])
|
||||||
|
|
||||||
|
data.append({})
|
||||||
|
data.extend(gross_expense or [])
|
||||||
|
|
||||||
|
data.append({})
|
||||||
|
gross_profit = get_profit(gross_income, gross_expense, period_list, filters.company, 'Gross Profit',filters.presentation_currency)
|
||||||
|
data.append(gross_profit)
|
||||||
|
|
||||||
|
non_gross_income = get_revenue(income, period_list, 0)
|
||||||
|
data.append({})
|
||||||
|
data.extend(non_gross_income or [])
|
||||||
|
|
||||||
|
non_gross_expense = get_revenue(expense, period_list, 0)
|
||||||
|
data.append({})
|
||||||
|
data.extend(non_gross_expense or [])
|
||||||
|
|
||||||
|
net_profit = get_net_profit(non_gross_income, gross_income, gross_expense, non_gross_expense, period_list, filters.company,filters.presentation_currency)
|
||||||
|
data.append({})
|
||||||
|
data.append(net_profit)
|
||||||
|
|
||||||
|
return columns, data
|
||||||
|
|
||||||
|
def get_revenue(data, period_list, include_in_gross=1):
|
||||||
|
revenue = [item for item in data if item['include_in_gross']==include_in_gross or item['is_group']==1]
|
||||||
|
|
||||||
|
data_to_be_removed =True
|
||||||
|
while data_to_be_removed:
|
||||||
|
revenue, data_to_be_removed = remove_parent_with_no_child(revenue, period_list)
|
||||||
|
revenue = adjust_account(revenue, period_list)
|
||||||
|
return copy.deepcopy(revenue)
|
||||||
|
|
||||||
|
def remove_parent_with_no_child(data, period_list):
|
||||||
|
data_to_be_removed = False
|
||||||
|
for parent in data:
|
||||||
|
if 'is_group' in parent and parent.get("is_group") == 1:
|
||||||
|
have_child = False
|
||||||
|
for child in data:
|
||||||
|
if 'parent_account' in child and child.get("parent_account") == parent.get("account"):
|
||||||
|
have_child = True
|
||||||
|
break
|
||||||
|
|
||||||
|
if not have_child:
|
||||||
|
data_to_be_removed = True
|
||||||
|
data.remove(parent)
|
||||||
|
|
||||||
|
return data, data_to_be_removed
|
||||||
|
|
||||||
|
def adjust_account(data, period_list, consolidated= False):
|
||||||
|
leaf_nodes = [item for item in data if item['is_group'] == 0]
|
||||||
|
totals = {}
|
||||||
|
for node in leaf_nodes:
|
||||||
|
set_total(node, node["total"], data, totals)
|
||||||
|
for d in data:
|
||||||
|
for period in period_list:
|
||||||
|
key = period if consolidated else period.key
|
||||||
|
d[key] = totals[d["account"]]
|
||||||
|
d['total'] = totals[d["account"]]
|
||||||
|
return data
|
||||||
|
|
||||||
|
def set_total(node, value, complete_list, totals):
|
||||||
|
if not totals.get(node['account']):
|
||||||
|
totals[node["account"]] = 0
|
||||||
|
totals[node["account"]] += value
|
||||||
|
|
||||||
|
parent = node['parent_account']
|
||||||
|
if not parent == '':
|
||||||
|
return set_total(next(item for item in complete_list if item['account'] == parent), value, complete_list, totals)
|
||||||
|
|
||||||
|
|
||||||
|
def get_profit(gross_income, gross_expense, period_list, company, profit_type, currency=None, consolidated=False):
|
||||||
|
|
||||||
|
profit_loss = {
|
||||||
|
"account_name": "'" + _(profit_type) + "'",
|
||||||
|
"account": "'" + _(profit_type) + "'",
|
||||||
|
"warn_if_negative": True,
|
||||||
|
"currency": currency or frappe.get_cached_value('Company', company, "default_currency")
|
||||||
|
}
|
||||||
|
|
||||||
|
has_value = False
|
||||||
|
|
||||||
|
for period in period_list:
|
||||||
|
key = period if consolidated else period.key
|
||||||
|
profit_loss[key] = flt(gross_income[0].get(key, 0)) - flt(gross_expense[0].get(key, 0))
|
||||||
|
|
||||||
|
if profit_loss[key]:
|
||||||
|
has_value=True
|
||||||
|
|
||||||
|
if has_value:
|
||||||
|
return profit_loss
|
||||||
|
|
||||||
|
def get_net_profit(non_gross_income, gross_income, gross_expense, non_gross_expense, period_list, company, currency=None, consolidated=False):
|
||||||
|
profit_loss = {
|
||||||
|
"account_name": "'" + _("Net Profit") + "'",
|
||||||
|
"account": "'" + _("Net Profit") + "'",
|
||||||
|
"warn_if_negative": True,
|
||||||
|
"currency": currency or frappe.get_cached_value('Company', company, "default_currency")
|
||||||
|
}
|
||||||
|
|
||||||
|
has_value = False
|
||||||
|
|
||||||
|
for period in period_list:
|
||||||
|
key = period if consolidated else period.key
|
||||||
|
total_income = flt(gross_income[0].get(key, 0)) + flt(non_gross_income[0].get(key, 0))
|
||||||
|
total_expense = flt(gross_expense[0].get(key, 0)) + flt(non_gross_expense[0].get(key, 0))
|
||||||
|
profit_loss[key] = flt(total_income) - flt(total_expense)
|
||||||
|
|
||||||
|
if profit_loss[key]:
|
||||||
|
has_value=True
|
||||||
|
|
||||||
|
if has_value:
|
||||||
|
return profit_loss
|
||||||
@@ -6,7 +6,7 @@ import frappe
|
|||||||
from frappe import _, scrub
|
from frappe import _, scrub
|
||||||
from erpnext.stock.utils import get_incoming_rate
|
from erpnext.stock.utils import get_incoming_rate
|
||||||
from erpnext.controllers.queries import get_match_cond
|
from erpnext.controllers.queries import get_match_cond
|
||||||
from frappe.utils import flt
|
from frappe.utils import flt, cint
|
||||||
|
|
||||||
|
|
||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
@@ -106,11 +106,14 @@ class GrossProfitGenerator(object):
|
|||||||
self.grouped = {}
|
self.grouped = {}
|
||||||
self.grouped_data = []
|
self.grouped_data = []
|
||||||
|
|
||||||
|
self.currency_precision = cint(frappe.db.get_default("currency_precision")) or 3
|
||||||
|
self.float_precision = cint(frappe.db.get_default("float_precision")) or 2
|
||||||
|
|
||||||
for row in self.si_list:
|
for row in self.si_list:
|
||||||
if self.skip_row(row, self.product_bundles):
|
if self.skip_row(row, self.product_bundles):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
row.base_amount = flt(row.base_net_amount)
|
row.base_amount = flt(row.base_net_amount, self.currency_precision)
|
||||||
|
|
||||||
product_bundles = []
|
product_bundles = []
|
||||||
if row.update_stock:
|
if row.update_stock:
|
||||||
@@ -129,15 +132,15 @@ class GrossProfitGenerator(object):
|
|||||||
|
|
||||||
# get buying rate
|
# get buying rate
|
||||||
if row.qty:
|
if row.qty:
|
||||||
row.buying_rate = row.buying_amount / row.qty
|
row.buying_rate = flt(row.buying_amount / row.qty, self.float_precision)
|
||||||
row.base_rate = row.base_amount / row.qty
|
row.base_rate = flt(row.base_amount / row.qty, self.float_precision)
|
||||||
else:
|
else:
|
||||||
row.buying_rate, row.base_rate = 0.0, 0.0
|
row.buying_rate, row.base_rate = 0.0, 0.0
|
||||||
|
|
||||||
# calculate gross profit
|
# calculate gross profit
|
||||||
row.gross_profit = row.base_amount - row.buying_amount
|
row.gross_profit = flt(row.base_amount - row.buying_amount, self.currency_precision)
|
||||||
if row.base_amount:
|
if row.base_amount:
|
||||||
row.gross_profit_percent = (row.gross_profit / row.base_amount) * 100.0
|
row.gross_profit_percent = flt((row.gross_profit / row.base_amount) * 100.0, self.currency_precision)
|
||||||
else:
|
else:
|
||||||
row.gross_profit_percent = 0.0
|
row.gross_profit_percent = 0.0
|
||||||
|
|
||||||
@@ -156,8 +159,8 @@ class GrossProfitGenerator(object):
|
|||||||
new_row = row
|
new_row = row
|
||||||
else:
|
else:
|
||||||
new_row.qty += row.qty
|
new_row.qty += row.qty
|
||||||
new_row.buying_amount += row.buying_amount
|
new_row.buying_amount += flt(row.buying_amount, self.currency_precision)
|
||||||
new_row.base_amount += row.base_amount
|
new_row.base_amount += flt(row.base_amount, self.currency_precision)
|
||||||
new_row = self.set_average_rate(new_row)
|
new_row = self.set_average_rate(new_row)
|
||||||
self.grouped_data.append(new_row)
|
self.grouped_data.append(new_row)
|
||||||
else:
|
else:
|
||||||
@@ -167,18 +170,19 @@ class GrossProfitGenerator(object):
|
|||||||
returned_item_rows = self.returned_invoices[row.parent][row.item_code]
|
returned_item_rows = self.returned_invoices[row.parent][row.item_code]
|
||||||
for returned_item_row in returned_item_rows:
|
for returned_item_row in returned_item_rows:
|
||||||
row.qty += returned_item_row.qty
|
row.qty += returned_item_row.qty
|
||||||
row.base_amount += returned_item_row.base_amount
|
row.base_amount += flt(returned_item_row.base_amount, self.currency_precision)
|
||||||
row.buying_amount = row.qty * row.buying_rate
|
row.buying_amount = flt(row.qty * row.buying_rate, self.currency_precision)
|
||||||
if row.qty or row.base_amount:
|
if row.qty or row.base_amount:
|
||||||
row = self.set_average_rate(row)
|
row = self.set_average_rate(row)
|
||||||
self.grouped_data.append(row)
|
self.grouped_data.append(row)
|
||||||
|
|
||||||
def set_average_rate(self, new_row):
|
def set_average_rate(self, new_row):
|
||||||
new_row.gross_profit = new_row.base_amount - new_row.buying_amount
|
new_row.gross_profit = flt(new_row.base_amount - new_row.buying_amount, self.currency_precision)
|
||||||
new_row.gross_profit_percent = ((new_row.gross_profit / new_row.base_amount) * 100.0) \
|
new_row.gross_profit_percent = flt(((new_row.gross_profit / new_row.base_amount) * 100.0), self.currency_precision) \
|
||||||
if new_row.base_amount else 0
|
if new_row.base_amount else 0
|
||||||
new_row.buying_rate = (new_row.buying_amount / new_row.qty) if new_row.qty else 0
|
new_row.buying_rate = flt(new_row.buying_amount / new_row.qty, self.float_precision) if new_row.qty else 0
|
||||||
new_row.base_rate = (new_row.base_amount / new_row.qty) if new_row.qty else 0
|
new_row.base_rate = flt(new_row.base_amount / new_row.qty, self.float_precision) if new_row.qty else 0
|
||||||
|
|
||||||
return new_row
|
return new_row
|
||||||
|
|
||||||
def get_returned_invoice_items(self):
|
def get_returned_invoice_items(self):
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -9,14 +9,17 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Crop",
|
"name": "Crop",
|
||||||
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Crop Cycle",
|
"name": "Crop Cycle",
|
||||||
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Location"
|
"name": "Location",
|
||||||
|
"onboard": 1,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -26,10 +29,12 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Disease",
|
"name": "Disease",
|
||||||
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Fertilizer",
|
"name": "Fertilizer",
|
||||||
|
"onboard": 1,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ def get_data():
|
|||||||
"name": "Item Price",
|
"name": "Item Price",
|
||||||
"description": _("Multiple Item prices."),
|
"description": _("Multiple Item prices."),
|
||||||
"onboard": 1,
|
"onboard": 1,
|
||||||
"route": "Report/Item Price"
|
"route": "#Report/Item Price"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
@@ -84,7 +84,7 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Buying Settings",
|
"name": "Buying Settings",
|
||||||
"onboard": 1,
|
"settings": 1,
|
||||||
"description": _("Default settings for buying transactions.")
|
"description": _("Default settings for buying transactions.")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ def get_data():
|
|||||||
"color": "#1abc9c",
|
"color": "#1abc9c",
|
||||||
"icon": "fa fa-check-square-o",
|
"icon": "fa fa-check-square-o",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
"disable_after_onboard": 1,
|
||||||
"description": "Dive into the basics for your organisation's needs."
|
"description": "Dive into the basics for your organisation's needs.",
|
||||||
|
"onboard_present": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"module_name": "Accounting",
|
"module_name": "Accounting",
|
||||||
@@ -23,7 +24,6 @@ def get_data():
|
|||||||
"color": "#3498db",
|
"color": "#3498db",
|
||||||
"icon": "octicon octicon-repo",
|
"icon": "octicon octicon-repo",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Accounts, billing, payments, cost center and budgeting."
|
"description": "Accounts, billing, payments, cost center and budgeting."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -33,7 +33,6 @@ def get_data():
|
|||||||
"color": "#1abc9c",
|
"color": "#1abc9c",
|
||||||
"icon": "octicon octicon-tag",
|
"icon": "octicon octicon-tag",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Sales orders, quotations, customers and items."
|
"description": "Sales orders, quotations, customers and items."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -43,7 +42,6 @@ def get_data():
|
|||||||
"color": "#c0392b",
|
"color": "#c0392b",
|
||||||
"icon": "octicon octicon-briefcase",
|
"icon": "octicon octicon-briefcase",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Purchasing, suppliers, material requests, and items."
|
"description": "Purchasing, suppliers, material requests, and items."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -53,7 +51,6 @@ def get_data():
|
|||||||
"color": "#f39c12",
|
"color": "#f39c12",
|
||||||
"icon": "octicon octicon-package",
|
"icon": "octicon octicon-package",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Stock transactions, reports, serial numbers and batches."
|
"description": "Stock transactions, reports, serial numbers and batches."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -62,7 +59,6 @@ def get_data():
|
|||||||
"label": _("Assets"),
|
"label": _("Assets"),
|
||||||
"color": "#4286f4",
|
"color": "#4286f4",
|
||||||
"icon": "octicon octicon-database",
|
"icon": "octicon octicon-database",
|
||||||
"hidden": 1,
|
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "Asset movement, maintainance and tools."
|
"description": "Asset movement, maintainance and tools."
|
||||||
},
|
},
|
||||||
@@ -73,7 +69,6 @@ def get_data():
|
|||||||
"color": "#8e44ad",
|
"color": "#8e44ad",
|
||||||
"icon": "octicon octicon-rocket",
|
"icon": "octicon octicon-rocket",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Updates, Timesheets and Activities."
|
"description": "Updates, Timesheets and Activities."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -83,7 +78,6 @@ def get_data():
|
|||||||
"color": "#EF4DB6",
|
"color": "#EF4DB6",
|
||||||
"icon": "octicon octicon-broadcast",
|
"icon": "octicon octicon-broadcast",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Sales pipeline, leads, opportunities and customers."
|
"description": "Sales pipeline, leads, opportunities and customers."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -93,7 +87,6 @@ def get_data():
|
|||||||
"color": "#1abc9c",
|
"color": "#1abc9c",
|
||||||
"icon": "fa fa-check-square-o",
|
"icon": "fa fa-check-square-o",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "User interactions, support issues and knowledge base."
|
"description": "User interactions, support issues and knowledge base."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -103,7 +96,6 @@ def get_data():
|
|||||||
"color": "#2ecc71",
|
"color": "#2ecc71",
|
||||||
"icon": "octicon octicon-organization",
|
"icon": "octicon octicon-organization",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Employees, attendance, payroll, leaves and shifts."
|
"description": "Employees, attendance, payroll, leaves and shifts."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -113,7 +105,6 @@ def get_data():
|
|||||||
"color": "#1abc9c",
|
"color": "#1abc9c",
|
||||||
"icon": "fa fa-check-square-o",
|
"icon": "fa fa-check-square-o",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Quality goals, procedures, reviews and action."
|
"description": "Quality goals, procedures, reviews and action."
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -126,7 +117,6 @@ def get_data():
|
|||||||
"color": "#7f8c8d",
|
"color": "#7f8c8d",
|
||||||
"icon": "octicon octicon-tools",
|
"icon": "octicon octicon-tools",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "BOMS, work orders, operations, and timesheets."
|
"description": "BOMS, work orders, operations, and timesheets."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -136,7 +126,6 @@ def get_data():
|
|||||||
"color": "#7f8c8d",
|
"color": "#7f8c8d",
|
||||||
"icon": "octicon octicon-credit-card",
|
"icon": "octicon octicon-credit-card",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Point of Sale and cashier closing."
|
"description": "Point of Sale and cashier closing."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -146,7 +135,6 @@ def get_data():
|
|||||||
"color": "#428B46",
|
"color": "#428B46",
|
||||||
"icon": "octicon octicon-mortar-board",
|
"icon": "octicon octicon-mortar-board",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Student admissions, fees, courses and scores."
|
"description": "Student admissions, fees, courses and scores."
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -157,7 +145,6 @@ def get_data():
|
|||||||
"color": "#FF888B",
|
"color": "#FF888B",
|
||||||
"icon": "fa fa-heartbeat",
|
"icon": "fa fa-heartbeat",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Patient appointments, procedures and tests."
|
"description": "Patient appointments, procedures and tests."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -167,7 +154,6 @@ def get_data():
|
|||||||
"color": "#8BC34A",
|
"color": "#8BC34A",
|
||||||
"icon": "octicon octicon-globe",
|
"icon": "octicon octicon-globe",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Crop cycles, land areas, soil and plant analysis."
|
"description": "Crop cycles, land areas, soil and plant analysis."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -177,7 +163,6 @@ def get_data():
|
|||||||
"color": "#EA81E8",
|
"color": "#EA81E8",
|
||||||
"icon": "fa fa-bed",
|
"icon": "fa fa-bed",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Hotel rooms, pricing, reservation and amenities."
|
"description": "Hotel rooms, pricing, reservation and amenities."
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -188,7 +173,6 @@ def get_data():
|
|||||||
"color": "#DE2B37",
|
"color": "#DE2B37",
|
||||||
"icon": "octicon octicon-heart",
|
"icon": "octicon octicon-heart",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Volunteers, memberships, grants and chapters."
|
"description": "Volunteers, memberships, grants and chapters."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -200,17 +184,16 @@ def get_data():
|
|||||||
"_doctype": "Restaurant",
|
"_doctype": "Restaurant",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"link": "List/Restaurant",
|
"link": "List/Restaurant",
|
||||||
"hidden": 1,
|
|
||||||
"description": "Menu, Orders and Table Reservations."
|
"description": "Menu, Orders and Table Reservations."
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"module_name": "Learn",
|
"module_name": "Help",
|
||||||
"category": "Administration",
|
"category": "Administration",
|
||||||
"label": _("Learn"),
|
"label": _("Learn"),
|
||||||
"color": "#FF888B",
|
"color": "#FF888B",
|
||||||
"icon": "octicon octicon-device-camera-video",
|
"icon": "octicon octicon-device-camera-video",
|
||||||
|
"type": "module",
|
||||||
"is_help": True,
|
"is_help": True,
|
||||||
"description": "Explore Help Articles and Videos."
|
"description": "Explore Help Articles and Videos."
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ def get_data():
|
|||||||
"items": [
|
"items": [
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Student"
|
"name": "Student",
|
||||||
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
@@ -172,7 +173,7 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Course Schedule",
|
"name": "Course Schedule",
|
||||||
"route": "List/Course Schedule/Calendar"
|
"route": "#List/Course Schedule/Calendar"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
@@ -185,7 +186,11 @@ def get_data():
|
|||||||
"items": [
|
"items": [
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Program"
|
"name": "Program",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Course",
|
||||||
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
@@ -193,11 +198,16 @@ def get_data():
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Topic"
|
"name": "Topic",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Instructor",
|
||||||
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Room"
|
"name": "Room",
|
||||||
|
"onboard": 1,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -248,7 +258,8 @@ def get_data():
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Grading Scale"
|
"name": "Grading Scale",
|
||||||
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
|
|||||||
@@ -76,11 +76,13 @@ def get_data():
|
|||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Patient",
|
"name": "Patient",
|
||||||
"label": _("Patient"),
|
"label": _("Patient"),
|
||||||
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Healthcare Practitioner",
|
"name": "Healthcare Practitioner",
|
||||||
"label": _("Healthcare Practitioner"),
|
"label": _("Healthcare Practitioner"),
|
||||||
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
@@ -96,6 +98,7 @@ def get_data():
|
|||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Medical Code",
|
"name": "Medical Code",
|
||||||
"label": _("Medical Code"),
|
"label": _("Medical Code"),
|
||||||
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
@@ -112,6 +115,7 @@ def get_data():
|
|||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Healthcare Settings",
|
"name": "Healthcare Settings",
|
||||||
"label": _("Healthcare Settings"),
|
"label": _("Healthcare Settings"),
|
||||||
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ def get_data():
|
|||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Chapter",
|
"name": "Chapter",
|
||||||
"description": _("Chapter information."),
|
"description": _("Chapter information."),
|
||||||
|
"onboard": 1,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -21,11 +22,13 @@ def get_data():
|
|||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Member",
|
"name": "Member",
|
||||||
"description": _("Member information."),
|
"description": _("Member information."),
|
||||||
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Membership",
|
"name": "Membership",
|
||||||
"description": _("Memebership Details"),
|
"description": _("Memebership Details"),
|
||||||
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
@@ -41,6 +44,7 @@ def get_data():
|
|||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Volunteer",
|
"name": "Volunteer",
|
||||||
"description": _("Volunteer information."),
|
"description": _("Volunteer information."),
|
||||||
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Task",
|
"name": "Task",
|
||||||
"route": "List/Task",
|
"route": "#List/Task",
|
||||||
"description": _("Project activity / task."),
|
"description": _("Project activity / task."),
|
||||||
"onboard": 1,
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "report",
|
"type": "report",
|
||||||
"route": "List/Task/Gantt",
|
"route": "#List/Task/Gantt",
|
||||||
"doctype": "Task",
|
"doctype": "Task",
|
||||||
"name": "Gantt Chart",
|
"name": "Gantt Chart",
|
||||||
"description": _("Gantt chart of all tasks."),
|
"description": _("Gantt chart of all tasks."),
|
||||||
@@ -30,15 +30,20 @@ def get_data():
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Project Update",
|
"name": "Project Template",
|
||||||
"description": _("Project Update."),
|
"description": _("Make project from a template."),
|
||||||
"dependencies": ["Project"],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Project Type",
|
"name": "Project Type",
|
||||||
"description": _("Define Project type."),
|
"description": _("Define Project type."),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Project Update",
|
||||||
|
"description": _("Project Update."),
|
||||||
|
"dependencies": ["Project"],
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ def get_data():
|
|||||||
"name": "Quality Procedure",
|
"name": "Quality Procedure",
|
||||||
"icon": "fa fa-sitemap",
|
"icon": "fa fa-sitemap",
|
||||||
"label": _("Tree of Procedures"),
|
"label": _("Tree of Procedures"),
|
||||||
"route": "Tree/Quality Procedure",
|
"route": "#Tree/Quality Procedure",
|
||||||
"description": _("Tree of Quality Procedures."),
|
"description": _("Tree of Quality Procedures."),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -46,14 +46,14 @@ def get_data():
|
|||||||
"type": "report",
|
"type": "report",
|
||||||
"is_query_report": True,
|
"is_query_report": True,
|
||||||
"name": "Territory Target Variance (Item Group-Wise)",
|
"name": "Territory Target Variance (Item Group-Wise)",
|
||||||
"route": "query-report/Territory Target Variance Item Group-Wise",
|
"route": "#query-report/Territory Target Variance Item Group-Wise",
|
||||||
"doctype": "Territory",
|
"doctype": "Territory",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "report",
|
"type": "report",
|
||||||
"is_query_report": True,
|
"is_query_report": True,
|
||||||
"name": "Sales Person Target Variance (Item Group-Wise)",
|
"name": "Sales Person Target Variance (Item Group-Wise)",
|
||||||
"route": "query-report/Sales Person Target Variance Item Group-Wise",
|
"route": "#query-report/Sales Person Target Variance Item Group-Wise",
|
||||||
"doctype": "Sales Person",
|
"doctype": "Sales Person",
|
||||||
"dependencies": ["Sales Person"],
|
"dependencies": ["Sales Person"],
|
||||||
},
|
},
|
||||||
@@ -72,7 +72,7 @@ def get_data():
|
|||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Item Price",
|
"name": "Item Price",
|
||||||
"description": _("Multiple Item prices."),
|
"description": _("Multiple Item prices."),
|
||||||
"route": "Report/Item Price",
|
"route": "#Report/Item Price",
|
||||||
"dependencies": ["Item", "Price List"],
|
"dependencies": ["Item", "Price List"],
|
||||||
"onboard": 1,
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
@@ -119,7 +119,7 @@ def get_data():
|
|||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Selling Settings",
|
"name": "Selling Settings",
|
||||||
"description": _("Default settings for selling transactions."),
|
"description": _("Default settings for selling transactions."),
|
||||||
"onboard": 1,
|
"settings": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ def get_data():
|
|||||||
"label": _("ERPNext Settings"),
|
"label": _("ERPNext Settings"),
|
||||||
"description": _("Set Default Values like Company, Currency, Current Fiscal Year, etc."),
|
"description": _("Set Default Values like Company, Currency, Current Fiscal Year, etc."),
|
||||||
"hide_count": True,
|
"hide_count": True,
|
||||||
"onboard": 1,
|
"settings": 1,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ def get_data():
|
|||||||
{
|
{
|
||||||
"type": "report",
|
"type": "report",
|
||||||
"name": "Item Shortage Report",
|
"name": "Item Shortage Report",
|
||||||
"route": "Report/Bin/Item Shortage Report",
|
"route": "#Report/Bin/Item Shortage Report",
|
||||||
"doctype": "Purchase Receipt"
|
"doctype": "Purchase Receipt"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -95,6 +95,8 @@ class AccountsController(TransactionBase):
|
|||||||
if self.is_return:
|
if self.is_return:
|
||||||
self.validate_qty()
|
self.validate_qty()
|
||||||
|
|
||||||
|
validate_regional(self)
|
||||||
|
|
||||||
def validate_invoice_documents_schedule(self):
|
def validate_invoice_documents_schedule(self):
|
||||||
self.validate_payment_schedule_dates()
|
self.validate_payment_schedule_dates()
|
||||||
self.set_due_date()
|
self.set_due_date()
|
||||||
@@ -1180,3 +1182,7 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
|
|||||||
parent.update_blanket_order()
|
parent.update_blanket_order()
|
||||||
parent.update_billing_percentage()
|
parent.update_billing_percentage()
|
||||||
parent.set_status()
|
parent.set_status()
|
||||||
|
|
||||||
|
@erpnext.allow_regional
|
||||||
|
def validate_regional(doc):
|
||||||
|
pass
|
||||||
|
|||||||
@@ -172,8 +172,8 @@ def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=Fals
|
|||||||
or tabItem.item_code LIKE %(txt)s
|
or tabItem.item_code LIKE %(txt)s
|
||||||
or tabItem.item_group LIKE %(txt)s
|
or tabItem.item_group LIKE %(txt)s
|
||||||
or tabItem.item_name LIKE %(txt)s
|
or tabItem.item_name LIKE %(txt)s
|
||||||
or tabItem.item_code IN (select parent from `tabItem Barcode` where barcode LIKE %(txt)s
|
or tabItem.item_code IN (select parent from `tabItem Barcode` where barcode LIKE %(txt)s)
|
||||||
{description_cond}))
|
{description_cond})
|
||||||
{fcond} {mcond}
|
{fcond} {mcond}
|
||||||
order by
|
order by
|
||||||
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
|
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ def make_timesheet_for_projects(current_date ):
|
|||||||
def close_tasks(current_date):
|
def close_tasks(current_date):
|
||||||
for task in frappe.get_all("Task", ["name"], {"status": "Open", "exp_end_date": ("<", current_date)}):
|
for task in frappe.get_all("Task", ["name"], {"status": "Open", "exp_end_date": ("<", current_date)}):
|
||||||
task = frappe.get_doc("Task", task.name)
|
task = frappe.get_doc("Task", task.name)
|
||||||
task.status = "Closed"
|
task.status = "Completed"
|
||||||
task.save()
|
task.save()
|
||||||
|
|
||||||
def make_project(current_date):
|
def make_project(current_date):
|
||||||
if not frappe.db.exists('Project',
|
if not frappe.db.exists('Project',
|
||||||
"New Product Development " + current_date.strftime("%Y-%m-%d")):
|
"New Product Development " + current_date.strftime("%Y-%m-%d")):
|
||||||
project = frappe.get_doc({
|
project = frappe.get_doc({
|
||||||
"doctype": "Project",
|
"doctype": "Project",
|
||||||
|
|||||||
@@ -162,6 +162,8 @@ def create_item_code(amazon_item_json, sku):
|
|||||||
igroup.parent_item_group = mws_settings.item_group
|
igroup.parent_item_group = mws_settings.item_group
|
||||||
igroup.insert()
|
igroup.insert()
|
||||||
|
|
||||||
|
item.append("item_defaults", {'company':mws_settings.company})
|
||||||
|
|
||||||
item.insert(ignore_permissions=True)
|
item.insert(ignore_permissions=True)
|
||||||
create_item_price(amazon_item_json, item.item_code)
|
create_item_price(amazon_item_json, item.item_code)
|
||||||
|
|
||||||
@@ -213,7 +215,7 @@ def get_orders(after_date):
|
|||||||
fulfillment_channels=["MFN", "AFN"],
|
fulfillment_channels=["MFN", "AFN"],
|
||||||
lastupdatedafter=after_date,
|
lastupdatedafter=after_date,
|
||||||
orderstatus=statuses,
|
orderstatus=statuses,
|
||||||
max_results='20')
|
max_results='50')
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
orders_list = []
|
orders_list = []
|
||||||
@@ -432,8 +434,8 @@ def get_order_items(market_place_order_id):
|
|||||||
return final_order_items
|
return final_order_items
|
||||||
|
|
||||||
def get_item_code(order_item):
|
def get_item_code(order_item):
|
||||||
asin = order_item.ASIN
|
sku = order_item.SellerSKU
|
||||||
item_code = frappe.db.get_value("Item", {"amazon_item_code": asin}, "item_code")
|
item_code = frappe.db.get_value("Item", {"item_code": sku}, "item_code")
|
||||||
if item_code:
|
if item_code:
|
||||||
return item_code
|
return item_code
|
||||||
|
|
||||||
@@ -451,11 +453,16 @@ def get_charges_and_fees(market_place_order_id):
|
|||||||
shipment_item_list = return_as_list(shipment_event.ShipmentEvent.ShipmentItemList.ShipmentItem)
|
shipment_item_list = return_as_list(shipment_event.ShipmentEvent.ShipmentItemList.ShipmentItem)
|
||||||
|
|
||||||
for shipment_item in shipment_item_list:
|
for shipment_item in shipment_item_list:
|
||||||
charges = return_as_list(shipment_item.ItemChargeList.ChargeComponent)
|
charges, fees = []
|
||||||
fees = return_as_list(shipment_item.ItemFeeList.FeeComponent)
|
|
||||||
|
if 'ItemChargeList' in shipment_item.keys():
|
||||||
|
charges = return_as_list(shipment_item.ItemChargeList.ChargeComponent)
|
||||||
|
|
||||||
|
if 'ItemFeeList' in shipment_item.keys():
|
||||||
|
fees = return_as_list(shipment_item.ItemFeeList.FeeComponent)
|
||||||
|
|
||||||
for charge in charges:
|
for charge in charges:
|
||||||
if(charge.ChargeType != "Principal"):
|
if(charge.ChargeType != "Principal") and float(charge.ChargeAmount.CurrencyAmount) != 0:
|
||||||
charge_account = get_account(charge.ChargeType)
|
charge_account = get_account(charge.ChargeType)
|
||||||
charges_fees.get("charges").append({
|
charges_fees.get("charges").append({
|
||||||
"charge_type":"Actual",
|
"charge_type":"Actual",
|
||||||
@@ -465,13 +472,14 @@ def get_charges_and_fees(market_place_order_id):
|
|||||||
})
|
})
|
||||||
|
|
||||||
for fee in fees:
|
for fee in fees:
|
||||||
fee_account = get_account(fee.FeeType)
|
if float(fee.FeeAmount.CurrencyAmount) != 0:
|
||||||
charges_fees.get("fees").append({
|
fee_account = get_account(fee.FeeType)
|
||||||
"charge_type":"Actual",
|
charges_fees.get("fees").append({
|
||||||
"account_head": fee_account,
|
"charge_type":"Actual",
|
||||||
"tax_amount": fee.FeeAmount.CurrencyAmount,
|
"account_head": fee_account,
|
||||||
"description": fee.FeeType + " for " + shipment_item.SellerSKU
|
"tax_amount": fee.FeeAmount.CurrencyAmount,
|
||||||
})
|
"description": fee.FeeType + " for " + shipment_item.SellerSKU
|
||||||
|
})
|
||||||
|
|
||||||
return charges_fees
|
return charges_fees
|
||||||
|
|
||||||
|
|||||||
@@ -216,7 +216,8 @@ doc_events = {
|
|||||||
"validate": "erpnext.portal.doctype.products_settings.products_settings.home_page_is_products"
|
"validate": "erpnext.portal.doctype.products_settings.products_settings.home_page_is_products"
|
||||||
},
|
},
|
||||||
"Sales Invoice": {
|
"Sales Invoice": {
|
||||||
"on_submit": "erpnext.regional.france.utils.create_transaction_log",
|
"on_submit": ["erpnext.regional.france.utils.create_transaction_log", "erpnext.regional.italy.utils.sales_invoice_on_submit"],
|
||||||
|
"on_cancel": "erpnext.regional.italy.utils.sales_invoice_on_cancel",
|
||||||
"on_trash": "erpnext.regional.check_deletion_permission"
|
"on_trash": "erpnext.regional.check_deletion_permission"
|
||||||
},
|
},
|
||||||
"Payment Entry": {
|
"Payment Entry": {
|
||||||
@@ -224,7 +225,7 @@ doc_events = {
|
|||||||
"on_trash": "erpnext.regional.check_deletion_permission"
|
"on_trash": "erpnext.regional.check_deletion_permission"
|
||||||
},
|
},
|
||||||
'Address': {
|
'Address': {
|
||||||
'validate': 'erpnext.regional.india.utils.validate_gstin_for_india'
|
'validate': ['erpnext.regional.india.utils.validate_gstin_for_india', 'erpnext.regional.italy.utils.set_state_code']
|
||||||
},
|
},
|
||||||
('Sales Invoice', 'Purchase Invoice', 'Delivery Note'): {
|
('Sales Invoice', 'Purchase Invoice', 'Delivery Note'): {
|
||||||
'validate': 'erpnext.regional.india.utils.set_place_of_supply'
|
'validate': 'erpnext.regional.india.utils.set_place_of_supply'
|
||||||
@@ -317,5 +318,9 @@ regional_overrides = {
|
|||||||
},
|
},
|
||||||
'Saudi Arabia': {
|
'Saudi Arabia': {
|
||||||
'erpnext.controllers.taxes_and_totals.update_itemised_tax_data': 'erpnext.regional.united_arab_emirates.utils.update_itemised_tax_data'
|
'erpnext.controllers.taxes_and_totals.update_itemised_tax_data': 'erpnext.regional.united_arab_emirates.utils.update_itemised_tax_data'
|
||||||
|
},
|
||||||
|
'Italy': {
|
||||||
|
'erpnext.controllers.taxes_and_totals.update_itemised_tax_data': 'erpnext.regional.italy.utils.update_itemised_tax_data',
|
||||||
|
'erpnext.controllers.accounts_controller.validate_regional': 'erpnext.regional.italy.utils.sales_invoice_validate',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ from frappe.utils import getdate, date_diff
|
|||||||
class AdditionalSalary(Document):
|
class AdditionalSalary(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.validate_dates()
|
self.validate_dates()
|
||||||
if self.amount <= 0:
|
if self.amount < 0:
|
||||||
frappe.throw(_("Amount should be greater than zero."))
|
frappe.throw(_("Amount should not be less than zero."))
|
||||||
|
|
||||||
def validate_dates(self):
|
def validate_dates(self):
|
||||||
date_of_joining, relieving_date = frappe.db.get_value("Employee", self.employee,
|
date_of_joining, relieving_date = frappe.db.get_value("Employee", self.employee,
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class EmployeeOnboarding(EmployeeBoardingController):
|
|||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
task_status = frappe.db.get_value("Task", activity.task, "status")
|
task_status = frappe.db.get_value("Task", activity.task, "status")
|
||||||
if task_status not in ["Closed", "Cancelled"]:
|
if task_status not in ["Completed", "Cancelled"]:
|
||||||
frappe.throw(_("All the mandatory Task for employee creation hasn't been done yet."), IncompleteTaskError)
|
frappe.throw(_("All the mandatory Task for employee creation hasn't been done yet."), IncompleteTaskError)
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class TestEmployeeOnboarding(unittest.TestCase):
|
|||||||
|
|
||||||
# complete the task
|
# complete the task
|
||||||
project = frappe.get_doc('Project', onboarding.project)
|
project = frappe.get_doc('Project', onboarding.project)
|
||||||
project.tasks[0].status = 'Closed'
|
project.tasks[0].status = 'Completed'
|
||||||
project.save()
|
project.save()
|
||||||
|
|
||||||
# make employee
|
# make employee
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ $.extend(cur_frm.cscript, new erpnext.hr.ExpenseClaimController({frm: cur_frm}))
|
|||||||
|
|
||||||
cur_frm.add_fetch('employee', 'company', 'company');
|
cur_frm.add_fetch('employee', 'company', 'company');
|
||||||
cur_frm.add_fetch('employee','employee_name','employee_name');
|
cur_frm.add_fetch('employee','employee_name','employee_name');
|
||||||
|
cur_frm.add_fetch('expense_type','description','description');
|
||||||
|
|
||||||
cur_frm.cscript.onload = function(doc) {
|
cur_frm.cscript.onload = function(doc) {
|
||||||
if (doc.__islocal) {
|
if (doc.__islocal) {
|
||||||
|
|||||||
@@ -1,366 +1,378 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_events_in_timeline": 0,
|
||||||
"allow_import": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_rename": 0,
|
"allow_import": 0,
|
||||||
"beta": 0,
|
"allow_rename": 0,
|
||||||
"creation": "2013-02-22 01:27:46",
|
"beta": 0,
|
||||||
"custom": 0,
|
"creation": "2013-02-22 01:27:46",
|
||||||
"docstatus": 0,
|
"custom": 0,
|
||||||
"doctype": "DocType",
|
"docstatus": 0,
|
||||||
"editable_grid": 1,
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "expense_date",
|
"columns": 0,
|
||||||
"fieldtype": "Date",
|
"fieldname": "expense_date",
|
||||||
"hidden": 0,
|
"fieldtype": "Date",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 1,
|
||||||
"label": "Expense Date",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Expense Date",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"oldfieldname": "expense_date",
|
"no_copy": 0,
|
||||||
"oldfieldtype": "Date",
|
"oldfieldname": "expense_date",
|
||||||
"permlevel": 0,
|
"oldfieldtype": "Date",
|
||||||
"print_hide": 0,
|
"permlevel": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"print_width": "150px",
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"print_width": "150px",
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0,
|
"unique": 0,
|
||||||
"width": "150px"
|
"width": "150px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "column_break_2",
|
"columns": 0,
|
||||||
"fieldtype": "Column Break",
|
"fieldname": "column_break_2",
|
||||||
"hidden": 0,
|
"fieldtype": "Column Break",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"length": 0,
|
"in_standard_filter": 0,
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "expense_type",
|
"columns": 0,
|
||||||
"fieldtype": "Link",
|
"fieldname": "expense_type",
|
||||||
"hidden": 0,
|
"fieldtype": "Link",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 1,
|
||||||
"label": "Expense Claim Type",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Expense Claim Type",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"oldfieldname": "expense_type",
|
"no_copy": 0,
|
||||||
"oldfieldtype": "Link",
|
"oldfieldname": "expense_type",
|
||||||
"options": "Expense Claim Type",
|
"oldfieldtype": "Link",
|
||||||
"permlevel": 0,
|
"options": "Expense Claim Type",
|
||||||
"print_hide": 0,
|
"permlevel": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"print_width": "150px",
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"print_width": "150px",
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 1,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 1,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0,
|
"unique": 0,
|
||||||
"width": "150px"
|
"width": "150px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"depends_on": "expense_type",
|
"columns": 0,
|
||||||
"fieldname": "default_account",
|
"depends_on": "expense_type",
|
||||||
"fieldtype": "Link",
|
"fieldname": "default_account",
|
||||||
"hidden": 1,
|
"fieldtype": "Link",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 1,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "Default Account",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Default Account",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"options": "Account",
|
"no_copy": 0,
|
||||||
"permlevel": 0,
|
"options": "Account",
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 1,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 1,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_4",
|
"columns": 0,
|
||||||
"fieldtype": "Section Break",
|
"fieldname": "section_break_4",
|
||||||
"hidden": 0,
|
"fieldtype": "Section Break",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"length": 0,
|
"in_standard_filter": 0,
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fetch_from": "expense_type.description",
|
"columns": 0,
|
||||||
"fieldname": "description",
|
"fetch_from": "",
|
||||||
"fieldtype": "Text Editor",
|
"fieldname": "description",
|
||||||
"hidden": 0,
|
"fieldtype": "Text Editor",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 1,
|
||||||
"label": "Description",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Description",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"oldfieldname": "description",
|
"no_copy": 0,
|
||||||
"oldfieldtype": "Small Text",
|
"oldfieldname": "description",
|
||||||
"options": "",
|
"oldfieldtype": "Small Text",
|
||||||
"permlevel": 0,
|
"options": "",
|
||||||
"print_hide": 0,
|
"permlevel": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"print_width": "300px",
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"print_width": "300px",
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0,
|
"unique": 0,
|
||||||
"width": "300px"
|
"width": "300px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_6",
|
"columns": 0,
|
||||||
"fieldtype": "Section Break",
|
"fieldname": "section_break_6",
|
||||||
"hidden": 0,
|
"fieldtype": "Section Break",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"length": 0,
|
"in_standard_filter": 0,
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "claim_amount",
|
"columns": 0,
|
||||||
"fieldtype": "Currency",
|
"fieldname": "claim_amount",
|
||||||
"hidden": 0,
|
"fieldtype": "Currency",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 1,
|
||||||
"label": "Claim Amount",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Claim Amount",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"oldfieldname": "claim_amount",
|
"no_copy": 0,
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldname": "claim_amount",
|
||||||
"options": "Company:company:default_currency",
|
"oldfieldtype": "Currency",
|
||||||
"permlevel": 0,
|
"options": "Company:company:default_currency",
|
||||||
"print_hide": 0,
|
"permlevel": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"print_width": "150px",
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"print_width": "150px",
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 1,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 1,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0,
|
"unique": 0,
|
||||||
"width": "150px"
|
"width": "150px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "column_break_8",
|
"columns": 0,
|
||||||
"fieldtype": "Column Break",
|
"fieldname": "column_break_8",
|
||||||
"hidden": 0,
|
"fieldtype": "Column Break",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"length": 0,
|
"in_standard_filter": 0,
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "sanctioned_amount",
|
"columns": 0,
|
||||||
"fieldtype": "Currency",
|
"fieldname": "sanctioned_amount",
|
||||||
"hidden": 0,
|
"fieldtype": "Currency",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 1,
|
||||||
"label": "Sanctioned Amount",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Sanctioned Amount",
|
||||||
"no_copy": 1,
|
"length": 0,
|
||||||
"oldfieldname": "sanctioned_amount",
|
"no_copy": 1,
|
||||||
"oldfieldtype": "Currency",
|
"oldfieldname": "sanctioned_amount",
|
||||||
"options": "Company:company:default_currency",
|
"oldfieldtype": "Currency",
|
||||||
"permlevel": 0,
|
"options": "Company:company:default_currency",
|
||||||
"print_hide": 0,
|
"permlevel": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"print_width": "150px",
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"print_width": "150px",
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0,
|
"unique": 0,
|
||||||
"width": "150px"
|
"width": "150px"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-05-16 22:42:56.727863",
|
"modified": "2019-02-24 08:41:36.122565",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Expense Claim Detail",
|
"name": "Expense Claim Detail",
|
||||||
"owner": "harshada@webnotestech.com",
|
"owner": "harshada@webnotestech.com",
|
||||||
"permissions": [],
|
"permissions": [],
|
||||||
"quick_entry": 0,
|
"quick_entry": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"show_name_in_global_search": 0,
|
"show_name_in_global_search": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"track_changes": 0,
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0,
|
||||||
|
"track_views": 0
|
||||||
}
|
}
|
||||||
@@ -487,7 +487,6 @@ def get_events(start, end, filters=None):
|
|||||||
|
|
||||||
add_block_dates(events, start, end, employee, company)
|
add_block_dates(events, start, end, employee, company)
|
||||||
add_holidays(events, start, end, employee, company)
|
add_holidays(events, start, end, employee, company)
|
||||||
|
|
||||||
return events
|
return events
|
||||||
|
|
||||||
def add_department_leaves(events, start, end, employee, company):
|
def add_department_leaves(events, start, end, employee, company):
|
||||||
@@ -500,10 +499,22 @@ def add_department_leaves(events, start, end, employee, company):
|
|||||||
department_employees = frappe.db.sql_list("""select name from tabEmployee where department=%s
|
department_employees = frappe.db.sql_list("""select name from tabEmployee where department=%s
|
||||||
and company=%s""", (department, company))
|
and company=%s""", (department, company))
|
||||||
|
|
||||||
match_conditions = "and employee in (\"%s\")" % '", "'.join(department_employees)
|
filter_conditions = "employee in (\"%s\")" % '", "'.join(department_employees)
|
||||||
add_leaves(events, start, end, match_conditions=match_conditions)
|
add_leaves(events, start, end, filter_conditions=filter_conditions)
|
||||||
|
|
||||||
|
def add_leaves(events, start, end, filter_conditions=None):
|
||||||
|
conditions = []
|
||||||
|
|
||||||
|
if filter_conditions:
|
||||||
|
conditions.append(filter_conditions)
|
||||||
|
|
||||||
|
if not cint(frappe.db.get_value("HR Settings", None, "show_leaves_of_all_department_members_in_calendar")):
|
||||||
|
from frappe.desk.reportview import build_match_conditions
|
||||||
|
match_conditions = build_match_conditions("Leave Application")
|
||||||
|
|
||||||
|
if match_conditions:
|
||||||
|
conditions.append(match_conditions)
|
||||||
|
|
||||||
def add_leaves(events, start, end, match_conditions=None):
|
|
||||||
query = """select name, from_date, to_date, employee_name, half_day,
|
query = """select name, from_date, to_date, employee_name, half_day,
|
||||||
status, employee, docstatus
|
status, employee, docstatus
|
||||||
from `tabLeave Application` where
|
from `tabLeave Application` where
|
||||||
@@ -511,8 +522,8 @@ def add_leaves(events, start, end, match_conditions=None):
|
|||||||
and docstatus < 2
|
and docstatus < 2
|
||||||
and status!="Rejected" """
|
and status!="Rejected" """
|
||||||
|
|
||||||
if match_conditions:
|
if conditions:
|
||||||
query += match_conditions
|
query += ' and ' + ' and '.join(conditions)
|
||||||
|
|
||||||
for d in frappe.db.sql(query, {"start":start, "end": end}, as_dict=True):
|
for d in frappe.db.sql(query, {"start":start, "end": end}, as_dict=True):
|
||||||
e = {
|
e = {
|
||||||
|
|||||||
@@ -195,7 +195,7 @@
|
|||||||
"columns": 0,
|
"columns": 0,
|
||||||
"fetch_from": "employee.branch",
|
"fetch_from": "employee.branch",
|
||||||
"fieldname": "branch",
|
"fieldname": "branch",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
@@ -208,11 +208,11 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"oldfieldname": "branch",
|
"oldfieldname": "branch",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Branch",
|
"options": "Branch",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
@@ -901,7 +901,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "2",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 1,
|
"print_hide_if_no_value": 1,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
@@ -1906,7 +1906,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2019-02-12 11:24:20.848207",
|
"modified": "2019-02-18 18:54:36.161027",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Salary Slip",
|
"name": "Salary Slip",
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"beta": 0,
|
"beta": 0,
|
||||||
@@ -11,16 +13,21 @@
|
|||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
"fieldname": "time_sheet",
|
"fieldname": "time_sheet",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 0,
|
||||||
"label": "Time Sheet",
|
"label": "Time Sheet",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
@@ -30,49 +37,58 @@
|
|||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
"fieldname": "working_hours",
|
"fieldname": "working_hours",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 0,
|
||||||
"label": "Working Hours",
|
"label": "Working Hours",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "3",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
|
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-07-11 03:28:07.152366",
|
"modified": "2019-02-19 08:33:41.762144",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Salary Slip Timesheet",
|
"name": "Salary Slip Timesheet",
|
||||||
@@ -82,7 +98,10 @@
|
|||||||
"quick_entry": 1,
|
"quick_entry": 1,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
|
"show_name_in_global_search": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"track_seen": 0
|
"track_changes": 0,
|
||||||
|
"track_seen": 0,
|
||||||
|
"track_views": 0
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
@@ -365,7 +366,7 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "Company:company:default_currency",
|
"options": "Company:company:default_currency",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "2",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
@@ -950,7 +951,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-07-24 18:36:25.169098",
|
"modified": "2019-02-18 18:51:53.932518",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Salary Structure",
|
"name": "Salary Structure",
|
||||||
|
|||||||
@@ -214,7 +214,7 @@
|
|||||||
"label": "Level",
|
"label": "Level",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"options": "\nBeginner\nExpert\nAdvance",
|
"options": "\nBeginner\nIntermediate\nAdvance",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@@ -847,4 +847,4 @@
|
|||||||
"title_field": "event_name",
|
"title_field": "event_name",
|
||||||
"track_changes": 0,
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
@@ -351,8 +352,8 @@
|
|||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-09-01 17:05:59.600583",
|
"modified": "2019-02-01 14:21:16.729848",
|
||||||
"modified_by": "cave@aperture.com",
|
"modified_by": "Administrator",
|
||||||
"module": "Hub Node",
|
"module": "Hub Node",
|
||||||
"name": "Marketplace Settings",
|
"name": "Marketplace Settings",
|
||||||
"name_case": "",
|
"name_case": "",
|
||||||
|
|||||||
@@ -41,12 +41,19 @@ class MaintenanceVisit(TransactionBase):
|
|||||||
work_done = nm and nm[0][3] or ''
|
work_done = nm and nm[0][3] or ''
|
||||||
else:
|
else:
|
||||||
status = 'Open'
|
status = 'Open'
|
||||||
mntc_date = ''
|
mntc_date = None
|
||||||
service_person = ''
|
service_person = None
|
||||||
work_done = ''
|
work_done = None
|
||||||
|
|
||||||
frappe.db.sql("update `tabWarranty Claim` set resolution_date=%s, resolved_by=%s, resolution_details=%s, status=%s where name =%s",(mntc_date,service_person,work_done,status,d.prevdoc_docname))
|
wc_doc = frappe.get_doc('Warranty Claim', d.prevdoc_docname)
|
||||||
|
wc_doc.update({
|
||||||
|
'resolution_date': mntc_date,
|
||||||
|
'resolved_by': service_person,
|
||||||
|
'resolution_details': work_done,
|
||||||
|
'status': status
|
||||||
|
})
|
||||||
|
|
||||||
|
wc_doc.db_update()
|
||||||
|
|
||||||
def check_if_last_visit(self):
|
def check_if_last_visit(self):
|
||||||
"""check if last maintenance visit against same sales order/ Warranty Claim"""
|
"""check if last maintenance visit against same sales order/ Warranty Claim"""
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ class BOM(WebsiteGenerator):
|
|||||||
args = frappe._dict({
|
args = frappe._dict({
|
||||||
"doctype": "BOM",
|
"doctype": "BOM",
|
||||||
"price_list": self.buying_price_list,
|
"price_list": self.buying_price_list,
|
||||||
"qty": arg.get("qty"),
|
"qty": arg.get("qty") or 1,
|
||||||
"uom": arg.get("uom") or arg.get("stock_uom"),
|
"uom": arg.get("uom") or arg.get("stock_uom"),
|
||||||
"stock_uom": arg.get("stock_uom"),
|
"stock_uom": arg.get("stock_uom"),
|
||||||
"transaction_type": "buying",
|
"transaction_type": "buying",
|
||||||
@@ -708,8 +708,11 @@ def get_children(doctype, parent=None, is_root=False, **filters):
|
|||||||
|
|
||||||
def get_boms_in_bottom_up_order(bom_no=None):
|
def get_boms_in_bottom_up_order(bom_no=None):
|
||||||
def _get_parent(bom_no):
|
def _get_parent(bom_no):
|
||||||
return frappe.db.sql_list("""select distinct parent from `tabBOM Item`
|
return frappe.db.sql_list("""
|
||||||
where bom_no = %s and docstatus=1 and parenttype='BOM'""", bom_no)
|
select distinct bom_item.parent from `tabBOM Item` bom_item
|
||||||
|
where bom_item.bom_no = %s and bom_item.docstatus=1 and bom_item.parenttype='BOM'
|
||||||
|
and exists(select bom.name from `tabBOM` bom where bom.name=bom_item.parent and bom.is_active=1)
|
||||||
|
""", bom_no)
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
bom_list = []
|
bom_list = []
|
||||||
@@ -717,9 +720,10 @@ def get_boms_in_bottom_up_order(bom_no=None):
|
|||||||
bom_list.append(bom_no)
|
bom_list.append(bom_no)
|
||||||
else:
|
else:
|
||||||
# get all leaf BOMs
|
# get all leaf BOMs
|
||||||
bom_list = frappe.db.sql_list("""select name from `tabBOM` bom where docstatus=1
|
bom_list = frappe.db.sql_list("""select name from `tabBOM` bom
|
||||||
and not exists(select bom_no from `tabBOM Item`
|
where docstatus=1 and is_active=1
|
||||||
where parent=bom.name and ifnull(bom_no, '')!='')""")
|
and not exists(select bom_no from `tabBOM Item`
|
||||||
|
where parent=bom.name and ifnull(bom_no, '')!='')""")
|
||||||
|
|
||||||
while(count < len(bom_list)):
|
while(count < len(bom_list)):
|
||||||
for child_bom in _get_parent(bom_list[count]):
|
for child_bom in _get_parent(bom_list[count]):
|
||||||
|
|||||||
@@ -78,6 +78,39 @@
|
|||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "operation",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Item operation",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Operation",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"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,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
@@ -893,6 +926,38 @@
|
|||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "allow_alternative_item",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"hidden": 1,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Allow Alternative Item",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"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,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_in_quick_entry": 0,
|
"allow_in_quick_entry": 0,
|
||||||
@@ -958,71 +1023,6 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"translatable": 0,
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "operation",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Item operation",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Operation",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"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,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "allow_alternative_item",
|
|
||||||
"fieldtype": "Check",
|
|
||||||
"hidden": 1,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Allow Alternative Item",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"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,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
"has_web_view": 0,
|
||||||
@@ -1035,7 +1035,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-11-23 15:05:55.187136",
|
"modified": "2019-02-21 19:19:54.872459",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "BOM Item",
|
"name": "BOM Item",
|
||||||
@@ -1050,4 +1050,4 @@
|
|||||||
"track_changes": 0,
|
"track_changes": 0,
|
||||||
"track_seen": 0,
|
"track_seen": 0,
|
||||||
"track_views": 0
|
"track_views": 0
|
||||||
}
|
}
|
||||||
@@ -172,9 +172,6 @@ def make_material_request(source_name, target_doc=None):
|
|||||||
doclist = get_mapped_doc("Job Card", source_name, {
|
doclist = get_mapped_doc("Job Card", source_name, {
|
||||||
"Job Card": {
|
"Job Card": {
|
||||||
"doctype": "Material Request",
|
"doctype": "Material Request",
|
||||||
"validation": {
|
|
||||||
"docstatus": ["=", 1]
|
|
||||||
},
|
|
||||||
"field_map": {
|
"field_map": {
|
||||||
"name": "job_card",
|
"name": "job_card",
|
||||||
},
|
},
|
||||||
@@ -206,9 +203,6 @@ def make_stock_entry(source_name, target_doc=None):
|
|||||||
doclist = get_mapped_doc("Job Card", source_name, {
|
doclist = get_mapped_doc("Job Card", source_name, {
|
||||||
"Job Card": {
|
"Job Card": {
|
||||||
"doctype": "Stock Entry",
|
"doctype": "Stock Entry",
|
||||||
"validation": {
|
|
||||||
"docstatus": ["=", 1]
|
|
||||||
},
|
|
||||||
"field_map": {
|
"field_map": {
|
||||||
"name": "job_card",
|
"name": "job_card",
|
||||||
"for_quantity": "fg_completed_qty"
|
"for_quantity": "fg_completed_qty"
|
||||||
|
|||||||
@@ -282,6 +282,10 @@ class WorkOrder(Document):
|
|||||||
total_bundle_qty = frappe.db.sql(""" select sum(qty) from
|
total_bundle_qty = frappe.db.sql(""" select sum(qty) from
|
||||||
`tabProduct Bundle Item` where parent = %s""", (frappe.db.escape(self.product_bundle_item)))[0][0]
|
`tabProduct Bundle Item` where parent = %s""", (frappe.db.escape(self.product_bundle_item)))[0][0]
|
||||||
|
|
||||||
|
if not total_bundle_qty:
|
||||||
|
# product bundle is 0 (product bundle allows 0 qty for items)
|
||||||
|
total_bundle_qty = 1
|
||||||
|
|
||||||
cond = "product_bundle_item = %s" if self.product_bundle_item else "production_item = %s"
|
cond = "product_bundle_item = %s" if self.product_bundle_item else "production_item = %s"
|
||||||
|
|
||||||
qty = frappe.db.sql(""" select sum(qty) from
|
qty = frappe.db.sql(""" select sum(qty) from
|
||||||
|
|||||||
@@ -487,7 +487,6 @@ erpnext.patches.v10_0.update_assessment_plan
|
|||||||
erpnext.patches.v10_0.update_assessment_result
|
erpnext.patches.v10_0.update_assessment_result
|
||||||
erpnext.patches.v10_0.set_default_payment_terms_based_on_company
|
erpnext.patches.v10_0.set_default_payment_terms_based_on_company
|
||||||
erpnext.patches.v10_0.update_sales_order_link_to_purchase_order
|
erpnext.patches.v10_0.update_sales_order_link_to_purchase_order
|
||||||
erpnext.patches.v10_0.item_barcode_childtable_migrate
|
|
||||||
erpnext.patches.v10_0.rename_price_to_rate_in_pricing_rule
|
erpnext.patches.v10_0.rename_price_to_rate_in_pricing_rule
|
||||||
erpnext.patches.v10_0.set_currency_in_pricing_rule
|
erpnext.patches.v10_0.set_currency_in_pricing_rule
|
||||||
erpnext.patches.v10_0.set_b2c_limit
|
erpnext.patches.v10_0.set_b2c_limit
|
||||||
@@ -574,6 +573,7 @@ erpnext.patches.v11_0.drop_column_max_days_allowed
|
|||||||
erpnext.patches.v10_0.update_user_image_in_employee
|
erpnext.patches.v10_0.update_user_image_in_employee
|
||||||
erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
|
erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
|
||||||
erpnext.patches.v10_0.allow_operators_in_supplier_scorecard
|
erpnext.patches.v10_0.allow_operators_in_supplier_scorecard
|
||||||
|
erpnext.patches.v10_0.item_barcode_childtable_migrate # 16-02-2019
|
||||||
erpnext.patches.v11_0.update_delivery_trip_status
|
erpnext.patches.v11_0.update_delivery_trip_status
|
||||||
erpnext.patches.v11_0.set_missing_gst_hsn_code
|
erpnext.patches.v11_0.set_missing_gst_hsn_code
|
||||||
erpnext.patches.v11_0.rename_bom_wo_fields
|
erpnext.patches.v11_0.rename_bom_wo_fields
|
||||||
@@ -582,4 +582,7 @@ erpnext.patches.v11_0.renamed_from_to_fields_in_project
|
|||||||
erpnext.patches.v11_0.add_permissions_in_gst_settings
|
erpnext.patches.v11_0.add_permissions_in_gst_settings
|
||||||
erpnext.patches.v11_1.setup_guardian_role
|
erpnext.patches.v11_1.setup_guardian_role
|
||||||
execute:frappe.delete_doc('DocType', 'Notification Control')
|
execute:frappe.delete_doc('DocType', 'Notification Control')
|
||||||
erpnext.patches.v12_0.move_item_tax_to_item_tax_template
|
erpnext.patches.v11_0.remove_barcodes_field_from_copy_fields_to_variants
|
||||||
|
erpnext.patches.v12_0.set_task_status
|
||||||
|
erpnext.patches.v10_0.item_barcode_childtable_migrate # 16-02-2019
|
||||||
|
erpnext.patches.v11_0.make_italian_localization_fields # 01-03-2019
|
||||||
|
|||||||
@@ -7,20 +7,25 @@ import frappe
|
|||||||
|
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
items_barcode = frappe.get_all('Item', ['name', 'barcode'], { 'barcode': ('!=', '') })
|
|
||||||
|
|
||||||
frappe.reload_doc("stock", "doctype", "item")
|
|
||||||
frappe.reload_doc("stock", "doctype", "item_barcode")
|
frappe.reload_doc("stock", "doctype", "item_barcode")
|
||||||
|
|
||||||
|
items_barcode = frappe.get_all('Item', ['name', 'barcode'], { 'barcode': ('!=', '') })
|
||||||
|
frappe.reload_doc("stock", "doctype", "item")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for item in items_barcode:
|
for item in items_barcode:
|
||||||
barcode = item.barcode.strip()
|
barcode = item.barcode.strip()
|
||||||
|
|
||||||
if barcode and '<' not in barcode:
|
if barcode and '<' not in barcode:
|
||||||
frappe.get_doc({
|
try:
|
||||||
'idx': 0,
|
frappe.get_doc({
|
||||||
'doctype': 'Item Barcode',
|
'idx': 0,
|
||||||
'barcode': barcode,
|
'doctype': 'Item Barcode',
|
||||||
'parenttype': 'Item',
|
'barcode': barcode,
|
||||||
'parent': item.name,
|
'parenttype': 'Item',
|
||||||
'parentfield': 'barcodes'
|
'parent': item.name,
|
||||||
}).insert()
|
'parentfield': 'barcodes'
|
||||||
|
}).insert()
|
||||||
|
except (frappe.DuplicateEntryError, frappe.UniqueValidationError):
|
||||||
|
continue
|
||||||
|
|||||||
30
erpnext/patches/v11_0/make_italian_localization_fields.py
Normal file
30
erpnext/patches/v11_0/make_italian_localization_fields.py
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# Copyright (c) 2017, Frappe and Contributors
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
from erpnext.regional.italy.setup import make_custom_fields, setup_report
|
||||||
|
from erpnext.regional.italy import state_codes
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
company = frappe.get_all('Company', filters = {'country': 'Italy'})
|
||||||
|
if not company:
|
||||||
|
return
|
||||||
|
|
||||||
|
frappe.reload_doc('regional', 'report', 'electronic_invoice_register')
|
||||||
|
make_custom_fields()
|
||||||
|
setup_report()
|
||||||
|
|
||||||
|
# Set state codes
|
||||||
|
condition = ""
|
||||||
|
for state, code in state_codes.items():
|
||||||
|
condition += " when '{0}' then '{1}'".format(frappe.db.escape(state), frappe.db.escape(code))
|
||||||
|
|
||||||
|
if condition:
|
||||||
|
condition = "state_code = (case state {0} end),".format(condition)
|
||||||
|
|
||||||
|
frappe.db.sql("""
|
||||||
|
UPDATE tabAddress set {condition} country_code = UPPER(ifnull((select code
|
||||||
|
from `tabCountry` where name = `tabAddress`.country), ''))
|
||||||
|
""".format(condition=condition))
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
'''Remove barcodes field from "Copy Fields to Variants" table because barcodes must be unique'''
|
||||||
|
|
||||||
|
settings = frappe.get_doc('Item Variant Settings')
|
||||||
|
settings.remove_invalid_fields_for_copy_fields_in_variants()
|
||||||
17
erpnext/patches/v12_0/set_task_status.py
Normal file
17
erpnext/patches/v12_0/set_task_status.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
frappe.reload_doctype('Task')
|
||||||
|
frappe.reload_doctype('Project Task')
|
||||||
|
|
||||||
|
# add "Completed" if customized
|
||||||
|
for doctype in ('Task', 'Project Task'):
|
||||||
|
property_setter_name = frappe.db.exists('Property Setter', dict(doc_type = doctype, field_name = 'status', property = 'options'))
|
||||||
|
if property_setter_name:
|
||||||
|
property_setter = frappe.get_doc('Property Setter', property_setter_name)
|
||||||
|
if not "Completed" in property_setter.value:
|
||||||
|
property_setter.value = property_setter.value + '\nCompleted'
|
||||||
|
property_setter.save()
|
||||||
|
|
||||||
|
# renamed default status to Completed as status "Closed" is ambiguous
|
||||||
|
frappe.db.sql('update tabTask set status = "Completed" where status = "Closed"')
|
||||||
@@ -9,7 +9,7 @@ frappe.ui.form.on("Project", {
|
|||||||
indicator = 'red';
|
indicator = 'red';
|
||||||
} else if (doc.status == 'Cancelled') {
|
} else if (doc.status == 'Cancelled') {
|
||||||
indicator = 'dark grey';
|
indicator = 'dark grey';
|
||||||
} else if (doc.status == 'Closed') {
|
} else if (doc.status == 'Completed') {
|
||||||
indicator = 'green';
|
indicator = 'green';
|
||||||
}
|
}
|
||||||
return indicator;
|
return indicator;
|
||||||
@@ -17,6 +17,7 @@ frappe.ui.form.on("Project", {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
onload: function (frm) {
|
onload: function (frm) {
|
||||||
var so = frappe.meta.get_docfield("Project", "sales_order");
|
var so = frappe.meta.get_docfield("Project", "sales_order");
|
||||||
so.get_route_options_for_new_doc = function (field) {
|
so.get_route_options_for_new_doc = function (field) {
|
||||||
@@ -76,7 +77,28 @@ frappe.ui.form.on("Project", {
|
|||||||
|
|
||||||
frm.trigger('show_dashboard');
|
frm.trigger('show_dashboard');
|
||||||
}
|
}
|
||||||
|
frm.events.set_buttons(frm);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
set_buttons: function(frm) {
|
||||||
|
if (!frm.is_new()) {
|
||||||
|
frm.add_custom_button(__('Completed'), () => {
|
||||||
|
frm.events.set_status(frm, 'Completed');
|
||||||
|
}, __('Set Status'));
|
||||||
|
|
||||||
|
frm.add_custom_button(__('Cancelled'), () => {
|
||||||
|
frm.events.set_status(frm, 'Cancelled');
|
||||||
|
}, __('Set Status'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
set_status: function(frm, status) {
|
||||||
|
frappe.confirm(__('Set Project and all Tasks to status {0}?', [status.bold()]), () => {
|
||||||
|
frappe.xcall('erpnext.projects.doctype.project.project.set_project_status',
|
||||||
|
{project: frm.doc.name, status: status}).then(() => { /* page will auto reload */ });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
tasks_refresh: function (frm) {
|
tasks_refresh: function (frm) {
|
||||||
var grid = frm.get_field('tasks').grid;
|
var grid = frm.get_field('tasks').grid;
|
||||||
grid.wrapper.find('select[data-fieldname="status"]').each(function () {
|
grid.wrapper.find('select[data-fieldname="status"]').each(function () {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -65,18 +65,47 @@ class Project(Document):
|
|||||||
return frappe.get_all("Task", "*", filters, order_by="exp_start_date asc")
|
return frappe.get_all("Task", "*", filters, order_by="exp_start_date asc")
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.validate_project_name()
|
|
||||||
self.validate_weights()
|
self.validate_weights()
|
||||||
self.sync_tasks()
|
self.sync_tasks()
|
||||||
self.tasks = []
|
self.tasks = []
|
||||||
self.load_tasks()
|
self.load_tasks()
|
||||||
|
if not self.is_new():
|
||||||
|
self.copy_from_template()
|
||||||
self.validate_dates()
|
self.validate_dates()
|
||||||
self.send_welcome_email()
|
self.send_welcome_email()
|
||||||
self.update_percent_complete()
|
self.update_percent_complete()
|
||||||
|
|
||||||
def validate_project_name(self):
|
def copy_from_template(self):
|
||||||
if self.get("__islocal") and frappe.db.exists("Project", self.project_name):
|
'''
|
||||||
frappe.throw(_("Project {0} already exists").format(frappe.safe_decode(self.project_name)))
|
Copy tasks from template
|
||||||
|
'''
|
||||||
|
if self.project_template and not len(self.tasks or []):
|
||||||
|
|
||||||
|
# has a template, and no loaded tasks, so lets create
|
||||||
|
if not self.expected_start_date:
|
||||||
|
# project starts today
|
||||||
|
self.expected_start_date = today()
|
||||||
|
|
||||||
|
template = frappe.get_doc('Project Template', self.project_template)
|
||||||
|
|
||||||
|
if not self.project_type:
|
||||||
|
self.project_type = template.project_type
|
||||||
|
|
||||||
|
# create tasks from template
|
||||||
|
for task in template.tasks:
|
||||||
|
frappe.get_doc(dict(
|
||||||
|
doctype = 'Task',
|
||||||
|
subject = task.subject,
|
||||||
|
project = self.name,
|
||||||
|
status = 'Open',
|
||||||
|
exp_start_date = add_days(self.expected_start_date, task.start),
|
||||||
|
exp_end_date = add_days(self.expected_start_date, task.start + task.duration),
|
||||||
|
description = task.description,
|
||||||
|
task_weight = task.task_weight
|
||||||
|
)).insert()
|
||||||
|
|
||||||
|
# reload tasks after project
|
||||||
|
self.load_tasks()
|
||||||
|
|
||||||
def validate_dates(self):
|
def validate_dates(self):
|
||||||
if self.tasks:
|
if self.tasks:
|
||||||
@@ -201,18 +230,21 @@ class Project(Document):
|
|||||||
self.save(ignore_permissions=True)
|
self.save(ignore_permissions=True)
|
||||||
|
|
||||||
def after_insert(self):
|
def after_insert(self):
|
||||||
|
self.copy_from_template()
|
||||||
if self.sales_order:
|
if self.sales_order:
|
||||||
frappe.db.set_value("Sales Order", self.sales_order, "project", self.name)
|
frappe.db.set_value("Sales Order", self.sales_order, "project", self.name)
|
||||||
|
|
||||||
def update_percent_complete(self):
|
def update_percent_complete(self):
|
||||||
if not self.tasks: return
|
if not self.tasks: return
|
||||||
total = frappe.db.sql("""select count(name) from tabTask where project=%s""", self.name)[0][0]
|
total = frappe.db.sql("""select count(name) from tabTask where project=%s""", self.name)[0][0]
|
||||||
|
|
||||||
if not total and self.percent_complete:
|
if not total and self.percent_complete:
|
||||||
self.percent_complete = 0
|
self.percent_complete = 0
|
||||||
|
|
||||||
if (self.percent_complete_method == "Task Completion" and total > 0) or (
|
if (self.percent_complete_method == "Task Completion" and total > 0) or (
|
||||||
not self.percent_complete_method and total > 0):
|
not self.percent_complete_method and total > 0):
|
||||||
completed = frappe.db.sql("""select count(name) from tabTask where
|
completed = frappe.db.sql("""select count(name) from tabTask where
|
||||||
project=%s and status in ('Closed', 'Cancelled')""", self.name)[0][0]
|
project=%s and status in ('Cancelled', 'Completed')""", self.name)[0][0]
|
||||||
self.percent_complete = flt(flt(completed) / total * 100, 2)
|
self.percent_complete = flt(flt(completed) / total * 100, 2)
|
||||||
|
|
||||||
if (self.percent_complete_method == "Task Progress" and total > 0):
|
if (self.percent_complete_method == "Task Progress" and total > 0):
|
||||||
@@ -223,15 +255,21 @@ class Project(Document):
|
|||||||
if (self.percent_complete_method == "Task Weight" and total > 0):
|
if (self.percent_complete_method == "Task Weight" and total > 0):
|
||||||
weight_sum = frappe.db.sql("""select sum(task_weight) from tabTask where
|
weight_sum = frappe.db.sql("""select sum(task_weight) from tabTask where
|
||||||
project=%s""", self.name)[0][0]
|
project=%s""", self.name)[0][0]
|
||||||
weighted_progress = frappe.db.sql("""select progress,task_weight from tabTask where
|
weighted_progress = frappe.db.sql("""select progress, task_weight from tabTask where
|
||||||
project=%s""", self.name, as_dict=1)
|
project=%s""", self.name, as_dict=1)
|
||||||
pct_complete = 0
|
pct_complete = 0
|
||||||
for row in weighted_progress:
|
for row in weighted_progress:
|
||||||
pct_complete += row["progress"] * frappe.utils.safe_div(row["task_weight"], weight_sum)
|
pct_complete += row["progress"] * frappe.utils.safe_div(row["task_weight"], weight_sum)
|
||||||
self.percent_complete = flt(flt(pct_complete), 2)
|
self.percent_complete = flt(flt(pct_complete), 2)
|
||||||
|
|
||||||
|
# don't update status if it is cancelled
|
||||||
|
if self.status == 'Cancelled':
|
||||||
|
return
|
||||||
|
|
||||||
if self.percent_complete == 100:
|
if self.percent_complete == 100:
|
||||||
self.status = "Completed"
|
self.status = "Completed"
|
||||||
elif not self.status == "Cancelled":
|
|
||||||
|
else:
|
||||||
self.status = "Open"
|
self.status = "Open"
|
||||||
|
|
||||||
def update_costing(self):
|
def update_costing(self):
|
||||||
@@ -593,3 +631,21 @@ def create_kanban_board_if_not_exists(project):
|
|||||||
quick_kanban_board('Task', project, 'status')
|
quick_kanban_board('Task', project, 'status')
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def set_project_status(project, status):
|
||||||
|
'''
|
||||||
|
set status for project and all related tasks
|
||||||
|
'''
|
||||||
|
if not status in ('Completed', 'Cancelled'):
|
||||||
|
frappe.throw('Status must be Cancelled or Completed')
|
||||||
|
|
||||||
|
project = frappe.get_doc('Project', project)
|
||||||
|
frappe.has_permission(doc = project, throw = True)
|
||||||
|
|
||||||
|
for task in frappe.get_all('Task', dict(project = project.name)):
|
||||||
|
frappe.db.set_value('Task', task.name, 'status', status)
|
||||||
|
|
||||||
|
project.status = status
|
||||||
|
project.save()
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,61 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
import frappe
|
import frappe, unittest
|
||||||
test_records = frappe.get_test_records('Project')
|
test_records = frappe.get_test_records('Project')
|
||||||
test_ignore = ["Sales Order"]
|
test_ignore = ["Sales Order"]
|
||||||
|
|
||||||
|
from erpnext.projects.doctype.project_template.test_project_template import get_project_template
|
||||||
|
from erpnext.projects.doctype.project.project import set_project_status
|
||||||
|
|
||||||
|
from frappe.utils import getdate
|
||||||
|
|
||||||
|
class TestProject(unittest.TestCase):
|
||||||
|
def test_project_with_template(self):
|
||||||
|
frappe.db.sql('delete from tabTask where project = "Test Project with Template"')
|
||||||
|
frappe.delete_doc('Project', 'Test Project with Template')
|
||||||
|
|
||||||
|
project = get_project('Test Project with Template')
|
||||||
|
|
||||||
|
project.load_tasks()
|
||||||
|
|
||||||
|
task1 = project.tasks[0]
|
||||||
|
self.assertEqual(task1.title, 'Task 1')
|
||||||
|
self.assertEqual(task1.description, 'Task 1 description')
|
||||||
|
self.assertEqual(getdate(task1.start_date), getdate('2019-01-01'))
|
||||||
|
self.assertEqual(getdate(task1.end_date), getdate('2019-01-04'))
|
||||||
|
|
||||||
|
self.assertEqual(len(project.tasks), 4)
|
||||||
|
task4 = project.tasks[3]
|
||||||
|
self.assertEqual(task4.title, 'Task 4')
|
||||||
|
self.assertEqual(getdate(task4.end_date), getdate('2019-01-06'))
|
||||||
|
|
||||||
|
def test_bulk_complete_and_cancel(self):
|
||||||
|
frappe.db.sql('delete from tabTask where project = "Test Project for Bulk Actions"')
|
||||||
|
frappe.delete_doc('Project', 'Test Project for Bulk Actions')
|
||||||
|
|
||||||
|
project = get_project('Test Project for Bulk Actions')
|
||||||
|
set_project_status(project.name, 'Completed')
|
||||||
|
|
||||||
|
# check all tasks are completed
|
||||||
|
self.assertTrue(all([d.status=='Completed' for d in
|
||||||
|
frappe.get_all('Task', ['name', 'status'], dict(project = project.name))]))
|
||||||
|
|
||||||
|
# check all tasks are cancelled
|
||||||
|
set_project_status(project.name, 'Cancelled')
|
||||||
|
self.assertTrue(all([d.status=='Cancelled' for d in
|
||||||
|
frappe.get_all('Task', ['name', 'status'], dict(project = project.name))]))
|
||||||
|
|
||||||
|
|
||||||
|
def get_project(name):
|
||||||
|
template = get_project_template()
|
||||||
|
|
||||||
|
project = frappe.get_doc(dict(
|
||||||
|
doctype = 'Project',
|
||||||
|
project_name = name,
|
||||||
|
status = 'Open',
|
||||||
|
project_template = template.name,
|
||||||
|
expected_start_date = '2019-01-01'
|
||||||
|
)).insert()
|
||||||
|
|
||||||
|
return project
|
||||||
@@ -1,404 +1,430 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
"allow_guest_to_view": 0,
|
"allow_events_in_timeline": 0,
|
||||||
"allow_import": 0,
|
"allow_guest_to_view": 0,
|
||||||
"allow_rename": 0,
|
"allow_import": 0,
|
||||||
"beta": 0,
|
"allow_rename": 0,
|
||||||
"creation": "2015-02-22 11:15:28.201059",
|
"beta": 0,
|
||||||
"custom": 0,
|
"creation": "2015-02-22 11:15:28.201059",
|
||||||
"docstatus": 0,
|
"custom": 0,
|
||||||
"doctype": "DocType",
|
"docstatus": 0,
|
||||||
"document_type": "Other",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"document_type": "Other",
|
||||||
"engine": "InnoDB",
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 3,
|
"collapsible": 0,
|
||||||
"fieldname": "title",
|
"columns": 3,
|
||||||
"fieldtype": "Data",
|
"fieldname": "title",
|
||||||
"hidden": 0,
|
"fieldtype": "Data",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 1,
|
||||||
"label": "Title",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Title",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 1,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 1,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 3,
|
"collapsible": 0,
|
||||||
"default": "Open",
|
"columns": 3,
|
||||||
"fieldname": "status",
|
"default": "Open",
|
||||||
"fieldtype": "Select",
|
"fieldname": "status",
|
||||||
"hidden": 0,
|
"fieldtype": "Select",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 1,
|
||||||
"label": "Status",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Status",
|
||||||
"no_copy": 1,
|
"length": 0,
|
||||||
"options": "Open\nWorking\nPending Review\nOverdue\nClosed\nCancelled",
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"options": "Open\nWorking\nPending Review\nOverdue\nCompleted\nCancelled",
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 1,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 1,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"depends_on": "task_id",
|
"columns": 0,
|
||||||
"fieldname": "edit_task",
|
"depends_on": "task_id",
|
||||||
"fieldtype": "Button",
|
"fieldname": "edit_task",
|
||||||
"hidden": 0,
|
"fieldtype": "Button",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "View Task",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "View Task",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "edit_timesheet",
|
"columns": 0,
|
||||||
"fieldtype": "Button",
|
"fieldname": "edit_timesheet",
|
||||||
"hidden": 0,
|
"fieldtype": "Button",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "View Timesheet",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "View Timesheet",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "make_timesheet",
|
"columns": 0,
|
||||||
"fieldtype": "Button",
|
"fieldname": "make_timesheet",
|
||||||
"hidden": 0,
|
"fieldtype": "Button",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "Make Timesheet",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Make Timesheet",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "column_break_6",
|
"columns": 0,
|
||||||
"fieldtype": "Column Break",
|
"fieldname": "column_break_6",
|
||||||
"hidden": 0,
|
"fieldtype": "Column Break",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"length": 0,
|
"in_standard_filter": 0,
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 2,
|
"collapsible": 0,
|
||||||
"fieldname": "start_date",
|
"columns": 2,
|
||||||
"fieldtype": "Date",
|
"fieldname": "start_date",
|
||||||
"hidden": 0,
|
"fieldtype": "Date",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 1,
|
||||||
"label": "Start Date",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Start Date",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 2,
|
"collapsible": 0,
|
||||||
"default": "",
|
"columns": 2,
|
||||||
"fieldname": "end_date",
|
"default": "",
|
||||||
"fieldtype": "Date",
|
"fieldname": "end_date",
|
||||||
"hidden": 0,
|
"fieldtype": "Date",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 1,
|
||||||
"label": "End Date",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "End Date",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "task_weight",
|
"columns": 0,
|
||||||
"fieldtype": "Float",
|
"fieldname": "task_weight",
|
||||||
"hidden": 0,
|
"fieldtype": "Float",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 1,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 1,
|
||||||
"label": "Weight",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Weight",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 1,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 1,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "section_break_6",
|
"columns": 0,
|
||||||
"fieldtype": "Section Break",
|
"fieldname": "section_break_6",
|
||||||
"hidden": 0,
|
"fieldtype": "Section Break",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"length": 0,
|
"in_standard_filter": 0,
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "description",
|
"columns": 0,
|
||||||
"fieldtype": "Text Editor",
|
"fieldname": "description",
|
||||||
"hidden": 0,
|
"fieldtype": "Text Editor",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "Description",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Description",
|
||||||
"no_copy": 0,
|
"length": 0,
|
||||||
"permlevel": 0,
|
"no_copy": 0,
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 0,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 0,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 0,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_in_quick_entry": 0,
|
||||||
"bold": 0,
|
"allow_on_submit": 0,
|
||||||
"collapsible": 0,
|
"bold": 0,
|
||||||
"columns": 0,
|
"collapsible": 0,
|
||||||
"fieldname": "task_id",
|
"columns": 0,
|
||||||
"fieldtype": "Link",
|
"fieldname": "task_id",
|
||||||
"hidden": 1,
|
"fieldtype": "Link",
|
||||||
"ignore_user_permissions": 0,
|
"hidden": 1,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_user_permissions": 0,
|
||||||
"in_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_global_search": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
"in_standard_filter": 0,
|
"in_list_view": 0,
|
||||||
"label": "Task ID",
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"label": "Task ID",
|
||||||
"no_copy": 1,
|
"length": 0,
|
||||||
"options": "Task",
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"options": "Task",
|
||||||
"precision": "",
|
"permlevel": 0,
|
||||||
"print_hide": 0,
|
"precision": "",
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide": 0,
|
||||||
"read_only": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"remember_last_selected_value": 1,
|
"read_only": 0,
|
||||||
"report_hide": 0,
|
"remember_last_selected_value": 1,
|
||||||
"reqd": 0,
|
"report_hide": 0,
|
||||||
"search_index": 1,
|
"reqd": 0,
|
||||||
"set_only_once": 0,
|
"search_index": 1,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-07-05 19:34:31.204454",
|
"modified": "2019-02-19 12:30:52.648868",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Projects",
|
"module": "Projects",
|
||||||
"name": "Project Task",
|
"name": "Project Task",
|
||||||
"name_case": "",
|
"name_case": "",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [],
|
"permissions": [],
|
||||||
"quick_entry": 0,
|
"quick_entry": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"show_name_in_global_search": 0,
|
"show_name_in_global_search": 0,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"track_changes": 0,
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0,
|
||||||
|
"track_views": 0
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Project Template', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
130
erpnext/projects/doctype/project_template/project_template.json
Normal file
130
erpnext/projects/doctype/project_template/project_template.json
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
|
"autoname": "Prompt",
|
||||||
|
"beta": 0,
|
||||||
|
"creation": "2019-02-18 17:23:11.708371",
|
||||||
|
"custom": 0,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "DocType",
|
||||||
|
"document_type": "",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "project_type",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Project Type",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Project Type",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"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,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "tasks",
|
||||||
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Tasks",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Project Template Task",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"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,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
|
"idx": 0,
|
||||||
|
"image_view": 0,
|
||||||
|
"in_create": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 0,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2019-02-18 18:01:26.519832",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Projects",
|
||||||
|
"name": "Project Template",
|
||||||
|
"name_case": "",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"amend": 0,
|
||||||
|
"cancel": 0,
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"if_owner": 0,
|
||||||
|
"import": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"set_user_permissions": 0,
|
||||||
|
"share": 1,
|
||||||
|
"submit": 0,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"quick_entry": 1,
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
|
"show_name_in_global_search": 0,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 1,
|
||||||
|
"track_seen": 0,
|
||||||
|
"track_views": 0
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class ProjectTemplate(Document):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
def get_data():
|
||||||
|
return {
|
||||||
|
'fieldname': 'project_template',
|
||||||
|
'transactions': [
|
||||||
|
{
|
||||||
|
'items': ['Project']
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestProjectTemplate(unittest.TestCase):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_project_template():
|
||||||
|
if not frappe.db.exists('Project Template', 'Test Project Template'):
|
||||||
|
frappe.get_doc(dict(
|
||||||
|
doctype = 'Project Template',
|
||||||
|
name = 'Test Project Template',
|
||||||
|
tasks = [
|
||||||
|
dict(subject='Task 1', description='Task 1 description',
|
||||||
|
start=0, duration=3),
|
||||||
|
dict(subject='Task 2', description='Task 2 description',
|
||||||
|
start=0, duration=2),
|
||||||
|
dict(subject='Task 3', description='Task 3 description',
|
||||||
|
start=2, duration=4),
|
||||||
|
dict(subject='Task 4', description='Task 4 description',
|
||||||
|
start=3, duration=2),
|
||||||
|
]
|
||||||
|
)).insert()
|
||||||
|
|
||||||
|
return frappe.get_doc('Project Template', 'Test Project Template')
|
||||||
@@ -0,0 +1,203 @@
|
|||||||
|
{
|
||||||
|
"allow_copy": 0,
|
||||||
|
"allow_events_in_timeline": 0,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
|
"allow_import": 0,
|
||||||
|
"allow_rename": 0,
|
||||||
|
"beta": 0,
|
||||||
|
"creation": "2019-02-18 17:24:41.830096",
|
||||||
|
"custom": 0,
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "DocType",
|
||||||
|
"document_type": "",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "subject",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Subject",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"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,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "start",
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Begin On (Days)",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"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,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "duration",
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Duration (Days)",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"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,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "task_weight",
|
||||||
|
"fieldtype": "Float",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Task Weight",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"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,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_in_quick_entry": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "description",
|
||||||
|
"fieldtype": "Text Editor",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Description",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"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,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
|
"hide_heading": 0,
|
||||||
|
"hide_toolbar": 0,
|
||||||
|
"idx": 0,
|
||||||
|
"image_view": 0,
|
||||||
|
"in_create": 0,
|
||||||
|
"is_submittable": 0,
|
||||||
|
"issingle": 0,
|
||||||
|
"istable": 1,
|
||||||
|
"max_attachments": 0,
|
||||||
|
"modified": "2019-02-18 18:30:22.688966",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Projects",
|
||||||
|
"name": "Project Template Task",
|
||||||
|
"name_case": "",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [],
|
||||||
|
"quick_entry": 1,
|
||||||
|
"read_only": 0,
|
||||||
|
"read_only_onload": 0,
|
||||||
|
"show_name_in_global_search": 0,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 1,
|
||||||
|
"track_seen": 0,
|
||||||
|
"track_views": 0
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class ProjectTemplateTask(Document):
|
||||||
|
pass
|
||||||
@@ -49,9 +49,9 @@ frappe.ui.form.on("Task", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(frm.perm[0].write) {
|
if(frm.perm[0].write) {
|
||||||
if(frm.doc.status!=="Closed" && frm.doc.status!=="Cancelled") {
|
if(frm.doc.status!=="Completed" && frm.doc.status!=="Cancelled") {
|
||||||
frm.add_custom_button(__("Close"), function() {
|
frm.add_custom_button(__("Completed"), function() {
|
||||||
frm.set_value("status", "Closed");
|
frm.set_value("status", "Completed");
|
||||||
frm.save();
|
frm.save();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user