
{{~#*inline "format-money"~}}
{{money-amount money}} {{money.currency}}
{{~/inline~}}

{{~#*inline "format-date"~}}
{{date date format="MMM d, YYYY"}}
{{~/inline~}}

{{#with transaction~}}
Please respond to a request by {{customer.display-name}}

Good news! {{customer.display-name}} just requested to book {{listing.title}} from {{> format-date date=booking.start}} to {{> format-date date=booking.end}}. Here's the breakdown.

Payment
{{#each line-items~}}
{{~#contains include-for "provider"~}}
{{~#eq "day" code~}}
{{> format-money money=unit-price}} x {{number quantity}} {{inflect quantity "day" "days"}}: {{> format-money money=line-total}}
{{/eq~}}
{{~#eq "night" code~}}
{{> format-money money=unit-price}} x {{number quantity}} {{inflect quantity "night" "nights"}}: {{> format-money money=line-total}}
{{/eq~}}
{{~#eq "provider-commission" code~}}
{{marketplace.name}} fee: {{> format-money money=line-total}}
{{/eq~}}
{{~/contains~}}
{{/each~}}
You earn: {{> format-money money=payout-total}}

You need to accept the request by {{> format-date date=delayed-transition.run-at}}. Otherwise the request will be expired and you won't get paid. If the booked dates won't work for you, you can also choose to decline the request.

Accept or decline the booking: {{marketplace.url}}/sale/{{url-encode id}}/details

{{~/with}}