Patch level : 10.0 276
Files correlati : mg3.exe mg4.exe Ricompilazione Demo : [ ] Commento : Bug : 0001188 segnalato per cliente sailog: la selezione di un articolo es. 1104 (loro base dati), e se richiesto il calcolo dell'inventario alla data, erroneamente il programma calcola anche i movimenti relativi agli articoli con la stessa radice (es. 1104006 e 1104007). l'errore si verifica sia sulla stampa dell'inventario che sulla stampa schede. git-svn-id: svn://10.65.10.50/trunk@18634 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
e587f7c1ec
commit
ed0fcab8f7
@ -1355,21 +1355,24 @@ HIDDEN void matildator(const TRectype& oldrec, int key, bool tilde, TString& str
|
|||||||
const RecDes& recd = oldrec.rec_des(); // Descrizione del record della testata
|
const RecDes& recd = oldrec.rec_des(); // Descrizione del record della testata
|
||||||
const KeyDes& kd = recd.Ky[key-1]; // Elenco dei campi della chiave
|
const KeyDes& kd = recd.Ky[key-1]; // Elenco dei campi della chiave
|
||||||
const int len = str.len();
|
const int len = str.len();
|
||||||
for (int i = kd.NkFields-1; i >= 0; i--)
|
const int nfields = kd.NkFields;
|
||||||
{
|
int foc = 0;
|
||||||
const int foc = kd.FromCh[i];
|
for (int i = 0; i < nfields; i++)
|
||||||
const int toc = kd.ToCh[i];
|
|
||||||
if ((foc < len && str[foc] > ' ') || (toc < len && str[toc] > ' '))
|
|
||||||
{
|
{
|
||||||
const int nf = kd.FieldSeq[i] % MaxFields;
|
const int nf = kd.FieldSeq[i] % MaxFields;
|
||||||
const RecFieldDes& rf = recd.Fd[nf];
|
const RecFieldDes& rf = recd.Fd[nf];
|
||||||
if (rf.TypeF == _alfafld)
|
const int toc = foc + kd.FromCh[i] == 255 ? rf.Len : (kd.ToCh[i] - kd.FromCh[i] + 1);
|
||||||
str.left_just(toc, '~');
|
|
||||||
|
if (toc >= len)
|
||||||
|
{
|
||||||
|
if (str[foc] > ' ' && rf.TypeF == _alfafld)
|
||||||
|
str.left_just(toc, ' ');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
foc = toc + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
str.replace('~', ' ');
|
str.replace('~', ' '); // non togliere posson arivare record con gia' le tildi
|
||||||
}
|
}
|
||||||
|
|
||||||
// @doc EXTERNAL
|
// @doc EXTERNAL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user