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:
parent
fbbd20b65c
commit
ab2f478921
@ -57,8 +57,8 @@ Item_11 = "Risorse", "ve0 -4 RSS", "F"
|
|||||||
Item_12 = "Attrezzature", "ve0 -4 ATR", "F"
|
Item_12 = "Attrezzature", "ve0 -4 ATR", "F"
|
||||||
Item_13 = "Banche di presentazione", "ef0 -6 BNP", "F"
|
Item_13 = "Banche di presentazione", "ef0 -6 BNP", "F"
|
||||||
Item_14 = "Zone", "ba3 -0 ZON", "F"
|
Item_14 = "Zone", "ba3 -0 ZON", "F"
|
||||||
Item_15 = "Fatture da emettere/ricevere", "ve0 -4 MRE", "F"
|
Item_15 = "Fatture da emettere/ricevere", "ve0 -6 &MRE", "F"
|
||||||
Item_16 = "Conti ricavo dei materiali", "ba3 -0 CMT", "F"
|
Item_16 = "Conti ricavo dei materiali", "ve0 -6 &CMT", "F"
|
||||||
|
|
||||||
[ACQVEN_005]
|
[ACQVEN_005]
|
||||||
Caption = "Tabelle contabili"
|
Caption = "Tabelle contabili"
|
||||||
|
@ -359,15 +359,15 @@ void TMovimentoPN_VE::map_conto_re(TBill& c)
|
|||||||
TString16 key;
|
TString16 key;
|
||||||
|
|
||||||
key.format("%3d%3d%6ld",c.gruppo(), c.conto(), c.sottoconto());
|
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())
|
if (rs->empty())
|
||||||
{
|
{
|
||||||
key.cut(6);
|
key.cut(6);
|
||||||
rs = &cache().get("MRE", key);
|
rs = &cache().get("&MRE", key);
|
||||||
if (rs->empty())
|
if (rs->empty())
|
||||||
{
|
{
|
||||||
key.cut(3);
|
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())
|
if (num.fattura_emettere_ricevere())
|
||||||
{
|
{
|
||||||
key.format("%3d%3d%6ld", c.gruppo(), c.conto(), c.sottoconto());
|
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())
|
if (rs->empty())
|
||||||
{
|
{
|
||||||
key.cut(6);
|
key.cut(6);
|
||||||
rs = &cache().get("MRE", key);
|
rs = &cache().get("&MRE", key);
|
||||||
if (rs->empty())
|
if (rs->empty())
|
||||||
{
|
{
|
||||||
key.cut(3);
|
key.cut(3);
|
||||||
rs = &cache().get("MRE", key);
|
rs = &cache().get("&MRE", key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rs->empty())
|
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_OMAGGI: // righe omaggio come articoli spiaccicato identico (avranno imponibile 0)
|
||||||
case RIGA_MERCE: // righe di merce
|
case RIGA_MERCE: // righe di merce
|
||||||
{
|
{
|
||||||
TTable cmt("CMT");
|
|
||||||
TString16 key;
|
TString16 key;
|
||||||
int err;
|
|
||||||
|
|
||||||
key.format("%03d%03d%06ld", conto.gruppo(), conto.conto(), conto.sottoconto());
|
key.format("%03d%03d%06ld", conto.gruppo(), conto.conto(), conto.sottoconto());
|
||||||
cmt.put("CODTAB", key);
|
const TRectype &t2 = cache().get("&CMT", key);
|
||||||
err = cmt.read();
|
if (t2.empty())
|
||||||
if (err != NOERR)
|
|
||||||
{
|
{
|
||||||
key.format("%03d%03d", conto.gruppo(), conto.conto());
|
key.format("%03d%03d", conto.gruppo(), conto.conto());
|
||||||
cmt.put("CODTAB", key);
|
const TRectype &t1 = cache().get("&CMT", key);
|
||||||
err = cmt.read();
|
if (t1.empty())
|
||||||
if (err != NOERR)
|
|
||||||
{
|
{
|
||||||
key.format("%03d", conto.gruppo());
|
key.format("%03d", conto.gruppo());
|
||||||
cmt.put("CODTAB", key);
|
const TRectype &t = cache().get("&CMT", key);
|
||||||
err = cmt.read();
|
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)
|
else
|
||||||
conto.set(cmt.get_int("I0"), cmt.get_int("I1"), cmt.get_int("I2"));
|
conto.set(t2.get_int("I0"), t2.get_int("I1"), t2.get_int("I2"));
|
||||||
}
|
}
|
||||||
break; // case 'M'
|
break; // case 'M'
|
||||||
default :
|
default :
|
||||||
|
@ -16,7 +16,7 @@ NUMBER F_CODRIC 3
|
|||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 1 "Conto ricavi "
|
PROMPT 2 1 "Conto ricavi "
|
||||||
FIELD CODTAB[1,3]
|
FIELD CODTAB[1,3]
|
||||||
USE CMT KEY 2
|
USE &CMT
|
||||||
FLAGS "Z"
|
FLAGS "Z"
|
||||||
INPUT CODTAB[1,3] F_CODRIC
|
INPUT CODTAB[1,3] F_CODRIC
|
||||||
INPUT CODTAB[4,6] F_CODRIC1
|
INPUT CODTAB[4,6] F_CODRIC1
|
||||||
@ -78,7 +78,7 @@ BEGIN
|
|||||||
PROMPT 2 3 "Descrizione "
|
PROMPT 2 3 "Descrizione "
|
||||||
FIELD S0
|
FIELD S0
|
||||||
KEY 2
|
KEY 2
|
||||||
USE CMT KEY 2
|
USE &CMT KEY 2
|
||||||
INPUT S0 F_DESCR
|
INPUT S0 F_DESCR
|
||||||
DISPLAY "Descrizione@50" S0
|
DISPLAY "Descrizione@50" S0
|
||||||
DISPLAY "Gruppo" CODTAB[1,3]
|
DISPLAY "Gruppo" CODTAB[1,3]
|
||||||
|
@ -18,7 +18,7 @@ STRING F_GRUPPO 3
|
|||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 3 "Conto origine "
|
PROMPT 2 3 "Conto origine "
|
||||||
FIELD CODTAB[1,3]
|
FIELD CODTAB[1,3]
|
||||||
USE MRE
|
USE &MRE
|
||||||
JOIN LF_PCON INTO GRUPPO==CODTAB[1,3] CONTO==CODTAB[4,6] SOTTOCONTO==CODTAB[7,12]
|
JOIN LF_PCON INTO GRUPPO==CODTAB[1,3] CONTO==CODTAB[4,6] SOTTOCONTO==CODTAB[7,12]
|
||||||
INPUT CODTAB[1,3] F_GRUPPO
|
INPUT CODTAB[1,3] F_GRUPPO
|
||||||
INPUT CODTAB[4,6] F_CONTO
|
INPUT CODTAB[4,6] F_CONTO
|
||||||
|
Loading…
x
Reference in New Issue
Block a user