Support importing VAT number with client CSV

This commit is contained in:
Hillel Coren 2016-11-01 13:19:35 +02:00
parent 5d2e9568d7
commit e677569351
2 changed files with 7 additions and 0 deletions

View File

@ -89,6 +89,10 @@ class Client extends EntityModel
* @var string
*/
public static $fieldWebsite = 'website';
/**
* @var string
*/
public static $fieldVatNumber = 'vat_number';
/**
* @return array
@ -106,6 +110,7 @@ class Client extends EntityModel
Client::$fieldCountry,
Client::$fieldNotes,
Client::$fieldWebsite,
Client::$fieldVatNumber,
Contact::$fieldFirstName,
Contact::$fieldLastName,
Contact::$fieldPhone,
@ -132,6 +137,7 @@ class Client extends EntityModel
'country' => 'country',
'note' => 'notes',
'site|website' => 'website',
'vat' => 'vat_number',
];
}

View File

@ -28,6 +28,7 @@ class ClientTransformer extends BaseTransformer
'postal_code' => $this->getString($data, 'postal_code'),
'private_notes' => $this->getString($data, 'notes'),
'website' => $this->getString($data, 'website'),
'vat_number' => $this->getString($data, 'vat_number'),
'contacts' => [
[
'first_name' => $this->getString($data, 'first_name'),