]> git.evergreen-ils.org Git - Evergreen.git/commit
Receipt Macros: %SORT()%
authorThomas Berezansky <tsbere@mvlc.org>
Fri, 19 Aug 2011 19:15:48 +0000 (15:15 -0400)
committerJason Etheridge <jason@esilibrary.com>
Fri, 26 Aug 2011 19:57:27 +0000 (15:57 -0400)
commitb827b4b5d31074c2ec2cfb6635b541b243add728
tree9bbeb48ac601773d15fef313a21e167f4ee10d70
parent60d24be6e41583f419178f24ca0abf369b2d0186
Receipt Macros: %SORT()%

Added to line item templates.
Takes one or more comma separated parameters:
field AS type ASC/DESC

AS type is optional
ASC/DESC is optional

Field is the field name without % signs.
Type is DATE, INT, FLOAT, NUMBER, LOWER, or UPPER

DATE will sort based on wrapping both sides in "new Date"
INT will sort based on wrapping both sides in parseInt
FLOAT and NUMBER will sort based on wrapping both sides in parseFloat
LOWER will apply .toLowerCase to both sides
UPPER will apply .toUpperCase to both sides

ASC (default) will sort in ascending order.
DESC will sort in descending order.

Can be specified more than once:
%SORT(a,b)% %SORT(c)%
Would sort by a, then b, then c.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/xul/staff_client/chrome/content/util/print.js