prestation/Vue/Ajaxgenererbons/index.php
2025-12-05 10:42:46 +00:00

121 lines
5.5 KiB
PHP
Executable File

<div id="div_page_entiere">
<input class="sr-only" type="text" id="codePrestataire" name="codePrestataire" value="<?= $_SESSION['codePrestataire_C'] ?>">
<form style='font-size:10pt;'>
<input class="sr-only" id="btn_enreg" name="btn_enreg" type="submit" value="<?= _("Enregistrer") ?>" />
<legend> <?= _("Génération de bons de PEC") ?> </legend>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td width="10%"> <?= _("Prestataire") ?> </td>
<td colspan="3">
<?php if ($_SESSION['prestataire_C']>" "): ?>
<button type="button" class="form-control btn btn-primary" data-bs-toggle="modal" data-bs-target="#popRecherchePrestataire" style='font-size:7pt;' onChange='$("#msgErreur").html("");$("#div_wait").html("");' ><span id="nomPrestataire" name="nomPrestataire" onChange='$("#msgErreur").html("");$("#div_wait").html("");' > <?= $_SESSION['prestataire_C'] ?> </span></button>
<?php else : ?>
<button type="button" class="form-control btn btn-primary" data-bs-toggle="modal" data-bs-target="#popRecherchePrestataire" style='font-size:7pt;' onChange='$("#msgErreur").html("");$("#div_wait").html("");' > <span id="nomPrestataire" name="nomPrestataire" onChange='$("#msgErreur").html("");$("#div_wait").html("");' > <?= _("Tous / Rechercher Prestataire...") ?> </span></button>
<?php endif; ?>
</td>
<td width="10%" align="center"> <?= _("Type Bon") ?> </td>
<td>
<SELECT class="form-control" id="codeTypeBon" NAME="codeTypeBon" onChange="getDenierNumeroBon()" required AUTOCOMPLETE="OFF" style='font-size:10pt;'>
<?php liste_options($typebon,""); ?>
</SELECT>
</td>
</tr>
<tr>
<td> <?= _("Dernier No") ?> </td>
<td><input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="denierNumeroBon" name="denierNumeroBon" value="0" readonly ></td>
<td width="10%" align="center"> <?= _("No Départ") ?> </td>
<td ><input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="noDepart" name="noDepart" value="0" required AUTOCOMPLETE="OFF"
onBlur="controle_numerique(this);" ></td>
<td width="10%" align="center"> <?= _("No Fin") ?> </td>
<td ><input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="noFin" name="noFin" value="0" required AUTOCOMPLETE="OFF"
onBlur="controle_numerique(this);" ></td>
<td> </td>
</tr>
<tr>
<td> <?= _("Réceptionnaire") ?> </td>
<td colspan="3"><input class="form-control" style="font-size:10pt;" type="text" id="receptionnaire" name="receptionnaire" required AUTOCOMPLETE="OFF" ></td>
<td> </td>
<td> <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:genererbon();"> <?= _("Générer") ?> </button> </td>
</tr>
</tbody>
</table>
</form>
<div id="infodernierbon" style="display: none">
<input type="number" id="denierNumeroBon_info" name="denierNumeroBon_info" value="0">
</div>
<div id="infoplagelibre" style="display: none">
<input type="text" id="plageLibre_info" name="plageLibre_info" value="0">
</div>
<div id="msgErreur" class="alert alert-danger" style="height:38px; padding:5px;" >
<?php if (isset($msgErreur)): ?>
<H4><?= $msgErreur ?></H4>
<?php endif; ?>
</div>
<div id="div_gif">
</div>
<div class="alert alert-info">
<div id ="div_wait">
</div>
</div>
<div class="modal fade" id="popRecherchePrestataire" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button id="btn_close_pop" name="btn_close_pop" type="button" class="close" data-bs-dismiss="modal"> <?= _("Fermer") ?> </button>
<h4 class="modal-title"> <?= _("Rechercher un prestataire...") ?> </h4>
</div>
<div class="modal-body">
<div id="div_listeprestataires" onkeypress="javascript:ctrlkeypress_prestataire(event);">
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:10pt;'>
<thead>
<tr>
<th style="text-align:center" width="15%" > Code </th>
<th width="50%" style="text-align:center" > <?= _("Nom contenant...") ?> </th>
<th colspan="2" style="text-align:center" > Type </th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="text" class="form-control" id="codesearch" name="codesearch" autofocus style='font-size:10pt;' ></td>
<td><input type="text" class="form-control" id="nomsearch" name="nomsearch" autofocus style='font-size:10pt;' ></td>
<td><input type="button" class = "form-control btn btn-info" style='font-size:10pt;' value="<?= _("Rechercher...") ?>" onclick="javascript:afficher_pop_recherche_prestataire();" /></td>
<td><input type="button" class = "form-control btn btn-info" style='font-size:10pt;' value="<?= _("Ré-initialiser...") ?>" onclick="javascript:reinitialiser_prestataire();" /></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button id="close_pop" name="close_pop" type="button" class="btn btn-default" data-bs-dismiss="modal"> <?= _("Fermer") ?> </button>
</div>
</div>
</div>
</div>
</div>