Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
authorBernd Blessmann <bibi@online.de>
Wed, 11 Jan 2012 14:44:08 +0000 (15:44 +0100)
committerBernd Blessmann <bibi@online.de>
Wed, 11 Jan 2012 14:44:08 +0000 (15:44 +0100)
bin/mozilla/gl.pl
bin/mozilla/is.pl
bin/mozilla/menuv4.pl
bin/mozilla/rp.pl
css/menuv4.css
locale/de/all
sql/Pg-upgrade2/warehouse_alter_chargenumber.sql [new file with mode: 0644]

index 6ed1e4c..f4f87cc 100644 (file)
@@ -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]->{$_} }
index 489a6d9..bcbf107 100644 (file)
@@ -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,
index e9e7ac4..25d7d79 100644 (file)
@@ -126,7 +126,7 @@ sub print_menu {
 
       my $h = print_menu($menu, "${parent}${item}", $depth * 1 + 1)."\n";
       if (!$parent) {
-        $html .= qq|<ul><li><h2>${menu_text}</h2><ul>${h}</ul></li></ul>\n|;
+        $html .= qq|<ul><li><h2> ${menu_text} </h2><ul>${h}</ul></li></ul>\n|;
       } else {
         $html .= qq|<li><div class="x">${menu_text}</div><ul>${h}</ul></li>\n|;
       }
index aaf47ff..a339cd4 100644 (file)
@@ -644,7 +644,7 @@ sub generate_trial_balance {
   my @options;
 
 
-  $form->{template_fromto} = $locale->date(\%myconfig, $form->{fromdate}, 0) . "&nbsp; - &nbsp;" . $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';
 
index 2fdd7ce..b59efc2 100644 (file)
@@ -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 {
index 9e3ba9e..a780387 100644 (file)
@@ -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 (file)
index 0000000..725e374
--- /dev/null
@@ -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 '';
+