我有一小段代码,它检索发票附件的所有 url
$salesInvoice = new \Picqer\Financials\Exact\SalesInvoice($connection);
$salesInvoices = $salesInvoice->filter("InvoiceToName eq 'my dude'");
$this->addTplParam("oItems", $salesInvoices);
$aInvoices = array();
$aDocuments = array();
$aDocumentAttachments = array();
// we collect all the invoices numbers
foreach($salesInvoices as $salesInvoice)
{
$aInvoices[] = $salesInvoice->InvoiceNumber;
}
// now we check the Documents
$document = new \Picqer\Financials\Exact\Document($connection);
$documents = $document->filter("SalesInvoiceNumber eq ".$aInvoices[0]);
foreach($documents as $document) {
$aDocuments[] = $document->ID;
}
// now the attachments
$documentAttachment = new \Picqer\Financials\Exact\DocumentAttachment($connection);
$documentAttachments = $documentAttachment->filter("Document eq guid'".$aDocuments[0]."'");
foreach($documentAttachments as $documentAttachment)
{
$aDocumentAttachments[] = $documentAttachment->Url;
}
不管它写得好不好,因为它不能完成工作。所以,例如,我得到这样的东西:
https://start.exactonline.de/docs/SysAttachment.aspx?ID=123123-123123-123123&除法=1234
尝试访问此文档时,我收到一条错误消息,提示我无权查看此文档。
现在我的问题是:是否可以使用此链接“即时”创建 PDF?我该如何进行?只要我登录到exact-online,它就可以工作。但是,客户在那里没有帐户。