First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
include "db.php";
|
||||
|
||||
$Years = array('2020/2021','2021/2022','2022/2023','2023/2024');
|
||||
|
||||
for ($i = 0; $i < count($Years); $i++) {
|
||||
$school_year = $Years[$i];
|
||||
|
||||
$annual = 0;
|
||||
|
||||
$query = "SELECT payment_method, substring(payment_date,1,7) AS month, sum(amount_paid) AS total " .
|
||||
"FROM invoice_header " .
|
||||
"WHERE school_year = '$school_year' " .
|
||||
"AND payment_method = 'PayPal' " .
|
||||
"AND status = 'Paid' " .
|
||||
"GROUP BY 1,2";
|
||||
$results = db_query($query);
|
||||
|
||||
echo("$school_year\n");
|
||||
while ($row = db_fetch_assoc($results)) {
|
||||
extract($row);
|
||||
$annual += $total;
|
||||
if ($total > 0) printf(" %s %10s\n",$month,'$'.number_format($total,2));
|
||||
}
|
||||
if ($annual > 0) printf(" %10s\n",'$'.number_format($annual,2));
|
||||
echo("\n");
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user