コード例 #1
0
ファイル: print_estimate.php プロジェクト: alladinxApp/qsms
<?php

session_start();
require_once "conf/db_connection.php";
require_once "PrintEstimate_model.php";
require_once "functions.php";
$image = 'images/logo.png';
$estimaterefno = $_SESSION['estimaterefno'];
$sqlwo_mst = new v_service_master();
$qrywo_mst = mysql_query($sqlwo_mst->Query("WHERE estimate_refno = '{$estimaterefno}'"));
$numwo_mst = mysql_num_rows($qrywo_mst);
while ($rowwo_mst = mysql_fetch_array($qrywo_mst)) {
    $remarks = $rowwo_mst['remarks'];
    $plateno = $rowwo_mst['plate_no'];
    $model = $rowwo_mst['model_desc'];
    $variant = $rowwo_mst['variant'];
    $make = $rowwo_mst['make_desc'];
    $color = $rowwo_mst['color_desc'];
    $year = $rowwo_mst['year_desc'];
    $porefno = $rowwo_mst['po_refno'];
    $transdate = $rowwo_mst['transaction_date'];
    $customername = $rowwo_mst['customername'];
    $customeraddress = $rowwo_mst['cust_address'];
    $customerfax = $rowwo_mst['fax'];
    $customermobile = $rowwo_mst['mobile'];
    $customernumber = $rowwo_mst['landline'];
    $discount = $rowwo_mst['discount'];
    $labordiscount = $rowwo_mst['labor_discount'];
    $partsdiscount = $rowwo_mst['parts_discount'];
    $lubricantdiscount = $rowwo_mst['lubricant_discount'];
    $materialdiscount = $rowwo_mst['material_discount'];
コード例 #2
0
<?php

session_start();
$ses_id = session_id();
require_once "conf/db_connection.php";
require_once "functions.php";
chkMenuAccess('workorder_approval', $_SESSION['username'], 'workorder_list.php');
$estimaterefno = $_GET['estimaterefno'];
$qryestimate = new v_service_master();
$resestimate = $dbo->query($qryestimate->Query("WHERE estimate_refno = '{$estimaterefno}'"));
foreach ($resestimate as $rowestimate) {
    $custid = $rowestimate['customer_id'];
    $custname = $rowestimate['customername'];
    $address = $rowestimate['cust_address'];
    $vehicleid = $rowestimate['vehicle_id'];
    $remarks = $rowestimate['remarks'];
    $paymentmode = $rowestimate['payment_mode'];
    $payment = $rowestimate['payment_id'];
    $discount = $rowestimate['discount'];
    $porefno = $rowestimate['po_refno'];
    $worefno = $rowestimate['wo_refno'];
    $transstatus = $rowestimate['trans_status'];
    $empid = $rowestimate['emp_id'];
    $empname = $rowestimate['tech_name'];
    $promisetime = $rowestimate['promise_time'];
    $promisedate = $rowestimate['promise_date'];
    $plateno = $rowestimate['plate_no'];
    $makedesc = $rowestimate['make_desc'];
    $yeardesc = $rowestimate['year_desc'];
    $modeldesc = $rowestimate['model_desc'];
    $colordesc = $rowestimate['color_desc'];
コード例 #3
0
ファイル: print_billing.php プロジェクト: alladinxApp/qsms
}
// $user = $_SESSION['username'];
$sql_billing = "SELECT tbl_billing.*,tbl_service_master.estimate_refno \n\t\t\t\t\t\tFROM tbl_billing JOIN tbl_service_master\n\t\t\t\t\t\tON tbl_billing.wo_refno = tbl_service_master.wo_refno \n\t\t\t\t\t\tWHERE billing_refno = '{$billingrefno}' ORDER BY billing_refno";
$qry_billing = mysql_query($sql_billing);
$wo_refno = null;
while ($row_billing = mysql_fetch_array($qry_billing)) {
    $wo_refno .= $row_billing['wo_refno'] . ',';
    $est_refno .= $row_billing['estimate_refno'] . ',';
}
$wo_refno = str_replace(",", "','", rtrim($wo_refno, ","));
$est_refno = str_replace(",", "','", rtrim($est_refno, ","));
$num_billing = mysql_num_rows($qry_billing);
if ($num_billing == 0 || empty($user)) {
    echo '<script>window.location="billing_main.php"</script>';
}
$sql_wo = new v_service_master();
$qry_wo = mysql_query($sql_wo->Query("WHERE wo_refno IN('{$wo_refno}')"));
while ($row_wo = mysql_fetch_array($qry_wo)) {
    $custid = $row_wo['customer_id'];
    $vehicleid = $row_wo['vehicle_id'];
    $total_amount += $row_wo['total_amount'];
    $total_discount += $row_wo['discount'];
    $creaby = $row_wo['created_by'];
    $odometer = $row_wo['odometer'];
    $senior = $row_wo['senior_citizen'];
    $senior_no = $row_wo['senior_citizen_no'];
}
$sql_adviser = "SELECT * FROM v_users WHERE username = '******'";
$qry_adviser = mysql_query($sql_adviser);
while ($row_adviser = mysql_fetch_array($qry_adviser)) {
    $adviser = $row_adviser['name'];
コード例 #4
0
ファイル: workorder_list.php プロジェクト: alladinxApp/qsms
            }
        }
    }
    if (!empty($plateno)) {
        $where .= " AND plate_no LIKE '{$plateno}%'";
    }
    if (!empty($custname)) {
        $where .= " AND customername LIKE '{$custname}%'";
    }
    if (!empty($worefno)) {
        $where .= " AND wo_refno = '{$worefno}'";
    }
    if (!empty($estimateno)) {
        $where .= " AND estimate_refno = '{$estimateno}'";
    }
    $qryservices = new v_service_master();
    $resservices = $dbo->query($qryservices->Query($where));
}
?>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="style/cal.css" />
<link rel="stylesheet" type="text/css" href="style/forms.css" />
</head>
<?php 
require_once 'inc/datepicker.php';
?>
<style type="text/css">
	div.divEstimateList{ overflow:scroll; height: 400px; width: 800px; border-left: 1px solid #ddd; border-top: 1px solid #ddd; }
	div.divEstimateList table{ border: 1px solid #ccc; font-size: 12px; }
コード例 #5
0
ファイル: divJobStop.php プロジェクト: alladinxApp/qsms
<?php

session_start();
require_once "conf/db_connection.php";
require_once "functions.php";
$worefno = $_GET['worefno'];
$getempqry = new v_service_master();
$getempres = $dbo->query($getempqry->Query("WHERE wo_refno = '{$worefno}'"));
foreach ($getempres as $rowEMP) {
    $empid = $rowEMP['emp_id'];
    $estimaterefno = $rowEMP['estimate_refno'];
    if ($rowEMP['po_refno'] != '0') {
        $po_refno = $rowEMP['po_refno'];
    } else {
        $po_refno = '0';
    }
}
$billing_refno = getNewNum('BILLING');
$check_date = dateFormat($today, "Y-m-d H:i");
$qry = null;
$qry .= "UPDATE tbl_jobclock_checkin_checkout SET check_out = '{$check_date}' WHERE wo_refno = '{$worefno}'; ";
$qry .= "UPDATE tbl_jobclock_master SET job_end = '{$today}', job_status = '2' WHERE wo_refno = '{$worefno}'; ";
$qry .= "UPDATE tbl_service_master SET trans_status = '5' WHERE wo_refno = '{$worefno}'; ";
$qry .= "UPDATE tbl_po_master SET trans_status = '2' WHERE wo_refno = '{$worefno}'; ";
$res = $dbo->query($qry);
// GET DATA OF JOBCLOCK MASTER
$qryidletimehistorymst = "SELECT * FROM v_jobclock_master WHERE wo_refno = '{$worefno}'";
$residletimehistorymst = mysql_query($qryidletimehistorymst);
while ($row = mysql_fetch_array($residletimehistorymst)) {
    $jobstatus = $row['job_status'];
    $jobstart = $row['job_start'];
コード例 #6
0
ファイル: jobclock.php プロジェクト: alladinxApp/qsms
<?php

session_start();
$ses_id = session_id();
require_once "conf/db_connection.php";
require_once "functions.php";
chkMenuAccess('jobclock', $_SESSION['username'], 'jobclock_list.php');
$worefno = $_GET['worefno'];
$qryservices = new v_service_master();
$resservices = $dbo->query($qryservices->Query("WHERE wo_refno = '{$worefno}'"));
foreach ($resservices as $rowSERVICES) {
    $estimaterefno = $rowSERVICES['estimate_refno'];
    $customerid = $rowSERVICES['customer_id'];
    $customername = $rowSERVICES['customername'];
    $plateno = $rowSERVICES['plate_no'];
    $yeardesc = $rowSERVICES['year_desc'];
    $makedesc = $rowSERVICES['make_desc'];
    $modeldesc = $rowSERVICES['model_desc'];
    $colordesc = $rowSERVICES['color_desc'];
    $variant = $rowSERVICES['variant'];
    $engineno = $rowSERVICES['engine_no'];
    $chassisno = $rowSERVICES['chassis_no'];
    $serialno = $rowSERVICES['serial_no'];
    $techid = $rowSERVICES['emp_id'];
    $technician = $rowSERVICES['tech_name'];
    $transstatus = $rowSERVICES['trans_status'];
    $promisedate = $rowSERVICES['promise_date'];
    $promisetime = $rowSERVICES['promise_time'];
}
$qryidletimehistorymst = "SELECT * FROM v_jobclock_master WHERE wo_refno = '{$worefno}'";
$residletimehistorymst = $dbo->query($qryidletimehistorymst);
コード例 #7
0
ファイル: divJobStart.php プロジェクト: alladinxApp/qsms
<?php

session_start();
require_once "conf/db_connection.php";
require_once "functions.php";
$worefno = $_GET['worefno'];
// QUERY GET ESTIMATE REF NO
$qrygetestimaterefno = new v_service_master();
$resgetestimaterefno = $dbo->query($qrygetestimaterefno->Query("WHERE wo_refno = '{$worefno}'"));
foreach ($resgetestimaterefno as $rowgetestimaterefno) {
    $est_refno = $rowgetestimaterefno['estimate_refno'];
}
// GET STANDARD WORKING HOURS
$qrygetstdhr = "SELECT SUM(stdworkinghr) as stdhr FROM v_service_detail_job WHERE estimate_refno = '{$est_refno}'";
$resgetstdhr = $dbo->query($qrygetstdhr);
foreach ($resgetstdhr as $rowgetstdhr) {
    $stdhr = $rowgetstdhr['stdhr'];
}
$check_date = dateFormat($today, "Y-m-d H:i");
$qry = null;
$qry .= "INSERT INTO tbl_jobclock_checkin_checkout(wo_refno,check_date,check_in) VALUES('{$worefno}','{$check_date}','{$check_date}'); ";
$qry .= "UPDATE tbl_jobclock_master SET job_start = '{$today}', std_working_hrs = '{$stdhr}' WHERE wo_refno = '{$worefno}'; ";
$qry .= "UPDATE tbl_service_master SET trans_status = '8' WHERE wo_refno = '{$worefno}'; ";
$qry .= "UPDATE tbl_po_master SET trans_status = '2' WHERE wo_refno = '{$worefno}'; ";
$res = $dbo->query($qry);
// GET DATA OF JOBCLOCK MASTER
$qryidletimehistorymst = "SELECT * FROM v_jobclock_master WHERE wo_refno = '{$worefno}'";
$residletimehistorymst = mysql_query($qryidletimehistorymst);
while ($row = mysql_fetch_array($residletimehistorymst)) {
    $jobstatus = $row['job_status'];
    $jobstart = $row['job_start'];
コード例 #8
0
ファイル: estimate_edit.php プロジェクト: alladinxApp/qsms
<?php

session_start();
$ses_id = session_id();
require_once "conf/db_connection.php";
require_once "functions.php";
$estimaterefno = $_GET['estimaterefno'];
$qryestimate = new v_service_master();
$resestimate = $dbo->query($qryestimate->Query("WHERE tbl_service_master.estimate_refno = '{$estimaterefno}'"));
$qrytempjob = new v_service_detail_job();
$restempjob = $dbo->query($qrytempjob->Query("WHERE estimate_refno = '{$estimaterefno}'"));
$qrytempparts = new v_service_detail_parts();
$restempparts = $dbo->query($qrytempparts->Query("WHERE estimate_refno = '{$estimaterefno}'"));
$numparts = count($restempparts);
$qrytempaccessory = new v_service_detail_accessory();
$restempaccessory = $dbo->query($qrytempaccessory->Query("WHERE estimate_refno = '{$estimaterefno}'"));
$numlubricant = count($restempaccessory);
$qrytempmaterial = new v_service_detail_material();
$restempmaterial = $dbo->query($qrytempmaterial->Query("WHERE estimate_refno = '{$estimaterefno}'"));
$nummaterial = count($restempmaterial);
foreach ($resestimate as $rowestimate) {
    $custid = $rowestimate['customer_id'];
    $custname = $rowestimate['customername'];
    $address = $rowestimate['cust_address'];
    $vehicleid = $rowestimate['vehicle_id'];
    $odometer = $rowestimate['odometer'];
    $remarks = $rowestimate['remarks'];
    $paymentmode = $rowestimate['payment_mode'];
    $discount = $rowestimate['discount'];
    $worefno = $rowestimate['wo_refno'];
    $transstatus = $rowestimate['trans_status'];
コード例 #9
0
ファイル: print_workorder.php プロジェクト: alladinxApp/qsms
foreach ($qrywo_mst1 as $rowwo_mst) {
    $customerid = $rowwo_mst['customer_id'];
    $worefno = $rowwo_mst['wo_refno'];
    $creaby = $rowwo_mst['created_by'];
}
$sql_cust = "SELECT * FROM tbl_customer WHERE cust_id = '{$customerid}'";
$qry_cust = mysql_query($sql_cust);
$sql_jc = "SELECT * FROM v_jobclock_master WHERE wo_refno = '{$worefno}'";
$qry_jc = mysql_query($sql_jc);
$row_jc = mysql_fetch_array($qry_jc);
$sql_user = "******";
$qry_user = mysql_query($sql_user);
while ($row_user = mysql_fetch_array($qry_user)) {
    $user_fullname = $row_user['name'];
}
$sql_histmst = new v_service_master();
$qry_histmst = mysql_query($sql_histmst->Query("WHERE customer_id = '{$customerid}' AND trans_status = '6' ORDER BY transaction_date DESC LIMIT 0,3"));
foreach ($qry_histmst as $row_histmst) {
    if (!empty($row_histmst)) {
        $historymst[] = array("rono" => $row_histmst['wo_refno'], "rodate" => dateFormat($row_histmst['transaction_date'], "Y-m-d h:i:s"), "odometer" => $row_histmst['odometer']);
    }
}
$sql_histdtl = new v_job_history();
$qry_histdtl = $dbo->query($sql_histdtl->Query("WHERE customer_id = '{$customerid}'"));
for ($i = 0; $i < count($historymst); $i++) {
    foreach ($qry_histdtl as $row_histdtl) {
        if ($row_histdtl['wo_refno'] == $historymst[$i]['rono']) {
            $job[] = $row_histdtl['job'];
        }
    }
    $jobhistory[] = $job;