Merge branch 'R_10_00' of http://10.65.20.33/sirio/CAMPO/campo into R_10_00

This commit is contained in:
Simone Palacino 2020-02-12 16:59:01 +01:00
commit 9befbbaeae
21 changed files with 319 additions and 117 deletions

8
cd/test/ba0940.txt Normal file
View File

@ -0,0 +1,8 @@
bastiva.rep
Attivati acconto e interessi con ricalcolo nei trimestrali.
Aggiunta 13 nei trimestrali e sistemata la visualizzazione dei trimestrali.
Corrette diciture pro rata a da C1 C2 C3 C1a in B1 B2 B3 B4
Aggiornata stampa tabella IVA
Calcolato il pro rata mensile sempre
Detratti gli i beni ammortizzabili esenti venduti nel calcolo pro rata con numeratore e denominatore (da verificare)

31
cd/test/ba0940a.ini Normal file
View File

@ -0,0 +1,31 @@
[Main]
Demo=0
[ba0]
File(54) = bastiva.rep|X
Patch = 0940
Versione = 21511200
[ba99]
Kill(0) = batbsce.txt|x
Kill(1) = wxmsw240.dll|x
Kill(2) = bastcms.rep|x
Kill(3) = bastcms.msk|x
Kill(4) = bastfsc.msk|x
Kill(5) = bastfsc.rep|x
Kill(6) = bastuue.msk|x
Kill(7) = bastuue.rep|x
[ba]
Data = 12-02-2020
Descrizione = Base
Dischi = 1
Moduli = sy
OEM =
Patch = 940
PostProcess = bainst -0 BA
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/ba0940a1.zip Normal file

Binary file not shown.

View File

@ -3,5 +3,7 @@ cg5500c.msk
cg5500b.msk
Attivati acconto e interessi con ricalcolo nei trimestrali.
Aggiunta 13 nei trimestrali e sistemata la visualizzazione dei trimestrali.
Corrette diciture pro rata a da C1 C2 C3 C1a in B1 B2 B3 B4
Calcolato il pro rata mensile sempre
Detratti gli i beni ammortizzabili esenti venduti nel calcolo pro rata con numeratore e denominatore (da verificare)

View File

