#===================================================================== # 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$_"} .= "