history importify --> add templatename for reference
This commit is contained in:
parent
5c7e885194
commit
01fffcb0ac
@ -2,7 +2,7 @@
|
||||
<?php include("../class/company.php");
|
||||
$importify_his = new WA_MySQLi_RS("rsl", $repnew, 0);
|
||||
$user_id = $_SESSION['iduserlogin'];
|
||||
$importify_his->setQuery("SELECT * FROM template_import_his where user_id=$user_id");
|
||||
$importify_his->setQuery("SELECT * FROM template_import_his LEFT JOIN template_importify ON template_import_his.idtemplate=template_importify.idimporttemplates where user_id=$user_id");
|
||||
$importify_his->execute();
|
||||
|
||||
$arr_his = $importify_his->Results;
|
||||
@ -162,6 +162,8 @@ $arr_his = $importify_his->Results;
|
||||
<tr>
|
||||
<th width="60px">No</th>
|
||||
<th width="120px">Date/Time</th>
|
||||
<th>Template Name</th>
|
||||
<th>Lab Name</th>
|
||||
<th>ImportCode</th>
|
||||
<th width="80px">Status</th>
|
||||
<th width="80px">Action</th>
|
||||
@ -175,6 +177,8 @@ $arr_his = $importify_his->Results;
|
||||
<tr>
|
||||
<td><?= $i + 1 ?></td>
|
||||
<td><?= date("Y-m-d H:i:s", strtotime($item['created_at'])) ?></td>
|
||||
<td><?= $item['templatename'] ?></td>
|
||||
<td><?= $item['labname'] ?></td>
|
||||
<td><?= $item['importcode'] ?></td>
|
||||
<td class="no_padding">
|
||||
<?php
|
||||
|
||||
@ -144,6 +144,7 @@ if (isset($_FILES['f_csv'])) {
|
||||
$InsertQuery->bindColumn("user_id", "i", "" . $_SESSION['iduserlogin'], "WA_DEFAULT");
|
||||
$InsertQuery->bindColumn("importcode", "s", "" . $importcode, "WA_DEFAULT");
|
||||
$InsertQuery->bindColumn("f_status", "i", "0", "WA_DEFAULT");
|
||||
$InsertQuery->bindColumn("idtemplate", "i", $template_id, "WA_DEFAULT");
|
||||
$InsertQuery->saveInSession("");
|
||||
$InsertQuery->execute();
|
||||
|
||||
|
||||
@ -223,6 +223,7 @@
|
||||
</table>
|
||||
</div><!--end table-responsive-->
|
||||
<input id="f_csv" type="file" name="f_csv" style="display: none" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel, text/csv">
|
||||
<input id="import_template_id" type="hidden" name="import_template_id" value="">
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const deleteButtons = document.querySelectorAll('.canc-btn');
|
||||
@ -254,6 +255,7 @@
|
||||
|
||||
function onRunImport(id_template_importify) {
|
||||
tmp_id_template_importify = id_template_importify;
|
||||
$('#import_template_id').val(tmp_id_template_importify); // Imposta l'ID nel campo nascosto
|
||||
$('#f_csv').trigger("click");
|
||||
}
|
||||
|
||||
@ -571,6 +573,7 @@
|
||||
formdata.append("f_csv", $('#f_csv').prop('files')[0]);
|
||||
formdata.append("template_id", tmp_id_template_importify);
|
||||
formdata.append("lab_id", $('#labor_id').val());
|
||||
formdata.append("import_template_id", $('#import_template_id').val());
|
||||
|
||||
$.ajax({
|
||||
url: 'import_auto_script.php',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user