Bug 8903 - Can't receive any orders
Summary: Can't receive any orders
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 3.10
Hardware: All All
: P5 - low blocker (vote)
Assignee: Julian Maurice
QA Contact: Jonathan Druart
URL:
Keywords:
: 8929 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-11 12:38 UTC by Julian Maurice
Modified: 2019-06-27 09:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 8903: Pass invoiceid to ModReceiveOrder (737 bytes, patch)
2012-10-11 12:40 UTC, Julian Maurice
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8903: Pass invoiceid to ModReceiveOrder (815 bytes, patch)
2012-10-16 16:27 UTC, Nicole C. Engard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2012-10-11 12:38:21 UTC
When trying to receive an order (partially or not), I got this message in log

finishreceive.pl: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_community_master`.`aqorders`, CONSTRAINT `aqorders_ibfk_3` FOREIGN KEY (`invoiceid`) REFERENCES `aqinvoices` (`invoiceid`) ON DELETE SET NULL ON UPDATE CASCADE) at /home/julian/koha/versions/community-master/C4/Acquisition.pm line 1344

and order is not received.

This is because invoicenumber is passed to ModReceiveOrder instead of invoiceid.
Bug is introduced by Bug 5335 (unhappy rebase)

I'll submit a patch in a couple of minutes.
Comment 1 Julian Maurice 2012-10-11 12:40:14 UTC Comment hidden (obsolete)
Comment 2 Nicole C. Engard 2012-10-16 16:13:29 UTC
*** Bug 8929 has been marked as a duplicate of this bug. ***
Comment 3 Nicole C. Engard 2012-10-16 16:27:24 UTC
Created attachment 12855 [details] [review]
[SIGNED-OFF] Bug 8903: Pass invoiceid to ModReceiveOrder

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Comment 4 Jonathan Druart 2012-10-23 14:13:50 UTC
QA Comment:
The routine ModReceiveOrder takes an invoiceid, not an invoicenumber.
Simple fix for a big issue.

Marked as Passed QA.
Comment 5 Paul Poulain 2012-10-24 13:18:47 UTC
Obvious bugfix, patch pushed
Comment 6 Julian Maurice 2012-10-26 14:35:50 UTC
Ok in master. Bug not present in stable. Marked as resolved.