PHP AND TALLY

BRIDGE BETWEEN PHP AND TALLY

Page 1 of 1

5 Replies - 2900 Views - Last Post: 07 February 2013 - 06:49 AM Rate Topic: -----

#1 itdev3  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 2
  • Joined: 28-December 10

PHP AND TALLY

Posted 29 December 2010 - 09:55 PM

I stuck to push data to tally from PHP form.
I have application to purchase products online and created the invoice. I want to save this invoice to tally database.

How can make connection between PHP and TALLY

how it can be done ..please help me...
Is This A Good Question/Topic? 1
  • +

Replies To: PHP AND TALLY

#2 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3100
  • View blog
  • Posts: 10,889
  • Joined: 08-August 08

Re: PHP AND TALLY

Posted 30 December 2010 - 11:54 AM

Because english is apparently a second language for you I'm not going to close this topic just yet. Instead I'm going to assume that you misunderstood the rules when you read them and try to make them clearer. In order to receive help:
  • You must provide your code.
  • You must describe what it is intended to do.
  • You must describe the problem you're having with your code.
  • You must describe your attempts to solve the problem.

Was This Post Helpful? 0
  • +
  • -

#3 itdev3  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 2
  • Joined: 28-December 10

Re: PHP AND TALLY

Posted 30 December 2010 - 08:58 PM

View PostCTphpnwb, on 30 December 2010 - 10:54 AM, said:

Because english is apparently a second language for you I'm not going to close this topic just yet. Instead I'm going to assume that you misunderstood the rules when you read them and try to make them clearer. In order to receive help:
  • You must provide your code.
  • You must describe what it is intended to do.
  • You must describe the problem you're having with your code.
  • You must describe your attempts to solve the problem.



Following code is for c#.
But I want to use it with PHP.
How can make connection with php and write xmlObject using PHP

try
            {
            
            xmlstc = xmlstc + "<VOUCHER VCHTYPE="+"\""+"Receipt"+"\" ACTION="+"\""+"Create"+"\">";
            xmlstc = "<ENVELOPE>";
            xmlstc = xmlstc + "<HEADER>" ;
            xmlstc = xmlstc + "<TALLYREQUEST>Import Data</TALLYREQUEST>" ;
            xmlstc = xmlstc + "</HEADER>";
            xmlstc = xmlstc + "<BODY>";
            xmlstc = xmlstc + "<IMPORTDATA>";
            xmlstc = xmlstc + "<REQUESTDESC>";
            xmlstc = xmlstc + "<REPORTNAME>Vouchers</REPORTNAME>";
            xmlstc = xmlstc + "<STATICVARIABLES>" ;
            xmlstc = xmlstc + "<SVCURRENTCOMPANY>" + "##SVCURRENTCOMPANY" + "</SVCURRENTCOMPANY>" ;
            xmlstc = xmlstc + "</STATICVARIABLES>";
            xmlstc = xmlstc + "</REQUESTDESC>";
            
            xmlstc = xmlstc + "<REQUESTDATA>";
            
           
            strVchNumber = txtVhrNo.Text;
            //strDate = "01/04/2020";
            strDate = dtpDate.Value.Date.ToShortDateString();
            strNarration = txtName.Text;
            strAmount = txtAmount.Text;
            
            xmlstc = xmlstc + "<TALLYMESSAGE >";
            xmlstc = xmlstc + "<VOUCHER VCHTYPE=" + "\"" + "Receipt" + "\" ACTION=" + "\"" + "Create" + "\">";
            xmlstc = xmlstc + "<VOUCHERNUMBER>" + strVchNumber + "</VOUCHERNUMBER>" ;
            xmlstc = xmlstc + "<DATE>" + strDate + "</DATE>";
            xmlstc = xmlstc + "<EFFECTIVEDATE>" + strDate + "</EFFECTIVEDATE>";
            xmlstc = xmlstc + "<NARRATION>" + strNarration + "</NARRATION>";
            xmlstc = xmlstc + "<VOUCHERTYPENAME>" + strVchType + "</VOUCHERTYPENAME>";
    
              //Credit Ledger
                            xmlstc = xmlstc + "<ALLLEDGERENTRIES.LIST>";
                            xmlstc = xmlstc + "<LEDGERNAME>" + "Tution Fees - D&apos;Ring" + "</LEDGERNAME>" ;
                            xmlstc = xmlstc + "<ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>";
                            xmlstc = xmlstc + "<AMOUNT>" + strAmount + "</AMOUNT>";
                            xmlstc = xmlstc + "</ALLLEDGERENTRIES.LIST>" ;
            
             //Debit Ledger
                            xmlstc = xmlstc + "<ALLLEDGERENTRIES.LIST>" ;
                            xmlstc = xmlstc + "<LEDGERNAME>" + "Tution Fees - D&apos;Ring" + "</LEDGERNAME>" ;
                            xmlstc = xmlstc + "<ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>";
                            xmlstc = xmlstc + "<AMOUNT>-" + strAmount + "</AMOUNT>";
                            xmlstc = xmlstc + "</ALLLEDGERENTRIES.LIST>";
                        
            xmlstc = xmlstc + "</VOUCHER>";
            xmlstc = xmlstc + "</TALLYMESSAGE>";
            xmlstc = xmlstc + "</REQUESTDATA>";
            xmlstc = xmlstc + "</IMPORTDATA>";
            xmlstc = xmlstc + "</BODY>";
            xmlstc = xmlstc + "</ENVELOPE>";

            

            string result = "";
            

            HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("http://localhost:9000");
            httpWebRequest.Method = "POST";
            httpWebRequest.ContentLength = xmlstc.Length;
            httpWebRequest.ContentType = "application/x-www-form-urlencoded";

            streamWriter = new StreamWriter(httpWebRequest.GetRequestStream());
            streamWriter.Write(xmlstc);
            MessageBox.Show("Data inserted into Tally sucessfully");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, ex.StackTrace);
            }
            finally
            {
                streamWriter.Close();
            }

Was This Post Helpful? 0
  • +
  • -

#4 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3100
  • View blog
  • Posts: 10,889
  • Joined: 08-August 08

Re: PHP AND TALLY

Posted 30 December 2010 - 09:12 PM

Ok, I'll rephrase.
Your code must be your php code.
Your description of it should be more than what language it runs in.
Your description of your problem should not describe what you want it to do, but instead describe what your attempt to accomplish your goal is, and where you see it failing.
Was This Post Helpful? 0
  • +
  • -

#5 ajaip1@gmail.com  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 27-September 10

Re: PHP AND TALLY

Posted 07 February 2013 - 04:05 AM

Use just like Ajax or Jquery to post the data on tally server IP or localhost/<Port Number>
Was This Post Helpful? 0
  • +
  • -

#6 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3100
  • View blog
  • Posts: 10,889
  • Joined: 08-August 08

Re: PHP AND TALLY

Posted 07 February 2013 - 06:48 AM

This topic is over two years old and the OP never made an effort. Please let sleeping dogs lie.
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1