X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fbp.pl;h=439709ebcd87f061a2f9c37376fb81b58cc095b3;hb=b6f37661d8b244fb55f27f9d77cfab6ed6a165e6;hp=8f34b19f6e144d5e0d21014f5a081a0e781e10f0;hpb=5bc7284448a240bfebdaba20a65f845708665bd6;p=kivitendo-erp.git diff --git a/bin/mozilla/bp.pl b/bin/mozilla/bp.pl index 8f34b19f6..439709ebc 100644 --- a/bin/mozilla/bp.pl +++ b/bin/mozilla/bp.pl @@ -24,7 +24,8 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1335, USA. #====================================================================== # # Batch printing @@ -32,6 +33,7 @@ #====================================================================== use SL::BP; +use SL::Locale::String qw(t8); use Data::Dumper; use List::Util qw(first); @@ -44,23 +46,22 @@ use strict; # end of main sub assert_bp_access { - my $form = $main::form; - my %access_map = ( 'invoice' => 'invoice_edit', 'sales_order' => 'sales_order_edit', 'sales_quotation' => 'sales_quotation_edit', 'purchase_order' => 'purchase_order_edit', + 'packing_list' => 'sales_delivery_order_edit|purchase_delivery_order_edit', 'request_quotation' => 'request_quotation_edit', 'check' => 'cash', 'receipt' => 'cash', ); - if ($form->{type} && $access_map{$form->{type}}) { - $main::auth->assert($access_map{$form->{type}}); + if ($::form->{type} && $access_map{$::form->{type}}) { + $::auth->assert($access_map{$::form->{type}}); } else { - $main::auth->assert('DOES_NOT_EXIST'); + $::auth->assert('DOES_NOT_EXIST'); } } @@ -69,15 +70,13 @@ sub search { assert_bp_access(); - # setup customer/vendor selection - BP->get_vc(\%::myconfig, $::form); - my %label = ( invoice => { title => $::locale->text('Sales Invoices'), invnumber => 1, ordnumber => 1 }, sales_order => { title => $::locale->text('Sales Orders'), ordnumber => 1, }, purchase_order => { title => $::locale->text('Purchase Orders'), ordnumber => 1, }, sales_quotation => { title => $::locale->text('Quotations'), quonumber => 1, }, request_quotation => { title => $::locale->text('RFQs'), quonumber => 1, }, + packing_list => { title => $::locale->text('Delivery Orders'), donumber => 1, ordnumber => 1 }, check => { title => $::locale->text('Checks'), chknumber => 1, }, receipt => { title => $::locale->text('Receipts'), rctnumber => 1, }, ); @@ -85,6 +84,8 @@ sub search { my $bp_accounts = $::form->{type} =~ /check|receipt/ && BP->payment_accounts(\%::myconfig, $::form); + setup_bp_search_action_bar(); + $::form->header; print $::form->parse_html_template('bp/search', { label => \%label, @@ -97,116 +98,51 @@ sub search { } sub remove { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my $locale = $main::locale; - - assert_bp_access(); - - my $selected = 0; - - for my $i (1 .. $form->{rowcount}) { - if ($form->{"checked_$i"}) { - $selected = 1; - last; - } - } - - $form->error('Nothing selected!') unless $selected; - - $form->{title} = $locale->text('Confirm!'); - - $form->header; - - print qq| -
- - - - -