Koha/koha-tmpl/intranet-tmpl/prog/en/modules
Petro Vashchuk 34575f1f1a Bug 28168: leave the field empty if amount variable is empty
Add "if" check to the template so that it uses the value of
"debit_type.default_amount" only if it's true, i.e. not null or 0.

The reason for this patch is there's requirement from librarians -
to have this field completely empty if it's 0, so they could paste the
amount (as they usually do) without the need to clear the field first.
And anyway if you try to save the form with 0.00 value,
it won't accept it saying "Debit amount passed is not positive" so
in my opinion there's no point to preset it with zeroes to begin with.

To reproduce:
    1) head to /cgi-bin/koha/members/maninvoice.pl?borrowernumber=XXXX
    and check that field "Amount" is prefilled with 0.00;
    2) apply patch;
    3) refresh page and ensure that field "Amount" is empty now;
    4) go to /cgi-bin/koha/admin/debit_types.pl and change default
    amount to some decimal amount;
    5) refresh manual invoice page again and ensure that "Amount"
    field is prefilled with that exact decimal number;

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-23 10:03:34 +02:00
..
acqui Bug 27240: Basket export cleanup. 2021-04-22 14:50:11 +02:00
admin Bug 23207: (QA follow-up) Add new column on item types UI table 2021-04-22 11:11:05 +02:00
authorities Bug 26703: authorities, basket and batch folders 2021-04-21 11:16:33 +02:00
basket Bug 26703: authorities, basket and batch folders 2021-04-21 11:16:33 +02:00
batch Bug 26703: authorities, basket and batch folders 2021-04-21 11:16:33 +02:00
catalogue Bug 27120: (follow-up) also send biblionumber 2021-04-22 14:37:14 +02:00
cataloguing Bug 26703: cataloguing folder 2021-04-21 11:16:33 +02:00
circ Bug 28064: (QA follow-up) Remove value from button 2021-04-22 14:50:12 +02:00
clubs Bug 26703: clubs, common & course_reserves folders 2021-04-21 11:16:34 +02:00
common Bug 26703: clubs, common & course_reserves folders 2021-04-21 11:16:34 +02:00
course_reserves Bug 26703: clubs, common & course_reserves folders 2021-04-21 11:16:34 +02:00
errors Bug 26703: errors, ill and installer folders 2021-04-21 11:16:34 +02:00
ill Bug 26703: errors, ill and installer folders 2021-04-21 11:16:34 +02:00
installer Bug 26703: errors, ill and installer folders 2021-04-21 11:16:34 +02:00
labels Bug 28119: Use full description in layout type selection 2021-04-21 15:25:07 +02:00
mana
members Bug 28168: leave the field empty if amount variable is empty 2021-04-23 10:03:34 +02:00
offline_circ Bug 26703: offline_circ and onboarding folders 2021-04-21 11:16:34 +02:00
onboarding Bug 26703: offline_circ and onboarding folders 2021-04-21 11:16:34 +02:00
patron_lists Bug 26703: patroncards and patron_lists folders 2021-04-21 11:16:35 +02:00
patroncards Bug 26703: patroncards and patron_lists folders 2021-04-21 11:16:35 +02:00
plugins Bug 26703: plugins and pos folders 2021-04-21 11:16:35 +02:00
pos Bug 28127: add transaction timestamp to register details tables 2021-04-21 15:25:07 +02:00
reports Bug 27644: (QA follow-up) Remove size=1 from template 2021-04-21 15:25:07 +02:00
reserve Bug 16787: (follow-up) Add noReservesAllowed to ERROR_MAP 2021-04-22 14:50:11 +02:00
reviews Bug 26703: reserve, reviews & rotating_collections folders 2021-04-21 11:16:35 +02:00
rotating_collections Bug 26703: reserve, reviews & rotating_collections folders 2021-04-21 11:16:35 +02:00
serials Bug 23243: (follow-up) Update wording as requested 2021-04-21 15:25:07 +02:00
services
suggestion Bug 26703: suggestion and tags folders 2021-04-21 11:16:35 +02:00
tags Bug 26703: suggestion and tags folders 2021-04-21 11:16:35 +02:00
test
tools Bug 26703: (follow-up) remove starting separator from csv profiles title 2021-04-21 11:16:35 +02:00
virtualshelves Bug 26703: virtualshelves folder 2021-04-21 11:16:35 +02:00
about.tt Bug 26703: modules and modules/acqui folders 2021-04-21 11:16:33 +02:00
auth.tt Bug 26703: (follow-up) fixed some page titles in files 2021-04-22 09:09:28 +02:00
intranet-main.tt