|
Additional code to ensure you have all the settings set
$guarantee_type = $hotel[ 'Policies' ][ 'Policy' ][ 'GuaranteePaymentPolicy' ][ 'GuaranteePayment' ][ '!GuaranteeType' ]; //i.e. Deposit
$guarantee_percent = $hotel[ 'Policies' ][ 'Policy' ][ 'GuaranteePaymentPolicy' ][ 'GuaranteePayment' ][ 'AmountPercent' ][ '!Percent' ];
$deposit_tax_inc = $hotel[ 'Policies' ][ 'Policy' ][ 'GuaranteePaymentPolicy' ][ 'GuaranteePayment' ][ 'AmountPercent' ][ '!TaxInclusive' ];
$policy_deposit_num_nights = $hotel[ 'Policies' ][ 'Policy' ][ 'GuaranteePaymentPolicy' ][ 'GuaranteePayment' ][ 'AmountPercent' ][ '!NmbrOfNights' ];
$deposit_flat_amount = $hotel[ 'Policies' ][ 'Policy' ][ 'GuaranteePaymentPolicy' ][ 'GuaranteePayment' ][ 'AmountPercent' ][ '!Flat' ];
$apply_taxes_to_deposit = $hotel[ 'Policies' ][ 'Policy' ][ 'GuaranteePaymentPolicy' ][ 'GuaranteePayment' ][ 'AmountPercent' ][ '!TaxInclusive' ];
if ( empty( $guarantee_type )or $guarantee_type == "" ) { //no deposit
$deposit_payment_basis = 4;
$deposit_amount = 0;
$deposit_tax_inc = "no";
} elseif ( $guarantee_type == "GuaranteeRequired" ) {
$deposit_payment_basis = 1;
$deposit_amount = 0;
$deposit_tax_inc = "no";
} elseif ( $guarantee_type == "Deposit" ) {
if ( $policy_deposit_num_nights == 1 ) { //1-night deposit
$deposit_payment_basis = 2;
$deposit_amount = 0;
//$deposit_tax_inc = 0;
} else { // % deposit
$deposit_payment_basis = 3;
$deposit_amount = $guarantee_percent;
//$deposit_tax_inc = 0;
}
}
|