Fix #610
This commit is contained in:
parent
8839e00653
commit
6238bc5f94
|
@ -17,13 +17,20 @@ class InvoiceHook extends HookManager
|
||||||
public function response($results)
|
public function response($results)
|
||||||
{
|
{
|
||||||
$count = count($results);
|
$count = count($results);
|
||||||
|
$notify = false;
|
||||||
|
|
||||||
$module = Modules::get('Fatture di acquisto');
|
$module = Modules::get('Fatture di acquisto');
|
||||||
$plugin = $module->plugins->first(function ($value, $key) {
|
$plugins = $module->plugins;
|
||||||
|
|
||||||
|
if (!empty($plugins)) {
|
||||||
|
$notify = !empty($count);
|
||||||
|
|
||||||
|
$plugin = $plugins->first(function ($value, $key) {
|
||||||
return $value->name == 'Fatturazione Elettronica';
|
return $value->name == 'Fatturazione Elettronica';
|
||||||
});
|
});
|
||||||
|
|
||||||
$link = ROOTDIR.'/controller.php?id_module='.$module->id.'#tab_'.$plugin->id;
|
$link = ROOTDIR.'/controller.php?id_module='.$module->id.'#tab_'.$plugin->id;
|
||||||
|
}
|
||||||
|
|
||||||
$message = tr('Ci sono _NUM_ fatture passive da importare', [
|
$message = tr('Ci sono _NUM_ fatture passive da importare', [
|
||||||
'_NUM_' => $count,
|
'_NUM_' => $count,
|
||||||
|
@ -33,7 +40,7 @@ class InvoiceHook extends HookManager
|
||||||
'icon' => 'fa fa-file-text-o text-yellow',
|
'icon' => 'fa fa-file-text-o text-yellow',
|
||||||
'link' => $link,
|
'link' => $link,
|
||||||
'message' => $message,
|
'message' => $message,
|
||||||
'notify' => !empty($count),
|
'notify' => $notify,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,13 +17,20 @@ class ReceiptHook extends HookManager
|
||||||
public function response($results)
|
public function response($results)
|
||||||
{
|
{
|
||||||
$count = count($results);
|
$count = count($results);
|
||||||
|
$notify = false;
|
||||||
|
|
||||||
$module = Modules::get('Fatture di vendita');
|
$module = Modules::get('Fatture di vendita');
|
||||||
$plugin = $module->plugins->first(function ($value, $key) {
|
$plugins = $module->plugins;
|
||||||
|
|
||||||
|
if (!empty($plugins)) {
|
||||||
|
$notify = !empty($count);
|
||||||
|
|
||||||
|
$plugin = $plugins->first(function ($value, $key) {
|
||||||
return $value->name == 'Ricevute FE';
|
return $value->name == 'Ricevute FE';
|
||||||
});
|
});
|
||||||
|
|
||||||
$link = ROOTDIR.'/controller.php?id_module='.$module->id.'#tab_'.$plugin->id;
|
$link = ROOTDIR.'/controller.php?id_module='.$module->id.'#tab_'.$plugin->id;
|
||||||
|
}
|
||||||
|
|
||||||
$message = tr('Ci sono _NUM_ ricevute da importare', [
|
$message = tr('Ci sono _NUM_ ricevute da importare', [
|
||||||
'_NUM_' => $count,
|
'_NUM_' => $count,
|
||||||
|
@ -33,7 +40,7 @@ class ReceiptHook extends HookManager
|
||||||
'icon' => 'fa fa-ticket text-yellow',
|
'icon' => 'fa fa-ticket text-yellow',
|
||||||
'link' => $link,
|
'link' => $link,
|
||||||
'message' => $message,
|
'message' => $message,
|
||||||
'notify' => !empty($count),
|
'notify' => $notify,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue