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

(-)a/Koha/Acquisition/Bookseller.pm (+16 lines)
Lines 189-194 sub issues { Link Here
189
    return Koha::Acquisition::Bookseller::Issues->_new_from_dbic($rs);
189
    return Koha::Acquisition::Bookseller::Issues->_new_from_dbic($rs);
190
}
190
}
191
191
192
=head3 invoices
193
194
    my $vendor  = Koha::Acquisition::Booksellers->find( $id );
195
    my @invoices = $vendor->invoices();
196
197
Returns the list of invoices for the vendor
198
199
=cut
200
201
sub invoices {
202
    my ($self) = @_;
203
    my $invoices_rs = $self->_result->aqinvoices;
204
    return Koha::Acquisition::Invoices->_new_from_dbic($invoices_rs);
205
}
206
207
192
=head3 to_api_mapping
208
=head3 to_api_mapping
193
209
194
This method returns the mapping for representing a Koha::Acquisition::Bookseller object
210
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 (-4 / +6 lines)
Lines 14-20 Link Here
14
                v-bind="tableOptions"
14
                v-bind="tableOptions"
15
                @edit="goToResourceEdit"
15
                @edit="goToResourceEdit"
16
                @delete="doResourceDelete"
16
                @delete="doResourceDelete"
17
                @select="doSelect"
18
                @receive="doReceive"
17
                @receive="doReceive"
19
            ></KohaTable>
18
            ></KohaTable>
20
        </div>
19
        </div>
Lines 69-75 export default { Link Here
69
            searchTerm: null,
68
            searchTerm: null,
70
            tableOptions: {
69
            tableOptions: {
71
                columns: this.getTableColumns(),
70
                columns: this.getTableColumns(),
72
                options: { embed: "aliases,baskets,subscriptions+count" },
71
                options: {
72
                    embed: "aliases,baskets,subscriptions+count,invoices",
73
                },
73
                url: () => this.tableURL(),
74
                url: () => this.tableURL(),
74
                add_filters: true,
75
                add_filters: true,
75
                filters_options: {
76
                filters_options: {
Lines 93-99 export default { Link Here
93
                                    (!row.baskets ||
94
                                    (!row.baskets ||
94
                                        row.baskets.length === 0) &&
95
                                        row.baskets.length === 0) &&
95
                                    (!row.subscriptions_count ||
96
                                    (!row.subscriptions_count ||
96
                                        row.subscriptions_count === 0),
97
                                        row.subscriptions_count === 0) &&
98
                                    (!row.invoices ||
99
                                        row.invoices.length === 0),
97
                            },
100
                            },
98
                        },
101
                        },
99
                        {
102
                        {
100
- 

Return to bug 38010