1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-08 22:01:25 +01:00
This commit is contained in:
Pek5892 2023-02-09 18:14:17 +01:00
parent 36c537f90c
commit a0aab2d0e2
3 changed files with 28 additions and 5 deletions

View File

@ -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');
}

View File

@ -22,8 +22,7 @@ include_once __DIR__.'/../../core.php';
echo '
<tr>
<td>
'.$record['Rif. Fattura'].'<br>
<small>'.Translator::dateToLocale($record['Data emissione']).'</small>
'.(!empty($record['Rif. Fattura']) ? $record['Rif. Fattura'].'<br><small>'.Translator::dateToLocale($record['Data emissione']).'</small>' : $record['Descrizione scadenza']).'
</td>
<td>'.$record['Anagrafica'].'</td>
<td>'.$record['Tipo di pagamento'].'</td>

View File

@ -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 '
<h4><b>'.tr('Scadenza _ANAG_', [
@ -30,7 +47,14 @@ if (isset($id_record)) {
'_START_' => Translator::dateToLocale($date_start),
'_END_' => Translator::dateToLocale($date_end),
], ['upper' => true]).'</b>
</h4>';
</h4>
<p style="color:#aaa; font-size:10px;" class="text-right">
'.tr("_TEXT_",
[
"_TEXT_" => (!empty($text) ? 'Include: '.implode(', ', $text) : ''),
]).'
</p>';
}else{
echo '
<h4><b>'.tr('Scadenze').'</b>