[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2540] trunk
- Subject: SF.net SVN: ledger-smb:[2540] trunk
- From: ..hidden..
- Date: Thu, 02 Apr 2009 17:27:42 +0000
Revision: 2540
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2540&view=rev
Author: einhverfr
Date: 2009-04-02 17:27:42 +0000 (Thu, 02 Apr 2009)
Log Message:
-----------
Batches now searchable by date
Modified Paths:
--------------
trunk/UI/batch/filter.html
trunk/sql/modules/Voucher.sql
Modified: trunk/UI/batch/filter.html
===================================================================
--- trunk/UI/batch/filter.html 2009-03-31 19:23:31 UTC (rev 2539)
+++ trunk/UI/batch/filter.html 2009-04-02 17:27:42 UTC (rev 2540)
@@ -59,6 +59,24 @@
type = "text"
} ?>
</div>
+<div class="input" id="date_row">
+ <?lsmb INCLUDE input element_data = {
+ label = "Minimum Date"
+ name = "date_from"
+ value = date_from
+ size = 20
+ class = "date"
+ type = "text"
+ } ?>
+ <?lsmb INCLUDE input element_data = {
+ label = "Maximum Date"
+ name = "date_to"
+ value = date_to
+ size = 20
+ class = "date"
+ type = "text"
+ } ?>
+</div>
<div class="input" id="buttons_div">
<?lsmb INCLUDE button element_data = {
text = text('Search')
Modified: trunk/sql/modules/Voucher.sql
===================================================================
--- trunk/sql/modules/Voucher.sql 2009-03-31 19:23:31 UTC (rev 2539)
+++ trunk/sql/modules/Voucher.sql 2009-04-02 17:27:42 UTC (rev 2540)
@@ -153,6 +153,7 @@
CREATE OR REPLACE FUNCTION
batch_search(in_class_id int, in_description text, in_created_by_eid int,
+ in_date_from date, in_date_to date,
in_amount_gt numeric,
in_amount_lt numeric, in_approved bool)
RETURNS SETOF batch_list_item AS
@@ -200,7 +201,11 @@
((in_approved = false OR in_approved IS NULL AND
approved_on IS NULL) OR
(in_approved = true AND approved_on IS NOT NULL)
- )
+ )
+ and (in_date_from IS NULL
+ or b.default_date >= in_date_from)
+ and (in_date_to IS NULL
+ or b.default_date <= in_date_to)
GROUP BY b.id, c.class, b.description, u.username, b.created_on,
b.control_code
HAVING
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.