@@ -160,6 +160,8 @@ public function getir_ubl_xml($fatura_tasarimi = 'TICARIFATURA'){
160
160
$ tasarim_dosya_adi_uzantili = $ tasarim_adi ['basename ' ];
161
161
}
162
162
163
+ print_r ($ fatura_tasarimi_yolu );
164
+
163
165
$ fatura_xml = new \SimpleXMLElement ($ xml_string );
164
166
$ this ->fatura_xml = $ fatura_xml ;
165
167
@@ -174,8 +176,6 @@ public function getir_ubl_xml($fatura_tasarimi = 'TICARIFATURA'){
174
176
$ fatura_xml ->addChild ('InvoiceTypeCode ' , $ fatura_turu , $ this ->xml_ns ['cbc ' ]);
175
177
$ fatura_xml ->addChild ('Note ' , $ fatura_notu , $ this ->xml_ns ['cbc ' ]);
176
178
177
- $ this ->ozel_paremetre ($ this ->fatura ->getOzelParametreler ());
178
-
179
179
$ DocumentCurrencyCode = $ fatura_xml ->addChild ('DocumentCurrencyCode ' , $ para_birimi , $ this ->xml_ns ['cbc ' ]);
180
180
$ DocumentCurrencyCode ->addAttribute ('listAgencyName ' , 'United Nations Economic Commission for Europe ' );
181
181
$ DocumentCurrencyCode ->addAttribute ('listID ' , 'ISO 4217 Alpha ' );
@@ -230,6 +230,8 @@ public function getir_ubl_xml($fatura_tasarimi = 'TICARIFATURA'){
230
230
$ additional_document_reference ->addChild ('ID ' , $ tasarim_dosya_adi , $ this ->xml_ns ["cbc " ]);
231
231
$ additional_document_reference ->addChild ('IssueDate ' , $ fatura_tarihi , $ this ->xml_ns ["cbc " ]);
232
232
233
+ $ this ->ozel_paremetre ($ this ->fatura ->getOzelParametreler ());
234
+
233
235
$ attachment = $ additional_document_reference ->addChild ('Attachment ' , null , $ this ->xml_ns ["cac " ]);
234
236
$ embedded_document_binary_object = $ attachment ->addChild ('EmbeddedDocumentBinaryObject ' , $ xslt , $ this ->xml_ns ["cbc " ]);
235
237
$ embedded_document_binary_object ->addAttribute ("characterSetCode " , "UTF-8 " );
@@ -596,7 +598,13 @@ private function get_earsiv_fatura_xml(){
596
598
private function ozel_paremetre ($ parametreler ){
597
599
if ($ parametreler != null ){
598
600
foreach ($ parametreler as $ kod => $ deger ){
599
- $ this ->fatura_xml ->addChild ($ kod , $ deger , $ this ->xml_ns ['cbc ' ]);
601
+
602
+ $ additional_document_reference = $ this ->fatura_xml ->addChild ('AdditionalDocumentReference ' , null , $ this ->xml_ns ['cac ' ]);
603
+ $ additional_document_reference ->addChild ('ID ' , $ deger , $ this ->xml_ns ["cbc " ]);
604
+ $ additional_document_reference ->addChild ('IssueDate ' , $ this ->fatura ->fatura_tarihi , $ this ->xml_ns ["cbc " ]);
605
+ $ additional_document_reference ->addChild ('DocumentType ' , $ kod , $ this ->xml_ns ["cbc " ]);
606
+
607
+ // $this->fatura_xml->addChild($kod, $deger, $this->xml_ns['cbc']);
600
608
}
601
609
return $ this ->fatura_xml ;
602
610
}
0 commit comments