0

Auto open closed jobs on bill reversals

Add a switch that will automatically reopen closed jobs when an invoice is selected to reverse or reinstate.

When set, script in ps_sdlc_tblNominal_UPDATE_Reverse to set the jobs back to complete before it gets to the error checking script.

--update closed jobs to complete
select distinct jobid into #jobs from tblnominal where ParentNomID = @nomID
update j set j.jobstatusid = 3, j.suspended = 0, j.Closed = 0
from tbljob j join #jobs x on j.jobid = x.jobid
where j.Closed = 1
Drop table #jobs

 

0 commentaire

Vous devez vous connecter pour laisser un commentaire.