mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-16 19:40:44 +01:00
Rimozione errore in caso di importazione FE per nuova anagrafica
This commit is contained in:
parent
1e1bc85290
commit
ed5a3d4618
@ -192,6 +192,7 @@ switch (filter('op')) {
|
||||
break;
|
||||
|
||||
case 'compile':
|
||||
// Gestione del caso di anagrafica inesistente
|
||||
if (empty($anagrafica)) {
|
||||
echo json_encode([]);
|
||||
|
||||
@ -211,6 +212,13 @@ switch (filter('op')) {
|
||||
}
|
||||
$righe = $righe->flatten();
|
||||
|
||||
// Gestione del caso di anagrafica senza fatture o con fatture senza righe
|
||||
if ($fatture->isEmpty() || $righe->isEmpty()) {
|
||||
echo json_encode([]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Ricerca del tipo di documento più utilizzato
|
||||
$tipi = $fatture->groupBy(function ($item, $key) {
|
||||
return $item->tipo->id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user