$html = "<div class='voucher'>\n<div class='logo-img'><img src='images/logo-voucher.png' width='144'  /></div>\n<div class='top-invoice'>\n<h4>Guest Details</h4>\n<div class='top-item'><label>Guest Name:</label><label> ";
$name = getCustName($cust);
$html .= $name[0]['cust_name'] . "</label></div>\n<div class='top-item'><label>Arrival Date:</label><label> ";
$qry = "select * from reservation where cust_id='{$cust}'";
$result = getData($qry);
$date = date_create($result[0]['arrival_date']);
$html .= date_format($date, "l, d F Y") . "</label></div>\n<div class='top-item'><label>Room No:</label><label>1,5</label></div>\n<div class='top-item'><label>Departure Date:</label><label> ";
$date = date_create($result[0]['departure_date']);
$html .= date_format($date, "l, d F Y") . "</label></div>\n<div class='top-item'><label>Mobile No:</label><label> ";
$phone = getCust($cust);
$html .= $phone[0]['phone_no'] . "</label></div>\n\n<div class='top-item'><label>Email: </label><label> ";
$html .= $phone[0]['email_address'] . "</label></div>\n</div>\n<div class='invoice-table'>\n<table cellspacing='0' border='0'>\n<tr><td>Item Description</td><td>Charges</td><td>Credit</td><td>Balance</td></tr>";
$qry = "select * from invoice where cust_id={$cust}";
$data = getData($qry);
foreach ($data as $val) {
    $sect = getSectionName($val['section_id']);
    $id = $val['section_id'];
    $html .= "<tr><td>" . $sect[0]['section_name'] . "</td><td>";
    $qy = "select sum(amount) as amount from invoice where cust_id={$cust} and section_id={$id}";
    $charge = getData($qy);
    $ch = $charge[0]['amount'];
    $html .= number_format($charge[0]['amount'], 2, '.', ',') . "</td><td>";
    $qy = "select sum(amount) as amount from payment where cust_id={$cust} and section_id={$id}";
    $credit = getData($qy);
    $cr = $credit[0]['amount'];
    $html .= number_format($credit[0]['amount'], 2, '.', ',') . "</td><td>";
    $bal = $ch - $cr;
    $html .= number_format($bal, 2, '.', ',') . "</td></tr>";
}
$html .= "</table>\n</div>\n\n</div><!--end of voucher-->";
include "library/mpdf/mpdf.php";
Example #2
0
        }
        $info->name = $parts[0];
        $info->constructor = true;
    } else {
        $info->constructor = false;
    }
    if (!preg_match('/(^function\\.)|((\\.|--|__)construct$)/', $info->manualid)) {
        // Only allow if it's a function like mysqli_prepare that's both procedural
        // and object-oriented, which is currently best detected by whether or not its
        // name starts with an uppercase letter or not
        if (preg_match('/^[A-Z]/', $info->name)) {
            // echo "Skipping non-constructor (no procedural equivalent to document): {$info->name}\n";
            continue;
        }
    }
    $section = getSectionName($info->manualid);
    $info = parseInfo($info);
    $data = array('name' => $info->name, 'prototype' => $info->prototype, 'description' => str_replace(array("\n", "\r"), " ", $info->purpose));
    // echo "{$section} -- {$info->name} -- {$info->manualid}\n";
    if (!$info->constructor) {
        $sections[$section][] = $info->name;
    }
    $functionsTxtLines[$info->name] = implode('%', $data);
    $functionsPlistLines[$info->name] = "\t{display = '{$info->name}'; insert = '({$info->pArgs})';}";
}
$classes = array_unique($classes);
sort($classes);
asort($functionsTxtLines);
sort($functionsPlistLines);
ksort($sections);
// echo implode("\n", array_keys($sections)) . "\n";