Location: PHPKode > scripts > PHP Online Invoice System > php-online-invoice-system/admin_invoice_print.php
<?
/*
 * Exemplar Web hosting
 * http://www.exemplar.biz
 *
 * Title: PHP Online Invoice System
 * Version: 2.0
 * Author: Exemplar
 * Date: 01-01-2006
 *
*/
session_start();
if(!session_is_registered("client_id"))
{
header("Location: index.php");
exit;
}

include "inc/dbconnect.php";
$result = mysql_query("SELECT invoices.*,clients.* FROM invoices,clients WHERE invoices.clientid=clients.clientid && invoices.id = '$id'",$db);
include ("inc/date.php");
while ($row = mysql_fetch_array($result))
{
	$invoiceid = $row["id"];
	$clientid = $row["clientid"];
	$client_title = $row["company"];
	$date = $row["date"];
	$bill_date = $row["bill_date"];
	$due_date = $row["due_date"];
	$paid_date = $row["paid_date"];
	$dateshow = fixDate($date);
	$dateshow1 = fixDate($bill_date);
	$dateshow2 = fixDate($due_date);
	$dateshow3 = fixDate($paid_date);
	$dateshow4 = fixdate($today);
	$shipping = $row["shipping"];
	$salestax = $row["salestax"];
	$subtotal = $row["subtotal"];

	$total = $row["total"];
	$misc = $row["misc"];
	$note = $row["note"];
	$status = $row["status"];
	$purchaseorder=$row["purchaseorder"];
	$taxid = $row["taxid"];
	$first_name = $row["first_name"];
    $last_name = $row["last_name"];
    $company = $row["company"];
    $address = $row["address"];
    $city = $row["city"];
    $state = $row["state"];
    $zip = $row["zip"];
    $shiptoname = $row["shiptoname"];
    $shiptoaddr = $row["shiptoaddr"];
    $shiptocity = $row["shiptocity"];
    $shiptostate = $row["shiptostate"];
    $shiptozip = $row["shiptozip"];

    $serv1qty = $row["serv1qty"];
    $serv1desc = $row["serv1desc"];
    $serv1amt = $row["serv1amt"];
    $serv1tax = $row["serv1tax"];
    $serv1rate = $row["serv1rate"];

    $serv2qty = $row["serv2qty"];
    $serv2desc = $row["serv2desc"];
    $serv2amt = $row["serv2amt"];
    $serv2tax = $row["serv2tax"];
    $serv2rate = $row["serv2rate"];

    $serv3qty = $row["serv3qty"];
    $serv3desc = $row["serv3desc"];
    $serv3amt = $row["serv3amt"];
    $serv3tax = $row["serv3tax"];
    $serv3rate = $row["serv3rate"];

    $serv4qty = $row["serv4qty"];
    $serv4desc = $row["serv4desc"];
    $serv4amt = $row["serv4amt"];
    $serv4tax = $row["serv4tax"];
    $serv4rate = $row["serv4rate"];

    $serv5qty = $row["serv5qty"];
    $serv5desc = $row["serv5desc"];
    $serv5amt = $row["serv5amt"];
    $serv5tax = $row["serv5tax"];
    $serv5rate = $row["serv5rate"];

    $serv6qty = $row["serv6qty"];
    $serv6desc = $row["serv6desc"];
    $serv6amt = $row["serv6amt"];
    $serv6tax = $row["serv6tax"];
    $serv6rate = $row["serv6rate"];

    $serv7qty = $row["serv7qty"];
    $serv7desc = $row["serv7desc"];
    $serv7amt = $row["serv7amt"];
    $serv7tax = $row["serv7tax"];
    $serv7rate = $row["serv7rate"];

    $serv8qty = $row["serv8qty"];
    $serv8desc = $row["serv8desc"];
    $serv8amt = $row["serv8amt"];
    $serv8tax = $row["serv8tax"];
    $serv8rate = $row["serv8rate"];

    $serv9qty = $row["serv9qty"];
    $serv9desc = $row["serv9desc"];
    $serv9amt = $row["serv9amt"];
    $serv9tax = $row["serv9tax"];
    $serv9rate = $row["serv9rate"];

    $serv10qty = $row["serv10qty"];
    $serv10desc = $row["serv10desc"];
    $serv10amt = $row["serv10amt"];
    $serv10tax = $row["serv10tax"];
    $serv10rate = $row["serv10rate"];

}

