Merge branch 'develop'

This commit is contained in:
Nabin Hait 2016-03-18 16:36:40 +05:30
commit f197d42503
31 changed files with 241 additions and 182 deletions

View File

@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = '6.27.0'
__version__ = '6.27.1'

View File

@ -2472,7 +2472,7 @@
"unique": 0
},
{
"allow_on_submit": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name",
@ -2655,7 +2655,7 @@
"unique": 0
},
{
"allow_on_submit": 1,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "is_recurring",
@ -2673,7 +2673,7 @@
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -2692,7 +2692,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-03-16 15:02:51.511069",
"modified": "2016-03-18 13:13:43.694604",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",

View File

@ -234,8 +234,6 @@ class PurchaseInvoice(BuyingController):
reconcile_against_document(lst)
def on_submit(self):
super(PurchaseInvoice, self).on_submit()
self.check_prev_docstatus()
frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype,

View File

@ -1239,7 +1239,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-03-10 05:05:27.752823",
"modified": "2016-03-18 05:05:27.752823",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",

View File

@ -3171,7 +3171,7 @@
"unique": 0
},
{
"allow_on_submit": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name",
@ -3355,7 +3355,7 @@
"unique": 0
},
{
"allow_on_submit": 1,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "is_recurring",
@ -3373,7 +3373,7 @@
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -3418,7 +3418,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-03-15 19:02:25.882750",
"modified": "2016-03-18 13:12:12.430038",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",

View File

@ -81,8 +81,6 @@ class SalesInvoice(SellingController):
self.update_packing_list()
def on_submit(self):
super(SalesInvoice, self).on_submit()
if cint(self.update_stock) == 1:
self.update_stock_ledger()
else:
@ -473,7 +471,7 @@ class SalesInvoice(SellingController):
frappe.db.set(self,'paid_amount',0)
frappe.db.set(self, 'base_paid_amount',
flt(self.paid_amount*self.conversion_rate, self.precision("base_paid_amount")))
flt(self.paid_amount*self.conversion_rate, self.precision("base_paid_amount")))
def check_prev_docstatus(self):
for d in self.get('items'):

View File

@ -479,7 +479,7 @@ def get_outstanding_invoices(party_type, party, account, condition=None):
return outstanding_invoices
def get_account(account_type=None, root_type=None, is_group=None, account_currency=None, company=None):
def get_account_name(account_type=None, root_type=None, is_group=None, account_currency=None, company=None):
"""return account based on matching conditions"""
return frappe.db.get_value("Account", {
"account_type": account_type or '',

View File

@ -2474,7 +2474,7 @@
"unique": 0
},
{
"allow_on_submit": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name",
@ -2657,7 +2657,7 @@
"unique": 0
},
{
"allow_on_submit": 1,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "is_recurring",
@ -2675,7 +2675,7 @@
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -2693,7 +2693,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-03-16 15:35:21.382861",
"modified": "2016-03-18 13:13:07.334625",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order",

View File

@ -171,8 +171,6 @@ class PurchaseOrder(BuyingController):
if self.is_against_so():
self.update_status_updater()
super(PurchaseOrder, self).on_submit()
purchase_controller = frappe.get_doc("Purchase Common")
self.update_prevdoc_status()

View File

@ -1384,7 +1384,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-03-10 05:08:54.505417",
"modified": "2016-03-18 05:08:54.505417",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order Item",

View File

@ -1046,7 +1046,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-03-10 05:15:03.936587",
"modified": "2016-03-18 05:15:03.936587",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation Item",

View File

@ -42,17 +42,14 @@ class AccountsController(TransactionBase):
if self.doctype in ("Sales Invoice", "Purchase Invoice") and not self.is_return:
self.validate_due_date()
if self.meta.get_field("is_recurring"):
validate_recurring_document(self)
if self.meta.get_field("taxes_and_charges"):
self.validate_enabled_taxes_and_charges()
self.validate_party()
self.validate_currency()
def on_submit(self):
if self.meta.get_field("is_recurring"):
if self.meta.get_field("is_recurring") and not self.get("__islocal"):
validate_recurring_document(self)
convert_to_recurring(self, self.get("posting_date") or self.get("transaction_date"))
def on_update_after_submit(self):

View File

@ -72,7 +72,7 @@ def manage_recurring_documents(doctype, next_date=None, commit=True):
frappe.throw(exception_message)
def make_new_document(reference_doc, date_field, posting_date):
new_document = frappe.copy_doc(reference_doc, ignore_no_copy=True)
new_document = frappe.copy_doc(reference_doc, ignore_no_copy=False)
mcount = month_map[reference_doc.recurring_type]
from_date = get_next_date(reference_doc.from_date, mcount)
@ -89,7 +89,7 @@ def make_new_document(reference_doc, date_field, posting_date):
date_field: posting_date,
"from_date": from_date,
"to_date": to_date,
"next_date": get_next_date(from_date, mcount,cint(reference_doc.repeat_on_day_of_month))
"next_date": get_next_date(reference_doc.next_date, mcount,cint(reference_doc.repeat_on_day_of_month))
})
# copy document fields
@ -108,6 +108,7 @@ def make_new_document(reference_doc, date_field, posting_date):
new_document.run_method("on_recurring", reference_doc=reference_doc)
if reference_doc.submit_on_creation:
new_document.insert()
new_document.submit()
else:
new_document.docstatus=0
@ -160,26 +161,33 @@ def assign_task_to_owner(doc, doctype, msg, users):
def validate_recurring_document(doc):
if doc.is_recurring:
validate_notification_email_id(doc)
if not doc.recurring_id and not doc.is_new():
doc.recurring_id = doc.name
if not doc.recurring_type:
msgprint(_("Please select {0}").format(doc.meta.get_label("recurring_type")),
raise_exception=1)
frappe.throw(_("Please select {0}").format(doc.meta.get_label("recurring_type")))
elif not (doc.from_date and doc.to_date):
throw(_("Period From and Period To dates mandatory for recurring {0}").format(doc.doctype))
frappe.throw(_("Period From and Period To dates mandatory for recurring {0}").format(doc.doctype))
def validate_recurring_next_date(doc):
posting_date = doc.get("posting_date") or doc.get("transaction_date")
if getdate(posting_date) > getdate(doc.next_date):
frappe.throw(_("Next Date must be greater than Posting Date"))
if getdate(doc.next_date).day != doc.repeat_on_day_of_month:
frappe.throw(_("Next Date's day and Repeat on Day of Month must be equal"))
#
def convert_to_recurring(doc, posting_date):
if doc.is_recurring:
set_next_date(doc, posting_date)
if doc.is_recurring:
if not doc.recurring_id:
doc.db_set("recurring_id", doc.name)
elif doc.recurring_id:
frappe.db.sql("""update `tab%s` set is_recurring = 0
where recurring_id = %s""" % (doc.doctype, '%s'), (doc.recurring_id))
#
set_next_date(doc, posting_date)
elif doc.recurring_id:
frappe.db.sql("""update `tab%s` set is_recurring = 0
where recurring_id = %s""" % (doc.doctype, '%s'), (doc.recurring_id))
if doc.next_date:
validate_recurring_next_date(doc)
def validate_notification_email_id(doc):
if doc.notify_by_email:
@ -198,13 +206,12 @@ def validate_notification_email_id(doc):
def set_next_date(doc, posting_date):
""" Set next date on which recurring document will be created"""
if not doc.repeat_on_day_of_month:
msgprint(_("Please enter 'Repeat on Day of Month' field value"), raise_exception=1)
next_date = doc.next_date or get_next_date(doc.from_date, month_map[doc.recurring_type],
next_date = get_next_date(posting_date, month_map[doc.recurring_type],
cint(doc.repeat_on_day_of_month))
frappe.db.set(doc, 'next_date', next_date)
doc.db_set('next_date', next_date)
msgprint(_("Next Recurring {0} will be created on {1}").format(doc.doctype, next_date))

View File

@ -46,6 +46,9 @@ def get_data(filters, conditions):
if conditions["based_on_select"] in ["t1.project,", "t2.project,"]:
cond = 'and '+ conditions["based_on_select"][:-1] +' IS Not NULL'
year_start_date, year_end_date = frappe.db.get_value("Fiscal Year",
filters.get('fiscal_year'), ["year_start_date", "year_end_date"])
if filters.get("group_by"):
sel_col = ''
ind = conditions["columns"].index(conditions["grbc"][0])
@ -62,12 +65,12 @@ def get_data(filters, conditions):
else :
inc = 1
data1 = frappe.db.sql(""" select %s from `tab%s` t1, `tab%s Item` t2 %s
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s and
where t2.parent = t1.name and t1.company = %s and t1.posting_date >= %s and %s >= t1.posting_date and
t1.docstatus = 1 %s %s
group by %s
""" % (query_details, conditions["trans"], conditions["trans"], conditions["addl_tables"], "%s",
"%s", conditions.get("addl_tables_relational_cond"), cond, conditions["group_by"]), (filters.get("company"),
filters["fiscal_year"]),as_list=1)
"%s", "%s", conditions.get("addl_tables_relational_cond"), cond, conditions["group_by"]), (filters.get("company"),
year_start_date, year_end_date),as_list=1)
for d in range(len(data1)):
#to add blanck column
@ -77,25 +80,25 @@ def get_data(filters, conditions):
#to get distinct value of col specified by group_by in filter
row = frappe.db.sql("""select DISTINCT(%s) from `tab%s` t1, `tab%s Item` t2 %s
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s
where t2.parent = t1.name and t1.company = %s and t1.posting_date >= %s and %s >= t1.posting_date
and t1.docstatus = 1 and %s = %s %s
""" %
(sel_col, conditions["trans"], conditions["trans"], conditions["addl_tables"],
"%s", "%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond")),
(filters.get("company"), filters.get("fiscal_year"), data1[d][0]), as_list=1)
"%s", "%s", "%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond")),
(filters.get("company"), year_start_date, year_end_date, data1[d][0]), as_list=1)
for i in range(len(row)):
des = ['' for q in range(len(conditions["columns"]))]
#get data for group_by filter
row1 = frappe.db.sql(""" select %s , %s from `tab%s` t1, `tab%s Item` t2 %s
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s
where t2.parent = t1.name and t1.company = %s and t1.posting_date >= %s and %s >= t1.posting_date
and t1.docstatus = 1 and %s = %s and %s = %s %s
""" %
(sel_col, conditions["period_wise_select"], conditions["trans"],
conditions["trans"], conditions["addl_tables"], "%s", "%s", sel_col,
conditions["trans"], conditions["addl_tables"], "%s", "%s","%s", sel_col,
"%s", conditions["group_by"], "%s", conditions.get("addl_tables_relational_cond")),
(filters.get("company"), filters.get("fiscal_year"), row[i][0],
(filters.get("company"), year_start_date, year_end_date, row[i][0],
data1[d][0]), as_list=1)
des[ind] = row[i][0]
@ -106,13 +109,13 @@ def get_data(filters, conditions):
data.append(des)
else:
data = frappe.db.sql(""" select %s from `tab%s` t1, `tab%s Item` t2 %s
where t2.parent = t1.name and t1.company = %s and t1.fiscal_year = %s and
where t2.parent = t1.name and t1.company = %s and t1.posting_date >= %s and %s >= t1.posting_date and
t1.docstatus = 1 %s %s
group by %s
""" %
(query_details, conditions["trans"], conditions["trans"], conditions["addl_tables"],
"%s", "%s", cond, conditions.get("addl_tables_relational_cond", ""), conditions["group_by"]),
(filters.get("company"), filters.get("fiscal_year")), as_list=1)
"%s", "%s", "%s", cond, conditions.get("addl_tables_relational_cond", ""), conditions["group_by"]),
(filters.get("company"), year_start_date, year_end_date), as_list=1)
return data

