mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-11-04 06:23:17 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			49 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import Guid from 'guid'
 | 
						|
import recurringInvoiceItemStub from './recurring-invoice-item'
 | 
						|
import taxStub from './tax'
 | 
						|
 | 
						|
export default function () {
 | 
						|
  return {
 | 
						|
    currency: null,
 | 
						|
    customer: null,
 | 
						|
 | 
						|
    customer_id: null,
 | 
						|
    invoice_template_id: 1,
 | 
						|
    sub_total: 0,
 | 
						|
    total: 0,
 | 
						|
    tax: 0,
 | 
						|
    notes: '',
 | 
						|
    discount_type: 'fixed',
 | 
						|
    discount_val: 0,
 | 
						|
    discount: 0,
 | 
						|
    starts_at: null,
 | 
						|
    send_automatically: true,
 | 
						|
    status: 'ACTIVE',
 | 
						|
    company_id: null,
 | 
						|
    next_invoice_at: null,
 | 
						|
    next_invoice_date: null,
 | 
						|
    frequency: '0 0 * * 0',
 | 
						|
    limit_count: null,
 | 
						|
    limit_by: 'NONE',
 | 
						|
    limit_date: null,
 | 
						|
    exchange_rate: null,
 | 
						|
    tax_per_item: null,
 | 
						|
    discount_per_item: null,
 | 
						|
    template_name: null,
 | 
						|
    items: [
 | 
						|
      {
 | 
						|
        ...recurringInvoiceItemStub,
 | 
						|
        id: Guid.raw(),
 | 
						|
        taxes: [{ ...taxStub, id: Guid.raw() }],
 | 
						|
      },
 | 
						|
    ],
 | 
						|
    taxes: [],
 | 
						|
    customFields: [],
 | 
						|
    fields: [],
 | 
						|
    invoices: [],
 | 
						|
    selectedNote: null,
 | 
						|
    selectedFrequency: { label: 'Every Week', value: '0 0 * * 0' },
 | 
						|
    selectedInvoice: null,
 | 
						|
  }
 | 
						|
}
 |