Visualizzo il log delle operazioni di invio email

This commit is contained in:
Luca 2018-07-10 16:01:28 +02:00
parent 1aab190794
commit 1e5c050314
3 changed files with 29 additions and 8 deletions

View File

@ -398,6 +398,28 @@ if (!empty($note_accredito)) {
</div>';
}
?>
<?php
//Visualizzo il log delle operazioni di invio email
$rs_operations = $dbo->fetchArray('SELECT DATE_FORMAT(created_at,"%d/%m/%Y") AS data , DATE_FORMAT(created_at,"%H:%i") AS ora, (SELECT name FROM zz_emails WHERE id = id_email) AS tipo_email, (SELECT username FROM zz_users WHERE id = id_utente) AS user FROM zz_operations WHERE id_record = '.prepare($id_record).' AND op = "send-email" ORDER BY created_at DESC');
//Se la mail è stata inviata, mostro la data
if( count($rs_operations)>0 ){
foreach ($rs_operations as $operation){
echo "
<span class='label label-success pull-right'>".tr('_TIPO_ inviata il _DATA_ alle _ORA_ da _USER_.', [
'_TIPO_' => $operation['tipo_email'],
'_DATA_' => $operation['data'],
'_ORA_' => $operation['ora'],
'_USER_' => $operation['user'],
]).'</span><br>';
}
}else{
echo "<span class='label label-warning pull-right'>".tr("nessuna email inviata al cliente.")."</span>\n";
}
?>
<a class="btn btn-danger ask" data-backto="record-list">
<i class="fa fa-trash"></i> <?php echo tr('Elimina'); ?>

View File

@ -16,9 +16,9 @@ echo '
<th>'.tr('Descrizione').'</th>
<th width="120">'.tr('Q.').'</th>
<th width="80">'.tr('U.m.').'</th>
<th width="120">'.tr('Costo unitario').'</th>
<th width="120">'.tr('Prezzo unitario').'</th>
<th width="120">'.tr('Iva').'</th>
<th width="120">'.tr('Imponibile').'</th>
<th width="120">'.tr('Importo').'</th>
<th width="60"></th>
</tr>
</thead>
@ -143,7 +143,7 @@ if (!empty($rs)) {
echo '
</td>';
// Costo unitario
// Prezzo unitario
echo '
<td class="text-right">';
@ -170,14 +170,13 @@ if (!empty($rs)) {
if (empty($r['is_descrizione'])) {
echo '
'.Translator::numberToLocale($r['iva']).' &euro;
<br><small class="help-block">'.$r['desc_iva'].'</small>
<small>'.$r['iva'].'</small>';
<br><small class="help-block">'.$r['desc_iva'].'</small>';
}
echo '
</td>';
// Imponibile
// Importo
echo '
<td class="text-right">';
if (empty($r['is_descrizione'])) {

View File

@ -162,11 +162,11 @@ foreach ($righe as $r) {
'.(empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'] - $r['sconto'])).' &euro;';
if ($r['sconto'] > 0) {
echo "
/*echo "
<br><small class='text-muted'>".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto']),
'_TYPE_' => '&euro;',
]).'</small>';
]).'</small>';*/
if ($count <= 1) {
$count += 0.4;