Ejemplo n.º 1
0
	def make_gl_entries(self):
		from accounts.general_ledger import make_gl_entries, merge_similar_entries
		
		gl_entries = []
		
		self.make_customer_gl_entry(gl_entries)
	
		self.make_tax_gl_entries(gl_entries)
		
		self.make_item_gl_entries(gl_entries)
		
		# merge gl entries before adding pos entries
		gl_entries = merge_similar_entries(gl_entries)
						
		self.make_pos_gl_entries(gl_entries)
		
		update_outstanding = cint(self.doc.is_pos) and self.doc.write_off_account and 'No' or 'Yes'
		
		if gl_entries:
			make_gl_entries(gl_entries, cancel=(self.doc.docstatus == 2), 
				update_outstanding=update_outstanding, merge_entries=False)
				
			if cint(webnotes.defaults.get_global_default("auto_accounting_for_stock")) \
					and cint(self.doc.update_stock):
				self.update_gl_entries_after()
Ejemplo n.º 2
0
	def get_gl_entries(self, warehouse_account=None):
		from accounts.general_ledger import merge_similar_entries
		
		gl_entries = []
		
		self.make_customer_gl_entry(gl_entries)
		
		self.make_tax_gl_entries(gl_entries)
		
		self.make_item_gl_entries(gl_entries)
		
		# merge gl entries before adding pos entries
		gl_entries = merge_similar_entries(gl_entries)
		
		self.make_pos_gl_entries(gl_entries)
		
		return gl_entries
Ejemplo n.º 3
0
    def get_gl_entries(self, warehouse_account=None):
        from accounts.general_ledger import merge_similar_entries

        gl_entries = []

        self.make_customer_gl_entry(gl_entries)

        self.make_tax_gl_entries(gl_entries)

        self.make_item_gl_entries(gl_entries)

        # merge gl entries before adding pos entries
        gl_entries = merge_similar_entries(gl_entries)

        self.make_pos_gl_entries(gl_entries)

        return gl_entries
Ejemplo n.º 4
0
	def make_gl_entries(self):
		from accounts.general_ledger import make_gl_entries, merge_similar_entries
		
		gl_entries = []
		
		self.make_customer_gl_entry(gl_entries)
	
		self.make_tax_gl_entries(gl_entries)
		
		self.make_item_gl_entries(gl_entries)
		
		# merge gl entries before adding pos entries
		gl_entries = merge_similar_entries(gl_entries)
						
		self.make_pos_gl_entries(gl_entries)
		
		update_outstanding = cint(self.doc.is_pos) and self.doc.write_off_account and 'No' or 'Yes'
		
		if gl_entries:
			make_gl_entries(gl_entries, cancel=(self.doc.docstatus == 2), 
				update_outstanding=update_outstanding, merge_entries=False)
Ejemplo n.º 5
0
	def make_gl_entries(self):
		from accounts.general_ledger import make_gl_entries, merge_similar_entries
		
		gl_entries = []
		
		self.make_customer_gl_entry(gl_entries)
	
		self.make_tax_gl_entries(gl_entries)
		
		self.make_item_gl_entries(gl_entries)
		
		# merge gl entries before adding pos entries
		gl_entries = merge_similar_entries(gl_entries)
						
		self.make_pos_gl_entries(gl_entries)
		
		update_outstanding = cint(self.doc.is_pos) and self.doc.write_off_account and 'No' or 'Yes'
		
		if gl_entries:
			make_gl_entries(gl_entries, cancel=(self.doc.docstatus == 2), 
				update_outstanding=update_outstanding, merge_entries=False)