?>
<html>
<head>
<title></title>
<link rel="stylesheet" href="inc/style.css" type="text/css">

</head>

<body  text="#000000">
<center>
  <table width="600" border="0" cellspacing="0" cellpadding="0" style="border: 1px solid #000000">

    <tr valign="top">
      <td align="left">
        &nbsp;<table width="100%" border="0" cellspacing="0" cellpadding="0" >
          <tr>
            <td align="left" colspan="2">
<?
if($uselogo == "yes"){
echo '<img src="images/'.$companylogo.'">';
}else{
}
?>

</td>

            <td align="center" colspan="2" valign="top">
            <h1><b>INVOICE</b></h1></td>

          </tr>
          <tr>
            <td align="left" colspan="2" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-bottom: 5px">
            <b><?=$yourcompany?></b><br>
              <?=$c_address?><br>
              <?=$c_city ?>,&nbsp;<?=$c_state?>&nbsp;&nbsp;<?=$c_zip?><br>
            <?=$companyphone?>
            </p>
            </td>

            <td align="right" colspan="3" style="border-bottom: 1px solid #000000" valign="top">
            <p align="right" style="margin-right: 5px">
            <h2><?=$dateshow?></h2>
            </p></td>

          </tr>
          <tr>
            <td align="left" colspan="2" width="50%" style="border-bottom: 1px solid #000000">&nbsp;Bill to:</td>
            <td align="left" colspan="3" width="50%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000">&nbsp;Ship to:</td>
          </tr>
          <tr>
            <td align="left" colspan="2" style="border-bottom: 1px solid #000000">
<br>
<p align="left" style="margin-left: 5px">
<?=$first_name?>
<?=$last_name?><br>
<?=$company?><br>
<?=$address?><br>
<?=$city?>,
<?=$state?>
 <?=$zip?> </p><br>
            </td>
            <td align="left" colspan="3" style="border-left: 1px solid #000000; border-bottom: 1px solid #000000">
<br>
<p align="left" style="margin-left: 5px">
<?=$shiptoname?><br>
<?=$shiptoaddr?><br>
<?=$shiptocity?>,
 <?=$shiptostate?>
 <?=$shiptozip?> </p><br>
            </td>
          </tr>
          <tr>
            <td nowrap align="center" style="border-right: 1px solid #000000; border-bottom: 1px solid #000000">Customer ID</td>
            <td nowrap align="center" style="border-right: 1px solid #000000; border-bottom: 1px solid #000000">Invoice #</td>
            <td nowrap align="center" style="border-right: 1px solid #000000; border-bottom: 1px solid #000000">Purchase Order #</td>
            <td align="center" style="border-right: 1px solid #000000; border-bottom: 1px solid #000000">Tax ID</td>
            <td align="center" style="border-bottom: 1px solid #000000">Due Date</td>
          </tr>
          <tr>
            <td align="center" style="border-right: 1px solid #000000; border-bottom: 1px solid #000000"><?=$clientid?></td>
            <td align="center" style="border-right: 1px solid #000000; border-bottom: 1px solid #000000"><?=$invoiceid?></td>
            <td align="center" style="border-right: 1px solid #000000; border-bottom: 1px solid #000000">&nbsp;<?=$purchaseorder?></td>
            <td align="center" style="border-right: 1px solid #000000; border-bottom: 1px solid #000000">&nbsp;<?=$taxid?></td>
            <td align="center" style="border-bottom: 1px solid #000000"><?=$dateshow2?></td>
          </tr>
        </table>

        <table width="600" border="0" cellspacing="0" cellpadding="0" bordercolor="#CCCCCC">
          <tr valign="top">
            <td width="100%" bgcolor="#CCCCCC" colspan="5">&nbsp;</td>
          </tr>
