summaryrefslogtreecommitdiff
path: root/bin/pos.pl
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-04 02:35:26 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-04 02:35:26 +0000
commit5c3a962f492011bebe096a5a4b007062152df2d7 (patch)
tree4767953d3090870de43ccb992ed096545be9e4da /bin/pos.pl
parenta3a6064b492c70ecacaa5b413547deb695212487 (diff)
First round of template changes for new TT system
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1023 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin/pos.pl')
-rw-r--r--bin/pos.pl15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/pos.pl b/bin/pos.pl
index 692fdfc1..939ab0e0 100644
--- a/bin/pos.pl
+++ b/bin/pos.pl
@@ -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}/) {