private String getSummaryCharge(INVOrder invOrder) {
   if (invOrder.getSummary() != null
       && invOrder.getSummary().getMonetarySummary() != null
       && invOrder.getSummary().getMonetarySummary().size() > 0) {
     if (invOrder
                 .getSummary()
                 .getMonetarySummary()
                 .get(invOrder.getSummary().getMonetarySummary().size() - 1)
                 .getMonetarySummaryInformation()
             != null
         && invOrder
                 .getSummary()
                 .getMonetarySummary()
                 .get(invOrder.getSummary().getMonetarySummary().size() - 1)
                 .getMonetarySummaryInformation()
                 .size()
             > 0) {
       invOrder
           .getSummary()
           .getMonetarySummary()
           .get(invOrder.getSummary().getMonetarySummary().size() - 1)
           .getMonetarySummaryInformation()
           .get(0)
           .getAmount();
     }
   }
   return null;
 }
 private String getVendorInvoiceAmount(INVOrder invOrder) {
   if (invOrder.getSummary() != null
       && invOrder.getSummary().getMonetarySummary() != null
       && invOrder.getSummary().getMonetarySummary().size() > 0) {
     for (int i = 0; i < invOrder.getSummary().getMonetarySummary().size(); i++) {
       MonetarySummary monetarySummary =
           (MonetarySummary) invOrder.getSummary().getMonetarySummary().get(i);
       if (monetarySummary.getMonetarySummaryInformation() != null
           && monetarySummary.getMonetarySummaryInformation().size() > 0) {
         for (int j = 0; j < monetarySummary.getMonetarySummaryInformation().size(); j++) {
           if (monetarySummary
               .getMonetarySummaryInformation()
               .get(0)
               .getAmountType()
               .equalsIgnoreCase("86")) {
             return monetarySummary.getMonetarySummaryInformation().get(0).getAmount();
           }
         }
       }
     }
   }
   return null;
 }
 private String getSummaryTax(INVOrder invOrder) {
   String summaryTaxAmount = "";
   Summary summary = invOrder.getSummary();
   if (summary != null) {
     MonetaryTaxSummary monetaryTaxSummary = summary.getMonetaryTaxSummary();
     if (monetaryTaxSummary != null) {
       MonetaryTaxSummaryDetails monetaryTaxSummaryDetails =
           monetaryTaxSummary.getMonetaryTaxSummaryDetails();
       if (monetaryTaxSummaryDetails != null
           && "124".equals(monetaryTaxSummaryDetails.getAmountType())) {
         summaryTaxAmount = monetaryTaxSummaryDetails.getAmount();
       }
     }
   }
   return summaryTaxAmount;
 }