API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

Findes der en CurrentInvoice_GetPdf funktion?

0
Hej,

Den pdf man kan se hvis man logger ind på e-conomic og klikker på igangværende fakturaer, kan man ikke hive den ud med en SOAP client?

Hvis det ikke kan lade sig gøre, har I så en idé til hvordan jeg kan løse det uden at skulle bogføre fakturaen først?

På forhånd tak for svar
created Nov 25, 2009 by harald
0% Accept Rate
Q 1 A 0 C 0

5 Answers

0
Jeg kigger med ...

Efter lidt undersøgelse har jeg fundet ud af, du kan hente ordre og fakturer ud, dog ikke igangværende fakturaer..

Eks. for at trække alle ordre ud som pdf:


$orders = $client-Order_GetAll()-Order_GetAllResult-OrderHandle;
foreach($orders as $order) {
    $pdf = $client-Order_GetPdf(array('orderHandle'=$order))-Order_GetPdfResult;    
    $fp = fopen('order_'$order-Id, 'wb');
    fwrite($fp,$pdf);
    fclose($fp);
}
answered Dec 3, 2009 by ksvendsen
0
Jeg er også interesseret i at hører et svar på dette spørgsmål
answered Sep 18, 2012 by bahn
0
Hej begge,

Det gør der såmen.

I kan se beskrivelsen her:

https://api.e-conomic.com/secure/api1/E ... ice_GetPdf


mvh
answered Sep 19, 2012 by nkn
0
And if other than me has this qustion:
How to get the pdf date in a file and print it?
the answer is as simple as this:

 $pdf = $client-Order_GetPdf(array('orderHandle'=$OrderHandle))-Order_GetPdfResult;

touch('tmp_invoice/tmp.txt');
$fp = fopen('tmp_invoice/tmp.pdf', 'w');
fwrite($fp, $pdf);
fclose($fp);
echo  a href=\tmp_invoice/tmp.pdf\Open your here/a;
answered Sep 19, 2012 by bahn
0
Use base64_decode() to convert the results from GetPdf.

If you want to output the PDF file to the user, you can do it with:

    header('Content-Type: application/pdf');
    header('Content-Disposition: inline; filename='.basename($fileName).'');
    header('Cache-Control: private, max-age=0, must-revalidate');
    print base64_decode($pdf);

where $fileName is the file name you want and $pdf is the output from GetPdf.

/Kjeld
answered Oct 16, 2012 by ecodyr
Visma e-conomic A/S
...