[Simplesheet-commits] SF.net SVN: simplesheet: [7] trunk
Status: Inactive
Brought to you by:
ronaldmaas
|
From: <ron...@us...> - 2007-07-25 10:19:33
|
Revision: 7
http://simplesheet.svn.sourceforge.net/simplesheet/?rev=7&view=rev
Author: ronaldmaas
Date: 2007-07-25 03:19:31 -0700 (Wed, 25 Jul 2007)
Log Message:
-----------
Change the various reports to be in a runnable state, contents still needs to be checked
Modified Paths:
--------------
trunk/cashflowreport.php
trunk/oireport.php
trunk/revenuereport.php
Modified: trunk/cashflowreport.php
===================================================================
--- trunk/cashflowreport.php 2007-07-25 10:18:35 UTC (rev 6)
+++ trunk/cashflowreport.php 2007-07-25 10:19:31 UTC (rev 7)
@@ -87,13 +87,13 @@
<option value="31">31
</select>
<select name="year">
- <option value="2000">2006
- <option value="2001">2007
- <option value="2002">2008
- <option value="2003">2009
- <option value="2004">2010
- <option value="2005">2011
- <option value="2006">2012
+ <option value="2006">2006
+ <option value="2007">2007
+ <option value="2008">2008
+ <option value="2009">2009
+ <option value="2010">2010
+ <option value="2011">2011
+ <option value="2012">2012
</select></td></tr>
<tr><td>To:</td><td><select name="month2">
<option value="1">January
@@ -143,13 +143,13 @@
<option value="31">31
</select>
<select name="year2">
- <option value="2000">2006
- <option value="2001">2007
- <option value="2002">2008
- <option value="2003">2009
- <option value="2004">2010
- <option value="2005">2011
- <option value="2006">2012
+ <option value="2006">2006
+ <option value="2007">2007
+ <option value="2008">2008
+ <option value="2009">2009
+ <option value="2010">2010
+ <option value="2011">2011
+ <option value="2012">2012
</select>
</td></tr></table>
<br><br>
@@ -225,7 +225,7 @@
$grandtotal = 0;
$result2 = mysql_data_seek($result, 0);
while ($row = mysql_fetch_array($result)) {
- $grandtotal += $row->paymentamount;
+ $grandtotal += $row["paymentamount"];
?>
<tr>
<td bgcolor=#000000 width="1">
Modified: trunk/oireport.php
===================================================================
--- trunk/oireport.php 2007-07-25 10:18:35 UTC (rev 6)
+++ trunk/oireport.php 2007-07-25 10:19:31 UTC (rev 7)
@@ -55,7 +55,7 @@
$customerid_SQL = "AND invoicemaster.customerid = $customerid";
}
- $result = mysql_query("SELECT invoiceheader.company_name as invoicename, customer.company_name,invoicemaster.customerid, invoicemaster.invoicenumber, invoicemaster.grandtotal,invoicemaster.invoicedate,invoicemaster.grandtotal - (SELECT coalesce(sum(paymentamount),0) FROM payments WHERE invoicenumber = invoicemaster.invoicenumber) AS amountdue from customer,invoicemaster,invoiceheader where invoicemaster.paystatus = 'PEND' AND invoiceheader.headerid = invoicemaster.headerid $company_id_SQL AND customer.customerid = invoicemaster.customerid ORDER BY invoicenumber;");
+ $result = mysql_query("SELECT invoiceheader.company_name as invoicename, customer.company_name,invoicemaster.customerid, invoicemaster.invoicenumber, invoicemaster.grandtotal,invoicemaster.invoicedate,invoicemaster.grandtotal - (SELECT coalesce(sum(paymentamount),0) FROM payments WHERE invoicenumber = invoicemaster.invoicenumber) AS amountdue from customer,invoicemaster,invoiceheader where invoicemaster.paystatus = 'PEND' AND invoiceheader.headerid = invoicemaster.headerid $customerid_SQL AND customer.customerid = invoicemaster.customerid ORDER BY invoicenumber;");
if (!$result) {
echo "An Error Occurred.";
Modified: trunk/revenuereport.php
===================================================================
--- trunk/revenuereport.php 2007-07-25 10:18:35 UTC (rev 6)
+++ trunk/revenuereport.php 2007-07-25 10:19:31 UTC (rev 7)
@@ -173,9 +173,9 @@
if ($customerid != "") {
$companyWhere = " AND invoicemaster.customerid = $customerid ";
}
-
- $result = mysql_query("SELECT invoiceheader.company_name as invoicename, customer.company_name,invoicemaster.customerid, invoicemaster.paystatus, invoicemaster.invoicenumber, invoicemaster.grandtotal,invoicemaster.invoicedate from customer,invoicemaster where invoiceheader.headerid = invoicemaster.headerid $companyWhere AND customer.customerid = invoicemaster.customerid AND (invoicemaster.invoicedate BETWEEN '$month/$day/$year' AND '$month2/$day2/$year2 11:59:59 PM') ORDER BY invoicenumber;");
+ $result = mysql_query("SELECT invoiceheader.company_name as invoicename, customer.company_name,invoicemaster.customerid, invoicemaster.paystatus, invoicemaster.invoicenumber, invoicemaster.grandtotal,invoicemaster.invoicedate from customer,invoicemaster,invoiceheader where invoiceheader.headerid = invoicemaster.headerid $companyWhere AND customer.customerid = invoicemaster.customerid AND (invoicemaster.invoicedate BETWEEN '$year-$month-$day' AND '$year2-$month2-$day 23:59:59') ORDER BY invoicenumber;");
+
if (!$result) {
echo "An Error Occurred.";
exit;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|