X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/33ddf79cc8c6a43ed1661a1f04002d62cdf264eb..a9d9ca02abd3a0ff1e43f23888142266174bec55:/SL/RP.pm diff --git a/SL/RP.pm b/SL/RP.pm index 80e83d569..28d01af19 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -1296,7 +1296,7 @@ sub aging { SELECT ${ct}.id AS ctid, ${ct}.name, street, zipcode, city, country, contact, email, phone as customerphone, fax as customerfax, ${ct}number, - "invnumber", "transdate", + "invnumber", "transdate", "type", (amount - COALESCE((SELECT sum(amount)*$ml FROM acc_trans WHERE chart_link ilike '%paid%' AND acc_trans.trans_id=${arap}.id AND acc_trans.transdate <= (date $todate)),0)) as "open", "amount", "duedate", invoice, ${arap}.id, date_part('days', now() - duedate) as overduedays, datepaid, (amount - paid) as current_open, (SELECT $buysell