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
},
http: {
path: `/refund`,
verb: 'post'
path: `/clone`,
verb: 'POST'
}
});
Self.clone = async(ctx, salesIds, servicesIds, withWarehouse, negative, options) => {

View File

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

View File

@ -524,7 +524,7 @@ class Controller extends Section {
const salesIds = sales.map(sale => sale.id);
const params = {salesIds: salesIds, withWarehouse: withWarehouse};
const query = 'Sales/refund';
const query = 'Sales/clone';
this.$http.post(query, params).then(res => {
const [refundTicket] = res.data;
this.vnApp.showSuccess(this.$t('The following refund ticket have been created', {

View File

@ -729,7 +729,7 @@ describe('Ticket', () => {
salesIds: [1, 4],
};
const refundTicket = {id: 99};
$httpBackend.expect('POST', 'Sales/refund', params).respond(200, [refundTicket]);
$httpBackend.expect('POST', 'Sales/clone', params).respond(200, [refundTicket]);
controller.createRefund();
$httpBackend.flush();

View File

@ -56,7 +56,7 @@ class Controller extends Section {
if (!this.checkeds.length) return;
const params = {servicesIds: this.checkeds, withWarehouse: false};
const query = 'Sales/refund';
const query = 'Sales/clone';
this.$http.post(query, params).then(res => {
const refundTicket = res.data;
this.vnApp.showSuccess(this.$t('The following refund ticket have been created', {