[Bug 34922] New: Populate amount with replacementprice/price when creating an invoice
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34922 Bug ID: 34922 Summary: Populate amount with replacementprice/price when creating an invoice Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Some librarians would find it handy if the "amount" field was populated with the replacementprice/price after adding the barcode to a manual invoice. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34922 Sam Lau <samalau@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |samalau@gmail.com Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |samalau@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34922 Sam Lau <samalau@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34922 --- Comment #1 from Sam Lau <samalau@gmail.com> --- Created attachment 170666 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170666&action=edit Bug 34922: Auto populate amount for an invoice with replacement_price associated with the barcode This patch allows for the "amount" field to be automatically populated with the replacement_price or the purchase_price after entering a barcode. If no barcode is enter (or an invalid barcode is entered), the "amount" field defaults to the default amount for that invoice type. To test: 1) Make an item with a barcode of '10' and a replacement price of 4 2) Make another item with a barcode of '101' and a purchase price of 6 3) Make a third item with a barcode of '1010' and leave prices blank. 4) Apply patch, restart_all 5) Visit a patron's accounting tab. 6) Click on 'Create manual invoice' 7) Type in the barcode '10', notice the "Amount" automatically fills to 4 8) Now add another 1 to the barcode, note the amount changes to 6 (no replacement price so default to purchase price) 9) Add another 0, now the amount goes to the defualt value that it was before. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34922 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34922 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170666|0 |1 is obsolete| | --- Comment #2 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 170687 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170687&action=edit Bug 34922: Auto populate amount for an invoice with replacement_price associated with the barcode This patch allows for the "amount" field to be automatically populated with the replacement_price or the purchase_price after entering a barcode. If no barcode is enter (or an invalid barcode is entered), the "amount" field defaults to the default amount for that invoice type. To test: 1) Make an item with a barcode of '10' and a replacement price of 4 2) Make another item with a barcode of '101' and a purchase price of 6 3) Make a third item with a barcode of '1010' and leave prices blank. 4) Apply patch, restart_all 5) Visit a patron's accounting tab. 6) Click on 'Create manual invoice' 7) Type in the barcode '10', notice the "Amount" automatically fills to 4 8) Now add another 1 to the barcode, note the amount changes to 6 (no replacement price so default to purchase price) 9) Add another 0, now the amount goes to the defualt value that it was before. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34922 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- This is pretty cool, Sam. But I think we need some kind of switch because: 1- Libraries might not like the auto fill behavior and want to turn it off. 2- var replacementPrice = matchedItem.replacement_price || matchedItem.purchase_price; It gets replacement_price, unless there is none, then falls back to purchase_price. Some libraries may prefer one or the other. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34922 Katie Bliss <kebliss@dmpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kebliss@dmpl.org -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org