示例#1
0
 /**
  * Compare
  *
  * @param o1 object 1
  * @param o2 object 2
  * @return -1,0, 1
  */
 @Override
 public int compare(PO o1, PO o2) {
   String s1 = o1.toString();
   if (s1 == null) s1 = "";
   String s2 = o2.toString();
   if (s2 == null) s2 = "";
   return s1.compareTo(s2);
 } //	compare
示例#2
0
  /**
   * Is standard Period Open for Document Base Type
   *
   * @param header header document record
   * @param lines document lines optional
   * @param DateAcct accounting date
   * @param DocBaseType document base type
   * @return error message or null
   */
  @Deprecated
  public static String isOpen(PO header, PO[] lines, Timestamp DateAcct, String DocBaseType) {

    // Get All Orgs
    ArrayList<Integer> orgs = new ArrayList<Integer>();
    orgs.add(header.getAD_Org_ID());
    if (lines != null) {
      for (PO line : lines) {
        int AD_Org_ID = line.getAD_Org_ID();
        if (!orgs.contains(AD_Org_ID)) orgs.add(AD_Org_ID);
      }
    }

    return isOpen(header.getCtx(), header.getAD_Client_ID(), orgs, DateAcct, DocBaseType);
  } // isOpen