From ac5b087ea2d9ba7428d367aaeb288534158fee9a Mon Sep 17 00:00:00 2001 From: christopherm Date: Fri, 1 Sep 2006 01:16:38 +0000 Subject: Initial Import git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/ledger-smb@1 4979c152-3d1c-0410-bac9-87ea11338e46 --- bin/mozilla/io.pl | 1672 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1672 insertions(+) create mode 100755 bin/mozilla/io.pl (limited to 'bin/mozilla/io.pl') diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl new file mode 100755 index 00000000..ccc74dca --- /dev/null +++ b/bin/mozilla/io.pl @@ -0,0 +1,1672 @@ +#===================================================================== +# LedgerSMB +# Small Medium Business Accounting software +# +# See COPYRIGHT file for copyright information +#====================================================================== +# +# This file has NOT undergone whitespace cleanup. +# +#====================================================================== +# +# common routines used in is, ir, oe +# +####################################################################### + +# any custom scripts for this one +if (-f "$form->{path}/custom_io.pl") { + eval { require "$form->{path}/custom_io.pl"; }; +} +if (-f "$form->{path}/$form->{login}_io.pl") { + eval { require "$form->{path}/$form->{login}_io.pl"; }; +} + + +1; +# end of main + + +# this is for our long dates +# $locale->text('January') +# $locale->text('February') +# $locale->text('March') +# $locale->text('April') +# $locale->text('May ') +# $locale->text('June') +# $locale->text('July') +# $locale->text('August') +# $locale->text('September') +# $locale->text('October') +# $locale->text('November') +# $locale->text('December') + +# this is for our short month +# $locale->text('Jan') +# $locale->text('Feb') +# $locale->text('Mar') +# $locale->text('Apr') +# $locale->text('May') +# $locale->text('Jun') +# $locale->text('Jul') +# $locale->text('Aug') +# $locale->text('Sep') +# $locale->text('Oct') +# $locale->text('Nov') +# $locale->text('Dec') + + +sub display_row { + my $numrows = shift; + + @column_index = qw(runningnumber partnumber description qty); + + if ($form->{type} eq "sales_order") { + push @column_index, "ship"; + $column_data{ship} = qq||.$locale->text('Ship').qq||; + } + if ($form->{type} eq "purchase_order") { + push @column_index, "ship"; + $column_data{ship} = qq||.$locale->text('Recd').qq||; + } + + for (qw(projectnumber partsgroup)) { + $form->{"select$_"} = $form->unescape($form->{"select$_"}) if $form->{"select$_"}; + } + + if ($form->{language_code} ne $form->{oldlanguage_code}) { + # rebuild partsgroup + $l{language_code} = $form->{language_code}; + $l{searchitems} = 'nolabor' if $form->{vc} eq 'customer'; + + $form->get_partsgroup(\%myconfig, \%l); + if (@ { $form->{all_partsgroup} }) { + $form->{selectpartsgroup} = "