Jump to content

How to generate invoice number in xml ?


liuksas

Recommended Posts

 Please help, Maybe someone knows where the error is, why it doesn't show invoice number in xml ?

php:

// Data Header
         
            $xml->writeElement('DocNumber', $order['Invoice_number']); 
          

Prestashop 1.7.8

Edited by liuksas (see edit history)
Link to comment
Share on other sites

can i try one more time explain
my php script:

........

            // Data Header
            $xml->startElement('Data-Header');
            $xml->writeElement('UniqId', $orderDate->format('Ymd') . $order['id_order']);
            $xml->writeElement('DocNumber', $order['reference']);
            $xml->writeElement('DocDate', $order['date_add']);
            $xml->writeElement('InvoiceCurrency', 'EUR');
            $xml->writeElement('TaxationMethod', '12');
            $xml->writeElement('VATCode', '21');
            $xml->writeElement('WarehouseCode', 'P');
            $xml->writeElement('PaymentTypeCode', '5');
            $xml->writeElement('CashReceipNo', $orderDate->format('Ymd') . $order['id_order']);
            $xml->writeElement('EncodingTableCode', 'LOVIT');
            $xml->endElement();

.......

xml fragment:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Document><Document-Header><DocumentType>ORDER</DocumentType></Document-Header><Data-Header><UniqId>20240201359</UniqId><DocNumber>LFFHYBVUC</DocNumber><................

 

script genrate order reference thats fine but i need 

order invoice number: TOP000314 not reference..

 

i need to change: $xml->writeElement('DocNumber', $order['reference']);   but i dont how

invoicenumber.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...