Forums

Invoice and timesheet for subcontracting

samoht 15 Dec, 2008
Since I have been so blessed by this component; Max; Bob and others in the forum - I thought I would share this little set-up for keeping hours and sending invoices with a time sheet.

For my job, I'm a subcontractor for one company so I needed to email all my invoices to the same place - but I'm sure that if you needed to separate them out it would not be to hard.

(A couple of things to note: I only have a hard coded selectbox for billable clients. The first form also stores data into a table named jos-chronoforms_timesheet2. Also to use the forms you will need to create a directory and name it "invoices" at the root level of the Joomla install. This is where the form will store the WORD.doc invoices that it creates)

This has really saved me some time in recording my hours and in gathering and sending my invoices out - hopefully it can helps others save time as well.
[attachment=0]Invoice-timesheet_forms.zip[/attachment]
Max_admin 15 Dec, 2008
Thank you for sharing this!🙂 if you didn't vote for us on the JED and have 2 free minutes sometime then please do!

Best regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
samoht 15 Dec, 2008
Sorry Max - were do I go to vote for you?
GreyHead 15 Dec, 2008
HI samoht,

I think that's the Joomla Extension Directory - click the Joomla.org link in Max's sig (maybe in mine too - I forget!)

Bob
peasea 17 Dec, 2008
If you guys get a minute, please post the "rest of the story" with this form. If I want to go all the way to having this post to a new table in my db, what do I do. Step by step, I've tried the tutorials, but can't find the complete picture...

Example -

Step one - download the backup to your hard drive, unzip it to a folder. (if working from a backup) upload, etc.
Step two - select the form from the form manager window, then click on "create table button"
Step three - click on the box to put a check next to all columns in the add table dialog so that a column for each field is added to your database
Step four - change the field types from "var555" to some other format... (???)
Step five - ?????

I've been trying to get some of the posted example forms working but keep stumbling... one of the basic problems I was having with my own forms is getting checkbox values to hit the database when users select more than one values - the autocreate code doesn't seem to have an implode references (that seem to be needed by reading the forums).
samoht 17 Dec, 2008
Hi peasea,

do you need help with the forms that I included here?

if so there are only a few modifications to the datarange form that need to be made to suit your own situation. Once those updates (like company name, Invoice clients etc) are made you can use the forms. For these forms you just have to create the table for timesheet2 - to do this just check the checkbox next to timesheet2 and hit the create table button (top right) then select all the fields and hit save.

I assume you know this already. Your question about the radio's and checkboxes can be answered in the some of the threads in this forum (I've seen a few I think) but basically if you name your checkbox with [] following the name that will tell cf that you are storing an array of values and not just one.
peasea 17 Dec, 2008
I really appreicate your reply - I see the client list, the names, the emails, etc. I tried creating the database from the timesheet2 form and that works well. But it calls another form called "checktime" at the end - I don't have this. Also the form called daterange doesn't seem to work - I get an error on this one. Is this the piece that creates the word doc in the invoices folder in the joomla root? I'm certainly a newbie, but I"d be happy to post a "how to for dummies" once I figure it out.

The daterange form gives me this error: Parse error: syntax error, unexpected '[' in /homepages/5/d162713958/htdocs/chanpart/components/com_chronocontact/chronocontact.html.php(319) : eval()'d code on line 60

The timesheet2 form stores the data in the db, but errors out because it can't find this form: index.php?option=com_chronocontact&chronoformname=checktime

On the other subject regarding the checkbox items, I've looked all over for the info I need and followed some various threads on the subject. My email template shows the right values now but I can't seem to get the values into the database, (though a few times I have been able to get it to take one of the many options) I have the brackets after my field in the Name area - example <INPUT TYPE="checkbox" CHECKED NAME="Feature[]" VALUE="Home" id="Feature[]">
samoht 17 Dec, 2008
Hello peasea,

Yes, you will get an error on line 60; line 276; line 302; and maybe line 312 because these lines need to be modified to suit your needs. where you see "[ your something here]" in the code - that was my way of telling you to personalize this info. take out the brackets and insert the data it asks for.

for example: if it says "[your rate here]" - then replace that with 50.75 (or what ever hourly rate you bill your clients).

