private void setPositionQuantityAndGivenQuantity(BigDecimal quantity, Entity newPosition) { newPosition.setField(PositionFields.QUANTITY, numberService.setScaleWithDefaultMathContext(quantity)); BigDecimal givenQuantity = calculationQuantityService.calculateAdditionalQuantity(quantity, newPosition.getDecimalField(PositionFields.CONVERSION), newPosition.getStringField(PositionFields.GIVEN_UNIT)); newPosition.setField(PositionFields.GIVEN_QUANTITY, givenQuantity); }
private BigDecimal recalculateQuantity(BigDecimal quantity, BigDecimal conversion, String givenUnit, BigDecimal resourceConversion, String unit) { if (conversion.compareTo(resourceConversion) != 0) { BigDecimal givenQuantity = calculationQuantityService.calculateAdditionalQuantity(quantity, conversion, givenUnit); return calculationQuantityService.calculateQuantity(givenQuantity, resourceConversion, unit); } return quantity; }
public void additionalQuantityChange(final ViewDefinitionState view, final ComponentState state, final String[] args) { FormComponent form = (FormComponent) view.getComponentByReference("form"); Entity orderedProductReservation = form.getEntity(); Entity orderedProduct = orderedProductReservation.getBelongsToField(OrderedProductReservationFields.ORDERED_PRODUCT); BigDecimal conversion = orderedProduct.getDecimalField(OrderedProductFields.CONVERSION); Object additionalQuantityRawValue = orderedProductReservation .getField(OrderedProductReservationFields.ADDITIONAL_QUANTITY); Either<Exception, Optional<BigDecimal>> tryParseAdditionalQuantity = BigDecimalUtils.tryParseAndIgnoreSeparator( additionalQuantityRawValue == null ? "" : additionalQuantityRawValue.toString(), LocaleContextHolder.getLocale()); if (conversion != null && tryParseAdditionalQuantity.isRight() && tryParseAdditionalQuantity.getRight().isPresent()) { BigDecimal additionalQuantity = tryParseAdditionalQuantity.getRight().get(); FieldComponent orderedQuantity = (FieldComponent) view .getComponentByReference(OrderedProductReservationFields.ORDERED_QUANTITY); BigDecimal newOrderedQuantity = calculationQuantityService.calculateQuantity(additionalQuantity, conversion, orderedProduct.getBelongsToField(OrderedProductFields.PRODUCT).getStringField(ProductFields.UNIT)); orderedQuantity.setFieldValue(numberService.formatWithMinimumFractionDigits(newOrderedQuantity, 0)); orderedQuantity.requestComponentUpdateState(); } }
public void onQuantityInAdditionalUnitChange(final ViewDefinitionState viewDefinitionState, final ComponentState state, final String[] args) { FieldComponent quantityField = (FieldComponent) viewDefinitionState.getComponentByReference(ResourceFields.QUANTITY); FieldComponent quantityInAdditionalUnitField = (FieldComponent) viewDefinitionState .getComponentByReference(ResourceFields.QUANTITY_IN_ADDITIONAL_UNIT); Either<Exception, Optional<BigDecimal>> maybeQuantityInAdditionalUnit = BigDecimalUtils.tryParseAndIgnoreSeparator( (String) quantityInAdditionalUnitField.getFieldValue(), viewDefinitionState.getLocale()); if (maybeQuantityInAdditionalUnit.isRight() && maybeQuantityInAdditionalUnit.getRight().isPresent()) { FormComponent form = (FormComponent) viewDefinitionState.getComponentByReference(L_FORM); Entity resource = form.getEntity(); BigDecimal conversion = resource.getDecimalField(ResourceFields.CONVERSION); Entity product = resource.getBelongsToField(ResourceFields.PRODUCT); BigDecimal quantity = calculationQuantityService.calculateQuantity(maybeQuantityInAdditionalUnit.getRight().get(), conversion, product.getStringField(ProductFields.UNIT)); String quantityFormatted = numberService.format(numberService.setScaleWithDefaultMathContext(quantity)); quantityField.setFieldValue(quantityFormatted); } else { quantityField.setFieldValue(null); } }
public void fillQuantitiesInAdditionalUnit(final ViewDefinitionState view) { AwesomeDynamicListComponent adl = (AwesomeDynamicListComponent) view.getComponentByReference("issues"); for (FormComponent form : adl.getFormComponents()) { Entity issue = form.getPersistedEntityWithIncludedFormValues(); FieldComponent quantityField = form.findFieldComponentByName("issueQuantity"); Either<Exception, Optional<BigDecimal>> maybeQuantity = BigDecimalUtils.tryParse(quantityField.getFieldValue() .toString(), LocaleContextHolder.getLocale()); BigDecimal conversion = issue.getDecimalField(IssueFields.CONVERSION); if (conversion != null && maybeQuantity.isRight() && maybeQuantity.getRight().isPresent()) { Entity product = issue.getBelongsToField(IssueFields.PRODUCT); String unit = product.getStringField(ProductFields.UNIT); String additionalUnit = product.getStringField(ProductFields.ADDITIONAL_UNIT); BigDecimal issueQuantity = maybeQuantity.getRight().get(); BigDecimal issuedQuantityAdditionalUnit = calculationQuantityService.calculateAdditionalQuantity(issueQuantity, conversion, Optional.fromNullable(additionalUnit).or(unit)); issue.setField(IssueFields.ISSUE_QUANTITY_ADDITIONAL_UNIT, issuedQuantityAdditionalUnit); form.setEntity(issue); } } }
public void onAdditionalDemandQuantityChange(final ViewDefinitionState view, final ComponentState state, final String[] args) { FormComponent form = (FormComponent) view.getComponentByReference(FORM); Entity productToIssue = form.getPersistedEntityWithIncludedFormValues(); if (!checkIfDecimalFieldsCorrect(productToIssue, form)) { return; } BigDecimal conversion = productToIssue.getDecimalField(ProductsToIssueFields.CONVERSION); BigDecimal additionalDemandQuantity = productToIssue.getDecimalField(ProductsToIssueFields.ADDITIONAL_DEMAND_QUANTITY); if (conversion != null && additionalDemandQuantity != null) { FieldComponent demandQuantity = (FieldComponent) view.getComponentByReference(ProductsToIssueFields.DEMAND_QUANTITY); Entity product = productToIssue.getBelongsToField(ProductsToIssueFields.PRODUCT); BigDecimal newDemandQuantity = calculationQuantityService.calculateQuantity(additionalDemandQuantity, conversion, product.getStringField(ProductFields.UNIT)); demandQuantity.setFieldValue(numberService.formatWithMinimumFractionDigits(newDemandQuantity, 0)); demandQuantity.requestComponentUpdateState(); } }
private void recalculateQuantities(Entity delivery, Entity deliveredProductMultiPosition) { Entity product = deliveredProductMultiPosition.getBelongsToField(DeliveredProductMultiPositionFields.PRODUCT); Entity additionalCode = deliveredProductMultiPosition .getBelongsToField(DeliveredProductMultiPositionFields.ADDITIONAL_CODE); BigDecimal conversion = BigDecimal.ONE; if (product != null) { String unit = product.getStringField(ProductFields.UNIT); String additionalUnit = product.getStringField(ProductFields.ADDITIONAL_UNIT); if (StringUtils.isNotEmpty(additionalUnit)) { conversion = deliveredProductMultiPosition.getDecimalField(DeliveredProductMultiPositionFields.CONVERSION); if (conversion == null) { conversion = getConversion(product, unit, additionalUnit); } } BigDecimal orderedQuantity = deliveredProductMultiPositionService.findOrderedQuantity(delivery, product, additionalCode); BigDecimal alreadyAssignedQuantity = deliveredProductMultiPositionService.countAlreadyAssignedQuantityForProduct( product, additionalCode, deliveredProductMultiPosition.getBelongsToField("offer"), delivery.getHasManyField(DeliveryFields.DELIVERED_PRODUCTS)); BigDecimal quantity = orderedQuantity.subtract(alreadyAssignedQuantity, numberService.getMathContext()); if (BigDecimal.ZERO.compareTo(quantity) == 1) { quantity = BigDecimal.ZERO; } BigDecimal newAdditionalQuantity = calculationQuantityService.calculateAdditionalQuantity(quantity, conversion, Optional.ofNullable(additionalUnit).orElse(unit)); deliveredProductMultiPosition.setField(DeliveredProductMultiPositionFields.QUANTITY, quantity); deliveredProductMultiPosition .setField(DeliveredProductMultiPositionFields.ADDITIONAL_QUANTITY, newAdditionalQuantity); } }
public void additionalQuantityChange(final ViewDefinitionState view, final ComponentState state, final String[] args) { FormComponent form = (FormComponent) view.getComponentByReference("form"); Entity deliveredProduct = form.getEntity(); Entity product = deliveredProduct.getBelongsToField(DeliveredProductFields.PRODUCT); if (decimalFieldsInvalid(form) || product == null) { return; } BigDecimal conversion = deliveredProduct.getDecimalField(DeliveredProductFields.CONVERSION); BigDecimal additionalQuantity = deliveredProduct.getDecimalField(DeliveredProductFields.ADDITIONAL_QUANTITY); if (conversion != null && additionalQuantity != null) { String deliveredQuantityUnit = product.getStringField(ProductFields.UNIT); FieldComponent deliveredQuantity = (FieldComponent) view.getComponentByReference("deliveredQuantity"); BigDecimal newDeliveredQuantity = calculationQuantityService.calculateQuantity(additionalQuantity, conversion, deliveredQuantityUnit); deliveredQuantity.setFieldValue(numberService.formatWithMinimumFractionDigits(newDeliveredQuantity, 0)); deliveredQuantity.requestComponentUpdateState(); } } }
public void quantityChange(final ViewDefinitionState view, final ComponentState state, final String[] args) { FormComponent form = (FormComponent) view.getComponentByReference("form"); Entity orderedProductReservation = form.getEntity(); Entity orderedProduct = orderedProductReservation.getBelongsToField(OrderedProductReservationFields.ORDERED_PRODUCT); BigDecimal conversion = orderedProduct.getDecimalField(OrderedProductFields.CONVERSION); Object orderedQuantityRawValue = orderedProductReservation.getField(OrderedProductReservationFields.ORDERED_QUANTITY); Either<Exception, Optional<BigDecimal>> tryParseOrderedQuantity = BigDecimalUtils.tryParseAndIgnoreSeparator( orderedQuantityRawValue == null ? "" : orderedQuantityRawValue.toString(), LocaleContextHolder.getLocale()); if (conversion != null && tryParseOrderedQuantity.isRight() && tryParseOrderedQuantity.getRight().isPresent()) { BigDecimal orderedQuantity = tryParseOrderedQuantity.getRight().get(); FieldComponent additionalQuantity = (FieldComponent) view .getComponentByReference(OrderedProductReservationFields.ADDITIONAL_QUANTITY); BigDecimal newAdditionalQuantity = calculationQuantityService.calculateAdditionalQuantity(orderedQuantity, conversion, orderedProduct.getBelongsToField(OrderedProductFields.PRODUCT).getStringField(ProductFields.ADDITIONAL_UNIT)); additionalQuantity.setFieldValue(numberService.formatWithMinimumFractionDigits(newAdditionalQuantity, 0)); additionalQuantity.requestComponentUpdateState(); } }
public void additionalQuantityChanged(final ViewDefinitionState view, final ComponentState state, final String[] args) { AwesomeDynamicListComponent deliveredProductMultiPositions = (AwesomeDynamicListComponent) view .getComponentByReference(DeliveredProductMultiFields.DELIVERED_PRODUCT_MULTI_POSITIONS); List<FormComponent> deliveredProductMultiPositionsFormComponents = deliveredProductMultiPositions.getFormComponents(); for (FormComponent deliveredProductMultiPositionsFormComponent : deliveredProductMultiPositionsFormComponents) { Entity deliveredProductMultiPosition = deliveredProductMultiPositionsFormComponent .getPersistedEntityWithIncludedFormValues(); if (state.getUuid().equals( deliveredProductMultiPositionsFormComponent.findFieldComponentByName("additionalQuantity").getUuid())) { Entity product = deliveredProductMultiPosition.getBelongsToField(DeliveredProductMultiPositionFields.PRODUCT); BigDecimal additionalQuantity = deliveredProductMultiPosition .getDecimalField(DeliveredProductMultiPositionFields.ADDITIONAL_QUANTITY); BigDecimal conversion = deliveredProductMultiPosition .getDecimalField(DeliveredProductMultiPositionFields.CONVERSION); if (conversion != null && additionalQuantity != null && product != null) { String unit = product.getStringField(ProductFields.UNIT); FieldComponent quantity = deliveredProductMultiPositionsFormComponent .findFieldComponentByName(DeliveredProductMultiPositionFields.QUANTITY); BigDecimal newQuantity = calculationQuantityService.calculateQuantity(additionalQuantity, conversion, unit); quantity.setFieldValue(numberService.formatWithMinimumFractionDigits(newQuantity, 0)); quantity.requestComponentUpdateState(); } break; } } }
BigDecimal currentDeliveredAdditionalQuantity = calculationQuantityService.calculateAdditionalQuantity(currentDeliveredQuantity, conversion, deliveredProduct.getBelongsToField(DeliveredProductFields.PRODUCT).getStringField( ProductFields.ADDITIONAL_UNIT));
public void additionalQuantityChange(final ViewDefinitionState view, final ComponentState state, final String[] args) { FormComponent form = (FormComponent) view.getComponentByReference("form"); Entity orderedProduct = form.getEntity(); Entity product = orderedProduct.getBelongsToField(OrderedProductFields.PRODUCT); if (decimalFieldsInvalid(form) || product == null) { return; } BigDecimal conversion = orderedProduct.getDecimalField(OrderedProductFields.CONVERSION); BigDecimal additionalQuantity = orderedProduct.getDecimalField(OrderedProductFields.ADDITIONAL_QUANTITY); if (conversion != null && additionalQuantity != null) { String orderedQuantityUnit = product.getStringField(ProductFields.UNIT); FieldComponent orderedQuantity = (FieldComponent) view.getComponentByReference("orderedQuantity"); BigDecimal newOrderedQuantity = calculationQuantityService.calculateQuantity(additionalQuantity, conversion, orderedQuantityUnit); orderedQuantity.setFieldValue(numberService.formatWithMinimumFractionDigits(newOrderedQuantity, 0)); orderedQuantity.requestComponentUpdateState(); deliveriesService.recalculatePrice(view, OrderedProductFields.ORDERED_QUANTITY); } }
public void quantityChange(final ViewDefinitionState view, final ComponentState state, final String[] args) { FormComponent form = (FormComponent) view.getComponentByReference("form"); Entity deliveredProduct = form.getEntity(); Entity product = deliveredProduct.getBelongsToField(DeliveredProductFields.PRODUCT); if (decimalFieldsInvalid(form) || product == null) { return; } BigDecimal conversion = deliveredProduct.getDecimalField(DeliveredProductFields.CONVERSION); BigDecimal deliveredQuantity = deliveredProduct.getDecimalField(DeliveredProductFields.DELIVERED_QUANTITY); if (conversion != null && deliveredQuantity != null) { String additionalQuantityUnit = Optional.ofNullable(product.getStringField(ProductFields.ADDITIONAL_UNIT)) .orElse(product.getStringField(ProductFields.UNIT)); FieldComponent additionalQuantity = (FieldComponent) view.getComponentByReference("additionalQuantity"); BigDecimal newAdditionalQuantity = calculationQuantityService.calculateAdditionalQuantity(deliveredQuantity, conversion, additionalQuantityUnit); additionalQuantity.setFieldValue(numberService.formatWithMinimumFractionDigits(newAdditionalQuantity, 0)); additionalQuantity.requestComponentUpdateState(); } }
public void quantityChange(final ViewDefinitionState view, final ComponentState state, final String[] args) { deliveriesService.recalculatePrice(view, OrderedProductFields.ORDERED_QUANTITY); FormComponent form = (FormComponent) view.getComponentByReference("form"); Entity orderedProduct = form.getEntity(); Entity product = orderedProduct.getBelongsToField(OrderedProductFields.PRODUCT); if (decimalFieldsInvalid(form) || product == null) { return; } BigDecimal conversion = orderedProduct.getDecimalField(OrderedProductFields.CONVERSION); BigDecimal orderedQuantity = orderedProduct.getDecimalField(OrderedProductFields.ORDERED_QUANTITY); if (conversion != null && orderedQuantity != null) { String additionalQuantityUnit = Optional.ofNullable(product.getStringField(ProductFields.ADDITIONAL_UNIT)) .orElse(product.getStringField(ProductFields.UNIT)); FieldComponent additionalQuantity = (FieldComponent) view.getComponentByReference("additionalQuantity"); BigDecimal newAdditionalQuantity = calculationQuantityService.calculateAdditionalQuantity(orderedQuantity, conversion, additionalQuantityUnit); additionalQuantity.setFieldValue(numberService.formatWithMinimumFractionDigits(newAdditionalQuantity, 0)); additionalQuantity.requestComponentUpdateState(); } }
BigDecimal resourceQuantity = resource.getDecimalField(ResourceFields.QUANTITY); BigDecimal resourceAvailableQuantity = resource.getDecimalField(ResourceFields.AVAILABLE_QUANTITY); BigDecimal givenQuantity = calculationQuantityService.calculateAdditionalQuantity(quantity, conversion, givenUnit); BigDecimal givenResourceAvailableQuantity = calculationQuantityService.calculateAdditionalQuantity( resourceAvailableQuantity, conversion, givenUnit); } else { BigDecimal newResourceQuantity = resourceQuantity.subtract(resourceAvailableQuantity); BigDecimal quantityInAdditionalUnit = calculationQuantityService.calculateAdditionalQuantity( newResourceQuantity, conversion, givenUnit); || BigDecimal.ZERO.compareTo(calculationQuantityService.calculateAdditionalQuantity(quantity, conversion, givenUnit)) == 0) { return newPositions; resourceAvailableQuantity = resourceAvailableQuantity.subtract(quantity, numberService.getMathContext()); BigDecimal quantityInAdditionalUnit = calculationQuantityService.calculateAdditionalQuantity(resourceQuantity, conversion, givenUnit);
public void quantityChanged(final ViewDefinitionState view, final ComponentState state, final String[] args) { AwesomeDynamicListComponent deliveredProductMultiPositions = (AwesomeDynamicListComponent) view .getComponentByReference(DeliveredProductMultiFields.DELIVERED_PRODUCT_MULTI_POSITIONS); List<FormComponent> deliveredProductMultiPositionsFormComponents = deliveredProductMultiPositions.getFormComponents(); for (FormComponent deliveredProductMultiPositionsFormComponent : deliveredProductMultiPositionsFormComponents) { Entity deliveredProductMultiPosition = deliveredProductMultiPositionsFormComponent .getPersistedEntityWithIncludedFormValues(); boolean quantityComponentInForm = state.getUuid() .equals(deliveredProductMultiPositionsFormComponent.findFieldComponentByName("quantity").getUuid()); boolean conversionComponentInForm = state.getUuid() .equals(deliveredProductMultiPositionsFormComponent.findFieldComponentByName("conversion").getUuid()); if (quantityComponentInForm || conversionComponentInForm) { Entity product = deliveredProductMultiPosition.getBelongsToField(DeliveredProductMultiPositionFields.PRODUCT); BigDecimal quantity = deliveredProductMultiPosition.getDecimalField(DeliveredProductMultiPositionFields.QUANTITY); BigDecimal conversion = deliveredProductMultiPosition .getDecimalField(DeliveredProductMultiPositionFields.CONVERSION); if (conversion != null && quantity != null && product != null) { String additionalQuantityUnit = Optional.ofNullable(product.getStringField(ProductFields.ADDITIONAL_UNIT)) .orElse(product.getStringField(ProductFields.UNIT)); FieldComponent additionalQuantity = deliveredProductMultiPositionsFormComponent .findFieldComponentByName(DeliveredProductMultiPositionFields.ADDITIONAL_QUANTITY); BigDecimal newAdditionalQuantity = calculationQuantityService.calculateAdditionalQuantity(quantity, conversion, additionalQuantityUnit); additionalQuantity.setFieldValue(numberService.formatWithMinimumFractionDigits(newAdditionalQuantity, 0)); additionalQuantity.requestComponentUpdateState(); } break; } } }
public void onQuantityChange(final ViewDefinitionState viewDefinitionState, final ComponentState state, final String[] args) { FieldComponent quantityField = (FieldComponent) viewDefinitionState.getComponentByReference(ResourceFields.QUANTITY); FieldComponent quantityInAdditionalUnitField = (FieldComponent) viewDefinitionState .getComponentByReference(ResourceFields.QUANTITY_IN_ADDITIONAL_UNIT); FieldComponent additionalUnitField = (FieldComponent) viewDefinitionState .getComponentByReference(ResourceFields.GIVEN_UNIT); Either<Exception, Optional<BigDecimal>> maybeQuantity = BigDecimalUtils.tryParseAndIgnoreSeparator( (String) quantityField.getFieldValue(), viewDefinitionState.getLocale()); if (maybeQuantity.isRight() && maybeQuantity.getRight().isPresent()) { FormComponent form = (FormComponent) viewDefinitionState.getComponentByReference(L_FORM); Entity resource = form.getEntity(); BigDecimal newAdditionalQuantity = calculationQuantityService.calculateAdditionalQuantity(maybeQuantity.getRight() .get(), resource.getDecimalField(ResourceFields.CONVERSION), (String) additionalUnitField.getFieldValue()); String quantityInAdditionalUnitFormatted = numberService.format(newAdditionalQuantity); quantityInAdditionalUnitField.setFieldValue(quantityInAdditionalUnitFormatted); } else { quantityInAdditionalUnitField.setFieldValue(null); } }
BigDecimal resourceQuantity = resource.getDecimalField(QUANTITY); BigDecimal resourceAvailableQuantity = resource.getDecimalField(ResourceFields.AVAILABLE_QUANTITY); BigDecimal givenQuantity = calculationQuantityService.calculateAdditionalQuantity(quantity, conversion, givenUnit); BigDecimal givenResourceAvailableQuantity = calculationQuantityService.calculateAdditionalQuantity( resourceAvailableQuantity, conversion, givenUnit); BigDecimal newResourceQuantity = resourceQuantity.subtract(resourceAvailableQuantity); BigDecimal quantityInAdditionalUnit = calculationQuantityService.calculateAdditionalQuantity( newResourceQuantity, conversion, givenUnit); || BigDecimal.ZERO.compareTo(calculationQuantityService.calculateAdditionalQuantity(quantity, conversion, givenUnit)) == 0) { if (!newResource.isValid()) { resourceAvailableQuantity = resourceAvailableQuantity.subtract(quantity, numberService.getMathContext()); BigDecimal quantityInAdditionalUnit = calculationQuantityService.calculateAdditionalQuantity(resourceQuantity, conversion, givenUnit);
public void onConversionChange(final ViewDefinitionState viewDefinitionState, final ComponentState state, final String[] args) { FieldComponent conversionField = (FieldComponent) viewDefinitionState.getComponentByReference(ResourceFields.CONVERSION); FieldComponent quantityInAdditionalUnitField = (FieldComponent) viewDefinitionState .getComponentByReference(ResourceFields.QUANTITY_IN_ADDITIONAL_UNIT); FieldComponent additionalUnitField = (FieldComponent) viewDefinitionState .getComponentByReference(ResourceFields.GIVEN_UNIT); Either<Exception, Optional<BigDecimal>> maybeConversion = BigDecimalUtils.tryParseAndIgnoreSeparator( (String) conversionField.getFieldValue(), viewDefinitionState.getLocale()); if (maybeConversion.isRight() && maybeConversion.getRight().isPresent()) { FormComponent form = (FormComponent) viewDefinitionState.getComponentByReference(L_FORM); Entity resource = form.getPersistedEntityWithIncludedFormValues(); BigDecimal newAdditionalQuantity = calculationQuantityService.calculateAdditionalQuantity( resource.getDecimalField(ResourceFields.QUANTITY), maybeConversion.getRight().get(), (String) additionalUnitField.getFieldValue()); String quantityInAdditionalUnitFormatted = numberService.format(newAdditionalQuantity); quantityInAdditionalUnitField.setFieldValue(quantityInAdditionalUnitFormatted); } else { quantityInAdditionalUnitField.setFieldValue(null); } }
issueQuantity = demandQuantity.subtract(issuedQuantity).subtract(correction); if (conversion != null) { issuedQuantityAdditionalUnit = calculationQuantityService.calculateAdditionalQuantity(issueQuantity, conversion, additionalOrPrimaryUnit); if (conversion != null && demandQuantity != null) { issue.setField(IssueFields.CONVERSION, conversion); BigDecimal newAdditionalQuantity = calculationQuantityService.calculateAdditionalQuantity(demandQuantity, conversion, additionalOrPrimaryUnit); issue.setField(IssueFields.ADDITIONAL_DEMAND_QUANTITY, newAdditionalQuantity);