mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-17 20:10:50 +01:00
Aggiunto blocco fatture Emesse
This commit is contained in:
parent
c9c69cc2d5
commit
6c0cd2a8cf
22
editor.php
22
editor.php
@ -239,17 +239,23 @@ echo '
|
|||||||
<script>';
|
<script>';
|
||||||
|
|
||||||
// Se l'utente ha i permessi in sola lettura per il modulo, converto tutti i campi di testo in span
|
// Se l'utente ha i permessi in sola lettura per il modulo, converto tutti i campi di testo in span
|
||||||
if (Modules::getPermission($id_module) == 'r' || !empty($block_edit)) {
|
$read_only = Modules::getPermission($id_module) == 'r';
|
||||||
$not = (Modules::getPermission($id_module) == 'r') ? '' : '.not(".unblockable")';
|
if ($read_only || !empty($block_edit)) {
|
||||||
|
$not = $read_only ? '' : '.not(".unblockable")';
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("input, textarea, select", "section.content")'.$not.'.attr("readonly", "true");
|
$("input, textarea, select", "section.content")'.$not.'.attr("readonly", "true");
|
||||||
$("select, input[type=checkbox]")'.$not.'.prop("disabled", true);
|
$("select, input[type=checkbox]", "section.content")'.$not.'.prop("disabled", true);';
|
||||||
$("a.btn, button, input[type=button], input[type=submit]", "section.content")'.$not.'.hide();
|
|
||||||
$("a.btn-info, a.btn-warning, button.btn-info, button.btn-warning, input[type=button].btn-info", "section.content")'.$not.'.show();
|
|
||||||
});';
|
|
||||||
|
|
||||||
|
if ($read_only) {
|
||||||
|
echo '
|
||||||
|
$("a.btn, button, input[type=button], input[type=submit]", "section.content").hide();
|
||||||
|
$("a.btn-info, a.btn-warning, button.btn-info, button.btn-warning, input[type=button].btn-info", "section.content").show();';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '
|
||||||
|
});';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -275,7 +281,7 @@ if (Modules::getPermission($id_module) == 'r' || !empty($block_edit)) {
|
|||||||
};
|
};
|
||||||
<?php
|
<?php
|
||||||
if ($advanced_sessions) {
|
if ($advanced_sessions) {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
function getActiveUsers(){
|
function getActiveUsers(){
|
||||||
$.getJSON('<?php echo ROOTDIR; ?>/call.php', {
|
$.getJSON('<?php echo ROOTDIR; ?>/call.php', {
|
||||||
@ -298,7 +304,7 @@ if ($advanced_sessions) {
|
|||||||
|
|
||||||
setInterval(getActiveUsers, <?php echo get_var('Timeout notifica di presenza (minuti)') * 1000; ?>);
|
setInterval(getActiveUsers, <?php echo get_var('Timeout notifica di presenza (minuti)') * 1000; ?>);
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
$block_edit = !empty($note_accredito);
|
$block_edit = !empty($note_accredito) || $records[0]['stato'] == 'Emessa';
|
||||||
|
|
||||||
$rs = $dbo->fetchArray('SELECT co_tipidocumento.descrizione, dir FROM co_tipidocumento INNER JOIN co_documenti ON co_tipidocumento.id=co_documenti.idtipodocumento WHERE co_documenti.id='.prepare($id_record));
|
$rs = $dbo->fetchArray('SELECT co_tipidocumento.descrizione, dir FROM co_tipidocumento INNER JOIN co_documenti ON co_tipidocumento.id=co_documenti.idtipodocumento WHERE co_documenti.id='.prepare($id_record));
|
||||||
$dir = $rs[0]['dir'];
|
$dir = $rs[0]['dir'];
|
||||||
@ -84,7 +84,7 @@ if ($dir == 'entrata') {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
{[ "type": "select", "label": "<?php echo tr('Stato'); ?>", "name": "idstatodocumento", "required": 1, "values": "query=SELECT * FROM co_statidocumento", "value": "$idstatodocumento$", "extra": " onchange = \"if ($('#idstatodocumento option:selected').text()=='Pagato'){if( confirm('Sicuri di voler impostare manualmente la fattura come pagata senza aggiungerla in prima nota?') ){ return true; }else{ $('#idstatodocumento').selectSet(<?php echo $records[0]['idstatodocumento']; ?>); }}\" " ]}
|
{[ "type": "select", "label": "<?php echo tr('Stato'); ?>", "name": "idstatodocumento", "required": 1, "values": "query=SELECT * FROM co_statidocumento", "value": "$idstatodocumento$", "class": "unblockable", "extra": " onchange = \"if ($('#idstatodocumento option:selected').text()=='Pagato'){if( confirm('Sicuri di voler impostare manualmente la fattura come pagata senza aggiungerla in prima nota?') ){ return true; }else{ $('#idstatodocumento').selectSet(<?php echo $records[0]['idstatodocumento']; ?>); }}\" " ]}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -147,15 +147,15 @@ class FileManager implements ManagerInterface
|
|||||||
<b>'.$options['label'].'</b>
|
<b>'.$options['label'].'</b>
|
||||||
<div id="upload-form" class="row">
|
<div id="upload-form" class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
{[ "type": "text", "placeholder": "'.tr('Nome').'", "name": "nome_allegato" ]}
|
{[ "type": "text", "placeholder": "'.tr('Nome').'", "name": "nome_allegato", "class": "unblockable" ]}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
{[ "type": "text", "placeholder": "'.tr('Categoria').'", "name": "categoria" ]}
|
{[ "type": "text", "placeholder": "'.tr('Categoria').'", "name": "categoria", "class": "unblockable" ]}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
{[ "type": "file", "placeholder": "'.tr('File').'", "name": "blob" ]}
|
{[ "type": "file", "placeholder": "'.tr('File').'", "name": "blob", "class": "unblockable" ]}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-2 text-right">
|
<div class="col-md-2 text-right">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user