From: Bernd Blessmann Date: Wed, 11 Jan 2012 14:44:08 +0000 (+0100) Subject: Merge branch 'master' of vc.linet-services.de:public/lx-office-erp X-Git-Tag: release-2.7.0beta1~61^2~1 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/73be6af449d872825d1fbdffe536b9061ca649c8?hp=540030ff9826439d94f3f4292ab79b9be8795acc Merge branch 'master' of vc.linet-services.de:public/lx-office-erp --- diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 6ed1e4c44..f4f87cc8f 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -1312,6 +1312,7 @@ sub post_transaction { my $debitcount = 0; my $creditcount = 0; my $debitcredit; + my %split_safety = (); my @flds = qw(accno debit credit projectnumber fx_transaction source memo tax taxchart); @@ -1325,6 +1326,9 @@ sub post_transaction { push @a, {}; $debitcredit = ($form->{"debit_$i"} == 0) ? "0" : "1"; + $split_safety{ $form->{"debit_$i"} <=> 0 }++; + $split_safety{ - $form->{"credit_$i"} <=> 0 }++; + if ($debitcredit) { $debitcount++; } else { @@ -1388,6 +1392,10 @@ sub post_transaction { $count++; } + if ($split_safety{-1} > 1 && $split_safety{1} > 1) { + $::form->error($::locale->text("Split entry detected. The values you have entered will result in an entry with more than one position on both debit and credit. Due to known problems involving accounting software Lx-Office does not allow these.")); + } + for my $i (1 .. $count) { my $j = $i - 1; for (@flds) { $form->{"${_}_$i"} = $a[$j]->{$_} } diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 489a6d936..bcbf10782 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -387,7 +387,6 @@ sub form_footer { $main::auth->assert('invoice_edit'); $form->{invtotal} = $form->{invsubtotal}; - $form->{oldinvtotal} = $form->{invtotal}; # note rows $form->{rows} = max 2, @@ -447,6 +446,8 @@ sub form_footer { $totalpaid += $form->{"paid_$i"}; } + $form->{oldinvtotal} = $form->{invtotal}; + print $form->parse_html_template('is/form_footer', { is_type_credit_note => ($form->{type} eq "credit_note"), totalpaid => $totalpaid, diff --git a/bin/mozilla/menuv4.pl b/bin/mozilla/menuv4.pl index e9e7ac499..25d7d792c 100644 --- a/bin/mozilla/menuv4.pl +++ b/bin/mozilla/menuv4.pl @@ -126,7 +126,7 @@ sub print_menu { my $h = print_menu($menu, "${parent}${item}", $depth * 1 + 1)."\n"; if (!$parent) { - $html .= qq|\n|; + $html .= qq|\n|; } else { $html .= qq|
  • ${menu_text}
  • \n|; } diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index aaf47ff5f..a339cd41a 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -644,7 +644,7 @@ sub generate_trial_balance { my @options; - $form->{template_fromto} = $locale->date(\%myconfig, $form->{fromdate}, 0) . "  -  " . $locale->date(\%myconfig, $form->{todate}, 0); + $form->{template_fromto} = $locale->date(\%myconfig, $form->{fromdate}, 0) . " - " . $locale->date(\%myconfig, $form->{todate}, 0); $form->{print_date} = $locale->text('Create Date') . " " . $locale->date(\%myconfig, $form->current_date(\%myconfig), 0); push (@options, $form->{print_date}); @@ -655,6 +655,28 @@ sub generate_trial_balance { $form->{template_to} = $locale->date(\%myconfig, $form->{todate}, 0); + my @custom_headers = ([ + { text => $::locale->text('Account'), rowspan => 2, }, + { text => $::locale->text('Description'), rowspan => 2, }, + { text => $::locale->text('Last Transaction'), rowspan => 2, }, + { text => $::locale->text('Starting Balance'), colspan => 2, }, + { text => $::locale->text('Sum for') . " $form->{template_fromto}", colspan => 2, }, + { text => $::locale->text('Sum per') . " $form->{template_to}", colspan => 2, }, + { text => $::locale->text('Saldo per') . " $form->{template_to}", colspan => 2, }, + ], [ + { text => '', }, + { text => '', }, + { text => '', }, + { text => $::locale->text('Assets'), }, + { text => $::locale->text('Equity'), }, + { text => $::locale->text('Debit'), }, + { text => $::locale->text('Credit'), }, + { text => $::locale->text('Debit'), }, + { text => $::locale->text('Credit'), }, + { text => $::locale->text('Debit'), }, + { text => $::locale->text('Credit'), }, + ]); + $report->set_options('output_format' => 'HTML', 'top_info_text' => join("\n", @options), 'title' => $form->{title}, @@ -662,6 +684,7 @@ sub generate_trial_balance { 'html_template' => 'rp/html_report_susa', 'pdf_template' => 'rp/html_report_susa', ); + $report->set_custom_headers(@custom_headers); $report->set_options_from_form(); $locale->set_numberformat_wo_thousands_separator(\%myconfig) if lc($report->{options}->{output_format}) eq 'csv'; diff --git a/css/menuv4.css b/css/menuv4.css index 2fdd7cebe..b59efc264 100644 --- a/css/menuv4.css +++ b/css/menuv4.css @@ -26,11 +26,11 @@ padding:1px 0 1px 3px; content:" "; } #menu h2:after { - content:" "; + content:" "; } #menu h2 { color:#fff; -padding:2 15px +padding:2px 10px; } #menu a, #menu a:visited, #menu div.x, #menu div.x:visited { diff --git a/locale/de/all b/locale/de/all index 9e3ba9eae..a78038734 100644 --- a/locale/de/all +++ b/locale/de/all @@ -1635,6 +1635,7 @@ $self->{texts} = { 'Source bank account' => 'Quellkonto', 'Source bin' => 'Quelllagerplatz', 'Space' => 'Leerzeichen', + 'Split entry detected. The values you have entered will result in an entry with more than one position on both debit and credit. Due to known problems involving accounting software Lx-Office does not allow these.' => 'Splitbuchung! Die eingebenen Werte würden eine Buchung auslösen, die jeweils mehr als eine Position auf Soll und Haben hätte. Um Kompatibilität mit DATEV zu gewährleisten erlaubt Lx-Office keine Splitbuchungen.', 'Spoolfile' => 'Druckdatei', 'Start Dunning Process' => 'Mahnprozess starten', 'Start analysis' => 'Analyse beginnen', diff --git a/sql/Pg-upgrade2/warehouse_alter_chargenumber.sql b/sql/Pg-upgrade2/warehouse_alter_chargenumber.sql new file mode 100644 index 000000000..725e374a7 --- /dev/null +++ b/sql/Pg-upgrade2/warehouse_alter_chargenumber.sql @@ -0,0 +1,8 @@ +-- @tag: warehouse_alter_chargenumber +-- @description: Chargennummber von NULL auf '' aktualisieren +-- @depends: release_2_6_3 +-- @charset: utf-8 +UPDATE inventory set chargenumber='' where chargenumber IS NULL; +ALTER TABLE inventory ALTER COLUMN chargenumber SET NOT NULL; +ALTER TABLE inventory ALTER COLUMN chargenumber SET default ''; +