X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/587c7468815169f69621cf374fe455d7b7694eeb..de8868c:/SL/RP.pm diff --git a/SL/RP.pm b/SL/RP.pm index 113e9dd42..49dbff603 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -1219,7 +1219,7 @@ sub aging { phone as customerphone, fax as customerfax, ${ct}number, "invnumber", "transdate", (amount - COALESCE((SELECT sum(amount)*$ml FROM acc_trans LEFT JOIN chart ON (acc_trans.chart_id=chart.id) WHERE link ilike '%paid%' AND acc_trans.trans_id=${arap}.id AND acc_trans.transdate <= (date $todate)),0)) as "open", "amount", - "duedate", invoice, ${arap}.id, + "duedate", invoice, ${arap}.id, date_part('days', now() - duedate) as overduedays, (SELECT $buysell FROM exchangerate WHERE (${arap}.curr = exchangerate.curr)