First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
include "db.php";
|
||||
|
||||
$Years = array();
|
||||
for ($i = 5; $i >= 0; $i--) {
|
||||
$Start = date("Y",time()) - $i;
|
||||
$Next = $Start + 1;
|
||||
$Years[] = "$Start/$Next";
|
||||
}
|
||||
|
||||
|
||||
for ($i = 0; $i < count($Years); $i++) {
|
||||
$syear = $Years[$i];
|
||||
echo("$syear\n");
|
||||
|
||||
$query = "SELECT payment_method,sum(amount_paid) AS amount FROM invoice_header WHERE school_year = '$syear' AND status = 'Paid' GROUP BY 1";
|
||||
$results = db_query($query);
|
||||
|
||||
while ($row = db_fetch_assoc($results)) {
|
||||
extract($row);
|
||||
printf("%20s: %14s\n",$payment_method,"$".number_format($amount,2));
|
||||
}
|
||||
|
||||
echo("\n");
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user