On envoie à l'API beds24 le prix de la chambre
This commit is contained in:
@@ -115,6 +115,19 @@ class Beds24Request
|
||||
$lastNight = $booking->getEndDate();
|
||||
$lastNight->sub(new \DateInterval("P1D"));
|
||||
|
||||
$price = $booking->getOrder()->getTotalAmount();
|
||||
$taxe = $booking->getOrderProduct()->getOrderProductTaxes()->getFirst();
|
||||
$tva = $taxe->getAmount();
|
||||
|
||||
$invoiceArray = array();
|
||||
$invoiceArray['description'] = "Location";
|
||||
$invoiceArray['status'] = "Paid";
|
||||
$invoiceArray['qty'] = 1;
|
||||
$invoiceArray['price'] = $price;
|
||||
$invoiceArray['vatRate'] = 20;
|
||||
$invoiceArray['type'] = 1;
|
||||
$invoiceArray['invoiceId'] = "";
|
||||
|
||||
$requestParameters = [
|
||||
"roomId" => $booking->getRoomId(),
|
||||
"roomQty" => 1,
|
||||
@@ -134,6 +147,12 @@ class Beds24Request
|
||||
"guestPostcode"=> $address->getZipcode(),
|
||||
"guestCountry"=> $address->getCountry()->setLocale($locale)->getTitle(),
|
||||
|
||||
"price" => $price,
|
||||
"deposit" => 0,
|
||||
"tax" => $tva,
|
||||
"commission" => 0,
|
||||
"invoice" => $invoiceArray
|
||||
|
||||
// "notifyGuest" => true,
|
||||
// "notifyHost" => true
|
||||
];
|
||||
|
||||
@@ -139,7 +139,7 @@ class RoomAvailability extends BaseLoop implements ArraySearchLoopInterface
|
||||
}
|
||||
}
|
||||
|
||||
// print_r($result);
|
||||
//print_r($result);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -15,4 +15,4 @@
|
||||
"available": false,
|
||||
"error": "{$error}"
|
||||
}
|
||||
{/elseloop}
|
||||
{/elseloop}
|
||||
Reference in New Issue
Block a user