Where to set exemption from rental charges

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Where to set exemption from rental charges

Joann Ransom-2
Hi there,

I have set up my parametres etc, including circulation rules, but I
can't seem to find a place to say which borrower categories are exempt
from paying which rental charges (ie by item types).

For example, Patrons with category set to "Deaf" do not have to pay
rental charges for item types = "DVD" but everyone else does.

Thanks for help,

cheers Jo.

_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha

jransom.vcf (303 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Where to set exemption from rental charges

Lino Tremblay
Hello Joann,

It may look too simple, but did you try to create two rules, one
"everybody has to pay X $ for a DVD", and one "Deaf has to pay 0$ for a
DVD"?


Lino


Joann Ransom a écrit :

> Hi there,
>
> I have set up my parametres etc, including circulation rules, but I
> can't seem to find a place to say which borrower categories are exempt
> from paying which rental charges (ie by item types).
>
> For example, Patrons with category set to "Deaf" do not have to pay
> rental charges for item types = "DVD" but everyone else does.
>
> Thanks for help,
>
> cheers Jo.
> _______________________________________________
> Koha mailing list
> [hidden email]
> http://lists.katipo.co.nz/mailman/listinfo/koha
>  

--
Lino Tremblay, bibliothécaire
Cégep de Sainte-Foy
2410, chemin Sainte-Foy
Québec, Québec
Canada G1V 1T3
Tél.: 418 659-6600, poste 3865
Fax: 418 659-4563

_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: Where to set exemption from rental charges

Jesse Weaver-2


On Fri, Dec 12, 2008 at 7:54 AM, Lino Tremblay <[hidden email]> wrote:
Hello Joann,

It may look too simple, but did you try to create two rules, one
"everybody has to pay X $ for a DVD", and one "Deaf has to pay 0$ for a
DVD"?


Lino


Joann Ransom a écrit :
> Hi there,
>
> I have set up my parametres etc, including circulation rules, but I
> can't seem to find a place to say which borrower categories are exempt
> from paying which rental charges (ie by item types).
>
> For example, Patrons with category set to "Deaf" do not have to pay
> rental charges for item types = "DVD" but everyone else does.
>
> Thanks for help,
>
> cheers Jo.
> _______________________________________________
> Koha mailing list
> [hidden email]
> http://lists.katipo.co.nz/mailman/listinfo/koha
>

--
Lino Tremblay, bibliothécaire
Cégep de Sainte-Foy
2410, chemin Sainte-Foy
Québec, Québec
Canada G1V 1T3
Tél.: 418 659-6600, poste 3865
Fax: 418 659-4563

_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha

Unfortunately, Koha does not support this yet; rental charges can only be set at the itemtype level.

--
Jesse Weaver
Software Developer, LibLime

_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: Where to set exemption from rental charges

Joann Ransom-2
Hi Jesse,

I don't know what you mean by it was there already or someone put it there. It has been part of Koha since we commissioned Chris Cormack to write Koha back in 2000. It is not a new feature.

Cheers Jo.

On Sun, Dec 14, 2008 at 8:52 AM, Jesse Weaver <[hidden email]> wrote:


On Fri, Dec 12, 2008 at 1:49 PM, Joann Ransom <[hidden email]> wrote:
Bum! We currently have this in 2.2.9... Can we make it so in 3.0 by throwing money at it? Should be a minor fix to the circulation rules setup: just add another colume where you enter % discount on rental charges.

cheers Jo.


On Sat, Dec 13, 2008 at 5:50 AM, Jesse Weaver <[hidden email]> wrote:




Joann Ransom a écrit :
> Hi there,
>
> I have set up my parametres etc, including circulation rules, but I
> can't seem to find a place to say which borrower categories are exempt
> from paying which rental charges (ie by item types).
>
> For example, Patrons with category set to "Deaf" do not have to pay
> rental charges for item types = "DVD" but everyone else does.
>
> Thanks for help,
>
> cheers Jo.
> _______________________________________________
> Koha mailing list
> [hidden email]
> http://lists.katipo.co.nz/mailman/listinfo/koha
>

--
Lino Tremblay, bibliothécaire
Cégep de Sainte-Foy
2410, chemin Sainte-Foy
Québec, Québec
Canada G1V 1T3
Tél.: 418 659-6600, poste 3865
Fax: 418 659-4563

_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha

Unfortunately, Koha does not support this yet; rental charges can only be set at the itemtype level.

--
Jesse Weaver
Software Developer, LibLime


Well, it'll involve changes to some of the code, so it'll be a _little_ more complicated than that. By "we have this in 2.2.9", do you mean that it was there already, or someone added it for you?

--
Jesse Weaver
Software Developer, LibLime


_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: Where to set exemption from rental charges

Chris Cormack-6
On Sun, Dec 14, 2008 at 1:49 PM, Joann Ransom <[hidden email]> wrote:
> Hi Jesse,
>
> I don't know what you mean by it was there already or someone put it there.
> It has been part of Koha since we commissioned Chris Cormack to write Koha
> back in 2000. It is not a new feature.
>
Yep, it seemed it survived the transition from categoryitem to issuingrules,

From git
CREATE TABLE categoryitem (
  categorycode char(2) DEFAULT '' NOT NULL,
  itemtype varchar(4) DEFAULT '' NOT NULL,
  restrictedtype tinyint(1),
  rentaldiscount decimal(28,6),
  reservecharge decimal(28,6),
  fine decimal(28,6),
  firstremind int(11),
  chargeperiod int(11),
  accountsent int(11),
  chargename varchar(100)
);

That was the old categoryitem table,  (from the database.mysql file
2002-06-22) .

And I just checked issuingrules, the column is still there,

CREATE TABLE `issuingrules` (
  `categorycode` varchar(10) NOT NULL default '',
  `itemtype` varchar(10) NOT NULL default '',
  `restrictedtype` tinyint(1) default NULL,
  `rentaldiscount` decimal(28,6) default NULL,
  `reservecharge` decimal(28,6) default NULL,
  `fine` decimal(28,6) default NULL,
  `firstremind` int(11) default NULL,
  `chargeperiod` int(11) default NULL,
  `accountsent` int(11) default NULL,
  `chargename` varchar(100) default NULL,
  `maxissueqty` int(4) default NULL,
  `issuelength` int(4) default NULL,
  `branchcode` varchar(10) NOT NULL default '',
  PRIMARY KEY  (`branchcode`,`categorycode`,`itemtype`),
  KEY `categorycode` (`categorycode`),
  KEY `itemtype` (`itemtype`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

So it might be just the code is no longer respecting it.

Chris
_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: Where to set exemption from rental charges

Joe Atzberger
In reply to this post by Joann Ransom-2
All --

If this were a question about overdue fines, there would be nothing preventing this kind of rule from being expressed in the current structure under "Circulation and fines rules", as Lino suggests.  But Joann is not asking about an overdue fine.  She is talking about a rental charge, specified under "Item types and circulation codes".  The itemtype logic does not break out into pieces like the circ/fine rules.

The idea of a percent discount is the part that does not exist in any version of Koha that I have seen.  It would add a level of complexity inasmuch as the logic has to retrieve and synthesize two rules to get the correct result.  But Jesse is correct that % off rental charge could be implemented as a single additional field.  This %-off other overdue fine would be more complicated I think.

--Joe

On Fri, Dec 12, 2008 at 12:40 AM, Joann Ransom <[hidden email]> wrote:
Hi there,

I have set up my parametres etc, including circulation rules, but I can't seem to find a place to say which borrower categories are exempt from paying which rental charges (ie by item types).

For example, Patrons with category set to "Deaf" do not have to pay rental charges for item types = "DVD" but everyone else does.

Thanks for help,

cheers Jo.


_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: Where to set exemption from rental charges

Chris Cormack-6
On Sun, Dec 14, 2008 at 2:19 PM, Joe Atzberger <[hidden email]> wrote:

> All --
>
> If this were a question about overdue fines, there would be nothing
> preventing this kind of rule from being expressed in the current structure
> under "Circulation and fines rules", as Lino suggests.  But Joann is not
> asking about an overdue fine.  She is talking about a rental charge,
> specified under "Item types and circulation codes".  The itemtype logic does
> not break out into pieces like the circ/fine rules.
>
> The idea of a percent discount is the part that does not exist in any
> version of Koha that I have seen.  It would add a level of complexity
> inasmuch as the logic has to retrieve and synthesize two rules to get the
> correct result.  But Jesse is correct that % off rental charge could be
> implemented as a single additional field.  This %-off other overdue fine
> would be more complicated I think.
>
Ahh you must have missed seeing some versions of Koha then Joe :)

The rentaldiscount column in categoryitem was used exactly for this purpose.

my $q2 = "select rentaldiscount from borrowers,categoryitem
        where (borrowers.borrowernumber = '$bornum')
        and (borrowers.categorycode = categoryitem.categorycode)
        and (categoryitem.itemtype = '$item_type')";
     my $sth2=$dbh->prepare($q2);
     $sth2->execute;
     if (my $data2=$sth2->fetchrow_hashref) {
        my $discount = $data2->{'rentaldiscount'};
        $charge = ($charge *(100 - $discount)) / 100;

This snippet is from calc_charges in C4::Circulation::Issue, which is
called by issueitem, in the same module. And was still there until at
least 2003-12-08.

Grepping my current git repo, GetIssuingCharges in C4::Circulation
still checks this column

 my $q2 = "SELECT rentaldiscount FROM borrowers
            LEFT JOIN issuingrules ON borrowers.categorycode =
issuingrules.categorycode
            WHERE borrowers.borrowernumber = ?
            AND issuingrules.itemtype = ?";
        my $sth2 = $dbh->prepare($q2);
        $sth2->execute( $borrowernumber, $item_type );
        if ( my $data2 = $sth2->fetchrow_hashref ) {
            my $discount = $data2->{'rentaldiscount'};
            if ( $discount eq 'NULL' ) {
                $discount = 0;
            }
            $charge = ( $charge * ( 100 - $discount ) ) / 100;
        }

So all that may be missing is the interface to edit/add data to this column

Chris
_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: Where to set exemption from rental charges

Joe Atzberger

Ahh you must have missed seeing some versions of Koha then Joe :)

Certainly true, since I have only dealt seriously with Koha for a couple years.  Koha 1 and early 2.x are essentially unknown to me (except for the chunks of code that persist in the current versions). 

--joe



_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: Where to set exemption from rental charges

Joann Ransom-2
In reply to this post by Jesse Weaver-2
Ok - thanks everyone. We will submit a patch to fix this.

Quick description of the fix:

Different patron types can be configured to get a  % discount off the
rental charges:
For example: STAFF will have a 100% discount of all rental charges for
all item types,
BLIND will get 100% discount of rental charges for Talking Books,
DEAF will get 100% discount off rental charges for DVDs,
and we could make all SENIORS get a 10% discount off rental charges for
all or some item types.

Cheers,

Jo.



Jesse Weaver wrote:

>
>
> On Fri, Dec 12, 2008 at 1:49 PM, Joann Ransom <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Bum! We currently have this in 2.2.9. <http://2.2.9.>.. Can we
>     make it so in 3.0 by throwing money at it? Should be a minor fix
>     to the circulation rules setup: just add another colume where you
>     enter % discount on rental charges.
>
>     cheers Jo.
>
>
>     On Sat, Dec 13, 2008 at 5:50 AM, Jesse Weaver
>     <[hidden email] <mailto:[hidden email]>> wrote:
>
>
>
>
>
>             Joann Ransom a écrit :
>             > Hi there,
>             >
>             > I have set up my parametres etc, including circulation
>             rules, but I
>             > can't seem to find a place to say which borrower
>             categories are exempt
>             > from paying which rental charges (ie by item types).
>             >
>             > For example, Patrons with category set to "Deaf" do not
>             have to pay
>             > rental charges for item types = "DVD" but everyone else
>             does.
>             >
>             > Thanks for help,
>             >
>             > cheers Jo.
>             > _______________________________________________
>             > Koha mailing list
>             > [hidden email] <mailto:[hidden email]>
>             > http://lists.katipo.co.nz/mailman/listinfo/koha
>             >
>
>             --
>             Lino Tremblay, bibliothécaire
>             Cégep de Sainte-Foy
>             2410, chemin Sainte-Foy
>             Québec, Québec
>             Canada G1V 1T3
>             Tél.: 418 659-6600, poste 3865
>             Fax: 418 659-4563
>
>             _______________________________________________
>             Koha mailing list
>             [hidden email] <mailto:[hidden email]>
>             http://lists.katipo.co.nz/mailman/listinfo/koha
>
>
>         Unfortunately, Koha does not support this yet; rental charges
>         can only be set at the itemtype level.
>
>         --
>         Jesse Weaver
>         Software Developer, LibLime
>
>
>
> Well, it'll involve changes to some of the code, so it'll be a
> _little_ more complicated than that. By "we have this in 2.2.9", do
> you mean that it was there already, or someone added it for you?
>
> --
> Jesse Weaver
> Software Developer, LibLime

_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha

jransom.vcf (414 bytes) Download Attachment