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

(-)a/admin/smart-rules.pl (-43 / +75 lines)
Lines 111-116 elsif ($op eq 'add') { Link Here
111
    my $firstremind  = $input->param('firstremind');
111
    my $firstremind  = $input->param('firstremind');
112
    my $chargeperiod = $input->param('chargeperiod');
112
    my $chargeperiod = $input->param('chargeperiod');
113
    my $maxissueqty  = $input->param('maxissueqty');
113
    my $maxissueqty  = $input->param('maxissueqty');
114
    my $maxonsiteissueqty  = $input->param('maxonsiteissueqty');
114
    my $renewalsallowed  = $input->param('renewalsallowed');
115
    my $renewalsallowed  = $input->param('renewalsallowed');
115
    my $renewalperiod    = $input->param('renewalperiod');
116
    my $renewalperiod    = $input->param('renewalperiod');
116
    my $norenewalbefore  = $input->param('norenewalbefore');
117
    my $norenewalbefore  = $input->param('norenewalbefore');
Lines 120-125 elsif ($op eq 'add') { Link Here
120
    my $onshelfholds     = $input->param('onshelfholds') || 0;
121
    my $onshelfholds     = $input->param('onshelfholds') || 0;
121
    $maxissueqty =~ s/\s//g;
122
    $maxissueqty =~ s/\s//g;
122
    $maxissueqty = undef if $maxissueqty !~ /^\d+/;
123
    $maxissueqty = undef if $maxissueqty !~ /^\d+/;
124
    $maxonsiteissueqty =~ s/\s//g;
125
    $maxonsiteissueqty = undef if $maxonsiteissueqty !~ /^\d+/;
123
    my $issuelength  = $input->param('issuelength');
126
    my $issuelength  = $input->param('issuelength');
124
    my $lengthunit  = $input->param('lengthunit');
127
    my $lengthunit  = $input->param('lengthunit');
125
    my $hardduedate = $input->param('hardduedate');
128
    my $hardduedate = $input->param('hardduedate');
Lines 128-134 elsif ($op eq 'add') { Link Here
128
    my $rentaldiscount = $input->param('rentaldiscount');
131
    my $rentaldiscount = $input->param('rentaldiscount');
129
    my $opacitemholds = $input->param('opacitemholds') || 0;
132
    my $opacitemholds = $input->param('opacitemholds') || 0;
130
    my $overduefinescap = $input->param('overduefinescap') || undef;
133
    my $overduefinescap = $input->param('overduefinescap') || undef;
131
    $debug and warn "Adding $br, $bor, $itemtype, $fine, $maxissueqty";
134
    $debug and warn "Adding $br, $bor, $itemtype, $fine, $maxissueqty, $maxonsiteissueqty";
132
135
133
    my $schema = Koha::Database->new()->schema();
136
    my $schema = Koha::Database->new()->schema();
134
    my $rs = $schema->resultset('Issuingrule');
137
    my $rs = $schema->resultset('Issuingrule');
Lines 143-148 elsif ($op eq 'add') { Link Here
143
        firstremind        => $firstremind,
146
        firstremind        => $firstremind,
144
        chargeperiod       => $chargeperiod,
147
        chargeperiod       => $chargeperiod,
145
        maxissueqty        => $maxissueqty,
148
        maxissueqty        => $maxissueqty,
149
        maxonsiteissueqty  => $maxonsiteissueqty,
146
        renewalsallowed    => $renewalsallowed,
150
        renewalsallowed    => $renewalsallowed,
147
        renewalperiod      => $renewalperiod,
151
        renewalperiod      => $renewalperiod,
148
        norenewalbefore    => $norenewalbefore,
152
        norenewalbefore    => $norenewalbefore,
Lines 164-173 elsif ($op eq 'add') { Link Here
164
elsif ($op eq "set-branch-defaults") {
168
elsif ($op eq "set-branch-defaults") {
165
    my $categorycode  = $input->param('categorycode');
169
    my $categorycode  = $input->param('categorycode');
166
    my $maxissueqty   = $input->param('maxissueqty');
170
    my $maxissueqty   = $input->param('maxissueqty');
171
    my $maxonsiteissueqty = $input->param('maxonsiteissueqty');
167
    my $holdallowed   = $input->param('holdallowed');
172
    my $holdallowed   = $input->param('holdallowed');
168
    my $returnbranch  = $input->param('returnbranch');
173
    my $returnbranch  = $input->param('returnbranch');
169
    $maxissueqty =~ s/\s//g;
174
    $maxissueqty =~ s/\s//g;
170
    $maxissueqty = undef if $maxissueqty !~ /^\d+/;
175
    $maxissueqty = undef if $maxissueqty !~ /^\d+/;
176
    $maxonsiteissueqty =~ s/\s//g;
177
    $maxonsiteissueqty = undef if $maxonsiteissueqty !~ /^\d+/;
171
    $holdallowed =~ s/\s//g;
178
    $holdallowed =~ s/\s//g;
172
    $holdallowed = undef if $holdallowed !~ /^\d+/;
179
    $holdallowed = undef if $holdallowed !~ /^\d+/;
173
180
Lines 175-288 elsif ($op eq "set-branch-defaults") { Link Here
175
        my $sth_search = $dbh->prepare("SELECT count(*) AS total
182
        my $sth_search = $dbh->prepare("SELECT count(*) AS total
176
                                        FROM default_circ_rules");
183
                                        FROM default_circ_rules");
177
        my $sth_insert = $dbh->prepare("INSERT INTO default_circ_rules
184
        my $sth_insert = $dbh->prepare("INSERT INTO default_circ_rules
178
                                        (maxissueqty, holdallowed, returnbranch)
185
                                        (maxissueqty, maxonsiteissueqty, holdallowed, returnbranch)
179
                                        VALUES (?, ?, ?)");
186
                                        VALUES (?, ?, ?, ?)");
180
        my $sth_update = $dbh->prepare("UPDATE default_circ_rules
187
        my $sth_update = $dbh->prepare("UPDATE default_circ_rules
181
                                        SET maxissueqty = ?, holdallowed = ?, returnbranch = ?");
188
                                        SET maxissueqty = ?, maxonsiteissueqty = ?, holdallowed = ?, returnbranch = ?");
182
189
183
        $sth_search->execute();
190
        $sth_search->execute();
184
        my $res = $sth_search->fetchrow_hashref();
191
        my $res = $sth_search->fetchrow_hashref();
185
        if ($res->{total}) {
192
        if ($res->{total}) {
186
            $sth_update->execute($maxissueqty, $holdallowed, $returnbranch);
193
            $sth_update->execute($maxissueqty, $maxonsiteissueqty, $holdallowed, $returnbranch);
187
        } else {
194
        } else {
188
            $sth_insert->execute($maxissueqty, $holdallowed, $returnbranch);
195
            $sth_insert->execute($maxissueqty, $maxonsiteissueqty, $holdallowed, $returnbranch);
189
        }
196
        }
190
    } else {
197
    } else {
191
        my $sth_search = $dbh->prepare("SELECT count(*) AS total
198
        my $sth_search = $dbh->prepare("SELECT count(*) AS total
192
                                        FROM default_branch_circ_rules
199
                                        FROM default_branch_circ_rules
193
                                        WHERE branchcode = ?");
200
                                        WHERE branchcode = ?");
194
        my $sth_insert = $dbh->prepare("INSERT INTO default_branch_circ_rules
201
        my $sth_insert = $dbh->prepare("INSERT INTO default_branch_circ_rules
195
                                        (branchcode, maxissueqty, holdallowed, returnbranch)
202
                                        (branchcode, maxissueqty, maxonsiteissueqty, holdallowed, returnbranch)
196
                                        VALUES (?, ?, ?, ?)");
203
                                        VALUES (?, ?, ?, ?, ?)");
197
        my $sth_update = $dbh->prepare("UPDATE default_branch_circ_rules
204
        my $sth_update = $dbh->prepare("UPDATE default_branch_circ_rules
198
                                        SET maxissueqty = ?, holdallowed = ?, returnbranch = ?
205
                                        SET maxissueqty = ?, maxonsiteissueqty = ?, holdallowed = ?, returnbranch = ?
199
                                        WHERE branchcode = ?");
206
                                        WHERE branchcode = ?");
200
        $sth_search->execute($branch);
207
        $sth_search->execute($branch);
201
        my $res = $sth_search->fetchrow_hashref();
208
        my $res = $sth_search->fetchrow_hashref();
202
        if ($res->{total}) {
209
        if ($res->{total}) {
203
            $sth_update->execute($maxissueqty, $holdallowed, $returnbranch, $branch);
210
            $sth_update->execute($maxissueqty, $maxonsiteissueqty, $holdallowed, $returnbranch, $branch);
204
        } else {
211
        } else {
205
            $sth_insert->execute($branch, $maxissueqty, $holdallowed, $returnbranch);
212
            $sth_insert->execute($branch, $maxissueqty, $maxonsiteissueqty, $holdallowed, $returnbranch);
206
        }
213
        }
207
    }
214
    }
208
}
215
}
209
elsif ($op eq "add-branch-cat") {
216
elsif ($op eq "add-branch-cat") {
210
    my $categorycode  = $input->param('categorycode');
217
    my $categorycode  = $input->param('categorycode');
211
    my $maxissueqty   = $input->param('maxissueqty');
218
    my $maxissueqty   = $input->param('maxissueqty');
219
    my $maxonsiteissueqty = $input->param('maxonsiteissueqty');
212
    $maxissueqty =~ s/\s//g;
220
    $maxissueqty =~ s/\s//g;
213
    $maxissueqty = undef if $maxissueqty !~ /^\d+/;
221
    $maxissueqty = undef if $maxissueqty !~ /^\d+/;
222
    $maxonsiteissueqty =~ s/\s//g;
223
    $maxonsiteissueqty = undef if $maxonsiteissueqty !~ /^\d+/;
214
224
215
    if ($branch eq "*") {
225
    if ($branch eq "*") {
216
        if ($categorycode eq "*") {
226
        if ($categorycode eq "*") {
217
            my $sth_search = $dbh->prepare("SELECT count(*) AS total
227
            my $sth_search = $dbh->prepare("SELECT count(*) AS total
218
                                            FROM default_circ_rules");
228
                                            FROM default_circ_rules");
219
            my $sth_insert = $dbh->prepare("INSERT INTO default_circ_rules
229
            my $sth_insert = $dbh->prepare(q|
220
                                            (maxissueqty)
230
                INSERT INTO default_circ_rules
221
                                            VALUES (?)");
231
                    (maxissueqty, maxonsiteissueqty)
222
            my $sth_update = $dbh->prepare("UPDATE default_circ_rules
232
                    VALUES (?, ?)
223
                                            SET maxissueqty = ?");
233
            |);
234
            my $sth_update = $dbh->prepare(q|
235
                UPDATE default_circ_rules
236
                SET maxissueqty = ?,
237
                    maxonsiteissueqty = ?
238
            |);
224
239
225
            $sth_search->execute();
240
            $sth_search->execute();
226
            my $res = $sth_search->fetchrow_hashref();
241
            my $res = $sth_search->fetchrow_hashref();
227
            if ($res->{total}) {
242
            if ($res->{total}) {
228
                $sth_update->execute($maxissueqty);
243
                $sth_update->execute($maxissueqty, $maxonsiteissueqty);
229
            } else {
244
            } else {
230
                $sth_insert->execute($maxissueqty);
245
                $sth_insert->execute($maxissueqty, $maxonsiteissueqty);
231
            }
246
            }
232
        } else {
247
        } else {
233
            my $sth_search = $dbh->prepare("SELECT count(*) AS total
248
            my $sth_search = $dbh->prepare("SELECT count(*) AS total
234
                                            FROM default_borrower_circ_rules
249
                                            FROM default_borrower_circ_rules
235
                                            WHERE categorycode = ?");
250
                                            WHERE categorycode = ?");
236
            my $sth_insert = $dbh->prepare("INSERT INTO default_borrower_circ_rules
251
            my $sth_insert = $dbh->prepare(q|
237
                                            (categorycode, maxissueqty)
252
                INSERT INTO default_borrower_circ_rules
238
                                            VALUES (?, ?)");
253
                    (categorycode, maxissueqty, maxonsiteissueqty)
239
            my $sth_update = $dbh->prepare("UPDATE default_borrower_circ_rules
254
                    VALUES (?, ?, ?)
240
                                            SET maxissueqty = ?
255
            |);
241
                                            WHERE categorycode = ?");
256
            my $sth_update = $dbh->prepare(q|
257
                UPDATE default_borrower_circ_rules
258
                SET maxissueqty = ?,
259
                    maxonsiteissueqty = ?
260
                WHERE categorycode = ?
261
            |);
242
            $sth_search->execute($branch);
262
            $sth_search->execute($branch);
243
            my $res = $sth_search->fetchrow_hashref();
263
            my $res = $sth_search->fetchrow_hashref();
244
            if ($res->{total}) {
264
            if ($res->{total}) {
245
                $sth_update->execute($maxissueqty, $categorycode);
265
                $sth_update->execute($maxissueqty, $maxonsiteissueqty, $categorycode);
246
            } else {
266
            } else {
247
                $sth_insert->execute($categorycode, $maxissueqty);
267
                $sth_insert->execute($categorycode, $maxissueqty, $maxonsiteissueqty);
248
            }
268
            }
249
        }
269
        }
250
    } elsif ($categorycode eq "*") {
270
    } elsif ($categorycode eq "*") {
251
        my $sth_search = $dbh->prepare("SELECT count(*) AS total
271
        my $sth_search = $dbh->prepare("SELECT count(*) AS total
252
                                        FROM default_branch_circ_rules
272
                                        FROM default_branch_circ_rules
253
                                        WHERE branchcode = ?");
273
                                        WHERE branchcode = ?");
254
        my $sth_insert = $dbh->prepare("INSERT INTO default_branch_circ_rules
274
        my $sth_insert = $dbh->prepare(q|
255
                                        (branchcode, maxissueqty)
275
            INSERT INTO default_branch_circ_rules
256
                                        VALUES (?, ?)");
276
            (branchcode, maxissueqty, maxonsiteissueqty)
257
        my $sth_update = $dbh->prepare("UPDATE default_branch_circ_rules
277
            VALUES (?, ?, ?)
258
                                        SET maxissueqty = ?
278
        |);
259
                                        WHERE branchcode = ?");
279
        my $sth_update = $dbh->prepare(q|
280
            UPDATE default_branch_circ_rules
281
            SET maxissueqty = ?,
282
                maxonsiteissueqty = ?
283
            WHERE branchcode = ?
284
        |);
260
        $sth_search->execute($branch);
285
        $sth_search->execute($branch);
261
        my $res = $sth_search->fetchrow_hashref();
286
        my $res = $sth_search->fetchrow_hashref();
262
        if ($res->{total}) {
287
        if ($res->{total}) {
263
            $sth_update->execute($maxissueqty, $branch);
288
            $sth_update->execute($maxissueqty, $maxonsiteissueqty, $branch);
264
        } else {
289
        } else {
265
            $sth_insert->execute($branch, $maxissueqty);
290
            $sth_insert->execute($branch, $maxissueqty, $maxonsiteissueqty);
266
        }
291
        }
267
    } else {
292
    } else {
268
        my $sth_search = $dbh->prepare("SELECT count(*) AS total
293
        my $sth_search = $dbh->prepare("SELECT count(*) AS total
269
                                        FROM branch_borrower_circ_rules
294
                                        FROM branch_borrower_circ_rules
270
                                        WHERE branchcode = ?
295
                                        WHERE branchcode = ?
271
                                        AND   categorycode = ?");
296
                                        AND   categorycode = ?");
272
        my $sth_insert = $dbh->prepare("INSERT INTO branch_borrower_circ_rules
297
        my $sth_insert = $dbh->prepare(q|
273
                                        (branchcode, categorycode, maxissueqty)
298
            INSERT INTO branch_borrower_circ_rules
274
                                        VALUES (?, ?, ?)");
299
            (branchcode, categorycode, maxissueqty, maxonsiteissueqty)
275
        my $sth_update = $dbh->prepare("UPDATE branch_borrower_circ_rules
300
            VALUES (?, ?, ?, ?)
276
                                        SET maxissueqty = ?
301
        |);
277
                                        WHERE branchcode = ?
302
        my $sth_update = $dbh->prepare(q|
278
                                        AND categorycode = ?");
303
            UPDATE branch_borrower_circ_rules
304
            SET maxissueqty = ?,
305
                maxonsiteissueqty = ?
306
            WHERE branchcode = ?
307
            AND categorycode = ?
308
        |);
279
309
280
        $sth_search->execute($branch, $categorycode);
310
        $sth_search->execute($branch, $categorycode);
281
        my $res = $sth_search->fetchrow_hashref();
311
        my $res = $sth_search->fetchrow_hashref();
282
        if ($res->{total}) {
312
        if ($res->{total}) {
283
            $sth_update->execute($maxissueqty, $branch, $categorycode);
313
            $sth_update->execute($maxissueqty, $maxonsiteissueqty, $branch, $categorycode);
284
        } else {
314
        } else {
285
            $sth_insert->execute($branch, $categorycode, $maxissueqty);
315
            $sth_insert->execute($branch, $categorycode, $maxissueqty, $maxonsiteissueqty);
286
        }
316
        }
287
    }
317
    }
288
}
318
}
Lines 455-460 my @sorted_branch_cat_rules = sort { $a->{'humancategorycode'} cmp $b->{'humanca Link Here
455
# note undef maxissueqty so that template can deal with them
485
# note undef maxissueqty so that template can deal with them
456
foreach my $entry (@sorted_branch_cat_rules, @sorted_row_loop) {
486
foreach my $entry (@sorted_branch_cat_rules, @sorted_row_loop) {
457
    $entry->{unlimited_maxissueqty} = 1 unless defined($entry->{maxissueqty});
487
    $entry->{unlimited_maxissueqty} = 1 unless defined($entry->{maxissueqty});
488
    $entry->{unlimited_maxonsiteissueqty} = 1 unless defined($entry->{maxonsiteissueqty});
458
}
489
}
459
490
460
@sorted_row_loop = sort by_category_and_itemtype @row_loop;
491
@sorted_row_loop = sort by_category_and_itemtype @row_loop;
Lines 516-521 if ($defaults) { Link Here
516
    $template->param(default_holdallowed_same => 1) if($defaults->{holdallowed} == 1);
547
    $template->param(default_holdallowed_same => 1) if($defaults->{holdallowed} == 1);
517
    $template->param(default_holdallowed_any => 1) if($defaults->{holdallowed} == 2);
548
    $template->param(default_holdallowed_any => 1) if($defaults->{holdallowed} == 2);
518
    $template->param(default_maxissueqty => $defaults->{maxissueqty});
549
    $template->param(default_maxissueqty => $defaults->{maxissueqty});
550
    $template->param(default_maxonsiteissueqty => $defaults->{maxonsiteissueqty});
519
    $template->param(default_returnbranch => $defaults->{returnbranch});
551
    $template->param(default_returnbranch => $defaults->{returnbranch});
520
}
552
}
521
553
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-4 / +22 lines)
Lines 38-44 $(document).ready(function() { Link Here
38
                itm = $(this).text();
38
                itm = $(this).text();
39
                itm = itm.replace(/^\s*|\s*$/g,'');
39
                itm = itm.replace(/^\s*|\s*$/g,'');
40
                var current_column = $("#edit_row td:eq("+i+")");
40
                var current_column = $("#edit_row td:eq("+i+")");
41
                if ( i != 5 ) {
41
                if ( i != 6 ) {
42
                    $(current_column).find("input[type='text']").val(itm);
42
                    $(current_column).find("input[type='text']").val(itm);
43
                    // select the corresponding option
43
                    // select the corresponding option
44
                    $(current_column).find("select option").each(function(){
44
                    $(current_column).find("select option").each(function(){
Lines 58-65 $(document).ready(function() { Link Here
58
                        // Remove potential previous input added
58
                        // Remove potential previous input added
59
                        $(current_column).find("input").remove();
59
                        $(current_column).find("input").remove();
60
                        $(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />");
60
                        $(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />");
61
                    } else if ( i == 2 ) {
61
                    } else if ( i == 2 || i == 3 ) {
62
                        // If the value is not an integer for "Current checkouts allowed"
62
                        // If the value is not an integer for "Current checkouts allowed" or "Current on-site checkouts allowed"
63
                        // The value is "Unlimited" (or an equivalent translated string)
63
                        // The value is "Unlimited" (or an equivalent translated string)
64
                        // an it should be set to an empty string
64
                        // an it should be set to an empty string
65
                        if( !((parseFloat(itm) == parseInt(itm)) && !isNaN(itm)) ) {
65
                        if( !((parseFloat(itm) == parseInt(itm)) && !isNaN(itm)) ) {
Lines 142-147 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
142
                <th>Patron category</th>
142
                <th>Patron category</th>
143
                <th>Item type</th>
143
                <th>Item type</th>
144
                <th>Current checkouts allowed</th>
144
                <th>Current checkouts allowed</th>
145
                <th>Current on-site checkouts allowed</th>
145
                <th>Loan period</th>
146
                <th>Loan period</th>
146
                <th>Unit</th>
147
                <th>Unit</th>
147
                <th>Hard due date</th>
148
                <th>Hard due date</th>
Lines 183-188 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
183
									[% rule.maxissueqty %]
184
									[% rule.maxissueqty %]
184
								[% END %]
185
								[% END %]
185
							</td>
186
							</td>
187
                            <td>[% IF rule.unlimited_maxonsiteissueqty %]
188
                                    Unlimited
189
                                [% ELSE %]
190
                                    [% rule.maxonsiteissueqty %]
191
                                [% END %]
192
                            </td>
186
							<td>[% rule.issuelength %]</td>
193
							<td>[% rule.issuelength %]</td>
187
							<td>
194
							<td>
188
							    [% rule.lengthunit %]
195
							    [% rule.lengthunit %]
Lines 247-252 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
247
                        </select>
254
                        </select>
248
                    </td>
255
                    </td>
249
                    <td><input type="text" name="maxissueqty" id="maxissueqty" size="3" /></td>
256
                    <td><input type="text" name="maxissueqty" id="maxissueqty" size="3" /></td>
257
                    <td><input type="text" name="maxonsiteissueqty" id="maxonsiteissueqty" size="3" /></td>
250
                    <td><input type="text" name="issuelength" id="issuelength" size="3" /> </td>
258
                    <td><input type="text" name="issuelength" id="issuelength" size="3" /> </td>
251
                    <td>
259
                    <td>
252
                      <select name="lengthunit" id="lengthunit">
260
                      <select name="lengthunit" id="lengthunit">
Lines 338-343 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
338
                <tr>
346
                <tr>
339
                    <th>&nbsp;</th>
347
                    <th>&nbsp;</th>
340
                    <th>Total current checkouts allowed</th>
348
                    <th>Total current checkouts allowed</th>
349
                    <th>Total current on-site checkouts allowed</th>
341
                    <th>Hold policy</th>
350
                    <th>Hold policy</th>
342
                    <th>Return policy</th>
351
                    <th>Return policy</th>
343
                    <th>&nbsp;</th>
352
                    <th>&nbsp;</th>
Lines 346-351 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
346
                <tr>
355
                <tr>
347
                    <td><em>Defaults[% UNLESS ( default_rules ) %] (not set)[% END %]</em></td>
356
                    <td><em>Defaults[% UNLESS ( default_rules ) %] (not set)[% END %]</em></td>
348
                    <td><input type="text" name="maxissueqty" size="3" value="[% default_maxissueqty %]"/></td>
357
                    <td><input type="text" name="maxissueqty" size="3" value="[% default_maxissueqty %]"/></td>
358
                    <td><input type="text" name="maxonsiteissueqty" size="3" value="[% default_onsitemaxissueqty %]"/></td>
349
                    <td>
359
                    <td>
350
                        <select name="holdallowed">
360
                        <select name="holdallowed">
351
                            [% IF ( default_holdallowed_any ) %]
361
                            [% IF ( default_holdallowed_any ) %]
Lines 420-425 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
420
                <tr>
430
                <tr>
421
                    <th>Patron category</th>
431
                    <th>Patron category</th>
422
                    <th>Total current checkouts allowed</th>
432
                    <th>Total current checkouts allowed</th>
433
                    <th>Total current on-site checkouts allowed</th>
423
                    <th>&nbsp;</th>
434
                    <th>&nbsp;</th>
424
                </tr>
435
                </tr>
425
                [% FOREACH branch_cat_rule_loo IN branch_cat_rule_loop %]
436
                [% FOREACH branch_cat_rule_loo IN branch_cat_rule_loop %]
Lines 440-445 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
440
                                [% branch_cat_rule_loo.maxissueqty %]
451
                                [% branch_cat_rule_loo.maxissueqty %]
441
                            [% END %]
452
                            [% END %]
442
                        </td>
453
                        </td>
454
                        <td>[% IF ( branch_cat_rule_loo.unlimited_maxonsiteissueqty ) %]
455
                                Unlimited
456
                            [% ELSE %]
457
                                [% branch_cat_rule_loo.maxonsiteissueqty %]
458
                            [% END %]
459
                        </td>
460
443
                        <td>
461
                        <td>
444
                            <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&amp;categorycode=[% branch_cat_rule_loo.categorycode %]&amp;branch=[% current_branch %]">Delete</a>
462
                            <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&amp;categorycode=[% branch_cat_rule_loo.categorycode %]&amp;branch=[% current_branch %]">Delete</a>
445
                        </td>
463
                        </td>
Lines 454-459 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
454
                        </select>
472
                        </select>
455
                    </td>
473
                    </td>
456
                    <td><input name="maxissueqty" size="3" /></td>
474
                    <td><input name="maxissueqty" size="3" /></td>
475
                    <td><input name="maxonsiteissueqty" size="3" /></td>
457
                    <td><input type="submit" value="Add" class="submit" /></td>
476
                    <td><input type="submit" value="Add" class="submit" /></td>
458
                </tr>
477
                </tr>
459
            </table>
478
            </table>
460
- 

Return to bug 14045