Perhaps this behaviour should be an option. - delete items automatically when cancelling - do not delete items when cancelling an order
When does the deletion happen? - when I cancel an order (from receive screen after I closed the basket) - when I delete single titles from an order (leave open or reopen basket and delete single lines) I am not sure the items were always deleted and I had no time to test the acq branch yet :( > -----Original Message----- > From: [email protected] [mailto:koha-devel- > [email protected]] On Behalf Of LAURENT Henri-Damien > Sent: Friday, November 26, 2010 12:21 PM > To: [email protected] > Subject: Re: [Koha-devel] Deleting Orders > > Le 26/11/2010 12:06, Colin Campbell a écrit : > > Hi, > > I'm just looking at the branch of acquisitions fixes from Biblibre > one > > fix in there is an addition to DelOrder to delete any items > associated > > with the order on its deletion. However it goes further and deletes > the > > associated bib record if it has no items. thus: > Hi Collin. > Thanks for your feedback. > This is a discussion we had at the moment we did that. > We had two options : > either > - Delete only the order and leave it to the cataloger to delete those > items. But he would have NO information on WHICH items to delete, > unless > there would be a flag on the item.... > > OR > - Delete the items in order to remove them from catalogue, knowing that > having items linked in orders are items which are created by the order. > So this action was taken. Because looked safer and involved only the > acquisition person. The one that has created the items should be the > one > responsible for them until they are received and quite get out of his > hands. > > Comments welcome. > -- > Henri-Damien LAURENT > BibLibre > > >> diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm > >> index c1b837b..54b01fa 100644 > >> --- a/C4/Acquisition.pm > >> +++ b/C4/Acquisition.pm > >> @@ -28,6 +28,7 @@ use C4::Suggestions; > >> use C4::Biblio; > >> use C4::Debug; > >> use C4::SQLHelper qw(InsertInTable); > >> +use C4::Items; > >> > >> use Time::localtime; > >> use HTML::Entities; > >> @@ -1219,6 +1220,10 @@ sub DelOrder { > >> my $sth = $dbh->prepare($query); > >> $sth->execute( $bibnum, $ordernumber ); > >> $sth->finish; > >> + > >> + my @itemnumbers = GetItemnumbersFromOrder( $ordernumber ); > >> + C4::Items::DelItem( $dbh, $bibnum, $_ ) for @itemnumbers; > >> + DelBiblio( $dbh, $bibnum ) if C4::Items::GetItemsCount( $bibnum > ) == 0; > >> } > > My gut feeling is that deleting the biblio automatically at this > point > > is not a good idea but I thought I'd throw it open for comments. > > _______________________________________________ > Koha-devel mailing list > [email protected] > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ > _______________________________________________ Koha-devel mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
