コード例 #1
0
 /**
  * Called when a valid record is read from the table/query.
  *
  * @param bDisplayOption If true, display any changes.
  */
 public void doValidRecord(boolean bDisplayOption) {
   super.doValidRecord(bDisplayOption);
   Record recApTrx = this.getOwner();
   if (m_iDepartureEstimate == -1) {
     TrxStatus recTrxStatus =
         new TrxStatus(
             this.getOwner()
                 .findRecordOwner()); // Rarely, but if it doesn't exist in the screen, add it!
     m_iDepartureEstimate =
         recTrxStatus.getTrxStatusID(
             TransactionType.ACCTPAY, ApTrx.AP_TRX_FILE, ApTrx.DEP_ESTIMATE);
     m_iDepartureEstimateManual =
         recTrxStatus.getTrxStatusID(
             TransactionType.ACCTPAY, ApTrx.AP_TRX_FILE, ApTrx.DEPARTURE_EST_MANUAL);
     recTrxStatus.free();
   }
   if ((recApTrx.getField(ApTrx.TRX_STATUS_ID).getValue() == m_iDepartureEstimate)
       || (recApTrx.getField(ApTrx.TRX_STATUS_ID).getValue() == m_iDepartureEstimateManual)) {
     recApTrx
         .getField(ApTrx.INVOICE_AMOUNT)
         .moveFieldToThis(recApTrx.getField(ApTrx.DEPARTURE_ESTIMATE));
     recApTrx
         .getField(ApTrx.INVOICE_BALANCE)
         .moveFieldToThis(recApTrx.getField(ApTrx.DEPARTURE_ESTIMATE));
     recApTrx
         .getField(ApTrx.INVOICE_BALANCE_LOCAL)
         .moveFieldToThis(recApTrx.getField(ApTrx.DEPARTURE_ESTIMATE_LOCAL));
   }
 }
コード例 #2
0
 /** Initialize class fields. */
 public void init(Record record) {
   super.init(record);
 }