$sth->finish;
+ # filter for opening and closing bookings
# if l_ob is selected l_cb is always ignored
- if ( $form->{l_ob} ) {
- $where .= ' AND ac.ob_transaction is true '
- } elsif ( not $form->{l_cb} ) {
- $where .= ' AND ac.cb_transaction is false ';
+ if ( $last_period ) {
+ # ob/cb-settings for "as of" balance
+ if ( $form->{l_ob_compared} ) {
+ $where .= ' AND ac.ob_transaction is true '
+ } elsif ( not $form->{l_cb_compared} ) {
+ $where .= ' AND ac.cb_transaction is false ';
+ };
+ } else {
+ # ob/cb-settings for "compared to" balance
+ if ( $form->{l_ob} ) {
+ $where .= ' AND ac.ob_transaction is true '
+ } elsif ( not $form->{l_cb} ) {
+ $where .= ' AND ac.cb_transaction is false ';
+ };
};
+
if ($fromdate) {
$fromdate = conv_dateq($fromdate);
if ($form->{method} eq 'cash') {
<tr>
<th align=right>[% 'as at' | $T8 %]</th>
<td> [% L.date_tag('asofdate', asofdate) %]</td>
+ <td><input name=l_cb class=checkbox type=checkbox value=Y> [% 'CB Transactions' | $T8 %]</td>
+ <td><input name=l_ob class=checkbox type=checkbox value=Y> [% 'only OB Transactions' | $T8 %]</td>
+ </tr>
+ </tr>
<th align=right nowrap>[% 'Compare to' | $T8 %]</th>
<td>[% L.date_tag('compareasofdate', compareasofdate) %]</td>
+ <td><input name=l_cb_compared class=checkbox type=checkbox value=Y> [% 'CB Transactions' | $T8 %]</td>
+ <td><input name=l_ob_compared class=checkbox type=checkbox value=Y> [% 'only OB Transactions' | $T8 %]</td>
</tr>
<tr>
<th align=right>[% 'Decimalplaces' | $T8 %]</th>
<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 %]