Ejemplo n.º 1
0
 $start = strtotime($start);
 $date = new DateTime($drop_off_date);
 $end = $date->format('m/d/Y') . ' ' . $drop_off_time;
 $end = strtotime($end);
 $day = STCars::get_date_diff($start, $end);
 if (!empty($item['data']['discount'])) {
     $count_sale = $item['data']['discount'];
     $price_old = $item['data']['price_old'];
 }
 $price_car = $data_price_cars->price_cars;
 $total_price_items = 0;
 $data_price_items = array();
 $html_item = '';
 if ($selected_equipments and !empty($selected_equipments)) {
     foreach ($selected_equipments as $e_k => $e_v) {
         $title = ' (' . TravelHelper::format_money($e_v->price) . '/' . st_car_price_unit_title($e_v->price_unit) . ')';
         $html_item .= '<li>
                             <p class="booking-item-payment-price-title">' . $e_v->title . $title . '</p>
                             <p class="booking-item-payment-price-amount">' . TravelHelper::format_money(STCars::get_equipment_line_item($e_v->price, $e_v->price_unit, $start, $end)) . '</p>
                       </li>';
     }
 } else {
     if (!empty($item['data']['data_price_items'])) {
         $data_price_items = get_object_vars($item['data']['data_price_items']);
         foreach ($data_price_items as $k => $v) {
             $total_price_items += $v;
             $html_item .= '<li>
                             <p class="booking-item-payment-price-title">' . $k . '</p>
                             <p class="booking-item-payment-price-amount">' . TravelHelper::format_money($v) . '</p>
                       </li>';
         }
        <?php 
}
?>

        <?php 
if (!empty($selected_equipments)) {
    ?>
            <p><strong><?php 
    _e("Equipments: ", ST_TEXTDOMAIN);
    ?>
</strong>
                <ul>
                <?php 
    foreach ($selected_equipments as $equipment) {
        $price_unit = '';
        if (isset($equipment->price_unit) and $equipment->price_unit) {
            $price_unit = ' (' . TravelHelper::format_money($equipment->price) . '/' . st_car_price_unit_title($equipment->price_unit) . ')';
        }
        // echo "<li>".$equipment->title.$price_unit." ->xx ".TravelHelper::format_money(STCars::get_equipment_line_item($equipment->price,$equipment->price_unit,$check_in_timestamp,$check_out_timestamp))."</li>";
        echo "<li>" . $equipment->title . $price_unit . "</li>";
    }
    ?>
                </ul>
            </p>

        <?php 
}
?>
    </td>
</tr>