mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-29 12:41:10 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			40 lines
		
	
	
		
			803 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			803 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import Guid from 'guid'
 | |
| import estimateItemStub from './estimate-item'
 | |
| import taxStub from './tax'
 | |
| 
 | |
| export default function () {
 | |
|   return {
 | |
|     id: null,
 | |
|     customer: null,
 | |
|     template_name: '',
 | |
|     tax_per_item: null,
 | |
|     sales_tax_type: null,
 | |
|     sales_tax_address_type: null,
 | |
|     discount_per_item: null,
 | |
|     estimate_date: '',
 | |
|     expiry_date: '',
 | |
|     estimate_number: '',
 | |
|     customer_id: null,
 | |
|     sub_total: 0,
 | |
|     total: 0,
 | |
|     tax: 0,
 | |
|     notes: '',
 | |
|     discount_type: 'fixed',
 | |
|     discount_val: 0,
 | |
|     reference_number: null,
 | |
|     discount: 0,
 | |
|     items: [
 | |
|       {
 | |
|         ...estimateItemStub,
 | |
|         id: Guid.raw(),
 | |
|         taxes: [{ ...taxStub, id: Guid.raw() }],
 | |
|       },
 | |
|     ],
 | |
|     taxes: [],
 | |
|     customFields: [],
 | |
|     fields: [],
 | |
|     selectedNote: null,
 | |
|     selectedCurrency: '',
 | |
|   }
 | |
| }
 |