Summary: | 0 items in an order cannot be received do to invalid date handling | ||
---|---|---|---|
Product: | Koha | Reporter: | Joonas Kylmälä <joonas.kylmala> |
Component: | Acquisitions | Assignee: | Bugs List <koha-bugs> |
Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | jonathan.druart |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21811 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
Description
Joonas Kylmälä
2020-07-29 11:21:32 UTC
I think you should not be able to receive 0 - to my knowledge that just didn't save before. The error seems new - are you creating/updating items on receive? You are right Katrin, the issue happens only with the AcqCreateItem set to "Create an item when placing an order." To reproduce this bug be sure to first set this syspref to the aformentioned value and then after that create a new order basket and go receive the item there. (the syspref gets only applied to newly create baskets.) I think the error has been highlighted by Bug 23463: Replace ModItem with Koha::Item->store What's the expected behaviour? A JS check to make sure the form is only submitted when the quantity > 0? I actually filed a bug for that, because I forgot to fill in quantity received a lot: Bug 21811 - Add warning when order receive form is saved without entering 'quantity received' I think a Javascript check or simply marking the field required (as in has to be greater 1 for saving)? *** This bug has been marked as a duplicate of bug 21811 *** Jonathan, if this is duplicate of bug 21811 then it seems like the code that uses $datereceived variable in orderreceive.pl is unused and should be removed. (In reply to Joonas Kylmälä from comment #7) > Jonathan, if this is duplicate of bug 21811 then it seems like the code that > uses $datereceived variable in orderreceive.pl is unused and should be > removed. It's passed to the template: 250 datereceived => $datereceived, (In reply to Jonathan Druart from comment #8) > (In reply to Joonas Kylmälä from comment #7) > > Jonathan, if this is duplicate of bug 21811 then it seems like the code that > > uses $datereceived variable in orderreceive.pl is unused and should be > > removed. > > It's passed to the template: > 250 datereceived => $datereceived, Sorry, I confused the file to acqui/finishreceive.pl, on line 175 there is a while loop where the variable is used and not necessarily modified to fit the DB format: > while ( my $item = $items->next ) { > ... Yes, you are right. I let a comment on bug 21811. |