Page 1 of 1

Purchase Invoice date change not registering

PostPosted: Tue Feb 02, 2021 1:15 pm
by pricerc
It seems that the problem reported for GRN in https://service.jiwa.com.au/browse/DEV-3547 is happening to me in 7.2.1 SR4 in Purchase Invoicing (also tested in a JiwaDemo database).

Is there a workaround?

edit: fix description.

Re: GRN date change not registering

PostPosted: Tue Feb 02, 2021 6:23 pm
by Mike.Sheen
pricerc wrote:It seems that the problem reported in https://service.jiwa.com.au/browse/DEV-3547 is happening to me in 7.2 SR4 (also tested in a JiwaDemo database).

Is there a workaround?


That issue could be worked-around by having the user tab or click to another field other than the Received Date field before pressing the save button.

I've tried to repro the issue on 7.2.1 SR4 as per the steps on DEV-3547, but couldn't make it happen.

Can you confirm which version - 7.2.1 SR4 or 7.2.0 SR4? (pretty sure you must be using 7.2.1 SR4 because 7.2.0 SR4 was not released publicly), and can you confirm the steps to repro on demo data?

Re: GRN date change not registering

PostPosted: Tue Feb 02, 2021 8:19 pm
by pricerc
Mike.Sheen wrote:
pricerc wrote:It seems that the problem reported in https://service.jiwa.com.au/browse/DEV-3547 is happening to me in 7.2 SR4 (also tested in a JiwaDemo database).

Is there a workaround?


That issue could be worked-around by having the user tab or click to another field other than the Received Date field before pressing the save button.

I've tried to repro the issue on 7.2.1 SR4 as per the steps on DEV-3547, but couldn't make it happen.

Can you confirm which version - 7.2.1 SR4 or 7.2.0 SR4? (pretty sure you must be using 7.2.1 SR4 because 7.2.0 SR4 was not released publicly), and can you confirm the steps to repro on demo data?


Yes 7.2.1 SR4.

I'll send you an MP4.

Re: GRN date change not registering

PostPosted: Wed Feb 03, 2021 12:46 pm
by Mike.Sheen
pricerc wrote:I'll send you an MP4.


That MP4 you emailed me shows you using the Purchase Invoicing form, not the GRN form :o

Re: GRN date change not registering

PostPosted: Wed Feb 03, 2021 5:29 pm
by pricerc
.... I got there from the "Create Purchase Invoice" button on the GRN form.

It was late.

So same problem, different form?

Re: GRN date change not registering

PostPosted: Wed Feb 03, 2021 5:31 pm
by pricerc
pricerc wrote:It was late.


yes, 2pm is late. That's my story, and I'm sticking to it.

Re: Purchase Invoice date change not registering

PostPosted: Wed Feb 03, 2021 5:53 pm
by pricerc
on a related note, any idea why the purchase invoice screen would go 'dirty' (i.e., save/cancel buttons become enabled) when losing and regaining focus?

Re: GRN date change not registering  Topic is solved

PostPosted: Wed Feb 03, 2021 6:09 pm
by Mike.Sheen
pricerc wrote:.... I got there from the "Create Purchase Invoice" button on the GRN form.

It was late.

So same problem, different form?


Yep, same problem different form. The fix for the GRN form made the claim it was a change to the base form - which would imply all maintenance forms would be fixed also - but upon inspection of the change in our version / source control I can see what actually changed was just in the GRN form itself and not the base form.

I can readily repro the issue on the Purchase Invoice form - logged as DEV-8571.

Re: Purchase Invoice date change not registering

PostPosted: Wed Feb 03, 2021 6:13 pm
by Mike.Sheen
pricerc wrote:on a related note, any idea why the purchase invoice screen would go 'dirty' (i.e., save/cancel buttons become enabled) when losing and regaining focus?


Probably the exact same reason the problem exists with the date reverting on save if your didn't lose focus from the date control first... the incorrect code is handling the Validated event from the DateTime Editor control, and in there it's pushing the new property value into the business logic which in turn sets change flags and raises an event for the form to show it's now been edited so light up the save and cancel tools. It should be handling the ValueChanged event instead - and that's exactly what we did to fix the issue in the GRN form - stop handing Validated and instead ValueChanged.

Re: Purchase Invoice date change not registering

PostPosted: Wed Feb 03, 2021 6:34 pm
by pricerc
Mike.Sheen wrote:
pricerc wrote:on a related note, any idea why the purchase invoice screen would go 'dirty' (i.e., save/cancel buttons become enabled) when losing and regaining focus?


Probably the exact same reason the problem exists with the date reverting on save if your didn't lose focus from the date control first... the incorrect code is handling the Validated event from the DateTime Editor control, and in there it's pushing the new property value into the business logic which in turn sets change flags and raises an event for the form to show it's now been edited so light up the save and cancel tools. It should be handling the ValueChanged event instead - and that's exactly what we did to fix the issue in the GRN form - stop handing Validated and instead ValueChanged.


aha. Makes sense. Kinda.

Thanks Mike.