Fix order xlsx download if missing order date
This commit is contained in:
		
							parent
							
								
									7525aaaa87
								
							
						
					
					
						commit
						f86cc83996
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -460,7 +460,8 @@ class OrderingBatchView(PurchasingBatchView): | |||
|         worksheet = workbook.active | ||||
|         worksheet.title = "Purchase Order" | ||||
|         worksheet.append(["Store", "Vendor", "Date ordered"]) | ||||
|         worksheet.append([batch.store.name, batch.vendor.name, batch.date_ordered.strftime('%m/%d/%Y')]) | ||||
|         date_ordered = batch.date_ordered.strftime('%m/%d/%Y') if batch.date_ordered else None | ||||
|         worksheet.append([batch.store.name, batch.vendor.name, date_ordered]) | ||||
|         worksheet.append([]) | ||||
|         worksheet.append(['vendor_code', 'upc', 'brand_name', 'description', 'cases_ordered', 'units_ordered']) | ||||
|         for row in batch.active_rows(): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar