diff options
-rw-r--r-- | Build.PL | 2 | ||||
-rwxr-xr-x | LedgerSMB.pm | 2 | ||||
-rw-r--r-- | LedgerSMB/Form.pm | 3 | ||||
-rwxr-xr-x | LedgerSMB/Template.pm | 87 | ||||
-rwxr-xr-x | LedgerSMB/Template/HTML.pm | 57 | ||||
-rw-r--r-- | bin/arapprn.pl | 27 | ||||
-rw-r--r-- | bin/cp.pl | 14 | ||||
-rw-r--r-- | bin/io.pl | 19 | ||||
-rw-r--r-- | bin/jc.pl | 15 | ||||
-rw-r--r-- | bin/pos.pl | 15 | ||||
-rw-r--r-- | bin/rp.pl | 38 | ||||
-rwxr-xr-x | menu.pl | 1 | ||||
-rw-r--r-- | templates/demo/ap_transaction.html | 105 | ||||
-rw-r--r-- | templates/demo/ar_transaction.html | 124 | ||||
-rw-r--r-- | templates/demo/balance_sheet.html | 37 | ||||
-rw-r--r-- | templates/demo/bin_list.html | 93 | ||||
-rw-r--r-- | templates/demo/income_statement.html | 30 | ||||
-rw-r--r-- | templates/demo/invoice.html | 142 | ||||
-rw-r--r-- | templates/demo/packing_list.html | 67 | ||||
-rw-r--r-- | templates/demo/pick_list.html | 51 | ||||
-rw-r--r-- | templates/demo/purchase_order.html | 108 | ||||
-rw-r--r-- | templates/demo/request_quotation.html | 69 | ||||
-rw-r--r-- | templates/demo/sales_order.html | 104 | ||||
-rw-r--r-- | templates/demo/sales_quotation.html | 76 | ||||
-rw-r--r-- | templates/demo/statement.html | 47 | ||||
-rw-r--r-- | templates/demo/timecard.html | 6 | ||||
-rw-r--r-- | templates/demo/work_order.html | 81 |
27 files changed, 851 insertions, 569 deletions
@@ -26,6 +26,8 @@ my $build = Module::Build->new ( 'Cwd' => 0, 'Config::Std' => 0, 'MIME::Lite' => 0, + 'Error' => 0, + 'Template' => 0, }, recommends => { 'HTML::LinkExtor' => 0, diff --git a/LedgerSMB.pm b/LedgerSMB.pm index 8e55b933..e938a660 100755 --- a/LedgerSMB.pm +++ b/LedgerSMB.pm @@ -136,7 +136,7 @@ sub new { } - if (($self->{script} =~ m#(..|\\|/)#)){ + if (($self->{script} =~ m#(\.\.|\\|/)#)){ $self->error("Access Denied"); } diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 0cf52871..e799753f 100644 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -88,7 +88,7 @@ sub new { } - if (($self->{script} =~ m#(..|\\|/)#)){ + if (($self->{script} =~ m#(\.\.|\\|/)#)){ $self->error("Access Denied"); } @@ -601,6 +601,7 @@ sub parse_template { my ($chars_per_line, $lines_on_first_page, $lines_on_second_page) = (0, 0, 0); my ($current_page, $current_line) = (1, 1); + print STDERR "Using deprecated Form::parse_template function\n"; my $pagebreak = ""; my $sum = 0; diff --git a/LedgerSMB/Template.pm b/LedgerSMB/Template.pm new file mode 100755 index 00000000..2c1a9d8f --- /dev/null +++ b/LedgerSMB/Template.pm @@ -0,0 +1,87 @@ +#===================================================================== +# +# Template support module for LedgerSMB +# LedgerSMB::Template +# +# LedgerSMB +# Small Medium Business Accounting software +# http://www.ledgersmb.org/ +# +# +# Copyright (C) 2007 +# This work contains copyrighted information from a number of sources all used +# with permission. It is released under the GNU General Public License +# Version 2 or, at your option, any later version. See COPYRIGHT file for +# details. +# +# +#====================================================================== +# This package contains template related functions: +# +# +#==================================================================== +use Error qw(:try); +use Template; +use LedgerSMB::Sysconfig; + +package LedgerSMB::Template; + +sub new { + my $class = shift; + my $self = {}; + $self->{myconfig} = shift; + $self->{template} = shift; + $self->{format} = shift; + $self->{language} = shift; + $self->{output} = ''; + bless $self, $class; + return $self; +} + +sub valid_language { + my $self = shift; + # XXX Actually perform validity checks + return 1; +} + +sub render { + my $self = shift; + my $vars = shift; + my $template; + + if (not defined $self->{language}) { + $template = Template->new({ + INCLUDE_PATH => $self->{'myconfig'}->{'templates'}, + START_TAG => quotemeta('<?lsmb'), + END_TAG => quotemeta('?>'), + DELIMITER => ';', + }) || throw Error::Simple Template->error(); + } elsif ($self->valid_language()) { + $template = Template->new({ + INCLUDE_PATH => "$self->{'myconfig'}->{'templates'}/$self->{language};$self->{'myconfig'}->{'templates'}", + START_TAG => quotemeta('<?lsmb'), + END_TAG => quotemeta('?>'), + DELIMITER => ';', + }) || throw Error::Simple Template->error(); + } else { + throw Error::Simple 'Invalid language'; + } + + eval "require LedgerSMB::Template::$self->{format}"; + if ($@) { + throw Error::Simple $@; + } + + my $cleanvars = &{"LedgerSMB::Template::$self->{format}::preprocess"}($vars); + if (not $template->process( + &{"LedgerSMB::Template::$self->{format}::get_template"}($self->{template}), + $cleanvars, \$self->{output}, binmode => ':utf8')) { + throw Error::Simple $template->error(); + } + + &{"LedgerSMB::Template::$self->{format}::postprocess"}($self); + + return $self->{output}; +} + +1; diff --git a/LedgerSMB/Template/HTML.pm b/LedgerSMB/Template/HTML.pm new file mode 100755 index 00000000..8e610e26 --- /dev/null +++ b/LedgerSMB/Template/HTML.pm @@ -0,0 +1,57 @@ +=head1 NAME + +LedgerSMB::Template::HTML Template support module for LedgerSMB + +=head1 METHODS + +=item get_template () + +=item preprocess ($vars) +This method returns a reference to a hash that contains a copy of the passed +hashref's data with HTML entities converted to escapes. + +=item postprocess () + +=head1 Copyright (C) 2007, The LedgerSMB core team. + +# This work contains copyrighted information from a number of sources all used +# with permission. +# +# It is released under the GNU General Public License Version 2 or, at your +# option, any later version. See COPYRIGHT file for details. For a full list +# including contact information of contributors, maintainers, and copyright +# holders, see the CONTRIBUTORS file. +=cut + +use Error qw(:try); +use CGI; + +package LedgerSMB::Template::HTML; + +sub get_template { + my $name = shift; + return "${name}.html"; +} + +sub preprocess { + my $rawvars = shift; + my $vars; + my $type = ref $rawvars; + +#XXX fix escaping function + if ($type eq 'ARRAY') { + } elsif ($type eq 'HASH') { + for (keys %{$rawvars}) { + $vars->{$_} = preprocess($rawvars[$_]); + } + } else { + return CGI::escapeHTML($rawvars); + } +} + +sub postprocess { + my $parent = shift; + return; +} + +1; diff --git a/bin/arapprn.pl b/bin/arapprn.pl index 5eb138d9..9cd91e02 100644 --- a/bin/arapprn.pl +++ b/bin/arapprn.pl @@ -39,6 +39,9 @@ # printing routines for ar, ap
#
+use Error qw(:try);
+use LedgerSMB::Template;
+
# any custom scripts for this one
if (-f "bin/custom/arapprn.pl") {
eval { require "bin/custom/arapprn.pl"; };
@@ -258,6 +261,18 @@ sub print_check { $form->{fileid} = $invnumber;
$form->{fileid} =~ s/(\s|\W)+//g;
+ if (($form->{'media'} eq 'screen') and ($form->{'format'} eq 'html')) {
+ my $template = LedgerSMB::Template->new(\%myconfig, $form->{'formname'}, 'HTML');
+ try {
+ $template->render($form);
+ $form->header;
+ print $template->{'output'};
+ exit;
+ } catch Error::Simple with {
+ my $E = shift;
+ $form->error($E->stacktrace);
+ };
+ }
$form->parse_template(\%myconfig);
if ($form->{previousform}) {
@@ -476,6 +491,18 @@ sub print_transaction { $form->{fileid} = $form->{invnumber};
$form->{fileid} =~ s/(\s|\W)+//g;
+ if (($form->{'media'} eq 'screen') and ($form->{'format'} eq 'html')) {
+ my $template = LedgerSMB::Template->new(\%myconfig, $form->{'formname'}, 'HTML');
+ try {
+ $template->render($form);
+ $form->header;
+ print $template->{'output'};
+ exit;
+ } catch Error::Simple with {
+ my $E = shift;
+ $form->error($E->stacktrace);
+ };
+ }
$form->parse_template(\%myconfig);
if (%$old_form) {
@@ -45,7 +45,9 @@ #
#======================================================================
+use Error qw(:try);
+use LedgerSMB::Template;
use LedgerSMB::CP;
use LedgerSMB::OP;
use LedgerSMB::IS;
@@ -1277,6 +1279,18 @@ sub print_form { $form->{printmode} = '|-';
}
+ if (($form->{'media'} eq 'screen') and ($form->{'format'} eq 'html')) {
+ my $template = LedgerSMB::Template->new(\%myconfig, $form->{'formname'}, 'HTML');
+ try {
+ $template->render($form);
+ $form->header;
+ print $template->{'output'};
+ exit;
+ } catch Error::Simple with {
+ my $E = shift;
+ $form->error($E->stacktrace);
+ };
+ }
$form->parse_template(\%myconfig, ${LedgerSMB::Sysconfig::userspath});
}
@@ -38,7 +38,10 @@ #
#######################################################################
+use Error qw(:try);
+
use LedgerSMB::Tax;
+use LedgerSMB::Template;
use LedgerSMB::Sysconfig;
# any custom scripts for this one
@@ -1544,9 +1547,21 @@ sub print_form { $form->{fileid} = $form->{"${inv}number"};
$form->{fileid} =~ s/(\s|\W)+//g;
-
- $form->parse_template(\%myconfig, ${LedgerSMB::Sysconfig::userspath});
+
+ if (($form->{'media'} eq 'screen') and ($form->{'format'} eq 'html')) {
+ my $template = LedgerSMB::Template->new(\%myconfig, $form->{'formname'}, 'HTML');
+ try {
+ $template->render($form);
+ $form->header;
+ print $template->{'output'};
+ exit;
+ } catch Error::Simple with {
+ my $E = shift;
+ $form->error($E->stacktrace);
+ };
+ }
+ $form->parse_template(\%myconfig, ${LedgerSMB::Sysconfig::userspath});
# if we got back here restore the previous form
if (defined %$old_form) {
@@ -39,6 +39,9 @@ #
#======================================================================
+use Error qw(:try);
+
+use LedgerSMB::Template;
use LedgerSMB::JC;
1;
@@ -1913,6 +1916,18 @@ sub print_timecard { $status{audittrail} .= $form->audittrail("", \%myconfig, \%audittrail);
}
+ if (($form->{'media'} eq 'screen') and ($form->{'format'} eq 'html')) {
+ my $template = LedgerSMB::Template->new(\%myconfig, $form->{'formname'}, 'HTML');
+ try {
+ $template->render($form);
+ $form->header;
+ print $template->{'output'};
+ exit;
+ } catch Error::Simple with {
+ my $E = shift;
+ $form->error($E->stacktrace);
+ };
+ }
$form->parse_template(\%myconfig, ${LedgerSMB::Sysconfig::userspath});
if (defined %$old_form) {
@@ -40,6 +40,9 @@ #
#=====================================================================
+use Error qw(:try);
+
+use LedgerSMB::Template;
use LedgerSMB::Tax;
1;
@@ -872,6 +875,18 @@ sub print_form { delete $form->{stylesheet};
$form->{cd_open} = $pos_config{rp_cash_drawer_open};
+ if (($form->{'media'} eq 'screen') and ($form->{'format'} eq 'html')) {
+ my $template = LedgerSMB::Template->new(\%myconfig, $form->{'formname'}, 'HTML');
+ try {
+ $template->render($form);
+ $form->header;
+ print $template->{'output'};
+ exit;
+ } catch Error::Simple with {
+ my $E = shift;
+ $form->error($E->stacktrace);
+ };
+ }
$form->parse_template(\%myconfig, ${LedgerSMB::Sysconfig::userspath});
if ($form->{printed} !~ /$form->{formname}/) {
@@ -41,9 +41,11 @@ #
#======================================================================
+use Error qw(:try);
require "bin/arap.pl";
+use LedgerSMB::Template;
use LedgerSMB::PE;
use LedgerSMB::RP;
@@ -993,6 +995,18 @@ sub generate_income_statement { $form->{IN} = "income_statement.html";
+ if (($form->{'media'} eq 'screen') and ($form->{'format'} eq 'html')) {
+ my $template = LedgerSMB::Template->new(\%myconfig, $form->{'formname'}, 'HTML');
+ try {
+ $template->render($form);
+ $form->header;
+ print $template->{'output'};
+ exit;
+ } catch Error::Simple with {
+ my $E = shift;
+ $form->error($E->stacktrace);
+ };
+ }
$form->parse_template;
}
@@ -1027,6 +1041,18 @@ sub generate_balance_sheet { $form->{templates} = $myconfig{templates};
+ if (($form->{'media'} eq 'screen') and ($form->{'format'} eq 'html')) {
+ my $template = LedgerSMB::Template->new(\%myconfig, $form->{'formname'}, 'HTML');
+ try {
+ $template->render($form);
+ $form->header;
+ print $template->{'output'};
+ exit;
+ } catch Error::Simple with {
+ my $E = shift;
+ $form->error($E->stacktrace);
+ };
+ }
$form->parse_template;
}
@@ -2022,6 +2048,18 @@ sub print_form { for ("c0", "c30", "c60", "c90", "") { $form->{"${_}total"} = $form->format_amount(\%myconfig, $form->{"${_}total"}, 2) }
+ if (($form->{'media'} eq 'screen') and ($form->{'format'} eq 'html')) {
+ my $template = LedgerSMB::Template->new(\%myconfig, $form->{'formname'}, 'HTML');
+ try {
+ $template->render($form);
+ $form->header;
+ print $template->{'output'};
+ exit;
+ } catch Error::Simple with {
+ my $E = shift;
+ $form->error($E->stacktrace);
+ };
+ }
$form->parse_template(\%myconfig, ${LedgerSMB::Sysconfig::userspath});
}
@@ -48,6 +48,7 @@ use LedgerSMB::Sysconfig; use Digest::MD5; +use Error qw(:try); $| = 1; diff --git a/templates/demo/ap_transaction.html b/templates/demo/ap_transaction.html index 153b208f..74d269c7 100644 --- a/templates/demo/ap_transaction.html +++ b/templates/demo/ap_transaction.html @@ -3,7 +3,7 @@ <table width="100%"> - <?lsmb include letterhead.html ?> + <?lsmb INCLUDE letterhead.html ?> <tr> <td width=10> </td> @@ -21,39 +21,39 @@ <tr valign=top> <td><?lsmb name ?> <br><?lsmb address1 ?> - <?lsmb if address2 ?> + <?lsmb IF address2 ?> <br><?lsmb address2 ?> - <?lsmb end address2 ?> + <?lsmb END ?> <br><?lsmb city ?> - <?lsmb if state ?> + <?lsmb IF state ?> , <?lsmb state ?> - <?lsmb end state ?> + <?lsmb END ?> <?lsmb zipcode ?> - <?lsmb if country ?> + <?lsmb IF country ?> <br><?lsmb country ?> - <?lsmb end country ?> + <?lsmb END ?> <br> - <?lsmb if contact ?> + <?lsmb IF contact ?> <br><?lsmb contact ?> <br> - <?lsmb end contact ?> + <?lsmb END ?> - <?lsmb if vendorphone ?> + <?lsmb IF vendorphone ?> <br>Tel: <?lsmb vendorphone ?> - <?lsmb end vendorphone ?> + <?lsmb END ?> - <?lsmb if vendorfax ?> + <?lsmb IF vendorfax ?> <br>Fax: <?lsmb vendorfax ?> - <?lsmb end vendorfax ?> + <?lsmb END ?> - <?lsmb if email ?> + <?lsmb IF email ?> <br><?lsmb email ?> - <?lsmb end email ?> + <?lsmb END ?> - <?lsmb if vendortaxnumber ?> + <?lsmb IF vendortaxnumber ?> <p>Taxnumber: <?lsmb vendortaxnumber ?> - <?lsmb end vendortaxnumber ?> + <?lsmb END ?> </td> <td align=right> @@ -70,18 +70,18 @@ <th align=left nowrap>Due</th> <td><?lsmb duedate ?></td> </tr> - <?lsmb if ponumber ?> + <?lsmb IF ponumber ?> <tr> <th align=left>PO #</th> <td><?lsmb ponumber ?> </td> </tr> - <?lsmb end ponumber ?> - <?lsmb if ordnumber ?> + <?lsmb END ?> + <?lsmb IF ordnumber ?> <tr> <th align=left>Order #</th> <td><?lsmb ordnumber ?> </td> </tr> - <?lsmb end ordnumber ?> + <?lsmb END ?> <tr> <th align=left nowrap>Employee</th> <td><?lsmb employee ?> </td> @@ -100,48 +100,48 @@ <td> <table> - <?lsmb foreach account ?> + <?lsmb FOREACH account ?> + <?lsmb loop_count = loop.count - 1 ?> <tr valign=top> - <td><?lsmb accno ?></td> - <td><?lsmb account ?></td> + <td><?lsmb accno.${loop_count} ?></td> + <td><?lsmb account.${loop_count} ?></td> <td width=10> </td> - <td align=right><?lsmb amount ?></td> + <td align=right><?lsmb amount.${loop_count} ?></td> <td width=10> </td> - <td><?lsmb description ?></td> + <td><?lsmb description.${loop_count} ?></td> <td width=10> </td> - <td><?lsmb projectnumber ?></td> + <td><?lsmb projectnumber.${loop_count} ?></td> </tr> - <?lsmb end account ?> + <?lsmb END ?> <tr> - <?lsmb if taxincluded ?> + <?lsmb IF taxincluded ?> <th colspan=2 align=right>Total</th> <td width=10> </td> <td align=right><?lsmb invtotal ?></td> - <?lsmb end taxincluded ?> - - <?lsmb if not taxincluded ?> + <?lsmb ELSE ?> <th colspan=2 align=right>Subtotal</th> <td width=10> </td> <td align=right><?lsmb subtotal ?></td> - <?lsmb end taxincluded ?> + <?lsmb END ?> </tr> - <?lsmb foreach tax ?> + <?lsmb FOREACH tax ?> + <?lsmb loop_count = loop.count - 1 ?> <tr> - <th colspan=2 align=right><?lsmb taxdescription ?> @ <?lsmb taxrate ?> %</th> + <th colspan=2 align=right><?lsmb taxdescription.${loop_count} ?> @ <?lsmb taxrate.${loop_count} ?> %</th> <td width=10> </td> - <td align=right><?lsmb tax ?></td> + <td align=right><?lsmb tax.${loop_count} ?></td> </tr> - <?lsmb end tax ?> + <?lsmb END ?> - <?lsmb if not taxincluded ?> + <?lsmb IF NOT taxincluded ?> <tr> <th colspan=2 align=right>Total</th> <td width=10> </td> <td align=right><?lsmb invtotal ?></td> </tr> - <?lsmb end taxincluded ?> + <?lsmb END ?> </table> </td> </tr> @@ -162,7 +162,7 @@ </td> </tr> - <?lsmb if paid_1 ?> + <?lsmb IF paid_1 ?> <tr> <td> </td> @@ -188,30 +188,31 @@ <th>Memo</th> <th>Amount</th> </tr> - <?lsmb end paid_1 ?> + <?lsmb END ?> - <?lsmb foreach payment ?> + <?lsmb FOREACH payment ?> + <?lsmb loop_count = loop.count - 1 ?> <tr> - <td><?lsmb paymentdate ?></td> - <td><?lsmb paymentaccount ?></td> - <td><?lsmb paymentsource ?></td> - <td><?lsmb paymentmemo ?></td> - <td align=right><?lsmb payment ?></td> + <td><?lsmb paymentdate.${loop_count} ?></td> + <td><?lsmb paymentaccount.${loop_count} ?></td> + <td><?lsmb paymentsource.${loop_count} ?></td> + <td><?lsmb paymentmemo.${loop_count} ?></td> + <td align=right><?lsmb payment.${loop_count} ?></td> </tr> - <?lsmb end payment ?> + <?lsmb END ?> - <?lsmb if paid_1 ?> + <?lsmb IF paid_1 ?> </table> </td> </tr> </table> </td> </tr> - <?lsmb end paid_1 ?> + <?lsmb END ?> <tr height=10></tr> - <?lsmb if taxincluded ?> + <?lsmb IF taxincluded ?> <tr> <td> </td> </tr> @@ -219,7 +220,7 @@ <tr> <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th> </tr> - <?lsmb end taxincluded ?> + <?lsmb END ?> </table> diff --git a/templates/demo/ar_transaction.html b/templates/demo/ar_transaction.html index b9ecd757..79457370 100644 --- a/templates/demo/ar_transaction.html +++ b/templates/demo/ar_transaction.html @@ -3,7 +3,7 @@ <table width="100%"> - <?lsmb include letterhead.html ?> + <?lsmb INCLUDE letterhead.html ?> <tr> <td width=10> </td> @@ -21,39 +21,39 @@ <tr valign=top> <td><?lsmb name ?> <br><?lsmb address1 ?> - <?lsmb if address2 ?> + <?lsmb IF address2 ?> <br><?lsmb address2 ?> - <?lsmb end address2 ?> + <?lsmb END ?> <br><?lsmb city ?> - <?lsmb if state ?> + <?lsmb IF state ?> , <?lsmb state ?> - <?lsmb end state ?> + <?lsmb END ?> <?lsmb zipcode ?> - <?lsmb if country ?> + <?lsmb IF country ?> <br><?lsmb country ?> - <?lsmb end country ?> + <?lsmb END ?> <br> - <?lsmb if contact ?> + <?lsmb IF contact ?> <br><?lsmb contact ?> <br> - <?lsmb end contact ?> + <?lsmb END ?> - <?lsmb if customerphone ?> + <?lsmb IF customerphone ?> <br>Tel: <?lsmb customerphone ?> - <?lsmb end customerphone ?> + <?lsmb END ?> - <?lsmb if customerfax ?> + <?lsmb IF customerfax ?> <br>Fax: <?lsmb customerfax ?> - <?lsmb end customerfax ?> + <?lsmb END ?> - <?lsmb if email ?> + <?lsmb IF email ?> <br><?lsmb email ?> - <?lsmb end email ?> + <?lsmb END ?> - <?lsmb if customertaxnumber ?> + <?lsmb IF customertaxnumber ?> <br>Taxnumber: <?lsmb customertaxnumber ?> - <?lsmb end customertaxnumber ?> + <?lsmb END ?> </td> <td align=right> @@ -70,18 +70,18 @@ <th align=left nowrap>Due</th> <td><?lsmb duedate ?></td> </tr> - <?lsmb if ponumber ?> + <?lsmb IF ponumber ?> <tr> <th align=left>PO #</th> <td><?lsmb ponumber ?> </td> </tr> - <?lsmb end ponumber ?> - <?lsmb if ordnumber ?> + <?lsmb END ?> + <?lsmb IF ordnumber ?> <tr> <th align=left>Order #</th> <td><?lsmb ordnumber ?> </td> </tr> - <?lsmb end ordnumber ?> + <?lsmb END ?> <tr> <th align=left nowrap>Salesperson</th> <td><?lsmb employee ?> </td> @@ -100,48 +100,48 @@ <td> <table> - <?lsmb foreach account ?> + <?lsmb FOREACH account ?> + <?lsmb loop_count = loop.count - 1 ?> <tr valign=top> - <td><?lsmb accno ?></td> - <td><?lsmb account ?></td> - <td width=10> </td> - <td align=right><?lsmb amount ?></td> - <td width=10> </td> - <td><?lsmb description ?></td> - <td width=10> </td> - <td><?lsmb projectnumber ?></td> + <td><?lsmb accno.${loop_count} ?></td> + <td><?lsmb account.${loop_count} ?></td> + <td width=10> </td> + <td align=right><?lsmb amount.${loop_count} ?></td> + <td width=10> </td> + <td><?lsmb description.${loop_count} ?></td> + <td width=10> </td> + <td><?lsmb projectnumber.${loop_count} ?></td> </tr> - <?lsmb end account ?> + <?lsmb END ?> <tr> - <?lsmb if taxincluded ?> + <?lsmb IF taxincluded ?> <th colspan=2 align=right>Total</th> - <td width=10> </td> + <td width=10> </td> <td align=right><?lsmb invtotal ?></td> - <?lsmb end taxincluded ?> - - <?lsmb if not taxincluded ?> + <?lsmb ELSE ?> <th colspan=2 align=right>Subtotal</th> - <td width=10> </td> + <td width=10> </td> <td align=right><?lsmb subtotal ?></td> - <?lsmb end taxincluded ?> + <?lsmb END ?> </tr> - <?lsmb foreach tax ?> + <?lsmb FOREACH tax ?> + <?lsmb loop_count = loop.count - 1 ?> <tr> - <th colspan=2 align=right><?lsmb taxdescription ?> @ <?lsmb taxrate ?> %</th> - <td width=10> </td> - <td align=right><?lsmb tax ?></td> + <th colspan=2 align=right><?lsmb taxdescription.${loop_count} ?> @ <?lsmb taxrate.${loop_count} ?> %</th> + <td width=10> </td> + <td align=right><?lsmb tax.${loop_count} ?></td> </tr> - <?lsmb end tax ?> + <?lsmb END ?> - <?lsmb if not taxincluded ?> + <?lsmb IF NOT taxincluded ?> <tr> <th colspan=2 align=right>Total</th> - <td width=10> </td> + <td width=10> </td> <td align=right><?lsmb invtotal ?></td> </tr> - <?lsmb end taxincluded ?> + <?lsmb END ?> </table> </td> </tr> @@ -162,7 +162,7 @@ </td> </tr> - <?lsmb if paid_1 ?> + <?lsmb IF paid_1 ?> <tr> <td> </td> @@ -187,37 +187,39 @@ <th>Source</th> <th>Amount</th> </tr> - <?lsmb end paid_1 ?> + <?lsmb END ?> - <?lsmb foreach payment ?> + <?lsmb FOREACH payment ?> + <?lsmb loop_count = loop.count - 1 ?> <tr> - <td><?lsmb paymentdate ?></td> - <td><?lsmb paymentaccount ?></td> - <td><?lsmb paymentsource ?></td> - <td align=right><?lsmb payment ?></td> + <td><?lsmb paymentdate.${loop_count} ?></td> + <td><?lsmb paymentaccount.${loop_count} ?></td> + <td><?lsmb paymentsource.${loop_count} ?></td> + <td align=right><?lsmb payment.${loop_count} ?></td> </tr> - <?lsmb end payment ?> + <?lsmb END ?> - <?lsmb if paid_1 ?> + <?lsmb IF paid_1 ?> </table> </td> </tr> </table> </td> </tr> - <?lsmb end paid_1 ?> + <?lsmb END ?> <tr height=10></tr> - <?lsmb foreach tax ?> + <?lsmb FOREACH tax ?> + <?lsmb loop_count = loop.count - 1 ?> <tr> <td> </td> - <th colspan=9 align=left><font size=-2><?lsmb taxdescription ?> Registration <?lsmb taxnumber ?></th> + <th colspan=9 align=left><font size=-2><?lsmb taxdescription.${loop_count} ?> Registration <?lsmb taxnumber.${loop_count} ?></th> </tr> - <?lsmb end tax ?> + <?lsmb END ?> - <?lsmb if taxincluded ?> + <?lsmb IF taxincluded ?> <tr> <td> </td> </tr> @@ -225,7 +227,7 @@ <tr> <th colspan=3 align=left><font size=-2>Taxes shown are included in price.</th> </tr> - <?lsmb end taxincluded ?> + <?lsmb END ?> </table> diff --git a/templates/demo/balance_sheet.html b/templates/demo/balance_sheet.html index 2ce532f8..e81aad0c 100644 --- a/templates/demo/balance_sheet.html +++ b/templates/demo/balance_sheet.html @@ -9,9 +9,9 @@ <br>as at <?lsmb this_period ?> </h2> -<?lsmb if department ?> +<?lsmb IF department ?> <h4>Department: <?lsmb department ?></h4> -<?lsmb end department ?> +<?lsmb END ?> <table border=0> <tr> @@ -20,14 +20,15 @@ <th><?lsmb last_period ?></th> </tr> -<?lsmb foreach asset_account ?> +<?lsmb FOREACH asset_account ?> +<?lsmb loop_count = loop.count - 1 ?> <tr> <td> </td> - <td><?lsmb asset_account ?></td> - <td align=right><?lsmb asset_this_period ?></td> - <td align=right><?lsmb asset_last_period ?></td> + <td><?lsmb asset_account.${loop_count} ?></td> + <td align=right><?lsmb asset_this_period.${loop_count} ?></td> + <td align=right><?lsmb asset_last_period.${loop_count} ?></td> </tr> -<?lsmb end asset_account ?> +<?lsmb END ?> <tr> <td colspan=2> </td> @@ -45,14 +46,15 @@ <th align=left colspan=4>LIABILITIES<b><hr align=left width=250 size=5 noshade></th> </tr> -<?lsmb foreach liability_account ?> +<?lsmb FOREACH liability_account ?> +<?lsmb loop_count = loop.count - 1 ?> <tr> <td></td> - <td><?lsmb liability_account ?></td> - <td align=right><?lsmb liability_this_period ?></td> - <td align=right><?lsmb liability_last_period ?></td> + <td><?lsmb liability_account.${loop_count} ?></td> + <td align=right><?lsmb liability_this_period.${loop_count} ?></td> + <td align=right><?lsmb liability_last_period.${loop_count} ?></td> </tr> -<?lsmb end liability_account ?> +<?lsmb END ?> <tr> <td colspan=2> </td> @@ -71,14 +73,15 @@ <th align=left colspan=4>SHAREHOLDER'S EQUITY<br><hr align=left width=250 size=5 noshade></th> </tr> -<?lsmb foreach equity_account ?> +<?lsmb FOREACH equity_account ?> +<?lsmb loop_count = loop.count - 1 ?> <tr> <td></td> - <td><?lsmb equity_account ?></td> - <td align=right><?lsmb equity_this_period ?></td> - <td align=right><?lsmb equity_last_period ?></td> + <td><?lsmb equity_account.${loop_count} ?></td> + <td align=right><?lsmb equity_this_period.${loop_count} ?></td> + <td align=right><?lsmb equity_last_period.${loop_count} ?></td> </tr> -<?lsmb end equity_account ?> +<?lsmb END ?> <tr> <td colspan=2> </td> diff --git a/templates/demo/bin_list.html b/templates/demo/bin_list.html index 3a14e7d9..d9400d45 100644 --- a/templates/demo/bin_list.html +++ b/templates/demo/bin_list.html @@ -3,7 +3,7 @@ <table width="100%"> - <?lsmb include letterhead.html ?> + <?lsmb INCLUDE letterhead.html ?> <tr> <td width=10> </td> @@ -26,63 +26,63 @@ <tr valign=top> <td><?lsmb name ?> <br><?lsmb address1 ?> - <?lsmb if address2 ?> + <?lsmb IF address2 ?> <br><?lsmb address2 ?> - <?lsmb end address2 ?> + <?lsmb END ?> <br><?lsmb city ?> - <?lsmb if state ?> + <?lsmb IF state ?> , <?lsmb state ?> - <?lsmb end state ?> + <?lsmb END ?> <?lsmb zipcode ?> - <?lsmb if country ?> + <?lsmb IF country ?> <?lsmb country ?> - <?lsmb end country ?> + <?lsmb END ?> <br> - <?lsmb if contact ?> + <?lsmb IF contact ?> <br>Attn: <?lsmb contact ?> - <?lsmb end contact ?> + <?lsmb END ?> - <?lsmb if vendorphone ?> + <?lsmb IF vendorphone ?> <br>Tel: <?lsmb vendorphone ?> - <?lsmb end vendorphone ?> + <?lsmb END ?> - <?lsmb if vendorfax ?> + <?lsmb IF vendorfax ?> <br>Fax: <?lsmb vendorfax ?> - <?lsmb end vendorfax ?> + <?lsmb END ?> - <?lsmb if email ?> + <?lsmb IF email ?> <br><?lsmb email ?> - <?lsmb end email ?> + <?lsmb END ?> </td> <td><?lsmb shiptoname ?> <br><?lsmb shiptoaddress1 ?> - <?lsmb if shiptoaddress2 ?> + <?lsmb IF shiptoaddress2 ?> <br><?lsmb shiptoaddress2 ?> - <?lsmb end shiptoaddress2 ?> + <?lsmb END ?> <br><?lsmb shiptocity ?> - <?lsmb if shiptostate ?> + <?lsmb IF shiptostate ?> , <?lsmb shiptostate ?> - <?lsmb end shiptostate ?> + <?lsmb END ?> <?lsmb shiptozipcode ?> - <?lsmb if shiptocountry ?> + <?lsmb IF shiptocountry ?> <?lsmb shiptocountry ?> - <?lsmb end shiptocountry ?> + <?lsmb END ?> <br> - <?lsmb if shiptocontact ?> + <?lsmb IF shiptocontact ?> <br>Attn: <?lsmb shiptocontact ?> - <?lsmb end shiptocontact ?> + <?lsmb END ?> - <?lsmb if shiptophone ?> + <?lsmb IF shiptophone ?> <br>Tel: <?lsmb shiptophone ?> - <?lsmb end shiptophone ?> + <?lsmb END ?> - <?lsmb if shiptofax ?> + <?lsmb IF shiptofax ?> <br>Fax: <?lsmb shiptofax ?> - <?lsmb end shiptofax ?> + <?lsmb END ?> </td> </tr> </table> @@ -100,9 +100,9 @@ <th width=17% align=left nowrap>Order #</th> <th width=17% align=left nowrap>Date</th> <th width=17% align=left nowrap>Contact</th> - <?lsmb if warehouse ?> + <?lsmb IF warehouse ?> <th width=17% align=left nowrap>Warehouse</th> - <?lsmb end warehouse ?> + <?lsmb END ?> <th width=17% align=left>Shipping Point</th> <th width=15% align=left>Ship via</th> </tr> @@ -110,19 +110,17 @@ <tr> <td><?lsmb ordnumber ?> </td> - <?lsmb if shippingdate ?> + <?lsmb IF shippingdate ?> <td><?lsmb shippingdate ?></td> - <?lsmb end shippingdate ?> - - <?lsmb if not shippingdate ?> + <?lsmb ELSE ?> <td><?lsmb orddate ?></td> - <?lsmb end shippingdate ?> + <?lsmb END ?> <td><?lsmb employee ?> </td> - <?lsmb if warehouse ?> + <?lsmb IF warehouse ?> <td><?lsmb warehouse ?></td> - <?lsmb end warehouse ?> + <?lsmb END ?> <td><?lsmb shippingpoint ?> </td> <td><?lsmb shipvia ?> </td> @@ -148,19 +146,20 @@ <th><font color=ffffff>Bin</th> </tr> - <?lsmb foreach number ?> + <?lsmb FOREACH number ?> + <?lsmb loop_count = loop.count - 1 ?> <tr valign=top> - <td><?lsmb runningnumber ?></td> - <td><?lsmb number ?></td> - <td><?lsmb description ?></td> - <td><?lsmb serialnumber ?></td> - <td><?lsmb deliverydate ?></td> - <td align=right><?lsmb qty ?></td> - <td align=right><?lsmb ship ?></td> - <td><?lsmb unit ?></td> - <td><?lsmb bin ?></td> + <td><?lsmb runningnumber.${loop_count} ?></td> + <td><?lsmb number.${loop_count} ?></td> + <td><?lsmb description.${loop_count} ?></td> + <td><?lsmb serialnumber.${loop_count} ?></td> + <td><?lsmb deliverydate.${loop_count} ?></td> + <td align=right><?lsmb qty.${loop_count} ?></td> + <td align=right><?lsmb ship.${loop_count} ?></td> + <td><?lsmb unit.${loop_count} ?></td> + <td><?lsmb bin.${loop_count} ?></td> </tr> - <?lsmb end number ?> + <?lsmb END ?> </table> </td> diff --git a/templates/demo/income_statement.html b/templates/demo/income_statement.html index 14b01219..7618733c 100644 --- a/templates/demo/income_statement.html +++ b/templates/demo/income_statement.html @@ -9,13 +9,13 @@ <br><?lsmb period ?> </h2> -<?lsmb if department ?> +<?lsmb IF department ?> <h4>Department: <?lsmb department ?></h4> -<?lsmb end department ?> +<?lsmb END ?> -<?lsmb if projectnumber ?> +<?lsmb IF projectnumber ?> <h4>Project Number: <?lsmb projectnumber ?></h4> -<?lsmb end projectnumber ?> +<?lsmb END ?> <table width=100% border=0> <tr> @@ -24,14 +24,15 @@ <th><?lsmb last_period ?></th> </tr> -<?lsmb foreach income_account ?> +<?lsmb FOREACH income_account ?> +<?lsmb loop_count = loop.count - 1 ?> <tr> <td width=4> </td> - <td><?lsmb income_account ?></td> - <td align=right><?lsmb income_this_period ?></td> - <td align=right><?lsmb income_last_period ?></td> + <td><?lsmb income_account.${loop_count} ?></td> + <td align=right><?lsmb income_this_period.${loop_count} ?></td> + <td align=right><?lsmb income_last_period.${loop_count} ?></td> </tr> -<?lsmb end income_account ?> +<?lsmb END ?> <tr> <td colspan=2> </td> @@ -50,14 +51,15 @@ <th align=left colspan=2>EXPENSES<br><hr width=300 size=5 align=left noshade></th> </tr> -<?lsmb foreach expense_account ?> +<?lsmb FOREACH expense_account ?> +<?lsmb loop_count = loop.count - 1 ?> <tr> <td> </td> - <td><?lsmb expense_account ?></td> - <td align=right><?lsmb expenses_this_period ?></td> - <td align=right><?lsmb expenses_last_period ?></td> + <td><?lsmb expense_account.${loop_count} ?></td> + <td align=right><?lsmb expenses_this_period.${loop_count} ?></td> + <td align=right><?lsmb expenses_last_period.${loop_count} ?></td> </tr> -<?lsmb end expense_account ?> +<?lsmb END ?> <tr> <td colspan=2> </td> diff --git a/templates/demo/invoice.html b/templates/demo/invoice.html index 90b43c88..3b2a08dc 100644 --- a/templates/demo/invoice.html +++ b/templates/demo/invoice.html @@ -3,7 +3,7 @@ <table width="100%"> - <?lsmb include letterhead.html ?> + <?lsmb INCLUDE letterhead.html ?> <tr> <td width=10> </td> @@ -26,68 +26,68 @@ <tr valign=top> <td><?lsmb name ?> <br><?lsmb address1 ?> - <?lsmb if address2 ?> + <?lsmb IF address2 ?> <br><?lsmb address2 ?> - <?lsmb end address2 ?> + <?lsmb END ?> <br><?lsmb city ?> - <?lsmb if state ?> + <?lsmb IF state ?> , <?lsmb state ?> - <?lsmb end state ?> + <?lsmb END ?> <?lsmb zipcode ?> - <?lsmb if country ?> + <?lsmb IF country ?> <br><?lsmb country ?> - <?lsmb end country ?> + <?lsmb END ?> <br> - <?lsmb if contact ?> + <?lsmb IF contact ?> <br><?lsmb contact ?> <br> - <?lsmb end contact ?> + <?lsmb END ?> - <?lsmb if customerphone ?> + <?lsmb IF customerphone ?> <br>Tel: <?lsmb customerphone ?> - <?lsmb end customerphone ?> + <?lsmb END ?> - <?lsmb if customerfax ?> + <?lsmb IF customerfax ?> <br>Fax: <?lsmb customerfax ?> - <?lsmb end customerfax ?> + <?lsmb END ?> - <?lsmb if email ?> + <?lsmb IF email ?> <br><?lsmb email ?> - <?lsmb end email ?> + <?lsmb END ?> </td> <td><?lsmb shiptoname ?> <br><?lsmb shiptoaddress1 ?> - <?lsmb if shiptoaddress2 ?> + <?lsmb IF shiptoaddress2 ?> <br><?lsmb shiptoaddress2 ?> - <?lsmb end shiptoaddress2 ?> + <?lsmb END ?> <br><?lsmb shiptocity ?> - <?lsmb if shiptostate ?> + <?lsmb IF shiptostate ?> , <?lsmb shiptostate ?> - <?lsmb end shiptostate ?> + <?lsmb END ?> <?lsmb shiptozipcode ?> - <?lsmb if shiptocountry ?> + <?lsmb IF shiptocountry ?> <br><?lsmb shiptocountry ?> - <?lsmb end shiptocountry ?> + <?lsmb END ?> <br> - <?lsmb if shiptocontact ?> + <?lsmb IF shiptocontact ?> <br><?lsmb shiptocontact ?> <br> - <?lsmb end shiptocontact ?> + <?lsmb END ?> - <?lsmb if shiptophone ?> + <?lsmb IF shiptophone ?> <br>Tel: <?lsmb shiptophone ?> - <?lsmb end shiptophone ?> + <?lsmb END ?> - <?lsmb if shiptofax ?> + <?lsmb IF shiptofax ?> <br>Fax: <?lsmb shiptofax ?> - <?lsmb end shiptofax ?> + <?lsmb END ?> - <?lsmb if shiptoemail ?> + <?lsmb IF shiptoemail ?> <br><?lsmb shiptoemail ?> - <?lsmb end shiptoemail ?> + <?lsmb END ?> </td> </tr> </table> @@ -141,62 +141,62 @@ <th align=right><font color=ffffff>Extended</th> </tr> - <?lsmb foreach number ?> + <?lsmb FOREACH number ?> + <?lsmb loop_count = loop.count - 1 ?> <tr valign=top> - <td align=right><?lsmb runningnumber ?>.</td> - <td><?lsmb number ?></td> - <td><?lsmb description ?></td> - <td><?lsmb deliverydate ?></td> - <td align=right><?lsmb qty ?></td> - <td><?lsmb unit ?></td> - <td align=right><?lsmb sellprice ?></td> - <td align=right><?lsmb discountrate ?></td> - <td align=right><?lsmb linetotal ?></td> + <td align=right><?lsmb runningnumber.${loop_count} ?>.</td> + <td><?lsmb number.${loop_count} ?></td> + <td><?lsmb description.${loop_count} ?></td> + <td><?lsmb deliverydate.${loop_count} ?></td> + <td align=right><?lsmb qty.${loop_count} ?></td> + <td><?lsmb unit.${loop_count} ?></td> + <td align=right><?lsmb sellprice.${loop_count} ?></td> + <td align=right><?lsmb discountrate.${loop_count} ?></td> + <td align=right><?lsmb linetotal.${loop_count} ?></td> </tr> - <?lsmb end number ?> + <?lsmb END ?> <tr> <td colspan=9><hr noshade></td> </tr> <tr> - <?lsmb if taxincluded ?> + <?lsmb IF taxincluded ?> <th colspan=7 align=right>Total</th> <td colspan=2 align=right><?lsmb invtotal ?></td> - <?lsmb end taxincluded ?> - - <?lsmb if not taxincluded ?> + <?lsmb ELSE ?> <th colspan=7 align=right>Subtotal</th> <td colspan=2 align=right><?lsmb subtotal ?></td> - <?lsmb end taxincluded ?> + <?lsmb END ?> </tr> - <?lsmb foreach tax ?> + <?lsmb FOREACH tax ?> + <?lsmb loop_count = loop.count - 1 ?> <tr> - <th colspan=7 align=right><?lsmb taxdescription ?> on <?lsmb taxbase ?> @ <?lsmb taxrate ?> %</th> - <td colspan=2 align=right><?lsmb tax ?></td> + <th colspan=7 align=right><?lsmb taxdescription.${loop_count} ?> on <?lsmb taxbase.${loop_count} ?> @ <?lsmb taxrate.${loop_count} ?> %</th> + <td colspan=2 align=right><?lsmb tax.${loop_count} ?></td> </tr> - <?lsmb end tax ?> + <?lsmb END ?> - <?lsmb if paid ?> + <?lsmb IF paid ?> <tr> <th colspan=7 align=right>Paid</th> <td colspan=2 align=right>- <?lsmb paid ?></td> </tr> - <?lsmb end paid ?> + <?lsmb END ?> <tr> <td colspan=5> </td> <td colspan=4><hr noshade></td> </tr> - <?lsmb if total ?> + <?lsmb IF total ?> <tr> <td colspan=5> </td> <th colspan=2 align=right nowrap>Balance Due</th> <th colspan=2 align=right><?lsmb total ?></th> </tr> - <?lsmb end total ?> + <?lsmb END ?> <tr> </table> @@ -209,9 +209,9 @@ <td> <table width="100%"> <tr valign=top> - <?lsmb if notes ?> + <?lsmb IF notes ?> <td><?lsmb notes ?></td> - <?lsmb end notes ?> + <?lsmb END ?> <td><?lsmb text_amount ?> ***** <?lsmb decimal ?>/100</td> @@ -223,7 +223,7 @@ </td> </tr> - <?lsmb if paid_1 ?> + <?lsmb IF paid_1 ?> <tr> <td> </td> @@ -246,22 +246,23 @@ <th align=left>Source</th> <th align=left>Amount</th> </tr> - <?lsmb end paid_1 ?> + <?lsmb END ?> - <?lsmb foreach payment ?> + <?lsmb FOREACH payment ?> + <?lsmb loop_count = loop.count - 1 ?> <tr> - <td><?lsmb paymentdate ?></td> - <td><?lsmb paymentaccount ?></td> - <td><?lsmb paymentsource ?></td> - <td><?lsmb payment ?></td> + <td><?lsmb paymentdate.${loop_count} ?></td> + <td><?lsmb paymentaccount.${loop_count} ?></td> + <td><?lsmb paymentsource.${loop_count} ?></td> + <td><?lsmb payment.${loop_count} ?></td> </tr> - <?lsmb end payment ?> + <?lsmb END ?> - <?lsmb if paid_1 ?> + <?lsmb IF paid_1 ?> </table> </td> </tr> - <?lsmb end paid_1 ?> + <?lsmb END ?> <tr height=10></tr> @@ -293,15 +294,16 @@ </td> </tr> - <?lsmb foreach tax ?> + <?lsmb FOREACH tax ?> + <?lsmb loop_count = loop.count - 1 ?> <tr> <td> </td> - <th colspan=9 align=left><font size=-2><?lsmb taxdescription ?> Registration <?lsmb taxnumber ?></th> + <th colspan=9 align=left><font size=-2><?lsmb taxdescription.${loop_count} ?> Registration <?lsmb taxnumber.${loop_count} ?></th> </tr> - <?lsmb end tax ?> + <?lsmb END ?> - <?lsmb if taxincluded ?> + <?lsmb IF taxincluded ?> <tr> <td> </td> </tr> @@ -309,7 +311,7 @@ <tr> <th colspan=8 align=left><font size=-2>Taxes shown are included in price.</th> </tr> - <?lsmb end taxincluded ?> + <?lsmb END ?> </table> diff --git a/templates/demo/packing_list.html b/templates/demo/packing_list.html index 10c03410..2af7f721 100644 --- a/templates/demo/packing_list.html +++ b/templates/demo/packing_list.html @@ -3,7 +3,7 @@ <table width="100%"> - <?lsmb include letterhead.html ?> + <?lsmb INCLUDE letterhead.html ?> <tr> <td width=10> </td> @@ -26,31 +26,31 @@ <tr valign=top> <td><?lsmb shiptoname ?> <br><?lsmb shiptoaddress1 ?> - <?lsmb if shiptoaddress2 ?> + <?lsmb IF shiptoaddress2 ?> <br><?lsmb shiptoaddress2 ?> - <?lsmb end shiptoaddress2 ?> + <?lsmb END ?> <br><?lsmb shiptocity ?> - <?lsmb if shiptostate ?> + <?lsmb IF shiptostate ?> , <?lsmb shiptostate ?> - <?lsmb end shiptostate ?> + <?lsmb END ?> <?lsmb shiptozipcode ?> - <?lsmb if shiptocountry ?> + <?lsmb IF shiptocountry ?> <br><?lsmb shiptocountry ?> - <?lsmb end shiptocountry ?> + <?lsmb END ?> </td> <td> - <?lsmb if shiptocontact ?> + <?lsmb IF shiptocontact ?> <br>Attn: <?lsmb shiptocontact ?> - <?lsmb end shiptocontact ?> + <?lsmb END ?> - <?lsmb if shiptophone ?> + <?lsmb IF shiptophone ?> <br>Tel: <?lsmb shiptophone ?> - <?lsmb end shiptophone ?> + <?lsmb END ?> - <?lsmb if shiptofax ?> + <?lsmb IF shiptofax ?> <br>Fax: <?lsmb shiptofax ?> - <?lsmb end shiptofax ?> + <?lsmb END ?> <?lsmb shiptoemail ?> </td> @@ -71,9 +71,9 @@ <th width=17% align=left>Order #</th> <th width=17% align=left>Date</th> <th width=17% align=left nowrap>Contact</th> - <?lsmb if warehouse ?> + <?lsmb IF warehouse ?> <th width=17% align=left>Warehouse</th> - <?lsmb end warehouse ?> + <?lsmb END ?> <th width=17% align=left>Shipping Point</th> <th width=15% align=left>Ship via</th> </tr> @@ -82,19 +82,17 @@ <td><?lsmb invnumber ?> </td> <td><?lsmb ordnumber ?> </td> - <?lsmb if shippingdate ?> + <?lsmb IF shippingdate ?> <td><?lsmb shippingdate ?></td> - <?lsmb end shippingdate ?> - - <?lsmb if not shippingdate ?> + <?lsmb ELSE ?> <td><?lsmb transdate ?></td> - <?lsmb end shippingdate ?> + <?lsmb END ?> <td><?lsmb employee ?> </td> - <?lsmb if warehouse ?> + <?lsmb IF warehouse ?> <td><?lsmb warehouse ?> </td> - <?lsmb end warehouse ?> + <?lsmb END ?> <td><?lsmb shippingpoint ?> </td> <td><?lsmb shipvia ?> </td> @@ -119,18 +117,19 @@ <th> </th> </tr> - <?lsmb foreach number ?> + <?lsmb FOREACH number ?> + <?lsmb loop_count = loop.count - 1 ?> <tr valign=top> - <td><?lsmb runningnumber ?></td> - <td><?lsmb number ?></td> - <td><?lsmb description ?></td> - <td><?lsmb serialnumber ?></td> - <td><?lsmb deliverydate ?></td> - <td align=right><?lsmb qty ?></td> - <td align=right><?lsmb ship ?></td> - <td><?lsmb unit ?></td> + <td><?lsmb runningnumber.${loop_count} ?></td> + <td><?lsmb number.${loop_count} ?></td> + <td><?lsmb description.${loop_count} ?></td> + <td><?lsmb serialnumber.${loop_count} ?></td> + <td><?lsmb deliverydate.${loop_count} ?></td> + <td align=right><?lsmb qty.${loop_count} ?></td> + <td align=right><?lsmb ship.${loop_count} ?></td> + <td><?lsmb unit.${loop_count} ?></td> </tr> - <?lsmb end number ?> + <?lsmb END ?> </table> </td> @@ -142,7 +141,7 @@ <td><hr noshade></td> </tr> - <?lsmb if notes ?> + <?lsmb IF notes ?> <tr> <td> </td> @@ -155,7 +154,7 @@ </table> </td> </tr> - <?lsmb end notes ?> + <?lsmb END ?> <tr> <td> </td> diff --git a/templates/demo/pick_list.html b/templates/demo/pick_list.html index c71dd76d..bab639b7 100644 --- a/templates/demo/pick_list.html +++ b/templates/demo/pick_list.html @@ -3,7 +3,7 @@ <table width="100%"> - <?lsmb include letterhead.html ?> + <?lsmb INCLUDE letterhead.html ?> <tr> <td width=10> </td> @@ -26,31 +26,31 @@ <tr valign=top> <td><?lsmb shiptoname ?> <br><?lsmb shiptoaddress1 ?> - <?lsmb if shiptoaddress2 ?> + <?lsmb IF shiptoaddress2 ?> <br><?lsmb shiptoaddress2 ?> - <?lsmb end shiptoaddress2 ?> + <?lsmb END ?> <br><?lsmb shiptocity ?> - <?lsmb if shiptostate ?> + <?lsmb IF shiptostate ?> , <?lsmb shiptostate ?> - <?lsmb end shiptostate ?> + <?lsmb END ?> <?lsmb shiptozipcode ?> - <?lsmb if shiptocountry ?> + <?lsmb IF shiptocountry ?> <br><?lsmb shiptocountry ?> - <?lsmb end shiptocountry ?> + <?lsmb END ?> </td> <td> - <?lsmb if shiptocontact ?> + <?lsmb IF shiptocontact ?> <br>Attn: <?lsmb shiptocontact ?> - <?lsmb end shiptocontact ?> + <?lsmb END ?> - <?lsmb if shiptophone ?> + <?lsmb IF shiptophone ?> <br>Tel: <?lsmb shiptophone ?> - <?lsmb end shiptophone ?> + <?lsmb END ?> - <?lsmb if shiptofax ?> + <?lsmb IF shiptofax ?> <br>Fax: <?lsmb shiptofax ?> - <?lsmb end shiptofax ?> + <?lsmb END ?> <?lsmb shiptoemail ?> </td> @@ -79,13 +79,11 @@ <tr> <td><?lsmb invnumber ?> </td> <td><?lsmb ordnumber ?> </td> - <?lsmb if shippingdate ?> + <?lsmb IF shippingdate ?> <td><?lsmb shippingdate ?></td> - <?lsmb end shippingdate ?> - - <?lsmb if not shippingdate ?> + <?lsmb ELSE ?> <td><?lsmb transdate ?></td> - <?lsmb end shippingdate ?> + <?lsmb END ?> <td><?lsmb employee ?> </td> <td><?lsmb warehouse ?> </td> @@ -111,17 +109,18 @@ <th><font color=ffffff>Bin</th> </tr> - <?lsmb foreach number ?> + <?lsmb FOREACH number ?> + <?lsmb loop_count = loop.count - 1 ?> <tr valign=top> - <td><?lsmb runningnumber ?> - <td><?lsmb number ?></td> - <td><?lsmb description ?></td> - <td align=right><?lsmb qty ?></td> + <td><?lsmb runningnumber.${loop_count} ?></td> + <td><?lsmb number.${loop_count} ?></td> + <td><?lsmb description.${loop_count} ?></td> + <td align=right><?lsmb qty.${loop_count} ?></td> <td align=right>[ ]</td> - <td><?lsmb unit ?></td> - <td align=right><?lsmb bin ?></td> + <td><?lsmb unit.${loop_count} ?></td> + <td align=right><?lsmb bin.${loop_count} ?></td> </tr> - <?lsmb end number ?> + <?lsmb END ?> </table> </td> </tr> diff --git a/templates/demo/purchase_order.html b/templates/demo/purchase_order.html index cc8ea763..228c0fe5 100644 --- a/templates/demo/purchase_order.html +++ b/templates/demo/purchase_order.html @@ -3,7 +3,7 @@ <table width="100%"> - <?lsmb include letterhead.html ?> + <?lsmb INCLUDE letterhead.html ?> <tr> <td width=10> </td> @@ -26,58 +26,58 @@ <tr valign=top> <td><?lsmb name ?> <br><?lsmb address1 ?> - <?lsmb if address2 ?> + <?lsmb IF address2 ?> <br><?lsmb address2 ?> - <?lsmb end address2 ?> + <?lsmb END ?> <br><?lsmb city ?> - <?lsmb if state ?> + <?lsmb IF state ?> , <?lsmb state ?> - <?lsmb end state ?> + <?lsmb END ?> <?lsmb zipcode ?> - <?lsmb if country ?> + <?lsmb IF country ?> <br><?lsmb country ?> - <?lsmb end country ?> + <?lsmb END ?> <br> - <?lsmb if contact ?> + <?lsmb IF contact ?> <br>Attn: <?lsmb contact ?> - <?lsmb end contact ?> + <?lsmb END ?> - <?lsmb if vendorphone ?> + <?lsmb IF vendorphone ?> <br>Tel: <?lsmb vendorphone ?> - <?lsmb end vendorphone ?> + <?lsmb END ?> - <?lsmb if vendorfax ?> + <?lsmb IF vendorfax ?> <br>Fax: <?lsmb vendorfax ?> - <?lsmb end vendorfax ?> + <?lsmb END ?> </td> <td><?lsmb shiptoname ?> <br><?lsmb shiptoaddress1 ?> - <?lsmb if shiptoaddress2 ?> + <?lsmb IF shiptoaddress2 ?> <br><?lsmb shiptoaddress2 ?> - <?lsmb end shiptoaddress2 ?> + <?lsmb END ?> <br><?lsmb shiptocity ?> - <?lsmb if shiptostate ?> + <?lsmb IF shiptostate ?> , <?lsmb shiptostate ?> - <?lsmb end shiptostate ?> + <?lsmb END ?> <?lsmb shiptozipcode ?> - <?lsmb if shiptocountry ?> + <?lsmb IF shiptocountry ?> <br><?lsmb shiptocountry ?> - <?lsmb end shiptocountry ?> + <?lsmb END ?> <br> - <?lsmb if shiptocontact ?> + <?lsmb IF shiptocontact ?> <br>Attn: <?lsmb shiptocontact ?> - <?lsmb end shiptocontact ?> + <?lsmb END ?> - <?lsmb if shiptophone ?> + <?lsmb IF shiptophone ?> <br>Tel: <?lsmb shiptophone ?> - <?lsmb end shiptophone ?> + <?lsmb END ?> - <?lsmb if shiptofax ?> + <?lsmb IF shiptofax ?> <br>Fax: <?lsmb shiptofax ?> - <?lsmb end shiptofax ?> + <?lsmb END ?> </td> </tr> </table> @@ -126,83 +126,83 @@ <th><font color=ffffff>Amount</th> </tr> - <?lsmb foreach number ?> + <?lsmb FOREACH number ?> + <?lsmb loop_count = loop.count - 1 ?> <tr valign=top> - <td align=right><?lsmb runningnumber ?>.</td> - <td><?lsmb number ?></td> - <td><?lsmb description ?></td> - <td align=right><?lsmb qty ?></td> - <td><?lsmb unit ?></td> - <td align=right><?lsmb sellprice ?></td> - <td align=right><?lsmb discountrate ?></th> - <td align=right><?lsmb linetotal ?></td> + <td align=right><?lsmb runningnumber.${loop_count} ?>.</td> + <td><?lsmb number.${loop_count} ?></td> + <td><?lsmb description.${loop_count} ?></td> + <td align=right><?lsmb qty.${loop_count} ?></td> + <td><?lsmb unit.${loop_count} ?></td> + <td align=right><?lsmb sellprice.${loop_count} ?></td> + <td align=right><?lsmb discountrate.${loop_count} ?></th> + <td align=right><?lsmb linetotal.${loop_count} ?></td> </tr> - <?lsmb end number ?> + <?lsmb END ?> <tr> <td colspan=8><hr noshade></td> </tr> <tr> - <?lsmb if taxincluded ?> + <?lsmb IF taxincluded ?> <th colspan=7 align=right>Total</th> <th colspan=1 align=right><?lsmb ordtotal ?></th> - <?lsmb end taxincluded ?> - - <?lsmb if not taxincluded ?> + <?lsmb ELSE ?> <th colspan=7 align=right>Subtotal</th> <td colspan=1 align=right><?lsmb subtotal ?></td> - <?lsmb end taxincluded ?> + <?lsmb END ?> </tr> - <?lsmb foreach tax ?> + <?lsmb FOREACH tax ?> + <?lsmb loop_count = loop.count - 1 ?> <tr> - <th colspan=7 align=right><?lsmb taxdescription ?> on <?lsmb taxbase ?> @ <?lsmb taxrate ?> %</th> - <td colspan=1 align=right><?lsmb tax ?></td> + <th colspan=7 align=right><?lsmb taxdescription.${loop_count} ?> on <?lsmb taxbase.${loop_count} ?> @ <?lsmb taxrate.${loop_count} ?> %</th> + <td colspan=1 align=right><?lsmb tax.${loop_count} ?></td> </tr> - <?lsmb end tax ?> + <?lsmb END ?> <tr> <td colspan=4> </td> <td colspan=4><hr noshade></td> </tr> - <?lsmb if not taxincluded ?> + <?lsmb IF NOT taxincluded ?> <th colspan=7 align=right>Total</th> <td colspan=1 align=right><?lsmb ordtotal ?></td> - <?lsmb end taxincluded ?> + <?lsmb END ?> - <?lsmb if terms ?> + <?lsmb IF terms ?> <tr> <td colspan=4>Terms Net <b><?lsmb terms ?></b> days</td> <th colspan=3 align=right>Total</th> <th colspan=1 align=right><?lsmb ordtotal ?></th> </tr> - <?lsmb end terms ?> + <?lsmb END ?> - <?lsmb if taxincluded ?> + <?lsmb IF taxincluded ?> <tr> <td colspan=2>Tax included</td> </tr> - <?lsmb end taxincluded ?> + <?lsmb END ?> <tr> <td> </td> </tr> - <?lsmb if ordtotal ?> + <?lsmb IF ordtotal ?> <tr> <td colspan=8 align=right> All prices in <b><?lsmb currency ?></b> Funds </td> </tr> - <?lsmb end ordtotal ?> + <?lsmb END ?> </table> </td> </tr> - <?lsmb if notes ?> + <?lsmb IF notes ?> <tr> <td> </td> @@ -216,7 +216,7 @@ </table> </td> </tr> - <?lsmb end notes ?> + <?lsmb END ?> <tr> <td> </td> diff --git a/templates/demo/request_quotation.html b/templates/demo/request_quotation.html index ad9b0ab2..827fdf1a 100644 --- a/templates/demo/request_quotation.html +++ b/templates/demo/request_quotation.html @@ -3,7 +3,7 @@ <table width="100%"> - <?lsmb include letterhead.html ?> + <?lsmb INCLUDE letterhead.html ?> <tr> <td width=10> </td> @@ -26,58 +26,58 @@ <tr valign=top> <td><?lsmb name ?> <br><?lsmb address1 ?> - <?lsmb if address2 ?> + <?lsmb IF address2 ?> <br><?lsmb address2 ?> - <?lsmb end address2 ?> + <?lsmb END ?> <br><?lsmb city ?> - <?lsmb if state ?> + <?lsmb IF state ?> , <?lsmb state ?> - <?lsmb end state ?> + <?lsmb END ?> <?lsmb zipcode ?> - <?lsmb if country ?> + <?lsmb IF country ?> <br><?lsmb country ?> - <?lsmb end country ?> + <?lsmb END ?> <br> - <?lsmb if contact ?> + <?lsmb IF contact ?> <br>Attn: <?lsmb contact ?> - <?lsmb end contact ?> + <?lsmb END ?> - <?lsmb if vendorphone ?> + <?lsmb IF vendorphone ?> <br>Tel: <?lsmb vendorphone ?> - <?lsmb end vendorphone ?> + <?lsmb END ?> - <?lsmb if vendorfax ?> + <?lsmb IF vendorfax ?> <br>Fax: <?lsmb vendorfax ?> - <?lsmb end vendorfax ?> + <?lsmb END ?> </td> <td><?lsmb shiptoname ?> <br><?lsmb shiptoaddress1 ?> - <?lsmb if shiptoaddress2 ?> + <?lsmb IF shiptoaddress2 ?> <br><?lsmb shiptoaddr2 ?> - <?lsmb end shiptoaddress2 ?> + <?lsmb END ?> <br><?lsmb shiptocity ?> - <?lsmb if shiptostate ?> + <?lsmb IF shiptostate ?> , <?lsmb shiptostate ?> - <?lsmb end shiptostate ?> + <?lsmb END ?> <?lsmb shiptozipcode ?> - <?lsmb if shiptocountry ?> + <?lsmb IF shiptocountry ?> <br><?lsmb shiptocountry ?> - <?lsmb end shiptocountry ?> + <?lsmb END ?> <br> - <?lsmb if shiptocontact ?> + <?lsmb IF shiptocontact ?> <br>Attn: <?lsmb shiptocontact ?> - <?lsmb end shiptocontact ?> + <?lsmb END ?> - <?lsmb if shiptophone ?> + <?lsmb IF shiptophone ?> <br>Tel: <?lsmb shiptophone ?> - <?lsmb end shiptophone ?> + <?lsmb END ?> - <?lsmb if shiptofax ?> + <?lsmb IF shiptofax ?> <br>Fax: <?lsmb shiptofax ?> - <?lsmb end shiptofax ?> + <?lsmb END ?> </td> </tr> </table> @@ -138,15 +138,16 @@ <th>Extended</th> </tr> - <?lsmb foreach number ?> + <?lsmb FOREACH number ?> + <?lsmb loop_count = loop.count - 1 ?> <tr valign=top> - <td align=right><?lsmb runningnumber ?>.</td> - <td><?lsmb number ?></td> - <td><?lsmb description ?></td> - <td align=right><?lsmb qty ?></td> - <td><?lsmb unit ?></td> + <td align=right><?lsmb runningnumber.${loop_count} ?>.</td> + <td><?lsmb number.${loop_count} ?></td> + <td><?lsmb description.${loop_count} ?></td> + <td align=right><?lsmb qty.${loop_count} ?></td> + <td><?lsmb unit.${loop_count} ?></td> </tr> - <?lsmb end number ?> + <?lsmb END ?> <tr> <td colspan=8><hr noshade></td> @@ -156,7 +157,7 @@ </td> </tr> - <?lsmb if notes ?> + <?lsmb IF notes ?> <tr> <td> </td> @@ -170,7 +171,7 @@ </table> </td> </tr> - <?lsmb end notes ?> + <?lsmb END ?> </table> diff --git a/templates/demo/sales_order.html b/templates/demo/sales_order.html index d238b339..03d657db 100644 --- a/templates/demo/sales_order.html +++ b/templates/demo/sales_order.html @@ -3,7 +3,7 @@ <table width="100%"> - <?lsmb include letterhead.html ?> + <?lsmb INCLUDE letterhead.html ?> <tr> <td width=10> </td> @@ -26,58 +26,58 @@ <tr valign=top> <td><?lsmb name ?> <br><?lsmb address1 ?> - <?lsmb if address2 ?> + <?lsmb IF address2 ?> <br><?lsmb address2 ?> - <?lsmb end address2 ?> + <?lsmb END ?> <br><?lsmb city ?> - <?lsmb if state ?> + <?lsmb IF state ?> , <?lsmb state ?> - <?lsmb end state ?> + <?lsmb END ?> <?lsmb zipcode ?> - <?lsmb if country ?> + <?lsmb IF country ?> <br><?lsmb country ?> - <?lsmb end country ?> + <?lsmb END ?> <br> - <?lsmb if contact ?> + <?lsmb IF contact ?> <br>Attn: <?lsmb contact ?> - <?lsmb end contact ?> - <?lsmb if customerphone ?> + <?lsmb END ?> + <?lsmb IF customerphone ?> <br>Tel: <?lsmb customerphone ?> - <?lsmb end customerphone ?> - <?lsmb if customerfax ?> + <?lsmb END ?> + <?lsmb IF customerfax ?> <br>Fax: <?lsmb customerfax ?> - <?lsmb end customerfax ?> - <?lsmb if email ?> + <?lsmb END ?> + <?lsmb IF email ?> <br><?lsmb email ?> - <?lsmb end email ?> + <?lsmb END ?> </td> <td><?lsmb shiptoname ?> <br><?lsmb shiptoaddress1 ?> - <?lsmb if shiptoaddress2 ?> + <?lsmb IF shiptoaddress2 ?> <br><?lsmb shiptoaddress2 ?> - <?lsmb end shiptoaddress2 ?> + <?lsmb END ?> <br><?lsmb shiptocity ?> - <?lsmb if shiptostate ?> + <?lsmb IF shiptostate ?> , <?lsmb shiptostate ?> - <?lsmb end shiptostate ?> + <?lsmb END ?> <?lsmb shiptozipcode ?> - <?lsmb if shiptocountry ?> + <?lsmb IF shiptocountry ?> <br><?lsmb shiptocountry ?> - <?lsmb end shiptocountry ?> + <?lsmb END ?> <br> - <?lsmb if shiptocontact ?> + <?lsmb IF shiptocontact ?> <br><?lsmb shiptocontact ?> - <?lsmb end shiptocontact ?> - <?lsmb if shiptophone ?> + <?lsmb END ?> + <?lsmb IF shiptophone ?> <br>Tel: <?lsmb shiptophone ?> - <?lsmb end shiptophone ?> - <?lsmb if shiptofax ?> + <?lsmb END ?> + <?lsmb IF shiptofax ?> <br>Fax: <?lsmb shiptofax ?> - <?lsmb end shiptofax ?> - <?lsmb if shiptoemail ?> + <?lsmb END ?> + <?lsmb IF shiptoemail ?> <br><?lsmb shiptoemail ?> - <?lsmb end shiptoemail ?> + <?lsmb END ?> </td> </tr> </table> @@ -128,41 +128,41 @@ <th><font color=ffffff>Amount</th> </tr> - <?lsmb foreach number ?> + <?lsmb FOREACH number ?> + <?lsmb loop_count = loop.count - 1 ?> <tr valign=top> - <td align=right><?lsmb runningnumber ?>.</td> - <td><?lsmb number ?></td> - <td><?lsmb description ?></td> - <td align=right><?lsmb qty ?></td> - <td><?lsmb unit ?></td> - <td align=right><?lsmb sellprice ?></td> - <td align=right><?lsmb discountrate ?></td> - <td align=right><?lsmb linetotal ?></td> + <td align=right><?lsmb runningnumber.${loop_count} ?>.</td> + <td><?lsmb number.${loop_count} ?></td> + <td><?lsmb description.${loop_count} ?></td> + <td align=right><?lsmb qty.${loop_count} ?></td> + <td><?lsmb unit.${loop_count} ?></td> + <td align=right><?lsmb sellprice.${loop_count} ?></td> + <td align=right><?lsmb discountrate.${loop_count} ?></td> + <td align=right><?lsmb linetotal.${loop_count} ?></td> </tr> - <?lsmb end number ?> + <?lsmb END ?> <tr> <td colspan=8><hr noshade></td> </tr> <tr> - <?lsmb if taxincluded ?> + <?lsmb IF taxincluded ?> <th colspan=6 align=right>Total</th> <td colspan=2 align=right><?lsmb invtotal ?></td> - <?lsmb end taxincluded ?> - - <?lsmb if not taxincluded ?> + <?lsmb ELSE ?> <th colspan=6 align=right>Subtotal</th> <td colspan=2 align=right><?lsmb subtotal ?></td> - <?lsmb end taxincluded ?> + <?lsmb END ?> </tr> - <?lsmb foreach tax ?> + <?lsmb FOREACH tax ?> + <?lsmb loop_count = loop.count - 1 ?> <tr> - <th colspan=6 align=right><?lsmb taxdescription ?> on <?lsmb taxbase ?> @ <?lsmb taxrate ?> %</th> - <td colspan=2 align=right><?lsmb tax ?></td> + <th colspan=6 align=right><?lsmb taxdescription.${loop_count} ?> on <?lsmb taxbase.${loop_count} ?> @ <?lsmb taxrate.${loop_count} ?> %</th> + <td colspan=2 align=right><?lsmb tax.${loop_count} ?></td> </tr> - <?lsmb end tax ?> + <?lsmb END ?> <tr> <td colspan=4> </td> @@ -172,9 +172,9 @@ <tr> <td colspan=4> <?lsmb text_amount ?> ***** <?lsmb decimal ?>/100 - <?lsmb if terms ?> + <?lsmb IF terms ?> <br>Terms Net <b><?lsmb terms ?></b> days - <?lsmb end terms ?> + <?lsmb END ?> </td> <th colspan=2 align=right>Total</th> <th colspan=2 align=right><?lsmb ordtotal ?></th> @@ -194,10 +194,10 @@ <td> <table width="100%"> <tr valign=top> - <?lsmb if notes ?> + <?lsmb IF notes ?> <td>Notes</td> <td><?lsmb notes ?></td> - <?lsmb end notes ?> + <?lsmb END ?> <td align=right nowrap> All prices in <?lsmb currency ?> Funds</b> </td> diff --git a/templates/demo/sales_quotation.html b/templates/demo/sales_quotation.html index 7e4ac121..64fc8720 100644 --- a/templates/demo/sales_quotation.html +++ b/templates/demo/sales_quotation.html @@ -3,7 +3,7 @@ <table width="100%"> - <?lsmb include letterhead.html ?> + <?lsmb INCLUDE letterhead.html ?> <tr> <td width=10> </td> @@ -22,34 +22,34 @@ <tr valign=top> <td><?lsmb name ?> <br><?lsmb address1 ?> - <?lsmb if address2 ?> + <?lsmb IF address2 ?> <br><?lsmb address2 ?> - <?lsmb end address2 ?> + <?lsmb END ?> <br><?lsmb city ?> - <?lsmb if state ?> + <?lsmb IF state ?> , <?lsmb state ?> - <?lsmb end state ?> + <?lsmb END ?> <?lsmb zipcode ?> - <?lsmb if country ?> + <?lsmb IF country ?> <br><?lsmb country ?> - <?lsmb end country ?> + <?lsmb END ?> <br> - <?lsmb if contact ?> + <?lsmb IF contact ?> <br>Attn: <?lsmb contact ?> - <?lsmb end contact ?> + <?lsmb END ?> - <?lsmb if customerphone ?> + <?lsmb IF customerphone ?> <br>Tel: <?lsmb customerphone ?> - <?lsmb end customerphone ?> + <?lsmb END ?> - <?lsmb if customerfax ?> + <?lsmb IF customerfax ?> <br>Fax: <?lsmb customerfax ?> - <?lsmb end customerfax ?> + <?lsmb END ?> - <?lsmb if email ?> + <?lsmb IF email ?> <br><?lsmb email ?> - <?lsmb end email ?> + <?lsmb END ?> </td> </tr> @@ -99,41 +99,41 @@ <th><font color=ffffff>Amount</th> </tr> - <?lsmb foreach number ?> + <?lsmb FOREACH number ?> + <?lsmb loop_count = loop.count - 1 ?> <tr valign=top> - <td align=right><?lsmb runningnumber ?></td> - <td><?lsmb number ?></td> - <td><?lsmb description ?></td> - <td align=right><?lsmb qty ?></td> - <td><?lsmb unit ?></td> - <td align=right><?lsmb sellprice ?></td> - <td align=right><?lsmb discountrate ?></td> - <td align=right><?lsmb linetotal ?></td> + <td align=right><?lsmb runningnumber.${loop_count} ?></td> + <td><?lsmb number.${loop_count} ?></td> + <td><?lsmb description.${loop_count} ?></td> + <td align=right><?lsmb qty.${loop_count} ?></td> + <td><?lsmb unit.${loop_count} ?></td> + <td align=right><?lsmb sellprice.${loop_count} ?></td> + <td align=right><?lsmb discountrate.${loop_count} ?></td> + <td align=right><?lsmb linetotal.${loop_count} ?></td> </tr> - <?lsmb end number ?> + <?lsmb END ?> <tr> <td colspan=8><hr noshade></td> </tr> <tr> - <?lsmb if taxincluded ?> + <?lsmb IF taxincluded ?> <th colspan=6 align=right>Total</th> <td colspan=2 align=right><?lsmb invtotal ?></td> - <?lsmb end taxincluded ?> - - <?lsmb if not taxincluded ?> + <?lsmb ELSE ?> <th colspan=6 align=right>Subtotal</th> <td colspan=2 align=right><?lsmb subtotal ?></td> - <?lsmb end taxincluded ?> + <?lsmb END ?> </tr> - <?lsmb foreach tax ?> + <?lsmb FOREACH tax ?> + <?lsmb loop_count = loop.count - 1 ?> <tr> - <th colspan=6 align=right><?lsmb taxdescription ?> on <?lsmb taxbase ?> @ <?lsmb taxrate ?> %</th> - <td colspan=2 align=right><?lsmb tax ?></td> + <th colspan=6 align=right><?lsmb taxdescription.${loop_count} ?> on <?lsmb taxbase.${loop_count} ?> @ <?lsmb taxrate.${loop_count} ?> %</th> + <td colspan=2 align=right><?lsmb tax.${loop_count} ?></td> </tr> - <?lsmb end tax ?> + <?lsmb END ?> <tr> <td colspan=4> </td> @@ -142,9 +142,9 @@ <tr> <td colspan=4> - <?lsmb if terms ?> + <?lsmb IF terms ?> Terms Net <b><?lsmb terms ?></b> days - <?lsmb end terms ?> + <?lsmb END ?> </td> <th colspan=2 align=right>Total</th> <th colspan=2 align=right><?lsmb quototal ?></th> @@ -164,10 +164,10 @@ <td> <table width="100%"> <tr valign=top> - <?lsmb if notes ?> + <?lsmb IF notes ?> <td>Notes</td> <td><?lsmb notes ?></td> - <?lsmb end notes ?> + <?lsmb END ?> <td align=right> All prices in <b><?lsmb currency ?></b> Funds </td> diff --git a/templates/demo/statement.html b/templates/demo/statement.html index 6635f605..6bdee5d1 100644 --- a/templates/demo/statement.html +++ b/templates/demo/statement.html @@ -3,7 +3,7 @@ <table width="100%"> - <?lsmb include letterhead.html ?> + <?lsmb INCLUDE letterhead.html ?> <tr> <td width=10> </td> @@ -26,27 +26,27 @@ <tr valign=top> <td><?lsmb name ?> <br><?lsmb address1 ?> - <?lsmb if address2 ?> + <?lsmb IF address2 ?> <br><?lsmb address2 ?> - <?lsmb end address2 ?> + <?lsmb END ?> <br><?lsmb city ?> - <?lsmb if state ?> + <?lsmb IF state ?> , <?lsmb state ?> - <?lsmb end state ?> + <?lsmb END ?> <?lsmb zipcode ?> - <?lsmb if country ?> + <?lsmb IF country ?> <br><?lsmb country ?> - <?lsmb end country ?> + <?lsmb END ?> <br> - <?lsmb if customerphone ?> + <?lsmb IF customerphone ?> <br>Tel: <?lsmb customerphone ?> - <?lsmb end customerphone ?> - <?lsmb if customerfax ?> + <?lsmb END ?> + <?lsmb IF customerfax ?> <br>Fax: <?lsmb customerfax ?> - <?lsmb end customerfax ?> - <?lsmb if email ?> + <?lsmb END ?> + <?lsmb IF email ?> <br><?lsmb email ?> - <?lsmb end email ?> + <?lsmb END ?> </td> </tr> </table> @@ -71,18 +71,19 @@ <th width="10%">90</th> </tr> - <?lsmb foreach invnumber ?> + <?lsmb FOREACH invnumber ?> + <?lsmb loop_count = loop.count - 1 ?> <tr> - <td><?lsmb invnumber ?></td> - <td><?lsmb ordnumber ?></td> - <td><?lsmb invdate ?></td> - <td><?lsmb duedate ?></td> - <td align=right><?lsmb c0 ?></td> - <td align=right><?lsmb c30 ?></td> - <td align=right><?lsmb c60 ?></td> - <td align=right><?lsmb c90 ?></td> + <td><?lsmb invnumber.${loop_count} ?></td> + <td><?lsmb ordnumber.${loop_count} ?></td> + <td><?lsmb invdate.${loop_count} ?></td> + <td><?lsmb duedate.${loop_count} ?></td> + <td align=right><?lsmb c0.${loop_count} ?></td> + <td align=right><?lsmb c30.${loop_count} ?></td> + <td align=right><?lsmb c60.${loop_count} ?></td> + <td align=right><?lsmb c90.${loop_count} ?></td> </tr> - <?lsmb end invnumber ?> + <?lsmb END ?> <tr> <td colspan=8><hr size=1></td> diff --git a/templates/demo/timecard.html b/templates/demo/timecard.html index e6bb05ab..af49fb87 100644 --- a/templates/demo/timecard.html +++ b/templates/demo/timecard.html @@ -2,7 +2,7 @@ <table width="100%"> - <?lsmb include letterhead.html ?> + <?lsmb INCLUDE letterhead.html ?> <tr> <td width=10> </td> @@ -105,7 +105,7 @@ </td> </tr> - <?lsmb if notes ?> + <?lsmb IF notes ?> <tr height=5></tr> <tr> @@ -115,7 +115,7 @@ <?lsmb notes ?> </td> </tr> - <?lsmb end notes ?> + <?lsmb END ?> </table> diff --git a/templates/demo/work_order.html b/templates/demo/work_order.html index b0f359da..6fb884f0 100644 --- a/templates/demo/work_order.html +++ b/templates/demo/work_order.html @@ -3,7 +3,7 @@ <table width="100%"> - <?lsmb include letterhead.html ?> + <?lsmb INCLUDE letterhead.html ?> <tr> <td width=10> </td> @@ -26,58 +26,58 @@ <tr valign=top> <td><?lsmb name ?> <br><?lsmb address1 ?> - <?lsmb if address2 ?> + <?lsmb IF address2 ?> <br><?lsmb address2 ?> - <?lsmb end address2 ?> + <?lsmb END ?> <br><?lsmb city ?> - <?lsmb if state ?> + <?lsmb IF state ?> , <?lsmb state ?> - <?lsmb end state ?> + <?lsmb END ?> <?lsmb zipcode ?> - <?lsmb if country ?> + <?lsmb IF country ?> <br><?lsmb country ?> - <?lsmb end country ?> + <?lsmb END ?> <br> - <?lsmb if contact ?> + <?lsmb IF contact ?> <br>Attn: <?lsmb contact ?> - <?lsmb end contact ?> - <?lsmb if customerphone ?> + <?lsmb END ?> + <?lsmb IF customerphone ?> <br>Tel: <?lsmb customerphone ?> - <?lsmb end customerphone ?> - <?lsmb if customerfax ?> + <?lsmb END ?> + <?lsmb IF customerfax ?> <br>Fax: <?lsmb customerfax ?> - <?lsmb end customerfax ?> - <?lsmb if email ?> + <?lsmb END ?> + <?lsmb IF email ?> <br><?lsmb email ?> - <?lsmb end email ?> + <?lsmb END ?> </td> <td><?lsmb shiptoname ?> <br><?lsmb shiptoaddress1 ?> - <?lsmb if shiptoaddress2 ?> + <?lsmb IF shiptoaddress2 ?> <br><?lsmb shiptoaddress2 ?> - <?lsmb end shiptoaddress2 ?> + <?lsmb END ?> <br><?lsmb shiptocity ?> - <?lsmb if shiptostate ?> + <?lsmb IF shiptostate ?> , <?lsmb shiptostate ?> - <?lsmb end shiptostate ?> + <?lsmb END ?> <?lsmb shiptozipcode ?> - <?lsmb if shiptocountry ?> + <?lsmb IF shiptocountry ?> <br><?lsmb shiptocountry ?> - <?lsmb end shiptocountry ?> + <?lsmb END ?> <br> - <?lsmb if shiptocontact ?> + <?lsmb IF shiptocontact ?> <br><?lsmb shiptocontact ?> - <?lsmb end shiptocontact ?> - <?lsmb if shiptophone ?> + <?lsmb END ?> + <?lsmb IF shiptophone ?> <br>Tel: <?lsmb shiptophone ?> - <?lsmb end shiptophone ?> - <?lsmb if shiptofax ?> + <?lsmb END ?> + <?lsmb IF shiptofax ?> <br>Fax: <?lsmb shiptofax ?> - <?lsmb end shiptofax ?> - <?lsmb if shiptoemail ?> + <?lsmb END ?> + <?lsmb IF shiptoemail ?> <br><?lsmb shiptoemail ?> - <?lsmb end shiptoemail ?> + <?lsmb END ?> </td> </tr> </table> @@ -127,17 +127,18 @@ <th><font color=ffffff>Serial #</th> </tr> - <?lsmb foreach number ?> + <?lsmb FOREACH number ?> + <?lsmb loop_count = loop.count - 1 ?> <tr valign=top> - <td align=right><?lsmb runningnumber ?>.</td> - <td><?lsmb number ?></td> - <td><?lsmb description ?></td> - <td align=right><?lsmb qty ?></td> - <td><?lsmb unit ?></td> - <td><?lsmb bin ?></td> - <td><?lsmb serialnumber ?></td> + <td align=right><?lsmb runningnumber.${loop_count} ?>.</td> + <td><?lsmb number.${loop_count} ?></td> + <td><?lsmb description.${loop_count} ?></td> + <td align=right><?lsmb qty.${loop_count} ?></td> + <td><?lsmb unit.${loop_count} ?></td> + <td><?lsmb bin.${loop_count} ?></td> + <td><?lsmb serialnumber.${loop_count} ?></td> </tr> - <?lsmb end number ?> + <?lsmb END ?> <tr> <td colspan=7><hr noshade></td> @@ -150,9 +151,9 @@ <tr> <td> </td> - <?lsmb if notes ?> + <?lsmb IF notes ?> <td><?lsmb notes ?></td> - <?lsmb end notes ?> + <?lsmb END ?> </tr> </table> |