Beispiel #1
0
	def onload(self):
		if self.docstatus==1:
			for item in self.get("items"):
				item.update(get_available_qty(item.item_code,
					item.s_warehouse))

		count = frappe.db.exists({
			"doctype": "Journal Entry",
			"stock_entry":self.name,
			"docstatus":1
		})
		self.get("__onload").credit_debit_note_exists = 1 if count else 0
	def onload(self):
		if self.docstatus==1:
			for item in self.get("items"):
				item.update(get_available_qty(item.item_code,
					item.s_warehouse))

		count = frappe.db.exists({
			"doctype": "Journal Entry",
			"stock_entry":self.name,
			"docstatus":1
		})
		self.get("__onload").credit_debit_note_exists = 1 if count else 0
 def onload(self):
     if self.doctype in ("Sales Order", "Delivery Note", "Sales Invoice"):
         for item in self.get(self.fname):
             item.update(get_available_qty(item.item_code, item.warehouse))
Beispiel #4
0
 def onload(self):
     if self.docstatus == 1:
         for item in self.get("items"):
             item.update(get_available_qty(item.item_code, item.s_warehouse))
	def onload(self):
		if self.doctype in ("Sales Order", "Delivery Note", "Sales Invoice"):
			for item in self.get("items"):
				item.update(get_available_qty(item.item_code,
					item.warehouse))
Beispiel #6
0
 def onload(self):
     if self.docstatus == 1:
         for item in self.get("items"):
             item.update(get_available_qty(item.item_code,
                                           item.s_warehouse))