Report updates, language fixes.
This commit is contained in:
127
reports.php
127
reports.php
@@ -111,11 +111,11 @@
|
||||
</div>
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['SITE']; ?>:</span>
|
||||
<span class="input-group-text" id="basic-addon3"><?php echo $transLang['STR_COMMON_SITE']; ?>:</span>
|
||||
<?php if (isset($_POST['repsite'])) { $currentrepsite = $_POST['repsite']; } else { $currentrepsite = "0"; }; ?>
|
||||
<select name="repsite" class="form-control form-control-lg">
|
||||
<?php if($session_user["0"]["users_usertype"] == "USER-TYPES-ADMIN") { ?>
|
||||
<option value="all"<?php if ($currentrepsite == "all") {echo " selected";}; ?>><?php echo $transLang['ALL']; ?></option>
|
||||
<option value="all"<?php if ($currentrepsite == "all") {echo " selected";}; ?>><?php echo $transLang['STR_COMMON_ALL']; ?></option>
|
||||
<?php } ?>
|
||||
<?php foreach($SiteInfo->getSite("0", $uid, "0", "0") as $row): ?>
|
||||
<option value="<?php echo $row['sites_id']; ?>"<?php if ($currentrepsite == $row['sites_id']) {echo " selected";}; ?>><?php echo $row['sites_name']; ?></option>
|
||||
@@ -127,7 +127,7 @@
|
||||
<div class="row row-cols-2">
|
||||
<div class="col d-grid gap-2">
|
||||
<div class="input-group input-group-sm mb-0">
|
||||
<span class="input-group-text date" id="datetimepicker-1" data-target-input="#datetimepicker-1" data-target=".datetimepicker-1" data-toggle="datetimepicker"><i class="fas fa-calendar"></i>  <?php echo $transLang['START']; ?></span>
|
||||
<span class="input-group-text date" id="datetimepicker-1" data-target-input="#datetimepicker-1" data-target=".datetimepicker-1" data-toggle="datetimepicker"><i class="fas fa-calendar"></i>  <?php echo $transLang['STR_COMMON_START']; ?></span>
|
||||
<input name="starttime" type="text" class="datetimepicker-input form-control form-control-lg datetimepicker-1" id="datetimepicker-1" data-target=".datetimepicker-1" autocomplete="new-password" required />
|
||||
</div>
|
||||
</div>
|
||||
@@ -150,7 +150,7 @@
|
||||
</div>
|
||||
<div class="row row-cols-1">
|
||||
<div class="col d-grid gap-2">
|
||||
<button type="submit" class="form-control form-control-lg btn btn-lg btn-primary"><i class="fas fa-play"></i> <?php echo $transLang['REPORT-EXECUTE']; ?></button>
|
||||
<button type="submit" class="form-control form-control-lg btn btn-lg btn-primary"><i class="fas fa-play"></i> <?php echo $transLang['STR_REPORT_EXECUTE_TITLE']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -159,7 +159,7 @@
|
||||
<?php if ($_POST['reporttype'] == "Default"): ?>
|
||||
<div class="container-fluid">
|
||||
<table id="report" class="table table-striped table-bordered table-sm table-responsive-sm text-nowrap">
|
||||
<thead><tr><th><?php echo $transLang['IN']; ?></th><th><?php echo $transLang['OUT']; ?></th><th><?php echo $transLang['SITE']; ?></th><th><?php echo $transLang['COMPANY']; ?></th><th><?php echo $transLang['REASON']; ?></th><th><?php echo $transLang['NAME']; ?></th><th><?php echo $transLang['ESCORT']; ?></th><th><?php echo $transLang['BADGE']; ?></th><th><?php echo $transLang['SIGNINBY']; ?></th><?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?><th><?php echo $transLang['CARNUM']; ?></th><th><?php echo $transLang['SSANUM']; ?></th><?php } ?><?php if($SiteInfo->getSite($_POST['repsite'], $uid, "0", "0")[0]["sites_region"] == "US") { ?><th><?php echo $transLang['CITIZEN']; ?></th><?php } ?><th><?php echo $transLang['ID_TYPE']; ?></th><th><?php echo $transLang['TICKET']; ?></th><th><?php echo $transLang['DECLINE']; ?></th></tr></thead>
|
||||
<thead><tr><th><?php echo $transLang['IN']; ?></th><th><?php echo $transLang['OUT']; ?></th><th><?php echo $transLang['STR_COMMON_SITE']; ?></th><th><?php echo $transLang['COMPANY']; ?></th><th><?php echo $transLang['REASON']; ?></th><th><?php echo $transLang['NAME']; ?></th><th><?php echo $transLang['ESCORT']; ?></th><th><?php echo $transLang['BADGE']; ?></th><th><?php echo $transLang['SIGNINBY']; ?></th><?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?><th><?php echo $transLang['CARNUM']; ?></th><th><?php echo $transLang['SSANUM']; ?></th><?php } ?><?php if($SiteInfo->getSite($_POST['repsite'], $uid, "0", "0")[0]["sites_region"] == "US") { ?><th><?php echo $transLang['CITIZEN']; ?></th><?php } ?><th><?php echo $transLang['ID_TYPE']; ?></th><th><?php echo $transLang['TICKET']; ?></th><th><?php echo $transLang['DECLINE']; ?></th></tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$approval = "2";
|
||||
@@ -203,7 +203,7 @@
|
||||
<?php if ($_POST['reporttype'] == "Vendors"): ?>
|
||||
<div class="container-fluid">
|
||||
<table id="report" class="table table-striped table-bordered table-sm table-responsive-sm text-nowrap">
|
||||
<thead><tr><th><?php echo $transLang['IN']; ?></th><th><?php echo $transLang['OUT']; ?></th><th><?php echo $transLang['SITE']; ?></th><th><?php echo $transLang['COMPANY']; ?></th><th><?php echo $transLang['REASON']; ?></th><th><?php echo $transLang['NAME']; ?></th><th><?php echo $transLang['BADGE']; ?></th><th><?php echo $transLang['SIGNINBY']; ?></th><?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?><th><?php echo $transLang['CARNUM']; ?></th><th><?php echo $transLang['SSANUM']; ?></th><?php } ?><?php if($SiteInfo->getSite($_POST['repsite'], $uid, "0", "0")[0]["sites_region"] == "US") { ?><th><?php echo $transLang['CITIZEN']; ?></th><?php } ?><th><?php echo $transLang['ID_TYPE']; ?></th><th><?php echo $transLang['TICKET']; ?></th><th><?php echo $transLang['DECLINE']; ?></th></tr></thead>
|
||||
<thead><tr><th><?php echo $transLang['IN']; ?></th><th><?php echo $transLang['OUT']; ?></th><th><?php echo $transLang['STR_COMMON_SITE']; ?></th><th><?php echo $transLang['COMPANY']; ?></th><th><?php echo $transLang['REASON']; ?></th><th><?php echo $transLang['NAME']; ?></th><th><?php echo $transLang['BADGE']; ?></th><th><?php echo $transLang['SIGNINBY']; ?></th><?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?><th><?php echo $transLang['CARNUM']; ?></th><th><?php echo $transLang['SSANUM']; ?></th><?php } ?><?php if($SiteInfo->getSite($_POST['repsite'], $uid, "0", "0")[0]["sites_region"] == "US") { ?><th><?php echo $transLang['CITIZEN']; ?></th><?php } ?><th><?php echo $transLang['ID_TYPE']; ?></th><th><?php echo $transLang['TICKET']; ?></th><th><?php echo $transLang['DECLINE']; ?></th><th><?php echo $transLang['STR_VENDORINFO_FORM_TITLE']; ?></th></tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$approval = "2";
|
||||
@@ -219,6 +219,25 @@
|
||||
if(!empty($row['visits_ssanum'])) { $ssanum=$row['visits_ssanum']; } else { $ssanum="";}
|
||||
if ($row['visits_isvendor']===1) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $timein_disp; ?></td>
|
||||
<td><?php if (!empty($row['visits_outtime'])) {echo $timeout_disp; } else {echo $transLang['IN'];} ?></td>
|
||||
<td><?php echo $SiteInfo->getSite($row['visits_site_id'], $uid, "0", "0")[0]["sites_name"]; ?></td>
|
||||
<td><?php echo $row['visits_company']; ?></td>
|
||||
<td><?php echo $transLang[$VisitTypeInfo->getInfoVisitType("%", $row['visits_reason'])[0]['visittypes_name']]; ?></td>
|
||||
<td><?php echo $row['visits_lastname'] . ", " . $row['visits_firstname']; ?><br /><img src="<?php echo $row['visits_signature']; ?>" width="200" height="50" alt="Signature" /></td>
|
||||
<td><?php echo $row['visits_badge']; ?></td>
|
||||
<td><?php echo $Users->readUserFirstAndLast($row['visits_initials'])[0]["users_firstname"] . " " . $Users->readUserFirstAndLast($row['visits_initials'])[0]["users_lastname"]; ?></td>
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?>
|
||||
<td><?php echo $carnum; ?></td>
|
||||
<td><?php echo $ssanum; ?></td>
|
||||
<?php } ?>
|
||||
<?php if($SiteInfo->getSite($_POST['repsite'], $uid, "0", "0")[0]["sites_region"] == "US") { ?> <td><?php echo $row['visits_citizen']; ?></td> <?php } ?>
|
||||
<td><?php echo $transLang[$IDTypeInfo->getIDTypeInfo($row['visits_id_type'])[0]['idtypes_name']]; ?></td>
|
||||
<td><?php echo $row['visits_id_reference']; ?></td>
|
||||
<td><?php echo $row['visits_notes']; ?></td>
|
||||
|
||||
<td>
|
||||
<?php foreach ($VisitInfo->getInfoVendorVisitFinal($row['visits_id']) as $vnrow) {
|
||||
$db_vendorinfo_id = $vnrow['db_vendorinfo_id'];
|
||||
$db_vendorinfo_contact1 = $vnrow['db_vendorinfo_contact1'];
|
||||
@@ -235,53 +254,57 @@ $db_vendorinfo_checklistcompleted = $vnrow['db_vendorinfo_checklistcompleted'];
|
||||
$db_vendorinfo_workcompleted = $vnrow['db_vendorinfo_workcompleted'];
|
||||
$db_vendorinfo_sitecleanup = $vnrow['db_vendorinfo_sitecleanup'];
|
||||
$db_vendorinfo_doccompleted = $vnrow['db_vendorinfo_doccompleted'];
|
||||
?>
|
||||
<tr>
|
||||
<td rowspan="3"><?php echo $timein_disp; ?></td>
|
||||
<td rowspan="3"><?php if (!empty($row['visits_outtime'])) {echo $timeout_disp; } else {echo $transLang['IN'];} ?></td>
|
||||
<td><?php echo $SiteInfo->getSite($row['visits_site_id'], $uid, "0", "0")[0]["sites_name"]; ?></td>
|
||||
<td><?php echo $row['visits_company']; ?></td>
|
||||
<td><?php echo $transLang[$VisitTypeInfo->getInfoVisitType("%", $row['visits_reason'])[0]['visittypes_name']]; ?></td>
|
||||
<td><?php echo $row['visits_lastname'] . ", " . $row['visits_firstname']; ?><br /><img src="<?php echo $row['visits_signature']; ?>" width="200" height="50" alt="Signature" /></td>
|
||||
<td><?php echo $row['visits_badge']; ?></td>
|
||||
<td><?php echo $Users->readUserFirstAndLast($row['visits_initials'])[0]["users_firstname"] . " " . $Users->readUserFirstAndLast($row['visits_initials'])[0]["users_lastname"]; ?></td>
|
||||
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "EMEA") { ?>
|
||||
<td><?php echo $carnum; ?></td>
|
||||
<td><?php echo $ssanum; ?></td>
|
||||
<?php } ?>
|
||||
<?php if($SiteInfo->getSite($_POST['repsite'], $uid, "0", "0")[0]["sites_region"] == "US") { ?> <td><?php echo $row['visits_citizen']; ?></td> <?php } ?>
|
||||
<td><?php if(isset($row['visits_id_type'])){echo $transLang[$IDTypeInfo->getIDTypeInfo($row['visits_id_type'])[0]['idtypes_name']];} ?></td>
|
||||
<td><?php echo $row['visits_id_reference']; ?></td>
|
||||
<td><?php echo $row['visits_notes']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-muted"><?php echo $transLang['VENDORINFO-CONTACT1']; ?>: <?php echo $db_vendorinfo_contact1; ?></td>
|
||||
<td class="text-muted"><?php echo $transLang['VENDORINFO-CONTACT2']; ?>: <?php echo $db_vendorinfo_contact2; ?></td>
|
||||
<td class="text-muted"><?php echo $transLang['VENDORINFO-WORKSTART']; ?>: <?php echo $db_vendorinfo_workstart; ?></td>
|
||||
<td class="text-muted"><?php echo $transLang['VENDORINFO-WORKEND']; ?>: <?php echo $db_vendorinfo_workend; ?></td>
|
||||
<td class="text-muted"><?php echo $transLang['VENDORINFO-CHECKLISTREQUIRED']; ?>: <?php if($db_vendorinfo_checklistrequired===0){echo $transLang['COMMON-NO'];}elseif($db_vendorinfo_checklistrequired===1){echo $transLang['COMMON-YES'];} ?></td>
|
||||
<td class="text-muted"><?php echo $transLang['VENDORINFO-ROUTINEWORK']; ?>: <?php if($db_vendorinfo_routinework===0){echo $transLang['COMMON-NO'];}elseif($db_vendorinfo_routinework===1){echo $transLang['COMMON-YES'];} ?></td>
|
||||
<td class="text-muted"><?php echo $transLang['VENDORINFO-NONROUTINEWORK']; ?>: <?php if($db_vendorinfo_nonroutinework===0){echo $transLang['COMMON-NO'];}elseif($db_vendorinfo_nonroutinework===1){echo $transLang['COMMON-YES'];} ?></td>
|
||||
<td class="text-muted"><?php echo $transLang['VENDORINFO-COI']; ?>: <?php if($db_vendorinfo_coi===0){echo $transLang['COMMON-NO'];}elseif($db_vendorinfo_coi===1){echo $transLang['COMMON-YES'];} ?></td>
|
||||
<td class="text-muted"><?php echo $transLang['VENDORINFO-WORKSUMMARY']; ?>: <?php echo $db_vendorinfo_worksummary; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-muted"> </td>
|
||||
<td class="text-muted"> </td>
|
||||
<td class="text-muted"> </td>
|
||||
<td class="text-muted"> </td>
|
||||
<td class="text-muted"><?php echo $transLang['VENDORINFO-CHECKLISTCOMPLETED']; ?>: <?php if($db_vendorinfo_checklistcompleted===0){echo $transLang['COMMON-NO'];}elseif($db_vendorinfo_checklistcompleted===1){echo $transLang['COMMON-YES'];} ?></td>
|
||||
<td class="text-muted"><?php echo $transLang['VENDORINFO-WORKCOMPLETED']; ?>: <?php if($db_vendorinfo_workcompleted===0){echo $transLang['COMMON-NO'];}elseif($db_vendorinfo_workcompleted===1){echo $transLang['COMMON-YES'];} ?></td>
|
||||
<td class="text-muted"><?php echo $transLang['VENDORINFO-SITECLEANUP']; ?>: <?php if($db_vendorinfo_sitecleanup===0){echo $transLang['COMMON-NO'];}elseif($db_vendorinfo_sitecleanup===1){echo $transLang['COMMON-YES'];} ?></td>
|
||||
<td class="text-muted"><?php echo $transLang['VENDORINFO-DOCCOMPLETED']; ?>: <?php if($db_vendorinfo_doccompleted===0){echo $transLang['COMMON-NO'];}elseif($db_vendorinfo_doccompleted===1){echo $transLang['COMMON-YES'];} ?></td>
|
||||
<td class="text-muted"><?php echo $transLang['VENDORINFO-EQUIPMENTSUMMARY']; ?>: <?php echo $db_vendorinfo_equipmentsummary; ?></td>
|
||||
$db_vendorinfo_approverid = $vnrow['db_vendorinfo_approverid'];
|
||||
?>
|
||||
|
||||
|
||||
<?php }; ?>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php }; ?>
|
||||
<?php endforeach; ?>
|
||||
<form action="printvwf.php" method="post" target="_blank">
|
||||
|
||||
<input type="hidden" name="form_data_timein" id="form_data_timein" value="<?php echo $timein_disp; ?>" />
|
||||
<input type="hidden" name="form_data_timeout" id="form_data_timeout" value="<?php if (!empty($row['visits_outtime'])) {echo $timeout_disp; } else {echo $transLang['IN'];} ?>" />
|
||||
<input type="hidden" name="form_data_sitename" id="form_data_sitename" value="<?php echo $SiteInfo->getSite($row['visits_site_id'], $uid, "0", "0")[0]["sites_name"]; ?>" />
|
||||
<input type="hidden" name="form_data_firstname" id="form_data_firstname" value="<?php echo $row['visits_firstname']; ?>" />
|
||||
<input type="hidden" name="form_data_lastname" id="form_data_lastname" value="<?php echo $row['visits_lastname']; ?>" />
|
||||
<input type="hidden" name="form_data_carnum" id="form_data_carnum" value="<?php echo $form_data['form_data_carnum']; ?>" />
|
||||
<input type="hidden" name="form_data_ssanum" id="form_data_ssanum" value="<?php echo $form_data['form_data_ssanum']; ?>" />
|
||||
<input type="hidden" name="form_data_company" id="form_data_company" value="<?php echo $row['visits_company']; ?>" />
|
||||
<input type="hidden" name="form_data_contact1" id="form_data_contact1" value="<?php echo $db_vendorinfo_contact1; ?>" />
|
||||
<input type="hidden" name="form_data_contact2" id="form_data_contact2" value="<?php echo $db_vendorinfo_contact2; ?>" />
|
||||
<input type="hidden" name="form_data_workstart" id="form_data_workstart" value="<?php echo $db_vendorinfo_workstart; ?>" />
|
||||
<input type="hidden" name="form_data_workend" id="form_data_workend" value="<?php echo $db_vendorinfo_workend; ?>" />
|
||||
<input type="hidden" name="form_data_customerimpacted" id="form_data_customerimpacted" value="<?php echo $form_data['form_data_customerimpacted']; ?>" />
|
||||
<input type="hidden" name="form_data_reason" id="form_data_reason" value="<?php echo $transLang[$VisitTypeInfo->getInfoVisitType("%", $row['visits_reason'])[0]['visittypes_name']]; ?>" />
|
||||
<input type="hidden" name="form_data_idtypename" id="form_data_idtypename" value="<?php echo $transLang[$IDTypeInfo->getIDTypeInfo($row['visits_id_type'])[0]['idtypes_name']]; ?>" />
|
||||
<input type="hidden" name="form_data_v_signature" id="form_data_v_signature" value="<?php echo $row['visits_signature']; ?>" />
|
||||
<input type="hidden" name="form_data_badge" id="form_data_badge" value="<?php echo $row['visits_badge']; ?>" />
|
||||
<input type="hidden" name="form_data_signinby" id="form_data_signinby" value="<?php echo $Users->readUserFirstAndLast($row['visits_initials'])[0]["users_firstname"] . " " . $Users->readUserFirstAndLast($row['visits_initials'])[0]["users_lastname"]; ?>" />
|
||||
<input type="hidden" name="form_data_vwfby" id="form_data_vwfby" value="<?php echo $Users->readUserFirstAndLast($db_vendorinfo_approverid)[0]["users_firstname"] . " " . $Users->readUserFirstAndLast($db_vendorinfo_approverid)[0]["users_lastname"]; ?>" />
|
||||
<input type="hidden" name="form_data_checklistrequired" id="form_data_checklistrequired" value="<?php if($db_vendorinfo_checklistrequired===0){echo $transLang['STR_COMMON_NO'];}elseif($db_vendorinfo_checklistrequired===1){echo $transLang['STR_COMMON_YES'];} ?>" />
|
||||
<input type="hidden" name="form_data_routinework" id="form_data_routinework" value="<?php if($db_vendorinfo_routinework===0){echo $transLang['STR_COMMON_NO'];}elseif($db_vendorinfo_routinework===1){echo $transLang['STR_COMMON_YES'];} ?>" />
|
||||
<input type="hidden" name="form_data_country" id="form_data_country" value="<?php echo $VisitInfo->getCountryInfo($row['visits_citizen'])[0]["countries_name"]; ?>" />
|
||||
<input type="hidden" name="form_data_nonroutinework" id="form_data_nonroutinework" value="<?php if($db_vendorinfo_nonroutinework===0){echo $transLang['STR_COMMON_NO'];}elseif($db_vendorinfo_nonroutinework===1){echo $transLang['STR_COMMON_YES'];} ?>" />
|
||||
<input type="hidden" name="form_data_coi" id="form_data_coi" value="<?php if($db_vendorinfo_coi===0){echo $transLang['STR_COMMON_NO'];}elseif($db_vendorinfo_coi===1){echo $transLang['STR_COMMON_YES'];} ?>" />
|
||||
<input type="hidden" name="form_data_worksummary" id="form_data_worksummary" value="<?php echo $db_vendorinfo_worksummary; ?>" />
|
||||
<input type="hidden" name="form_data_checklistcompleted" id="form_data_checklistcompleted" value="<?php if($db_vendorinfo_checklistcompleted===0){echo $transLang['STR_COMMON_NO'];}elseif($db_vendorinfo_checklistcompleted===1){echo $transLang['STR_COMMON_YES'];} ?>" />
|
||||
<input type="hidden" name="form_data_workcompleted" id="form_data_workcompleted" value="<?php if($db_vendorinfo_workcompleted===0){echo $transLang['STR_COMMON_NO'];}elseif($db_vendorinfo_workcompleted===1){echo $transLang['STR_COMMON_YES'];} ?>" />
|
||||
<input type="hidden" name="form_data_sitecleanup" id="form_data_sitecleanup" value="<?php if($db_vendorinfo_sitecleanup===0){echo $transLang['STR_COMMON_NO'];}elseif($db_vendorinfo_sitecleanup===1){echo $transLang['STR_COMMON_YES'];} ?>" />
|
||||
<input type="hidden" name="form_data_doccompleted" id="form_data_doccompleted" value="<?php if($db_vendorinfo_doccompleted===0){echo $transLang['STR_COMMON_NO'];}elseif($db_vendorinfo_doccompleted===1){echo $transLang['STR_COMMON_YES'];} ?>" />
|
||||
<input type="hidden" name="form_data_equipmentsummary" id="form_data_equipmentsummary" value="<?php echo $db_vendorinfo_equipmentsummary; ?>" />
|
||||
|
||||
<button type="submit" name="print" id="print" class="btn btn-primary btn-block btn-sm"><i class="fa fa-print"></i> <?php echo $transLang['PRINT']; ?></button>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user