Merge pull request #3256 from CihanSenturk/update-document-import-export-fields
Updated document import export fields
This commit is contained in:
commit
0ed1ba4258
|
|
@ -54,7 +54,11 @@ class Bills extends Export implements WithColumnFormatting
|
|||
'contact_state',
|
||||
'contact_zip_code',
|
||||
'contact_city',
|
||||
'title',
|
||||
'subheading',
|
||||
'notes',
|
||||
'template',
|
||||
'color',
|
||||
'parent_number'
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,11 @@ class RecurringBills extends Export implements WithColumnFormatting, WithParentS
|
|||
'contact_state',
|
||||
'contact_zip_code',
|
||||
'contact_city',
|
||||
'title',
|
||||
'subheading',
|
||||
'notes',
|
||||
'template',
|
||||
'color',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,8 +54,12 @@ class Invoices extends Export implements WithColumnFormatting
|
|||
'contact_state',
|
||||
'contact_zip_code',
|
||||
'contact_city',
|
||||
'title',
|
||||
'subheading',
|
||||
'notes',
|
||||
'footer',
|
||||
'template',
|
||||
'color',
|
||||
'parent_number',
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ class RecurringInvoices extends Export implements WithColumnFormatting, WithPare
|
|||
$model->invoiced_at = $model->issued_at;
|
||||
$model->contact_country = $country;
|
||||
|
||||
|
||||
return parent::map($model);
|
||||
}
|
||||
|
||||
|
|
@ -55,8 +54,12 @@ class RecurringInvoices extends Export implements WithColumnFormatting, WithPare
|
|||
'contact_state',
|
||||
'contact_zip_code',
|
||||
'contact_city',
|
||||
'title',
|
||||
'subheading',
|
||||
'notes',
|
||||
'footer',
|
||||
'template',
|
||||
'color',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ namespace App\Imports\Purchases\Bills\Sheets;
|
|||
use App\Abstracts\Import;
|
||||
use App\Http\Requests\Document\Document as Request;
|
||||
use App\Models\Document\Document as Model;
|
||||
use App\Traits\Documents;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Bills extends Import
|
||||
{
|
||||
Use Documents;
|
||||
|
||||
public $request_class = Request::class;
|
||||
|
||||
public $model = Model::class;
|
||||
|
|
@ -46,6 +49,9 @@ class Bills extends Import
|
|||
$row['currency_code'] = $this->getCurrencyCode($row);
|
||||
$row['type'] = Model::BILL_TYPE;
|
||||
$row['contact_country'] = !empty($country) ? $country : null;
|
||||
$row['title'] = $row['title'] ?? Model::BILL_TYPE;
|
||||
$row['template'] = $row['template'] ?? setting($this->getDocumentSettingKey(Model::BILL_TYPE, 'template'), 'default');
|
||||
$row['color'] = $row['color'] ?? setting($this->getDocumentSettingKey(Model::BILL_TYPE, 'color'), '#55588b');
|
||||
$row['parent_id'] = $this->getParentId($row) ?? 0;
|
||||
|
||||
return $row;
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ namespace App\Imports\Purchases\RecurringBills\Sheets;
|
|||
use App\Abstracts\Import;
|
||||
use App\Http\Requests\Document\Document as Request;
|
||||
use App\Models\Document\Document as Model;
|
||||
use App\Traits\Documents;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class RecurringBills extends Import
|
||||
{
|
||||
Use Documents;
|
||||
|
||||
public $request_class = Request::class;
|
||||
|
||||
public $model = Model::class;
|
||||
|
|
@ -46,6 +49,9 @@ class RecurringBills extends Import
|
|||
$row['currency_code'] = $this->getCurrencyCode($row);
|
||||
$row['type'] = Model::BILL_RECURRING_TYPE;
|
||||
$row['contact_country'] = !empty($country) ? $country : null;
|
||||
$row['title'] = $row['title'] ?? Model::BILL_RECURRING_TYPE;
|
||||
$row['template'] = $row['template'] ?? setting($this->getDocumentSettingKey(Model::BILL_RECURRING_TYPE, 'template'), 'default');
|
||||
$row['color'] = $row['color'] ?? setting($this->getDocumentSettingKey(Model::BILL_RECURRING_TYPE, 'color'), '#55588b');
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ namespace App\Imports\Sales\Invoices\Sheets;
|
|||
use App\Abstracts\Import;
|
||||
use App\Http\Requests\Document\Document as Request;
|
||||
use App\Models\Document\Document as Model;
|
||||
use App\Traits\Documents;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Invoices extends Import
|
||||
{
|
||||
Use Documents;
|
||||
|
||||
public $request_class = Request::class;
|
||||
|
||||
public $model = Model::class;
|
||||
|
|
@ -46,6 +49,9 @@ class Invoices extends Import
|
|||
$row['currency_code'] = $this->getCurrencyCode($row);
|
||||
$row['type'] = Model::INVOICE_TYPE;
|
||||
$row['contact_country'] = !empty($country) ? $country : null;
|
||||
$row['title'] = $row['title'] ?? Model::INVOICE_TYPE;
|
||||
$row['template'] = $row['template'] ?? setting($this->getDocumentSettingKey(Model::INVOICE_TYPE, 'template'), 'default');
|
||||
$row['color'] = $row['color'] ?? setting($this->getDocumentSettingKey(Model::INVOICE_TYPE, 'color'), '#55588b');
|
||||
$row['parent_id'] = $this->getParentId($row) ?? 0;
|
||||
|
||||
return $row;
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ namespace App\Imports\Sales\RecurringInvoices\Sheets;
|
|||
use App\Abstracts\Import;
|
||||
use App\Http\Requests\Document\Document as Request;
|
||||
use App\Models\Document\Document as Model;
|
||||
use App\Traits\Documents;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class RecurringInvoices extends Import
|
||||
{
|
||||
Use Documents;
|
||||
|
||||
public $request_class = Request::class;
|
||||
|
||||
public $model = Model::class;
|
||||
|
|
@ -45,6 +48,9 @@ class RecurringInvoices extends Import
|
|||
$row['contact_id'] = $this->getContactId($row, 'customer');
|
||||
$row['currency_code'] = $this->getCurrencyCode($row);
|
||||
$row['type'] = Model::INVOICE_RECURRING_TYPE;
|
||||
$row['title'] = $row['title'] ?? Model::INVOICE_RECURRING_TYPE;
|
||||
$row['template'] = $row['template'] ?? setting($this->getDocumentSettingKey(Model::INVOICE_RECURRING_TYPE, 'template'), 'default');
|
||||
$row['color'] = $row['color'] ?? setting($this->getDocumentSettingKey(Model::INVOICE_RECURRING_TYPE, 'color'), '#55588b');
|
||||
$row['contact_country'] = !empty($country) ? $country : null;
|
||||
|
||||
return $row;
|
||||
|
|
|
|||
Loading…
Reference in New Issue