mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-28 17:28:02 +01:00
Merge branch 'master' of https://github.com/devcode-it/openstamanager
This commit is contained in:
commit
6ea89e29dc
@ -211,6 +211,10 @@ if ($dir == 'entrata') {
|
|||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
<!-- id_segment -->
|
||||||
|
{[ "type": "hidden", "label": "Segmento", "name": "id_segment", "class": "text-center", "value": "$id_segment$" ]}
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($dir == 'uscita') {
|
if ($dir == 'uscita') {
|
||||||
echo '
|
echo '
|
||||||
@ -225,9 +229,6 @@ if ($dir == 'entrata') {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- id_segment -->
|
|
||||||
{[ "type": "hidden", "label": "Segmento", "name": "id_segment", "class": "text-center", "value": "$id_segment$" ]}
|
|
||||||
|
|
||||||
<div class="col-md-<?php echo $size; ?>">
|
<div class="col-md-<?php echo $size; ?>">
|
||||||
{[ "type": "text", "label": "<?php echo $label; ?>", "required": "<?php echo ($dir == 'uscita') ? 1 : 0; ?>", "name": "numero_esterno", "class": "text-center", "value": "$numero_esterno$", "help": "<?php echo (empty($record['numero_esterno']) and $dir == 'entrata') ? tr('Il numero della fattura sarà generato automaticamente in fase di emissione.') : ''; ?>" ]}
|
{[ "type": "text", "label": "<?php echo $label; ?>", "required": "<?php echo ($dir == 'uscita') ? 1 : 0; ?>", "name": "numero_esterno", "class": "text-center", "value": "$numero_esterno$", "help": "<?php echo (empty($record['numero_esterno']) and $dir == 'entrata') ? tr('Il numero della fattura sarà generato automaticamente in fase di emissione.') : ''; ?>" ]}
|
||||||
</div>
|
</div>
|
||||||
@ -280,7 +281,6 @@ $query .= ' ORDER BY descrizione';
|
|||||||
|
|
||||||
echo '
|
echo '
|
||||||
<div class="col-md-'.($is_fiscale ? 2 : 6).'">
|
<div class="col-md-'.($is_fiscale ? 2 : 6).'">
|
||||||
<!-- TODO: Rimuovere possibilità di selezionare lo stato pagato obbligando l\'utente ad aggiungere il movimento in prima nota -->
|
|
||||||
{[ "type": "select", "label": "'.tr('Stato').'", "name": "idstatodocumento", "required": 1, "values": "query='.$query.'", "value": "$idstatodocumento$", "class": "'.(($record['stato'] != 'Bozza' && !$abilita_genera) ? '' : 'unblockable').'", "extra": "onchange=\"return cambiaStato()\"" ]}
|
{[ "type": "select", "label": "'.tr('Stato').'", "name": "idstatodocumento", "required": 1, "values": "query='.$query.'", "value": "$idstatodocumento$", "class": "'.(($record['stato'] != 'Bozza' && !$abilita_genera) ? '' : 'unblockable').'", "extra": "onchange=\"return cambiaStato()\"" ]}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -77,7 +77,7 @@ switch (post('op')) {
|
|||||||
$list = [];
|
$list = [];
|
||||||
$anagrafiche = [];
|
$anagrafiche = [];
|
||||||
$id_anagrafica = 0;
|
$id_anagrafica = 0;
|
||||||
$scadenze = Scadenza::whereIn('id', $id_records)->orderBy('idanagrafica')->orderBy('iddocumento')->get();
|
$scadenze = Scadenza::whereIn('id', $id_records)->where('pagato', '>', 'da_pagare')->orderBy('idanagrafica')->orderBy('iddocumento')->get();
|
||||||
foreach ($scadenze as $key => $scadenza) {
|
foreach ($scadenze as $key => $scadenza) {
|
||||||
$documento = $scadenza->documento;
|
$documento = $scadenza->documento;
|
||||||
|
|
||||||
|
@ -25,12 +25,12 @@ $r = $dbo->fetchOne('SELECT co_scadenziario.*, co_documenti.*,
|
|||||||
co_scadenziario.da_pagare - co_scadenziario.pagato AS totale,
|
co_scadenziario.da_pagare - co_scadenziario.pagato AS totale,
|
||||||
(SELECT pec FROM em_accounts WHERE em_accounts.id='.prepare($template['id_account']).') AS is_pec,
|
(SELECT pec FROM em_accounts WHERE em_accounts.id='.prepare($template['id_account']).') AS is_pec,
|
||||||
(SELECT descrizione FROM co_pagamenti WHERE co_pagamenti.id = co_documenti.idpagamento) AS pagamento,
|
(SELECT descrizione FROM co_pagamenti WHERE co_pagamenti.id = co_documenti.idpagamento) AS pagamento,
|
||||||
(SELECT GROUP_CONCAT(CONCAT("<li>",DATE_FORMAT(scadenza,"%d/%m/%Y")," - ",FORMAT(da_pagare,2),"€ - ",descrizione,"</li>") SEPARATOR "<br>") FROM co_scadenziario WHERE scadenza < NOW() AND iddocumento!=0 AND da_pagare>0 AND idanagrafica=co_documenti.idanagrafica ORDER BY scadenza) AS scadenze_fatture_scadute
|
(SELECT GROUP_CONCAT(CONCAT("<li>",DATE_FORMAT(scadenza,"%d/%m/%Y")," - ",FORMAT(da_pagare,2),"€ - ",descrizione,"</li>") SEPARATOR "<br>") FROM co_scadenziario WHERE scadenza < NOW() AND iddocumento!=0 AND da_pagare>pagato AND idanagrafica=co_documenti.idanagrafica ORDER BY scadenza) AS scadenze_fatture_scadute
|
||||||
FROM co_scadenziario
|
FROM co_scadenziario
|
||||||
INNER JOIN co_documenti ON co_documenti.id = co_scadenziario.iddocumento
|
INNER JOIN co_documenti ON co_documenti.id = co_scadenziario.iddocumento
|
||||||
INNER JOIN an_anagrafiche ON co_documenti.idanagrafica = an_anagrafiche.idanagrafica
|
INNER JOIN an_anagrafiche ON co_documenti.idanagrafica = an_anagrafiche.idanagrafica
|
||||||
LEFT JOIN an_referenti ON an_referenti.idanagrafica = an_anagrafiche.idanagrafica
|
LEFT JOIN an_referenti ON an_referenti.idanagrafica = an_anagrafiche.idanagrafica
|
||||||
WHERE co_scadenziario.pagato != co_scadenziario.da_pagare AND co_scadenziario.iddocumento = (SELECT iddocumento FROM co_scadenziario s WHERE id='.prepare($id_record).')');
|
WHERE co_scadenziario.da_pagare > co_scadenziario.pagato AND co_scadenziario.iddocumento = (SELECT iddocumento FROM co_scadenziario s WHERE id='.prepare($id_record).')');
|
||||||
|
|
||||||
$logo_azienda = str_replace(base_dir(), base_path(), App::filepath('templates/base|custom|/logo_azienda.jpg'));
|
$logo_azienda = str_replace(base_dir(), base_path(), App::filepath('templates/base|custom|/logo_azienda.jpg'));
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ echo "
|
|||||||
<table class='table table-striped table-bordered' id='contents'>
|
<table class='table table-striped table-bordered' id='contents'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class='text-center'>#</th>";
|
<th class='text-center' width='35' >#</th>";
|
||||||
|
|
||||||
if ($has_image) {
|
if ($has_image) {
|
||||||
echo "
|
echo "
|
||||||
|
@ -52,10 +52,10 @@ UPDATE `co_statipreventivi` SET `colore` = '#88de69' WHERE `co_statipreventivi`.
|
|||||||
UPDATE `co_statipreventivi` SET `colore` = '#98fb98' WHERE `co_statipreventivi`.`descrizione` = 'Fatturato';
|
UPDATE `co_statipreventivi` SET `colore` = '#98fb98' WHERE `co_statipreventivi`.`descrizione` = 'Fatturato';
|
||||||
UPDATE `co_statipreventivi` SET `colore` = '#b4ff99' WHERE `co_statipreventivi`.`descrizione` = 'Parzialmente fatturato';
|
UPDATE `co_statipreventivi` SET `colore` = '#b4ff99' WHERE `co_statipreventivi`.`descrizione` = 'Parzialmente fatturato';
|
||||||
|
|
||||||
UPDATE `in_statiintervento` SET `colore` = '#ffef99' WHERE `in_statiintervento`.`descrizione` = 'Da programmare';
|
UPDATE `in_statiintervento` SET `colore` = '#ffef99' WHERE `in_statiintervento`.`descrizione` = 'Da programmare' AND `colore` = '#2deded';
|
||||||
UPDATE `in_statiintervento` SET `colore` = '#98fb98' WHERE `in_statiintervento`.`descrizione` = 'Fatturato';
|
UPDATE `in_statiintervento` SET `colore` = '#98fb98' WHERE `in_statiintervento`.`descrizione` = 'Fatturato' AND `colore` = '#55ff55';
|
||||||
UPDATE `in_statiintervento` SET `colore` = '#d8bfd8' WHERE `in_statiintervento`.`descrizione` = 'Completato';
|
UPDATE `in_statiintervento` SET `colore` = '#d8bfd8' WHERE `in_statiintervento`.`descrizione` = 'Completato' AND `colore` = '#a3ff82';
|
||||||
UPDATE `in_statiintervento` SET `colore` = '#99e6ff' WHERE `in_statiintervento`.`descrizione` = 'Programmato';
|
UPDATE `in_statiintervento` SET `colore` = '#99e6ff' WHERE `in_statiintervento`.`descrizione` = 'Programmato' AND `colore` = '#ffc400';
|
||||||
|
|
||||||
UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = 'IF(`d`.`conteggio`>1, \'red\', co_statidocumento.colore)' WHERE `zz_modules`.`name` = 'Fatture di acquisto' AND `zz_views`.`name` = '_bg_';
|
UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = 'IF(`d`.`conteggio`>1, \'red\', co_statidocumento.colore)' WHERE `zz_modules`.`name` = 'Fatture di acquisto' AND `zz_views`.`name` = '_bg_';
|
||||||
UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = 'IF(`dup`.`numero_esterno` IS NOT NULL, \'red\', co_statidocumento.colore)' WHERE `zz_modules`.`name` = 'Fatture di vendita' AND `zz_views`.`name` = '_bg_';
|
UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = 'IF(`dup`.`numero_esterno` IS NOT NULL, \'red\', co_statidocumento.colore)' WHERE `zz_modules`.`name` = 'Fatture di vendita' AND `zz_views`.`name` = '_bg_';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user