b-b-a / bba-power

1 stars 0 forks source link

New Contract gives duplicated before checking for a client selected #196

Closed ghost closed 12 years ago

ghost commented 12 years ago

Adding a new contract (from contract list). Did not select a client Gave a duplicate Ref. Duplicates were found and displayed Select continue - error about no client selected.

This is the wrong way round - simple user errors always come first. And, in this case, the client is needed before the duplicate check for (client / type / start date) can be done.

Re: (client / type / start date) - not sure if type has been mentioned before. It would seem sensible for a given client to be able to have different types of contract starting on the same date without a warning being raised.

shaunfreeman commented 12 years ago

The SQL part for the type check is

WHERE contract_ type = '<type>'

So it allows for different types on the same date. The radio buttons where a pain to validate and show and to show an error on them so all I've done for these is to highlight the radio buttons in red, the inbuilt validation on dojo don't seem to validate radio button. Will upload changes later.