Concerning the "checktime" form that is just a redirect - you can point that to whatever form or page you want. (if you would like my checktime form let me know and I'll post it)

about the brackets. the database should store the values in an array as long as you wrote the code ok and the auto gen is setup correctly. I believe it will save the values separated by a comma - so when you want to get those values back (if you want to display the results) you will need a foreach loop or something to pull each value. maybe if you include a code block we could see if there is a problem?
peasea 18 Dec, 2008
HUGE progress. Thank you, thank you, thank you. You're a wizard. Sorry, I didn't notice all of the instances that needed customization in the code. We're getting the daterange form to come up, the popup calendar in the two fields, and the submit button. Now to tie it all together. I've tried entering some bogus time records but they dont' seem to be coming into the daterange form/invoice part. I can enter dates but the next "screen" shows nada but has two buttons edit and submit (even if I select a date range that I know has hours in it). The date also comes up in a non-US format (16/12/2008) for Dec 16, 2008 - not a big problem just a bit odd looking. Then the "invoice confirmation" form simply says, Invoice CONFIRMATION and has the two buttons - submit and edit. I sort of expected to see some summary of the hours - but perhaps it's blank because it's not finding any info.

The database has this record - Field name Field Data
cf_id : 5
uid : IYjhjNjFkOGI0NDU2
recordtime : 2008-12-17 - 19:34:17
ipaddress : 67.166.247.222
cf_user_id : 0
timeIn :
ts_timein : 19:34:00
timeOut :
ts_timeout : 19:39:00
ts_client : Diecicolori.com
ts_dscr : Testing website

But when I use December 16 to December 18, the invoice confirm and email is blank.

Time sheet for PEASEA for: 16/12/2008 to 18/12/2008
Total time: 00:00:00
Decimal time: 0
Total Cost: $0


Over all Total hours: 00:00:00
Over all Total cost: $0

form code:
<?php

// Check if the form is editable or not  
$readonly = ""; 
$edit = true; 
if ( $_POST['submit'] && $_POST['submit'] == "Confirm" ) { 
    $edit = false; 
    //$att = true;
    $readonly = "readonly='readonly'"; 
}

?>

<?php if($_POST['date_0']){ ?>
<div class="mainform">

<h3>Invoice CONFIRMATION</h3>
<input type="hidden" id="startdate" name="startdate" value="<?php echo $_POST['date_0'] ?>" />
<input type="hidden" id="enddate" name="enddate"  value="<?php echo $_POST['date_1'] ?>" />
<?php
global $mainframe;
$database =& JFactory::getDBO();
$database->setQuery( 'SELECT TIMEDIFF(ts_timeout, ts_timein) as totaltime, TIME_TO_SEC(TIMEDIFF(ts_timeout, ts_timein)) as totalsecs, ts_client, ts_dscr, ts_created 
					FROM jos_chronoforms_timesheet2 
					WHERE ts_created BETWEEN "' .$_POST['date_0'].'" AND "'.$_POST['date_1'].'"
					ORDER BY ts_client, ts_created');
$database->query();
$records = $database->loadAssocList();
								

$c=1;
$t=0;
$prevclient = '';
 
	foreach( $records as $row ) {
		if($row['ts_client'] != $prevclient){
			if($prevclient != '') {
				//this is just to add extra rows for filling out the page!
				for($w=0; $w < 17 - $t; $w++){
					$str .=  '
					<tr>
						<td> </td>
						<td> </td>
						<td> </td>
						<td> </td>
					</tr>';
				}
				//get the total time in seconds and convert it to a decimal for each client
				$n=$gt/3600;
				//close each client table except for the last
				$str .=  '
							<tr style="page-break-inside:avoid;height:.2in">
							  <td width=414 valign=top style="width:310.5pt;border:none;padding:2.15pt 5.75pt 2.15pt 5.75pt;  height:.2in">
							  <p class=MsoNormal> </p>
							  </td>
							  <td width=204 colspan=2 style="width:153.0pt;border:none;border-right:solid windowtext 1.0pt;  padding:2.15pt .15in 2.15pt .15in;height:.2in">
							  <p class=RightAligned>TOTAL</p>
							  </td>
							  <td width=102 style="width:76.5pt;border-top:none;border-left:none;  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;  padding:2.15pt .15in 2.15pt .15in;height:.2in">
							  <p class=Amount>$'.round($n * 200, 2) .'</p>
							  </td>
							</tr>
						</table>
					</div>
					<p class=MsoNormal> </p>
					<div align=center>
						<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=720 style="width:7.5in;border-collapse:collapse">
						 <tr style="height:109.9pt">
						  <td width=720 valign=bottom style="width:7.5in;padding:5.75pt 5.75pt 5.75pt 5.75pt;  height:109.9pt">
						  <p class=MsoNormal>Make all checks payable to My Company LLC</p>
						  <p class=MsoNormal>Total due in 15 days. Overdue accounts subject to a  service charge of 1% per month.</p>
						  <p class=MsoNormal> </p>
						  </td>
						 </tr>
						 <tr style="height:.3in">
						  <td width=720 style="width:7.5in;padding:0in 5.4pt 0in 5.4pt;height:.3in">
						  <p class=Thankyou>Thank you for your business!</p>
						  </td>
						 </tr>
						</table>
					</div>
					<p class=MsoNormal> </p>
					</body>
				</html>	'."\n";
				fwrite($fp, $str);
				fclose($fp); 
				//set these back to 0 so that the total does not include the previous clients
				$n=0;
				$gt = 0;
				$t=0;
				$fp='';
				$str='';
			}
			// start the new WORD document
			
			$cname = str_replace(".","-",$row['ts_client']);
			$filename = 'invoices/'.$cname.'-invoice_'.date('m-d-Y').'.doc';
			$fp = fopen($filename, 'x+');
			//start writting the file contents.
			//throw in some style 
			$str = '
			<html>
			<style>
			<!--
			 /* Font Definitions */
			 @font-face
				{font-family:Tahoma;
				panose-1:2 11 6 4 3 5 4 4 2 4;}
			 /* Style Definitions */
			 p.MsoNormal, li.MsoNormal, div.MsoNormal
				{margin:0in;
				margin-bottom:.0001pt;
				line-height:110%;
				font-size:8.5pt;
				font-family:Tahoma;
				letter-spacing:.2pt;}
			h1
				{margin:0in;
				margin-bottom:.0001pt;
				text-align:right;
				line-height:110%;
				font-size:20.0pt;
				font-family:Tahoma;
				color:gray;
				letter-spacing:.2pt;}
			h2
				{margin:0in;
				margin-bottom:.0001pt;
				line-height:110%;
				font-size:8.0pt;
				font-family:Tahoma;
				text-transform:uppercase;
				letter-spacing:.2pt;}
			h3
				{margin:0in;
				margin-bottom:.0001pt;
				line-height:110%;
				font-size:8.5pt;
				font-family:Tahoma;
				letter-spacing:.2pt;
				font-weight:normal;
				font-style:italic;}
			p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
				{margin:0in;
				margin-bottom:.0001pt;
				line-height:110%;
				font-size:8.0pt;
				font-family:Tahoma;
				letter-spacing:.2pt;}
			p.Companyname, li.Companyname, div.Companyname
				{margin-top:7.0pt;
				margin-right:0in;
				margin-bottom:0in;
				margin-left:0in;
				margin-bottom:.0001pt;
				line-height:110%;
				font-size:12.0pt;
				font-family:Tahoma;
				letter-spacing:.2pt;
				font-weight:bold;}
			p.Columnheading, li.Columnheading, div.Columnheading
				{margin:0in;
				margin-bottom:.0001pt;
				text-align:center;
				line-height:110%;
				font-size:8.0pt;
				font-family:Tahoma;
				letter-spacing:.2pt;
				font-weight:bold;}
			p.RightAligned, li.RightAligned, div.RightAligned
				{margin:0in;
				margin-bottom:.0001pt;
				text-align:right;
				line-height:110%;
				font-size:8.0pt;
				font-family:Tahoma;
				text-transform:uppercase;
				letter-spacing:.2pt;}
			p.Thankyou, li.Thankyou, div.Thankyou
				{margin:0in;
				margin-bottom:.0001pt;
				text-align:center;
				line-height:110%;
				font-size:10.0pt;
				font-family:Tahoma;
				letter-spacing:.2pt;
				font-weight:bold;}
			p.Amount, li.Amount, div.Amount
				{margin:0in;
				margin-bottom:.0001pt;
				text-align:right;
				line-height:110%;
				font-size:8.5pt;
				font-family:Tahoma;
				letter-spacing:.2pt;}
			@page Section1
				{size:8.5in 11.0in;
				margin:.5in .5in 36.7pt .5in;}
			div.Section1
				{page:Section1;}
			 /* List Definitions */
			 ol
				{margin-bottom:0in;}
			ul
				{margin-bottom:0in;}
			-->
			</style>
			<body>
			'."\n";
			$strc=$row['ts_client'];
			$fl=$strc[0];
			//begin actual page
			$str .= '
			<div align=center>
				<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=720 style="width:7.5in;border-collapse:collapse">
				 <tr style="height:39.75pt">
				  <td width=361 rowspan=2 valign=top style="width:270.6pt;padding:0in 5.4pt 0in 5.4pt;  height:39.75pt">
				  <p class=Companyname>My Company LLC</p>
				  <h3>Web work</h3>
				  <p class=MsoNormal> </p>
				  <p class=MsoNormal>1000 Pennsylvania Court</p>
				  <p class=MsoNormal>Martindale, TX 45332</p>
				  <p class=MsoNormal>Phone (356)808-0376  </p>
				  </td>
				  <td width=359 valign=top style="width:269.4pt;padding:0in 5.4pt 0in 5.4pt;  height:39.75pt">
				  <h1>INVOICE</h1>
				  </td>
				 </tr>
				 <tr style="height:39.75pt">
				  <td width=359 valign=bottom style="width:269.4pt;padding:0in 5.4pt 0in 5.4pt; height:39.75pt">
				  <p class=RightAligned>Invoice #'.$c.'</p>
				  <p class=RightAligned>Date: '.date('F jS, Y').'</p>
				  </td>
				 </tr>
				</table>
			</div>
			<p class=MsoNormal> </p>
			<div align=center>
				<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=720 style="width:7.5in;border-collapse:collapse">
				 <tr style="height:1.0in">
				  <td width=360 valign=top style="width:3.75in;padding:0in 5.4pt 0in 5.4pt;  height:1.0in">
				  <h2>To:</h2>
				  <p class=MsoNormal>PeaSea</p>
				  <p class=MsoNormal>My Company LLC</p>
				  <p class=MsoNormal>1000 Pennsylvania Court</p>
				  <p class=MsoNormal>Martindale, TX 45332</p>
				  <p class=MsoNormal></p>
				  </td>
				  <td width=360 valign=top style="width:3.75in;padding:0in 5.4pt 0in 5.4pt;  height:1.0in">
				  <h2>For:</h2>
				  <p class=MsoNormal>'.$row['ts_client'].'</p>
				  <p class=MsoNormal>#'.$fl.date('mdy').rand(31,69).'</p>
				  </td>
				 </tr>

				</table>
			</div>
			<p class=MsoNormal> </p>
			<p class=MsoNormal> </p>';
			$str .=  '
			<div align=center>	
				<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 width=720 style="width:7.5in;border-collapse:collapse;border:none">
					<tr height=20 class="headrow">
						<td width="66%"><p class=Columnheading>Description:</p></td>
						<td width="12%"><p class=Columnheading>Hours:</p></td>
						<td width="12%"><p class=Columnheading>Rate:</p></td>
						<td width="12%"><p class=Columnheading>Amount:</p></td>
					</tr>';
			$prevclient = $row['ts_client'];
		}
		$ts=$row['totalsecs']/3600;
		$str .=  '
			<tr>
				<td><p class=MsoNormal>'.$row['ts_dscr'].'</p></td>
				<td><p class=MsoNormal>'.round($ts,2) .'</p></td>
				<td><p class=Amount>$200</p></td>
				<td><p class=Amount>'.round($ts * 200, 2) .'</p></td>
			</tr>';
		$gt += $row['totalsecs'];
		$gtt += $row['totalsecs'];
		$c++;
		$t++;
	}
	for($w=0; $w < 17 - $t; $w++){
		$str .=  '
		<tr>
			<td> </td>
			<td> </td>
			<td> </td>
			<td> </td>
		</tr>';
	}
	$n=$gt/3600;
	$str .=  '
					<tr style="page-break-inside:avoid;height:.2in">
					  <td width=414 valign=top style="width:310.5pt;border:none;padding:2.15pt 5.75pt 2.15pt 5.75pt;  height:.2in">
					  <p class=MsoNormal> </p>
					  </td>
					  <td width=204 colspan=2 style="width:153.0pt;border:none;border-right:solid windowtext 1.0pt;  padding:2.15pt .15in 2.15pt .15in;height:.2in">
					  <p class=RightAligned>TOTAL</p>
					  </td>
					  <td width=102 style="width:76.5pt;border-top:none;border-left:none;  border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;  padding:2.15pt .15in 2.15pt .15in;height:.2in">
					  <p class=Amount>$'.round($n * 200, 2) .'</p>
					  </td>
					</tr>
				</table>
			</div>
			<p class=MsoNormal> </p>
			<div align=center>
				<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=720 style="width:7.5in;border-collapse:collapse">
				 <tr style="height:109.9pt">
				  <td width=720 valign=bottom style="width:7.5in;padding:5.75pt 5.75pt 5.75pt 5.75pt;  height:109.9pt">
				  <p class=MsoNormal>Make all checks payable to My Company LLC</p>
				  <p class=MsoNormal>Total due in 15 days. Overdue accounts subject to a  service charge of 1% per month.</p>
				  <p class=MsoNormal> </p>
				  </td>
				 </tr>
				 <tr style="height:.3in">
				  <td width=720 style="width:7.5in;padding:0in 5.4pt 0in 5.4pt;height:.3in">
				  <p class=Thankyou>Thank you for your business!</p>
				  </td>
				 </tr>
				</table>
			</div>
			<p class=MsoNormal> </p>
		</body>
	</html>	'."\n";
		fwrite($fp, $str);
		fclose($fp); 

?>
</div>
<?php } ?>
<?php 
if ( $edit ) { ?> 
<h3>Invoice FORM</h3>
<div  class="form_item">
	<div class="form_element cf_datetimepicker">
	<label class="cf_label">Start Time:</label>
	<input onclick="new Calendar(this);" class="cf_datetime" size="20" id="date_0" name="date_0" type="text">
	</div>
	<div class="clear"> </div>
</div>
<div  class="form_item">
	<div class="form_element cf_datetimepicker">
	<label class="cf_label">End Time:</label>
	<input onclick="new Calendar(this);" class="cf_datetime" size="20" id="date_1" name="date_1" type="text">
	</div>
	<div class="clear"> </div>
</div>
<?php } ?>

<?php
$f=1;
$fdate = 'invoices/*-invoice_'.date('m-d-Y').'.doc';
//echo $fdate;
foreach (glob("$fdate") as $filename) {
    echo '<input type="hidden" id="att'.$f.'" name="att'.$f.'" value="'.$filename.'"> '. "\n";
	$f++;
}
?>
<div  class="form_item">
		<?php
		if ( $edit ) { 
		?> 
	<div class="form_element cf_button">
		<input value="Submit" name="submit" type="submit"> 
		<input value="Reset" type="reset">
	</div>
		<?php
		} else { 
		?> 
	<div class="form_element cf_button"> 
		<input type="submit" name="submit" value="Send">  
		<input type="submit" name="submit" value="Edit"> 
	</div>  
		<?php 
		}?>		
	<div class="clear"> </div>
</div>
samoht 18 Dec, 2008
Hello,

glad to hear your making progress.

Couple of things to check: 1) make sure that you are connected to the timesheet2 database table by opening up the timesheet2 form -> under DB Connection tab -> make sure that it is set to "yes" and the table "timesheet2" is selected. 2) check your field values - the ts_created fields is what I use to set the daterange and your example didn't show this field?? also you have two other fields "timeIn" and "timeOut" - that are not part of the form, so not needed. Your table structure should look like:
cf_id : 2
uid : IOWJhMTk2YzdhNmU4
recordtime : 2008-10-22 - 10:25:25
ipaddress : 127.0.0.1
cf_user_id : 0
ts_timein : 10:22:00
ts_timeout : 10:25:00
ts_client : Marclazar.com
ts_dscr : I need to have 2 entries to really test the invoice form
ts_created : 2008-10-22 10:25:25

