Example #1
0
	def validate(self):
		self.set_status()
		self.validate_item_details()
		self.validate_uom_is_integer("uom", "qty")
		self.validate_lead_cust()
		
		from accounts.utils import validate_fiscal_year
		validate_fiscal_year(self.doc.transaction_date, self.doc.fiscal_year, "Opportunity Date")
Example #2
0
    def validate(self):
        self.set_status()
        self.validate_item_details()
        self.validate_uom_is_integer("uom", "qty")
        self.validate_lead_cust()

        from accounts.utils import validate_fiscal_year
        validate_fiscal_year(self.doc.transaction_date, self.doc.fiscal_year,
                             "Opportunity Date")
Example #3
0
	def validate(self):
		dates = []
		for d in self.doclist.get({"doctype":"Leave Block List Date"}):
			# validate fiscal year
			validate_fiscal_year(d.block_date, self.doc.year, _("Block Date"))
			
			# date is not repeated
			if d.block_date in dates:
				webnotes.msgprint(_("Date is repeated") + ":" + d.block_date, raise_exception=1)
			dates.append(d.block_date)
Example #4
0
	def validate(self):
		from stock.utils import validate_warehouse_user, validate_warehouse_company
		self.validate_mandatory()
		self.validate_item()
		validate_warehouse_user(self.doc.warehouse)
		validate_warehouse_company(self.doc.warehouse, self.doc.company)
		self.scrub_posting_time()
		
		from accounts.utils import validate_fiscal_year
		validate_fiscal_year(self.doc.posting_date, self.doc.fiscal_year, self.meta.get_label("posting_date"))
	def validate(self):
		dates = []
		for d in self.doclist.get({"doctype":"Leave Block List Date"}):
			# validate fiscal year
			validate_fiscal_year(d.block_date, self.doc.year, _("Block Date"))
			
			# date is not repeated
			if d.block_date in dates:
				webnotes.msgprint(_("Date is repeated") + ":" + d.block_date, raise_exception=1)
			dates.append(d.block_date)
Example #6
0
	def validate(self):
		self.set_last_contact_date()
		self.validate_item_details()
		self.validate_lead_cust()
		
		from accounts.utils import validate_fiscal_year
		validate_fiscal_year(self.doc.transaction_date, self.doc.fiscal_year, "Opportunity Date")
		
		if not self.doc.status:
			self.doc.status = "Draft"
Example #7
0
	def validate(self):
		from stock.utils import validate_warehouse_user, validate_warehouse_company
		self.validate_mandatory()
		self.validate_item()
		validate_warehouse_user(self.doc.warehouse)
		validate_warehouse_company(self.doc.warehouse, self.doc.company)
		self.scrub_posting_time()

		from accounts.utils import validate_fiscal_year
		validate_fiscal_year(self.doc.posting_date, self.doc.fiscal_year, self.meta.get_label("posting_date"))
Example #8
0
	def validate(self):
		self.validate_mandatory()
		self.validate_item()
		self.validate_warehouse_user()
		self.validate_warehouse_company()
		self.actual_amt_check()
		self.check_stock_frozen_date()
		self.scrub_posting_time()
		
		from accounts.utils import validate_fiscal_year
		validate_fiscal_year(self.doc.posting_date, self.doc.fiscal_year, self.meta.get_label("posting_date"))
Example #9
0
	def validate_date_with_fiscal_year(self):
		if self.meta.get_field("fiscal_year") :
			date_field = ""
			if self.meta.get_field("posting_date"):
				date_field = "posting_date"
			elif self.meta.get_field("transaction_date"):
				date_field = "transaction_date"
				
			if date_field and self.doc.fields[date_field]:
				validate_fiscal_year(self.doc.fields[date_field], self.doc.fiscal_year, 
					label=self.meta.get_label(date_field))
Example #10
0
	def validate_date_with_fiscal_year(self):
		if self.meta.get_field("fiscal_year") :
			date_field = ""
			if self.meta.get_field("posting_date"):
				date_field = "posting_date"
			elif self.meta.get_field("transaction_date"):
				date_field = "transaction_date"
				
			if date_field and self.doc.fields[date_field]:
				validate_fiscal_year(self.doc.fields[date_field], self.doc.fiscal_year, 
					label=self.meta.get_label(date_field))
Example #11
0
    def validate(self):
        self.validate_mandatory()
        self.validate_item()
        self.validate_warehouse_user()
        self.validate_warehouse_company()
        self.actual_amt_check()
        self.check_stock_frozen_date()
        self.scrub_posting_time()

        from accounts.utils import validate_fiscal_year
        validate_fiscal_year(self.doc.posting_date, self.doc.fiscal_year,
                             self.meta.get_label("posting_date"))
Example #12
0
	def validate(self):
		from stock.utils import validate_warehouse_user
		if not hasattr(webnotes, "new_stock_ledger_entries"):
			webnotes.new_stock_ledger_entries = []
			
		webnotes.new_stock_ledger_entries.append(self.doc)
		self.validate_mandatory()
		self.validate_item()
		validate_warehouse_user(self.doc.warehouse)
		self.validate_warehouse_company()
		self.scrub_posting_time()
		
		from accounts.utils import validate_fiscal_year
		validate_fiscal_year(self.doc.posting_date, self.doc.fiscal_year, self.meta.get_label("posting_date"))
Example #13
0
	def validate(self):
		if not hasattr(webnotes, "new_stock_ledger_entries"):
			webnotes.new_stock_ledger_entries = []
		webnotes.new_stock_ledger_entries.append(self.doc)
		self.validate_mandatory()
		self.validate_item()
		self.validate_warehouse_user()
		self.validate_warehouse_company()
		self.actual_amt_check()
		self.check_stock_frozen_date()
		self.scrub_posting_time()
		
		from accounts.utils import validate_fiscal_year
		validate_fiscal_year(self.doc.posting_date, self.doc.fiscal_year, self.meta.get_label("posting_date"))
Example #14
0
 def validate_posting_date(self):
     from accounts.utils import validate_fiscal_year
     validate_fiscal_year(self.doc.posting_date, self.doc.fiscal_year,
                          "Posting Date")
Example #15
0
	def validate_posting_date(self):
		from accounts.utils import validate_fiscal_year
		validate_fiscal_year(self.doc.posting_date, self.doc.fiscal_year, "Posting Date")
Example #16
0
	def validate_fiscal_year(self):
		from accounts.utils import validate_fiscal_year
		validate_fiscal_year(self.doc.inst_date, self.doc.fiscal_year, "Installation Date")
Example #17
0
 def validate_fiscal_year(self):
     from accounts.utils import validate_fiscal_year
     validate_fiscal_year(self.doc.att_date, self.doc.fiscal_year)
 def validate_fiscal_year(self):
     from accounts.utils import validate_fiscal_year
     validate_fiscal_year(self.doc.inst_date, self.doc.fiscal_year,
                          "Installation Date")
Example #19
0
	def validate_fiscal_year(self):
		from accounts.utils import validate_fiscal_year
		validate_fiscal_year(self.doc.att_date, self.doc.fiscal_year)