diff --git a/src/Controller/CustomerController.php b/src/Controller/CustomerController.php index 9be5e951..34e72484 100644 --- a/src/Controller/CustomerController.php +++ b/src/Controller/CustomerController.php @@ -90,7 +90,7 @@ final class CustomerController extends AbstractController $table->addColumn('company', ['class' => 'd-none']); $table->addColumn('vat_id', ['class' => 'd-none w-min']); $table->addColumn('contact', ['class' => 'd-none']); - $table->addColumn('address', ['class' => 'd-none']); + $table->addColumn('city', ['class' => 'd-none']); $table->addColumn('country', ['class' => 'd-none w-min']); $table->addColumn('currency', ['class' => 'd-none w-min']); $table->addColumn('phone', ['class' => 'd-none']); diff --git a/src/Entity/Customer.php b/src/Entity/Customer.php index 1b265a93..bb1383b5 100644 --- a/src/Entity/Customer.php +++ b/src/Entity/Customer.php @@ -231,7 +231,7 @@ class Customer implements EntityWithMetaFields, EntityWithBudget, CreatedAt #[Assert\Length(max: 50)] #[Serializer\Expose] #[Serializer\Groups(['Customer_Entity'])] - #[Exporter\Expose(label: 'buyer_reference')] + #[Exporter\Expose(label: 'buyerReference')] private ?string $buyerReference = null; public function __construct(string $name) diff --git a/src/Repository/Query/CustomerQuery.php b/src/Repository/Query/CustomerQuery.php index 5d662028..d870f347 100644 --- a/src/Repository/Query/CustomerQuery.php +++ b/src/Repository/Query/CustomerQuery.php @@ -16,14 +16,14 @@ class CustomerQuery extends BaseQuery implements VisibilityInterface public const CUSTOMER_ORDER_ALLOWED = [ 'name', 'description' => 'comment', - 'country', 'number', + 'country', + 'number', 'homepage', 'email', 'mobile', 'fax', 'phone', 'currency', - 'address', 'contact', 'company', 'vat_id', diff --git a/templates/customer/index.html.twig b/templates/customer/index.html.twig index b3e300b5..94de7caa 100644 --- a/templates/customer/index.html.twig +++ b/templates/customer/index.html.twig @@ -17,8 +17,8 @@ {{ entry.vatId }} {% elseif column == 'contact' %} {{ entry.contact }} - {% elseif column == 'address' %} - {{ entry.address }} + {% elseif column == 'city' %} + {{ entry.postcode }} {{ entry.city }} {% elseif column == 'country' %} {{ entry.country|country_name }} {% elseif column == 'currency' %} diff --git a/tests/Entity/CustomerTest.php b/tests/Entity/CustomerTest.php index b3bd0afd..2eee8cc0 100644 --- a/tests/Entity/CustomerTest.php +++ b/tests/Entity/CustomerTest.php @@ -280,7 +280,7 @@ zip 12345 looney toon', $sut->getFormattedAddress()); ['visible', 'boolean'], ['comment', 'string'], ['billable', 'boolean'], - ['buyer_reference', 'string'], + ['buyerReference', 'string'], ]; self::assertCount(\count($expected), $columns);