我正在尝试通过 sdk 添加发票,但我收到以下消息:“您在不允许的交易中选择了纳税义务帐户,或者没有指定税率。” 这是我的xml。
<InvoiceAdd>
<CustomerRef>
<ListID>2</ListID>
<FullName>Adam West</FullName>
</CustomerRef>
<ARAccountRef>
<ListID>54</ListID>
<FullName>Accounts Receivable (A/R)</FullName>
</ARAccountRef>
<TxnDate>2013-04-22</TxnDate>
<RefNumber>1017</RefNumber>
<TermsRef>
<ListID>3</ListID>
<FullName>Net 30</FullName>
</TermsRef>
<DueDate>2013-05-22</DueDate>
<IsToBePrinted>false</IsToBePrinted>
<InvoiceLineAdd>
<ItemRef>
<ListID>3</ListID>
<FullName>Engine</FullName>
</ItemRef>
<Quantity>1</Quantity>
<Rate>500</Rate>
<Amount>500.00</Amount>
<IsTaxable>true</IsTaxable>
</InvoiceLineAdd>
<InvoiceLineAdd>
<Desc>TAX</Desc>
<RatePercent>5</RatePercent>
<Amount>25.00</Amount>
<IsTaxable>false</IsTaxable>
</InvoiceLineAdd>
<SalesTaxLineAdd>
<RatePercent>5</RatePercent>
<AccountRef>
<ListID>59</ListID>
<FullName>Batman's Payable</FullName>
</AccountRef>
</SalesTaxLineAdd>
我从我在 gui 中创建的发票创建了这个 xml。然后我做了一个 Invoicerq,得到了这个 xml,我把它改成了上面的 xml。
<InvoiceRet>
<TxnID>34</TxnID>
<TimeCreated>2013-04-22T12:17:56</TimeCreated>
<TimeModified>2013-04-22T12:17:56</TimeModified>
<EditSequence>0</EditSequence>
<TxnNumber>34</TxnNumber>
<CustomerRef>
<ListID>2</ListID>
<FullName>Adam West</FullName>
</CustomerRef>
<ARAccountRef>
<ListID>54</ListID>
<FullName>Accounts Receivable (A/R)</FullName>
</ARAccountRef>
<TxnDate>2013-04-22</TxnDate>
<RefNumber>1017</RefNumber>
<TermsRef>
<ListID>3</ListID>
<FullName>Net 30</FullName>
</TermsRef>
<DueDate>2013-05-22</DueDate>
<Subtotal>525.00</Subtotal>
<SalesTaxPercentage>5</SalesTaxPercentage>
<SalesTaxTotal>25.00</SalesTaxTotal>
<AppliedAmount>0.00</AppliedAmount>
<BalanceRemaining>525.00</BalanceRemaining>
<IsPaid>false</IsPaid>
<IsToBePrinted>false</IsToBePrinted>
<InvoiceLineRet>
<TxnLineID>1</TxnLineID>
<ItemRef>
<ListID>3</ListID>
<FullName>Engine</FullName>
</ItemRef>
<Quantity>1</Quantity>
<Rate>500</Rate>
<Amount>500.00</Amount>
<IsTaxable>true</IsTaxable>
</InvoiceLineRet>
<InvoiceLineRet>
<TxnLineID>2</TxnLineID>
<Desc>TAX</Desc>
<RatePercent>5</RatePercent>
<Amount>25.00</Amount>
<IsTaxable>false</IsTaxable>
</InvoiceLineRet>
<SalesTaxLineRet>
<RatePercent>5</RatePercent>
<AccountRef>
<ListID>59</ListID>
<FullName>Batman's Payable</FullName>
</AccountRef>
</SalesTaxLineRet>
如果在 SalesTaxLineAdd 标记中删除 AccountRef,它会为名为“原始销售税”的订单创建一个包含销售税的发票。
但是,我想要我创建的税率。为什么我可以使用税率而不是通过 xml 创建发票?