git-svn-id: svn://10.65.10.50/branches/R_10_00@23081 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0942d486bf
commit
0500c3ce1d
@ -14,8 +14,7 @@
|
||||
#include "cglib01.h"
|
||||
#include "cg0500.h"
|
||||
|
||||
typedef enum { no_descr, acquisto, vendita, incasso_pagamento,
|
||||
ritenuta_occas } tipo_descr;
|
||||
typedef enum { no_descr, acquisto, vendita, incasso_pagamento, ritenuta_occas } tipo_descr;
|
||||
|
||||
class TCaus_app : public TRelation_application
|
||||
{
|
||||
@ -194,15 +193,16 @@ void TCaus_app::causale_vendite()
|
||||
int i = 0;
|
||||
set_descr(i++, TR("C Clienti"));
|
||||
set_descr(i++, TR("C Di ricavo"));
|
||||
set_descr(i++, TR("C Iva vendite"));
|
||||
set_descr(i++, TR("C Iva non detraibile"));
|
||||
set_descr(i++, TR("C IVA vendite"));
|
||||
set_descr(i++, TR("C IVA non detraibile"));
|
||||
set_descr(i++, TR("C Imp. esenti")); // 5
|
||||
set_descr(i++, TR("C Imp. non imponibili"));
|
||||
set_descr(i++, TR("C Imp. non soggetti"));
|
||||
set_descr(i++, TR("C Ritenute fiscali"));
|
||||
set_descr(i++, TR("C Ritenute soc."));
|
||||
set_descr(i++, TR("C Iva ad esig.diff.")); // 10
|
||||
set_descr(i++, TR("C Iva per cassa"));
|
||||
set_descr(i++, TR("C Ritenute sociali"));
|
||||
set_descr(i++, TR("C IVA ad esig.diff.")); // 10
|
||||
set_descr(i++, TR("C IVA per cassa"));
|
||||
set_descr(i++, TR("C IVA in rev. charge"));
|
||||
_tipo_des = vendita;
|
||||
carica_righe_libere(i);
|
||||
}
|
||||
@ -216,15 +216,16 @@ void TCaus_app::causale_acquisti()
|
||||
int i = 0;
|
||||
set_descr(i++, TR("C Fornitori"));
|
||||
set_descr(i++, TR("C Di costo"));
|
||||
set_descr(i++, TR("C Iva acquisti"));
|
||||
set_descr(i++, TR("C Iva non detraibile"));
|
||||
set_descr(i++, TR("C IVA acquisti"));
|
||||
set_descr(i++, TR("C IVA non detraibile"));
|
||||
set_descr(i++, TR("C Imp. esenti")); // 5
|
||||
set_descr(i++, TR("C Imp. non imponibili"));
|
||||
set_descr(i++, TR("C Imp. non soggetti"));
|
||||
set_descr(i++, TR("C Ritenute fiscali"));
|
||||
set_descr(i++, TR("C Ritenute soc."));
|
||||
set_descr(i++, TR("C Iva ad esig.diff.")); // 10
|
||||
set_descr(i++, TR("C Iva per cassa"));
|
||||
set_descr(i++, TR("C Ritenute sociali"));
|
||||
set_descr(i++, TR("C IVA ad esig.diff.")); // 10
|
||||
set_descr(i++, TR("C IVA per cassa"));
|
||||
set_descr(i++, TR("C IVA in rev. charge"));
|
||||
_tipo_des = acquisto;
|
||||
carica_righe_libere(i);
|
||||
}
|
||||
|
@ -35,8 +35,6 @@ void TXRef_mask::test_rmov()
|
||||
TProgress_monitor pm(rmov_set.items(), TR("Scansione righe contabili"));
|
||||
for (bool ok = rmov_set.move_first(); ok; ok = rmov_set.move_next())
|
||||
{
|
||||
if (!pm.add_status(1))
|
||||
break;
|
||||
const long numreg = rmov.get_long(RMV_NUMREG);
|
||||
const int numrig = rmov.get_int(RMV_NUMRIG);
|
||||
|
||||
@ -63,6 +61,8 @@ void TXRef_mask::test_rmov()
|
||||
log.log(2, msg);
|
||||
}
|
||||
}
|
||||
if (!pm.add_status())
|
||||
break;
|
||||
}
|
||||
|
||||
log.preview();
|
||||
|
@ -26,12 +26,12 @@ void TMovimentoPN::destroy_rows(long num)
|
||||
|
||||
TRectype& TMovimentoPN::cg(int i)
|
||||
{
|
||||
return _cg.row(i >= 0 ? i+1 : -1, TRUE);
|
||||
return _cg.row(i >= 0 ? i+1 : -1, true);
|
||||
}
|
||||
|
||||
TRectype& TMovimentoPN::iva(int i)
|
||||
{
|
||||
return _iva.row(i >= 0 ? i+1 : -1, TRUE);
|
||||
return _iva.row(i >= 0 ? i+1 : -1, true);
|
||||
}
|
||||
|
||||
void TMovimentoPN::destroy_cg_row(int i)
|
||||
@ -39,7 +39,7 @@ void TMovimentoPN::destroy_cg_row(int i)
|
||||
if (i < 0)
|
||||
_cg.destroy_rows();
|
||||
else
|
||||
_cg.destroy_row(i+1, TRUE);
|
||||
_cg.destroy_row(i+1, true);
|
||||
}
|
||||
|
||||
void TMovimentoPN::destroy_iva_row(int i)
|
||||
@ -47,7 +47,7 @@ void TMovimentoPN::destroy_iva_row(int i)
|
||||
if (i < 0)
|
||||
_iva.destroy_rows();
|
||||
else
|
||||
_iva.destroy_row(i+1, TRUE);
|
||||
_iva.destroy_row(i+1, true);
|
||||
}
|
||||
|
||||
int TMovimentoPN::read_mov_rows()
|
||||
@ -278,9 +278,9 @@ int TMovimentoPN::registra(bool re, bool force)
|
||||
dataliq.set_month(mese_liq);
|
||||
}
|
||||
|
||||
controlla_liquidazione(dataliq, registro, TRUE);
|
||||
controlla_liquidazione(dataliq, registro, true);
|
||||
if (re && dataliq.month() != _olddataliq.month())
|
||||
controlla_liquidazione(_olddataliq, registro, TRUE);
|
||||
controlla_liquidazione(_olddataliq, registro, true);
|
||||
|
||||
return err;
|
||||
}
|
||||
@ -293,7 +293,7 @@ int TMovimentoPN::write(bool force)
|
||||
|
||||
int TMovimentoPN::rewrite(bool force)
|
||||
{
|
||||
return registra(TRUE, force);
|
||||
return registra(true, force);
|
||||
}
|
||||
|
||||
int TMovimentoPN::remove()
|
||||
@ -312,7 +312,7 @@ int TMovimentoPN::remove()
|
||||
const TString4 reg(m.get(MOV_REG));
|
||||
const int annoiva = m.get_int(MOV_ANNOIVA);
|
||||
TRegistro registro(reg, annoiva);
|
||||
controlla_liquidazione(_olddataliq, registro, TRUE);
|
||||
controlla_liquidazione(_olddataliq, registro, true);
|
||||
}
|
||||
|
||||
return err;
|
||||
@ -445,7 +445,7 @@ void TMovimentoPN::adjust_rowtypes()
|
||||
bool totale = FALSE;
|
||||
bool ritfis = mov.get_real(MOV_RITFIS).is_zero();
|
||||
bool ritsoc = mov.get_real(MOV_RITSOC).is_zero();
|
||||
bool ivadet = conti.importo_iva(TRUE).is_zero();
|
||||
bool ivadet = conti.importo_iva(true).is_zero();
|
||||
bool ivanon = conti.importo_iva(FALSE).is_zero();
|
||||
|
||||
for (r = 0; r < _cg.rows(); r++)
|
||||
@ -464,7 +464,7 @@ void TMovimentoPN::adjust_rowtypes()
|
||||
if (!totale && row.get_char(RMV_TIPOC) == tipo && row.get_long(RMV_SOTTOCONTO) == codice)
|
||||
{
|
||||
row.put(RMV_ROWTYPE, 'T');
|
||||
totale = TRUE;
|
||||
totale = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -503,10 +503,10 @@ void TMovimentoPN::adjust_rowtypes()
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!ivadet && importo == conti.importo_iva(TRUE))
|
||||
if (!ivadet && importo == conti.importo_iva(true))
|
||||
{
|
||||
row.put(RMV_ROWTYPE, 'D');
|
||||
conti.remove_iva(TRUE);
|
||||
conti.remove_iva(true);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -101,6 +101,7 @@ class TPrimanota_application : public TRelation_application
|
||||
static bool totdocval_handler(TMask_field& f, KEY key);
|
||||
static bool ritfis_handler(TMask_field& f, KEY key);
|
||||
static bool ritsoc_handler(TMask_field& f, KEY key);
|
||||
static bool revcharge_handler(TMask_field& f, KEY key);
|
||||
static bool main_codiva_handler(TMask_field& f, KEY key);
|
||||
static bool liqdiff_handler(TMask_field& f, KEY key);
|
||||
static bool ivaxcassa_handler(TMask_field& f, KEY key);
|
||||
@ -262,7 +263,7 @@ protected:
|
||||
void add_cup_or_cig(short id, const TRectype& rec, TToken_string& riga) const;
|
||||
void add_cup_or_cig(short id, TConfig& ini, TToken_string& riga) const;
|
||||
|
||||
void add_cgs_rit(bool fisc);
|
||||
void add_cgs_ritenute(char fsr); // Fiscali, Sociali, Reverse Charge
|
||||
void generazione_righe_cg(int r);
|
||||
|
||||
void reset_cgs_row(int n) { reset_sheet_row(cgs(), n); }
|
||||
|
@ -66,7 +66,6 @@ public:
|
||||
char sezione_clifo() const;
|
||||
char sezione_ritsoc() const ;
|
||||
char sezione_ritfis();
|
||||
|
||||
|
||||
virtual bool read(const char* cod, int year);
|
||||
|
||||
@ -81,6 +80,7 @@ public:
|
||||
#define RIGA_RITENUTE_SOCIALI 9
|
||||
#define RIGA_IVA_DIFFERITA 10
|
||||
#define RIGA_IVA_PER_CASSA 11
|
||||
#define RIGA_REVERSE_CHARGE 12
|
||||
|
||||
// Pagamenti
|
||||
#define RIGA_ABBUONI_PASSIVI 9
|
||||
|
137
cg/cg2104.cpp
137
cg/cg2104.cpp
@ -24,8 +24,8 @@ bool TPrimanota_application::pag_notify(TSheet_field& ps, int r, KEY k)
|
||||
{
|
||||
TMask* msk = &(ps.mask());
|
||||
|
||||
// if (!msk->is_running()) return TRUE; // Necessario per evitare il CHECK sul pagamento nullo
|
||||
if (!app().is_fattura() || app()._pag == NULL) return TRUE; // Necessario per evitare il CHECK sul pagamento nullo
|
||||
// if (!msk->is_running()) return true; // Necessario per evitare il CHECK sul pagamento nullo
|
||||
if (!app().is_fattura() || app()._pag == NULL) return true; // Necessario per evitare il CHECK sul pagamento nullo
|
||||
|
||||
TPagamento& pag = app().pagamento();
|
||||
TString_array& rws = app().pag_rows();
|
||||
@ -38,7 +38,7 @@ bool TPrimanota_application::pag_notify(TSheet_field& ps, int r, KEY k)
|
||||
TToken_string ts(128), ns(128);
|
||||
TString16 banca;
|
||||
|
||||
bool doit = TRUE, m_impl = FALSE, m_impv = FALSE, m_perc = FALSE;
|
||||
bool doit = true, m_impl = FALSE, m_impv = FALSE, m_perc = FALSE;
|
||||
bool m_scad = FALSE, m_tipo = FALSE, m_ulc = FALSE, mod = FALSE;
|
||||
word ahiahi = P_OK;
|
||||
|
||||
@ -185,7 +185,7 @@ bool TPrimanota_application::pag_notify(TSheet_field& ps, int r, KEY k)
|
||||
if (m_impv)
|
||||
{
|
||||
trw.add(newv,4);
|
||||
const real p = pag.recalc_percrata(r, TRUE);
|
||||
const real p = pag.recalc_percrata(r, true);
|
||||
trs.add(p.string(), 3);
|
||||
}
|
||||
if (mod)
|
||||
@ -218,7 +218,7 @@ bool TPrimanota_application::pag_notify(TSheet_field& ps, int r, KEY k)
|
||||
|
||||
bool TPrimanota_application::pag_sheet_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
bool ok = TRUE;
|
||||
bool ok = true;
|
||||
if (key == K_TAB || key == K_ENTER)
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
@ -241,13 +241,15 @@ bool TPrimanota_application::pag_sheet_handler(TMask_field& f, KEY key)
|
||||
return f.error_box(s);
|
||||
}
|
||||
|
||||
const TString& codval = m.get(SK_VALUTA);
|
||||
const bool in_valuta = pag.in_valuta();
|
||||
real imp;
|
||||
|
||||
if (key == K_ENTER)
|
||||
{
|
||||
real tot = m.get_real(in_valuta ? SK_TOTDOCVAL : F_TOTALE);
|
||||
if (!in_valuta && app().is_split_payment())
|
||||
tot -= m.get_real(F_IMPOSTE);
|
||||
|
||||
for (int r = pag.n_rate()-1; r >= 0; r--)
|
||||
imp += in_valuta ? pag.tval_rata(r) : pag.tlit_rata(r);
|
||||
|
||||
@ -256,10 +258,11 @@ bool TPrimanota_application::pag_sheet_handler(TMask_field& f, KEY key)
|
||||
|
||||
if (imp != tot)
|
||||
{
|
||||
TCurrency curr(imp, in_valuta ? (const char*)codval : "");
|
||||
const TString is = curr.string(TRUE);
|
||||
const TString& codval = in_valuta ? m.get(SK_VALUTA) : EMPTY_STRING;
|
||||
TCurrency curr(imp, codval);
|
||||
const TString is = curr.string(true);
|
||||
curr.set_num(tot);
|
||||
const TString ts = curr.string(TRUE);
|
||||
const TString ts = curr.string(true);
|
||||
ok = yesno_box(FR("Il totale delle rate è %s mentre\n"
|
||||
"il totale del documento è %s.\n"
|
||||
"Si desidera registrare ugualmente?"),
|
||||
@ -279,9 +282,9 @@ bool TPrimanota_application::pag_sheet_handler(TMask_field& f, KEY key)
|
||||
if (imp != totlit)
|
||||
{
|
||||
TCurrency curr(imp);
|
||||
const TString is = curr.string(TRUE);
|
||||
const TString is = curr.string(true);
|
||||
curr.set_num(totlit);
|
||||
const TString ts = curr.string(TRUE);
|
||||
const TString ts = curr.string(true);
|
||||
const TRectype & rec = cache().get("%VAL", TCurrency::get_firm_val());
|
||||
const char * name = (const char *) rec.get("S0");
|
||||
|
||||
@ -314,7 +317,7 @@ bool TPrimanota_application::tipopag_handler(TMask_field& f, KEY key)
|
||||
m.set(107, s);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPrimanota_application::codpag_handler(TMask_field& f, KEY key)
|
||||
@ -359,7 +362,7 @@ bool TPrimanota_application::codpag_handler(TMask_field& f, KEY key)
|
||||
|
||||
bool TPrimanota_application::annorif_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
bool ok = TRUE;
|
||||
bool ok = true;
|
||||
if (f.to_check(key))
|
||||
{
|
||||
const TMask& m = f.mask();
|
||||
@ -375,9 +378,9 @@ bool TPrimanota_application::annorif_handler(TMask_field& f, KEY key)
|
||||
|
||||
bool TPrimanota_application::numrif_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
bool ok = TRUE;
|
||||
bool ok = true;
|
||||
|
||||
if (f.to_check(key, TRUE))
|
||||
if (f.to_check(key, true))
|
||||
{
|
||||
TPrimanota_application& a = app();
|
||||
TMask& m = f.mask();
|
||||
@ -408,7 +411,7 @@ bool TPrimanota_application::numrif_handler(TMask_field& f, KEY key)
|
||||
}
|
||||
|
||||
if (key == K_TAB && a.is_fattura())
|
||||
a.activate_numrif(m, TRUE);
|
||||
a.activate_numrif(m, true);
|
||||
|
||||
if (ok && key == K_ENTER && m.edit_mode())
|
||||
{
|
||||
@ -439,7 +442,7 @@ bool TPrimanota_application::numrif_handler(TMask_field& f, KEY key)
|
||||
|
||||
bool TPrimanota_application::valuta_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (key == K_TAB && f.to_check(key, TRUE))
|
||||
if (key == K_TAB && f.to_check(key, true))
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
const TString& val = f.get();
|
||||
@ -464,7 +467,7 @@ bool TPrimanota_application::valuta_handler(TMask_field& f, KEY key)
|
||||
const TRectype& recval = cache().get("%VAL", val);
|
||||
dc.set(recval.get("D0"));
|
||||
m.enable(SK_CAMBIO); // Abilito per far funzionare la prossima riga
|
||||
m.set(SK_CAMBIO, recval.get("S4"), TRUE);
|
||||
m.set(SK_CAMBIO, recval.get("S4"), true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -474,15 +477,15 @@ bool TPrimanota_application::valuta_handler(TMask_field& f, KEY key)
|
||||
if (vi.active() && vi.empty())
|
||||
{
|
||||
m.set(F_VALUTAINTRA, val);
|
||||
m.set(F_CAMBIOINTRA, m.get(SK_CAMBIO), TRUE);
|
||||
m.set(F_CAMBIOINTRA, m.get(SK_CAMBIO), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m.set(SK_CAMBIO, "", TRUE);
|
||||
m.set(SK_TOTDOCVAL, "", TRUE);
|
||||
m.set(SK_CAMBIO, "", true);
|
||||
m.set(SK_TOTDOCVAL, "", true);
|
||||
}
|
||||
m.enable(SK_CAMBIO, full);
|
||||
m.enable(SK_TOTDOCVAL, full);
|
||||
@ -490,22 +493,22 @@ bool TPrimanota_application::valuta_handler(TMask_field& f, KEY key)
|
||||
if (app().is_fattura())
|
||||
m.set(FS_VALUTA, val); // Copia a pagina 3
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPrimanota_application::datacambio_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (key == K_TAB && f.to_check(key, TRUE))
|
||||
if (key == K_TAB && f.to_check(key, true))
|
||||
{
|
||||
if (app().is_fattura())
|
||||
f.mask().set(FS_DATACAMBIO, f.get()); // Copia a pagina 3
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPrimanota_application::cambio_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (key == K_TAB && f.to_check(key, TRUE))
|
||||
if (key == K_TAB && f.to_check(key, true))
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
TPrimanota_application& a = app();
|
||||
@ -551,14 +554,14 @@ bool TPrimanota_application::recalc_handler(TMask_field& f, KEY key)
|
||||
// SE CAMBIANO I SIGNIFICATI DEL TIPO PRIMA RATA BISOGNA RIFARE TUTTO
|
||||
pag.set_tipo_prima_rata(pag.tipo_prima_rata() - 3);
|
||||
m.set(FS_TIPOPR, pag.desc_tpr());
|
||||
pag.set_tpr4(TRUE);
|
||||
pag.set_tpr4(true);
|
||||
}
|
||||
else if (recalc_aut && pag.was_tpr4())
|
||||
{
|
||||
// SE CAMBIANO I SIGNIFICATI DEL TIPO PRIMA RATA BISOGNA RIFARE TUTTO
|
||||
pag.set_tpr4(FALSE);
|
||||
bool yak = pag.tlit_rata(0) != pag.importo_da_non_dividere(FALSE);
|
||||
if (pag.in_valuta()) yak |= (pag.tval_rata(0) != pag.importo_da_non_dividere(TRUE));
|
||||
if (pag.in_valuta()) yak |= (pag.tval_rata(0) != pag.importo_da_non_dividere(true));
|
||||
if (yak)
|
||||
{
|
||||
if (yesno_box(TR("L'importo della prima rata è stato modificato. "
|
||||
@ -592,7 +595,7 @@ bool TPrimanota_application::recalc_handler(TMask_field& f, KEY key)
|
||||
ps.sheet_mask().enable(DLG_DELREC, !recalc_aut);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPrimanota_application::nrate_handler(TMask_field& f, KEY key)
|
||||
@ -612,7 +615,7 @@ bool TPrimanota_application::nrate_handler(TMask_field& f, KEY key)
|
||||
TString4 r; r.format("%d", pag.n_rate());
|
||||
f.set(r);
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPrimanota_application::codcab_handler(TMask_field& f, KEY key)
|
||||
@ -634,7 +637,7 @@ bool TPrimanota_application::codcab_handler(TMask_field& f, KEY key)
|
||||
ps.force_update();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPrimanota_application::rataeur_handler(TMask_field& f, KEY key)
|
||||
@ -651,7 +654,7 @@ bool TPrimanota_application::rataeur_handler(TMask_field& f, KEY key)
|
||||
f.set(s);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPrimanota_application::rataval_handler(TMask_field& f, KEY key)
|
||||
@ -667,7 +670,7 @@ bool TPrimanota_application::rataval_handler(TMask_field& f, KEY key)
|
||||
f.set(s);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void TPrimanota_application::reset_pagamento()
|
||||
@ -726,7 +729,10 @@ void TPrimanota_application::set_totale_pagamento(bool update)
|
||||
}
|
||||
else
|
||||
{
|
||||
pag.set_total(imponibile, imposta, spese);
|
||||
if (is_split_payment())
|
||||
pag.set_total(imponibile, ZERO, spese);
|
||||
else
|
||||
pag.set_total(imponibile, imposta, spese);
|
||||
}
|
||||
|
||||
if (update)
|
||||
@ -741,7 +747,7 @@ void TPrimanota_application::set_banche(TMask& m)
|
||||
{
|
||||
// Aggiunge banche: CM000033
|
||||
TSheet_field& ps = m.sfield(FS_RATESHEET);
|
||||
bool update = FALSE;
|
||||
bool update = false;
|
||||
for (int i = ps.items()-1; i >= 0; i--)
|
||||
{
|
||||
TToken_string& row = ps.row(i);
|
||||
@ -749,13 +755,13 @@ void TPrimanota_application::set_banche(TMask& m)
|
||||
{
|
||||
row.add(m.get(FS_NSABI), 7);
|
||||
row.add(m.get(FS_NSCAB), 8);
|
||||
update = TRUE;
|
||||
update = true;
|
||||
}
|
||||
if (row.get_char(9) <= ' ')
|
||||
{
|
||||
row.add(m.get(FS_VSABI), 9);
|
||||
row.add(m.get(FS_VSCAB), 10);
|
||||
update = TRUE;
|
||||
update = true;
|
||||
}
|
||||
}
|
||||
if (update)
|
||||
@ -767,7 +773,7 @@ void TPrimanota_application::set_scadenze(TMask& m)
|
||||
const TString& cp = m.get(F_CODPAG);
|
||||
const TString& dt = m.get(F_DATADOC);
|
||||
set_pagamento(cp, dt);
|
||||
set_totale_pagamento(FALSE);
|
||||
set_totale_pagamento(false);
|
||||
|
||||
TPagamento& pag = pagamento();
|
||||
if (m.field(FS_RECALC).enabled())
|
||||
@ -776,7 +782,7 @@ void TPrimanota_application::set_scadenze(TMask& m)
|
||||
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.insert_mode() ? "X" : "", TRUE);
|
||||
m.set(FS_RECALC, m.insert_mode() ? "X" : "", true);
|
||||
m.set(FS_NRATE, pag.n_rate());
|
||||
}
|
||||
pag.set_rate_auto();
|
||||
@ -820,31 +826,38 @@ bool TPrimanota_application::read_scadenze(TMask& m)
|
||||
TPagamento& pag = pagamento();
|
||||
|
||||
const bool in_valuta = ::is_true_value(m.get(SK_VALUTA));
|
||||
const bool is_split = !in_valuta && clifo.tipo() == 'C' && anno >= 2015 && is_split_payment();
|
||||
|
||||
const real totale = m.get_real(in_valuta ? SK_TOTDOCVAL : F_TOTALE);
|
||||
real totale = m.get_real(in_valuta ? SK_TOTDOCVAL : F_TOTALE);
|
||||
if (is_split)
|
||||
totale -= m.get_real(F_IMPOSTE);
|
||||
|
||||
if (totale != partita.importo(in_valuta).valore())
|
||||
{
|
||||
const TCurrency totdoc_c(totale, m.get(SK_VALUTA));
|
||||
const TCurrency totdoc_s(partita.importo(in_valuta).valore(), m.get(SK_VALUTA));
|
||||
const TString i1 = totdoc_c.string(TRUE);
|
||||
const TString i2 = totdoc_s.string(TRUE);
|
||||
const TString& codval = m.get(SK_VALUTA);
|
||||
const TCurrency totdoc_c(totale, codval);
|
||||
const TCurrency totdoc_s(partita.importo(in_valuta).valore(), codval);
|
||||
const TString i1 = totdoc_c.string(true);
|
||||
const TString i2 = totdoc_s.string(true);
|
||||
warning_box(FR("Il totale documento (%s) non corrisponde a quello del saldaconto (%s)."),
|
||||
(const char*)i1, (const char*)i2);
|
||||
}
|
||||
if (iva() != nessuna_iva)
|
||||
{
|
||||
if (m.get_real(F_IMPOSTE) != partita.get_real(PART_IMPOSTA))
|
||||
const real imposte_cg = is_split ? ZERO : m.get_real(F_IMPOSTE);
|
||||
const real imposte_sc = partita.get_real(PART_IMPOSTA);
|
||||
if (imposte_cg != imposte_sc)
|
||||
{
|
||||
const TCurrency imposte_c(m.get_real(F_IMPOSTE));
|
||||
const TCurrency imposte_s(partita.get_real(PART_IMPOSTA));
|
||||
const TString i1 = imposte_c.string(TRUE);
|
||||
const TString i2 = imposte_s.string(TRUE);
|
||||
const TCurrency imposte_c(imposte_cg);
|
||||
const TCurrency imposte_s(imposte_sc);
|
||||
const TString i1 = imposte_c.string(true);
|
||||
const TString i2 = imposte_s.string(true);
|
||||
warning_box(FR("Il totale delle imposte (%s) non corrisponde a quello del saldaconto (%s)."),
|
||||
(const char*)i1, (const char*)i2);
|
||||
}
|
||||
}
|
||||
|
||||
set_totale_pagamento(FALSE);
|
||||
set_totale_pagamento(false);
|
||||
|
||||
TSheet_field& ps = m.sfield(FS_RATESHEET);
|
||||
|
||||
@ -888,14 +901,14 @@ bool TPrimanota_application::read_scadenze(TMask& m)
|
||||
m.set(FS_RDIFFER, pag.rate_differenziate() ? "1" : "2");
|
||||
m.set(FS_NAMEPAG, pag.name());
|
||||
m.set(FS_TIPOPR, pag.desc_tpr());
|
||||
m.set(FS_MCOMM, pag.mese_commerciale() ? "X" : "", TRUE);
|
||||
m.set(FS_RECALC, m.insert_mode() ? "X" : "", TRUE);
|
||||
m.set(FS_MCOMM, pag.mese_commerciale() ? "X" : "", true);
|
||||
m.set(FS_RECALC, m.insert_mode() ? "X" : "", true);
|
||||
m.set(FS_NRATE, pag.n_rate());
|
||||
|
||||
pag.set_sheet(ps);
|
||||
_pag_rows = ps.rows_array();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
int TPrimanota_application::cerca_conto_cf(TBill& bill) const
|
||||
@ -1011,9 +1024,11 @@ void TPrimanota_application::write_scadenze(const TMask& m)
|
||||
|
||||
partita.put(PART_IMPORTO, imponibile);
|
||||
partita.put(PART_IMPORTOVAL, imponibile_val);
|
||||
partita.put(PART_SPESE, pag.spese());
|
||||
partita.put(PART_SPESE, pag.spese(in_valuta));
|
||||
if (iva() != nessuna_iva)
|
||||
partita.put(PART_IMPOSTA, m.get(F_IMPOSTE));
|
||||
partita.put(PART_IMPOSTA, pag.imposta(in_valuta));
|
||||
else
|
||||
partita.zero(PART_IMPOSTA);
|
||||
|
||||
TSheet_field& ps = m.sfield(FS_RATESHEET);
|
||||
const int new_rate = ps.items();
|
||||
@ -1104,7 +1119,7 @@ void TPrimanota_application::write_scadenze(const TMask& m)
|
||||
|
||||
bool TPrimanota_application::showpartite_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
bool ok = TRUE;
|
||||
bool ok = true;
|
||||
TMask& m = f.mask();
|
||||
TPrimanota_application& a = app();
|
||||
TMask& cm = a.curr_mask();
|
||||
@ -1141,7 +1156,7 @@ bool TPrimanota_application::showpartite_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
TString msg(128);
|
||||
const TCurrency curr(speso.valore());
|
||||
msg.format(FR("L'importo sul saldaconto della riga %d è %s"), (riga+1), (const char*)curr.string(TRUE));
|
||||
msg.format(FR("L'importo sul saldaconto della riga %d è %s"), (riga+1), (const char*)curr.string(true));
|
||||
if (!speso.is_zero())
|
||||
msg << (speso.sezione() == 'A' ? TR(" Avere") : TR(" Dare"));
|
||||
return f.error_box(msg);
|
||||
@ -1169,7 +1184,7 @@ bool TPrimanota_application::notify_edit_pagamento(TPartita& p, TRectype& new_pa
|
||||
const TRiga_partite& somma = p.riga(nrigp);
|
||||
const int riga_contabile = somma.get_int(PART_NUMRIG); // Riga movimento
|
||||
TSheet_field& sheet = cgs();
|
||||
TBill new_conto; new_conto.get(new_pag, TRUE);
|
||||
TBill new_conto; new_conto.get(new_pag, true);
|
||||
|
||||
if (_as400 || !new_conto.ok())
|
||||
deleting = -1; // Ignora contropartite
|
||||
@ -1181,7 +1196,7 @@ bool TPrimanota_application::notify_edit_pagamento(TPartita& p, TRectype& new_pa
|
||||
|
||||
// Aggiornamento contopartita
|
||||
const TImporto old_importo(controsez, old_pag.get_real(PAGSCA_IMPORTO));
|
||||
TBill old_conto; old_conto.get(old_pag, TRUE);
|
||||
TBill old_conto; old_conto.get(old_pag, true);
|
||||
|
||||
const TImporto new_importo(controsez, new_pag.get_real(PAGSCA_IMPORTO));
|
||||
|
||||
@ -1289,7 +1304,7 @@ bool TPrimanota_application::notify_edit_pagamento(TPartita& p, TRectype& new_pa
|
||||
TImporto old_abbuono, new_abbuono, old_diffcam, new_diffcam;
|
||||
const bool empty = p.modifica_pagamento(new_pag, valuta,
|
||||
old_ap, old_abbuono, old_diffcam,
|
||||
new_ap, new_abbuono, new_diffcam, TRUE);
|
||||
new_ap, new_abbuono, new_diffcam, true);
|
||||
|
||||
if (deleting >= 0)
|
||||
{
|
||||
@ -1397,7 +1412,7 @@ bool TPrimanota_application::notify_cgline_deletion(TPartita& partita, long nreg
|
||||
nul_pag.put(PAGSCA_ACCSAL, 'A');
|
||||
const TValuta val; // Non cambiare valuta
|
||||
notify_edit_pagamento(partita, nul_pag, val, numrig);
|
||||
found = TRUE;
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1420,7 +1435,7 @@ bool TPrimanota_application::notify_cgline_deletion(TPartita& partita, long nreg
|
||||
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);
|
||||
found = TRUE;
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ END
|
||||
BOOLEAN F_RECALC
|
||||
BEGIN
|
||||
PROMPT 53 5 "Ricalcolo automatico"
|
||||
MESSAGE TRUE ENABLE,F_RDIFFER|ENABLE,F_MCOMM
|
||||
MESSAGE true ENABLE,F_RDIFFER|ENABLE,F_MCOMM
|
||||
MESSAGE FALSE DISABLE,F_RDIFFER|DISABLE,F_MCOMM
|
||||
END
|
||||
|
||||
|
@ -117,7 +117,7 @@ void TPay_mask::init(const TGame_mask* parent, int mod)
|
||||
enable(DLG_DELREC, edit_mode());
|
||||
|
||||
#ifdef __EXTRA__
|
||||
xvtil_statbar_set(mod == MODE_MOD ? TR("Modifica") : TR("Inserimento"), TRUE);
|
||||
xvtil_statbar_set(mod == MODE_MOD ? TR("Modifica") : TR("Inserimento"), true);
|
||||
|
||||
hide(E_CODPAG); hide(E_DESPAG);
|
||||
set_handler(E_DATAREG, datareg_handler);
|
||||
@ -372,14 +372,14 @@ void TPay_mask::gioca_cambi(int force)
|
||||
{
|
||||
const real new_totale = cambio.val2eur(totval);
|
||||
if (new_totale != totale)
|
||||
set(S_IMPORTO, new_totale, TRUE);
|
||||
set(S_IMPORTO, new_totale, true);
|
||||
}
|
||||
|
||||
if ( (force == 0x2 || totval.is_zero()) && !(totale.is_zero() || cambio.in_euro()))
|
||||
{
|
||||
const real new_totval = cambio.eur2val(totale);
|
||||
if (new_totval != totval)
|
||||
set(S_IMPORTOVAL, new_totval, TRUE);
|
||||
set(S_IMPORTOVAL, new_totval, true);
|
||||
}
|
||||
|
||||
#ifdef __EXTRA__
|
||||
@ -387,7 +387,7 @@ void TPay_mask::gioca_cambi(int force)
|
||||
{
|
||||
real new_cambio = totale / totval; new_cambio.round(6);
|
||||
if (new_cambio != cambio.cambio())
|
||||
set(E_CAMBIO, new_cambio, TRUE);
|
||||
set(E_CAMBIO, new_cambio, true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -469,7 +469,7 @@ bool TPay_mask::importo_handler(TMask_field& f, KEY k)
|
||||
m.set(S_RESIDUOPAG, residuopag);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPay_mask::importolire_handler(TMask_field& f, KEY k)
|
||||
@ -488,7 +488,7 @@ bool TPay_mask::importolire_handler(TMask_field& f, KEY k)
|
||||
|
||||
if (f.to_check(k))
|
||||
m.gioca_cambi();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPay_mask::saldo_handler(TMask_field& f, KEY k)
|
||||
@ -503,7 +503,7 @@ bool TPay_mask::saldo_handler(TMask_field& f, KEY k)
|
||||
imp.on_hit();
|
||||
m.set_mode(NO_MODE);
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPay_mask::datapag_handler(TMask_field& f, KEY k)
|
||||
@ -518,7 +518,7 @@ bool TPay_mask::datapag_handler(TMask_field& f, KEY k)
|
||||
if (datapag < m._datarat)
|
||||
warning_box(TR("Attenzione: la data del pagamento precede quella della rata"));
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPay_mask::conto_handler(TMask_field& f, KEY k)
|
||||
@ -532,7 +532,7 @@ bool TPay_mask::conto_handler(TMask_field& f, KEY k)
|
||||
m.reset(S_SOTTOCONTO);
|
||||
m.set(S_DESCRCONTO, desc);
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -618,7 +618,7 @@ void TGame_mask::init(const TBill& bill, long numreg, int riga)
|
||||
set(P_DESCR, descr);
|
||||
|
||||
#ifdef __EXTRA__
|
||||
xvtil_statbar_set(TR("Estratto conto"), TRUE);
|
||||
xvtil_statbar_set(TR("Estratto conto"), true);
|
||||
|
||||
disable(-3); // Disabilita gestione valuta
|
||||
hide(P_RESIDUO);
|
||||
@ -681,7 +681,7 @@ bool TGame_mask::annopart_handler(TMask_field& f, KEY k)
|
||||
n.set_dirty();
|
||||
numpart_handler(n, k);
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TGame_mask::numpart_handler(TMask_field& f, KEY k)
|
||||
@ -715,7 +715,7 @@ bool TGame_mask::numpart_handler(TMask_field& f, KEY k)
|
||||
sheet.post_select(best_match);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TGame_mask::show_all_handler(TMask_field& f, KEY k)
|
||||
@ -725,7 +725,7 @@ bool TGame_mask::show_all_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
gm.fill_partite();
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TGame_mask::sort_part_handler(TMask_field& f, KEY k)
|
||||
@ -733,7 +733,7 @@ bool TGame_mask::sort_part_handler(TMask_field& f, KEY k)
|
||||
TGame_mask& gm = (TGame_mask&)f.mask();
|
||||
if (k == K_SPACE && gm.is_running())
|
||||
gm.sort_partite();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TGame_mask::cambio_handler(TMask_field& f, KEY k)
|
||||
@ -749,7 +749,7 @@ bool TGame_mask::cambio_handler(TMask_field& f, KEY k)
|
||||
}
|
||||
gm.aggiorna_residuo();
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -779,7 +779,7 @@ void TGame_mask::aggiorna_residuo()
|
||||
const TImporto abb_diff = giochi.importo_speso(_numreg, _numrig, FALSE, 0x6);
|
||||
_resval -= abb_diff;
|
||||
cambio.eur2val(_resval);
|
||||
const TImporto spesoval = giochi.importo_speso(_numreg, _numrig, TRUE, 0x1);
|
||||
const TImporto spesoval = giochi.importo_speso(_numreg, _numrig, true, 0x1);
|
||||
_resval -= spesoval; // Residuo della riga
|
||||
_resval.normalize(sez);
|
||||
set(P_RESIDUOVAL, _resval.valore());
|
||||
@ -816,9 +816,9 @@ void TGame_mask::aggiorna_valuta(const TValuta& val)
|
||||
TRectype pag(scad.row(p));
|
||||
real imp(pag.get(PAGSCA_IMPORTOVAL));
|
||||
val.val2eur(imp);
|
||||
pag.put(PAGSCA_IMPORTO, imp); // Converte in lire l'importo in valuta
|
||||
pag.put(PAGSCA_IMPORTO, imp);
|
||||
#ifdef __EXTRA__
|
||||
game->modifica_pagamento(pag, val, TRUE);
|
||||
game->modifica_pagamento(pag, val, true);
|
||||
#else
|
||||
app().notify_edit_pagamento(*game, pag, val);
|
||||
#endif
|
||||
@ -859,13 +859,13 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
|
||||
{
|
||||
if (gm._ignore_next_select)
|
||||
{
|
||||
gm._ignore_next_select = FALSE;
|
||||
return TRUE;
|
||||
gm._ignore_next_select = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
const bool changing_row = gm._riga_partite != r;
|
||||
if (!changing_row)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
TWait_cursor hourglass;
|
||||
|
||||
@ -913,7 +913,7 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
|
||||
gm.add_descrizione(riga_fattura, riga);
|
||||
gm.add_importo(riga_fattura, riga.importo(FALSE, 0x1));
|
||||
if (in_valuta)
|
||||
gm.add_importo(riga_fattura, riga.importo(TRUE, 0x1), prima_valuta.codice());
|
||||
gm.add_importo(riga_fattura, riga.importo(true, 0x1), prima_valuta.codice());
|
||||
else
|
||||
riga_fattura.add("");
|
||||
riga_fattura.add(riga.get(PART_NREG));
|
||||
@ -1200,7 +1200,7 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
|
||||
|
||||
sheet.force_update();
|
||||
if (sheet.items() > 0)
|
||||
sheet.select(0, TRUE);
|
||||
sheet.select(0, true);
|
||||
else
|
||||
sheet.force_update();
|
||||
}
|
||||
@ -1415,7 +1415,7 @@ int TGame_mask::nuovo_pagamento(TPartita& partita, int nriga, int rata, tipo_mov
|
||||
contro.get(cgs.row(nrow), 3);
|
||||
}
|
||||
}
|
||||
contro.put(pagamento, TRUE); // Scrive conto contropartita
|
||||
contro.put(pagamento, true); // Scrive conto contropartita
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1558,12 +1558,13 @@ bool TGame_mask::edit_scadenza_handler(TMask_field& f, KEY k)
|
||||
const bool scroll = rn > rt; // Scrolla solo se aggiungo righe
|
||||
ss.select(rs, scroll); // ... riporta la selezione sulla riga corrente
|
||||
}
|
||||
gm._changed = TRUE;
|
||||
|
||||
gm._changed = true;
|
||||
|
||||
gm.set_focus(); // A volte finisce sotto!
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TGame_mask::nuovo_handler(TMask_field& f, KEY k)
|
||||
@ -1575,16 +1576,16 @@ bool TGame_mask::nuovo_handler(TMask_field& f, KEY k)
|
||||
TString numero;
|
||||
|
||||
#ifdef __EXTRA__
|
||||
const bool allow_fatt = TRUE;
|
||||
const bool allow_fatt = true;
|
||||
#else
|
||||
const bool allow_fatt = FALSE;
|
||||
#endif
|
||||
|
||||
static TNew_mask* new_game = NULL;
|
||||
if (new_game == NULL)
|
||||
new_game = new TNew_mask(gm.conto().tipo(), allow_fatt, TRUE);
|
||||
new_game = new TNew_mask(gm.conto().tipo(), allow_fatt, true);
|
||||
else
|
||||
new_game->init(gm.conto().tipo(), allow_fatt, TRUE);
|
||||
new_game->init(gm.conto().tipo(), allow_fatt, true);
|
||||
|
||||
tipo_movimento tm = tm_pagamento;
|
||||
|
||||
@ -1635,7 +1636,7 @@ bool TGame_mask::nuovo_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
gm.set(P_ANNO, anno);
|
||||
gm.set(P_NUMERO, numero);
|
||||
gm._changed = TRUE;
|
||||
gm._changed = true;
|
||||
|
||||
// Aggiorna sheet partite: aggiunge la nuova partita e lo riordina
|
||||
gm.fill_partite();
|
||||
@ -1643,7 +1644,7 @@ bool TGame_mask::nuovo_handler(TMask_field& f, KEY k)
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -1837,7 +1838,7 @@ bool TGame_mask::partita_aperta(const TRectype& part) const
|
||||
if (err == NOERR && saldo.is_zero())
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
static int sort_games_num(const TObject** o1, const TObject** o2)
|
||||
@ -1981,7 +1982,8 @@ void TGame_mask::fill_partite()
|
||||
}
|
||||
}
|
||||
if (found < 0) found = 0;
|
||||
partite().select(found, TRUE);
|
||||
_ignore_next_select = false;
|
||||
partite().select(found, true);
|
||||
_ignore_next_select = !is_running();
|
||||
}
|
||||
else
|
||||
@ -2034,7 +2036,7 @@ bool TGame_mask::edit_pagamento(TPartita& p, int nriga, int nrata, int nrigp) co
|
||||
|
||||
if (key == K_DEL)
|
||||
{
|
||||
const bool truly = yesno_box(TR("Confermare l'eliminazione"));
|
||||
const bool truly = delete_box(TR("Confermare l'eliminazione"));
|
||||
if (!truly) key = K_ESC;
|
||||
}
|
||||
|
||||
@ -2060,10 +2062,10 @@ bool TGame_mask::edit_pagamento(TPartita& p, int nriga, int nrata, int nrigp) co
|
||||
|
||||
const TValuta val(somma);
|
||||
#ifdef __EXTRA__
|
||||
p.modifica_pagamento(newpag, val, TRUE);
|
||||
p.modifica_pagamento(newpag, val, true);
|
||||
#else
|
||||
if (somma.is_nota_credito())
|
||||
p.modifica_pagamento(newpag, val, TRUE);
|
||||
p.modifica_pagamento(newpag, val, true);
|
||||
else
|
||||
app().notify_edit_pagamento(p, newpag, val);
|
||||
#endif
|
||||
@ -2072,7 +2074,7 @@ bool TGame_mask::edit_pagamento(TPartita& p, int nriga, int nrata, int nrigp) co
|
||||
// delete pm; pm = NULL; // commentata in quanto statica
|
||||
|
||||
#ifdef __EXTRA__
|
||||
xvtil_statbar_set(TR("Estratto conto"), TRUE);
|
||||
xvtil_statbar_set(TR("Estratto conto"), true);
|
||||
#endif
|
||||
|
||||
return key != K_ESC;
|
||||
@ -2324,10 +2326,10 @@ bool TPrimanota_application::crea_partita(const TBill& bill, int anno, const TSt
|
||||
const real impval = valuta.eur2val(implit);
|
||||
pagamento.put(PAGSCA_IMPORTOVAL, impval);
|
||||
}
|
||||
partita.modifica_pagamento(pagamento, valuta, TRUE);
|
||||
partita.modifica_pagamento(pagamento, valuta, true);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -149,7 +149,7 @@ void TPrimanota_application::load_colors()
|
||||
for (THash_object* o = colori.get_hashobj(); o; o = colori.get_hashobj())
|
||||
{
|
||||
const TString& key = o->key();
|
||||
if (key.len() == 7 && key.compare("Color", 5, TRUE) == 0)
|
||||
if (key.len() == 7 && key.compare("Color", 5, true) == 0)
|
||||
{
|
||||
const COLOR col = conf.get_color(key);
|
||||
TString* strcol = new TString(15);
|
||||
@ -336,7 +336,7 @@ bool TPrimanota_application::aggiusta_prorata()
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TPrimanota_application::prorata_handler(TMask_field& f, KEY k)
|
||||
@ -347,7 +347,7 @@ bool TPrimanota_application::prorata_handler(TMask_field& f, KEY k)
|
||||
f.hide();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -384,6 +384,8 @@ BEGIN
|
||||
ITEM "R|Ritenute professionali"
|
||||
ITEM "S|Ritenute sociali"
|
||||
ITEM "T|Totale documento"
|
||||
ITEM "V|IVA Reverse charge"
|
||||
ITEM "1|IVA scissione pag."
|
||||
FLAGS "D"
|
||||
FIELD ROWTYPE
|
||||
END
|
||||
|
@ -156,7 +156,7 @@ BOOLEAN 113
|
||||
BEGIN
|
||||
PROMPT 12 11 "Bloccata"
|
||||
MESSAGE FALSE CLEAR,114
|
||||
MESSAGE TRUE ENABLE,114
|
||||
MESSAGE true ENABLE,114
|
||||
END
|
||||
|
||||
STRING 114 6
|
||||
|
@ -70,8 +70,8 @@ END
|
||||
BOOLEAN FS_RECALC
|
||||
BEGIN
|
||||
PROMPT 38 6 "Ricalcolo automatico"
|
||||
MESSAGE TRUE ENABLE,FS_RDIFFER|ENABLE,FS_MCOMM|PUSH,FS_RDIFFER
|
||||
MESSAGE FALSE DISABLE,FS_RDIFFER|DISABLE,FS_MCOMM|DISABLE,FS_NRATE
|
||||
MESSAGE TRUE ENABLE,FS_RDIFFER|ENABLE,FS_MCOMM|PUSH,FS_RDIFFER
|
||||
END
|
||||
|
||||
STRING FS_VALUTA 3
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
TCursor& update_cursor(bool use_argv = FALSE);
|
||||
TCursor_sheet* get_selection_sheet();
|
||||
TCursor& get_cursor() { return _cur ? *_cur : update_cursor(); }
|
||||
void notify_update_needed() { _update_cursor = TRUE; }
|
||||
void notify_update_needed() { _update_cursor = true; }
|
||||
|
||||
TProvvisori_msk();
|
||||
~TProvvisori_msk();
|
||||
@ -111,7 +111,7 @@ TCursor& TProvvisori_msk::update_cursor(bool use_argv)
|
||||
_cur->set_filterfunction(filter);
|
||||
_cur->setregion(from_rec, to_rec);
|
||||
_cur->items();
|
||||
_cur->freeze(TRUE);
|
||||
_cur->freeze(true);
|
||||
|
||||
_update_cursor = FALSE;
|
||||
|
||||
@ -203,11 +203,11 @@ bool TProvvisori_msk::on_field_event(TOperable_field& o, TField_event e, long jo
|
||||
notify_update_needed(); // ... ricorda che devi aggiornare il cursore la prossima volta
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
TProvvisori_msk::TProvvisori_msk()
|
||||
: TAutomask("cg2200a"), _sheet(NULL), _rel(NULL), _cur(NULL), _update_cursor(TRUE)
|
||||
: TAutomask("cg2200a"), _sheet(NULL), _rel(NULL), _cur(NULL), _update_cursor(true)
|
||||
{
|
||||
_msk = this;
|
||||
}
|
||||
@ -342,7 +342,7 @@ bool TProvvisori_app::confirm_provv(TCursor& cur, TProgind& pi, TCursor_sheet* s
|
||||
rmov.put(RMV_NUMREG, numreg);
|
||||
rmov.put(RMV_NUMRIG, rig);
|
||||
if (rmov.read(_isequal, _lock) != NOERR) break;
|
||||
aggiungi_saldi(rmov.curr(), TRUE);
|
||||
aggiungi_saldi(rmov.curr(), true);
|
||||
aggiungi_saldi(rmov.curr(), FALSE);
|
||||
}
|
||||
|
||||
@ -361,7 +361,7 @@ bool TProvvisori_app::confirm_provv(TCursor& cur, TProgind& pi, TCursor_sheet* s
|
||||
return error_box(FR("Errore nella conferma del movimento %ld"), numreg);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TProvvisori_app::delete_provv(TCursor& cur, TProgind& pi, TCursor_sheet* sheet)
|
||||
@ -397,7 +397,7 @@ bool TProvvisori_app::delete_provv(TCursor& cur, TProgind& pi, TCursor_sheet* sh
|
||||
rmov.put(RMV_NUMRIG, rig);
|
||||
if (rmov.read(_isequal, _lock) != NOERR) break;
|
||||
|
||||
aggiungi_saldi(rmov.curr(), TRUE);
|
||||
aggiungi_saldi(rmov.curr(), true);
|
||||
err = rmov.remove();
|
||||
if (err != NOERR)
|
||||
error.format(FR("riga contabile %d"), rig);
|
||||
@ -431,13 +431,13 @@ bool TProvvisori_app::delete_provv(TCursor& cur, TProgind& pi, TCursor_sheet* sh
|
||||
err, (const char*)error, numreg);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void TProvvisori_app::auto_delete(TCursor& cur)
|
||||
{
|
||||
const long total = cur.items();
|
||||
TProgind pi(total, TR("Cancellazione movimenti provvisori"), TRUE, TRUE);
|
||||
TProgind pi(total, TR("Cancellazione movimenti provvisori"), true, true);
|
||||
delete_provv(cur, pi);
|
||||
}
|
||||
|
||||
@ -447,13 +447,13 @@ void TProvvisori_app::main_loop()
|
||||
|
||||
if (argc() > 2)
|
||||
{
|
||||
TCursor& cur = m.update_cursor(TRUE);
|
||||
TCursor& cur = m.update_cursor(true);
|
||||
auto_delete(cur);
|
||||
return;
|
||||
}
|
||||
|
||||
m.reset();
|
||||
while (TRUE)
|
||||
while (true)
|
||||
{
|
||||
KEY key = m.run();
|
||||
if (key != K_ENTER && key != K_DEL)
|
||||
@ -493,11 +493,11 @@ void TProvvisori_app::main_loop()
|
||||
|
||||
TString caption;
|
||||
caption << action << TR("\nSi desidera continuare?");
|
||||
if (!yesno_box(caption))
|
||||
if (!delete_box(caption))
|
||||
continue;
|
||||
|
||||
action[0] = toupper(action[0]);
|
||||
TProgind pi(total, action, TRUE, TRUE);
|
||||
TProgind pi(total, action, true, true);
|
||||
|
||||
if (key == K_ENTER)
|
||||
confirm_provv(m.get_cursor(), pi, sheet);
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include <rmoviva.h>
|
||||
|
||||
#include "cgsaldac.h"
|
||||
#include "../ve/velib.h"
|
||||
|
||||
#include "cg3800a.h"
|
||||
#include "cg3800.h"
|
||||
|
161
cg/cg4400.cpp
161
cg/cg4400.cpp
@ -940,21 +940,20 @@ bool TStampa_registri_app::user_destroy()
|
||||
void TStampa_registri_app::calcola_progressivi()
|
||||
{
|
||||
TString80 chiave, codtab;
|
||||
int i, num=0;
|
||||
|
||||
|
||||
int num=0;
|
||||
if (_tipo_stampa == libro_unico)
|
||||
num = _fino_a_mese;
|
||||
num = _fino_a_mese; else
|
||||
if ( _tipo_stampa == bollato || _tipo_stampa == rif_giornale )
|
||||
num = _datareg.month();
|
||||
|
||||
// Chiave per selezione records progressivi
|
||||
chiave << _annoes << _codatt;
|
||||
|
||||
|
||||
//calcolo i totali del periodo; calcola anche i totali da Periodo Precedente (se _annoes > 1997)
|
||||
//_codatt e' gia' Z perche' lo leggo dal registro
|
||||
//calcolo i totali progressivi e del periodo (tra questi anche quelli di cui periodo precedente)
|
||||
for (i=1; i<=num; i++)
|
||||
for (int i=1; i<=num; i++)
|
||||
{
|
||||
const int start = 0, stop = (i == num) ? 1 : 0;
|
||||
|
||||
@ -1005,10 +1004,12 @@ void TStampa_registri_app::calcola_progressivi()
|
||||
if (!calc_prp && _tipo_stampa != prova)
|
||||
_tot_iva_array.add_riga(ZERO,ZERO,ZERO,impo,impos,implo,codiva); // progressivi
|
||||
if (mese == num)
|
||||
{
|
||||
if (calc_prp)
|
||||
_tot_prec_iva_array.add_riga(impo,impos,implo,ZERO,ZERO,ZERO,codiva); // periodo prec
|
||||
else
|
||||
_tot_iva_array.add_riga(impo,impos,implo,ZERO,ZERO,ZERO,codiva); // periodo
|
||||
}
|
||||
}
|
||||
|
||||
if (!calc_prp && _tipo_reg == acquisto) //registro acquisti
|
||||
@ -1029,15 +1030,16 @@ void TStampa_registri_app::calcola_progressivi()
|
||||
|
||||
int TStampa_registri_app::riga_rmoviva()
|
||||
{
|
||||
TLocalisamfile& rmoviva = _cur->file(LF_RMOVIVA);
|
||||
int nrec = 0;
|
||||
|
||||
bool ok = _cur->is_first_match(LF_RMOVIVA);
|
||||
if (!ok)
|
||||
return 0;
|
||||
return nrec;
|
||||
|
||||
const TRectype& mov = _cur->curr(LF_MOV);
|
||||
|
||||
const int mese_liq = mov.get_int(MOV_MESELIQ);
|
||||
int nrec = 0;
|
||||
|
||||
TLocalisamfile& rmoviva = _cur->file(LF_RMOVIVA);
|
||||
const TRecnotype nr = rmoviva.recno();
|
||||
|
||||
const TRectype& iva = rmoviva.curr();
|
||||
@ -1051,7 +1053,10 @@ int TStampa_registri_app::riga_rmoviva()
|
||||
_riga_rmi.add_riga(iva);
|
||||
|
||||
if (!mov.get_bool(MOV_LIQDIFF) && !(mov.get_bool(MOV_IVAXCASSA) && mov.get_int(MOV_TIPOMOV)>0))
|
||||
_riga_prospettoXcassa.add_riga(impo, impos, ZERO, ZERO, ZERO, ZERO, codiva);
|
||||
_riga_prospettoXcassa.add_riga(impo, impos, codiva);
|
||||
|
||||
if (is_split_payment(mov))
|
||||
_riga_split.add_riga(impo, impos, codiva);
|
||||
|
||||
//stampa di prova, cumula progressivi dai movimenti, anziche' dalle tabelle (solo bollato)
|
||||
if (_tipo_stampa == prova)
|
||||
@ -1072,9 +1077,9 @@ int TStampa_registri_app::riga_rmoviva()
|
||||
|
||||
if (_tipodoc != "CR" && _tipodoc != "SC" && _tipodoc != "RF")
|
||||
{
|
||||
_tot_iva_array.add_riga(impo,impos,ZERO,ZERO,ZERO,ZERO,codiva);
|
||||
_tot_iva_array.add_riga(impo,impos,codiva);
|
||||
if (mese_liq != 0)
|
||||
_tot_prec_iva_array.add_riga(impo,impos,ZERO,ZERO,ZERO,ZERO,codiva);
|
||||
_tot_prec_iva_array.add_riga(impo,impos,codiva);
|
||||
}
|
||||
|
||||
if (_tipo_reg == acquisto) //registro acquisti (non ha senso parlare di importi lordi)
|
||||
@ -1083,7 +1088,7 @@ int TStampa_registri_app::riga_rmoviva()
|
||||
|
||||
ok = _cur->next_match(LF_RMOVIVA);
|
||||
}
|
||||
rmoviva.readat(nr);
|
||||
rmoviva.readat(nr); // riposiziona righe IVA
|
||||
|
||||
return nrec;
|
||||
}
|
||||
@ -1271,14 +1276,14 @@ tiporeg TStampa_registri_app::cerca_reg(const TString& c)
|
||||
return t;
|
||||
}
|
||||
|
||||
int TStampa_registri_app::stampa_prospetto(int rr, bool print_prec)
|
||||
int TStampa_registri_app::stampa_prospetto_IVA(int rr, int tipo_prosp)
|
||||
{
|
||||
TString riga(_stampa_width);
|
||||
const bool print_prec = tipo_prosp == 1;
|
||||
|
||||
if (!print_prec) // Stampa il prospetto iniziale per progressivi attuali (periodo)
|
||||
if (tipo_prosp == 0) // Stampa il prospetto iniziale per progressivi attuali (periodo)
|
||||
{
|
||||
reset_print();
|
||||
riga.fill('-');
|
||||
TString riga(_stampa_width, '-');
|
||||
set_row(rr++, riga);
|
||||
|
||||
riga = TR("Legenda Tipo Operazione: 1=intra; 2=AF art.34 comma 3");
|
||||
@ -1319,43 +1324,51 @@ int TStampa_registri_app::stampa_prospetto(int rr, bool print_prec)
|
||||
|
||||
if (_esiste_riga_iva && _stampa)
|
||||
{
|
||||
if (print_prec)
|
||||
set_row(++rr, TR("DI CUI PERIODO PRECEDENTE"));
|
||||
|
||||
if (_tipo_reg == vendita && _corrispettivi)
|
||||
set_row(++rr, FR("@30g------------------ P E R I O D O -------------------"));
|
||||
if (tipo_prosp == 2)
|
||||
{
|
||||
set_row(++rr, FR("@30g-------- S C I S S I O N E ---------"));
|
||||
set_row(++rr, FR("@30g P A G A M E N T I"));
|
||||
}
|
||||
else
|
||||
set_row(++rr, FR("@30g---------- P E R I O D O -----------"));
|
||||
if (_tipo_stampa != prova && !print_prec)
|
||||
{
|
||||
if (print_prec)
|
||||
set_row(++rr, TR("DI CUI PERIODO PRECEDENTE"));
|
||||
|
||||
if (_tipo_reg == vendita && _corrispettivi)
|
||||
set_row(rr,FR("@84g----------- P R O G R E S S I V I --------------"));
|
||||
set_row(++rr, FR("@30g------------------ P E R I O D O -------------------"));
|
||||
else
|
||||
set_row(rr,FR("@82g------ P R O G R E S S I V I ------"));
|
||||
}
|
||||
rr++;
|
||||
set_row(rr, TR("Cod."));
|
||||
if (_tipo_reg == acquisto)
|
||||
{
|
||||
set_row(rr, FR("@40gA C Q U I S T I"));
|
||||
set_row(++rr, FR("@30g---------- P E R I O D O -----------"));
|
||||
if (_tipo_stampa != prova && !print_prec)
|
||||
set_row(rr, FR("@92gA C Q U I S T I"));
|
||||
}
|
||||
if (_tipo_reg == vendita) //un registro corrispettivi puo' solo essere un registro vendite
|
||||
{
|
||||
set_row(rr, FR("@41gV E N D I T E"));
|
||||
if (_corrispettivi)
|
||||
set_row(rr, FR("@67gCORRISPETTIVI"));
|
||||
if (_tipo_stampa != prova && !print_prec)
|
||||
{
|
||||
if (_corrispettivi)
|
||||
set_row(rr, FR("@94gV E N D I T E@118gCORRISPETTIVI"));
|
||||
{
|
||||
if (_tipo_reg == vendita && _corrispettivi)
|
||||
set_row(rr,FR("@84g----------- P R O G R E S S I V I --------------"));
|
||||
else
|
||||
set_row(rr, FR("@93gV E N D I T E"));
|
||||
}
|
||||
}
|
||||
set_row(rr,FR("@82g------ P R O G R E S S I V I ------"));
|
||||
}
|
||||
rr++;
|
||||
set_row(rr, TR("Cod."));
|
||||
if (_tipo_reg == acquisto)
|
||||
{
|
||||
set_row(rr, FR("@40gA C Q U I S T I"));
|
||||
if (_tipo_stampa != prova && !print_prec)
|
||||
set_row(rr, FR("@92gA C Q U I S T I"));
|
||||
} else
|
||||
if (_tipo_reg == vendita) //un registro corrispettivi puo' solo essere un registro vendite
|
||||
{
|
||||
set_row(rr, FR("@41gV E N D I T E"));
|
||||
if (_corrispettivi)
|
||||
set_row(rr, FR("@67gCORRISPETTIVI"));
|
||||
if (_tipo_stampa != prova && !print_prec)
|
||||
{
|
||||
if (_corrispettivi)
|
||||
set_row(rr, FR("@94gV E N D I T E@118gCORRISPETTIVI"));
|
||||
else
|
||||
set_row(rr, FR("@93gV E N D I T E"));
|
||||
}
|
||||
}
|
||||
}
|
||||
rr++;
|
||||
set_row(rr, FR("iva Descrizione@34gImponibile@53gImposta"));
|
||||
set_row(rr, FR("IVA Descrizione@34gImponibile@53gImposta"));
|
||||
if (_tipo_reg == vendita && _corrispettivi)
|
||||
set_row(rr, FR("@67gImporti lordi"));
|
||||
if (_tipo_stampa != prova && !print_prec)
|
||||
@ -1488,13 +1501,13 @@ int TStampa_registri_app::stampa_acquisti(int row)
|
||||
if (tdetprec == 1 || tdetprec == 3 || tdetprec == 9)
|
||||
{
|
||||
set_row(++rw, TR("TOTALE"));
|
||||
if (tot_imponib != ZERO)
|
||||
if (!tot_imponib.is_zero())
|
||||
set_row(rw, "@29g%r", &tot_imponib);
|
||||
if (tot_imposta != ZERO)
|
||||
if (!tot_imposta.is_zero())
|
||||
set_row(rw, "@45g%r", &tot_imposta);
|
||||
if (_tipo_stampa != prova)
|
||||
{
|
||||
if (tot_imponibp != ZERO)
|
||||
if (!tot_imponibp.is_zero())
|
||||
set_row(rw, "@81g%r", &tot_imponibp);
|
||||
if (tot_impostap != ZERO)
|
||||
set_row(rw, "@98g%r", &tot_impostap);
|
||||
@ -1509,31 +1522,32 @@ int TStampa_registri_app::stampa_acquisti(int row)
|
||||
void TStampa_registri_app::set_page_tot_reg()
|
||||
{
|
||||
int rr = 1;
|
||||
rr = stampa_prospetto(rr, false);
|
||||
rr = stampa_prospetto_IVA(rr, 0); // Intestazione prospetto IVA per aliquota
|
||||
|
||||
//*****deve azzerare i totali progressivi dei riporti e segnalare all'header di non stampare
|
||||
//la riga di riporto
|
||||
_totali_stampati = true; //siamo in stampa totali, quindi...
|
||||
_riporti_stampati = false; //inoltre non deve stapare riporti mentre stampa i totali
|
||||
|
||||
_totdoc_prog = 0;
|
||||
_totimpn_prog = 0;
|
||||
_totimps_prog = 0;
|
||||
_totdoc_prog = _totimpn_prog = _totimps_prog = ZERO;
|
||||
|
||||
if (_esiste_riga_iva && _stampa)
|
||||
{
|
||||
for (int prospetto = 0; prospetto < 2; prospetto++)
|
||||
for (int tipo_prosp = 0; tipo_prosp <= (_tipo_reg == vendita ? 2 : 1); tipo_prosp++)
|
||||
{
|
||||
TRiga_array& array = prospetto == 0 ? _tot_iva_array : _tot_prec_iva_array;
|
||||
TRiga_array& arriva = tipo_prosp == 0 ? _tot_iva_array : (tipo_prosp == 1 ? _tot_prec_iva_array : _riga_split);
|
||||
if (arriva.empty())
|
||||
continue;
|
||||
arriva.sort(compare_rows); //viene ordinato per codice iva
|
||||
|
||||
if (tipo_prosp > 0)
|
||||
rr = stampa_prospetto_IVA(rr, tipo_prosp); // Intestazione Prospetto IVA
|
||||
|
||||
real tot_imponib, tot_imposta, tot_lordo, tot_imponibp, tot_impostap, tot_lordop;
|
||||
tot_imponib = tot_imposta = tot_lordo = tot_imponibp = tot_impostap = tot_lordop = ZERO;
|
||||
|
||||
array.sort(compare_rows); //viene ordinato per codice iva
|
||||
|
||||
for (int k = 0; k < array.items(); k++) // Mamma mia, mamma mia...
|
||||
for (int k = 0; k < arriva.items(); k++) // Mamma mia, mamma mia...
|
||||
{
|
||||
TRiga& riga = (TRiga&)array[k];
|
||||
const TRiga& riga = (const TRiga&)arriva[k];
|
||||
|
||||
if (_tipo_stampa == prova && riga._imponibile.is_zero() && riga._imposta.is_zero() && riga._implordo.is_zero())
|
||||
continue;
|
||||
@ -1566,7 +1580,7 @@ void TStampa_registri_app::set_page_tot_reg()
|
||||
tot_impostap+= riga._impostap;
|
||||
tot_lordop += riga._implordop;
|
||||
}
|
||||
array.destroy(); // Azzera il marciume
|
||||
arriva.destroy(); // Azzera il marciume
|
||||
rr++;
|
||||
set_row(rr, TR("TOTALE"));
|
||||
if (tot_imponib != ZERO)
|
||||
@ -1586,17 +1600,12 @@ void TStampa_registri_app::set_page_tot_reg()
|
||||
if (tot_lordop != ZERO)
|
||||
set_row(rr, "@116g%r", &tot_lordop);
|
||||
}
|
||||
if (prospetto == 0) // Solo per il primo prospetto complessivo
|
||||
if (tipo_prosp == 0) // Solo per il primo prospetto complessivo
|
||||
{
|
||||
if (_tipo_reg == acquisto)
|
||||
rr = stampa_acquisti(rr);
|
||||
else
|
||||
rr += 3;
|
||||
|
||||
if (_tot_prec_iva_array.items() > 0)
|
||||
rr = stampa_prospetto(rr, true); // Prospetto per progressivi da periodo precedente
|
||||
else
|
||||
break;
|
||||
rr += 3;
|
||||
}
|
||||
} // for
|
||||
}
|
||||
@ -1621,8 +1630,6 @@ bool TStampa_registri_app::stampa_plafonds(int r, bool test_mode)
|
||||
int num;
|
||||
real r1, r2, r3, r8, r8b, r9, disponibile;
|
||||
|
||||
r1 = r2 = r3 = ZERO;
|
||||
|
||||
if (_tipo_stampa == libro_unico)
|
||||
num = _fino_a_mese;
|
||||
if ( _tipo_stampa == bollato || _tipo_stampa == prova || _tipo_stampa == rif_giornale )
|
||||
@ -1632,8 +1639,7 @@ bool TStampa_registri_app::stampa_plafonds(int r, bool test_mode)
|
||||
|
||||
// forza il tipoatt a 1
|
||||
chiave.format("%05ld", get_firm());
|
||||
chiave << _annoes;
|
||||
chiave << _codatt << "1";
|
||||
chiave << _annoes << _codatt << "1";
|
||||
pla.put("CODTAB", chiave);
|
||||
|
||||
const bool print_now = r == -1;
|
||||
@ -1685,7 +1691,7 @@ bool TStampa_registri_app::stampa_plafonds(int r, bool test_mode)
|
||||
}
|
||||
else
|
||||
{
|
||||
set_row(++r, FR("%s@35gDisponibile @55g%r"), (const char*) mese, &disponibile);
|
||||
set_row(++r, FR("%s@35gDisponibile @55g%r"), (const char*)mese, &disponibile);
|
||||
set_row(++r, "");
|
||||
r++;
|
||||
}
|
||||
@ -3977,10 +3983,7 @@ bool TStampa_registri_app::stampa_riepilogo(int m)
|
||||
// Calcolo riepilogo del periodo e progressivi in caso di stampa su bollato
|
||||
for (int i=1; i<=m; i++)
|
||||
{
|
||||
int start = 0, stop = 0;
|
||||
if (i == m && _annoes > 1997) // Per il mese attuale
|
||||
stop = 1; // si calcolano anche i progressivi precedenti a questo periodo (PRP)
|
||||
// solo se siamo oltre il 1997
|
||||
int start = 0, stop = i==m ? 1 : 0; // Per il mese attuale si calcolano anche i progressivi precedenti a questo periodo (PRP)
|
||||
for (int j = start; j <= stop; j++)
|
||||
{
|
||||
const bool calc_prp = j == 1;
|
||||
@ -4451,7 +4454,7 @@ void TStampa_registri_app::stampa_progressivi(TRiga_array& vect,
|
||||
print_real(riga, tot_impostap, 99);
|
||||
}
|
||||
printer().print(riga);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ class TStampa_registri_app : public TPrintapp
|
||||
TRelation *_rel, *_nditte;
|
||||
TTable *_tabreg;
|
||||
TRigaiva_array _iva_array, _riga_rmi;
|
||||
TRiga_array _riga_prospettoXcassa;
|
||||
TRiga_array _riga_prospettoXcassa, _riga_split;
|
||||
TTipodoc_array _doc_array;
|
||||
TRiga_array _tot_iva_array, _tot_prec_iva_array;
|
||||
TArray_sheet *_ditte;
|
||||
@ -136,7 +136,7 @@ public:
|
||||
bool setta_mask(long);
|
||||
bool preprocess_page(int, int);
|
||||
int stampa_intestazione();
|
||||
int stampa_prospetto(int, bool);
|
||||
int stampa_prospetto_IVA(int rr, int tipo);
|
||||
long select_firm_range(long,long);
|
||||
bool stampa_plafonds(int r, bool test_mode = FALSE);
|
||||
void get_dati_ditta();
|
||||
|
@ -561,7 +561,7 @@ void TRegistro::set_prorata(int annodoc, const real& pro)
|
||||
if (annodoc <= 2000) annodoc = annoiva; // Test per anno documento non specificato
|
||||
const int annopro = annodoc < annoiva ? annodoc+1 : annoiva;
|
||||
TString4 chiave; chiave << annopro;
|
||||
_prorata.add(chiave, pro, TRUE);
|
||||
_prorata.add(chiave, pro, true);
|
||||
}
|
||||
|
||||
// Certified 99%
|
||||
|
@ -106,11 +106,11 @@ public:
|
||||
|
||||
struct TRiga : public TObject
|
||||
{
|
||||
real _imponibile, _imposta, _implordo; //totali del periodo
|
||||
real _imponibilep, _impostap, _implordop; //totali progressivi
|
||||
real _imponibile, _imposta, _implordo; // totali del periodo
|
||||
real _imponibilep, _impostap, _implordop; // totali progressivi
|
||||
TString4 _codiva;
|
||||
|
||||
TRiga (const real& imponibile, const real& imposta, const real& implordo, const real& imponibilep, const real& impostap, const real& implordop, const char* codiva):
|
||||
TRiga(const real& imponibile, const real& imposta, const real& implordo, const real& imponibilep, const real& impostap, const real& implordop, const char* codiva):
|
||||
_imponibile(imponibile),_imposta(imposta),_implordo(implordo),_imponibilep(imponibilep),_impostap(impostap),_implordop(implordop),_codiva(codiva) {}
|
||||
};
|
||||
|
||||
@ -118,6 +118,7 @@ class TRiga_array : public TArray
|
||||
{
|
||||
public:
|
||||
bool add_riga(const real& imponibile, const real& imposta, const real& implordo, const real& imponibilep, const real& impostap, const real& implordop, const char* codiva);
|
||||
bool add_riga(const real& imponibile, const real& imposta, const char* codiva) { return add_riga(imponibile, imposta, ZERO, ZERO, ZERO, ZERO, codiva); }
|
||||
|
||||
const TRiga& riga(int i) const { return (const TRiga&)(*this)[i]; }
|
||||
TRiga& riga(int i) { return (TRiga&)(*this)[i]; }
|
||||
@ -133,6 +134,7 @@ class TIva_round : public TObject
|
||||
{
|
||||
static TRound_mode _def_mode;
|
||||
static int _def_decimals;
|
||||
|
||||
TRound_mode _mode;
|
||||
int _decimals;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// cglib04.cpp
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#include "cglib04.h"
|
||||
#include "cgsaldac.h"
|
||||
|
||||
@ -81,14 +81,12 @@ HIDDEN void __getfieldbuff(int l, int t, const char* recin, char *s)
|
||||
const TDate dt(atol(s));
|
||||
strcpy(s, dt.string(full));
|
||||
} else
|
||||
if (t == _boolfld)
|
||||
{
|
||||
const char ok = toupper(*s);
|
||||
if (ok == 'T' || ok == 'Y' || ok == 'S' || ok == 'X')
|
||||
strcpy(s,"X");
|
||||
else
|
||||
strcpy(s," ");
|
||||
}
|
||||
if (t == _boolfld)
|
||||
{
|
||||
const char ok = toupper(*s);
|
||||
s[0] = (ok > ' ' && (ok == 'T' || ok == 'Y' || ok == 'S' || ok == 'X')) ? 'X' : ' ';
|
||||
s[1] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -968,7 +968,7 @@ word TPagamento::recalc_rate(int row, bool is_perc_modified,
|
||||
sc -= scad_rata(i);
|
||||
if (sc < 0) return P_SCAD;
|
||||
if (row > 0 && sc == 0 &&
|
||||
!yesno_box("Due o piu' rate cadranno nello stesso giorno. Si conferma l'immissione?"))
|
||||
!yesno_box("Due o più rate cadranno nello stesso giorno. Si conferma l'immissione?"))
|
||||
return P_SCAD;
|
||||
if (sc > 10000L) return P_SCWIDE;
|
||||
if (_mcomm && row > 0 && (sc % 30) != 0)
|
||||
|
37
cg/cgtbcbp.uml
Normal file
37
cg/cgtbcbp.uml
Normal file
@ -0,0 +1,37 @@
|
||||
#include <relapbar.h>
|
||||
PA "Causale blocco pagamenti" 0 2 0 0
|
||||
GR -1 75 7
|
||||
BE
|
||||
PR 1 0 ""
|
||||
FL "R"
|
||||
EN
|
||||
ST 101 6
|
||||
BE
|
||||
PR 2 2 "Codice "
|
||||
HE "Codice della causale"
|
||||
FI CODTAB
|
||||
FL "U"
|
||||
KE 1
|
||||
US %CBP
|
||||
IN CODTAB 101
|
||||
DI "Codice" CODTAB
|
||||
DI "Descrizione @50" S0
|
||||
OU 101 CODTAB
|
||||
OU 102 S0
|
||||
CH REQUIRED
|
||||
EN
|
||||
ST 102 50
|
||||
BE
|
||||
PR 2 4 "Descrizione "
|
||||
HE "Descrizione della causale"
|
||||
FI S0
|
||||
KE 2
|
||||
US %CBP KE 2
|
||||
IN S0 102
|
||||
DI "Descrizione @50" S0
|
||||
DI "Codice" CODTAB
|
||||
CO OU 101
|
||||
CH REQUIRED
|
||||
EN
|
||||
EN
|
||||
ENDMASK
|
@ -1,3 +1,3 @@
|
||||
23
|
||||
0
|
||||
$mov|0|0|442|0|Movimenti di prima nota|||
|
||||
$mov|0|0|460|0|Movimenti di prima nota|||
|
||||
|
@ -1,5 +1,5 @@
|
||||
23
|
||||
52
|
||||
53
|
||||
ANNOES|9|4|0|Codice esercizio
|
||||
NUMREG|3|7|0|Numero di operazione
|
||||
DATAREG|5|8|0|Data operazione
|
||||
@ -29,6 +29,7 @@ TOTDOC|4|18|3|Totale documento
|
||||
TOTDOCVAL|4|18|3|Totale documento in valuta
|
||||
RITFIS|4|18|3|Ritenute fiscali
|
||||
RITSOC|4|18|3|Ritenute sociali
|
||||
REVCHARGE|4|18|3|Reverse charge
|
||||
PROVVIS|1|1|0|Tipo movimento (" " Normale, "P" Provvisorio cancellabile, "C" Provvisorio cespiti)
|
||||
CODVALI|1|3|0|Codice valuta intra-comunitaria
|
||||
CAMBIOI|4|15|6|Cambio della valuta intra-comunitaria
|
||||
|
Loading…
x
Reference in New Issue
Block a user