diff --git a/app/Services/EDocument/Adapters/CII/PaymentMeans.php b/app/Services/EDocument/Adapters/CII/PaymentMeans.php index c47c2309e4..a4b9a293ac 100644 --- a/app/Services/EDocument/Adapters/CII/PaymentMeans.php +++ b/app/Services/EDocument/Adapters/CII/PaymentMeans.php @@ -198,10 +198,32 @@ public function run() $SupplyChainTradeTransactionType = new \horstoeko\zugferd\entities\extended\ram\SupplyChainTradeTransactionType(); $SupplyChainTradeTransactionType->setApplicableHeaderTradeSettlement($HeaderTradeSettlementType); - $cii = new \horstoeko\zugferd\entities\extended\rsm\CrossIndustryInvoice(); - $cii->setSupplyChainTradeTransaction($SupplyChainTradeTransactionType); + // $cii = new \horstoeko\zugferd\entities\extended\rsm\CrossIndustryInvoice(); + // $cii->setSupplyChainTradeTransaction($SupplyChainTradeTransactionType); - return $cii; + + + $d = \horstoeko\zugferd\ZugferdDocumentBuilder::CreateNew(\horstoeko\zugferd\ZugferdProfiles::PROFILE_XRECHNUNG_3); + // $d->setSupplyChainTradeTransaction($SupplyChainTradeTransactionType); + +// nlog($d->getInvoiceObject()->getSupplyChainTradeTransaction()); +$d->getObjectHelper()->tryCall($d->getInvoiceObject()->getSupplyChainTradeTransaction(), "setSupplyChainTradeTransaction", $SupplyChainTradeTransactionType); + + +$documentJsonExporter = new \horstoeko\zugferd\ZugferdDocumentJsonExporter($d); + +// echo $documentJsonExporter->toPrettyJsonString(); +// echo "\r\n\r\n"; + +$jsonObject = $documentJsonExporter->toJsonObject(); + +return $jsonObject; +// var_dump($jsonObject); + +// echo "\r\n\r\n"; + + + // return $cii; // return $this; }