i have 5 departments DeptA,DeptB,DeptC,DeptC,DeptD,DeptE
i have one material MAT1
now i have a form where i am setting some task, FROM date to TO date for the MAT1 in DeptA.
after some days other user can also set FROM date to TO date for the MAT1 in DeptB.
similarly other for other departments...
now i want to write logic where i can check whether theFROM date and TO date are free for this MAT1 or not.
example
MAT1------DeptA ------ 12/06/2015 to 15/06/2015
MAT1------DeptB ------ 14/06/2015 to 18/06/2015 ------not allowed
MAT1------DeptB ------ 17/06/2015 to 20/06/2015 -----allowed
i have one material MAT1
now i have a form where i am setting some task, FROM date to TO date for the MAT1 in DeptA.
after some days other user can also set FROM date to TO date for the MAT1 in DeptB.
similarly other for other departments...
now i want to write logic where i can check whether theFROM date and TO date are free for this MAT1 or not.
example
MAT1------DeptA ------ 12/06/2015 to 15/06/2015
MAT1------DeptB ------ 14/06/2015 to 18/06/2015 ------not allowed
MAT1------DeptB ------ 17/06/2015 to 20/06/2015 -----allowed