#===================================================================== # LedgerSMB # Small Medium Business Accounting software # # See COPYRIGHT file for copyright information #====================================================================== # # This file has NOT undergone whitespace cleanup. # #====================================================================== # # Inventory Control module # #====================================================================== use LedgerSMB::IC; require "$form->{path}/io.pl"; 1; # end of main sub add { %label = ( part => 'Part', service => 'Service', assembly => 'Assembly', labor => 'Labor/Overhead', ); # $locale->text('Add Part') # $locale->text('Add Service') # $locale->text('Add Assembly') # $locale->text('Add Labor/Overhead') $label = "Add $label{$form->{item}}"; $form->{title} = $locale->text($label); $form->{callback} = "$form->{script}?action=add&item=$form->{item}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}" unless $form->{callback}; $form->{orphaned} = 1; if ($form->{previousform}) { $form->{callback} = ""; } &link_part; &display_form; } sub edit { %label = ( part => 'Part', service => 'Service', assembly => 'Assembly', labor => 'Labor/Overhead', ); # $locale->text('Edit Part') # $locale->text('Edit Service') # $locale->text('Edit Assembly') # $locale->text('Edit Labor/Overhead') IC->get_part(\%myconfig, \%$form); $label = "Edit $label{$form->{item}}"; $form->{title} = $locale->text($label); $form->{previousform} = $form->escape($form->{previousform}, 1) if $form->{previousform}; &link_part; &display_form; } sub link_part { IC->create_links("IC", \%myconfig, \%$form); # currencies $form->{selectcurrency} = ""; for (split /:/, $form->{currencies}) { $form->{selectcurrency} .= "