3830-ticket_sale #927
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#927
Loading…
Reference in New Issue
No description provided.
Delete Branch "3830-ticket_sale"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -0,0 +8,4 @@
arg: 'sales',
description: 'The sales',
type: ['object'],
required: false
If you want to pick all sales from a ticket create an endpoint for such functionality, this endpoint was meant to receive the sales. follow the single responsability principle.
for example create an endpoint that picks all sales from a given ticket and then calls this one with the expected sales. in this way both endpoints do their job as expected.
Can't all sales be selected in the old way? (ticket.sale)
@ -263,2 +263,4 @@
});
describe('refundAll()', () => {
it('should make a query and show a go to ticket.card.sale', () => {
show a go?
@ -264,1 +264,4 @@
describe('refundAll()', () => {
it('should make a query and show a go to ticket.card.sale', () => {
jest.spyOn(controller.$state, 'go').mockReturnValue('ok');
do you need this spy to return a value?
@ -0,0 +2,4 @@
module.exports = Self => {
Self.remoteMethodCtx('refundAll', {
description: 'Create ticket with all lines and services changing the sign to the quantites',
This endpoint should call the existing endpoint (modules/ticket/back/methods/sale/refund.js) which already has the functionality and validations.
Doing this we avoid repeating validation's code and so.
refoundAll should just get the ticket sales and then call refund with the sales and the ticket id.
LGTM