3) the form creates the WORD document invoices and the email displays the time sheet, so no data will show on the web page. If you want to show the time sheet on the website you can use the following code (as long as you update it for your needs):
<?php
//I would put this code after the invoice building code 
$c=1;
$prevclient = '';
	foreach( $records as $row ) {
		if($row['ts_client'] != $prevclient){
			if($prevclient != '') {
				//close each client table except for the last
				echo '
			</table>'."\n";
			//get the total time in seconds and convert it to a decimal for each client
			$n=$gt/3600;
			echo '
			<table border=0 cellpadding=1 cellspacing=0 style="border-collapse: collapse;width:17.3em" class="btot">
				<tr align=right><td><b>Total time: </b></td><td><b>'.gmdate("H:i:s", $gt).'<input type="hidden" value="'.gmdate("H:i:s", $gt).'" name="cttime'.$c.'" id="cttime'.$c.'"></b></td></tr>
				<tr align=right><td><b>Decimal time: </b></td><td><b>'.round($n, 1) .'<input type="hidden" value="'.round($n, 1).'" name="dtime'.$c.'" id="dtime'.$c.'"></b></td></tr>
				<tr align=right><td><b>Total Cost: </b></td><td><b>$'.round($n * [your rate here], 2) .'<input type="hidden" value="'.round($n * [your rate here], 2).'" name="tcost'.$c.'" id="tcost'.$c.'"></b></td></tr>
			</table><br style="clear:both;">'."\n";
			//set these back to 0 so that the total does not include the previous clients
			$n=0;
			$gt = 0;
			}
			echo "\n<h3>SIGN/OFF CLIENT: ".$row['ts_client']."<input type='hidden' value='".$row['ts_client']."' name='client".$c."' id='client".$c."'></h3>\n";
			echo '
			<table border=0 cellpadding=0 cellspacing=0 width=97% style="border-collapse: collapse;table-layout:fixed;width:37em">
				<tr height=20 bgcolor="#EEEEEE;" class="headrow">
					<th width="22%">Date:</th>
					<th width="12%">Time:</th>
					<th width="66%">Description:</th>
				</tr>';
			$prevclient = $row['ts_client'];
		}
		echo '
				<tr>
					<td>'.$row['tc'].'<input type="hidden" value="'.$row['tc'].'" name="cdate'.$c.'" id="cdate'.$c.'"></td>
					<td>'.$row['totaltime'].'<input type="hidden" value="'.$row['ts_totaltime'].'" name="ttime'.$c.'" id="ttime'.$c.'"></td>
					<td>'.$row['ts_dscr'].'<input type="hidden" value="'.$row['ts_dscr'].'" name="dscr'.$c.'" id="dscr'.$c.'"></td>
				</tr>';
		$gt += $row['totalsecs'];
		$gtt += $row['totalsecs'];
		$c++;
	}
	echo '
