Patch level : 10.0 patch ???

Files correlati     : pd0610 pd0610a.msk
Ricompilazione Demo : [ ]
Commento            :
Piccole correzioni


git-svn-id: svn://10.65.10.50/branches/R_10_00@21549 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca83 2011-01-31 16:13:59 +00:00
parent c0753cb00e
commit 33aeede24e
2 changed files with 15 additions and 24 deletions

View File

@ -78,36 +78,26 @@ void TTabmod_caf_msk::registra()
{ {
TModule_table caf("&CAF"); TModule_table caf("&CAF");
TSheet_field& sheet = sfield(F_SHEET); TSheet_field& sheet = sfield(F_SHEET);
const int last_item = sheet.cid2index(S_FORN1)+1;
FOR_EACH_SHEET_ROW(sheet, r, riga) FOR_EACH_SHEET_ROW(sheet, r, riga)
{ {
caf.zero();
TToken_string& row = *(TToken_string*)riga; TToken_string& row = *(TToken_string*)riga;
TString80 codtab; TString80 codtab;
const long codcli = atol(row.get(sheet.cid2index(S_CLIENTE))); codtab << row.get(sheet.cid2index(S_CLIENTE));
codtab.format("%06ld", codcli);
codtab << row.get(sheet.cid2index(S_ARTICOLO)); codtab << row.get(sheet.cid2index(S_ARTICOLO));
const int items = row.items();
if (items < last_item)
{
caf.put("CODTAB", codtab);
caf.remove();
}
else
{
const long forn1 = row.get_long(sheet.cid2index(S_FORN1));
const long forn2 = row.get_long(sheet.cid2index(S_FORN2));
caf.put("CODTAB", codtab); const long forn1 = row.get_long(sheet.cid2index(S_FORN1));
if (forn1 > 0 || forn2 > 0) const long forn2 = row.get_long(sheet.cid2index(S_FORN2));
{ caf.put("CODTAB", codtab);
caf.put("I0", forn1); if (forn1 > 0 || forn2 > 0)
caf.put("I1", forn2); {
caf.rewrite_write(); caf.put("I0", forn1);
} caf.put("I1", forn2);
else caf.rewrite_write();
caf.remove(); }
} else
caf.remove();
} }
riempi_sheet(); riempi_sheet();
} }

View File

@ -29,6 +29,7 @@ BEGIN
DISPLAY "Descrizione@50" RAGSOC DISPLAY "Descrizione@50" RAGSOC
OUTPUT F_CLIENTE CODCF OUTPUT F_CLIENTE CODCF
OUTPUT F_RAGSOC RAGSOC OUTPUT F_RAGSOC RAGSOC
FLAGS "Z"
CHECKTYPE REQUIRED CHECKTYPE REQUIRED
END END
@ -65,7 +66,7 @@ PAGE "Articoli/Fornitori" -1 -1 80 18
NUMBER S_CLIENTE 6 NUMBER S_CLIENTE 6
BEGIN BEGIN
PROMPT 2 2 "" PROMPT 2 2 ""
FLAGS "D" FLAGS "ZD"
END END
STRING S_ARTICOLO 20 STRING S_ARTICOLO 20