View File

@ -7,7 +7,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd."
app_description = """ERP made simple"""
app_icon = "icon-th"
app_color = "#e74c3c"
app_version = "6.27.0"
app_version = "6.27.1"
app_email = "info@erpnext.com"
app_license = "GNU General Public License (v3)"
source_link = "https://github.com/frappe/erpnext"

View File

@ -2,6 +2,7 @@
// License: GNU General Public License v3. See license.txt
cur_frm.add_fetch('employee', 'company', 'company');
cur_frm.add_fetch('company', 'default_letter_head', 'letter_head');
// On load
// -------------------------------------------------------------------

View File

@ -16,6 +16,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@ -40,6 +41,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Employee",
@ -66,6 +68,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Employee Name",
@ -91,6 +94,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Department",
@ -117,6 +121,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Designation",
@ -143,6 +148,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Branch",
@ -161,6 +167,31 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 1,
"bold": 0,
@ -169,6 +200,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Letter Head",
@ -185,30 +217,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@ -217,6 +225,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@ -241,6 +250,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Month",
@ -268,6 +278,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Fiscal Year",
@ -294,6 +305,7 @@
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Working Days",
@ -319,6 +331,7 @@
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Leave Without Pay",
@ -344,6 +357,7 @@
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Payment Days",
@ -369,6 +383,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Bank Name",
@ -394,6 +409,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Bank Account No.",
@ -419,6 +435,7 @@
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Email",
@ -444,6 +461,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 1,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Amended From",
@ -470,6 +488,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Earning & Deduction",
@ -494,6 +513,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Earning",
@ -519,6 +539,7 @@
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Earnings",
@ -545,6 +566,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Deduction",
@ -570,6 +592,7 @@
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Deductions",
@ -596,6 +619,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "",
@ -620,6 +644,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@ -642,6 +667,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@ -664,6 +690,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Arrear Amount",
@ -690,6 +717,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Leave Encashment Amount",
@ -716,6 +744,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Gross Pay",
@ -742,6 +771,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Total Deduction",
@ -769,6 +799,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Net Pay",
@ -795,6 +826,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Rounded Total",
@ -820,6 +852,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Total in words",
@ -848,7 +881,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-02-03 01:17:01.042780",
"modified": "2016-03-18 16:02:55.254165",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Slip",

