Bug 8903

Summary: Can't receive any orders
Product: Koha Reporter: Julian Maurice <julian.maurice>
Component: AcquisitionsAssignee: Julian Maurice <julian.maurice>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: blocker    
Priority: P5 - low CC: acquisitions, jonathan.druart, nengard, paul.poulain
Version: 3.10   
Hardware: All   
OS: All   
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
[SIGNED-OFF] Bug 8903: Pass invoiceid to ModReceiveOrder

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.