コード例 #1
0
 /**
  * Sets document with the statistics data
  *
  * @param statistics origin entry statistics that are being used to set document
  * @param document document with statistic information being set
  */
 public static void copyStatisticsToDocument(
     OriginEntryStatistics statistics, GeneralLedgerCorrectionProcessDocument document) {
   document.setCorrectionCreditTotalAmount(statistics.getCreditTotalAmount());
   document.setCorrectionDebitTotalAmount(statistics.getDebitTotalAmount());
   document.setCorrectionBudgetTotalAmount(statistics.getBudgetTotalAmount());
   document.setCorrectionRowCount(statistics.getRowCount());
 }
コード例 #2
0
 /**
  * Given an instance of statistics, it adds information from the passed in entry to the statistics
  *
  * @param entry origin entry
  * @param statistics adds statistics from the passed in origin entry to the passed in statistics
  */
 public static void updateStatisticsWithEntry(
     OriginEntryFull entry, OriginEntryStatistics statistics) {
   statistics.incrementCount();
   if (isDebit(entry)) {
     statistics.addDebit(entry.getTransactionLedgerEntryAmount());
   } else if (isCredit(entry)) {
     statistics.addCredit(entry.getTransactionLedgerEntryAmount());
   } else {
     statistics.addBudget(entry.getTransactionLedgerEntryAmount());
   }
 }