Customer/Vendor-Pfade angepasst
authorThomas Heck <theck@linet-services.de>
Mon, 24 Jun 2013 10:51:19 +0000 (12:51 +0200)
committerThomas Heck <theck@linet-services.de>
Tue, 16 Jul 2013 12:23:53 +0000 (14:23 +0200)
SL/Controller/CustomerVendor.pm
SL/Controller/DeliveryPlan.pm
SL/Controller/SellPriceInformation.pm
SL/FU.pm
SL/Presenter/CustomerVendor.pm
menu.ini
templates/webpages/sepa/bank_transfer_add.html
templates/webpages/sepa/bank_transfer_create.html

index 04042fd..0fc7206 100644 (file)
@@ -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) = @_;
 
index 00adfc9..b8ee1c4 100644 (file)
@@ -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";
   }
 }
 
index f31f53e..8e0c52d 100644 (file)
@@ -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";
   }
 }
 
index a005c18..8131a2c 100644 (file)
--- 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}'",
     };
 
index 077c376..6d24409 100644 (file)
@@ -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} ? '' : '<a href="ct.pl?action=edit&amp;db=' . $type . '&amp;id=' . $self->escape($cv->id) . '">',
+    $params{no_link} ? '' : '<a href="controller.pl?action=CustomerVendor/edit&amp;db=' . $type . '&amp;id=' . $self->escape($cv->id) . '">',
     $self->escape($cv->name),
     $params{no_link} ? '' : '</a>',
   );
index e72e47a..9decadb 100644 (file)
--- 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
index e156b7e..fe2d441 100644 (file)
@@ -52,7 +52,7 @@
       </td>
       <td>
        [%- IF loop.first || (previous_vcname != invoice.vcname) %]
-        <a href="ct.pl?action=edit&db=[% vc %]&id=[% HTML.url(invoice.vc_id) %]&callback=[% HTML.url('sepa.pl?action=bank_transfer_add&vc=' _ vc) %]">
+        <a href="controller.pl?action=CustomerVendor/edit&db=[% vc %]&id=[% HTML.url(invoice.vc_id) %]&callback=[% HTML.url('sepa.pl?action=bank_transfer_add&vc=' _ vc) %]">
          [%- GET HTML.escape(invoice.vcname);
              SET previous_vcname = invoice.vcname;
              IF !invoice.vc_bank_info_ok;
index 89421a6..561baec 100644 (file)
@@ -86,7 +86,7 @@
      <tr class="listrow[% loop.count % 2 %]">
       <td>
        [%- IF loop.first || (previous_vcname != bank_transfer.vcname) %]
-        <a href="ct.pl?action=edit&db=[% vc %]&id=[% HTML.url(bank_transfer.vc_id) %]&callback=[% HTML.url('sepa.pl?action=bank_transfer_add&vc=' _ vc) %]">
+        <a href="controller.pl?action=CustomerVendor/edit&db=[% vc %]&id=[% HTML.url(bank_transfer.vc_id) %]&callback=[% HTML.url('sepa.pl?action=bank_transfer_add&vc=' _ vc) %]">
          [%- GET HTML.escape(bank_transfer.vcname);
              SET previous_vcname = bank_transfer.vcname; -%]
         </a>