[Bug 6832] New: Validation of total > budget in neworderempty
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Bug #: 6832 Summary: Validation of total > budget in neworderempty Classification: Unclassified Change sponsored?: --- Product: Koha Version: rel_3_2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 Component: Acquisitions AssignedTo: henridamien@koha-fr.org ReportedBy: pelletiermaxime@gmail.com QAContact: koha-bugs@lists.koha-community.org Created attachment 5264 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5264 [PATCH] Fix multiple bugs and refactor the code to fix the alert of the total exceeding the budget in neworderempty The javascript function totalExceedsBudget never returns anything. Refactored it to use jQuery for the ajax stuff and to make it work. Only 1 line changed in a tmpl, so should be easy to adapt for 3.4. Steps to reproduce : Create a new order in a basket. Set a total higher than the total of the selected budget. You will see an ajax request, but no error. This patch fixes the return, make it work for ie6 by using jQuery and prints correctly the total of the budget in the error. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Maxime Pelletier <pelletiermaxime@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5264|0 |1 is patch| | Attachment #5264|application/octet-stream |text/plain mime type| | -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Maxime Pelletier <pelletiermaxime@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 --- Comment #1 from Maxime Pelletier <pelletiermaxime@gmail.com> 2011-10-25 19:14:36 UTC --- Working on a patch that works on 3.6 and that change the feauture to use non blocking alerts. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Maxime Pelletier <pelletiermaxime@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5264|0 |1 is obsolete| | --- Comment #2 from Maxime Pelletier <pelletiermaxime@gmail.com> 2011-10-25 19:28:15 UTC --- Created attachment 6058 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6058 Working patch for 3.6 Here's a new patch based on 3.6 and that shows a confirm() instead of an alert so that users can choose to save even if they exceed the budget. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Version|rel_3_2 |rel_3_6 AssignedTo|henridamien@koha-fr.org |pelletiermaxime@gmail.com -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Patch Status|Needs Signoff |Does not apply --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> 2011-12-19 07:04:38 UTC --- Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt Failed to merge in the changes. Patch failed at 0001 Patch for bug 6832 to fix the ajax validation of exceed budget in new orders, reworked for 3.6. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6058|0 |1 is obsolete| | --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> 2011-12-20 22:09:27 UTC --- Created attachment 6895 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6895 Patch for bug 6832 to fix the ajax validation of exceed budget in new orders, reworked for 3.6. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Does not apply |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Patch Status|Needs Signoff |Failed QA Severity|normal |major --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2011-12-31 07:23:51 UTC --- Hi Maxime, I tried testing this, my settings are: - Create items on order - Used a fund on 3 level of the budget hierarchy - Put in a price way over the limit for that fund - No alert showed up and I could save the order without any message Do you have an idea what went wrong here? I would really like to see that fixed! -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Maxime Pelletier <pelletiermaxime@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6895|0 |1 is obsolete| | --- Comment #6 from Maxime Pelletier <pelletiermaxime@gmail.com> --- Created attachment 10631 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10631&action=edit new patch tested on 3.8.2 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Maxime Pelletier <pelletiermaxime@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent (DO NOT USE) |P2 Status|Failed QA |Needs Signoff Version|rel_3_6 |rel_3_8 Change sponsored?|--- |Sponsored --- Comment #7 from Maxime Pelletier <pelletiermaxime@gmail.com> --- Problem is still in 3.8.2, so here's a new patch for that version. Sponsored by the Koha-CCSR community. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #10631|0 |1 is obsolete| | --- Comment #8 from Marc Véron <veron@veron.ch> --- Created attachment 11209 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11209&action=edit [SIGNED-OFF] Fix l'alerte ajax dans la création d'achat lorsque le montant dépasse celui du budget. http://bugs.koha-community.org/show_bug.cgi?id=6832 Signed-off-by: Marc Veron <veron@veron.ch> Tested on master. Create a new order in a basket and changed existing order as well with total higher than the total of the selected budget. Patch behaves as expected. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |veron@veron.ch -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply CC| |jonathan.druart@biblibre.co | |m --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- The proposed patch does not apply : fatal: cannot convert from UTF-8utf-8 to UTF-8 Please resubmit this patch well formated. On the way, replace the french commit message ;-) -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Jonathan, this patch will apply if you change the patch file and remove one line: Content-Type: text/plain; charset="utf-8" -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11209|0 |1 is obsolete| | --- Comment #11 from Marc Véron <veron@veron.ch> --- Created attachment 11425 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11425&action=edit Fix Validation of total higher as budget in neworderempty I downloaded the patch, removed the line following Katrins advice, changed Maximes French text to English and uploaded the patch. Hope this works. Marc -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off --- Comment #12 from Marc Véron <veron@veron.ch> --- Did a short test with new patch. Works as expected. I sign off again. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 --- Comment #13 from Jonathan Druart <jonathan.druart@biblibre.com> --- QA Comments: It seems the patch does not work as expected. I think your ajax script must to return $budget->{budget_amount} - C4::Budgets::GetBudgetSpent($budget->{id}) (or GetBudgetOrdered ?). -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 --- Comment #14 from Jonathan Druart <jonathan.druart@biblibre.com> --- Hum... In fact, it is the current behaviour in master ! Do you confirm it is what we want ? -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 --- Comment #15 from Maxime Pelletier <pelletiermaxime@gmail.com> --- (In reply to comment #13)
QA Comments:
It seems the patch does not work as expected. I think your ajax script must to return $budget->{budget_amount} - C4::Budgets::GetBudgetSpent($budget->{id}) (or GetBudgetOrdered ?).
My patch doesn't change the behavior of acqui/check_budget_total.pl at all, so i'm really not sure what you are talking about. Could you explain in more details ? -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion CC| |mtj@kohaaloha.com --- Comment #16 from Mason James <mtj@kohaaloha.com> --- (In reply to comment #15)
(In reply to comment #13)
QA Comments:
It seems the patch does not work as expected. I think your ajax script must to return $budget->{budget_amount} - C4::Budgets::GetBudgetSpent($budget->{id}) (or GetBudgetOrdered ?).
My patch doesn't change the behavior of acqui/check_budget_total.pl at all, so i'm really not sure what you are talking about. Could you explain in more details ?
changing status to 'in discussion'... -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 --- Comment #17 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #15)
(In reply to comment #13)
QA Comments:
It seems the patch does not work as expected. I think your ajax script must to return $budget->{budget_amount} - C4::Budgets::GetBudgetSpent($budget->{id}) (or GetBudgetOrdered ?).
My patch doesn't change the behavior of acqui/check_budget_total.pl at all, so i'm really not sure what you are talking about. Could you explain in more details ?
The ajax script returns $budget->{'budget_amount'}. In the tt/js code an alert appears if the total for the current order is > the amount of the selected budget. Suppose a budget A is created with 100€ and 90€ are already spent then we have a "base-level remaining" equal to 10€. If I create, for example, an order with this budget and a total cost = 40, the script does not display the alert. But the order amount is > to the amount remaining. Then I think the alert should not take into account the total budget allocated but the base-level remaining. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6832 simith.doliveira@inlibro.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simith.doliveira@inlibro.co | |m Status|In Discussion |RESOLVED Resolution|--- |DUPLICATE --- Comment #18 from simith.doliveira@inlibro.com --- Bugzilla – Bug 9822 fix the problem *** This bug has been marked as a duplicate of bug 9822 *** -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org