projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
GDPDU: Maps nicht innerhalb von AlphaNumeric, sondern danach.
[kivitendo-erp.git]
/
bin
/
mozilla
/
arap.pl
diff --git
a/bin/mozilla/arap.pl
b/bin/mozilla/arap.pl
index
2544986
..
f900970
100644
(file)
--- a/
bin/mozilla/arap.pl
+++ b/
bin/mozilla/arap.pl
@@
-36,8
+36,8
@@
use strict;
if (-f "bin/mozilla/custom_arap.pl") {
eval { require "bin/mozilla/custom_arap.pl"; };
}
if (-f "bin/mozilla/custom_arap.pl") {
eval { require "bin/mozilla/custom_arap.pl"; };
}
-if (-f "bin/mozilla/$
main::form->
{login}_arap.pl") {
- eval { require "bin/mozilla/$
main::form->
{login}_arap.pl"; };
+if (-f "bin/mozilla/$
::myconfig
{login}_arap.pl") {
+ eval { require "bin/mozilla/$
::myconfig
{login}_arap.pl"; };
}
1;
}
1;
@@
-53,7
+53,7
@@
sub check_name {
my %myconfig = %main::myconfig;
my $locale = $main::locale;
my %myconfig = %main::myconfig;
my $locale = $main::locale;
- $main::auth->assert('
general_ledger
| vendor_invoice_edit | sales_order_edit | invoice_edit |' .
+ $main::auth->assert('
ar_transactions | ap_transactions
| vendor_invoice_edit | sales_order_edit | invoice_edit |' .
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash |' .
'purchase_delivery_order_edit | sales_delivery_order_edit');
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash |' .
'purchase_delivery_order_edit | sales_delivery_order_edit');
@@
-61,7
+61,7
@@
sub check_name {
$name = $name eq "customer" ? "customer" : "vendor";
$name = $name eq "customer" ? "customer" : "vendor";
- my ($new_name,
$new_id) = split /--/, $form->{$name}
;
+ my ($new_name,
$new_id) = $form->{$name} =~ /^(.*?)--(\d+)$/
;
my $i = 0;
# if we use a selection
if ($form->{"select$name"}) {
my $i = 0;
# if we use a selection
if ($form->{"select$name"}) {
@@
-77,6
+77,8
@@
sub check_name {
$form->{"${name}_id"} = $new_id;
_reset_salesman_id();
$form->{"${name}_id"} = $new_id;
_reset_salesman_id();
+ delete @{ $form }{qw(payment_id)};
+
IS->get_customer(\%myconfig, \%$form) if ($name eq 'customer');
IR->get_vendor(\%myconfig, \%$form) if ($name eq 'vendor');
IS->get_customer(\%myconfig, \%$form) if ($name eq 'customer');
IR->get_vendor(\%myconfig, \%$form) if ($name eq 'vendor');
@@
-107,7
+109,7
@@
sub check_name {
$form->error($locale->text("More than one #1 found matching, please be more specific.", $locale->text(ucfirst $name)));
} else {
&select_name($name);
$form->error($locale->text("More than one #1 found matching, please be more specific.", $locale->text(ucfirst $name)));
} else {
&select_name($name);
-
::end_of_request()
;
+
$::dispatcher->end_request
;
}
}
}
}
@@
-119,6
+121,8
@@
sub check_name {
$form->{"old$name"} = qq|$form->{$name}--$form->{"${name}_id"}|;
_reset_salesman_id();
$form->{"old$name"} = qq|$form->{$name}--$form->{"${name}_id"}|;
_reset_salesman_id();
+ delete @{ $form }{qw(payment_id)};
+
IS->get_customer(\%myconfig, \%$form) if ($name eq 'customer');
IR->get_vendor(\%myconfig, \%$form) if ($name eq 'vendor');
IS->get_customer(\%myconfig, \%$form) if ($name eq 'customer');
IR->get_vendor(\%myconfig, \%$form) if ($name eq 'vendor');
@@
-148,7
+152,7
@@
sub select_name {
my $form = $main::form;
my $locale = $main::locale;
my $form = $main::form;
my $locale = $main::locale;
- $main::auth->assert('
general_ledger
| vendor_invoice_edit | sales_order_edit | invoice_edit | sales_delivery_order_edit |' .
+ $main::auth->assert('
ar_transactions| ap_transactions
| vendor_invoice_edit | sales_order_edit | invoice_edit | sales_delivery_order_edit |' .
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash');
my ($table) = @_;
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash');
my ($table) = @_;
@@
-169,13
+173,11
@@
sub select_name {
my $title = $locale->text('Select from one of the names below');
print qq|
my $title = $locale->text('Select from one of the names below');
print qq|
+ <h1>$title</h1>
+
<form method=post action=$form->{script}>
<table width=100%>
<form method=post action=$form->{script}>
<table width=100%>
- <tr>
- <th class=listtop>$title</th>
- </tr>
- <tr space=5></tr>
<tr>
<td>
<table width=100%>
<tr>
<td>
<table width=100%>
@@
-258,7
+260,7
@@
sub name_selected {
my $form = $main::form;
my %myconfig = %main::myconfig;
my $form = $main::form;
my %myconfig = %main::myconfig;
- $main::auth->assert('
general_ledger
| vendor_invoice_edit | sales_order_edit | invoice_edit | sales_delivery_order_edit | ' .
+ $main::auth->assert('
ar_transactions | ap_transactions
| vendor_invoice_edit | sales_order_edit | invoice_edit | sales_delivery_order_edit | ' .
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash');
# replace the variable with the one checked
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash');
# replace the variable with the one checked
@@
-267,6
+269,7
@@
sub name_selected {
my $i = $form->{ndx};
_reset_salesman_id();
my $i = $form->{ndx};
_reset_salesman_id();
+ delete @{ $form }{qw(payment_id)};
$form->{ $form->{vc} } = $form->{"new_name_$i"};
$form->{"$form->{vc}_id"} = $form->{"new_id_$i"};
$form->{ $form->{vc} } = $form->{"new_name_$i"};
$form->{"$form->{vc}_id"} = $form->{"new_id_$i"};
@@
-299,7
+302,7
@@
sub _reset_salesman_id {
sub select_project {
$::lxdebug->enter_sub;
sub select_project {
$::lxdebug->enter_sub;
- $::auth->assert('
general_ledger
| vendor_invoice_edit | sales_order_edit | invoice_edit |' .
+ $::auth->assert('
ar_transactions | ap_transactions
| vendor_invoice_edit | sales_order_edit | invoice_edit |' .
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash | report');
my ($is_global, $nextsub) = @_;
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash | report');
my ($is_global, $nextsub) = @_;
@@
-326,7
+329,7
@@
sub project_selected {
my $form = $main::form;
my $form = $main::form;
- $main::auth->assert('
general_ledger
| vendor_invoice_edit | sales_order_edit | invoice_edit |' .
+ $main::auth->assert('
ar_transactions | ap_transactions
| vendor_invoice_edit | sales_order_edit | invoice_edit |' .
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash | report');
# replace the variable with the one checked
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash | report');
# replace the variable with the one checked