Patch level : 12.0 828
Files correlati : cg5.exe Issue #47 dopo l'installazione della patch 826, se da visualizzazione liquidazione clicco sul bottone all'estrema sinistra e richiamo il mese, all'uscita mi viene raddoppiato il mese di dicembre
This commit is contained in:
parent
82cc21e3d6
commit
4a8c9d11cd
8
build/ve1.vcxproj.user
Normal file
8
build/ve1.vcxproj.user
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerCommandArguments>-3 st_av_lav /uADMIN</LocalDebuggerCommandArguments>
|
||||
<LocalDebuggerWorkingDirectory>$(TargetDir)</LocalDebuggerWorkingDirectory>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -1639,75 +1639,71 @@ void Visliq_app::read_general(TMask& m)
|
||||
// set sheet
|
||||
for (int i = step; i < 13; i+=step)
|
||||
{
|
||||
TToken_string & t = sh.row(i);
|
||||
|
||||
if (!is_month_ok(i))
|
||||
continue;
|
||||
|
||||
const int row = (i/step) - 1;
|
||||
if (!look_lim(i))
|
||||
{
|
||||
|
||||
t.cut(0);
|
||||
sh.disable_cell(row, -1);
|
||||
}
|
||||
else
|
||||
if (is_month_ok(i))
|
||||
{
|
||||
const real iva_ven = _lam->get_real("R0"); // IVA acquisti
|
||||
const real iva_acq = _lam->get_real("R1"); // IVA vendite
|
||||
const real ris = iva_ven - iva_acq;
|
||||
const real r1 = _lim->get_real("R1");
|
||||
const real r5 = _lim->get_real("R5");
|
||||
const int row = sh.set_row_cell(S_MESE, itoname(i));
|
||||
const TString debcred1 = ris == ZERO ? "" : (ris > ZERO ? "D" : "C");
|
||||
real r0 = _lim->get_real("R0");
|
||||
const TString debcred3 = r0 == ZERO ? "" : (r0 > ZERO ? "D" : "C");
|
||||
|
||||
sh.set_row_cell(S_IVA, abs(r0), row);
|
||||
sh.set_row_cell(S_DEBCRED3, debcred3, row);
|
||||
sh.set_row_cell(S_RISULTATO, abs(ris), row);
|
||||
sh.set_row_cell(S_DEBCRED1, debcred1, row);
|
||||
sh.set_row_cell(S_RIMBORSO, r1, row);
|
||||
sh.set_row_cell(S_RETTIFICHE, abs(r5), row);
|
||||
sh.set_row_cell(S_DEBCRED2, r5 == ZERO ? "" : (r5 > ZERO ? "D" : "C"), row);
|
||||
|
||||
const real criva = debcred1 == "C" ? ZERO : _lim->get_real("R15");
|
||||
const real crf24 = _lim->get_real("R16");
|
||||
const real autf24 = _lim->get_real("R20");
|
||||
bool enable_date = r1 != ZERO;
|
||||
|
||||
sh.set_row_cell(S_CREDIVA, criva, row);
|
||||
sh.enable_cell(row, S_CREDIVA, debcred3 == "D");
|
||||
sh.set_row_cell(S_CREDF24PRE,crf24, row);
|
||||
sh.set_row_cell(S_CREDF24, autf24 , row);
|
||||
enable_date |= autf24 != ZERO;
|
||||
if (enable_date)
|
||||
const int row = (i/step) - 1;
|
||||
if (!look_lim(i))
|
||||
{
|
||||
sh.set_row_cell(S_MESE, itoname(i), row);
|
||||
sh.disable_cell(row, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
const TDate dautf24 = _lim->get_date("D1");
|
||||
const real iva_ven = _lam->get_real("R0"); // IVA acquisti
|
||||
const real iva_acq = _lam->get_real("R1"); // IVA vendite
|
||||
const real ris = iva_ven - iva_acq;
|
||||
const real r1 = _lim->get_real("R1");
|
||||
const real r5 = _lim->get_real("R5");
|
||||
const TString debcred1 = ris == ZERO ? "" : (ris > ZERO ? "D" : "C");
|
||||
real r0 = _lim->get_real("R0");
|
||||
const TString debcred3 = r0 == ZERO ? "" : (r0 > ZERO ? "D" : "C");
|
||||
|
||||
sh.set_row_cell(S_DATAAUT, dautf24, row);
|
||||
}
|
||||
sh.enable_cell(row, sh.cid2index(S_DATAAUT), enable_date);
|
||||
if (compensabile)
|
||||
{
|
||||
cr_res += autf24;
|
||||
cr_res -= crf24;
|
||||
cr_res -= criva;
|
||||
if (cr_res < ZERO)
|
||||
sh.set_row_cell(S_MESE, itoname(i), row);
|
||||
sh.set_row_cell(S_IVA, abs(r0), row);
|
||||
sh.set_row_cell(S_DEBCRED3, debcred3, row);
|
||||
sh.set_row_cell(S_RISULTATO, abs(ris), row);
|
||||
sh.set_row_cell(S_DEBCRED1, debcred1, row);
|
||||
sh.set_row_cell(S_RIMBORSO, r1, row);
|
||||
sh.set_row_cell(S_RETTIFICHE, abs(r5), row);
|
||||
sh.set_row_cell(S_DEBCRED2, r5 == ZERO ? "" : (r5 > ZERO ? "D" : "C"), row);
|
||||
|
||||
const real criva = debcred1 == "C" ? ZERO : _lim->get_real("R15");
|
||||
const real crf24 = _lim->get_real("R16");
|
||||
const real autf24 = _lim->get_real("R20");
|
||||
bool enable_date = r1 != ZERO;
|
||||
|
||||
sh.set_row_cell(S_CREDIVA, criva, row);
|
||||
sh.enable_cell(row, S_CREDIVA, debcred3 == "D");
|
||||
sh.set_row_cell(S_CREDF24PRE, crf24, row);
|
||||
sh.set_row_cell(S_CREDF24, autf24, row);
|
||||
enable_date |= autf24 != ZERO;
|
||||
if (enable_date)
|
||||
{
|
||||
sh.set_back_and_fore_color(COLOR_LTYELLOW, COLOR_DKRED, row, sh.cid2index(S_CREDF24PRE));
|
||||
sh.set_row_cell(S_CREDRES, ZERO, row);
|
||||
const TDate dautf24 = _lim->get_date("D1");
|
||||
|
||||
sh.set_row_cell(S_DATAAUT, dautf24, row);
|
||||
}
|
||||
sh.enable_cell(row, sh.cid2index(S_DATAAUT), enable_date);
|
||||
if (compensabile)
|
||||
{
|
||||
cr_res += autf24;
|
||||
cr_res -= crf24;
|
||||
cr_res -= criva;
|
||||
if (cr_res < ZERO)
|
||||
{
|
||||
sh.set_back_and_fore_color(COLOR_LTYELLOW, COLOR_DKRED, row, sh.cid2index(S_CREDF24PRE));
|
||||
sh.set_row_cell(S_CREDRES, ZERO, row);
|
||||
}
|
||||
else
|
||||
{
|
||||
sh.set_back_and_fore_color(NORMAL_BACK_COLOR, NORMAL_COLOR, row, sh.cid2index(S_CREDF24PRE));
|
||||
sh.set_row_cell(S_CREDRES, cr_res, row);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sh.set_back_and_fore_color(NORMAL_BACK_COLOR, NORMAL_COLOR, row, sh.cid2index(S_CREDF24PRE));
|
||||
sh.set_row_cell(S_CREDRES, cr_res , row);
|
||||
}
|
||||
sh.set_row_cell(S_CREDRES, ZERO, row);
|
||||
sh.set_row_cell(S_DESCR, _lim->get("S3"), row);
|
||||
}
|
||||
else
|
||||
sh.set_row_cell(S_CREDRES, ZERO, row);
|
||||
sh.set_row_cell(S_DESCR, _lim->get("S3"), row);
|
||||
// sh.row(row) = (*tt);
|
||||
}
|
||||
}
|
||||
sh.force_update();
|
||||
@ -1720,31 +1716,31 @@ void Visliq_app::read_general(TMask& m)
|
||||
|
||||
for (_del->first(); !_del->eof(); _del->next())
|
||||
{
|
||||
if (atol(*_del_ditta) != get_firm() ||
|
||||
atoi(*_del_anno) != _year)
|
||||
continue;
|
||||
|
||||
// uso solo deleghe normali (tipo == 1) e acconti (tipo == 7)
|
||||
int tipod = atoi(*_del_tipo);
|
||||
if (tipod != 1 && tipod != 7)
|
||||
continue;
|
||||
|
||||
// somma versamenti nel mese adeguato
|
||||
int m = atoi(*_del_mese);
|
||||
if (atol(*_del_ditta) == get_firm() && atoi(*_del_anno) == _year)
|
||||
{
|
||||
// uso solo deleghe normali (tipo == 1) e acconti (tipo == 7)
|
||||
int tipod = atoi(*_del_tipo);
|
||||
if (tipod == 1 || tipod == 7)
|
||||
{
|
||||
|
||||
if (m >= 12)
|
||||
m = tipod == 7 ? 12 : 13;
|
||||
// supercauto
|
||||
if (m <= 0)
|
||||
continue;
|
||||
|
||||
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);
|
||||
b.add(_del->get("S8"),1);
|
||||
b.add(_del->get("S9"),2);
|
||||
// somma versamenti nel mese adeguato
|
||||
int m = atoi(*_del_mese);
|
||||
|
||||
if (m >= 12)
|
||||
m = tipod == 7 ? 12 : 13;
|
||||
// supercauto
|
||||
if (m > 0)
|
||||
{
|
||||
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);
|
||||
b.add(_del->get("S8"), 1);
|
||||
b.add(_del->get("S9"), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sheet versamenti
|
||||
@ -1752,8 +1748,6 @@ void Visliq_app::read_general(TMask& m)
|
||||
sv.destroy();
|
||||
for (int i = 1; i <= 13; i++)
|
||||
{
|
||||
const TString & t = sv.row(i);
|
||||
|
||||
if (!is_month_ok(i) && i != 13)
|
||||
continue;
|
||||
nomemese = itoname(i == 13 ? 12 : i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user