[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [285] trunk



Revision: 285
          http://svn.sourceforge.net/ledger-smb/?rev=285&view=rev
Author:   einhverfr
Date:     2006-10-23 21:08:32 -0700 (Mon, 23 Oct 2006)

Log Message:
-----------
Some tuning to the POS interface-- will add cc interface tomorrow.

Modified Paths:
--------------
    trunk/bin/pos.pl
    trunk/pos.conf.pl

Modified: trunk/bin/pos.pl
===================================================================
--- trunk/bin/pos.pl	2006-10-24 03:45:40 UTC (rev 284)
+++ trunk/bin/pos.pl	2006-10-24 04:08:32 UTC (rev 285)
@@ -405,7 +405,7 @@
 |;
   }
 
-  @column_index = qw(paid source memo AR_paid);
+  @column_index = qw(paid memo source AR_paid);
 
   $column_data{paid} = "<th>".$locale->text('Amount')."</th>";
   $column_data{source} = "<th>".$locale->text('Source')."</th>";
@@ -431,6 +431,14 @@
   $totalpaid = 0;
   
   $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"});
+
+  my $memoselect = qq|<SELECT name="MEMONAME">|;
+  for (keys %pos_sources){
+	$memoselect .= qq|<option value="$_">$pos_sources{$_}</option>|;
+  }
+  $memoselect .= qq|</SELECT>|;
+	
+
   for $i (1 .. $form->{paidaccounts}) {
   
     $form->{"selectAR_paid_$i"} = $form->{selectAR_paid};
@@ -448,7 +456,12 @@
     }
       
     $column_data{source} = qq|<td><input name="source_$i" size=10 value="$form->{"source_$i"}"></td>|;
-    $column_data{memo} = qq|<td><input name="memo_$i" size=10 value="$form->{"memo_$i"}"></td>|;
+    $column_data{memo} = qq|<td>$memoselect</td>|;
+    $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"}){

Modified: trunk/pos.conf.pl
===================================================================
--- trunk/pos.conf.pl	2006-10-24 03:45:40 UTC (rev 284)
+++ trunk/pos.conf.pl	2006-10-24 04:08:32 UTC (rev 285)
@@ -40,6 +40,15 @@
 $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 @@
 # 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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.