Merge remote-tracking branch 'origin/R_10_00' into R_10_00
This commit is contained in:
commit
d436206ea0
10
cd/test/cg0756.txt
Normal file
10
cd/test/cg0756.txt
Normal file
@ -0,0 +1,10 @@
|
||||
cg3200a.msk
|
||||
cg5.exe
|
||||
cg5500b.msk
|
||||
cg5500c.msk
|
||||
cg4.exe
|
||||
cg5300a.msk
|
||||
|
||||
Esposto il totale versamenti e il totale interessi in IVA
|
||||
Aggiunta la colonna interessi allo sheet versamenti IVA
|
||||
Accorciata la scritta Stampa per competenza IVA
|
99
cd/test/cg0756a.ini
Normal file
99
cd/test/cg0756a.ini
Normal file
@ -0,0 +1,99 @@
|
||||
[Main]
|
||||
Demo=0
|
||||
|
||||
[cg1]
|
||||
Edit_23 = cg2 -0
|
||||
File(26) = cg3200a.msk|X
|
||||
File(41) = cg4.exe|X
|
||||
File(64) = cg5.exe|X
|
||||
File(68) = cg5300a.msk|X
|
||||
File(72) = cg5500b.msk|X
|
||||
File(73) = cg5500c.msk|X
|
||||
Patch = 756
|
||||
Versione = 21511200
|
||||
|
||||
[cg99]
|
||||
Kill(0) = bastscc.rep|x
|
||||
Kill(1) = batbtra.msk|x
|
||||
Kill(2) = cgtbcon.msk|x
|
||||
Kill(3) = batbdpn.msk|x
|
||||
Kill(4) = bastpor.msk|x
|
||||
Kill(5) = bastivd.rep|x
|
||||
Kill(6) = batbcco.msk|x
|
||||
Kill(7) = bastvet.msk|x
|
||||
Kill(8) = bastesc.rep|x
|
||||
Kill(9) = bastndo.rep|x
|
||||
Kill(10) = bastesc.msk|x
|
||||
Kill(11) = batbvet.msk|x
|
||||
Kill(12) = batbver.msk|x
|
||||
Kill(13) = bastcco.msk|x
|
||||
Kill(14) = bastcve.rep|x
|
||||
Kill(15) = bastmsp.rep|x
|
||||
Kill(16) = batbleg.msk|x
|
||||
Kill(17) = batbscc.msk|x
|
||||
Kill(18) = bastcam.rep|x
|
||||
Kill(19) = batbpor.msk|x
|
||||
Kill(20) = batbind.msk|x
|
||||
Kill(21) = bastivd.msk|x
|
||||
Kill(22) = batblbu.msk|x
|
||||
Kill(23) = batbndo.msk|x
|
||||
Kill(24) = batbtit.msk|x
|
||||
Kill(25) = bastpdb.msk|x
|
||||
Kill(26) = batbdel.msk|x
|
||||
Kill(27) = batblia.msk|x
|
||||
Kill(28) = bastpor.rep|x
|
||||
Kill(29) = bastvet.rep|x
|
||||
Kill(30) = bastarb.rep|x
|
||||
Kill(31) = bastver.rep|x
|
||||
Kill(32) = batbins.msk|x
|
||||
Kill(33) = batbesc.msk|x
|
||||
Kill(34) = bastpdb.rep|x
|
||||
Kill(35) = batbarb.msk|x
|
||||
Kill(36) = bastnot.rep|x
|
||||
Kill(37) = bastzon.msk|x
|
||||
Kill(38) = bastreg.rep|x
|
||||
Kill(39) = batbcve.msk|x
|
||||
Kill(40) = batbivd.msk|x
|
||||
Kill(41) = bastndo.msk|x
|
||||
Kill(42) = batbinl.msk|x
|
||||
Kill(43) = batbmsp.msk|x
|
||||
Kill(44) = batbreg.msk|x
|
||||
Kill(45) = bastntb.rep|x
|
||||
Kill(46) = bastreg.msk|x
|
||||
Kill(47) = batbnot.msk|x
|
||||
Kill(48) = bastarb.msk|x
|
||||
Kill(49) = bastver.msk|x
|
||||
Kill(50) = batbcfi.msk|x
|
||||
Kill(51) = bastscc.msk|x
|
||||
Kill(52) = batbzon.msk|x
|
||||
Kill(53) = batbcam.msk|x
|
||||
Kill(54) = bastleg.rep|x
|
||||
Kill(55) = bastcfi.msk|x
|
||||
Kill(56) = bastdpn.msk|x
|
||||
Kill(57) = bastdpn.rep|x
|
||||
Kill(58) = bastcco.rep|x
|
||||
Kill(59) = batbpdb.msk|x
|
||||
Kill(60) = bastcfi.rep|x
|
||||
Kill(61) = bastcam.msk|x
|
||||
Kill(62) = bastleg.msk|x
|
||||
Kill(63) = bastcve.msk|x
|
||||
Kill(64) = batblia.msk|x
|
||||
Kill(65) = bastmsp.msk|x
|
||||
Kill(66) = batbntb.msk|x
|
||||
Kill(67) = bastntb.msk|x
|
||||
Kill(68) = bastzon.rep|x
|
||||
Kill(69) = bastnot.msk|x
|
||||
|
||||
[cg]
|
||||
Data = 27-03-2019
|
||||
Descrizione = Contabilita' Generale
|
||||
Dischi = 1
|
||||
Moduli = ba
|
||||
OEM =
|
||||
Patch = 756
|
||||
PostProcess = bainst -0 CG
|
||||
PreProcess =
|
||||
Prezzo(1) =
|
||||
Prezzo(2) =
|
||||
Versione = 21511200
|
||||
|
BIN
cd/test/cg0756a1.zip
Normal file
BIN
cd/test/cg0756a1.zip
Normal file
Binary file not shown.
4
cd/test/tf0754.txt
Normal file
4
cd/test/tf0754.txt
Normal file
@ -0,0 +1,4 @@
|
||||
tf0.exe
|
||||
|
||||
- Corretto controllo documenti ignorati
|
||||
- Corretto filtro in caso di query che parte da RMOVIVA
|
19
cd/test/tf0754a.ini
Normal file
19
cd/test/tf0754a.ini
Normal file
@ -0,0 +1,19 @@
|
||||
[Main]
|
||||
Demo=0
|
||||
|
||||
[tf1]
|
||||
File(0) = tf0.exe|X
|
||||
Patch = 754
|
||||
Versione = 21511200
|
||||
|
||||
[tf]
|
||||
Data = 03-04-2019
|
||||
Descrizione = Trasferimento fatture
|
||||
Dischi = 1
|
||||
Moduli = cg
|
||||
OEM =
|
||||
Patch = 754
|
||||
PostProcess =
|
||||
PreProcess =
|
||||
Versione = 21511200
|
||||
|
BIN
cd/test/tf0754a1.zip
Normal file
BIN
cd/test/tf0754a1.zip
Normal file
Binary file not shown.
3
cd/test/ve0754.txt
Normal file
3
cd/test/ve0754.txt
Normal file
@ -0,0 +1,3 @@
|
||||
ve1.exe
|
||||
|
||||
- Corretto conteggio righe documento
|
129
cd/test/ve0754a.ini
Normal file
129
cd/test/ve0754a.ini
Normal file
@ -0,0 +1,129 @@
|
||||
[Main]
|
||||
Demo=0
|
||||
|
||||
[ve1]
|
||||
File(19) = ve1.exe|X
|
||||
Patch = 754
|
||||
Versione = 21511200
|
||||
|
||||
[ve99]
|
||||
Kill(0) = batbcld.msk|x
|
||||
Kill(1) = bastspp.rep|x
|
||||
Kill(2) = bastfca.msk|x
|
||||
Kill(3) = batbeld.msk|x
|
||||
Kill(4) = batbfrd.msk|x
|
||||
Kill(5) = batbums.msk|x
|
||||
Kill(6) = bastcaa.rep|x
|
||||
Kill(7) = efstbnp.msk|x
|
||||
Kill(8) = batbfrr.msk|x
|
||||
Kill(9) = batbcra.msk|x
|
||||
Kill(10) = basttag.msk|x
|
||||
Kill(11) = batbfrm.msk|x
|
||||
Kill(12) = ve7200a.frm|x
|
||||
Kill(13) = basttri.msk|x
|
||||
Kill(14) = batbubi.msk|x
|
||||
Kill(15) = bastnum.msk|x
|
||||
Kill(16) = bastrfc.msk|x
|
||||
Kill(17) = bastimb.msk|x
|
||||
Kill(18) = bastctr.msk|x
|
||||
Kill(19) = batbpro.msk|x
|
||||
Kill(20) = batbbnp.msk|x
|
||||
Kill(21) = ve7700a.msk|x
|
||||
Kill(22) = bastasf.rep|x
|
||||
Kill(23) = bastgca.rep|x
|
||||
Kill(24) = basteld.rep|x
|
||||
Kill(25) = bastcra.msk|x
|
||||
Kill(26) = efstbnp.rep|x
|
||||
Kill(27) = ve7500a.msk|x
|
||||
Kill(28) = batbgca.msk|x
|
||||
Kill(29) = bastcau.rep|x
|
||||
Kill(30) = batbgsa.msk|x
|
||||
Kill(31) = batbprv.msk|x
|
||||
Kill(32) = batbfsa.msk|x
|
||||
Kill(33) = bastctr.rep|x
|
||||
Kill(34) = ve7400conf.ini|x
|
||||
Kill(35) = batbcau.msk|x
|
||||
Kill(36) = bastfrm.rep|x
|
||||
Kill(37) = batbtri.msk|x
|
||||
Kill(38) = batbfca.msk|x
|
||||
Kill(39) = batbstd.msk|x
|
||||
Kill(40) = bastfrm.msk|x
|
||||
Kill(41) = batbnum.msk|x
|
||||
Kill(42) = bastums.msk|x
|
||||
Kill(43) = ve7300a.msk|x
|
||||
Kill(44) = ve7400a.ini|x
|
||||
Kill(45) = batbctr.msk|x
|
||||
Kill(46) = batbtag.msk|x
|
||||
Kill(47) = batbgcg.msk|x
|
||||
Kill(48) = bastubi.msk|x
|
||||
Kill(49) = batbasf.msk|x
|
||||
Kill(50) = bastgcg.msk|x
|
||||
Kill(51) = bastcaa.msk|x
|
||||
Kill(52) = ve7.exe|x
|
||||
Kill(53) = bastgmc.msk|x
|
||||
Kill(54) = bastfrr.rep|x
|
||||
Kill(55) = batbtip.msk|x
|
||||
Kill(56) = ve7300a.frm|x
|
||||
Kill(57) = bastasf.msk|x
|
||||
Kill(58) = batbfid.msk|x
|
||||
Kill(59) = batbspp.msk|x
|
||||
Kill(60) = bastabe.rep|x
|
||||
Kill(61) = ve7600a.msk|x
|
||||
Kill(62) = batbprs.msk|x
|
||||
Kill(63) = ve7100a.msk|x
|
||||
Kill(64) = bastrfc.rep|x
|
||||
Kill(65) = batbabe.msk|x
|
||||
Kill(66) = bastimb.rep|x
|
||||
Kill(67) = bastcau.msk|x
|
||||
Kill(68) = basteld.msk|x
|
||||
Kill(69) = bastubi.rep|x
|
||||
Kill(70) = basttri.rep|x
|
||||
Kill(71) = batbrfc.msk|x
|
||||
Kill(72) = basttip.rep|x
|
||||
Kill(73) = bastfrr.msk|x
|
||||
Kill(74) = bastgca.msk|x
|
||||
Kill(75) = ve7200a.msk|x
|
||||
Kill(76) = basttag.rep|x
|
||||
Kill(77) = batbgmc.msk|x
|
||||
Kill(78) = bastums.rep|x
|
||||
Kill(79) = bastrfa.rep|x
|
||||
Kill(80) = bastspp.msk|x
|
||||
Kill(81) = batbcaa.msk|x
|
||||
Kill(82) = bastprs.msk|x
|
||||
Kill(83) = batbrfa.msk|x
|
||||
Kill(84) = bastrfa.msk|x
|
||||
Kill(85) = batbmre.msk|x
|
||||
Kill(86) = bastnum.rep|x
|
||||
Kill(87) = bastfca.rep|x
|
||||
Kill(88) = batbspt.msk|x
|
||||
Kill(89) = baststd.msk|x
|
||||
Kill(90) = bastprs.rep|x
|
||||
Kill(91) = basttip.msk|x
|
||||
Kill(92) = ve7400a.msk|x
|
||||
Kill(93) = bastfrd.msk|x
|
||||
Kill(94) = baststd.rep|x
|
||||
Kill(95) = bastbnp.rep|x
|
||||
Kill(96) = bastgcg.rep|x
|
||||
Kill(97) = ve7701a.ini|x
|
||||
Kill(98) = batbacr.msk|x
|
||||
Kill(99) = batbimb.msk|x
|
||||
Kill(100) = bastbnp.msk|x
|
||||
Kill(101) = bastabe.msk|x
|
||||
Kill(102) = bastgmc.rep|x
|
||||
Kill(103) = eftbbnp.msk|x
|
||||
Kill(104) = bastcra.rep|x
|
||||
Kill(105) = bastfrd.rep|x
|
||||
|
||||
[ve]
|
||||
Data = 03-04-2019
|
||||
Descrizione = Vendite
|
||||
Dischi = 1
|
||||
Moduli = ba,cg9,pr9,mg9,sv9,in9,ef9
|
||||
OEM =
|
||||
Patch = 754
|
||||
PostProcess = bainst -0 VE
|
||||
PreProcess =
|
||||
Prezzo(1) =
|
||||
Prezzo(2) =
|
||||
Versione = 21511200
|
||||
|
BIN
cd/test/ve0754a1.zip
Normal file
BIN
cd/test/ve0754a1.zip
Normal file
Binary file not shown.
@ -39,7 +39,7 @@ END
|
||||
|
||||
BOOLEAN F_DATA_LIQ
|
||||
BEGIN
|
||||
PROMPT 31 2 "Stampa per competenza IVA "
|
||||
PROMPT 31 2 "St.per comp.IVA "
|
||||
MESSAGE TRUE CLEAR,F_ANNO
|
||||
MESSAGE FALSE ENABLE,F_ANNO
|
||||
END
|
||||
|
@ -168,7 +168,7 @@ public:
|
||||
real _r0, _r1, _r2, _r3, _r4, _r5, _r6, _r7, _r8, _r9,
|
||||
_r10, _r11, _r12, _r13, _r14, _r15, _r16, _r17, _r18, _r19,
|
||||
_r20, _r21, _r22, _r23, _r24, _r25, _r26, _r27, _r28, _r29,
|
||||
_r30, _r31, _r32, _r33;
|
||||
_r30, _r31, _r32, _r33, _r34;
|
||||
real _ra0, _ra1, _ra2, _ra3, _ra4 ,_ra5, _ra6, _ra7, _ra8;
|
||||
TArray _arr;
|
||||
TDate _d0, _d1;
|
||||
@ -304,6 +304,7 @@ class TLiquidazione_app : public TPrint_application
|
||||
int _monthinatt; // mese inizio attivita' (serve per differita)
|
||||
bool _lim_cleared;
|
||||
bool _definitiva;
|
||||
bool _is_liq_acconto;
|
||||
bool _end_cassa;
|
||||
|
||||
real _diff_ven_ap, _diff_ven_ap_iva, _diff_acq_ap, _diff_acq_ap_iva;
|
||||
|
@ -3730,6 +3730,7 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
|
||||
real detrazioni = ZERO;
|
||||
real versamenti = ZERO;
|
||||
real versamenti_interessi = ZERO;
|
||||
real vers_int = ZERO;
|
||||
real rimborsi = ZERO;
|
||||
real rettifiche = ZERO;
|
||||
@ -3943,7 +3944,9 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
// nei casi previsti e non in annuale (vedi sotto)
|
||||
real vs(versamenti_IVA(m , m == 12 ? "1" : "1|7"));
|
||||
real vi(versamenti_IVA(m,"5"));
|
||||
real vls(versamenti_IVA(m, m == 12 ? "1" : "1|7", true));
|
||||
versamenti += vs;
|
||||
versamenti_interessi += (vls - vs);
|
||||
vers_int += vi;
|
||||
res_cred += vs + vi;
|
||||
}
|
||||
@ -4367,15 +4370,16 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
lim.put("R12", res_cred);
|
||||
lim.put("R13", res_debt);
|
||||
|
||||
lim.put("R26", fdiff_imp); // Imponibile IVA diff Fatture di vendita
|
||||
lim.put("R27", fdiff_iva); // Imposta IVA diff Fatture di vendita
|
||||
lim.put("R28", fdiffinc_imp); // Imponibile IVA diff Incassi
|
||||
lim.put("R29", fdiffinc_iva); // Imposta IVA diff Incassi
|
||||
lim.put("R26", fdiff_imp); // Imponibile IVA diff Fatture di vendita
|
||||
lim.put("R27", fdiff_iva); // Imposta IVA diff Fatture di vendita
|
||||
lim.put("R28", fdiffinc_imp); // Imponibile IVA diff Incassi
|
||||
lim.put("R29", fdiffinc_iva); // Imposta IVA diff Incassi
|
||||
|
||||
lim.put("R30", fdiff_imp_acq); // Imponibile IVA diff Fatture di acquisto
|
||||
lim.put("R31", fdiff_iva_acq); // Imposta IVA diff Fatture di acquisto
|
||||
lim.put("R32", fdiffinc_imp_acq); // Imponibile IVA diff Pagamenti
|
||||
lim.put("R33", fdiffinc_iva_acq); // Imposta IVA diff Pagamenti
|
||||
lim.put("R31", fdiff_iva_acq); // Imposta IVA diff Fatture di acquisto
|
||||
lim.put("R32", fdiffinc_imp_acq); // Imponibile IVA diff Pagamenti
|
||||
lim.put("R33", fdiffinc_iva_acq); // Imposta IVA diff Pagamenti
|
||||
lim.put("R34", versamenti_interessi);
|
||||
|
||||
look_lam(month+deltam, true);
|
||||
_lam->put("R0", iva_vend);
|
||||
|
@ -57,7 +57,7 @@ bool TLiquidazione_app::is_month_ok(int x, int mtocalc) const
|
||||
{
|
||||
// per l'annuale ritorna true per tutti i mesi da liquidare
|
||||
ret = x <= 13;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ bool TLiquidazione_app::is_date_ok(const TDate& d, int month, int liqmonth, int
|
||||
else // Nuova selezione dal 1998 in poi
|
||||
{
|
||||
if (month <= 12)
|
||||
return (regyear == year) && ((regmonth == month && liqmonth == 0) || (liqmonth == month));
|
||||
return (regyear == year) && ((regmonth == month && liqmonth == 0) || (liqmonth == month));
|
||||
else // Annuale, month == 13
|
||||
return (regyear == year && liqmonth != 12) || (regyear == year + 1 && liqmonth == 12);
|
||||
}
|
||||
@ -930,8 +930,9 @@ real TLiquidazione_app::versamenti_IVA(int month, const char* types, bool intr)
|
||||
ret += importo_dovuto_arrotondato;
|
||||
//gli interessi vengono memorizzati solo se si
|
||||
//devono pagare (=> nessun controllo su intra)
|
||||
if (!(_is_visliq && _freqviva == "T" && _month != 13)) // toglie gli interessi se non siamo in visualiz. o la ditta non e' TRIM o siamo in annuale
|
||||
ret -= interessi; // al netto degli interessi
|
||||
if (!intr)
|
||||
if (!(_is_visliq && _freqviva == "T" && _month != 13)) // toglie gli interessi se non siamo in visualiz. o la ditta non e' TRIM o siamo in annuale
|
||||
ret -= interessi; // al netto degli interessi
|
||||
// In caso di 13a liq e per trimestrali... devo fare la somma
|
||||
// degli importi netti dovuti, ecco perche' leggo R2,
|
||||
// perche togliendo poi gli interessi ottengo il dovuto netto!
|
||||
|
@ -1296,7 +1296,8 @@ void TLiquidazione_app::describe_liq(int month, const char* codatts, _DescrItem*
|
||||
// rispettiamo tutte le casistiche per i versamenti se non siamo in visualizzazione
|
||||
// analogamente in Visualizzazione ma solo nel caso dell'annuale.
|
||||
// In tutti gli altri casi va a cercare la delega
|
||||
d->_r8 = (_month == 13 || !_is_visliq) ? lim.get_real("R8") : versamenti_IVA(_month, "1");
|
||||
d->_r8 = (_month == 13 || !_is_visliq) ? lim.get_real("R8") : versamenti_IVA(_month, "1");
|
||||
d->_r34 = (_month == 13 || !_is_visliq) ? lim.get_real("R34") : ZERO;
|
||||
|
||||
if (_month == 13)
|
||||
{
|
||||
@ -2296,6 +2297,7 @@ void TLiquidazione_app::set_grand_2000(_DescrItem& d, int &rw)
|
||||
const real& detrazioni = d._r6;
|
||||
const real& interessi = d._r7;
|
||||
const real& versamenti = d._r8;
|
||||
const real& versamenti_interessi = d._r34;
|
||||
const real& vers_int = d._r9;
|
||||
|
||||
real diffinc_iva = d._ra5;
|
||||
@ -2446,26 +2448,29 @@ void TLiquidazione_app::set_grand_2000(_DescrItem& d, int &rw)
|
||||
set_row(rw++,FR("@11gInteressi dovuti per liquidazioni trimestrali %6.2r%%@75g%r"),&interesse, &interessi);
|
||||
else
|
||||
if (_is_visliq) rw++;
|
||||
|
||||
if (!acc_dec.is_zero())
|
||||
set_row(rw++,FR("%s@11gAcconto versato%s@58g%r"),
|
||||
_is_visliq ? "$[r]" : "", _is_visliq ? "$[n]" : "", &acc_dec);
|
||||
else
|
||||
if (_is_visliq) rw++;
|
||||
|
||||
// versamenti effettuati
|
||||
if (!versamenti.is_zero() && (_month==13 || !_is_visliq))
|
||||
set_row(rw++,FR("@11gVersamenti effettuati@58g%r"), &versamenti);
|
||||
if (!versamenti.is_zero() && (_month == 13 || !_is_visliq))
|
||||
set_row(rw++, FR("@11gVersamenti effettuati@58g%r"), &versamenti);
|
||||
else
|
||||
if (_is_visliq) rw++;
|
||||
|
||||
// versamenti integrativi
|
||||
if (!vers_int.is_zero() && !_is_visliq)
|
||||
set_row(rw++,FR("@11gVersamenti integrativi@58g%r"), &vers_int);
|
||||
else
|
||||
if (_is_visliq) rw++;
|
||||
|
||||
const real iva = risultato + interessi;
|
||||
const real tot_vers = acc_dec + versamenti + vers_int;
|
||||
if (!tot_vers.is_zero() && (_month == 13 || !_is_visliq))
|
||||
set_row(rw++, FR("@11gTotale versamenti effettuati@58g%r"), &tot_vers);
|
||||
else
|
||||
if (_is_visliq) rw++;
|
||||
|
||||
const real iva = risultato + interessi;
|
||||
if (_month == 13 && credito_compensabile)
|
||||
{
|
||||
real credito_utilizzabile = lia.get_real("R0");
|
||||
@ -2506,7 +2511,10 @@ void TLiquidazione_app::set_grand_2000(_DescrItem& d, int &rw)
|
||||
set_row(rw++,FR("@11g$[r]Versamenti effettuati$[n]@58g%r"), &versamenti);
|
||||
set_row(rw++, "");
|
||||
set_row(rw++, "");
|
||||
}
|
||||
}
|
||||
else
|
||||
if (_month == 13 && !versamenti_interessi.is_zero())
|
||||
set_row(rw++, FR("@11gVersamenti effettuati interessi @58g%r"), &versamenti_interessi);
|
||||
|
||||
if (!_is_visliq)
|
||||
{
|
||||
@ -2861,8 +2869,8 @@ bool TLiquidazione_app::set_annual(_DescrItem& d)
|
||||
set_row(row++,FR("@6gdi cui cessione beni ammortizzabili @69g%r"), &(d._r8));
|
||||
set_row(row++,FR("C1A - Operazioni esenti di cui all'art.10 n. 27 quinquies @69g%r"), &(d._r7));
|
||||
set_row(row++,FR("@6gdi cui cessione beni ammortizzabili @69g%r"), &(d._r9));
|
||||
// set_row(row++, FR("Volume d'affari @69g%r"), &vol_aff);
|
||||
// set_row(row++, FR("Totale vendite al fine del calcolo del pro-rata @69g%r"), &vol_aff);
|
||||
// set_row(row++, FR("Volume d'affari @69g%r"), &vol_aff);
|
||||
// set_row(row++, FR("Totale vendite al fine del calcolo del pro-rata @69g%r"), &vol_aff);
|
||||
|
||||
set_print_zero(false);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define F_GESMANCRED 219
|
||||
#define F_RCDAL 223
|
||||
#define F_RCAL 224
|
||||
#define F_PRORATA 225
|
||||
#define F_PRORATAC 225
|
||||
|
||||
#define F_ROUNDLIQ 221
|
||||
#define F_ROUNDDIC 222
|
||||
|
@ -151,7 +151,7 @@ BEGIN
|
||||
FIELD B6
|
||||
END
|
||||
|
||||
BOOLEAN F_PRORATA
|
||||
BOOLEAN F_PRORATAC
|
||||
BEGIN
|
||||
PROMPT 50 9 "Calcolo Pro rata"
|
||||
FIELD B7
|
||||
|
@ -532,6 +532,48 @@ bool Visliq_app::sel_mese_sh2 (TMask_field& f, KEY k)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Visliq_app::calc_int(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_TAB && f.dirty())
|
||||
{
|
||||
TSheet_field& sv = *app()._vers_sheet;
|
||||
|
||||
int sel = sv.selected();
|
||||
int m = sv.selected() + 1;
|
||||
if (sv.items() < 12)
|
||||
{
|
||||
m *= 3;
|
||||
if (app().look_lim(m))
|
||||
{
|
||||
const real intt = app()._lim->get_real("R10");
|
||||
|
||||
if (intt > ZERO) // interessi
|
||||
{
|
||||
TExchange c;
|
||||
real vers(f.get());
|
||||
real vers_netto = vers * CENTO / (intt + CENTO);
|
||||
|
||||
vers_netto.round(c.decimals());
|
||||
|
||||
real intr = vers - vers_netto;
|
||||
|
||||
round_imposta(intr);
|
||||
vers = vers_netto + intr;
|
||||
f.mask().set(106, vers);
|
||||
f.mask().set(107, intr);
|
||||
|
||||
TToken_string& row = sv.row(sel);
|
||||
|
||||
row.add(vers, 5);
|
||||
row.add(intr, 6);
|
||||
sv.force_update(sel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Visliq_app::vis_liq()
|
||||
{
|
||||
@ -601,7 +643,8 @@ bool Visliq_app::vis_all()
|
||||
sh.sheet_mask().set_handler(110, check_date);
|
||||
|
||||
sv.sheet_mask().set_handler(100, sel_mese_sh2);
|
||||
|
||||
sv.sheet_mask().set_handler(106, calc_int);
|
||||
|
||||
const bool new_print_2000 = true; // _year >= 2000;
|
||||
const bool compensabile = _lia->get("S9") == "CM";
|
||||
TMask& shm = sh.sheet_mask();
|
||||
@ -1513,7 +1556,7 @@ void Visliq_app::write_liq()
|
||||
_lim->rewrite();
|
||||
}
|
||||
|
||||
void Visliq_app::write_del()
|
||||
void Visliq_app::write_del(const real& v)
|
||||
{
|
||||
bool wasdel = false;
|
||||
|
||||
@ -1522,7 +1565,10 @@ void Visliq_app::write_del()
|
||||
TString8 cab(_lim->get("S5"));
|
||||
TString4 con(_lim->get("S6"));
|
||||
TDate date(_lim->get("D0"));
|
||||
real vers(_lim->get_real("R8"));
|
||||
real vers = v;
|
||||
|
||||
if (vers == ZERO)
|
||||
vers = _lim->get_real("R8");
|
||||
real intr(_lim->get_real("R10"));
|
||||
|
||||
if (vers.is_zero() && (wasdel = look_del(month,1)))
|
||||
@ -1536,14 +1582,18 @@ void Visliq_app::write_del()
|
||||
look_del(month,1,true); // Crea delega
|
||||
|
||||
real inter;
|
||||
|
||||
|
||||
if (!intr.is_zero())
|
||||
{
|
||||
// riapplica il tasso di interesse
|
||||
// se trimestrale e' stato scorporato rispetto all'eventuale input utente
|
||||
inter = vers*CENTO/(CENTO+intr);
|
||||
inter = vers - inter;
|
||||
inter.ceil();
|
||||
TExchange c;
|
||||
real vers_netto = vers * CENTO / (intr + CENTO);
|
||||
|
||||
vers_netto.round(c.decimals());
|
||||
inter = vers - vers_netto;
|
||||
round_imposta(inter);
|
||||
vers = vers_netto + inter;
|
||||
}
|
||||
|
||||
_del->put("R0",vers);
|
||||
@ -1671,8 +1721,9 @@ void Visliq_app::read_general(TMask& m)
|
||||
sh.force_update();
|
||||
|
||||
// calcola versamenti
|
||||
real versamenti[13];
|
||||
TDate date[13];
|
||||
real versamenti[13];
|
||||
real interessi[13];
|
||||
TDate date[13];
|
||||
TToken_string banche[13];
|
||||
|
||||
for (_del->first(); !_del->eof(); _del->next())
|
||||
@ -1694,7 +1745,8 @@ void Visliq_app::read_general(TMask& m)
|
||||
// supercauto
|
||||
if (m <= 0) continue;
|
||||
|
||||
versamenti[m-1] += _del->get_real("R0");
|
||||
versamenti[m - 1] += _del->get_real("R0");
|
||||
interessi[m - 1] += _del->get_real("R1");
|
||||
date[m-1] = _del->get_date("D0");
|
||||
TToken_string& b = banche[m-1];
|
||||
b.add(_del->get("S7"),0);
|
||||
@ -1722,8 +1774,9 @@ void Visliq_app::read_general(TMask& m)
|
||||
tt.add(banche[i-1].get(0),2); // azienda
|
||||
tt.add(banche[i-1].get(1),3); // dipendenza
|
||||
tt.add(banche[i-1].get(2),4); // concessionaria
|
||||
tt.add(versamenti[i-1].string(),5);// versamenti
|
||||
|
||||
tt.add(versamenti[i - 1].string(), 5);// versamenti
|
||||
tt.add(interessi[i - 1].string(), 6);// interessi
|
||||
|
||||
sv.row(-1) = tt;
|
||||
if (i == 12)
|
||||
sv.enable_cell(sv.items() - 1, -1, false);
|
||||
@ -1900,7 +1953,7 @@ void Visliq_app::write_general(TMask& m)
|
||||
_lim->put("S4", nabi);
|
||||
_lim->put("S5", ncab);
|
||||
_lim->put("S6", ncon);
|
||||
write_del();
|
||||
write_del(nvers);
|
||||
vr_mod = true;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,8 @@ protected:
|
||||
static bool sel_mese_sh1 (TMask_field&, KEY);
|
||||
static bool enable_date (TMask_field&, KEY);
|
||||
static bool check_date (TMask_field&, KEY);
|
||||
static bool sel_mese_sh2 (TMask_field&, KEY);
|
||||
static bool sel_mese_sh2(TMask_field&, KEY);
|
||||
static bool calc_int(TMask_field&, KEY);
|
||||
static bool ch_year_handler(TMask_field& f, KEY key);
|
||||
|
||||
static const char* link_handler(TMask&, int, const char*, bool doubleclick);
|
||||
@ -85,7 +86,7 @@ public:
|
||||
void read_general(TMask& m);
|
||||
void write_general(TMask& m);
|
||||
void write_liq();
|
||||
void write_del();
|
||||
void write_del(const real &v = ZERO);
|
||||
|
||||
void set_freqviva();
|
||||
void set_freqviva(const char* f) { _freqviva = f; }
|
||||
|
@ -108,6 +108,7 @@ BEGIN
|
||||
ITEM "CAB@5"
|
||||
ITEM "Conc.@5"
|
||||
ITEM "Versamenti@15"
|
||||
ITEM "Interessi@15"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
@ -311,6 +312,14 @@ BEGIN
|
||||
PROMPT 1 6 "Versamenti "
|
||||
END
|
||||
|
||||
CURRENCY 107 15
|
||||
BEGIN
|
||||
PROMPT 1 6 "Interessi "
|
||||
FLAGS "RD"
|
||||
END
|
||||
|
||||
|
||||
|
||||
BUTTON 100 10 2
|
||||
BEGIN
|
||||
PROMPT -11 -1 "Dettaglio"
|
||||
|
@ -84,6 +84,7 @@ BEGIN
|
||||
ITEM "CAB@5"
|
||||
ITEM "Conc.@5"
|
||||
ITEM "Versamenti@15"
|
||||
ITEM "Interessi@15"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
@ -259,6 +260,12 @@ BEGIN
|
||||
FLAGS "R"
|
||||
END
|
||||
|
||||
CURRENCY 107 15
|
||||
BEGIN
|
||||
PROMPT 1 6 "Interessi "
|
||||
FLAGS "RD"
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -13 -1 ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user