sales person fix
This commit is contained in:
parent
d958262761
commit
1b6d158f27
@ -5,14 +5,13 @@ from webnotes.model.doc import Document
|
||||
from webnotes.model.doclist import getlist
|
||||
from webnotes.model.code import get_obj
|
||||
from webnotes import session, form, is_testing, msgprint, errprint
|
||||
|
||||
from webnotes.utils import flt
|
||||
|
||||
sql = webnotes.conn.sql
|
||||
convert_to_lists = webnotes.conn.convert_to_lists
|
||||
|
||||
# -----------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
class DocType:
|
||||
def __init__(self, doc, doclist=[]):
|
||||
self.doc = doc
|
||||
@ -37,7 +36,6 @@ class DocType:
|
||||
|
||||
|
||||
def validate(self):
|
||||
from webnotes.utils import flt
|
||||
for d in getlist(self.doclist, 'target_details'):
|
||||
if not flt(d.target_qty) and not flt(d.target_amount):
|
||||
msgprint("Either target qty or target amount is mandatory.")
|
||||
@ -64,5 +62,3 @@ class DocType:
|
||||
d.is_sales_person = 1
|
||||
|
||||
d.save(new = (not d.name))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user