Пример #1
0
 case 'approval':
     //machine list
     $app = new Approval();
     $app->setValue('skillgroup', $_GET['sgid']);
     $app->createApprovarList();
     $sel = new selectlist('Approver_ID', $app->getApprovarList(), 'Select Approver', 'Operator_ID', 'Operator_Name', '', '', '1');
     break;
 case 'idle':
     //machine list
     $act = new Activitylog();
     $act->createReasonList();
     $sel = new selectlist('Idle_ID', $act->getReasonList(), 'Select Idle Reason', 'Idle_ID', 'Idle_Reason', 'class="required"', '', '1');
     break;
 case 'nclog':
     //machine list
     $ncl = new NCLog();
     if (isset($_GET['class'])) {
         $class = 'class="required"';
     } else {
         $class = '';
     }
     if (isset($_GET['showall'])) {
         $ncl->setValue('showall', 1);
     }
     if (isset($_GET['nclt'])) {
         $ncl->setValue('nctypeid', $_GET['nclt']);
     }
     $ncl->createNCList();
     $sel = new selectlist('NonConformance_ID', $ncl->getNCList(), 'Select NC Log', 'NonConformance_ID', 'pd', $class, '', '1');
     break;
 case 'notation':
    function showPartConfiguration()
    {
        $this->setPartDetails();
        echo '<table><tr>';
        foreach ($this->partimagepath as $key => $value) {
            echo '<td><a href="' . $value . '"><img src="' . $value . '" width="200"></a></td>';
        }
        echo '</tr></table>';
        echo '<p>Record format Ref DEW-PR-R-09, Rev: Nil, Issue Date 01-12-2015<p/>';
        echo '<table class="pc"><tr><th>Part Name</th><td>' . $this->partname . '</td><th>Part Number</th><td>' . $this->partno . '</td><th>Part Rev</th><td>' . $this->partrevision . '</td>
<th>Drawing No</th><td>' . $this->drawingno . '</td><th>Rev</th><td>' . $this->drawingrevision . '</td><th>Customer Drawing No</th><td>' . $this->custdrwinggno . '</td></tr></table>';
        echo '<table class="pc"><tr><th>Part Drawings</th><th>Process Sheets</th></tr>';
        echo '<tr><td class="pc">';
        $i = 0;
        $j = count($this->partdrawings);
        while ($i < $j) {
            if ($this->partdrawings[$i]['path'] != '') {
                if ($this->partdrawings[$i]['bup'] == '1') {
                    echo $this->partdrawings[$i]['path'] . ' Rev: ' . $this->partdrawings[$i]['rev'];
                } else {
                    echo '<a href="partdrawings/' . $this->partdrawings[$i]['path'] . '">' . $this->partdrawings[$i]['path'] . '</a> Rev: ' . $this->partdrawings[$i]['rev'];
                }
            } else {
                echo 'No Drawings Uploaded for This Part!';
            }
            $i++;
        }
        echo '</td><td>';
        if (isset($this->processsheets[0])) {
            $i = 0;
            $j = count($this->processsheets);
            while ($i < $j) {
                if ($this->processsheets[$i]['path'] != '') {
                    if ($this->processsheets[$i]['bup'] == '1') {
                        if ($this->showbackups != '') {
                            echo $this->processsheets[$i]['path'] . ' Rev: ' . $this->processsheets[$i]['rev'];
                        }
                    } else {
                        echo '<a href="processsheets/' . $this->processsheets[$i]['path'] . '">' . $this->processsheets[$i]['path'] . '</a> Rev: ' . $this->processsheets[$i]['rev'];
                    }
                }
                $i++;
            }
        } else {
            echo 'No Process Sheets Uploaded for This Part!';
        }
        echo '</td></tr></table>';
        echo '<br>';
        echo '<table class="pcd"><tr><th>Operation</th><th>Description</th><th>Rev No</th><th>NC Program</th><th>Fixtures Used</th><th>Alternate Fixture</th><th>Tool List</th><th>Notes</th><th>Operation Images</th><tr>';
        $i = 0;
        $j = count($this->operations);
        while ($i < $j) {
            if ($this->operations[$i]['bup'] == '1') {
                if ($this->showbackups != '') {
                    echo '<tr><td>' . $this->operations[$i]['path'] . '</td><td>' . $this->operations[$i]['odesc'] . '</td><td>' . $this->operations[$i]['rev'] . '</td><td></td></tr>';
                }
            } else {
                if ($this->operations[$i]['path'] != '') {
                    $opd = '<a href="operationdrawings/' . $this->operations[$i]['path'] . '">' . $this->operations[$i]['onot'] . '</a>';
                } else {
                    $opd = $this->operations[$i]['onot'];
                }
                echo '<tr><td>' . $opd . '</td><td>' . $this->operations[$i]['odesc'] . '</td><td>
	' . $this->operations[$i]['rev'] . '</td><td>';
                if ($this->operations[$i]['ncpath'] != '') {
                    if ($this->operations[$i]['pno'] != 'NA') {
                        echo '<a href="' . $this->operations[$i]['ncpath'] . $this->operations[$i]['pno'] . '">' . $this->operations[$i]['pno'] . '</a>';
                    } else {
                        echo $this->operations[$i]['pno'];
                    }
                } else {
                    echo $this->operations[$i]['pno'];
                }
                echo '</td><td>' . $this->operations[$i]['fxt'] . '</td><td>' . $this->operations[$i]['af'] . '</td><td>' . $this->operations[$i]['tl'] . '</td><td>' . $this->operations[$i]['notes'] . '</td>';
                if ($this->operations[$i]['opi'] != '') {
                    $k = 0;
                    $l = explode(',', $this->operations[$i]['opi']);
                    $m = count($l);
                    echo '<td><table><tr>';
                    while ($k < $m) {
                        echo '<td><a href="opeimages/' . $l[$k] . '"><img src="opeimages/' . $l[$k] . '" width="50"></a></td>';
                        $k++;
                    }
                    echo '</tr></table></td>';
                } else {
                    echo '<td></td>';
                }
                echo '</tr>';
            }
            $i++;
        }
        echo '</table>';
        echo '<table class="pc"><tr><th>Part Material</th><td>' . $this->partmaterial . '</td><th>Material Code</th><td>', $this->materialcode . '</td></tr></table>';
        echo '<table class="pc"><tr><th>Raw Material Size</th><td>' . $this->rawmaterialsize . '</td><th>Premachining Size</th><td>' . $this->premachinedsize . '</td>
		<th>Finish Size</th><td>' . $this->finishsize . '</td><th>Weight Difference</th><td>' . $this->scrapeweight . '</td></tr></table>';
        $db = Database::getInstance();
        $cxn = $db->getConnection();
        ///gage list for machining operations
        echo '<p><label>Gage Details for Part</label><p/>';
        $qmo = "SELECT Operation_ID,Operation_Desc,Operation_Notation FROM Operation WHERE In_Op_List=1 AND In_Tool_List=1 AND Drawing_ID={$this->partid}";
        if (!($resom = $cxn->query($qmo))) {
            exit("error : {$cxn->error}");
        }
        while ($rmo = mysqli_fetch_assoc($resom)) {
            $qgage = "SELECT g.Gage_ID,Gage_Desc FROM Gage as g INNER JOIN Operation_Gage as og ON og.Gage_ID=g.Gage_ID \n\t\tWHERE Operation_ID={$rmo['Operation_ID']};";
            if (!($rgqge = $cxn->query($qgage))) {
                exit("error (gage1) {$qgage} : {$cxn->error}");
            }
            print "<p>{$rmo['Operation_Desc']}<p/>";
            if ($rgqge->num_rows > 0) {
                echo '<table class="pcd">';
                print "<tr><th>Gage Description</th><th>Qty</th><th>Gage Type</th></tr>";
                while ($row6 = mysqli_fetch_assoc($rgqge)) {
                    $q7 = "SELECT COUNT(Gage_Type)as qty,Gage_Type FROM Gage_SlNo WHERE Gage_ID={$row6['Gage_ID']} GROUP BY Gage_Type;";
                    if (!($r7 = $cxn->query($q7))) {
                        exit("error (gage2) {$q7} : {$cxn->error}");
                    }
                    if ($r7->num_rows > 0) {
                        while ($row7 = mysqli_fetch_assoc($r7)) {
                            print "<tr><td>{$row6['Gage_Desc']}</td><td>{$row7['qty']}</td><td>{$row7['Gage_Type']}</td></tr>";
                        }
                    } else {
                        print "<tr><td>{$row6['Gage_Desc']}</td><td colspan=\"2\"><label3>No gages in stock!!</label3></td></tr>";
                    }
                }
                print "</table>";
            } else {
                print '<p class="v">No Gages Required For This Stage<p/>';
            }
        }
        $ecn = new ECN();
        $ecn->listPartECN($this->partid);
        $nc = new NCLog();
        $nc->listPartNC($this->partid);
    }
