=================================================================== RCS file: /cvs/RT/Invoicing/test.pl,v retrieving revision 1.2 retrieving revision 1.4 diff -u -r1.2 -r1.4 --- RT/Invoicing/test.pl 2011/03/20 02:34:42 1.2 +++ RT/Invoicing/test.pl 2011/03/22 05:53:59 1.4 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $AFresh1: test.pl,v 1.1.1.1 2011/03/19 22:27:16 andrew Exp $ +# $AFresh1: test.pl,v 1.3 2011/03/20 05:20:11 andrew Exp $ use strict; use warnings; @@ -9,24 +9,22 @@ id => 1, info1 => 'Visit me online at http://example.com', info2 => 'Create a new ticket rt@example.com', - from => { - name => 'Example Company', - #attn => 'Jane Smith', - addr1 => '22115 Central Way', - addr2 => 'Suite C', - city => 'Anytown', - state => 'America', - zip => '11111', - phone => '(800) 555-1212', - email => 'company@example.com', - }, - to => { - name => 'John Doe', - addr1 => '123 W Main St', - city => 'Anytown', - state => 'America', - zip => '11111', - }, + from => 'Example Company + +22115 Central Way + +Suite C + +Anytown, America 11111 + +(800) 555-1212 + +\texttt{}', + to => 'John Doe + +123 W Main St + +Anytown, America 11111', projects => [ { title => 'Weekly Retainer', @@ -60,16 +58,12 @@ count => 1.5, rate => 100, }, - ], - discounts => [ { - contents => 'Included Hours', - amount => .33 * 75, + contents => 'Rounding FAIL', + detail => 'Should be $8.30', + count => .083, + rate => 100, }, - { - contents => 'Included Hours', - amount => 1.5 * 100, - }, ], }, { @@ -98,16 +92,6 @@ rate => 125, }, ], - discounts => [ - { - contents => 'Included Hours', - amount => (.33 * 75) + ( 3.33 * 100 ), - }, - { - contents => 'Included Hours', - amount => (.25 * 75 ) + (2.25 * 100), - }, - ], }, { id => 85, @@ -139,6 +123,10 @@ ], }, ], + discount => { + contents => 'Discount', + amount => '8.498', + }, ); my $tt = Template->new;