$form->{"86r"} = $form->{"861"};
$form->{"97r"} = $form->{"971"};
$form->{"93r"} = $form->{"931"};
- $form->{"Z43"} = $form->{"51r"}+ $form->{"86r"} +
+ $form->{"Z43"} = $form->{"511"}+ $form->{"861"} +
$form->{"36"} + $form->{"80"} +
- $form->{"97r"}+ $form->{"93r"} +
+ $form->{"971"}+ $form->{"931"} +
$form->{"96"} + $form->{"98"};
$form->{"Z45"} = $form->{"Z43"};
$form->{"Z53"} = $form->{"Z43"};
my $glwhere = "";
my $subwhere = "";
my $ARwhere = "";
+ my $arwhere = "";
my $item;
if ($fromdate) {
$glwhere = " AND ac.transdate >= '$fromdate'";
$ARwhere .= " AND acc.transdate >= '$fromdate'";
$where .= " AND ac.transdate >= '$fromdate'";
+
}
}
if ($todate) {
$where .= " AND ac.transdate <= '$todate'";
$ARwhere .= " AND acc.transdate <= '$todate'";
- $arwhere .= " AND ac.transdate <= '$todate'";
$subwhere .= " AND transdate <= '$todate'";
}
c.pos_ustva
FROM acc_trans ac
JOIN chart c ON (c.id = ac.chart_id)
- JOIN ar ON (ar.id = ac.trans_id)
+ --JOIN ar ON (ar.id = ac.trans_id)
where
1=1
- $arwhere
+ -- Here no where, please. All Transactions ever should be
+ -- testet if they are paied in the USTVA report period.
GROUP BY c.pos_ustva
UNION
SELECT trans_id
FROM acc_trans
JOIN chart ON (chart_id = id)
- WHERE link LIKE '%AP_paid%'
+ WHERE link LIKE '%AP_amount%'
$subwhere
)