mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-23 06:47:40 +01:00
Fix #53
Risoluzione del problema segnalato nella issue #53. Ripristino del messaggio automatico del browser in caso di modifiche non salvate nella pagine (rimozione automatica nel caso sia abilitato il debug).
This commit is contained in:
parent
6b9dae3b9d
commit
803cdae892
@ -33,7 +33,12 @@ if (Auth::check()) {
|
|||||||
<!-- Fix per le icone di debug -->
|
<!-- Fix per le icone di debug -->
|
||||||
<style>div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before {
|
<style>div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before {
|
||||||
font-family: FontAwesome;
|
font-family: FontAwesome;
|
||||||
}</style>';
|
}</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Rimozione del messaggio automatico riguardante la modifica di valori nella pagina
|
||||||
|
window.onbeforeunload = null;
|
||||||
|
</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$custom_css = get_var('CSS Personalizzato');
|
$custom_css = get_var('CSS Personalizzato');
|
||||||
@ -48,10 +53,6 @@ if (Auth::check()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<script>
|
|
||||||
// Rimozione del messaggio automatico riguardante la modifica di valori nella pagina
|
|
||||||
window.onbeforeunload = null;
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>';
|
</html>';
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ $_SESSION['superselect']['id_categoria'] = $records[0]['id_categoria'];
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
{[ "type": "number", "label": "<?php echo tr('Soglia minima quantità'); ?>", "name": "threshold_qta", "value": "$threshold_qta$", "decimals": "qta" ]}
|
{[ "type": "number", "label": "<?php echo tr('Soglia minima quantità'); ?>", "name": "threshold_qta", "value": "$threshold_qta$", "decimals": "qta|0" ]}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -293,18 +293,17 @@ $("#categoria").change( function(){
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
//fatture, ddt, preventivi collegati a questo articolo
|
// fatture, ddt, preventivi collegati a questo articolo
|
||||||
$elementi = $dbo->fetchArray('SELECT `co_documenti`.`id`, `co_documenti`.`data`, `co_documenti`.`numero`, `co_documenti`.`numero_esterno`, `co_tipidocumento`.`descrizione` AS tipo_documento, `co_tipidocumento`.`dir` FROM `co_documenti` JOIN `co_tipidocumento` ON `co_tipidocumento`.`id` = `co_documenti`.`idtipodocumento` WHERE `co_documenti`.`id` IN (SELECT `iddocumento` FROM `co_righe_documenti` WHERE `idarticolo` = '.prepare($id_record).') UNION
|
$elementi = $dbo->fetchArray('SELECT `co_documenti`.`id`, `co_documenti`.`data`, `co_documenti`.`numero`, `co_documenti`.`numero_esterno`, `co_tipidocumento`.`descrizione` AS tipo_documento, `co_tipidocumento`.`dir` FROM `co_documenti` JOIN `co_tipidocumento` ON `co_tipidocumento`.`id` = `co_documenti`.`idtipodocumento` WHERE `co_documenti`.`id` IN (SELECT `iddocumento` FROM `co_righe_documenti` WHERE `idarticolo` = '.prepare($id_record).') UNION
|
||||||
SELECT `dt_ddt`.`id`, `dt_ddt`.`data`, `dt_ddt`.`numero`, `dt_ddt`.`numero_esterno`, `dt_tipiddt`.`descrizione` AS tipo_documento, `dt_tipiddt`.`dir` FROM `dt_ddt` JOIN `dt_tipiddt` ON `dt_tipiddt`.`id` = `dt_ddt`.`idtipoddt` WHERE `dt_ddt`.`id` IN (SELECT `idddt` FROM `dt_righe_ddt` WHERE `idarticolo` = '.prepare($id_record).') UNION
|
SELECT `dt_ddt`.`id`, `dt_ddt`.`data`, `dt_ddt`.`numero`, `dt_ddt`.`numero_esterno`, `dt_tipiddt`.`descrizione` AS tipo_documento, `dt_tipiddt`.`dir` FROM `dt_ddt` JOIN `dt_tipiddt` ON `dt_tipiddt`.`id` = `dt_ddt`.`idtipoddt` WHERE `dt_ddt`.`id` IN (SELECT `idddt` FROM `dt_righe_ddt` WHERE `idarticolo` = '.prepare($id_record).') UNION
|
||||||
SELECT `co_preventivi`.`id`, `co_preventivi`.`data_bozza`, `co_preventivi`.`numero`, 0 AS numero_esterno , "Preventivo" AS tipo_documento, 0 AS dir FROM `co_preventivi` WHERE `co_preventivi`.`id` IN (SELECT `idpreventivo` FROM `co_righe_preventivi` WHERE `idarticolo` = '.prepare($id_record).') ORDER BY `data`');
|
SELECT `co_preventivi`.`id`, `co_preventivi`.`data_bozza`, `co_preventivi`.`numero`, 0 AS numero_esterno , "Preventivo" AS tipo_documento, 0 AS dir FROM `co_preventivi` WHERE `co_preventivi`.`id` IN (SELECT `idpreventivo` FROM `co_righe_preventivi` WHERE `idarticolo` = '.prepare($id_record).') ORDER BY `data`');
|
||||||
|
|
||||||
|
|
||||||
if (!empty($elementi)) {
|
if (!empty($elementi)) {
|
||||||
echo '
|
echo '
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
<p>'.tr('_NUM_ altr_I_ document_I_ collegat_I_', [
|
<p>'.tr('_NUM_ altr_I_ document_I_ collegat_I_', [
|
||||||
'_NUM_' => count($elementi),
|
'_NUM_' => count($elementi),
|
||||||
'_I_' => (count($elementi)>1) ? tr('i') : tr('o')
|
'_I_' => (count($elementi) > 1) ? tr('i') : tr('o'),
|
||||||
]).':</p>
|
]).':</p>
|
||||||
<ul>';
|
<ul>';
|
||||||
|
|
||||||
@ -315,11 +314,11 @@ if (!empty($elementi)) {
|
|||||||
'_DATE_' => Translator::dateToLocale($elemento['data']),
|
'_DATE_' => Translator::dateToLocale($elemento['data']),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//se non è un preventivo è un ddt o una fattura
|
// se non è un preventivo è un ddt o una fattura
|
||||||
//se non è un ddt è una fattura.
|
// se non è un ddt è una fattura.
|
||||||
if (in_array($elemento['tipo_documento'], ['Preventivo'])) {
|
if (in_array($elemento['tipo_documento'], ['Preventivo'])) {
|
||||||
$modulo ='Preventivi';
|
$modulo = 'Preventivi';
|
||||||
} else if (!in_array($elemento['tipo_documento'], ['Ddt di vendita', 'Ddt di acquisto'])) {
|
} elseif (!in_array($elemento['tipo_documento'], ['Ddt di vendita', 'Ddt di acquisto'])) {
|
||||||
$modulo = ($elemento['dir'] == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto';
|
$modulo = ($elemento['dir'] == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto';
|
||||||
} else {
|
} else {
|
||||||
$modulo = ($elemento['dir'] == 'entrata') ? 'Ddt di vendita' : 'Ddt di acquisto';
|
$modulo = ($elemento['dir'] == 'entrata') ? 'Ddt di vendita' : 'Ddt di acquisto';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user