improved import mapping

This commit is contained in:
denisdulici
2020-01-20 11:12:14 +03:00
parent d7cf148958
commit f58a15034a
9 changed files with 22 additions and 64 deletions

View File

@@ -15,13 +15,9 @@ class Customers extends Import
public function map($row): array
{
$row['company_id'] = session('company_id');
$row['type'] = 'customer';
$row = parent::map($row);
// Make enabled field integer
if (isset($row['enabled'])) {
$row['enabled'] = (int) $row['enabled'];
}
$row['type'] = 'customer';
return $row;
}