</table>'."\n";
$n=$gt/3600;
echo '
			<table border=0 cellpadding=1 cellspacing=0 style="border-collapse: collapse;table-layout:fixed;width:17.3em" class="btot">
				<tr align=right><td><b>Total time: </b></td><td><b>'.gmdate("H:i:s", $gt).'<input type="hidden" value="'.gmdate("H:i:s", $gt).'" name="cttime'.$c.'" id="cttime'.$c.'"></b></td></tr>
				<tr align=right><td><b>Decimal time: </b></td><td><b>'.round($n, 1) .'<input type="hidden" value="'.round($n, 1).'" name="dtime'.$c.'" id="dtime'.$c.'"></b></td></tr>
				<tr align=right><td><b>Total Cost: </b></td><td><b>$'.round($n * [your rate here], 2) .'<input type="hidden" value="'.round($n * 37.75, 2).'" name="tcost'.$c.'" id="tcost'.$c.'"></b></td></tr>
			</table><br style="clear:both;">'."\n";

echo '
	<div class="oa">			
		<p><b>Over all Total hours: '.gmdate("H:i:s", $gtt) .'<input type="hidden" value="'.gmdate("H:i:s", $gtt).'" name="gthrs" id="gthrs"></b><br> 
		<b>Over all Total cost: $'. round($gtt/3600 * [your rate here], 2) .'<input type="hidden" value="'.round($gtt/3600 * [your rate here], 2).'" name="gtcost" id="gtcost"></b></p>
	</div>'."\n";

?>


hope this helps
This topic is locked and no more replies can be posted.