Merge Invoice and Bill into Document
This commit is contained in:
		@@ -15,7 +15,7 @@ return [
 | 
			
		||||
            'class' => 'fas fa-sort-amount',
 | 
			
		||||
        ],
 | 
			
		||||
        'numeric' => [
 | 
			
		||||
            'rows' => ['created_at', 'updated_at', 'paid_at', 'invoiced_at', 'billed_at', 'due_at', 'id', 'quantity', 'rate',  'number', 'invoice_number', 'bill_number'],
 | 
			
		||||
            'rows' => ['created_at', 'updated_at', 'paid_at', 'issued_at', 'due_at', 'id', 'quantity', 'rate',  'number', 'document_number'],
 | 
			
		||||
            'class' => 'fas fa-sort-numeric',
 | 
			
		||||
        ],
 | 
			
		||||
    ],
 | 
			
		||||
 
 | 
			
		||||
@@ -156,12 +156,13 @@ return [
 | 
			
		||||
        ],
 | 
			
		||||
    ],
 | 
			
		||||
 | 
			
		||||
    App\Models\Purchase\Bill::class => [
 | 
			
		||||
    App\Models\Document\Document::class => [
 | 
			
		||||
        'columns' => [
 | 
			
		||||
            'bill_number' => ['searchable' => true],
 | 
			
		||||
            'type' => ['searchable' => true],
 | 
			
		||||
            'document_number' => ['searchable' => true],
 | 
			
		||||
            'order_number' => ['searchable' => true],
 | 
			
		||||
            'status',
 | 
			
		||||
            'billed_at' => ['date' => true],
 | 
			
		||||
            'issued_at' => ['date' => true],
 | 
			
		||||
            'due_at' => ['date' => true],
 | 
			
		||||
            'amount',
 | 
			
		||||
            'currency_code' => [
 | 
			
		||||
@@ -182,32 +183,6 @@ return [
 | 
			
		||||
        ],
 | 
			
		||||
    ],
 | 
			
		||||
 | 
			
		||||
    App\Models\Sale\Invoice::class => [
 | 
			
		||||
        'columns' => [
 | 
			
		||||
            'invoice_number' => ['searchable' => true],
 | 
			
		||||
            'order_number' => ['searchable' => true],
 | 
			
		||||
            'status',
 | 
			
		||||
            'invoiced_at' => ['date' => true],
 | 
			
		||||
            'due_at' => ['date' => true],
 | 
			
		||||
            'amount',
 | 
			
		||||
            'currency_code' => [
 | 
			
		||||
                'route' => 'currencies.index'
 | 
			
		||||
            ],
 | 
			
		||||
            'contact_id' => [
 | 
			
		||||
                'route' => 'customers.index'
 | 
			
		||||
            ],
 | 
			
		||||
            'contact_name' => ['searchable' => true],
 | 
			
		||||
            'contact_email' => ['searchable' => true],
 | 
			
		||||
            'contact_tax_number',
 | 
			
		||||
            'contact_phone' => ['searchable' => true],
 | 
			
		||||
            'contact_address' => ['searchable' => true],
 | 
			
		||||
            'category_id' => [
 | 
			
		||||
                'route' => 'categories.index'
 | 
			
		||||
            ],
 | 
			
		||||
            'parent_id',
 | 
			
		||||
        ],
 | 
			
		||||
    ],
 | 
			
		||||
 | 
			
		||||
    App\Models\Setting\Category::class => [
 | 
			
		||||
        'columns' => [
 | 
			
		||||
            'name' => ['searchable' => true],
 | 
			
		||||
 
 | 
			
		||||
@@ -120,6 +120,17 @@ return [
 | 
			
		||||
            'template'                  => env('SETTING_FALLBACK_INVOICE_TEMPLATE', 'default'),
 | 
			
		||||
            'color'                     => env('SETTING_FALLBACK_INVOICE_COLOR', '#55588b'),
 | 
			
		||||
        ],
 | 
			
		||||
        'bill' => [
 | 
			
		||||
            'number_prefix'             => env('SETTING_FALLBACK_BILL_NUMBER_PREFIX', 'BILL-'),
 | 
			
		||||
            'number_digit'              => env('SETTING_FALLBACK_BILL_NUMBER_DIGIT', '5'),
 | 
			
		||||
            'number_next'               => env('SETTING_FALLBACK_BILL_NUMBER_NEXT', '1'),
 | 
			
		||||
            'item_name'                 => env('SETTING_FALLBACK_BILL_ITEM_NAME', 'settings.bill.item'),
 | 
			
		||||
            'price_name'                => env('SETTING_FALLBACK_BILL_PRICE_NAME', 'settings.bill.price'),
 | 
			
		||||
            'quantity_name'             => env('SETTING_FALLBACK_BILL_QUANTITY_NAME', 'settings.bill.quantity'),
 | 
			
		||||
            'payment_terms'             => env('SETTING_FALLBACK_BILL_PAYMENT_TERMS', '0'),
 | 
			
		||||
            'template'                  => env('SETTING_FALLBACK_BILL_TEMPLATE', 'default'),
 | 
			
		||||
            'color'                     => env('SETTING_FALLBACK_BILL_COLOR', '#55588b'),
 | 
			
		||||
        ],
 | 
			
		||||
        'default' => [
 | 
			
		||||
            'currency'                  => env('SETTING_FALLBACK_DEFAULT_CURRENCY', 'USD'),
 | 
			
		||||
            'locale'                    => env('SETTING_FALLBACK_DEFAULT_LOCALE', 'en-GB'),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user