@ -9,80 +9,80 @@ Patch = 938
Versione = 21511200
[cg99]
Kill(0) = batbzon.msk|x
Kill(1) = bastdpn.rep|x
Kill(2) = batbinl.msk|x
Kill(3) = bastzon.msk|x
Kill(4) = bastcve.rep|x
Kill(5) = bastntb.rep|x
Kill(6) = bastpdb.rep|x
Kill(7) = bastnot.msk|x
Kill(8) = batbarb.msk|x
Kill(9) = batbnot.msk|x
Kill(10) = batbcve.msk|x
Kill(11) = cg2fppro.msk|x
Kill(12) = bastmsp.rep|x
Kill(13) = bastcco.msk|x
Kill(14) = batbtra.msk|x
Kill(15) = bastvet.msk|x
Kill(0) = bastnot.rep|x
Kill(1) = batbdel.msk|x
Kill(2) = bastreg.msk|x
Kill(3) = bastleg.msk|x
Kill(4) = batbscc.msk|x
Kill(5) = batbcam.msk|x
Kill(6) = cgtbcon.msk|x
Kill(7) = batbcco.msk|x
Kill(8) = bastcve.msk|x
Kill(9) = batbver.msk|x
Kill(10) = bastvet.msk|x
Kill(11) = bastesc.msk|x
Kill(12) = batbtra.msk|x
Kill(13) = batbind.msk|x
Kill(14) = bastmsp.msk|x
Kill(15) = batbesc.msk|x
Kill(16) = batbleg.msk|x
Kill(17) = bastmsp.msk|x
Kill(18) = bastleg.msk|x
Kill(19) = bastnot.rep|x
Kill(20) = batbind.msk|x
Kill(21) = bastesc.msk|x
Kill(22) = bastpor.msk|x
Kill(23) = batbesc.msk|x
Kill(24) = batbscc.msk|x
Kill(25) = batbdel.msk|x
Kill(26) = bastcve.msk|x
Kill(27) = cgtbcon.msk|x
Kill(28) = batblia.msk|x
Kill(29) = bastarb.rep|x
Kill(30) = batbcam.msk|x
Kill(31) = bastreg.msk|x
Kill(32) = batbver.msk|x
Kill(33) = batbcco.msk|x
Kill(34) = batblbu.msk|x
Kill(35) = bastcam.msk|x
Kill(36) = bastdpn.msk|x
Kill(37) = bastscc.msk|x
Kill(38) = batbcfi.msk|x
Kill(17) = bastpor.msk|x
Kill(18) = cg2fppro.msk|x
Kill(19) = batbcve.msk|x
Kill(20) = bastcco.msk|x
Kill(21) = bastmsp.rep|x
Kill(22) = batbtit.msk|x
Kill(23) = bastcfi.rep|x
Kill(24) = bastivd.rep|x
Kill(25) = bastreg.rep|x
Kill(26) = bastscc.rep|x
Kill(27) = bastzon.rep|x
Kill(28) = bastleg.rep|x
Kill(29) = bastndo.msk|x
Kill(30) = batbivd.msk|x
Kill(31) = bastvet.rep|x
Kill(32) = bastcam.rep|x
Kill(33) = batblia.msk|x
Kill(34) = bastcfi.msk|x
Kill(35) = batbpdb.msk|x
Kill(36) = bastesc.rep|x
Kill(37) = bastpor.rep|x
Kill(38) = batbndo.msk|x
Kill(39) = bastver.rep|x
Kill(40) = batbntb.msk|x
Kill(41) = bastntb.msk|x
Kill(42) = batbreg.msk|x
Kill(43) = bastver.msk|x
Kill(44) = bastndo.rep|x
Kill(45) = batbdpn.msk|x
Kill(46) = batbvet.msk|x
Kill(47) = batbpor.msk|x
Kill(48) = bastcam.rep|x
Kill(49) = bastndo.msk|x
Kill(50) = batbins.msk|x
Kill(51) = batbmsp.msk|x
Kill(52) = bastpdb.msk|x
Kill(53) = bastivd.msk|x
Kill(54) = batblia.msk|x
Kill(55) = batbivd.msk|x
Kill(56) = bastpor.rep|x
Kill(57) = batbpdb.msk|x
Kill(58) = bastivd.rep|x
Kill(59) = batbtit.msk|x
Kill(60) = bastcfi.msk|x
Kill(61) = bastvet.rep|x
Kill(62) = batbndo.msk|x
Kill(63) = bastesc.rep|x
Kill(64) = bastreg.rep|x
Kill(65) = bastcfi.rep|x
Kill(66) = bastleg.rep|x
Kill(67) = bastzon.rep|x
Kill(68) = bastarb.msk|x
Kill(69) = bastcco.rep|x
Kill(70) = bastscc.rep|x
Kill(40) = batbdpn.msk|x
Kill(41) = batbmsp.msk|x
Kill(42) = batbcfi.msk|x
Kill(43) = bastndo.rep|x
Kill(44) = batbins.msk|x
Kill(45) = batbpor.msk|x
Kill(46) = bastivd.msk|x
Kill(47) = batbvet.msk|x
Kill(48) = bastpdb.msk|x
Kill(49) = bastarb.rep|x
Kill(50) = bastcam.msk|x
Kill(51) = bastntb.msk|x
Kill(52) = batblia.msk|x
Kill(53) = batblbu.msk|x
Kill(54) = batbntb.msk|x
Kill(55) = bastscc.msk|x
Kill(56) = bastver.msk|x
Kill(57) = bastdpn.msk|x
Kill(58) = batbreg.msk|x
Kill(59) = bastcco.rep|x
Kill(60) = bastarb.msk|x
Kill(61) = batbnot.msk|x
Kill(62) = batbarb.msk|x
Kill(63) = bastdpn.rep|x
Kill(64) = batbzon.msk|x
Kill(65) = bastntb.rep|x
Kill(66) = bastcve.rep|x
Kill(67) = bastzon.msk|x
Kill(68) = batbinl.msk|x
Kill(69) = bastnot.msk|x
Kill(70) = bastpdb.rep|x
[cg]
Data = 31-01-2020
Data = 10-02-2020
Descrizione = Contabilita' Generale
Dischi = 1
Edit_19 = cg0 -0

