Salvataggio documento in fase di aggiunta righe

This commit is contained in:
MatteoPistorello 2023-03-30 16:36:24 +02:00
parent c550bceb43
commit 235852a012
6 changed files with 48 additions and 58 deletions

View File

@ -398,14 +398,6 @@ echo '
{( "name": "log_email", "id_module": "$id_module$", "id_record": "$id_record$" )}
<script type="text/javascript">
function gestioneArticolo(button) {
gestioneRiga(button, "is_articolo");
}
function gestioneBarcode(button) {
gestioneRiga(button, "is_barcode");
}
function gestioneSconto(button) {
gestioneRiga(button, "is_sconto");
}
@ -515,7 +507,10 @@ $("#codice_cig, #codice_cup").bind("keyup change", function(e) {
});
function salvaArticolo() {
async function salvaArticolo() {
// Salvataggio via AJAX
await salvaForm("#edit-form");
$("#link_form").ajaxSubmit({
url: globals.rootdir + "/actions.php",
data: {

View File

@ -414,13 +414,13 @@ if (!$block_edit) {
</li>
<li>
<a class="'.(!empty($tot_ddt) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ddt.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Ddt').'">
<a class="'.(!empty($tot_ddt) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ddt.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Ddt').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ddt').'
</a>
</li>
<li>
<a class="'.(!empty($tot_ordini) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ordine.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Ordine').'">
<a class="'.(!empty($tot_ordini) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ordine.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Ordine').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ordine').'
</a>
</li>
@ -446,12 +446,9 @@ echo '
{( "name": "log_email", "id_module": "$id_module$", "id_record": "$id_record$" )}
<script>
function gestioneArticolo(button) {
gestioneRiga(button, "is_articolo");
}
function gestioneBarcode(button) {
gestioneRiga(button, "is_barcode");
async function saveForm() {
// Salvataggio via AJAX
await salvaForm("#edit-form");
}
function gestioneSconto(button) {
@ -551,7 +548,10 @@ $("#idanagrafica").change(function() {
}
});
function salvaArticolo() {
async function salvaArticolo() {
// Salvataggio via AJAX
await salvaForm("#edit-form");
$("#link_form").ajaxSubmit({
url: globals.rootdir + "/actions.php",
data: {

View File

@ -850,32 +850,32 @@ if (!$block_edit) {
if ($dir == 'entrata') {
echo '
<li>
<a class="'.(!empty($interventi) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_intervento.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Attività').'">
<a class="'.(!empty($interventi) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_intervento.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Attività').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Attività').'
</a>
</li>
<li>
<a class="'.(!empty($preventivi) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_preventivo.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Preventivo').'">
<a class="'.(!empty($preventivi) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_preventivo.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Preventivo').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Preventivo').'
</a>
</li>
<li>
<a class="'.(!empty($contratti) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_contratto.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Contratto').'">
<a class="'.(!empty($contratti) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_contratto.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Contratto').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Contratto').'
</a>
</li>';
}
echo '
<li>
<a class="'.(!empty($ddt) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ddt.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Ddt').'">
<a class="'.(!empty($ddt) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ddt.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Ddt').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ddt').'
</a>
</li>
<li>
<a class="'.(!empty($ordini) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ordine.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Ordine').'">
<a class="'.(!empty($ordini) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ordine.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Ordine').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ordine').'
</a>
</li>';
@ -1014,12 +1014,9 @@ if (in_array($record[$field_name], $user->sedi)) {
echo '
<script>
function gestioneArticolo(button) {
gestioneRiga(button, "is_articolo");
}
function gestioneBarcode(button) {
gestioneRiga(button, "is_barcode");
async function saveForm() {
// Salvataggio via AJAX
await salvaForm("#edit-form");
}
function gestioneSconto(button) {
@ -1158,7 +1155,10 @@ if ($dir == 'entrata') {
}
echo '
function salvaArticolo() {
async function salvaArticolo() {
// Salvataggio via AJAX
await salvaForm("#edit-form");
$("#link_form").ajaxSubmit({
url: globals.rootdir + "/actions.php",
data: {

View File

@ -515,19 +515,19 @@ if (!$block_edit) {
</li>
<li title="'.tr("L'aggiunta del documento secondo questa procedura non associa l'attività al relativo consuntivo del documento: utilizzare i campi soprastanti a questo fine").'.">
<a class="'.(!empty($preventivi) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_preventivo.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Preventivo').'">
<a class="'.(!empty($preventivi) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_preventivo.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Preventivo').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Preventivo').'
</a>
</li>
<li title="'.tr("L'aggiunta del documento secondo questa procedura non associa l'attività al relativo consuntivo del documento: utilizzare i campi soprastanti a questo fine").'.">
<a class="'.(!empty($contratti) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_contratto.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Contratto').'">
<a class="'.(!empty($contratti) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_contratto.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Contratto').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Contratto').'
</a>
</li>
<li title="'.tr('DDT in uscita per il Cliente che si trovano nello stato di Evaso o Parzialmente Evaso con una Causale importabile').'. '.tr("L'aggiunta del documento secondo questa procedura non associa l'attività al relativo consuntivo del documento: utilizzare i campi soprastanti a questo fine").'.">
<a class="'.(!empty($ddt) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ddt.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Ddt').'">
<a class="'.(!empty($ddt) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_ddt.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Ddt').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Ddt').'
</a>
</li>
@ -587,12 +587,9 @@ if (!$block_edit) {
{( "name": "log_email", "id_module": "$id_module$", "id_record": "$id_record$" )}
<script>
function gestioneArticolo(button) {
gestioneRiga(button, "is_articolo");
}
function gestioneBarcode(button) {
gestioneRiga(button, "is_barcode");
async function saveForm() {
// Salvataggio via AJAX
await salvaForm("#edit-form");
}
function gestioneSconto(button) {
@ -803,7 +800,10 @@ $(document).ready(function() {
}
});
function salvaArticolo() {
async function salvaArticolo() {
// Salvataggio via AJAX
await salvaForm("#edit-form");
$("#link_form").ajaxSubmit({
url: globals.rootdir + "/actions.php",
data: {

View File

@ -277,7 +277,7 @@ if (!$block_edit) {
if ($dir == 'entrata') {
echo '
<li>
<a class="'.(!empty($preventivi) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_preventivo.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Preventivo').'">
<a class="'.(!empty($preventivi) ? '' : ' disabled').'" style="cursor:pointer" data-href="'.$structure->fileurl('add_preventivo.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="modal" data-title="'.tr('Aggiungi Preventivo').'" onclick="saveForm()">
<i class="fa fa-plus"></i> '.tr('Preventivo').'
</a>
</li>';
@ -288,7 +288,7 @@ if (!$block_edit) {
if ($dir == 'entrata') {
echo '
<div class="pull-right">
<a class="btn btn-sm btn-info" data-href="'.$structure->fileurl('quantita_impegnate.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="tooltip" data-title="'.tr('Controllo sulle quantità impegnate').'">
<a class="btn btn-sm btn-info" data-href="'.$structure->fileurl('quantita_impegnate.php').'?id_module='.$id_module.'&id_record='.$id_record.'" data-toggle="tooltip" data-title="'.tr('Controllo sulle quantità impegnate').'" onclick="saveForm()">
<i class="fa fa-question-circle"></i> '.tr('Verifica disponibilità').'
</a>
</div>';
@ -311,12 +311,9 @@ echo '
{( "name": "log_email", "id_module": "$id_module$", "id_record": "$id_record$" )}
<script>
function gestioneArticolo(button) {
gestioneRiga(button, "is_articolo");
}
function gestioneBarcode(button) {
gestioneRiga(button, "is_barcode");
async function saveForm() {
// Salvataggio via AJAX
await salvaForm("#edit-form");
}
function gestioneSconto(button) {
@ -409,7 +406,10 @@ $(document).ready(function() {
$("#barcode").focus();
});
function salvaArticolo() {
async function salvaArticolo() {
// Salvataggio via AJAX
await salvaForm("#edit-form");
$("#link_form").ajaxSubmit({
url: globals.rootdir + "/actions.php",
data: {

View File

@ -317,14 +317,6 @@ echo '
{( "name": "log_email", "id_module": "$id_module$", "id_record": "$id_record$" )}
<script type="text/javascript">
function gestioneArticolo(button) {
gestioneRiga(button, "is_articolo");
}
function gestioneBarcode(button) {
gestioneRiga(button, "is_barcode");
}
function gestioneSconto(button) {
gestioneRiga(button, "is_sconto");
}
@ -431,7 +423,10 @@ $(document).ready(function() {
$("#barcode").focus();
});
function salvaArticolo() {
async function salvaArticolo() {
// Salvataggio via AJAX
await salvaForm("#edit-form");
$("#link_form").ajaxSubmit({
url: globals.rootdir + "/actions.php",
data: {