From: Thomas Heck Date: Mon, 24 Jun 2013 10:51:19 +0000 (+0200) Subject: Customer/Vendor-Pfade angepasst X-Git-Tag: release-3.1.0beta1~161^2^2~31 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=49ec3bd3b6897c45d904faa85cfa14a730610935;p=kivitendo-erp.git Customer/Vendor-Pfade angepasst --- diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm index 04042fdb5..0fc7206dc 100644 --- a/SL/Controller/CustomerVendor.pm +++ b/SL/Controller/CustomerVendor.pm @@ -291,6 +291,33 @@ sub action_delete_shipto { $self->action_edit(); } + +sub action_search { + my ($self) = @_; + + my $url = 'ct.pl?action=search&db='. ($self->is_vendor() ? 'vendor' : 'customer'); + + if ( $::form->{callback} ) { + $url .= '&callback='. $::from->escape($::form->{callback}); + } + + print $::form->redirect_header($url); +} + + +sub action_search_contact { + my ($self) = @_; + + my $url = 'ct.pl?action=search_contact&db=customer'; + + if ( $::form->{callback} ) { + $url .= '&callback='. $::from->escape($::form->{callback}); + } + + print $::form->redirect_header($url); +} + + sub action_get_delivery { my ($self) = @_; diff --git a/SL/Controller/DeliveryPlan.pm b/SL/Controller/DeliveryPlan.pm index 00adfc9f5..b8ee1c41d 100644 --- a/SL/Controller/DeliveryPlan.pm +++ b/SL/Controller/DeliveryPlan.pm @@ -228,7 +228,7 @@ sub link_to { } if ($object->isa('SL::DB::Customer')) { my $id = $object->id; - return "ct.pl?action=$action&id=$id&db=customer"; + return "controller.pl?action=CustomerVendor/$action&id=$id&db=customer"; } } diff --git a/SL/Controller/SellPriceInformation.pm b/SL/Controller/SellPriceInformation.pm index f31f53e28..8e0c52d86 100644 --- a/SL/Controller/SellPriceInformation.pm +++ b/SL/Controller/SellPriceInformation.pm @@ -141,7 +141,7 @@ sub link_to { } if ($object->isa('SL::DB::Customer')) { my $id = $object->id; - return "ct.pl?action=$action&id=$id&db=customer"; + return "controller.pl?action=CustomerVendor/$action&id=$id&db=customer"; } } diff --git a/SL/FU.pm b/SL/FU.pm index a005c1814..8131a2cea 100644 --- a/SL/FU.pm +++ b/SL/FU.pm @@ -314,13 +314,13 @@ sub link_details { if ($params{trans_type} eq 'customer') { $link = { - 'url' => 'ct.pl?action=edit&db=customer&id=' . $form->quote($params{trans_id}) . '&edit_note_id=' . $form->quote($params{note_id}), + 'url' => 'controller.pl?action=CustomerVendor/edit&db=customer&id=' . $form->quote($params{trans_id}) . '&edit_note_id=' . $form->quote($params{note_id}), 'title' => $locale->text('Customer') . " '$params{trans_info}'", }; } elsif ($params{trans_type} eq 'vendor') { $link = { - 'url' => 'ct.pl?action=edit&type=sales_quotation&id=' . $params{trans_id} . '&edit_note_id=' . $form->quote($params{note_id}), + 'url' => 'controller.pl?action=CustomerVendor/edit&type=sales_quotation&id=' . $params{trans_id} . '&edit_note_id=' . $form->quote($params{note_id}), 'title' => $locale->text('Vendor') . " '$params{trans_info}'", }; diff --git a/SL/Presenter/CustomerVendor.pm b/SL/Presenter/CustomerVendor.pm index 077c376c8..6d24409d2 100644 --- a/SL/Presenter/CustomerVendor.pm +++ b/SL/Presenter/CustomerVendor.pm @@ -27,7 +27,7 @@ sub _customer_vendor { croak "Unknown display type '$params{display}'" unless $params{display} =~ m/^(?:inline|table-cell)$/; my $text = join '', ( - $params{no_link} ? '' : '', + $params{no_link} ? '' : '', $self->escape($cv->name), $params{no_link} ? '' : '', ); diff --git a/menu.ini b/menu.ini index e72e47a69..9decadbf7 100644 --- a/menu.ini +++ b/menu.ini @@ -2,14 +2,14 @@ [Master Data--Add Customer] ACCESS=customer_vendor_edit -module=ct.pl -action=add +module=controller.pl +action=CustomerVendor/add db=customer [Master Data--Add Vendor] ACCESS=customer_vendor_edit -module=ct.pl -action=add +module=controller.pl +action=CustomerVendor/add db=vendor [Master Data--Add Part] @@ -48,20 +48,21 @@ submenu=1 [Master Data--Reports--Customers] ACCESS=customer_vendor_edit -module=ct.pl -action=search +module=controller.pl +action=CustomerVendor/search db=customer [Master Data--Reports--Vendors] ACCESS=customer_vendor_edit -module=ct.pl -action=search +module=controller.pl +action=CustomerVendor/search db=vendor [Master Data--Reports--Contacts] ACCESS=customer_vendor_edit -module=ct.pl -action=search_contact +module=controller.pl +action=CustomerVendor/search_contact +db=customer [Master Data--Reports--Parts] ACCESS=part_service_assembly_edit diff --git a/templates/webpages/sepa/bank_transfer_add.html b/templates/webpages/sepa/bank_transfer_add.html index e156b7ea1..fe2d44194 100644 --- a/templates/webpages/sepa/bank_transfer_add.html +++ b/templates/webpages/sepa/bank_transfer_add.html @@ -52,7 +52,7 @@ [%- IF loop.first || (previous_vcname != invoice.vcname) %] - + [%- GET HTML.escape(invoice.vcname); SET previous_vcname = invoice.vcname; IF !invoice.vc_bank_info_ok; diff --git a/templates/webpages/sepa/bank_transfer_create.html b/templates/webpages/sepa/bank_transfer_create.html index 89421a69e..561baec31 100644 --- a/templates/webpages/sepa/bank_transfer_create.html +++ b/templates/webpages/sepa/bank_transfer_create.html @@ -86,7 +86,7 @@ [%- IF loop.first || (previous_vcname != bank_transfer.vcname) %] - + [%- GET HTML.escape(bank_transfer.vcname); SET previous_vcname = bank_transfer.vcname; -%]