Exemplo n.º 1
0
            $qry_dtl = mysql_query($sql_dtl);
            $row_dtl = mysql_fetch_assoc($qry_dtl);
            $desc = $row_dtl['material'];
            break;
        case "accessory":
            $sql_dtl = "SELECT * FROM tbl_accessory WHERE accessory_id = '{$row_servicedtl['id']}' ORDER BY accessory_id LIMIT 0,1";
            $qry_dtl = mysql_query($sql_dtl);
            $row_dtl = mysql_fetch_assoc($qry_dtl);
            $desc = $row_dtl['accessory'];
            break;
        default:
            break;
    }
    $servicedtl[] = array("desc" => $desc, "type" => $row_servicedtl['type'], "qty" => $row_servicedtl['qty'], "amount" => $row_servicedtl['amount']);
}
if ($numwo_mst == 0) {
    echo '<script>window.location="estimate_menu.php"</script>';
}
$pdf = new PrintEstimate();
// Data loading
$pdf->setCompanyInfo('FAST QUICK SERVICE', '#100 President Ave. BF Home Paranaque, City', '801-6291');
$pdf->setEstimateRefNo($estimaterefno, $transdate);
$pdf->setMaster($servicemst);
$pdf->setDetails($servicedtl);
$pdf->setVehicleInfo($plateno, $model, $variant, $make, $color, $year);
$pdf->setCustomerInfo($customername, $customeraddress, $customernumber, $customerfax, $customermobile);
$pdf->AddPage();
$pdf->ImprovedTable();
// I = WEB VIEW, D = DOWNLOAD PDF FILE
$pdf->Output($estimaterefno . '.pdf', 'I');
$_SESSION['estimaterefno'] = null;