• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python utils.cint函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中webnotes.utils.cint函数的典型用法代码示例。如果您正苦于以下问题:Python cint函数的具体用法?Python cint怎么用?Python cint使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了cint函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: get_current_tax_fraction

	def get_current_tax_fraction(self, tax, item_tax_map):
		"""
			Get tax fraction for calculating tax exclusive amount
			from tax inclusive amount
		"""
		current_tax_fraction = 0
		
		if cint(tax.included_in_print_rate):
			tax_rate = self._get_tax_rate(tax, item_tax_map)
			
			if tax.charge_type == "On Net Total":
				current_tax_fraction = tax_rate / 100.0
			
			elif tax.charge_type == "On Previous Row Amount":
				current_tax_fraction = (tax_rate / 100.0) * \
					self.tax_doclist[cint(tax.row_id) - 1]\
						.tax_fraction_for_current_item
			
			elif tax.charge_type == "On Previous Row Total":
				current_tax_fraction = (tax_rate / 100.0) * \
					self.tax_doclist[cint(tax.row_id) - 1]\
						.grand_total_fraction_for_current_item
						
			# print tax.account_head, tax_rate, current_tax_fraction

		return current_tax_fraction
开发者ID:AminfiBerlin,项目名称:erpnext,代码行数:26,代码来源:tax_controller.py


示例2: cal_tax

	def cal_tax(self, ocd, prd, rate, net_total, oc):
		""" Calculates tax amount for one item"""
		tax_amount = 0
		if ocd[oc].charge_type == 'Actual':
			tax_amount = flt(rate) * flt(prd.amount) / flt(net_total)
		elif ocd[oc].charge_type == 'On Net Total':
			tax_amount = flt(rate) * flt(prd.amount) / 100		
		elif ocd[oc].charge_type == 'On Previous Row Amount':			
			row_no = cstr(ocd[oc].row_id)
			row = row_no.split("+")
			for r in range(0, len(row)):
				id = cint(row[r])
				tax_amount += flt((flt(rate) * flt(ocd[id-1].total_amount) / 100))
			row_id = row_no.find("/")
			if row_id != -1:
				rate = ''
				row = (row_no).split("/")				
				id1 = cint(row[0])
				id2 = cint(row[1])
				tax_amount = flt(flt(ocd[id1-1].total_amount) / flt(ocd[id2-1].total_amount))
		elif ocd[oc].charge_type == 'On Previous Row Total':
			row = cint(ocd[oc].row_id)
			if ocd[row-1].add_deduct_tax == 'Add':
			  tax_amount = flt(rate) * (flt(ocd[row-1].total_tax_amount)+flt(ocd[row-1].total_amount)) / 100
			elif ocd[row-1].add_deduct_tax == 'Deduct':
			  tax_amount = flt(rate) * (flt(ocd[row-1].total_tax_amount)-flt(ocd[row-1].total_amount)) / 100
		
		return tax_amount  
开发者ID:trycatcher,项目名称:erpnext,代码行数:28,代码来源:landed_cost_wizard.py


示例3: on_update

	def on_update(self):
		# Set default warehouse from pos setting
		if cint(self.doc.is_pos) == 1:
			if cint(self.doc.update_stock) == 1:
				w = self.get_warehouse()
				if w:
					for d in getlist(self.doclist, 'entries'):
						if not d.warehouse:
							d.warehouse = cstr(w)
							
				self.make_packing_list()
			else:
				self.doclist = self.doc.clear_table(self.doclist, 'packing_details')

			if flt(self.doc.paid_amount) == 0:
				if self.doc.cash_bank_account: 
					webnotes.conn.set(self.doc, 'paid_amount', 
						(flt(self.doc.grand_total) - flt(self.doc.write_off_amount)))
				else:
					# show message that the amount is not paid
					webnotes.conn.set(self.doc,'paid_amount',0)
					webnotes.msgprint("Note: Payment Entry will not be created since 'Cash/Bank Account' was not specified.")

		else:
			self.doclist = self.doc.clear_table(self.doclist, 'packing_details')
			webnotes.conn.set(self.doc,'paid_amount',0)

		webnotes.conn.set(self.doc, 'outstanding_amount', 
			flt(self.doc.grand_total) - flt(self.doc.total_advance) - 
			flt(self.doc.paid_amount) - flt(self.doc.write_off_amount))
