diff --git a/skills/paradiz/scripts/calc_quote.py b/skills/paradiz/scripts/calc_quote.py index 6a68353..79829e4 100755 --- a/skills/paradiz/scripts/calc_quote.py +++ b/skills/paradiz/scripts/calc_quote.py @@ -109,9 +109,15 @@ def main(): continue if c_total is not None and r[c_total] is not None: - total = float(r[c_total]) + base_total = float(r[c_total]) else: - total = float(r[c_ppn]) * nights + base_total = float(r[c_ppn]) * nights + + # Базовые цены в прайсе указаны за 2 гостей. + # За 3-го гостя +800 ₽/сутки, за 4-го гостя ещё +800 ₽/сутки. + extra_guests = max(0, args.guests - 2) + extra_per_night = 800 * extra_guests + total = base_total + (extra_per_night * nights) matches.append({ "room": room,