$numberingmethod, $status, $biblionumber, $callnumber,
$notes, $letter, $hemisphere, $manualhistory,
$internalnotes, $serialsadditems,$subscriptionid,
- $staffdisplaycount,$opacdisplaycount
+ $staffdisplaycount,$opacdisplaycount, $location
) = @_;
# warn $irregularity;
my $dbh = C4::Context->dbh;
add1=?,every1=?,whenmorethan1=?,setto1=?,lastvalue1=?,innerloop1=?,
add2=?,every2=?,whenmorethan2=?,setto2=?,lastvalue2=?,innerloop2=?,
add3=?,every3=?,whenmorethan3=?,setto3=?,lastvalue3=?,innerloop3=?,
- numberingmethod=?, status=?, biblionumber=?, callnumber=?, notes=?, letter=?, hemisphere=?,manualhistory=?,internalnotes=?,serialsadditems=?,staffdisplaycount = ?,opacdisplaycount = ?
+ numberingmethod=?, status=?, biblionumber=?, callnumber=?, notes=?, letter=?, hemisphere=?,manualhistory=?,internalnotes=?,serialsadditems=?,staffdisplaycount = ?,opacdisplaycount = ?, location = ?
WHERE subscriptionid = ?";
#warn "query :".$query;
my $sth = $dbh->prepare($query);
$numberingmethod, $status, $biblionumber, $callnumber,
$notes, $letter, $hemisphere, ($manualhistory?$manualhistory:0),
$internalnotes, $serialsadditems,
- $staffdisplaycount, $opacdisplaycount, $subscriptionid
+ $staffdisplaycount, $opacdisplaycount, $location,
+ $subscriptionid
);
my $rows=$sth->rows;
$sth->finish;
$add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
$add2,$every2,$whenmorethan2,$setto2,$lastvalue2,$innerloop2,
$add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
- $numberingmethod, $status, $notes, $serialsadditems)
+ $numberingmethod, $status, $notes, $serialsadditems,
+ $staffdisplaycount, $opacdisplaycount, $graceperiod, $location);
Create a new subscription with value given on input args.
$lastvalue3, $innerloop3, $numberingmethod, $status,
$notes, $letter, $firstacquidate, $irregularity,
$numberpattern, $callnumber, $hemisphere, $manualhistory,
- $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount
+ $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount,
+ $graceperiod, $location
) = @_;
my $dbh = C4::Context->dbh;
add2,every2,whenmorethan2,setto2,lastvalue2,innerloop2,
add3,every3,whenmorethan3,setto3,lastvalue3,innerloop3,
numberingmethod, status, notes, letter,firstacquidate,irregularity,
- numberpattern, callnumber, hemisphere,manualhistory,internalnotes,serialsadditems,staffdisplaycount,opacdisplaycount)
- VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
+ numberpattern, callnumber, hemisphere,manualhistory,internalnotes,serialsadditems,
+ staffdisplaycount,opacdisplaycount,graceperiod,location)
+ VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
|;
my $sth = $dbh->prepare($query);
$sth->execute(
$numberpattern, $callnumber,
$hemisphere, $manualhistory,
$internalnotes, $serialsadditems,
- $staffdisplaycount, $opacdisplaycount
+ $staffdisplaycount, $opacdisplaycount,
+ $graceperiod, $location,
);
#then create the 1st waited number
=over 4
-1 or 0 = HasSubscriptionExpired($subscriptionid)
+$has_expired = HasSubscriptionExpired($subscriptionid)
the subscription has expired when the next issue to arrive is out of subscription limit.
return :
-1 if true, 0 if false.
+0 if the subscription has not expired
+1 if the subscription has expired
+2 if has subscription does not have a valid expiration date set
=back
my ($res) = $sth->fetchrow ;
return 0 unless $res;
my @res=split (/-/,$res);
-# warn "date expiration :$expirationdate";
my @endofsubscriptiondate=split(/-/,$expirationdate);
+ return 2 if (scalar(@res)!=3 || scalar(@endofsubscriptiondate)!=3||not check_date(@res) || not check_date(@endofsubscriptiondate));
return 1 if ( (@endofsubscriptiondate && Delta_Days($res[0],$res[1],$res[2],
$endofsubscriptiondate[0],$endofsubscriptiondate[1],$endofsubscriptiondate[2]) <= 0)
|| (!$res));
$sth->execute($subscriptionid);
my ($res) = $sth->fetchrow ;
# warn "date expiration : ".$expirationdate." date courante ".$res;
- my @res=split /-/,$res;
+ my @res=split (/-/,$res);
@res=Date::Calc::Today if ($res[0]*$res[1]==0);
- my @endofsubscriptiondate=split/-/,$expirationdate;
+ my @endofsubscriptiondate=split(/-/,$expirationdate);
my $x;
if ( $per == 1 ) {$x=7;}
if ( $per == 2 ) {$x=7; }