From 4afd2ef4324be7f35a126b89935a2932ed0373aa Mon Sep 17 00:00:00 2001 From: einhverfr Date: Sat, 5 Jul 2008 22:13:42 +0000 Subject: Removing debugging code accidently left in git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2187 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Template/HTML.pm | 1 - UI/payments/payments_detail.html | 24 +++++++++++++-- scripts/payment.pl | 18 +++++++++++ templates/Default-check.tex | 65 ++-------------------------------------- 4 files changed, 43 insertions(+), 65 deletions(-) diff --git a/LedgerSMB/Template/HTML.pm b/LedgerSMB/Template/HTML.pm index 7b3544fd..59e57c8a 100755 --- a/LedgerSMB/Template/HTML.pm +++ b/LedgerSMB/Template/HTML.pm @@ -69,7 +69,6 @@ sub preprocess { } elsif ($type eq 'SCALAR' or $type eq 'Math::BigInt::GMP') { return escapeHTML($$rawvars); } else { # Hashes and objects - print STDERR "$_ is $type:$rawvars"; for ( keys %{$rawvars} ) { $vars->{preprocess($_)} = preprocess( $rawvars->{$_} ); } diff --git a/UI/payments/payments_detail.html b/UI/payments/payments_detail.html index 6419be4b..1b142aa2 100644 --- a/UI/payments/payments_detail.html +++ b/UI/payments/payments_detail.html @@ -188,7 +188,7 @@ END ?>"> - + - +
@@ -291,6 +291,26 @@ class = 'submit' name = 'action' } ?> + + + + + diff --git a/scripts/payment.pl b/scripts/payment.pl index ed83b9c8..a5561cc1 100644 --- a/scripts/payment.pl +++ b/scripts/payment.pl @@ -72,6 +72,7 @@ sub payments { my ($request) = @_; my $payment = LedgerSMB::DBObject::Payment->new({'base' => $request}); $payment->get_metadata(); + $payment->debug({file => '/tmp/delme'}); my $template = LedgerSMB::Template->new( user => $request->{_user}, locale => $request->{_locale}, @@ -260,6 +261,23 @@ sub display_payments { for (@{$payment->{contact_invoices}}){ $_->{total_due} = $payment->format_amount(amount => $_->{total_due}); } + + @{$payment->{media_options}} = ( + {text => $request->{_locale}->text('Screen'), + value => 'screen'}); + for (keys %LedgerSMB::Sysconfig::printer){ + push @{$payment->{media_options}}, + {text => $_, + value => $LedgerSMB::Sysconfig::printer{$_}}; + } + if ($LedgerSMB::Sysconfig::latex){ + @{$payment->{format_options}} = ( + {text => 'PDF', value => 'PDF'}, + {text => 'Postscript', value => 'Postscript'}, + ); + $payment->{can_print} = 1; + } + my $template = LedgerSMB::Template->new( user => $request->{_user}, locale => $request->{_locale}, diff --git a/templates/Default-check.tex b/templates/Default-check.tex index 3b8053ac..807f7eac 100755 --- a/templates/Default-check.tex +++ b/templates/Default-check.tex @@ -4,6 +4,8 @@ \usepackage[letterpaper,top=2cm,bottom=1.5cm,left=1.1cm,right=1.5cm]{geometry} \usepackage{graphicx} + + \begin{document} \pagestyle{myheadings} @@ -11,67 +13,6 @@ \fontfamily{cmss}\fontsize{9pt}{9pt}\selectfont -\parbox[t]{12cm}{ - - - } -\hfill -\parbox[t]{6cm}{\hfill } - -\vspace*{0.6cm} - - \dotfill /100 \makebox[0.5cm]{\hfill} - -\vspace{0.5cm} - -\hfill \makebox[2cm]{\hfill} - -% different date format for datepaid -% - -\vspace{0.5cm} - - - - - - - - - -\hspace{-0.1cm}, - - + - - -\vspace{1.8cm} - - - -\vspace{0.8cm} - - - -\vspace{0.5cm} - - \hfill \hfill - -\vspace{0.5cm} -\begin{tabularx}{\textwidth}{lXrr@{}} -\textbf{Invoice \#} & \textbf{Invoice Date} - & \textbf{Amount Due} & \textbf{Applied} \\ - - & \dotfill - & & \\ - -\end{tabularx} - -\vspace{1cm} - - - -\vfill - \end{document} - -- cgit v1.2.3