]> wagnertech.de Git - mfinanz.git/commitdiff
Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
authorSven Schöling <s.schoeling@linet-services.de>
Wed, 25 Jan 2012 12:41:10 +0000 (13:41 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Wed, 25 Jan 2012 12:41:10 +0000 (13:41 +0100)
SL/CVar.pm
SL/GL.pm
SL/RP.pm
locale/de/all
templates/webpages/rp/report.html

index 1b83121bf0340584968cbfdbd90445da4576ba6b..6d04f35a9ed0029f6920f2d44754c063ba7068e8 100644 (file)
@@ -357,7 +357,7 @@ sub save_custom_variables {
 
   $sth->finish();
 
-  $dbh->commit();
+  $dbh->commit() unless $params{dbh};
 
   $main::lxdebug->leave_sub();
 }
@@ -658,7 +658,7 @@ sub save_custom_variables_validity {
 
   $sth->finish();
 
-  $dbh->commit();
+  $dbh->commit() unless $params{dbh};
 
   $main::lxdebug->leave_sub();
 }
@@ -721,7 +721,7 @@ sub format_to_template {
   # stupid template expects everything formated. except objects
   # do not use outside of print routines for legacy templates
 
-  return $::form->parse_amount(\%::myconfig, $value) if $config->{type} eq 'number';
+  return $::form->format_amount(\%::myconfig, $value) if $config->{type} eq 'number';
   return $value->to_lxoffice if $config->{type} eq 'date' && blessed $value && $value->can('to_lxoffice');
   return $value;
 }
index e1cb7bc5bb7e8070f8bee4e100d8bcfee8775978..f538bc3590f191957ea286c2d402914c9145cbe8 100644 (file)
--- a/SL/GL.pm
+++ b/SL/GL.pm
@@ -720,7 +720,7 @@ sub storno {
   $storno_row->{storno}    = 't';
   $storno_row->{reference} = 'Storno-' . $storno_row->{reference};
 
-  delete @$storno_row{qw(itime mtime)};
+  delete @$storno_row{qw(itime mtime gldate)};
 
   $query = sprintf 'INSERT INTO gl (%s) VALUES (%s)', join(', ', keys %$storno_row), join(', ', map '?', values %$storno_row);
   do_query($form, $dbh, $query, (values %$storno_row));
@@ -733,7 +733,7 @@ sub storno {
   my $rowref = selectall_hashref_query($form, $dbh, $query, $id);
 
   for my $row (@$rowref) {
-    delete @$row{qw(itime mtime acc_trans_id)};
+    delete @$row{qw(itime mtime acc_trans_id gldate)};
     $query = sprintf 'INSERT INTO acc_trans (%s) VALUES (%s)', join(', ', keys %$row), join(', ', map '?', values %$row);
     $row->{trans_id}   = $new_id;
     $row->{amount}    *= -1;
index f98d47561b002ce250850a4a24b0b9ef28c1a39a..abf95beeb29b3d2898b98f5691c412277b4f46b6 100644 (file)
--- a/SL/RP.pm
+++ b/SL/RP.pm
@@ -211,6 +211,13 @@ sub get_accounts {
 
   $sth->finish;
 
+  # if l_ob is selected l_cb is always ignored
+  if ( $form->{l_ob} ) {
+    $where .= ' AND ob_transaction is true  ' 
+  } elsif ( not $form->{l_cb} ) {
+    $where .= ' AND cb_transaction is false ';
+  };
+
   if ($fromdate) {
     $fromdate = conv_dateq($fromdate);
     if ($form->{method} eq 'cash') {
@@ -464,6 +471,8 @@ sub get_accounts_g {
   my $inwhere = "";
   my $item;
 
+  $where .= ' AND cb_transaction is false ' unless $form->{l_cb};
+
   if ($fromdate) {
     $fromdate = conv_dateq($fromdate);
     if ($form->{method} eq 'cash') {
index b10da890d4f63b1b5cccf781a2773c9eb31b854a..8b5a094829b554075b744762f2a3ed4d2f2547c3 100644 (file)
@@ -311,6 +311,7 @@ $self->{texts} = {
   'Businesses'                  => 'Kunden-/Lieferantentypen',
   'CANCELED'                    => 'Storniert',
   'CB Transaction'              => 'SB-Buchung',
+  'CB Transactions'             => 'SB-Buchungen',
   'CR'                          => 'H',
   'CRM admin'                   => 'Administration',
   'CRM create customers, vendors and contacts' => 'Erfassen (Kunden, Lieferanten, Personen)',
@@ -2227,6 +2228,7 @@ $self->{texts} = {
   'not yet executed'            => 'Noch nicht ausgeführt',
   'number'                      => 'Nummer',
   'oe.pl::search called with unknown type' => 'oe.pl::search mit unbekanntem Typ aufgerufen',
+  'only OB Transactions'        => 'nur EB-Buchungen',
   'open'                        => 'Offen',
   'order'                       => 'Reihenfolge',
   'our vendor number at customer' => 'Unsere Lieferanten-Nr. beim Kunden',
index 934bf8912b0b233ae95f4a6007e798c6f45e9e03..6f9583ecdffba3c890a7c1bb44340c98f5f53f5c 100644 (file)
@@ -60,7 +60,7 @@
 [%- END %]
 [%- BLOCK cash_or_accrual %]
   <tr>
-    <th align=leftt>[% 'Method' | $T8 %]</th>
+    <th align=left>[% 'Method' | $T8 %]</th>
     <td colspan=3>
       [% L.radio_button_tag('method', value='accrual', checked=accrual, label=LxERP.t8('Accrual')) %]
       [% L.radio_button_tag('method', value='cash', checked=cash, label=LxERP.t8('EUR')) %]
 <table>
 [%- PROCESS customized_report %]
 [%- PROCESS cash_or_accrual %]
+  <tr>
+    <th align=left nowrap>[% 'Include in Report' | $T8 %]</th>
+    <td><input name=l_cb class=checkbox type=checkbox value=Y>&nbsp;[% 'CB Transactions' | $T8 %]</td>
+  </tr>
 [%- END %]
 
 [%- IF is_bwa %]
     <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;[% 'Subtotal' | $T8 %]
     <input name=l_accno class=checkbox type=checkbox value=Y>&nbsp;[% 'Account Number' | $T8 %]</td>
   </tr>
+  <tr>
+    <th></th>
+    <td><input name=l_cb class=checkbox type=checkbox value=Y>&nbsp;[% 'CB Transactions' | $T8 %]
+    <input name=l_ob class=checkbox type=checkbox value=Y>&nbsp;[% 'only OB Transactions' | $T8 %]</td>
+  </tr>
 [%- END %]
 
 [%- IF is_trial_balance %]