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

(-)a/C4/Circulation.pm (-4 lines)
Lines 1392-1401 sub AddIssue { Link Here
1392
            UpdateTotalIssues($item->{'biblionumber'}, 1);
1392
            UpdateTotalIssues($item->{'biblionumber'}, 1);
1393
        }
1393
        }
1394
1394
1395
            if ( C4::Context->preference('ReturnToShelvingCart') ) {
1396
                # ReturnToShelvingCart is on, anything issued should be taken off the cart.
1397
                CartToShelf( $item->{'itemnumber'} );
1398
            }
1399
            $item->{'issues'}++;
1395
            $item->{'issues'}++;
1400
            if ( C4::Context->preference('UpdateTotalIssuesOnCirc') ) {
1396
            if ( C4::Context->preference('UpdateTotalIssuesOnCirc') ) {
1401
                UpdateTotalIssues( $item->{'biblionumber'}, 1 );
1397
                UpdateTotalIssues( $item->{'biblionumber'}, 1 );
(-)a/C4/Items.pm (-1 / +1 lines)
Lines 625-631 sub ModItemTransfer { Link Here
625
    my $dbh = C4::Context->dbh;
625
    my $dbh = C4::Context->dbh;
626
626
627
    # Remove the 'shelving cart' location status if it is being used.
627
    # Remove the 'shelving cart' location status if it is being used.
628
    CartToShelf( $itemnumber ) if ( C4::Context->preference("ReturnToShelvingCart") );
628
    CartToShelf( $itemnumber ) if ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART' );
629
629
630
    #new entry in branchtransfers....
630
    #new entry in branchtransfers....
631
    my $sth = $dbh->prepare(
631
    my $sth = $dbh->prepare(
(-)a/C4/Reserves.pm (-4 / +3 lines)
Lines 1217-1223 sub ModReserveStatus { Link Here
1217
    my $sth_set = $dbh->prepare($query);
1217
    my $sth_set = $dbh->prepare($query);
1218
    $sth_set->execute( $newstatus, $itemnumber );
1218
    $sth_set->execute( $newstatus, $itemnumber );
1219
1219
1220
    if ( C4::Context->preference("ReturnToShelvingCart") && $newstatus ) {
1220
    if ( ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART'  ) && $newstatus ) {
1221
      CartToShelf( $itemnumber );
1221
      CartToShelf( $itemnumber );
1222
    }
1222
    }
1223
}
1223
}
Lines 1292-1300 sub ModReserveAffect { Link Here
1292
      if ( !$transferToDo && !$already_on_shelf );
1292
      if ( !$transferToDo && !$already_on_shelf );
1293
1293
1294
    _FixPriority( { biblionumber => $biblionumber } );
1294
    _FixPriority( { biblionumber => $biblionumber } );
1295
1295
    if ( ( $item->{'location'} eq 'CART' && $item->{'permanent_location'} ne 'CART'  ) ) {
1296
    if ( C4::Context->preference("ReturnToShelvingCart") ) {
1296
      CartToShelf( $itemnumber );
1297
        CartToShelf($itemnumber);
1298
    }
1297
    }
1299
1298
1300
    return;
1299
    return;
(-)a/C4/UsageStats.pm (-2 lines)
Lines 142-148 sub BuildReport { Link Here
142
        AutoRemoveOverduesRestrictions
142
        AutoRemoveOverduesRestrictions
143
        CircControl
143
        CircControl
144
        HomeOrHoldingBranch
144
        HomeOrHoldingBranch
145
        InProcessingToShelvingCart
146
        IssueLostItem
145
        IssueLostItem
147
        IssuingInProcess
146
        IssuingInProcess
148
        ManInvInNoissuesCharge
147
        ManInvInNoissuesCharge
Lines 151-157 sub BuildReport { Link Here
151
        RenewalSendNotice
150
        RenewalSendNotice
152
        RentalsInNoissuesCharge
151
        RentalsInNoissuesCharge
153
        ReturnBeforeExpiry
152
        ReturnBeforeExpiry
154
        ReturnToShelvingCart
155
        TransfersMaxDaysWarning
153
        TransfersMaxDaysWarning
156
        UseBranchTransferLimits
154
        UseBranchTransferLimits
157
        useDaysMode
155
        useDaysMode
(-)a/installer/data/mysql/sysprefs.sql (-2 lines)
Lines 201-207 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
201
('IntranetCatalogSearchPulldown','0', NULL, 'Show a search field pulldown for \"Search the catalog\" boxes','YesNo'),
201
('IntranetCatalogSearchPulldown','0', NULL, 'Show a search field pulldown for \"Search the catalog\" boxes','YesNo'),
202
('OnSiteCheckouts','0','','Enable/Disable the on-site checkouts feature','YesNo'),
202
('OnSiteCheckouts','0','','Enable/Disable the on-site checkouts feature','YesNo'),
203
('OnSiteCheckoutsForce','0','','Enable/Disable the on-site for all cases (Even if a user is debarred, etc.)','YesNo'),
203
('OnSiteCheckoutsForce','0','','Enable/Disable the on-site for all cases (Even if a user is debarred, etc.)','YesNo'),
204
('InProcessingToShelvingCart','0','','If set, when any item with a location code of PROC is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
205
('INTRAdidyoumean','',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'),
204
('INTRAdidyoumean','',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'),
206
('IntranetBiblioDefaultView','normal','normal|marc|isbd|labeled_marc','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','Choice'),
205
('IntranetBiblioDefaultView','normal','normal|marc|isbd|labeled_marc','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','Choice'),
207
('intranetbookbag','1','','If ON, enables display of Cart feature in the intranet','YesNo'),
206
('intranetbookbag','1','','If ON, enables display of Cart feature in the intranet','YesNo'),
Lines 451-457 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
451
('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'),
450
('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'),
452
('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'),
451
('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'),
453
('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'),
452
('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'),
454
('ReturnToShelvingCart','0','','If set, when any item is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
455
('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
453
('reviewson','1','','If ON, enables patron reviews of bibliographic records in the OPAC','YesNo'),
456
('RisExportAdditionalFields',  '', NULL ,  'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea'),
454
('RisExportAdditionalFields',  '', NULL ,  'Define additional RIS tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea'),
457
('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
455
('RoutingListAddReserves','1','','If ON the patrons on routing lists are automatically added to holds on the issue.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authorised_values.tt (-2 / +2 lines)
Lines 16-22 Link Here
16
    <li>'BOR_NOTES' is for values for custom patron notes that appear on the circulation screen and the OPAC.</li>
16
    <li>'BOR_NOTES' is for values for custom patron notes that appear on the circulation screen and the OPAC.</li>
17
    <li>'Bsort1' is for patron statistical purposes.</li>
17
    <li>'Bsort1' is for patron statistical purposes.</li>
18
    <li>'Bsort2' is used for patron statistical purposes.</li>
18
    <li>'Bsort2' is used for patron statistical purposes.</li>
19
    <li>'CART' is the shelving cart location, used by InProcessingToShelvingCart and ReturnToShelvingCart</li>
19
    <li>'CART' is the shelving cart location, used by UpdateItemLocationOnCheckin </li>
20
    <li>'CCODE' is for collection codes (appears when cataloging and working with items).</li>
20
    <li>'CCODE' is for collection codes (appears when cataloging and working with items).</li>
21
    <li>'DAMAGED' is for descriptions of damaged items, and appears when cataloging and working with items.</li>
21
    <li>'DAMAGED' is for descriptions of damaged items, and appears when cataloging and working with items.</li>
22
    <li>'HINGS_AS' is for General Holdings: Acquisition Status Designator, a data element that specifies the acquisition status for the unit at the time of the holdings report.</li>
22
    <li>'HINGS_AS' is for General Holdings: Acquisition Status Designator, a data element that specifies the acquisition status for the unit at the time of the holdings report.</li>
Lines 32-38 Link Here
32
</li>
32
</li>
33
    <li>'MANUAL_INV' includes values for manual invoicing.</li>
33
    <li>'MANUAL_INV' includes values for manual invoicing.</li>
34
    <li>'NOT_LOAN' is used to list reasons why a title is not for loan.</li>
34
    <li>'NOT_LOAN' is used to list reasons why a title is not for loan.</li>
35
    <li>'PROC' is for the location to be used for NewItemsDefaultLocation (change description as desired), also the location expected by InProcessingToShelvingCart.</li>
35
    <li>'PROC' is for the location to be used for NewItemsDefaultLocation (change description as desired), also a special location for UpdateItemLocationOnCheckin.</li>
36
    <li>'REPORT_GROUP' provides a way to sort and filter your reports, the default values in this category include the Koha modules (Accounts, Acquisitions, Catalog, Circulation, Patrons)</li>
36
    <li>'REPORT_GROUP' provides a way to sort and filter your reports, the default values in this category include the Koha modules (Accounts, Acquisitions, Catalog, Circulation, Patrons)</li>
37
    <li>'REPORT_SUBGROUP' can be used to further sort and filter your reports. This category is empty by default. Values here need to include the authorized value code from REPORT_GROUP in the Description (OPAC) field to link the subgroup to the appropriate group.</li>
37
    <li>'REPORT_SUBGROUP' can be used to further sort and filter your reports. This category is empty by default. Values here need to include the authorized value code from REPORT_GROUP in the Description (OPAC) field to link the subgroup to the appropriate group.</li>
38
    <li>'RESTRICTED' is used for the restricted status of an item</li>
38
    <li>'RESTRICTED' is used for the restricted status of an item</li>
(-)a/svc/checkin (-14 lines)
Lines 58-77 $data->{itemnumber} = $itemnumber; Link Here
58
$data->{borrowernumber} = $borrowernumber;
58
$data->{borrowernumber} = $borrowernumber;
59
$data->{branchcode}     = $branchcode;
59
$data->{branchcode}     = $branchcode;
60
60
61
if ( C4::Context->preference("InProcessingToShelvingCart") ) {
62
    my $item = GetItem($itemnumber);
63
    if ( $item->{'location'} eq 'PROC' ) {
64
        $item->{'location'} = 'CART';
65
        ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} );
66
    }
67
}
68
69
if ( C4::Context->preference("ReturnToShelvingCart") ) {
70
    my $item = GetItem($itemnumber);
71
    $item->{'location'} = 'CART';
72
    ModItem( $item, $item->{'biblionumber'}, $item->{'itemnumber'} );
73
}
74
75
( $data->{returned} ) = AddReturn( $barcode, $branchcode, $exempt_fine );
61
( $data->{returned} ) = AddReturn( $barcode, $branchcode, $exempt_fine );
76
62
77
print to_json($data);
63
print to_json($data);
(-)a/t/db_dependent/Circulation/Returns.t (-41 lines)
Lines 47-93 $schema->storage->txn_begin; Link Here
47
47
48
my $builder = t::lib::TestBuilder->new();
48
my $builder = t::lib::TestBuilder->new();
49
49
50
subtest "InProcessingToShelvingCart tests" => sub {
51
52
    plan tests => 2;
53
54
    $branch = $builder->build({ source => 'Branch' })->{ branchcode };
55
    my $permanent_location = 'TEST';
56
    my $location           = 'PROC';
57
58
    # Create a biblio record with biblio-level itemtype
59
    my $record = MARC::Record->new();
60
    my ( $biblionumber, $biblioitemnumber ) = AddBiblio( $record, '' );
61
    my $built_item = $builder->build({
62
        source => 'Item',
63
        value  => {
64
            biblionumber  => $biblionumber,
65
            homebranch    => $branch,
66
            holdingbranch => $branch,
67
            location      => $location,
68
            permanent_location => $permanent_location
69
        }
70
    });
71
    my $barcode = $built_item->{ barcode };
72
    my $itemnumber = $built_item->{ itemnumber };
73
    my $item;
74
75
    t::lib::Mocks::mock_preference( "InProcessingToShelvingCart", 1 );
76
    AddReturn( $barcode, $branch );
77
    $item = GetItem( $itemnumber );
78
    is( $item->{location}, 'CART',
79
        "InProcessingToShelvingCart functions as intended" );
80
81
    $item->{location} = $location;
82
    ModItem( $item, undef, $itemnumber );
83
84
    t::lib::Mocks::mock_preference( "InProcessingToShelvingCart", 0 );
85
    AddReturn( $barcode, $branch );
86
    $item = GetItem( $itemnumber );
87
    is( $item->{location}, $permanent_location,
88
        "InProcessingToShelvingCart functions as intended" );
89
};
90
91
50
92
subtest "AddReturn logging on statistics table (item-level_itypes=1)" => sub {
51
subtest "AddReturn logging on statistics table (item-level_itypes=1)" => sub {
93
52
(-)a/t/db_dependent/UsageStats.t (-3 lines)
Lines 393-399 sub mocking_systempreferences_to_a_set_value { Link Here
393
        CircControl
393
        CircControl
394
        HomeOrHoldingBranch
394
        HomeOrHoldingBranch
395
        HomeOrHoldingBranchReturn
395
        HomeOrHoldingBranchReturn
396
        InProcessingToShelvingCart
397
        IssueLostItem
396
        IssueLostItem
398
        IssuingInProcess
397
        IssuingInProcess
399
        ManInvInNoissuesCharge
398
        ManInvInNoissuesCharge
Lines 402-408 sub mocking_systempreferences_to_a_set_value { Link Here
402
        RenewalSendNotice
401
        RenewalSendNotice
403
        RentalsInNoissuesCharge
402
        RentalsInNoissuesCharge
404
        ReturnBeforeExpiry
403
        ReturnBeforeExpiry
405
        ReturnToShelvingCart
406
        TransfersMaxDaysWarning
404
        TransfersMaxDaysWarning
407
        UseBranchTransferLimits
405
        UseBranchTransferLimits
408
        useDaysMode
406
        useDaysMode
409
- 

Return to bug 14576