mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 06:59:20 +00:00
[minor] repost future gl entries only for current voucher items
This commit is contained in:
@@ -40,8 +40,7 @@ class DocType(TransactionBase):
|
||||
|
||||
def validate_values(self):
|
||||
if webnotes.defaults.get_global_default('cust_master_name') == 'Naming Series' and not self.doc.naming_series:
|
||||
msgprint("Series is Mandatory.")
|
||||
raise Exception
|
||||
webnotes.throw("Series is Mandatory.", webnotes.MandatoryError)
|
||||
|
||||
def validate(self):
|
||||
self.validate_values()
|
||||
|
||||
@@ -14,12 +14,12 @@ erpnext.LeadController = wn.ui.form.Controller.extend({
|
||||
onload: function() {
|
||||
if(cur_frm.fields_dict.lead_owner.df.options.match(/^Profile/)) {
|
||||
cur_frm.fields_dict.lead_owner.get_query = function(doc,cdt,cdn) {
|
||||
return { query:"controllers.queries.profile_query" } }
|
||||
return { query:"core.doctype.profile.profile.profile_query" } }
|
||||
}
|
||||
|
||||
if(cur_frm.fields_dict.contact_by.df.options.match(/^Profile/)) {
|
||||
cur_frm.fields_dict.contact_by.get_query = function(doc,cdt,cdn) {
|
||||
return { query:"controllers.queries.profile_query" } }
|
||||
return { query:"core.doctype.profile.profile.profile_query" } }
|
||||
}
|
||||
|
||||
if(in_list(user_roles,'System Manager')) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import webnotes
|
||||
from webnotes.utils import cstr, getdate
|
||||
from webnotes.model.bean import getlist
|
||||
from webnotes.model.code import get_obj
|
||||
from webnotes import msgprint
|
||||
from webnotes import _, msgprint
|
||||
|
||||
sql = webnotes.conn.sql
|
||||
|
||||
@@ -278,3 +278,7 @@ def _make_customer(source_name, ignore_permissions=False):
|
||||
return customer
|
||||
else:
|
||||
raise e
|
||||
except webnotes.MandatoryError:
|
||||
from webnotes.utils import get_url_to_form
|
||||
webnotes.throw(_("Before proceeding, please create Customer from Lead") + \
|
||||
(" - %s" % get_url_to_form("Lead", lead_name)))
|
||||
|
||||
@@ -161,7 +161,7 @@ def _get_item_discount(item_group, customer):
|
||||
FROM `tabItem Group` AS node, `tabItem Group` AS parent
|
||||
WHERE parent.lft <= node.lft and parent.rgt >= node.rgt and node.name = %s
|
||||
GROUP BY parent.name
|
||||
ORDER BY parent.lft desc""", item_group)]
|
||||
ORDER BY parent.lft desc""", (item_group,))]
|
||||
|
||||
discount = 0
|
||||
for d in parent_item_groups:
|
||||
|
||||
Reference in New Issue
Block a user