示例#1
0
?>
</TD>
		<TD CLASS="dg_data_cell_1"><?php 
echo $commissions[$i]->task_name;
?>
</TD>
		<TD CLASS="dg_data_cell_1"><?php 
echo $commissions[$i]->start_ts > 0 ? date("n/j/y H:i", $commissions[$i]->start_ts) : "";
?>
</TD>
		<TD CLASS="dg_data_cell_1"><?php 
echo $commissions[$i]->end_ts > 0 ? date("n/j/y H:i", $commissions[$i]->end_ts) : "";
?>
</TD>
		<TD CLASS="dg_data_cell_1"><?php 
echo $act_time > 0 ? formatLengthOfTime($act_time) : "";
?>
</TD>
		<TD CLASS="dg_data_cell_1"><?php 
echo SureInvoice::getCurrencySymbol() . number_format($commissions[$i]->com_amount, 2);
?>
</TD>
		<TD CLASS="dg_data_cell_1"><? if(!$commissions[$i]->check_id > 0) echo '<INPUT TYPE="checkbox" NAME="comm_trans_ids[]" VALUE="'.$commissions[$i]->com_trans_id.'">'; ?></TD>
		<TD CLASS="dg_data_cell_1">&nbsp;
			<A CLASS="link1" HREF="task_activity.php?mode=edit&id=<?php 
echo $commissions[$i]->id;
?>
"><img src="images/edit.png" width="16" height="16" alt="Edit" border="0" /></A>&nbsp;|&nbsp;
			<A CLASS="link1" HREF="task_activity.php?mode=delete&id=<?php 
echo $commissions[$i]->id;
?>
示例#2
0
    // If it's the current day, highlight it
    if ( !$hour->isSelected() )
        echo "<tr>\n";
    else
        echo "<tr class=\"cal_hour_current\">\n";

    echo "<td class=\"cal_hour\">".date('g A',$hour->thisHour(true))."</td>";

    echo "<td class=\"".$alt."\">";
				if(isset($tasks[$hour->getTimestamp()])){
					foreach($tasks[$hour->getTimestamp()] as $task){
						echo "<A CLASS=\"link1\" HREF=\"task_activities.php?task_id=".$task->id."\">".$task->name."</A><BR><BR>";
					}
				}
				if(isset($activities[$hour->getTimestamp()]) && count($activities[$hour->getTimestamp()]) > 0){
					foreach($activities[$hour->getTimestamp()] as $ta){
						echo "<A CLASS=\"link1\" HREF=\"task_activity.php?id=".$ta->id."&mode=edit\">".$ta->project_name.":".$ta->task_name." ".formatLengthOfTime($ta->total_interval_time)."</A><BR><BR>";
					}
				}
				if(!isset($tasks[$hour->getTimestamp()]) && !isset($activities[$hour->getTimestamp()])){
					echo "&nbsp;";
				}
		echo "</td>";

    echo "</tr>\n";
}
?>
</TABLE>
<? require('footer.php'); ?>
示例#3
0
require_once $incpath . '/SI_TaskActivity.php';
require_once $incpath . '/SI_PaymentSchedule.php';
require_once $incpath . '/SI_ItemCode.php';
//Get list of
echo "Starting of AutoInvoice.\n\n";
//$comp_ids = '';
echo " -Getting Companies with unbilled time.\n";
$company = new SI_Company();
$companies_time = $company->getCompanysWithUnbilledAmount();
if ($companies === FALSE) {
    echo "****ERR: Could not retrieve Outstanding Hours list! ****\n";
    debug_message($company->getLastError());
} elseif (count($companies_time) > 0) {
    foreach ($companies_time as $comp_time) {
        $comp_ids[] = $comp_time->id;
        echo "  * {$comp_time->name} - " . formatLengthOfTime($comp_time->time_spent) . " " . SureInvoice::getCurrencySymbol() . number_format($comp_time->amount, 2) . "\n";
    }
}
echo " -Getting Upcoming Scheduled Payment.\n";
$ps = new SI_PaymentSchedule();
$time = time() + 16 * (24 * (60 * 60));
$ps_items = $ps->getUpcoming($time);
if ($ps_items === FALSE) {
    echo "****ERR: Could not retreive upcoming scheduled billings! ****\n";
    debug_message($ps->getLastError());
} elseif (count($ps_items) > 0) {
    foreach ($ps_items as $scheduled_payment) {
        $ps_comp = $scheduled_payment->getCompany();
        $comp_ids[] = $ps_comp->id;
        echo "  * {$ps_comp->id} \n";
    }
示例#4
0
echo "<br>" . $activities[$i]->getCompletedItemsHTML();
?>
<?	} //end if itemized ?>		</td>
	</tr>
<? 	if($i != count($activities)-1){?>
	<tr>
		<td colspan="7" class="dg_header_cell">&nbsp;</td>
	</tr>
<? 	} //If not last ?>
<? } //If detail ?>
<? }?>
</tbody>
	<tr>
		<td colspan="3" class="form_header_cell" align="right">Time Spent:</td>
		<td class="form_field_cell"><?php 
echo formatLengthOfTime($total_time);
?>
</td>
		<td colspan="3" class="form_header_cell" align="right"></td>
	</tr>
	<tr>
		<td class="dg_data_cell_1" colspan="7" align="right">
			<select name="action">
				<option value="">Select Action...</option>
				<option value="delete">Delete Selected</option>
				<option value="move">Move Selected</option>
			</select>
			<input type="submit" name="submit" value="Perform">		</td>
	</tr>