Binary file not shown.

11
cd/test/cg0940.txt Normal file
View File

@ -0,0 +1,11 @@
cg2.exe
cg4.exe
Attivati acconto e interessi con ricalcolo nei trimestrali.
Aggiunta 13 nei trimestrali e sistemata la visualizzazione dei trimestrali.
Corrette diciture pro rata a da C1 C2 C3 C1a in B1 B2 B3 B4
Aggiornata stampa tabella IVA
Calcolato il pro rata mensile sempre
Detratti gli i beni ammortizzabili esenti venduti nel calcolo pro rata con numeratore e denominatore (da verificare)
Aggiunti regimi speciali 14 16 17 18 al reverse charge

103
cd/test/cg0940a.ini Normal file
View File

@ -0,0 +1,103 @@
[Main]
Demo=0
[cg2]
File(51) = cg2.exe|X
Patch = 0940
Versione = 21511200
[cg4]
File(85) = cg4.exe|X
Patch = 0940
Versione = 21511200
[cg99]
Kill(0) = bastvet.msk|x
Kill(1) = batbzon.msk|x
Kill(2) = batbnot.msk|x
Kill(3) = bastesc.msk|x
Kill(4) = batbreg.msk|x
Kill(5) = bastscc.msk|x
Kill(6) = bastzon.msk|x
Kill(7) = batbntb.msk|x
Kill(8) = bastpdb.rep|x
Kill(9) = bastpdb.msk|x
Kill(10) = bastcfi.rep|x
Kill(11) = batbtra.msk|x
Kill(12) = bastpor.msk|x
Kill(13) = batbind.msk|x
Kill(14) = batbtit.msk|x
Kill(15) = bastntb.rep|x
Kill(16) = batbleg.msk|x
Kill(17) = bastcco.rep|x
Kill(18) = bastmsp.rep|x
Kill(19) = batbesc.msk|x
Kill(20) = bastcco.msk|x
Kill(21) = bastmsp.msk|x
Kill(22) = bastnot.msk|x
Kill(23) = batbcam.msk|x
Kill(24) = batbcfi.msk|x
Kill(25) = bastnot.rep|x
Kill(26) = cgtbcon.msk|x
Kill(27) = bastleg.msk|x
Kill(28) = batbscc.msk|x
Kill(29) = bastndo.msk|x
Kill(30) = bastpor.rep|x
Kill(31) = batbver.msk|x
Kill(32) = batblia.msk|x
Kill(33) = batbdpn.msk|x
Kill(34) = batbinl.msk|x
Kill(35) = bastesc.rep|x
Kill(36) = batbdel.msk|x
Kill(37) = bastndo.rep|x
Kill(38) = bastcve.msk|x
Kill(39) = bastver.rep|x
Kill(40) = batbvet.msk|x
Kill(41) = batbmsp.msk|x
Kill(42) = batbarb.msk|x
Kill(43) = bastcam.msk|x
Kill(44) = batbpdb.msk|x
Kill(45) = bastivd.msk|x
Kill(46) = bastcfi.msk|x
Kill(47) = batblbu.msk|x
Kill(48) = bastleg.rep|x
Kill(49) = bastarb.rep|x
Kill(50) = bastdpn.msk|x
Kill(51) = bastntb.msk|x
Kill(52) = bastcve.rep|x
Kill(53) = bastarb.msk|x
Kill(54) = batbpor.msk|x
Kill(55) = bastver.msk|x
Kill(56) = batbins.msk|x
Kill(57) = bastdpn.rep|x
Kill(58) = batbndo.msk|x
Kill(59) = batbcco.msk|x
Kill(60) = bastreg.msk|x
Kill(61) = bastcam.rep|x
Kill(62) = bastscc.rep|x
Kill(63) = bastreg.rep|x
Kill(64) = batbcve.msk|x
Kill(65) = batbivd.msk|x
Kill(66) = bastivd.rep|x
Kill(67) = cg2fppro.msk|x
Kill(68) = bastvet.rep|x
Kill(69) = batblia.msk|x
Kill(70) = bastzon.rep|x
[cg]
Data = 12-02-2020
Descrizione = Contabilita' Generale
Dischi = 1
Edit_19 = cg0 -0
Edit_20 = cg0 -1
Edit_26 = cg0 -4
Edit_5 = cg0 -5
Moduli = ba
OEM =
Patch = 940
PostProcess = bainst -0 CG
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/cg0940a1.zip Normal file

