コード例 #1
0
  private void calculateForNonFullSupply(Rnr requisition) {
    for (RnrLineItem lineItem : requisition.getNonFullSupplyLineItems()) {
      lineItem.validateNonFullSupply();

      lineItem.calculatePacksToShip();

      requisition.addToNonFullSupplyCost(lineItem.calculateCost());
    }
  }
コード例 #2
0
  private void calculateForFullSupply(Rnr requisition, ProgramRnrTemplate template) {
    List<LossesAndAdjustmentsType> lossesAndAdjustmentsTypes =
        requisitionRepository.getLossesAndAdjustmentsTypes();

    for (RnrLineItem lineItem : requisition.getNonSkippedLineItems()) {

      lineItem.validateMandatoryFields(template);
      lineItem.calculateForFullSupply(template, requisition.getStatus(), lossesAndAdjustmentsTypes);
      lineItem.validateCalculatedFields(template);

      requisition.addToFullSupplyCost(lineItem.calculateCost());
    }
  }