diff --git a/src/bs/bs0300.cpp b/src/bs/bs0300.cpp index 1765e351f..75469abd0 100644 --- a/src/bs/bs0300.cpp +++ b/src/bs/bs0300.cpp @@ -1319,7 +1319,7 @@ void TSknet_sync::sync_doc() static TDocumento existDoc; if (existDoc.read('D', datadoc.year(), numdoc, nd) == NOERR) // Ha uno stato che considero bloccato { - if (existDoc.stato() <= '3')// && docs.get("DOCANNULLATO").as_int() == 1) + if (existDoc.stato() < '3')// && docs.get("DOCANNULLATO").as_int() == 1) { existDoc.remove(); } @@ -1467,9 +1467,7 @@ void TSknet_sync::sync_doc() TString codiva = docs.get("CodIva").as_string(); if (codiva.blank() || codiva == "0") { - codiva = cache().get(LF_ANAMAG, codart, "CODIVA"); - if (codiva.blank()) - codiva = ini_get_string(CONFIG_DITTA, "BS", "SKCodIvaDef"); + codiva = ini_get_string(CONFIG_DITTA, "BS", "SKCodIvaDef"); } else {