Adjust paradiz pricing: add per-night surcharge for 3rd/4th guest
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user