From fabb74b43c25676a76b742d8b063fff837bfa354 Mon Sep 17 00:00:00 2001 From: tipaul Date: Fri, 9 Sep 2005 10:11:38 +0000 Subject: [PATCH] * removing the limit to delete a subscription * adding serial note column to the subscription-detail --- C4/Bull.pm | 14 +++++--------- bull/subscription-detail.pl | 1 - .../default/en/bull/statecollection.tmpl | 2 +- .../default/en/bull/subscription-detail.tmpl | 18 ++++++++++++------ 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/C4/Bull.pm b/C4/Bull.pm index bf5a66cd8f..3885fdd4a6 100755 --- a/C4/Bull.pm +++ b/C4/Bull.pm @@ -289,15 +289,11 @@ sub modsubscription { sub delsubscription { my ($subscriptionid) = @_; - # check again there is only one issue (the subscription is new) - my ($totalissues) = getserials($subscriptionid); - if ($totalissues eq 1) { - my $dbh = C4::Context->dbh; - $subscriptionid=$dbh->quote($subscriptionid); - $dbh->do("delete from subscription where subscriptionid=$subscriptionid"); - $dbh->do("delete from subscriptionhistory where subscriptionid=$subscriptionid"); - $dbh->do("delete from serial where subscriptionid=$subscriptionid"); - } + my $dbh = C4::Context->dbh; + $subscriptionid=$dbh->quote($subscriptionid); + $dbh->do("delete from subscription where subscriptionid=$subscriptionid"); + $dbh->do("delete from subscriptionhistory where subscriptionid=$subscriptionid"); + $dbh->do("delete from serial where subscriptionid=$subscriptionid"); } sub getsubscriptions { my ($title,$ISSN,$biblionumber) = @_; diff --git a/bull/subscription-detail.pl b/bull/subscription-detail.pl index 1eece43104..c9bed507e3 100755 --- a/bull/subscription-detail.pl +++ b/bull/subscription-detail.pl @@ -77,7 +77,6 @@ if ($op eq 'del') { } my $subs = &getsubscription($subscriptionid); my ($totalissues,@serialslist) = getserials($subscriptionid); -warn " => $totalissues"; $totalissues-- if $totalissues; # the -1 is to have 0 if this is a new subscription (only 1 issue) # the subscription must be deletable if there is NO issues for a reason or another (should not happend, but...) diff --git a/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl b/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl index f71b89e0f6..9bc8a797a4 100644 --- a/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/bull/statecollection.tmpl @@ -71,7 +71,7 @@ - " size=10 maxlength=15> + " size=20 maxlength=255> diff --git a/koha-tmpl/intranet-tmpl/default/en/bull/subscription-detail.tmpl b/koha-tmpl/intranet-tmpl/default/en/bull/subscription-detail.tmpl index 474da4ad35..a7b4f35525 100644 --- a/koha-tmpl/intranet-tmpl/default/en/bull/subscription-detail.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/bull/subscription-detail.tmpl @@ -7,11 +7,9 @@ " class="button bull" title="All issues on this title">Issue history " class="button bull" title="all subscriptions on ">Subscriptions " class="button bull" title="go to ">Back to biblio - - - delete - - + + delete +

Subscription information

@@ -151,6 +149,7 @@     Issue number         Planned date         Status     +     Note     @@ -175,6 +174,9 @@ + + + @@ -183,7 +185,11 @@