include $_SERVER['DOCUMENT_ROOT'] . "/"."includes/functions.php"; session_start(); if(empty($_SESSION['login']) || empty($_SESSION['type'])){ header("Location: ".$URL_PATH."/login.php"); } head(); if($_SESSION['type'] == "2"){ echo "
";
$check_invoice=$d->query("select * from ".$db_prefix."invoice where client_ID='$myID' order by invoice_ID desc");
$invoice_results=$d->numrows($check_invoice);
if($invoice_results > 0 ){
echo " "; while($invoice_data=$d->fetch_array($check_invoice)){ $invoice_ID=$invoice_data['invoice_ID']; $invoiced_date=$invoice_data['Invoiced_date']; $amount=$invoice_data['Amount_Due']; $status=$invoice_data['Active']; $due=$invoice_data['Date_Due']; if($status == "0"){ $active="$fontOutStanding"; $owed=$owed + $amount; }else{ $active="$fontPaid"; $balance=$balance + $amount; } echo "$font Invoice: 0000".$invoice_ID." [".$invoiced_date."] ($".$amount.") - $active: Due $due "; } }else{ echo "$font No invoices found for this customer."; } if(empty($balance)){ $balance="0.00"; } if(empty($owed)){ $owed="0.00"; } echo " OutStanding Balance: $".$owed." Current Balance: $".$balance." |
";
$check_assign=$d->query("select * from ".$db_prefix."assigned where client_ID='$myID'");
$total=$d->numrows($check_assign);
if($total > 0 ){
echo "
|