From edacf95ad24fca3c4ae08b44ffdfe4be5c68fdc1 Mon Sep 17 00:00:00 2001 From: christopherm Date: Fri, 13 Oct 2006 16:28:21 +0000 Subject: removing bin/lynx and bin/mozilla folders. All scripts are now at bin/ with bin/custom for custom scripts (user specific or otherwise) git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@208 4979c152-3d1c-0410-bac9-87ea11338e46 --- bin/pe.pl | 2569 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2569 insertions(+) create mode 100755 bin/pe.pl (limited to 'bin/pe.pl') diff --git a/bin/pe.pl b/bin/pe.pl new file mode 100755 index 00000000..8fdc4aae --- /dev/null +++ b/bin/pe.pl @@ -0,0 +1,2569 @@ +#===================================================================== +# LedgerSMB +# Small Medium Business Accounting software +# http://www.ledgersmb.org/ +# +# +# 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$_"} .= "