load->helper('file'); $path = './uploads/temp/invoice_' . $invoice->invoice_id . '_zugferd.xml'; $CI->load->library('zugferdxml', array('invoice' => $invoice, 'items' => $items)); write_file($path, $CI->zugferdxml->xml()); return $path; } /** * Returns the correct RDF string for the Zugferd XML * @return string */ function zugferd_rdf() { $s = '' . "\n"; $s .= ' INVOICE' . "\n"; $s .= ' ZUGFeRD-invoice.xml' . "\n"; $s .= ' 1.0' . "\n"; $s .= ' COMFORT' . "\n"; $s .= '' . "\n"; return $s; }