@if (loading) {
} @if (!loading && !booking) {

{{ 'booking.dettaglio.not_found' | translate }}

@if (!isDialog) { }
} @if (!loading && booking) { @if (!isDialog) {
{{ 'booking.lista.dialog_title' | translate }} #{{ booking.bkb_id }} — {{ booking.bkb_customer_name }}
@if (booking.bkb_status === 'CONFIRMED' || booking.bkb_status === 'PENDING') { }
} @if (isDialog) {
@if (!hasAnyPending) { } @if (hasAnyPending) { }
@if (booking.bkb_status === 'CONFIRMED' || booking.bkb_status === 'PENDING') { }
} } {{ 'booking.dettaglio.tab.details' | translate }} {{ 'booking.dettaglio.tab.order' | translate }} {{ 'booking.dettaglio.tab.cash' | translate }}
@if (!isDialog) {
{{ 'booking.dettaglio.lbl.status' | translate }}
{{ 'booking.dettaglio.lbl.payment' | translate }}
}
{{ 'booking.dettaglio.lbl.date' | translate }} {{ booking!.bkb_date | date:'dd/MM/yyyy' }}
@if (isBeach) {
{{ 'booking.dettaglio.lbl.date_end' | translate }} {{ booking!.bkb_date_to ? (booking!.bkb_date_to | date:'dd/MM/yyyy') : '—' }}
} @if (isBeach) { @if (booking!.bkb_start_time) {
{{ 'booking.dettaglio.lbl.time_start' | translate }} {{ booking!.bkb_start_time | slice:0:5 }}
} @if (booking!.bkb_end_time) {
{{ 'booking.dettaglio.lbl.time_end' | translate }} {{ booking!.bkb_end_time | slice:0:5 }}
} } @if (!isBeach) {
{{ 'booking.dettaglio.lbl.time_slot' | translate }} {{ booking!.bkts_name || '—' }}
}
{{ 'booking.dettaglio.lbl.resource' | translate }} {{ booking!.bkr_name || '—' }}
@if (!isBeach) {
{{ guestLabel }} {{ booking!.bkb_guests_count }}
} @if (isBeach) {
{{ 'booking.dettaglio.lbl.beds' | translate }} {{ booking!.bkb_lettini ?? 0 }}
{{ 'booking.dettaglio.lbl.deck_chairs' | translate }} {{ booking!.bkb_sdraio ?? 0 }}
{{ 'booking.dettaglio.lbl.chairs' | translate }} {{ booking!.bkb_sedie ?? 0 }}
}
{{ booking!.bkb_customer_name }}
@if (booking!.bkb_customer_phone) {
{{ booking!.bkb_customer_phone }}
} @if (booking!.bkb_customer_email) {
{{ booking!.bkb_customer_email }}
} @if (booking!.bkb_notes) {
{{ booking!.bkb_notes }}
}
@if (booking!.bkb_status !== 'COMPLETED') {
@if (booking!.bkb_status === 'PENDING') { } @if (booking!.bkb_status !== 'CANCELLED') { } @if (booking!.bkb_status !== 'CANCELLED') { }
}
@if (orderItems.length === 0) {
{{ 'booking.dettaglio.order.empty' | translate }}
} @for (item of unpaidOrderItems; track item) {
{{ item.bkmc_name }}
{{ item.bkmi_name }}
x{{ item.bkbi_quantity }} {{ item.bkbi_total_price | currency:'EUR':'symbol':'1.2-2' }}
} @if (paidOrderItems.length > 0) {
{{ 'booking.dettaglio.order.already_paid' | translate }}
@for (item of paidOrderItems; track item) {
{{ item.bkmc_name }}
{{ item.bkmi_name }}
x{{ item.bkbi_quantity }} {{ item.bkbi_total_price | currency:'EUR':'symbol':'1.2-2' }}
} } @if (orderItems.length > 0) {
@if (residuoOrder === 0) {
{{ 'booking.dettaglio.order.settled' | translate }} {{ totalMenuItems | currency:'EUR':'symbol':'1.2-2' }}
} @if (residuoOrder > 0) {
{{ 'booking.dettaglio.order.total' | translate }} {{ totalMenuItems | currency:'EUR':'symbol':'1.2-2' }}
@if (paidOrder > 0) {
{{ 'booking.dettaglio.order.residue' | translate }} {{ residuoOrder | currency:'EUR':'symbol':'1.2-2' }}
} }
}
@if (gatewayCompleted.length > 0) {
{{ 'booking.dettaglio.gateway.completed_title' | translate }}
@for (tx of gatewayCompleted; track tx) {
{{ tx.pt_amount | currency:'EUR':'symbol':'1.2-2' }} {{ tx.pt_type_code }} · {{ tx.pt_module }} · {{ tx.pt_date_response || tx.pt_date_ins | date:'dd/MM/yy HH:mm' }} · {{ tx.pt_uid }}
}
} @if (gatewayPendingOrFailed.length > 0) { } @if (prezzoBase > 0) {
{{ 'booking.dettaglio.cash.booking' | translate }} @if (residuoBooking === 0 && paidBooking > 0 && !hasPendingBooking) { {{ 'booking.dettaglio.cash.settled' | translate }} } @if (residuoBooking === 0 && paidBooking > 0 && hasPendingBooking) { {{ 'booking.dettaglio.gateway.unresolved' | translate }} }
@if (residuoBooking > 0) { }
@if (isBeach) { @if (booking!.bkb_lettini) {
{{ 'booking.dettaglio.cash.lbl.beds' | translate }} {{ booking!.bkb_lettini }}
} @if (booking!.bkb_sdraio) {
{{ 'booking.dettaglio.cash.lbl.deck_chairs' | translate }} {{ booking!.bkb_sdraio }}
} @if (booking!.bkb_sedie) {
{{ 'booking.dettaglio.cash.lbl.chairs' | translate }} {{ booking!.bkb_sedie }}
} @if (booking!.bkb_date_to) {
{{ 'booking.dettaglio.cash.lbl.period' | translate }} {{ booking!.bkb_date | date:'dd/MM/yy' }} - {{ booking!.bkb_date_to | date:'dd/MM/yy' }}
} } @if (!isBeach) {
{{ 'booking.dettaglio.cash.lbl.date' | translate }} {{ booking!.bkb_date | date:'dd/MM/yyyy' }}
@if (booking!.bkts_name) {
{{ 'booking.dettaglio.cash.lbl.slot' | translate }} {{ booking!.bkts_name }}
}
{{ guestLabel }} {{ booking!.bkb_guests_count }}
}
{{ 'booking.dettaglio.cash.total_booking' | translate }} {{ prezzoBase | currency:'EUR':'symbol':'1.2-2' }}
@if (residuoBooking > 0) {
{{ 'booking.dettaglio.cash.residue' | translate }} {{ residuoBooking | currency:'EUR':'symbol':'1.2-2' }}
}
@if (paymentsBooking.length > 0) {
{{ 'booking.dettaglio.cash.history' | translate }}
@for (pay of paymentsBooking; track pay) {
{{ pay.bkp_amount | currency:'EUR':'symbol':'1.2-2' }} @if (isPaymentRefunded(pay)) { } @if (pay.bkp_pt_state === 'PENDING') { } @if (pay.bkp_pt_state === 'FAILED' || pay.bkp_pt_state === 'CANCELLED') { }
{{ getMethodLabel(pay.bkp_method) }} — {{ pay.bkp_date | date:'dd/MM/yyyy HH:mm' }}
@if (getPaymentNotes(pay.bkp_notes)) {
{{ getPaymentNotes(pay.bkp_notes) }}
}
} } @if (paymentsBooking.length === 0) {
{{ 'booking.dettaglio.cash.no_payments' | translate }}
} } @if (totalMenuItems > 0) { @if (prezzoBase > 0) { }
{{ 'booking.dettaglio.cash.orders' | translate }} @if (residuoOrder === 0 && paidOrder > 0 && !hasPendingOrder) { {{ 'booking.dettaglio.cash.settled' | translate }} } @if (residuoOrder === 0 && paidOrder > 0 && hasPendingOrder) { {{ 'booking.dettaglio.gateway.unresolved' | translate }} }
@if (residuoOrder > 0) { }
@for (item of unpaidOrderItems; track item) {
x{{ item.bkbi_quantity }} {{ item.bkmi_name }} {{ item.bkbi_total_price | currency:'EUR':'symbol':'1.2-2' }}
} @if (paidOrderItems.length > 0) { @if (unpaidOrderItems.length > 0) {
} @for (item of paidOrderItems; track item) {
x{{ item.bkbi_quantity }} {{ item.bkmi_name }} {{ item.bkbi_total_price | currency:'EUR':'symbol':'1.2-2' }}
} }
{{ 'booking.dettaglio.cash.total_order' | translate }} {{ totalMenuItems | currency:'EUR':'symbol':'1.2-2' }}
@if (residuoOrder > 0) {
{{ 'booking.dettaglio.cash.residue' | translate }} {{ residuoOrder | currency:'EUR':'symbol':'1.2-2' }}
}
@if (paymentsOrder.length > 0) {
{{ 'booking.dettaglio.cash.history' | translate }}
@for (pay of paymentsOrder; track pay) {
{{ pay.bkp_amount | currency:'EUR':'symbol':'1.2-2' }} @if (isPaymentRefunded(pay)) { } @if (pay.bkp_pt_state === 'PENDING') { } @if (pay.bkp_pt_state === 'FAILED' || pay.bkp_pt_state === 'CANCELLED') { }
{{ getMethodLabel(pay.bkp_method) }} — {{ pay.bkp_date | date:'dd/MM/yyyy HH:mm' }}
@if (getPaymentNotes(pay.bkp_notes)) {
{{ getPaymentNotes(pay.bkp_notes) }}
}
} } @if (paymentsOrder.length === 0) {
{{ 'booking.dettaglio.cash.no_payments' | translate }}
} } @if (prezzoBase === 0 && totalMenuItems === 0) {
{{ 'common.lbl.total' | translate }} {{ booking!.bkb_total_amount | currency:'EUR':'symbol':'1.2-2' }}
{{ 'booking.dettaglio.cash.paid_label' | translate }} {{ booking!.bkb_paid_amount | currency:'EUR':'symbol':'1.2-2' }}
@if (importoResiduo > 0) {
{{ 'booking.dettaglio.cash.residue_fallback' | translate }} {{ importoResiduo | currency:'EUR':'symbol':'1.2-2' }}
}
@if (payments.length === 0) {
{{ 'booking.dettaglio.cash.no_payments' | translate }}
} @for (pay of payments; track pay) {
{{ pay.bkp_amount | currency:'EUR':'symbol':'1.2-2' }}
{{ getMethodLabel(pay.bkp_method) }} — {{ pay.bkp_date | date:'dd/MM/yyyy HH:mm' }}
@if (getPaymentNotes(pay.bkp_notes)) {
{{ getPaymentNotes(pay.bkp_notes) }}
}
} }
@if (newPayment.bkp_type === 'ORDER' && unpaidOrderItems.length > 0) {
@for (item of unpaidOrderItems; track item) {
{{ item.bkmi_name }} {{ (item.bkbi_total_price / item.bkbi_quantity) * (selectedOrderQuantities[item.bkbi_id] ?? item.bkbi_quantity) | currency:'EUR':'symbol':'1.2-2' }}
}
}
@if (showCheckoutDialog) { }