refs #6915 test_master24_8 #2067

Merged
alexm merged 561 commits from test_master24_8 into master 2024-02-22 07:31:34 +00:00
6 changed files with 10 additions and 6 deletions
Showing only changes of commit 4fc780967f - Show all commits

View File

@ -0,0 +1,4 @@
UPDATE salix.ACL
SET property='clone'
WHERE model = 'Sale'
AND property = 'refund'

View File

@ -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) => {

View File

@ -20,7 +20,7 @@ module.exports = Self => {
}, },
http: { http: {
path: `/refund`, path: `/refund`,
verb: 'post' verb: 'POST'
} }
}); });

View File

@ -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', {

View File

@ -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();

View File

@ -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', {