diff --git a/templates/scadenzario/init.php b/templates/scadenzario/init.php index 21b45a1ad..8fbf2706f 100755 --- a/templates/scadenzario/init.php +++ b/templates/scadenzario/init.php @@ -30,13 +30,13 @@ $total = Util\Query::readQuery($module); $module_query = $total['query']; if(!empty(get('date_start'))){ - $module_query = str_replace('1=1', '1=1 AND DATE_FORMAT(`data`, "%Y%m%d") >= "'.date('Ymd', strtotime(get('date_start'))).'"', $module_query); + $module_query = str_replace('1=1', '1=1 AND DATE_FORMAT(`scadenza`, "%Y%m%d") >= "'.date('Ymd', strtotime(get('date_start'))).'"', $module_query); $date_start = get('date_start'); } if(!empty(get('date_end'))){ - $module_query = str_replace('1=1', '1=1 AND DATE_FORMAT(`data`, "%Y%m%d") <= "'.date('Ymd', strtotime(get('date_end'))).'"', $module_query); + $module_query = str_replace('1=1', '1=1 AND DATE_FORMAT(`scadenza`, "%Y%m%d") <= "'.date('Ymd', strtotime(get('date_end'))).'"', $module_query); $date_end = get('date_end'); } diff --git a/templates/scadenzario/piece.php b/templates/scadenzario/piece.php index 01fe07129..aaf492eb6 100755 --- a/templates/scadenzario/piece.php +++ b/templates/scadenzario/piece.php @@ -22,8 +22,7 @@ include_once __DIR__.'/../../core.php'; echo ' - '.$record['Rif. Fattura'].'
- '.Translator::dateToLocale($record['Data emissione']).' + '.(!empty($record['Rif. Fattura']) ? $record['Rif. Fattura'].'
'.Translator::dateToLocale($record['Data emissione']).'' : $record['Descrizione scadenza']).' '.$record['Anagrafica'].' '.$record['Tipo di pagamento'].' diff --git a/templates/scadenzario/top.php b/templates/scadenzario/top.php index b9f6dc1c3..f8f05ee03 100755 --- a/templates/scadenzario/top.php +++ b/templates/scadenzario/top.php @@ -19,6 +19,23 @@ include_once __DIR__.'/../../core.php'; + +$text = []; + +if(get('is_pagata')=='true'){ + $text[] = "Scadenze pagate"; +} +if(get('is_riba')=='true'){ + $text[] = "Ri.Ba"; +} +if(get('is_cliente')=='true'){ + $text[] = "Solo scadenze clienti"; +} +if(get('is_fornitore')=='true'){ + $text[] = "Solo scadenze fornitori"; +} + + if (isset($id_record)) { echo '

'.tr('Scadenza _ANAG_', [ @@ -30,7 +47,14 @@ if (isset($id_record)) { '_START_' => Translator::dateToLocale($date_start), '_END_' => Translator::dateToLocale($date_end), ], ['upper' => true]).' -

'; + +

+ '.tr("_TEXT_", + [ + "_TEXT_" => (!empty($text) ? 'Include: '.implode(', ', $text) : ''), + ]).' +

'; + }else{ echo '

'.tr('Scadenze').'