diff --git a/modules/client/back/models/client.js b/modules/client/back/models/client.js index 1e500ab11..26b20ef48 100644 --- a/modules/client/back/models/client.js +++ b/modules/client/back/models/client.js @@ -30,6 +30,7 @@ module.exports = Self => { require('../methods/client/createAddress')(Self); require('../methods/client/updateAddress')(Self); require('../methods/client/consumption')(Self); + require('../methods/client/createReceipt')(Self); // Validations diff --git a/modules/client/back/models/receipt.js b/modules/client/back/models/receipt.js index 99e5c67f3..400bc8505 100644 --- a/modules/client/back/models/receipt.js +++ b/modules/client/back/models/receipt.js @@ -1,6 +1,5 @@ module.exports = function(Self) { require('../methods/receipt/filter')(Self); - require('../methods/client/createReceipt')(Self); Self.validateBinded('amountPaid', isNotZero, { message: 'Amount cannot be zero', diff --git a/modules/client/front/balance/create/index.spec.js b/modules/client/front/balance/create/index.spec.js index a68f6c8a6..90015be19 100644 --- a/modules/client/front/balance/create/index.spec.js +++ b/modules/client/front/balance/create/index.spec.js @@ -65,7 +65,7 @@ describe('Client', () => { controller.$params = {id: 101}; - $httpBackend.expect('POST', `Receipts/101/createReceipt`).respond({id: 1}); + $httpBackend.expect('POST', `Clients/101/createReceipt`).respond({id: 1}); controller.responseHandler('accept'); $httpBackend.flush();