When you want to merge invoices you have a page with a non editable field 'Invoice number:' it shows the content of the first invoice to be merged. But if you validate by clicking the 'merge' button you arrive on the next page which says that 'Invoice has been modified' and if you quit this page without saving you have now a merged invoice without Invoice number. This tiny patch just prevents this issue to occur. Test plan : 1° go to the acqui/invoices.pl page and search invoices to merge. You must have at least 2 invoices on the same vendor 2° check boxes to select invoices to merge and click on 'merge selected invoices' button 3° next page you see the non editable field 'Invoice number:' 4° click on the 'merge' button 5° next page you see 'Invoice has been modified' 6° leave this page i.e click on the left link 'Invoices' 7° search invoices you'll see the merged invoice without invoice number. Apply the patch, replay the steps 1 to 3 4° on this page you can enter your invoice number and click on the 'merge' button. If you leave this field empty and click merge, a message informs you that it is required and you can not merge. Thx
Created attachment 72306 [details] [review] Merge invoices can lead to an merged invoice without Invoice number thx to test
Applying: Bug 20318: Merge invoices can lead to an merged invoice without Invoice number Using index info to reconstruct a base tree... M koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt Failed to merge in the changes. Patch failed at 0001 Bug 20318: Merge invoices can lead to an merged invoice without Invoice number The copy of the patch that failed is found in: /var/repositories/koha/.git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Merge-invoices-can-lead-to-an-merged-invoice-witho-SIyTfk.patch
Created attachment 72873 [details] [review] rebased patch rebased thx fot the tests
Created attachment 72881 [details] [review] Bug 20318: Merge invoices can lead to an merged invoice without Invoice number Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Thanks for quick rebase ! One thing though : if I try to merge without choosing a name for the new invoice, the alerte message is in french "Veuillez compléter ce champ.".
Thx Séverine, in fact this message is not coded in koha but depend of your language, I presume it is French on your machine. Maybe someone can test with English to validate.
Comment on attachment 72881 [details] [review] Bug 20318: Merge invoices can lead to an merged invoice without Invoice number Review of attachment 72881 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -351,4 @@ > $(row).click(function () { > $('#merge_table tbody tr').removeClass('active'); > $(this).addClass('active'); > - $('#merge_invoicenumber').text(invoice.invoicenumber); Why do you remove this? The functionality of using one of merged invoices number just by clicking on it could be still useful.
Failed QA means I need answer here.
Created attachment 72958 [details] [review] Merge invoices can lead to an merged invoice without Invoice number
(In reply to Josef Moravec from comment #8) > Failed QA means I need answer here. Hi Josef, you'r right, so I have added this functionality. Thx
Created attachment 72969 [details] [review] Merge invoices can lead to an merged invoice without Invoice number
Created attachment 72975 [details] [review] Bug 20318: Merge invoices can lead to an merged invoice without Invoice number Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Thanks Josef and Christophe, the onclick feature is a great idea !
Created attachment 73415 [details] [review] Bug 20318: Merge invoices can lead to an merged invoice without Invoice number Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 73532 [details] [review] Bug 20318: Add class 'required' to the label
Pushed to master for 18.05, thanks to everybody involved!
Pushed to stable for 17.11.06 Awesome work all!
Pushed to 17.05.x for v17.05.12