From db6d65ea85fb62d3399ec073ecb2fb88eb097567 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 14 Nov 2008 01:53:25 +0000 Subject: Correcting check printing, adding appropriate test cases git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2398 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/DBObject/Payment.pm | 1 - LedgerSMB/Sysconfig.pm | 5 +---- LedgerSMB/Template.pm | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) (limited to 'LedgerSMB') diff --git a/LedgerSMB/DBObject/Payment.pm b/LedgerSMB/DBObject/Payment.pm index 0efefacb..b148165e 100644 --- a/LedgerSMB/DBObject/Payment.pm +++ b/LedgerSMB/DBObject/Payment.pm @@ -64,7 +64,6 @@ sub __validate__ { sub text_amount { use LedgerSMB::Num2text; - print STDERR "num2text\n"; my ($self, $value) = @_; $self->{locale} = $self->{_locale}; $self->init(); diff --git a/LedgerSMB/Sysconfig.pm b/LedgerSMB/Sysconfig.pm index b2fc1a93..f76482e6 100644 --- a/LedgerSMB/Sysconfig.pm +++ b/LedgerSMB/Sysconfig.pm @@ -81,10 +81,7 @@ $gzip = "gzip -S .gz"; $localepath = 'locale/po'; # available printers -%printer = ( - Laser => 'lpr -Plaser', - Epson => 'lpr -PEpson', -); +%printer; my %config; read_config( 'ledgersmb.conf' => %config ) or die; diff --git a/LedgerSMB/Template.pm b/LedgerSMB/Template.pm index e66bcfd9..59fc4d01 100755 --- a/LedgerSMB/Template.pm +++ b/LedgerSMB/Template.pm @@ -290,7 +290,7 @@ sub output { $self->_email_output; } elsif ('print' eq lc $method) { $self->_lpr_output; - } elsif (defined $self->{output} or $method = 'Screen') { + } elsif (defined $self->{output} or lc $method eq 'screen') { $self->_http_output; exit; } elsif (defined $method) { @@ -401,7 +401,7 @@ sub _lpr_output { } my $lpr = $LedgerSMB::Sysconfig::printer{$args->{media}}; - open(LPR, '|-', $lpr); + open (LPR, '|-', $lpr); # Output is not defined here. In the future we should consider # changing this to use the system command and hit the file as an arg. -- cgit v1.2.3