From d8c909b5cbd7c12e1dbf249b26adc3827ac0840a Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 14 Jun 2012 17:17:52 +0200 Subject: [PATCH] Bug 8247 - adding basket doesn't save basket name, internal or vendor note URL: /cgi-bin/koha/acqui/basketheader.pl?booksellerid=32&op=add_form I'm also getting mysql referential integrity error: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_srvgit`.`aqbasket`, CONSTRAINT `aqbasket_ibfk_1` FOREIGN KEY (`booksellerid`) REFERENCES `aqbooksellers` (`id`) ON UPDATE CASCADE) at /srv/koha/C4/Acquisition.pm line 416. Test scenario: 1. Find vendor and select "New basket" 2. fill in basket name, internal and vendor note 3. press save 4. verify that created basket doesn't have name nor internal or vendor notes Signed-off-by: Marc Veron First tested without patch applied, new basket's name and internal / vendor notes were empty- Applied patch, new basket's name and notes behave OK. Signed-off-by: Paul Poulain --- C4/Acquisition.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 52f5545fbb..ccb488b4c0 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -193,7 +193,7 @@ sub NewBasket { $dbh->do($query); #find & return basketno MYSQL dependant, but $dbh->last_insert_id always returns null :-( my $basket = $dbh->{'mysql_insertid'}; - ModBasketHeader($basket, $basketname || '', $basketnote || '', $basketbooksellernote || '', $basketcontractnumber || undef); + ModBasketHeader($basket, $basketname || '', $basketnote || '', $basketbooksellernote || '', $basketcontractnumber || undef, $booksellerid); return $basket; } -- 2.39.5