Solved

send Invoice in mail

Posted on 2016-11-17
4
19 Views
Last Modified: 2016-11-22
when we done the payment a automatically invoice send with message payment done or not. same like ecommerce site when payment done or not,  user get 2 mails one from payment getaway and other from site. i need same.


invoice sql

CREATE TABLE `invoice` (
  `invoice_id` int(11) NOT NULL,
  `employer_id` int(11) NOT NULL,
  `item_name` varchar(255) NOT NULL,
  `item_uid` int(11) NOT NULL,
  `item_quantity` int(11) NOT NULL,
  `item_price` int(11) NOT NULL,
  `order_id` int(11) NOT NULL,
  `status` enum('Success','Aborted','Failure','Pending') NOT NULL,
  `created_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `invoice`
--
ALTER TABLE `invoice`
  ADD PRIMARY KEY (`invoice_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `invoice`
--
ALTER TABLE `invoice`
  MODIFY `invoice_id` int(11) NOT NULL AUTO_INCREMENT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Open in new window


invoice Html

<table style="margin: 0 auto; width:50%; border: 1px solid #ccc;">
      <tbody>
		<tr>
			<td style="text-align:center; border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 100%; font-size:20px;" colspan="3"><b>Test Pvt Ltd</b></td>
		</tr>
		<tr>
			<td style="text-align:center; border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 100%;" colspan="3">D-14/1 & 14/2</td>
		</tr>
		<tr>
			<td style="text-align:center; border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 100%;" colspan="3">New Delhi</td>
		</tr>
		<tr>
			<td style="text-align:right; border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 100%;" colspan="3">46055200 / 46055300</td>
		</tr>
		<tr>
			<td colspan="3" style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 100%;">Email: test@gmail.com</td>
		</tr>
		<tr>
			<td style="text-align:center; border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 100%;" colspan="3"><b>Invoice</b></td>
		</tr>
		<tr>
			
					<td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 50%;" colspan="2">Invoice # SCPL/2016-17/</td>
					<td style="text-align:right; border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 50%;"colspan="2" >8/22/2016</td>
			
		</tr>
		<tr>
			<td colspan="3" style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 100%;">Name of Buyer</td>
		</tr>
		<tr>
			<td colspan="3" style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 100%;">Address of Buyer</td>
		</tr>
		<tr>
			<td  colspan="3"style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 100%;">Kind Attn : </td>
		</tr>
       
		<tr>
			
					<td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 20%;">S. No.</td>
					<td style="text-align:center; border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 60%;" >PARTICULARS</td>
					<td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 20%;">Amount (in Rs.)</td>
			
		</tr>
		$i = 1;
         while($fetc = mysql_fetch_array()){
			<tr>
			
					<td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 20%;">$i;</td>
					<td style="text-align:center; border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 60%;" >$fetc["item_name"]</td>
					<td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 20%;text-align:right;">$fetc["item_price"]</td>
			
			</tr>
			$i++;
		 }
		<tr>
			
					<td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 20%;">2</td>
					<td style="text-align:right; border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 60%;" >Sub Total</td>
					<td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 20%;text-align:right;">5,200.00</td>
			
		</tr>
		
         
          <tr>
			<td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 20%;">3</td>
            <td style="text-align:right; border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 60%;">Service Tax @ 14 % .</td>
            <td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 20%;text-align:right;">00.00</td>
          </tr>
		  <tr>
			<td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 20%;">4</td>
            <td style="text-align:right; border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 60%;">Swach Bharat Cess @ 0.5 %</td>
            <td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 20%;text-align:right;">00.00</td>
          </tr>
		  <tr>
			<td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 20%;">5</td>
            <td style="text-align:right; border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 60%;">Krishi Kalyan Cess @ 0.5%</td>
            <td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 20%;text-align:right;">00.00</td>
          </tr>
		  <tr>
			<td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 20%;">6</td>
            <td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 60%;">Total</td>
            <td style="border: 1px solid #ccc; line-height: 22px; padding: 2px; width: 20%;text-align:right;">200.00</td>
          </tr>
		</tbody>
		
      </table>

Open in new window

0
Comment
Question by:Amita Singh
  • 3
4 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 41891410
I see you are not accepting suggestions for Gigs, but when the question is "I need" the E-E Gigs is really a good place to go.  If you have written some code and you're stuck on something we can answer questions about that sort of thing, but we cannot write your applications for free, sorry.
0
 
LVL 2

Author Comment

by:Amita Singh
ID: 41891638
@Ray,
Thank u for reply
I don't say you develop code and give me. maybe i not explain my question very well. and
i need
 does not mean i order you to solve my problem. i stuck somewhere thats why i post my question.
Thank You
0
 
LVL 2

Accepted Solution

by:
Amita Singh earned 0 total points
ID: 41892630
i get the solution. i found my code error.
0
 
LVL 2

Author Closing Comment

by:Amita Singh
ID: 41897240
Thanx
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now