Merge branch 'develop'
This commit is contained in:
commit
84806bf673
@ -1,2 +1,2 @@
|
||||
from __future__ import unicode_literals
|
||||
__version__ = '6.26.0'
|
||||
__version__ = '6.27.0'
|
||||
|
@ -118,7 +118,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
|
||||
items_add: function(doc, cdt, cdn) {
|
||||
var row = frappe.get_doc(cdt, cdn);
|
||||
this.frm.script_manager.copy_from_first_row("items", row,
|
||||
["expense_account", "cost_center", "project_name"]);
|
||||
["expense_account", "cost_center", "project"]);
|
||||
},
|
||||
|
||||
on_submit: function() {
|
||||
@ -242,7 +242,7 @@ cur_frm.cscript.cost_center = function(doc, cdt, cdn){
|
||||
refresh_field('items');
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['items'].grid.get_field('project_name').get_query = function(doc, cdt, cdn) {
|
||||
cur_frm.fields_dict['items'].grid.get_field('project').get_query = function(doc, cdt, cdn) {
|
||||
return{
|
||||
filters:[
|
||||
['Project', 'status', 'not in', 'Completed, Cancelled']
|
||||
|
@ -116,103 +116,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_mobile",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mobile No",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_email",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Email",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Email",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -424,6 +327,254 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"fieldname": "section_addresses",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address and Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "supplier_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Select Supplier Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_mobile",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mobile No",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_email",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Email",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "col_break_address",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "shipping_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Select Shipping Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "shipping_address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Shipping Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -1821,106 +1972,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"depends_on": "supplier",
|
||||
"fieldname": "contact_section",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Details",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "icon-bullhorn",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "supplier_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "col_break23",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0,
|
||||
"width": "50%"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -2641,7 +2692,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2016-03-14 19:01:39.694265",
|
||||
"modified": "2016-03-16 15:02:51.511069",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Purchase Invoice",
|
||||
|
@ -121,7 +121,7 @@ class PurchaseInvoice(BuyingController):
|
||||
},
|
||||
"Purchase Order Item": {
|
||||
"ref_dn_field": "po_detail",
|
||||
"compare_fields": [["project_name", "="], ["item_code", "="], ["uom", "="]],
|
||||
"compare_fields": [["project", "="], ["item_code", "="], ["uom", "="]],
|
||||
"is_child_table": True,
|
||||
"allow_duplicate_prev_row_id": True
|
||||
},
|
||||
@ -131,7 +131,7 @@ class PurchaseInvoice(BuyingController):
|
||||
},
|
||||
"Purchase Receipt Item": {
|
||||
"ref_dn_field": "pr_detail",
|
||||
"compare_fields": [["project_name", "="], ["item_code", "="], ["uom", "="]],
|
||||
"compare_fields": [["project", "="], ["item_code", "="], ["uom", "="]],
|
||||
"is_child_table": True
|
||||
}
|
||||
})
|
||||
@ -421,12 +421,12 @@ class PurchaseInvoice(BuyingController):
|
||||
def update_project(self):
|
||||
project_list = []
|
||||
for d in self.items:
|
||||
if d.project_name and d.project_name not in project_list:
|
||||
project = frappe.get_doc("Project", d.project_name)
|
||||
if d.project and d.project not in project_list:
|
||||
project = frappe.get_doc("Project", d.project)
|
||||
project.flags.dont_sync_tasks = True
|
||||
project.update_purchase_costing()
|
||||
project.save()
|
||||
project_list.append(d.project_name)
|
||||
project_list.append(d.project)
|
||||
|
||||
def validate_supplier_invoice(self):
|
||||
if self.bill_date:
|
||||
|
@ -222,14 +222,14 @@ class TestPurchaseInvoice(unittest.TestCase):
|
||||
|
||||
def test_total_purchase_cost_for_project(self):
|
||||
existing_purchase_cost = frappe.db.sql("""select sum(base_net_amount)
|
||||
from `tabPurchase Invoice Item` where project_name = '_Test Project' and docstatus=1""")
|
||||
from `tabPurchase Invoice Item` where project = '_Test Project' and docstatus=1""")
|
||||
existing_purchase_cost = existing_purchase_cost and existing_purchase_cost[0][0] or 0
|
||||
|
||||
pi = make_purchase_invoice(currency="USD", conversion_rate=60, project_name="_Test Project")
|
||||
pi = make_purchase_invoice(currency="USD", conversion_rate=60, project="_Test Project")
|
||||
self.assertEqual(frappe.db.get_value("Project", "_Test Project", "total_purchase_cost"),
|
||||
existing_purchase_cost + 15000)
|
||||
|
||||
pi1 = make_purchase_invoice(qty=10, project_name="_Test Project")
|
||||
pi1 = make_purchase_invoice(qty=10, project="_Test Project")
|
||||
self.assertEqual(frappe.db.get_value("Project", "_Test Project", "total_purchase_cost"),
|
||||
existing_purchase_cost + 15500)
|
||||
|
||||
@ -338,7 +338,7 @@ def make_purchase_invoice(**args):
|
||||
"serial_no": args.serial_no,
|
||||
"stock_uom": "_Test UOM",
|
||||
"cost_center": "_Test Cost Center - _TC",
|
||||
"project_name": args.project_name
|
||||
"project": args.project
|
||||
})
|
||||
if not args.do_not_save:
|
||||
pi.insert()
|
||||
|
@ -7,6 +7,7 @@
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Document",
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@ -842,14 +843,14 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "project_name",
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"label": "Project",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Project",
|
||||
@ -1238,7 +1239,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-02-22 09:32:17.205040",
|
||||
"modified": "2016-03-10 05:05:27.752823",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Purchase Invoice Item",
|
||||
|
@ -278,7 +278,7 @@ $.extend(cur_frm.cscript, new erpnext.accounts.SalesInvoiceController({frm: cur_
|
||||
// Hide Fields
|
||||
// ------------
|
||||
cur_frm.cscript.hide_fields = function(doc) {
|
||||
par_flds = ['project_name', 'due_date', 'is_opening', 'source', 'total_advance', 'get_advances_received',
|
||||
par_flds = ['project', 'due_date', 'is_opening', 'source', 'total_advance', 'get_advances_received',
|
||||
'advances', 'sales_partner', 'commission_rate', 'total_commission', 'advances', 'from_date', 'to_date'];
|
||||
|
||||
if(cint(doc.is_pos) == 1) {
|
||||
@ -381,7 +381,7 @@ cur_frm.fields_dict.write_off_cost_center.get_query = function(doc) {
|
||||
|
||||
//project name
|
||||
//--------------------------
|
||||
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
|
||||
cur_frm.fields_dict['project'].get_query = function(doc, cdt, cdn) {
|
||||
return{
|
||||
query: "erpnext.controllers.queries.get_project_name",
|
||||
filters: {'customer': doc.customer}
|
||||
|
@ -2363,14 +2363,14 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "project_name",
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"label": "Project",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "project_name",
|
||||
@ -3418,7 +3418,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2016-03-14 19:02:25.882750",
|
||||
"modified": "2016-03-15 19:02:25.882750",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Sales Invoice",
|
||||
|
@ -323,12 +323,12 @@ class SalesInvoice(SellingController):
|
||||
super(SalesInvoice, self).validate_with_previous_doc({
|
||||
"Sales Order": {
|
||||
"ref_dn_field": "sales_order",
|
||||
"compare_fields": [["customer", "="], ["company", "="], ["project_name", "="],
|
||||
"compare_fields": [["customer", "="], ["company", "="], ["project", "="],
|
||||
["currency", "="]],
|
||||
},
|
||||
"Delivery Note": {
|
||||
"ref_dn_field": "delivery_note",
|
||||
"compare_fields": [["customer", "="], ["company", "="], ["project_name", "="],
|
||||
"compare_fields": [["customer", "="], ["company", "="], ["project", "="],
|
||||
["currency", "="]],
|
||||
},
|
||||
})
|
||||
@ -365,12 +365,12 @@ class SalesInvoice(SellingController):
|
||||
|
||||
def validate_proj_cust(self):
|
||||
"""check for does customer belong to same project as entered.."""
|
||||
if self.project_name and self.customer:
|
||||
if self.project and self.customer:
|
||||
res = frappe.db.sql("""select name from `tabProject`
|
||||
where name = %s and (customer = %s or customer is null or customer = '')""",
|
||||
(self.project_name, self.customer))
|
||||
(self.project, self.customer))
|
||||
if not res:
|
||||
throw(_("Customer {0} does not belong to project {1}").format(self.customer,self.project_name))
|
||||
throw(_("Customer {0} does not belong to project {1}").format(self.customer,self.project))
|
||||
|
||||
def validate_pos(self):
|
||||
if not self.cash_bank_account and flt(self.paid_amount):
|
||||
|
@ -31,16 +31,11 @@
|
||||
{% for(var i=0, l=data.length; i<l; i++) { %}
|
||||
<tr>
|
||||
{% if(__(report.report_name) == "Accounts Receivable" || __(report.report_name) == "Accounts Payable") { %}
|
||||
{% if(data[i][__("Posting Date")]) { %}
|
||||
{% if(data[i][__("Customer")] || data[i][__("Supplier")]) { %}
|
||||
<td>{%= dateutil.str_to_user(data[i][__("Posting Date")]) %}</td>
|
||||
<td>{%= data[i][__("Voucher Type")] %}
|
||||
<br>{%= data[i][__("Voucher No")] %}</td>
|
||||
<td>{%= data[i][__("Customer Name")] || data[i][__("Customer")] || data[i][__("Supplier Name")] || data[i][__("Supplier")] %}
|
||||
{% if(__(report.report_name) == "Accounts Receivable") { %}
|
||||
<br>{%= __("Territory") %}: {%= data[i][__("Territory")] %}
|
||||
{% } else { %}
|
||||
<br>{%= __("Supplier Type") %}: {%= data[i][__("Supplier Type")] %}
|
||||
{% } %}
|
||||
<br>{%= __("Remarks") %}: {%= data[i][__("Remarks")] %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Invoiced Amount")]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Paid Amount")]) %}</td>
|
||||
@ -48,23 +43,22 @@
|
||||
{% } else { %}
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><b>{%= data[i][__("Customer")] || data[i][__("Supplier")] || " " %}</b></td>
|
||||
<td><b>{%= __("Total") %}</b></td>
|
||||
<td style="text-align: right">
|
||||
{%= data[i][__("Account")] && format_currency(data[i][__("Invoiced Amount")]) %}</td>
|
||||
{%= format_currency(data[i][__("Invoiced Amount")]) %}</td>
|
||||
<td style="text-align: right">
|
||||
{%= data[i][__("Account")] && format_currency(data[i][__("Paid Amount")]) %}</td>
|
||||
{%= format_currency(data[i][__("Paid Amount")]) %}</td>
|
||||
<td style="text-align: right">
|
||||
{%= data[i][__("Account")] && format_currency(data[i][__("Outstanding Amount")]) %}</td>
|
||||
{%= format_currency(data[i][__("Outstanding Amount")]) %}</td>
|
||||
{% } %}
|
||||
{% } else { %}
|
||||
{% if(data[i][__("Customer")] || data[i][__("Supplier")]|| " ") { %}
|
||||
<td>{%= data[i][__("Customer")] || data[i][__("Supplier")] %}
|
||||
{% if(__(report.report_name) == "Accounts Receivable Summary") { %}
|
||||
<br>{%= __("Territory") %}: {%= data[i][__("Territory")] %}
|
||||
{% } else { %}
|
||||
<br>{%= __("Supplier Type") %}: {%= data[i][__("Supplier Type")] %}
|
||||
{% } %}
|
||||
{% if((data[i][__("Customer")] || data[i][__("Supplier")]) != __("'Total'")) { %}
|
||||
<td>{%= data[i][__("Customer")] || data[i][__("Supplier")] %}
|
||||
<br>{%= __("Remarks") %}: {%= data[i][__("Remarks")] %}</td>
|
||||
{% } else { %}
|
||||
<td><b>{%= __("Total") %}</b></td>
|
||||
{% } %}
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Total Invoiced Amt")]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Total Paid Amt")]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Total Outstanding Amt")]) %}</td>
|
||||
|
@ -12,7 +12,7 @@
|
||||
"module": "Accounts",
|
||||
"name": "Delivered Items To Be Billed",
|
||||
"owner": "Administrator",
|
||||
"query": "select\n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project_name` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabDelivery Note Item`.`qty` - ifnull((select sum(qty) from `tabSales Invoice Item` \n\t where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n\t `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Qty:Float:110\",\n\t(`tabDelivery Note Item`.`base_amount` - ifnull((select sum(base_amount) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\",\n\t`tabDelivery Note`.`company` as \"Company:Link/Company:\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` not in (\"Stopped\", \"Closed\") and\n `tabDelivery Note`.name = `tabDelivery Note Item`.parent and\n (`tabDelivery Note Item`.qty > ifnull((select sum(qty) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\norder by `tabDelivery Note`.`name` desc",
|
||||
"query": "select\n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabDelivery Note Item`.`qty` - ifnull((select sum(qty) from `tabSales Invoice Item` \n\t where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n\t `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Qty:Float:110\",\n\t(`tabDelivery Note Item`.`base_amount` - ifnull((select sum(base_amount) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\",\n\t`tabDelivery Note`.`company` as \"Company:Link/Company:\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` not in (\"Stopped\", \"Closed\") and\n `tabDelivery Note`.name = `tabDelivery Note Item`.parent and\n (`tabDelivery Note Item`.qty > ifnull((select sum(qty) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\norder by `tabDelivery Note`.`name` desc",
|
||||
"ref_doctype": "Sales Invoice",
|
||||
"report_name": "Delivered Items To Be Billed",
|
||||
"report_type": "Query Report"
|
||||
|
@ -18,7 +18,7 @@ def execute(filters=None):
|
||||
group_wise_columns = frappe._dict({
|
||||
"invoice": ["parent", "customer", "posting_date","item_code", "item_name","item_group", "brand", "description", \
|
||||
"warehouse", "qty", "base_rate", "buying_rate", "base_amount",
|
||||
"buying_amount", "gross_profit", "gross_profit_percent", "project_name"],
|
||||
"buying_amount", "gross_profit", "gross_profit_percent", "project"],
|
||||
"item_code": ["item_code", "item_name", "brand", "description", "qty", "base_rate",
|
||||
"buying_rate", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
|
||||
"warehouse": ["warehouse", "qty", "base_rate", "buying_rate", "base_amount", "buying_amount",
|
||||
@ -35,7 +35,7 @@ def execute(filters=None):
|
||||
"gross_profit", "gross_profit_percent"],
|
||||
"sales_person": ["sales_person", "allocated_amount", "qty", "base_rate", "buying_rate", "base_amount", "buying_amount",
|
||||
"gross_profit", "gross_profit_percent"],
|
||||
"project": ["project_name", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
|
||||
"project": ["project", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
|
||||
"territory": ["territory", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"]
|
||||
})
|
||||
|
||||
@ -70,7 +70,7 @@ def get_columns(group_wise_columns, filters):
|
||||
"buying_amount": _("Buying Amount") + ":Currency/currency",
|
||||
"gross_profit": _("Gross Profit") + ":Currency/currency",
|
||||
"gross_profit_percent": _("Gross Profit %") + ":Percent",
|
||||
"project_name": _("Project") + ":Link/Project",
|
||||
"project": _("Project") + ":Link/Project",
|
||||
"sales_person": _("Sales person"),
|
||||
"allocated_amount": _("Allocated Amount") + ":Currency/currency",
|
||||
"customer": _("Customer") + ":Link/Customer",
|
||||
@ -233,7 +233,7 @@ class GrossProfitGenerator(object):
|
||||
conditions += " and posting_date <= %(to_date)s"
|
||||
|
||||
self.si_list = frappe.db.sql("""select item.parenttype, item.parent,
|
||||
si.posting_date, si.posting_time, si.project_name, si.update_stock,
|
||||
si.posting_date, si.posting_time, si.project, si.update_stock,
|
||||
si.customer, si.customer_group, si.territory,
|
||||
item.item_code, item.item_name, item.description, item.warehouse,
|
||||
item.item_group, item.brand, item.dn_detail, item.delivery_note,
|
||||
|
@ -27,7 +27,7 @@ def execute(filters=None):
|
||||
|
||||
expense_account = d.expense_account or aii_account_map.get(d.company)
|
||||
row = [d.item_code, d.item_name, d.item_group, d.parent, d.posting_date, d.supplier,
|
||||
d.supplier_name, d.credit_to, d.project_name, d.company, d.purchase_order,
|
||||
d.supplier_name, d.credit_to, d.project, d.company, d.purchase_order,
|
||||
purchase_receipt, expense_account, d.qty, d.base_net_rate, d.base_net_amount]
|
||||
|
||||
for tax in tax_accounts:
|
||||
@ -69,7 +69,7 @@ def get_items(filters):
|
||||
|
||||
return frappe.db.sql("""select pi_item.parent, pi.posting_date, pi.credit_to, pi.company,
|
||||
pi.supplier, pi.remarks, pi.base_net_total, pi_item.item_code, pi_item.item_name, pi_item.item_group,
|
||||
pi_item.project_name, pi_item.purchase_order, pi_item.purchase_receipt, pi_item.po_detail,
|
||||
pi_item.project, pi_item.purchase_order, pi_item.purchase_receipt, pi_item.po_detail,
|
||||
pi_item.expense_account, pi_item.qty, pi_item.base_net_rate, pi_item.base_net_amount, pi.supplier_name
|
||||
from `tabPurchase Invoice` pi, `tabPurchase Invoice Item` pi_item
|
||||
where pi.name = pi_item.parent and pi.docstatus = 1 %s %s
|
||||
|
@ -25,7 +25,7 @@ def execute(filters=None):
|
||||
from `tabDelivery Note Item` where docstatus=1 and so_detail=%s""", d.so_detail))
|
||||
|
||||
row = [d.item_code, d.item_name, d.item_group, d.parent, d.posting_date, d.customer, d.customer_name,
|
||||
d.customer_group, d.debit_to, d.territory, d.project_name, d.company, d.sales_order,
|
||||
d.customer_group, d.debit_to, d.territory, d.project, d.company, d.sales_order,
|
||||
delivery_note, d.income_account, d.qty, d.base_net_rate, d.base_net_amount]
|
||||
|
||||
for tax in tax_accounts:
|
||||
@ -66,7 +66,7 @@ def get_conditions(filters):
|
||||
|
||||
def get_items(filters):
|
||||
conditions = get_conditions(filters)
|
||||
return frappe.db.sql("""select si_item.parent, si.posting_date, si.debit_to, si.project_name,
|
||||
return frappe.db.sql("""select si_item.parent, si.posting_date, si.debit_to, si.project,
|
||||
si.customer, si.remarks, si.territory, si.company, si.base_net_total, si_item.item_code, si_item.item_name,
|
||||
si_item.item_group, si_item.sales_order, si_item.delivery_note, si_item.income_account,
|
||||
si_item.qty, si_item.base_net_rate, si_item.base_net_amount, si.customer_name,
|
||||
|
@ -12,7 +12,7 @@
|
||||
"module": "Accounts",
|
||||
"name": "Ordered Items To Be Billed",
|
||||
"owner": "Administrator",
|
||||
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project_name` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.base_amount as \"Amount:Currency:110\",\n (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (ifnull(`tabSales Order Item`.base_amount, 0) - (ifnull(`tabSales Order Item`.billed_amt, 0) * ifnull(`tabSales Order`.conversion_rate, 1))) as \"Pending Amount:Currency:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order`.`company` as \"Company:Link/Company:\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Closed\"\n and ifnull(`tabSales Order Item`.billed_amt,0) < ifnull(`tabSales Order Item`.amount,0)\norder by `tabSales Order`.transaction_date asc",
|
||||
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.base_amount as \"Amount:Currency:110\",\n (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (ifnull(`tabSales Order Item`.base_amount, 0) - (ifnull(`tabSales Order Item`.billed_amt, 0) * ifnull(`tabSales Order`.conversion_rate, 1))) as \"Pending Amount:Currency:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order`.`company` as \"Company:Link/Company:\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Closed\"\n and ifnull(`tabSales Order Item`.billed_amt,0) < ifnull(`tabSales Order Item`.amount,0)\norder by `tabSales Order`.transaction_date asc",
|
||||
"ref_doctype": "Sales Invoice",
|
||||
"report_name": "Ordered Items To Be Billed",
|
||||
"report_type": "Query Report"
|
||||
|
@ -12,7 +12,7 @@
|
||||
"module": "Accounts",
|
||||
"name": "Purchase Order Items To Be Billed",
|
||||
"owner": "Administrator",
|
||||
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.base_amount as \"Amount:Currency:100\",\n\t(`tabPurchase Order Item`.billed_amt * ifnull(`tabPurchase Order`.conversion_rate, 1)) as \"Billed Amount:Currency:100\", \n\t(`tabPurchase Order Item`.base_amount - (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1))) as \"Amount to Bill:Currency:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n\t`tabPurchase Order`.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Closed\"\n\tand (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1)) < ifnull(`tabPurchase Order Item`.base_amount, 0)\norder by `tabPurchase Order`.transaction_date asc",
|
||||
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.base_amount as \"Amount:Currency:100\",\n\t(`tabPurchase Order Item`.billed_amt * ifnull(`tabPurchase Order`.conversion_rate, 1)) as \"Billed Amount:Currency:100\", \n\t(`tabPurchase Order Item`.base_amount - (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1))) as \"Amount to Bill:Currency:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n\t`tabPurchase Order`.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Closed\"\n\tand (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1)) < ifnull(`tabPurchase Order Item`.base_amount, 0)\norder by `tabPurchase Order`.transaction_date asc",
|
||||
"ref_doctype": "Purchase Invoice",
|
||||
"report_name": "Purchase Order Items To Be Billed",
|
||||
"report_type": "Query Report"
|
||||
|
@ -27,11 +27,11 @@ def execute(filters=None):
|
||||
# invoice details
|
||||
purchase_order = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_order", [])))
|
||||
purchase_receipt = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_receipt", [])))
|
||||
project_name = list(set(invoice_po_pr_map.get(inv.name, {}).get("project_name", [])))
|
||||
project = list(set(invoice_po_pr_map.get(inv.name, {}).get("project", [])))
|
||||
|
||||
row = [inv.name, inv.posting_date, inv.supplier, inv.supplier_name,
|
||||
supplier_details.get(inv.supplier),
|
||||
inv.credit_to, ", ".join(project_name), inv.bill_no, inv.bill_date, inv.remarks,
|
||||
inv.credit_to, ", ".join(project), inv.bill_no, inv.bill_date, inv.remarks,
|
||||
", ".join(purchase_order), ", ".join(purchase_receipt)]
|
||||
|
||||
# map expense values
|
||||
@ -146,7 +146,7 @@ def get_invoice_tax_map(invoice_list, invoice_expense_map, expense_accounts):
|
||||
|
||||
def get_invoice_po_pr_map(invoice_list):
|
||||
pi_items = frappe.db.sql("""select parent, purchase_order, purchase_receipt, po_detail,
|
||||
project_name from `tabPurchase Invoice Item` where parent in (%s)
|
||||
project from `tabPurchase Invoice Item` where parent in (%s)
|
||||
and (ifnull(purchase_order, '') != '' or ifnull(purchase_receipt, '') != '')""" %
|
||||
', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)
|
||||
|
||||
@ -166,9 +166,9 @@ def get_invoice_po_pr_map(invoice_list):
|
||||
if pr_list:
|
||||
invoice_po_pr_map.setdefault(d.parent, frappe._dict()).setdefault("purchase_receipt", pr_list)
|
||||
|
||||
if d.project_name:
|
||||
if d.project:
|
||||
invoice_po_pr_map.setdefault(d.parent, frappe._dict()).setdefault(
|
||||
"project_name", []).append(d.project_name)
|
||||
"project", []).append(d.project)
|
||||
|
||||
return invoice_po_pr_map
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
"module": "Accounts",
|
||||
"name": "Received Items To Be Billed",
|
||||
"owner": "Administrator",
|
||||
"query": "select\n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Receipt`.`posting_date` as \"Date:Date\",\n\t`tabPurchase Receipt Item`.`project_name` as \"Project\",\n\t`tabPurchase Receipt Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabPurchase Receipt Item`.`qty` - ifnull((select sum(qty) from `tabPurchase Invoice Item` \n\t where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus = 1 and\n\t `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t as \"Qty:Float:110\",\n\t(`tabPurchase Receipt Item`.`base_amount` - ifnull((select sum(base_amount) \n from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus = 1 and\n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t as \"Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\",\n\t`tabPurchase Receipt`.`company` as \"Company:Link/Company:\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n `tabPurchase Receipt`.docstatus = 1 and `tabPurchase Receipt`.status != \"Closed\" and \n `tabPurchase Receipt`.name = `tabPurchase Receipt Item`.parent and\n (`tabPurchase Receipt Item`.qty > ifnull((select sum(qty) from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus=1 and \n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\norder by `tabPurchase Receipt`.`name` desc",
|
||||
"query": "select\n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Receipt`.`posting_date` as \"Date:Date\",\n\t`tabPurchase Receipt Item`.`project` as \"Project\",\n\t`tabPurchase Receipt Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabPurchase Receipt Item`.`qty` - ifnull((select sum(qty) from `tabPurchase Invoice Item` \n\t where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus = 1 and\n\t `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t as \"Qty:Float:110\",\n\t(`tabPurchase Receipt Item`.`base_amount` - ifnull((select sum(base_amount) \n from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus = 1 and\n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t as \"Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\",\n\t`tabPurchase Receipt`.`company` as \"Company:Link/Company:\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n `tabPurchase Receipt`.docstatus = 1 and `tabPurchase Receipt`.status != \"Closed\" and \n `tabPurchase Receipt`.name = `tabPurchase Receipt Item`.parent and\n (`tabPurchase Receipt Item`.qty > ifnull((select sum(qty) from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus=1 and \n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\norder by `tabPurchase Receipt`.`name` desc",
|
||||
"ref_doctype": "Purchase Invoice",
|
||||
"report_name": "Received Items To Be Billed",
|
||||
"report_type": "Query Report"
|
||||
|
@ -32,7 +32,7 @@ def execute(filters=None):
|
||||
row = [inv.name, inv.posting_date, inv.customer, inv.customer_name,
|
||||
customer_map.get(inv.customer, {}).get("customer_group"),
|
||||
customer_map.get(inv.customer, {}).get("territory"),
|
||||
inv.debit_to, inv.project_name, inv.remarks, ", ".join(sales_order), ", ".join(delivery_note)]
|
||||
inv.debit_to, inv.project, inv.remarks, ", ".join(sales_order), ", ".join(delivery_note)]
|
||||
|
||||
# map income values
|
||||
base_net_total = 0
|
||||
@ -107,7 +107,7 @@ def get_conditions(filters):
|
||||
|
||||
def get_invoices(filters):
|
||||
conditions = get_conditions(filters)
|
||||
return frappe.db.sql("""select name, posting_date, debit_to, project_name, customer,
|
||||
return frappe.db.sql("""select name, posting_date, debit_to, project, customer,
|
||||
customer_name, remarks, base_net_total, base_grand_total, base_rounded_total, outstanding_amount
|
||||
from `tabSales Invoice`
|
||||
where docstatus = 1 %s order by posting_date desc, name desc""" %
|
||||
|
@ -142,14 +142,14 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
}
|
||||
},
|
||||
|
||||
project_name: function(doc, cdt, cdn) {
|
||||
project: function(doc, cdt, cdn) {
|
||||
var item = frappe.get_doc(cdt, cdn);
|
||||
if(item.project_name) {
|
||||
if(item.project) {
|
||||
$.each(this.frm.doc["items"] || [],
|
||||
function(i, other_item) {
|
||||
if(!other_item.project_name) {
|
||||
other_item.project_name = item.project_name;
|
||||
refresh_field("project_name", other_item.name, other_item.parentfield);
|
||||
if(!other_item.project) {
|
||||
other_item.project = item.project;
|
||||
refresh_field("project", other_item.name, other_item.parentfield);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -170,10 +170,43 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
this.frm.add_custom_button(__("Product Bundle"), function() {
|
||||
erpnext.buying.get_items_from_product_bundle(me.frm);
|
||||
}, __("Get items from"));
|
||||
},
|
||||
|
||||
company: function() {
|
||||
var me = this;
|
||||
if (frappe.meta.get_docfield(this.frm.doctype, "shipping_address")
|
||||
&& !this.frm.doc.shipping_address) {
|
||||
erpnext.utils.get_shipping_address(this.frm)
|
||||
}
|
||||
},
|
||||
|
||||
shipping_address: function(){
|
||||
var me = this;
|
||||
|
||||
this.frm.set_query("shipping_address", function(){
|
||||
if(me.frm.doc.customer){
|
||||
return{
|
||||
filters:{
|
||||
"customer": me.frm.doc.customer
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
return{
|
||||
filters:{
|
||||
"is_your_company_address": 1,
|
||||
"company": me.frm.doc.company
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
erpnext.utils.get_address_display(this.frm, "shipping_address",
|
||||
"shipping_address_display", is_your_company_address=true)
|
||||
}
|
||||
});
|
||||
|
||||
cur_frm.add_fetch('project_name', 'cost_center', 'cost_center');
|
||||
cur_frm.add_fetch('project', 'cost_center', 'cost_center');
|
||||
|
||||
erpnext.buying.get_default_bom = function(frm) {
|
||||
$.each(frm.doc["items"] || [], function(i, d) {
|
||||
|
@ -43,11 +43,8 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
|
||||
if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100) {
|
||||
cur_frm.add_custom_button(__('Close'), this.close_purchase_order, __("Status"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(is_drop_ship && doc.status!="Delivered"){
|
||||
cur_frm.add_custom_button(__('Delivered'),
|
||||
this.delivered_by_supplier, __("Status"));
|
||||
@ -243,7 +240,7 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['items'].grid.get_field('project_name').get_query = function(doc, cdt, cdn) {
|
||||
cur_frm.fields_dict['items'].grid.get_field('project').get_query = function(doc, cdt, cdn) {
|
||||
return {
|
||||
filters:[
|
||||
['Project', 'status', 'not in', 'Completed, Cancelled']
|
||||
|
@ -191,104 +191,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_mobile",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mobile No",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_email",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Email",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Email",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -499,33 +401,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "customer_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -553,31 +428,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "customer_address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer Address Display",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -654,6 +504,254 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"fieldname": "section_addresses",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address and Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "supplier_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Select Supplier Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_mobile",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mobile No",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_email",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Email",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "col_break_address",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "shipping_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Select Shipping Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "shipping_address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Shipping Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -1845,105 +1943,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"depends_on": "supplier",
|
||||
"fieldname": "contact_section",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Details",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "icon-bullhorn",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "supplier_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "cb_contact",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -2694,7 +2693,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-03-14 19:00:26.271371",
|
||||
"modified": "2016-03-16 15:35:21.382861",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Purchase Order",
|
||||
|
@ -58,7 +58,7 @@ class PurchaseOrder(BuyingController):
|
||||
},
|
||||
"Supplier Quotation Item": {
|
||||
"ref_dn_field": "supplier_quotation_item",
|
||||
"compare_fields": [["rate", "="], ["project_name", "="], ["item_code", "="]],
|
||||
"compare_fields": [["rate", "="], ["project", "="], ["item_code", "="]],
|
||||
"is_child_table": True
|
||||
}
|
||||
})
|
||||
|
@ -934,14 +934,14 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "project_name",
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"label": "Project",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Project",
|
||||
@ -1384,7 +1384,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-02-22 09:33:02.405537",
|
||||
"modified": "2016-03-10 05:08:54.505417",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Purchase Order Item",
|
||||
|
@ -46,7 +46,7 @@ cur_frm.cscript.uom = function(doc, cdt, cdn) {
|
||||
// no need to trigger updation of stock uom, as this field doesn't exist in supplier quotation
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['items'].grid.get_field('project_name').get_query =
|
||||
cur_frm.fields_dict['items'].grid.get_field('project').get_query =
|
||||
function(doc, cdt, cdn) {
|
||||
return{
|
||||
filters:[
|
||||
|
@ -139,103 +139,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_mobile",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mobile No",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_email",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Email",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Email",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -343,6 +246,178 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"fieldname": "address_section",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address and Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "supplier_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_mobile",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mobile No",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_email",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Email",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Email",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -1487,82 +1562,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"depends_on": "supplier",
|
||||
"fieldname": "contact_section",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Details",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "icon-bullhorn",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "supplier_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -1781,7 +1780,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2016-03-04 00:56:36.066372",
|
||||
"modified": "2016-03-16 15:36:05.481917",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Supplier Quotation",
|
||||
|
@ -803,14 +803,14 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "project_name",
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"label": "Project",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Project",
|
||||
@ -1046,7 +1046,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-02-22 09:36:18.864207",
|
||||
"modified": "2016-03-10 05:15:03.936587",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Supplier Quotation Item",
|
||||
|
File diff suppressed because one or more lines are too long
@ -12,7 +12,7 @@
|
||||
"module": "Buying",
|
||||
"name": "Item-wise Purchase History",
|
||||
"owner": "Administrator",
|
||||
"query": "select\n po_item.item_code as \"Item Code:Link/Item:120\",\n\tpo_item.item_name as \"Item Name::120\",\n po_item.item_group as \"Item Group:Link/Item Group:120\",\n\tpo_item.description as \"Description::150\",\n\tpo_item.qty as \"Qty:Float:100\",\n\tpo_item.uom as \"UOM:Link/UOM:80\",\n\tpo_item.base_rate as \"Rate:Currency:120\",\n\tpo_item.base_amount as \"Amount:Currency:120\",\n\tpo.name as \"Purchase Order:Link/Purchase Order:120\",\n\tpo.transaction_date as \"Transaction Date:Date:140\",\n\tpo.supplier as \"Supplier:Link/Supplier:130\",\n sup.supplier_name as \"Supplier Name::150\",\n\tpo_item.project_name as \"Project:Link/Project:130\",\n\tifnull(po_item.received_qty, 0) as \"Received Qty:Float:120\",\n\tpo.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order` po, `tabPurchase Order Item` po_item, `tabSupplier` sup\nwhere\n\tpo.name = po_item.parent and po.supplier = sup.name and po.docstatus = 1\norder by po.name desc",
|
||||
"query": "select\n po_item.item_code as \"Item Code:Link/Item:120\",\n\tpo_item.item_name as \"Item Name::120\",\n po_item.item_group as \"Item Group:Link/Item Group:120\",\n\tpo_item.description as \"Description::150\",\n\tpo_item.qty as \"Qty:Float:100\",\n\tpo_item.uom as \"UOM:Link/UOM:80\",\n\tpo_item.base_rate as \"Rate:Currency:120\",\n\tpo_item.base_amount as \"Amount:Currency:120\",\n\tpo.name as \"Purchase Order:Link/Purchase Order:120\",\n\tpo.transaction_date as \"Transaction Date:Date:140\",\n\tpo.supplier as \"Supplier:Link/Supplier:130\",\n sup.supplier_name as \"Supplier Name::150\",\n\tpo_item.project as \"Project:Link/Project:130\",\n\tifnull(po_item.received_qty, 0) as \"Received Qty:Float:120\",\n\tpo.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order` po, `tabPurchase Order Item` po_item, `tabSupplier` sup\nwhere\n\tpo.name = po_item.parent and po.supplier = sup.name and po.docstatus = 1\norder by po.name desc",
|
||||
"ref_doctype": "Purchase Order",
|
||||
"report_name": "Item-wise Purchase History",
|
||||
"report_type": "Query Report"
|
||||
|
3
erpnext/change_log/v6/v6_27_0.md
Normal file
3
erpnext/change_log/v6/v6_27_0.md
Normal file
@ -0,0 +1,3 @@
|
||||
- New Grouping in Module Pages
|
||||
- Shipping Address in purchase cycle
|
||||
- Improved Leave Application workflow
|
@ -4,14 +4,8 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"icon": "icon-star",
|
||||
"label": _("Billing"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Journal Entry",
|
||||
"description": _("Accounting journal entries.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Sales Invoice",
|
||||
@ -22,6 +16,59 @@ def get_data():
|
||||
"name": "Purchase Invoice",
|
||||
"description": _("Bills raised by Suppliers.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Payment Request",
|
||||
"description": _("Payment Request")
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Accounts Receivable",
|
||||
"doctype": "Sales Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Accounts Payable",
|
||||
"doctype": "Purchase Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
"label": _("Company and Accounts"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Company",
|
||||
"description": _("Company (not Customer or Supplier) master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Journal Entry",
|
||||
"description": _("Accounting journal entries.")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Accounts Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Chart of Accounts"),
|
||||
"route": "Accounts Browser/Account",
|
||||
"description": _("Tree of financial accounts."),
|
||||
"doctype": "Account",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name":"General Ledger",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Masters"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Customer",
|
||||
@ -34,93 +81,76 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Payment Request",
|
||||
"description": _("Payment Request")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Accounts Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Chart of Accounts"),
|
||||
"route": "Accounts Browser/Account",
|
||||
"description": _("Tree of financial accounts."),
|
||||
"doctype": "Account",
|
||||
"name": "Item",
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"icon": "icon-wrench",
|
||||
"label": _("Accounting Statements"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Bank Reconciliation",
|
||||
"description": _("Update bank payment dates with journals.")
|
||||
"type": "report",
|
||||
"name": "Trial Balance",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True,
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Payment Reconciliation",
|
||||
"description": _("Match non-linked Invoices and Payments.")
|
||||
"type": "report",
|
||||
"name": "Balance Sheet",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Period Closing Voucher",
|
||||
"description": _("Close Balance Sheet and book Profit or Loss.")
|
||||
"type": "report",
|
||||
"name": "Cash Flow",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Profit and Loss Statement",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Banking and Payments"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Payment Tool",
|
||||
"description": _("Create Payment Entries against Orders or Invoices.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"label": _("Update Bank Transaction Dates"),
|
||||
"name": "Bank Reconciliation",
|
||||
"description": _("Update bank payment dates with journals.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"label": _("Match Payments with Invoices"),
|
||||
"name": "Payment Reconciliation",
|
||||
"description": _("Match non-linked Invoices and Payments.")
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Bank Reconciliation Statement",
|
||||
"is_query_report": True,
|
||||
"doctype": "Journal Entry"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Bank Clearance Summary",
|
||||
"is_query_report": True,
|
||||
"doctype": "Journal Entry"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Setup"),
|
||||
"icon": "icon-cog",
|
||||
"label": _("Taxes"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Company",
|
||||
"description": _("Company (not Customer or Supplier) master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Fiscal Year",
|
||||
"description": _("Financial / accounting year.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Payment Gateway Account",
|
||||
"description": _("Setup Gateway accounts.")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Accounts Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Chart of Accounts"),
|
||||
"route": "Accounts Browser/Account",
|
||||
"description": _("Tree of financial accounts."),
|
||||
"doctype": "Account",
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Accounts Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Chart of Cost Centers"),
|
||||
"route": "Accounts Browser/Cost Center",
|
||||
"description": _("Tree of financial Cost Centers."),
|
||||
"doctype": "Cost Center",
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Accounts Settings",
|
||||
"description": _("Default settings for accounting transactions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Tax Rule",
|
||||
"description": _("Tax Rule for transactions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Sales Taxes and Charges Template",
|
||||
@ -133,19 +163,71 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "POS Profile",
|
||||
"label": _("Point-of-Sale Profile"),
|
||||
"description": _("Rules to calculate shipping amount for a sale")
|
||||
"name": "Tax Rule",
|
||||
"description": _("Tax Rule for transactions.")
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Sales Register",
|
||||
"doctype": "Sales Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Purchase Register",
|
||||
"doctype": "Purchase Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Budget and Cost Center"),
|
||||
"items": [
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Accounts Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Chart of Cost Centers"),
|
||||
"route": "Accounts Browser/Cost Center",
|
||||
"description": _("Tree of financial Cost Centers."),
|
||||
"doctype": "Cost Center",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Budget Variance Report",
|
||||
"is_query_report": True,
|
||||
"doctype": "Cost Center"
|
||||
},
|
||||
{
|
||||
"type":"doctype",
|
||||
"name": "Monthly Distribution",
|
||||
"description": _("Seasonality for setting budgets, targets etc.")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Period Closing Voucher",
|
||||
"description": _("Close Balance Sheet and book Profit or Loss.")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Setup"),
|
||||
"icon": "icon-cog",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Accounts Settings",
|
||||
"description": _("Default settings for accounting transactions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Shipping Rule",
|
||||
"description": _("Rules for adding shipping costs.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Pricing Rule",
|
||||
"description": _("Rules for applying pricing and discount.")
|
||||
"name": "Fiscal Year",
|
||||
"description": _("Financial / accounting year.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
@ -158,9 +240,15 @@ def get_data():
|
||||
"description": _("Currency exchange rate master.")
|
||||
},
|
||||
{
|
||||
"type":"doctype",
|
||||
"name": "Monthly Distribution",
|
||||
"description": _("Seasonality for setting budgets, targets etc.")
|
||||
"type": "doctype",
|
||||
"name": "Payment Gateway Account",
|
||||
"description": _("Setup Gateway accounts.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "POS Profile",
|
||||
"label": _("Point-of-Sale Profile"),
|
||||
"description": _("Rules to calculate shipping amount for a sale")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
@ -182,93 +270,8 @@ def get_data():
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Main Reports"),
|
||||
"icon": "icon-table",
|
||||
"label": _("To Bill"),
|
||||
"items": [
|
||||
{
|
||||
"type": "report",
|
||||
"name":"General Ledger",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True,
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Trial Balance",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True,
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Trial Balance for Party",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True,
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Gross Profit",
|
||||
"doctype": "Sales Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Accounts Receivable",
|
||||
"doctype": "Sales Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Accounts Payable",
|
||||
"doctype": "Purchase Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Sales Register",
|
||||
"doctype": "Sales Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Purchase Register",
|
||||
"doctype": "Purchase Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Balance Sheet",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Cash Flow",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Profit and Loss Statement",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "financial-analytics",
|
||||
"label": _("Financial Analytics"),
|
||||
"icon": "icon-bar-chart",
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Bank Reconciliation Statement",
|
||||
"is_query_report": True,
|
||||
"doctype": "Journal Entry"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Ordered Items To Be Billed",
|
||||
@ -293,11 +296,47 @@ def get_data():
|
||||
"is_query_report": True,
|
||||
"doctype": "Purchase Invoice"
|
||||
},
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
"label": _("Analytics"),
|
||||
"items": [
|
||||
{
|
||||
"type": "page",
|
||||
"name": "financial-analytics",
|
||||
"label": _("Financial Analytics"),
|
||||
"icon": "icon-bar-chart",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Bank Clearance Summary",
|
||||
"name": "Gross Profit",
|
||||
"doctype": "Sales Invoice",
|
||||
"is_query_report": True
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Purchase Invoice Trends",
|
||||
"is_query_report": True,
|
||||
"doctype": "Purchase Invoice"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Sales Invoice Trends",
|
||||
"is_query_report": True,
|
||||
"doctype": "Sales Invoice"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Other Reports"),
|
||||
"icon": "icon-table",
|
||||
"items": [
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Trial Balance for Party",
|
||||
"doctype": "GL Entry",
|
||||
"is_query_report": True,
|
||||
"doctype": "Journal Entry"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
@ -323,24 +362,6 @@ def get_data():
|
||||
"is_query_report": True,
|
||||
"doctype": "Purchase Invoice"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Budget Variance Report",
|
||||
"is_query_report": True,
|
||||
"doctype": "Cost Center"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Purchase Invoice Trends",
|
||||
"is_query_report": True,
|
||||
"doctype": "Purchase Invoice"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Sales Invoice Trends",
|
||||
"is_query_report": True,
|
||||
"doctype": "Sales Invoice"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Accounts Receivable Summary",
|
||||
|
@ -4,14 +4,9 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"label": _("Purchasing"),
|
||||
"icon": "icon-star",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Supplier",
|
||||
"description": _("Supplier database."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Material Request",
|
||||
@ -27,6 +22,21 @@ def get_data():
|
||||
"name": "Purchase Order",
|
||||
"description": _("Purchase Orders given to Suppliers."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Supplier"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Supplier",
|
||||
"description": _("Supplier database."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Supplier Type",
|
||||
"description": _("Supplier Type master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Contact",
|
||||
@ -37,11 +47,7 @@ def get_data():
|
||||
"name": "Address",
|
||||
"description": _("All Addresses."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item",
|
||||
"description": _("All Products or Services."),
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -53,20 +59,6 @@ def get_data():
|
||||
"name": "Buying Settings",
|
||||
"description": _("Default settings for buying transactions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Supplier Type",
|
||||
"description": _("Supplier Type master.")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Sales Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Item Group Tree"),
|
||||
"link": "Sales Browser/Item Group",
|
||||
"description": _("Tree of Item Groups."),
|
||||
"doctype": "Item Group",
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name":"Terms and Conditions",
|
||||
@ -78,11 +70,35 @@ def get_data():
|
||||
"name": "Purchase Taxes and Charges Template",
|
||||
"description": _("Tax template for buying transactions.")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Items and Pricing"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item",
|
||||
"description": _("All Products or Services."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Product Bundle",
|
||||
"description": _("Bundle items at time of sale."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Price List",
|
||||
"description": _("Price List master.")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Sales Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Item Group"),
|
||||
"link": "Sales Browser/Item Group",
|
||||
"description": _("Tree of Item Groups."),
|
||||
"doctype": "Item Group",
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item Price",
|
||||
@ -94,10 +110,11 @@ def get_data():
|
||||
"name": "Pricing Rule",
|
||||
"description": _("Rules for applying pricing and discount.")
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Main Reports"),
|
||||
"label": _("Analytics"),
|
||||
"icon": "icon-table",
|
||||
"items": [
|
||||
{
|
||||
@ -106,10 +123,22 @@ def get_data():
|
||||
"label": _("Purchase Analytics"),
|
||||
"icon": "icon-bar-chart",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Supplier-Wise Sales Analytics",
|
||||
"doctype": "Stock Ledger Entry"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Purchase Order Trends",
|
||||
"doctype": "Purchase Order"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"label": _("Other Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
@ -136,24 +165,12 @@ def get_data():
|
||||
"name": "Item-wise Purchase History",
|
||||
"doctype": "Item"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Purchase Order Trends",
|
||||
"doctype": "Purchase Order"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Supplier Addresses and Contacts",
|
||||
"doctype": "Supplier"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Supplier-Wise Sales Analytics",
|
||||
"doctype": "Stock Ledger Entry"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -3,7 +3,7 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"label": _("Sales Pipeline"),
|
||||
"icon": "icon-star",
|
||||
"items": [
|
||||
{
|
||||
@ -13,19 +13,55 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Customer",
|
||||
"description": _("Customer database."),
|
||||
"name": "Opportunity",
|
||||
"description": _("Potential opportunities for selling."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Opportunity",
|
||||
"description": _("Potential opportunities for selling."),
|
||||
"name": "Customer",
|
||||
"description": _("Customer database."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Contact",
|
||||
"description": _("All Contacts."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
"type": "page",
|
||||
"name": "sales-funnel",
|
||||
"label": _("Sales Funnel"),
|
||||
"icon": "icon-bar-chart",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Lead Details",
|
||||
"doctype": "Lead"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Customer Addresses and Contacts",
|
||||
"doctype": "Contact"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Inactive Customers",
|
||||
"doctype": "Sales Order"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Communication"),
|
||||
"icon": "icon-star",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Newsletter",
|
||||
@ -38,22 +74,6 @@ def get_data():
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"icon": "icon-wrench",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Center",
|
||||
"description":_("Send mass SMS to your contacts"),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Log",
|
||||
"description":_("Logs for maintaining sms delivery status"),
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Setup"),
|
||||
"icon": "icon-cog",
|
||||
@ -95,47 +115,27 @@ def get_data():
|
||||
"name": "Newsletter List",
|
||||
"description": _("Newsletter Mailing List"),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("SMS"),
|
||||
"icon": "icon-wrench",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Center",
|
||||
"description":_("Send mass SMS to your contacts"),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Log",
|
||||
"description":_("Logs for maintaining sms delivery status"),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Settings",
|
||||
"description": _("Setup SMS gateway settings")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Main Reports"),
|
||||
"icon": "icon-table",
|
||||
"items": [
|
||||
{
|
||||
"type": "page",
|
||||
"name": "sales-funnel",
|
||||
"label": _("Sales Funnel"),
|
||||
"icon": "icon-bar-chart",
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Lead Details",
|
||||
"doctype": "Lead"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Customer Addresses and Contacts",
|
||||
"doctype": "Contact"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Customers Not Buying Since Long Time",
|
||||
"doctype": "Sales Order"
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -9,6 +9,13 @@ def get_data():
|
||||
"icon": "octicon octicon-repo",
|
||||
"type": "module"
|
||||
},
|
||||
{
|
||||
"module_name": "Stock",
|
||||
"color": "#f39c12",
|
||||
"icon": "icon-truck",
|
||||
"icon": "octicon octicon-package",
|
||||
"type": "module"
|
||||
},
|
||||
{
|
||||
"module_name": "CRM",
|
||||
"color": "#EF4DB6",
|
||||
@ -60,13 +67,6 @@ def get_data():
|
||||
"icon": "octicon octicon-rocket",
|
||||
"type": "module"
|
||||
},
|
||||
{
|
||||
"module_name": "Stock",
|
||||
"color": "#f39c12",
|
||||
"icon": "icon-truck",
|
||||
"icon": "octicon octicon-package",
|
||||
"type": "module"
|
||||
},
|
||||
{
|
||||
"module_name": "Support",
|
||||
"color": "#2c3e50",
|
||||
|
@ -4,8 +4,7 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"icon": "icon-star",
|
||||
"label": _("Employee and Attendance"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
@ -14,13 +13,10 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Leave Application",
|
||||
"description": _("Applications for leave."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Expense Claim",
|
||||
"description": _("Claims for company expense."),
|
||||
"name": "Employee Attendance Tool",
|
||||
"label": _("Employee Attendance Tool"),
|
||||
"description":_("Mark Employee Attendance in Bulk"),
|
||||
"hide_count": True
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
@ -29,14 +25,15 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Salary Slip",
|
||||
"description": _("Monthly salary statement."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Appraisal",
|
||||
"description": _("Performance appraisal."),
|
||||
"name": "Upload Attendance",
|
||||
"description":_("Upload attendance from a .csv file"),
|
||||
"hide_count": True
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Recruitment"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Job Applicant",
|
||||
@ -55,21 +52,50 @@ def get_data():
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"icon": "icon-wrench",
|
||||
"label": _("Leaves and Holiday"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Employee Attendance Tool",
|
||||
"label": _("Employee Attendance Tool"),
|
||||
"description":_("Mark Employee Attendance in Bulk"),
|
||||
"name": "Leave Application",
|
||||
"description": _("Applications for leave."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name":"Leave Type",
|
||||
"description": _("Type of leaves like casual, sick etc."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Holiday List",
|
||||
"description": _("Holiday master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Leave Allocation",
|
||||
"description": _("Allocate leaves for a period.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Leave Control Panel",
|
||||
"label": _("Leave Allocation Tool"),
|
||||
"description":_("Allocate leaves for the year."),
|
||||
"hide_count": True
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Upload Attendance",
|
||||
"description":_("Upload attendance from a .csv file"),
|
||||
"hide_count": True
|
||||
"name": "Leave Block List",
|
||||
"description": _("Block leave applications by department.")
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Payroll"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Salary Slip",
|
||||
"description": _("Monthly salary statement."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
@ -78,14 +104,60 @@ def get_data():
|
||||
"description":_("Generate Salary Slips"),
|
||||
"hide_count": True
|
||||
},
|
||||
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Leave Control Panel",
|
||||
"label": _("Leave Allocation Tool"),
|
||||
"description":_("Allocate leaves for the year."),
|
||||
"hide_count": True
|
||||
"name": "Salary Structure",
|
||||
"description": _("Salary template master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Earning Type",
|
||||
"description": _("Salary components.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Deduction Type",
|
||||
"description": _("Tax and other salary deductions.")
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Expense Claims"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Expense Claim",
|
||||
"description": _("Claims for company expense."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Expense Claim Type",
|
||||
"description": _("Types of Expense Claim.")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Appraisals"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Appraisal",
|
||||
"description": _("Performance appraisal."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Appraisal Template",
|
||||
"description": _("Template for performance appraisals.")
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"icon": "icon-wrench",
|
||||
"items": [
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -117,60 +189,10 @@ def get_data():
|
||||
"name": "Designation",
|
||||
"description": _("Employee designation (e.g. CEO, Director etc.).")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Salary Structure",
|
||||
"description": _("Salary template master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Earning Type",
|
||||
"description": _("Salary components.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Deduction Type",
|
||||
"description": _("Tax and other salary deductions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Leave Allocation",
|
||||
"description": _("Allocate leaves for a period.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name":"Leave Type",
|
||||
"description": _("Type of leaves like casual, sick etc."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Holiday List",
|
||||
"description": _("Holiday master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Leave Block List",
|
||||
"description": _("Block leave applications by department.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Appraisal Template",
|
||||
"description": _("Template for performance appraisals.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Expense Claim Type",
|
||||
"description": _("Types of Expense Claim.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Email Account",
|
||||
"description": _("Setup incoming server for jobs email id. (e.g. jobs@example.com)")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"label": _("Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
|
@ -4,25 +4,48 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"label": _("Production"),
|
||||
"icon": "icon-star",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "BOM",
|
||||
"description": _("Bill of Materials (BOM)"),
|
||||
"label": _("Bill of Material")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Production Order",
|
||||
"description": _("Orders released for production."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Production Planning Tool",
|
||||
"description": _("Generate Material Requests (MRP) and Production Orders."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Stock Entry",
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Time Log",
|
||||
"description": _("Time Logs for manufacturing."),
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Bill of Materials"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "BOM",
|
||||
"description": _("Bill of Materials (BOM)"),
|
||||
"label": _("Bill of Materials")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "bom-browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("BOM Browser"),
|
||||
"description": _("Tree of Bill of Materials"),
|
||||
"doctype": "BOM"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item",
|
||||
@ -45,24 +68,11 @@ def get_data():
|
||||
"label": _("Tools"),
|
||||
"icon": "icon-wrench",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Production Planning Tool",
|
||||
"description": _("Generate Material Requests (MRP) and Production Orders."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "BOM Replace Tool",
|
||||
"description": _("Replace Item / BOM in all BOMs"),
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "bom-browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("BOM Browser"),
|
||||
"description": _("Tree of Bill of Materials"),
|
||||
"doctype": "BOM"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -76,7 +86,7 @@ def get_data():
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"label": _("Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
|
@ -4,19 +4,31 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"label": _("Projects"),
|
||||
"icon": "icon-star",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Project",
|
||||
"description": _("Project master."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Task",
|
||||
"description": _("Project activity / task."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Project",
|
||||
"description": _("Project master."),
|
||||
"type": "report",
|
||||
"route": "Gantt/Task",
|
||||
"doctype": "Task",
|
||||
"name": "Gantt Chart",
|
||||
"description": _("Gantt chart of all tasks.")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Time Tracking"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Time Log",
|
||||
@ -40,20 +52,7 @@ def get_data():
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"icon": "icon-wrench",
|
||||
"items": [
|
||||
{
|
||||
"type": "report",
|
||||
"route": "Gantt/Task",
|
||||
"doctype": "Task",
|
||||
"name": "Gantt Chart",
|
||||
"description": _("Gantt chart of all tasks.")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"label": _("Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
|
@ -4,14 +4,9 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"label": _("Sales"),
|
||||
"icon": "icon-star",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Customer",
|
||||
"description": _("Customer database."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Quotation",
|
||||
@ -22,6 +17,25 @@ def get_data():
|
||||
"name": "Sales Order",
|
||||
"description": _("Confirmed orders from Customers."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Customers"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Customer",
|
||||
"description": _("Customer database."),
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"label": _("Customer Group"),
|
||||
"name": "Sales Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"link": "Sales Browser/Customer Group",
|
||||
"description": _("Manage Customer Group Tree."),
|
||||
"doctype": "Customer Group",
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Contact",
|
||||
@ -32,57 +46,58 @@ def get_data():
|
||||
"name": "Address",
|
||||
"description": _("All Addresses."),
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Items and Pricing"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item",
|
||||
"description": _("All Products or Services."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Tools"),
|
||||
"icon": "icon-wrench",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Center",
|
||||
"description":_("Send mass SMS to your contacts"),
|
||||
"name": "Product Bundle",
|
||||
"description": _("Bundle items at time of sale."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Log",
|
||||
"description":_("Logs for maintaining sms delivery status"),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Newsletter",
|
||||
"description": _("Newsletters to contacts, leads."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Setup"),
|
||||
"icon": "icon-cog",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Selling Settings",
|
||||
"description": _("Default settings for selling transactions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Campaign",
|
||||
"description": _("Sales campaigns."),
|
||||
"name": "Price List",
|
||||
"description": _("Price List master.")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"label": _("Customer Group"),
|
||||
"name": "Sales Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"link": "Sales Browser/Customer Group",
|
||||
"description": _("Manage Customer Group Tree."),
|
||||
"doctype": "Customer Group",
|
||||
"label": _("Item Group"),
|
||||
"link": "Sales Browser/Item Group",
|
||||
"description": _("Tree of Item Groups."),
|
||||
"doctype": "Item Group",
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item Price",
|
||||
"description": _("Multiple Item prices."),
|
||||
"route": "Report/Item Price"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Shipping Rule",
|
||||
"description": _("Rules for adding shipping costs.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Pricing Rule",
|
||||
"description": _("Rules for applying pricing and discount.")
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Sales Partners and Territory"),
|
||||
"items": [
|
||||
{
|
||||
"type": "page",
|
||||
"label": _("Territory"),
|
||||
@ -107,13 +122,34 @@ def get_data():
|
||||
"doctype": "Sales Person",
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Sales Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Item Group Tree"),
|
||||
"link": "Sales Browser/Item Group",
|
||||
"description": _("Tree of Item Groups."),
|
||||
"doctype": "Item Group",
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Territory Target Variance (Item Group-Wise)",
|
||||
"route": "query-report/Territory Target Variance Item Group-Wise",
|
||||
"doctype": "Territory"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Sales Person Target Variance (Item Group-Wise)",
|
||||
"route": "query-report/Sales Person Target Variance Item Group-Wise",
|
||||
"doctype": "Sales Person",
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Setup"),
|
||||
"icon": "icon-cog",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Selling Settings",
|
||||
"description": _("Default settings for selling transactions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Campaign",
|
||||
"description": _("Sales campaigns."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
@ -126,51 +162,15 @@ def get_data():
|
||||
"name": "Sales Taxes and Charges Template",
|
||||
"description": _("Tax template for selling transactions.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Shipping Rule",
|
||||
"description": _("Rules for adding shipping costs.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Price List",
|
||||
"description": _("Price List master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item Price",
|
||||
"description": _("Multiple Item prices."),
|
||||
"route": "Report/Item Price"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Pricing Rule",
|
||||
"description": _("Rules for applying pricing and discount.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Product Bundle",
|
||||
"description": _("Bundle items at time of sale."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Email Account",
|
||||
"description": _("Setup incoming server for sales email id. (e.g. sales@example.com)")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Industry Type",
|
||||
"description": _("Track Leads by Industry Type.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Settings",
|
||||
"description": _("Setup SMS gateway settings")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Main Reports"),
|
||||
"label": _("Analytics"),
|
||||
"icon": "icon-table",
|
||||
"items": [
|
||||
{
|
||||
@ -192,10 +192,22 @@ def get_data():
|
||||
"doctype": "Customer",
|
||||
"icon": "icon-bar-chart",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Quotation Trends",
|
||||
"doctype": "Quotation"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Sales Order Trends",
|
||||
"doctype": "Sales Order"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"label": _("Other Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
@ -228,20 +240,6 @@ def get_data():
|
||||
"name": "Item-wise Sales History",
|
||||
"doctype": "Item"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Territory Target Variance (Item Group-Wise)",
|
||||
"route": "query-report/Territory Target Variance Item Group-Wise",
|
||||
"doctype": "Territory"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Sales Person Target Variance (Item Group-Wise)",
|
||||
"route": "query-report/Sales Person Target Variance Item Group-Wise",
|
||||
"doctype": "Sales Person",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
@ -251,19 +249,7 @@ def get_data():
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Customers Not Buying Since Long Time",
|
||||
"doctype": "Sales Order"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Quotation Trends",
|
||||
"doctype": "Quotation"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Sales Order Trends",
|
||||
"name": "Inactive Customers",
|
||||
"doctype": "Sales Order"
|
||||
},
|
||||
{
|
||||
@ -286,6 +272,27 @@ def get_data():
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("SMS"),
|
||||
"icon": "icon-wrench",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Center",
|
||||
"description":_("Send mass SMS to your contacts"),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Log",
|
||||
"description":_("Logs for maintaining sms delivery status"),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "SMS Settings",
|
||||
"description": _("Setup SMS gateway settings")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Help"),
|
||||
"items": [
|
||||
|
@ -4,19 +4,8 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"icon": "icon-star",
|
||||
"label": _("Stock Transactions"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item",
|
||||
"description": _("All Products or Services."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Material Request",
|
||||
"description": _("Requests for items."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Stock Entry",
|
||||
@ -34,14 +23,90 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Installation Note",
|
||||
"description": _("Installation record for a Serial No.")
|
||||
"name": "Material Request",
|
||||
"description": _("Requests for items."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Stock Reports"),
|
||||
"items": [
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Ledger",
|
||||
"doctype": "Stock Ledger Entry",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Balance",
|
||||
"doctype": "Stock Ledger Entry"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Projected Qty",
|
||||
"doctype": "Item",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Ageing",
|
||||
"doctype": "Item",
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Items and Pricing"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item",
|
||||
"description": _("All Products or Services."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Warehouse",
|
||||
"description": _("Where items are stored."),
|
||||
"name": "Product Bundle",
|
||||
"description": _("Bundle items at time of sale."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Price List",
|
||||
"description": _("Price List master.")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Sales Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Item Group"),
|
||||
"link": "Sales Browser/Item Group",
|
||||
"description": _("Tree of Item Groups."),
|
||||
"doctype": "Item Group",
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item Price",
|
||||
"description": _("Multiple Item prices."),
|
||||
"route": "Report/Item Price"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Shipping Rule",
|
||||
"description": _("Rules for adding shipping costs.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Pricing Rule",
|
||||
"description": _("Rules for applying pricing and discount.")
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Serial No and Batch"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Serial No",
|
||||
@ -52,6 +117,26 @@ def get_data():
|
||||
"name": "Batch",
|
||||
"description": _("Batch (lot) of an Item."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Installation Note",
|
||||
"description": _("Installation record for a Serial No.")
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Serial No Service Contract Expiry",
|
||||
"doctype": "Serial No"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Serial No Status",
|
||||
"doctype": "Serial No"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Serial No Warranty Expiry",
|
||||
"doctype": "Serial No"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -90,13 +175,9 @@ def get_data():
|
||||
"description": _("Default settings for stock transactions.")
|
||||
},
|
||||
{
|
||||
"type": "page",
|
||||
"name": "Sales Browser",
|
||||
"icon": "icon-sitemap",
|
||||
"label": _("Item Group Tree"),
|
||||
"link": "Sales Browser/Item Group",
|
||||
"description": _("Tree of Item Groups."),
|
||||
"doctype": "Item Group",
|
||||
"type": "doctype",
|
||||
"name": "Warehouse",
|
||||
"description": _("Where items are stored."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
@ -106,60 +187,20 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Warehouse",
|
||||
"description": _("Warehouses.")
|
||||
"name": "Item Attribute",
|
||||
"description": _("Attributes for Item Variants. e.g Size, Color etc."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Brand",
|
||||
"description": _("Brand master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Price List",
|
||||
"description": _("Price List master.")
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item Price",
|
||||
"description": _("Multiple Item prices."),
|
||||
"route": "Report/Item Price"
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Item Attribute",
|
||||
"description": _("Attributes for Item Variants. e.g Size, Color etc."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Main Reports"),
|
||||
"label": _("Analytics"),
|
||||
"icon": "icon-table",
|
||||
"items": [
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Ledger",
|
||||
"doctype": "Stock Ledger Entry",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Balance",
|
||||
"doctype": "Stock Ledger Entry"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Projected Qty",
|
||||
"doctype": "Item",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Stock Ageing",
|
||||
"doctype": "Item",
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": False,
|
||||
@ -171,11 +212,24 @@ def get_data():
|
||||
"name": "stock-analytics",
|
||||
"label": _("Stock Analytics"),
|
||||
"icon": "icon-bar-chart"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Delivery Note Trends",
|
||||
"doctype": "Delivery Note"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Purchase Receipt Trends",
|
||||
"doctype": "Purchase Receipt"
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"label": _("Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
@ -196,21 +250,6 @@ def get_data():
|
||||
"route": "Report/Bin/Item Shortage Report",
|
||||
"doctype": "Purchase Receipt"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Serial No Service Contract Expiry",
|
||||
"doctype": "Serial No"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Serial No Status",
|
||||
"doctype": "Serial No"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Serial No Warranty Expiry",
|
||||
"doctype": "Serial No"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
@ -235,18 +274,6 @@ def get_data():
|
||||
"name": "Itemwise Recommended Reorder Level",
|
||||
"doctype": "Item"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Delivery Note Trends",
|
||||
"doctype": "Delivery Note"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Purchase Receipt Trends",
|
||||
"doctype": "Purchase Receipt"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -4,8 +4,7 @@ from frappe import _
|
||||
def get_data():
|
||||
return [
|
||||
{
|
||||
"label": _("Documents"),
|
||||
"icon": "icon-star",
|
||||
"label": _("Issues"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
@ -14,9 +13,14 @@ def get_data():
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Warranty Claim",
|
||||
"description": _("Warranty Claim against Serial No."),
|
||||
"name": "Communication",
|
||||
"description": _("Communication log."),
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Maintenance"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Maintenance Schedule",
|
||||
@ -28,14 +32,20 @@ def get_data():
|
||||
"description": _("Visit report for maintenance call."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Newsletter",
|
||||
"description": _("Newsletters to contacts, leads."),
|
||||
"type": "report",
|
||||
"name": "Maintenance Schedules",
|
||||
"is_query_report": True,
|
||||
"doctype": "Maintenance Schedule"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Warranty"),
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Communication",
|
||||
"description": _("Communication log."),
|
||||
"name": "Warranty Claim",
|
||||
"description": _("Warranty Claim against Serial No."),
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
@ -45,18 +55,7 @@ def get_data():
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Setup"),
|
||||
"icon": "icon-cog",
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Email Account",
|
||||
"description": _("Setup incoming server for support email id. (e.g. support@example.com)")
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": _("Standard Reports"),
|
||||
"label": _("Reports"),
|
||||
"icon": "icon-list",
|
||||
"items": [
|
||||
{
|
||||
@ -65,12 +64,6 @@ def get_data():
|
||||
"label": _("Support Analytics"),
|
||||
"icon": "icon-bar-chart"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Maintenance Schedules",
|
||||
"is_query_report": True,
|
||||
"doctype": "Maintenance Schedule"
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
|
@ -201,17 +201,20 @@ def bom(doctype, txt, searchfield, start, page_len, filters):
|
||||
from tabBOM
|
||||
where tabBOM.docstatus=1
|
||||
and tabBOM.is_active=1
|
||||
and tabBOM.%(key)s like "%(txt)s"
|
||||
%(fcond)s %(mcond)s
|
||||
order_by
|
||||
and tabBOM.`{key}` like %(txt)s
|
||||
{fcond} {mcond}
|
||||
order by
|
||||
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
|
||||
idx desc, name
|
||||
limit %(start)s, %(page_len)s """ % {
|
||||
'key': searchfield,
|
||||
limit %(start)s, %(page_len)s """.format(
|
||||
fcond=get_filters_cond(doctype, filters, conditions),
|
||||
mcond=get_match_cond(doctype),
|
||||
key=frappe.db.escape(searchfield)),
|
||||
{
|
||||
'txt': "%%%s%%" % frappe.db.escape(txt),
|
||||
'_txt': txt.replace("%", ""),
|
||||
'fcond': get_filters_cond(doctype, filters, conditions),
|
||||
'mcond':get_match_cond(doctype), 'start': start, 'page_len': page_len
|
||||
'start': start,
|
||||
'page_len': page_len
|
||||
})
|
||||
|
||||
def get_project_name(doctype, txt, searchfield, start, page_len, filters):
|
||||
@ -232,7 +235,7 @@ def get_project_name(doctype, txt, searchfield, start, page_len, filters):
|
||||
start=start,
|
||||
page_len=page_len), {
|
||||
"txt": "%{0}%".format(txt),
|
||||
"_txt": txt.relace('%', '')
|
||||
"_txt": txt.replace('%', '')
|
||||
})
|
||||
|
||||
def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len, filters):
|
||||
|
@ -192,7 +192,7 @@ class StockController(AccountsController):
|
||||
"company": self.company,
|
||||
"batch_no": cstr(d.get("batch_no")).strip(),
|
||||
"serial_no": d.get("serial_no"),
|
||||
"project": d.get("project_name"),
|
||||
"project": d.get("project"),
|
||||
"is_cancelled": self.docstatus==2 and "Yes" or "No"
|
||||
})
|
||||
|
||||
|
@ -43,7 +43,7 @@ def get_data(filters, conditions):
|
||||
inc, cond= '',''
|
||||
query_details = conditions["based_on_select"] + conditions["period_wise_select"]
|
||||
|
||||
if conditions["based_on_select"] in ["t1.project_name,", "t2.project_name,"]:
|
||||
if conditions["based_on_select"] in ["t1.project,", "t2.project,"]:
|
||||
cond = 'and '+ conditions["based_on_select"][:-1] +' IS Not NULL'
|
||||
|
||||
if filters.get("group_by"):
|
||||
@ -246,13 +246,13 @@ def based_wise_columns_query(based_on, trans):
|
||||
elif based_on == "Project":
|
||||
if trans in ['Sales Invoice', 'Delivery Note', 'Sales Order']:
|
||||
based_on_details["based_on_cols"] = ["Project:Link/Project:120"]
|
||||
based_on_details["based_on_select"] = "t1.project_name,"
|
||||
based_on_details["based_on_group_by"] = 't1.project_name'
|
||||
based_on_details["based_on_select"] = "t1.project,"
|
||||
based_on_details["based_on_group_by"] = 't1.project'
|
||||
based_on_details["addl_tables"] = ''
|
||||
elif trans in ['Purchase Order', 'Purchase Invoice', 'Purchase Receipt']:
|
||||
based_on_details["based_on_cols"] = ["Project:Link/Project:120"]
|
||||
based_on_details["based_on_select"] = "t2.project_name,"
|
||||
based_on_details["based_on_group_by"] = 't2.project_name'
|
||||
based_on_details["based_on_select"] = "t2.project,"
|
||||
based_on_details["based_on_group_by"] = 't2.project'
|
||||
based_on_details["addl_tables"] = ''
|
||||
else:
|
||||
frappe.throw(_("Project-wise data is not available for Quotation"))
|
||||
|
@ -1,25 +1,23 @@
|
||||
# Kundenreklamationen
|
||||
# Lieferantenreklamation
|
||||
<span class="text-muted contributed-by">Beigetragen von CWT Connector & Wire Technology GmbH</span>
|
||||
|
||||
Dass verkaufte Produkte zurück gesendet werden ist in der Wirtschaft üblich. Gründe für die Rücksendung durch den Kunden sind Qualitätsmängel, verspätete Lieferung oder auch anderes.
|
||||
In ERPNext gibt es eine Option für Produkte, die zurück zum Lieferanten geschickt werden müssen. Die Gründe dafür können vielfältig sein, z. B. defekte Waren, nicht ausreichende Qualität, der Käufer braucht die Ware nicht (mehr), usw.
|
||||
|
||||
In ERPNext können Sie eine Kundenreklamation erstellen, indem Sie ganz einfach einen Lieferschein/eine Ausgangsrechnung mit negativer Menge erstellen.
|
||||
Sie können eine Lieferantenreklamation erstellen indem Sie ganz einfach einen Kaufbeleg mit negativer Menge erstellen.
|
||||
|
||||
Öffnen Sie dazu zuerst den Lieferschein/die Ausgangsrechnung zu dem/der der Kunde einen Artikel zurück sendet.
|
||||
Öffnen Sie hierzu zuerst die ursprüngliche Eingangsrechnung zu der der Lieferant die Artikel geliefert hat.
|
||||
|
||||
<img class="screenshot" alt="Original-Ausgangsrechnung" src="{{docs_base_url}}/assets/img/stock/purchase-return-original-purchase-receipt.png">
|
||||
<img class="screenshot" alt="Original-Eingangsrechnung" src="{{docs_base_url}}/assets/img/stock/purchase-return-original-purchase-receipt.png">
|
||||
|
||||
Klicken Sie dann auf "Kundenreklamation erstellen", das öffnet einen neuen Lieferschein, bei dem "Ist Reklamation" aktiviert ist, und die Artikel und Steuern mit negativem Betrag angezeigt werden.
|
||||
Sie können die Reklamation auch über die Originalausgangsrechnung erstellen. Um Material mit einer Gutschrift zurück zu geben, markieren Sie die Option "Lager aktualisieren" in der Reklamationsrechnung.
|
||||
Klicken Sie dann auf "Lieferantenreklamation erstellen", dies öffnet einen neuen Kaufbeleg bei dem "Ist Reklamation" markiert ist, und bei dem die Artikel mit negativer Menge aufgeführt sind.
|
||||
|
||||
<img class="screenshot" alt="Kundenreklamation zur Ausgangsrechnung" src="{{docs_base_url}}/assets/img/stock/purchase-return-against-purchase-receipt.png">
|
||||
<img class="screenshot" alt="Reklamation zum Lieferschein" src="{{docs_base_url}}/assets/img/stock/purchase-return-against-purchase-receipt.png">
|
||||
|
||||
Bei der Ausgabe eines Rücksendelieferscheins / einer Reklamationsrechnung erhöht das System den Lagerbestand im entsprechenden Lager. Um den richtigen Lagerwert zu erhalten erhöht sich der Lagerbestand um den Wert des ursprünglichen Einkaufspreises des zurückgeschickten Artikels.
|
||||
Bei der Ausgabe eines Reklamations-Kaufbelegs vermindert das System die Menge des Artikels auf dem entsprechenden Lager. Um einen korrekten Lagerwert zu erhalten, verändert sich der Lagersaldo entsprechend dem Einkaufspreis des zurückgesendeten Artikels.
|
||||
|
||||
<img class="screenshot" alt="Reklamation und Lagerbuch" src="{{docs_base_url}}/assets/img/stock/purchase-return-stock-ledger.png">
|
||||
|
||||
Für den Fall einer Reklamationsrechnung erhält das Kundenkonto eine Gutschrift und die damit verknüpften Konten für Erträge und Steuern werden belastet.
|
||||
Wenn die ständige Inventur aktiviert ist, erstellt das System auch Buchungen für das Lagerkonto um den Kontostand des Lagers mit dem Lagerbuch zu synchronisieren.
|
||||
Wenn die Ständige Inventur aktiviert wurde, verbucht das System weiterhin Buchungssätze zum Lagerkonto um den Lagersaldo mit dem Lagerbestand des Lagerbuchs zu synchronisieren.
|
||||
|
||||
<img class="screenshot" alt="Reklamation und Lagerbuch" src="{{docs_base_url}}/assets/img/stock/purchase-return-general-ledger.png">
|
||||
|
||||
|
@ -1,24 +1,28 @@
|
||||
# Lieferantenreklamation
|
||||
# Kundenreklamationen
|
||||
<span class="text-muted contributed-by">Beigetragen von CWT Connector & Wire Technology GmbH</span>
|
||||
|
||||
In ERPNext gibt es eine Option für Produkte, die zurück zum Lieferanten geschickt werden müssen. Die Gründe dafür können vielfältig sein, z. B. defekte Waren, nicht ausreichende Qualität, der Käufer braucht die Ware nicht (mehr), usw.
|
||||
Dass verkaufte Produkte zurück gesendet werden ist in der Wirtschaft üblich. Gründe für die Rücksendung durch den Kunden sind Qualitätsmängel, verspätete Lieferung oder auch anderes.
|
||||
|
||||
Sie können eine Lieferantenreklamation erstellen indem Sie ganz einfach einen Kaufbeleg mit negativer Menge erstellen.
|
||||
In ERPNext können Sie eine Kundenreklamation erstellen, indem Sie ganz einfach einen Lieferschein/eine Ausgangsrechnung mit negativer Menge erstellen.
|
||||
|
||||
Öffnen Sie hierzu zuerst die ursprüngliche Eingangsrechnung zu der der Lieferant die Artikel geliefert hat.
|
||||
Öffnen Sie dazu zuerst den Lieferschein/die Ausgangsrechnung zu dem/der der Kunde einen Artikel zurück sendet.
|
||||
|
||||
<img class="screenshot" alt="Original-Lieferschein" src="{{docs_base_url}}/assets/img/stock/sales-return-original-delivery-note.png">
|
||||
|
||||
Klicken Sie dann auf "Lieferantenreklamation erstellen", dies öffnet einen neuen Kaufbeleg bei dem "Ist Reklamation" markiert ist, und bei dem die Artikel mit negativer Menge aufgeführt sind.
|
||||
Klicken Sie dann auf "Kundenreklamation erstellen", das öffnet einen neuen Lieferschein, bei dem "Ist Reklamation" aktiviert ist, und die Artikel und Steuern mit negativem Betrag angezeigt werden.
|
||||
Sie können die Reklamation auch über die Originalausgangsrechnung erstellen. Um Material mit einer Gutschrift zurück zu geben, markieren Sie die Option "Lager aktualisieren" in der Reklamationsrechnung.
|
||||
|
||||
<img class="screenshot" alt="Reklamation zum Lieferschein" src="{{docs_base_url}}/assets/img/stock/sales-return-against-delivery-note.png">
|
||||
<img class="screenshot" alt="Kundenreklamation zum Lieferschein" src="{{docs_base_url}}/assets/img/stock/sales-return-against-delivery-note.png">
|
||||
|
||||
Bei der Ausgabe eines Reklamations-Kaufbelegs vermindert das System die Menge des Artikels auf dem entsprechenden Lager. Um einen korrekten Lagerwert zu erhalten, verändert sich der Lagersaldo entsprechend dem Einkaufspreis des zurückgesendeten Artikels.
|
||||
Bei der Ausgabe eines Rücksendelieferscheins / einer Reklamationsrechnung erhöht das System den Lagerbestand im entsprechenden Lager. Um den richtigen Lagerwert zu erhalten erhöht sich der Lagerbestand um den Wert des ursprünglichen Einkaufspreises des zurückgeschickten Artikels.
|
||||
|
||||
<img class="screenshot" alt="Reklamation zur Eingangsrechnung" src="{{docs_base_url}}/assets/img/stock/sales-return-against-sales-invoice.png">
|
||||
<img class="screenshot" alt="Kundenreklamation zur Eingangsrechnung" src="{{docs_base_url}}/assets/img/stock/sales-return-against-sales-invoice.png">
|
||||
|
||||
Wenn die Ständige Inventur aktiviert wurde, verbucht das System weiterhin Buchungssätze zum Lagerkonto um den Lagersaldo mit dem Lagerbestand des Lagerbuchs zu synchronisieren.
|
||||
Für den Fall einer Reklamationsrechnung erhält das Kundenkonto eine Gutschrift und die damit verknüpften Konten für Erträge und Steuern werden belastet.
|
||||
Wenn die ständige Inventur aktiviert ist, erstellt das System auch Buchungen für das Lagerkonto um den Kontostand des Lagers mit dem Lagerbuch zu synchronisieren.
|
||||
|
||||
<img class="screenshot" alt="Lagerbuch und Reklamation" src="{{docs_base_url}}/assets/img/stock/sales-return-stock-ledger.png">
|
||||
|
||||
<img class="screenshot" alt="Lagerbuch und Reklamation" src="{{docs_base_url}}/assets/img/stock/sales-return-general-ledger.png">
|
||||
|
||||
{next}
|
||||
|
@ -7,7 +7,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd."
|
||||
app_description = """ERP made simple"""
|
||||
app_icon = "icon-th"
|
||||
app_color = "#e74c3c"
|
||||
app_version = "6.26.0"
|
||||
app_version = "6.27.0"
|
||||
app_email = "info@erpnext.com"
|
||||
app_license = "GNU General Public License (v3)"
|
||||
source_link = "https://github.com/frappe/erpnext"
|
||||
|
7
erpnext/hr/doctype/employee/employee.js
Normal file → Executable file
7
erpnext/hr/doctype/employee/employee.js
Normal file → Executable file
@ -11,9 +11,12 @@ erpnext.hr.EmployeeController = frappe.ui.form.Controller.extend({
|
||||
},
|
||||
|
||||
onload: function() {
|
||||
this.frm.set_query("leave_approver", "leave_approvers", function() {
|
||||
this.frm.set_query("leave_approver", "leave_approvers", function(doc) {
|
||||
return {
|
||||
filters: [["UserRole", "role", "=", "Leave Approver"]]
|
||||
query:"erpnext.hr.doctype.employee_leave_approver.employee_leave_approver.get_approvers",
|
||||
filters:{
|
||||
user: doc.user_id
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
14
erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.py
Normal file → Executable file
14
erpnext/hr/doctype/employee_leave_approver/employee_leave_approver.py
Normal file → Executable file
@ -9,4 +9,16 @@ import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
class EmployeeLeaveApprover(Document):
|
||||
pass
|
||||
pass
|
||||
|
||||
def get_approvers(doctype, txt, searchfield, start, page_len, filters):
|
||||
return get_approver_list(filters.get("user"))
|
||||
|
||||
|
||||
def get_approver_list(name):
|
||||
return frappe.db.sql("""select user.name, user.first_name, user.last_name from
|
||||
tabUser user, tabUserRole user_role where
|
||||
user_role.role = "Leave Approver"
|
||||
and user_role.parent = user.name and
|
||||
user.name != %s
|
||||
""", name)
|
@ -31,7 +31,9 @@ frappe.ui.form.on("Leave Application", {
|
||||
},
|
||||
|
||||
leave_approver: function(frm) {
|
||||
frm.set_value("leave_approver_name", frappe.user.full_name(frm.doc.leave_approver));
|
||||
if(frm.doc.leave_approver){
|
||||
frm.set_value("leave_approver_name", frappe.user.full_name(frm.doc.leave_approver));
|
||||
}
|
||||
},
|
||||
|
||||
employee: function(frm) {
|
||||
|
@ -9,6 +9,7 @@ from frappe.utils import cint, cstr, date_diff, flt, formatdate, getdate, get_li
|
||||
from erpnext.hr.utils import set_employee_name
|
||||
from erpnext.hr.doctype.leave_block_list.leave_block_list import get_applicable_block_dates
|
||||
from erpnext.hr.doctype.employee.employee import get_holiday_list_for_employee
|
||||
from erpnext.hr.doctype.employee_leave_approver.employee_leave_approver import get_approver_list
|
||||
|
||||
|
||||
class LeaveDayBlockedError(frappe.ValidationError): pass
|
||||
@ -247,12 +248,18 @@ def get_approvers(doctype, txt, searchfield, start, page_len, filters):
|
||||
if not filters.get("employee"):
|
||||
frappe.throw(_("Please select Employee Record first."))
|
||||
|
||||
return frappe.db.sql("""select user.name, user.first_name, user.last_name from
|
||||
employee_user = frappe.get_value("Employee", filters.get("employee"), "user_id")
|
||||
|
||||
approvers_list = frappe.db.sql("""select user.name, user.first_name, user.last_name from
|
||||
tabUser user, `tabEmployee Leave Approver` approver where
|
||||
approver.parent = %s
|
||||
and user.name like %s
|
||||
and approver.leave_approver=user.name""", (filters.get("employee"), "%" + txt + "%"))
|
||||
|
||||
if not approvers_list:
|
||||
approvers_list = get_approver_list(employee_user)
|
||||
return approvers_list
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_number_of_leave_days(employee, leave_type, from_date, to_date, half_day=None):
|
||||
if half_day:
|
||||
|
@ -144,7 +144,7 @@ cur_frm.fields_dict['item'].get_query = function(doc) {
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['project_name'].get_query = function(doc, dt, dn) {
|
||||
cur_frm.fields_dict['project'].get_query = function(doc, dt, dn) {
|
||||
return{
|
||||
filters:[
|
||||
['Project', 'status', 'not in', 'Completed, Cancelled']
|
||||
|
@ -17,6 +17,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Item",
|
||||
@ -27,6 +28,7 @@
|
||||
"options": "Item",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -42,6 +44,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Item Name",
|
||||
@ -50,6 +53,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -65,6 +69,7 @@
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Rate Of Materials Based On",
|
||||
@ -73,6 +78,7 @@
|
||||
"options": "Valuation Rate\nLast Purchase Rate\nPrice List",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -89,6 +95,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Price List",
|
||||
@ -97,6 +104,7 @@
|
||||
"options": "Price List",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -112,12 +120,14 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -134,6 +144,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Is Active",
|
||||
@ -143,6 +154,7 @@
|
||||
"oldfieldtype": "Select",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -159,6 +171,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Is Default",
|
||||
@ -168,6 +181,7 @@
|
||||
"oldfieldtype": "Check",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -184,6 +198,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "With Operations",
|
||||
@ -191,6 +206,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -208,6 +224,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Operations",
|
||||
@ -216,6 +233,7 @@
|
||||
"oldfieldtype": "Section Break",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -231,6 +249,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Operations",
|
||||
@ -241,6 +260,7 @@
|
||||
"options": "BOM Operation",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -256,6 +276,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Materials",
|
||||
@ -264,6 +285,7 @@
|
||||
"oldfieldtype": "Section Break",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -279,6 +301,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Items",
|
||||
@ -289,6 +312,7 @@
|
||||
"options": "BOM Item",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -306,6 +330,7 @@
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Quantity",
|
||||
@ -315,6 +340,7 @@
|
||||
"oldfieldtype": "Currency",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -330,6 +356,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Costing",
|
||||
@ -338,6 +365,7 @@
|
||||
"oldfieldtype": "Section Break",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -353,6 +381,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Operating Cost",
|
||||
@ -361,6 +390,7 @@
|
||||
"options": "Company:company:default_currency",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -376,6 +406,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Raw Material Cost",
|
||||
@ -384,6 +415,7 @@
|
||||
"options": "Company:company:default_currency",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -399,12 +431,14 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -420,6 +454,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Total Cost",
|
||||
@ -428,6 +463,7 @@
|
||||
"options": "Company:company:default_currency",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -443,6 +479,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "",
|
||||
@ -450,6 +487,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -461,20 +499,22 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "project_name",
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"label": "Project",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "project_name",
|
||||
"oldfieldname": "project",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Project",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -490,6 +530,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Company",
|
||||
@ -499,6 +540,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -514,6 +556,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Amended From",
|
||||
@ -522,6 +565,7 @@
|
||||
"options": "BOM",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -537,12 +581,14 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -558,6 +604,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Item UOM",
|
||||
@ -566,6 +613,7 @@
|
||||
"options": "UOM",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -581,6 +629,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -588,6 +637,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -603,6 +653,7 @@
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Item Desription",
|
||||
@ -610,6 +661,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -625,6 +677,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -632,6 +685,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -647,6 +701,7 @@
|
||||
"fieldtype": "Attach",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Image",
|
||||
@ -655,6 +710,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -670,6 +726,7 @@
|
||||
"fieldtype": "Image",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Image View",
|
||||
@ -679,6 +736,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -695,6 +753,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Materials Required (Exploded)",
|
||||
@ -702,6 +761,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -717,6 +777,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Exploded_items",
|
||||
@ -727,6 +788,7 @@
|
||||
"options": "BOM Explosion Item",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -745,7 +807,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2015-11-16 06:29:42.637983",
|
||||
"modified": "2016-03-10 05:09:50.749754",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Manufacturing",
|
||||
"name": "BOM",
|
||||
|
@ -262,7 +262,7 @@ cur_frm.fields_dict['production_item'].get_query = function(doc) {
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['project_name'].get_query = function(doc, dt, dn) {
|
||||
cur_frm.fields_dict['project'].get_query = function(doc, dt, dn) {
|
||||
return{
|
||||
filters:[
|
||||
['Project', 'status', 'not in', 'Completed, Cancelled']
|
||||
|
@ -7,6 +7,7 @@
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Setup",
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@ -16,6 +17,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "",
|
||||
@ -41,6 +43,7 @@
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Series",
|
||||
@ -67,6 +70,7 @@
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Status",
|
||||
@ -93,6 +97,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Item To Manufacture",
|
||||
@ -121,6 +126,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "BOM No",
|
||||
@ -149,6 +155,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Use Multi-Level BOM",
|
||||
@ -172,6 +179,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -197,6 +205,7 @@
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Qty To Manufacture",
|
||||
@ -225,6 +234,7 @@
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Material Transferred for Manufacturing",
|
||||
@ -252,6 +262,7 @@
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Manufactured Qty",
|
||||
@ -277,6 +288,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Warehouses",
|
||||
@ -301,6 +313,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Work-in-Progress Warehouse",
|
||||
@ -325,6 +338,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -349,6 +363,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Target Warehouse",
|
||||
@ -373,6 +388,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Time",
|
||||
@ -399,6 +415,7 @@
|
||||
"fieldtype": "Date",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Expected Delivery Date",
|
||||
@ -423,6 +440,7 @@
|
||||
"fieldtype": "Datetime",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Planned Start Date",
|
||||
@ -447,6 +465,7 @@
|
||||
"fieldtype": "Datetime",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Planned End Date",
|
||||
@ -471,6 +490,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -494,6 +514,7 @@
|
||||
"fieldtype": "Datetime",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Actual Start Date",
|
||||
@ -518,6 +539,7 @@
|
||||
"fieldtype": "Datetime",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Actual End Date",
|
||||
@ -543,6 +565,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Operations",
|
||||
@ -569,6 +592,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Operations",
|
||||
@ -595,6 +619,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Operation Cost",
|
||||
@ -620,6 +645,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Planned Operating Cost",
|
||||
@ -645,6 +671,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Actual Operating Cost",
|
||||
@ -670,6 +697,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Additional Operating Cost",
|
||||
@ -695,6 +723,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -718,6 +747,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Total Operating Cost",
|
||||
@ -743,6 +773,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "More Information",
|
||||
@ -767,6 +798,7 @@
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Item Description",
|
||||
@ -791,6 +823,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Stock UOM",
|
||||
@ -817,6 +850,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Company",
|
||||
@ -843,6 +877,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -862,16 +897,17 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "project_name",
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"label": "Project",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "project_name",
|
||||
"oldfieldname": "project",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Project",
|
||||
"permlevel": 0,
|
||||
@ -893,6 +929,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Sales Order",
|
||||
@ -918,6 +955,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Material Request",
|
||||
@ -943,6 +981,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Material Request Item",
|
||||
@ -967,6 +1006,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Amended From",
|
||||
@ -996,7 +1036,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-02-23 07:29:38.091748",
|
||||
"modified": "2016-03-10 05:10:07.951138",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Manufacturing",
|
||||
"name": "Production Order",
|
||||
|
@ -236,7 +236,7 @@ class ProductionOrder(Document):
|
||||
self.set_operation_start_end_time(i, d)
|
||||
|
||||
time_log = make_time_log(self.name, d.operation, d.planned_start_time, d.planned_end_time,
|
||||
flt(self.qty) - flt(d.completed_qty), self.project_name, d.workstation, operation_id=d.name)
|
||||
flt(self.qty) - flt(d.completed_qty), self.project, d.workstation, operation_id=d.name)
|
||||
|
||||
if d.workstation:
|
||||
# validate operating hours if workstation [not mandatory] is specified
|
||||
|
@ -135,8 +135,7 @@ class ProductionPlanningTool(Document):
|
||||
from `tabSales Order Item` so_item
|
||||
where parent in (%s) and docstatus = 1 and qty > delivered_qty
|
||||
and exists (select * from `tabItem` item where item.name=so_item.item_code
|
||||
and (item.is_pro_applicable = 1
|
||||
or item.is_sub_contracted_item = 1)) %s""" % \
|
||||
and item.is_pro_applicable = 1) %s""" % \
|
||||
(", ".join(["%s"] * len(so_list)), item_condition), tuple(so_list), as_dict=1)
|
||||
|
||||
if self.fg_item:
|
||||
@ -150,8 +149,7 @@ class ProductionPlanningTool(Document):
|
||||
and pi.parent_item = so_item.item_code
|
||||
and so_item.parent in (%s) and so_item.qty > so_item.delivered_qty
|
||||
and exists (select * from `tabItem` item where item.name=pi.item_code
|
||||
and (item.is_pro_applicable = 1
|
||||
or item.is_sub_contracted_item = 1)) %s""" % \
|
||||
and item.is_pro_applicable = 1) %s""" % \
|
||||
(", ".join(["%s"] * len(so_list)), item_condition), tuple(so_list), as_dict=1)
|
||||
|
||||
self.add_items(items + packed_items)
|
||||
@ -171,8 +169,7 @@ class ProductionPlanningTool(Document):
|
||||
from `tabMaterial Request Item` mr_item
|
||||
where parent in (%s) and docstatus = 1 and qty > ordered_qty
|
||||
and exists (select * from `tabItem` item where item.name=mr_item.item_code
|
||||
and (item.is_pro_applicable = 1
|
||||
or item.is_sub_contracted_item = 1)) %s""" % \
|
||||
and item.is_pro_applicable = 1) %s""" % \
|
||||
(", ".join(["%s"] * len(mr_list)), item_condition), tuple(mr_list), as_dict=1)
|
||||
|
||||
self.add_items(items)
|
||||
|
@ -60,7 +60,6 @@ erpnext.BOMTree = Class.extend({
|
||||
frappe.boot.user.in_create.indexOf("BOM") !== -1;
|
||||
me.can_write = frappe.model.can_write("BOM");
|
||||
me.can_delete = frappe.model.can_delete("BOM");
|
||||
|
||||
this.tree = new frappe.ui.Tree({
|
||||
parent: $(parent),
|
||||
label: me.bom,
|
||||
@ -74,15 +73,15 @@ erpnext.BOMTree = Class.extend({
|
||||
return node.expandable;
|
||||
},
|
||||
click: function(node) {
|
||||
frappe.set_route("Form", "BOM", node.data.parent);
|
||||
frappe.set_route("Form", "BOM", node.data.value);
|
||||
}
|
||||
}
|
||||
],
|
||||
get_label: function(node) {
|
||||
if(node.data.qty) {
|
||||
return node.data.qty + " x " + node.data.value;
|
||||
return node.data.qty + " x " + node.data.item_code;
|
||||
} else {
|
||||
return node.data.value;
|
||||
return node.data.item_code || node.data.value;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -6,8 +6,8 @@ import frappe
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_children(parent):
|
||||
return frappe.db.sql("""select item_code as value,
|
||||
bom_no as parent, qty,
|
||||
return frappe.db.sql("""select item_code,
|
||||
bom_no as value, qty,
|
||||
if(ifnull(bom_no, "")!="", 1, 0) as expandable
|
||||
from `tabBOM Item`
|
||||
where parent=%s
|
||||
|
@ -54,6 +54,7 @@ erpnext.patches.v4_0.fix_address_template
|
||||
|
||||
# WATCHOUT: This patch reload's documents
|
||||
erpnext.patches.v4_0.reset_permissions_for_masters
|
||||
erpnext.patches.v6_20x.rename_project_name_to_project #2016-03-14
|
||||
|
||||
erpnext.patches.v4_0.update_tax_amount_after_discount
|
||||
execute:frappe.permissions.reset_perms("GL Entry") #2014-06-09
|
||||
@ -255,3 +256,4 @@ erpnext.patches.v6_24.set_recurring_id
|
||||
erpnext.patches.v6_20x.set_compact_print
|
||||
execute:frappe.delete_doc_if_exists("Web Form", "contact") #2016-03-10
|
||||
erpnext.patches.v6_20x.remove_fiscal_year_from_holiday_list
|
||||
erpnext.patches.v6_24.map_customer_address_to_shipping_address_on_po
|
@ -16,7 +16,7 @@ def execute():
|
||||
|
||||
for old, column in existing_indexes:
|
||||
if column in ("parent", "group_or_ledger", "is_group", "is_pl_account", "debit_or_credit",
|
||||
"account_name", "company", "project_name", "voucher_date", "due_date", "bill_no",
|
||||
"account_name", "company", "project", "voucher_date", "due_date", "bill_no",
|
||||
"bill_date", "is_opening", "fiscal_year", "outstanding_amount"):
|
||||
frappe.db.sql("alter table `tab{0}` drop index {1}".format(dt, old))
|
||||
|
||||
|
@ -7,7 +7,7 @@ import frappe
|
||||
def execute():
|
||||
for p in frappe.get_all("Project"):
|
||||
purchase_cost = frappe.db.sql("""select sum(ifnull(base_net_amount, 0))
|
||||
from `tabPurchase Invoice Item` where project_name = %s and docstatus=1""", p.name)
|
||||
from `tabPurchase Invoice Item` where project = %s and docstatus=1""", p.name)
|
||||
purchase_cost = purchase_cost and purchase_cost[0][0] or 0
|
||||
|
||||
frappe.db.set_value("Project", p.name, "total_purchase_cost", purchase_cost)
|
17
erpnext/patches/v6_20x/rename_project_name_to_project.py
Normal file
17
erpnext/patches/v6_20x/rename_project_name_to_project.py
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.utils.rename_field import rename_field
|
||||
|
||||
def execute():
|
||||
|
||||
doc_list = ["Production Order", "BOM", "Purchase Invoice Item", "Sales Invoice",
|
||||
"Purchase Order Item", "Stock Entry", "Delivery Note", "Sales Order",
|
||||
"Purchase Receipt Item", "Supplier Quotation Item"]
|
||||
|
||||
for doctype in doc_list:
|
||||
frappe.reload_doctype(doctype, force=True)
|
||||
rename_field(doctype, "project_name", "project")
|
||||
|
@ -0,0 +1,19 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
frappe.reload_doctype("Purchase Order")
|
||||
|
||||
if not frappe.db.has_column("Purchase Order", "shipping_address"):
|
||||
return
|
||||
|
||||
if not frappe.db.has_column("Purchase Order", "customer_address"):
|
||||
return
|
||||
|
||||
frappe.db.sql("""update `tabPurchase Order` set shipping_address=customer_address,
|
||||
shipping_address_display=customer_address_display""")
|
||||
|
||||
frappe.db.commit()
|
@ -60,7 +60,7 @@ cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||
|
||||
cur_frm.fields_dict['sales_order'].get_query = function(doc) {
|
||||
var filters = {
|
||||
'project_name': ["in", doc.__islocal ? [""] : [doc.name, ""]]
|
||||
'project': ["in", doc.__islocal ? [""] : [doc.name, ""]]
|
||||
};
|
||||
|
||||
if (doc.customer) {
|
||||
|
@ -18,12 +18,12 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "project_name",
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
@ -44,6 +44,7 @@
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Status",
|
||||
@ -70,6 +71,7 @@
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Type",
|
||||
@ -96,6 +98,7 @@
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Is Active",
|
||||
@ -122,6 +125,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -145,6 +149,7 @@
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Priority",
|
||||
@ -171,6 +176,7 @@
|
||||
"fieldtype": "Date",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Expected Start Date",
|
||||
@ -196,6 +202,7 @@
|
||||
"fieldtype": "Date",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Expected End Date",
|
||||
@ -221,6 +228,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer Details",
|
||||
@ -246,6 +254,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer",
|
||||
@ -272,6 +281,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -295,6 +305,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Sales Order",
|
||||
@ -320,6 +331,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Tasks",
|
||||
@ -345,6 +357,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Tasks",
|
||||
@ -370,6 +383,7 @@
|
||||
"fieldtype": "Percent",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "% Tasks Completed",
|
||||
@ -393,6 +407,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Notes",
|
||||
@ -418,6 +433,7 @@
|
||||
"fieldtype": "Text Editor",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Notes",
|
||||
@ -443,6 +459,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Start and End Dates",
|
||||
@ -467,6 +484,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Actual Start Date",
|
||||
@ -491,6 +509,7 @@
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Actual Time (in Hours)",
|
||||
@ -515,6 +534,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -538,6 +558,7 @@
|
||||
"fieldtype": "Date",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Actual End Date",
|
||||
@ -563,6 +584,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Costing and Billing",
|
||||
@ -588,6 +610,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Estimated Cost",
|
||||
@ -615,6 +638,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Total Costing Amount (via Time Logs)",
|
||||
@ -640,6 +664,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Total Expense Claim (via Expense Claims)",
|
||||
@ -664,6 +689,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Company",
|
||||
@ -688,6 +714,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Cost Center",
|
||||
@ -712,6 +739,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -736,6 +764,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Total Billing Amount (via Time Logs)",
|
||||
@ -760,6 +789,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Total Purchase Cost (via Purchase Invoice)",
|
||||
@ -784,6 +814,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Margin",
|
||||
@ -809,6 +840,7 @@
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Gross Margin",
|
||||
@ -835,6 +867,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -858,6 +891,7 @@
|
||||
"fieldtype": "Percent",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Gross Margin %",
|
||||
@ -887,7 +921,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 4,
|
||||
"modified": "2016-02-19 05:44:20.345170",
|
||||
"modified": "2016-03-10 05:10:21.779365",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Projects",
|
||||
"name": "Project",
|
||||
|
@ -120,10 +120,10 @@ class Project(Document):
|
||||
|
||||
def update_purchase_costing(self):
|
||||
total_purchase_cost = frappe.db.sql("""select sum(base_net_amount)
|
||||
from `tabPurchase Invoice Item` where project_name = %s and docstatus=1""", self.name)
|
||||
from `tabPurchase Invoice Item` where project = %s and docstatus=1""", self.name)
|
||||
|
||||
self.total_purchase_cost = total_purchase_cost and total_purchase_cost[0][0] or 0
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_cost_center_name(project_name):
|
||||
return frappe.db.get_value("Project", project_name, "cost_center")
|
||||
def get_cost_center_name(project):
|
||||
return frappe.db.get_value("Project", project, "cost_center")
|
||||
|
@ -83,11 +83,11 @@ class TestTimeLog(unittest.TestCase):
|
||||
activity_type.costing_rate = 15
|
||||
activity_type.save()
|
||||
|
||||
project_name = "_Test Project for Activity Type"
|
||||
project = "_Test Project for Activity Type"
|
||||
|
||||
frappe.db.sql("delete from `tabTime Log` where project=%s or employee='_T-Employee-0002'", project_name)
|
||||
frappe.delete_doc("Project", project_name)
|
||||
project = frappe.get_doc({"doctype": "Project", "project_name": project_name}).insert()
|
||||
frappe.db.sql("delete from `tabTime Log` where project=%s or employee='_T-Employee-0002'", project)
|
||||
frappe.delete_doc("Project", project)
|
||||
project = frappe.get_doc({"doctype": "Project", "project_name": project}).insert()
|
||||
|
||||
make_time_log_test_record(employee="_T-Employee-0002", hours=2,
|
||||
activity_type = "_Test Activity Type", project = project.name)
|
||||
|
@ -34,46 +34,46 @@ def get_project_details():
|
||||
expected_start_date, expected_end_date from tabProject where docstatus < 2""", as_dict=1)
|
||||
|
||||
def get_purchased_items_cost():
|
||||
pr_items = frappe.db.sql("""select project_name, sum(base_net_amount) as amount
|
||||
from `tabPurchase Receipt Item` where ifnull(project_name, '') != ''
|
||||
and docstatus = 1 group by project_name""", as_dict=1)
|
||||
pr_items = frappe.db.sql("""select project, sum(base_net_amount) as amount
|
||||
from `tabPurchase Receipt Item` where ifnull(project, '') != ''
|
||||
and docstatus = 1 group by project""", as_dict=1)
|
||||
|
||||
pr_item_map = {}
|
||||
for item in pr_items:
|
||||
pr_item_map.setdefault(item.project_name, item.amount)
|
||||
pr_item_map.setdefault(item.project, item.amount)
|
||||
|
||||
return pr_item_map
|
||||
|
||||
def get_issued_items_cost():
|
||||
se_items = frappe.db.sql("""select se.project_name, sum(se_item.amount) as amount
|
||||
se_items = frappe.db.sql("""select se.project, sum(se_item.amount) as amount
|
||||
from `tabStock Entry` se, `tabStock Entry Detail` se_item
|
||||
where se.name = se_item.parent and se.docstatus = 1 and ifnull(se_item.t_warehouse, '') = ''
|
||||
and ifnull(se.project_name, '') != '' group by se.project_name""", as_dict=1)
|
||||
and ifnull(se.project, '') != '' group by se.project""", as_dict=1)
|
||||
|
||||
se_item_map = {}
|
||||
for item in se_items:
|
||||
se_item_map.setdefault(item.project_name, item.amount)
|
||||
se_item_map.setdefault(item.project, item.amount)
|
||||
|
||||
return se_item_map
|
||||
|
||||
def get_delivered_items_cost():
|
||||
dn_items = frappe.db.sql("""select dn.project_name, sum(dn_item.base_net_amount) as amount
|
||||
dn_items = frappe.db.sql("""select dn.project, sum(dn_item.base_net_amount) as amount
|
||||
from `tabDelivery Note` dn, `tabDelivery Note Item` dn_item
|
||||
where dn.name = dn_item.parent and dn.docstatus = 1 and ifnull(dn.project_name, '') != ''
|
||||
group by dn.project_name""", as_dict=1)
|
||||
where dn.name = dn_item.parent and dn.docstatus = 1 and ifnull(dn.project, '') != ''
|
||||
group by dn.project""", as_dict=1)
|
||||
|
||||
si_items = frappe.db.sql("""select si.project_name, sum(si_item.base_net_amount) as amount
|
||||
si_items = frappe.db.sql("""select si.project, sum(si_item.base_net_amount) as amount
|
||||
from `tabSales Invoice` si, `tabSales Invoice Item` si_item
|
||||
where si.name = si_item.parent and si.docstatus = 1 and si.update_stock = 1
|
||||
and si.is_pos = 1 and ifnull(si.project_name, '') != ''
|
||||
group by si.project_name""", as_dict=1)
|
||||
and si.is_pos = 1 and ifnull(si.project, '') != ''
|
||||
group by si.project""", as_dict=1)
|
||||
|
||||
|
||||
dn_item_map = {}
|
||||
for item in dn_items:
|
||||
dn_item_map.setdefault(item.project_name, item.amount)
|
||||
dn_item_map.setdefault(item.project, item.amount)
|
||||
|
||||
for item in si_items:
|
||||
dn_item_map.setdefault(item.project_name, item.amount)
|
||||
dn_item_map.setdefault(item.project, item.amount)
|
||||
|
||||
return dn_item_map
|
||||
|
@ -186,7 +186,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
ignore_pricing_rule: me.frm.doc.ignore_pricing_rule,
|
||||
doctype: me.frm.doc.doctype,
|
||||
name: me.frm.doc.name,
|
||||
project_name: item.project_name || me.frm.doc.project_name,
|
||||
project: item.project || me.frm.doc.project,
|
||||
qty: item.qty
|
||||
}
|
||||
},
|
||||
|
@ -5,27 +5,27 @@
|
||||
Dictionary Format
|
||||
'projects': {
|
||||
'Sales Order': {
|
||||
'fields':['project_name'],
|
||||
'fields':['project'],
|
||||
'items':['projected_qty']
|
||||
},
|
||||
'Purchase Order': {
|
||||
'fields':['project_name']
|
||||
'fields':['project']
|
||||
}
|
||||
}
|
||||
// ====================================================================*/
|
||||
frappe.provide("erpnext.feature_setup");
|
||||
erpnext.feature_setup.feature_dict = {
|
||||
'fs_projects': {
|
||||
'BOM': {'fields':['project_name']},
|
||||
'Delivery Note': {'fields':['project_name']},
|
||||
'Purchase Invoice': {'items':['project_name']},
|
||||
'Production Order': {'fields':['project_name']},
|
||||
'Purchase Order': {'items':['project_name']},
|
||||
'Purchase Receipt': {'items':['project_name']},
|
||||
'Sales Invoice': {'fields':['project_name']},
|
||||
'Sales Order': {'fields':['project_name']},
|
||||
'Stock Entry': {'fields':['project_name']},
|
||||
'Timesheet': {'timesheet_details':['project_name']}
|
||||
'BOM': {'fields':['project']},
|
||||
'Delivery Note': {'fields':['project']},
|
||||
'Purchase Invoice': {'items':['project']},
|
||||
'Production Order': {'fields':['project']},
|
||||
'Purchase Order': {'items':['project']},
|
||||
'Purchase Receipt': {'items':['project']},
|
||||
'Sales Invoice': {'fields':['project']},
|
||||
'Sales Order': {'fields':['project']},
|
||||
'Stock Entry': {'fields':['project']},
|
||||
'Timesheet': {'timesheet_details':['project']}
|
||||
},
|
||||
'fs_discounts': {
|
||||
'Delivery Note': {'items':['discount_percentage']},
|
||||
|
@ -20,18 +20,18 @@ erpnext.utils.get_party_details = function(frm, method, args, callback) {
|
||||
price_list: frm.doc.buying_price_list
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
if (args) {
|
||||
args.posting_date = frm.doc.posting_date || frm.doc.transaction_date;
|
||||
}
|
||||
}
|
||||
if(!args) return;
|
||||
|
||||
|
||||
if(frappe.meta.get_docfield(frm.doc.doctype, "taxes")) {
|
||||
if(!erpnext.utils.validate_mandatory(frm, "Posting/Transaction Date",
|
||||
if(!erpnext.utils.validate_mandatory(frm, "Posting/Transaction Date",
|
||||
args.posting_date, args.party_type=="Customer" ? "customer": "supplier")) return;
|
||||
}
|
||||
|
||||
|
||||
args.currency = frm.doc.currency;
|
||||
args.company = frm.doc.company;
|
||||
args.doctype = frm.doc.doctype;
|
||||
@ -49,9 +49,9 @@ erpnext.utils.get_party_details = function(frm, method, args, callback) {
|
||||
});
|
||||
}
|
||||
|
||||
erpnext.utils.get_address_display = function(frm, address_field, display_field) {
|
||||
erpnext.utils.get_address_display = function(frm, address_field, display_field, is_your_company_address) {
|
||||
if(frm.updating_party_details) return;
|
||||
|
||||
|
||||
if(!address_field) {
|
||||
if(frm.doctype != "Purchase Order" && frm.doc.customer) {
|
||||
address_field = "customer_address";
|
||||
@ -59,25 +59,25 @@ erpnext.utils.get_address_display = function(frm, address_field, display_field)
|
||||
address_field = "supplier_address";
|
||||
} else return;
|
||||
}
|
||||
|
||||
|
||||
if(!display_field) display_field = "address_display";
|
||||
if(frm.doc[address_field]) {
|
||||
frappe.call({
|
||||
method: "erpnext.utilities.doctype.address.address.get_address_display",
|
||||
args: {"address_dict": frm.doc[address_field] },
|
||||
callback: function(r) {
|
||||
if(r.message){
|
||||
if(r.message) {
|
||||
frm.set_value(display_field, r.message)
|
||||
}
|
||||
|
||||
if(frappe.meta.get_docfield(frm.doc.doctype, "taxes")) {
|
||||
if(!erpnext.utils.validate_mandatory(frm, "Customer/Supplier",
|
||||
if(frappe.meta.get_docfield(frm.doc.doctype, "taxes") && !is_your_company_address) {
|
||||
if(!erpnext.utils.validate_mandatory(frm, "Customer/Supplier",
|
||||
frm.doc.customer || frm.doc.supplier, address_field)) return;
|
||||
|
||||
if(!erpnext.utils.validate_mandatory(frm, "Posting/Transaction Date",
|
||||
|
||||
if(!erpnext.utils.validate_mandatory(frm, "Posting/Transaction Date",
|
||||
frm.doc.posting_date || frm.doc.transaction_date, address_field)) return;
|
||||
} else return;
|
||||
|
||||
|
||||
frappe.call({
|
||||
method: "erpnext.accounts.party.set_taxes",
|
||||
args: {
|
||||
@ -96,7 +96,10 @@ erpnext.utils.get_address_display = function(frm, address_field, display_field)
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
frm.set_value(display_field, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
erpnext.utils.get_contact_details = function(frm) {
|
||||
@ -122,4 +125,17 @@ erpnext.utils.validate_mandatory = function(frm, label, value, trigger_on) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
erpnext.utils.get_shipping_address = function(frm){
|
||||
frappe.call({
|
||||
method: "erpnext.utilities.doctype.address.address.get_shipping_address",
|
||||
args: {company: frm.doc.company},
|
||||
callback: function(r){
|
||||
if(r.message){
|
||||
frm.set_value("shipping_address", r.message[0]) //Address title or name
|
||||
frm.set_value("shipping_address_display", r.message[1]) //Address to be displayed on the page
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ cur_frm.cscript.new_contact = function(){
|
||||
loaddoc('Contact', tn);
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
|
||||
cur_frm.fields_dict['project'].get_query = function(doc, cdt, cdn) {
|
||||
return {
|
||||
query: "erpnext.controllers.queries.get_project_name",
|
||||
filters: {
|
||||
|
@ -1959,7 +1959,7 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"collapsible_depends_on": "project_name",
|
||||
"collapsible_depends_on": "project",
|
||||
"fieldname": "more_info",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
@ -1987,17 +1987,17 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"description": "Track this Sales Order against any Project",
|
||||
"fieldname": "project_name",
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"label": "Project",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "project_name",
|
||||
"oldfieldname": "project",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Project",
|
||||
"permlevel": 0,
|
||||
|
@ -103,12 +103,12 @@ class SalesOrder(SellingController):
|
||||
self.validate_sales_mntc_quotation()
|
||||
|
||||
def validate_proj_cust(self):
|
||||
if self.project_name and self.customer_name:
|
||||
if self.project and self.customer_name:
|
||||
res = frappe.db.sql("""select name from `tabProject` where name = %s
|
||||
and (customer = %s or ifnull(customer,'')='')""",
|
||||
(self.project_name, self.customer))
|
||||
(self.project, self.customer))
|
||||
if not res:
|
||||
frappe.throw(_("Customer {0} does not belong to project {1}").format(self.customer, self.project_name))
|
||||
frappe.throw(_("Customer {0} does not belong to project {1}").format(self.customer, self.project))
|
||||
|
||||
def validate_warehouse(self):
|
||||
super(SalesOrder, self).validate_warehouse()
|
||||
@ -546,11 +546,11 @@ def make_purchase_order_for_drop_shipment(source_name, for_supplier, target_doc=
|
||||
|
||||
if any( item.delivered_by_supplier==1 for item in source.items):
|
||||
if source.shipping_address_name:
|
||||
target.customer_address = source.shipping_address_name
|
||||
target.customer_address_display = source.shipping_address
|
||||
target.shipping_address = source.shipping_address_name
|
||||
target.shipping_address_display = source.shipping_address
|
||||
else:
|
||||
target.customer_address = source.customer_address
|
||||
target.customer_address_display = source.address_display
|
||||
target.shipping_address = source.customer_address
|
||||
target.shipping_address_display = source.address_display
|
||||
|
||||
target.customer_contact_person = source.contact_person
|
||||
target.customer_contact_display = source.contact_display
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.query_reports["Customers Not Buying Since Long Time"] = {
|
||||
frappe.query_reports["Inactive Customers"] = {
|
||||
"filters": [
|
||||
{
|
||||
"fieldname":"days_since_last_order",
|
||||
@ -17,4 +17,4 @@ frappe.query_reports["Customers Not Buying Since Long Time"] = {
|
||||
"options": "Sales Order\nSales Invoice"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -1,16 +1,18 @@
|
||||
{
|
||||
"add_total_row": 0,
|
||||
"apply_user_permissions": 1,
|
||||
"creation": "2013-06-07 12:27:07",
|
||||
"creation": "2016-03-08 04:05:02.846556",
|
||||
"disabled": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "Report",
|
||||
"idx": 1,
|
||||
"idx": 0,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2014-06-03 07:18:17.013590",
|
||||
"modified": "2016-03-08 04:05:02.846556",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Customers Not Buying Since Long Time",
|
||||
"name": "Inactive Customers",
|
||||
"owner": "Administrator",
|
||||
"ref_doctype": "Sales Order",
|
||||
"report_name": "Customers Not Buying Since Long Time ",
|
||||
"report_name": "Inactive Customers",
|
||||
"report_type": "Script Report"
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
@ -11,7 +11,7 @@ def execute(filters=None):
|
||||
|
||||
days_since_last_order = filters.get("days_since_last_order")
|
||||
doctype = filters.get("doctype")
|
||||
|
||||
|
||||
if cint(days_since_last_order) <= 0:
|
||||
frappe.throw(_("'Days Since Last Order' must be greater than or equal to zero"))
|
||||
|
||||
@ -35,7 +35,7 @@ def get_sales_details(doctype):
|
||||
so.base_net_total)) as 'total_order_considered',
|
||||
max(so.transaction_date) as 'last_order_date',
|
||||
DATEDIFF(CURDATE(), max(so.transaction_date)) as 'days_since_last_order'"""
|
||||
|
||||
|
||||
return frappe.db.sql("""select
|
||||
cust.name,
|
||||
cust.customer_name,
|
@ -12,7 +12,7 @@
|
||||
"module": "Selling",
|
||||
"name": "Item-wise Sales History",
|
||||
"owner": "Administrator",
|
||||
"query": "select\n so_item.item_code as \"Item Code:Link/Item:120\",\n\tso_item.item_name as \"Item Name::120\",\n so_item.item_group as \"Item Group:Link/Item Group:120\",\n\tso_item.description as \"Description::150\",\n\tso_item.qty as \"Qty:Float:100\",\n\tso_item.stock_uom as \"UOM:Link/UOM:80\",\n\tso_item.base_rate as \"Rate:Currency:120\",\n\tso_item.base_amount as \"Amount:Currency:120\",\n\tso.name as \"Sales Order:Link/Sales Order:120\",\n\tso.transaction_date as \"Transaction Date:Date:140\",\n\tso.customer as \"Customer:Link/Customer:130\",\n cu.customer_name as \"Customer Name::150\",\n\tso.territory as \"Territory:Link/Territory:130\",\n so.project_name as \"Project:Link/Project:130\",\n\tifnull(so_item.delivered_qty, 0) as \"Delivered Qty:Float:120\",\n\tifnull(so_item.billed_amt, 0) as \"Billed Amount:Currency:120\",\n\tso.company as \"Company:Link/Company:\"\nfrom\n\t`tabSales Order` so, `tabSales Order Item` so_item, `tabCustomer` cu\nwhere\n\tso.name = so_item.parent and so.customer=cu.name\n\tand so.docstatus = 1\norder by so.name desc",
|
||||
"query": "select\n so_item.item_code as \"Item Code:Link/Item:120\",\n\tso_item.item_name as \"Item Name::120\",\n so_item.item_group as \"Item Group:Link/Item Group:120\",\n\tso_item.description as \"Description::150\",\n\tso_item.qty as \"Qty:Float:100\",\n\tso_item.stock_uom as \"UOM:Link/UOM:80\",\n\tso_item.base_rate as \"Rate:Currency:120\",\n\tso_item.base_amount as \"Amount:Currency:120\",\n\tso.name as \"Sales Order:Link/Sales Order:120\",\n\tso.transaction_date as \"Transaction Date:Date:140\",\n\tso.customer as \"Customer:Link/Customer:130\",\n cu.customer_name as \"Customer Name::150\",\n\tso.territory as \"Territory:Link/Territory:130\",\n so.project as \"Project:Link/Project:130\",\n\tifnull(so_item.delivered_qty, 0) as \"Delivered Qty:Float:120\",\n\tifnull(so_item.billed_amt, 0) as \"Billed Amount:Currency:120\",\n\tso.company as \"Company:Link/Company:\"\nfrom\n\t`tabSales Order` so, `tabSales Order Item` so_item, `tabCustomer` cu\nwhere\n\tso.name = so_item.parent and so.customer=cu.name\n\tand so.docstatus = 1\norder by so.name desc",
|
||||
"ref_doctype": "Sales Order",
|
||||
"report_name": "Item-wise Sales History",
|
||||
"report_type": "Query Report"
|
||||
|
@ -310,11 +310,11 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
}
|
||||
});
|
||||
|
||||
frappe.ui.form.on(cur_frm.doctype,"project_name", function(frm) {
|
||||
frappe.ui.form.on(cur_frm.doctype,"project", function(frm) {
|
||||
if(in_list(["Delivery Note", "Sales Invoice"], frm.doc.doctype)) {
|
||||
frappe.call({
|
||||
method:'erpnext.projects.doctype.project.project.get_cost_center_name' ,
|
||||
args: { project_name: frm.doc.project_name },
|
||||
args: { project: frm.doc.project },
|
||||
callback: function(r, rt) {
|
||||
if(!r.exc) {
|
||||
$.each(frm.doc["items"] || [], function(i, row) {
|
||||
|
@ -15,6 +15,7 @@ def make_sample_data():
|
||||
selling_items = frappe.get_all("Item", filters = {"is_sales_item": 1})
|
||||
buying_items = frappe.get_all("Item", filters = {"is_purchase_item": 1})
|
||||
customers = frappe.get_all("Customer")
|
||||
warehouses = frappe.get_all("Warehouse")
|
||||
|
||||
if selling_items and customers:
|
||||
for i in range(3):
|
||||
@ -24,7 +25,7 @@ def make_sample_data():
|
||||
|
||||
make_projects()
|
||||
|
||||
if buying_items:
|
||||
if buying_items and warehouses:
|
||||
make_material_request(buying_items)
|
||||
|
||||
frappe.db.commit()
|
||||
|
@ -36,7 +36,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
|
||||
docstatus: 1,
|
||||
status: ["!=", "Closed"],
|
||||
per_delivered: ["<", 99.99],
|
||||
project_name: cur_frm.doc.project_name || undefined,
|
||||
project: cur_frm.doc.project || undefined,
|
||||
customer: cur_frm.doc.customer || undefined,
|
||||
company: cur_frm.doc.company
|
||||
}
|
||||
@ -142,7 +142,7 @@ cur_frm.cscript.update_status = function(status) {
|
||||
}
|
||||
|
||||
// ***************** Get project name *****************
|
||||
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
|
||||
cur_frm.fields_dict['project'].get_query = function(doc, cdt, cdn) {
|
||||
return {
|
||||
query: "erpnext.controllers.queries.get_project_name",
|
||||
filters: {
|
||||
|
@ -2078,17 +2078,17 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"description": "Track this Delivery Note against any Project",
|
||||
"fieldname": "project_name",
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"label": "Project",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "project_name",
|
||||
"oldfieldname": "project",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Project",
|
||||
"permlevel": 0,
|
||||
@ -2799,7 +2799,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2016-03-04 02:11:17.177846",
|
||||
"modified": "2016-03-10 05:10:56.813113",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Delivery Note",
|
||||
|
@ -118,7 +118,7 @@ class DeliveryNote(SellingController):
|
||||
super(DeliveryNote, self).validate_with_previous_doc({
|
||||
fn[0]: {
|
||||
"ref_dn_field": fn[1],
|
||||
"compare_fields": [["customer", "="], ["company", "="], ["project_name", "="],
|
||||
"compare_fields": [["customer", "="], ["company", "="], ["project", "="],
|
||||
["currency", "="]],
|
||||
},
|
||||
})
|
||||
@ -129,12 +129,12 @@ class DeliveryNote(SellingController):
|
||||
|
||||
def validate_proj_cust(self):
|
||||
"""check for does customer belong to same project as entered.."""
|
||||
if self.project_name and self.customer:
|
||||
if self.project and self.customer:
|
||||
res = frappe.db.sql("""select name from `tabProject`
|
||||
where name = %s and (customer = %s or
|
||||
ifnull(customer,'')='')""", (self.project_name, self.customer))
|
||||
ifnull(customer,'')='')""", (self.project, self.customer))
|
||||
if not res:
|
||||
frappe.throw(_("Customer {0} does not belong to project {1}").format(self.customer, self.project_name))
|
||||
frappe.throw(_("Customer {0} does not belong to project {1}").format(self.customer, self.project))
|
||||
|
||||
def validate_for_items(self):
|
||||
check_list, chk_dupl_itm = [], []
|
||||
|
@ -19,6 +19,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "",
|
||||
@ -44,6 +45,7 @@
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Series",
|
||||
@ -69,6 +71,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Item Code",
|
||||
@ -96,6 +99,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Variant Of",
|
||||
@ -121,6 +125,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Item Name",
|
||||
@ -147,6 +152,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "Item Group",
|
||||
@ -174,6 +180,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Unit of Measure",
|
||||
@ -200,6 +207,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -224,6 +232,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Maintain Stock",
|
||||
@ -250,6 +259,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Disabled",
|
||||
@ -274,6 +284,7 @@
|
||||
"fieldtype": "Attach",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Image",
|
||||
@ -299,6 +310,7 @@
|
||||
"fieldtype": "Image",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Image View",
|
||||
@ -324,6 +336,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Description",
|
||||
@ -348,6 +361,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Brand",
|
||||
@ -374,6 +388,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Barcode",
|
||||
@ -397,6 +412,7 @@
|
||||
"fieldtype": "Text Editor",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Description",
|
||||
@ -424,6 +440,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Inventory",
|
||||
@ -451,6 +468,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Warehouse",
|
||||
@ -479,6 +497,7 @@
|
||||
"fieldtype": "Date",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "End of Life",
|
||||
@ -506,6 +525,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Has Batch No",
|
||||
@ -535,6 +555,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Has Serial No",
|
||||
@ -563,6 +584,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Serial Number Series",
|
||||
@ -589,6 +611,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Is Fixed Asset Item",
|
||||
@ -616,6 +639,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -642,6 +666,7 @@
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Allow over delivery or receipt upto this percent",
|
||||
@ -668,6 +693,7 @@
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Valuation Method",
|
||||
@ -693,6 +719,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Warranty Period (in days)",
|
||||
@ -720,6 +747,7 @@
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Net Weight",
|
||||
@ -744,6 +772,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Weight UOM",
|
||||
@ -770,6 +799,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Auto re-order",
|
||||
@ -796,6 +826,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Reorder level based on Warehouse",
|
||||
@ -822,6 +853,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Variants",
|
||||
@ -849,6 +881,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Has Variants",
|
||||
@ -875,6 +908,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Attributes",
|
||||
@ -900,6 +934,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Purchase Details",
|
||||
@ -927,6 +962,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Is Purchase Item",
|
||||
@ -956,6 +992,7 @@
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Minimum Order Qty",
|
||||
@ -983,6 +1020,7 @@
|
||||
"fieldtype": "Int",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Lead Time in days",
|
||||
@ -1010,6 +1048,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Buying Cost Center",
|
||||
@ -1038,6 +1077,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Expense Account",
|
||||
@ -1065,6 +1105,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Unit of Measure Conversion",
|
||||
@ -1091,6 +1132,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "UOMs",
|
||||
@ -1118,6 +1160,7 @@
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Last Purchase Rate",
|
||||
@ -1144,6 +1187,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier Details",
|
||||
@ -1169,6 +1213,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Supplier",
|
||||
@ -1193,6 +1238,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Delivered by Supplier (Drop Ship)",
|
||||
@ -1218,6 +1264,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Manufacturer",
|
||||
@ -1243,6 +1290,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Manufacturer Part Number",
|
||||
@ -1267,6 +1315,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Item Code for Suppliers",
|
||||
@ -1293,6 +1342,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier Items",
|
||||
@ -1317,6 +1367,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Sales Details",
|
||||
@ -1344,6 +1395,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Is Sales Item",
|
||||
@ -1373,6 +1425,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Is Service Item",
|
||||
@ -1401,6 +1454,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Publish in Hub",
|
||||
@ -1426,6 +1480,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Synced With Hub",
|
||||
@ -1451,6 +1506,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Income Account",
|
||||
@ -1476,6 +1532,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Selling Cost Center",
|
||||
@ -1501,6 +1558,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer Item Codes",
|
||||
@ -1528,6 +1586,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer Items",
|
||||
@ -1553,6 +1612,7 @@
|
||||
"fieldtype": "Float",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Max Discount (%)",
|
||||
@ -1578,6 +1638,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Item Tax",
|
||||
@ -1604,6 +1665,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Taxes",
|
||||
@ -1630,6 +1692,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Inspection Criteria",
|
||||
@ -1656,6 +1719,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Inspection Required",
|
||||
@ -1684,6 +1748,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Quality Parameters",
|
||||
@ -1710,6 +1775,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Manufacturing",
|
||||
@ -1738,6 +1804,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Allow Production Order",
|
||||
@ -1766,6 +1833,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Supply Raw Materials for Purchase",
|
||||
@ -1792,6 +1860,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -1816,6 +1885,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default BOM",
|
||||
@ -1842,6 +1912,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer Code",
|
||||
@ -1865,6 +1936,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Website",
|
||||
@ -1889,6 +1961,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Show in Website",
|
||||
@ -1914,6 +1987,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Page Name",
|
||||
@ -1939,6 +2013,7 @@
|
||||
"fieldtype": "Int",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Weightage",
|
||||
@ -1964,6 +2039,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Slideshow",
|
||||
@ -1990,6 +2066,7 @@
|
||||
"fieldtype": "Attach",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Image",
|
||||
@ -2014,6 +2091,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Thumbnail",
|
||||
@ -2038,6 +2116,7 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
@ -2062,6 +2141,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Website Warehouse",
|
||||
@ -2088,6 +2168,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Website Item Groups",
|
||||
@ -2114,6 +2195,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Website Specifications",
|
||||
@ -2138,6 +2220,7 @@
|
||||
"fieldtype": "Button",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Copy From Item Group",
|
||||
@ -2162,6 +2245,7 @@
|
||||
"fieldtype": "Table",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Website Specifications",
|
||||
@ -2187,6 +2271,7 @@
|
||||
"fieldtype": "Text Editor",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Website Description",
|
||||
@ -2210,6 +2295,7 @@
|
||||
"fieldtype": "Read Only",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Parent Website Route",
|
||||
@ -2237,7 +2323,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 1,
|
||||
"modified": "2016-02-08 01:15:52.177625",
|
||||
"modified": "2016-03-10 05:15:41.190950",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Item",
|
||||
|
@ -184,7 +184,7 @@ cur_frm.cscript.new_contact = function() {
|
||||
loaddoc('Contact', tn);
|
||||
}
|
||||
|
||||
cur_frm.fields_dict['items'].grid.get_field('project_name').get_query = function(doc, cdt, cdn) {
|
||||
cur_frm.fields_dict['items'].grid.get_field('project').get_query = function(doc, cdt, cdn) {
|
||||
return {
|
||||
filters: [
|
||||
['Project', 'status', 'not in', 'Completed, Cancelled']
|
||||
|
@ -168,103 +168,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_mobile",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mobile No",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_email",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Email",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Email",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -348,6 +251,36 @@
|
||||
"unique": 0,
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"description": "",
|
||||
"fieldname": "company",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Company",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "company",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Company",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"print_width": "150px",
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1,
|
||||
"set_only_once": 0,
|
||||
"unique": 0,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -400,6 +333,254 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"fieldname": "section_addresses",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address and Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "supplier_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Select Supplier Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_mobile",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Mobile No",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_email",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Email",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "col_break_address",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "",
|
||||
"fieldname": "shipping_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Select Shipping Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "shipping_address_display",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Shipping Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -1577,105 +1758,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"depends_on": "supplier",
|
||||
"fieldname": "contact_section",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Details",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "icon-bullhorn",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "supplier_address",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "column_break_57",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "contact_person",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Contact Person",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -2032,36 +2114,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"description": "",
|
||||
"fieldname": "company",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Company",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "company",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Company",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"print_width": "150px",
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 1,
|
||||
"set_only_once": 0,
|
||||
"unique": 0,
|
||||
"width": "150px"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@ -2364,7 +2416,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2016-03-04 04:13:59.425031",
|
||||
"modified": "2016-03-16 15:52:17.581445",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Purchase Receipt",
|
||||
|
@ -116,7 +116,7 @@ class PurchaseReceipt(BuyingController):
|
||||
},
|
||||
"Purchase Order Item": {
|
||||
"ref_dn_field": "prevdoc_detail_docname",
|
||||
"compare_fields": [["project_name", "="], ["uom", "="], ["item_code", "="]],
|
||||
"compare_fields": [["project", "="], ["uom", "="], ["item_code", "="]],
|
||||
"is_child_table": True
|
||||
}
|
||||
})
|
||||
|
@ -1310,14 +1310,14 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "project_name",
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"label": "Project",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Project",
|
||||
@ -1715,7 +1715,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-02-22 09:33:38.187041",
|
||||
"modified": "2016-03-10 05:11:15.937267",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Purchase Receipt Item",
|
||||
|
@ -7,6 +7,7 @@
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Document",
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@ -1241,17 +1242,16 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "project_name",
|
||||
"fieldname": "project",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Project Name",
|
||||
"label": "Project",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "project_name",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "Project",
|
||||
"permlevel": 0,
|
||||
@ -1431,7 +1431,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-03-03 05:11:33.716402",
|
||||
"modified": "2016-03-07 08:37:08.747493",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Stock Entry",
|
||||
|
@ -91,7 +91,7 @@ class StockEntry(StockController):
|
||||
frappe.throw(_("{0} is not a stock Item").format(item.item_code))
|
||||
|
||||
item_details = self.get_item_details(frappe._dict({"item_code": item.item_code,
|
||||
"company": self.company, "project_name": self.project_name, "uom": item.uom}), for_update=True)
|
||||
"company": self.company, "project": self.project, "uom": item.uom}), for_update=True)
|
||||
|
||||
for f in ("uom", "stock_uom", "description", "item_name", "expense_account",
|
||||
"cost_center", "conversion_factor"):
|
||||
|
@ -29,7 +29,7 @@ def get_item_details(args):
|
||||
"buying_price_list": None,
|
||||
"is_subcontracted": "Yes" / "No",
|
||||
"ignore_pricing_rule": 0/1
|
||||
"project_name": ""
|
||||
"project": ""
|
||||
}
|
||||
"""
|
||||
args = process_args(args)
|
||||
@ -210,7 +210,7 @@ def get_default_expense_account(args, item):
|
||||
or frappe.db.get_value("Item Group", item.item_group, "default_expense_account"))
|
||||
|
||||
def get_default_cost_center(args, item):
|
||||
return (frappe.db.get_value("Project", args.get("project_name"), "cost_center")
|
||||
return (frappe.db.get_value("Project", args.get("project"), "cost_center")
|
||||
or (item.selling_cost_center if args.get("customer") else item.buying_cost_center)
|
||||
or frappe.db.get_value("Item Group", item.item_group, "default_cost_center")
|
||||
or args.get("cost_center"))
|
||||
|
@ -20,7 +20,7 @@ def execute(filters=None):
|
||||
precision = get_currency_precision() or 2
|
||||
data = []
|
||||
for item in sorted(item_map):
|
||||
data.append([item, item_map[item]["item_name"],
|
||||
data.append([item, item_map[item]["item_name"],item_map[item]["item_group"],
|
||||
item_map[item]["description"], item_map[item]["stock_uom"],
|
||||
flt(last_purchase_rate.get(item, 0), precision),
|
||||
flt(val_rate_map.get(item, 0), precision),
|
||||
@ -34,9 +34,9 @@ def execute(filters=None):
|
||||
def get_columns(filters):
|
||||
"""return columns based on filters"""
|
||||
|
||||
columns = [_("Item") + ":Link/Item:100", _("Item Name") + "::150", _("Description") + "::150", _("UOM") + ":Link/UOM:80",
|
||||
_("Last Purchase Rate") + ":Currency:90", _("Valuation Rate") + ":Currency:80", _("Sales Price List") + "::80",
|
||||
_("Purchase Price List") + "::80", _("BOM Rate") + ":Currency:90"]
|
||||
columns = [_("Item") + ":Link/Item:100", _("Item Name") + "::150",_("Item Group") + ":Link/Item Group:125", _("Description") + "::150", _("UOM") + ":Link/UOM:80",
|
||||
_("Last Purchase Rate") + ":Currency:90", _("Valuation Rate") + ":Currency:80", _("Sales Price List") + "::180",
|
||||
_("Purchase Price List") + "::180", _("BOM Rate") + ":Currency:90"]
|
||||
|
||||
return columns
|
||||
|
||||
@ -45,9 +45,9 @@ def get_item_details():
|
||||
|
||||
item_map = {}
|
||||
|
||||
for i in frappe.db.sql("select name, item_name, description, \
|
||||
for i in frappe.db.sql("select name, item_group, item_name, description, \
|
||||
stock_uom from tabItem \
|
||||
order by item_code", as_dict=1):
|
||||
order by item_code, item_group", as_dict=1):
|
||||
item_map.setdefault(i.name, i)
|
||||
|
||||
return item_map
|
||||
@ -58,9 +58,9 @@ def get_price_list():
|
||||
rate = {}
|
||||
|
||||
price_list = frappe.db.sql("""select ip.item_code, ip.buying, ip.selling,
|
||||
concat(ip.price_list, " - ", ip.currency, " ", ip.price_list_rate) as price
|
||||
from `tabItem Price` ip, `tabPrice List` pl
|
||||
where ip.price_list=pl.name and pl.enabled=1""", as_dict=1)
|
||||
concat(ifnull(cu.symbol,ip.currency), " ", round(ip.price_list_rate,2), " - ", ip.price_list) as price
|
||||
from `tabItem Price` ip, `tabPrice List` pl, `tabCurrency` cu
|
||||
where ip.price_list=pl.name and pl.currency=cu.name and pl.enabled=1""", as_dict=1)
|
||||
|
||||
for j in price_list:
|
||||
if j.price:
|
||||
|
@ -12,7 +12,7 @@
|
||||
"module": "Stock",
|
||||
"name": "Ordered Items To Be Delivered",
|
||||
"owner": "Administrator",
|
||||
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project_name` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.qty as \"Qty:Float:140\",\n `tabSales Order Item`.delivered_qty as \"Delivered Qty:Float:140\",\n (`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0)) as \"Qty to Deliver:Float:140\",\n `tabSales Order Item`.base_rate as \"Rate:Float:140\",\n `tabSales Order Item`.base_amount as \"Amount:Float:140\",\n ((`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0))*`tabSales Order Item`.base_rate) as \"Amount to Deliver:Float:140\",\n `tabBin`.actual_qty as \"Available Qty:Float:120\",\n `tabBin`.projected_qty as \"Projected Qty:Float:120\",\n `tabSales Order`.`delivery_date` as \"Expected Delivery Date:Date:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order Item`.item_group as \"Item Group:Link/Item Group:120\",\n `tabSales Order Item`.warehouse as \"Warehouse:Link/Warehouse:200\"\nfrom\n `tabSales Order` JOIN `tabSales Order Item` \n LEFT JOIN `tabBin` ON (`tabBin`.item_code = `tabSales Order Item`.item_code\n and `tabBin`.warehouse = `tabSales Order Item`.warehouse)\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status not in (\"Stopped\", \"Closed\")\n and ifnull(`tabSales Order Item`.delivered_qty,0) < ifnull(`tabSales Order Item`.qty,0)\norder by `tabSales Order`.transaction_date asc",
|
||||
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.qty as \"Qty:Float:140\",\n `tabSales Order Item`.delivered_qty as \"Delivered Qty:Float:140\",\n (`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0)) as \"Qty to Deliver:Float:140\",\n `tabSales Order Item`.base_rate as \"Rate:Float:140\",\n `tabSales Order Item`.base_amount as \"Amount:Float:140\",\n ((`tabSales Order Item`.qty - ifnull(`tabSales Order Item`.delivered_qty, 0))*`tabSales Order Item`.base_rate) as \"Amount to Deliver:Float:140\",\n `tabBin`.actual_qty as \"Available Qty:Float:120\",\n `tabBin`.projected_qty as \"Projected Qty:Float:120\",\n `tabSales Order`.`delivery_date` as \"Expected Delivery Date:Date:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order Item`.item_group as \"Item Group:Link/Item Group:120\",\n `tabSales Order Item`.warehouse as \"Warehouse:Link/Warehouse:200\"\nfrom\n `tabSales Order` JOIN `tabSales Order Item` \n LEFT JOIN `tabBin` ON (`tabBin`.item_code = `tabSales Order Item`.item_code\n and `tabBin`.warehouse = `tabSales Order Item`.warehouse)\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status not in (\"Stopped\", \"Closed\")\n and ifnull(`tabSales Order Item`.delivered_qty,0) < ifnull(`tabSales Order Item`.qty,0)\norder by `tabSales Order`.transaction_date asc",
|
||||
"ref_doctype": "Delivery Note",
|
||||
"report_name": "Ordered Items To Be Delivered",
|
||||
"report_type": "Query Report"
|
||||
|
@ -12,7 +12,7 @@
|
||||
"module": "Stock",
|
||||
"name": "Purchase Order Items To Be Received",
|
||||
"owner": "Administrator",
|
||||
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n\t`tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order Item`.`schedule_date` as \"Reqd by Date:Date:110\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.qty as \"Qty:Float:100\",\n\t`tabPurchase Order Item`.received_qty as \"Received Qty:Float:100\", \n\t(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0)) as \"Qty to Receive:Float:100\",\n `tabPurchase Order Item`.warehouse as \"Warehouse:Link/Warehouse:150\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n `tabPurchase Order Item`.brand as \"Brand::100\",\n\t`tabPurchase Order`.`company` as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status not in (\"Stopped\", \"Closed\")\n\tand ifnull(`tabPurchase Order Item`.received_qty, 0) < ifnull(`tabPurchase Order Item`.qty, 0)\norder by `tabPurchase Order`.transaction_date asc",
|
||||
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n\t`tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order Item`.`schedule_date` as \"Reqd by Date:Date:110\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.qty as \"Qty:Float:100\",\n\t`tabPurchase Order Item`.received_qty as \"Received Qty:Float:100\", \n\t(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0)) as \"Qty to Receive:Float:100\",\n `tabPurchase Order Item`.warehouse as \"Warehouse:Link/Warehouse:150\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n `tabPurchase Order Item`.brand as \"Brand::100\",\n\t`tabPurchase Order`.`company` as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status not in (\"Stopped\", \"Closed\")\n\tand ifnull(`tabPurchase Order Item`.received_qty, 0) < ifnull(`tabPurchase Order Item`.qty, 0)\norder by `tabPurchase Order`.transaction_date asc",
|
||||
"ref_doctype": "Purchase Receipt",
|
||||
"report_name": "Purchase Order Items To Be Received",
|
||||
"report_type": "Query Report"
|
||||
|
@ -16,6 +16,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "",
|
||||
@ -24,6 +25,7 @@
|
||||
"options": "icon-map-marker",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -40,6 +42,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address Title",
|
||||
@ -47,6 +50,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -62,6 +66,7 @@
|
||||
"fieldtype": "Select",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"label": "Address Type",
|
||||
@ -70,6 +75,7 @@
|
||||
"options": "Billing\nShipping\nOffice\nPersonal\nPlant\nPostal\nShop\nSubsidiary\nWarehouse\nOther",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -85,6 +91,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address Line 1",
|
||||
@ -92,6 +99,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -107,6 +115,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Address Line 2",
|
||||
@ -114,6 +123,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -129,6 +139,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 1,
|
||||
"label": "City/Town",
|
||||
@ -136,6 +147,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -151,6 +163,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "State",
|
||||
@ -158,6 +171,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -173,6 +187,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Postal Code",
|
||||
@ -180,6 +195,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -195,6 +211,7 @@
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Country",
|
||||
@ -203,6 +220,7 @@
|
||||
"options": "Country",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -218,12 +236,14 @@
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -240,6 +260,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Email Id",
|
||||
@ -247,6 +268,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -262,6 +284,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Phone",
|
||||
@ -269,6 +292,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -284,6 +308,7 @@
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Fax",
|
||||
@ -291,6 +316,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -308,6 +334,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Preferred Billing Address",
|
||||
@ -315,6 +342,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -332,6 +360,7 @@
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Preferred Shipping Address",
|
||||
@ -339,6 +368,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -354,6 +384,7 @@
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Reference",
|
||||
@ -362,6 +393,7 @@
|
||||
"options": "icon-pushpin",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -373,10 +405,65 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"default": "0",
|
||||
"fieldname": "is_your_company_address",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Is Your Company Address",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "eval:doc.is_your_company_address",
|
||||
"fieldname": "company",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Company",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Company",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "eval:!doc.is_your_company_address",
|
||||
"fieldname": "customer",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer",
|
||||
@ -385,6 +472,7 @@
|
||||
"options": "Customer",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -396,10 +484,12 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "eval:!doc.is_your_company_address",
|
||||
"fieldname": "customer_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Customer Name",
|
||||
@ -407,6 +497,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -418,10 +509,12 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "eval:!doc.is_your_company_address",
|
||||
"fieldname": "supplier",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier",
|
||||
@ -430,6 +523,7 @@
|
||||
"options": "Supplier",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -441,10 +535,12 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "eval:!doc.is_your_company_address",
|
||||
"fieldname": "supplier_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Supplier Name",
|
||||
@ -452,6 +548,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -463,10 +560,12 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "eval: !doc.is_your_company_address",
|
||||
"fieldname": "sales_partner",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Sales Partner",
|
||||
@ -475,6 +574,7 @@
|
||||
"options": "Sales Partner",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -486,32 +586,12 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "column_break_22",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "eval:!doc.supplier && !doc.sales_partner",
|
||||
"depends_on": "eval:!doc.supplier && !doc.sales_partner && !doc.is_your_company_address",
|
||||
"fieldname": "lead",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Lead",
|
||||
@ -520,6 +600,7 @@
|
||||
"options": "Lead",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -531,11 +612,12 @@
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"depends_on": "eval:!doc.supplier && !doc.sales_partner",
|
||||
"depends_on": "eval:!doc.supplier && !doc.sales_partner && !doc.is_your_company_address",
|
||||
"fieldname": "lead_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Lead Name",
|
||||
@ -543,6 +625,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -561,7 +644,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2015-11-16 06:29:41.719278",
|
||||
"modified": "2016-03-16 16:10:26.435426",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Utilities",
|
||||
"name": "Address",
|
||||
|
@ -29,6 +29,7 @@ class Address(Document):
|
||||
self.link_address()
|
||||
self.validate_primary_address()
|
||||
self.validate_shipping_address()
|
||||
self.validate_reference()
|
||||
|
||||
def validate_primary_address(self):
|
||||
"""Validate that there can only be one primary address for particular customer, supplier"""
|
||||
@ -49,7 +50,7 @@ class Address(Document):
|
||||
if not self.flags.linked:
|
||||
self.check_if_linked()
|
||||
|
||||
if not self.flags.linked:
|
||||
if not self.flags.linked and not self.is_your_company_address:
|
||||
contact = frappe.db.get_value("Contact", {"email_id": self.owner},
|
||||
("name", "customer", "supplier"), as_dict = True)
|
||||
if contact:
|
||||
@ -68,6 +69,13 @@ class Address(Document):
|
||||
"""Validate that there can only be one shipping address for particular customer, supplier"""
|
||||
if self.is_shipping_address == 1:
|
||||
self._unset_other("is_shipping_address")
|
||||
|
||||
def validate_reference(self):
|
||||
if self.is_your_company_address:
|
||||
if not self.company:
|
||||
frappe.throw(_("Company is mandatory, as it is your company address"))
|
||||
if self.customer or self.supplier or self.sales_partner or self.lead:
|
||||
frappe.throw(_("Remove reference of customer, supplier, sales partner and lead, as it is your company address"))
|
||||
|
||||
def _unset_other(self, is_address_type):
|
||||
for fieldname in ["customer", "supplier", "sales_partner", "lead"]:
|
||||
@ -83,20 +91,12 @@ class Address(Document):
|
||||
def get_address_display(address_dict):
|
||||
if not address_dict:
|
||||
return
|
||||
|
||||
if not isinstance(address_dict, dict):
|
||||
address_dict = frappe.db.get_value("Address", address_dict, "*", as_dict=True) or {}
|
||||
|
||||
data = frappe.db.get_value("Address Template", \
|
||||
{"country": address_dict.get("country")}, ["name", "template"])
|
||||
if not data:
|
||||
data = frappe.db.get_value("Address Template", \
|
||||
{"is_default": 1}, ["name", "template"])
|
||||
|
||||
if not data:
|
||||
frappe.throw(_("No default Address Template found. Please create a new one from Setup > Printing and Branding > Address Template."))
|
||||
|
||||
name, template = data
|
||||
|
||||
name, template = get_address_templates(address_dict)
|
||||
|
||||
try:
|
||||
return frappe.render_template(template, address_dict)
|
||||
except TemplateSyntaxError:
|
||||
@ -138,3 +138,27 @@ def has_website_permission(doc, ptype, user, verbose=False):
|
||||
return doc.lead == lead
|
||||
|
||||
return False
|
||||
|
||||
def get_address_templates(address):
|
||||
result = frappe.db.get_value("Address Template", \
|
||||
{"country": address.get("country")}, ["name", "template"])
|
||||
|
||||
if not result:
|
||||
result = frappe.db.get_value("Address Template", \
|
||||
{"is_default": 1}, ["name", "template"])
|
||||
|
||||
if not result:
|
||||
frappe.throw(_("No default Address Template found. Please create a new one from Setup > Printing and Branding > Address Template."))
|
||||
else:
|
||||
return result
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_shipping_address(company):
|
||||
filters = {"company": company, "is_your_company_address":1}
|
||||
fieldname = ["name", "address_line1", "address_line2", "city", "state", "country"]
|
||||
|
||||
address_as_dict = frappe.db.get_value("Address", filters=filters, fieldname=fieldname, as_dict=True)
|
||||
|
||||
if address_as_dict:
|
||||
name, address_template = get_address_templates(address_as_dict)
|
||||
return address_as_dict.get("name"), frappe.render_template(address_template, address_as_dict)
|
||||
|
Loading…
x
Reference in New Issue
Block a user