<? //----------------------------begin description boxes-------------------------?>
          <tr valign="top">
            <td align="center" width="50" style="border-top: 1px solid #000000" bgcolor="#CCCCCC" valign="baseline">
            <p style="margin-left: 2px; margin-right: 2px">Quantity</p></td>
            <td align="center" width="100%" style="border-top: 1px solid #000000; border-left: 1px solid #000000" colspan="2" bgcolor="#CCCCCC" valign="baseline">
              Description</td>
            <td align="center" width="50" valign="baseline" style="border-top: 1px solid #000000; border-left: 1px solid #000000" bgcolor="#CCCCCC">
              <p align="center">Cost</p></td>
              <td width="50" valign="baseline" align="center" style="border-top: 1px solid #000000; border-left: 1px solid #000000" bgcolor="#CCCCCC">
              <p align="center">Extended Cost</p></td>
          </tr>
          <tr valign="top">
            <td align="center" width="50" style="border-top: 1px solid #000000; border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px"><?=$serv1qty?></p>
            </td>
            <td align="left" width="100%" style="border-left:1px solid #000000; border-top:1px solid #000000; border-bottom:1px solid #000000; " colspan="2">
             <p align="left" style="margin-left: 5px; margin-right: 5px"><?=$serv1desc?></p>
              </td>
            <td align="right" width="25" style="border-top:1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
            <p align="right"><?=$currency?><?=$serv1rate?></p>
            </td>
              <td width="100" align="right" style="border-top: 1px solid #000000; border-bottom: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv1amt?></p>
              </td>
              </tr>
