Solved

send Invoice in mail

Posted on 2016-11-17
4
64 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 110

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

631 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