Patch level :10.0 4.0 868

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :modifiche per sistemare il problema indetraibilita' (fase 1)


git-svn-id: svn://10.65.10.50/trunk@16053 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2008-01-29 16:28:49 +00:00
parent 56f99c8481
commit e9ba5e7179
4 changed files with 55 additions and 47 deletions

View File

@ -176,11 +176,12 @@ Col(12)=FR_PERCPROV
Col(13)=FR_IMPFISUN Col(13)=FR_IMPFISUN
Col(14)=FR_IMPFISSO Col(14)=FR_IMPFISSO
Col(15)=FR_CODIVA Col(15)=FR_CODIVA
Col(16)=FR_ADDIVA Col(16)=FR_TIPODET
Col(17)=FR_CAUS Col(17)=FR_ADDIVA
Col(18)=FR_CODMAGC Col(18)=FR_CAUS
Col(19)=FR_CODDEPC Col(19)=FR_CODMAGC
Col(20)=FR_TIPORIGA Col(20)=FR_CODDEPC
Col(21)=FR_TIPORIGA
[RIGHE] [RIGHE]

View File

@ -136,11 +136,12 @@ Col(12) = FR_PERCPROV
Col(13) = FR_IMPFISUN Col(13) = FR_IMPFISUN
Col(14) = FR_IMPFISSO Col(14) = FR_IMPFISSO
Col(15) = FR_CODIVA Col(15) = FR_CODIVA
Col(16) = FR_ADDIVA Col(16) = FR_TIPODET
Col(17) = FR_CAUS Col(17) = FR_ADDIVA
Col(18) = FR_CODMAGC Col(18) = FR_CAUS
Col(19) = FR_CODDEPC Col(19) = FR_CODMAGC
Col(20)=FR_TIPORIGA Col(20) = FR_CODDEPC
Col(21)=FR_TIPORIGA
[RIGHE] [RIGHE]

View File

@ -176,13 +176,14 @@ Col(15) = FR_PERCPROV
Col(16) = FR_IMPFISUN Col(16) = FR_IMPFISUN
Col(17) = FR_IMPFISSO Col(17) = FR_IMPFISSO
Col(18) = FR_CODIVA Col(18) = FR_CODIVA
Col(19) = FR_ADDIVA Col(19) = FR_TIPODET
Col(20) = FR_CAUS Col(20) = FR_ADDIVA
Col(21) = FR_CODMAGC Col(21) = FR_CAUS
Col(22) = FR_CODDEPC Col(22) = FR_CODMAGC
Col(23) = FR_CODCMS Col(23) = FR_CODDEPC
Col(24) = FR_FASCMS Col(24) = FR_CODCMS
Col(25) = FR_TIPORIGA Col(25) = FR_FASCMS
Col(26) = FR_TIPORIGA
[DEFAULT] [DEFAULT]

View File

@ -941,7 +941,7 @@ void TRiga_documento::autosave(TSheet_field& f)
const int prezzo_id = f.cid2index(FR_PREZZO); const int prezzo_id = f.cid2index(FR_PREZZO);
real prezzo(row.get(prezzo_id)); real prezzo(row.get(prezzo_id));
const TString8 codiva(row.get(f.cid2index(FR_CODIVA))); const TString4 codiva(row.get(f.cid2index(FR_CODIVA)));
if (doc().tipo().calcolo_lordo()) if (doc().tipo().calcolo_lordo())
{ {
put(RDOC_PREZZOL, prezzo); put(RDOC_PREZZOL, prezzo);
@ -992,8 +992,14 @@ void TRiga_documento::autosave(TSheet_field& f)
break; break;
fldref->write(fld.get(), *this); fldref->write(fld.get(), *this);
} }
TString codcms = get(RDOC_CODCMS); //dalla rigadoc
if (m.field(FR_TIPODET).shown()) //solo se attivo il campo di indetraibilita'...
{
const int tipodet = row.get_int( f.cid2index(FR_TIPODET));
put( RDOC_TIPODET, tipodet );
if (tipodet != 9)
{
TString codcms = get(RDOC_CODCMS); //dalla rigadoc
if (codcms.blank()) //se non la trova cerca nella maschera di testata if (codcms.blank()) //se non la trova cerca nella maschera di testata
{ {
TDocumento_mask& doc_mask = (TDocumento_mask&)f.mask(); TDocumento_mask& doc_mask = (TDocumento_mask&)f.mask();
@ -1009,7 +1015,7 @@ void TRiga_documento::autosave(TSheet_field& f)
} }
codcms.rtrim(); codcms.rtrim();
} }
if (codcms.full()) if (codcms.full() && codiva.full())
{ {
const TRectype& rec_cms = cache().get(LF_COMMESSE, codcms); const TRectype& rec_cms = cache().get(LF_COMMESSE, codcms);
const TString& regiva = rec_cms.get(COMMESSE_REGIVA); const TString& regiva = rec_cms.get(COMMESSE_REGIVA);
@ -1017,12 +1023,11 @@ void TRiga_documento::autosave(TSheet_field& f)
if (regiva.full()) if (regiva.full())
{ {
put( RDOC_TIPODET, 9 ); put( RDOC_TIPODET, 9 );
row.add(f.cid2index(FR_TIPODET), 9); row.add(9, f.cid2index(FR_TIPODET));
m.set(FR_TIPODET, 9);
} }
else
put( RDOC_TIPODET, row.get( f.cid2index(FR_TIPODET)) );
} }
} //if(tipodet!=9)
} //if(m.field(...
put( RDOC_CODAGG1, row.get(f.cid2index(FR_CODAGG1)) ); put( RDOC_CODAGG1, row.get(f.cid2index(FR_CODAGG1)) );
put( RDOC_CODAGG2, row.get(f.cid2index(FR_CODAGG2)) ); put( RDOC_CODAGG2, row.get(f.cid2index(FR_CODAGG2)) );