Merge branch 'develop' into new-subscription
This commit is contained in:
commit
2970630ed2
@ -5,7 +5,7 @@ import frappe
|
|||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
from frappe.utils import getdate
|
from frappe.utils import getdate
|
||||||
|
|
||||||
__version__ = '10.1.6'
|
__version__ = '10.1.7'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
|||||||
@ -159,6 +159,36 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "include_pos_transactions",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Include POS Transactions",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
@ -292,7 +322,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2017-04-21 16:58:26.902732",
|
"modified": "2018-03-07 18:58:48.658687",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Bank Reconciliation",
|
"name": "Bank Reconciliation",
|
||||||
|
|||||||
@ -54,7 +54,23 @@ class BankReconciliation(Document):
|
|||||||
""".format(condition),
|
""".format(condition),
|
||||||
{"account":self.bank_account, "from":self.from_date, "to":self.to_date}, as_dict=1)
|
{"account":self.bank_account, "from":self.from_date, "to":self.to_date}, as_dict=1)
|
||||||
|
|
||||||
entries = sorted(list(payment_entries)+list(journal_entries),
|
pos_entries = []
|
||||||
|
if self.include_pos_transactions:
|
||||||
|
pos_entries = frappe.db.sql("""
|
||||||
|
select
|
||||||
|
"Sales Invoice Payment" as payment_document, sip.name as payment_entry, sip.amount as debit,
|
||||||
|
si.posting_date, si.debit_to as against_account, sip.clearance_date,
|
||||||
|
account.account_currency, 0 as credit
|
||||||
|
from `tabSales Invoice Payment` sip, `tabSales Invoice` si, `tabAccount` account
|
||||||
|
where
|
||||||
|
sip.account=%(account)s and si.docstatus=1 and sip.parent = si.name
|
||||||
|
and account.name = sip.account and si.posting_date >= %(from)s and si.posting_date <= %(to)s {0}
|
||||||
|
order by
|
||||||
|
si.posting_date ASC, si.name DESC
|
||||||
|
""".format(condition),
|
||||||
|
{"account":self.bank_account, "from":self.from_date, "to":self.to_date}, as_dict=1)
|
||||||
|
|
||||||
|
entries = sorted(list(payment_entries)+list(journal_entries+list(pos_entries)),
|
||||||
key=lambda k: k['posting_date'] or getdate(nowdate()))
|
key=lambda k: k['posting_date'] or getdate(nowdate()))
|
||||||
|
|
||||||
self.set('payment_entries', [])
|
self.set('payment_entries', [])
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestBankReconciliation(unittest.TestCase):
|
||||||
|
pass
|
||||||
@ -685,6 +685,24 @@ def get_company_defaults(company):
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
def get_outstanding_on_journal_entry(name):
|
||||||
|
res = frappe.db.sql(
|
||||||
|
'SELECT '
|
||||||
|
'CASE WHEN party_type IN ("Customer", "Student") '
|
||||||
|
'THEN ifnull(sum(debit_in_account_currency - credit_in_account_currency), 0) '
|
||||||
|
'ELSE ifnull(sum(credit_in_account_currency - debit_in_account_currency), 0) '
|
||||||
|
'END as outstanding_amount '
|
||||||
|
'FROM `tabGL Entry` WHERE (voucher_no=%s OR against_voucher=%s) '
|
||||||
|
'AND party_type IS NOT NULL '
|
||||||
|
'AND party_type != ""',
|
||||||
|
(name, name), as_dict=1
|
||||||
|
)
|
||||||
|
|
||||||
|
outstanding_amount = res[0].get('outstanding_amount', 0) if res else 0
|
||||||
|
|
||||||
|
return outstanding_amount
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_reference_details(reference_doctype, reference_name, party_account_currency):
|
def get_reference_details(reference_doctype, reference_name, party_account_currency):
|
||||||
total_amount = outstanding_amount = exchange_rate = None
|
total_amount = outstanding_amount = exchange_rate = None
|
||||||
@ -695,6 +713,13 @@ def get_reference_details(reference_doctype, reference_name, party_account_curre
|
|||||||
total_amount = ref_doc.get("grand_total")
|
total_amount = ref_doc.get("grand_total")
|
||||||
exchange_rate = 1
|
exchange_rate = 1
|
||||||
outstanding_amount = ref_doc.get("outstanding_amount")
|
outstanding_amount = ref_doc.get("outstanding_amount")
|
||||||
|
elif reference_doctype == "Journal Entry" and ref_doc.docstatus == 1:
|
||||||
|
total_amount = ref_doc.get("total_amount")
|
||||||
|
if ref_doc.multi_currency:
|
||||||
|
exchange_rate = get_exchange_rate(party_account_currency, company_currency, ref_doc.posting_date)
|
||||||
|
else:
|
||||||
|
exchange_rate = 1
|
||||||
|
outstanding_amount = get_outstanding_on_journal_entry(reference_name)
|
||||||
elif reference_doctype != "Journal Entry":
|
elif reference_doctype != "Journal Entry":
|
||||||
if party_account_currency == company_currency:
|
if party_account_currency == company_currency:
|
||||||
if ref_doc.doctype == "Expense Claim":
|
if ref_doc.doctype == "Expense Claim":
|
||||||
|
|||||||
@ -42,6 +42,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -73,6 +74,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -104,6 +106,7 @@
|
|||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -135,6 +138,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -166,6 +170,39 @@
|
|||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "mode_of_payment",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Mode of Payment",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Mode of Payment",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -179,8 +216,8 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-12-19 16:20:33.546984",
|
"modified": "2018-03-08 11:26:18.266987",
|
||||||
"modified_by": "nabinhait@gmail.com",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Schedule",
|
"name": "Payment Schedule",
|
||||||
"name_case": "",
|
"name_case": "",
|
||||||
|
|||||||
@ -41,6 +41,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -71,6 +72,39 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "mode_of_payment",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Mode of Payment",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Mode of Payment",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -100,6 +134,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -131,6 +166,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -162,6 +198,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -193,6 +230,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -222,6 +260,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -252,6 +291,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -265,7 +305,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-01-24 11:13:42.800048",
|
"modified": "2018-03-08 10:47:32.830478",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Term",
|
"name": "Payment Term",
|
||||||
|
|||||||
@ -42,6 +42,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -73,6 +74,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -105,6 +107,7 @@
|
|||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -136,6 +139,7 @@
|
|||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -169,6 +173,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -201,6 +206,39 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "mode_of_payment",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Mode of Payment",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Mode of Payment",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -214,7 +252,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-09-26 05:21:51.738319",
|
"modified": "2018-03-08 11:07:09.014151",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Terms Template Detail",
|
"name": "Payment Terms Template Detail",
|
||||||
|
|||||||
@ -227,6 +227,36 @@
|
|||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "clearance_date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Clearance Date",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 1,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 1,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
"has_web_view": 0,
|
||||||
@ -239,7 +269,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-07-24 17:25:03.765856",
|
"modified": "2018-03-07 18:34:39.552769",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Invoice Payment",
|
"name": "Sales Invoice Payment",
|
||||||
|
|||||||
@ -394,7 +394,8 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
this.frm = {}
|
this.frm = {}
|
||||||
this.frm.doc = this.doc
|
this.frm.doc = this.doc
|
||||||
this.set_transaction_defaults("Customer");
|
this.set_transaction_defaults("Customer");
|
||||||
this.frm.doc["allow_user_to_edit_rate"] = this.pos_profile_data["allow_user_to_edit_rate"] ? true : false,
|
this.frm.doc["allow_user_to_edit_rate"] = this.pos_profile_data["allow_user_to_edit_rate"] ? true : false;
|
||||||
|
this.frm.doc["allow_user_to_edit_discount"] = this.pos_profile_data["allow_user_to_edit_discount"] ? true : false;
|
||||||
this.wrapper.html(frappe.render_template("pos", this.frm.doc));
|
this.wrapper.html(frappe.render_template("pos", this.frm.doc));
|
||||||
this.make_search();
|
this.make_search();
|
||||||
this.make_customer();
|
this.make_customer();
|
||||||
@ -1257,6 +1258,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
$(this.wrapper).find('.selected-item').empty();
|
$(this.wrapper).find('.selected-item').empty();
|
||||||
if(this.child_doc.length) {
|
if(this.child_doc.length) {
|
||||||
this.child_doc[0]["allow_user_to_edit_rate"] = this.pos_profile_data["allow_user_to_edit_rate"] ? true : false,
|
this.child_doc[0]["allow_user_to_edit_rate"] = this.pos_profile_data["allow_user_to_edit_rate"] ? true : false,
|
||||||
|
this.child_doc[0]["allow_user_to_edit_discount"] = this.pos_profile_data["allow_user_to_edit_discount"] ? true : false;
|
||||||
this.selected_row = $(frappe.render_template("pos_selected_item", this.child_doc[0]))
|
this.selected_row = $(frappe.render_template("pos_selected_item", this.child_doc[0]))
|
||||||
$(this.wrapper).find('.selected-item').html(this.selected_row)
|
$(this.wrapper).find('.selected-item').html(this.selected_row)
|
||||||
}
|
}
|
||||||
@ -1692,7 +1694,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
|||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
me.freeze_screen = false;
|
me.freeze_screen = false;
|
||||||
me.sync_sales_invoice()
|
me.sync_sales_invoice()
|
||||||
}, 60000)
|
}, 180000)
|
||||||
},
|
},
|
||||||
|
|
||||||
sync_sales_invoice: function () {
|
sync_sales_invoice: function () {
|
||||||
|
|||||||
@ -28,5 +28,10 @@ frappe.query_reports["Bank Reconciliation Statement"] = {
|
|||||||
"default": frappe.datetime.get_today(),
|
"default": frappe.datetime.get_today(),
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fieldname":"include_pos_transactions",
|
||||||
|
"label": __("Include POS Transactions"),
|
||||||
|
"fieldtype": "Check"
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -138,7 +138,23 @@ def get_entries(filters):
|
|||||||
and ifnull(clearance_date, '4000-01-01') > %(report_date)s
|
and ifnull(clearance_date, '4000-01-01') > %(report_date)s
|
||||||
""", filters, as_dict=1)
|
""", filters, as_dict=1)
|
||||||
|
|
||||||
return sorted(list(payment_entries)+list(journal_entries),
|
pos_entries = []
|
||||||
|
if filters.include_pos_transactions:
|
||||||
|
pos_entries = frappe.db.sql("""
|
||||||
|
select
|
||||||
|
"Sales Invoice Payment" as payment_document, sip.name as payment_entry, sip.amount as debit,
|
||||||
|
si.posting_date, si.debit_to as against_account, sip.clearance_date,
|
||||||
|
account.account_currency, 0 as credit
|
||||||
|
from `tabSales Invoice Payment` sip, `tabSales Invoice` si, `tabAccount` account
|
||||||
|
where
|
||||||
|
sip.account=%(account)s and si.docstatus=1 and sip.parent = si.name
|
||||||
|
and account.name = sip.account and si.posting_date <= %(report_date)s and
|
||||||
|
ifnull(sip.clearance_date, '4000-01-01') > %(report_date)s
|
||||||
|
order by
|
||||||
|
si.posting_date ASC, si.name DESC
|
||||||
|
""", filters, as_dict=1)
|
||||||
|
|
||||||
|
return sorted(list(payment_entries)+list(journal_entries+list(pos_entries)),
|
||||||
key=lambda k: k['posting_date'] or getdate(nowdate()))
|
key=lambda k: k['posting_date'] or getdate(nowdate()))
|
||||||
|
|
||||||
def get_amounts_not_reflected_in_system(filters):
|
def get_amounts_not_reflected_in_system(filters):
|
||||||
|
|||||||
@ -179,7 +179,7 @@ def get_invoice_tax_map(invoice_list, invoice_expense_map, expense_accounts):
|
|||||||
invoice_tax_map = {}
|
invoice_tax_map = {}
|
||||||
for d in tax_details:
|
for d in tax_details:
|
||||||
if d.account_head in expense_accounts:
|
if d.account_head in expense_accounts:
|
||||||
if invoice_expense_map[d.parent].has_key(d.account_head):
|
if d.account_head in invoice_expense_map[d.parent]:
|
||||||
invoice_expense_map[d.parent][d.account_head] += flt(d.tax_amount)
|
invoice_expense_map[d.parent][d.account_head] += flt(d.tax_amount)
|
||||||
else:
|
else:
|
||||||
invoice_expense_map[d.parent][d.account_head] = flt(d.tax_amount)
|
invoice_expense_map[d.parent][d.account_head] = flt(d.tax_amount)
|
||||||
|
|||||||
@ -189,7 +189,7 @@ def get_invoice_tax_map(invoice_list, invoice_income_map, income_accounts):
|
|||||||
invoice_tax_map = {}
|
invoice_tax_map = {}
|
||||||
for d in tax_details:
|
for d in tax_details:
|
||||||
if d.account_head in income_accounts:
|
if d.account_head in income_accounts:
|
||||||
if invoice_income_map[d.parent].has_key(d.account_head):
|
if d.account_head in invoice_income_map[d.parent]:
|
||||||
invoice_income_map[d.parent][d.account_head] += flt(d.tax_amount)
|
invoice_income_map[d.parent][d.account_head] += flt(d.tax_amount)
|
||||||
else:
|
else:
|
||||||
invoice_income_map[d.parent][d.account_head] = flt(d.tax_amount)
|
invoice_income_map[d.parent][d.account_head] = flt(d.tax_amount)
|
||||||
|
|||||||
@ -175,7 +175,7 @@ def accumulate_values_into_parents(accounts, accounts_by_name):
|
|||||||
|
|
||||||
def prepare_data(accounts, filters, total_row, parent_children_map, company_currency):
|
def prepare_data(accounts, filters, total_row, parent_children_map, company_currency):
|
||||||
data = []
|
data = []
|
||||||
tmpaccnt = sorted(accounts)
|
tmpaccnt = sorted(accounts, key = lambda account: account.name)
|
||||||
if not (accounts[0].account_number is None):
|
if not (accounts[0].account_number is None):
|
||||||
accounts = tmpaccnt
|
accounts = tmpaccnt
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
import frappe.defaults
|
import frappe.defaults
|
||||||
from frappe import msgprint, _
|
from frappe import msgprint, _
|
||||||
from frappe.model.naming import make_autoname
|
from frappe.model.naming import set_name_by_naming_series
|
||||||
from frappe.contacts.address_and_contact import load_address_and_contact, delete_contact_and_address
|
from frappe.contacts.address_and_contact import load_address_and_contact, delete_contact_and_address
|
||||||
from erpnext.utilities.transaction_base import TransactionBase
|
from erpnext.utilities.transaction_base import TransactionBase
|
||||||
from erpnext.accounts.party import validate_party_accounts, get_dashboard_info, get_timeline_data # keep this
|
from erpnext.accounts.party import validate_party_accounts, get_dashboard_info, get_timeline_data # keep this
|
||||||
@ -28,7 +28,7 @@ class Supplier(TransactionBase):
|
|||||||
if supp_master_name == 'Supplier Name':
|
if supp_master_name == 'Supplier Name':
|
||||||
self.name = self.supplier_name
|
self.name = self.supplier_name
|
||||||
else:
|
else:
|
||||||
self.name = make_autoname(self.naming_series + '.#####')
|
set_name_by_naming_series(self)
|
||||||
|
|
||||||
def on_update(self):
|
def on_update(self):
|
||||||
if not self.naming_series:
|
if not self.naming_series:
|
||||||
|
|||||||
@ -126,6 +126,11 @@ def get_data():
|
|||||||
"link": "Tree/Sales Person",
|
"link": "Tree/Sales Person",
|
||||||
"description": _("Manage Sales Person Tree."),
|
"description": _("Manage Sales Person Tree."),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Lead Source",
|
||||||
|
"description": _("Track Leads by Lead Source.")
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -173,6 +173,11 @@ def get_data():
|
|||||||
"name": "Industry Type",
|
"name": "Industry Type",
|
||||||
"description": _("Track Leads by Industry Type.")
|
"description": _("Track Leads by Industry Type.")
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Lead Source",
|
||||||
|
"description": _("Track Leads by Lead Source.")
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -947,6 +947,7 @@ def get_payment_term_details(term, posting_date=None, grand_total=None, bill_dat
|
|||||||
|
|
||||||
if getdate(term_details.due_date) < getdate(posting_date):
|
if getdate(term_details.due_date) < getdate(posting_date):
|
||||||
term_details.due_date = posting_date
|
term_details.due_date = posting_date
|
||||||
|
term_details.mode_of_payment = term.mode_of_payment
|
||||||
|
|
||||||
return term_details
|
return term_details
|
||||||
|
|
||||||
|
|||||||
@ -94,7 +94,10 @@ def validate_is_incremental(numeric_attribute, attribute, value, item):
|
|||||||
InvalidItemAttributeValueError, title=_('Invalid Attribute'))
|
InvalidItemAttributeValueError, title=_('Invalid Attribute'))
|
||||||
|
|
||||||
def validate_item_attribute_value(attributes_list, attribute, attribute_value, item):
|
def validate_item_attribute_value(attributes_list, attribute, attribute_value, item):
|
||||||
if attribute_value not in attributes_list:
|
allow_rename_attribute_value = frappe.db.get_single_value('Item Variant Settings', 'allow_rename_attribute_value')
|
||||||
|
if allow_rename_attribute_value:
|
||||||
|
pass
|
||||||
|
elif attribute_value not in attributes_list:
|
||||||
frappe.throw(_("Value {0} for Attribute {1} does not exist in the list of valid Item Attribute Values for Item {2}").format(
|
frappe.throw(_("Value {0} for Attribute {1} does not exist in the list of valid Item Attribute Values for Item {2}").format(
|
||||||
attribute_value, attribute, item), InvalidItemAttributeValueError, title=_('Invalid Attribute'))
|
attribute_value, attribute, item), InvalidItemAttributeValueError, title=_('Invalid Attribute'))
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.model.naming import make_autoname
|
from frappe.model.naming import set_name_by_naming_series
|
||||||
|
|
||||||
class Instructor(Document):
|
class Instructor(Document):
|
||||||
def autoname(self):
|
def autoname(self):
|
||||||
@ -15,7 +15,7 @@ class Instructor(Document):
|
|||||||
frappe.throw(_("Please setup Instructor Naming System in Education > Education Settings"))
|
frappe.throw(_("Please setup Instructor Naming System in Education > Education Settings"))
|
||||||
else:
|
else:
|
||||||
if naming_method == 'Naming Series':
|
if naming_method == 'Naming Series':
|
||||||
self.name = make_autoname(self.naming_series + '.####')
|
set_name_by_naming_series(self)
|
||||||
elif naming_method == 'Employee Number':
|
elif naming_method == 'Employee Number':
|
||||||
if not self.employee:
|
if not self.employee:
|
||||||
frappe.throw(_("Please select Employee"))
|
frappe.throw(_("Please select Employee"))
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"naming_series": "_T-Instructor-",
|
"naming_series": "_T-Instructor-",
|
||||||
"employee": "_T-Employee-0001",
|
"employee": "_T-Employee-00001",
|
||||||
"instructor_name": "_Test Instructor"
|
"instructor_name": "_Test Instructor"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"naming_series": "_T-Instructor-",
|
"naming_series": "_T-Instructor-",
|
||||||
"employee": "_T-Employee-0002",
|
"employee": "_T-Employee-00002",
|
||||||
"instructor_name": "_Test Instructor 2"
|
"instructor_name": "_Test Instructor 2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -27,6 +27,7 @@ def execute(filters=None):
|
|||||||
course_dict = values.get("course_dict")
|
course_dict = values.get("course_dict")
|
||||||
|
|
||||||
for student in args.students:
|
for student in args.students:
|
||||||
|
if student_details.get(student):
|
||||||
student_row = {}
|
student_row = {}
|
||||||
student_row["student"] = student
|
student_row["student"] = student
|
||||||
student_row["student_name"] = student_details[student]
|
student_row["student_name"] = student_details[student]
|
||||||
|
|||||||
@ -15,23 +15,7 @@ frappe.ui.form.on('Consultation', {
|
|||||||
{fieldname: 'test_comment', columns: 4}
|
{fieldname: 'test_comment', columns: 4}
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
onload: function(frm){
|
|
||||||
if(frm.doc.patient){
|
|
||||||
frappe.call({
|
|
||||||
"method": "erpnext.healthcare.doctype.patient.patient.get_patient_detail",
|
|
||||||
args: {
|
|
||||||
patient: frm.doc.patient
|
|
||||||
},
|
|
||||||
callback: function (data) {
|
|
||||||
var age = null;
|
|
||||||
if(data.message.dob){
|
|
||||||
age = calculate_age(data.message.dob);
|
|
||||||
}
|
|
||||||
frappe.model.set_value(frm.doctype,frm.docname, "patient_age", age);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
refresh_field('drug_prescription');
|
refresh_field('drug_prescription');
|
||||||
refresh_field('test_prescription');
|
refresh_field('test_prescription');
|
||||||
|
|||||||
@ -8,7 +8,7 @@ from frappe import _
|
|||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.utils import cint, cstr, getdate
|
from frappe.utils import cint, cstr, getdate
|
||||||
import dateutil
|
import dateutil
|
||||||
from frappe.model.naming import make_autoname
|
from frappe.model.naming import set_name_by_naming_series
|
||||||
from erpnext.healthcare.doctype.healthcare_settings.healthcare_settings import get_receivable_account,get_income_account,send_registration_sms
|
from erpnext.healthcare.doctype.healthcare_settings.healthcare_settings import get_receivable_account,get_income_account,send_registration_sms
|
||||||
|
|
||||||
class Patient(Document):
|
class Patient(Document):
|
||||||
@ -42,10 +42,7 @@ class Patient(Document):
|
|||||||
if patient_master_name == 'Patient Name':
|
if patient_master_name == 'Patient Name':
|
||||||
self.name = self.get_patient_name()
|
self.name = self.get_patient_name()
|
||||||
else:
|
else:
|
||||||
if not self.naming_series:
|
set_name_by_naming_series(self)
|
||||||
frappe.throw(_("Series is mandatory"), frappe.MandatoryError)
|
|
||||||
|
|
||||||
self.name = make_autoname(self.naming_series+'.#####')
|
|
||||||
|
|
||||||
def get_patient_name(self):
|
def get_patient_name(self):
|
||||||
name = self.patient_name
|
name = self.patient_name
|
||||||
|
|||||||
@ -750,7 +750,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2018-01-19 15:25:43.166877",
|
"modified": "2018-03-09 15:25:43.166877",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Healthcare",
|
"module": "Healthcare",
|
||||||
"name": "Physician",
|
"name": "Physician",
|
||||||
|
|||||||
@ -201,11 +201,11 @@ doc_events = {
|
|||||||
"Sales Invoice": {
|
"Sales Invoice": {
|
||||||
'validate': 'erpnext.regional.india.utils.set_place_of_supply',
|
'validate': 'erpnext.regional.india.utils.set_place_of_supply',
|
||||||
"on_submit": "erpnext.regional.france.utils.create_transaction_log",
|
"on_submit": "erpnext.regional.france.utils.create_transaction_log",
|
||||||
"on_trash": "erpnext.regional.france.utils.check_deletion_permission"
|
"on_trash": "erpnext.regional.check_deletion_permission"
|
||||||
},
|
},
|
||||||
"Payment Entry": {
|
"Payment Entry": {
|
||||||
"on_submit": ["erpnext.regional.france.utils.create_transaction_log", "erpnext.accounts.doctype.payment_request.payment_request.make_status_as_paid"],
|
"on_submit": ["erpnext.regional.france.utils.create_transaction_log", "erpnext.accounts.doctype.payment_request.payment_request.make_status_as_paid"],
|
||||||
"on_trash": "erpnext.regional.france.utils.check_deletion_permission"
|
"on_trash": "erpnext.regional.check_deletion_permission"
|
||||||
},
|
},
|
||||||
'Address': {
|
'Address': {
|
||||||
'validate': 'erpnext.regional.india.utils.validate_gstin_for_india'
|
'validate': 'erpnext.regional.india.utils.validate_gstin_for_india'
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"doctype": "Attendance",
|
"doctype": "Attendance",
|
||||||
"name": "_Test Attendance 1",
|
"name": "_Test Attendance 1",
|
||||||
"employee": "_T-Employee-0001",
|
"employee": "_T-Employee-00001",
|
||||||
"status": "Present",
|
"status": "Present",
|
||||||
"attendance_date": "2014-02-01",
|
"attendance_date": "2014-02-01",
|
||||||
"company": "_Test Company"
|
"company": "_Test Company"
|
||||||
|
|||||||
@ -5,7 +5,7 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
from frappe.utils import getdate, validate_email_add, today, add_years
|
from frappe.utils import getdate, validate_email_add, today, add_years
|
||||||
from frappe.model.naming import make_autoname
|
from frappe.model.naming import set_name_by_naming_series
|
||||||
from frappe import throw, _, scrub
|
from frappe import throw, _, scrub
|
||||||
import frappe.permissions
|
import frappe.permissions
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
@ -24,7 +24,7 @@ class Employee(NestedSet):
|
|||||||
throw(_("Please setup Employee Naming System in Human Resource > HR Settings"))
|
throw(_("Please setup Employee Naming System in Human Resource > HR Settings"))
|
||||||
else:
|
else:
|
||||||
if naming_method == 'Naming Series':
|
if naming_method == 'Naming Series':
|
||||||
self.name = make_autoname(self.naming_series + '.####')
|
set_name_by_naming_series(self)
|
||||||
elif naming_method == 'Employee Number':
|
elif naming_method == 'Employee Number':
|
||||||
self.name = self.employee_number
|
self.name = self.employee_number
|
||||||
elif naming_method == 'Full Name':
|
elif naming_method == 'Full Name':
|
||||||
|
|||||||
@ -35,7 +35,7 @@ def make_payment_entry(advance):
|
|||||||
|
|
||||||
def make_employee_advance():
|
def make_employee_advance():
|
||||||
doc = frappe.new_doc("Employee Advance")
|
doc = frappe.new_doc("Employee Advance")
|
||||||
doc.employee = "_T-Employee-0001"
|
doc.employee = "_T-Employee-00001"
|
||||||
doc.company = "_Test company"
|
doc.company = "_Test company"
|
||||||
doc.purpose = "For site visit"
|
doc.purpose = "For site visit"
|
||||||
doc.advance_amount = 1000
|
doc.advance_amount = 1000
|
||||||
|
|||||||
@ -87,7 +87,7 @@ def get_payable_account(company):
|
|||||||
def make_expense_claim(payable_account,claim_amount, sanctioned_amount, company, account, project=None, task_name=None):
|
def make_expense_claim(payable_account,claim_amount, sanctioned_amount, company, account, project=None, task_name=None):
|
||||||
expense_claim = frappe.get_doc({
|
expense_claim = frappe.get_doc({
|
||||||
"doctype": "Expense Claim",
|
"doctype": "Expense Claim",
|
||||||
"employee": "_T-Employee-0001",
|
"employee": "_T-Employee-00001",
|
||||||
"payable_account": payable_account,
|
"payable_account": payable_account,
|
||||||
"company": company,
|
"company": company,
|
||||||
"expenses":
|
"expenses":
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"docstatus": 1,
|
"docstatus": 1,
|
||||||
"doctype": "Leave Allocation",
|
"doctype": "Leave Allocation",
|
||||||
"employee": "_T-Employee-0001",
|
"employee": "_T-Employee-00001",
|
||||||
"from_date": "2013-01-01",
|
"from_date": "2013-01-01",
|
||||||
"to_date": "2013-12-31",
|
"to_date": "2013-12-31",
|
||||||
"leave_type": "_Test Leave Type",
|
"leave_type": "_Test Leave Type",
|
||||||
@ -11,7 +11,7 @@
|
|||||||
{
|
{
|
||||||
"docstatus": 1,
|
"docstatus": 1,
|
||||||
"doctype": "Leave Allocation",
|
"doctype": "Leave Allocation",
|
||||||
"employee": "_T-Employee-0002",
|
"employee": "_T-Employee-00002",
|
||||||
"from_date": "2013-01-01",
|
"from_date": "2013-01-01",
|
||||||
"to_date": "2013-12-31",
|
"to_date": "2013-12-31",
|
||||||
"leave_type": "_Test Leave Type",
|
"leave_type": "_Test Leave Type",
|
||||||
|
|||||||
@ -14,7 +14,7 @@ _test_records = [
|
|||||||
{
|
{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"doctype": "Leave Application",
|
"doctype": "Leave Application",
|
||||||
"employee": "_T-Employee-0001",
|
"employee": "_T-Employee-00001",
|
||||||
"from_date": "2013-05-01",
|
"from_date": "2013-05-01",
|
||||||
"leave_type": "_Test Leave Type",
|
"leave_type": "_Test Leave Type",
|
||||||
"posting_date": "2013-01-02",
|
"posting_date": "2013-01-02",
|
||||||
@ -23,7 +23,7 @@ _test_records = [
|
|||||||
{
|
{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"doctype": "Leave Application",
|
"doctype": "Leave Application",
|
||||||
"employee": "_T-Employee-0002",
|
"employee": "_T-Employee-00002",
|
||||||
"from_date": "2013-05-01",
|
"from_date": "2013-05-01",
|
||||||
"leave_type": "_Test Leave Type",
|
"leave_type": "_Test Leave Type",
|
||||||
"posting_date": "2013-01-02",
|
"posting_date": "2013-01-02",
|
||||||
@ -32,7 +32,7 @@ _test_records = [
|
|||||||
{
|
{
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"doctype": "Leave Application",
|
"doctype": "Leave Application",
|
||||||
"employee": "_T-Employee-0001",
|
"employee": "_T-Employee-00001",
|
||||||
"from_date": "2013-01-15",
|
"from_date": "2013-01-15",
|
||||||
"leave_type": "_Test Leave Type LWP",
|
"leave_type": "_Test Leave Type LWP",
|
||||||
"posting_date": "2013-01-02",
|
"posting_date": "2013-01-02",
|
||||||
@ -230,15 +230,15 @@ class TestLeaveApplication(unittest.TestCase):
|
|||||||
from frappe.utils.user import add_role
|
from frappe.utils.user import add_role
|
||||||
add_role("test1@example.com", "Employee")
|
add_role("test1@example.com", "Employee")
|
||||||
add_role("test@example.com", "Leave Approver")
|
add_role("test@example.com", "Leave Approver")
|
||||||
self._add_employee_leave_approver("_T-Employee-0002", "test@example.com")
|
self._add_employee_leave_approver("_T-Employee-00002", "test@example.com")
|
||||||
|
|
||||||
make_allocation_record(employee="_T-Employee-0002")
|
make_allocation_record(employee="_T-Employee-00002")
|
||||||
|
|
||||||
application = self.get_application(_test_records[1])
|
application = self.get_application(_test_records[1])
|
||||||
|
|
||||||
frappe.db.set_value("Leave Block List", "_Test Leave Block List",
|
frappe.db.set_value("Leave Block List", "_Test Leave Block List",
|
||||||
"applies_to_all_departments", 1)
|
"applies_to_all_departments", 1)
|
||||||
frappe.db.set_value("Employee", "_T-Employee-0002", "department",
|
frappe.db.set_value("Employee", "_T-Employee-00002", "department",
|
||||||
"_Test Department")
|
"_Test Department")
|
||||||
|
|
||||||
frappe.set_user("test1@example.com")
|
frappe.set_user("test1@example.com")
|
||||||
@ -255,7 +255,7 @@ def make_allocation_record(employee=None, leave_type=None):
|
|||||||
|
|
||||||
allocation = frappe.get_doc({
|
allocation = frappe.get_doc({
|
||||||
"doctype": "Leave Allocation",
|
"doctype": "Leave Allocation",
|
||||||
"employee": employee or "_T-Employee-0001",
|
"employee": employee or "_T-Employee-00001",
|
||||||
"leave_type": leave_type or "_Test Leave Type",
|
"leave_type": leave_type or "_Test Leave Type",
|
||||||
"from_date": "2013-01-01",
|
"from_date": "2013-01-01",
|
||||||
"to_date": "2015-12-31",
|
"to_date": "2015-12-31",
|
||||||
|
|||||||
@ -573,7 +573,7 @@ def get_bom_items_as_dict(bom, company, qty=1, fetch_exploded=1, fetch_scrap_ite
|
|||||||
items = frappe.db.sql(query, { "qty": qty, "bom": bom }, as_dict=True)
|
items = frappe.db.sql(query, { "qty": qty, "bom": bom }, as_dict=True)
|
||||||
|
|
||||||
for item in items:
|
for item in items:
|
||||||
if item_dict.has_key(item.item_code):
|
if item.item_code in item_dict:
|
||||||
item_dict[item.item_code]["qty"] += flt(item.qty)
|
item_dict[item.item_code]["qty"] += flt(item.qty)
|
||||||
else:
|
else:
|
||||||
item_dict[item.item_code] = item
|
item_dict[item.item_code] = item
|
||||||
|
|||||||
@ -4,6 +4,7 @@ def execute():
|
|||||||
if frappe.db.exists("DocType", "Physician"):
|
if frappe.db.exists("DocType", "Physician"):
|
||||||
frappe.reload_doc("healthcare", "doctype", "physician")
|
frappe.reload_doc("healthcare", "doctype", "physician")
|
||||||
frappe.reload_doc("healthcare", "doctype", "physician_service_unit_schedule")
|
frappe.reload_doc("healthcare", "doctype", "physician_service_unit_schedule")
|
||||||
|
|
||||||
if frappe.db.has_column('Physician', 'physician_schedule'):
|
if frappe.db.has_column('Physician', 'physician_schedule'):
|
||||||
for doc in frappe.get_all('Physician'):
|
for doc in frappe.get_all('Physician'):
|
||||||
_doc = frappe.get_doc('Physician', doc.name)
|
_doc = frappe.get_doc('Physician', doc.name)
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class TestActivityCost(unittest.TestCase):
|
|||||||
frappe.db.sql("delete from `tabActivity Cost`")
|
frappe.db.sql("delete from `tabActivity Cost`")
|
||||||
activity_cost1 = frappe.new_doc('Activity Cost')
|
activity_cost1 = frappe.new_doc('Activity Cost')
|
||||||
activity_cost1.update({
|
activity_cost1.update({
|
||||||
"employee": "_T-Employee-0001",
|
"employee": "_T-Employee-00001",
|
||||||
"employee_name": "_Test Employee",
|
"employee_name": "_Test Employee",
|
||||||
"activity_type": "_Test Activity Type 1",
|
"activity_type": "_Test Activity Type 1",
|
||||||
"billing_rate": 100,
|
"billing_rate": 100,
|
||||||
|
|||||||
@ -14,8 +14,8 @@ from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sal
|
|||||||
|
|
||||||
class TestTimesheet(unittest.TestCase):
|
class TestTimesheet(unittest.TestCase):
|
||||||
def test_timesheet_billing_amount(self):
|
def test_timesheet_billing_amount(self):
|
||||||
make_salary_structure("_T-Employee-0001")
|
make_salary_structure("_T-Employee-00001")
|
||||||
timesheet = make_timesheet("_T-Employee-0001", simulate=True, billable=1)
|
timesheet = make_timesheet("_T-Employee-00001", simulate=True, billable=1)
|
||||||
|
|
||||||
self.assertEqual(timesheet.total_hours, 2)
|
self.assertEqual(timesheet.total_hours, 2)
|
||||||
self.assertEqual(timesheet.total_billable_hours, 2)
|
self.assertEqual(timesheet.total_billable_hours, 2)
|
||||||
@ -24,8 +24,8 @@ class TestTimesheet(unittest.TestCase):
|
|||||||
self.assertEqual(timesheet.total_billable_amount, 100)
|
self.assertEqual(timesheet.total_billable_amount, 100)
|
||||||
|
|
||||||
def test_timesheet_billing_amount_not_billable(self):
|
def test_timesheet_billing_amount_not_billable(self):
|
||||||
make_salary_structure("_T-Employee-0001")
|
make_salary_structure("_T-Employee-00001")
|
||||||
timesheet = make_timesheet("_T-Employee-0001", simulate=True, billable=0)
|
timesheet = make_timesheet("_T-Employee-00001", simulate=True, billable=0)
|
||||||
|
|
||||||
self.assertEqual(timesheet.total_hours, 2)
|
self.assertEqual(timesheet.total_hours, 2)
|
||||||
self.assertEqual(timesheet.total_billable_hours, 0)
|
self.assertEqual(timesheet.total_billable_hours, 0)
|
||||||
@ -34,8 +34,8 @@ class TestTimesheet(unittest.TestCase):
|
|||||||
self.assertEqual(timesheet.total_billable_amount, 0)
|
self.assertEqual(timesheet.total_billable_amount, 0)
|
||||||
|
|
||||||
def test_salary_slip_from_timesheet(self):
|
def test_salary_slip_from_timesheet(self):
|
||||||
salary_structure = make_salary_structure("_T-Employee-0001")
|
salary_structure = make_salary_structure("_T-Employee-00001")
|
||||||
timesheet = make_timesheet("_T-Employee-0001", simulate = True, billable=1)
|
timesheet = make_timesheet("_T-Employee-00001", simulate = True, billable=1)
|
||||||
salary_slip = make_salary_slip(timesheet.name)
|
salary_slip = make_salary_slip(timesheet.name)
|
||||||
salary_slip.submit()
|
salary_slip.submit()
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ class TestTimesheet(unittest.TestCase):
|
|||||||
self.assertEqual(timesheet.status, 'Submitted')
|
self.assertEqual(timesheet.status, 'Submitted')
|
||||||
|
|
||||||
def test_sales_invoice_from_timesheet(self):
|
def test_sales_invoice_from_timesheet(self):
|
||||||
timesheet = make_timesheet("_T-Employee-0001", simulate=True, billable=1)
|
timesheet = make_timesheet("_T-Employee-00001", simulate=True, billable=1)
|
||||||
sales_invoice = make_sales_invoice(timesheet.name, '_Test Item', '_Test Customer')
|
sales_invoice = make_sales_invoice(timesheet.name, '_Test Item', '_Test Customer')
|
||||||
sales_invoice.due_date = nowdate()
|
sales_invoice.due_date = nowdate()
|
||||||
sales_invoice.submit()
|
sales_invoice.submit()
|
||||||
@ -68,7 +68,7 @@ class TestTimesheet(unittest.TestCase):
|
|||||||
self.assertEqual(item.rate, 50.00)
|
self.assertEqual(item.rate, 50.00)
|
||||||
|
|
||||||
def test_timesheet_billing_based_on_project(self):
|
def test_timesheet_billing_based_on_project(self):
|
||||||
timesheet = make_timesheet("_T-Employee-0001", simulate=True, billable=1, project = '_Test Project', company='_Test Company')
|
timesheet = make_timesheet("_T-Employee-00001", simulate=True, billable=1, project = '_Test Project', company='_Test Company')
|
||||||
sales_invoice = create_sales_invoice(do_not_save=True)
|
sales_invoice = create_sales_invoice(do_not_save=True)
|
||||||
sales_invoice.project = '_Test Project'
|
sales_invoice.project = '_Test Project'
|
||||||
sales_invoice.submit()
|
sales_invoice.submit()
|
||||||
@ -85,7 +85,7 @@ class TestTimesheet(unittest.TestCase):
|
|||||||
|
|
||||||
update_activity_type("_Test Activity Type")
|
update_activity_type("_Test Activity Type")
|
||||||
timesheet = frappe.new_doc("Timesheet")
|
timesheet = frappe.new_doc("Timesheet")
|
||||||
timesheet.employee = "_T-Employee-0001"
|
timesheet.employee = "_T-Employee-00001"
|
||||||
timesheet.append(
|
timesheet.append(
|
||||||
'time_logs',
|
'time_logs',
|
||||||
{
|
{
|
||||||
|
|||||||
@ -37,6 +37,7 @@
|
|||||||
<div class="cell price-cell text-right tax-table">
|
<div class="cell price-cell text-right tax-table">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% if(allow_user_to_edit_discount) { %}
|
||||||
<div class="pos-list-row discount-amount-area">
|
<div class="pos-list-row discount-amount-area">
|
||||||
<div class="cell"></div>
|
<div class="cell"></div>
|
||||||
<div class="cell text-right">{%= __("Discount") %}</div>
|
<div class="cell text-right">{%= __("Discount") %}</div>
|
||||||
@ -51,6 +52,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% } %}
|
||||||
<div class="pos-list-row grand-total-area collapse-btn" style="border-bottom:1px solid #d1d8dd;">
|
<div class="pos-list-row grand-total-area collapse-btn" style="border-bottom:1px solid #d1d8dd;">
|
||||||
<div class="cell">
|
<div class="cell">
|
||||||
<a class="">
|
<a class="">
|
||||||
@ -71,7 +73,7 @@
|
|||||||
{% for(var j=i*3; j
|
{% for(var j=i*3; j
|
||||||
<(i+1)*3; j++) { %} <button type="button" class="btn btn-default numeric-keypad" val="{{j+1}}">{{j+1}}</button>
|
<(i+1)*3; j++) { %} <button type="button" class="btn btn-default numeric-keypad" val="{{j+1}}">{{j+1}}</button>
|
||||||
{% } %}
|
{% } %}
|
||||||
<button type="button" {% if(!allow_user_to_edit_rate && chartData[i] == __("Price")) { %} disabled {% } %} id="pos-item-{{ chartData[i].toLowerCase() }}" class="btn text-center btn-default numeric-keypad pos-operation">{{ __(chartData[i]) }}</button>
|
<button type="button" {% if((!allow_user_to_edit_rate && chartData[i] == __("Price")) || (!allow_user_to_edit_discount && chartData[i] == __("Disc"))) { %} disabled {% } %} id="pos-item-{{ chartData[i].toLowerCase() }}" class="btn text-center btn-default numeric-keypad pos-operation">{{ __(chartData[i]) }}</button>
|
||||||
</div>
|
</div>
|
||||||
{% } %}
|
{% } %}
|
||||||
<div class="row text-right">
|
<div class="row text-right">
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="pos-list-row">
|
<div class="pos-list-row">
|
||||||
<div class="cell">{{ __("Discount") }}: %</div>
|
<div class="cell">{{ __("Discount") }}: %</div>
|
||||||
<input type="tel" class="form-control cell pos-item-disc" value="{%= discount_percentage %}">
|
<input type="tel" class="form-control cell pos-item-disc" {% if !allow_user_to_edit_discount %} disabled {% endif %} value="{%= discount_percentage %}">
|
||||||
</div>
|
</div>
|
||||||
<div class="pos-list-row">
|
<div class="pos-list-row">
|
||||||
<div class="cell">{{ __("Price") }}:</div>
|
<div class="cell">{{ __("Price") }}:</div>
|
||||||
|
|||||||
@ -0,0 +1,11 @@
|
|||||||
|
# Copyright (c) 2018, Frappe Technologies and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
from frappe import _
|
||||||
|
from erpnext import get_region
|
||||||
|
|
||||||
|
def check_deletion_permission(doc, method):
|
||||||
|
region = get_region()
|
||||||
|
if region in ["Nepal", "France"]:
|
||||||
|
frappe.throw(_("Deletion is not permitted for country {0}".format(region)))
|
||||||
@ -9,9 +9,7 @@ def create_transaction_log(doc, method):
|
|||||||
region = get_region()
|
region = get_region()
|
||||||
if region not in ["France"]:
|
if region not in ["France"]:
|
||||||
return
|
return
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
data = str(doc.as_dict())
|
data = str(doc.as_dict())
|
||||||
|
|
||||||
frappe.get_doc({
|
frappe.get_doc({
|
||||||
@ -21,14 +19,6 @@ def create_transaction_log(doc, method):
|
|||||||
"data": data
|
"data": data
|
||||||
}).insert(ignore_permissions=True)
|
}).insert(ignore_permissions=True)
|
||||||
|
|
||||||
def check_deletion_permission(doc, method):
|
|
||||||
region = get_region()
|
|
||||||
if region not in ["France"]:
|
|
||||||
return
|
|
||||||
|
|
||||||
else:
|
|
||||||
frappe.throw(_("Deletion is not permitted for country {0}".format(region)))
|
|
||||||
|
|
||||||
# don't remove this function it is used in tests
|
# don't remove this function it is used in tests
|
||||||
def test_method():
|
def test_method():
|
||||||
'''test function'''
|
'''test function'''
|
||||||
|
|||||||
@ -5,11 +5,11 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.model.naming import make_autoname
|
from frappe.model.naming import set_name_by_naming_series
|
||||||
|
|
||||||
class Campaign(Document):
|
class Campaign(Document):
|
||||||
def autoname(self):
|
def autoname(self):
|
||||||
if frappe.defaults.get_global_default('campaign_naming_by') != 'Naming Series':
|
if frappe.defaults.get_global_default('campaign_naming_by') != 'Naming Series':
|
||||||
self.name = self.campaign_name
|
self.name = self.campaign_name
|
||||||
else:
|
else:
|
||||||
self.name = make_autoname(self.naming_series+'.#####')
|
set_name_by_naming_series(self)
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.model.naming import make_autoname
|
from frappe.model.naming import set_name_by_naming_series
|
||||||
from frappe import _, msgprint, throw
|
from frappe import _, msgprint, throw
|
||||||
import frappe.defaults
|
import frappe.defaults
|
||||||
from frappe.utils import flt, cint, cstr
|
from frappe.utils import flt, cint, cstr
|
||||||
@ -31,10 +31,7 @@ class Customer(TransactionBase):
|
|||||||
if cust_master_name == 'Customer Name':
|
if cust_master_name == 'Customer Name':
|
||||||
self.name = self.get_customer_name()
|
self.name = self.get_customer_name()
|
||||||
else:
|
else:
|
||||||
if not self.naming_series:
|
set_name_by_naming_series(self)
|
||||||
frappe.throw(_("Series is mandatory"), frappe.MandatoryError)
|
|
||||||
|
|
||||||
self.name = make_autoname(self.naming_series+'.#####')
|
|
||||||
|
|
||||||
def get_customer_name(self):
|
def get_customer_name(self):
|
||||||
if frappe.db.get_value("Customer", self.customer_name):
|
if frappe.db.get_value("Customer", self.customer_name):
|
||||||
|
|||||||
@ -48,6 +48,15 @@ frappe.ui.form.on("Sales Order", {
|
|||||||
});
|
});
|
||||||
|
|
||||||
frappe.ui.form.on("Sales Order Item", {
|
frappe.ui.form.on("Sales Order Item", {
|
||||||
|
item_code: function(frm,cdt,cdn) {
|
||||||
|
var row = locals[cdt][cdn];
|
||||||
|
if (frm.doc.delivery_date) {
|
||||||
|
row.delivery_date = frm.doc.delivery_date;
|
||||||
|
refresh_field("delivery_date", cdn, "items");
|
||||||
|
} else {
|
||||||
|
this.frm.script_manager.copy_from_first_row("items", row, ["delivery_date"]);
|
||||||
|
}
|
||||||
|
},
|
||||||
delivery_date: function(frm, cdt, cdn) {
|
delivery_date: function(frm, cdt, cdn) {
|
||||||
if(!frm.doc.delivery_date) {
|
if(!frm.doc.delivery_date) {
|
||||||
erpnext.utils.copy_value_in_all_row(frm.doc, cdt, cdn, "items", "delivery_date");
|
erpnext.utils.copy_value_in_all_row(frm.doc, cdt, cdn, "items", "delivery_date");
|
||||||
@ -433,17 +442,6 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
|||||||
if(cint(frappe.boot.notification_settings.sales_order)) {
|
if(cint(frappe.boot.notification_settings.sales_order)) {
|
||||||
this.frm.email_doc(frappe.boot.notification_settings.sales_order_message);
|
this.frm.email_doc(frappe.boot.notification_settings.sales_order_message);
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
items_add: function(doc, cdt, cdn) {
|
|
||||||
var row = frappe.get_doc(cdt, cdn);
|
|
||||||
if(doc.delivery_date) {
|
|
||||||
row.delivery_date = doc.delivery_date;
|
|
||||||
refresh_field("delivery_date", cdn, "items");
|
|
||||||
} else {
|
|
||||||
this.frm.script_manager.copy_from_first_row("items", row, ["delivery_date"]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$.extend(cur_frm.cscript, new erpnext.selling.SalesOrderController({frm: cur_frm}));
|
$.extend(cur_frm.cscript, new erpnext.selling.SalesOrderController({frm: cur_frm}));
|
||||||
@ -2,13 +2,12 @@
|
|||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
test_ignore = ["Account", "Cost Center"]
|
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
import unittest
|
import unittest
|
||||||
from frappe.utils import random_string
|
from frappe.utils import random_string
|
||||||
from erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts import get_charts_for_country
|
from erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts import get_charts_for_country
|
||||||
|
|
||||||
|
test_ignore = ["Account", "Cost Center", "Payment Terms Template"]
|
||||||
test_records = frappe.get_test_records('Company')
|
test_records = frappe.get_test_records('Company')
|
||||||
|
|
||||||
class TestCompany(unittest.TestCase):
|
class TestCompany(unittest.TestCase):
|
||||||
|
|||||||
@ -1,21 +1,21 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"doctype": "Sales Person",
|
"doctype": "Sales Person",
|
||||||
"employee": "_T-Employee-0001",
|
"employee": "_T-Employee-00001",
|
||||||
"is_group": 0,
|
"is_group": 0,
|
||||||
"parent_sales_person": "Sales Team",
|
"parent_sales_person": "Sales Team",
|
||||||
"sales_person_name": "_Test Sales Person"
|
"sales_person_name": "_Test Sales Person"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "Sales Person",
|
"doctype": "Sales Person",
|
||||||
"employee": "_T-Employee-0002",
|
"employee": "_T-Employee-00002",
|
||||||
"is_group": 0,
|
"is_group": 0,
|
||||||
"parent_sales_person": "Sales Team",
|
"parent_sales_person": "Sales Team",
|
||||||
"sales_person_name": "_Test Sales Person 1"
|
"sales_person_name": "_Test Sales Person 1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doctype": "Sales Person",
|
"doctype": "Sales Person",
|
||||||
"employee": "_T-Employee-0003",
|
"employee": "_T-Employee-00003",
|
||||||
"is_group": 0,
|
"is_group": 0,
|
||||||
"parent_sales_person": "Sales Team",
|
"parent_sales_person": "Sales Team",
|
||||||
"sales_person_name": "_Test Sales Person 2"
|
"sales_person_name": "_Test Sales Person 2"
|
||||||
|
|||||||
@ -170,6 +170,35 @@ frappe.ui.form.on('Item Reorder', {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
frappe.ui.form.on('Item Customer Detail', {
|
||||||
|
customer_items_add: function(frm, cdt, cdn) {
|
||||||
|
frappe.model.set_value(cdt, cdn, 'customer_group', "");
|
||||||
|
},
|
||||||
|
customer_name: function(frm, cdt, cdn) {
|
||||||
|
set_customer_group(frm, cdt, cdn);
|
||||||
|
},
|
||||||
|
customer_group: function(frm, cdt, cdn) {
|
||||||
|
if(set_customer_group(frm, cdt, cdn)){
|
||||||
|
frappe.msgprint(__("Changing Customer Group for the selected Customer is not allowed."));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var set_customer_group = function(frm, cdt, cdn) {
|
||||||
|
var row = frappe.get_doc(cdt, cdn);
|
||||||
|
|
||||||
|
if (!row.customer_name) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
frappe.model.with_doc("Customer", row.customer_name, function() {
|
||||||
|
var customer = frappe.model.get_doc("Customer", row.customer_name);
|
||||||
|
row.customer_group = customer.customer_group;
|
||||||
|
refresh_field("customer_group", cdn, "customer_items");
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
$.extend(erpnext.item, {
|
$.extend(erpnext.item, {
|
||||||
setup_queries: function(frm) {
|
setup_queries: function(frm) {
|
||||||
frm.fields_dict['expense_account'].get_query = function(doc) {
|
frm.fields_dict['expense_account'].get_query = function(doc) {
|
||||||
|
|||||||
@ -44,6 +44,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -74,6 +75,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 1,
|
"set_only_once": 1,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -106,6 +108,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -139,6 +142,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 1,
|
"set_only_once": 1,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -170,6 +174,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 1,
|
"search_index": 1,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -199,6 +204,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -232,6 +238,7 @@
|
|||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -262,6 +269,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -295,6 +303,7 @@
|
|||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -323,6 +332,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -353,6 +363,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -387,6 +398,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -418,6 +430,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -449,6 +462,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -480,6 +494,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -510,6 +525,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 1,
|
"set_only_once": 1,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -542,6 +558,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -575,6 +592,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -606,6 +624,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -636,6 +655,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -668,6 +688,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -699,6 +720,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -729,6 +751,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -760,6 +783,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -793,6 +817,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -827,6 +852,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -857,6 +883,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -890,6 +917,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -922,6 +950,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -952,6 +981,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0,
|
"unique": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
@ -984,6 +1014,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 1,
|
"set_only_once": 1,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1016,6 +1047,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1047,6 +1079,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1078,6 +1111,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1110,6 +1144,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1142,6 +1177,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1173,6 +1209,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1207,6 +1244,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1239,6 +1277,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1273,6 +1312,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1305,6 +1345,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1336,6 +1377,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1367,6 +1409,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1399,6 +1442,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1428,6 +1472,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1463,6 +1508,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1494,6 +1540,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1526,6 +1573,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1560,6 +1608,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1593,6 +1642,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 1,
|
"set_only_once": 1,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1625,6 +1675,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1656,6 +1707,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1687,6 +1739,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1718,6 +1771,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1752,6 +1806,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1782,6 +1837,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1812,6 +1868,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1845,6 +1902,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1879,6 +1937,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1913,6 +1972,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1945,6 +2005,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1976,6 +2037,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2007,6 +2069,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2037,6 +2100,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2068,6 +2132,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2098,6 +2163,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2129,6 +2195,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0,
|
"unique": 0,
|
||||||
"width": "50%"
|
"width": "50%"
|
||||||
},
|
},
|
||||||
@ -2161,6 +2228,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2191,6 +2259,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2222,6 +2291,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2251,6 +2321,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2282,6 +2353,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2313,37 +2385,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"translatable": 0,
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"default": "1",
|
|
||||||
"fieldname": "is_sales_item",
|
|
||||||
"fieldtype": "Check",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Is Sales Item",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2375,6 +2417,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2406,8 +2449,74 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"default": "1",
|
||||||
|
"fieldname": "is_sales_item",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Is Sales Item",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"depends_on": "",
|
||||||
|
"fieldname": "column_break3",
|
||||||
|
"fieldtype": "Column Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"oldfieldtype": "Column Break",
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0,
|
||||||
|
"width": "50%"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
@ -2437,70 +2546,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"translatable": 0,
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"depends_on": "",
|
|
||||||
"fieldname": "column_break3",
|
|
||||||
"fieldtype": "Column Break",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Customer Item Codes",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"oldfieldtype": "Column Break",
|
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0,
|
|
||||||
"width": "50%"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"depends_on": "",
|
|
||||||
"description": "",
|
|
||||||
"fieldname": "customer_items",
|
|
||||||
"fieldtype": "Table",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Customer Items",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Item Customer Detail",
|
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2533,6 +2579,71 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 1,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "customer_details",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Customer Details",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"depends_on": "",
|
||||||
|
"description": "",
|
||||||
|
"fieldname": "customer_items",
|
||||||
|
"fieldtype": "Table",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Customer Items",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Item Customer Detail",
|
||||||
|
"permlevel": 0,
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2564,6 +2675,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2597,6 +2709,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2628,6 +2741,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2661,6 +2775,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2691,6 +2806,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2723,6 +2839,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2755,6 +2872,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2788,6 +2906,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2822,6 +2941,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2851,6 +2971,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2880,6 +3001,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2910,6 +3032,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2940,6 +3063,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -2971,6 +3095,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3002,6 +3127,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3033,6 +3159,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 1,
|
"search_index": 1,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3065,6 +3192,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3097,6 +3225,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3127,6 +3256,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3155,6 +3285,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3187,6 +3318,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3219,6 +3351,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3250,6 +3383,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3280,6 +3414,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3311,6 +3446,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3341,6 +3477,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3371,6 +3508,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3402,6 +3540,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3434,6 +3573,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3465,6 +3605,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3497,6 +3638,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -3528,6 +3670,7 @@
|
|||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -3543,7 +3686,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 1,
|
"max_attachments": 1,
|
||||||
"modified": "2018-02-19 13:48:35.779089",
|
"modified": "2018-03-06 10:21:48.715529",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Item",
|
"name": "Item",
|
||||||
|
|||||||
@ -53,8 +53,8 @@ class Item(WebsiteGenerator):
|
|||||||
template_item_name = frappe.db.get_value("Item", self.variant_of, "item_name")
|
template_item_name = frappe.db.get_value("Item", self.variant_of, "item_name")
|
||||||
self.item_code = make_variant_item_code(self.variant_of, template_item_name, self)
|
self.item_code = make_variant_item_code(self.variant_of, template_item_name, self)
|
||||||
else:
|
else:
|
||||||
from frappe.model.naming import make_autoname
|
from frappe.model.naming import set_name_by_naming_series
|
||||||
self.item_code = make_autoname(self.naming_series + '.#####')
|
set_name_by_naming_series(self)
|
||||||
elif not self.item_code:
|
elif not self.item_code:
|
||||||
msgprint(_("Item Code is mandatory because Item is not automatically numbered"), raise_exception=1)
|
msgprint(_("Item Code is mandatory because Item is not automatically numbered"), raise_exception=1)
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"autoname": "hash",
|
"autoname": "hash",
|
||||||
@ -12,16 +13,20 @@
|
|||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 1,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
"fieldname": "customer_name",
|
"fieldname": "customer_name",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 0,
|
||||||
"label": "Customer Name",
|
"label": "Customer Name",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
@ -33,24 +38,62 @@
|
|||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"print_width": "180px",
|
"print_width": "180px",
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 0,
|
||||||
"search_index": 1,
|
"search_index": 1,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0,
|
"unique": 0,
|
||||||
"width": "180px"
|
"width": "180px"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 1,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"fieldname": "customer_group",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 1,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Customer Group",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"options": "Customer Group",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
"fieldname": "ref_code",
|
"fieldname": "ref_code",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 0,
|
||||||
"label": "Ref Code",
|
"label": "Ref Code",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
@ -61,25 +104,27 @@
|
|||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"print_width": "120px",
|
"print_width": "120px",
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 1,
|
"search_index": 1,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
|
"translatable": 0,
|
||||||
"unique": 0,
|
"unique": 0,
|
||||||
"width": "120px"
|
"width": "120px"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-07-11 03:28:00.992064",
|
"modified": "2018-03-08 14:22:38.019369",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Item Customer Detail",
|
"name": "Item Customer Detail",
|
||||||
@ -88,5 +133,7 @@
|
|||||||
"quick_entry": 0,
|
"quick_entry": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
|
"show_name_in_global_search": 0,
|
||||||
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0
|
||||||
}
|
}
|
||||||
@ -72,6 +72,38 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"default": "",
|
||||||
|
"description": "Rename Attribute Value in Item Attribute.",
|
||||||
|
"fieldname": "allow_rename_attribute_value",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Allow Rename Attribute Value",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
@ -144,7 +176,7 @@
|
|||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-11-14 15:54:12.190518",
|
"modified": "2018-02-19 11:39:54.401128",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Item Variant Settings",
|
"name": "Item Variant Settings",
|
||||||
|
|||||||
@ -32,10 +32,10 @@ class MaterialRequest(BuyingController):
|
|||||||
so_items = {} # Format --> {'SO/00001': {'Item/001': 120, 'Item/002': 24}}
|
so_items = {} # Format --> {'SO/00001': {'Item/001': 120, 'Item/002': 24}}
|
||||||
for d in self.get('items'):
|
for d in self.get('items'):
|
||||||
if d.sales_order:
|
if d.sales_order:
|
||||||
if not so_items.has_key(d.sales_order):
|
if not d.sales_order in so_items:
|
||||||
so_items[d.sales_order] = {d.item_code: flt(d.qty)}
|
so_items[d.sales_order] = {d.item_code: flt(d.qty)}
|
||||||
else:
|
else:
|
||||||
if not so_items[d.sales_order].has_key(d.item_code):
|
if not d.item_code in so_items[d.sales_order]:
|
||||||
so_items[d.sales_order][d.item_code] = flt(d.qty)
|
so_items[d.sales_order][d.item_code] = flt(d.qty)
|
||||||
else:
|
else:
|
||||||
so_items[d.sales_order][d.item_code] += flt(d.qty)
|
so_items[d.sales_order][d.item_code] += flt(d.qty)
|
||||||
|
|||||||
@ -396,8 +396,16 @@ def validate_conversion_rate(args, meta):
|
|||||||
|
|
||||||
def get_party_item_code(args, item_doc, out):
|
def get_party_item_code(args, item_doc, out):
|
||||||
if args.transaction_type=="selling" and args.customer:
|
if args.transaction_type=="selling" and args.customer:
|
||||||
|
out.customer_item_code = None
|
||||||
customer_item_code = item_doc.get("customer_items", {"customer_name": args.customer})
|
customer_item_code = item_doc.get("customer_items", {"customer_name": args.customer})
|
||||||
out.customer_item_code = customer_item_code[0].ref_code if customer_item_code else None
|
|
||||||
|
if customer_item_code:
|
||||||
|
out.customer_item_code = customer_item_code[0].ref_code
|
||||||
|
else:
|
||||||
|
customer_group = frappe.db.get_value("Customer", args.customer, "customer_group")
|
||||||
|
customer_group_item_code = item_doc.get("customer_items", {"customer_group": customer_group})
|
||||||
|
if customer_group_item_code and not customer_group_item_code[0].customer_name:
|
||||||
|
out.customer_item_code = customer_group_item_code[0].ref_code
|
||||||
|
|
||||||
if args.transaction_type=="buying" and args.supplier:
|
if args.transaction_type=="buying" and args.supplier:
|
||||||
item_supplier = item_doc.get("supplier_items", {"supplier": args.supplier})
|
item_supplier = item_doc.get("supplier_items", {"supplier": args.supplier})
|
||||||
|
|||||||
@ -51,7 +51,7 @@ def get_consumed_items(condition):
|
|||||||
sum(se_item.transfer_qty) as 'consume_qty'
|
sum(se_item.transfer_qty) as 'consume_qty'
|
||||||
from `tabStock Entry` se, `tabStock Entry Detail` se_item
|
from `tabStock Entry` se, `tabStock Entry Detail` se_item
|
||||||
where se.name = se_item.parent and se.docstatus = 1
|
where se.name = se_item.parent and se.docstatus = 1
|
||||||
and ifnull(se_item.t_warehouse, '') = '' %s
|
and (ifnull(se_item.t_warehouse, '') = '' or se.purpose = 'Subcontract') %s
|
||||||
group by se_item.item_code""" % (condition), as_dict=1)
|
group by se_item.item_code""" % (condition), as_dict=1)
|
||||||
|
|
||||||
cn_items_map = {}
|
cn_items_map = {}
|
||||||
|
|||||||
@ -43,7 +43,7 @@ def get_stock_value_on(warehouse=None, posting_date=None, item_code=None):
|
|||||||
|
|
||||||
sle_map = {}
|
sle_map = {}
|
||||||
for sle in stock_ledger_entries:
|
for sle in stock_ledger_entries:
|
||||||
if not sle_map.has_key((sle.item_code, sle.warehouse)):
|
if not (sle.item_code, sle.warehouse) in sle_map:
|
||||||
sle_map[(sle.item_code, sle.warehouse)] = flt(sle.stock_value)
|
sle_map[(sle.item_code, sle.warehouse)] = flt(sle.stock_value)
|
||||||
|
|
||||||
return sum(sle_map.values())
|
return sum(sle_map.values())
|
||||||
|
|||||||
@ -9,7 +9,7 @@ class TestInit(unittest.TestCase):
|
|||||||
frappe.flags.country = 'India'
|
frappe.flags.country = 'India'
|
||||||
self.assertEqual(test_method(), 'overridden')
|
self.assertEqual(test_method(), 'overridden')
|
||||||
|
|
||||||
frappe.flags.country = 'Nepal'
|
frappe.flags.country = 'Maldives'
|
||||||
self.assertEqual(test_method(), 'original')
|
self.assertEqual(test_method(), 'original')
|
||||||
|
|
||||||
frappe.flags.country = 'France'
|
frappe.flags.country = 'France'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user