mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-02 08:56:48 +01:00
standardizzazione dei pulsanti di duplicazione
- fatture - ddt - contratti - preventivi
This commit is contained in:
parent
3e73cfed75
commit
383519e921
@ -50,31 +50,6 @@ echo '
|
||||
|
||||
// Duplica contratto
|
||||
echo '
|
||||
<button type="button" class="btn btn-primary" onclick="copiaContratto();">
|
||||
<button type="button" class="btn btn-primary ask" data-title="'.tr('Duplicare questo contratto?').'" data-msg="'.tr('Clicca su tasto duplica per procedere.').'" data-op="copy" data-button="'.tr('Duplica').'" data-class="btn btn-lg btn-primary" data-backto="record-edit">
|
||||
<i class="fa fa-copy"></i> '.tr('Duplica contratto').'
|
||||
</button>';
|
||||
|
||||
echo '
|
||||
<form action="" method="post" id="copia-contratto">
|
||||
<input type="hidden" name="backto" value="record-edit">
|
||||
<input type="hidden" name="op" value="copy">
|
||||
</form>';
|
||||
|
||||
echo '
|
||||
<script>
|
||||
function copiaContratto() {
|
||||
swal({
|
||||
title: "'.tr('Duplicare il contratto?').'",
|
||||
text: "'.tr('').'",
|
||||
type: "info",
|
||||
showCancelButton: true,
|
||||
confirmButtonClass: "btn btn-lg btn-primary",
|
||||
confirmButtonText: "'.tr('Duplica').'",
|
||||
}).then(
|
||||
function() {
|
||||
$("#copia-contratto").submit();
|
||||
},
|
||||
function() {}
|
||||
);
|
||||
}
|
||||
</script>';
|
||||
</button>';
|
@ -80,32 +80,7 @@ echo '
|
||||
|
||||
// Duplica ddt
|
||||
echo '
|
||||
<button type="button" class="btn btn-primary" onclick="copiaDdt()">
|
||||
<button type="button" class="btn btn-primary ask" data-title="'.tr('Duplicare questo Ddt?').'" data-msg="'.tr('Clicca su tasto duplica per procedere.').'" data-op="copy" data-button="'.tr('Duplica').'" data-class="btn btn-lg btn-primary" data-backto="record-edit">
|
||||
<i class="fa fa-copy"></i> '.tr('Duplica ddt').'
|
||||
</button>';
|
||||
|
||||
echo '
|
||||
<form action="" method="post" id="copia-ddt">
|
||||
<input type="hidden" name="backto" value="record-edit">
|
||||
<input type="hidden" name="op" value="copy">
|
||||
</form>';
|
||||
|
||||
|
||||
echo '
|
||||
<script>
|
||||
function copiaDdt() {
|
||||
swal({
|
||||
title: "'.tr('Duplicare il ddt?').'",
|
||||
text: "'.tr('').'",
|
||||
type: "info",
|
||||
showCancelButton: true,
|
||||
confirmButtonClass: "btn btn-lg btn-primary",
|
||||
confirmButtonText: "'.tr('Duplica').'",
|
||||
}).then(
|
||||
function() {
|
||||
$("#copia-ddt").submit();
|
||||
},
|
||||
function() {}
|
||||
);
|
||||
}
|
||||
</script>';
|
||||
|
@ -19,11 +19,6 @@
|
||||
|
||||
include_once __DIR__.'/../../core.php';
|
||||
|
||||
echo '
|
||||
<button type="button" class="btn btn-primary ask btn-primary" '.(empty($record['is_reversed']) ? '' : 'disabled').' data-msg="'.tr('Duplicare questa fattura?').'" data-op="copy" data-button="'.tr('Duplica').'" data-class="btn btn-lg btn-warning" data-backto="record-edit" >
|
||||
<i class="fa fa-copy"></i> '.tr('Duplica fattura').'
|
||||
</button>';
|
||||
|
||||
if ($module->name == 'Fatture di vendita') {
|
||||
$attributi_visibili = $record['dati_aggiuntivi_fe'] != null || $record['stato'] == 'Bozza';
|
||||
|
||||
@ -118,4 +113,10 @@ if (!empty($record['is_fiscale'])) {
|
||||
<i class="fa fa-folder-open"></i> '.tr('Riapri documento').'...
|
||||
</button>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Duplica fattura
|
||||
echo '
|
||||
<button type="button" class="btn btn-primary ask" '.(empty($record['is_reversed']) ? '' : 'disabled').' data-title="'.tr('Duplicare questa fattura?').'" data-msg="'.tr('Clicca su tasto duplica per procedere.').'" data-op="copy" data-button="'.tr('Duplica').'" data-class="btn btn-lg btn-primary" data-backto="record-edit" >
|
||||
<i class="fa fa-copy"></i> '.tr('Duplica fattura').'
|
||||
</button>';
|
||||
|
@ -19,11 +19,6 @@
|
||||
|
||||
include_once __DIR__.'/../../core.php';
|
||||
|
||||
echo '
|
||||
<button type="button" class="btn btn-primary" onclick="copiaPreventivo();">
|
||||
<i class="fa fa-copy"></i> '.tr('Duplica preventivo').'
|
||||
</button>';
|
||||
|
||||
$stati_abilitati = $dbo->fetchOne('SELECT GROUP_CONCAT(`descrizione` SEPARATOR ", ") AS stati_abilitati FROM `co_statipreventivi` WHERE `is_revisionabile` = 1 ')['stati_abilitati'];
|
||||
|
||||
// Crea revisione
|
||||
@ -92,26 +87,6 @@ echo '
|
||||
|
||||
// Duplica preventivo
|
||||
echo '
|
||||
<form action="" method="post" id="copia-preventivo">
|
||||
<input type="hidden" name="backto" value="record-edit">
|
||||
<input type="hidden" name="op" value="copy">
|
||||
</form>';
|
||||
|
||||
echo '
|
||||
<script>
|
||||
function copiaPreventivo() {
|
||||
swal({
|
||||
title: "'.tr('Duplicare il preventivo?').'",
|
||||
text: "'.tr('').'",
|
||||
type: "info",
|
||||
showCancelButton: true,
|
||||
confirmButtonClass: "btn btn-lg btn-primary",
|
||||
confirmButtonText: "'.tr('Duplica').'",
|
||||
}).then(
|
||||
function() {
|
||||
$("#copia-preventivo").submit();
|
||||
},
|
||||
function() {}
|
||||
);
|
||||
}
|
||||
</script>';
|
||||
<button type="button" class="btn ask btn-primary" data-title="'.tr('Duplicare questo preventivo?').'" data-msg="'.tr('Clicca su tasto duplica per procedere.').'" data-op="copy" data-button="'.tr('Duplica').'" data-class="btn btn-lg btn-primary" data-backto="record-edit" >
|
||||
<i class="fa fa-copy"></i> '.tr('Duplica preventivo').'
|
||||
</button>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user