$sth->finish();
- $dbh->commit();
+ $dbh->commit() unless $params{dbh};
$main::lxdebug->leave_sub();
}
$sth->finish();
- $dbh->commit();
+ $dbh->commit() unless $params{dbh};
$main::lxdebug->leave_sub();
}
# 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;
}
$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));
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;
$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') {
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') {
'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)',
'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',
[%- 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> [% 'CB Transactions' | $T8 %]</td>
+ </tr>
[%- END %]
[%- IF is_bwa %]
<input name=l_subtotal class=checkbox type=checkbox value=Y> [% 'Subtotal' | $T8 %]
<input name=l_accno class=checkbox type=checkbox value=Y> [% 'Account Number' | $T8 %]</td>
</tr>
+ <tr>
+ <th></th>
+ <td><input name=l_cb class=checkbox type=checkbox value=Y> [% 'CB Transactions' | $T8 %]
+ <input name=l_ob class=checkbox type=checkbox value=Y> [% 'only OB Transactions' | $T8 %]</td>
+ </tr>
[%- END %]
[%- IF is_trial_balance %]