#===================================================================== # LedgerSMB # Small Medium Business Accounting software # # See COPYRIGHT file for copyright information #====================================================================== # # This file has NOT undergone whitespace cleanup. # #====================================================================== # # Batch printing # #====================================================================== use LedgerSMB::BP; 1; # end of main sub search { # $locale->text('Sales Invoices') # $locale->text('Packing Lists') # $locale->text('Pick Lists') # $locale->text('Sales Orders') # $locale->text('Work Orders') # $locale->text('Purchase Orders') # $locale->text('Bin Lists') # $locale->text('Quotations') # $locale->text('RFQs') # $locale->text('Time Cards') # setup customer/vendor selection BP->get_vc(\%myconfig, \%$form); if (@{ $form->{"all_$form->{vc}"} }) { $name = "\n"; for (@{ $form->{"all_$form->{vc}"} }) { $name .= qq|$_->{name}\n| } $name = qq|{vc}>$name|; } else { $name = qq|{vc} size=35>|; } # $locale->text('Customer') # $locale->text('Vendor') # $locale->text('Employee') %label = ( invoice => { title => 'Sales Invoices', name => 'Customer' }, packing_list => { title => 'Packing Lists', name => 'Customer' }, pick_list => { title => 'Pick Lists', name => 'Customer' }, sales_order => { title => 'Sales Orders', name => 'Customer' }, work_order => { title => 'Work Orders', name => 'Customer' }, purchase_order => { title => 'Purchase Orders', name => 'Vendor' }, bin_list => { title => 'Bin Lists', name => 'Vendor' }, sales_quotation => { title => 'Quotations', name => 'Customer' }, request_quotation => { title => 'RFQs', name => 'Vendor' }, timecard => { title => 'Time Cards', name => 'Employee' }, ); $label{invoice}{invnumber} = qq| |.$locale->text('Invoice Number').qq| |; $label{invoice}{ordnumber} = qq| |.$locale->text('Order Number').qq| |; $label{sales_quotation}{quonumber} = qq| |.$locale->text('Quotation Number').qq| |; $label{packing_list}{invnumber} = $label{invoice}{invnumber}; $label{packing_list}{ordnumber} = $label{invoice}{ordnumber}; $label{pick_list}{invnumber} = $label{invoice}{invnumber}; $label{pick_list}{ordnumber} = $label{invoice}{ordnumber}; $label{sales_order}{ordnumber} = $label{invoice}{ordnumber}; $label{work_order}{ordnumber} = $label{invoice}{ordnumber}; $label{purchase_order}{ordnumber} = $label{invoice}{ordnumber}; $label{bin_list}{ordnumber} = $label{invoice}{ordnumber}; $label{request_quotation}{quonumber} = $label{sales_quotation}{quonumber}; # do one call to text $form->{title} = $locale->text('Print')." ".$locale->text($label{$form->{type}}{title}); # accounting years if (@{ $form->{all_years} }) { # accounting years $form->{selectaccountingyear} = "\n"; for (@{ $form->{all_years} }) { $form->{selectaccountingyear} .= qq|$_\n| } $form->{selectaccountingmonth} = "\n"; for (sort keys %{ $form->{all_month} }) { $form->{selectaccountingmonth} .= qq||.$locale->text($form->{all_month}{$_}).qq|\n| } $selectfrom = qq| |.$locale->text('Period').qq| $form->{selectaccountingmonth} $form->{selectaccountingyear} |.$locale->text('Current').qq| |.$locale->text('Month').qq| |.$locale->text('Quarter').qq| |.$locale->text('Year').qq| |; } $form->header; print qq| {script}> |; $form->hide_form(qw(vc type title)); print qq| $form->{title} |.$locale->text($label{$form->{type}}{name}).qq| $name $account $label{$form->{type}}{invnumber} $label{$form->{type}}{ordnumber} $label{$form->{type}}{quonumber} |.$locale->text('From').qq| |.$locale->text('To').qq| $selectfrom |; $form->hide_form(qw(path login sessionid)); print qq|