如何在理货erp 9中导入会计凭证

How to import accounting voucher with item, quantity, rate and amount in tally ERP 9.

I am developing an android application which should transfer the inventory data to Tally. so far i've managed to send the data to tally using PHP, but tally imports all the data except quantity and rate.

here is the code :

    `<form action="" method="post">
     <table width="100%" border="1">
         <tr>
           <th scope="col">Name</th>
           <td><input name="nm" id="nm" type="text" /></td>
         </tr>
         <tr>
           <td colspan="4"><div align="center">
               <label>
                  <input type="submit" name="Submit" value="Submit" />
              </label>
            </div></td>
          </tr>
        </table>
      </form>

<?php
/* This is PHP code to insert an entry in Tally. All required XML tags by Tally are taken here in a string and name for Ledger is taken by posted value from HTML form. */


if(isset($_POST['Submit']))
    {
        $name = $_POST['nm'];
        $requestXML = '
        <ENVELOPE>
        <HEADER>
        <TALLYREQUEST>Import Data</TALLYREQUEST>
        </HEADER>
        <BODY>
        <IMPORTDATA>
        <REQUESTDESC>
        <REPORTNAME>All Masters</REPORTNAME>
        <STATICVARIABLES>
        <SVCURRENTCOMPANY>PYROTECH ENGINEERS 2015-16</SVCURRENTCOMPANY>
        </STATICVARIABLES>
        </REQUESTDESC>
        <REQUESTDATA>
        <TALLYMESSAGE xmlns:UDF="TallyUDF">
        <VOUCHER VCHTYPE="Sales of Job Work" ACTION="Create">
        <DATE>20151001</DATE>
        <PARTYNAME>PAVANI ENGINEERS</PARTYNAME>
        <VOUCHERTYPENAME>Sales of Job Work</VOUCHERTYPENAME>
        <VOUCHERNUMBER>1</VOUCHERNUMBER>
        <REFERENCE>666</REFERENCE>
        <PARTYLEDGERNAME>PAVANI ENGINEERS</PARTYLEDGERNAME>
        <BASICBASEPARTYNAME>PAVANI ENGINEERS</BASICBASEPARTYNAME>
        <FBTPAYMENTTYPE>Default</FBTPAYMENTTYPE>
        <PERSISTEDVIEW>Invoice Voucher View</PERSISTEDVIEW>
        <BASICBUYERNAME>PAVANI ENGINEERS</BASICBUYERNAME>
        <LEDGERENTRIES.LIST>
        <LEDGERNAME>PAVANI ENGINEERS</LEDGERNAME>
        <ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>
        <LEDGERFROMITEM>No</LEDGERFROMITEM>
        <REMOVEZEROENTRIES>No</REMOVEZEROENTRIES>
        <ISPARTYLEDGER>Yes</ISPARTYLEDGER>                        
        <ISLASTDEEMEDPOSITIVE>Yes</ISLASTDEEMEDPOSITIVE>
        <AMOUNT>-193.20</AMOUNT>
        </LEDGERENTRIES.LIST>
        <ALLINVENTORYENTRIES.LIST>
        <STOCKITEMNAME>MY ITEM1</STOCKITEMNAME>
        <ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>
        <ISLASTDEEMEDPOSITIVE>No</ISLASTDEEMEDPOSITIVE>
        <ISAUTONEGATE>No</ISAUTONEGATE>
        <ISCUSTOMSCLEARANCE>No</ISCUSTOMSCLEARANCE>
        <ISTRACKCOMPONENT>No</ISTRACKCOMPONENT>
        <ISTRACKPRODUCTION>No</ISTRACKPRODUCTION>
        <ISPRIMARYITEM>No</ISPRIMARYITEM>
        <ISSCRAP>No</ISSCRAP>
        <RATE>21.00/KGS</RATE>
        <AMOUNT>193.20</AMOUNT>
        <ACTUALQTY> 9.200 KGS =  50.00 QTY</ACTUALQTY>
        <BILLEDQTY> 9.200 KGS =  50.00 QTY</BILLEDQTY>
        <BATCHALLOCATIONS.LIST>
        <GODOWNNAME>Main Location</GODOWNNAME>
        <BATCHNAME>Primary Batch</BATCHNAME>
        <DESTINATIONGODOWNNAME>Main Location</DESTINATIONGODOWNNAME>
        <INDENTNO/>
        <ORDERNO/>
        <TRACKINGNUMBER/>
        <DYNAMICCSTISCLEARED>No</DYNAMICCSTISCLEARED>
        <AMOUNT>193.20</AMOUNT>
        <ACTUALQTY> 9.200 KGS =  50.00 QTY</ACTUALQTY>
        <BILLEDQTY> 9.200 KGS =  50.00 QTY</BILLEDQTY>
        <ADDITIONALDETAILS.LIST> </ADDITIONALDETAILS.LIST>
        <VOUCHERCOMPONENTLIST.LIST> </VOUCHERCOMPONENTLIST.LIST>
        </BATCHALLOCATIONS.LIST>
        <ACCOUNTINGALLOCATIONS.LIST>
        <OLDAUDITENTRYIDS.LIST TYPE="Number">
        <OLDAUDITENTRYIDS>-1</OLDAUDITENTRYIDS>
        </OLDAUDITENTRYIDS.LIST>
        <LEDGERNAME>LABOUR CHARGES RECEIVED</LEDGERNAME>
        <GSTCLASS/>
        <ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>
        <LEDGERFROMITEM>No</LEDGERFROMITEM>
        <REMOVEZEROENTRIES>No</REMOVEZEROENTRIES>
        <ISPARTYLEDGER>No</ISPARTYLEDGER>
        <ISLASTDEEMEDPOSITIVE>No</ISLASTDEEMEDPOSITIVE>
        <AMOUNT>193.20</AMOUNT>
        <BANKALLOCATIONS.LIST> </BANKALLOCATIONS.LIST>
        <BILLALLOCATIONS.LIST> </BILLALLOCATIONS.LIST>
        <INTERESTCOLLECTION.LIST> </INTERESTCOLLECTION.LIST>
        <OLDAUDITENTRIES.LIST> </OLDAUDITENTRIES.LIST>
        <ACCOUNTAUDITENTRIES.LIST> </ACCOUNTAUDITENTRIES.LIST>
        <AUDITENTRIES.LIST> </AUDITENTRIES.LIST>
        <TAXBILLALLOCATIONS.LIST> </TAXBILLALLOCATIONS.LIST>
        <TAXOBJECTALLOCATIONS.LIST> </TAXOBJECTALLOCATIONS.LIST>
        <TDSEXPENSEALLOCATIONS.LIST> </TDSEXPENSEALLOCATIONS.LIST>
        <VATSTATUTORYDETAILS.LIST> </VATSTATUTORYDETAILS.LIST>
        <COSTTRACKALLOCATIONS.LIST> </COSTTRACKALLOCATIONS.LIST>
        </ACCOUNTINGALLOCATIONS.LIST>
        <TAXOBJECTALLOCATIONS.LIST> </TAXOBJECTALLOCATIONS.LIST>
        <EXCISEALLOCATIONS.LIST> </EXCISEALLOCATIONS.LIST>
        <EXPENSEALLOCATIONS.LIST> </EXPENSEALLOCATIONS.LIST>
        </ALLINVENTORYENTRIES.LIST>
        </VOUCHER>
        </TALLYMESSAGE>
        </REQUESTDATA>
        </IMPORTDATA>
        </BODY>
        </ENVELOPE>';

/* Actual code for importing goes here */
        $server = 'localhost:9002';
        $headers = array( "Content-type: text/xml" ,"Content-length: ".strlen($requestXML) ,"Connection: close" );

        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $server);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_TIMEOUT, 100);
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $requestXML);
        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
        $data = curl_exec($ch);

        if(curl_errno($ch)){
            print curl_error($ch);
            echo "  something went wrong..... try later";
        }else{
            echo " request accepted";
            print $data;
            curl_close($ch);
        }
    }

?>`

As it turns out there is nothing wrong with my code the problem was at my clients tally voucher template. importing this code in a standard tally accounting voucher inserts the data properly.