我正在尝试通过Tally中的XML请求导入特定账单的付款凭证。我做到了部分成功。
我只能针对一个帐户导入付款凭证,而不能针对参考(特定账单)导入付款凭证。
这是XML请求:
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Import</TALLYREQUEST>
<TYPE>Data</TYPE>
<ID>Vouchers</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVCURRENTCOMPANY>Test Company</SVCURRENTCOMPANY>
</STATICVARIABLES>
</DESC>
<DATA>
<TALLYMESSAGE>
<VOUCHER>
<DATE>20190302</DATE>
<NARRATION>Test Import Payment</NARRATION>
<VOUCHERTYPENAME>Payment</VOUCHERTYPENAME>
<ALLLEDGERENTRIES.LIST>
<LEDGERNAME>Test Bill</LEDGERNAME>
<ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>
<AMOUNT>-2.00</AMOUNT>
</ALLLEDGERENTRIES.LIST>
<ALLLEDGERENTRIES.LIST>
<LEDGERNAME>Cash</LEDGERNAME>
<ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>
<AMOUNT>2.00</AMOUNT>
</ALLLEDGERENTRIES.LIST>
</VOUCHER>
</TALLYMESSAGE>
</DATA>
</BODY>
</ENVELOPE>
上述XML成功创建了帐户上的付款凭单,但未针对参考进行创建。
我进行了一些XML更改(添加了 BILLALLOCATIONS.LIST 标记)以实现所需的结果,但是最终却给出了相同的结果。
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Import</TALLYREQUEST>
<TYPE>Data</TYPE>
<ID>Vouchers</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVCURRENTCOMPANY>Test Company</SVCURRENTCOMPANY>
</STATICVARIABLES>
</DESC>
<DATA>
<TALLYMESSAGE>
<VOUCHER>
<DATE>20190302</DATE>
<NARRATION>Test Import Payment</NARRATION>
<VOUCHERTYPENAME>Payment</VOUCHERTYPENAME>
<ALLLEDGERENTRIES.LIST>
<LEDGERNAME>Test Bill</LEDGERNAME>
<ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>
<AMOUNT>-2.00</AMOUNT>
<BILLALLOCATIONS.LIST>
<NAME>777</NAME>
<BILLTYPE>Agst Ref</BILLTYPE>
<TDSDEDUCTEEISSPECIALRATE>No</TDSDEDUCTEEISSPECIALRATE>
<AMOUNT>-₹ 2.00</AMOUNT>
<INTERESTCOLLECTION.LIST> </INTERESTCOLLECTION.LIST>
<STBILLCATEGORIES.LIST> </STBILLCATEGORIES.LIST>
</BILLALLOCATIONS.LIST>
</ALLLEDGERENTRIES.LIST>
<ALLLEDGERENTRIES.LIST>
<LEDGERNAME>Cash</LEDGERNAME>
<ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>
<AMOUNT>2.00</AMOUNT>
</ALLLEDGERENTRIES.LIST>
</VOUCHER>
</TALLYMESSAGE>
</DATA>
</BODY>
</ENVELOPE>
请帮助我实现所需的输出。预先感谢。
答案 0 :(得分:1)
我已从BillAllocations.List内的金额标签中删除了卢比符号。
<BILLALLOCATIONS.LIST>
<NAME>777</NAME>
<BILLTYPE>Agst Ref</BILLTYPE>
<TDSDEDUCTEEISSPECIALRATE>No</TDSDEDUCTEEISSPECIALRATE>
<AMOUNT>-2.00</AMOUNT>
此后,我就可以针对特定的账单导入付款凭证。