Index: grails-app/services/com/lemans/ds/studioorder/StudioOrderPartManagerService.groovy =================================================================== diff -u -r4588aa1a23e1746fca3386a778f997419b32e083 -rbd4a2b75d152354858bb4ac09897a6f09ac5b5dd --- grails-app/services/com/lemans/ds/studioorder/StudioOrderPartManagerService.groovy (.../StudioOrderPartManagerService.groovy) (revision 4588aa1a23e1746fca3386a778f997419b32e083) +++ grails-app/services/com/lemans/ds/studioorder/StudioOrderPartManagerService.groovy (.../StudioOrderPartManagerService.groovy) (revision bd4a2b75d152354858bb4ac09897a6f09ac5b5dd) @@ -81,6 +81,9 @@ Map updateParts(Map values, String username) { List studioOrderParts = findStudioOrderParts(values.studioOrderId, values.parts) if (studioOrderParts) { + if (values.statusId == 14201 && (StudioOrder.findById(studioOrderParts*.studioOrderId[0])?.note == null)) { + return [messages: [type: 'error', text: 'Note is required for order to be submitted.']] + } updateStudioOrderParts(values, studioOrderParts*.id, username) updateFlagValues(values.statusId, studioOrderParts, username) if (values.statusId == 14201) { sendEmail(values.studioOrderId) }