コード例 #1
0
ファイル: cc_payment.php プロジェクト: nanoprime/sureinvoice
	<TD CLASS="form_field_cell"><?php 
echo $invoice->id;
?>
</TD>
</TR>
<TR>
	<TD CLASS="form_field_header_cell">Invoice Amount Due:</TD>
	<TD CLASS="form_field_cell"><?php 
echo SureInvoice::getCurrencySymbol() . number_format($invoice->getAmountDue(), 2);
?>
</TD>
</TR>
<TR>
	<TD CLASS="form_field_header_cell">Amount:</TD>
	<TD CLASS="form_field_cell"><?php 
echo SureInvoice::getCurrencySymbol();
?>
<INPUT NAME="amount" CLASS="input_text" SIZE="10" TYPE="text" VALUE="<?php 
echo number_format($invoice->getAmountDue(), 2);
?>
"></TD>
</TR>
<TR>
	<TD CLASS="form_field_header_cell">First Name:</TD>
	<TD CLASS="form_field_cell"><INPUT NAME="card_first_name" CLASS="input_text" SIZE="20" TYPE="text" VALUE="<?php 
echo $loggedin_user->first_name;
?>
"></TD>
</TR>
<TR>
	<TD CLASS="form_field_header_cell">Last Name:</TD>
コード例 #2
0
echo $items[$i]->id;
?>
</td>
		<td class="dg_data_cell_1"><?php 
echo $items[$i]->due_ts > 0 ? date("n/j/y", $items[$i]->due_ts) : "None";
?>
</td>
		<td class="dg_data_cell_1"><a title="Edit Payment Schedule" href="payment_schedule.php?mode=edit&id=<?php 
echo $items[$i]->id;
?>
"><?php 
echo $items[$i]->description;
?>
</a></td>
		<td class="dg_data_cell_1"><?php 
echo SureInvoice::getCurrencySymbol() . number_format($items[$i]->amount, 2);
?>
</td>
		<td class="gridActions">
			<a class="link1" href="payment_schedule.php?mode=edit&id=<?php 
echo $items[$i]->id;
?>
"><img src="images/edit.png" width="16" height="16" title="Edit Payment Schedule" border="0" /></a>
		</td>
		<td class="gridActions">
			<a class="link1" href="payment_schedule.php?mode=delete&id=<?php 
echo $items[$i]->id;
?>
"><img src="images/delete.png" width="16" height="16" title="Delete Payment Schedule" border="0" /></a>&nbsp;
		</td>		
	</tr>
コード例 #3
0
ファイル: check.php プロジェクト: nanoprime/sureinvoice
			<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;
?>
"><img src="images/delete.png" width="16" height="16" alt="" border="0" /></A>&nbsp;
		</TD>
	</TR>
<? }?>
</TBODY>
	<TR>
		<TD COLSPAN="5" CLASS="form_header_cell" ALIGN="right">Total:</TD>
		<TD CLASS="form_field_cell"><?php 
echo SureInvoice::getCurrencySymbol() . number_format($total_com, 2);
?>
</TD>
		<TD CLASS="form_header_cell"><INPUT TYPE="checkbox" NAME="select_all" onClick='SelectAll("comm_trans_ids[]")'></TD>
		<TD CLASS="form_header_cell" ALIGN="right"></TD>
	</TR>
	<TR>
		<TD COLSPAN=10" CLASS="form_header_cell" ALIGN="right">
			<INPUT TYPE="submit" NAME="save" VALUE="Create Check"/>
		</TD>
	</TR>
</TABLE>
</div>
</div>
<? } ?>
</FORM>
コード例 #4
0
echo $ps_items[$i]->id;
?>
"><img src="images/edit.png" width="16" height="16" title="Edit Payment Schedule" border="0" /></a>&nbsp;
		</td>
		<td class="gridActions">&nbsp;
			<a class="link1" href="payment_schedule.php?mode=delete&id=<?php 
echo $ps_items[$i]->id;
?>
"><img src="images/delete.png" width="16" height="16" title="Delete Payment Schedule" border="0" /></a>&nbsp;
		</td>				
	</tr>
<? }?>
	</tbody>
	<tr>
		<td colspan="5" class="form_header_cell" align="right">Total:</td>
		<th class="dg_data_cell_1"><strong><?php 
echo SureInvoice::getCurrencySymbol() . number_format($ps_total, 2);
?>
</strong></th>
		<td class="form_header_cell">&nbsp;</td>
	</tr>
<?    }else{?>
	<tr>
		<td colspan="7" class="dg_data_cell_1">None</td>
	</tr>
<?    }?>
</table>
	</div>
</div>
<? require('footer.php') ?>
コード例 #5
0
ファイル: autoinvoice.php プロジェクト: nanoprime/sureinvoice
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";
    }
