|
|
@@ -10,6 +10,7 @@ export default class InvoiceAPI extends APIRepository {
|
|
|
byId: (id) => '/accounting/invoices/' + id,
|
|
|
pay: (id) => '/accounting/invoices/' + id + '/pay',
|
|
|
cancel: (id) => '/accounting/invoices/' + id + '/cancel',
|
|
|
+ cancelAllPayingInvoices: '/accounting/invoices/cancel_all_paying_invoices',
|
|
|
exportInvoiceReport: '/accounting/invoices/export_report'
|
|
|
}
|
|
|
this.CacheList = {
|
|
|
@@ -70,6 +71,20 @@ export default class InvoiceAPI extends APIRepository {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ cancelAllPayingInvoices() {
|
|
|
+ return this.sendRequest({
|
|
|
+ apiMethod: 'put',
|
|
|
+ api: this.api,
|
|
|
+ request: this.APIAdresses.cancelAllPayingInvoices,
|
|
|
+ resolveCallback: (response) => {
|
|
|
+ return response.data.detail // String : message
|
|
|
+ },
|
|
|
+ rejectCallback: (error) => {
|
|
|
+ return error
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
cancel(invoiceId) {
|
|
|
return this.sendRequest({
|
|
|
apiMethod: 'put',
|