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

(-)a/C4/Circulation.pm (-5 / +5 lines)
Lines 1184-1193 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 $dbh = C4::Context->dbh;
1188
    my $dbh = C4::Context->dbh;
1189
    my $barcodecheck=CheckValidBarcode($barcode);
1189
    my $barcodecheck=CheckValidBarcode($barcode);
1190
    $inhouse_use = ( $inhouse_use ? 1 : 0 );
1190
    $onsite_checkout = ( $onsite_checkout ? 1 : 0 );
1191
1191
1192
    if ($datedue && ref $datedue ne 'DateTime') {
1192
    if ($datedue && ref $datedue ne 'DateTime') {
1193
        $datedue = dt_from_string($datedue);
1193
        $datedue = dt_from_string($datedue);
Lines 1256-1262 sub AddIssue { Link Here
1256
        my $sth =
1256
        my $sth =
1257
          $dbh->prepare(
1257
          $dbh->prepare(
1258
                "INSERT INTO issues
1258
                "INSERT INTO issues
1259
                    (borrowernumber, itemnumber,issuedate, date_due, branchcode, inhouse_use)
1259
                    (borrowernumber, itemnumber,issuedate, date_due, branchcode, onsite_checkout)
1260
                VALUES (?,?,?,?,?,?)"
1260
                VALUES (?,?,?,?,?,?)"
1261
          );
1261
          );
1262
        unless ($datedue) {
1262
        unless ($datedue) {
Lines 1272-1278 sub AddIssue { Link Here
1272
            $issuedate->strftime('%Y-%m-%d %H:%M:00'), # issuedate
1272
            $issuedate->strftime('%Y-%m-%d %H:%M:00'), # issuedate
1273
            $datedue->strftime('%Y-%m-%d %H:%M:00'),   # date_due
1273
            $datedue->strftime('%Y-%m-%d %H:%M:00'),   # date_due
1274
            C4::Context->userenv->{'branch'},   # branchcode
1274
            C4::Context->userenv->{'branch'},   # branchcode
1275
            $inhouse_use,
1275
            $onsite_checkout,
1276
        );
1276
        );
1277
        if ( C4::Context->preference('ReturnToShelvingCart') ) { ## ReturnToShelvingCart is on, anything issued should be taken off the cart.
1277
        if ( C4::Context->preference('ReturnToShelvingCart') ) { ## ReturnToShelvingCart is on, anything issued should be taken off the cart.
1278
          CartToShelf( $item->{'itemnumber'} );
1278
          CartToShelf( $item->{'itemnumber'} );
Lines 1313-1319 sub AddIssue { Link Here
1313
        # Record the fact that this book was issued.
1313
        # Record the fact that this book was issued.
1314
        &UpdateStats({
1314
        &UpdateStats({
1315
                      branch => C4::Context->userenv->{'branch'},
1315
                      branch => C4::Context->userenv->{'branch'},
1316
                      type => ( $inhouse_use ? 'inhouse_use' : 'issue' ),
1316
                      type => ( $onsite_checkout ? 'onsite_checkout' : 'issue' ),
1317
                      amount => $charge,
1317
                      amount => $charge,
1318
                      other => ($sipmode ? "SIP-$sipmode" : ''),
1318
                      other => ($sipmode ? "SIP-$sipmode" : ''),
1319
                      itemnumber => $item->{'itemnumber'},
1319
                      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 318-324 if ($barcode) { Link Here
318
        }
318
        }
319
    }
319
    }
320
320
321
    unless( $query->param('inhouse_use') and C4::Context->preference("In-House Use Force") ) {
321
    unless( $query->param('onsite_checkout') and C4::Context->preference("On-site checkouts Force") ) {
322
        delete $question->{'DEBT'} if ($debt_confirmed);
322
        delete $question->{'DEBT'} if ($debt_confirmed);
323
        foreach my $impossible ( keys %$error ) {
323
        foreach my $impossible ( keys %$error ) {
324
            $template->param(
324
            $template->param(
Lines 343-356 if ($barcode) { Link Here
343
                    getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
343
                    getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
344
                    getBarcodeMessageIteminfo => $getmessageiteminfo->{'barcode'},
344
                    getBarcodeMessageIteminfo => $getmessageiteminfo->{'barcode'},
345
                    NEEDSCONFIRMATION  => 1,
345
                    NEEDSCONFIRMATION  => 1,
346
                    inhouse_use => $query->param('inhouse_use'),
346
                    onsite_checkout => $query->param('onsite_checkout'),
347
                );
347
                );
348
                $confirm_required = 1;
348
                $confirm_required = 1;
349
            }
349
            }
350
        }
350
        }
351
        unless($confirm_required) {
351
        unless($confirm_required) {
352
            my $inhouse_use = $query->param('inhouse_use');
352
            my $onsite_checkout = $query->param('onsite_checkout');
353
            AddIssue( $borrower, $barcode, $datedue, $cancelreserve, undef, undef, { inhouse_use => $inhouse_use } );
353
            AddIssue( $borrower, $barcode, $datedue, $cancelreserve, undef, undef, { onsite_checkout => $onsite_checkout } );
354
            $inprocess = 1;
354
            $inprocess = 1;
355
        }
355
        }
356
    }
356
    }
Lines 581-588 $template->param( Link Here
581
    canned_bor_notes_loop     => $canned_notes,
581
    canned_bor_notes_loop     => $canned_notes,
582
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
582
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
583
    todaysdate                => dt_from_string()->set(hour => 23)->set(minute => 59),
583
    todaysdate                => dt_from_string()->set(hour => 23)->set(minute => 59),
584
    inhouse_use_feature       => C4::Context->preference("In-House Use"),
585
    inhouse_use_forced        => C4::Context->preference("In-House Use Force"),
586
);
584
);
587
585
588
output_html_with_http_headers $query, $cookie, $template->output;
586
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/installer/data/mysql/kohastructure.sql (-2 / +2 lines)
Lines 1125-1131 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1125
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1125
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1126
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1126
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1127
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1127
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1128
  `inhouse_use` int(1) NOT NULL default 0, -- in house use flag
1128
  `onsite_checkout` int(1) NOT NULL default 0, -- on-site checkout flag
1129
  KEY `issuesborridx` (`borrowernumber`),
1129
  KEY `issuesborridx` (`borrowernumber`),
1130
  KEY `itemnumber_idx` (`itemnumber`),
1130
  KEY `itemnumber_idx` (`itemnumber`),
1131
  KEY `branchcode_idx` (`branchcode`),
1131
  KEY `branchcode_idx` (`branchcode`),
Lines 1597-1603 CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r Link Here
1597
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1597
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1598
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1598
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1599
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1599
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1600
  `inhouse_use` int(1) NOT NULL default 0, -- in house use flag
1600
  `onsite_checkout` int(1) NOT NULL default 0, -- On-site checkout flag
1601
  KEY `old_issuesborridx` (`borrowernumber`),
1601
  KEY `old_issuesborridx` (`borrowernumber`),
1602
  KEY `old_issuesitemidx` (`itemnumber`),
1602
  KEY `old_issuesitemidx` (`itemnumber`),
1603
  KEY `branchcode_idx` (`branchcode`),
1603
  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 8761-8780 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
8761
    $dbh->do(q{
8761
    $dbh->do(q{
8762
        INSERT IGNORE INTO systempreferences
8762
        INSERT IGNORE INTO systempreferences
8763
            (variable,value,explanation,options,type)
8763
            (variable,value,explanation,options,type)
8764
            VALUES('In-House use','0','Enable/Disable the in-house use feature','','YesNo');
8764
            VALUES('On-site checkouts','0','Enable/Disable the on-site checkouts feature','','YesNo');
8765
    });
8765
    });
8766
    $dbh->do(q{
8766
    $dbh->do(q{
8767
        INSERT IGNORE INTO systempreferences
8767
        INSERT IGNORE INTO systempreferences
8768
            (variable,value,explanation,options,type)
8768
            (variable,value,explanation,options,type)
8769
            VALUES('In-House use Force','0','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','','YesNo');
8769
            VALUES('On-site checkouts Force','0','Enable/Disable the on-site checkouts for all cases (Even if a user is debarred, etc.)','','YesNo');
8770
    });
8770
    });
8771
    $dbh->do(q{
8771
    $dbh->do(q{
8772
        ALTER TABLE issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8772
        ALTER TABLE issues ADD COLUMN onsite_checkout INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8773
    });
8773
    });
8774
    $dbh->do(q{
8774
    $dbh->do(q{
8775
        ALTER TABLE old_issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8775
        ALTER TABLE old_issues ADD COLUMN onsite_checkout INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8776
    });
8776
    });
8777
    print "Upgrade to $DBversion done (Bug 10860: Add new system preference In-House use + fields [old_]issues.inhouse_use)\n";
8777
    print "Upgrade to $DBversion done (Bug 10860: Add new system preference On-site checkouts + fields [old_]issues.onsite_checkout)\n";
8778
    SetVersion($DBversion);
8778
    SetVersion($DBversion);
8779
}
8779
}
8780
8780
(-)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 24-29 Link Here
24
    var NOT_TRANSFERRED_YET = _("Item hasn't been transferred yet from %s");
24
    var NOT_TRANSFERRED_YET = _("Item hasn't been transferred yet from %s");
25
    var NO = _("No");
25
    var NO = _("No");
26
    var YES = _("Yes");
26
    var YES = _("Yes");
27
    var INHOUSE_USE = _("In-house use");
27
    var ONSITE_CHECKOUT = _("On-site checkout");
28
//]]>
28
//]]>
29
</script>
29
</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 285-291 $(document).ready(function() { Link Here
285
                            +  "<input type='checkbox' class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>"
285
                            +  "<input type='checkbox' class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>"
286
                            +  "</span>";
286
                            +  "</span>";
287
287
288
                    if ( oObj.renewals_remaining && inhouse_use == 0 ) {
288
                    if ( oObj.renewals_remaining && oObj.onsite_checkout == 0 ) {
289
                        content += "<span class='renewals'>("
289
                        content += "<span class='renewals'>("
290
                                + RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed )
290
                                + RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed )
291
                                + ")</span>";
291
                                + ")</span>";
Lines 416-424 $(document).ready(function() { Link Here
416
                                title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
416
                                title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
417
                            }
417
                            }
418
418
419
                            var inhouse_use = '';
419
                            var onsite_checkout = '';
420
                            if ( oObj.inhouse_use == 1 ) {
420
                            if ( oObj.onsite_checkout == 1 ) {
421
                                inhouse_use += " <span class='inhouse_use'>("+INHOUSE_USE+")</span>";
421
                                onsite_checkout += " <span class='onsite_checkout'>("+ONSITE_CHECKOUT+")</span>";
422
                            }
422
                            }
423
423
424
                            title += " "
424
                            title += " "
Lines 431-437 $(document).ready(function() { Link Here
431
                                  + "'>"
431
                                  + "'>"
432
                                  + oObj.barcode
432
                                  + oObj.barcode
433
                                  + "</a>"
433
                                  + "</a>"
434
                                  + inhouse_use;
434
                                  + onsite_checkout;
435
435
436
                            return title;
436
                            return title;
437
                        }
437
                        }
(-)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 518-530 No patron matched <span class="ex">[% message %]</span> Link Here
518
          <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>
519
          <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>
519
</div>[% END %]
520
</div>[% END %]
520
521
521
      [% IF inhouse_use_feature %]
522
      [% IF Koha.Preference('On-site checkouts') %]
522
        <div class="inhouse_use-select">
523
        <div class="onsite_checkout-select">
523
          [% IF noissues %]
524
          [% IF noissues %]
524
            <input type="checkbox" id="inhouse_use" name="inhouse_use_forced" checked="checked" disabled="disabled" /> <label for="inhouse_use">In-house use</label>
525
            <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkout</label>
525
            <input type="hidden" name="inhouse_use" checked="checked" value="1" />
526
            <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
526
          [% ELSE %]
527
          [% ELSE %]
527
            <input type="checkbox" id="inhouse_use" name="inhouse_use" /> <label for="inhouse_use">In-house use</label>
528
            <input type="checkbox" id="onsite_checkout" name="onsite_checkout" /> <label for="onsite_checkout">On-site checkout</label>
528
          [% END %]
529
          [% END %]
529
        </div>
530
        </div>
530
      [% END %]
531
      [% END %]
Lines 544-550 No patron matched <span class="ex">[% message %]</span> Link Here
544
[% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
545
[% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
545
546
546
    [% IF flagged %]
547
    [% IF flagged %]
547
      [% IF NOT noissues || ( noissues && inhouse_use_forced ) %]
548
      [% IF NOT noissues || ( noissues && Koha.Preference('On-site checkouts') ) %]
548
        <div id="circmessages" class="circmessage attention">
549
        <div id="circmessages" class="circmessage attention">
549
      [% ELSE %]
550
      [% ELSE %]
550
        <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
551
        <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
Lines 553-560 No patron matched <span class="ex">[% message %]</span> Link Here
553
      <h3>
554
      <h3>
554
        [% IF noissues %]
555
        [% IF noissues %]
555
          Cannot check out!
556
          Cannot check out!
556
          [% IF inhouse_use_forced %]
557
          [% IF Koha.Preference('On-site checkouts') %]
557
            <span style="color:red;">Only in-house use is allowed</span>
558
            <span style="color:red;">Only on-site checkouts is allowed</span>
558
          [% END %]
559
          [% END %]
559
        [% ELSE %]
560
        [% ELSE %]
560
          Attention:
561
          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