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:
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. Cheers Colin
-- Colin Campbell Chief Software Engineer, PTFS Europe Limited Content Management and Library Solutions +44 (0) 208 366 1295 (phone) +44 (0) 7759 633626 (mobile) colin.campbell@ptfs-europe.com skype: colin_campbell2 http://www.ptfs-europe.com
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.
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: koha-devel-bounces@lists.koha-community.org [mailto:koha-devel-
> bounces@lists.koha-community.org] On Behalf Of LAURENT Henri-Damien
> Sent: Friday, November 26, 2010 12:21 PM
> To: koha-devel@lists.koha-community.org
> 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
> Koha-devel@lists.koha-community.org
> 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/
>
On 26/11/10 11:39, Fischer, Katrin wrote:
Perhaps this behaviour should be an option.
- delete items automatically when cancelling - do not delete items when cancelling an order
Deletion of biblio as well strikes me as counter productive, very often the site may want the biblio even although there are no items attached, e.g. with orders for serial subscriptions, certain types of electronic material or even just a change in sourcing Cheers Colin -- Colin Campbell Chief Software Engineer, PTFS Europe Limited Content Management and Library Solutions +44 (0) 208 366 1295 (phone) +44 (0) 7759 633626 (mobile) colin.campbell@ptfs-europe.com skype: colin_campbell2 http://www.ptfs-europe.com
I think we need another option or different way of ordering for orders of serials/electronic journals/databases etc. Perhaps a checkbox 'don't create item(s) for this order' would be a possibility. And being able to edit the quantity in this case. So you can order something without being forced to create items.
-----Original Message----- From: koha-devel-bounces@lists.koha-community.org [mailto:koha-devel- bounces@lists.koha-community.org] On Behalf Of Colin Campbell Sent: Friday, November 26, 2010 1:24 PM To: koha-devel@lists.koha-community.org Subject: Re: [Koha-devel] Deleting Orders
On 26/11/10 11:39, Fischer, Katrin wrote:
Perhaps this behaviour should be an option.
- delete items automatically when cancelling - do not delete items when cancelling an order
Deletion of biblio as well strikes me as counter productive, very often the site may want the biblio even although there are no items attached, e.g. with orders for serial subscriptions, certain types of electronic material or even just a change in sourcing
Cheers Colin
-- Colin Campbell Chief Software Engineer, PTFS Europe Limited Content Management and Library Solutions +44 (0) 208 366 1295 (phone) +44 (0) 7759 633626 (mobile) colin.campbell@ptfs-europe.com skype: colin_campbell2
http://www.ptfs-europe.com _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org 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/
participants (3)
-
Colin Campbell -
Fischer, Katrin -
LAURENT Henri-Damien