コード例 #6
0
	function setup_total() {

		$total[] = array("Total" => "Subtotal", "Amount" => SureInvoice::getCurrencySymbolPDF().number_format($this->subtotal, 2));
		$total[] = array("Total" => "Tax Amount", "Amount" => SureInvoice::getCurrencySymbolPDF().number_format($this->tax_amount, 2));
		$total[] = array("Total" => "Total", "Amount" => SureInvoice::getCurrencySymbolPDF().number_format($this->total, 2));
		if($this->payment_total > 0){
			$total[] = array("Total" => "Total Payments", "Amount" => "-".SureInvoice::getCurrencySymbolPDF().number_format($this->payment_total, 2));
			$total[] = array("Total" => "Amount Due", "Amount" => SureInvoice::getCurrencySymbolPDF().number_format(($this->total - $this->payment_total), 2));
		}

		$this->pdf->ezTable($total,null,'',array('showHeadings' => 0, 'xPos' => 'left', 'xOrientation' => 'right',
				'fontSize' => 10, 
				'colGap' => 2, 
				'protectRows' => 3,
				'cols' =>
					array('Total'=>array("width" => "413",  "justification" => "right"),
						'Amount'=>array("width" => "100",  "justification" => "right")
					)
				)
		);
	}
コード例 #7
0
		<th class="dg_header_cell"><a class="link1" href="" onclick="return sortTable('bodyId', 3, 0, false)">Tax Rate</a></th>
		<th class="dg_header_cell">Options</th>
	</tr>
	<tbody id="bodyId">
<? for($i = 0; $i < count($prices); $i++){ ?>
	<tr onmouseover="this.style.backgroundColor ='#CCCCCC'" onmouseout="this.style.backgroundColor ='#FFFFFF'">
		<td class="dg_data_cell_1"><?php 
echo $prices[$i]->code;
?>
</td>
		<td class="dg_data_cell_1"><?php 
echo $prices[$i]->description;
?>
</td>
		<td class="dg_data_cell_1"><?php 
echo SureInvoice::getCurrencySymbol() . $prices[$i]->price;
?>
</td>
		<td class="dg_data_cell_1">
<?		if($prices[$i]->taxable == 'Y'){ ?>		
		<?php 
echo $prices[$i]->tax_rate;
?>
%
<?		}else{?>
			N/A
<?		}?>
		</td>
		<td class="dg_data_cell_1">&nbsp;
			<a class="link1" href="company_price.php?mode=edit&company_id=<?php 
echo $prices[$i]->company_id;
コード例 #8
0
<? for($i = 0; $i < count($payments); $i++){ ?>
	<tr onmouseover="this.style.backgroundColor ='#CCCCCC'" onmouseout="this.style.backgroundColor ='#FFFFFF'">
		<td class="dg_data_cell_1"><?php 
echo date("n/j/y H:i", $payments[$i]->timestamp);
?>
</td>
		<td class="dg_data_cell_1"><?php 
echo $payments[$i]->type;
?>
</td>
		<td class="dg_data_cell_1"><?php 
echo number_format($payments[$i]->getAmountForInvoice($invoice->id), 2);
?>
</td>
	</tr>
<? }?>
</tbody>
	<tr>
		<td colspan="2" class="form_header_cell" align="right">Total Paid:</td>
		<td class="form_field_cell"><?php 
echo SureInvoice::getCurrencySymbol() . number_format($invoice->getTotal() - $invoice->getAmountDue(), 2);
?>
</td>
	</tr>
</table>

	</div>
</div>
<? } ?>

<? require('footer.php') ?>
コード例 #9
0
ファイル: SureInvoice.php プロジェクト: nanoprime/sureinvoice
 function getCurrencySymbolPDF()
 {
     if (isset($GLOBALS['CONFIG']['currency_symbol'])) {
         if ($GLOBALS['CONFIG']['currency_symbol'] == '$') {
             return '$';
         } elseif ($GLOBALS['CONFIG']['currency_symbol'] == '8364') {
             return '~';
         } else {
             return SureInvoice::getCurrencyCode();
         }
     } else {
         return '$';
     }
 }
コード例 #10
0
echo $transactions[$i]->description;
?>
</TD>
				<TD CLASS="dg_data_cell_1"><?php 
echo $transactions[$i]->getType();
?>
</TD>
				<TD CLASS="dg_data_cell_1">
				<?	if($transactions[$i]->amount < 0){ ?>
					<SPAN STYLE="color: red"><?php 
echo SureInvoice::getCurrencySymbol() . number_format($transactions[$i]->amount, 2);
?>
</SPAN>
				<?	}else{ ?>
					<?php 
echo SureInvoice::getCurrencySymbol() . number_format($transactions[$i]->amount, 2);
?>
					
				<?	} ?>
					
				</TD>
			</TR>
		<? }?>
		</TBODY>
		</TABLE>
	</TD>
</TR>
</TABLE>
</div>
</div>
コード例 #11
0
ファイル: profile.php プロジェクト: nanoprime/sureinvoice
</tr>
<tr>
	<td class="form_field_header_cell">Confirm Password:</td>
	<td class="form_field_cell"><input name="password_2" class="input_text" size="20" type="password" value=""></td>
