Patch level : 2.1 72
Files correlati : cg0.exe cg2.exe cg2100s.msk cg6.exe sc0.exe f28.dir f28.trr f30.dir f30.trr Ricompilazione Demo : [ ] Commento : 0000070 Implementare nella maschera di pagamento un nuovo campo per il pagamento delle ritenute sociali. git-svn-id: svn://10.65.10.50/trunk@12207 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a24894fd1c
commit
2f5a8118b2
@ -246,19 +246,20 @@ void TCaus_app::causale_inc_pag()
|
||||
if (_tipo_des != incasso_pagamento)
|
||||
{
|
||||
int i = 0;
|
||||
set_descr(i++, TR("C Clienti/Fornitori"));
|
||||
set_descr(i++, TR("C Clienti/Fornitori")); // 2
|
||||
set_descr(i++, TR("C Cassa o banca"));
|
||||
set_descr(i++, TR("C Tratta"));
|
||||
set_descr(i++, TR("C Tratta")); // 4
|
||||
set_descr(i++, TR("C Ricevuta bancaria"));
|
||||
set_descr(i++, TR("C Cessione"));
|
||||
set_descr(i++, TR("C Cessione")); // 6
|
||||
set_descr(i++, TR("C Paghero'"));
|
||||
set_descr(i++, TR("C Lettera di credito"));
|
||||
set_descr(i++, TR("C Lettera di credito"));// 8
|
||||
set_descr(i++, TR("C Tratta accettata"));
|
||||
set_descr(i++, TR("C Abbuoni pass./sc."));
|
||||
set_descr(i++, TR("C Abbuoni att./sc."));
|
||||
set_descr(i++, TR("C Abbuoni att./sc.")); // 10
|
||||
set_descr(i++, TR("C Spese e rimborsi"));
|
||||
set_descr(i++, TR("C Ritenute fiscali"));
|
||||
set_descr(i++, TR("C Ritenute fiscali")); // 12
|
||||
set_descr(i++, TR("C Differenza cambio"));
|
||||
set_descr(i++, TR("C Ritenute sociali")); // 14
|
||||
_tipo_des = incasso_pagamento;
|
||||
carica_righe_libere(i);
|
||||
}
|
||||
@ -700,11 +701,7 @@ void TCaus_app::load_rcaus(TMask& m)
|
||||
d = r.get(RCA_CODDESC);
|
||||
da.cut(0);
|
||||
if (d.not_empty())
|
||||
{
|
||||
const TRectype & dpn = cache().get("%DPN", d);
|
||||
|
||||
da = dpn.get("S0");
|
||||
}
|
||||
da = cache().get("%DPN", d, "S0");
|
||||
|
||||
TBill tc(g,c,s,cf);
|
||||
add_riga(i-1, sz, tc, d, da);
|
||||
|
@ -2149,7 +2149,7 @@ bool TStampa_IVdirettiva::devo_stampare_risultato_prima_delle_imposte() const
|
||||
if (_let_da_stamp != 'E')
|
||||
return FALSE;
|
||||
|
||||
if (atoi(_num_da_stamp) <= 21)
|
||||
if (atoi(_num_da_stamp) < 22)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
@ -2174,13 +2174,21 @@ void TStampa_IVdirettiva::stampa_risultato_prima_delle_imposte()
|
||||
// _totale_economico += _sale; // Guy was here 18/02/2004: Altrimenti ignora la prima imposta
|
||||
|
||||
// Guy was here 05/03/2004: La prima imposta e' gia' stata sommata
|
||||
const real te = _totale_economico-_sale;
|
||||
// const real te = _totale_economico -_sale;
|
||||
|
||||
// Guy was here 08/06/2004: Nuova moda non capibile
|
||||
const real te = _totale_economico;
|
||||
|
||||
set_row (_i,"@4g%s@81g%r", TR("Risultato prima delle imposte"), &te);
|
||||
|
||||
if (raff)
|
||||
{
|
||||
// Guy was here 10/03/2004: La prima imposta e' gia' stata sommata anche qui
|
||||
const real te = _totale_economico_raf-_salerafr;
|
||||
// const real te = _totale_economico_raf -_salerafr;
|
||||
|
||||
// Guy was here 08/06/2004: Nuova moda non capibile
|
||||
const real te = _totale_economico_raf;
|
||||
|
||||
set_row (_i,"@111g%r", &te);
|
||||
}
|
||||
_i++;
|
||||
|
@ -350,7 +350,7 @@ bool TPrimanota_application::read_caus(const char* cod, int year)
|
||||
char tipr = ' ';
|
||||
if (is_pagamento())
|
||||
{
|
||||
if (nriga <= RIGA_DIFFCAM && nriga != RIGA_SPESE)
|
||||
if (nriga <= RIGA_PAG_RITSOC && nriga != RIGA_SPESE)
|
||||
continue; // Si considerano solo le spese
|
||||
tipr = 'G';
|
||||
}
|
||||
@ -510,7 +510,7 @@ void TPrimanota_application::init_mask(TMask& m)
|
||||
{
|
||||
const TPartita* game = partite().first();
|
||||
_scad_free = game == NULL || !game->esistono_abbuoni_diffcam(m.get_long(F_NUMREG));
|
||||
if (m.edit_mode())
|
||||
if (m.edit_mode() && !_scad_free)
|
||||
m.enable(DLG_DELREC, _scad_free); // Disabilita tasto elimina
|
||||
m.enable(-1, _scad_free); // Disabilita cliente
|
||||
m.enable(-2, _scad_free);
|
||||
@ -1058,8 +1058,7 @@ void TPrimanota_application::mask2rel(const TMask& m)
|
||||
const TClinton c(row, TRUE);
|
||||
const int rimp = clint2pos(c, 'I')+1;
|
||||
r.put(RMI_RIGAIMP, rimp);
|
||||
c.put(r);
|
||||
|
||||
c.put(r);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
#define S_IMPORTOVAL 115
|
||||
#define S_SALDOACC 116
|
||||
#define S_RESIDUORATA 117
|
||||
#define S_RITSOC 118
|
||||
#define S_DATAPAG 119
|
||||
#define S_TIPOPAG 120
|
||||
#define S_TIPO 121
|
||||
|
@ -74,7 +74,7 @@ END
|
||||
|
||||
STRING S_CODVAL 3
|
||||
BEGIN
|
||||
PROMPT 41 9 "Codice valuta "
|
||||
PROMPT 41 10 "Codice valuta "
|
||||
FLAGS "DU"
|
||||
END
|
||||
|
||||
@ -118,6 +118,13 @@ BEGIN
|
||||
MESSAGE DIRTY,S_IMPORTO|K_TAB,S_IMPORTO
|
||||
END
|
||||
|
||||
CURRENCY S_RITSOC 18
|
||||
BEGIN
|
||||
PROMPT 41 9 "Ritenute sociali "
|
||||
FIELD RITSOC
|
||||
MESSAGE DIRTY,S_IMPORTO|K_TAB,S_IMPORTO
|
||||
END
|
||||
|
||||
CURRENCY S_IMPORTOVAL 18
|
||||
BEGIN
|
||||
PROMPT 2 9 "Importo in valuta "
|
||||
@ -137,7 +144,7 @@ END
|
||||
|
||||
LIST S_TIPOPAG 1 33
|
||||
BEGIN
|
||||
PROMPT 27 10 "Tipo pagamento "
|
||||
PROMPT 26 11 "Tipo pagamento "
|
||||
ITEM "1|Rimessa Diretta"
|
||||
ITEM "2|Tratta"
|
||||
ITEM "3|Ricevuta Bancaria"
|
||||
|
@ -436,7 +436,7 @@ void TMovimentoPN::adjust_rowtypes()
|
||||
|
||||
if (!ritfis && importo == mov.get_real(MOV_RITFIS))
|
||||
{
|
||||
TBill conto_rit; causale.bill(RIGA_RITENUTE_FISCALI, conto_rit);
|
||||
TBill conto_rit; causale.bill(RIGA_PAG_RITFIS, conto_rit);
|
||||
if (!conto_rit.ok() || conto_rit == bill)
|
||||
{
|
||||
row.put(RMV_ROWTYPE, 'F');
|
||||
@ -447,7 +447,7 @@ void TMovimentoPN::adjust_rowtypes()
|
||||
|
||||
if (!ritsoc && importo == mov.get_real(MOV_RITSOC))
|
||||
{
|
||||
TBill conto_rit; causale.bill(RIGA_RITENUTE_SOCIALI, conto_rit);
|
||||
TBill conto_rit; causale.bill(RIGA_PAG_RITSOC, conto_rit);
|
||||
if (!conto_rit.ok() || conto_rit == bill)
|
||||
{
|
||||
row.put(RMV_ROWTYPE, 'S');
|
||||
|
@ -103,17 +103,19 @@ real TPrimanota_application::totale_documento()
|
||||
{
|
||||
const TMask& m = curr_mask();
|
||||
|
||||
const bool swapt = test_swap(FALSE); // Totale invertito ?
|
||||
const bool swaps = test_swap(TRUE); // Ritenute sociali invertite ?
|
||||
|
||||
real tot(m.get(F_TOTALE)); // Legge totale
|
||||
const real ritfis(m.get(F_RITFIS));
|
||||
tot += ritfis; // Somma ritenute fiscali
|
||||
|
||||
real ritsoc(m.get(F_RITSOC));
|
||||
if (swapt ^ swaps)
|
||||
ritsoc = -ritsoc;
|
||||
tot += ritsoc; // Somma ritenute sociali con segno
|
||||
const real ritsoc(m.get(F_RITSOC));
|
||||
|
||||
const bool swapt = test_swap(FALSE); // Totale invertito ?
|
||||
const bool swaps = test_swap(TRUE); // Ritenute sociali invertite ?
|
||||
if (swapt ^ swaps) // Somma ritenute sociali con segno
|
||||
tot -= ritsoc;
|
||||
else
|
||||
tot += ritsoc;
|
||||
|
||||
return tot;
|
||||
}
|
||||
@ -421,7 +423,7 @@ int TPrimanota_application::set_cgs_row(int n, const TImporto& imp,
|
||||
TSheet_field& cg = cgs();
|
||||
if (n < 0) n = cg.first_empty();
|
||||
TToken_string& row = cg.row(n);
|
||||
row = "";
|
||||
row.cut(0);
|
||||
imp.add_to(row, 0);
|
||||
row.add(conto.string(0x3));
|
||||
row.add(""); // Codice decrizione
|
||||
@ -694,7 +696,7 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
|
||||
TImporto saldaconto, saldaconto_val;
|
||||
|
||||
TSheet_field& cg = a.cgs();
|
||||
bool empty = TRUE;
|
||||
bool empty = true;
|
||||
for (int i = 0; i < cg.items(); i++)
|
||||
{
|
||||
TToken_string& r = cg.row(i);
|
||||
@ -724,7 +726,7 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
|
||||
return f.error_box("Il conto di contropartita della riga %d non esiste", i+1);
|
||||
}
|
||||
|
||||
empty = FALSE;
|
||||
empty = false;
|
||||
if (paga || nota)
|
||||
{
|
||||
const char tipo = row_type(r);
|
||||
@ -2927,7 +2929,7 @@ bool TPrimanota_application::protiva_handler(TMask_field& f, KEY key)
|
||||
|
||||
|
||||
// Handler of the F_RITFIS
|
||||
// Certified 99%
|
||||
// Certified 100%
|
||||
bool TPrimanota_application::ritfis_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (key == K_TAB && f.focusdirty())
|
||||
@ -2937,7 +2939,7 @@ bool TPrimanota_application::ritfis_handler(TMask_field& f, KEY key)
|
||||
|
||||
|
||||
// Handler of F_RITSOC
|
||||
// Certified 99%
|
||||
// Certified 100%
|
||||
bool TPrimanota_application::ritsoc_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (key == K_TAB && f.focusdirty())
|
||||
|
@ -184,7 +184,12 @@ char TCausale::sezione_clifo()
|
||||
char TCausale::sezione_ritsoc()
|
||||
{
|
||||
if (_sezione_ritsoc == ' ')
|
||||
_sezione_ritsoc = sezione(9);
|
||||
{
|
||||
if (_rec.get_int(CAU_TIPOMOV) <= 2)
|
||||
_sezione_ritsoc = sezione(9); // Fatture
|
||||
else
|
||||
_sezione_ritsoc = sezione(14); // Pagamenti
|
||||
}
|
||||
return _sezione_ritsoc;
|
||||
}
|
||||
|
||||
|
@ -68,13 +68,16 @@ public:
|
||||
#define RIGA_IVA_DETRAIBILE 3
|
||||
#define RIGA_IVA_NON_DETRAIBILE 4
|
||||
|
||||
// Fatture
|
||||
#define RIGA_RITENUTE_FISCALI 8
|
||||
#define RIGA_RITENUTE_SOCIALI 9
|
||||
|
||||
// Pagamenti
|
||||
#define RIGA_ABBUONI_PASSIVI 9
|
||||
#define RIGA_ABBUONI_ATTIVI 10
|
||||
#define RIGA_SPESE 11
|
||||
#define RIGA_RITENUTE 12
|
||||
#define RIGA_PAG_RITFIS 12
|
||||
#define RIGA_DIFFCAM 13
|
||||
#define RIGA_PAG_RITSOC 14
|
||||
|
||||
#endif
|
||||
|
@ -1176,8 +1176,6 @@ bool TPrimanota_application::notify_edit_pagamento(TPartita& p, TRectype& new_pa
|
||||
set_cgs_row(old_riga, imp, old_conto, "", 'I');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Importo della contropartita
|
||||
if (!new_importo.is_zero() && new_conto.ok())
|
||||
{
|
||||
@ -1210,7 +1208,7 @@ bool TPrimanota_application::notify_edit_pagamento(TPartita& p, TRectype& new_pa
|
||||
}
|
||||
}
|
||||
|
||||
// Aggiornamento ritenute
|
||||
// Aggiornamento ritenute fiscali
|
||||
const real old_ritenute(old_pag.get(PAGSCA_RITENUTE));
|
||||
const real new_ritenute(new_pag.get(PAGSCA_RITENUTE));
|
||||
if (old_ritenute != new_ritenute)
|
||||
@ -1219,8 +1217,8 @@ bool TPrimanota_application::notify_edit_pagamento(TPartita& p, TRectype& new_pa
|
||||
const int riga = type2pos('F');
|
||||
if (riga < 0)
|
||||
{
|
||||
TBill conto_rit; causale().bill(RIGA_RITENUTE, conto_rit);
|
||||
const TString desc(causale().desc_agg(RIGA_RITENUTE));
|
||||
TBill conto_rit; causale().bill(RIGA_PAG_RITFIS, conto_rit);
|
||||
const TString desc(causale().desc_agg(RIGA_PAG_RITFIS));
|
||||
set_cgs_row(riga, grow_ritenute, conto_rit, desc, 'F');
|
||||
}
|
||||
else
|
||||
@ -1229,6 +1227,26 @@ bool TPrimanota_application::notify_edit_pagamento(TPartita& p, TRectype& new_pa
|
||||
if (empty) sheet.destroy(riga);
|
||||
}
|
||||
}
|
||||
|
||||
// Aggiornamento ritenute sociali
|
||||
const real old_ritsoc(old_pag.get(PAGSCA_RITSOC));
|
||||
const real new_ritsoc(new_pag.get(PAGSCA_RITSOC));
|
||||
if (old_ritsoc != new_ritsoc)
|
||||
{
|
||||
const TImporto grow_ritenute(causale().sezione_ritsoc(), new_ritsoc-old_ritsoc);
|
||||
const int riga = type2pos('S');
|
||||
if (riga < 0)
|
||||
{
|
||||
TBill conto_rit; causale().bill(RIGA_PAG_RITSOC, conto_rit);
|
||||
const TString desc(causale().desc_agg(RIGA_PAG_RITSOC));
|
||||
set_cgs_row(riga, grow_ritenute, conto_rit, desc, 'S');
|
||||
}
|
||||
else
|
||||
{
|
||||
const bool empty = add_cgs_imp(riga, grow_ritenute);
|
||||
if (empty) sheet.destroy(riga);
|
||||
}
|
||||
}
|
||||
} // if (deleting >= 0)
|
||||
|
||||
char old_ap, new_ap;
|
||||
@ -1338,7 +1356,8 @@ bool TPrimanota_application::notify_cgline_deletion(TPartita& partita, long nreg
|
||||
TRectype nul_pag(scad.row(s));
|
||||
nul_pag.zero(PAGSCA_IMPORTO);
|
||||
nul_pag.zero(PAGSCA_IMPORTOVAL);
|
||||
nul_pag.zero(PAGSCA_RITENUTE);
|
||||
nul_pag.zero(PAGSCA_RITENUTE);
|
||||
nul_pag.zero(PAGSCA_RITSOC);
|
||||
nul_pag.put(PAGSCA_ACCSAL, 'A');
|
||||
const TValuta val; // Non cambiare valuta
|
||||
notify_edit_pagamento(partita, nul_pag, val, numrig);
|
||||
@ -1360,7 +1379,8 @@ bool TPrimanota_application::notify_cgline_deletion(TPartita& partita, long nreg
|
||||
TRectype nul_pag(unas.row(u, FALSE));
|
||||
nul_pag.zero(PAGSCA_IMPORTO);
|
||||
nul_pag.zero(PAGSCA_IMPORTOVAL);
|
||||
nul_pag.zero(PAGSCA_RITENUTE);
|
||||
nul_pag.zero(PAGSCA_RITENUTE);
|
||||
nul_pag.zero(PAGSCA_RITSOC);
|
||||
nul_pag.put(PAGSCA_ACCSAL, 'A'); // Inutile, ma l'ho copiato da sopra
|
||||
const TValuta val; // Non cambiare valuta
|
||||
notify_edit_pagamento(partita, nul_pag, val, numrig);
|
||||
|
@ -106,6 +106,7 @@ class TPay_mask : public TMask
|
||||
|
||||
bool _assigned;
|
||||
bool _can_solder;
|
||||
bool _swap_ritsoc;
|
||||
|
||||
protected:
|
||||
static bool importo_handler(TMask_field& f, KEY k);
|
||||
@ -206,11 +207,13 @@ void TPay_mask::attiva_valuta(bool in_valuta)
|
||||
set_handler(S_IMPORTO, importo_handler);
|
||||
|
||||
enable(S_RITENUTE, !in_valuta); // dis/abilita ritenute
|
||||
enable(S_RITSOC, !in_valuta);
|
||||
enable(S_IMPORTOVAL, in_valuta);
|
||||
|
||||
if (in_valuta)
|
||||
{
|
||||
reset(S_RITENUTE);
|
||||
reset(S_RITSOC);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -227,6 +230,7 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad,
|
||||
const TRiga_partite& sum = p.riga(nrigp);
|
||||
_assigned = oldpag.get_int(PAGSCA_NRIGA) != TPartita::UNASSIGNED;
|
||||
_tipomov = (tipo_movimento)sum.get_int(PART_TIPOMOV);
|
||||
_swap_ritsoc = sum.sezione() != sum.sezione_ritsoc();
|
||||
|
||||
const TRiga_partite& fatt = _assigned ? scad.riga() : sum;
|
||||
|
||||
@ -312,7 +316,14 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad,
|
||||
|
||||
real oldimp = oldpag.get_real(in_valuta ? PAGSCA_IMPORTOVAL : PAGSCA_IMPORTO);
|
||||
if (!in_valuta)
|
||||
oldimp += oldpag.get_real(PAGSCA_RITENUTE);
|
||||
{
|
||||
oldimp += oldpag.get_real(PAGSCA_RITENUTE);
|
||||
|
||||
if (_swap_ritsoc)
|
||||
oldimp -= oldpag.get_real(PAGSCA_RITSOC);
|
||||
else
|
||||
oldimp += oldpag.get_real(PAGSCA_RITSOC);
|
||||
}
|
||||
|
||||
// Ricorda l'importo da pagare
|
||||
_da_pagare += oldimp;
|
||||
@ -365,6 +376,7 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad,
|
||||
|
||||
const bool mostra_ritenute = !sum.is_nota_credito();
|
||||
show(S_RITENUTE, mostra_ritenute);
|
||||
show(S_RITSOC, mostra_ritenute);
|
||||
}
|
||||
|
||||
void TPay_mask::get_pag(TRectype& newpag, TRectype& sum) const
|
||||
@ -437,7 +449,14 @@ bool TPay_mask::importo_handler(TMask_field& f, KEY k)
|
||||
#endif
|
||||
|
||||
if (m.field(S_RITENUTE).active())
|
||||
imp -= real(m.get(S_RITENUTE));
|
||||
imp -= m.get_real(S_RITENUTE);
|
||||
if (m.field(S_RITSOC).active())
|
||||
{
|
||||
if (m._swap_ritsoc)
|
||||
imp += m.get_real(S_RITSOC);
|
||||
else
|
||||
imp -= m.get_real(S_RITSOC);
|
||||
}
|
||||
|
||||
f.set(imp.string());
|
||||
k = K_TAB;
|
||||
@ -451,7 +470,14 @@ bool TPay_mask::importo_handler(TMask_field& f, KEY k)
|
||||
|
||||
real i(f.get());
|
||||
if (m.field(S_RITENUTE).active())
|
||||
i += real(m.get(S_RITENUTE));
|
||||
i += m.get_real(S_RITENUTE);
|
||||
if (m.field(S_RITSOC).active())
|
||||
{
|
||||
if (m._swap_ritsoc)
|
||||
i -= m.get_real(S_RITSOC);
|
||||
else
|
||||
i += m.get_real(S_RITSOC);
|
||||
}
|
||||
|
||||
TMask_field& sa = m.field(S_SALDOACC);
|
||||
TMaskmode mod = (TMaskmode)m.mode();
|
||||
@ -980,6 +1006,15 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
|
||||
gm.add_importo(rrit, rit, FALSE);
|
||||
rrit.add(sum.get(PART_TIPOMOV), 11);
|
||||
}
|
||||
|
||||
const TImporto soc(sum.sezione_ritsoc(), pag.get_real(PAGSCA_RITSOC));
|
||||
if (!soc.is_zero())
|
||||
{
|
||||
TToken_string& rrit = gm.add_colored_row(sheet, 'R');
|
||||
rrit.add(TR("Ritenute sociali"), 4);
|
||||
gm.add_importo(rrit, soc, FALSE);
|
||||
rrit.add(sum.get(PART_TIPOMOV), 11);
|
||||
}
|
||||
}
|
||||
|
||||
// Gli abbuoni e le differenze cambio esistono solo se e' a saldo
|
||||
@ -1026,13 +1061,13 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
|
||||
rsal.add(TR("Saldo rata "), 4); rsal << ra;
|
||||
if (!scad.chiusa())
|
||||
{
|
||||
TImporto sl = scad.residuo(FALSE);
|
||||
TImporto sl = scad.residuo(false);
|
||||
gm.add_importo(rsal, sl);
|
||||
tot_lit += sl;
|
||||
|
||||
if (in_valuta)
|
||||
{
|
||||
sl = scad.residuo(TRUE, 0xB);
|
||||
sl = scad.residuo(true, 0xB);
|
||||
gm.add_importo(rsal, sl, prima_valuta.codice());
|
||||
tot_val += sl;
|
||||
}
|
||||
@ -1087,6 +1122,16 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
|
||||
row.add(sum.get(PART_TIPOMOV), 11);
|
||||
tot_lit += rit;
|
||||
}
|
||||
|
||||
const TImporto soc(sum.sezione_ritsoc(), pag.get_real(PAGSCA_RITSOC));
|
||||
if (!soc.is_zero())
|
||||
{
|
||||
TToken_string& row = gm.add_colored_row(sheet, 'R');
|
||||
row.add(TR("Ritenute sociali"), 4);
|
||||
gm.add_importo(row, soc, FALSE);
|
||||
row.add(sum.get(PART_TIPOMOV), 11);
|
||||
tot_lit += soc;
|
||||
}
|
||||
}
|
||||
|
||||
if (lastrow > 0)
|
||||
@ -1823,7 +1868,8 @@ bool TGame_mask::edit_pagamento(TPartita& p, int nriga, int nrata, int nrigp) co
|
||||
|
||||
const bool nuovo = oldpag.get(PAGSCA_ACCSAL) != "S" &&
|
||||
oldpag.get_real(PAGSCA_IMPORTO).is_zero() &&
|
||||
oldpag.get_real(PAGSCA_RITENUTE).is_zero();
|
||||
oldpag.get_real(PAGSCA_RITENUTE).is_zero() &&
|
||||
oldpag.get_real(PAGSCA_RITSOC).is_zero();
|
||||
|
||||
/*
|
||||
TPay_mask m(this, nuovo ? MODE_INS : MODE_MOD);
|
||||
@ -1876,6 +1922,7 @@ bool TGame_mask::edit_pagamento(TPartita& p, int nriga, int nrata, int nrigp) co
|
||||
newpag.zero(PAGSCA_IMPORTO); // Azzera importo ...
|
||||
newpag.zero(PAGSCA_IMPORTOVAL); // .. anche in valuta
|
||||
newpag.zero(PAGSCA_RITENUTE); // Azzera ritenute
|
||||
newpag.zero(PAGSCA_RITSOC);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ TContoOccas::TContoOccas()
|
||||
const TContoOccas& TContoOccas::set(int g, int c, long s, char t, const char* occfpi)
|
||||
{
|
||||
TBill::set(g,c,s,t);
|
||||
_occfpi = occfpi;
|
||||
_occfpi = t > ' ' ? occfpi : "";
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -1097,7 +1097,6 @@ void TStampa_giornale::set_rows (int file, int counter)
|
||||
else
|
||||
_tc.set(g,c,s,cf,"");
|
||||
|
||||
|
||||
TParagraph_string descr_conto("", 198);
|
||||
if (_stampa_width == 132)
|
||||
descr_conto.set_width (WCONTO132);
|
||||
|
@ -1451,6 +1451,7 @@ void TRic_tab::ricevi_movSC(TString& key, char uselab)
|
||||
partita.put(PART_IMPTOTDOC, _tpart->get_real(PART_IMPTOTDOC));
|
||||
partita.put(PART_IMPTOTVAL, _tpart->get_real(PART_IMPTOTVAL));
|
||||
partita.put(PART_RITENUTE, _tpart->get_real(PART_RITENUTE));
|
||||
partita.put(PART_RITSOC, _tpart->get_real(PART_RITSOC));
|
||||
partita.put(PART_SEZABB, _tpart->get (PART_SEZABB));
|
||||
partita.put(PART_ABBUONI, _tpart->get_real(PART_ABBUONI));
|
||||
partita.put(PART_SEZDIFCAM, _tpart->get (PART_SEZDIFCAM));
|
||||
@ -1547,6 +1548,7 @@ void TRic_tab::ricevi_movSC(TString& key, char uselab)
|
||||
pag.put(PAGSCA_IMPORTO, _tpagsca->get_real(PAGSCA_IMPORTO));
|
||||
pag.put(PAGSCA_IMPORTOVAL, _tpagsca->get_real(PAGSCA_IMPORTOVAL));
|
||||
pag.put(PAGSCA_RITENUTE, _tpagsca->get_real(PAGSCA_RITENUTE));
|
||||
pag.put(PAGSCA_RITSOC, _tpagsca->get_real(PAGSCA_RITSOC));
|
||||
|
||||
pag.put(PAGSCA_TIPOCC, _tpagsca->get(PAGSCA_TIPOCC));
|
||||
pag.put(PAGSCA_GRUPPOC, _tpagsca->get(PAGSCA_GRUPPOC));
|
||||
|
324
cg/cg6700.cpp
324
cg/cg6700.cpp
@ -64,6 +64,10 @@ class TRic_ListaMov : public TPrintapp
|
||||
real _imp,_impval;
|
||||
TString _numpart_prec;
|
||||
int _tipopag_pag;
|
||||
|
||||
protected:
|
||||
char sezione_ritsoc(const TRectype& part) const;
|
||||
real segno_ritsoc(const TRectype& part) const;
|
||||
|
||||
public:
|
||||
virtual bool check_autorization() const
|
||||
@ -119,7 +123,8 @@ public:
|
||||
void calcola_imposta(long numreg, real& imposta);
|
||||
bool calcola_impdocval(long nreg,int nrig,char tipo,int g,int c, long s,int anno,TString& numpart,int nriga,real& doc,real& val);
|
||||
void calcola_importo(char tipo,int g,int c,long s,int anno,TString& numpart,int nriga);
|
||||
void aggiorna_partita(real& importo,real& importoval,real& abbuoni,real& diffcam,real& ritenute,TString& sez,TString& sezabb,TString& sezdc);
|
||||
void aggiorna_partita(real& importo,real& importoval,real& abbuoni,real& diffcam,
|
||||
real& ritfis,real& ritsoc,TString& sez,TString& sezabb,TString& sezdc);
|
||||
void azzera_impdocval();
|
||||
int cerca_anno_solare_esercizio(int codice_esercizio);
|
||||
bool esiste_rata();
|
||||
@ -1983,162 +1988,164 @@ bool TRic_ListaMov::controlla_pagsca()
|
||||
void TRic_ListaMov::stampa_errori_pagsca(int riga)
|
||||
{
|
||||
TCursor* cur = current_cursor();
|
||||
const TRectype& pagsca = cur->curr(LF_PAGSCA);
|
||||
|
||||
int nrigp = cur->curr(LF_PAGSCA).get_int (PAGSCA_NRIGP);
|
||||
int nrigp = pagsca.get_int (PAGSCA_NRIGP);
|
||||
if (nrigp == _nriga)
|
||||
{
|
||||
int nriga = cur->curr(LF_PAGSCA).get_int (PAGSCA_NRIGA);
|
||||
int nrata = cur->curr(LF_PAGSCA).get_int (PAGSCA_NRATA);
|
||||
char accsaldo = cur->curr(LF_PAGSCA).get_char(PAGSCA_ACCSAL);
|
||||
real importo = cur->curr(LF_PAGSCA).get_real(PAGSCA_IMPORTO);
|
||||
real importoval = cur->curr(LF_PAGSCA).get_real(PAGSCA_IMPORTOVAL);
|
||||
real abbuoni = cur->curr(LF_PAGSCA).get_real(PAGSCA_ABBUONI);
|
||||
real ritenute = cur->curr(LF_PAGSCA).get_real(PAGSCA_RITENUTE);
|
||||
real diffcam = cur->curr(LF_PAGSCA).get_real(PAGSCA_DIFFCAM);
|
||||
char passat = cur->curr(LF_PAGSCA).get_char(PAGSCA_PASSATT);
|
||||
long abins = cur->curr(LF_PAGSCA).get_long(PAGSCA_CODABIPR);
|
||||
long cabns = cur->curr(LF_PAGSCA).get_long(PAGSCA_CODCABPR);
|
||||
long abivs = cur->curr(LF_PAGSCA).get_long(PAGSCA_CODABI);
|
||||
long cabvs = cur->curr(LF_PAGSCA).get_long(PAGSCA_CODCAB);
|
||||
TString codag = cur->curr(LF_PAGSCA).get (PAGSCA_CODAG);
|
||||
char tipoc = cur->curr(LF_PAGSCA).get_char(PAGSCA_TIPOCC);
|
||||
int gruppoc = cur->curr(LF_PAGSCA).get_int (PAGSCA_GRUPPOC);
|
||||
int contoc = cur->curr(LF_PAGSCA).get_int (PAGSCA_CONTOC);
|
||||
long sottocc = cur->curr(LF_PAGSCA).get_long(PAGSCA_SOTTOCONTC);
|
||||
int nriga = pagsca.get_int (PAGSCA_NRIGA);
|
||||
int nrata = pagsca.get_int (PAGSCA_NRATA);
|
||||
char accsaldo = pagsca.get_char(PAGSCA_ACCSAL);
|
||||
real importo = pagsca.get_real(PAGSCA_IMPORTO);
|
||||
real importoval = pagsca.get_real(PAGSCA_IMPORTOVAL);
|
||||
real abbuoni = pagsca.get_real(PAGSCA_ABBUONI);
|
||||
real ritenute = pagsca.get_real(PAGSCA_RITENUTE);
|
||||
real ritsoc = pagsca.get_real(PAGSCA_RITSOC);
|
||||
real diffcam = pagsca.get_real(PAGSCA_DIFFCAM);
|
||||
char passat = pagsca.get_char(PAGSCA_PASSATT);
|
||||
long abins = pagsca.get_long(PAGSCA_CODABIPR);
|
||||
long cabns = pagsca.get_long(PAGSCA_CODCABPR);
|
||||
long abivs = pagsca.get_long(PAGSCA_CODABI);
|
||||
long cabvs = pagsca.get_long(PAGSCA_CODCAB);
|
||||
TString codag = pagsca.get (PAGSCA_CODAG);
|
||||
char tipoc = pagsca.get_char(PAGSCA_TIPOCC);
|
||||
int gruppoc = pagsca.get_int (PAGSCA_GRUPPOC);
|
||||
int contoc = pagsca.get_int (PAGSCA_CONTOC);
|
||||
long sottocc = pagsca.get_long(PAGSCA_SOTTOCONTC);
|
||||
|
||||
controlla_anaCF_Pcon(tipoc,gruppoc,contoc,sottocc);
|
||||
controlla_anaCF_Pcon(tipoc,gruppoc,contoc,sottocc);
|
||||
|
||||
if (_prima_rata_pag)
|
||||
{
|
||||
set_row(riga,FR("@22gRif. rata acc./saldo Sez Importo Importo valuta Contropartita"));
|
||||
set_row(riga++,FR("@158gNostra banca Vostra banca Agente"));
|
||||
_prima_rata_pag = FALSE;
|
||||
}
|
||||
else
|
||||
set_row(riga++, "");
|
||||
if (_prima_rata_pag)
|
||||
{
|
||||
set_row(riga,FR("@22gRif. rata acc./saldo Sez Importo Importo valuta Contropartita"));
|
||||
set_row(riga++,FR("@158gNostra banca Vostra banca Agente"));
|
||||
_prima_rata_pag = FALSE;
|
||||
}
|
||||
else
|
||||
set_row(riga++, "");
|
||||
|
||||
set_row(riga,"@22g%4d", nriga);
|
||||
set_row(riga,"@26g/@27g%4d", nrata);
|
||||
set_row(riga,"@42g%c", accsaldo);
|
||||
set_row(riga,"@51g%c", _sez);
|
||||
set_row(riga,"@55g%r", &importo);
|
||||
if (importoval != ZERO)
|
||||
set_row(riga,"@71g%15s", (const char*) importoval.string("###.###.###,@@@"));
|
||||
set_row(riga,"@88g%c", tipoc);
|
||||
if (gruppoc != 0)
|
||||
set_row(riga,"@90g%3d", gruppoc);
|
||||
if (contoc != 0)
|
||||
set_row(riga,"@94g%3d", contoc);
|
||||
if (sottocc != 0)
|
||||
{
|
||||
set_row(riga,"@98g%6ld", sottocc);
|
||||
set_row(riga,"@105g%-50s", (const char*) _descr_anag);
|
||||
}
|
||||
if (abins != 0)
|
||||
set_row(riga,"@158g%ld", abins);
|
||||
if (cabns != 0)
|
||||
set_row(riga,"@165g%ld", cabns);
|
||||
if (abivs != 0)
|
||||
set_row(riga,"@172g%ld", abivs);
|
||||
if (cabvs != 0)
|
||||
set_row(riga,"@179g%ld", cabvs);
|
||||
set_row(riga,"@189g%-5s", (const char*) codag);
|
||||
if (ritenute != ZERO)
|
||||
{
|
||||
riga++;
|
||||
set_row(riga,"@22g%4d", nriga);
|
||||
set_row(riga,"@26g/@27g%4d", nrata);
|
||||
set_row(riga,"@42g%c", accsaldo);
|
||||
set_row(riga,"@51g%c", _sez);
|
||||
set_row(riga,"@55g%r", &ritenute);
|
||||
set_row(riga,FR("@88gRitenute professionali"));
|
||||
}
|
||||
if (abbuoni != ZERO)
|
||||
{
|
||||
riga++;
|
||||
char sezione;
|
||||
if (passat == 'A')
|
||||
sezione = 'D';
|
||||
else
|
||||
if (passat == 'P')
|
||||
sezione = 'A';
|
||||
|
||||
if (sezione != _sez)
|
||||
abbuoni = abbuoni * -1;
|
||||
|
||||
set_row(riga,"@51g%c", sezione);
|
||||
if (_codval.not_empty())
|
||||
set_row(riga,"@71g%15s", (const char*) abbuoni.string("###.###.###,@@@"));
|
||||
else
|
||||
set_row(riga,"@55g%r", &abbuoni);
|
||||
if (passat == 'A')
|
||||
set_row(riga,"@88gAbbuoni attivi");
|
||||
else
|
||||
if (passat == 'P')
|
||||
set_row(riga,FR("@88gAbbuoni passivi"));
|
||||
}
|
||||
if (diffcam != ZERO)
|
||||
{
|
||||
riga++;
|
||||
char sezione = _sez;
|
||||
if (diffcam < ZERO)
|
||||
set_row(riga,"@55g%r", &importo);
|
||||
if (importoval != ZERO)
|
||||
set_row(riga,"@71g%15s", (const char*) importoval.string("###.###.###,@@@"));
|
||||
set_row(riga,"@88g%c", tipoc);
|
||||
if (gruppoc != 0)
|
||||
set_row(riga,"@90g%3d", gruppoc);
|
||||
if (contoc != 0)
|
||||
set_row(riga,"@94g%3d", contoc);
|
||||
if (sottocc != 0)
|
||||
{
|
||||
diffcam = diffcam * -1;
|
||||
if (_sez == 'D')
|
||||
sezione = 'A';
|
||||
set_row(riga,"@98g%6ld", sottocc);
|
||||
set_row(riga,"@105g%-50s", (const char*) _descr_anag);
|
||||
}
|
||||
if (abins != 0)
|
||||
set_row(riga,"@158g%ld", abins);
|
||||
if (cabns != 0)
|
||||
set_row(riga,"@165g%ld", cabns);
|
||||
if (abivs != 0)
|
||||
set_row(riga,"@172g%ld", abivs);
|
||||
if (cabvs != 0)
|
||||
set_row(riga,"@179g%ld", cabvs);
|
||||
set_row(riga,"@189g%-5s", (const char*) codag);
|
||||
if (ritenute != ZERO)
|
||||
{
|
||||
riga++;
|
||||
set_row(riga,"@51g%c", _sez);
|
||||
set_row(riga,"@55g%r", &ritenute);
|
||||
set_row(riga,FR("@88gRitenute professionali"));
|
||||
}
|
||||
if (abbuoni != ZERO)
|
||||
{
|
||||
riga++;
|
||||
char sezione;
|
||||
if (passat == 'A')
|
||||
sezione = 'D';
|
||||
else
|
||||
if (_sez == 'A')
|
||||
sezione = 'D';
|
||||
if (passat == 'P')
|
||||
sezione = 'A';
|
||||
|
||||
if (sezione != _sez)
|
||||
abbuoni = abbuoni * -1;
|
||||
|
||||
set_row(riga,"@51g%c", sezione);
|
||||
if (_codval.not_empty())
|
||||
set_row(riga,"@71g%15s", (const char*) abbuoni.string("###.###.###,@@@"));
|
||||
else
|
||||
set_row(riga,"@55g%r", &abbuoni);
|
||||
if (passat == 'A')
|
||||
set_row(riga,"@88gAbbuoni attivi");
|
||||
else
|
||||
if (passat == 'P')
|
||||
set_row(riga,FR("@88gAbbuoni passivi"));
|
||||
}
|
||||
if (diffcam != ZERO)
|
||||
{
|
||||
riga++;
|
||||
char sezione = _sez;
|
||||
if (diffcam < ZERO)
|
||||
{
|
||||
diffcam = diffcam * -1;
|
||||
if (_sez == 'D')
|
||||
sezione = 'A';
|
||||
else
|
||||
if (_sez == 'A')
|
||||
sezione = 'D';
|
||||
}
|
||||
set_row(riga,"@51g%c", sezione);
|
||||
set_row(riga,"@55g%r", &diffcam);
|
||||
set_row(riga,FR("@88gDifferenza cambio"));
|
||||
}
|
||||
set_row(riga,"@51g%c", sezione);
|
||||
set_row(riga,"@55g%r", &diffcam);
|
||||
set_row(riga,FR("@88gDifferenza cambio"));
|
||||
}
|
||||
|
||||
if (nriga != 9999)
|
||||
{
|
||||
if (!record_partite(nriga))
|
||||
if (nriga != 9999)
|
||||
{
|
||||
if (!record_partite(nriga))
|
||||
{
|
||||
_errore_grave_SC = TRUE;
|
||||
set_row(++riga, "@30g%s", get_error(32));
|
||||
}
|
||||
}
|
||||
if (nrata != 9999)
|
||||
{
|
||||
if (!record_scadenze(nriga,nrata))
|
||||
{
|
||||
_errore_grave_SC = TRUE;
|
||||
set_row(++riga, "@30g%s", get_error(33));
|
||||
}
|
||||
}
|
||||
if (accsaldo != 'A' && accsaldo != 'S')
|
||||
{
|
||||
_errore_grave_SC = TRUE;
|
||||
set_row(++riga, "@30g%s", get_error(32));
|
||||
set_row(++riga, "@30g%s", get_error(34));
|
||||
}
|
||||
}
|
||||
if (nrata != 9999)
|
||||
{
|
||||
if (!record_scadenze(nriga,nrata))
|
||||
if (importo == ZERO)
|
||||
{
|
||||
_errore_grave_SC = TRUE;
|
||||
set_row(++riga, "@30g%s", get_error(33));
|
||||
}
|
||||
}
|
||||
if (accsaldo != 'A' && accsaldo != 'S')
|
||||
{
|
||||
_errore_grave_SC = TRUE;
|
||||
set_row(++riga, "@30g%s", get_error(34));
|
||||
}
|
||||
if (importo == ZERO)
|
||||
{
|
||||
_errore_grave_SC = TRUE;
|
||||
set_row(++riga, "@30g%s", get_error(35));
|
||||
}
|
||||
if (_codval.not_empty() && importoval == ZERO)
|
||||
{
|
||||
_errore_grave_SC = TRUE;
|
||||
set_row(++riga, "@30g%s", get_error(36));
|
||||
}
|
||||
if (abbuoni != ZERO && (passat != 'A' && passat != 'P') )
|
||||
{
|
||||
_errore_grave_SC = TRUE;
|
||||
set_row(++riga, "@30g%s", get_error(37));
|
||||
}
|
||||
if (!banca(abins,cabns))
|
||||
set_row(++riga, "@30g%s", get_error(28));
|
||||
set_row(++riga, "@30g%s", get_error(35));
|
||||
}
|
||||
if (_codval.not_empty() && importoval == ZERO)
|
||||
{
|
||||
_errore_grave_SC = TRUE;
|
||||
set_row(++riga, "@30g%s", get_error(36));
|
||||
}
|
||||
if (abbuoni != ZERO && (passat != 'A' && passat != 'P') )
|
||||
{
|
||||
_errore_grave_SC = TRUE;
|
||||
set_row(++riga, "@30g%s", get_error(37));
|
||||
}
|
||||
if (!banca(abins,cabns))
|
||||
set_row(++riga, "@30g%s", get_error(28));
|
||||
|
||||
if (!banca(abivs,cabvs))
|
||||
set_row(++riga, "@30g%s", get_error(29));
|
||||
if (!banca(abivs,cabvs))
|
||||
set_row(++riga, "@30g%s", get_error(29));
|
||||
|
||||
if (!agente(codag))
|
||||
set_row(++riga, "@30g%s", get_error(30));
|
||||
if (!agente(codag))
|
||||
set_row(++riga, "@30g%s", get_error(30));
|
||||
|
||||
if (!controlla_anaCF_Pcon(tipoc,gruppoc,contoc,sottocc))
|
||||
set_row(++riga, FR("@30g--- Codice contropartita errato"));
|
||||
if (!controlla_anaCF_Pcon(tipoc,gruppoc,contoc,sottocc))
|
||||
set_row(++riga, FR("@30g--- Codice contropartita errato"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2603,6 +2610,18 @@ void TRic_ListaMov::postclose_print()
|
||||
} // if (esegui)
|
||||
}
|
||||
|
||||
char TRic_ListaMov::sezione_ritsoc(const TRectype& part) const
|
||||
{
|
||||
TString16 key; key << part.get(PART_CODCAUS) << "|14"; // Riga ritenute sociali
|
||||
const char sezrs = cache().get(LF_RCAUSALI, key, RCA_SEZIONE)[0];
|
||||
return sezrs > ' ' ? (sezrs == 'D' ? 'A' : 'D') : part.get_char(PART_SEZ);
|
||||
}
|
||||
|
||||
real TRic_ListaMov::segno_ritsoc(const TRectype& part) const
|
||||
{
|
||||
return part.get_char(PART_SEZ) == sezione_ritsoc(part) ? UNO : -UNO;
|
||||
}
|
||||
|
||||
void TRic_ListaMov::esamina_partite()
|
||||
{
|
||||
bool prima_volta = TRUE;
|
||||
@ -2613,7 +2632,7 @@ void TRic_ListaMov::esamina_partite()
|
||||
part.setkey(2);
|
||||
part.zero();
|
||||
part.put(PART_NREG, _numero);
|
||||
TRectype partita (part.curr());
|
||||
const TRectype partita (part.curr());
|
||||
|
||||
for (part.read(_isgteq); !part.eof(); part.next())
|
||||
{
|
||||
@ -2653,6 +2672,8 @@ void TRic_ListaMov::esamina_partite()
|
||||
if (nrigp != nriga) continue;
|
||||
|
||||
doc += pagsca.get_real(PAGSCA_IMPORTO) + pagsca.get_real(PAGSCA_RITENUTE);
|
||||
doc += pagsca.get_real(PAGSCA_RITSOC) * segno_ritsoc(part.curr());
|
||||
|
||||
val += pagsca.get_real(PAGSCA_IMPORTOVAL);
|
||||
}
|
||||
|
||||
@ -2872,7 +2893,7 @@ bool TRic_ListaMov::calcola_impdocval(long nreg,int nrig,char tipoc,int gruppo,i
|
||||
pagsca.put(PAGSCA_NUMPART, numpart);
|
||||
// pagsca.put(PAGSCA_NRIGA, nriga);
|
||||
|
||||
TRectype pagamenti (pagsca.curr());
|
||||
const TRectype pagamenti (pagsca.curr());
|
||||
|
||||
for (pagsca.read(_isgteq); !pagsca.eof(); pagsca.next())
|
||||
{
|
||||
@ -2886,6 +2907,16 @@ bool TRic_ListaMov::calcola_impdocval(long nreg,int nrig,char tipoc,int gruppo,i
|
||||
if (nrigp != nriga) continue;
|
||||
|
||||
doc += pagsca.get_real(PAGSCA_IMPORTO) + pagsca.get_real(PAGSCA_RITENUTE);
|
||||
const real ritsoc = pagsca.get(PAGSCA_RITSOC);
|
||||
if (!ritsoc.is_zero())
|
||||
{
|
||||
TToken_string key;
|
||||
key.add(tipoc); key.add(gruppo); key.add(conto); key.add(sottoc);
|
||||
key.add(anno); key.add(numpart);
|
||||
const TRectype& part = cache().get(LF_PARTITE, key);
|
||||
doc += ritsoc * segno_ritsoc(part);
|
||||
}
|
||||
|
||||
val += pagsca.get_real(PAGSCA_IMPORTOVAL);
|
||||
}
|
||||
_tpagsca->readat(recn);
|
||||
@ -2956,7 +2987,7 @@ void TRic_ListaMov::calcola_importo(char tipoc,int gruppo,int conto,long sottoc,
|
||||
}
|
||||
|
||||
void TRic_ListaMov::aggiorna_partita(real& importo,real& importoval,real& abbuoni,real& diffcam,
|
||||
real& ritenute,TString& sez,TString& sezabb,TString& sezdc)
|
||||
real& ritfis,real& ritsoc, TString& sez,TString& sezabb,TString& sezdc)
|
||||
{
|
||||
TRecnotype recn = _tpagsca->recno();
|
||||
TIsamtempfile& pagsca = *_tpagsca;
|
||||
@ -2989,7 +3020,8 @@ void TRic_ListaMov::aggiorna_partita(real& importo,real& importoval,real& abbuon
|
||||
|
||||
importo += pagsca.get_real(PAGSCA_IMPORTO);
|
||||
importoval += pagsca.get_real(PAGSCA_IMPORTOVAL);
|
||||
ritenute += pagsca.get_real(PAGSCA_RITENUTE);
|
||||
ritfis += pagsca.get_real(PAGSCA_RITENUTE);
|
||||
ritsoc += pagsca.get_real(PAGSCA_RITSOC);
|
||||
|
||||
abb = pagsca.get_real(PAGSCA_ABBUONI);
|
||||
if (abb != ZERO)
|
||||
@ -3090,18 +3122,20 @@ void TRic_ListaMov::aggiorna_partite()
|
||||
{
|
||||
real importo = ZERO;
|
||||
real importoval = ZERO;
|
||||
real ritenute = ZERO;
|
||||
real ritfis = ZERO;
|
||||
real ritsoc = ZERO;
|
||||
real abbuoni = ZERO;
|
||||
real diffcam = ZERO;
|
||||
TString sez = part.get(PART_SEZ);
|
||||
TString sezabb = part.get(PART_SEZABB);
|
||||
TString sezdc = part.get(PART_SEZDIFCAM);
|
||||
|
||||
aggiorna_partita(importo,importoval,abbuoni,diffcam,ritenute,sez,sezabb,sezdc);
|
||||
aggiorna_partita(importo,importoval,abbuoni,diffcam,ritfis,ritsoc,sez,sezabb,sezdc);
|
||||
|
||||
part.put(PART_IMPORTO, importo);
|
||||
part.put(PART_IMPORTOVAL, importoval);
|
||||
part.put(PART_RITENUTE, ritenute);
|
||||
part.put(PART_RITENUTE, ritfis);
|
||||
part.put(PART_RITSOC, ritsoc);
|
||||
part.put(PART_SEZABB, sezabb);
|
||||
part.put(PART_ABBUONI, abbuoni);
|
||||
part.put(PART_SEZDIFCAM, sezdc);
|
||||
|
@ -424,9 +424,11 @@ void TAnn_mov::sgancia_pagamenti(char tipo,int g,int c,long s,int anno,TString&
|
||||
real importo = pagsca.get_real(PAGSCA_IMPORTO) + pag.get_real(PAGSCA_IMPORTO);
|
||||
real impval = pagsca.get_real(PAGSCA_IMPORTOVAL) + pag.get_real(PAGSCA_IMPORTOVAL);
|
||||
real ritenute = pagsca.get_real(PAGSCA_RITENUTE) + pag.get_real(PAGSCA_RITENUTE);
|
||||
real ritsoc = pagsca.get_real(PAGSCA_RITSOC) + pag.get_real(PAGSCA_RITSOC);
|
||||
pagsca.put(PAGSCA_IMPORTO, importo);
|
||||
pagsca.put(PAGSCA_IMPORTOVAL, impval);
|
||||
pagsca.put(PAGSCA_RITENUTE, ritenute);
|
||||
pagsca.put(PAGSCA_RITSOC, ritsoc);
|
||||
pagsca.put(PAGSCA_ACCSAL, "A");
|
||||
pagsca.rewrite();
|
||||
}
|
||||
|
@ -515,6 +515,7 @@ void TVar_sc::setta_mask_pagsca(char tipo,int gruppo,int conto,long sottoc,
|
||||
TString16 accsal (_tpagsca->get (PAGSCA_ACCSAL));
|
||||
real importo (_tpagsca->get_real(PAGSCA_IMPORTO));
|
||||
real ritenute (_tpagsca->get_real(PAGSCA_RITENUTE));
|
||||
real ritsoc (_tpagsca->get_real(PAGSCA_RITSOC));
|
||||
real abbuoni (_tpagsca->get_real(PAGSCA_ABBUONI));
|
||||
real diffcam (_tpagsca->get_real(PAGSCA_DIFFCAM));
|
||||
real impval (_tpagsca->get_real(PAGSCA_IMPORTOVAL));
|
||||
@ -617,6 +618,7 @@ void TVar_sc::setta_mask_pagsca(char tipo,int gruppo,int conto,long sottoc,
|
||||
row.add(codag);
|
||||
str.format("%c", passat);
|
||||
row.add(str);
|
||||
row.add(ritsoc.string());
|
||||
}
|
||||
}
|
||||
|
||||
@ -2098,9 +2100,11 @@ void TVar_sc::sgancia_pagamenti(char tipo,int g,int c,long s,int anno,TString& n
|
||||
real importo = pagsca.get_real(PAGSCA_IMPORTO) + pag.get_real(PAGSCA_IMPORTO);
|
||||
real impval = pagsca.get_real(PAGSCA_IMPORTOVAL) + pag.get_real(PAGSCA_IMPORTOVAL);
|
||||
real ritenute = pagsca.get_real(PAGSCA_RITENUTE) + pag.get_real(PAGSCA_RITENUTE);
|
||||
real ritsoc = pagsca.get_real(PAGSCA_RITSOC) + pag.get_real(PAGSCA_RITSOC);
|
||||
pagsca.put(PAGSCA_IMPORTO, importo);
|
||||
pagsca.put(PAGSCA_IMPORTOVAL, impval);
|
||||
pagsca.put(PAGSCA_RITENUTE, ritenute);
|
||||
pagsca.put(PAGSCA_RITSOC, ritsoc);
|
||||
pagsca.put(PAGSCA_ACCSAL, "A");
|
||||
pagsca.rewrite();
|
||||
}
|
||||
@ -2443,6 +2447,7 @@ void TVar_sc::registra_pagamenti(TMask& m)
|
||||
long vsabi = row.get_long(27);
|
||||
long vscab = row.get_long(28);
|
||||
TString codag = row.get (29);
|
||||
real ritsoc (row.get (31));
|
||||
|
||||
TString codval = "";
|
||||
char sez = sezione(tipo,gruppo,conto,sottoc,anno,numpart,nriga,codval,*_mask);
|
||||
@ -2489,6 +2494,7 @@ void TVar_sc::registra_pagamenti(TMask& m)
|
||||
_tpagsca->put(PAGSCA_ACCSAL, accsal);
|
||||
_tpagsca->put(PAGSCA_IMPORTO, importo);
|
||||
_tpagsca->put(PAGSCA_RITENUTE, ritenute);
|
||||
_tpagsca->put(PAGSCA_RITSOC, ritsoc);
|
||||
_tpagsca->put(PAGSCA_ABBUONI, abbuoni);
|
||||
_tpagsca->put(PAGSCA_DIFFCAM, diffcam);
|
||||
_tpagsca->put(PAGSCA_IMPORTOVAL, impval);
|
||||
@ -2519,6 +2525,7 @@ void TVar_sc::registra_pagamenti(TMask& m)
|
||||
_tpagsca->put(PAGSCA_ACCSAL, accsal);
|
||||
_tpagsca->put(PAGSCA_IMPORTO, importo);
|
||||
_tpagsca->put(PAGSCA_RITENUTE, ritenute);
|
||||
_tpagsca->put(PAGSCA_RITSOC, ritsoc);
|
||||
_tpagsca->put(PAGSCA_ABBUONI, abbuoni);
|
||||
_tpagsca->put(PAGSCA_DIFFCAM, diffcam);
|
||||
_tpagsca->put(PAGSCA_IMPORTOVAL, impval);
|
||||
|
@ -2027,6 +2027,13 @@ bool TInv_cont::invio_mov_SC()
|
||||
partita2trasfer(record,FALSE);
|
||||
pagsca2trasfer(record,ritenute,imp);
|
||||
}
|
||||
real ritsoc (_tpagsca->get_real(PAGSCA_RITSOC));
|
||||
if (ritsoc != ZERO)
|
||||
{
|
||||
real imp = ZERO;
|
||||
partita2trasfer(record,FALSE);
|
||||
pagsca2trasfer(record,ritsoc,imp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1329,7 +1329,18 @@ void TInv_cont::invio_partite()
|
||||
else
|
||||
record.overwrite("+",285);
|
||||
str.format("%014s", (const char*) ritenute.string());
|
||||
record.overwrite(str,286); //Ritenute
|
||||
record.overwrite(str,286); //Ritenute fiscali
|
||||
|
||||
real ritsoc (_tpart->get_real(PART_RITSOC));
|
||||
if (ritsoc.sign() < 0)
|
||||
{
|
||||
record.overwrite("-",341);
|
||||
ritsoc = -ritsoc;
|
||||
}
|
||||
else
|
||||
record.overwrite("+",341);
|
||||
str.format("%014s", (const char*) ritsoc.string());
|
||||
record.overwrite(str,342); //Ritenute sociali
|
||||
|
||||
TString sezabb = _tpart->get(PART_SEZABB);
|
||||
record.overwrite(sezabb,300); //Sezione abbuoni
|
||||
@ -1385,7 +1396,7 @@ void TInv_cont::invio_partite()
|
||||
int contocl = _tpart->get_int(PART_CONTOCL);
|
||||
str.format("%03d", contocl);
|
||||
record.overwrite(str,339); //Conto cliente
|
||||
|
||||
|
||||
_tras_file.write_control_rec(record,size);
|
||||
_numrec_sc++;
|
||||
}
|
||||
@ -1661,7 +1672,18 @@ void TInv_cont::invio_pagsca()
|
||||
else
|
||||
record.overwrite("+",126);
|
||||
str.format("%014s", (const char*) ritenute.string());
|
||||
record.overwrite(str,127); //Ritenute
|
||||
record.overwrite(str,127); //Ritenute fiscali
|
||||
|
||||
real ritsoc (_tpagsca->get_real(PAGSCA_RITSOC));
|
||||
if (ritsoc.sign() < 0)
|
||||
{
|
||||
record.overwrite("-",178);
|
||||
ritsoc = -ritsoc;
|
||||
}
|
||||
else
|
||||
record.overwrite("+",178);
|
||||
str.format("%014s", (const char*) ritsoc.string());
|
||||
record.overwrite(str,179); //Ritenute sociali
|
||||
|
||||
char tipoc = _tpagsca->get_char(PAGSCA_TIPOCC);
|
||||
str.format("%c", tipoc);
|
||||
|
@ -2680,8 +2680,9 @@ char TTransfer_file::what_is_this(TString& record,TString& tipo)
|
||||
return caso;
|
||||
}
|
||||
|
||||
/*
|
||||
void TTransfer_file::aggiorna_partita(TString& record,TString& tipo,real& importo,real& importoval,
|
||||
real& abbuoni,real& diffcam,real& ritenute)
|
||||
real& abbuoni,real& diffcam,real& ritenute,real& ritsoc)
|
||||
{
|
||||
TRecnotype rec = _tpart->recno();
|
||||
TIsamtempfile& part = *_tpart;
|
||||
@ -2713,8 +2714,11 @@ void TTransfer_file::aggiorna_partita(TString& record,TString& tipo,real& import
|
||||
part.put(PART_IMPORTO, imp);
|
||||
part.put(PART_IMPORTOVAL, val);
|
||||
|
||||
real rit = part.get_real(PART_RITENUTE) + ritenute;
|
||||
part.put(PART_RITENUTE, rit);
|
||||
real ritf = part.get_real(PART_RITENUTE) + ritenute;
|
||||
part.put(PART_RITENUTE, ritf);
|
||||
|
||||
real rits = part.get_real(PART_RITSOC) + ritsoc;
|
||||
part.put(PART_RITSOC, rits);
|
||||
|
||||
if (abbuoni != ZERO)
|
||||
{
|
||||
@ -2769,7 +2773,7 @@ void TTransfer_file::aggiorna_partita(TString& record,TString& tipo,real& import
|
||||
}
|
||||
_tpart->readat(rec);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
char TTransfer_file::leggi_sez_partita(TString& record,TString& tipo)
|
||||
{
|
||||
@ -2927,7 +2931,7 @@ void TTransfer_file::pagsca(TString& record)
|
||||
else
|
||||
if (fname == "IMP")
|
||||
{
|
||||
TString codval = record.sub(79,82);
|
||||
TString4 codval = record.sub(79,82);
|
||||
codval.trim();
|
||||
|
||||
if (caso == 'a' || caso == 'd')
|
||||
@ -3017,6 +3021,7 @@ void TTransfer_file::pagsca(TString& record)
|
||||
real abbuoni = _tpagsca->get_real(PAGSCA_ABBUONI) + _deppagsca->get_real(PAGSCA_ABBUONI);
|
||||
real diffcam = _tpagsca->get_real(PAGSCA_DIFFCAM) + _deppagsca->get_real(PAGSCA_DIFFCAM);
|
||||
real ritenute = _tpagsca->get_real(PAGSCA_RITENUTE) + _deppagsca->get_real(PAGSCA_RITENUTE);
|
||||
real ritsoc = _tpagsca->get_real(PAGSCA_RITSOC) + _deppagsca->get_real(PAGSCA_RITSOC);
|
||||
|
||||
if (accsal != "S")
|
||||
_tpagsca->put(PAGSCA_ACCSAL, _deppagsca->get(PAGSCA_ACCSAL));
|
||||
@ -3027,6 +3032,7 @@ void TTransfer_file::pagsca(TString& record)
|
||||
_tpagsca->put(PAGSCA_ABBUONI, abbuoni);
|
||||
_tpagsca->put(PAGSCA_DIFFCAM, diffcam);
|
||||
_tpagsca->put(PAGSCA_RITENUTE, ritenute);
|
||||
_tpagsca->put(PAGSCA_RITSOC, ritsoc);
|
||||
|
||||
_tpagsca->rewrite();
|
||||
}
|
||||
@ -4772,6 +4778,14 @@ void TTransfer_file::write_partite(TString& record)
|
||||
else
|
||||
field = importo;
|
||||
}
|
||||
if (fname == PART_RITSOC)
|
||||
{
|
||||
sign = record.sub(341,342);
|
||||
if (sign == "-")
|
||||
field = sign << importo;
|
||||
else
|
||||
field = importo;
|
||||
}
|
||||
if (fname == PART_ABBUONI)
|
||||
{
|
||||
sign = record.sub(301,302);
|
||||
@ -5073,6 +5087,14 @@ void TTransfer_file::write_pagsca(TString& record)
|
||||
else
|
||||
field = importo;
|
||||
}
|
||||
if (fname == PAGSCA_RITSOC)
|
||||
{
|
||||
sign = record.sub(178,179);
|
||||
if (sign == "-")
|
||||
field = sign << importo;
|
||||
else
|
||||
field = importo;
|
||||
}
|
||||
}
|
||||
else
|
||||
field = importo;
|
||||
|
@ -225,7 +225,7 @@ private:
|
||||
void calcola_importo(TString& record);
|
||||
int recupera_scadenze(TString& record,TString& tipo);
|
||||
char what_is_this(TString& record,TString& tipo);
|
||||
void aggiorna_partita(TString& record,TString& tipo,real& importo,real& importoval,real& abbuoni,real& diffcam,real& ritenute);
|
||||
// void aggiorna_partita(TString& record,TString& tipo,real& importo,real& importoval,real& abbuoni,real& diffcam,real& ritenute,real& ritsoc);
|
||||
char leggi_sez_partita(TString& record,TString& tipo);
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include <mov.h>
|
||||
#include <rmov.h>
|
||||
#include <rcausali.h>
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TTree_rectype
|
||||
@ -332,7 +333,10 @@ TImporto TRiga_scadenze::importo_pagato(bool val, int mode) const
|
||||
if (mode & 0x1)
|
||||
totale += TImporto(sez, pag.get_real(imp_field));
|
||||
if (!in_val && (mode & 0x8)) // Le ritenute non esistono nei pagamenti in valuta
|
||||
{
|
||||
totale += TImporto(sez, pag.get_real(PAGSCA_RITENUTE));
|
||||
totale += TImporto(sum.sezione_ritsoc(), pag.get_real(PAGSCA_RITSOC));
|
||||
}
|
||||
|
||||
if (mode & 0x2) // Voglio anche gli abbuoni
|
||||
{
|
||||
@ -516,10 +520,12 @@ bool TRiga_scadenze::modifica_pagamento(const TRectype& new_pag, const TValuta&
|
||||
sum.update(old_pag, new_pag, PART_IMPORTO);
|
||||
sum.update(old_pag, new_pag, PART_IMPORTOVAL);
|
||||
sum.update(old_pag, new_pag, PART_RITENUTE);
|
||||
sum.update(old_pag, new_pag, PART_RITSOC);
|
||||
|
||||
const bool empty = new_pag.get_char(PAGSCA_ACCSAL) != 'S' &&
|
||||
new_pag.get_real(PAGSCA_IMPORTO).is_zero() &&
|
||||
new_pag.get_real(PAGSCA_RITENUTE).is_zero();
|
||||
new_pag.get_real(PAGSCA_RITENUTE).is_zero() &&
|
||||
new_pag.get_real(PAGSCA_RITSOC).is_zero();
|
||||
if (empty)
|
||||
rows_array().destroy_row(nrigp);
|
||||
|
||||
@ -554,9 +560,10 @@ bool TRiga_scadenze::elimina_pagamento(int p)
|
||||
{
|
||||
TRectype old_pag(row(p));
|
||||
old_pag.put(PAGSCA_ACCSAL, "A");
|
||||
old_pag.zero(PAGSCA_IMPORTO);
|
||||
old_pag.zero(PAGSCA_IMPORTOVAL);
|
||||
old_pag.zero(PAGSCA_RITENUTE);
|
||||
old_pag.zero(PAGSCA_IMPORTO);
|
||||
old_pag.zero(PAGSCA_IMPORTOVAL);
|
||||
old_pag.zero(PAGSCA_RITENUTE);
|
||||
old_pag.zero(PAGSCA_RITSOC);
|
||||
TValuta val;
|
||||
return partita().modifica_pagamento(old_pag, val, TRUE);
|
||||
}
|
||||
@ -583,7 +590,6 @@ TRiga_partite::TRiga_partite(const TRiga_partite& r)
|
||||
TRiga_partite::~TRiga_partite()
|
||||
{}
|
||||
|
||||
|
||||
void TRiga_partite::update_rigaptr()
|
||||
{
|
||||
for (int i = rate(); i >= 0; i--)
|
||||
@ -638,6 +644,14 @@ tipo_movimento TRiga_partite::tipo() const
|
||||
return tm;
|
||||
}
|
||||
|
||||
// Calcola il segno delle ritenute sociali in base alla causale
|
||||
char TRiga_partite::sezione_ritsoc() const
|
||||
{
|
||||
TString16 key; key << get(PART_CODCAUS) << "|14"; // Riga ritenute sociali
|
||||
const char sezrs = cache().get(LF_RCAUSALI, key, RCA_SEZIONE)[0];
|
||||
return sezrs > ' ' ? (sezrs == 'D' ? 'A' : 'D') : sezione();
|
||||
}
|
||||
|
||||
// Legge le rate relative ad una riga di fattura
|
||||
// Certified 99%
|
||||
int TRiga_partite::read(TBaseisamfile& f, word op, word lock)
|
||||
@ -754,7 +768,7 @@ TImporto TRiga_partite::importo(bool valuta, int mode) const
|
||||
CHECKD(mode > 0x0 && mode <= 0xF, "Bad importo mode ", mode);
|
||||
const bool in_lire = !in_valuta(); // Partita in lire
|
||||
if (valuta && in_lire)
|
||||
valuta = FALSE;
|
||||
valuta = false;
|
||||
|
||||
TImporto i;
|
||||
if (mode & 0x1)
|
||||
@ -777,7 +791,13 @@ TImporto TRiga_partite::importo(bool valuta, int mode) const
|
||||
else // Desidero gli abbuoni in lire
|
||||
{
|
||||
if (in_lire && (mode & 0x8))
|
||||
{
|
||||
i.valore() += get_real(PART_RITENUTE);
|
||||
if (sezione() == sezione_ritsoc())
|
||||
i.valore() += get_real(PART_RITSOC);
|
||||
else
|
||||
i.valore() -= get_real(PART_RITSOC);
|
||||
}
|
||||
|
||||
if (mode & 0x2)
|
||||
{
|
||||
@ -1337,9 +1357,10 @@ bool TPartita::elimina_pagamento(int nriga, int nrata, int nrigp)
|
||||
{
|
||||
TRectype old_pag(_unassigned.row(nrigp));
|
||||
old_pag.put(PAGSCA_ACCSAL, "A");
|
||||
old_pag.zero(PAGSCA_IMPORTO);
|
||||
old_pag.zero(PAGSCA_IMPORTOVAL);
|
||||
old_pag.zero(PAGSCA_RITENUTE);
|
||||
old_pag.zero(PAGSCA_IMPORTO);
|
||||
old_pag.zero(PAGSCA_IMPORTOVAL);
|
||||
old_pag.zero(PAGSCA_RITENUTE);
|
||||
old_pag.zero(PAGSCA_RITSOC);
|
||||
const TValuta val;
|
||||
modifica_pagamento(old_pag, val, TRUE);
|
||||
}
|
||||
@ -1637,14 +1658,17 @@ TImporto TPartita::importo_pagato_unassigned(bool val, int mode) const
|
||||
for (int p = _unassigned.first_row(); p <= last_row; p = _unassigned.succ_row(p))
|
||||
{
|
||||
const TRectype& pag = _unassigned.row(p); // Riga pagamento
|
||||
const TRiga_partite& sum = riga(pag.get_int(PAGSCA_NRIGP)); // Riga partite
|
||||
const TRiga_partite& sum = riga(pag.get_int(PAGSCA_NRIGP)); // Riga partite
|
||||
const char sez = sum.sezione();
|
||||
// const int tipo = sum.get_int(PART_TIPOPAG);
|
||||
|
||||
if (mode & 0x1)
|
||||
totale += TImporto(sez, pag.get_real(imp_field));
|
||||
if (!in_val && (mode & 0x8)) // Le ritenute non esistono nei pagamenti in valuta
|
||||
{
|
||||
totale += TImporto(sez, pag.get_real(PAGSCA_RITENUTE));
|
||||
totale += TImporto(sum.sezione_ritsoc(), pag.get_real(PAGSCA_RITSOC));
|
||||
}
|
||||
|
||||
if (mode & 0x2) // Voglio anche gli abbuoni
|
||||
{
|
||||
@ -1669,7 +1693,6 @@ TImporto TPartita::importo_pagato_unassigned(bool val, int mode) const
|
||||
return totale.normalize();
|
||||
}
|
||||
|
||||
|
||||
// Controlla se esistono pagamenti riferiti alla riga nrigp
|
||||
bool TPartita::utilizzata(int nrigp) const
|
||||
{
|
||||
@ -1712,6 +1735,7 @@ bool TPartita::modifica_pagamento(const TRectype& new_pag, const TValuta& valuta
|
||||
empty = sum.update(old_pag, new_pag, PART_IMPORTO);
|
||||
sum.update(old_pag, new_pag, PART_IMPORTOVAL);
|
||||
sum.update(old_pag, new_pag, PART_RITENUTE);
|
||||
sum.update(old_pag, new_pag, PART_RITSOC);
|
||||
|
||||
if (new_pag.get_real(PAGSCA_IMPORTO).is_zero())
|
||||
_unassigned.destroy_row(nrigp);
|
||||
@ -1829,6 +1853,7 @@ void TPartita::sposta_riga(int from_row, TPartita& part, int to_row)
|
||||
nuova.zero(PART_ABBUONI);
|
||||
nuova.zero(PART_DIFFCAM);
|
||||
nuova.zero(PART_RITENUTE);
|
||||
nuova.zero(PART_RITSOC);
|
||||
address[j] = nuova.get_int(PART_NRIGA);
|
||||
}
|
||||
|
||||
@ -1847,6 +1872,7 @@ void TPartita::sposta_riga(int from_row, TPartita& part, int to_row)
|
||||
somma(pag, npg, PART_IMPORTO);
|
||||
somma(pag, npg, PART_IMPORTOVAL);
|
||||
somma(pag, npg, PART_RITENUTE);
|
||||
somma(pag, npg, PART_RITSOC);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -183,7 +183,7 @@ public:
|
||||
void elimina_rata(int r = 0);
|
||||
TRiga_scadenze& new_row(int r = 0);
|
||||
|
||||
tipo_movimento tipo() const;
|
||||
tipo_movimento tipo() const;
|
||||
bool is_fattura() const { return tipo() == tm_fattura; }
|
||||
bool is_nota_credito() const { return tipo() == tm_nota_credito; }
|
||||
int ultima_ratapagata() const;
|
||||
@ -191,7 +191,9 @@ public:
|
||||
int ultima_rata_con_abbuoni_diffcam() const;
|
||||
|
||||
char sezione() const { return get_char(PART_SEZ); }
|
||||
TImporto importo(bool valuta, int mode = 0xF) const;
|
||||
char sezione_ritsoc() const;
|
||||
|
||||
TImporto importo(bool valuta, int mode = 0xF) const;
|
||||
TImporto esposto(bool valuta, const TDate & data_scad, const TDate & data_rischio, bool & sbf) const;
|
||||
|
||||
const TString& codice_valuta() const;
|
||||
|
@ -239,6 +239,7 @@ B1|36|335|335|28|CHIUSA|||
|
||||
B1|37|336|336|28|RICARICATA|||
|
||||
B1|38|337|339|28|GRUPPOCL|||
|
||||
B1|39|340|342|28|CONTOCL|||
|
||||
B1|40|343|356|28|RITSOC|||
|
||||
B2|1|3|3|29|TIPOC|||
|
||||
B2|2|4|6|29|GRUPPO|||
|
||||
B2|3|7|9|29|CONTO|||
|
||||
@ -290,3 +291,4 @@ B3|22|160|164|30|CODCAB|||
|
||||
B3|23|165|169|30|CODABIPR|||
|
||||
B3|24|170|174|30|CODCABPR|||
|
||||
B3|25|175|179|30|CODAG|||
|
||||
B3|26|180|193|30|RITSOC|||
|
||||
|
@ -1,3 +1,3 @@
|
||||
28
|
||||
0
|
||||
$part|0|0|334|0|Partite aperte|NPART||
|
||||
$part|0|0|352|0|Partite aperte|NPART||
|
||||
|
@ -1,5 +1,5 @@
|
||||
28
|
||||
40
|
||||
41
|
||||
ANNO|2|4|0|Anno partita
|
||||
NUMPART|1|7|0|Numero partita
|
||||
NRIGA|2|4|0|Numero riga
|
||||
@ -31,6 +31,7 @@ SOTTOCONTO|3|6|0|Sottoconto o codice cliente / fornitore
|
||||
IMPTOTDOC|4|18|3|Importo totale documento
|
||||
IMPTOTVAL|4|18|3|Importo totale documento in valuta
|
||||
RITENUTE|4|18|3|Ritenute fiscali sul pagamento
|
||||
RITSOC|4|18|3|Ritenute sociali sul pagamento
|
||||
SEZABB|1|1|0|Sezione degli abbuoni
|
||||
ABBUONI|4|18|3|Abbuoni
|
||||
SEZDIFCAM|1|1|0|Sezione delle differenze cambi
|
||||
|
@ -1,3 +1,3 @@
|
||||
30
|
||||
0
|
||||
$pagsca|0|0|167|0|Pagamenti scadenze|||
|
||||
$pagsca|0|0|185|0|Pagamenti scadenze|||
|
||||
|
@ -1,5 +1,5 @@
|
||||
30
|
||||
25
|
||||
26
|
||||
TIPOC|1|1|0|Tipo (<C>liente, <F>ornitore)
|
||||
GRUPPO|2|3|0|Gruppo
|
||||
CONTO|2|3|0|Conto
|
||||
@ -15,7 +15,8 @@ IMPORTOVAL|4|18|3|Importo in valuta
|
||||
PASSATT|1|1|0|Abbuono passivo o attivo
|
||||
ABBUONI|4|18|3|Abbuoni
|
||||
DIFFCAM|4|18|3|Differenza cambio
|
||||
RITENUTE|4|18|3|Ritenute
|
||||
RITENUTE|4|18|3|Ritenute fiscali
|
||||
RITSOC|4|18|3|Ritenute Sociali
|
||||
TIPOCC|1|1|0|Tipo conto di contropartita
|
||||
GRUPPOC|2|3|0|Gruppo di contropartita
|
||||
CONTOC|2|3|0|Conto di contropartita
|
||||
|
Loading…
x
Reference in New Issue
Block a user