mirror of
				https://github.com/itsdave-de/msp.git
				synced 2025-10-30 17:07:09 -03:00 
			
		
		
		
	
						commit
						0d304e8b89
					
				| @ -102,6 +102,9 @@ class AutoInvoiceGenerator(Document): | |||||||
| 
 | 
 | ||||||
| 				item_doc = frappe.get_doc("Delivery Note", dn["name"])  | 				item_doc = frappe.get_doc("Delivery Note", dn["name"])  | ||||||
| 				for item in item_doc.items: | 				for item in item_doc.items: | ||||||
|  | 					item_in_prev_s_i = frappe.get_all("Sales Invoice Item", filters = {"dn_detail" : item.name }) | ||||||
|  | 					print(len(item_in_prev_s_i)) | ||||||
|  | 					if len(item_in_prev_s_i) == 0: | ||||||
| 						print(item.item_group) | 						print(item.item_group) | ||||||
| 						item.dn_detail= dn["name"] | 						item.dn_detail= dn["name"] | ||||||
| 						print("item.dn_detail") | 						print("item.dn_detail") | ||||||
| @ -109,6 +112,8 @@ class AutoInvoiceGenerator(Document): | |||||||
| 						items.append(item) | 						items.append(item) | ||||||
| 		return items | 		return items | ||||||
| 	 | 	 | ||||||
|  | 	 | ||||||
|  | 	 | ||||||
| 	@frappe.whitelist() | 	@frappe.whitelist() | ||||||
| 	def get_invoice_dict(self):  | 	def get_invoice_dict(self):  | ||||||
| 		self.get_customer_asap_billing_mode() | 		self.get_customer_asap_billing_mode() | ||||||
| @ -287,12 +292,4 @@ class AutoInvoiceGenerator(Document): | |||||||
| 			invoice_doc.append("taxes", new_tax) | 			invoice_doc.append("taxes", new_tax) | ||||||
| 			invoice_doc.save() | 			invoice_doc.save() | ||||||
| 
 | 
 | ||||||
| 	# def validate_items(self,item_list): | 	 | ||||||
| 	# 	print("len(item_list):") |  | ||||||
| 	# 	print(len(item_list)) |  | ||||||
| 	# 	print("len(set(item_list)):") |  | ||||||
| 	# 	print(len(set(item_list))) |  | ||||||
| 	# 	if len(item_list) == len(set(item_list)): |  | ||||||
| 	# 		return True |  | ||||||
| 	# 	else: |  | ||||||
| 	# 		frappe.msgprint("Rechnungspositionen doppelt") |  | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user