</table>
	</div>
示例#5
0
				<th class="dg_header_cell">Options</th>
			</tr>
			<tbody id="bodyId4">
		<? for($i = 0; $i < count($users); $i++){
				$user_amount_total += $users[$i]->amount;
		?>
			<tr onmouseover="this.style.backgroundColor ='#CCCCCC'" onmouseout="this.style.backgroundColor ='#FFFFFF'">
				<td class="dg_data_cell_1"><a title="Resource Detail Center" href="home_resource.php?id=<?php 
echo $users[$i]->id;
?>
"><?php 
echo $users[$i]->first_name . ' ' . $users[$i]->last_name;
?>
</a></td>
				<td class="dg_data_cell_1"><?php 
echo formatLengthOfTime($users[$i]->getUpaidHourCount());
?>
</td>
				<td class="dg_data_cell_1"><?php 
echo $users[$i]->amount;
?>
</td>
				<td class="dg_data_cell_1" nowrap>&nbsp;
					<a class="link1" href="activities_log.php?user_id=<?php 
echo $users[$i]->id;
?>
&unpaid=y"><img src="images/properties.gif" width="16" height="16" title="View Detail" border="0" /></a>
					<a class="link1" href="check.php?user_id=<?php 
echo $users[$i]->id;
?>
"><img src="images/check.gif" width="16" height="16" title="Create Check" border="0" /></a>
示例#6
0
 function startTimer($id)
 {
     global $loggedin_user;
     if (!isLoggedIn()) {
         $this->error = "User not logged in.";
         return false;
     }
     $timer = new SI_Timer();
     $timer_data = array();
     if ($timer->get($id) !== FALSE) {
         $timer->start();
         $timer_data['id'] = $timer->id;
         $timer_data['name'] = $timer->name;
         $timer_data['status'] = $timer->status;
         $timer_data['total'] = formatLengthOfTime($timer->getTotal());
     } else {
         $this->error = "Error starting timer: " . $timer->getLastError();
         return false;
     }
     return $timer_data;
 }
示例#7
0
</td>
	</tr>
<?	}?>
	</tbody>
	<tr>
		<td colspan="2" class="form_header_cell" align="right">Totals:</td>
		<td class="form_field_cell" align="right"><?php 
echo formatLengthOfTime($cost_hours_total);
?>
</td>
		<td class="form_field_cell" align="right"><?php 
echo SureInvoice::getCurrencySymbol() . number_format($cost_total, 2);
?>
</td>
		<td class="form_field_cell" align="right"><?php 
echo formatLengthOfTime($price_hours_total);
?>
</td>
		<td class="form_field_cell" align="right"><?php 
echo SureInvoice::getCurrencySymbol() . number_format($price_total, 2);
?>
</td>
		<td class="form_field_cell" align="right" <?php 
echo $price_total - $cost_total < 0 ? 'style="color:red"' : '';
?>
><?php 
echo number_format($price_total - $cost_total, 2);
?>
</td>
	</tr>
</table>
示例#8
0
	}

	$activities = $activity->find($_REQUEST['start_ts'], $_REQUEST['end_ts']+86400, $_REQUEST['resource_id'], $_REQUEST['company_id'], $_REQUEST['billable']);
	if($activities === FALSE){
		$error_msg .= "Error getting report data!\n";
		debug_message($activity->getLastError());
	}

$csv_output = '';
for($i=0; $i<count($activities); $i++){
	if($i == 0){
		// Print the header
		$csv_output = "Company,Project,Task,Started,Completed,Time Spent\n";	
	}
	
	$csv_output .= '"'.$activities[$i]->company_name.
		'","'.$activities[$i]->project_name.
		'","'.$activities[$i]->task_name.
		'","'.($activities[$i]->start_ts>0 ? date("n/j/y H:i", $activities[$i]->start_ts) : "None").
		'","'.($activities[$i]->end_ts>0 ? date("n/j/y H:i", $activities[$i]->end_ts) : "None").
		'","'.($activities[$i]->start_ts>0 && $activities[$i]->end_ts>0 && $activities[$i]->end_ts > $activities[$i]->start_ts ? formatLengthOfTime($activities[$i]->end_ts - $activities[$i]->start_ts) : "").
		"\"\n";
}

if(!empty($csv_output)){
	header('Content-type: text/csv');
	header('Content-Disposition: attachment; filename="sureinvoice_report.csv"');
	print($csv_output);		
}
?>
示例#9
0
			<tr onmouseover="this.style.backgroundColor ='#CCCCCC'" onmouseout="this.style.backgroundColor ='#FFFFFF'">
				<td class="dg_data_cell_1"><?php 
echo $name;
?>
</td>
				<td class="dg_data_cell_1"><?php 
echo formatLengthOfTime($total);
?>
</td>
			</tr>
		<? }?>
			</tbody>
			<tr>
				<td class="form_header_cell" align="right">Total Time Spent:</td>
				<td class="form_field_cell" colspan="2"><?php 
echo formatLengthOfTime($total_project_time);
?>
</td>
			</tr>
		</table>
	</td>
	<td>
	<img src="<?php 
echo "graph.php?type=project&start_ts=" . $_REQUEST['start_ts'] . "&end_ts=" . $_REQUEST['end_ts'] . "&resource_id=" . $_REQUEST['resource_id'] . "&company_id=" . $_REQUEST['company_id'] . "&unbilled=" . $_REQUEST['unbilled'];
?>
" BORDER="0">
	</td>
</tr>
</table>
	</div>
</div>