Binary file not shown.

3
cd/test/tf0938.txt Normal file
View File

@ -0,0 +1,3 @@
tf0.exe
Corretto calcolo liquidazione IVA, data fine sbagliata se dicembre

19
cd/test/tf0938a.ini Normal file
View File

@ -0,0 +1,19 @@
[Main]
Demo=0
[tf1]
File(0) = tf0.exe|X
Patch = 0938
Versione = 21511200
[tf]
Data = 10-02-2020
Descrizione = Trasferimento fatture
Dischi = 1
Moduli = cg
OEM =
Patch = 938
PostProcess =
PreProcess =
Versione = 21511200

BIN
cd/test/tf0938a1.zip Normal file

Binary file not shown.

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report libraries="bastiva" name="bastiva" orientation="2" lpi="6">
<report name="bastiva" orientation="2" lpi="6" class="bastiva">
<font face="Courier New" size="10" />
<section type="Head" pattern="1">
<field type="Testo" valign="center" align="center" width="96" height="2" pattern="2" text="Tabella Codici IVA">
@ -7,6 +7,12 @@
</field>
<field border="2" x="1" y="2.5" type="Linea" width="133" height="0" pattern="2" />
<field border="2" x="108" y="2.75" type="Linea" height="3.5" pattern="1" />
<field x="109" y="2.75" type="Testo" width="11" pattern="2" text="Riga IVA 11">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="123" y="2.75" type="Testo" width="11" pattern="2" text="Riga prosp.">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="2" y="3.5" type="Testo" width="4" pattern="2" text="Cod.">
<font face="Courier New" bold="1" size="10" />
</field>
@ -22,10 +28,16 @@
<field x="74" y="3.5" type="Testo" width="11" pattern="2" text="Tipo Codice">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="109" y="3.5" type="Testo" width="11" pattern="2" text="Riga IVA 11">
<field x="109" y="3.75" type="Testo" width="4" pattern="2" text="Ven.">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="123" y="3.5" type="Testo" width="11" pattern="2" text="Riga prosp.">
<field x="116" y="3.75" type="Testo" width="4" pattern="2" text="Acq.">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="123" y="3.75" type="Testo" width="4" pattern="2" text="Ven.">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="130" y="3.75" type="Testo" width="4" pattern="2" text="Acq.">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="1" y="4.5" type="Testo" width="11" pattern="2" text="C.IVA vent.">
@ -52,16 +64,13 @@
<field x="103" y="4.5" type="Testo" width="4" pattern="2" text="Sos.">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="109" y="4.5" type="Testo" width="4" pattern="2" text="Ven.">
<field x="109" y="5" type="Testo" width="8" pattern="2" text="Pro Rata">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="116" y="4.5" type="Testo" width="4" pattern="2" text="Acq.">
<field x="123" y="5" type="Testo" width="4" pattern="2" text="Num.">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="123" y="4.5" type="Testo" width="4" pattern="2" text="Ven.">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="130" y="4.5" type="Testo" width="4" pattern="2" text="Acq.">
<field x="129.5" y="5" type="Testo" width="4" pattern="2" text="Den.">
<font face="Courier New" bold="1" size="10" />
</field>
<field border="2" x="1" y="6.5" type="Linea" width="133" height="0" pattern="2" />
@ -95,6 +104,18 @@
</list>
</field>
<field border="2" x="108" type="Linea" height="2.5" pattern="1" />
<field x="109" y="0.25" type="Stringa" width="3" pattern="2">
<source>S2</source>
</field>
<field x="116" y="0.25" type="Stringa" width="3" pattern="2">
<source>S9</source>
</field>
<field x="123" y="0.25" type="Stringa" width="3" pattern="2">
<source>S10</source>
</field>
<field x="130" y="0.25" type="Stringa" width="3" pattern="2">
<source>S11</source>
</field>
<field x="2" y="1" type="Array" width="4" pattern="2">
<source>S6</source>
<list>
@ -147,17 +168,11 @@
<field x="105" y="1" type="Stringa" width="1" pattern="2">
<source>B2</source>
</field>
<field x="109" y="1" type="Stringa" width="3" pattern="2">
<source>S2</source>
<field x="124" y="1.25" type="Stringa" width="1" pattern="2">
<source>B6</source>
</field>
<field x="116" y="1" type="Stringa" width="3" pattern="2">
<source>S9</source>
</field>
<field x="123" y="1" type="Stringa" width="3" pattern="2">
<source>S10</source>
</field>
<field x="130" y="1" type="Stringa" width="3" pattern="2">
<source>S11</source>
<field x="131" y="1.25" type="Stringa" width="1" pattern="2">
<source>B7</source>
</field>
<field border="1" x="1" y="2.5" type="Linea" width="133" height="0" pattern="2" />
</section>

