Advertisement
fedorm

Untitled

Jan 12th, 2018
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.91 KB | None | 0 0
  1.                 /**
  2.                  * МЕТОД ВЗАИМОДЕЙСТВИЯ С УЧЕТОМ НАБОРОВ
  3.                  * Цена товара 13002: 417.23 за 1кг
  4.                  * Наборы:
  5.                  * Первый плагин- набор из 2 товаров, на первый товар 60% скидка, на второй 35% скидка
  6.                  * Второй плагин- набор из 2 товаров, на первый товар 70% скидка, на второй 30% скидка, ограничение количества - 1
  7.                  * Когда кассир добавляет в чек 1, 1, 1, 1, 1кг
  8.                  * Тогда сумма скидки составляет 1272,55
  9.                 */
  10.                 {
  11.                         "Case 19",
  12.                         TestUtils.createPurchase(
  13.                                 new PositionDescriptor("13002", "13002", 417.23, LoyalProductType.ProductType.WEIGHT, 1,1,1,1,1)
  14.                         ),
  15.                         new AdvertisingActionEntity[]{
  16.                                 TestUtils.createApplyObjectAction(false, 66617L, "A13002",
  17.                                         TestUtils.createSetApplyObject(1, null, DefaultSetApplyObject.ValueType.PERCENT, false, false, null,
  18.                                                 new RowDescriptor(1, 70, false, "13002"),
  19.                                                 new RowDescriptor(1, 30, false, "13002")
  20.                                         ),
  21.                                         TestUtils.createSetApplyObject(0, null, DefaultSetApplyObject.ValueType.PERCENT, false, false, null,
  22.                                                 new RowDescriptor(1, 60, false, "13002"),
  23.                                                 new RowDescriptor(1, 35, false, "13002")
  24.                                         )
  25.                                 )
  26.                         },
  27.                         813.60,
  28.                         GeneralInteractionMethod.MAXIMUM_SETS_INDEPENDENT_DISCOUNT,
  29.                         TestUtils.asMutableList(
  30.                                 new DiscountDescriptor(66617L, new PositionKey("13002", TestUtils.convertSum(417.23)), TestUtils.convertCount(1), 250_34, null),
  31.                         new DiscountDescriptor(66617L, new PositionKey("13002", TestUtils.convertSum(417.23)), TestUtils.convertCount(1), 146_03, null),
  32.                         new DiscountDescriptor(66617L, new PositionKey("13002", TestUtils.convertSum(417.23)), TestUtils.convertCount(1), 292_06, null),
  33.                         new DiscountDescriptor(66617L, new PositionKey("13002", TestUtils.convertSum(417.23)), TestUtils.convertCount(1), 125_17, null),
  34.                         new DiscountDescriptor(66617L, new PositionKey("13002", TestUtils.convertSum(417.23)), TestUtils.convertCount(1), 0, null)
  35.                         )
  36.                 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement