Solved

send Invoice in mail

Posted on 2016-11-17
4
28 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
change password links 7 74
MySQL  on Tomcat 8 29
javascript date picker in php while loop 5 27
php construct 4 0
Find out what you should include to make the best professional email signature for your organization.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
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…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

920 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

13 Experts available now in Live!

Get 1:1 Help Now