View | Details | Raw Unified | Return to bug 6679
Collapse All | Expand All

(-)a/C4/Circulation.pm (-9 / +8 lines)
Lines 991-997 sub AddIssue { Link Here
991
    }
991
    }
992
	if ($borrower and $barcode and $barcodecheck ne '0'){#??? wtf
992
	if ($borrower and $barcode and $barcodecheck ne '0'){#??? wtf
993
		# find which item we issue
993
		# find which item we issue
994
		my $item = GetItem('', $barcode) or return undef;	# if we don't get an Item, abort.
994
		my $item = GetItem('', $barcode) or return;	# if we don't get an Item, abort.
995
		my $branch = _GetCircControlBranch($item,$borrower);
995
		my $branch = _GetCircControlBranch($item,$borrower);
996
		
996
		
997
		# get actual issuing if there is one
997
		# get actual issuing if there is one
Lines 1300-1306 sub GetIssuingRule { Link Here
1300
    return $irule if defined($irule) ;
1300
    return $irule if defined($irule) ;
1301
1301
1302
    # if no rule matches,
1302
    # if no rule matches,
1303
    return undef;
1303
    return;
1304
}
1304
}
1305
1305
1306
=head2 GetBranchBorrowerCircRule
1306
=head2 GetBranchBorrowerCircRule
Lines 2172-2178 tables issues and the firstname,surname & cardnumber from borrowers. Link Here
2172
2172
2173
sub GetBiblioIssues {
2173
sub GetBiblioIssues {
2174
    my $biblionumber = shift;
2174
    my $biblionumber = shift;
2175
    return undef unless $biblionumber;
2175
    return unless $biblionumber;
2176
    my $dbh   = C4::Context->dbh;
2176
    my $dbh   = C4::Context->dbh;
2177
    my $query = "
2177
    my $query = "
2178
        SELECT issues.*,items.barcode,biblio.biblionumber,biblio.title, biblio.author,borrowers.cardnumber,borrowers.surname,borrowers.firstname
2178
        SELECT issues.*,items.barcode,biblio.biblionumber,biblio.title, biblio.author,borrowers.cardnumber,borrowers.surname,borrowers.firstname
Lines 2350-2362 from the book's item type. Link Here
2350
=cut
2350
=cut
2351
2351
2352
sub AddRenewal {
2352
sub AddRenewal {
2353
    my $borrowernumber  = shift or return undef;
2353
    my $borrowernumber  = shift or return;
2354
    my $itemnumber      = shift or return undef;
2354
    my $itemnumber      = shift or return;
2355
    my $branch          = shift;
2355
    my $branch          = shift;
2356
    my $datedue         = shift;
2356
    my $datedue         = shift;
2357
    my $lastreneweddate = shift || DateTime->now(time_zone => C4::Context->tz)->ymd();
2357
    my $lastreneweddate = shift || DateTime->now(time_zone => C4::Context->tz)->ymd();
2358
    my $item   = GetItem($itemnumber) or return undef;
2358
    my $item   = GetItem($itemnumber) or return;
2359
    my $biblio = GetBiblioFromItemNumber($itemnumber) or return undef;
2359
    my $biblio = GetBiblioFromItemNumber($itemnumber) or return;
2360
2360
2361
    my $dbh = C4::Context->dbh;
2361
    my $dbh = C4::Context->dbh;
2362
    # Find the issues record for this book
2362
    # Find the issues record for this book
Lines 2377-2383 sub AddRenewal { Link Here
2377
    # based on the value of the RenewalPeriodBase syspref.
2377
    # based on the value of the RenewalPeriodBase syspref.
2378
    unless ($datedue) {
2378
    unless ($datedue) {
2379
2379
2380
        my $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber ) or return undef;
2380
        my $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber ) or return;
2381
        my $itemtype = (C4::Context->preference('item-level_itypes')) ? $biblio->{'itype'} : $biblio->{'itemtype'};
2381
        my $itemtype = (C4::Context->preference('item-level_itypes')) ? $biblio->{'itype'} : $biblio->{'itemtype'};
2382
2382
2383
        $datedue = (C4::Context->preference('RenewalPeriodBase') eq 'date_due') ?
2383
        $datedue = (C4::Context->preference('RenewalPeriodBase') eq 'date_due') ?
2384
- 

Return to bug 6679