开发者ID:masums,项目名称:erpnext,代码行数:30,代码来源:sales_invoice.py


示例4: __init__

	def __init__(self, login=None, password=None, server=None, port=None, use_ssl=None):
		import webnotes.model.doc
		from webnotes.utils import cint

		# get defaults from control panel
		es = webnotes.model.doc.Document('Email Settings','Email Settings')
		
		self._sess = None
		if server:
			self.server = server
			self.port = port
			self.use_ssl = cint(use_ssl)
			self.login = login
			self.password = password
		elif es.outgoing_mail_server:
			self.server = es.outgoing_mail_server
			self.port = es.mail_port
			self.use_ssl = cint(es.use_ssl)
			self.login = es.mail_login
			self.password = es.mail_password
		else:
			self.server = getattr(conf, "mail_server", "")
			self.port = getattr(conf, "mail_port", None)
			self.use_ssl = cint(getattr(conf, "use_ssl", 0))
			self.login = getattr(conf, "mail_login", "")
			self.password = getattr(conf, "mail_password", "")
开发者ID:appost,项目名称:wnframework,代码行数:26,代码来源:smtp.py


示例5: validate

	def validate(self):
		super(DocType, self).validate()
		self.validate_posting_time()
		self.so_dn_required()
		self.validate_proj_cust()
		self.validate_with_previous_doc()
		self.validate_uom_is_integer("stock_uom", "qty")
		self.check_stop_sales_order("sales_order")
		self.validate_customer_account()
		self.validate_debit_acc()
		self.validate_fixed_asset_account()
		self.clear_unallocated_advances("Sales Invoice Advance", "advance_adjustment_details")
		self.add_remarks()

		if cint(self.doc.is_pos):
			self.validate_pos()
			self.validate_write_off_account()

		if cint(self.doc.update_stock):
			self.validate_item_code()
			self.update_current_stock()
			self.validate_delivery_note()

		if not self.doc.is_opening:
			self.doc.is_opening = 'No'

		self.set_aging_date()
		self.set_against_income_account()
		self.validate_c_form()
		self.validate_time_logs_are_submitted()
		self.validate_recurring_invoice()
		self.validate_multiple_billing("Delivery Note", "dn_detail", "export_amount", 
			"delivery_note_details")
开发者ID:saurabh6790,项目名称:alert-med-app,代码行数:33,代码来源:sales_invoice.py


示例6: get_details_for_packing

	def get_details_for_packing(self):
		"""
			Returns
			* 'Delivery Note Items' query result as a list of dict
			* Item Quantity dict of current packing slip doc
			* No. of Cases of this packing slip
		"""
		item_codes = ", ".join([('"' + d.item_code + '"') for d in
			self.doclist])
		
		items = [d.item_code for d in self.doclist.get({"parentfield": "item_details"})]
		
		if not item_codes: webnotes.msgprint("No Items to Pack",
				raise_exception=1)
		
		# gets item code, qty per item code, latest packed qty per item code and stock uom
		res = webnotes.conn.sql("""select item_code, ifnull(sum(qty), 0) as qty,
			(select sum(ifnull(psi.qty, 0) * (abs(ps.to_case_no - ps.from_case_no) + 1))
				from `tabPacking Slip` ps, `tabPacking Slip Item` psi
				where ps.name = psi.parent and ps.docstatus = 1
				and ps.delivery_note = dni.parent and psi.item_code=dni.item_code)
					as packed_qty,
			stock_uom
			from `tabDelivery Note Item` dni
			where parent=%s and item_code in (%s)
			group by item_code""" % ("%s", ", ".join(["%s"]*len(items))),
			tuple([self.doc.delivery_note] + items), as_dict=1)
			
		ps_item_qty = dict([[d.item_code, d.qty] for d in self.doclist])

		no_of_cases = cint(self.doc.to_case_no) - cint(self.doc.from_case_no) + 1

		return res, ps_item_qty, no_of_cases
开发者ID:PhamThoTam,项目名称:erpnext,代码行数:33,代码来源:packing_slip.py


