[Koha-devel] Doubt in Koha Database Schema

Michael Hafen michael.hafen at washk12.org
Fri Jun 21 18:27:17 CEST 2019


My guess is that code was looking for outstanding fines rather than account
balance.

On Thu, Jun 20, 2019 at 9:57 PM RAGHAV ARORA <
f20171016 at pilani.bits-pilani.ac.in> wrote:

> Ok sir, thanks for the clarification.
>
> One last thing, if I need to see the total fine of a patron, I will take
> sum of all the amountoutstanding for that borrowernumber, right?
> At some place I found someone to be taking sum of only the positive
> amountoutstanding, and ignoring the negative amountoutstandings. I couldn't
> understand why.
>
> Regards
> *Raghav Arora*
> Sophomore, M.Sc (Hons) Chemistry BE Electrical and Electronics Engineering
> Contact : (+91) 9897597761
> Personal Email <raghavarora999 at yahoo.in> | University Email
> <f20171016 at pilani.bits-pilani.ac.in>
> LinkedIn <https://www.linkedin.com/in/raghav-arora-9820a648/> |  GitHub
> <https://github.com/RAraghavarora/>
>
>
>
> On Thu, Jun 20, 2019 at 10:21 PM Michael Hafen <michael.hafen at washk12.org>
> wrote:
>
>> So that you know what the original amount of the fine is/was.  This is
>> especially useful in an ongoing overdue fine, for example.  The patron may
>> have some, but still has the book.  So the script can look at what the fine
>> is supposed to be, and what it was last time the script ran (the amount
>> column) then add the difference to both the amount and amountoutstanding
>> columns. (Since we can't guarantee that the script is run once, and only
>> once, a day.)
>>
>> On Thu, Jun 20, 2019 at 3:05 AM RAGHAV ARORA <
>> f20171016 at pilani.bits-pilani.ac.in> wrote:
>>
>>> Thank you sir,
>>>
>>> Can you please help me understand these tables?
>>> What is the purpose of the 2 tables 'accountlines' and 'account_offsets'?
>>>
>>> account_offsets is a child of accountlines, which allows 1 accountlines
>>> row to have multiple account_offsets, and the 'account_offsets.amount' is
>>> the total amount debited/credited. What exactly is the
>>> 'amountlines.amount'?
>>> In my database, there is an accountlines row which has 3 account_offsets
>>> rows linked, 2 of them credit $5, and 1 debits $10, making the
>>> amountoutstanding=0, which is expected. But accountlines.amount stores 10.
>>> Why is that so?
>>>
>>> Thanks in advance
>>> Regards
>>> *Raghav Arora*
>>> Sophomore, M.Sc (Hons) Chemistry BE Electrical and Electronics
>>> Engineering
>>> Contact : (+91) 8474975691
>>> Personal Email <raghavarora999 at yahoo.in> | University Email
>>> <f20171016 at pilani.bits-pilani.ac.in>
>>> LinkedIn <https://www.linkedin.com/in/raghav-arora-9820a648/> |  GitHub
>>> <https://github.com/RAraghavarora/>
>>>
>>> ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
>>> *Birla Institute of Technology and Science, Pilani*
>>> Pilani campus,
>>> Rajasthan-333031
>>>
>>>
>>> On Wed, Jun 19, 2019 at 10:25 PM Michael Hafen <
>>> michael.hafen at washk12.org> wrote:
>>>
>>>> Amount is the original amount of the fine/invoice, and
>>>> amountoutstanding is the remaining amount after receiving / sending some
>>>> sort of payment.  There should be another row in that table, and a link in
>>>> the accountoffsets table, of those two columns aren't the same, but that's
>>>> probably more than you wanted to know.
>>>>
>>>> On Wed, Jun 19, 2019 at 5:13 AM RAGHAV ARORA <
>>>> f20171016 at pilani.bits-pilani.ac.in> wrote:
>>>>
>>>>> Hello everyone,
>>>>>
>>>>> I am currently working on a project on Reports Management and Decision
>>>>> Support System for my institute library that uses Koha as it's ILS. I have
>>>>> a doubt in understanding what is the difference between the fields
>>>>> 'accountlines.amount' and 'accountlines.amountoutstanding'?
>>>>>
>>>>> Could someone help me out with this?
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>> Regards
>>>>> *Raghav Arora*
>>>>> Sophomore, M.Sc (Hons) Chemistry BE Electrical and Electronics
>>>>> Engineering
>>>>> Contact : (+91) 9897597761
>>>>> Personal Email <raghavarora999 at yahoo.in> | University Email
>>>>> <f20171016 at pilani.bits-pilani.ac.in>
>>>>> LinkedIn <https://www.linkedin.com/in/raghav-arora-9820a648/> |
>>>>> GitHub <https://github.com/RAraghavarora/>
>>>>>
>>>>> ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
>>>>> *Birla Institute of Technology and Science, Pilani*
>>>>> Pilani campus,
>>>>> Rajasthan-333031
>>>>> _______________________________________________
>>>>> Koha-devel mailing list
>>>>> Koha-devel at lists.koha-community.org
>>>>> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
>>>>> website : http://www.koha-community.org/
>>>>> git : http://git.koha-community.org/
>>>>> bugs : http://bugs.koha-community.org/
>>>>
>>>>
>>>>
>>>> --
>>>> Michael Hafen
>>>> Washington County School District Technology Department
>>>> Systems Analyst
>>>>
>>>>
>>
>> --
>> Michael Hafen
>> Washington County School District Technology Department
>> Systems Analyst
>>
>>

-- 
Michael Hafen
Washington County School District Technology Department
Systems Analyst
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20190621/26a4aaf4/attachment.html>


More information about the Koha-devel mailing list