Adding a notice before departure of a borrower
This commit is contained in:
parent
c95d327ccb
commit
a62f652fbc
|
|
@ -35,6 +35,7 @@ use C4::Interface::CGI::Output;
|
|||
use C4::Koha;
|
||||
use HTML::Template;
|
||||
use C4::Date;
|
||||
use Date::Manip;
|
||||
|
||||
#
|
||||
# PARAMETERS READING
|
||||
|
|
@ -123,6 +124,13 @@ my $borrower;
|
|||
if ($borrowernumber) {
|
||||
$borrower = getpatroninformation(\%env,$borrowernumber,0);
|
||||
my ($od,$issue,$fines)=borrdata2(\%env,$borrowernumber);
|
||||
warn $borrower->{'expiry'};
|
||||
my $warningdate = DateCalc($borrower->{'expiry'},"- ".C4::Context->preference('NotifiyBorrowerDeparture')." days");
|
||||
my $warning=Date_Cmp(ParseDate("today"),$warningdate);
|
||||
if ($warning>0){
|
||||
#borrowercard expired
|
||||
$template->param(warndeparture=>$warning);
|
||||
}
|
||||
$template->param(overduecount => $od,
|
||||
issuecount => $issue,
|
||||
finetotal => $fines);
|
||||
|
|
|
|||
|
|
@ -30,11 +30,12 @@
|
|||
<!-- TMPL_ELSE -->
|
||||
<!-- TMPL_IF NAME="borrowernumber" -->
|
||||
<h2 class="circulation">Borrower information</h2>
|
||||
<p><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR name="cardnumber" -->)
|
||||
<!--TMPL_IF Name="warndeparture"--><p class="problem"><!--TMPL_ELSE--><p><!--/TMPL_IF--><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR name="cardnumber" -->)
|
||||
<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" --> " class="button circulation">
|
||||
detail
|
||||
</a>
|
||||
<a href="/cgi-bin/koha/members/memberentry.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->&modify=edit&destination=circ" class="button circulation">edit</a>
|
||||
<!--TMPL_IF Name="warndeparture"--><br /> Borrower will leave soon<br /><!--/TMPL_IF-->
|
||||
</p>
|
||||
<p>
|
||||
<!-- TMPL_VAR NAME="streetaddress" --> <!-- TMPL_VAR NAME="city" -->
|
||||
|
|
|
|||
|
|
@ -924,6 +924,15 @@ my %tabledata = (
|
|||
explanation => 'hide marc specific datas like subfield code & indicators to library',
|
||||
type => 'YesNo',
|
||||
},
|
||||
{
|
||||
uniquefieldrequired => 'variable',
|
||||
variable => 'NotifiyBorrowerDeparture',
|
||||
value => '0',
|
||||
forceupdate => { 'explanation' => 1,
|
||||
'type' => 1},
|
||||
explanation => 'Delay before expiry where a notice is sent when issuing',
|
||||
type => 'Integer',
|
||||
},
|
||||
],
|
||||
|
||||
);
|
||||
|
|
@ -1520,6 +1529,9 @@ $sth->finish;
|
|||
exit;
|
||||
|
||||
# $Log$
|
||||
# Revision 1.100.2.13 2005/11/29 14:50:30 hdl
|
||||
# Adding a notice before departure of a borrower
|
||||
#
|
||||
# Revision 1.100.2.12 2005/10/25 12:36:21 tipaul
|
||||
# * adding a feature to enable reordering of subfields in MARC editor (can be considered as a bug ? at least one of my libraries think that yes !)
|
||||
# * as the MARC editor begins to be really heavy, i've also added a marc_hide systempref. It hides all marc features not requested by libraries that want MARC but not too much. It hides MARC tag & subfield code, reordering buttons as well as indicators. by default, hide_marc is off
|
||||
|
|
|
|||
Loading…
Reference in New Issue