{
  "description": "Суббота, 12:00 по Москве: утренняя акция не действует, лимит «раз в день» исчерпан, VIP-условие не выполнено, скидка выходного дня урезана остатком бюджета, баллы за каждую бутылку воды начисляются поштучно.",
  "calculation": [
    "«Утро» (08:00–11:00) вне расписания — не упоминается. «Раз в день» уже использована сегодня. «VIP» требует сегмент vip, у участника только regular.",
    "Выходные: 10 % от 50 000 = 5000 (4200 и 800), но в бюджете осталось 700 → 700 по весам 4200 : 800 → 588 и 112.",
    "К оплате 41 412 + 7888 = 49 300 → базовое начисление ⌊24,65⌋ = 24; по весам 20,16 / 3,84 → 20 и 3, остаток — хлебу → 20 и 4.",
    "Вода: 5 баллов × 6 бутылок = 30. Итого 50 и 4."
  ],
  "rules": {
    "schema": 1,
    "program_id": "01900000-0000-7000-8000-000000000001",
    "timezone": "Europe/Moscow",
    "points": {
      "point_type_id": "01900000-0000-7000-8000-000000000002",
      "precision": 0,
      "value_minor": 100
    },
    "accrual": {
      "percent_bp": 500
    },
    "redemption": {
      "max_share_bp": 10000,
      "min_unit_remainder_minor": 0,
      "min_receipt_minor": 0,
      "confirmation": "weak_identifiers"
    },
    "lifecycle": {
      "activation_delay_days": null,
      "expiration_policy": "after_days",
      "expiration_days": null,
      "expiration_date": null,
      "expiration_years": null
    },
    "returns": {
      "spent_points_policy": "ignore",
      "restore_into_new_lot": false
    },
    "campaigns": [
      {
        "id": "morning",
        "version": 1,
        "title": "Утренние баллы",
        "priority": 50,
        "members_only": true,
        "requires_code": false,
        "exclusive": false,
        "stacking": null,
        "schedule": {
          "starts_at": null,
          "ends_at": null,
          "weekdays": [],
          "time_from": "08:00",
          "time_to": "11:00"
        },
        "channels": [],
        "locations": [],
        "condition": null,
        "target": null,
        "effect": {
          "type": "points_amount",
          "points": 100,
          "per": "receipt"
        },
        "member_limit": null,
        "budget": null
      },
      {
        "id": "weekend",
        "version": 1,
        "title": "Выходные −10 %",
        "priority": 40,
        "members_only": true,
        "requires_code": false,
        "exclusive": false,
        "stacking": null,
        "schedule": {
          "starts_at": "2026-09-01T00:00:00+00:00",
          "ends_at": "2026-12-01T00:00:00+00:00",
          "weekdays": [
            6,
            7
          ],
          "time_from": null,
          "time_to": null
        },
        "channels": [],
        "locations": [],
        "condition": null,
        "target": null,
        "effect": {
          "type": "discount_percent",
          "percent_bp": 1000
        },
        "member_limit": null,
        "budget": 1000
      },
      {
        "id": "once-a-day",
        "version": 1,
        "title": "+10 % баллов раз в день",
        "priority": 30,
        "members_only": true,
        "requires_code": false,
        "exclusive": false,
        "stacking": null,
        "schedule": {
          "starts_at": null,
          "ends_at": null,
          "weekdays": [],
          "time_from": null,
          "time_to": null
        },
        "channels": [],
        "locations": [],
        "condition": null,
        "target": null,
        "effect": {
          "type": "points_percent",
          "percent_bp": 1000
        },
        "member_limit": {
          "uses": 1,
          "period": "day"
        },
        "budget": null
      },
      {
        "id": "vip",
        "version": 1,
        "title": "VIP −100 ₽",
        "priority": 20,
        "members_only": true,
        "requires_code": false,
        "exclusive": false,
        "stacking": null,
        "schedule": {
          "starts_at": null,
          "ends_at": null,
          "weekdays": [],
          "time_from": null,
          "time_to": null
        },
        "channels": [],
        "locations": [],
        "condition": {
          "in": [
            "vip",
            {
              "var": "member.segments"
            }
          ]
        },
        "target": null,
        "effect": {
          "type": "discount_amount",
          "amount_minor": 10000,
          "per": "receipt"
        },
        "member_limit": null,
        "budget": null
      },
      {
        "id": "units",
        "version": 1,
        "title": "5 баллов за бутылку воды",
        "priority": 10,
        "members_only": true,
        "requires_code": false,
        "exclusive": false,
        "stacking": null,
        "schedule": {
          "starts_at": null,
          "ends_at": null,
          "weekdays": [],
          "time_from": null,
          "time_to": null
        },
        "channels": [],
        "locations": [],
        "condition": null,
        "target": {
          "in": [
            {
              "var": "line.sku"
            },
            [
              "WATER"
            ]
          ]
        },
        "effect": {
          "type": "points_amount",
          "points": 5,
          "per": "unit"
        },
        "member_limit": null,
        "budget": null
      }
    ],
    "tiers": null,
    "bonuses": {
      "welcome": null,
      "birthday": null,
      "referral": null
    },
    "stamp_cards": []
  },
  "basket": {
    "purchased_at": "2026-10-03T12:00:00+03:00",
    "redeem_points": 0,
    "redeem_maximum": false,
    "lines": [
      {
        "id": "1",
        "sku": "WATER",
        "quantity": 6000,
        "amount": 42000
      },
      {
        "id": "2",
        "sku": "BREAD",
        "quantity": 1000,
        "amount": 8000
      }
    ]
  },
  "member": {
    "member_id": "m-1",
    "spendable_points": 0,
    "can_redeem": true,
    "can_accrue": true,
    "segments": [
      "regular"
    ],
    "purchases": 12
  },
  "campaign_state": {
    "member_uses": {
      "once-a-day": 1
    },
    "budget_left": {
      "weekend": 700
    }
  },
  "expected": {
    "total": 50000,
    "discount": 700,
    "redeemed_money": 0,
    "redeemed_points": 0,
    "points_earned": 54,
    "payable": 49300,
    "max_redeemable_points": 0,
    "lines": [
      {
        "id": "1",
        "amount": 42000,
        "discount": 588,
        "redeemed_money": 0,
        "redeemed_points": 0,
        "points_earned": 50,
        "payable": 41412
      },
      {
        "id": "2",
        "amount": 8000,
        "discount": 112,
        "redeemed_money": 0,
        "redeemed_points": 0,
        "points_earned": 4,
        "payable": 7888
      }
    ],
    "campaigns": [
      {
        "campaign_id": "weekend",
        "version": 1,
        "title": "Выходные −10 %",
        "effect": "discount_percent",
        "discount": 700,
        "points": 0,
        "promo_code": null,
        "limited_by_budget": true,
        "lines": [
          {
            "id": "1",
            "discount": 588,
            "points": 0
          },
          {
            "id": "2",
            "discount": 112,
            "points": 0
          }
        ]
      },
      {
        "campaign_id": "units",
        "version": 1,
        "title": "5 баллов за бутылку воды",
        "effect": "points_amount",
        "discount": 0,
        "points": 30,
        "promo_code": null,
        "limited_by_budget": false,
        "lines": [
          {
            "id": "1",
            "discount": 0,
            "points": 30
          }
        ]
      }
    ],
    "stamps": [],
    "trace": [
      {
        "code": "campaign.skipped",
        "data": {
          "campaign": "once-a-day",
          "reason": "member_limit"
        }
      },
      {
        "code": "campaign.skipped",
        "data": {
          "campaign": "vip",
          "reason": "condition"
        }
      },
      {
        "code": "campaign.applied",
        "data": {
          "campaign": "weekend",
          "discount": 700,
          "budget_limited": true
        }
      },
      {
        "code": "redemption.limit",
        "data": {
          "eligible_total": 49300,
          "capacity": 49300,
          "max_share_bp": 10000,
          "balance": 0,
          "max_points": 0
        }
      },
      {
        "code": "accrual.base",
        "data": {
          "base": 49300,
          "percent_bp": 500,
          "points": 24
        }
      },
      {
        "code": "campaign.applied",
        "data": {
          "campaign": "units",
          "points": 30,
          "budget_limited": false
        }
      }
    ]
  }
}