</tr>
<tr>
	<td class="form_field_header_cell">Rate Type:</td>
	<td class="form_field_cell"><?php 
echo $user->rate_type;
?>
</td>
</tr>
<tr>
	<td class="form_field_header_cell">Hourly Rate:</td>
	<td class="form_field_cell"><?php 
echo SureInvoice::getCurrencySymbol() . number_format($user->hourly_rate, 2);
?>
</td>
</tr>
<tr>
	<td class="form_field_header_cell">Type of User:</td>
	<td class="form_field_cell"><?php 
echo $user->user_type;
?>
</td>
</tr>
<tr>
	<td class="form_field_header_cell">Created On:</td>
	<td class="form_field_cell"><?php 
echo $user->created_ts ? date("D M jS, Y \\a\\t h:i:s A", $user->created_ts) : "";
?>
コード例 #12
0
ファイル: SI_Invoice.php プロジェクト: nanoprime/sureinvoice
	function sendEmail($notification = 'InvoiceEmail'){
		$notif = new Notification();
		$params = $this->getNotificationParams();
//		if(!isset($params['invoice_emails']) || empty($params['invoice_emails']))
//			return TRUE;
			
		if($notif->getByName($notification) === FALSE){
			$this->error = "SI_Invoice::sendEmail() : ".$notif->getLastError()."\n";
			return FALSE;
		}
		if($notif->prepare($params) === FALSE){
			$this->error = "SI_Invoice::sendEmail() : ".$notif->getLastError()."\n";
			return FALSE;
		}
		
		// Setup attachment
		$pdf_file = $this->getPDF();
		if($pdf_file === FALSE)
			return FALSE;
			
		$my_company = SureInvoice::getMyCompany();
		$filename = 'invoice_'.$this->id.'.pdf';
		if(!empty($my_company->name)){
			$normalized_name = str_replace(array(',','.',' ',"\t","'",'"'), '_', $my_company->name);
			$filename = $normalized_name.'_'.$this->id.'.pdf';
		}
		$attachments[0]['data'] = $pdf_file;
		$attachments[0]['name'] = $filename;
		$attachments[0]['type'] = 'application/pdf';
		$attachments[0]['encoding'] = 'base64';
		if($notif->send($attachments) === FALSE){
			$this->error = "SI_Invoice::sendEmail() : ".$notif->getLastError()."\n";
			return FALSE;
		}

		// Update sent_ts
		$this->sent_ts = time();
		if($this->update() === FALSE){
			$this->error = "SI_Invoice::sendEmail(): Email sent, error updating sent timestamp: ".$this->getLastError();
			return FALSE;	
		}
		
		return TRUE;
	}
コード例 #13
0
						<A CLASS="link1" HREF="invoice_email.php?id=<?php 
echo $invoices[$i]->id;
?>
&hide_url=true"><img src="images/email.png" width="16" height="16" title="Email Invoice" border="0" /></A>
					<? } ?>
				</TD>
			</TR>
<?	}?>
			<TR>
				<TD COLSPAN="2" CLASS="form_field_header_cell">Total:</TD>
				<TD CLASS="form_field_cell" ALIGN="right"><?php 
echo SureInvoice::getCurrencySymbol() . number_format($total, 2);
?>
</TD>
				<TD CLASS="form_field_cell" ALIGN="right"><?php 
echo SureInvoice::getCurrencySymbol() . number_format($amount_due_total, 2);
?>
</TD>
				<TD>&nbsp;</TD>
			</TR>
<?	}else{ // if invoices > 0 
?>
			<TR>
				<TD COLSPAN="4" CLASS="form_field_cell">None</TD>
			</TR>

<?	} // if invoices > 0  
?>
		</TABLE>
		</div></div>
	</TD>
コード例 #14
0
echo SureInvoice::getCurrencySymbol() . $transactions[$i]->amount;
?>
</td>
							</tr>
		<?	}?>
							</table><br>
							<div align="left"><a href="user_account.php?id=<?php 
echo $user_id;
?>
">View All</a></div>
						</td>
					</tr>
					<tr>
						<td class="form_field_header_cell">Outstanding Balance:</td>
						<td class="form_field_cell" align="right"><?php 
echo SureInvoice::getCurrencySymbol() . number_format($balance, 2);
?>
</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td valign="top" colspan="2" align="LEFT">
				<div class="tableContainer">
					<a href="javascript:;" class="tCollapse" onclick="toggleGrid(this)"><img src="images/arrow_down.jpg" alt="Hide table" />Upcoming Tasks</a>
					<div>
					<table border="0" cellspacing="0" cellpadding="0" class="dg_table" width="100%">
						<tr>
							<th class="dg_header_cell"><a class="link1" href="" onclick="return sortTable('bodyId1', 0, 1, false)">Project</a></th>
							<th class="dg_header_cell"><a class="link1" href="" onclick="return sortTable('bodyId1', 1, 0, false)">Task</a></th>