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

(-)a/C4/Circulation.pm (-5 / +5 lines)
Lines 1189-1199 AddIssue does the following things : Link Here
1189
1189
1190
sub AddIssue {
1190
sub AddIssue {
1191
    my ( $borrower, $barcode, $datedue, $cancelreserve, $issuedate, $sipmode, $params ) = @_;
1191
    my ( $borrower, $barcode, $datedue, $cancelreserve, $issuedate, $sipmode, $params ) = @_;
1192
    my $inhouse_use = $params->{inhouse_use};
1192
    my $onsite_checkout = $params->{onsite_checkout};
1193
    my $auto_renew = $params->{auto_renew};
1193
    my $auto_renew = $params->{auto_renew};
1194
    my $dbh = C4::Context->dbh;
1194
    my $dbh = C4::Context->dbh;
1195
    my $barcodecheck=CheckValidBarcode($barcode);
1195
    my $barcodecheck=CheckValidBarcode($barcode);
1196
    $inhouse_use = ( $inhouse_use ? 1 : 0 );
1196
    $onsite_checkout = ( $onsite_checkout ? 1 : 0 );
1197
1197
1198
    if ($datedue && ref $datedue ne 'DateTime') {
1198
    if ($datedue && ref $datedue ne 'DateTime') {
1199
        $datedue = dt_from_string($datedue);
1199
        $datedue = dt_from_string($datedue);
Lines 1268-1274 sub AddIssue { Link Here
1268
        my $sth =
1268
        my $sth =
1269
          $dbh->prepare(
1269
          $dbh->prepare(
1270
                "INSERT INTO issues
1270
                "INSERT INTO issues
1271
                    (borrowernumber, itemnumber,issuedate, date_due, branchcode, inhouse_use, auto_renew)
1271
                    (borrowernumber, itemnumber,issuedate, date_due, branchcode, onsite_checkout, auto_renew)
1272
                VALUES (?,?,?,?,?,?,?)"
1272
                VALUES (?,?,?,?,?,?,?)"
1273
          );
1273
          );
1274
        unless ($datedue) {
1274
        unless ($datedue) {
Lines 1284-1290 sub AddIssue { Link Here
1284
            $issuedate->strftime('%Y-%m-%d %H:%M:00'), # issuedate
1284
            $issuedate->strftime('%Y-%m-%d %H:%M:00'), # issuedate
1285
            $datedue->strftime('%Y-%m-%d %H:%M:00'),   # date_due
1285
            $datedue->strftime('%Y-%m-%d %H:%M:00'),   # date_due
1286
            C4::Context->userenv->{'branch'},   # branchcode
1286
            C4::Context->userenv->{'branch'},   # branchcode
1287
            $inhouse_use,
1287
            $onsite_checkout,
1288
            $auto_renew ? 1 : 0                 # automatic renewal
1288
            $auto_renew ? 1 : 0                 # automatic renewal
1289
        );
1289
        );
1290
        if ( C4::Context->preference('ReturnToShelvingCart') ) { ## ReturnToShelvingCart is on, anything issued should be taken off the cart.
1290
        if ( C4::Context->preference('ReturnToShelvingCart') ) { ## ReturnToShelvingCart is on, anything issued should be taken off the cart.
Lines 1326-1332 sub AddIssue { Link Here
1326
        # Record the fact that this book was issued.
1326
        # Record the fact that this book was issued.
1327
        &UpdateStats({
1327
        &UpdateStats({
1328
                      branch => C4::Context->userenv->{'branch'},
1328
                      branch => C4::Context->userenv->{'branch'},
1329
                      type => ( $inhouse_use ? 'inhouse_use' : 'issue' ),
1329
                      type => ( $onsite_checkout ? 'onsite_checkout' : 'issue' ),
1330
                      amount => $charge,
1330
                      amount => $charge,
1331
                      other => ($sipmode ? "SIP-$sipmode" : ''),
1331
                      other => ($sipmode ? "SIP-$sipmode" : ''),
1332
                      itemnumber => $item->{'itemnumber'},
1332
                      itemnumber => $item->{'itemnumber'},
(-)a/C4/Items.pm (-3 / +3 lines)
Lines 1300-1307 sub GetItemsInfo { Link Here
1300
           holding.opac_info as holding_branch_opac_info,
1300
           holding.opac_info as holding_branch_opac_info,
1301
           home.opac_info as home_branch_opac_info
1301
           home.opac_info as home_branch_opac_info
1302
    ";
1302
    ";
1303
    $query .= ", issues.inhouse_use"
1303
    $query .= ", issues.onsite_checkout"
1304
        if C4::Context->preference("In-House Use");
1304
        if C4::Context->preference("On-site checkouts");
1305
    $query .= "
1305
    $query .= "
1306
     FROM items
1306
     FROM items
1307
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1307
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
Lines 1311-1317 sub GetItemsInfo { Link Here
1311
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1311
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1312
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1312
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1313
    $query .= " LEFT JOIN issues ON issues.itemnumber = items.itemnumber"
1313
    $query .= " LEFT JOIN issues ON issues.itemnumber = items.itemnumber"
1314
        if C4::Context->preference("In-House Use");
1314
        if C4::Context->preference("On-site checkouts");
1315
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1315
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1316
    my $sth = $dbh->prepare($query);
1316
    my $sth = $dbh->prepare($query);
1317
    $sth->execute($biblionumber);
1317
    $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 1128-1134 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1128
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1128
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1129
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1129
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1130
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1130
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1131
  `inhouse_use` int(1) NOT NULL default 0, -- in house use flag
1131
  `onsite_checkout` int(1) NOT NULL default 0, -- in house use flag
1132
  KEY `issuesborridx` (`borrowernumber`),
1132
  KEY `issuesborridx` (`borrowernumber`),
1133
  KEY `itemnumber_idx` (`itemnumber`),
1133
  KEY `itemnumber_idx` (`itemnumber`),
1134
  KEY `branchcode_idx` (`branchcode`),
1134
  KEY `branchcode_idx` (`branchcode`),
Lines 1602-1608 CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r Link Here
1602
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1602
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1603
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1603
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1604
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1604
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1605
  `inhouse_use` int(1) NOT NULL default 0, -- in house use flag
1605
  `onsite_checkout` int(1) NOT NULL default 0, -- in house use flag
1606
  KEY `old_issuesborridx` (`borrowernumber`),
1606
  KEY `old_issuesborridx` (`borrowernumber`),
1607
  KEY `old_issuesitemidx` (`itemnumber`),
1607
  KEY `old_issuesitemidx` (`itemnumber`),
1608
  KEY `branchcode_idx` (`branchcode`),
1608
  KEY `branchcode_idx` (`branchcode`),
(-)a/installer/data/mysql/sysprefs.sql (-2 / +2 lines)
Lines 147-154 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
147
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
147
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
148
('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'),
148
('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'),
149
('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'),
149
('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'),
150
('In-House use','0','','Enable/Disable the in-house use feature','YesNo'),
150
('On-site checkouts','0','','Enable/Disable the on-site checkouts feature','YesNo'),
151
('In-House use Force','0','','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','YesNo'),
151
('On-site checkouts Force','0','','Enable/Disable the on-site for all cases (Even if a user is debarred, etc.)','YesNo'),
152
('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
('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'),
153
('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
('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'),
154
('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'),
154
('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 8957-8976 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
8957
    $dbh->do(q{
8957
    $dbh->do(q{
8958
        INSERT IGNORE INTO systempreferences
8958
        INSERT IGNORE INTO systempreferences
8959
            (variable,value,explanation,options,type)
8959
            (variable,value,explanation,options,type)
8960
            VALUES('In-House use','0','Enable/Disable the in-house use feature','','YesNo');
8960
            VALUES('On-site checkouts','0','Enable/Disable the on-site checkouts feature','','YesNo');
8961
    });
8961
    });
8962
    $dbh->do(q{
8962
    $dbh->do(q{
8963
        INSERT IGNORE INTO systempreferences
8963
        INSERT IGNORE INTO systempreferences
8964
            (variable,value,explanation,options,type)
8964
            (variable,value,explanation,options,type)
8965
            VALUES('In-House use Force','0','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','','YesNo');
8965
            VALUES('On-site checkouts Force','0','Enable/Disable the on-site for all cases (Even if a user is debarred, etc.)','','YesNo');
8966
    });
8966
    });
8967
    $dbh->do(q{
8967
    $dbh->do(q{
8968
        ALTER TABLE issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8968
        ALTER TABLE issues ADD COLUMN onsite_checkout INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8969
    });
8969
    });
8970
    $dbh->do(q{
8970
    $dbh->do(q{
8971
        ALTER TABLE old_issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8971
        ALTER TABLE old_issues ADD COLUMN onsite_checkout INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8972
    });
8972
    });
8973
    print "Upgrade to $DBversion done (Bug 10860: Add new system preference In-House use + fields [old_]issues.inhouse_use)\n";
8973
    print "Upgrade to $DBversion done (Bug 10860: Add new system preference On-site checkouts + fields [old_]issues.onsite_checkout)\n";
8974
    SetVersion($DBversion);
8974
    SetVersion($DBversion);
8975
}
8975
}
8976
8976
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (-4 / +4 lines)
Lines 2715-2730 span.browse-button { Link Here
2715
    color : #FFF;
2715
    color : #FFF;
2716
}
2716
}
2717
2717
2718
.inhouse_use-select {
2718
.onsite_checkout-select {
2719
    font-size : 85%;
2719
    font-size : 85%;
2720
    font-weight: normal;
2720
    font-weight: normal;
2721
    padding-top : .3em;
2721
    padding-top : .3em;
2722
}
2722
}
2723
#circ_circulation_issue .inhouse_use-select label,
2723
#circ_circulation_issue .onsite_checkout-select label,
2724
.inhouse_use-select label {
2724
.onsite_checkout-select label {
2725
    font-size : inherit;
2725
    font-size : inherit;
2726
    font-weight: normal;
2726
    font-weight: normal;
2727
}
2727
}
2728
span.inhouse_use {
2728
span.onsite_checkout {
2729
    color: red;
2729
    color: red;
2730
}
2730
}
(-)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 INHOUSE_USE = _("On-site checkout");
30
//]]>
30
//]]>
31
</script>
31
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js (-9 / +9 lines)
Lines 215-223 $(document).ready(function() { Link Here
215
                            title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
215
                            title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
216
                        }
216
                        }
217
217
218
                        var inhouse_use = '';
218
                        var onsite_checkout = '';
219
                        if ( oObj.inhouse_use == 1 ) {
219
                        if ( oObj.onsite_checkout == 1 ) {
220
                            inhouse_use += " <span class='inhouse_use'>(" + INHOUSE_USE + ")</span>";
220
                            onsite_checkout += " <span class='onsite_checkout'>(" + INHOUSE_USE + ")</span>";
221
                        }
221
                        }
222
222
223
                        title += " "
223
                        title += " "
Lines 230-236 $(document).ready(function() { Link Here
230
                              + "'>"
230
                              + "'>"
231
                              + oObj.barcode
231
                              + oObj.barcode
232
                              + "</a>"
232
                              + "</a>"
233
                              + inhouse_use;
233
                              + onsite_checkout;
234
234
235
                        return title;
235
                        return title;
236
                    }
236
                    }
Lines 311-317 $(document).ready(function() { Link Here
311
                                +  "<input type='checkbox' class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>"
311
                                +  "<input type='checkbox' class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>"
312
                                +  "</span>";
312
                                +  "</span>";
313
313
314
                        if ( oObj.renewals_remaining && inhouse_use == 0 ) {
314
                        if ( oObj.renewals_remaining && onsite_checkout == 0 ) {
315
                            content += "<span class='renewals'>("
315
                            content += "<span class='renewals'>("
316
                                    + RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed )
316
                                    + RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed )
317
                                    + ")</span>";
317
                                    + ")</span>";
Lines 442-450 $(document).ready(function() { Link Here
442
                                title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
442
                                title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
443
                            }
443
                            }
444
444
445
                            var inhouse_use = '';
445
                            var onsite_checkout = '';
446
                            if ( oObj.inhouse_use == 1 ) {
446
                            if ( oObj.onsite_checkout == 1 ) {
447
                                inhouse_use += " <span class='inhouse_use'>("+INHOUSE_USE+")</span>";
447
                                onsite_checkout += " <span class='onsite_checkout'>("+INHOUSE_USE+")</span>";
448
                            }
448
                            }
449
449
450
                            title += " "
450
                            title += " "
Lines 457-463 $(document).ready(function() { Link Here
457
                                  + "'>"
457
                                  + "'>"
458
                                  + oObj.barcode
458
                                  + oObj.barcode
459
                                  + "</a>"
459
                                  + "</a>"
460
                                  + inhouse_use;
460
                                  + onsite_checkout;
461
461
462
                            return title;
462
                            return title;
463
                        }
463
                        }
(-)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 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 / +13 lines)
Lines 56-64 $(document).ready(function() { Link Here
56
    [% END %]
56
    [% END %]
57
});
57
});
58
58
59
// In-house use
59
// On-site checkout
60
function toggle_inhouse_use(){
60
function toggle_onsite_checkout(){
61
    if ( $("#inhouse_use").attr('checked') ) {
61
    if ( $("#onsite_checkout").attr('checked') ) {
62
        $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
62
        $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
63
        $("#duedatespec").datetimepicker('destroy');
63
        $("#duedatespec").datetimepicker('destroy');
64
    } else {
64
    } else {
Lines 302-308 function toggle_inhouse_use(){ Link Here
302
    [% ELSE %]
302
    [% ELSE %]
303
    <input type="submit" class="approve" value="Yes, check out (Y)" accesskey="y" />
303
    <input type="submit" class="approve" value="Yes, check out (Y)" accesskey="y" />
304
    [% END %]
304
    [% END %]
305
    <input type="hidden" name="inhouse_use" value="[% inhouse_use %]" />
305
    <input type="hidden" name="onsite_checkout" value="[% onsite_checkout %]" />
306
</form>
306
</form>
307
[% END %]
307
[% END %]
308
308
Lines 485-491 No patron matched <span class="ex">[% message %]</span> Link Here
485
485
486
[% IF ( borrowernumber ) %]
486
[% IF ( borrowernumber ) %]
487
<div class="yui-g">
487
<div class="yui-g">
488
[% IF !noissues || inhouse_use_forced %]
488
[% IF !noissues || onsite_checkout_forced %]
489
[% IF ( flagged ) %]
489
[% IF ( flagged ) %]
490
<div class="yui-u first">
490
<div class="yui-u first">
491
[% ELSE %]
491
[% ELSE %]
Lines 533-545 No patron matched <span class="ex">[% message %]</span> Link Here
533
          <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>
533
          <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>
534
</div>[% END %]
534
</div>[% END %]
535
535
536
      [% IF inhouse_use_feature %]
536
      [% IF onsite_checkout_feature %]
537
        <div class="inhouse_use-select">
537
        <div class="onsite_checkout-select">
538
          [% IF noissues %]
538
          [% IF noissues %]
539
            <input type="checkbox" id="inhouse_use" name="inhouse_use_forced" checked="checked" disabled="disabled" /> <label for="inhouse_use">In-house use</label>
539
            <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkout</label>
540
            <input type="hidden" name="inhouse_use" checked="checked" value="1" />
540
            <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
541
          [% ELSE %]
541
          [% ELSE %]
542
            <input type="checkbox" id="inhouse_use" name="inhouse_use" /> <label for="inhouse_use">In-house use</label>
542
            <input type="checkbox" id="onsite_checkout" name="onsite_checkout" /> <label for="onsite_checkout">On-site checkout</label>
543
          [% END %]
543
          [% END %]
544
        </div>
544
        </div>
545
      [% END %]
545
      [% END %]
Lines 559-565 No patron matched <span class="ex">[% message %]</span> Link Here
559
[% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
559
[% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
560
560
561
    [% IF flagged %]
561
    [% IF flagged %]
562
      [% IF NOT noissues || ( noissues && inhouse_use_forced ) %]
562
      [% IF NOT noissues || ( noissues && onsite_checkout_forced ) %]
563
        <div id="circmessages" class="circmessage attention">
563
        <div id="circmessages" class="circmessage attention">
564
      [% ELSE %]
564
      [% ELSE %]
565
        <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
565
        <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
Lines 568-575 No patron matched <span class="ex">[% message %]</span> Link Here
568
      <h3>
568
      <h3>
569
        [% IF noissues %]
569
        [% IF noissues %]
570
          Cannot check out!
570
          Cannot check out!
571
          [% IF inhouse_use_forced %]
571
          [% IF onsite_checkout_forced %]
572
            <span style="color:red;">Only in-house use is allowed</span>
572
            <span style="color:red;">Only on-site checkouts is allowed</span>
573
          [% END %]
573
          [% END %]
574
        [% ELSE %]
574
        [% ELSE %]
575
          Attention:
575
          Attention:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (-5 / +5 lines)
Lines 21-28 Link Here
21
            var id = $(ui.tab).attr("id");
21
            var id = $(ui.tab).attr("id");
22
            if ( id == "tab_checkout" ) {
22
            if ( id == "tab_checkout" ) {
23
                table.fnFilter("checkout", 0);
23
                table.fnFilter("checkout", 0);
24
            } else if ( id == "tab_inhouse_use" ) {
24
            } else if ( id == "tab_onsite_checkout" ) {
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 58-64 Link Here
58
  <ul>
58
  <ul>
59
    <li><a href="#readingrec" id="tab_all">All</a></li>
59
    <li><a href="#readingrec" id="tab_all">All</a></li>
60
    <li><a href="#readingrec" id="tab_checkout">Checkouts</a></li>
60
    <li><a href="#readingrec" id="tab_checkout">Checkouts</a></li>
61
    <li><a href="#readingrec" id="tab_inhouse_use">In-house use</a></li>
61
    <li><a href="#readingrec" id="tab_onsite_checkout">On-site checkout</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-86 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
              checkout
86
            [% END %]
86
            [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/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/svc/checkouts (-3 / +2 lines)
Lines 63-69 my $sql = ' Link Here
63
        date_due < now() as date_due_overdue,
63
        date_due < now() as date_due_overdue,
64
        issues.timestamp,
64
        issues.timestamp,
65
65
66
        inhouse_use,
66
        onsite_checkout,
67
67
68
        biblionumber,
68
        biblionumber,
69
        biblio.title,
69
        biblio.title,
Lines 154-160 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
154
        date_due            => $c->{date_due},
154
        date_due            => $c->{date_due},
155
        date_due_overdue    => $c->{date_due_overdue} ? JSON::true : JSON::false,
155
        date_due_overdue    => $c->{date_due_overdue} ? JSON::true : JSON::false,
156
        timestamp           => $c->{timestamp},
156
        timestamp           => $c->{timestamp},
157
        inhouse_use         => $c->{inhouse_use},
157
        onsite_checkout         => $c->{onsite_checkout},
158
        renewals_count      => $renewals_count,
158
        renewals_count      => $renewals_count,
159
        renewals_allowed    => $renewals_allowed,
159
        renewals_allowed    => $renewals_allowed,
160
        renewals_remaining  => $renewals_remaining,
160
        renewals_remaining  => $renewals_remaining,
161
- 

Return to bug 10860