Xero Api和带有XML的联系人映射

时间:2019-06-07 14:17:44

标签: xero-api

我正在使用XML将联系人信息导入Xero,但是我无法正确映射联系人地址的一部分。

我尝试了各个领域。

<Invoice>
    <Type>ACCREC</Type>
    <Reference>PO: " . $_SESSION['purchasenumber'] ."</Reference>
    <Status>AUTHORISED</Status>
    <Contact>
        <Name>" . $_SESSION['businessname'] ."</Name>
        <ContactStatus>ACTIVE</ContactStatus>
        <EmailAddress>" . $_SESSION['email'] ."</EmailAddress>
        <Addresses>
            <Address>
                <AddressType>POBOX</AddressType>
                <AddressLine1>" . $_SESSION['address'] ."</AddressLine1>
                <AddressLine2></AddressLine2>
                <City>" . $_SESSION['city'] ."</City>
                <PostalCode>" . $_SESSION['postcode'] ."</PostalCode>
                <AttentionTo>" . $_SESSION['personsname'] ."</AttentionTo>
              </Address>
        </Addresses>
    </Contact>
    <Date>" . $_SESSION['now'] ."</Date>
    <DueDate>" . $_SESSION['30daysfromnow'] ."</DueDate>
    <LineAmountTypes>Exclusive</LineAmountTypes>
    <LineItems>
        <LineItem>
            <Description>" . $_SESSION['producttitle'] ."</Description>
            <Quantity>1</Quantity>
            <UnitAmount>" . $_SESSION['productprice'] ."</UnitAmount>
            <TaxAmount>0</TaxAmount>
            <AccountCode>4002</AccountCode>
        </LineItem>
    </LineItems>
</Invoice>

在Xero的发票顶部,显示以下内容:

To

[businessname]
Attention: [personsname]
[businessname]
[city]
[postcode]

它应该显示以下内容:

收件人

[businessname]
Attention: [personsname]
[address]
[city]
[postcode]

0 个答案:

没有答案