View File

@ -2,6 +2,7 @@
// License: GNU General Public License v3. See license.txt
cur_frm.add_fetch('employee', 'company', 'company');
cur_frm.add_fetch('company', 'default_letter_head', 'letter_head');
cur_frm.cscript.onload = function(doc, dt, dn){
e_tbl = doc.earnings || [];

View File

@ -16,6 +16,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@ -39,6 +40,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Employee",
@ -65,6 +67,7 @@
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Employee Name",
@ -90,6 +93,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Branch",
@ -116,6 +120,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Designation",
@ -142,6 +147,7 @@
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Department",
@ -160,6 +166,57 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "letter_head",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Letter Head",
"length": 0,
"no_copy": 0,
"options": "Letter Head",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@ -168,6 +225,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@ -192,6 +250,7 @@
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Is Active",
@ -218,6 +277,7 @@
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "From Date",
@ -243,6 +303,7 @@
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "To Date",
@ -260,30 +321,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "company",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@ -293,6 +330,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Monthly Earning & Deduction",
@ -318,6 +356,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Earning",
@ -344,6 +383,7 @@
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Earnings",
@ -370,6 +410,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Deduction",
@ -396,6 +437,7 @@
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Deductions",
@ -422,6 +464,7 @@
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@ -445,6 +488,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@ -468,6 +512,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Total Earning",
@ -494,6 +539,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Total Deduction",
@ -520,6 +566,7 @@
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
@ -543,6 +590,7 @@
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Net Pay",
@ -570,7 +618,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-02-03 01:18:16.629324",
"modified": "2016-03-18 16:10:30.031811",
"modified_by": "Administrator",
"module": "HR",
"name": "Salary Structure",

View File

@ -807,7 +807,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-03-10 05:09:50.749754",
"modified": "2016-03-18 05:09:50.749754",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "BOM",

View File

@ -1036,7 +1036,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-03-10 05:10:07.951138",
"modified": "2016-03-18 05:10:07.951138",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Production Order",

View File

@ -12,6 +12,6 @@ def execute():
"Purchase Receipt Item", "Supplier Quotation Item"]
for doctype in doc_list:
frappe.reload_doctype(doctype, force=True)
frappe.reload_doctype(doctype)
rename_field(doctype, "project_name", "project")

View File

@ -308,7 +308,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
if (this.frm.doc.posting_date) var date = this.frm.doc.posting_date;
else var date = this.frm.doc.transaction_date;
erpnext.get_fiscal_year(this.frm.doc.company, date, function() { set_party_account(set_pricing); });
set_party_account(set_pricing);
if(this.frm.doc.company) {
erpnext.last_selected_company = this.frm.doc.company;
@ -319,8 +319,6 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
if (this.frm.doc.transaction_date) {
this.frm.transaction_date = this.frm.doc.transaction_date;
}
erpnext.get_fiscal_year(this.frm.doc.company, this.frm.doc.transaction_date);
},
posting_date: function() {
@ -342,11 +340,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
if(r.message) {
me.frm.set_value("due_date", r.message);
}
erpnext.get_fiscal_year(me.frm.doc.company, me.frm.doc.posting_date);
}
})
} else {
erpnext.get_fiscal_year(me.frm.doc.company, me.frm.doc.posting_date);
}
}
},

View File

