Support importing VAT number with client CSV
This commit is contained in:
parent
5d2e9568d7
commit
e677569351
2 changed files with 7 additions and 0 deletions
|
|
@ -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',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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'),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue