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

(-)a/C4/Circulation.pm (-5 / +5 lines)
Lines 1184-1194 AddIssue does the following things : Link Here
1184
1184
1185
sub AddIssue {
1185
sub AddIssue {
1186
    my ( $borrower, $barcode, $datedue, $cancelreserve, $issuedate, $sipmode, $params ) = @_;
1186
    my ( $borrower, $barcode, $datedue, $cancelreserve, $issuedate, $sipmode, $params ) = @_;
1187
    my $inhouse_use = $params->{inhouse_use};
1187
    my $onsite_checkout = $params->{onsite_checkout};
1188
    my $auto_renew = $params->{auto_renew};
1188
    my $auto_renew = $params->{auto_renew};
1189
    my $dbh = C4::Context->dbh;
1189
    my $dbh = C4::Context->dbh;
1190
    my $barcodecheck=CheckValidBarcode($barcode);
1190
    my $barcodecheck=CheckValidBarcode($barcode);
1191
    $inhouse_use = ( $inhouse_use ? 1 : 0 );
1191
    $onsite_checkout = ( $onsite_checkout ? 1 : 0 );
1192
1192
1193
    if ($datedue && ref $datedue ne 'DateTime') {
1193
    if ($datedue && ref $datedue ne 'DateTime') {
1194
        $datedue = dt_from_string($datedue);
1194
        $datedue = dt_from_string($datedue);
Lines 1263-1269 sub AddIssue { Link Here
1263
        my $sth =
1263
        my $sth =
1264
          $dbh->prepare(
1264
          $dbh->prepare(
1265
                "INSERT INTO issues
1265
                "INSERT INTO issues
1266
                    (borrowernumber, itemnumber,issuedate, date_due, branchcode, inhouse_use, auto_renew)
1266
                    (borrowernumber, itemnumber,issuedate, date_due, branchcode, onsite_checkout, auto_renew)
1267
                VALUES (?,?,?,?,?,?,?)"
1267
                VALUES (?,?,?,?,?,?,?)"
1268
          );
1268
          );
1269
        unless ($datedue) {
1269
        unless ($datedue) {
Lines 1279-1285 sub AddIssue { Link Here
1279
            $issuedate->strftime('%Y-%m-%d %H:%M:00'), # issuedate
1279
            $issuedate->strftime('%Y-%m-%d %H:%M:00'), # issuedate
1280
            $datedue->strftime('%Y-%m-%d %H:%M:00'),   # date_due
1280
            $datedue->strftime('%Y-%m-%d %H:%M:00'),   # date_due
1281
            C4::Context->userenv->{'branch'},   # branchcode
1281
            C4::Context->userenv->{'branch'},   # branchcode
1282
            $inhouse_use,
1282
            $onsite_checkout,
1283
            $auto_renew ? 1 : 0                 # automatic renewal
1283
            $auto_renew ? 1 : 0                 # automatic renewal
1284
        );
1284
        );
1285
        if ( C4::Context->preference('ReturnToShelvingCart') ) { ## ReturnToShelvingCart is on, anything issued should be taken off the cart.
1285
        if ( C4::Context->preference('ReturnToShelvingCart') ) { ## ReturnToShelvingCart is on, anything issued should be taken off the cart.
Lines 1321-1327 sub AddIssue { Link Here
1321
        # Record the fact that this book was issued.
1321
        # Record the fact that this book was issued.
1322
        &UpdateStats({
1322
        &UpdateStats({
1323
                      branch => C4::Context->userenv->{'branch'},
1323
                      branch => C4::Context->userenv->{'branch'},
1324
                      type => ( $inhouse_use ? 'inhouse_use' : 'issue' ),
1324
                      type => ( $onsite_checkout ? 'onsite_checkout' : 'issue' ),
1325
                      amount => $charge,
1325
                      amount => $charge,
1326
                      other => ($sipmode ? "SIP-$sipmode" : ''),
1326
                      other => ($sipmode ? "SIP-$sipmode" : ''),
1327
                      itemnumber => $item->{'itemnumber'},
1327
                      itemnumber => $item->{'itemnumber'},
(-)a/C4/Items.pm (-3 / +3 lines)
Lines 1285-1292 sub GetItemsInfo { Link Here
1285
           holding.opac_info as holding_branch_opac_info,
1285
           holding.opac_info as holding_branch_opac_info,
1286
           home.opac_info as home_branch_opac_info
1286
           home.opac_info as home_branch_opac_info
1287
    ";
1287
    ";
1288
    $query .= ", issues.inhouse_use"
1288
    $query .= ", issues.onsite_checkout"
1289
        if C4::Context->preference("In-House Use");
1289
        if C4::Context->preference("On-site checkouts");
1290
    $query .= "
1290
    $query .= "
1291
     FROM items
1291
     FROM items
1292
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1292
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
Lines 1296-1302 sub GetItemsInfo { Link Here
1296
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1296
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1297
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1297
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1298
    $query .= " LEFT JOIN issues ON issues.itemnumber = items.itemnumber"
1298
    $query .= " LEFT JOIN issues ON issues.itemnumber = items.itemnumber"
1299
        if C4::Context->preference("In-House Use");
1299
        if C4::Context->preference("On-site checkouts");
1300
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1300
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1301
    my $sth = $dbh->prepare($query);
1301
    my $sth = $dbh->prepare($query);
1302
    $sth->execute($biblionumber);
1302
    $sth->execute($biblionumber);
(-)a/C4/Stats.pm (-1 / +1 lines)
Lines 87-93 sub UpdateStats { Link Here
87
    return () if ! defined $params;
87
    return () if ! defined $params;
88
# change these arrays if new types of transaction or new parameters are allowed
88
# change these arrays if new types of transaction or new parameters are allowed
89
    my @allowed_keys = qw (type branch amount other itemnumber itemtype borrowernumber accountno ccode);
89
    my @allowed_keys = qw (type branch amount other itemnumber itemtype borrowernumber accountno ccode);
90
    my @allowed_circulation_types = qw (renew issue localuse return inhouse_use);
90
    my @allowed_circulation_types = qw (renew issue localuse return onsite_checkout);
91
    my @allowed_accounts_types = qw (writeoff payment);
91
    my @allowed_accounts_types = qw (writeoff payment);
92
    my @circulation_mandatory_keys = qw (type branch borrowernumber itemnumber ccode itemtype);
92
    my @circulation_mandatory_keys = qw (type branch borrowernumber itemnumber ccode itemtype);
93
    my @accounts_mandatory_keys = qw (type branch borrowernumber amount);
93
    my @accounts_mandatory_keys = qw (type branch borrowernumber amount);
(-)a/circ/circulation.pl (-6 / +4 lines)
Lines 322-328 if ($barcode) { Link Here
322
        }
322
        }
323
    }
323
    }
324
324
325
    unless( $query->param('inhouse_use') and C4::Context->preference("In-House Use Force") ) {
325
    unless( $query->param('onsite_checkout') and C4::Context->preference("On-site checkouts Force") ) {
326
        delete $question->{'DEBT'} if ($debt_confirmed);
326
        delete $question->{'DEBT'} if ($debt_confirmed);
327
        foreach my $impossible ( keys %$error ) {
327
        foreach my $impossible ( keys %$error ) {
328
            $template->param(
328
            $template->param(
Lines 347-360 if ($barcode) { Link Here
347
                    getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
347
                    getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
348
                    getBarcodeMessageIteminfo => $getmessageiteminfo->{'barcode'},
348
                    getBarcodeMessageIteminfo => $getmessageiteminfo->{'barcode'},
349
                    NEEDSCONFIRMATION  => 1,
349
                    NEEDSCONFIRMATION  => 1,
350
                    inhouse_use => $query->param('inhouse_use'),
350
                    onsite_checkout => $query->param('onsite_checkout'),
351
                );
351
                );
352
                $confirm_required = 1;
352
                $confirm_required = 1;
353
            }
353
            }
354
        }
354
        }
355
        unless($confirm_required) {
355
        unless($confirm_required) {
356
            my $inhouse_use = $query->param('inhouse_use');
356
            my $onsite_checkout = $query->param('onsite_checkout');
357
            AddIssue( $borrower, $barcode, $datedue, $cancelreserve, undef, undef, { inhouse_use => $inhouse_use, auto_renew => $session->param('auto_renew') } );
357
            AddIssue( $borrower, $barcode, $datedue, $cancelreserve, undef, undef, { onsite_checkout => $onsite_checkout, auto_renew => $session->param('auto_renew') } );
358
            $session->clear('auto_renew');
358
            $session->clear('auto_renew');
359
            $inprocess = 1;
359
            $inprocess = 1;
360
        }
360
        }
Lines 586-593 $template->param( Link Here
586
    canned_bor_notes_loop     => $canned_notes,
586
    canned_bor_notes_loop     => $canned_notes,
587
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
587
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
588
    todaysdate                => dt_from_string()->set(hour => 23)->set(minute => 59),
588
    todaysdate                => dt_from_string()->set(hour => 23)->set(minute => 59),
589
    inhouse_use_feature       => C4::Context->preference("In-House Use"),
590
    inhouse_use_forced        => C4::Context->preference("In-House Use Force"),
591
);
589
);
592
590
593
output_html_with_http_headers $query, $cookie, $template->output;
591
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/installer/data/mysql/kohastructure.sql (-2 / +2 lines)
Lines 1126-1132 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1126
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1126
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1127
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1127
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1128
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1128
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1129
  `inhouse_use` int(1) NOT NULL default 0, -- in house use flag
1129
  `onsite_checkout` int(1) NOT NULL default 0, -- on-site checkout flag
1130
  KEY `issuesborridx` (`borrowernumber`),
1130
  KEY `issuesborridx` (`borrowernumber`),
1131
  KEY `itemnumber_idx` (`itemnumber`),
1131
  KEY `itemnumber_idx` (`itemnumber`),
1132
  KEY `branchcode_idx` (`branchcode`),
1132
  KEY `branchcode_idx` (`branchcode`),
Lines 1600-1606 CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r Link Here
1600
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1600
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1601
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1601
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1602
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1602
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1603
  `inhouse_use` int(1) NOT NULL default 0, -- in house use flag
1603
  `onsite_checkout` int(1) NOT NULL default 0, -- On-site checkout flag
1604
  KEY `old_issuesborridx` (`borrowernumber`),
1604
  KEY `old_issuesborridx` (`borrowernumber`),
1605
  KEY `old_issuesitemidx` (`itemnumber`),
1605
  KEY `old_issuesitemidx` (`itemnumber`),
1606
  KEY `branchcode_idx` (`branchcode`),
1606
  KEY `branchcode_idx` (`branchcode`),
(-)a/installer/data/mysql/sysprefs.sql (-2 / +2 lines)
Lines 146-153 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
146
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
146
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
147
('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'),
147
('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'),
148
('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'),
148
('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'),
149
('In-House use','0','','Enable/Disable the in-house use feature','YesNo'),
149
('On-site checkouts','0','','Enable/Disable the on-site checkouts feature','YesNo'),
150
('In-House use Force','0','','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','YesNo'),
150
('On-site checkouts Force','0','','Enable/Disable the on-site checkouts for all cases (Even if a user is debarred, etc.)','YesNo'),
151
('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'),
151
('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'),
152
('INTRAdidyoumean',NULL,NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'),
152
('INTRAdidyoumean',NULL,NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'),
153
('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'),
153
('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'),
(-)a/installer/data/mysql/updatedatabase.pl (-5 / +5 lines)
Lines 8789-8808 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
8789
    $dbh->do(q{
8789
    $dbh->do(q{
8790
        INSERT IGNORE INTO systempreferences
8790
        INSERT IGNORE INTO systempreferences
8791
            (variable,value,explanation,options,type)
8791
            (variable,value,explanation,options,type)
8792
            VALUES('In-House use','0','Enable/Disable the in-house use feature','','YesNo');
8792
            VALUES('On-site checkouts','0','Enable/Disable the on-site checkouts feature','','YesNo');
8793
    });
8793
    });
8794
    $dbh->do(q{
8794
    $dbh->do(q{
8795
        INSERT IGNORE INTO systempreferences
8795
        INSERT IGNORE INTO systempreferences
8796
            (variable,value,explanation,options,type)
8796
            (variable,value,explanation,options,type)
8797
            VALUES('In-House use Force','0','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','','YesNo');
8797
            VALUES('On-site checkouts Force','0','Enable/Disable the on-site checkouts for all cases (Even if a user is debarred, etc.)','','YesNo');
8798
    });
8798
    });
8799
    $dbh->do(q{
8799
    $dbh->do(q{
8800
        ALTER TABLE issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8800
        ALTER TABLE issues ADD COLUMN onsite_checkout INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8801
    });
8801
    });
8802
    $dbh->do(q{
8802
    $dbh->do(q{
8803
        ALTER TABLE old_issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8803
        ALTER TABLE old_issues ADD COLUMN onsite_checkout INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8804
    });
8804
    });
8805
    print "Upgrade to $DBversion done (Bug 10860: Add new system preference In-House use + fields [old_]issues.inhouse_use)\n";
8805
    print "Upgrade to $DBversion done (Bug 10860: Add new system preference On-site checkouts + fields [old_]issues.onsite_checkout)\n";
8806
    SetVersion($DBversion);
8806
    SetVersion($DBversion);
8807
}
8807
}
8808
8808
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (-4 / +4 lines)
Lines 2714-2729 span.browse-button { Link Here
2714
    color : #FFF;
2714
    color : #FFF;
2715
}
2715
}
2716
2716
2717
.inhouse_use-select {
2717
.onsite_checkout-select {
2718
    font-size : 85%;
2718
    font-size : 85%;
2719
    font-weight: normal;
2719
    font-weight: normal;
2720
    padding-top : .3em;
2720
    padding-top : .3em;
2721
}
2721
}
2722
#circ_circulation_issue .inhouse_use-select label,
2722
#circ_circulation_issue .onsite_checkout-select label,
2723
.inhouse_use-select label {
2723
.onsite_checkout-select label {
2724
    font-size : inherit;
2724
    font-size : inherit;
2725
    font-weight: normal;
2725
    font-weight: normal;
2726
}
2726
}
2727
span.inhouse_use {
2727
span.onsite_checkout {
2728
    color: red;
2728
    color: red;
2729
}
2729
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc (-1 / +1 lines)
Lines 26-31 Link Here
26
    var NOT_TRANSFERRED_YET = _("Item hasn't been transferred yet from %s");
26
    var NOT_TRANSFERRED_YET = _("Item hasn't been transferred yet from %s");
27
    var NO = _("No");
27
    var NO = _("No");
28
    var YES = _("Yes");
28
    var YES = _("Yes");
29
    var INHOUSE_USE = _("In-house use");
29
    var ONSITE_CHECKOUT = _("On-site checkout");
30
//]]>
30
//]]>
31
</script>
31
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js (-12 / +12 lines)
Lines 192-200 $(document).ready(function() { Link Here
192
                        title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
192
                        title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
193
                    }
193
                    }
194
194
195
                    var inhouse_use = '';
195
                    var onsite_checkout = '';
196
                    if ( oObj.inhouse_use == 1 ) {
196
                    if ( oObj.onsite_checkout == 1 ) {
197
                        inhouse_use += " <span class='inhouse_use'>("+INHOUSE_USE+")</span>";
197
                        onsite_checkout += " <span class='onsite_checkout'>("+ONSITE_CHECKOUT+")</span>";
198
                    }
198
                    }
199
199
200
                    title += " "
200
                    title += " "
Lines 207-213 $(document).ready(function() { Link Here
207
                          + "'>"
207
                          + "'>"
208
                          + oObj.barcode
208
                          + oObj.barcode
209
                          + "</a>"
209
                          + "</a>"
210
                          + inhouse_use;
210
                          + onsite_checkout;
211
211
212
                    return title;
212
                    return title;
213
                }
213
                }
Lines 237-249 $(document).ready(function() { Link Here
237
237
238
                    content += "<span>";
238
                    content += "<span>";
239
239
240
                    if ( inhouse_use == 0 ) {
240
                    if ( oObj.onsite_checkout == 0 ) {
241
                        content += "<span style='padding: 0 1em;'>" + oObj.renewals_count + "</span>";
241
                        content += "<span style='padding: 0 1em;'>" + oObj.renewals_count + "</span>";
242
                    }
242
                    }
243
243
244
                    if ( oObj.can_renew && inhouse_use == 0 ) {
244
                    if ( oObj.can_renew && oObj.onsite_checkout == 0 ) {
245
                        // Do nothing
245
                        // Do nothing
246
                    } else if ( oObj.inhouse_use == 1 ) {
246
                    } else if ( oObj.onsite_checkout == 1 ) {
247
                        // If the issue is an in-house use, it is not renewable
247
                        // If the issue is an in-house use, it is not renewable
248
                        content += "<span class='renewals-disabled'>"
248
                        content += "<span class='renewals-disabled'>"
249
                                + NOT_RENEWABLE
249
                                + NOT_RENEWABLE
Lines 299-305 $(document).ready(function() { Link Here
299
                            +  "<input type='checkbox' class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>"
299
                            +  "<input type='checkbox' class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>"
300
                            +  "</span>";
300
                            +  "</span>";
301
301
302
                    if ( oObj.renewals_remaining && inhouse_use == 0 ) {
302
                    if ( oObj.renewals_remaining && oObj.onsite_checkout == 0 ) {
303
                        content += "<span class='renewals'>("
303
                        content += "<span class='renewals'>("
304
                                + RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed )
304
                                + RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed )
305
                                + ")</span>";
305
                                + ")</span>";
Lines 430-438 $(document).ready(function() { Link Here
430
                                title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
430
                                title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
431
                            }
431
                            }
432
432
433
                            var inhouse_use = '';
433
                            var onsite_checkout = '';
434
                            if ( oObj.inhouse_use == 1 ) {
434
                            if ( oObj.onsite_checkout == 1 ) {
435
                                inhouse_use += " <span class='inhouse_use'>("+INHOUSE_USE+")</span>";
435
                                onsite_checkout += " <span class='onsite_checkout'>("+ONSITE_CHECKOUT+")</span>";
436
                            }
436
                            }
437
437
438
                            title += " "
438
                            title += " "
Lines 445-451 $(document).ready(function() { Link Here
445
                                  + "'>"
445
                                  + "'>"
446
                                  + oObj.barcode
446
                                  + oObj.barcode
447
                                  + "</a>"
447
                                  + "</a>"
448
                                  + inhouse_use;
448
                                  + onsite_checkout;
449
449
450
                            return title;
450
                            return title;
451
                        }
451
                        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js (-3 / +3 lines)
Lines 46-54 $(document).ready(function() { Link Here
46
        return false;
46
        return false;
47
    });
47
    });
48
48
49
    toggle_inhouse_use();
49
    toggle_onsite_checkout();
50
    $("#inhouse_use").click(function(){
50
    $("#onsite_checkout").click(function(){
51
        toggle_inhouse_use();
51
        toggle_onsite_checkout();
52
    });
52
    });
53
});
53
});
54
54
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-4 / +4 lines)
Lines 384-400 Circulation: Link Here
384
            - "it will be updated to the right-hand value. E.g. '-1: 0' will cause an item that was set to 'Ordered' to now be available for loan."
384
            - "it will be updated to the right-hand value. E.g. '-1: 0' will cause an item that was set to 'Ordered' to now be available for loan."
385
            - Each pair of values should be on a separate line.
385
            - Each pair of values should be on a separate line.
386
        -
386
        -
387
            - pref: In-House use
387
            - pref: On-site checkouts
388
              choices:
388
              choices:
389
                  yes: Enable
389
                  yes: Enable
390
                  no: Disable
390
                  no: Disable
391
            - the in-house use feature.
391
            - the on-site checkouts feature.
392
        -
392
        -
393
            - pref: In-House use Force
393
            - pref: On-site checkouts Force
394
              choices:
394
              choices:
395
                  yes: Enable
395
                  yes: Enable
396
                  no: Disable
396
                  no: Disable
397
            - the in-house for all cases (Even if a user is debarred, etc.).
397
            - the on-site checkouts for all cases (Even if a user is debarred, etc.).
398
    Holds Policy:
398
    Holds Policy:
399
        -
399
        -
400
            - pref: AllowHoldPolicyOverride
400
            - pref: AllowHoldPolicyOverride
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-2 / +2 lines)
Lines 586-598 function verify_images() { Link Here
586
                    <td class="status">
586
                    <td class="status">
587
587
588
                        [% IF ( item.datedue ) %]
588
                        [% IF ( item.datedue ) %]
589
                          [% IF inhouse_use %]
589
                          [% IF onsite_checkout %]
590
                            <span>Currently in local use
590
                            <span>Currently in local use
591
                          [% ELSE %]
591
                          [% ELSE %]
592
                            <span class="datedue">Checked out
592
                            <span class="datedue">Checked out
593
                          [% END %]
593
                          [% END %]
594
                                [% UNLESS ( item.NOTSAMEBRANCH ) %]
594
                                [% UNLESS ( item.NOTSAMEBRANCH ) %]
595
                                  [% IF inhouse_use %]
595
                                  [% IF onsite_checkout %]
596
                                    by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
596
                                    by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
597
                                  [% ELSE %]
597
                                  [% ELSE %]
598
                                    to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
598
                                    to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-13 / +14 lines)
Lines 1-4 Link Here
1
[% USE Branches %]
1
[% USE Branches %]
2
[% USE Koha %]
2
[% USE KohaDates %]
3
[% USE KohaDates %]
3
[% IF ( export_remove_fields OR export_with_csv_profile ) %]
4
[% IF ( export_remove_fields OR export_with_csv_profile ) %]
4
   [% SET exports_enabled = 1 %]
5
   [% SET exports_enabled = 1 %]
Lines 54-62 $(document).ready(function() { Link Here
54
    [% END %]
55
    [% END %]
55
});
56
});
56
57
57
// In-house use
58
// On-site checkouts
58
function toggle_inhouse_use(){
59
function toggle_onsite_checkout(){
59
    if ( $("#inhouse_use").attr('checked') ) {
60
    if ( $("#onsite_checkout").attr('checked') ) {
60
        $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
61
        $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
61
        $("#duedatespec").datetimepicker('destroy');
62
        $("#duedatespec").datetimepicker('destroy');
62
    } else {
63
    } else {
Lines 300-306 function toggle_inhouse_use(){ Link Here
300
    [% ELSE %]
301
    [% ELSE %]
301
    <input type="submit" class="approve" value="Yes, check out (Y)" accesskey="y" />
302
    <input type="submit" class="approve" value="Yes, check out (Y)" accesskey="y" />
302
    [% END %]
303
    [% END %]
303
    <input type="hidden" name="inhouse_use" value="[% inhouse_use %]" />
304
    <input type="hidden" name="onsite_checkout" value="[% onsite_checkout %]" />
304
</form>
305
</form>
305
[% END %]
306
[% END %]
306
307
Lines 479-485 No patron matched <span class="ex">[% message %]</span> Link Here
479
480
480
[% IF ( borrowernumber ) %]
481
[% IF ( borrowernumber ) %]
481
<div class="yui-g">
482
<div class="yui-g">
482
[% IF !noissues || inhouse_use_forced %]
483
[% IF !noissues || Koha.Preference('On-site checkouts') %]
483
[% IF ( flagged ) %]
484
[% IF ( flagged ) %]
484
<div class="yui-u first">
485
<div class="yui-u first">
485
[% ELSE %]
486
[% ELSE %]
Lines 527-539 No patron matched <span class="ex">[% message %]</span> Link Here
527
          <button class="btn btn-small action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
528
          <button class="btn btn-small action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
528
</div>[% END %]
529
</div>[% END %]
529
530
530
      [% IF inhouse_use_feature %]
531
      [% IF Koha.Preference('On-site checkouts') %]
531
        <div class="inhouse_use-select">
532
        <div class="onsite_checkout-select">
532
          [% IF noissues %]
533
          [% IF noissues %]
533
            <input type="checkbox" id="inhouse_use" name="inhouse_use_forced" checked="checked" disabled="disabled" /> <label for="inhouse_use">In-house use</label>
534
            <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkout</label>
534
            <input type="hidden" name="inhouse_use" checked="checked" value="1" />
535
            <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
535
          [% ELSE %]
536
          [% ELSE %]
536
            <input type="checkbox" id="inhouse_use" name="inhouse_use" /> <label for="inhouse_use">In-house use</label>
537
            <input type="checkbox" id="onsite_checkout" name="onsite_checkout" /> <label for="onsite_checkout">On-site checkout</label>
537
          [% END %]
538
          [% END %]
538
        </div>
539
        </div>
539
      [% END %]
540
      [% END %]
Lines 553-559 No patron matched <span class="ex">[% message %]</span> Link Here
553
[% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
554
[% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
554
555
555
    [% IF flagged %]
556
    [% IF flagged %]
556
      [% IF NOT noissues || ( noissues && inhouse_use_forced ) %]
557
      [% IF NOT noissues || ( noissues && Koha.Preference('On-site checkouts') ) %]
557
        <div id="circmessages" class="circmessage attention">
558
        <div id="circmessages" class="circmessage attention">
558
      [% ELSE %]
559
      [% ELSE %]
559
        <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
560
        <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
Lines 562-569 No patron matched <span class="ex">[% message %]</span> Link Here
562
      <h3>
563
      <h3>
563
        [% IF noissues %]
564
        [% IF noissues %]
564
          Cannot check out!
565
          Cannot check out!
565
          [% IF inhouse_use_forced %]
566
          [% IF Koha.Preference('On-site checkouts') %]
566
            <span style="color:red;">Only in-house use is allowed</span>
567
            <span style="color:red;">Only on-site checkouts is allowed</span>
567
          [% END %]
568
          [% END %]
568
        [% ELSE %]
569
        [% ELSE %]
569
          Attention:
570
          Attention:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (-13 / +12 lines)
Lines 17-28 Link Here
17
        ]
17
        ]
18
    }));
18
    }));
19
    var tabs = $("#tabs").tabs({
19
    var tabs = $("#tabs").tabs({
20
        select: function(e, ui) {
20
        activate: function(e, ui) {
21
            var id = $(ui.tab).attr("id");
21
            var index = $(ui.newTab).index();
22
            if ( id == "tab_checkout" ) {
22
            if ( index == 1 ) {
23
                table.fnFilter("checkout", 0);
23
                table.fnFilter("normal_checkout", 0);
24
            } else if ( id == "tab_inhouse_use" ) {
24
            } else if ( index == 2 ) {
25
                table.fnFilter("inhouse_use", 0);
25
                table.fnFilter("onsite_checkout", 0);
26
            } else { // all
26
            } else { // all
27
                table.fnFilter('', 0);
27
                table.fnFilter('', 0);
28
            }
28
            }
Lines 56-64 Link Here
56
56
57
<div id="tabs" class="toptabs">
57
<div id="tabs" class="toptabs">
58
  <ul>
58
  <ul>
59
    <li><a href="#readingrec" id="tab_all">All</a></li>
59
    <li><a href="#readingrec">All</a></li>
60
    <li><a href="#readingrec" id="tab_checkout">Checkouts</a></li>
60
    <li><a href="#readingrec">Checkouts</a></li>
61
    <li><a href="#readingrec" id="tab_inhouse_use">In-house use</a></li>
61
    <li><a href="#readingrec">On-site checkouts</a></li>
62
  </ul>
62
  </ul>
63
  <div id="readingrec" style="overflow:hidden">
63
  <div id="readingrec" style="overflow:hidden">
64
    <table id="table_readingrec">
64
    <table id="table_readingrec">
Lines 79-88 Link Here
79
      [% FOREACH issue IN loop_reading %]
79
      [% FOREACH issue IN loop_reading %]
80
        [% IF  issue.returndate  %]<tr>[% ELSE %]<tr class="onissue">[% END %]
80
        [% IF  issue.returndate  %]<tr>[% ELSE %]<tr class="onissue">[% END %]
81
          <td style="display:none;">
81
          <td style="display:none;">
82
            [% IF issue.inhouse_use %]
82
            [% IF issue.onsite_checkout %]
83
              inhouse_use
83
              onsite_checkout
84
            [% ELSE %]
84
            [% ELSE %]
85
              checkout
85
              normal_checkout
86
            [% END %]
86
            [% END %]
87
          </td>
87
          </td>
88
          <td>
88
          <td>
Lines 105-111 Link Here
105
          <td>
105
          <td>
106
            <span title="[% issue.issuedate %]">[% issue.issuedate | $KohaDates %]</span></td>
106
            <span title="[% issue.issuedate %]">[% issue.issuedate | $KohaDates %]</span></td>
107
          </td>
107
          </td>
108
          <td>[% issue.issuedate | $KohaDates %]</td>
109
          <td>[% issue.issuingbranch %]</td>
108
          <td>[% issue.issuingbranch %]</td>
110
          <td>
109
          <td>
111
            [% IF issue.date_due %]
110
            [% IF issue.date_due %]
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc (-1 / +1 lines)
Lines 19-25 not use an API to fetch items that populates item.datedue. Link Here
19
        [% END %]
19
        [% END %]
20
    [% END %]
20
    [% END %]
21
[% ELSIF ( item.datedue || issue.date_due ) %]
21
[% ELSIF ( item.datedue || issue.date_due ) %]
22
  [% IF inhouse_use %]
22
  [% IF onsite_checkout %]
23
    [% IF ( OPACShowCheckoutName ) %]
23
    [% IF ( OPACShowCheckoutName ) %]
24
        Currently in local use by [% item.cardnumber %] [% item.firstname %] [% item.surname %]
24
        Currently in local use by [% item.cardnumber %] [% item.firstname %] [% item.surname %]
25
    [% ELSE %]
25
    [% ELSE %]
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt (-5 / +5 lines)
Lines 22-29 $(document).ready(function(){ Link Here
22
            var id = $(ui.tab).attr("id");
22
            var id = $(ui.tab).attr("id");
23
            if ( id == "tab_checkout" ) {
23
            if ( id == "tab_checkout" ) {
24
                table.fnFilter("checkout", 0);
24
                table.fnFilter("checkout", 0);
25
            } else if ( id == "tab_inhouse_use" ) {
25
            } else if ( id == "tab_onsite_checkout" ) {
26
                table.fnFilter("inhouse_use", 0);
26
                table.fnFilter("onsite_checkout", 0);
27
            } else { // all
27
            } else { // all
28
                table.fnFilter('', 0);
28
                table.fnFilter('', 0);
29
            }
29
            }
Lines 65-71 You have never borrowed anything from this library. Link Here
65
  <ul>
65
  <ul>
66
      <li><a href="#tabs-container" id="tab_all">All</a></li>
66
      <li><a href="#tabs-container" id="tab_all">All</a></li>
67
      <li><a href="#tabs-container" id="tab_checkout">Checkouts</a></li>
67
      <li><a href="#tabs-container" id="tab_checkout">Checkouts</a></li>
68
      <li><a href="#tabs-container" id="tab_inhouse_use">In-house use</a></li>
68
      <li><a href="#tabs-container" id="tab_onsite_checkout">On-site checkouts</a></li>
69
  </ul>
69
  </ul>
70
  <div id="tabs-container" style="overflow:hidden">
70
  <div id="tabs-container" style="overflow:hidden">
71
    <table id="readingrec">
71
    <table id="readingrec">
Lines 86-93 You have never borrowed anything from this library. Link Here
86
      [% FOREACH issue IN READING_RECORD %]
86
      [% FOREACH issue IN READING_RECORD %]
87
        <tr>
87
        <tr>
88
          <td style="display:none;">
88
          <td style="display:none;">
89
            [% IF issue.inhouse_use %]
89
            [% IF issue.onsite_checkout %]
90
              inhouse_use
90
              onsite_checkout
91
            [% ELSE %]
91
            [% ELSE %]
92
              checkout
92
              checkout
93
            [% END %]
93
            [% END %]
(-)a/svc/checkouts (-3 / +2 lines)
Lines 62-68 my $sql = ' Link Here
62
        date_due,
62
        date_due,
63
        date_due < now() as date_due_overdue,
63
        date_due < now() as date_due_overdue,
64
64
65
        inhouse_use,
65
        onsite_checkout,
66
66
67
        biblionumber,
67
        biblionumber,
68
        biblio.title,
68
        biblio.title,
Lines 152-158 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
152
        issuedate           => $c->{issuedate},
152
        issuedate           => $c->{issuedate},
153
        date_due            => $c->{date_due},
153
        date_due            => $c->{date_due},
154
        date_due_overdue    => $c->{date_due_overdue} ? JSON::true : JSON::false,
154
        date_due_overdue    => $c->{date_due_overdue} ? JSON::true : JSON::false,
155
        inhouse_use         => $c->{inhouse_use},
155
        onsite_checkout     => $c->{onsite_checkout},
156
        renewals_count      => $renewals_count,
156
        renewals_count      => $renewals_count,
157
        renewals_allowed    => $renewals_allowed,
157
        renewals_allowed    => $renewals_allowed,
158
        renewals_remaining  => $renewals_remaining,
158
        renewals_remaining  => $renewals_remaining,
159
- 

Return to bug 10860