@ -13,24 +13,6 @@ $.extend(erpnext, {
return frappe.boot.sysdefaults.currency;
},
get_fiscal_year: function(company, date, fn) {
if(frappe.meta.get_docfield(cur_frm.doctype, "fiscal_year")) {
frappe.call({
type:"GET",
method: "erpnext.accounts.utils.get_fiscal_year",
args: {
"company": company,
"date": date,
"verbose": 0
},
callback: function(r) {
if (r.message) cur_frm.set_value("fiscal_year", r.message[0]);
if (fn) fn();
}
});
}
},
toggle_naming_series: function() {
if(cur_frm.fields_dict.naming_series) {
cur_frm.toggle_display("naming_series", cur_frm.doc.__islocal?true:false);

View File

@ -2799,7 +2799,7 @@
"unique": 0
},
{
"allow_on_submit": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"depends_on": "eval:doc.is_recurring && doc.recurring_id === doc.name",
@ -2929,32 +2929,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"depends_on": "is_recurring",
"description": "",
"fieldname": "to_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "To Date",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 1,
"bold": 0,
@ -2987,6 +2961,32 @@
"collapsible": 0,
"depends_on": "is_recurring",
"description": "",
"fieldname": "to_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "To Date",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"depends_on": "is_recurring",
"description": "",
"fieldname": "next_date",
"fieldtype": "Date",
"hidden": 0,
@ -3000,7 +3000,7 @@
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
@ -3018,7 +3018,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-03-14 18:36:19.317513",
"modified": "2016-03-18 13:11:32.654873",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order",

View File

@ -150,8 +150,6 @@ class SalesOrder(SellingController):
frappe.throw(_("Row #{0}: Set Supplier for item {1}").format(d.idx, d.item_code))
def on_submit(self):
super(SalesOrder, self).on_submit()
self.check_credit_limit()
self.update_reserved_qty()

View File

@ -9,7 +9,7 @@ from frappe.utils import cint, flt, get_fullname, cstr
from erpnext.utilities.doctype.address.address import get_address_display
from erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings import get_shopping_cart_settings
from frappe.utils.nestedset import get_root_of
from erpnext.accounts.utils import get_account
from erpnext.accounts.utils import get_account_name
class WebsitePriceListMissingError(frappe.ValidationError): pass
@ -305,7 +305,7 @@ def get_customer(user=None):
customer.update({
"accounts": [{
"company": cart_settings.company,
"account": debtors_account.name
"account": debtors_account
}]
})
@ -329,24 +329,24 @@ def get_debtors_account(cart_settings):
account_name = _("Debtors ({0})".format(payment_gateway_account_currency))
debtors_account = get_account("Receivable", "Asset", is_group=0,\
account_currency=payment_gateway_account_currency, company=cart_settings.company)
debtors_account_name = get_account_name("Receivable", "Asset", is_group=0,\
account_currency=payment_gateway_account_currency, company=cart_settings.company)
if not debtors_account:
if not debtors_account_name:
debtors_account = frappe.get_doc({
"doctype": "Account",
"account_type": "Receivable",
"root_type": "Asset",
"is_group": 0,
"parent_account": get_account(root_type="Asset", is_group=1, company=cart_settings.company),
"parent_account": get_account_name(root_type="Asset", is_group=1, company=cart_settings.company),
"account_name": account_name,
"currency": payment_gateway_account_currency
}).insert(ignore_permissions=True)
return debtors_account
return debtors_account.name
else:
return debtors_account
return debtors_account_name
def get_address_docs(doctype=None, txt=None, filters=None, limit_start=0, limit_page_length=20, party=None):

View File

@ -2799,7 +2799,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-03-10 05:10:56.813113",
"modified": "2016-03-18 05:10:56.813113",
"modified_by": "Administrator",
"module": "Stock",
"name": "Delivery Note",

View File

@ -1715,7 +1715,7 @@
"issingle": 0,
"istable": 1,
"max_attachments": 0,
"modified": "2016-03-10 05:11:15.937267",
"modified": "2016-03-18 05:11:15.937267",
"modified_by": "Administrator",
"module": "Stock",
"name": "Purchase Receipt Item",

View File

@ -1431,7 +1431,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-03-07 08:37:08.747493",
"modified": "2016-03-18 08:37:08.747493",
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Entry",

View File

@ -1,7 +1,7 @@
from setuptools import setup, find_packages
from pip.req import parse_requirements
version = "6.27.0"
version = "6.27.1"
requirements = parse_requirements("requirements.txt", session="")
setup(