From: Jan Büren Date: Mon, 17 Oct 2011 11:43:17 +0000 (+0200) Subject: Merge branch 'master' of git@vc.linet-services.de:public/lx-office-erp X-Git-Tag: release-2.7.0beta1~215 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/006ea6513d82601b7c5f883251d888113a75425a?hp=a84943da59d4910ad5baef33804daf97fc5cceb2 Merge branch 'master' of git@vc.linet-services.de:public/lx-office-erp --- diff --git a/SL/Form.pm b/SL/Form.pm index c7539354c..f50cba70d 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -674,7 +674,7 @@ sub header { # extra code is currently only used by menuv3 and menuv4 to set their css. # it is strongly deprecated, and will be changed in a future version. - my ($self, $extra_code) = @_; + my ($self, %params) = @_; my $db_charset = $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET; my @header; @@ -722,10 +722,15 @@ sub header { |; } + my %doctypes = ( + strict => qq||, + transitional => qq||, + frameset => qq||, + ); + # output print $self->create_http_response(content_type => 'text/html', charset => $db_charset); - print "\n" - if $ENV{'HTTP_USER_AGENT'} =~ m/MSIE\s+\d/; # Other browsers may choke on menu scripts with DOCTYPE. + print $doctypes{$params{doctype} || 'transitional'}, $/; print < @@ -734,9 +739,9 @@ sub header { EOT print " $_\n" for @header; print < - - + + + - $extra_code + $params{extra_code} $title_hack diff --git a/SL/InstallationCheck.pm b/SL/InstallationCheck.pm index 844778840..6311d2b0c 100644 --- a/SL/InstallationCheck.pm +++ b/SL/InstallationCheck.pm @@ -19,6 +19,7 @@ BEGIN { { name => "DBD::Pg", version => '1.49', url => "http://search.cpan.org/~dbdpg/", debian => 'libdbd-pg' }, { name => "Email::Address", url => "http://search.cpan.org/~rjbs/", debian => 'libemail-address-perl' }, { name => "FCGI", url => "http://search.cpan.org/~mstrout/", debian => 'libfcgi-perl' }, + { name => "JSON", url => "http://search.cpan.org/~makamaka", debian => 'libjson-perl' }, { name => "List::MoreUtils", version => '0.21', url => "http://search.cpan.org/~vparseval/", debian => 'liblist-moreutils-perl' }, { name => "Params::Validate", url => "http://search.cpan.org/~drolsky/", debian => 'libparams-validate-perl' }, { name => "PDF::API2", version => '2.000', url => "http://search.cpan.org/~areibens/", debian => 'libpdf-api2-perl' }, diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index bf0d5414e..34a20f3f6 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -74,7 +74,7 @@ sub html_tag { my ($self, $tag, $content, @slurp) = @_; my $attributes = $self->attributes(@slurp); - return "<${tag}${attributes}/>" unless defined($content); + return "<${tag}${attributes}>" unless defined($content); return "<${tag}${attributes}>${content}"; } @@ -95,6 +95,8 @@ sub textarea_tag { my %attributes = _hashify(@slurp); $attributes{id} ||= $self->name_to_id($name); + $attributes{rows} *= 1; # required by standard + $attributes{cols} *= 1; # required by standard $content = $content ? _H($content) : ''; return $self->html_tag('textarea', $content, %attributes, name => $name); @@ -194,7 +196,10 @@ sub button_tag { my ($self, $onclick, $value, @slurp) = @_; my %attributes = _hashify(@slurp); - return $self->input_tag(undef, $value, %attributes, type => 'button', onclick => $onclick); + $attributes{id} ||= $self->name_to_id($attributes{name}) if $attributes{name}; + $attributes{type} ||= 'button'; + + return $self->html_tag('input', undef, %attributes, value => $value, onclick => $onclick); } sub options_for_select { @@ -272,8 +277,7 @@ sub date_tag { s/y+/\%Y/gi; } $::myconfig{"dateformat"}; - $params{cal_align} ||= 'BR'; - + my $cal_align = delete $params{cal_align} || 'BR'; my $str_value = blessed $value ? $value->to_lxoffice : $value; $self->input_tag($name, $str_value, @@ -285,12 +289,13 @@ sub date_tag { ) . ((!$params{no_cal}) ? $self->html_tag('img', undef, src => 'image/calendar.png', + alt => $::locale->text('Calendar'), id => "trigger$seq", title => _H($::myconfig{dateformat}), %params, ) . $self->javascript( - "Calendar.setup({ inputField: '$name_e', ifFormat: '$datefmt', align: '$params{cal_align}', button: 'trigger$seq' });" + "Calendar.setup({ inputField: '$name_e', ifFormat: '$datefmt', align: '$cal_align', button: 'trigger$seq' });" ) : ''); } diff --git a/bin/mozilla/menu.pl b/bin/mozilla/menu.pl index 15c43efe5..791095739 100644 --- a/bin/mozilla/menu.pl +++ b/bin/mozilla/menu.pl @@ -59,7 +59,7 @@ sub display { $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; my $framesize = _calc_framesize(); - $::form->header; + $::form->header(doctype => 'frameset'); print qq| diff --git a/bin/mozilla/menuv3.pl b/bin/mozilla/menuv3.pl index d444b759e..121d76df0 100644 --- a/bin/mozilla/menuv3.pl +++ b/bin/mozilla/menuv3.pl @@ -44,7 +44,7 @@ use strict; sub display { my $form = $main::form; - $form->header(qq||); + $form->header(extra_code => qq||); $form->{date} = clock_line(); $form->{menu} = acc_menu(); diff --git a/bin/mozilla/menuv4.pl b/bin/mozilla/menuv4.pl index ae82d45f8..e9e7ac499 100644 --- a/bin/mozilla/menuv4.pl +++ b/bin/mozilla/menuv4.pl @@ -44,7 +44,7 @@ use strict; sub display { my $form = $main::form; - $form->header(qq||); + $form->header(extra_code => qq||); $form->{date} = clock_line(); $form->{menu} = acc_menu(); diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 90efb0e64..24540eed8 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -461,8 +461,8 @@ sub form_footer { my $introws = max 2, $form->numtextrows($form->{intnotes}, 35, 8); $rows = max $rows, $introws; - $TMPL_VAR{notes} = qq||; - $TMPL_VAR{intnotes} = qq||; + $TMPL_VAR{notes} = qq||; + $TMPL_VAR{intnotes} = qq||; if (!$form->{taxincluded}) { diff --git a/locale/de/all b/locale/de/all index 5bd9658ae..dde662e34 100644 --- a/locale/de/all +++ b/locale/de/all @@ -331,6 +331,7 @@ $self->{texts} = { 'CSV import: parts and services' => 'CSV-Import: Waren und Dienstleistungen', 'CSV import: shipping addresses' => 'CSV-Import: Lieferadressen', 'Calculate' => 'Berechnen', + 'Calendar' => 'Kalender', 'Can not create that quantity with current stock' => 'Diese Anzahl kann mit dem gegenwärtigen Lagerbestand nicht hergestellt werden.', 'Cancel' => 'Abbrechen', 'Cancel Accounts Payables Transaction' => 'Kreditorenbuchung stornieren', @@ -418,7 +419,6 @@ $self->{texts} = { 'Copies' => 'Kopien', 'Correct taxkey' => 'Richtiger Steuerschlüssel', 'Corrections' => 'Korrekturen', - 'Cost Center' => 'Kostenstelle', 'Costs' => 'Kosten', 'Could not copy %s to %s. Reason: %s' => 'Die Datei "%s" konnte nicht nach "%s" kopiert werden. Grund: %s', 'Could not open the file users/members.' => 'Die Datei "users/members" konnte nicht geöffnet werden.', @@ -1397,7 +1397,6 @@ $self->{texts} = { 'Problem' => 'Problem', 'Produce Assembly' => 'Erzeugnis fertigen', 'Productivity' => 'Produktivität', - 'Profit Center' => 'Erfolgsbereich', 'Profit determination' => 'Gewinnermittlung', 'Proforma Invoice' => 'Proformarechnung', 'Program' => 'Programm', @@ -2130,7 +2129,6 @@ $self->{texts} = { 'as at' => 'zum Stand', 'assembly_list' => 'erzeugnisliste', 'back' => 'zurück', - 'balance' => 'Betriebsvermögensvergleich/Bilanzierung', 'bank_collection_payment_list_#1' => 'bankeinzugszahlungsliste_#1', 'bank_transfer_payment_list_#1' => 'ueberweisungszahlungsliste_#1', 'bankaccounts' => 'Bankkonten', @@ -2180,7 +2178,6 @@ $self->{texts} = { 'history' => 'Historie', 'history search engine' => 'Historien Suchmaschine', 'inactive' => 'inaktiv', - 'income' => 'Einnahmen-Überschuss-Rechnung', 'invoice' => 'Rechnung', 'invoice_list' => 'debitorenbuchungsliste', 'lead deleted!' => 'Kundenquelle gelöscht', @@ -2212,8 +2209,6 @@ $self->{texts} = { 'our vendor number at customer' => 'Unsere Lieferanten-Nr. beim Kunden', 'part_list' => 'Warenliste', 'percental' => 'prozentual', - 'periodic' => 'Aufwandsmethode', - 'perpetual' => 'Bestandsmethode', 'pick_list' => 'Sammelliste', 'plural first char' => 'P', 'pos_bilanz' => 'Bilanz', diff --git a/sql/Pg-upgrade2/customer_add_constraints.sql b/sql/Pg-upgrade2/customer_add_constraints.sql index 89ca9d628..65d338645 100644 --- a/sql/Pg-upgrade2/customer_add_constraints.sql +++ b/sql/Pg-upgrade2/customer_add_constraints.sql @@ -4,8 +4,10 @@ -- @charset: utf-8 -- @ignore: 0 --- verwaiste Zahlungsbedingungen vorher entfernen: -update customer set payment_id = NULL where payment_id not in (select id from payment_terms); +-- verwaiste Einträge vorher entfernen +UPDATE customer SET payment_id = NULL WHERE payment_id NOT IN (SELECT id FROM payment_terms); +UPDATE customer SET language_id = NULL WHERE language_id NOT IN (SELECT id FROM language); +UPDATE customer SET business_id = NULL WHERE business_id NOT IN (SELECT id FROM business); ALTER TABLE customer ADD FOREIGN KEY (payment_id) REFERENCES payment_terms (id); ALTER TABLE customer ADD FOREIGN KEY (language_id) REFERENCES language (id); diff --git a/sql/Pg-upgrade2/vendor_add_constraints.sql b/sql/Pg-upgrade2/vendor_add_constraints.sql index 3d3a81657..4439377b3 100644 --- a/sql/Pg-upgrade2/vendor_add_constraints.sql +++ b/sql/Pg-upgrade2/vendor_add_constraints.sql @@ -4,9 +4,10 @@ -- @charset: utf-8 -- @ignore: 0 --- verwaiste Zahlungsbedingungen vorher entfernen -update vendor set payment_id = NULL where payment_id not in (select id from payment_terms); - +-- verwaiste Einträge vorher entfernen +UPDATE vendor SET payment_id = NULL WHERE payment_id NOT IN (SELECT id FROM payment_terms); +UPDATE vendor SET language_id = NULL WHERE language_id NOT IN (SELECT id FROM language); +UPDATE vendor SET business_id = NULL WHERE business_id NOT IN (SELECT id FROM business); ALTER TABLE vendor ADD FOREIGN KEY (payment_id) REFERENCES payment_terms (id); ALTER TABLE vendor ADD FOREIGN KEY (language_id) REFERENCES language (id); diff --git a/templates/webpages/amcvar/render_inputs_block.html b/templates/webpages/amcvar/render_inputs_block.html index 329b94cd8..3f7461cc8 100644 --- a/templates/webpages/amcvar/render_inputs_block.html +++ b/templates/webpages/amcvar/render_inputs_block.html @@ -15,7 +15,7 @@ [%- ELSIF cvar.var.type == 'bool' %] [%- ELSIF cvar.var.type == 'textfield' %] - +[% L.textarea_tag(render_input_blocks__cvar_name, cvar.value, cols=cvar.var.width, rows=cvar.var.height) %] [%- ELSIF cvar.var.type == 'date' %] [%- L.date_tag(render_input_blocks__cvar_name, cvar.value) %] diff --git a/templates/webpages/bp/search.html b/templates/webpages/bp/search.html index d6f01afa1..d8f68002f 100644 --- a/templates/webpages/bp/search.html +++ b/templates/webpages/bp/search.html @@ -53,7 +53,7 @@ [%- END %] [%- IF label.$type.chknumber %] - [% 'Reference Number' | $T8 %] + [% 'Reference' | $T8 %] [% L.input_tag('chknumber', '', size=20) %] [%- END %] diff --git a/templates/webpages/generic/multibox.html b/templates/webpages/generic/multibox.html index 3c24f0597..46a5dd49e 100644 --- a/templates/webpages/generic/multibox.html +++ b/templates/webpages/generic/multibox.html @@ -29,7 +29,7 @@ [%- Multibox__limit = limit != '' ? limit : vclimit != '' ? vclimit : 200 Multibox__show_text = allow_textbox and DATA.size and Multibox__limit < DATA.size ? 1 : 0 - Multibox__id = id != '' ? id : name + Multibox__id = id != '' && id * 1 != id ? id : name Multibox__default = default != '' ? default : $name Multibox__name = (select_name != '' and ! Multibox__show_text) ? select_name : name -%] diff --git a/templates/webpages/oe/form_footer.html b/templates/webpages/oe/form_footer.html index b0ba7fe67..cb449faa1 100644 --- a/templates/webpages/oe/form_footer.html +++ b/templates/webpages/oe/form_footer.html @@ -53,16 +53,19 @@ [% 'Ertrag' | $T8 %] - [% LxERP.format_amount(marge_total, 2) %] + + [% LxERP.format_amount(marge_total, 2) %] + + [% 'Ertrag prozentual' | $T8 %] - [% LxERP.format_amount(marge_percent, 2) %] + + [% LxERP.format_amount(marge_percent, 2) %] + + % - - - [%- END %] @@ -80,7 +83,10 @@ [% tax %] [% 'Total' | $T8 %] - [% LxERP.format_amount(invtotal, 2) %] + [% LxERP.format_amount(invtotal, 2) %] + + + @@ -88,8 +94,6 @@ - -
@@ -172,7 +176,7 @@ - + [% IF vc == 'customer' %] [% ELSE %] @@ -181,5 +185,17 @@ + + diff --git a/templates/webpages/oe/form_header.html b/templates/webpages/oe/form_header.html index 20c25ce89..5ec0db5ca 100644 --- a/templates/webpages/oe/form_header.html +++ b/templates/webpages/oe/form_header.html @@ -27,12 +27,11 @@ -
[% title %]
+

[% title %]

[%- INCLUDE 'common/flash.html' %] - - - diff --git a/templates/webpages/oe/sales_order.html b/templates/webpages/oe/sales_order.html index 884e4e0c7..c16dc1118 100644 --- a/templates/webpages/oe/sales_order.html +++ b/templates/webpages/oe/sales_order.html @@ -5,7 +5,7 @@ + + +
@@ -106,7 +105,6 @@ [%- END %] - [%- IF currencies %] @@ -234,15 +232,3 @@
[% 'Currency' | $T8 %]
@@ -18,16 +18,20 @@ [%- FOREACH row = ROWS %] [%- FOREACH row1 = row.ROW1 %] - + [% row1.value %] [%- END %] + + + + +
[% row1.value %]
[%- FOREACH hidden = row.HIDDENS %] - [% hidden.value %] + [% hidden.value %] [%- END %] -
[%- FOREACH row2 = row.ROW2 %] - [%- IF row2.line_break %]
[%- END %] + [%- IF row2.line_break %]
[%- END %] [%- IF row2.cvar %] [% row2.description %] [% PROCESS cvar_inputs cvar = row2.render_options %] @@ -42,6 +46,10 @@
+