<?
if($serv2amt == "" or $serv2amt == "0" or $serv2amt == "0.00"){
echo '          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px">&nbsp;</p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000" colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;</p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right"; margin-right: 2px">&nbsp;</p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right"; margin-right: 2px">&nbsp;</p></td>
          </tr>';
}else{
?>
          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px"><?=$serv2qty?> </p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000" colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;<?=$serv2desc?></p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv2rate?></p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv2amt?></p></td>
          </tr>
<?
}
?>
<?
if($serv3amt == "" or $serv3amt == "0" or $serv3amt == "0.00"){
echo '          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px">&nbsp;</p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000" colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;</p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
          </tr>';
}else{
?>
          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px"><?=$serv3qty?> </p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; " colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;<?=$serv3desc?></p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv3rate?></p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv3amt?></p></td>
          </tr>
<?
}
?>
<?
if($serv4amt == "" or $serv4amt == "0" or $serv4amt == "0.00"){
echo '          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px">&nbsp;</p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000" colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;</p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
          </tr>';
}else{
?>
          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px"><?=$serv4qty?> </p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; " colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;<?=$serv4desc?></p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv4rate?></p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <P ALIGN="RIGHT"><?=$currency?><?=$serv4amt?></p></td>
          </tr>
<?
}
?>
<?
if($serv5amt == "" or $serv5amt == "0" or $serv5amt == "0.00"){
echo '          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px">&nbsp;</p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000" colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;</p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
          </tr>';
}else{
?>
          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px"><?=$serv5qty?> </p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000" colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;<?=$serv5desc?></p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv5rate?></p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p text-align="right"><?=$currency?><?=$serv5amt?></p></td>
          </tr>
<?
}
?>
<?
if($serv6amt == "" or $serv6amt == "0" or $serv6amt == "0.00"){
echo '          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px">&nbsp;</p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000" colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;</p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
          </tr>';
}else{
?>
          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px"><?=$serv6qty?> </p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000" colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;<?=$serv6desc?></p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv6rate?></p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv6amt?></p></td>
          </tr>
<?
}
?>
<?
if($serv7amt == "" or $serv7amt == "0" or $serv7amt == "0.00"){
echo '          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px">&nbsp;</p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000" colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;</p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
          </tr>';
}else{
?>
          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px"><?=$serv7qty?> </p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; " colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;<?=$serv7desc?></p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv7rate?></p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv7amt?></p></td>
          </tr>
<?
}
?>
<?
if($serv8amt == "" or $serv8amt == "0" or $serv8amt == "0.00"){
echo '          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px">&nbsp;</p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000" colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;</p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
          </tr>';
}else{
?>
          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px"><?=$serv8qty?> </p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; " colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;<?=$serv8desc?></p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv8rate?></p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv8amt?></p></td>
          </tr>
<?
}
?>
<?
if($serv9amt == "" or $serv9amt == "0" or $serv9amt == "0.00"){
echo '          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px">&nbsp;</p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000" colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;</p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
          </tr>';
}else{
?>
          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px"><?=$serv9qty?> </p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; " colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;<?=$serv9desc?></p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv9rate?></p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv9amt?></p></td>
          </tr>
<?
}
?>
<?
if($serv10amt == "" or $serv10amt == "0" or $serv10amt == "0.00"){
echo '          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px">&nbsp;</p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000" colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;</p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
          </tr>';
}else{
?>
          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px"><?=$serv10qty?> </p>
            </td>
            <td align="left" width="100%" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; " colspan="2">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;<?=$serv10desc?></p>
              </td>
            <td align="right" width="25" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000">
              <p align="right"><?=$currency?><?=$serv10rate?></p></td>
              <td width="100" align="right" style="border-bottom: 1px solid #000000">
              <P ALIGN="RIGHT"><?=$currency?><?=$serv10amt?></p></td>
          </tr>
<?
}
?>
<?
if($misc == "" or $misc == "0" or $misc == "0.00"){
echo '          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px">Misc</p>
            </td>
            <td align="left" width="525" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000" colspan="3">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;</p>
              </td>

              <td width="100" align="right" style="border-left: 1px solid #000000; border-bottom: 1px solid #000000">
              <p align="right">&nbsp;</p></td>
          </tr>';
}else{
?>
          <tr valign="top">
            <td align="center" width="50" style="border-bottom: 1px solid #000000">
            <p align="left" style="margin-left: 5px; margin-right: 5px">Misc</p>
            </td>
            <td align="left" width="525" style="border-left: 1px solid #000000" colspan="3">
              <p align="left" style="margin-left: 5px; margin-right: 5px; margin-top: 2px">&nbsp;<?=$note?></p>
              </td>

              <td width="100" align="right" style="border-left: 1px solid #000000; border-bottom: 1px solid #000000">
              <p align="right"><?=$currency?><?=$misc?></p></td>
          </tr>
<?
}
?>
<? //-----------------------------------------end boxes---------------------------------------------------?>
          <tr valign="top">
            <td width="50" rowspan="5" style="border-bottom: 1px solid #000000">
                             &nbsp;
            </td>
            <td align="left" width="100%" style="border-top: 1px solid #000000; border-bottom: 1px solid #000000" rowspan="5">
  <p align="left" style="margin-left: 5px"><br>
       Make checks payable to:
        <br> <b><?=$payee?></b><br>
        <b><?=$c_address?></b><br>
        <b><?=$c_city?>, <?=$c_state?> <?=$c_zip?></b><br>
          Please make payment within: <b><?=$due?></b>
          </p>We Thank you for your business.<br><br><br>
            </td>
            <td align="right" width="100" style="border-top: 1px solid #000000; border-left: 1px solid #000000; border-bottom: 1px solid #000000" colspan="2">
             Misc.:</td>
            <td width="100" align="right" style="border-left: 1px solid #000000; border-bottom: 1px solid #000000">
            <?=$currency?><?=$misc?></td>
          </tr>
          <tr valign="top">
            <td align="right" width="100" style="border-left: 1px solid #000000; border-bottom: 1px solid #000000" colspan="2">
             Subtotal:</td>
            <td width="100"  align="right" style="border-left: 1px solid #000000; border-bottom: 1px solid #000000">
             <?=$currency?><?=$subtotal?></td>
          </tr>
          <tr valign="top">
            <td align="right" width="100" style="border-left: 1px solid #000000; border-bottom: 1px solid #000000" colspan="2">
            Shipping:</td>
            <td width="100"  align="right" style="border-left: 1px solid #000000; border-bottom: 1px solid #000000">
            <?=$currency?><?=$shipping?></td>
          </tr>
          <tr valign="top">
            <td align="right" width="100" style="border-left: 1px solid #000000; border-bottom: 1px solid #000000" colspan="2">
             Tax:</td>
            <td width="100"  align="right" style="border-left: 1px solid #000000; border-bottom: 1px solid #000000">
             <?=$currency?><?=$salestax?></td>
          </tr>
          <tr valign="top">
            <td align="right" width="100" style="border-left: 1px solid #000000; border-bottom: 1px solid #000000" colspan="2">
             Total:</td>
            <td width="100"  align="right" style="border-left: 1px solid #000000; border-bottom: 1px solid #000000">
             <?=$currency?><?=$total?></td>
          </tr>
        </table>

		</td>
       </tr>

  </table>


</center>

</body>
</html>
Return current item: PHP Online Invoice System