[Astpp-commit] SF.net SVN: astpp:[2254] trunk
Brought to you by:
darrenkw
|
From: <dar...@us...> - 2009-09-20 01:22:35
|
Revision: 2254
http://astpp.svn.sourceforge.net/astpp/?rev=2254&view=rev
Author: darrenkw
Date: 2009-09-20 00:18:28 +0000 (Sun, 20 Sep 2009)
Log Message:
-----------
Add another view to show invoice totals.
Modified Paths:
--------------
trunk/scripts/astpp-generate-invoices.pl
trunk/sql/astpp-2009-09-19.sql
trunk/templates/account-info.tpl
Modified: trunk/scripts/astpp-generate-invoices.pl
===================================================================
--- trunk/scripts/astpp-generate-invoices.pl 2009-09-19 23:53:41 UTC (rev 2253)
+++ trunk/scripts/astpp-generate-invoices.pl 2009-09-20 00:18:28 UTC (rev 2254)
@@ -150,7 +150,7 @@
value => $subtotal,
title => "Total",
text => "Total",
- class => "1"
+ class => "9" #class 9 = total
);
}
}
Modified: trunk/sql/astpp-2009-09-19.sql
===================================================================
--- trunk/sql/astpp-2009-09-19.sql 2009-09-19 23:53:41 UTC (rev 2253)
+++ trunk/sql/astpp-2009-09-19.sql 2009-09-20 00:18:28 UTC (rev 2254)
@@ -1386,3 +1386,15 @@
taxes.taxes_description
FROM taxes_to_accounts, taxes
WHERE taxes.taxes_id = taxes_to_accounts.taxes_id;
+
+
+CREATE VIEW invoice_list_view AS SELECT
+invoices.invoiceid,
+invoices.accountid,
+invoices.date,
+invoices.status,
+invoices_total.value,
+invoices_total.class
+FROM invoices, invoices_total
+WHERE invoices_total.class = 9
+AND invoices.invoiceid = invoices_total.invoices_id;
Modified: trunk/templates/account-info.tpl
===================================================================
--- trunk/templates/account-info.tpl 2009-09-19 23:53:41 UTC (rev 2253)
+++ trunk/templates/account-info.tpl 2009-09-20 00:18:28 UTC (rev 2254)
@@ -197,6 +197,24 @@
<td><TMPL_VAR NAME="context"></td>
</tr>
</TMPL_LOOP>
+</table>
+<table class="default">
+ <tr class="header">
+ <td>Invoice Number</td>
+ <td>Invoice Date</td>
+ <td>Invoice Total</td>
+ <td>HTML View</td>
+ <td>PDF View</td>
+ </tr>
+ <TMPL_LOOP NAME="account_invoice_list">
+ <tr>
+ <td><TMPL_VAR NAME="invoiceid"></td>
+ <td><TMPL_VAR NAME="date"></td>
+ <td><TMPL_VAR NAME="total"></td>
+ <td><a href="astpp-admin.cgi?mode=View Invoice&format=html&invoiceid=<TMPL_VAR NAME="invoiceid">">View</a></td>
+ <td><a href="astpp-admin.cgi?mode=View Invoice&format=pdf&invoiceid=<TMPL_VAR NAME="invoiceid">">View</a></td>
+ </tr>
+ </TMPL_LOOP>
</table>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|