summaryrefslogtreecommitdiff
path: root/pos.conf.pl
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-26 18:00:56 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-26 18:00:56 +0000
commit666fd833584fe2e3618a397fe9d9a9bdf4c5b94b (patch)
tree19c4444705fd7f7803e0d7b597659c11d7e85b73 /pos.conf.pl
parent2edd2e4de0f08a0a5f23647ea715f279671a0b89 (diff)
Doing a simple Perltidy commit so that I can evaluate differences between the branches and make sure patches are up to date
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1103 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'pos.conf.pl')
-rw-r--r--pos.conf.pl65
1 files changed, 34 insertions, 31 deletions
diff --git a/pos.conf.pl b/pos.conf.pl
index e89e69ce..da0ca6e2 100644
--- a/pos.conf.pl
+++ b/pos.conf.pl
@@ -1,4 +1,5 @@
use LedgerSMB::Sysconfig;
+
# This sets up the settings for the POS hardware. You can use it to override
# printing commands etc. as well.
@@ -8,36 +9,37 @@ use LedgerSMB::Sysconfig;
# Begin Editing Here
-$pos_config{'rem_host'}=$ENV{'REMOTE_ADDR'};
+$pos_config{'rem_host'} = $ENV{'REMOTE_ADDR'};
-$pos_config{'pd_host'} = $pos_config{'rem_host'};
-$pos_config{'pd_port'} = 6601;
+$pos_config{'pd_host'} = $pos_config{'rem_host'};
+$pos_config{'pd_port'} = 6601;
$pos_config{'pd_proto'} = 'tcp';
-require "drivers/pd3000.pl"; # Use the PD3000 driver
+require "drivers/pd3000.pl"; # Use the PD3000 driver
# Some businesses may want to Override this for custom apps
-$pos_config{'pd_host'} = $pos_config{'rem_host'};
+$pos_config{'pd_host'} = $pos_config{'rem_host'};
-$pos_config{'rp_port'} = 6602;
+$pos_config{'rp_port'} = 6602;
$pos_config{'rp_proto'} = 'tcp';
$pos_config{'rp_netdirect'} = 'yes';
# Some businesses may want to Override this for custom apps
-$pos_config{'rp_host'} = $pos_config{'rem_host'};
-$pos_config{'rp_cash_open'} = pack("CCCCC",27,112,0,25,250);
+$pos_config{'rp_host'} = $pos_config{'rem_host'};
+$pos_config{'rp_cash_open'} = pack( "CCCCC", 27, 112, 0, 25, 250 );
$pos_config{'coa_prefix'} = 1300;
$pos_config{'close_cash_accno'} = 1060;
$pos_config{till_cash} = 200;
+
# Add your sources here.
-$pos_sources{'visa'} = $locale->text("Visa/MC");
-$pos_sources{'disc'} = $locale->text("Discover");
+$pos_sources{'visa'} = $locale->text("Visa/MC");
+$pos_sources{'disc'} = $locale->text("Discover");
$pos_sources{'check'} = $locale->text('Check');
-$pos_sources{'cash'} = $locale->text('Cash');
+$pos_sources{'cash'} = $locale->text('Cash');
$pos_sources{'gcert'} = $locale->text('Gift Cert');
$pos_source_default = 'cash';
@@ -45,13 +47,14 @@ $pos_source_default = 'cash';
# 1 for source = memo
# 2 for credit card handling
%pos_source_type = {
- visa => 2,
- cash => 1,
- check => 1,
- disc => 2
+ visa => 2,
+ cash => 1,
+ check => 1,
+ disc => 2
};
-${$pos_config{'source_accno_override'}{'gcert'}} = '2105';
+${ $pos_config{'source_accno_override'}{'gcert'} } = '2105';
+
# Define your till accno scheme here. Current supported values are 'terminal'
# and 'cashier'
@@ -68,33 +71,33 @@ $pos_config{'numberformat'} = '1,000.00';
# Units of currency to use in the till closing cash breakdown relative to
# your base unit of currency, formatted in your chosen format
-@{$pos_config{'breakdown'}} = (
- '100', '50', '20', '10', '5', '2', '1', '0.25', '0.10', '0.05', '0.01');
+@{ $pos_config{'breakdown'} } =
+ ( '100', '50', '20', '10', '5', '2', '1', '0.25', '0.10', '0.05', '0.01' );
# Stop Editing Here
-if (lc($pos_config{'till_type'}) eq 'terminal'){
- $pos_config{'till'} = (split(/\./, $pos_config{'rem_host'}))[3];
+if ( lc( $pos_config{'till_type'} ) eq 'terminal' ) {
+ $pos_config{'till'} = ( split( /\./, $pos_config{'rem_host'} ) )[3];
}
-elsif (lc($pos_config{'till_type'}) eq 'cashier'){
- use LedgerSMB::User;
- $pos_config{'till'} = $form->get_my_emp_num(\%myconfig, \%$form);
+elsif ( lc( $pos_config{'till_type'} ) eq 'cashier' ) {
+ use LedgerSMB::User;
+ $pos_config{'till'} = $form->get_my_emp_num( \%myconfig, \%$form );
}
-else {
- $form->error("No till type defined in pos.conf.pl!");
+else {
+ $form->error("No till type defined in pos.conf.pl!");
}
$pos_config{till_accno} = "$pos_config{coa_prefix}.$pos_config{till}";
-$pos_config{'pd_dest'}=pack(
- 's n a4 x8', 2, $pos_config{'pd_port'},
- pack('CCCC', split(/\./, $pos_config{'pd_host'}))
-);
+$pos_config{'pd_dest'} = pack( 's n a4 x8',
+ 2, $pos_config{'pd_port'},
+ pack( 'CCCC', split( /\./, $pos_config{'pd_host'} ) ) );
-$form->{pos_config} = \%pos_config;
+$form->{pos_config} = \%pos_config;
$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.
-${LedgerSMB::Sysconfig::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;