Revision cd417762
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/AM.pm | ||
---|---|---|
1062 | 1062 |
my $user = SL::DB::Manager::AuthUser->find_by(login => $form->{login}); |
1063 | 1063 |
$user->update_attributes( |
1064 | 1064 |
config_values => { |
1065 |
map({ ($_ => $form->{$_}) } SL::DB::AuthUser::CONFIG_VARS()), |
|
1066 |
map({ ($_ => do { my $v = $form->{$_}; $v =~ s/\r//g; $v }) } qw(address signature)), |
|
1065 |
map { ($_ => $form->{$_}) } SL::DB::AuthUser::CONFIG_VARS(), |
|
1067 | 1066 |
}); |
1068 | 1067 |
|
1069 | 1068 |
$main::lxdebug->leave_sub(); |
SL/Form.pm | ||
---|---|---|
978 | 978 |
|
979 | 979 |
local (*IN, *OUT); |
980 | 980 |
|
981 |
my $defaults = SL::DB::Default->get; |
|
981 | 982 |
my $userspath = $::lx_office_conf{paths}->{userspath}; |
982 | 983 |
|
983 | 984 |
$self->{"cwd"} = getcwd(); |
... | ... | |
1029 | 1030 |
$self->{"notes"} = $self->{ $self->{"formname"} . "notes" }; |
1030 | 1031 |
|
1031 | 1032 |
if (!$self->{employee_id}) { |
1032 |
map { $self->{"employee_${_}"} = $myconfig->{$_}; } qw(email tel fax name signature company address businessnumber co_ustid taxnumber duns); |
|
1033 |
$self->{"employee_${_}"} = $myconfig->{$_} for qw(email tel fax name signature); |
|
1034 |
$self->{"employee_${_}"} = $defaults->$_ for qw(address businessnumber co_ustid company duns sepa_creditor_id taxnumber); |
|
1033 | 1035 |
} |
1034 | 1036 |
|
1035 |
map { $self->{"${_}"} = $myconfig->{$_}; } qw(co_ustid); |
|
1036 |
map { $self->{"myconfig_${_}"} = $myconfig->{$_} } grep { $_ ne 'dbpasswd' } keys %{ $myconfig }; |
|
1037 |
$self->{"myconfig_${_}"} = $myconfig->{$_} for grep { $_ ne 'dbpasswd' } keys %{ $myconfig }; |
|
1038 |
$self->{$_} = $defaults->$_ for qw(co_ustid); |
|
1039 |
$self->{"myconfig_${_}"} = $defaults->$_ for qw(address businessnumber co_ustid company duns sepa_creditor_id taxnumber); |
|
1037 | 1040 |
|
1038 | 1041 |
$self->{copies} = 1 if (($self->{copies} *= 1) <= 0); |
1039 | 1042 |
|
... | ... | |
1898 | 1901 |
|
1899 | 1902 |
my $self = shift; |
1900 | 1903 |
my %params = @_; |
1904 |
my $defaults = SL::DB::Default->get; |
|
1901 | 1905 |
|
1902 | 1906 |
Common::check_params(\%params, qw(prefix)); |
1903 | 1907 |
Common::check_params_x(\%params, qw(id)); |
... | ... | |
1914 | 1918 |
|
1915 | 1919 |
if ($login) { |
1916 | 1920 |
my $user = User->new(login => $login); |
1917 |
map { $self->{$params{prefix} . "_${_}"} = $user->{$_}; } qw(address businessnumber co_ustid company duns email fax name signature taxnumber tel); |
|
1921 |
$self->{$params{prefix} . "_${_}"} = $user->{$_} for qw(email fax name signature tel); |
|
1922 |
$self->{$params{prefix} . "_${_}"} = $defaults->$_ for qw(address businessnumber co_ustid company duns taxnumber); |
|
1918 | 1923 |
|
1919 | 1924 |
$self->{$params{prefix} . '_login'} = $login; |
1920 | 1925 |
$self->{$params{prefix} . '_name'} ||= $login; |
... | ... | |
3377 | 3382 |
|
3378 | 3383 |
die "'media' other than 'email', 'file', 'printer' is not supported yet" unless $self->{media} =~ m/^(?:email|file|printer)$/; |
3379 | 3384 |
|
3385 |
# Several fields that used to reside in %::myconfig (stored in |
|
3386 |
# auth.user_config) are now stored in defaults. Copy them over for |
|
3387 |
# compatibility. |
|
3388 |
$self->{$_} = $defaults->$_ for qw(company address taxnumber co_ustid duns sepa_creditor_id); |
|
3389 |
|
|
3380 | 3390 |
# set shipto from billto unless set |
3381 | 3391 |
my $has_shipto = any { $self->{"shipto$_"} } qw(name street zipcode city country contact); |
3382 | 3392 |
if (!$has_shipto && ($self->{type} =~ m/^(?:purchase_order|request_quotation)$/)) { |
3383 |
$self->{shiptoname} = $::myconfig{company};
|
|
3384 |
$self->{shiptostreet} = $::myconfig{address};
|
|
3393 |
$self->{shiptoname} = $defaults->company;
|
|
3394 |
$self->{shiptostreet} = $defaults->address;
|
|
3385 | 3395 |
} |
3386 | 3396 |
|
3387 | 3397 |
my $language = $self->{language} ? '_' . $self->{language} : ''; |
bin/mozilla/ca.pl | ||
---|---|---|
35 | 35 |
use POSIX qw(strftime); |
36 | 36 |
|
37 | 37 |
use SL::CA; |
38 |
use SL::DB::Default; |
|
38 | 39 |
use SL::ReportGenerator; |
39 | 40 |
|
40 | 41 |
require "bin/mozilla/reportgenerator.pl"; |
... | ... | |
186 | 187 |
my $form = $main::form; |
187 | 188 |
my %myconfig = %main::myconfig; |
188 | 189 |
my $locale = $main::locale; |
190 |
my $defaults = SL::DB::Default->get; |
|
189 | 191 |
|
190 | 192 |
$main::auth->assert('report'); |
191 | 193 |
|
... | ... | |
331 | 333 |
$form->{print_date} = $locale->text('Create Date') . " " . $locale->date(\%myconfig, $form->current_date(\%myconfig), 0); |
332 | 334 |
push (@options, $form->{print_date}); |
333 | 335 |
|
334 |
$form->{company} = $locale->text('Company') . " " . $myconfig{company};
|
|
336 |
$form->{company} = $locale->text('Company') . " " . $defaults->company;
|
|
335 | 337 |
push (@options, $form->{company}); |
336 | 338 |
|
337 | 339 |
my @columns = qw(transdate reference description gegenkonto debit credit ustkonto ustrate balance); |
bin/mozilla/io.pl | ||
---|---|---|
1443 | 1443 |
if ($shipto) { |
1444 | 1444 |
if ( $form->{formname} eq 'purchase_order' |
1445 | 1445 |
|| $form->{formname} eq 'request_quotation') { |
1446 |
$form->{shiptoname} = $myconfig{company};
|
|
1447 |
$form->{shiptostreet} = $myconfig{address};
|
|
1446 |
$form->{shiptoname} = $defaults->company;
|
|
1447 |
$form->{shiptostreet} = $defaults->address;
|
|
1448 | 1448 |
} else { |
1449 | 1449 |
map { $form->{"shipto$_"} = $form->{$_} } @a; |
1450 | 1450 |
} |
bin/mozilla/rp.pl | ||
---|---|---|
375 | 375 |
. qq| $longcomparetodate|; |
376 | 376 |
} |
377 | 377 |
|
378 |
# setup variables for the form |
|
379 |
my @a = qw(company address businessnumber); |
|
380 |
map { $form->{$_} = $myconfig{$_} } @a; |
|
381 |
|
|
382 | 378 |
$form->{IN} = "income_statement.html"; |
383 | 379 |
|
384 | 380 |
$form->parse_template; |
... | ... | |
415 | 411 |
|
416 | 412 |
# $::form->{IN} = "balance_sheet.html"; |
417 | 413 |
|
418 |
# setup company variables for the form |
|
419 |
map { $::form->{$_} = $::myconfig{$_} } qw(company address businessnumber nativecurr); |
|
420 |
|
|
421 | 414 |
$::form->header; |
422 | 415 |
print $::form->parse_html_template('rp/balance_sheet', $data); |
423 | 416 |
|
... | ... | |
459 | 452 |
my $form = $main::form; |
460 | 453 |
my %myconfig = %main::myconfig; |
461 | 454 |
my $locale = $main::locale; |
455 |
my $defaults = SL::DB::Default->get; |
|
462 | 456 |
|
463 | 457 |
if ($form->{reporttype} eq "custom") { |
464 | 458 |
|
... | ... | |
620 | 614 |
$form->{print_date} = $locale->text('Create Date') . " " . $locale->date(\%myconfig, $form->current_date(\%myconfig), 0); |
621 | 615 |
push (@options, $form->{print_date}); |
622 | 616 |
|
623 |
$form->{company} = $locale->text('Company') . " " . $myconfig{company};
|
|
617 |
$form->{company} = $locale->text('Company') . " " . $defaults->company;
|
|
624 | 618 |
push (@options, $form->{company}); |
625 | 619 |
|
626 | 620 |
|
... | ... | |
1828 | 1822 |
. qq| $longtodate|; |
1829 | 1823 |
} |
1830 | 1824 |
|
1831 |
# setup variables for the form |
|
1832 |
my @a = qw(company address businessnumber); |
|
1833 |
map { $form->{$_} = $myconfig{$_} } @a; |
|
1834 |
|
|
1835 | 1825 |
$form->{IN} = "bwa.html"; |
1836 | 1826 |
|
1837 | 1827 |
$form->parse_template; |
bin/mozilla/sepa.pl | ||
---|---|---|
452 | 452 |
my $locale = $main::locale; |
453 | 453 |
my $cgi = $::request->{cgi}; |
454 | 454 |
my $vc = $form->{vc} eq 'customer' ? 'customer' : 'vendor'; |
455 |
my $defaults = SL::DB::Default->get; |
|
455 | 456 |
|
456 |
if (!$myconfig->{company}) {
|
|
457 |
$form->show_generic_error($locale->text('You have to enter a company name in your user preferences (see the "Program" menu, "Preferences").'), 'back_button' => 1);
|
|
457 |
if (!$defaults->company) {
|
|
458 |
$form->show_generic_error($locale->text('You have to enter a company name in the client configuration.'), 'back_button' => 1);
|
|
458 | 459 |
} |
459 | 460 |
|
460 |
if (($vc eq 'customer') && !$myconfig->{sepa_creditor_id}) {
|
|
461 |
$form->show_generic_error($locale->text('You have to enter the SEPA creditor ID in your user preferences (see the "Program" menu, "Preferences").'), 'back_button' => 1);
|
|
461 |
if (($vc eq 'customer') && !$defaults->sepa_creditor_id) {
|
|
462 |
$form->show_generic_error($locale->text('You have to enter the SEPA creditor ID in the client configuration.'), 'back_button' => 1);
|
|
462 | 463 |
} |
463 | 464 |
|
464 | 465 |
my @ids; |
... | ... | |
486 | 487 |
|
487 | 488 |
my $message_id = strftime('MSG%Y%m%d%H%M%S', localtime) . sprintf('%06d', $$); |
488 | 489 |
|
489 |
my $sepa_xml = SL::SEPA::XML->new('company' => $myconfig->{company},
|
|
490 |
'creditor_id' => $myconfig->{sepa_creditor_id},
|
|
490 |
my $sepa_xml = SL::SEPA::XML->new('company' => $defaults->company,
|
|
491 |
'creditor_id' => $defaults->sepa_creditor_id,
|
|
491 | 492 |
'src_charset' => $::lx_office_conf{system}->{dbcharset} || 'ISO-8859-15', |
492 | 493 |
'message_id' => $message_id, |
493 | 494 |
'grouped' => 1, |
bin/mozilla/ustva.pl | ||
---|---|---|
84 | 84 |
|
85 | 85 |
$::auth->assert('advance_turnover_tax_return'); |
86 | 86 |
|
87 |
my $defaults = SL::DB::Default->get; |
|
87 | 88 |
$form->{title} = $locale->text('UStVA'); |
88 | 89 |
$form->{kz10} = ''; #Berichtigte Anmeldung? Ja =1 Nein=0 |
89 | 90 |
|
... | ... | |
101 | 102 |
# Hier Einlesen der user-config |
102 | 103 |
# steuernummer entfernt für prerelease |
103 | 104 |
my @a = qw( |
104 |
signature name company address businessnumber
|
|
105 |
signature name |
|
105 | 106 |
tel fax email co_chief co_department |
106 | 107 |
co_custom1 co_custom2 co_custom3 co_custom4 co_custom5 |
107 | 108 |
co_name1 co_name2 co_street co_street1 co_zip |
108 | 109 |
co_city co_city1 co_country co_tel co_tel1 |
109 | 110 |
co_tel2 co_fax co_fax1 co_email co_email1 |
110 |
co_url co_url1 ustid duns co_bankname
|
|
111 |
co_url co_url1 co_bankname |
|
111 | 112 |
co_bankname1 co_bankname2 co_bankname3 co_blz co_blz1 |
112 | 113 |
co_blz2 co_blz3 co_accountnr co_accountnr1 co_accountnr2 |
113 | 114 |
co_accountnr3 |
114 | 115 |
); |
115 | 116 |
|
116 |
map { $form->{$_} = $myconfig{$_} } @a; |
|
117 |
$form->{$_} = $myconfig{$_} for @a; |
|
118 |
$form->{$_} = $defaults->$_ for qw(company address co_ustid duns); |
|
117 | 119 |
|
118 | 120 |
my $openings = $form->{FA_Oeffnungszeiten}; |
119 | 121 |
$openings =~ s/\\\\n/<br>/g; |
... | ... | |
200 | 202 |
company_given => $company_given, |
201 | 203 |
address_given => $address_given, |
202 | 204 |
taxnumber_given => $taxnumber_given, |
203 |
taxnumber => $myconfig{taxnumber},
|
|
205 |
taxnumber => $defaults->taxnumber,
|
|
204 | 206 |
select_year => $select_year, |
205 | 207 |
period_local => $period_local, |
206 | 208 |
method_local => $method_local, |
... | ... | |
741 | 743 |
$locale->date(\%myconfig, $form->current_date(\%myconfig), 0, 0, 0); |
742 | 744 |
|
743 | 745 |
# setup variables for the form |
744 |
my @a = qw(company businessnumber tel fax email
|
|
746 |
my @a = qw(tel fax email |
|
745 | 747 |
co_chief co_department co_custom1 co_custom2 co_custom3 co_custom4 co_custom5 |
746 | 748 |
co_name1 co_name2 co_street co_street1 co_zip co_city co_city1 co_country co_tel co_tel1 co_tel2 |
747 |
co_fax co_fax1 co_email co_email1 co_url co_url1 ustid duns
|
|
749 |
co_fax co_fax1 co_email co_email1 co_url co_url1 |
|
748 | 750 |
co_bankname co_bankname1 co_bankname2 co_bankname3 co_blz co_blz1 |
749 | 751 |
co_blz2 co_blz3 co_accountnr co_accountnr1 co_accountnr2 co_accountnr3); |
750 | 752 |
|
751 |
map { $form->{$_} = $myconfig{$_} } @a; |
|
753 |
$form->{$_} = $myconfig{$_} for @a; |
|
754 |
$form->{$_} = $defaults->$_ for qw(company address co_ustid duns); |
|
752 | 755 |
|
753 | 756 |
if ($form->{address} ne '') { |
754 | 757 |
my $temp = $form->{address}; |
... | ... | |
1070 | 1073 |
$form->header(); |
1071 | 1074 |
|
1072 | 1075 |
my $template_ref = { |
1073 |
taxnumber => $myconfig{taxnumber},
|
|
1076 |
taxnumber => $defaults->taxnumber,
|
|
1074 | 1077 |
}; |
1075 | 1078 |
|
1076 | 1079 |
print($form->parse_html_template('ustva/generic_taxreport', $template_ref)); |
templates/webpages/ustva/config_step2.html | ||
---|---|---|
158 | 158 |
[%- IF COA_Germany %] |
159 | 159 |
[% input_steuernummer %] |
160 | 160 |
[%- ELSE %] |
161 |
[% 'Please enter the taxnumber in the administration menu user preferences' | $T8 %]
|
|
161 |
[% 'Please enter the taxnumber in the client configuration.' | $T8 %]
|
|
162 | 162 |
[% 'Current value:' | $T8 %] [% HTML.escape(myconfig_taxnumber) %] |
163 | 163 |
[%- END %] |
164 | 164 |
|
Auch abrufbar als: Unified diff
address businessnumber company co_ustid duns taxnumber sepa_creditor_id aus Defaults-Tabelle holen