Solved

send Invoice in mail

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

785 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