Eventuous / dotnet-sample

Sample application using Eventuous .NET
38 stars 11 forks source link

minor bug? Assuming "MarkOverpaid" means Payed to much : if statement for exit is wrong #2

Closed JimiSweden closed 1 year ago

JimiSweden commented 1 year ago

Booking,cs


 void MarkOverpaid(DateTimeOffset when) {`
         //current. is false as long as booking have outstanding positive amount 
        if (State.Outstanding.Amount < 0) return;
        //change to this? 
        if (State.Outstanding.Amount >= 0) return;

        Apply(new V1.BookingOverpaid(when));
    }
``

Thanks for the Tool 🌟 //Jimi
alexeyzimarev commented 1 year ago

Yes, you are right.

I probably also need to add a route backwards from Bookings to Payments and issue a refund as a reaction.