The ability to order multiple copies of the same item, from different fund classes, on the same order number
Created attachment 18515 [details] [review] The ability to order multiple copies of the same item, from different fund classes, on the same order number To Test: 1) Create basket. 2) Click on new order empty record. 3) Give title, quantity and select fund. 4) Order multiple copies of the same item click on Add fund and quantity button it will add one more fund and quantity by default quantity will be 1. 5) For delete fund and quantity simply click on Delete fund and quantity. Atleast one quantity and fund will be there if you try to delete it will show one error message.
Created attachment 18588 [details] [review] The ability to order multiple copies of the same item, from different fund classes, on the same order number Small typo fix in comma, The ability to order multiple copies of the same item, from different fund classes, on the same order number To Test: 1) Create basket. 2) Click on new order empty record. 3) Give title, quantity and select fund. 4) Order multiple copies of the same item click on Add fund and quantity button it will add one more fund and quantity by default quantity will be 1. 5) For delete fund and quantity simply click on Delete fund and quantity. Atleast one quantity and fund will be there if you try to delete it will show one error message.
Amit, I know it works this way, but would you please consider changing it to create separate var names, like budget_1 quantity_1, budget_2 quantity_2 etc, and maybe maintain num_budgets var or similar. As I said, I know it works without it, but html spec does not guarantee submission of multiple values in any particular order. Thanks.
Hi Srdjan Jankovic, If we have three row say budget1 quantity1, budget2 quantity2, budget3 quantity3 etc suppose if i delete the second row so i we identify the remaining items ID.
You can maintain hidden num_budgets or max_budget input var. Upon submit, you go through budget1, budget2, ... budget[max_]budget], and skip if not set
Hi Amit, can you please take a look at Srdjan's comments? I would also like to point out that our use of budget/fund is a bit confusing, as we are actually displaying what we call a fund in Koha, but it's called budget all over the place in the code. Not sure if there is a way to resolve this at this point in time. Can you please also check the wording of the alert message? Failing the patch for now, because the Javascript contains untranslatable strings.
Hi Kartin, I am looking your and Srdjan's comments and will recreate the patch.
Created attachment 18792 [details] [review] The ability to order multiple copies of the same item, from different fund classes, on the same order number Hi Katrin and Srdjan Jankovic, I have applied your comment and recreate the patch please check. To Test: 1) Create a basket. 2) Click on new order empty record. 3) Give title, quantity and select fund. 4) Order multiple copies of the same item click on Add fund and quantity button it will add one more fund and quantity by default quantity will be 1. 5) For delete fund and quantity simply click on Delete fund and quantity.
Amit, You have a line there my $i = 0; $i is never used. Is that ok? Also, $$orderinfo{budget_id} is correct, however $orderinfo->{budget_id} is a bit easier to read, and I believe is standard in Koha. I'm going away for a month, so please ask someone else to sign it off if you are in a hurry. Otherwise, I'll do it when I'm back.
Hi Srdjan, By mistaken variable $i is declared i will clean up the code and send it to again.
Oh yes, and another thing - I'm not sure if if ($b ne undef) works as you would expect. Usually you would say if (defined $b). But if ($b) should be enough (and best I believe, because it protects from '').
Created attachment 18834 [details] [review] The ability to order multiple copies of the same item, from different fund classes, on the same order number Hi Srdjan Jankovic, I have remove the variable $i and apply your comments also. Please have a look. To Test: 1) Create a basket. 2) Click on new order empty record. 3) Give title, quantity and select fund. 4) Order multiple copies of the same item click on Add fund and quantity button it will add one more fund and quantity by default quantity will be 1. 5) For delete fund and quantity simply click on Delete fund and quantity. You can not delete first budget and quantity.
Created attachment 18854 [details] [review] The ability to order multiple copies of the same item, from different fund classes, on the same order number Hi Srdjan, I have apply your comment's. Please look the patch Test Plan: 1) Create a basket. 2) Click on new order empty record. 3) Give title, quantity and select fund. 4) Order multiple copies of the same item click on Add fund and quantity button it will add one more fund and quantity by default quantity will be 1. 5) For delete fund and quantity simply click on Delete fund and quantity.
Amit, it looks to me that you are creating multiple orders, with different ordernumber. Is that what you intended?
Yes creating multiple order with different ordernumber.
This won't work for AcqCreateItem 'ordering'. It will create all order items for the last order only. What needs to be done is store ordernumber and quantity from the loop (together with the first values), and use that when calling NewOrderItem().
Applying: Bug 10209 - The ability to order multiple copies of the same item, from different fund classes, on the same order number Using index info to reconstruct a base tree... M acqui/addorder.pl M koha-tmpl/intranet-tmpl/prog/en/js/additem.js M koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt 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 Auto-merging koha-tmpl/intranet-tmpl/prog/en/js/additem.js Auto-merging acqui/addorder.pl Patch failed at 0001 Bug 10209 - The ability to order multiple copies of the same item, from different fund classes, on the same order number The copy of the patch that failed is found in: /home/christopher/git/koha/.git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
Hi, Is anyone working on this? Regards, Marjorie