Open
Description
The following code:
$countryCode = 'GB';
$iso = (new ISO3166())
->alpha2($countryCode);
/** @disregard P1013 */
$buyer = (new Person())
->setFirstName($firstName)
->setLastName($lastName)
->setStreet1($street1)
->setStreet2($street2)
->setZip($zip)
->setCity($city)
->setCountry($iso['name'])
->setEmail($email);
will end up with something like this in an invoice:
John Doe
St. Johns Street
SS69DQ RAYLEIGH
United Kingdom of Great Britain and Northern Ireland
This is not convenient for invoices as it will end up making the buyer's address field way too long as shown in this screenshot from a pdf:
It's common practice to use the common name as the Wikipedia article intro explains: The United Kingdom of Great Britain and Northern Ireland, commonly known as the United Kingdom (UK)
.
So the idea is to add the common name when it differs from the official one to the array.
[
'name' => 'United Kingdom of Great Britain and Northern Ireland',
'common' => 'United Kingdom',
'alpha2' => 'GB',
'alpha3' => 'GBR',
'numeric' => '826',
'currency' => [
'GBP',
],
],
If you agree to this update, I will happily provide a PR.
Metadata
Assignees
Labels
No labels
Activity