+($subscriptionid) = &old_modsubscription($auser,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber,
+ $startdate,$periodicity,$firstacquidate,$dow,$irregularity,$numberpattern,$numberlength,$weeklength,$monthlength,
+ $add1,$every1,$whenmorethan1,$setto1,$lastvalue1,
+ $add2,$every2,$whenmorethan2,$setto2,$lastvalue2,
+ $add3,$every3,$whenmorethan3,$setto3,$lastvalue3,
+ $numberingmethod, $status, $callnumber, $notes, $hemisphere, $subscriptionid)
+
+this function is similar to the ModSubscription subroutine but has a few different
+values passed in
+$firstacquidate - date of first serial issue to arrive
+$irregularity - the issues not expected separated by a '|'
+- eg. monthly issue but not expecting issue for june and july would have $irregularity of '6|7'
+$numberpattern - the number for an array of labels to reconstruct the javascript correctly in the
+ subscription-add.tmpl file
+$callnumber - display the callnumber of the serial
+$hemisphere - either 2 = southern hemisphere or 1 = northern hemisphere - used for quarterly serials
+
+=back
+
+=cut
+
+sub old_modsubscription {
+ my (
+ $auser, $aqbooksellerid, $cost, $aqbudgetid,
+ $startdate, $periodicity, $firstacquidate, $dow,
+ $irregularity, $numberpattern, $numberlength, $weeklength,
+ $monthlength, $add1, $every1, $whenmorethan1,
+ $setto1, $lastvalue1, $innerloop1, $add2,
+ $every2, $whenmorethan2, $setto2, $lastvalue2,
+ $innerloop2, $add3, $every3, $whenmorethan3,
+ $setto3, $lastvalue3, $innerloop3, $numberingmethod,
+ $status, $biblionumber, $callnumber, $notes,
+ $hemisphere, $subscriptionid
+ ) = @_;
+ my $dbh = C4::Context->dbh;
+ my $sth = $dbh->prepare(
+"update subscription set librarian=?, aqbooksellerid=?,cost=?,aqbudgetid=?,startdate=?,
+ periodicity=?,firstacquidate=?,dow=?,irregularity=?,numberpattern=?,numberlength=?,weeklength=?,monthlength=?,
+ add1=?,every1=?,whenmorethan1=?,setto1=?,lastvalue1=?,innerloop1=?,
+ add2=?,every2=?,whenmorethan2=?,setto2=?,lastvalue2=?,innerloop2=?,
+ add3=?,every3=?,whenmorethan3=?,setto3=?,lastvalue3=?,innerloop3=?,
+ numberingmethod=?, status=?, biblionumber=?, callnumber=?, notes=?, hemisphere=? where subscriptionid = ?"
+ );
+ $sth->execute(
+ $auser, $aqbooksellerid, $cost, $aqbudgetid,
+ $startdate, $periodicity, $firstacquidate, $dow,
+ $irregularity, $numberpattern, $numberlength, $weeklength,
+ $monthlength, $add1, $every1, $whenmorethan1,
+ $setto1, $lastvalue1, $innerloop1, $add2,
+ $every2, $whenmorethan2, $setto2, $lastvalue2,
+ $innerloop2, $add3, $every3, $whenmorethan3,
+ $setto3, $lastvalue3, $innerloop3, $numberingmethod,
+ $status, $biblionumber, $callnumber, $notes,
+ $hemisphere, $subscriptionid
+ );
+ $sth->finish;
+
+ $sth =
+ $dbh->prepare("select * from subscription where subscriptionid = ? ");
+ $sth->execute($subscriptionid);
+ my $val = $sth->fetchrow_hashref;
+
+ # calculate issue number
+ my $serialseq = Get_Seq($val);
+ $sth =
+ $dbh->prepare("UPDATE serial SET serialseq = ? WHERE subscriptionid = ?");
+ $sth->execute( $serialseq, $subscriptionid );
+
+ my $enddate = subscriptionexpirationdate($subscriptionid);
+ $sth = $dbh->prepare("update subscriptionhistory set enddate=?");
+ $sth->execute( format_date_in_iso($enddate) );
+}
+
+=head2 old_getserials