Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members
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
..
tables Bug 28081: Make card number a label in patron search results 2021-04-14 15:25:23 +02:00
accountline-details.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
apikeys.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
boraccount.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
deletemem.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
discharge.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
discharges.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
files.tt Bug 27846: (follow-up) Add id back to breadcrumbs container 2021-04-01 18:51:38 +02:00
holdshistory.tt Bug 27990: Replace obsolete title-string sorting: Patrons 2021-04-06 15:56:31 +02:00
housebound.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
ill-requests.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
mancredit.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
maninvoice.tt Bug 28168: leave the field empty if amount variable is empty 2021-04-23 10:03:34 +02:00
member-flags.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
member-password.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
member.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
memberentrygen.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
members-update.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
merge-patrons.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
moremember-brief.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
moremember-print.tt Bug 28047: Standardize: Call number, callnumber, Call no. etc. 2021-04-06 15:56:31 +02:00
moremember.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
notices.tt Bug 27990: Replace obsolete title-string sorting: Patrons 2021-04-06 15:56:31 +02:00
pay.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
paycollect.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
printfeercpt.tt Bug 22716: (RM follow-up) missing filter and update description 2019-05-10 14:29:13 +00:00
printinvoice.tt Bug 22809: (RM follow-up) fix missing filter and update description 2019-05-10 14:43:11 +00:00
purchase-suggestions.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
readingrec.tt Bug 28047: Standardize: Call number, callnumber, Call no. etc. 2021-04-06 15:56:31 +02:00
routing-lists.tt Bug 27846: (follow-up) Add id back to breadcrumbs container 2021-04-01 18:51:38 +02:00
statistics.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00
update-child.tt Bug 26703: members folder 2021-04-21 11:16:34 +02:00