예제 #1
0
 if ($bill['trans'][$j]['status'] == STATUS_VOID) {
     $j++;
     continue;
 }
 // end of lines print the footer
 if ($lc != 0 && $lc % $LC == 0) {
     print_customfooter($pg, $px, $lc);
     $pg++;
     $lc = 0;
     continue;
 }
 if ($lc == 0) {
     print_customheader($logofile, $px, $lc);
 }
 echo "<tr style=\"border-width:2px; border-color:#000\\ border-style:solid\"> <td>" . $bill['trans'][$j]['trans_date'] . "</td>";
 echo "<td>" . get_itemname($bill['trans'][$j]['item_id']) . "</td>";
 echo "<td>" . sprintf("%02.2f", $bill['trans'][$j]['amount'] + $bill['trans'][$j]['svc']) . "</td>";
 echo "<td></td>";
 echo "<td>" . sprintf("%02.2f", $bill['trans'][$j]['tax']) . "</td>";
 echo "<td>" . sprintf("%02d", $bill['trans'][$j]['quantity']) . "</td>";
 echo "<td>" . sprintf("%02.2f", $bill['trans'][$j]['grossamount']) . " " . $bill['trans'][$j]['currency'] . "</td>";
 echo "</tr>";
 $lc++;
 $total += $bill['trans'][$j]['grossamount'];
 if (array_key_exists($bill['trans'][$j]['currency'], $totalArr)) {
     $totalArr[$bill['trans'][$j]['currency']] += $bill['trans'][$j]['grossamount'];
 } else {
     $totalArr[$bill['trans'][$j]['currency']] = $bill['trans'][$j]['grossamount'];
 }
 $j++;
 // Next receipt item
