Patch level 60
Files correlati : 770.exe Le schede percipienti non calcolavano più la ritenuta a partire dal compenso. git-svn-id: svn://10.65.10.50/branches/R_10_00@24142 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
9635ef7268
commit
78f39e04ae
@ -2,6 +2,7 @@
|
||||
#include <defmask.h>
|
||||
#include <mailbox.h>
|
||||
#include <recarray.h>
|
||||
#include <tabutil.h>
|
||||
|
||||
#include "scperc.h"
|
||||
#include "rver.h"
|
||||
@ -1251,6 +1252,15 @@ void TSchedaPercipienti::mask2rel(const TMask& m)
|
||||
const real h_PercInps = m.get_real(F_PERC_INPS);
|
||||
const real h_PercAssImpInps = m.get_real(F_PERC_ASS_INPS);
|
||||
const real h_PercCommitInps = m.get_real(F_PERC_COMMIT_INPS);
|
||||
const TString& codcau = m.get(F_CODCAUS);
|
||||
TTable cau("%ca7");
|
||||
cau.zero();
|
||||
cau.put("CODTAB", codcau);
|
||||
if (cau.read() != NOERR)
|
||||
warning_box("Causale non presente in tabella");
|
||||
|
||||
const int h_CodNonSogg = cau.get_int("I1");
|
||||
|
||||
|
||||
// istanza struttura di comodo per calcolo riga pagamenti
|
||||
Pag_struct c;
|
||||
@ -1308,7 +1318,8 @@ void TSchedaPercipienti::mask2rel(const TMask& m)
|
||||
h_PercRitenuta,
|
||||
h_PercInps,
|
||||
h_PercAssImpInps,
|
||||
h_PercCommitInps);
|
||||
h_PercCommitInps,
|
||||
h_CodNonSogg);
|
||||
|
||||
// compilo restanti campi
|
||||
r.put("DATAPAG", s.datapag);
|
||||
@ -1495,6 +1506,17 @@ bool TSchedaPercipienti::activate_pag_sheet(TMask& m)
|
||||
const real h_PercInps = m.get_real(F_PERC_INPS);
|
||||
const real h_PercAssImpInps = m.get_real(F_PERC_ASS_INPS);
|
||||
const real h_PercCommitInps = m.get_real(F_PERC_COMMIT_INPS);
|
||||
|
||||
const TString& codcau = m.get(F_CODCAUS);
|
||||
TTable cau("%ca7");
|
||||
cau.zero();
|
||||
cau.put("CODTAB", codcau);
|
||||
if (cau.read() != NOERR)
|
||||
warning_box("Causale non presente in tabella");
|
||||
|
||||
const int h_CodNonSogg = cau.get_int("I1");
|
||||
|
||||
|
||||
// istanza strutture per calcolo
|
||||
Pag_struct c;
|
||||
Pag_struct s;
|
||||
@ -1513,7 +1535,8 @@ bool TSchedaPercipienti::activate_pag_sheet(TMask& m)
|
||||
h_PercRitenuta,
|
||||
h_PercInps,
|
||||
h_PercAssImpInps,
|
||||
h_PercCommitInps);
|
||||
h_PercCommitInps,
|
||||
h_CodNonSogg);
|
||||
from_struct_to_sheet(s, t);
|
||||
}
|
||||
}
|
||||
@ -2170,7 +2193,8 @@ Pag_struct& TSchedaPercipienti::calcola_riga_pag(Pag_struct& s,
|
||||
const real& h_PercRitenuta,
|
||||
const real& h_PercInps,
|
||||
const real& h_PercAssImpInps,
|
||||
const real& h_PercCommitInps) const
|
||||
const real& h_PercCommitInps,
|
||||
const int h_CodNonSogg) const
|
||||
{
|
||||
const int fdec = TCurrency::get_firm_dec();
|
||||
|
||||
@ -2186,9 +2210,8 @@ Pag_struct& TSchedaPercipienti::calcola_riga_pag(Pag_struct& s,
|
||||
// calcolo imponibile
|
||||
c.imponibile = (s.compenso - s.impcpa) * h_PercAssImp / CENTO;
|
||||
c.imponibile.round(fdec);
|
||||
//if (s.imponibile.is_zero() || force) // 18-02-2016 imponibile nullo ammissibile per minimi
|
||||
// if (force)
|
||||
s.imponibile = c.imponibile;
|
||||
if ((s.imponibile.is_zero() && s.perc > ZERO && h_CodNonSogg == 0) || force) // 18-02-2016 imponibile nullo ammissibile per minimi
|
||||
s.imponibile = c.imponibile; // 13-10-2017 testati i minimi con la causale s.perc > ZERO && h_CodNonSogg == 0 non è un minimo
|
||||
|
||||
// percentuale ritenuta acconto
|
||||
if (s.perc.is_zero() || force)
|
||||
|
@ -55,6 +55,7 @@ void TSchedaPercipienti::init_mask(TMask& m, bool inserimento)
|
||||
const real h_PercInps = cau.get_real("R1");
|
||||
const real h_PercAssImpInps = cau.get_real("R2");
|
||||
const real h_PercCommitInps = cau.get_real("R3");
|
||||
const int h_CodNonSogg = cau.get_int("I1");
|
||||
Pag_struct c;
|
||||
Pag_struct s;
|
||||
TToken_string& t = pags.row(0);
|
||||
@ -67,7 +68,8 @@ void TSchedaPercipienti::init_mask(TMask& m, bool inserimento)
|
||||
h_PercRitenuta,
|
||||
h_PercInps,
|
||||
h_PercAssImpInps,
|
||||
h_PercCommitInps);
|
||||
h_PercCommitInps,
|
||||
h_CodNonSogg);
|
||||
from_struct_to_sheet(s, t);
|
||||
// forzo ridisegno sheet
|
||||
pags.force_update();
|
||||
@ -790,7 +792,16 @@ bool TSchedaPercipienti::pag_standard_handler(TMask_field& f, KEY k)
|
||||
const real h_PercInps = mm.get_real(F_PERC_INPS);
|
||||
const real h_PercAssImpInps = mm.get_real(F_PERC_ASS_INPS);
|
||||
const real h_PercCommitInps = mm.get_real(F_PERC_COMMIT_INPS);
|
||||
|
||||
|
||||
const TString& codcau = mm.get(F_CODCAUS);
|
||||
TTable cau("%ca7");
|
||||
cau.zero();
|
||||
cau.put("CODTAB", codcau);
|
||||
if (cau.read() != NOERR)
|
||||
warning_box("Causale non presente in tabella");
|
||||
|
||||
const int h_CodNonSogg = cau.get_int("I1");
|
||||
|
||||
// inizializzo struttura calcolati
|
||||
a.clear_struct(c);
|
||||
|
||||
@ -810,7 +821,8 @@ bool TSchedaPercipienti::pag_standard_handler(TMask_field& f, KEY k)
|
||||
h_PercRitenuta,
|
||||
h_PercInps,
|
||||
h_PercAssImpInps,
|
||||
h_PercCommitInps);
|
||||
h_PercCommitInps,
|
||||
h_CodNonSogg);
|
||||
|
||||
// riporto valori a maschera
|
||||
a.from_struct_to_mask(s, f.mask());
|
||||
|
@ -159,7 +159,8 @@ class TSchedaPercipienti : public TRelation_application
|
||||
const real& h_PercRitenuta,
|
||||
const real& h_PercInps,
|
||||
const real& h_PercAssImpInps,
|
||||
const real& h_PercCommitInps) const;
|
||||
const real& h_PercCommitInps,
|
||||
const int h_CodNonSogg) const;
|
||||
void calcola_riga_pag (TRectype& rec,
|
||||
const real& h_PercAssImp,
|
||||
const real& h_PercCassaPrev,
|
||||
|
Loading…
x
Reference in New Issue
Block a user