Patch level : 10.0

Files correlati     : c2100b.msk cg2100c.msk cg2.exe
Ricompilazione Demo : [ ]
Commento            :
Corretta lettura / scrittura CUP e CIG


git-svn-id: svn://10.65.10.50/branches/R_10_00@21375 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2010-12-28 11:49:22 +00:00
parent a6067cf2cf
commit 87e660e623
6 changed files with 23 additions and 20 deletions

View File

@ -946,10 +946,12 @@ int TPrimanota_application::read(TMask& m)
conto.get(r, true);
riga.add(conto.string(0x3)); // Contropartita 110-114
riga.add(r.get(RMV_CUP), CG_CUP-FIRST_FIELD);// Tipo di riga 115
riga.add(r.get(RMV_CIG), CG_CIG-FIRST_FIELD);// Tipo di riga 117
const char tipo = r.get_char(RMV_ROWTYPE);
riga.add(tipo, CG_ROWTYPE-FIRST_FIELD); // Tipo di riga 115
riga.add(r.get(RMV_CUP), cgs().cid2index(CG_CUP));
riga.add(r.get(RMV_CIG), cgs().cid2index(CG_CIG));
riga.add(tipo, CG_ROWTYPE-FIRST_FIELD); // Tipo di riga 119
disable_cgs_cells(i, tipo);
cgs().check_row(i);
}
@ -1006,7 +1008,7 @@ int TPrimanota_application::read(TMask& m)
"assegnato il segno dell'imponibile"));
imposta = -imposta;
}
riga.add(imposta.string()); // Imposta 104
riga.add(imposta.string()); // Imposta 104
TBill c; c.get(r);
c.add_to(riga, 4, 0x7); // Conto 105-110
@ -1096,10 +1098,11 @@ void TPrimanota_application::mask2rel(const TMask& m)
r.put(RMV_GRUPPOC, row.get());
r.put(RMV_CONTOC, row.get());
r.put(RMV_SOTTOCONTOC, row.get());
row.get(); // Descrizione contropartita
r.put(RMV_CUP, row.get(CG_CUP-FIRST_FIELD)); // CUP
r.put(RMV_CIG, row.get(CG_CIG-FIRST_FIELD)); // CIG
r.put(RMV_ROWTYPE, row.get(CG_ROWTYPE-FIRST_FIELD)); // Tipo riga
r.put(RMV_CUP, row.get()); // CUP
r.put(RMV_CIG, row.get()); // CIG
}
}
@ -1481,7 +1484,7 @@ void TPrimanota_application::genera_automatico(int tipo, const char* causimm)
bool TPrimanota_application::is_percipient(long forn, char& tipper, long& codper) const
{
TString16 key; key.format("F|%ld", forn);
TString8 key; key.format("F|%ld", forn);
const TRectype& fornitore = cache().get(LF_CLIFO, key);
tipper = fornitore.get_char(CLI_TIPOAPER);
codper = fornitore.get_long(CLI_CODANAGPER);

View File

@ -81,11 +81,11 @@
#define CG_CONTO 105
#define CG_SOTTOCONTO 106
#define CG_DESCR 109
#define CG_ROWTYPE 115
#define CG_CUP 116
#define CG_DCUP 117
#define CG_CIG 118
#define CG_DCIG 119
#define CG_CUP 115
#define CG_DCUP 116
#define CG_CIG 117
#define CG_DCIG 118
#define CG_ROWTYPE 119
#define CG_MASTRINO 195
#define CG_RATEO 196
#define CG_RISCONTO 197

View File

@ -386,11 +386,11 @@ BEGIN
ITEM "Co./c@3"
ITEM "Sott./c@6"
ITEM "Descrizione contropartita@30"
ITEM "Tipo@4"
ITEM "CUP@15"
ITEM "Descrizione CUP@50"
ITEM "CIG@10"
ITEM "Descrizione CIG@50"
ITEM "Tipo@4"
END
NUMBER F_GRUPPO 3

View File

@ -707,11 +707,11 @@ BEGIN
ITEM "Co./c@3"
ITEM "Sott./c@6"
ITEM "Descrizione contropartita@30"
ITEM "Tipo@4"
ITEM "CUP@15"
ITEM "Descrizione CUP@50"
ITEM "CIG@10"
ITEM "Descrizione CIG@50"
ITEM "Tipo@4"
END
NUMBER F_GRUPPO 3

View File

@ -27,9 +27,9 @@
char TPrimanota_application::row_type(const TToken_string& s)
{
char t = ' ';
if (s.full() && s.items() >= CG_ROWTYPE - 100)
if (s.full())
{
t = s[s.len()-1];
s.get(CG_ROWTYPE%DLG_USER-1, t); // Can't use cgs().cid2index() here!
if (t < 'A' || t > 'Z')
t = ' ';
}

View File

@ -330,7 +330,7 @@ BEGIN
GROUP 64
END
STRING CG_DCUP 50 35
STRING CG_DCUP 50 32
BEGIN
PROMPT 30 12 ""
USE %CUP KEY 2
@ -356,7 +356,7 @@ BEGIN
GROUP 64
END
STRING CG_DCIG 50 35
STRING CG_DCIG 50 32
BEGIN
PROMPT 30 13 ""
USE %CIG KEY 2
@ -369,7 +369,7 @@ END
LIST CG_ROWTYPE 24
BEGIN
PROMPT 28 14 "Tipo riga "
PROMPT 28 15 "Tipo riga "
ITEM " |Sola contabilitŕ"
ITEM "A|Abbuoni attivi"
ITEM "C|Differenza cambi"