Aggiornamento PiuChebuono: lista Totali del Produttore.
This commit is contained in:
@@ -604,8 +604,11 @@ async function extractArrayDataFromCSV(idapp, rec) {
|
||||
arrcampi_product = getValoriAndIndice_Product(null);
|
||||
|
||||
for (const campoobj of arrcampi_productInfo) {
|
||||
if (rec.hasOwnProperty(campoobj.name)) {
|
||||
let myval = tools.ripulisciCampo(rec[campoobj.name]);
|
||||
|
||||
// TODO: controlla che il campo rec[campoobj.name] esista anche se minuscolo/maiuscolo
|
||||
const mykey = Object.keys(rec).find(key => key.toLowerCase() === campoobj.name.toLowerCase());
|
||||
if (mykey) {
|
||||
let myval = tools.ripulisciCampo(rec[mykey]);
|
||||
productInfo[campoobj.name] = (myval === 'TRUE' || myval.toUpperCase() === 'SI') ? true : ((myval === 'FALSE' || myval.toUpperCase() === 'NO') ? false : myval);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user