From: Jan Büren Date: Thu, 4 Mar 2010 08:58:27 +0000 (+0100) Subject: Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp X-Git-Tag: release-2.6.1beta1~38 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/93c6ec51f6bb239eb52c3e0b0d1adf87f57796ee?hp=8ee1c3bdc197b96b01d1a7cf9f85d05e1e80181d Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp Conflicts: doc/changelog --- diff --git a/SL/Form.pm b/SL/Form.pm index 715385154..e0207243f 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -765,6 +765,7 @@ sub _prepare_html_template { $additional_params->{"conf_lizenzen"} = $main::lizenzen; $additional_params->{"conf_latex_templates"} = $main::latex; $additional_params->{"conf_opendocument_templates"} = $main::opendocument_templates; + $additional_params->{"conf_vertreter"} = $main::vertreter; if (%main::debug_options) { map { $additional_params->{'DEBUG_' . uc($_)} = $main::debug_options{$_} } keys %main::debug_options; @@ -2220,9 +2221,15 @@ sub _get_business_types { my ($self, $dbh, $key) = @_; - $key = "all_business_types" unless ($key); - $self->{$key} = - selectall_hashref_query($self, $dbh, qq|SELECT * FROM business|); + my $options = ref $key eq 'HASH' ? $key : { key => $key }; + $options->{key} ||= "all_business_types"; + my $where = ''; + + if (exists $options->{salesman}) { + $where = 'WHERE ' . ($options->{salesman} ? '' : 'NOT ') . 'COALESCE(salesman)'; + } + + $self->{ $options->{key} } = selectall_hashref_query($self, $dbh, qq|SELECT * FROM business $where ORDER BY lower(description)|); $main::lxdebug->leave_sub(); } @@ -2966,7 +2973,9 @@ sub lastname_used { sub current_date { $main::lxdebug->enter_sub(); - my ($self, $myconfig, $thisdate, $days) = @_; + my $self = shift; + my $myconfig = shift || \%::myconfig; + my ($thisdate, $days) = @_; my $dbh = $self->get_standard_dbh($myconfig); my $query; diff --git a/bin/mozilla/amtemplates.pl b/bin/mozilla/amtemplates.pl index 839fbf21f..63f20d45f 100644 --- a/bin/mozilla/amtemplates.pl +++ b/bin/mozilla/amtemplates.pl @@ -135,7 +135,7 @@ sub display_template_form { my %formname_setup = ( - "balance_sheet" => { "translation" => $locale->text('Balance Sheet'), "html" => 1 }, +# "balance_sheet" => { "translation" => $locale->text('Balance Sheet'), "html" => 1 }, "bin_list" => $locale->text('Bin List'), "bwa" => { "translation" => $locale->text('BWA'), "html" => 1 }, "check" => { "translation" => $locale->text('Check'), "html" => 1 }, diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index b0f72b43a..0130a464b 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -285,8 +285,9 @@ sub form_header { my %myconfig = %main::myconfig; my $locale = $main::locale; - $form->get_lists("employees" => "ALL_EMPLOYEES", - "taxzones" => "ALL_TAXZONES"); + $form->get_lists(employees => "ALL_EMPLOYEES", + taxzones => "ALL_TAXZONES", + business_types => { key => 'ALL_SALESMAN_BUSINESSES', salesman => 1 }); $form->get_pricegroup(\%myconfig, { all => 1 }); $form->{ALL_SALESMEN} = $form->{ALL_EMPLOYEES}; diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 1c546e498..fa3be49a2 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -359,7 +359,7 @@ sub update_delivery_order { my $rows = scalar @{ $form->{item_list} }; if ($rows) { - $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"}); + $form->{"qty_$i"} = 1 unless $form->parse_amount(\%myconfig, $form->{"qty_$i"}); if ($rows > 1) { diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 09ef5249c..042fd4be9 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -463,7 +463,7 @@ sub update { my $rows = scalar @{ $form->{item_list} }; if ($rows) { - $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"}); + $form->{"qty_$i"} = 1 unless $form->parse_amount(\%myconfig, $form->{"qty_$i"}); if ($rows > 1) { diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 45bbb4d0b..f618c5b69 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -1112,46 +1112,40 @@ sub generate_income_statement { } sub generate_balance_sheet { - $main::lxdebug->enter_sub(); - - $main::auth->assert('report'); - - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; + $::lxdebug->enter_sub; + $::auth->assert('report'); - $form->{decimalplaces} = $form->{decimalplaces} * 1 || 2; - $form->{padding} = "  "; - $form->{bold} = ""; - $form->{endbold} = ""; - $form->{br} = "
"; + $::form->{decimalplaces} = $::form->{decimalplaces} * 1 || 2; + $::form->{padding} = "  "; + $::form->{bold} = ""; + $::form->{endbold} = ""; + $::form->{br} = "
"; - my $data = RP->balance_sheet(\%myconfig, \%$form); + my $data = RP->balance_sheet(\%::myconfig, $::form); - $form->{asofdate} = $form->current_date(\%myconfig) unless $form->{asofdate}; - $form->{period} = $locale->date(\%myconfig, $form->current_date(\%myconfig), 1); + $::form->{asofdate} ||= $::form->current_date; + $::form->{period} = $::locale->date(\%::myconfig, $::form->current_date, 1); - ($form->{department}) = split /--/, $form->{department}; + ($::form->{department}) = split /--/, $::form->{department}; # define Current Earnings account - my $padding = ($form->{l_heading}) ? $form->{padding} : ""; - push(@{ $form->{equity_account} }, $padding . $locale->text('Current Earnings')); + my $padding = $::form->{l_heading} ? $::form->{padding} : ""; + push @{ $::form->{equity_account} }, $padding . $::locale->text('Current Earnings'); - $form->{this_period} = $locale->date(\%myconfig, $form->{asofdate}, 0); - $form->{last_period} = $locale->date(\%myconfig, $form->{compareasofdate}, 0); + $::form->{this_period} = $::locale->date(\%::myconfig, $::form->{asofdate}, 0); + $::form->{last_period} = $::locale->date(\%::myconfig, $::form->{compareasofdate}, 0); - $form->{IN} = "balance_sheet.html"; +# $::form->{IN} = "balance_sheet.html"; # setup company variables for the form - map { $form->{$_} = $myconfig{$_}; } (qw(company address businessnumber nativecurr)); + map { $::form->{$_} = $::myconfig{$_} } qw(company address businessnumber nativecurr); - $form->{templates} = $myconfig{templates}; + $::form->{templates} = $::myconfig{templates}; - $form->header(); - print $form->parse_html_template('rp/balance_sheet', $data); -# $form->parse_template(); + $::form->header; + print $::form->parse_html_template('rp/balance_sheet', $data); - $main::lxdebug->leave_sub(); + $::lxdebug->leave_sub; } sub generate_projects { @@ -2715,7 +2709,7 @@ sub generate_bwa { } } else { # die konvertierungen nur dann durchführen, wenn auch daten gesetzt sind. - # ansonsten ist die prüfung in RP.pm + # ansonsten ist die prüfung in RP.pm # if (defined ($form->{fromdate|todate}=='..')) # immer wahr if ($form->{fromdate}){ diff --git a/doc/changelog b/doc/changelog index 4f0d18d91..54451ea40 100644 --- a/doc/changelog +++ b/doc/changelog @@ -159,10 +159,10 @@ Liste gefixter Bugs aus dem Bugtracker: 922 940 1017 1024 1025 1028 1030 1031 1034 1035 1036 1037 1040 1043 - 1044 1046 1051 1055 1057 1058 1071 1072 1073 1077 1079 1081 1082 1095 - 1098 1100 1101 1108 1110 1118 1125 1127 1130 1133 1135 1136 1138 1144 - 1146 1147 1150 1151 1155 1164 1173 1177 1186 1188 1190 1191 1195 1197 - 1199 1201 + 1044 1046 1051 1055 1057 1058 1072 1073 1077 1079 1081 1082 1095 1098 + 1100 1101 1108 1110 1118 1125 1127 1130 1133 1135 1136 1138 1144 + 1146 1147 1150 1151 1155 1164 1173 1177 1186 1188 1190 1191 1195 + 1197 1199 1200 1201 1250 2009-06-02 - Version 2.6.0 diff --git a/locale/de/all b/locale/de/all index 12b937f61..6e5956400 100644 --- a/locale/de/all +++ b/locale/de/all @@ -1316,6 +1316,7 @@ $self->{texts} = { 'Report and misc. Preferences' => 'Sonstige Einstellungen', 'Report for' => 'Bericht für', 'Reports' => 'Berichte', + 'Representative' => 'Vertreter', 'Reqdate' => 'Lieferdatum', 'Request for Quotation' => 'Anfrage', 'Request for Quotations' => 'Anfragen', @@ -1716,6 +1717,8 @@ $self->{texts} = { 'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.', 'Type' => 'Typ', 'Type of Business' => 'Kunden-/Lieferantentyp', + 'Type of Customer' => 'Kundentyp', + 'Type of Vendor' => 'Lieferantentyp', 'USTVA' => 'USTVA', 'USTVA 2004' => 'USTVA 2004', 'USTVA 2005' => 'USTVA 2005', @@ -1760,6 +1763,7 @@ $self->{texts} = { 'User migration complete' => 'Benutzermigration abgeschlossen', 'User name' => 'Benutzername', 'User saved!' => 'Benutzer gespeichert!', + 'Username' => 'Benutzername', 'Users in
this group' => 'Benutzer in
dieser Gruppe', 'Users not in this group' => 'Benutzer nicht in dieser Gruppe', 'Ust-IDNr' => 'USt-IdNr.', diff --git a/locale/de/dn b/locale/de/dn index 7970a39fc..4faa7a487 100644 --- a/locale/de/dn +++ b/locale/de/dn @@ -341,6 +341,7 @@ $self->{subs} = { 'quotation' => 'quotation', 'reformat_numbers' => 'reformat_numbers', 'relink_accounts' => 'relink_accounts', + 'remove_emptied_rows' => 'remove_emptied_rows', 'report_generator_back' => 'report_generator_back', 'report_generator_dispatcher' => 'report_generator_dispatcher', 'report_generator_do' => 'report_generator_do', diff --git a/locale/de/do b/locale/de/do index 528697cb4..eef7703df 100644 --- a/locale/de/do +++ b/locale/de/do @@ -382,6 +382,7 @@ $self->{subs} = { 'redo_stock_info' => 'redo_stock_info', 'reformat_numbers' => 'reformat_numbers', 'relink_accounts' => 'relink_accounts', + 'remove_emptied_rows' => 'remove_emptied_rows', 'report_generator_back' => 'report_generator_back', 'report_generator_dispatcher' => 'report_generator_dispatcher', 'report_generator_do' => 'report_generator_do', diff --git a/locale/de/ic b/locale/de/ic index e207cec17..4bfb78a07 100644 --- a/locale/de/ic +++ b/locale/de/ic @@ -397,6 +397,7 @@ $self->{subs} = { 'quotation' => 'quotation', 'reformat_numbers' => 'reformat_numbers', 'relink_accounts' => 'relink_accounts', + 'remove_emptied_rows' => 'remove_emptied_rows', 'report_generator_back' => 'report_generator_back', 'report_generator_dispatcher' => 'report_generator_dispatcher', 'report_generator_do' => 'report_generator_do', diff --git a/locale/de/io b/locale/de/io index 79e3991bc..32cba4698 100644 --- a/locale/de/io +++ b/locale/de/io @@ -299,6 +299,7 @@ $self->{subs} = { 'quotation' => 'quotation', 'reformat_numbers' => 'reformat_numbers', 'relink_accounts' => 'relink_accounts', + 'remove_emptied_rows' => 'remove_emptied_rows', 'request_for_quotation' => 'request_for_quotation', 'retrieve_partunits' => 'retrieve_partunits', 'sales_invoice' => 'sales_invoice', diff --git a/locale/de/ir b/locale/de/ir index b7b80b4c0..3d0b94ab4 100644 --- a/locale/de/ir +++ b/locale/de/ir @@ -352,6 +352,7 @@ $self->{subs} = { 'reformat_numbers' => 'reformat_numbers', 'relink_accounts' => 'relink_accounts', 'remove_draft' => 'remove_draft', + 'remove_emptied_rows' => 'remove_emptied_rows', 'request_for_quotation' => 'request_for_quotation', 'retrieve_partunits' => 'retrieve_partunits', 'sales_invoice' => 'sales_invoice', diff --git a/locale/de/is b/locale/de/is index befc780f8..f5ac0c76e 100644 --- a/locale/de/is +++ b/locale/de/is @@ -358,6 +358,7 @@ $self->{subs} = { 'reformat_numbers' => 'reformat_numbers', 'relink_accounts' => 'relink_accounts', 'remove_draft' => 'remove_draft', + 'remove_emptied_rows' => 'remove_emptied_rows', 'request_for_quotation' => 'request_for_quotation', 'retrieve_partunits' => 'retrieve_partunits', 'sales_invoice' => 'sales_invoice', diff --git a/locale/de/login b/locale/de/login index 782d0a8ba..ab13646c5 100644 --- a/locale/de/login +++ b/locale/de/login @@ -487,6 +487,7 @@ $self->{subs} = { 'redo_stock_info' => 'redo_stock_info', 'reformat_numbers' => 'reformat_numbers', 'relink_accounts' => 'relink_accounts', + 'remove_emptied_rows' => 'remove_emptied_rows', 'report' => 'report', 'report_for_todo_list' => 'report_for_todo_list', 'report_generator_back' => 'report_generator_back', diff --git a/locale/de/oe b/locale/de/oe index 003ffe00b..8e37a069a 100644 --- a/locale/de/oe +++ b/locale/de/oe @@ -447,6 +447,7 @@ $self->{subs} = { 'redo_stock_info' => 'redo_stock_info', 'reformat_numbers' => 'reformat_numbers', 'relink_accounts' => 'relink_accounts', + 'remove_emptied_rows' => 'remove_emptied_rows', 'report_for_todo_list' => 'report_for_todo_list', 'report_generator_back' => 'report_generator_back', 'report_generator_dispatcher' => 'report_generator_dispatcher', diff --git a/locale/de/todo b/locale/de/todo index dc1299e91..5a1ce5ad5 100644 --- a/locale/de/todo +++ b/locale/de/todo @@ -476,6 +476,7 @@ $self->{subs} = { 'redo_stock_info' => 'redo_stock_info', 'reformat_numbers' => 'reformat_numbers', 'relink_accounts' => 'relink_accounts', + 'remove_emptied_rows' => 'remove_emptied_rows', 'report' => 'report', 'report_for_todo_list' => 'report_for_todo_list', 'report_generator_back' => 'report_generator_back', diff --git a/templates/webpages/ct/form_header_de.html b/templates/webpages/ct/form_header_de.html index a435449f8..7ba33321c 100644 --- a/templates/webpages/ct/form_header_de.html +++ b/templates/webpages/ct/form_header_de.html @@ -1,4 +1,5 @@ -[% USE HTML %][% USE LxERP %] +[% USE HTML %][% USE LxERP %] +
[% title %]
@@ -21,6 +22,32 @@ + [% IF conf_vertreter %] + + + + + + + + + [%- END %] [%- IF is_customer %] @@ -153,17 +180,28 @@ + [%- IF conf_vertreter %] + + + + + + + [%- END %] + - - + [% UNLESS conf_vertreter %] + + + [%- END %] - [%- IF is_customer %] + [%- IF is_customer && !use_vertreter %]
[% IF is_customer %]Kundentyp[%- ELSE %]Lieferantentyp[%- END %] + [%- INCLUDE generic/multibox.html + name = 'business', + DATA = all_business, + show_empty = 1, + id_key = 'id', + label_key = 'description', + -%] +
Vertreter + [%- INCLUDE generic/multibox.html + name = 'salesman_id', + DATA = ALL_SALESMAN_BUSINESSES, + show_empty = 1, + id_key = 'id', + label_key = 'description', + -%] +
Kundennummer
BenutzernamePasswort
Kunden-/Lieferantentyp - [%- INCLUDE generic/multibox.html - name = 'business', - DATA = all_business, - show_empty = 1, - id_key = 'id', - label_key = 'description', - -%] - [% IF is_customer %]Kundentyp[% ELSE %]Lieferantentyp[%- END %] + [%- INCLUDE generic/multibox.html + name = 'business', + DATA = all_business, + show_empty = 1, + id_key = 'id', + label_key = 'description', + -%] + Sprache [%- INCLUDE generic/multibox.html @@ -207,7 +245,7 @@ label_key = 'description', -%] Verkäufer/in [%- INCLUDE generic/multibox.html diff --git a/templates/webpages/ct/form_header_master.html b/templates/webpages/ct/form_header_master.html index 43291e0b2..ffe9c6976 100644 --- a/templates/webpages/ct/form_header_master.html +++ b/templates/webpages/ct/form_header_master.html @@ -1,4 +1,5 @@ -[% USE HTML %][% USE LxERP %] +[% USE HTML %][% USE LxERP %] +
[% title %]
@@ -21,6 +22,32 @@ + [% IF conf_vertreter %] + + + + + + + + + [%- END %] [%- IF is_customer %] @@ -153,17 +180,28 @@ + [%- IF conf_vertreter %] + + + + + + + [%- END %] + - - + [% UNLESS conf_vertreter %] + + + [%- END %] - [%- IF is_customer %] + [%- IF is_customer && !use_vertreter %]
[% IF is_customer %]Type of Customer[%- ELSE %]Type of Vendor[%- END %] + [%- INCLUDE generic/multibox.html + name = 'business', + DATA = all_business, + show_empty = 1, + id_key = 'id', + label_key = 'description', + -%] +
Representative + [%- INCLUDE generic/multibox.html + name = 'salesman_id', + DATA = ALL_SALESMAN_BUSINESSES, + show_empty = 1, + id_key = 'id', + label_key = 'description', + -%] +
Customer Number
UsernamePassword
Type of Business - [%- INCLUDE generic/multibox.html - name = 'business', - DATA = all_business, - show_empty = 1, - id_key = 'id', - label_key = 'description', - -%] - [% IF is_customer %]Type of Customer[% ELSE %]Type of Vendor[%- END %] + [%- INCLUDE generic/multibox.html + name = 'business', + DATA = all_business, + show_empty = 1, + id_key = 'id', + label_key = 'description', + -%] + Language [%- INCLUDE generic/multibox.html @@ -207,7 +245,7 @@ label_key = 'description', -%] Salesman [%- INCLUDE generic/multibox.html