$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) = @_;
}
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";
}
}
}
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";
}
}
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}'",
};
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&db=' . $type . '&id=' . $self->escape($cv->id) . '">',
+ $params{no_link} ? '' : '<a href="controller.pl?action=CustomerVendor/edit&db=' . $type . '&id=' . $self->escape($cv->id) . '">',
$self->escape($cv->name),
$params{no_link} ? '' : '</a>',
);
[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]
[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
</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;
<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>