示例7: get_leave_details

	def get_leave_details(self, lwp=None):
		if not self.doc.fiscal_year:
			self.doc.fiscal_year = webnotes.get_default("fiscal_year")
		if not self.doc.month:
			self.doc.month = "%02d" % getdate(nowdate()).month
			
		m = get_obj('Salary Manager').get_month_details(self.doc.fiscal_year, self.doc.month)
		holidays = self.get_holidays_for_employee(m)
		
		if not cint(webnotes.conn.get_value("HR Settings", "HR Settings",
			"include_holidays_in_total_working_days")):
				m["month_days"] -= len(holidays)
				if m["month_days"] < 0:
					msgprint(_("Bummer! There are more holidays than working days this month."),
						raise_exception=True)
			
		if not lwp:
			lwp = self.calculate_lwp(holidays, m)
		self.doc.total_days_in_month = m['month_days']
		self.doc.leave_without_pay = lwp
		payment_days = flt(self.get_payment_days(m)) - flt(lwp)
		self.doc.payment_days = payment_days > 0 and payment_days or 0
		
		ss="select DATEDIFF(NOW(),(select date_of_joining from tabEmployee where name='"+self.doc.employee+"'))/365 from tabEmployee where name='"+self.doc.employee+"' and status='Left' and DATEDIFF(CURDATE(), (select relieving_date from tabEmployee where name='"+self.doc.employee+"')) <=31  and DATEDIFF(NOW(),(select date_of_joining from tabEmployee where name='"+self.doc.employee+"'))/365 >5"
		# webnotes.errprint(ss)
		res=webnotes.conn.sql(ss)
		# webnotes.errprint(res)
		if res:
                    lst_sal_qry="select net_pay from `tabSalary Slip` where employee='"+self.doc.employee+"' order by creation desc limit 1"
		    # webnotes.errprint(lst_sal_qry)
		    lst_sal=webnotes.conn.sql(lst_sal_qry)
		    grp_amt=(cint(lst_sal[0][0])* cint(res[0][0]))/27
		    # webnotes.errprint(grp_amt)
		    self.doc.grauity_amount=grp_amt		
开发者ID:Tejal011089,项目名称:med2-app,代码行数:34,代码来源:salary_slip.py


示例8: get_children

	def get_children(self, arg='', only_type='', in_roles=[]):

		type_cond = only_type and (" and menu_item_type='%s'" % only_type) or ''
		
		import webnotes
		roles = webnotes.user.get_roles()
		all_read = webnotes.user.can_get_report
			
		cl = sql("select name, menu_item_label, menu_item_type, link_id, link_content, has_children, icon, `order`, criteria_name, doctype_fields, onload from `tabMenu Item` where ifnull(disabled,'No')!='Yes' and ifnull(parent_menu_item,'')='%s' %s order by `order` asc" % (arg, type_cond), as_dict=1)
		ol = []
		for c in cl:
			c['has_children'] = cint(c['has_children'])
			c['order'] = cint(c['order'])
			for k in c.keys(): 
				if c[k]==None: c[k] = ''

			# check permission
			if c['menu_item_type'] in ('DocType','Single','Report'):
				if c['link_id'] in all_read:
					ol.append(c)
			elif c['menu_item_type']=='Page':
				# page
				if c['link_id'].startswith('_'):
					ol.append(c)
				elif has_common([r[0] for r in sql("select role from `tabPage Role` where parent=%s", c['link_id'])], roles):
					ol.append(c)
			elif cstr(c['menu_item_type'])=='':
				# sections
				if has_common([r[0] for r in sql("select role from `tabMenu Item Role` where parent=%s", c['name'])], roles):
					ol.append(c)
			else:
				ol.append(c)
		
		return ol
开发者ID:Morphnus-IT-Solutions,项目名称:trimos,代码行数:34,代码来源:menu_control.py


示例9: prepare

	def prepare(self):
		if not self.doc.font_size:
			self.doc.font_size = '13px'
			
		self.doc.small_font_size = cstr(cint(self.doc.font_size[:-2])-2) + 'px'
		self.doc.page_border = cint(self.doc.page_border)
		
		fonts = []
		if self.doc.google_web_font_for_heading:
			fonts.append(self.doc.google_web_font_for_heading)
		if self.doc.google_web_font_for_text:
			fonts.append(self.doc.google_web_font_for_text)
			
		fonts = list(set(fonts))
		
		if self.doc.heading_text_as:
			self.doc.heading_text_style = {
				"UPPERCASE": "uppercase",
				"Title Case":"capitalize",
				"lowercase": "lowercase"
			}.get(self.doc.heading_text_as) or ""
		
		self.doc.at_import = ""
		for f in fonts:
			self.doc.at_import += "\[email protected] url(https://fonts.googleapis.com/css?family=%s:400,700);" % f.replace(" ", "+")
