| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod CloseTemporarily ( | 
|   Number currentopen, | 
|   Number currenttempclosed, | 
|   Number nrofopenunittobeclosed, | 
|   output Number openresult_o, | 
|   output Number tempclosedresult_o | 
| ) | 
| { | 
|   Description: 'A static to calculate the units to be open and closed for CloseTemporarily method' | 
|   TextBody: | 
|   [* | 
|     // soh yee Nov-19-2014 (created) | 
|      | 
|     openresult_o := currentopen; | 
|     tempclosedresult_o := currenttempclosed; | 
|      | 
|     if( nrofopenunittobeclosed <= currentopen ) | 
|     { | 
|       tempclosedresult_o := currenttempclosed + nrofopenunittobeclosed; | 
|       openresult_o := currentopen - nrofopenunittobeclosed; | 
|     } | 
|     //If nrofopenunittobeclosed > number of open unit | 
|     else | 
|     { | 
|       tempclosedresult_o := currenttempclosed + currentopen; | 
|       openresult_o := 0; | 
|     } | 
|   *] | 
| } |