View | Details | Raw Unified | Return to bug 38010
Collapse All | Expand All

(-)a/Koha/Acquisition/Bookseller.pm (+15 lines)
Lines 187-192 sub issues { Link Here
187
    return Koha::Acquisition::Bookseller::Issues->_new_from_dbic($rs);
187
    return Koha::Acquisition::Bookseller::Issues->_new_from_dbic($rs);
188
}
188
}
189
189
190
=head3 invoices
191
192
    my $vendor  = Koha::Acquisition::Booksellers->find( $id );
193
    my @invoices = $vendor->invoices();
194
195
Returns the list of invoices for the vendor
196
197
=cut
198
199
sub invoices {
200
    my ($self) = @_;
201
    my $invoices_rs = $self->_result->aqinvoices;
202
    return Koha::Acquisition::Invoices->_new_from_dbic($invoices_rs);
203
}
204
190
=head3 to_api_mapping
205
=head3 to_api_mapping
191
206
192
This method returns the mapping for representing a Koha::Acquisition::Bookseller object
207
This method returns the mapping for representing a Koha::Acquisition::Bookseller object
(-)a/api/v1/swagger/definitions/vendor.yaml (+3 lines)
Lines 136-141 properties: Link Here
136
  contracts:
136
  contracts:
137
    type: array
137
    type: array
138
    description: List of contracts
138
    description: List of contracts
139
  invoices:
140
    type: array
141
    description: List of invoices
139
additionalProperties: false
142
additionalProperties: false
140
required:
143
required:
141
  - name
144
  - name
(-)a/api/v1/swagger/paths/acquisitions_vendors.yaml (+1 lines)
Lines 37-42 Link Here
37
            - aliases
37
            - aliases
38
            - baskets
38
            - baskets
39
            - subscriptions+count
39
            - subscriptions+count
40
            - invoices
40
        collectionFormat: csv
41
        collectionFormat: csv
41
    responses:
42
    responses:
42
      "200":
43
      "200":
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorList.vue (-3 / +6 lines)
Lines 67-73 export default { Link Here
67
            searchTerm: null,
67
            searchTerm: null,
68
            tableOptions: {
68
            tableOptions: {
69
                columns: this.getTableColumns(),
69
                columns: this.getTableColumns(),
70
                options: { embed: "aliases,baskets,subscriptions+count" },
70
                options: {
71
                    embed: "aliases,baskets,subscriptions+count,invoices",
72
                },
71
                url: () => this.tableURL(),
73
                url: () => this.tableURL(),
72
                add_filters: true,
74
                add_filters: true,
73
                filters_options: {
75
                filters_options: {
Lines 91-97 export default { Link Here
91
                                    (!row.baskets ||
93
                                    (!row.baskets ||
92
                                        row.baskets.length === 0) &&
94
                                        row.baskets.length === 0) &&
93
                                    (!row.subscriptions_count ||
95
                                    (!row.subscriptions_count ||
94
                                        row.subscriptions_count === 0),
96
                                        row.subscriptions_count === 0) &&
97
                                    (!row.invoices ||
98
                                        row.invoices.length === 0),
95
                            },
99
                            },
96
                        },
100
                        },
97
                        {
101
                        {
98
- 

Return to bug 38010