开发者ID:Yellowen,项目名称:wnframework,代码行数:25,代码来源:style_settings.py


示例10: test_5_make_autoname

	def test_5_make_autoname(self):
		new_name = doc.make_autoname(self.test_doc.name,self.test_doc.parenttype)
		last_name = testlib.test_conn.sql("select name from `tab%s` order by name desc limit 1"%testlib.test_doctype)		
		if not last_name:
			last_name = '0'
		webnotes.conn.commit()
		assert (cint(new_name[get_num_start_pos(new_name):])) - cint(last_name[get_num_start_pos(last_name):])
开发者ID:cmrajan,项目名称:wnframework,代码行数:7,代码来源:unittests_doc.py


示例11: validate

	def validate(self):
		previous_auto_inventory_accounting = cint(webnotes.conn.get_value("Global Defaults", None,
			"auto_inventory_accounting"))
		if cint(self.doc.auto_inventory_accounting) != previous_auto_inventory_accounting:
			from accounts.utils import create_stock_in_hand_jv
			create_stock_in_hand_jv(reverse = \
				cint(self.doc.auto_inventory_accounting) < previous_auto_inventory_accounting)
开发者ID:BillTheBest,项目名称:erpnext,代码行数:7,代码来源:global_defaults.py


示例12: validate_value

	def validate_value(self, fieldname, condition, val2, doc=None, raise_exception=None):
		"""check that value of fieldname should be 'condition' val2
			else throw exception"""
		if not doc:
			doc = self.doc
		
		df = self.meta.get_field(fieldname, parent=doc.doctype)
		
		val1 = doc.fields.get(fieldname)
		
		if df.fieldtype in ("Currency", "Float"):
			val1 = flt(val1, self.precision(df.fieldname, doc.parentfield or None))
			val2 = flt(val2, self.precision(df.fieldname, doc.parentfield or None))
		elif df.fieldtype in ("Int", "Check"):
			val1 = cint(val1)
			val2 = cint(val2)
		
		if not webnotes.compare(val1, condition, val2):
			msg = _("Error") + ": "
			if doc.parentfield:
				msg += _("Row") + (" # %d: " % doc.idx)
			
			msg += _(self.meta.get_label(fieldname, parent=doc.doctype)) \
				+ " " + error_condition_map.get(condition, "") + " " + cstr(val2)
			
			# raise passed exception or True
			msgprint(msg, raise_exception=raise_exception or True)
开发者ID:Halfnhav,项目名称:wnframework,代码行数:27,代码来源:controller.py


示例13: calc_next_day

 def calc_next_day(self, next_year, next_month):
   bill_cycle_day = cstr(self.doc.billing_cycle_date).split('-')[2]
   if cint(next_month) == 2 and next_year%4==0 and (next_year%100!=0 or next_year%400==0) and cint(bill_cycle_day) > 28:
     bill_cycle_day = '28'
   elif cint(bill_cycle_day) == 31 and cint(next_month) in (4,6,9,11):
     bill_cycle_day = '30'
   return bill_cycle_day
开发者ID:Morphnus-IT-Solutions,项目名称:trimos,代码行数:7,代码来源:wn_erp_client_control.py


示例14: account_expiry_reminder

  def account_expiry_reminder(self):
    import webnotes.utils
    from datetime import datetime
    # Payment Reminder in case of not enough balance
    cr_reqd = cint(self.doc.total_users)
    days_left = cint(self.calc_days())
    # check if account balance is sufficient
    if cint(self.doc.credit_balance)<(cr_reqd):
      
      # Difference between last payment date and current date
      if self.doc.last_deduction_date: last_payment = date_diff(nowdate(),self.doc.last_deduction_date)
      else: last_payment = -1

      # 7 days extension
      remaining_days = days_left - 24
      if last_payment > 30 or last_payment == -1:
        if remaining_days < 8 and remaining_days >= 1:
          return "Your account will be de-activated in " + cstr(remaining_days) + " days. Please contact your System Manager to buy credits."
        elif remaining_days==0:
          return "Your account will be disabled from tomorrow. Please contact your System Manager to buy credits."
        elif not has_common(['Administrator'],webnotes.user.get_roles()):
          return "Stopped"

      # check if user account is extended for seven days
      if cint(self.doc.is_trial_account)==0:
        if days_left < 10 and days_left >= 0:
          return "You have only %s Credits in your account. Buy credits before %s." % (cint(self.doc.credit_balance),formatdate(self.next_bill_sdate))
