diff --git a/modules/fatture/ajax/select.php b/modules/fatture/ajax/select.php index 38f96bc7a..da9cf8ec6 100644 --- a/modules/fatture/ajax/select.php +++ b/modules/fatture/ajax/select.php @@ -56,7 +56,7 @@ switch ($resource) { 'uscita' AS dir FROM `dt_ddt` INNER JOIN `dt_righe_ddt` ON `dt_righe_ddt`.`idddt` = `dt_ddt`.`id` - INNER JOIN `dt_statiddt` ON `dt_ddt`.`idstato` = `dt_statiddt`.`id` + INNER JOIN `dt_statiddt` ON `dt_ddt`.`idstatoddt` = `dt_statiddt`.`id` INNER JOIN `dt_tipiddt` ON `dt_ddt`.`idtipoddt` = `dt_tipiddt`.`id` LEFT JOIN `dt_statiddt_lang` ON (`dt_statiddt_lang`.`id_record` = `dt_statiddt`.`id` AND `dt_statiddt_lang`.`id_lang` = ".prepare(Models\Locale::getDefault()->id).') WHERE diff --git a/plugins/importFE/generate.php b/plugins/importFE/generate.php index df30a180f..50f21496c 100755 --- a/plugins/importFE/generate.php +++ b/plugins/importFE/generate.php @@ -158,7 +158,7 @@ echo '
'.tr('Descrizione').' | @@ -54,7 +66,7 @@ echo ' $id_riferimento = get('id_riferimento'); $righe = $documento->getRighe(); foreach ($righe as $riga) { - $qta_rimanente = $riga->qta_rimanente - $righe_utilizzate[$riga->id]; + $qta_rimanente = $riga->qta_rimanente - (float)$righe_utilizzate[$riga->id]; $riga_origine = $riga->getOriginalComponent(); if (!empty($riga->idarticolo)) { @@ -73,7 +85,7 @@ foreach ($righe as $riga) { 'id_articolo' => $riga->idarticolo, 'desc_articolo' => str_replace(' ', '_', $riga->articolo->codice.' - '.$riga->articolo->getTranslation('title')), 'id_conto' => $riga->articolo->idconto_acquisto, - 'desc_conto' => str_replace(' ', '_', $desc_conto), + 'desc_conto' => $desc_conto ? str_replace(' ', '_', $desc_conto) : null, ]; echo '
---|