Patch level : 10.0 254

Files correlati     : ve0.exe ve6.exe
Ricompilazione Demo : [ ]
Commento            :

Trsformate le tabelle MRE e CMT in tabelle di modulo (ve)


git-svn-id: svn://10.65.10.50/trunk@18451 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2009-03-09 09:52:05 +00:00
parent fbbd20b65c
commit ab2f478921
4 changed files with 22 additions and 23 deletions

View File

@ -57,8 +57,8 @@ Item_11 = "Risorse", "ve0 -4 RSS", "F"
Item_12 = "Attrezzature", "ve0 -4 ATR", "F"
Item_13 = "Banche di presentazione", "ef0 -6 BNP", "F"
Item_14 = "Zone", "ba3 -0 ZON", "F"
Item_15 = "Fatture da emettere/ricevere", "ve0 -4 MRE", "F"
Item_16 = "Conti ricavo dei materiali", "ba3 -0 CMT", "F"
Item_15 = "Fatture da emettere/ricevere", "ve0 -6 &MRE", "F"
Item_16 = "Conti ricavo dei materiali", "ve0 -6 &CMT", "F"
[ACQVEN_005]
Caption = "Tabelle contabili"

View File

@ -359,15 +359,15 @@ void TMovimentoPN_VE::map_conto_re(TBill& c)
TString16 key;
key.format("%3d%3d%6ld",c.gruppo(), c.conto(), c.sottoconto());
const TRectype* rs = &cache().get("MRE", key);
const TRectype* rs = &cache().get("&MRE", key);
if (rs->empty())
{
key.cut(6);
rs = &cache().get("MRE", key);
rs = &cache().get("&MRE", key);
if (rs->empty())
{
key.cut(3);
rs = &cache().get("MRE", key);
rs = &cache().get("&MRE", key);
}
}
@ -599,15 +599,15 @@ error_type TIVA_array::add(const TRiga_documento& r, const TBill& conto, const i
if (num.fattura_emettere_ricevere())
{
key.format("%3d%3d%6ld", c.gruppo(), c.conto(), c.sottoconto());
const TRectype* rs = &cache().get("MRE", key);
const TRectype* rs = &cache().get("&MRE", key);
if (rs->empty())
{
key.cut(6);
rs = &cache().get("MRE", key);
rs = &cache().get("&MRE", key);
if (rs->empty())
{
key.cut(3);
rs = &cache().get("MRE", key);
rs = &cache().get("&MRE", key);
}
}
if (rs->empty())
@ -1793,27 +1793,26 @@ error_type TContabilizzazione::search_costo_ricavo_mat(TBill& conto, const TRiga
case RIGA_OMAGGI: // righe omaggio come articoli spiaccicato identico (avranno imponibile 0)
case RIGA_MERCE: // righe di merce
{
TTable cmt("CMT");
TString16 key;
int err;
key.format("%03d%03d%06ld", conto.gruppo(), conto.conto(), conto.sottoconto());
cmt.put("CODTAB", key);
err = cmt.read();
if (err != NOERR)
const TRectype &t2 = cache().get("&CMT", key);
if (t2.empty())
{
key.format("%03d%03d", conto.gruppo(), conto.conto());
cmt.put("CODTAB", key);
err = cmt.read();
if (err != NOERR)
const TRectype &t1 = cache().get("&CMT", key);
if (t1.empty())
{
key.format("%03d", conto.gruppo());
cmt.put("CODTAB", key);
err = cmt.read();
const TRectype &t = cache().get("&CMT", key);
if (!t.empty())
conto.set(t.get_int("I0"), t.get_int("I1"), t.get_int("I2"));
}
else
conto.set(t1.get_int("I0"), t1.get_int("I1"), t1.get_int("I2"));
}
if (err == NOERR)
conto.set(cmt.get_int("I0"), cmt.get_int("I1"), cmt.get_int("I2"));
else
conto.set(t2.get_int("I0"), t2.get_int("I1"), t2.get_int("I2"));
}
break; // case 'M'
default :

View File

@ -16,7 +16,7 @@ NUMBER F_CODRIC 3
BEGIN
PROMPT 2 1 "Conto ricavi "
FIELD CODTAB[1,3]
USE CMT KEY 2
USE &CMT
FLAGS "Z"
INPUT CODTAB[1,3] F_CODRIC
INPUT CODTAB[4,6] F_CODRIC1
@ -78,7 +78,7 @@ BEGIN
PROMPT 2 3 "Descrizione "
FIELD S0
KEY 2
USE CMT KEY 2
USE &CMT KEY 2
INPUT S0 F_DESCR
DISPLAY "Descrizione@50" S0
DISPLAY "Gruppo" CODTAB[1,3]

View File

@ -18,7 +18,7 @@ STRING F_GRUPPO 3
BEGIN
PROMPT 2 3 "Conto origine "
FIELD CODTAB[1,3]
USE MRE
USE &MRE
JOIN LF_PCON INTO GRUPPO==CODTAB[1,3] CONTO==CODTAB[4,6] SOTTOCONTO==CODTAB[7,12]
INPUT CODTAB[1,3] F_GRUPPO
INPUT CODTAB[4,6] F_CONTO