开发者ID:Morphnus-IT-Solutions,项目名称:trimos,代码行数:27,代码来源:wn_erp_client_control.py


示例15: __init__

	def __init__(self, login=None, password=None, server=None, port=None, use_ssl=None):
		# get defaults from control panel
		try:
			es = webnotes.doc('Email Settings','Email Settings')
		except webnotes.DoesNotExistError:
			es = None
		
		self._sess = None
		if server:
			self.server = server
			self.port = port
			self.use_ssl = cint(use_ssl)
			self.login = login
			self.password = password
		elif es and es.outgoing_mail_server:
			self.server = es.outgoing_mail_server
			self.port = es.mail_port
			self.use_ssl = cint(es.use_ssl)
			self.login = es.mail_login
			self.password = es.mail_password
			self.always_use_login_id_as_sender = es.always_use_login_id_as_sender
		else:
			self.server = webnotes.conf.get("mail_server") or ""
			self.port = webnotes.conf.get("mail_port") or None
			self.use_ssl = cint(webnotes.conf.get("use_ssl") or 0)
			self.login = webnotes.conf.get("mail_login") or ""
			self.password = webnotes.conf.get("mail_password") or ""
开发者ID:bindscha,项目名称:wnframework_old,代码行数:27,代码来源:smtp.py


示例16: get_weekdates

 def get_weekdates(self,lst):
   from datetime import date, timedelta
 
   d = dt = self.make_date(lst)
   date_lst = [[1,cstr(d.strftime("%d/%m/%y"))]]
   week=flag =1
   j=1
   last_day = sql("select last_day('%s')"%d)[0][0]
   lst_m = cint(lst.split(',')[0])
   for i in range(2,8):
     f=0
     if(dt < last_day):
       #if(d.weekday()>4):
       #d = d+timedelta(7-d.weekday()) 
       #else:
       d = d - timedelta(d.weekday()-1)
       dlt = timedelta(days = (week-1)*7)
       dt = d + dlt + timedelta(days=6)
       
       if(cint(sql("select month('%s')"%dt)[0][0]) == lst_m and dt!=last_day):
         for k in date_lst:      
           if(cstr(dt.strftime("%d/%m/%y")) == k[1]):
             f = 1
         if f == 0:   
           date_lst.append([i,cstr(dt.strftime("%d/%m/%y"))])
         
       elif(dt==last_day and flag ==1):
         date_lst.append([i,cstr(last_day.strftime("%d/%m/%y"))])
         flag = 0
     
       elif(flag == 1):
         date_lst.append([i,cstr(last_day.strftime("%d/%m/%y"))])
       week += 1
      
   return date_lst and date_lst or ''
开发者ID:NorrWing,项目名称:erpnext,代码行数:35,代码来源:plot_control.py


示例17: update_parent_info

	def update_parent_info(self):
		idx_map = {}
		is_local = cint(self.doc.fields.get("__islocal"))
		
		if not webnotes.flags.in_import:
			parentfields = [d.fieldname for d in self.meta.get({"doctype": "DocField", "fieldtype": "Table"})]
			
		for i, d in enumerate(self.doclist[1:]):
			if d.parentfield:
				if not webnotes.flags.in_import:
					if not d.parentfield in parentfields:
						webnotes.msgprint("Bad parentfield %s" % d.parentfield, 
							raise_exception=True)
				d.parenttype = self.doc.doctype
				d.parent = self.doc.name
			if not d.idx:
				d.idx = idx_map.setdefault(d.parentfield, 0) + 1
			else:
				d.idx = cint(d.idx)
			if is_local:
				# if parent is new, all children should be new
				d.fields["__islocal"] = 1
				d.name = None
			
			idx_map[d.parentfield] = d.idx
开发者ID:Halfnhav,项目名称:wnframework,代码行数:25,代码来源:bean.py


