</tr>
    	 
    	</table>
    	
    	 
	</td>
	</tr>
</table>

<br/>
<?php if(!empty($error_msg)){ ?>
	<div class="msg_error" style="width:70%; margin-left:auto;margin-right:auto;">
		<?php echo $error_msg ?>
	</div>
<?php } ?>
  <form action="<?php echo $PHP_SELF.'?id='.$invoice->getId(); ?>" method="post" >
 	<input id="action" type="hidden" name="action" value="<?php if(!empty($idc)) echo "update"; else echo "add" ?>"/>
	<input id="idc" type="hidden" name="idc" value="<?php if(!empty($idc)) echo $idc;?>"/>
	<table class="invoice_table">
		<tr class="form_invoice_head">
	    	<td colspan="2" align="center"><font color="#FFFFFF"><?php echo gettext("ADD INVOICE ITEM "); ?></font></td>
		</tr>
		<tr >
	    	<td colspan="2">&nbsp;</td>
		</tr>
		<?php
			if(empty($date)){
				$date = date("Y-m-d H:i:s");
			}
		?>
		<tr>
</table>

<br/>
<?php 
if (!empty($error_msg)) {
    ?>
    <div class="msg_error" style="width:70%; margin-left:auto;margin-right:auto;">
        <?php 
    echo $error_msg;
    ?>
    </div>
<?php 
}
?>
  <form action="<?php 
echo $PHP_SELF . '?id=' . $invoice->getId();
?>
" method="post" >
     <input id="action" type="hidden" name="action" value="<?php 
if (!empty($idc)) {
    echo "update";
} else {
    echo "add";
}
?>
"/>
    <input id="idc" type="hidden" name="idc" value="<?php 
if (!empty($idc)) {
    echo $idc;
}
?>