1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-16 19:40:44 +01:00

Ottimizzazione controlli su importFE

This commit is contained in:
loviuz 2023-03-13 09:50:17 +01:00
parent 9795886369
commit 31713bbb51

View File

@ -323,10 +323,17 @@ switch (filter('op')) {
break; break;
} }
} }
$dati_ordini[(int)$linea] = [
'numero' => $dato['IdDocumento'], try{
'anno' => ( new Carbon($dato['Data']) )->format('Y'), $dati_ordini[(int)$linea] = [
]; 'numero' => $dato['IdDocumento'],
'anno' => ( new Carbon($dato['Data']) )->format('Y'),
];
} catch (Exception $e) {
$dati_ordini[(int)$linea] = [
'numero' => $dato['IdDocumento'],
];
}
} }
} else { } else {
foreach ($replaces as $replace) { foreach ($replaces as $replace) {
@ -335,10 +342,17 @@ switch (filter('op')) {
break; break;
} }
} }
$dati_ordini[(int)$dato['RiferimentoNumeroLinea']] = [
'numero' => $dato['IdDocumento'], try{
'anno' => ( new Carbon($dato['Data']) )->format('Y'), $dati_ordini[(int)$dato['RiferimentoNumeroLinea']] = [
]; 'numero' => $dato['IdDocumento'],
'anno' => ( new Carbon($dato['Data']) )->format('Y'),
];
} catch (\Exception $e) {
$dati_ordini[(int)$dato['RiferimentoNumeroLinea']] = [
'numero' => $dato['IdDocumento'],
];
}
} }
} }
@ -354,11 +368,15 @@ switch (filter('op')) {
} }
} }
if (!empty($dato['DataDDT'])) { try{
$dati_ddt[(int)$linea] = [ $dati_ddt[(int)$linea] = [
'numero' => $dato['NumeroDDT'], 'numero' => $dato['NumeroDDT'],
'anno' => ( new Carbon($dato['DataDDT']) )->format('Y'), 'anno' => ( new Carbon($dato['DataDDT']) )->format('Y'),
]; ];
} catch (Exception $e) {
$dati_ddt[(int)$linea] = [
'numero' => $dato['NumeroDDT'],
];
} }
} }
} else { } else {
@ -368,12 +386,16 @@ switch (filter('op')) {
break; break;
} }
} }
if (!empty($dato['DataDDT'])) { try{
$dati_ddt[(int)$dato['RiferimentoNumeroLinea']] = [ $dati_ddt[(int)$dato['RiferimentoNumeroLinea']] = [
'numero' => $dato['NumeroDDT'], 'numero' => $dato['NumeroDDT'],
'anno' => ( new Carbon($dato['DataDDT']) )->format('Y'), 'anno' => ( new Carbon($dato['DataDDT']) )->format('Y'),
]; ];
} } catch (Exception $e) {
$dati_ddt[(int)$dato['RiferimentoNumeroLinea']] = [
'numero' => $dato['NumeroDDT'],
];
}
} }
} }