예제 #2
0
 $objPHPExcel->getActiveSheet()->setCellValue('K1', "Quantity");
 $objPHPExcel->getActiveSheet()->setCellValue('L1', "Total Service");
 $objPHPExcel->getActiveSheet()->setCellValue('M1', "Total Tax");
 $objPHPExcel->getActiveSheet()->setCellValue('N1', "Total Amount");
 $objPHPExcel->getActiveSheet()->setCellValue('O1', "Gross Amount");
 $objPHPExcel->getActiveSheet()->setCellValue('P1', "Invoice Status");
 $objPHPExcel->getActiveSheet()->setCellValue('O1', "Currency");
 $i = 2;
 for ($j = 0; $j < $inv_cnt; $j++) {
     $objPHPExcel->getActiveSheet()->setCellValue('A' . $i, $invoices[$j]['invoiceNo']);
     $objPHPExcel->getActiveSheet()->setCellValue('B' . $i, get_guestname($invoices[$j]['guestid']));
     $objPHPExcel->getActiveSheet()->setCellValue('C' . $i, $invoices[$j]['invoiceDate']);
     $objPHPExcel->getActiveSheet()->setCellValue('D' . $i, get_bookingvoucher($invoices[$j]['bookID']));
     $objPHPExcel->getActiveSheet()->setCellValue('E' . $i, get_reservationvoucher($invoices[$j]['resID']));
     $objPHPExcel->getActiveSheet()->setCellValue('F' . $i, $invoices[$j]['add_date']);
     $objPHPExcel->getActiveSheet()->setCellValue('G' . $i, get_itemname($invoices[$j]['item_id']));
     $objPHPExcel->getActiveSheet()->setCellValue('H' . $i, $invoices[$j]['std_amount']);
     $objPHPExcel->getActiveSheet()->setCellValue('I' . $i, $invoices[$j]['std_svc']);
     $objPHPExcel->getActiveSheet()->setCellValue('J' . $i, $invoices[$j]['std_tax']);
     $objPHPExcel->getActiveSheet()->setCellValue('K' . $i, $invoices[$j]['quantity']);
     $objPHPExcel->getActiveSheet()->setCellValue('L' . $i, $invoices[$j]['svc']);
     $objPHPExcel->getActiveSheet()->setCellValue('M' . $i, $invoices[$j]['tax']);
     $objPHPExcel->getActiveSheet()->setCellValue('N' . $i, $invoices[$j]['amount']);
     $objPHPExcel->getActiveSheet()->setCellValue('O' . $i, $invoices[$j]['grossamount']);
     $status = get_general_status_text($invoices[$j]['status']);
     if (!$status) {
         $status = $invoices[$j]['status'];
     }
     $objPHPExcel->getActiveSheet()->setCellValue('P' . $i, $status);
     $objPHPExcel->getActiveSheet()->setCellValue('O' . $i, $invoices[$j]['currency']);
     $i++;
예제 #3
0
    echo $_L['RTS_months'];
    ?>
</th>
											  <th><?php 
    echo $_L['RTS_holidays'];
    ?>
</th>
											  <th><?php 
    echo $_L['RTS_max'];
    ?>
</th>
											</tr>
											<?php 
    foreach ($rateitems as $idx => $val) {
        print "<tr><td><input type=radio name=delitem value='" . $idx . "' /></td>";
        print "<td>" . get_itemname($rateitems[$idx]['itemid']) . "</td>";
        print "<td>";
        print get_discounttypestring($rateitems[$idx]['discounttype']);
        print "</td>";
        print "<td>" . sprintf("%01.2f", $rateitems[$idx]['discountvalue']) . "</td>";
        print "<td>";
        if ($rateitems[$idx]['service']) {
            print $_L['RTS_service'] . "<br/>";
        }
        if ($rateitems[$idx]['tax']) {
            print $_L['RTS_tax'];
        }
        print "</td>";
        print "<td>";
        print get_ratesperiodstring($rateitems[$idx]['validperiod'], 1, 0, 0);
        print "</td>";
예제 #4
0
    if ($lc != 0 && $lc % $LC == 0) {
        print_customfooter($pg, $px, $lc);
        $pg++;
        $lc = 0;
        continue;
    }
    if ($lc == 0) {
        print_customheader($logofile, $px, $lc);
    }
    if (!$cur) {
        $cur = $bill['trans'][$j]['currency'];
    }
    $GST += $bill['trans'][$j]['quantity'] * $bill['trans'][$j]['tax'];
    $itemamount = $bill['trans'][$j]['grossamount'] - $bill['trans'][$j]['quantity'] * $bill['trans'][$j]['tax'];
    echo "<tr><td style=\"border-left:1pt solid black;\">" . $bill['trans'][$j]['trans_date'] . "</td>";
    echo "<td  style=\"border-left:1pt solid black;\">" . get_itemname($bill['trans'][$j]['item_id']) . "</td>";
    echo "<td align=center  style=\"border-left:1pt solid black;\">" . sprintf("%02d", $bill['trans'][$j]['quantity']) . "</td>";
    echo "<td align=right colspan=3  style=\"border-left:1pt solid black;\">" . sprintf("%02.2f", $bill['trans'][$j]['amount'] + $bill['trans'][$j]['svc']) . "</td>";
    echo "<td align=right colspan=1  style=\"border-left:1pt solid black; border-right:1pt solid black;\">" . sprintf("%02.2f", $itemamount) . " " . $bill['trans'][$j]['currency'] . "</td>";
    echo "</tr>";
    $lc++;
    $total += $bill['trans'][$j]['grossamount'];
    $totalinv += $itemamount;
    if (array_key_exists($bill['trans'][$j]['currency'], $totalArr)) {
        $totalArr[$bill['trans'][$j]['currency']] += $bill['trans'][$j]['grossamount'];
    } else {
        $totalArr[$bill['trans'][$j]['currency']] = $bill['trans'][$j]['grossamount'];
    }
    $j++;
    // Next receipt item
}
예제 #5
0
/**
 * Get the rate summary detail for a specific rates id
 *
 * @ingroup RATE_MANAGEMENT
 * @param $ratesid [in] Rate id
 * @param $rate [in/out] Rate detail
 */
function get_ratebyratesid($ratesid, &$rate)
{
    global $conn;
    global $_L;
    if (!$ratesid) {
        return 0;
    }
    if (!$conn) {
        $conn = connect_Hotel_db(HOST, USER, PASS, DB, PORT);
    }
    if (!$conn) {
        return 0;
    }
    $fullrate = array();
    //	print "get fullrate ".$ratesid."<br/>";
    if (!get_rate($ratesid, $fullrate)) {
        return 0;
    }
    $rate = array();
    $rate['rateid'] = $ratesid;
    $rate['name'] = $fullrate['description'];
    $rate['code'] = $fullrate['ratecode'];
    $rate['currency'] = $fullrate['currency'];
    $items = array();
    get_rateitems($ratesid, $items);
    $rate['inclusions'] = "";
    foreach ($items as $idx => $val) {
        $rate['inclusions'] .= $_L['RTS_product'] . " : " . get_itemname($items[$idx]['itemid']) . "<br/>";
        $rate['inclusions'] .= $_L['RTS_valid'] . " : " . get_ratesperiodstring($items[$idx]['validperiod'], 1, 1, 1) . "<br/>";
        $rate['inclusions'] .= $_L['RTS_ratetype'] . " : " . get_discounttypestring($items[$idx]['discounttype']) . "<br/>";
        $rate['inclusions'] .= $_L['RTS_price'] . " : " . $rate['currency'] . " " . $items[$idx]['discountvalue'] . "<br/>";
        if ($items[$idx]['discountvalue']) {
            if ($items[$idx]['service']) {
                $rate['inclusions'] .= $_L['RTS_including'];
            } else {
                $rate['inclusions'] .= $_L['RTS_excluding'];
            }
            $rate['inclusions'] .= " " . $_L['RTS_service'] . "<br/>";
            if ($items[$idx]['tax']) {
                $rate['inclusions'] .= $_L['RTS_including'];
            } else {
                $rate['inclusions'] .= $_L['RTS_excluding'];
            }
            $rate['inclusions'] .= " " . $_L['RTS_tax'] . "<br/>";
        }
        $rate['inclusions'] .= "<br/>";
        $rate['price'] = $items[$idx]['discountvalue'];
    }
    $rate['requirements'] = $_L['RTS_occupancy'] . " " . get_occupancystring($fullrate['occupancy']) . "<br/>";
    $rate['requirements'] .= $_L['RTS_commencing'] . " " . $fullrate['date_started'] . "<br/>";
    $rate['requirements'] .= $_L['RTS_ending'] . " " . $fullrate['date_stopped'] . "<br/>";
    $rate['requirements'] .= $_L['RTS_minnights'] . " " . $fullrate['minstay'] . "<br/>";
    $rate['requirements'] .= $_L['RTS_maxnights'] . " " . $fullrate['maxstay'] . "<br/>";
    $rate['requirements'] .= $_L['RTS_minpax'] . " " . $fullrate['minpax'] . "<br/>";
    $rate['requirements'] .= $_L['RTS_maxpax'] . " " . $fullrate['maxpax'] . "<br/>";
    $rate['requirements'] .= $_L['RTS_minbook'] . " " . $fullrate['minbook'] . "<br/>";
}