refs #6915 test_master24_8 #2067
|
@ -0,0 +1,4 @@
|
||||||
|
UPDATE salix.ACL
|
||||||
|
SET property='clone'
|
||||||
|
WHERE model = 'Sale'
|
||||||
|
AND property = 'refund'
|
|
@ -23,8 +23,8 @@ module.exports = Self => {
|
||||||
root: true
|
root: true
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
path: `/refund`,
|
path: `/clone`,
|
||||||
verb: 'post'
|
verb: 'POST'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Self.clone = async(ctx, salesIds, servicesIds, withWarehouse, negative, options) => {
|
Self.clone = async(ctx, salesIds, servicesIds, withWarehouse, negative, options) => {
|
||||||
|
|
|
@ -20,7 +20,7 @@ module.exports = Self => {
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
path: `/refund`,
|
path: `/refund`,
|
||||||
verb: 'post'
|
verb: 'POST'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -524,7 +524,7 @@ class Controller extends Section {
|
||||||
|
|
||||||
const salesIds = sales.map(sale => sale.id);
|
const salesIds = sales.map(sale => sale.id);
|
||||||
const params = {salesIds: salesIds, withWarehouse: withWarehouse};
|
const params = {salesIds: salesIds, withWarehouse: withWarehouse};
|
||||||
const query = 'Sales/refund';
|
const query = 'Sales/clone';
|
||||||
this.$http.post(query, params).then(res => {
|
this.$http.post(query, params).then(res => {
|
||||||
const [refundTicket] = res.data;
|
const [refundTicket] = res.data;
|
||||||
this.vnApp.showSuccess(this.$t('The following refund ticket have been created', {
|
this.vnApp.showSuccess(this.$t('The following refund ticket have been created', {
|
||||||
|
|
|
@ -729,7 +729,7 @@ describe('Ticket', () => {
|
||||||
salesIds: [1, 4],
|
salesIds: [1, 4],
|
||||||
};
|
};
|
||||||
const refundTicket = {id: 99};
|
const refundTicket = {id: 99};
|
||||||
$httpBackend.expect('POST', 'Sales/refund', params).respond(200, [refundTicket]);
|
$httpBackend.expect('POST', 'Sales/clone', params).respond(200, [refundTicket]);
|
||||||
controller.createRefund();
|
controller.createRefund();
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ class Controller extends Section {
|
||||||
if (!this.checkeds.length) return;
|
if (!this.checkeds.length) return;
|
||||||
|
|
||||||
const params = {servicesIds: this.checkeds, withWarehouse: false};
|
const params = {servicesIds: this.checkeds, withWarehouse: false};
|
||||||
const query = 'Sales/refund';
|
const query = 'Sales/clone';
|
||||||
this.$http.post(query, params).then(res => {
|
this.$http.post(query, params).then(res => {
|
||||||
const refundTicket = res.data;
|
const refundTicket = res.data;
|
||||||
this.vnApp.showSuccess(this.$t('The following refund ticket have been created', {
|
this.vnApp.showSuccess(this.$t('The following refund ticket have been created', {
|
||||||
|
|
Loading…
Reference in New Issue