yield 'Generate storno with invoice not exist' =>
['storno', 'document_storno'
];
yield 'Generate credit with invoice not exist' =>
['credit_note', 'document_credit_note'
];
} /**
* @param array<string, mixed> $config
*/
private function createInvoiceDocument(string
$orderId, array
$config, Context
$context, bool
$multipleDoc): void
{ if ($multipleDoc) { $docConfig = DocumentConfigurationFactory::
createConfiguration($config['documentTypes'
][0
]);
} else { $docConfig = DocumentConfigurationFactory::
createConfiguration($config);
} $operation =
new DocumentGenerateOperation($orderId, FileTypes::PDF,
$docConfig->
jsonSerialize());
$this->documentGenerator->
generate(InvoiceRenderer::TYPE,
[$orderId =>
$operation],
$context);
} /**
* @return array<int, mixed>
*/