public static boolean startCheckPrint(int C_Payment_ID,boolean IsDirectPrint){
  int HR_PaySelectionCheck_ID=getHRPaySelectionCheckById(Env.getCtx(),C_Payment_ID,null);
  if (HR_PaySelectionCheck_ID > 0) {
    return startDocumentPrint(ReportEngine.HR_CHECK,HR_PaySelectionCheck_ID,null,-1,IsDirectPrint);
  }
  boolean ok=MPaySelectionCheck.deleteGeneratedDraft(Env.getCtx(),C_Payment_ID,null);
  int C_PaySelectionCheck_ID=0;
  MPaySelectionCheck psc=MPaySelectionCheck.getOfPayment(Env.getCtx(),C_Payment_ID,null);
  if (psc != null)   C_PaySelectionCheck_ID=psc.getC_PaySelectionCheck_ID();
 else {
    psc=MPaySelectionCheck.createForPayment(Env.getCtx(),C_Payment_ID,null);
    if (psc != null)     C_PaySelectionCheck_ID=psc.getC_PaySelectionCheck_ID();
  }
  return startDocumentPrint(ReportEngine.CHECK,C_PaySelectionCheck_ID,null,-1,IsDirectPrint);
}

public static boolean startCheckPrint ( int C_Payment_ID , boolean IsDirectPrint ) { int HR_PaySelectionCheck_ID = getHRPaySelectionCheckById ( Env . getCtx ( ) , C_Payment_ID , null ) ; if ( HR_PaySelectionCheck_ID > 0 ) { return startDocumentPrint ( ReportEngine . HR_CHECK , HR_PaySelectionCheck_ID , null , - 1 , IsDirectPrint ) ; } boolean ok = MPaySelectionCheck . deleteGeneratedDraft ( Env . getCtx ( ) , C_Payment_ID , null ) ; int C_PaySelectionCheck_ID = 0 ; MPaySelectionCheck psc = MPaySelectionCheck . getOfPayment ( Env . getCtx ( ) , C_Payment_ID , null ) ; if ( psc != null ) C_PaySelectionCheck_ID = psc . getC_PaySelectionCheck_ID ( ) ; else { psc = MPaySelectionCheck . createForPayment ( Env . getCtx ( ) , C_Payment_ID , null ) ; if ( psc != null ) C_PaySelectionCheck_ID = psc . getC_PaySelectionCheck_ID ( ) ; } return startDocumentPrint ( ReportEngine . CHECK , C_PaySelectionCheck_ID , null , - 1 , IsDirectPrint ) ; }
start check print . find / create
