diff --git a/Koha/ERM/EHoldings/Package.pm b/Koha/ERM/EHoldings/Package.pm index 2e2edd6802..6ee7975277 100644 --- a/Koha/ERM/EHoldings/Package.pm +++ b/Koha/ERM/EHoldings/Package.pm @@ -21,6 +21,7 @@ use Koha::Database; use base qw(Koha::Object); +use Koha::Acquisition::Booksellers; use Koha::ERM::EHoldings::Package::Agreements; use Koha::ERM::EHoldings::Resources; @@ -70,6 +71,19 @@ sub resources { return Koha::ERM::EHoldings::Resources->_new_from_dbic($rs); } +=head3 vendor + +Returns the vendor + +=cut + +sub vendor { + my ( $self ) = @_; + my $rs = $self->_result->vendor; + return unless $rs; + return Koha::Acquisition::Bookseller->_new_from_dbic($rs); +} + =head2 Internal methods =head3 _type diff --git a/api/v1/swagger/definitions/erm_eholdings_package.yaml b/api/v1/swagger/definitions/erm_eholdings_package.yaml index dac059192e..356de545cb 100644 --- a/api/v1/swagger/definitions/erm_eholdings_package.yaml +++ b/api/v1/swagger/definitions/erm_eholdings_package.yaml @@ -43,6 +43,10 @@ properties: description: resources items: $ref: erm_eholdings_resource.yaml + vendor: + type: + - object + - "null" additionalProperties: false required: diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue index 4253be0499..ac0c3c7e4c 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsPackagesShow.vue @@ -28,18 +28,19 @@