Пример #3
0
<?php

require_once 'autoload.php';
$nc = new NCLog();
if (isset($_POST['problemdescription'])) {
    print_r($_POST);
    //print_r($_FILES);
    if (isset($_POST['NonConformance_ID'])) {
        $nc->setValue('nonconformanceid', $_POST['NonConformance_ID']);
        $ncid = $_POST['NonConformance_ID'];
    }
    if (isset($_POST['NC_Type_ID'])) {
        $nc->setValue('nctypeid', $_POST['NC_Type_ID']);
        $nctypeid = $_POST['NC_Type_ID'];
    }
    $nc->setValue('ncdate', $_POST['ncddb']);
    if (isset($_POST['Batch_ID'])) {
        $nc->setValue('batchid', $_POST['Batch_ID']);
    }
    $nc->setValue('ncqty', $_POST['quantity']);
    $nc->setValue('ncnumber', $_POST['ncnumber']);
    $nc->setValue('problemdescription', $_POST['problemdescription']);
    $nc->setValue('correctiveaction', $_POST['correctiveaction']);
    $nc->setValue('correction', $_POST['correction']);
    $nc->setValue('containment', $_POST['containment']);
    $why = $_POST['why'];
    $reason = $_POST['reason'];
    $nc->setValue('stage', $_POST['stage']);
    $nc->setValue('effectiveness', $_POST['effectiveness']);
    $targetdate = $_POST['tdatedb'];
    $department = $_POST['department'];
Пример #4
0
<?php

require_once 'autoload.php';
$_SESSION['LAST_ACTIVITY'] = time();
require_once '../tcpdf/tcpdf.php';
date_default_timezone_set('Asia/Kolkata');
$nc = new NCLog();
if (isset($_POST['NonConformance_ID'])) {
    //print_r($_POST);
    $nclid = $_POST['NonConformance_ID'];
    $reverified = '';
    $nc->setValue('nonconformanceid', $nclid);
    class PDF_SKN extends TCPDF
    {
        // Page header
        function Header()
        {
            $nclid = $GLOBALS['nclid'];
            //			    $this->SetY(10);
            //			    $this->Image('logo.png',8,10,10);
            $this->SetFont('helvetica', '', 12);
            $this->Cell(65, 20, 'Divya Engineering Works (P) Ltd', 1, 0, 'C');
            $this->Cell(73, 20, 'Corrective / Preventive Action Report', 1, 0, 'C');
            $this->SetFont('helvetica', '', 10);
            $this->Cell(50, 5, ' Rec. For REF: DEW-QA-R-12', 'TBR', 2, 'L');
            $this->Cell(50, 5, ' Rev No : A', 'BR', 2, 'L');
            $this->Cell(50, 5, ' Issue Date: 31-12-2015', 'BR', 2, 'L');
            $this->Cell(50, 5, ' NC Report ID: ' . $nclid, 'B R', 0, 'L');
            $this->ln();
        }
        function Footer()