From 3f73efc4d37d704a117371377024a6669ad6d5be Mon Sep 17 00:00:00 2001 From: Arthur Suzuki Date: Thu, 31 Mar 2022 13:37:26 +0000 Subject: [PATCH] Bug 17656: (follow-up) Update DBIC + fix missing C4::Serials functions needed --- Koha/Schema/Result/Subscription.pm | 58 ++++++++++++++++++++++++++++-- serials/subscription-renew.pl | 2 +- 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/Koha/Schema/Result/Subscription.pm b/Koha/Schema/Result/Subscription.pm index 3ed3976932..81ba9d9d77 100644 --- a/Koha/Schema/Result/Subscription.pm +++ b/Koha/Schema/Result/Subscription.pm @@ -29,12 +29,16 @@ __PACKAGE__->table("subscription"); is_foreign_key: 1 is_nullable: 0 +foreign key for biblio.biblionumber that this subscription is attached to + =head2 subscriptionid data_type: 'integer' is_auto_increment: 1 is_nullable: 0 +unique key for this subscription + =head2 librarian data_type: 'varchar' @@ -42,18 +46,24 @@ __PACKAGE__->table("subscription"); is_nullable: 1 size: 100 +the librarian's username from borrowers.userid + =head2 startdate data_type: 'date' datetime_undef_if_invalid: 1 is_nullable: 1 +start date for this subscription + =head2 aqbooksellerid data_type: 'integer' default_value: 0 is_nullable: 1 +foreign key for aqbooksellers.id to link to the vendor + =head2 cost data_type: 'integer' @@ -72,24 +82,32 @@ __PACKAGE__->table("subscription"); default_value: 0 is_nullable: 1 +subscription length in weeks (will not be filled in if monthlength or numberlength is set) + =head2 monthlength data_type: 'integer' default_value: 0 is_nullable: 1 +subscription length in weeks (will not be filled in if weeklength or numberlength is set) + =head2 numberlength data_type: 'integer' default_value: 0 is_nullable: 1 +subscription length in weeks (will not be filled in if monthlength or weeklength is set) + =head2 periodicity data_type: 'integer' is_foreign_key: 1 is_nullable: 1 +frequency type links to subscription_frequencies.id + =head2 countissuesperunit data_type: 'integer' @@ -101,6 +119,8 @@ __PACKAGE__->table("subscription"); data_type: 'longtext' is_nullable: 1 +notes + =head2 status data_type: 'varchar' @@ -108,6 +128,8 @@ __PACKAGE__->table("subscription"); is_nullable: 0 size: 100 +status of this subscription + =head2 lastvalue1 data_type: 'integer' @@ -147,22 +169,30 @@ __PACKAGE__->table("subscription"); datetime_undef_if_invalid: 1 is_nullable: 1 +first issue received date + =head2 manualhistory data_type: 'tinyint' default_value: 0 is_nullable: 0 +yes or no to managing the history manually + =head2 irregularity data_type: 'mediumtext' is_nullable: 1 +any irregularities in the subscription + =head2 permanent_irregularity data_type: 'mediumtext' is_nullable: 1 +permanent irregularities for renewal + =head2 skip_serialseq data_type: 'tinyint' @@ -181,12 +211,16 @@ __PACKAGE__->table("subscription"); is_foreign_key: 1 is_nullable: 1 +the numbering pattern used links to subscription_numberpatterns.id + =head2 locale data_type: 'varchar' is_nullable: 1 size: 80 +for foreign language subscriptions to display months, seasons, etc correctly + =head2 distributedto data_type: 'mediumtext' @@ -202,6 +236,8 @@ __PACKAGE__->table("subscription"); data_type: 'mediumtext' is_nullable: 1 +default call number + =head2 location data_type: 'varchar' @@ -209,6 +245,8 @@ __PACKAGE__->table("subscription"); is_nullable: 1 size: 80 +default shelving location (items.location) + =head2 branchcode data_type: 'varchar' @@ -216,6 +254,8 @@ __PACKAGE__->table("subscription"); is_nullable: 0 size: 10 +default branches (items.homebranch) + =head2 lastbranch data_type: 'varchar' @@ -228,42 +268,56 @@ __PACKAGE__->table("subscription"); default_value: 0 is_nullable: 0 +does receiving this serial create an item record + =head2 staffdisplaycount data_type: 'varchar' is_nullable: 1 size: 10 +how many issues to show to the staff + =head2 opacdisplaycount data_type: 'varchar' is_nullable: 1 size: 10 +how many issues to show to the public + =head2 graceperiod data_type: 'integer' default_value: 0 is_nullable: 0 +grace period in days + =head2 enddate data_type: 'date' datetime_undef_if_invalid: 1 is_nullable: 1 +subscription end date + =head2 closed data_type: 'tinyint' default_value: 0 is_nullable: 0 +yes / no if the subscription is closed + =head2 reneweddate data_type: 'date' datetime_undef_if_invalid: 1 is_nullable: 1 +date of last renewal for the subscription + =head2 itemtype data_type: 'varchar' @@ -504,8 +558,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-03-04 15:52:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0Pt/RPOtwhz5vHtPGljxfg +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-31 13:26:10 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wDJLtdGZhJCDErsMHif/Ag __PACKAGE__->has_many( "additional_field_values", diff --git a/serials/subscription-renew.pl b/serials/subscription-renew.pl index ea495a8909..f283f58e1d 100755 --- a/serials/subscription-renew.pl +++ b/serials/subscription-renew.pl @@ -52,7 +52,7 @@ use C4::Auth qw( get_template_and_user ); use C4::Context; use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_and_exit output_html_with_http_headers ); -use C4::Serials qw( GetSubscription GetSubscriptionLength NewSubscription ReNewSubscription ); +use C4::Serials qw( GetSubscription GetSubscriptionLength NewSubscription ReNewSubscription GetSerials GetNextExpected); use C4::Serials::Frequency; use C4::Serials::Numberpattern; use Koha::DateUtils qw( dt_from_string output_pref ); -- 2.30.2