yield 'render with shipping address' =>
[ [7
],
function DDocumentGenerateOperation
$operation, ContainerInterface
$container): void
{ $orderId =
$operation->
getOrderId();
$criteria = OrderDocumentCriteriaFactory::
create([$orderId]);
/** @var OrderEntity $order */
$order =
$container->
get('order.repository'
)->
search($criteria, Context::
createDefaultContext())->
get($orderId);
static::
assertNotNull($order->
getDeliveries());
/** @var CountryEntity $country */
$country =
$order->
getDeliveries()->
getShippingAddress()->
getCountries()->
first();
$country->
setCompanyTax(new TaxFreeConfig(true, Defaults::CURRENCY, 0
));
$container->
get('country.repository'
)->
update([[ 'id' =>
$country->
getId(),
'companyTax' =>
['enabled' => true, 'currencyId' => Defaults::CURRENCY, 'amount' => 0
],
]], Context::
createDefaultContext());
$companyPhone = '123123123';
$vatIds =
['VAT-123123'
];
static::
assertNotNull($order->
getOrderCustomer());
$container->
get('customer.repository'
)->
update([[