Ejemplo n.º 1
0
 /**
  * @param XMLWriter $xmlWriter
  * @param Invoice   $invoice
  */
 protected function addGenericData(XMLWriter $xmlWriter, Invoice $invoice)
 {
     $xmlWriter->writeElement('address', implode("\n", $this->addressService->formatAddress($invoice->getClient()->getAddress())));
     $xmlWriter->writeElement('invoice-id', $invoice->getInvoiceNumber());
     $xmlWriter->writeElement('issue-date', $this->dateFormatter->format($invoice->getIssueDate()));
     if ($invoice->getDueDate() !== null) {
         $xmlWriter->writeElement('due-date', $this->dateFormatter->format($invoice->getDueDate()));
     }
 }