Revision 4bd1e2f8
Von Sven Schöling vor mehr als 9 Jahren hinzugefügt
SL/AM.pm | ||
---|---|---|
829 | 829 |
|
830 | 830 |
my ($self, $form) = @_; |
831 | 831 |
|
832 |
my $employee = SL::DB::Manager::Employee->find_by(login => $form->{login});
|
|
832 |
my $employee = SL::DB::Manager::Employee->find_by(login => $::myconfig{login});
|
|
833 | 833 |
$employee->update_attributes(name => $form->{name}); |
834 | 834 |
|
835 |
my $user = SL::DB::Manager::AuthUser->find_by(login => $form->{login});
|
|
835 |
my $user = SL::DB::Manager::AuthUser->find_by(login => $::myconfig{login});
|
|
836 | 836 |
$user->update_attributes( |
837 | 837 |
config_values => { |
838 | 838 |
%{ $user->config_values }, |
SL/AP.pm | ||
---|---|---|
126 | 126 |
qq|INSERT INTO ap (id, invnumber, employee_id,currency_id, taxzone_id) | . |
127 | 127 |
qq|VALUES (?, ?, (SELECT e.id FROM employee e WHERE e.login = ?), |
128 | 128 |
(SELECT id FROM currencies WHERE name = ?), (SELECT taxzone_id FROM vendor WHERE id = ?) )|; |
129 |
do_query($form, $dbh, $query, $form->{id}, $form->{invnumber}, $form->{login}, $form->{currency}, $form->{vendor_id});
|
|
129 |
do_query($form, $dbh, $query, $form->{id}, $form->{invnumber}, $::myconfig{login}, $form->{currency}, $form->{vendor_id});
|
|
130 | 130 |
|
131 | 131 |
} |
132 | 132 |
|
SL/AR.pm | ||
---|---|---|
561 | 561 |
if (!$main::auth->assert('sales_all_edit', 1)) { |
562 | 562 |
# only show own invoices |
563 | 563 |
$where .= " AND a.employee_id = (select id from employee where login= ?)"; |
564 |
push (@values, $form->{login});
|
|
564 |
push (@values, $::myconfig{login});
|
|
565 | 565 |
} else { |
566 | 566 |
if ($form->{employee_id}) { |
567 | 567 |
$where .= " AND a.employee_id = ?"; |
SL/CT.pm | ||
---|---|---|
180 | 180 |
# Gilt nicht für Lieferanten |
181 | 181 |
if ($cv eq 'customer' && !$main::auth->assert('customer_vendor_all_edit', 1)) { |
182 | 182 |
$where .= qq| AND ct.salesman_id = (select em.id from employee em where em.login = ?)|; |
183 |
push(@values, $form->{login});
|
|
183 |
push(@values, $::myconfig{login});
|
|
184 | 184 |
} |
185 | 185 |
|
186 | 186 |
my ($cvar_where, @cvar_values) = CVar->build_filter_query('module' => 'CT', |
SL/Controller/Inventory.pm | ||
---|---|---|
243 | 243 |
|
244 | 244 |
my $msg = t8('No warehouse has been created yet or the quantity of the bins is not configured yet.') . ' '; |
245 | 245 |
|
246 |
if ($::auth->check_right($::form->{login}, 'config')) { # TODO wut?
|
|
246 |
if ($::auth->check_right($::myconfig{login}, 'config')) { # TODO wut?
|
|
247 | 247 |
$msg .= t8('You can create warehouses and bins via the menu "System -> Warehouses".'); |
248 | 248 |
} else { |
249 | 249 |
$msg .= t8('Please ask your administrator to create warehouses and bins.'); |
SL/DB/Manager/Employee.pm | ||
---|---|---|
21 | 21 |
} |
22 | 22 |
|
23 | 23 |
sub current { |
24 |
return undef unless $::form && $::form->{login};
|
|
25 |
return shift->find_by(login => $::form->{login});
|
|
24 |
return undef unless $::myconfig{login};
|
|
25 |
return shift->find_by(login => $::myconfig{login});
|
|
26 | 26 |
} |
27 | 27 |
|
28 | 28 |
sub update_entries_for_authorized_users { |
SL/DN.pm | ||
---|---|---|
244 | 244 |
$dunning_id, # duedate |
245 | 245 |
$curr, # default currency |
246 | 246 |
sprintf($main::locale->text('Automatically created invoice for fee and interest for dunning %s'), $dunning_id), # notes |
247 |
$form->{login}); # employee_id
|
|
247 |
$::myconfig{login}); # employee_id
|
|
248 | 248 |
do_query($form, $dbh, $query, @values); |
249 | 249 |
|
250 | 250 |
$query = |
... | ... | |
926 | 926 |
map { $form->{$_} = $ref->{$_} } keys %{ $ref }; |
927 | 927 |
|
928 | 928 |
$query = qq|SELECT * FROM employee WHERE login = ?|; |
929 |
$ref = selectfirst_hashref_query($form, $dbh, $query, $form->{login});
|
|
929 |
$ref = selectfirst_hashref_query($form, $dbh, $query, $::myconfig{login});
|
|
930 | 930 |
map { $form->{"employee_${_}"} = $ref->{$_} } keys %{ $ref }; |
931 | 931 |
|
932 | 932 |
$query = qq|SELECT * FROM acc_trans WHERE trans_id = ? ORDER BY acc_trans_id ASC|; |
SL/DO.pm | ||
---|---|---|
119 | 119 |
} |
120 | 120 |
if (!$main::auth->assert('sales_all_edit', 1)) { |
121 | 121 |
push @where, qq|dord.employee_id = (select id from employee where login= ?)|; |
122 |
push @values, $form->{login};
|
|
122 |
push @values, $::myconfig{login};
|
|
123 | 123 |
} |
124 | 124 |
|
125 | 125 |
foreach my $item (qw(donumber ordnumber cusordnumber transaction_description)) { |
SL/Drafts.pm | ||
---|---|---|
74 | 74 |
qq| (SELECT id FROM employee WHERE login = ?) | . |
75 | 75 |
qq|WHERE id = ?|; |
76 | 76 |
|
77 |
do_query($form, $dbh, $query, $draft_description, $dumped, $form->{login}, $draft_id);
|
|
77 |
do_query($form, $dbh, $query, $draft_description, $dumped, $::myconfig{login}, $draft_id);
|
|
78 | 78 |
|
79 | 79 |
$dbh->commit(); |
80 | 80 |
|
SL/FU.pm | ||
---|---|---|
28 | 28 |
$query = qq|INSERT INTO follow_ups (created_by, done, note_id, follow_up_date, created_for_user, id) |
29 | 29 |
VALUES ((SELECT id FROM employee WHERE login = ?), ?, ?, ?, ?, ?)|; |
30 | 30 |
|
31 |
push @values, $form->{login};
|
|
31 |
push @values, $::myconfig{login};
|
|
32 | 32 |
|
33 | 33 |
} else { |
34 | 34 |
$query = qq|UPDATE follow_ups SET done = ?, note_id = ?, follow_up_date = ?, created_for_user = ? WHERE id = ?|; |
... | ... | |
119 | 119 |
my $dbh = $form->get_standard_dbh($myconfig); |
120 | 120 |
my ($query, @values); |
121 | 121 |
|
122 |
my ($employee_id) = selectrow_query($form, $dbh, qq|SELECT id FROM employee WHERE login = ?|, $form->{login});
|
|
122 |
my ($employee_id) = selectrow_query($form, $dbh, qq|SELECT id FROM employee WHERE login = ?|, $::myconfig{login});
|
|
123 | 123 |
$query = qq|SELECT fu.*, n.subject, n.body, n.created_by |
124 | 124 |
FROM follow_ups fu |
125 | 125 |
LEFT JOIN notes n ON (fu.note_id = n.id) |
... | ... | |
183 | 183 |
my $dbh = $form->get_standard_dbh($myconfig); |
184 | 184 |
my ($query, $where, $where_user); |
185 | 185 |
|
186 |
my ($employee_id) = selectrow_query($form, $dbh, qq|SELECT id FROM employee WHERE login = ?|, $form->{login});
|
|
186 |
my ($employee_id) = selectrow_query($form, $dbh, qq|SELECT id FROM employee WHERE login = ?|, $::myconfig{login});
|
|
187 | 187 |
my @values = (); |
188 | 188 |
my @values_user = (); |
189 | 189 |
|
... | ... | |
424 | 424 |
|
425 | 425 |
my $dbh = $form->get_standard_dbh($myconfig); |
426 | 426 |
|
427 |
my ($id) = selectrow_query($form, $dbh, qq|SELECT id FROM employee WHERE login = ?|, $form->{login});
|
|
427 |
my ($id) = selectrow_query($form, $dbh, qq|SELECT id FROM employee WHERE login = ?|, $::myconfig{login});
|
|
428 | 428 |
|
429 | 429 |
do_query($form, $dbh, qq|DELETE FROM follow_up_access WHERE what = ?|, $id); |
430 | 430 |
|
... | ... | |
455 | 455 |
|
456 | 456 |
my $dbh = $form->get_standard_dbh($myconfig); |
457 | 457 |
|
458 |
my $sth = prepare_execute_query($form, $dbh, qq|SELECT who FROM follow_up_access WHERE what = (SELECT id FROM employee WHERE login = ?)|, $form->{login});
|
|
458 |
my $sth = prepare_execute_query($form, $dbh, qq|SELECT who FROM follow_up_access WHERE what = (SELECT id FROM employee WHERE login = ?)|, $::myconfig{login});
|
|
459 | 459 |
my $access = {}; |
460 | 460 |
|
461 | 461 |
while (my $ref = $sth->fetchrow_hashref()) { |
SL/GL.pm | ||
---|---|---|
104 | 104 |
$query = |
105 | 105 |
qq|INSERT INTO gl (id, employee_id) | . |
106 | 106 |
qq|VALUES (?, (SELECT id FROM employee WHERE login = ?))|; |
107 |
@values = ($form->{id}, $form->{login});
|
|
107 |
@values = ($form->{id}, $::myconfig{login});
|
|
108 | 108 |
do_query($form, $dbh, $query, @values); |
109 | 109 |
} |
110 | 110 |
|
SL/Menu.pm | ||
---|---|---|
147 | 147 |
push @{$cur_ary}, $token; |
148 | 148 |
|
149 | 149 |
} else { |
150 |
push @{$cur_ary}, $auth->check_right($form->{login}, $token, 1);
|
|
150 |
push @{$cur_ary}, $auth->check_right($::myconfig{login}, $token, 1);
|
|
151 | 151 |
} |
152 | 152 |
} |
153 | 153 |
|
SL/Notes.pm | ||
---|---|---|
23 | 23 |
($params{id}) = selectrow_query($form, $dbh, qq|SELECT nextval('note_id')|); |
24 | 24 |
$query = qq|INSERT INTO notes (created_by, trans_id, trans_module, subject, body, id) |
25 | 25 |
VALUES ((SELECT id FROM employee WHERE login = ?), ?, ?, ?, ?, ?)|; |
26 |
push @values, $form->{login}, conv_i($params{trans_id}), $params{trans_module};
|
|
26 |
push @values, $::myconfig{login}, conv_i($params{trans_id}), $params{trans_module};
|
|
27 | 27 |
|
28 | 28 |
} else { |
29 | 29 |
$query = qq|UPDATE notes SET subject = ?, body = ? WHERE id = ?|; |
SL/OE.pm | ||
---|---|---|
176 | 176 |
|
177 | 177 |
if (!$main::auth->assert('sales_all_edit', 1)) { |
178 | 178 |
$query .= " AND o.employee_id = (select id from employee where login= ?)"; |
179 |
push @values, $form->{login};
|
|
179 |
push @values, $::myconfig{login};
|
|
180 | 180 |
} |
181 | 181 |
if ($form->{employee_id}) { |
182 | 182 |
$query .= " AND o.employee_id = ?"; |
... | ... | |
325 | 325 |
my $dbh = $params{dbh} || $form->get_standard_dbh($myconfig); |
326 | 326 |
|
327 | 327 |
my $query = qq|SELECT id FROM employee WHERE login = ?|; |
328 |
my ($e_id) = selectrow_query($form, $dbh, $query, $form->{login});
|
|
328 |
my ($e_id) = selectrow_query($form, $dbh, $query, $::myconfig{login});
|
|
329 | 329 |
|
330 | 330 |
$query = |
331 | 331 |
qq|SELECT oe.id, oe.transdate, oe.reqdate, oe.quonumber, oe.transaction_description, oe.amount, |
SL/USTVA.pm | ||
---|---|---|
1030 | 1030 |
|
1031 | 1031 |
$form->error("Missing Parameter: @_") if !$userspath || !$filename; |
1032 | 1032 |
|
1033 |
$filename = "$form->{login}_$filename";
|
|
1033 |
$filename = "$::myconfig{login}_$filename";
|
|
1034 | 1034 |
$filename =~ s|.*/||; |
1035 | 1035 |
$filename = "$userspath/$filename"; |
1036 | 1036 |
open my $FACONF, "<", $filename or do {# Annon Sub |
SL/VK.pm | ||
---|---|---|
72 | 72 |
# limits by employees (Bearbeiter), not salesmen! |
73 | 73 |
if (!$main::auth->assert('sales_all_edit', 1)) { |
74 | 74 |
$where .= " AND ar.employee_id = (select id from employee where login= ?)"; |
75 |
push (@values, $form->{login});
|
|
75 |
push (@values, $::myconfig{login});
|
|
76 | 76 |
} |
77 | 77 |
|
78 | 78 |
# Stornierte Rechnungen und Stornorechnungen in invoice rausfiltern |
SL/WH.pm | ||
---|---|---|
59 | 59 |
require SL::DB::Employee; |
60 | 60 |
require SL::DB::Inventory; |
61 | 61 |
|
62 |
my $employee = SL::DB::Manager::Employee->find_by(login => $::form->{login});
|
|
62 |
my $employee = SL::DB::Manager::Employee->find_by(login => $::myconfig{login});
|
|
63 | 63 |
my ($now) = selectrow_query($::form, $::form->get_standard_dbh, qq|SELECT current_date|); |
64 | 64 |
my @directions = (undef, qw(out in transfer)); |
65 | 65 |
|
bin/mozilla/am.pl | ||
---|---|---|
885 | 885 |
|
886 | 886 |
$myconfig{show_form_details} = 1 unless (defined($myconfig{show_form_details})); |
887 | 887 |
$form->{CAN_CHANGE_PASSWORD} = $main::auth->can_change_password(); |
888 |
$form->{todo_cfg} = { TODO->get_user_config('login' => $form->{login}) };
|
|
888 |
$form->{todo_cfg} = { TODO->get_user_config('login' => $::myconfig{login}) };
|
|
889 | 889 |
|
890 |
$form->{title} = $locale->text('Edit Preferences for #1', $form->{login});
|
|
890 |
$form->{title} = $locale->text('Edit Preferences for #1', $::myconfig{login});
|
|
891 | 891 |
|
892 | 892 |
$form->header(); |
893 | 893 |
|
... | ... | |
907 | 907 |
|
908 | 908 |
$form->{stylesheet} = $form->{usestylesheet}; |
909 | 909 |
|
910 |
TODO->save_user_config('login' => $form->{login}, %{ $form->{todo_cfg} || { } });
|
|
910 |
TODO->save_user_config('login' => $::myconfig{login}, %{ $form->{todo_cfg} || { } });
|
|
911 | 911 |
|
912 | 912 |
if (AM->save_preferences($form)) { |
913 | 913 |
if ($::auth->can_change_password() |
... | ... | |
920 | 920 |
$form->error($::locale->text('The settings were saved, but the password was not changed.') . ' ' . join(' ', $verifier->errors($result))); |
921 | 921 |
} |
922 | 922 |
|
923 |
$::auth->change_password($form->{login}, $form->{new_password});
|
|
923 |
$::auth->change_password($::myconfig{login}, $form->{new_password});
|
|
924 | 924 |
} |
925 | 925 |
|
926 | 926 |
$form->redirect($locale->text('Preferences saved!')); |
bin/mozilla/arap.pl | ||
---|---|---|
36 | 36 |
if (-f "bin/mozilla/custom_arap.pl") { |
37 | 37 |
eval { require "bin/mozilla/custom_arap.pl"; }; |
38 | 38 |
} |
39 |
if (-f "bin/mozilla/$main::form->{login}_arap.pl") {
|
|
40 |
eval { require "bin/mozilla/$main::form->{login}_arap.pl"; };
|
|
39 |
if (-f "bin/mozilla/$::myconfig{login}_arap.pl") {
|
|
40 |
eval { require "bin/mozilla/$::myconfig{login}_arap.pl"; };
|
|
41 | 41 |
} |
42 | 42 |
|
43 | 43 |
1; |
bin/mozilla/fu.pl | ||
---|---|---|
364 | 364 |
my %params = ( |
365 | 365 |
'due_only' => 1, |
366 | 366 |
'not_done' => 1, |
367 |
'created_for_login' => $form->{login},
|
|
367 |
'created_for_login' => $::myconfig{login},
|
|
368 | 368 |
); |
369 | 369 |
|
370 | 370 |
my $follow_ups = FU->follow_ups(%params); |
bin/mozilla/ic.pl | ||
---|---|---|
1641 | 1641 |
# payment_terms => $form->{payment_terms}, |
1642 | 1642 |
# all_partsgroup => $form->{all_partsgroup}}); |
1643 | 1643 |
|
1644 |
$form->{show_edit_buttons} = $main::auth->check_right($form->{login}, 'part_service_assembly_edit');
|
|
1644 |
$form->{show_edit_buttons} = $main::auth->check_right($::myconfig{login}, 'part_service_assembly_edit');
|
|
1645 | 1645 |
|
1646 | 1646 |
print $form->parse_html_template('ic/form_header'); |
1647 | 1647 |
$lxdebug->leave_sub(); |
bin/mozilla/invoice_io.pl | ||
---|---|---|
48 | 48 |
if (-f "bin/mozilla/custom_invoice_io.pl") { |
49 | 49 |
eval { require "bin/mozilla/custom_invoice_io.pl"; }; |
50 | 50 |
} |
51 |
if (-f "bin/mozilla/$main::form->{login}_invoice_io.pl") {
|
|
52 |
eval { require "bin/mozilla/$main::form->{login}_invoice_io.pl"; };
|
|
51 |
if (-f "bin/mozilla/$::myconfig{login}_invoice_io.pl") {
|
|
52 |
eval { require "bin/mozilla/$::myconfig{login}_invoice_io.pl"; };
|
|
53 | 53 |
} |
54 | 54 |
|
55 | 55 |
1; |
bin/mozilla/io.pl | ||
---|---|---|
65 | 65 |
if (-f "bin/mozilla/custom_io.pl") { |
66 | 66 |
eval { require "bin/mozilla/custom_io.pl"; }; |
67 | 67 |
} |
68 |
if (-f "bin/mozilla/$::form->{login}_io.pl") {
|
|
69 |
eval { require "bin/mozilla/$::form->{login}_io.pl"; };
|
|
68 |
if (-f "bin/mozilla/$::myconfig{login}_io.pl") {
|
|
69 |
eval { require "bin/mozilla/$::myconfig{login}_io.pl"; };
|
|
70 | 70 |
} |
71 | 71 |
|
72 | 72 |
1; |
bin/mozilla/login.pl | ||
---|---|---|
44 | 44 |
$main::lxdebug->enter_sub(); |
45 | 45 |
|
46 | 46 |
my %myconfig = %main::myconfig; |
47 |
$form->{todo_list} = create_todo_list('login_screen' => 1) if (!$form->{no_todo_list}) and ($main::auth->check_right($form->{login}, 'productivity'));
|
|
47 |
$form->{todo_list} = create_todo_list('login_screen' => 1) if (!$form->{no_todo_list}) and ($main::auth->check_right($::myconfig{login}, 'productivity'));
|
|
48 | 48 |
|
49 | 49 |
$form->{stylesheet} = $myconfig{stylesheet}; |
50 | 50 |
$form->{title} = $::locale->text('kivitendo'); |
bin/mozilla/sepa.pl | ||
---|---|---|
154 | 154 |
$bank_transfer->{chart_id} = $bank_account->{chart_id}; |
155 | 155 |
} |
156 | 156 |
|
157 |
my $id = SL::SEPA->create_export('employee' => $form->{login},
|
|
157 |
my $id = SL::SEPA->create_export('employee' => $::myconfig{login},
|
|
158 | 158 |
'bank_transfers' => \@bank_transfers, |
159 | 159 |
'vc' => $vc); |
160 | 160 |
|
bin/mozilla/todo.pl | ||
---|---|---|
41 | 41 |
my %params = @_; |
42 | 42 |
my $postfix = $params{login_screen} ? '_login' : ''; |
43 | 43 |
|
44 |
my %todo_cfg = TODO->get_user_config('login' => $form->{login});
|
|
44 |
my %todo_cfg = TODO->get_user_config('login' => $::myconfig{login});
|
|
45 | 45 |
|
46 | 46 |
if ($params{login_screen} && !$todo_cfg{show_after_login}) { |
47 | 47 |
$main::lxdebug->leave_sub(); |
bin/mozilla/ustva.pl | ||
---|---|---|
1168 | 1168 |
|
1169 | 1169 |
$::auth->assert('advance_turnover_tax_return'); |
1170 | 1170 |
|
1171 |
my $filename = "$::form->{login}_$::form->{filename}";
|
|
1171 |
my $filename = "$::myconfig{login}_$::form->{filename}";
|
|
1172 | 1172 |
$filename =~ s|.*/||; |
1173 | 1173 |
|
1174 | 1174 |
#zuerst die steuernummer aus den part, parts_X_Y und delimiter herstellen |
bin/mozilla/wh.pl | ||
---|---|---|
455 | 455 |
# Anm. jb 18.3. vielleicht auch nur meine unwissenheit in perl-datenstrukturen |
456 | 456 |
my %TRANSFER = ( |
457 | 457 |
'transfer_type' => 'assembly', |
458 |
'login' => $form->{login},
|
|
458 |
'login' => $::myconfig{login},
|
|
459 | 459 |
'dst_warehouse_id' => $form->{warehouse_id}, |
460 | 460 |
'dst_bin_id' => $form->{bin_id}, |
461 | 461 |
'chargenumber' => $form->{chargenumber}, |
... | ... | |
972 | 972 |
|
973 | 973 |
my $msg = $locale->text('No warehouse has been created yet or the quantity of the bins is not configured yet.') . ' '; |
974 | 974 |
|
975 |
if ($main::auth->check_right($form->{login}, 'config')) {
|
|
975 |
if ($main::auth->check_right($::myconfig{login}, 'config')) {
|
|
976 | 976 |
$msg .= $locale->text('You can create warehouses and bins via the menu "System -> Warehouses".'); |
977 | 977 |
} else { |
978 | 978 |
$msg .= $locale->text('Please ask your administrator to create warehouses and bins.'); |
Auch abrufbar als: Unified diff
login nicht aus $::form nehmen. Teil 1