mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-01-24 12:51:05 +01:00
Fix #1183
This commit is contained in:
parent
36c537f90c
commit
a0aab2d0e2
@ -30,13 +30,13 @@ $total = Util\Query::readQuery($module);
|
|||||||
$module_query = $total['query'];
|
$module_query = $total['query'];
|
||||||
|
|
||||||
if(!empty(get('date_start'))){
|
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');
|
$date_start = get('date_start');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty(get('date_end'))){
|
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');
|
$date_end = get('date_end');
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,7 @@ include_once __DIR__.'/../../core.php';
|
|||||||
echo '
|
echo '
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
'.$record['Rif. Fattura'].'<br>
|
'.(!empty($record['Rif. Fattura']) ? $record['Rif. Fattura'].'<br><small>'.Translator::dateToLocale($record['Data emissione']).'</small>' : $record['Descrizione scadenza']).'
|
||||||
<small>'.Translator::dateToLocale($record['Data emissione']).'</small>
|
|
||||||
</td>
|
</td>
|
||||||
<td>'.$record['Anagrafica'].'</td>
|
<td>'.$record['Anagrafica'].'</td>
|
||||||
<td>'.$record['Tipo di pagamento'].'</td>
|
<td>'.$record['Tipo di pagamento'].'</td>
|
||||||
|
@ -19,6 +19,23 @@
|
|||||||
|
|
||||||
include_once __DIR__.'/../../core.php';
|
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)) {
|
if (isset($id_record)) {
|
||||||
echo '
|
echo '
|
||||||
<h4><b>'.tr('Scadenza _ANAG_', [
|
<h4><b>'.tr('Scadenza _ANAG_', [
|
||||||
@ -30,7 +47,14 @@ if (isset($id_record)) {
|
|||||||
'_START_' => Translator::dateToLocale($date_start),
|
'_START_' => Translator::dateToLocale($date_start),
|
||||||
'_END_' => Translator::dateToLocale($date_end),
|
'_END_' => Translator::dateToLocale($date_end),
|
||||||
], ['upper' => true]).'</b>
|
], ['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{
|
}else{
|
||||||
echo '
|
echo '
|
||||||
<h4><b>'.tr('Scadenze').'</b>
|
<h4><b>'.tr('Scadenze').'</b>
|
||||||
|
Loading…
Reference in New Issue
Block a user