diff --git a/ve/velib02.cpp b/ve/velib02.cpp index bc216895f..62787fe03 100755 --- a/ve/velib02.cpp +++ b/ve/velib02.cpp @@ -375,13 +375,15 @@ void TRiga_documento::cost2revenue() if (is_attrezzatura() || is_risorsa()) { const TSpesa_prest & s = spesa(); - const TString4 tipo(s.tipo()); const TString codice(s.revenue()); - if (tipo.not_empty()) - put(RDOC_TIPORIGA, tipo); if (codice.not_empty()) + { + const TString4 tipo(s.tipo()); + if (tipo.not_empty()) + put(RDOC_TIPORIGA, tipo); put(RDOC_TIPORIGA, codice); + } } }