Bug 34985: Add a quantity field to the manual invoice form
authorHammat Wele <hammat.wele@inlibro.com>
Wed, 4 Oct 2023 17:36:05 +0000 (17:36 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Wed, 8 Nov 2023 20:41:36 +0000 (17:41 -0300)
commit1558e8c1654759124538e8bb40f3ba007a7d9bca
tree01b80ab2fc16a1b50ae0a058d5a3aa29190739d5
parent46b8650858b3a5a057775e7283751c021477c852
Bug 34985: Add a quantity field to the manual invoice form

This patch add a Quantity field and a Cost field to the manual invoice form this will allow to automatically multiply the amount when it has a default amount.

Test plan:

1) Apply the patch
2) Create multiple charge types some with default amount and some without default amount
    1-1) Go to Administraion -> Debit types
    1-2) Click on New Debit types
    1-3) Fill the form check the "Can be manually invoiced?" field
    1-5) Click on save
3) Create a manual invoice
    2-1) Find a patrons
    2-2) Click on Accounting tab
    2-3) Click on Create manual invoice tab
    2-4) Select a type with default amount set
        ->Cost field and Quantity field should be added to the form
    2-5) Edit the Cost field or Quantity field
        ->The amount will be automatically calculate
    2-6) Select a type with no default amount set
        ->Cost field and Quantity field should not be added to the form

Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt