2517-clientBalanceCompensaciones #506

Merged
carlosjr merged 49 commits from 2517-clientBalanceCompensaciones into dev 2021-02-01 11:13:57 +00:00
3 changed files with 3 additions and 3 deletions
Showing only changes of commit 93417e9676 - Show all commits

View File

@ -1,3 +1,3 @@
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('FixedPrice', '*', '*', 'ALLOW', 'ROLE', 'buyer');
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('PayDem', '*', 'READ', 'ALLOW', 'ROLE', 'employee');
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Receipt', 'createReceipt', '*', 'ALLOW', 'ROLE', 'administrative');
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Client', 'createReceipt', '*', 'ALLOW', 'ROLE', 'administrative');

View File

@ -1,6 +1,6 @@
module.exports = function(Self) {
require('../methods/receipt/filter')(Self);
require('../methods/receipt/createReceipt')(Self);
require('../methods/client/createReceipt')(Self);
Self.validateBinded('amountPaid', isNotZero, {
message: 'Amount cannot be zero',

View File

@ -99,7 +99,7 @@ class Controller extends Dialog {
if (response !== 'accept')
return super.responseHandler(response);
return this.$http.post(`Receipts/${this.$params.id}/createReceipt`, this.receipt)
return this.$http.post(`Clients/${this.$params.id}/createReceipt`, this.receipt)
joan marked this conversation as resolved Outdated

This route should be on the Client model as the params.id is the client id.
ie: Clients/${this.$params.id}/createReceipt...

This route should be on the Client model as the params.id is the client id. ie: `Clients/${this.$params.id}/createReceipt`...
.then(() => super.responseHandler(response))
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')));
}