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/pe.pl | 2567 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2567 insertions(+) create mode 100755 bin/mozilla/pe.pl (limited to 'bin/mozilla/pe.pl') diff --git a/bin/mozilla/pe.pl b/bin/mozilla/pe.pl new file mode 100755 index 00000000..39ff34e3 --- /dev/null +++ b/bin/mozilla/pe.pl @@ -0,0 +1,2567 @@ +#===================================================================== +# LedgerSMB +# Small Medium Business Accounting software +# +# See COPYRIGHT file for copyright information +#====================================================================== +# +# This file has NOT undergone whitespace cleanup. +# +#====================================================================== +# +# project/job administration +# partsgroup administration +# translation maintainance +# +#====================================================================== + + +use LedgerSMB::PE; +use LedgerSMB::AA; +use LedgerSMB::OE; + +1; +# end of main + + + +sub add { + + # construct callback + $form->{callback} = "$form->{script}?action=add&type=$form->{type}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}" unless $form->{callback}; + + &{ "prepare_$form->{type}" }; + + $form->{orphaned} = 1; + &display_form; + +} + + +sub edit { + + &{ "prepare_$form->{type}" }; + &display_form; + +} + + +sub prepare_partsgroup { PE->get_partsgroup(\%myconfig, \%$form) if $form->{id} } +sub prepare_pricegroup { PE->get_pricegroup(\%myconfig, \%$form) if $form->{id} } + +sub prepare_job { + +# $locale->text('Add Job') +# $locale->text('Edit Job') + + $form->{vc} = 'customer'; + + PE->get_job(\%myconfig, \%$form); + + $form->{taxaccounts} = ""; + for (keys %{ $form->{IC_links} }) { + + $form->{"select$_"} = ""; + foreach $ref (@{ $form->{IC_links}{$_} }) { + if (/IC_tax/) { + if (/taxpart/) { + $form->{taxaccounts} .= "$ref->{accno} "; + $form->{"IC_tax_$ref->{accno}_description"} = "$ref->{accno}--$ref->{description}"; + if ($form->{id}) { + if ($form->{amount}{$ref->{accno}}) { + $form->{"IC_tax_$ref->{accno}"} = "checked"; + } + } else { + $form->{"IC_tax_$ref->{accno}"} = "checked"; + } + } + } else { + $form->{"select$_"} .= "