Patch level : 12.0 no-patch

Files correlati     : ps0017.exe
Commento            :

Aggiornato programma personalizzato CRPA-Dinamica
This commit is contained in:
AlexBonazzi 2019-02-24 22:45:46 +01:00
parent eed8701537
commit 488b2767a4
2 changed files with 9 additions and 16 deletions

View File

@ -42,8 +42,8 @@ protected:
public:
bool calc_residual(const TRiga_scadenze& scad, real& impres, real& imppag,
char& accsal, int& rdist, int& reff,
bool& partially_unassigned, int& tipopag, bool is_old = false) const;
bool fill_row(const TRiga_scadenze& rs, TToken_string& row, bool& partially_unassigned, bool force, bool is_new);
bool& partially_unassigned, int& tipopag, bool is_old = false, int ndist = 0 ) const;
bool fill_row(const TRiga_scadenze& rs, TToken_string& row, bool& partially_unassigned, bool force, bool is_new, int ndist = 0);
bool fill_rate();
int insert_row(const TToken_string& row);
bool fill_distinta(bool clear_all = false);
@ -66,7 +66,7 @@ bool TPE_mask::calc_residual(const TRiga_scadenze& scad,
real& impres, real& imppag,
char& accsal, int& rdist, int& reff,
bool& partially_unassigned, int& tipopag,
bool is_old) const
bool is_old, int ndist) const
{
tipopag = scad.get_int(SCAD_TIPOPAG);
const bool valuta = scad.in_valuta();
@ -142,7 +142,7 @@ bool TPE_mask::calc_residual(const TRiga_scadenze& scad,
for (cur = 0L; cur.pos() < items; ++cur)
{
TString8 effkey = effe.get(EFF_TIPODIST); effkey << effe.get(EFF_NDIST);
if (effkey == key)
if (effkey == key && (ndist == 0 || ndist != effe.get_int(EFF_NDIST)))
{
rdist = effe.get_int(EFF_NRIGADIST);
reff = riga.get_int(REFF_NRIGATR);
@ -182,14 +182,14 @@ void TPE_mask::update_total()
enable(DLG_SAVEREC);
}
bool TPE_mask::fill_row(const TRiga_scadenze& rs, TToken_string& row, bool& partially_unassigned, bool force, bool is_old)
bool TPE_mask::fill_row(const TRiga_scadenze& rs, TToken_string& row, bool& partially_unassigned, bool force, bool is_old, int ndist)
{
const int tipopageff = get_int(F_TIPOPAGEFF);
int tipopag;
real impres, imppag;
char accsal; int rigadist, rigaeff;
row.cut(0);
bool ok = calc_residual(rs, impres, imppag, accsal, rigadist, rigaeff, partially_unassigned, tipopag, is_old) || force;
bool ok = calc_residual(rs, impres, imppag, accsal, rigadist, rigaeff, partially_unassigned, tipopag, is_old, ndist) || force;
if (ok)
ok = tipopag == tipopageff || tipopageff == 0;
if (ok)
@ -381,8 +381,10 @@ bool TPE_mask::fill_rate()
partite.freeze();
if (items > 0)
{
TAssoc_array fatture;
TRectype& partita = partite.curr();
// qui
TProgind pi(items, "Caricamento partite aperte", TRUE, TRUE);
long last_cf = 0;
@ -443,7 +445,7 @@ bool TPE_mask::fill_rate()
if (data >= dadata && (!adata.ok() || data <= adata))
{
bool partially_unassigned;
if (fill_row(rs, row, partially_unassigned, false, false))
if (fill_row(rs, row, partially_unassigned, false, false, ndist))
{
const int numrow = sheet.items();
sheet.row(numrow) = row;
@ -613,7 +615,6 @@ void TPE_mask::save_rate()
const TString& codval = get(F_CODVAL);
const real cambio = get(F_CAMBIO);
const bool eurocambio = get_bool(F_EURO);
bool zeroes = FALSE; // Esistono righe effetto da cancellare

View File

@ -83,7 +83,6 @@ BEGIN
OUTPUT F_CODVAL CODVAL
OUTPUT F_CAMBIO CAMBIO
OUTPUT F_DATACAMBIO DATACAMBIO
OUTPUT F_EURO CONTROEURO
OUTPUT F_ABI CODABIP
OUTPUT F_CAB CODCABP
OUTPUT F_TIPOPAG TIPOPAG
@ -103,19 +102,12 @@ BEGIN
DISPLAY "Contro\nEuro@6" B1
DISPLAY "Denominazione@50" S0
OUTPUT F_CODVAL CODTAB
OUTPUT F_EURO B1
CHECKTYPE NORMAL
GROUP 3
MESSAGE EMPTY CLEAR,6@
MESSAGE ENABLE,6@
END
BOOLEAN F_EURO
BEGIN
PROMPT 64 1 "Contro Euro"
FLAGS "D"
END
DATE F_DATADIST
BEGIN
PROMPT 2 2 "Data "