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...
PHP AND TALLYBRIDGE BETWEEN PHP AND TALLY
Page 1 of 1
5 Replies - 2552 Views - Last Post: 07 February 2013 - 06:49 AM
Replies To: PHP AND TALLY
#2
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.
#3
Re: PHP AND TALLY
Posted 30 December 2010 - 08:58 PM
CTphpnwb, 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'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'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();
}
#4
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.
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.
#5
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>
#6
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.
Page 1 of 1
|
|

New Topic/Question
This topic is locked




MultiQuote




|