Link | chequeboxes |
Author | Jon Harris |
Category | Output |
Version | 8.x |
License | Public Domain |
Posted | 17 Jan 2006 |
Updated | 17 Jan 2006 |
More by this author... |
I use this tag as part of a pdf generator which prints the digit names in boxes on a cheque. Just pass it the amount and the number of digits (optional) and it will return an array with them in. If the number of digits is less than required it will pad them with 'zeros'.
[chequeboxes: -amount='500',-digits='5']
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
0 ; loop: -loopto=#padding ; #digitarray->(insert: 'zero') ; /loop ; /if; /if ; // the meat! get each digit and find its name. loop: -loopto= #digitcounter; local: 'thedigit' = (String_Extract: #amount, -StartPosition=(loop_count), -EndPosition=(loop_count)) ; local: 'theword' = #wordsarray->(get: (integer: #thedigit) + 1) ; #digitarray->(insert: #theword) ; /loop ; // usage somthing like this // [chequeboxes: -amount='500',-digits='5'] return: #digitarray; /define_tag; ?>
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft