missing sample import files
This commit is contained in:
		@@ -3,6 +3,7 @@
 | 
			
		||||
namespace App\Exports\Purchases;
 | 
			
		||||
 | 
			
		||||
use App\Models\Banking\Transaction as Model;
 | 
			
		||||
use Jenssegers\Date\Date;
 | 
			
		||||
use Maatwebsite\Excel\Concerns\FromCollection;
 | 
			
		||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
 | 
			
		||||
use Maatwebsite\Excel\Concerns\WithHeadings;
 | 
			
		||||
@@ -32,14 +33,17 @@ class Payments implements FromCollection, ShouldAutoSize, WithHeadings, WithMapp
 | 
			
		||||
    public function map($model): array
 | 
			
		||||
    {
 | 
			
		||||
        return [
 | 
			
		||||
            $model->account_id,
 | 
			
		||||
            $model->paid_at,
 | 
			
		||||
            Date::parse($model->paid_at)->format('Y-m-d'),
 | 
			
		||||
            $model->amount,
 | 
			
		||||
            $model->currency_code,
 | 
			
		||||
            $model->currency_rate,
 | 
			
		||||
            $model->account_id,
 | 
			
		||||
            $model->document_id,
 | 
			
		||||
            $model->contact_id,
 | 
			
		||||
            $model->category_id,
 | 
			
		||||
            $model->description,
 | 
			
		||||
            $model->payment_method,
 | 
			
		||||
            $model->reference,
 | 
			
		||||
            $model->reconciled,
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
@@ -47,14 +51,17 @@ class Payments implements FromCollection, ShouldAutoSize, WithHeadings, WithMapp
 | 
			
		||||
    public function headings(): array
 | 
			
		||||
    {
 | 
			
		||||
        return [
 | 
			
		||||
            'account_id',
 | 
			
		||||
            'paid_at',
 | 
			
		||||
            'amount',
 | 
			
		||||
            'currency_code',
 | 
			
		||||
            'currency_rate',
 | 
			
		||||
            'account_id',
 | 
			
		||||
            'document_id',
 | 
			
		||||
            'contact_id',
 | 
			
		||||
            'category_id',
 | 
			
		||||
            'description',
 | 
			
		||||
            'payment_method',
 | 
			
		||||
            'reference',
 | 
			
		||||
            'reconciled',
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
@@ -63,4 +70,4 @@ class Payments implements FromCollection, ShouldAutoSize, WithHeadings, WithMapp
 | 
			
		||||
    {
 | 
			
		||||
        return 'payments';
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user