View File

@ -4058,6 +4058,7 @@ bool TPrimanota_application::scollega_handler(TMask_field& f, KEY key)
}
message_box("Il movimento e' stato scollegato dalla fattura elettronica\nin ingresso, precedentemente associata.");
}
return true;
}
bool TPrimanota_application::is_collegato(TMask_field& f)

View File

@ -171,13 +171,13 @@ bool TCausale::datareg_prec() const
bool TCausale::reverse_charge() const
{
const int rsi = regime_speciale();
return rsi == 13 || rsi == 50 || rsi == 51; // Reverse charge!
return rsi >= 13 || rsi <= 18 || rsi == 50 || rsi == 51; // Reverse charge!
}
bool TCausale::reverse_charge_pubb() const
{
const int rsi = regime_speciale();
return rsi == 13 || rsi == 19 || rsi == 50 || rsi == 51; // Reverse charge!
return rsi >= 13 || rsi <= 19 || rsi == 50 || rsi == 51; // Reverse charge!
}
bool TCausale::esclusione_allegati() const

View File

@ -4279,8 +4279,8 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
// calcola nuovo prorata dal 1998 per ogni attivita' (miste: 1+2)
if (_prorata_nd)
{
rsd = _pla->get_real("R20") + num_amm;
rsn = _pla->get_real("R19");
rsd = _pla->get_real("R20");
rsn = _pla->get_real("R19") + num_amm;
}
else
{

View File

@ -1116,8 +1116,8 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
if (_prorata_nd)
{
rsd = _pla->get_real("R20") + num_amm;
rsn = _pla->get_real("R19");
rsd = _pla->get_real("R20");
rsn = _pla->get_real("R19") + num_amm;
}
else
{
@ -1159,11 +1159,17 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
round_imposta(num_amm);
// segna flag prorata
if ((e1+e2+e3+e4) > ZERO)
{
dd->_f0 |= IS_PRORATA;
dd->_r18 = _pla->get_real("R18");
if (_prorata_nd)
{
if (rsn != rsd)
dd->_f0 |= IS_PRORATA;
}
else
if ((e1+e2+e3+e4) > ZERO)
{
dd->_f0 |= IS_PRORATA;
dd->_r18 = _pla->get_real("R18");
}
dd->_r0 = ris;
dd->_r1 = e1;
dd->_r2 = prorata;
@ -2804,8 +2810,9 @@ bool TLiquidazione_app::set_annual(_DescrItem& d)
int row = get_maxrow()+1;
if (row == 1) row = 4;
if ((d._r2 > ZERO) && (d._f0 & IS_PRORATA))
{
// if ((d._r2 > ZERO) && (d._f0 & IS_PRORATA))
if (d._f0 & IS_PRORATA)
{
// non lo ha stampato prima se annuale, perche' Vladimiro il nefido pretende l'assurdo aggiornamento della perc. a quella nuova
const int year_int = atoi(_year);
@ -2834,15 +2841,9 @@ bool TLiquidazione_app::set_annual(_DescrItem& d)
if (_prorata_nd)
{
set_row(row++, FR(" - Numeratore pro-rata @69g%r"), &d._ra0);
set_row(row++, FR(" - cessioni esenti di beni ammortizzabili @69g%r"), &d._ra3);
const real tot = d._ra0 + d._ra3;
set_row(row++, FR(" - di cui cessioni esenti art.10 di beni ammortizzabili @69g%r"), &d._ra3);
const real diff = d._ra0 - d._ra3;
if (tot != ZERO)
{
set_row(row++, FR("@69g----------------"));
set_row(row++, FR("@6gTotale @69g%r"), &tot);
row++;
}
set_row(row++, FR(" - Denominatore @69g%r"), &d._ra1);
}
else

View File

@ -831,8 +831,9 @@ const char* TPagamento::desc_tipo(int tipo, char ulc, bool* ok) const
if (ok != NULL) *ok = true;
if (ulc > ' ')
{
const char key[3] = { tipo+'0', toupper(ulc), '\0' };
o = cache().get("%CLR", key).get("S0");
// const char key[3] = { tipo+'0', toupper(ulc), '\0' };
TString4 key; key << tipo << toupper(ulc);
o = cache().get("%CLR", key).get("S0");
}
if (*o == '\0')
{

View File

@ -2639,6 +2639,7 @@ bool TForm::parse_use(TScanner& scanner, TString & filter)
{
TToken_string ordexpr(parse_sortexpr(scanner));
_cursor = new TSorted_cursor(_relation, ordexpr, "", key);
_sorted_cursor = true;
}
else
{
@ -3014,8 +3015,9 @@ bool TForm::reread(
// Legge le modifiche su archivio e poi e' finita.
s->set_dirty(FALSE);
TLocalisamfile rprof(LF_RFORM);
const char sez[3] = {sec,p+'0','\0'};
rprof.zero();
TString4 sez; sez << sec << p;
rprof.zero();
rprof.put("TIPOPROF", _name);
rprof.put("CODPROF", _code);
rprof.put("SEZ", sez);
@ -4460,8 +4462,9 @@ bool TForm::write_profile()
TPrint_section* sec = exist(sc, pt);
if (sec != NULL && sec->dirty())
{
const char codsez[3] = { sc, pt+'0', '\0' };
cur.zero();
TString4 codsez; codsez << sc << pt;
cur.zero();
cur.put("TIPOPROF", name());
cur.put("CODPROF", code());
cur.put("SEZ", codsez);
@ -4511,6 +4514,7 @@ void TForm::init()
_msg_add_enabled = TRUE;
_magic_currency = FALSE;
_exchange = NULL;
_sorted_cursor = false;
}
// @doc EXTERNAL

View File

@ -660,6 +660,8 @@ public:
int parse_field(const char* code, char& type, int& level, int& id) const;
TReport_field* field(const char* code);
virtual bool set_var(const TString& name, const TVariant& var) { return set_usr_val(name, var); }
void report2mask(TMask & m) const;
void mask2report(const TMask & m);

View File

@ -177,7 +177,8 @@ void TVariable_rectype::write_memo(TIsam_handle file, const TRecnotype recno)
{
const TVariable_field* vf = (TVariable_field*)o;
const TString& val = vf->get();
if (val.full() && val != "0")
if (val.full() && val != "0")
{
t.add(key);
t << '=' << val;