Patch level : 10.0 218
Files correlati : 770mod.exe Ricompilazione Demo : [ ] Commento : Aggiorrnamento pagamenti da saldaconto sul 770 git-svn-id: svn://10.65.10.50/trunk@18164 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3c6fc7046e
commit
d69a5b2854
249
m770/770100.cpp
249
m770/770100.cpp
@ -7,6 +7,11 @@
|
|||||||
#include "rver.h"
|
#include "rver.h"
|
||||||
#include "rpag.h"
|
#include "rpag.h"
|
||||||
#include "perc.h"
|
#include "perc.h"
|
||||||
|
#include "../cg/cgsaldac.h"
|
||||||
|
#include <partite.h>
|
||||||
|
#include <scadenze.h>
|
||||||
|
#include <pagsca.h>
|
||||||
|
// per dinamica non riprendere #include "../ve/velib.h"
|
||||||
|
|
||||||
#include "770101.h"
|
#include "770101.h"
|
||||||
#include "770102.h"
|
#include "770102.h"
|
||||||
@ -17,8 +22,8 @@
|
|||||||
// Token_string pilota per relazione tra l'informazione e la
|
// Token_string pilota per relazione tra l'informazione e la
|
||||||
// sua posizione nello sheet, ogni riga individua uno sheet diverso
|
// sua posizione nello sheet, ogni riga individua uno sheet diverso
|
||||||
const char* PILOT_SHEET[] = {
|
const char* PILOT_SHEET[] = {
|
||||||
"DATAPAG|COMPENSO|SPESA|IMPONIBILE|PERC|RITENUTA|SOMREGCONV|ALQIMP10|CTSSNPERC|CTSSNCOMP|COD10|NETTO|SOMNSRIT|AMMLORDO|QUOTAPROV|IMPNETTO|COMNETTO|NUMVERS",
|
"DATAPAG|COMPENSO|SPESA|IMPONIBILE|PERC|RITENUTA|SOMREGCONV|ALQIMP10|CTSSNPERC|CTSSNCOMP|COD10|NETTO|SOMNSRIT|AMMLORDO|QUOTAPROV|IMPNETTO|COMNETTO|NUMVERS|NUMREG",
|
||||||
"DATAPAG|COMPENSO|IMPCPA|IMPONIBILE|PERC|RITENUTA|SPESA|SOMREGCONV|NETTO|SOMNSRIT|AMMLORDO|QUOTAPROV|IMPNETTO|COMNETTO|NUMVERS",
|
"DATAPAG|COMPENSO|IMPCPA|IMPONIBILE|PERC|RITENUTA|SPESA|SOMREGCONV|NETTO|SOMNSRIT|AMMLORDO|QUOTAPROV|IMPNETTO|COMNETTO|NUMVERS|NUMREG",
|
||||||
};
|
};
|
||||||
|
|
||||||
// Items per causale quadro SC
|
// Items per causale quadro SC
|
||||||
@ -132,6 +137,7 @@ TMask* TSchedaPercipienti::load_mask(int n)
|
|||||||
m->set_handler(F_CODDITTA, codditta_handler);
|
m->set_handler(F_CODDITTA, codditta_handler);
|
||||||
m->set_handler(F_CODANAGRCOM, codanagr_handler);
|
m->set_handler(F_CODANAGRCOM, codanagr_handler);
|
||||||
m->set_handler(F_CODANAGRPERC, codanagr_handler);
|
m->set_handler(F_CODANAGRPERC, codanagr_handler);
|
||||||
|
m->set_handler(F_AGGPAG, aggpag_handler);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
@ -252,6 +258,226 @@ bool TSchedaPercipienti::codanagr_handler(TMask_field& f, KEY k)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TSchedaPercipienti::calcola_riga_pag(TRectype & rec,
|
||||||
|
const real h_PercAssImp,
|
||||||
|
const real h_PercCassaPrev,
|
||||||
|
const real h_PercRitenuta,
|
||||||
|
const real h_PercInps,
|
||||||
|
const real h_PercAssImpInps,
|
||||||
|
const real h_PercCommitInps)
|
||||||
|
{
|
||||||
|
const int fdec = TCurrency::get_firm_dec();
|
||||||
|
real compenso = rec.get_real(PAG_COMPENSO);
|
||||||
|
real impcpa = (compenso * h_PercCassaPrev) / (CENTO + h_PercCassaPrev); impcpa.round(fdec); // calcolo CPA
|
||||||
|
rec.put(PAG_IMPCPA, impcpa);
|
||||||
|
real imponibile = ((compenso - impcpa) * h_PercAssImp) / CENTO; imponibile.round(fdec); // calcolo imponibile
|
||||||
|
rec.put(PAG_IMPONIBILE, imponibile);
|
||||||
|
real ritlorda = (imponibile * h_PercRitenuta) / CENTO; ritlorda.round(fdec); // calcolo ritenuta lorda
|
||||||
|
rec.put(PAG_RITLORDA, ritlorda);
|
||||||
|
const real detfamil = rec.get_real(PAG_DETFAMIL);
|
||||||
|
const real detlavdip = rec.get_real(PAG_DETLAVDIP);
|
||||||
|
const real totdet = detfamil + detlavdip;
|
||||||
|
const real ritenuta = totdet > ritlorda ? ZERO : ritlorda - totdet;
|
||||||
|
rec.put(PAG_RITENUTA, ritenuta);
|
||||||
|
real ctssncomp = (((compenso * h_PercAssImpInps) / CENTO) * h_PercInps) / CENTO; ctssncomp.round(fdec); // calcolo contributo Inps complessivo
|
||||||
|
rec.put(PAG_INPSCOMP, ctssncomp);
|
||||||
|
real ctssnperc = (h_PercCommitInps == ZERO) ? ctssncomp - ((ctssncomp * 2) / 3) : ctssncomp - ((ctssncomp * h_PercCommitInps) / CENTO); ctssnperc.round(fdec); // calcolo contributo Inps del percipiente
|
||||||
|
rec.put(PAG_INPSPERC, ctssnperc);
|
||||||
|
real utpagati = rec.get_real(PAG_UTPAGATI);
|
||||||
|
if (abs(utpagati) > abs(imponibile))
|
||||||
|
utpagati = imponibile;
|
||||||
|
real ritutpag = rec.get_real(PAG_RITUTPAG);
|
||||||
|
if (abs(ritutpag) > abs(ritenuta))
|
||||||
|
ritutpag = ritenuta;
|
||||||
|
rec.put(PAG_UTSPETT, imponibile - utpagati); // ? da verificare calcolo utili spettanti
|
||||||
|
rec.put(PAG_RITUTPAG, ritenuta - ritutpag); // ? da verificare calcolo ritenute utili spettanti
|
||||||
|
const real spesa = rec.get(PAG_SPESA);
|
||||||
|
const real netto = compenso + spesa - ritenuta - ctssnperc; // calcolo compenso netto
|
||||||
|
rec.put(PAG_NETTO, netto);
|
||||||
|
const real somregconv = rec.get_real(PAG_SOMREGCONV);
|
||||||
|
const real somnsrit = compenso - imponibile + spesa - impcpa - somregconv ; // calcolo somme non soggette a ritenuta
|
||||||
|
rec.put(PAG_SOMNSRIT, somnsrit);
|
||||||
|
real controbb = rec.get_real(PAG_SOMREGCONV);
|
||||||
|
const real ammlordo = imponibile + somnsrit + controbb + somregconv; // calcolo ammontare lordo
|
||||||
|
rec.put(PAG_AMMLORDO, ammlordo);
|
||||||
|
const real quotaprov = somnsrit - spesa; // calcolo quota provvigioni
|
||||||
|
rec.put(PAG_QUOTAPROV, quotaprov);
|
||||||
|
const real impnetto = imponibile - ritenuta; // calcolo imponibile al netto delle ritenute
|
||||||
|
rec.put(PAG_IMPNETTO, impnetto);
|
||||||
|
const real comnetto = compenso - ritenuta; // calcolo compenso al netto delle ritenute
|
||||||
|
rec.put(PAG_COMNETTO, comnetto);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TSchedaPercipienti::agg_pagamenti(const TRectype & sch)
|
||||||
|
{
|
||||||
|
const long numreg = sch.get_long(SCH_NUMREG);
|
||||||
|
|
||||||
|
if (numreg > 0)
|
||||||
|
{
|
||||||
|
TPartite_array partarr;
|
||||||
|
|
||||||
|
partarr.add_numreg(numreg);
|
||||||
|
if (partarr.items() > 0)
|
||||||
|
{
|
||||||
|
TSchedaPE sc;
|
||||||
|
bool pag_udated = false;
|
||||||
|
|
||||||
|
sc.lfile().curr() = sch;
|
||||||
|
sc.read(_isequal, _lock);
|
||||||
|
const real totrit = sc.lfile().get_real(SCH_TOTRIT);
|
||||||
|
const real totale = sc.lfile().get_real(SCH_TOTALE) - totrit;
|
||||||
|
const real spese = sc.lfile().get_real(SCH_SPESE);
|
||||||
|
const real iva = sc.lfile().get_real(SCH_IVA);
|
||||||
|
const real compenso = sc.lfile().get_real(SCH_COMPENSO);
|
||||||
|
real spperc = spese / totale; spperc.round(8);
|
||||||
|
real ivaperc = iva / totale; ivaperc.round(8);
|
||||||
|
|
||||||
|
TString16 codcau(sc.lfile().get("CODCAUS"));
|
||||||
|
const TRectype cau = cache().get("%CA7", codcau);
|
||||||
|
|
||||||
|
// leggo valori tabella causali per calcolo
|
||||||
|
const real h_PercAssImp = cau.get_real("R4");
|
||||||
|
const real h_PercCassaPrev = cau.get_real("R5");
|
||||||
|
const real h_PercRitenuta = cau.get_real("R0");
|
||||||
|
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 rows = sc.pag_items();
|
||||||
|
int rowpag = -1;
|
||||||
|
|
||||||
|
for (int i = 0; rowpag < 0 && i < rows; i++)
|
||||||
|
{
|
||||||
|
const TRectype & pagrec = sc.pag(i);
|
||||||
|
if (numreg == pagrec.get_long(PAG_NUMREG))
|
||||||
|
rowpag = i;
|
||||||
|
}
|
||||||
|
if (rowpag >= 0)
|
||||||
|
{
|
||||||
|
TRectype & pagrec = sc.pag(rowpag);
|
||||||
|
|
||||||
|
pagrec.zero(PAG_COMPENSO);
|
||||||
|
pagrec.zero(PAG_SPESA);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for (TPartita * p = partarr.first(); p != NULL; p =partarr.next())
|
||||||
|
{
|
||||||
|
const int row = p->prima_fattura(numreg);
|
||||||
|
|
||||||
|
if (row >= 0)
|
||||||
|
{
|
||||||
|
TRiga_partite & rigapart = p->riga(row);
|
||||||
|
int nrate = rigapart.rate();
|
||||||
|
TDate datapag;
|
||||||
|
|
||||||
|
for (int r = 1; r <= nrate; r++)
|
||||||
|
{
|
||||||
|
TRiga_scadenze & ratapart = rigapart.rata(r);
|
||||||
|
TImporto tot;
|
||||||
|
long numregp = 0L;
|
||||||
|
|
||||||
|
for (int rowp = ratapart.last(); rowp > 0; rowp = ratapart.pred(rowp))
|
||||||
|
{
|
||||||
|
const TRectype& pag = ratapart.row(rowp); // Riga pagamento
|
||||||
|
const TRiga_partite& sum = p->riga(rowp); // Riga partite
|
||||||
|
const char sez = sum.sezione();
|
||||||
|
TImporto imppag(sez, pag.get_real(PAGSCA_IMPORTO));
|
||||||
|
|
||||||
|
if (numregp == 0L)
|
||||||
|
numregp = sum.get_long(PART_NREG);
|
||||||
|
imppag += TImporto(sez, pag.get_real(PAGSCA_RITENUTE));
|
||||||
|
imppag += TImporto(sum.sezione_ritsoc(), pag.get_real(PAGSCA_RITSOC));
|
||||||
|
real abbuoni = pag.get_real(PAGSCA_ABBUONI);
|
||||||
|
real abb = pag.get_real(PAGSCA_ABBUONI);
|
||||||
|
if (!abb.is_zero())
|
||||||
|
imppag += TImporto(sez, abb);
|
||||||
|
tot += imppag;
|
||||||
|
if (!datapag.ok())
|
||||||
|
datapag = sum.get_date(PART_DATAPAG);
|
||||||
|
}
|
||||||
|
|
||||||
|
tot.normalize('D');
|
||||||
|
if (rowpag < 0)
|
||||||
|
{
|
||||||
|
if (tot.valore() == ZERO)
|
||||||
|
break;
|
||||||
|
rowpag = rows;
|
||||||
|
|
||||||
|
TRectype & pagrec = sc.pag(rowpag);
|
||||||
|
|
||||||
|
pagrec.put(PAG_CODDITTA, sc.lfile().get(SCH_CODDITTA));
|
||||||
|
pagrec.put(PAG_TIPOA, sc.lfile().get(SCH_TIPOA));
|
||||||
|
pagrec.put(PAG_CODANAGR, sc.lfile().get(SCH_CODANAGR));
|
||||||
|
pagrec.put(PAG_NPROG, sc.lfile().get(SCH_NPROG));
|
||||||
|
pagrec.put(PAG_NRIGA, rowpag + 1);
|
||||||
|
pagrec.put(PAG_NUMVERS, -1);
|
||||||
|
}
|
||||||
|
TRectype & pagrec = sc.pag(rowpag);
|
||||||
|
real spesepag = tot.valore() * spperc;
|
||||||
|
real ivapag = tot.valore() * ivaperc;
|
||||||
|
|
||||||
|
spesepag.round(TCurrency::get_firm_dec());
|
||||||
|
if (abs(spesepag) > abs(spese))
|
||||||
|
spesepag = spese;
|
||||||
|
ivapag.round(TCurrency::get_firm_dec());
|
||||||
|
if (abs(ivapag) > abs(iva))
|
||||||
|
ivapag = iva;
|
||||||
|
|
||||||
|
real compensopag = tot.valore() - spesepag - ivapag;
|
||||||
|
|
||||||
|
compensopag += compensopag * h_PercRitenuta;
|
||||||
|
compensopag.round(TCurrency::get_firm_dec());
|
||||||
|
if (abs(compensopag) > abs(compenso))
|
||||||
|
compensopag = compenso;
|
||||||
|
compensopag += pagrec.get_real(PAG_COMPENSO);
|
||||||
|
spesepag += pagrec.get_real(PAG_SPESA);
|
||||||
|
pagrec.put(PAG_COMPENSO, compensopag);
|
||||||
|
pagrec.put(PAG_SPESA, spesepag);
|
||||||
|
pagrec.put(PAG_DATAPAG, datapag);
|
||||||
|
pagrec.put(PAG_PERC, h_PercRitenuta); // percentuale ritenuta acconto
|
||||||
|
pagrec.put(PAG_ALQIMP10, h_PercAssImpInps);// percentuale 10% INPS
|
||||||
|
pagrec.put(PAG_NUMREG, numregp);
|
||||||
|
pagrec.put(PAG_COD10, "C");
|
||||||
|
calcola_riga_pag(pagrec, h_PercAssImp, h_PercCassaPrev, h_PercRitenuta, h_PercInps, h_PercAssImpInps, h_PercCommitInps);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sc.rewrite();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool schede(const TRelation& rel, void* pJolly)
|
||||||
|
{
|
||||||
|
const TRectype & sch = rel.lfile().curr();
|
||||||
|
TSchedaPercipienti * schper = (TSchedaPercipienti *) pJolly;
|
||||||
|
|
||||||
|
schper->agg_pagamenti(sch);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TSchedaPercipienti::aggpag_handler(TMask_field& f, KEY k)
|
||||||
|
{
|
||||||
|
if (k == K_SPACE)
|
||||||
|
{
|
||||||
|
TLocalisamfile fsch(LF_SCPERC);
|
||||||
|
TRectype from(fsch.curr());
|
||||||
|
TLocalisamfile mov(LF_MOV);
|
||||||
|
|
||||||
|
from.put("CODDITTA", prefix().get_codditta());
|
||||||
|
|
||||||
|
TRectype to(from);
|
||||||
|
TCursor c(new TRelation(LF_SCPERC), "", 1, &from, &to);
|
||||||
|
|
||||||
|
c.scan(schede, &app(), "Aggiornamento schede");
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool TSchedaPercipienti::esiste_perc(TMask& m, const char* codanag)
|
bool TSchedaPercipienti::esiste_perc(TMask& m, const char* codanag)
|
||||||
{
|
{
|
||||||
const char tipoa = m.get(F_TIPOA)[0];
|
const char tipoa = m.get(F_TIPOA)[0];
|
||||||
@ -605,6 +831,7 @@ void TSchedaPercipienti::rec2row(TToken_string& r, TRectype& rec, int row)
|
|||||||
s.quotaprov = rec.get_real("QUOTAPROV");
|
s.quotaprov = rec.get_real("QUOTAPROV");
|
||||||
s.impnetto = rec.get_real("IMPNETTO");
|
s.impnetto = rec.get_real("IMPNETTO");
|
||||||
s.comnetto = rec.get_real("COMNETTO");
|
s.comnetto = rec.get_real("COMNETTO");
|
||||||
|
s.numreg = rec.get_long(PAG_NUMREG);
|
||||||
|
|
||||||
// compilo riga di sheet
|
// compilo riga di sheet
|
||||||
from_struct_to_sheet(s, r);
|
from_struct_to_sheet(s, r);
|
||||||
@ -651,7 +878,7 @@ void TSchedaPercipienti::new_row(TSheet_field& ver_pag, int r, bool vers)
|
|||||||
if (vers)
|
if (vers)
|
||||||
riga.add(++_lastvers, COLONNE_SIGNIFICATIVE_SPREADSHEET_VERSAMENTI);
|
riga.add(++_lastvers, COLONNE_SIGNIFICATIVE_SPREADSHEET_VERSAMENTI);
|
||||||
else
|
else
|
||||||
riga.add(-1, num_sheet_column());
|
riga.add(-1, num_sheet_column() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -874,12 +1101,8 @@ void TSchedaPercipienti::mask2rel(const TMask& m)
|
|||||||
check_handler(datadoc, K_ENTER);
|
check_handler(datadoc, K_ENTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
const long numreg = _rel->lfile().get_long(SCH_NUMREG);
|
|
||||||
|
|
||||||
_rel->lfile().zero();
|
_rel->lfile().zero();
|
||||||
|
|
||||||
m.autosave(*_rel);
|
m.autosave(*_rel);
|
||||||
_rel->lfile().put(SCH_NUMREG, numreg);
|
|
||||||
|
|
||||||
// leggo chiave scheda
|
// leggo chiave scheda
|
||||||
const long codditta = m.get_long(F_CODDITTA);
|
const long codditta = m.get_long(F_CODDITTA);
|
||||||
@ -927,6 +1150,7 @@ void TSchedaPercipienti::mask2rel(const TMask& m)
|
|||||||
// ricalcolo riga pagamento
|
// ricalcolo riga pagamento
|
||||||
// (per ottenere la congruità dei dati semplicemente
|
// (per ottenere la congruità dei dati semplicemente
|
||||||
// registrando la scheda)
|
// registrando la scheda)
|
||||||
|
c.numreg = s.numreg;
|
||||||
calcola_riga_pag(s,
|
calcola_riga_pag(s,
|
||||||
c,
|
c,
|
||||||
FALSE,
|
FALSE,
|
||||||
@ -968,6 +1192,7 @@ void TSchedaPercipienti::mask2rel(const TMask& m)
|
|||||||
r.put("QUOTAPROV", s.quotaprov);
|
r.put("QUOTAPROV", s.quotaprov);
|
||||||
r.put("IMPNETTO", s.impnetto);
|
r.put("IMPNETTO", s.impnetto);
|
||||||
r.put("COMNETTO", s.comnetto);
|
r.put("COMNETTO", s.comnetto);
|
||||||
|
r.put(PAG_NUMREG, s.numreg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// salva versamenti
|
// salva versamenti
|
||||||
@ -1348,6 +1573,10 @@ Pag_struct& TSchedaPercipienti::from_sheet_to_struct(TToken_string& t, Pag_struc
|
|||||||
if ((pos = token_pos("NUMVERS")) != -1)
|
if ((pos = token_pos("NUMVERS")) != -1)
|
||||||
s.numvers = t.get_long(pos);
|
s.numvers = t.get_long(pos);
|
||||||
|
|
||||||
|
// set numero registrazione
|
||||||
|
if ((pos = token_pos(PAG_NUMREG)) != -1)
|
||||||
|
s.numreg = t.get_long(pos);
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1482,6 +1711,10 @@ void TSchedaPercipienti::from_struct_to_sheet(Pag_struct& s, TToken_string& t)
|
|||||||
// set numero versamento collegato
|
// set numero versamento collegato
|
||||||
if ((pos = token_pos("NUMVERS")) != -1)
|
if ((pos = token_pos("NUMVERS")) != -1)
|
||||||
t.add(s.numvers, pos);
|
t.add(s.numvers, pos);
|
||||||
|
|
||||||
|
// set numero registrazione
|
||||||
|
if ((pos = token_pos(PAG_NUMREG)) != -1)
|
||||||
|
t.add(s.numreg, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
Pag_struct& TSchedaPercipienti::from_mask_to_struct(TMask& m, Pag_struct& s)
|
Pag_struct& TSchedaPercipienti::from_mask_to_struct(TMask& m, Pag_struct& s)
|
||||||
@ -1884,6 +2117,8 @@ Pag_struct& TSchedaPercipienti::calcola_riga_pag(Pag_struct& s,
|
|||||||
|
|
||||||
// calcolo compenso al netto delle ritenute
|
// calcolo compenso al netto delle ritenute
|
||||||
s.comnetto = s.compenso - s.ritenuta;
|
s.comnetto = s.compenso - s.ritenuta;
|
||||||
|
|
||||||
|
s.numreg = c.numreg;
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#define F_CODANAGRPERC 207
|
#define F_CODANAGRPERC 207
|
||||||
#define F_RAGSOCCOM 208
|
#define F_RAGSOCCOM 208
|
||||||
#define F_RAGSOCPER 209
|
#define F_RAGSOCPER 209
|
||||||
|
#define F_AGGPAG 210
|
||||||
|
|
||||||
// m70100b
|
// m70100b
|
||||||
#define F_RAGSOC2 300
|
#define F_RAGSOC2 300
|
||||||
@ -43,6 +44,7 @@
|
|||||||
#define F_PAGAMENTI_DB 320 // sheet
|
#define F_PAGAMENTI_DB 320 // sheet
|
||||||
#define F_PAGAMENTI_G 321 // sheet
|
#define F_PAGAMENTI_G 321 // sheet
|
||||||
#define F_VERSAMENTI 322 // sheet
|
#define F_VERSAMENTI 322 // sheet
|
||||||
|
#define F_NUMREG 323
|
||||||
|
|
||||||
#define F_PERRIT 350 // mai visualizzato
|
#define F_PERRIT 350 // mai visualizzato
|
||||||
#define F_TOTRIT 351 // mai visualizzato ma con field
|
#define F_TOTRIT 351 // mai visualizzato ma con field
|
||||||
|
@ -9,6 +9,11 @@ BEGIN
|
|||||||
MESSAGE RUN,775,-0,#F_CODDITTA,#F_TIPOA,#F_CODANAGR
|
MESSAGE RUN,775,-0,#F_CODDITTA,#F_TIPOA,#F_CODANAGR
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BUTTON F_AGGPAG 22 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -23 -3 "~Aggiornamento pagamenti"
|
||||||
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Scheda percipienti" -1 -1 78 21
|
PAGE "Scheda percipienti" -1 -1 78 21
|
||||||
|
@ -219,6 +219,13 @@ BEGIN
|
|||||||
HELP "Inserire l'anno di competenza"
|
HELP "Inserire l'anno di competenza"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
NUMBER F_NUMREG 7
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 6 "Registrazione num. "
|
||||||
|
FIELD LF_SCPERC->NUMREG
|
||||||
|
FLAGS "RD"
|
||||||
|
END
|
||||||
|
|
||||||
TEXT DLG_NULL
|
TEXT DLG_NULL
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 7 "@bPagamenti"
|
PROMPT 1 7 "@bPagamenti"
|
||||||
@ -245,6 +252,7 @@ BEGIN
|
|||||||
ITEM "Imp.netto rit.@15"
|
ITEM "Imp.netto rit.@15"
|
||||||
ITEM "Comp.netto rit.@15"
|
ITEM "Comp.netto rit.@15"
|
||||||
ITEM "Numver@5"
|
ITEM "Numver@5"
|
||||||
|
ITEM "Reg.num.@7"
|
||||||
FLAGS "H"
|
FLAGS "H"
|
||||||
END
|
END
|
||||||
|
|
||||||
@ -266,6 +274,7 @@ BEGIN
|
|||||||
ITEM "Imp.netto rit.@15"
|
ITEM "Imp.netto rit.@15"
|
||||||
ITEM "Comp.netto rit.@15"
|
ITEM "Comp.netto rit.@15"
|
||||||
ITEM "Numver@5"
|
ITEM "Numver@5"
|
||||||
|
ITEM "Reg.num.@7"
|
||||||
FLAGS "H"
|
FLAGS "H"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@ -155,6 +155,13 @@ END
|
|||||||
// Fine campi gestiti a programma ma non a maschera
|
// Fine campi gestiti a programma ma non a maschera
|
||||||
// ------------------------------------------------
|
// ------------------------------------------------
|
||||||
|
|
||||||
|
NUMBER 116 7
|
||||||
|
BEGIN
|
||||||
|
PROMPT 33 11 "Registrazione num."
|
||||||
|
FLAGS "DR"
|
||||||
|
FIELD LF_RPAG->NUMREG
|
||||||
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 9 2
|
BUTTON DLG_OK 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -13 -1 ""
|
PROMPT -13 -1 ""
|
||||||
|
@ -201,6 +201,13 @@ END
|
|||||||
// Fine campi gestiti a programma ma non a maschera
|
// Fine campi gestiti a programma ma non a maschera
|
||||||
// ------------------------------------------------
|
// ------------------------------------------------
|
||||||
|
|
||||||
|
NUMBER 119 7
|
||||||
|
BEGIN
|
||||||
|
PROMPT 33 14 "Registrazione num. "
|
||||||
|
FLAGS "DR"
|
||||||
|
FIELD LF_RPAG->NUMREG
|
||||||
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 9 2
|
BUTTON DLG_OK 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -13 -1 ""
|
PROMPT -13 -1 ""
|
||||||
|
@ -75,6 +75,8 @@ class TSchedaPercipienti : public TRelation_application
|
|||||||
static bool codditta_handler (TMask_field& f, KEY key);
|
static bool codditta_handler (TMask_field& f, KEY key);
|
||||||
static bool codanagr_handler (TMask_field& f, KEY key);
|
static bool codanagr_handler (TMask_field& f, KEY key);
|
||||||
static bool nprog_handler (TMask_field& f, KEY key);
|
static bool nprog_handler (TMask_field& f, KEY key);
|
||||||
|
static bool aggpag_handler (TMask_field& f, KEY key);
|
||||||
|
|
||||||
|
|
||||||
// Handler del documento
|
// Handler del documento
|
||||||
static bool check_handler(TMask_field& f, KEY key);
|
static bool check_handler(TMask_field& f, KEY key);
|
||||||
@ -158,6 +160,14 @@ class TSchedaPercipienti : public TRelation_application
|
|||||||
const real h_PercInps,
|
const real h_PercInps,
|
||||||
const real h_PercAssImpInps,
|
const real h_PercAssImpInps,
|
||||||
const real h_PercCommitInps);
|
const real h_PercCommitInps);
|
||||||
|
void calcola_riga_pag (TRectype & rec,
|
||||||
|
const real h_PercAssImp,
|
||||||
|
const real h_PercCassaPrev,
|
||||||
|
const real h_PercRitenuta,
|
||||||
|
const real h_PercInps,
|
||||||
|
const real h_PercAssImpInps,
|
||||||
|
const real h_PercCommitInps);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool user_create();
|
virtual bool user_create();
|
||||||
@ -196,6 +206,7 @@ class TSchedaPercipienti : public TRelation_application
|
|||||||
bool coll_variazione() const;
|
bool coll_variazione() const;
|
||||||
bool coll_datanum() const { return _coll._datadoc.not_empty() && _coll._numdoc.not_empty(); }
|
bool coll_datanum() const { return _coll._datadoc.not_empty() && _coll._numdoc.not_empty(); }
|
||||||
bool esiste_perc(TMask& m, const char* coda=NULL);
|
bool esiste_perc(TMask& m, const char* coda=NULL);
|
||||||
|
void agg_pagamenti(const TRectype & sch);
|
||||||
|
|
||||||
TSheet_field& pags() const;
|
TSheet_field& pags() const;
|
||||||
TSheet_field& vers() const;
|
TSheet_field& vers() const;
|
||||||
|
@ -398,6 +398,7 @@ struct Pag_struct
|
|||||||
real quotaprov;
|
real quotaprov;
|
||||||
real impnetto;
|
real impnetto;
|
||||||
real comnetto;
|
real comnetto;
|
||||||
|
long numreg;
|
||||||
|
|
||||||
// overloading operatore di confronto
|
// overloading operatore di confronto
|
||||||
int operator==(Pag_struct& s);
|
int operator==(Pag_struct& s);
|
||||||
|
@ -39,5 +39,6 @@
|
|||||||
#define PAG_QUOTAPROV "QUOTAPROV"
|
#define PAG_QUOTAPROV "QUOTAPROV"
|
||||||
#define PAG_IMPNETTO "IMPNETTO"
|
#define PAG_IMPNETTO "IMPNETTO"
|
||||||
#define PAG_COMNETTO "COMNETTO"
|
#define PAG_COMNETTO "COMNETTO"
|
||||||
|
#define PAG_NUMREG "NUMREG"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user