private void calculateForNonFullSupply(Rnr requisition) { for (RnrLineItem lineItem : requisition.getNonFullSupplyLineItems()) { lineItem.validateNonFullSupply(); lineItem.calculatePacksToShip(); requisition.addToNonFullSupplyCost(lineItem.calculateCost()); } }
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()); } }