diff --git a/ve/velib02.cpp b/ve/velib02.cpp index d8c6f84b6..f75ca8ce4 100755 --- a/ve/velib02.cpp +++ b/ve/velib02.cpp @@ -1054,9 +1054,11 @@ void TRiga_documento::autosave(TSheet_field& f) if (regiva.full()) { - put( RDOC_TIPODET, 9 ); - row.add(9, f.cid2index(FR_TIPODET)); - m.set(FR_TIPODET, 9); + const TString4 tipod = regiva == "PR" ? rec_cms.get(COMMESSE_INDETR) : "9"; + + put( RDOC_TIPODET, tipod ); + row.add(tipod, f.cid2index(FR_TIPODET)); + m.set(FR_TIPODET, tipod); } } } //if(tipodet!=9)