Hi.

Pls. try following sql statement for payment & writeoff

writeoff in a month date wise

SELECT borrowers.borrowernumber, borrowers.cardnumber, accountlines.amount, accountlines.date

FROM accountlines, borrowers WHERE borrowers.borrowernumber = accountlines.borrowernumber AND accounttype = 'W' AND MONTH(date) = 11 AND YEAR(date)= 2011

Payment in a month date wise

SELECT borrowers.borrowernumber, borrowers.cardnumber, accountlines.amount, accountlines.date

FROM accountlines, borrowers WHERE borrowers.borrowernumber = accountlines.borrowernumber AND accounttype = 'pay' AND MONTH(date) = 11 AND YEAR(date)= 2011


Nikunj Tyagi

DPL


 



Message: 3
Date: Wed, 30 Nov 2011 15:39:56 +0530
From: Richa Srivastava <richa.srivastava36@gmail.com>
To: koha@lists.katipo.co.nz
Subject: [Koha] SQL Report generation for fines - payment, writeoff
Message-ID:
       <CAHBnVBfV1W=Ji938uO_MkDh_+UBwiN=QpY0iOoyyGmeKj79Haw@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi

It seems while updating the fine payment , itemnumber becomes null in
accountlines table. please help how to calculate fines paid and writeoff
amount for a range of date through sql reports module.

--

Best wishes
???
Richa Srivastava
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.katipo.co.nz/pipermail/koha/attachments/20111130/8ad00546/attachment-0001.html>

------------------------------