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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt (-6 / +23 lines)
Lines 181-187 Link Here
181
                              </li>
181
                              </li>
182
                              [% reasons = AuthorisedValues.Get("ADJ_REASON") %]
182
                              [% reasons = AuthorisedValues.Get("ADJ_REASON") %]
183
                              [% IF reasons.0 %]
183
                              [% IF reasons.0 %]
184
                                  <li>
184
                              <li>
185
                                      <label for="reason_[% adjustment.adjustment_id | html %]">Reason: </label>
185
                                      <label for="reason_[% adjustment.adjustment_id | html %]">Reason: </label>
186
                                      <select id="reason_[% adjustment.adjustment_id | html %]" name="reason">
186
                                      <select id="reason_[% adjustment.adjustment_id | html %]" name="reason">
187
                                          <option value="">No reason</option>
187
                                          <option value="">No reason</option>
Lines 206-218 Link Here
206
                              <li>
206
                              <li>
207
                                  <label for="budget_id_new">Fund: </label>
207
                                  <label for="budget_id_new">Fund: </label>
208
                                  <select id="budget_id_new" name="budget_id">
208
                                  <select id="budget_id_new" name="budget_id">
209
                                      <option selected="selected" value="">No fund</option>
209
                                      <option value="">No fund</option>
210
                                      [% FOREACH budget IN budgets %]
210
                                      [% FOREACH budget IN budgets %]
211
                                          <option value="[% budget.b_id | html %]">
211
                                          [% IF ( budget.selected ) %]
212
                                          [% budget.b_txt | html %]
212
                                              <option value="[% budget.b_id | html %]" selected="selected">[% budget.b_txt | html %] [% IF ( !budget.b_active ) %](inactive)[% END %]</option>
213
                                          </option>
213
                                          [% ELSIF ( budget.b_active ) %]
214
                                              <option value="[% budget.b_id | html %]">[% budget.b_txt | html %]</option>
215
                                          [% ELSE %]
216
                                              <option value="[% budget.b_id | html %]" class="ab_inactive">[% budget.b_txt | html %] (inactive)</option>
217
                                          [% END %]
214
                                      [% END %]
218
                                      [% END %]
215
                                  </select>
219
                                  </select>
220
                                  <label for="showallfunds_adj" style="float:none;width:auto;">&nbsp;Show inactive:</label>
221
                                  <input type="checkbox" id="showallfunds_adj" />
216
                              </li>
222
                              </li>
217
                              <li>
223
                              <li>
218
                                  <label for="encumber_new">Encumber while invoice open? </label>
224
                                  <label for="encumber_new">Encumber while invoice open? </label>
Lines 443-448 Link Here
443
                    $('.b_inactive').remove();
449
                    $('.b_inactive').remove();
444
                }
450
                }
445
            });
451
            });
452
            // same effort for the adjustments
453
            var adjBudgetId = $("#budget_id_new");
454
            var disabledAdjBudgetsCopy = adjBudgetId.html();
455
            $('.ab_inactive').remove();
456
            $('#showallfunds_adj').click(function() {
457
                if ($(this).is(":checked")) {
458
                    adjBudgetId.html(disabledAdjBudgetsCopy); //Puts back all the funds
459
                }
460
                else {
461
                    $('.ab_inactive').remove();
462
                }
463
            });
446
        });
464
        });
447
    </script>
465
    </script>
448
[% END %]
466
[% END %]
449
- 

Return to bug 23929