Patch level : 12.0 860
Files correlati : cg2.exe Commento : Corretta importazione scadenze con f1
This commit is contained in:
parent
b5471d204c
commit
6fae011cdf
@ -2408,7 +2408,6 @@ void TPrimanota_application::ini2mask(TConfig& ini, TMask& msk, bool query)
|
||||
}
|
||||
if (_f1_ini && msk.find_by_id(FS_RECALC) != NULL)
|
||||
{
|
||||
//msk.set(F_TOTALE, calcola_imp());
|
||||
msk.set(F_COLFPPRO, "X");
|
||||
msk.set(FS_RECALC, "");
|
||||
set_scad_f1(msk);
|
||||
@ -2424,24 +2423,18 @@ void TPrimanota_application::ini2mask(TConfig& ini, TMask& msk, bool query)
|
||||
|
||||
void TPrimanota_application::set_scad_f1(TMask& m)
|
||||
{
|
||||
const TString& cp = m.get(F_CODPAG);
|
||||
const TString& dt = m.get(F_DATADOC);
|
||||
set_pagamento(cp, dt);
|
||||
set_totale_pagamento(false);
|
||||
|
||||
TPagamento& pag = pagamento();
|
||||
if (m.field(FS_RECALC).enabled())
|
||||
{
|
||||
m.set(FS_RDIFFER, "1");
|
||||
m.set(FS_NAMEPAG, pag.name());
|
||||
m.set(FS_TIPOPR, pag.desc_tpr());
|
||||
m.set(FS_MCOMM, pag.mese_commerciale() ? "X" : "");
|
||||
m.set(FS_RECALC, "");
|
||||
m.set(FS_NRATE, pag.n_rate());
|
||||
}
|
||||
pag.set_rate_auto();
|
||||
TSheet_field& ps = m.sfield(FS_RATESHEET);
|
||||
pag.set_sheet(ps); // prepara lo sheet
|
||||
const int rate = ps.items();
|
||||
m.set(FS_RDIFFER, "1");
|
||||
m.set(FS_MCOMM, "");
|
||||
m.set(FS_RECALC, "");
|
||||
m.set(FS_NRATE, rate);
|
||||
|
||||
// Correggo le percentuali
|
||||
const real totale = real(m.get(F_TOTALE)) + real(m.get(F_RITFIS));
|
||||
for (int i = 0; i < rate; i++)
|
||||
ps.row(i).add(real(ps.row(i).get(1)) * CENTO / totale, 3);
|
||||
|
||||
set_banche(m);
|
||||
_pag_rows = ps.rows_array(); // copia sheet
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user