示例18: cal_tax

	def cal_tax(self, ocd, prd, rate, net_total, oc):
		tax_amount = 0
		if ocd[oc].charge_type == 'Actual':
			value = flt(flt(rate) / flt(net_total))
			return flt(flt(value) * flt(prd.amount))
			
		elif ocd[oc].charge_type == 'On Net Total':
			return flt(flt(rate) * flt(prd.amount) / 100)
			
		elif ocd[oc].charge_type == 'On Previous Row Amount':
			
			row_no = cstr(ocd[oc].row_id)
			row = (row_no).split("+")
			for r in range(0, len(row.length)):
				id = cint(row[r])
				tax_amount += flt((flt(rate) * flt(ocd[id-1].total_amount) / 100))
			row_id = row_no.find("/")
			if row_id != -1:
				rate = ''
				row = (row_no).split("/")
				
				id1 = cint(row[0])
				id2 = cint(row[1])
				tax_amount = flt(flt(ocd[id1-1].total_amount) / flt(ocd[id2-1].total_amount))
				
			return tax_amount
开发者ID:ravidey,项目名称:erpnext,代码行数:26,代码来源:landed_cost_wizard.py


示例19: calculate_ded_total

	def calculate_ded_total(self):
		self.doc.total_deduction = 0
		qry=webnotes.conn.sql(" select name from `tabEmployee Loan` where employee_id=%s", self.doc.employee ,as_list=1)
		#webnotes.errprint(qry)
		r=0
		if len(qry)!=0:
			qr=webnotes.conn.sql("select date_of_installment from `tabLoan Installment Details` where parent=%s",qry[0][0],as_list=1)
			for i in qr:
				t=getdate(i[0]).month
				if t == cint(self.doc.month):
					q=webnotes.conn.sql("select amount_to_be_paid from `tabLoan Installment Details` where date_of_installment=%s and parent=%s",(getdate(i[0]),qry[0][0]),as_list=1)
					w=webnotes.conn.sql("Update `tabLoan Installment Details` set status='Paid' where date_of_installment=%s",getdate(i[0]))
					#webnotes.errprint(q)
					r=q[0][0]
					self.doc.loan_amount=r
		m=0.0
		for d in getlist(self.doclist, 'deduction_details'):
			if cint(d.d_depends_on_lwp) == 1:
				d.d_modified_amount = _round(flt(d.d_amount) * flt(self.doc.payment_days) 
					/ cint(self.doc.total_days_in_month), 2)
			elif not self.doc.payment_days:
				d.d_modified_amount = 0
			else:
				d.d_modified_amount = d.d_amount
			m+=flt(d.d_modified_amount)	
		#m+=flt(d.d_modified_amount)
		self.doc.total_deduction= m+flt(r)
开发者ID:Tejal011089,项目名称:med2-app,代码行数:27,代码来源:salary_slip.py


示例20: validate

	def validate(self):
		super(DocType, self).validate()
		
		self.so_dn_required()
		self.validate_proj_cust()
		sales_com_obj = get_obj('Sales Common')
		sales_com_obj.check_stop_sales_order(self)
		sales_com_obj.check_active_sales_items(self)
		sales_com_obj.check_conversion_rate(self)
		sales_com_obj.validate_max_discount(self, 'entries')
		sales_com_obj.get_allocated_sum(self)
		sales_com_obj.validate_fiscal_year(self.doc.fiscal_year, 
			self.doc.posting_date,'Posting Date')
		self.validate_customer()
		self.validate_customer_account()
		self.validate_debit_acc()
		self.validate_fixed_asset_account()
		self.clear_unallocated_advances("Sales Invoice Advance", "advance_adjustment_details")
		self.add_remarks()
		if cint(self.doc.is_pos):
			self.validate_pos()
			self.validate_write_off_account()
			if cint(self.doc.update_stock):
				sl = get_obj('Stock Ledger')
				sl.validate_serial_no(self, 'entries')
				sl.validate_serial_no(self, 'packing_details')
				self.validate_item_code()
				self.update_current_stock()
				self.validate_delivery_note()
		if not self.doc.is_opening:
			self.doc.is_opening = 'No'
		self.set_aging_date()
		self.set_against_income_account()
		self.validate_c_form()
		self.validate_recurring_invoice()
开发者ID:hfeeki,项目名称:erpnext,代码行数:35,代码来源:sales_invoice.py



注:本文中的webnotes.utils.cint函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utils.comma_and函数代码示例发布时间:2022-05-26
下一篇:
Python utils.add_days函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap