First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
include "db.php";
|
||||
include "table.php";
|
||||
|
||||
date_default_timezone_set("Canada/Pacific");
|
||||
|
||||
$query = "SELECT count(*) AS number, SUM(total) AS total FROM invoice_header WHERE status = 'Open'";
|
||||
$results = db_query($query);
|
||||
$row = db_fetch_assoc($results);
|
||||
|
||||
extract($row);
|
||||
// echo("Num Invoices: $number\n");
|
||||
// echo("Invoices Total: $".number_format($total,2)."\n");
|
||||
|
||||
$entry = array();
|
||||
$entry['process_date'] = date("Y-m-d",time());
|
||||
$entry['invoice_count'] = $number;
|
||||
$entry['invoice_total'] = $total;
|
||||
|
||||
$table = new Table('invoice_total_log');
|
||||
$query = $table->BuildInsert($entry);
|
||||
// echo("$query\n");
|
||||
db_query($query);
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user