From 308307e013604d41e1c623e85d4c38c2c29a0597 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Tue, 24 Oct 2006 04:08:32 +0000 Subject: Some tuning to the POS interface-- will add cc interface tomorrow. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@285 4979c152-3d1c-0410-bac9-87ea11338e46 --- bin/pos.pl | 17 +++++++++++++++-- pos.conf.pl | 12 ++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/bin/pos.pl b/bin/pos.pl index 999e0aa3..248d7731 100755 --- a/bin/pos.pl +++ b/bin/pos.pl @@ -405,7 +405,7 @@ sub form_footer { |; } - @column_index = qw(paid source memo AR_paid); + @column_index = qw(paid memo source AR_paid); $column_data{paid} = "".$locale->text('Amount').""; $column_data{source} = "".$locale->text('Source').""; @@ -431,6 +431,14 @@ sub form_footer { $totalpaid = 0; $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"}); + + my $memoselect = qq||; + + for $i (1 .. $form->{paidaccounts}) { $form->{"selectAR_paid_$i"} = $form->{selectAR_paid}; @@ -448,7 +456,12 @@ sub form_footer { } $column_data{source} = qq||; - $column_data{memo} = qq||; + $column_data{memo} = qq|$memoselect|; + $column_data{memo} =~ s/MEMONAME/memo_$i/; + if ($form->{"memo_$i"}){ + my $memval = $form->{"memo_$i"}; + $column_data{memo} =~ s/(option value="$memval")/$1 SELECTED/; + } if ($pos_config{"coa_prefix"}){ if (!$form->{"AR_paid_$i"}){ diff --git a/pos.conf.pl b/pos.conf.pl index c0fa3dfa..f6190adb 100644 --- a/pos.conf.pl +++ b/pos.conf.pl @@ -40,6 +40,15 @@ $pos_sources{'check'} = 'Check'; $pos_sources{'cash'} = 'Cash'; $pos_sources{'gcert'} = 'Gift Cert'; +# 1 for source = memo +# 2 for credit card handling +%pos_source_type = { + visa => 2, + cash => 1, + check => 1, + disc => 2 +}; + ${$pos_config{'source_accno_override'}{'gcert'}} = '2105'; # Define your till accno scheme here. Current supported values are 'terminal' # and 'cashier' @@ -84,8 +93,7 @@ $form->{pos_sources} = \%pos_sources; # Due to the architecture of SL, we need to use netcat to print. # Otherwise the document gets spooled twice and this interferes with timeliness. -%printer = ( - 'Printer' => "utils/pos/directnet.pl $pos_config{rp_host} $pos_config{rp_proto} $pos_config{rp_port}" +%{LedgerSMB::Sysconfig::printer}{'Printer'} = "utils/pos/directnet.pl $pos_config{rp_host} $pos_config{rp_proto} $pos_config{rp_port}" ); 1; -- cgit v1.2.3