Modifiche dalla versione Linux sulla 2.1
git-svn-id: svn://10.65.10.50/trunk@12018 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a61d3b51f5
commit
d355c40138
@ -294,7 +294,7 @@ HIDDEN bool gruppo_handler(TMask_field& f, KEY key)
|
||||
TMask& m = f.mask();
|
||||
const int gruppo = m.get_int(FLD_CM1_GRUPPO);
|
||||
const int conto = m.get_int(FLD_CM1_CONTO);
|
||||
const long sottoc = m.get_long(FLD_CM1_SOTTOCONTO);
|
||||
// const long sottoc = m.get_long(FLD_CM1_SOTTOCONTO);
|
||||
|
||||
if (key == K_ENTER)
|
||||
{
|
||||
@ -349,8 +349,8 @@ HIDDEN bool sottoc_handler(TMask_field& f, KEY key)
|
||||
if (m.query_mode() && key == K_TAB)
|
||||
{
|
||||
const int gruppo = m.get_int(FLD_CM1_GRUPPO);
|
||||
const int conto = m.get_int(FLD_CM1_CONTO);
|
||||
const long sottoc = m.get_long(FLD_CM1_SOTTOCONTO);
|
||||
// const int conto = m.get_int(FLD_CM1_CONTO);
|
||||
// const long sottoc = m.get_long(FLD_CM1_SOTTOCONTO);
|
||||
if (gruppo == 0) return TRUE;
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -525,4 +525,5 @@ END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
ENDMASK
|
||||
|
||||
|
@ -617,7 +617,9 @@ void TClifo_application::mask2ini(const TMask& m, TConfig& ini)
|
||||
const int n_items = rows.items();
|
||||
|
||||
TString16 para;
|
||||
for (int i = 0; i < n_items; i++)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_items; i++)
|
||||
{
|
||||
para.format("%d,%d", LF_INDSP, i+1);
|
||||
ini.set_paragraph(para);
|
||||
|
@ -98,8 +98,9 @@ int TClifoVI::registra(bool re, bool force)
|
||||
TLocalisamfile& rind=lfile(LF_INDSP);
|
||||
const char tipocf=c.get(CLI_TIPOCF)[0];
|
||||
const long codcf=c.get_long(CLI_CODCF);
|
||||
int i;
|
||||
|
||||
for (int i=0; i<indirizzi_items(); i++)
|
||||
for (i=0; i<indirizzi_items(); i++)
|
||||
{
|
||||
if (!re)
|
||||
{
|
||||
|
@ -58,7 +58,6 @@ class CG1100_application : public TPrintapp
|
||||
TSort* _sort;
|
||||
TRelation* _rel, *_relt;
|
||||
TMask* _msk;
|
||||
TParagraph_string _d1, _d2; // qui
|
||||
const char* _buf;
|
||||
stampe _tipo_stampa;
|
||||
bool _salto_pag,_resetta_righe_stampa;
|
||||
@ -66,6 +65,7 @@ class CG1100_application : public TPrintapp
|
||||
int _pcont_reclen,_i;
|
||||
int _cur_c1, _cur_c2, _cur_c3;
|
||||
TString _clivd, _clivdo;
|
||||
TParagraph_string _d1, _d2; // qui
|
||||
char _sez_da_stamp,_sez_stamp,_let_da_stamp,_let_stamp;
|
||||
TString _numr_da_stamp,_numr_stamp;
|
||||
int _gruppo,_conto,_num_da_stamp,_num_stamp,_g_prec,_c_prec;
|
||||
@ -419,7 +419,7 @@ void CG1100_application::do_sort()
|
||||
{
|
||||
prg.addstatus(1);
|
||||
|
||||
int gruppo = rec.get_int (PCN_GRUPPO);
|
||||
// int gruppo = rec.get_int (PCN_GRUPPO);
|
||||
int conto = rec.get_int (PCN_CONTO);
|
||||
long sottoc = rec.get_long(PCN_SOTTOCONTO);
|
||||
|
||||
@ -832,10 +832,10 @@ void CG1100_application::set_con_ana()
|
||||
rec = _buf;
|
||||
|
||||
TString descrizione,descr;
|
||||
bool stampa_codcbl = TRUE;
|
||||
// bool stampa_codcbl = TRUE;
|
||||
|
||||
TString codcbl = rec.get(PCN_CODCBL);
|
||||
int gruppo = rec.get_int (PCN_GRUPPO);
|
||||
// int gruppo = rec.get_int (PCN_GRUPPO);
|
||||
int conto = rec.get_int (PCN_CONTO);
|
||||
long sottoc = rec.get_long(PCN_SOTTOCONTO);
|
||||
bool stsobi = rec.get_bool(PCN_STSOTTAB);
|
||||
@ -884,7 +884,7 @@ void CG1100_application::set_completa()
|
||||
char sezione;
|
||||
int i;
|
||||
|
||||
int gruppo = rec.get_int (PCN_GRUPPO);
|
||||
// int gruppo = rec.get_int (PCN_GRUPPO);
|
||||
int conto = rec.get_int (PCN_CONTO);
|
||||
long sottoc = rec.get_long(PCN_SOTTOCONTO);
|
||||
sezione = rec.get_char(PCN_SEZIVD);
|
||||
@ -1048,7 +1048,7 @@ int CG1100_application::leggo_sottoc(int gruppo,int conto,long sottoc)
|
||||
|
||||
bool CG1100_application::preprocess_page(int file,int counter)
|
||||
{
|
||||
static int c1 = 0;
|
||||
// static int c1 = 0;
|
||||
static TString16 a1;
|
||||
char sez;
|
||||
TString16 codcbl;
|
||||
|
@ -38,7 +38,6 @@ class TPrintclifo_app : public TPrintapp
|
||||
int _sort;
|
||||
int _interline;
|
||||
bool _mov_only;
|
||||
int _ges_ven;
|
||||
TLocalisamfile* _mov;
|
||||
TLocalisamfile* _comuni;
|
||||
|
||||
@ -47,6 +46,7 @@ class TPrintclifo_app : public TPrintapp
|
||||
|
||||
// variable field slots
|
||||
TString _piva,_cpercip,_fax,_telex,_email,_name,_telefono,_indir,_localita;
|
||||
int _ges_ven;
|
||||
TString _cod_from,_cod_to,_data_stampa,_cofi,_d_c_ric,_d_alleg;
|
||||
TString _datanas,_comprov,_comnasc,_comune,_prov,_descpag;
|
||||
long _codice;
|
||||
@ -637,7 +637,9 @@ void TPrintclifo_app::set_etichette()
|
||||
TString loccf=get_field(LF_CLIFO,CLI_LOCCF);
|
||||
|
||||
reset_header();
|
||||
for (int i = 1; i < _startrow; i++)
|
||||
int i;
|
||||
|
||||
for (i = 1; i < _startrow; i++)
|
||||
set_row(i,"");
|
||||
|
||||
set_row(r++, format("@%dg#-%dt",_startcol, _cols_et - _startcol),
|
||||
@ -978,4 +980,4 @@ int cg1200(int argc, char* argv[])
|
||||
TPrintclifo_app app;
|
||||
app.run(argc, argv, TR("Stampa Clienti/Fornitori"));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
void elabora_mov();
|
||||
};
|
||||
|
||||
HIDDEN TAgg_attiv& app() { return (TAgg_attiv&)main_app(); }
|
||||
// HIDDEN TAgg_attiv& app() { return (TAgg_attiv&)main_app(); }
|
||||
|
||||
bool TAgg_attiv::create()
|
||||
{
|
||||
@ -74,7 +74,7 @@ void TAgg_attiv::elabora_mov()
|
||||
TLocalisamfile& mov = rel.lfile();
|
||||
TLocalisamfile& rmoviva = rel.lfile(LF_RMOVIVA);
|
||||
|
||||
long ditta = get_firm();
|
||||
//- long ditta = get_firm();
|
||||
cursor = 0L;
|
||||
const long nitems = cursor.items();
|
||||
|
||||
|
@ -52,7 +52,7 @@ void TAgg_opintra::look_mov()
|
||||
TLocalisamfile& mov = rel.lfile();
|
||||
TLocalisamfile& rmoviva = rel.lfile(LF_RMOVIVA);
|
||||
|
||||
long ditta = get_firm();
|
||||
// long ditta = get_firm();
|
||||
cursor = 0L;
|
||||
const long nitems = cursor.items();
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "cg1304.h"
|
||||
#include "cglib01.h"
|
||||
|
||||
HIDDEN TAgg_codatt& app() { return (TAgg_codatt&) main_app(); }
|
||||
// HIDDEN TAgg_codatt& app() { return (TAgg_codatt&) main_app(); }
|
||||
|
||||
bool TAgg_codatt::create()
|
||||
{
|
||||
|
@ -372,7 +372,9 @@ int TElimina_zoppi::kill_game(long numreg, int numrig)
|
||||
const int rigapag = game->primo_pagamento(numreg);
|
||||
if (rigapag > 0)
|
||||
{
|
||||
for (int p = game->last(); p > 0; p = game->pred(p))
|
||||
int p;
|
||||
|
||||
for (p = game->last(); p > 0; p = game->pred(p))
|
||||
{
|
||||
TRiga_partite& part = game->riga(p);
|
||||
if (part.is_fattura())
|
||||
@ -521,4 +523,4 @@ int elimina_zoppi(int argc, char* argv[])
|
||||
TElimina_zoppi ez;
|
||||
ez.run(argc, argv, ez.app_name());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -2252,7 +2252,7 @@ void TStampa_bilanci::leggi_clifo(const TArray& gccf)
|
||||
{
|
||||
TSaldo sld;
|
||||
TLocalisamfile saldi(LF_SALDI);
|
||||
int g=0, c=0;
|
||||
// int g = 0, c=0;
|
||||
long codcf=0l;
|
||||
TString80 ragsoc;
|
||||
char tipocf,tipocfp,tipoa;
|
||||
|
@ -427,4 +427,5 @@ END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
ENDMASK
|
||||
|
||||
|
@ -1139,7 +1139,7 @@ void TStampa_IVdirettiva::crea_sort_piano_conti_scalare()
|
||||
// la classe. In caso affermativo anche questo sottoconto appena
|
||||
// letto avra' la stessa classe del conto.
|
||||
|
||||
bool stessa_sezione = (saldo * saldo_raf) > ZERO;
|
||||
// bool stessa_sezione = (saldo * saldo_raf) > ZERO;
|
||||
|
||||
if (classe_conto)
|
||||
{
|
||||
|
@ -288,15 +288,15 @@ void TPagamento::set_numero_rate(int n, int sscad, int rdiff)
|
||||
if (_inited)
|
||||
{
|
||||
real r(importo_rata(first,FALSE) + rem);
|
||||
real or;
|
||||
if (inv) or = importo_rata(first,TRUE) + oem;
|
||||
real oldr;
|
||||
if (inv) oldr = importo_rata(first,TRUE) + oem;
|
||||
set_imprata(first, r, FALSE);
|
||||
if (inv) set_imprata(first, or, TRUE);
|
||||
if (inv) set_imprata(first, oldr, TRUE);
|
||||
|
||||
if (_inited && _tpr > 0 && _tpr < 4)
|
||||
{
|
||||
r -= importo_da_non_dividere(FALSE);
|
||||
if (inv) or -= importo_da_non_dividere(TRUE);
|
||||
if (inv) oldr -= importo_da_non_dividere(TRUE);
|
||||
}
|
||||
set_percrata(first, CENTO * r / tot);
|
||||
}
|
||||
@ -374,10 +374,10 @@ void TPagamento::set_numero_rate(int n, int sscad, int rdiff)
|
||||
if (_inited)
|
||||
{
|
||||
real r(importo_rata(first,FALSE) + rem);
|
||||
real or;
|
||||
if (inv) or = importo_rata(first,TRUE) + oem;
|
||||
real oldr;
|
||||
if (inv) oldr = importo_rata(first,TRUE) + oem;
|
||||
set_imprata(first, r, FALSE);
|
||||
if (inv) set_imprata(first, or, TRUE);
|
||||
if (inv) set_imprata(first, oldr, TRUE);
|
||||
if (_inited && _tpr > 0 && _tpr < 4)
|
||||
r -= importo_da_non_dividere(FALSE);
|
||||
set_percrata(first, CENTO * r / tot);
|
||||
@ -685,9 +685,10 @@ word TPagamento::validate() const
|
||||
|
||||
if (_inited)
|
||||
{
|
||||
real tot;
|
||||
real tot;
|
||||
int i;
|
||||
|
||||
for (int i = 0; i < n_rate(); i++)
|
||||
for (i = 0; i < n_rate(); i++)
|
||||
{
|
||||
const real tpay(tlit_rata(i));
|
||||
|
||||
@ -872,15 +873,11 @@ word TPagamento::recalc_rate(int row, bool is_perc_modified,
|
||||
TString8 oldulc = ulc_rata(last_rata);
|
||||
int oldscad = scad_rata(last_rata);
|
||||
TDate lastdate = data_rata(0);
|
||||
int first = _tpr < 4 ? 0 : 1;
|
||||
const TString_array srate(_rate); // rate come erano
|
||||
int warnscad = 0;
|
||||
|
||||
if (oldscad <= 0) oldscad = _int_rate;
|
||||
if (oldtype <= 0) oldtype = _def_tpr;
|
||||
|
||||
bool exhausted = FALSE;
|
||||
|
||||
for (int i = 0; i < srate.items(); i++)
|
||||
{
|
||||
if (i == row)
|
||||
@ -1198,7 +1195,9 @@ word TPagamento::change_value_uguali(int row, real user_val, bool is_perc, bool
|
||||
if (div > real(999.0)) return P_TOOMANY;
|
||||
|
||||
real delta = (to_share - first_imp) - user_val * real(div.integer());
|
||||
for (int i = 1; i < div.integer()+1l; i++)
|
||||
int i;
|
||||
|
||||
for (i = 1; i < div.integer()+1l; i++)
|
||||
{
|
||||
if (n_rate() <= i) add_rata();
|
||||
rata(i).add(user_val.string(), tok_ind);
|
||||
@ -1234,7 +1233,9 @@ word TPagamento::change_value_uguali_prossima(int row, real user_val, bool is_pe
|
||||
return P_NEG;
|
||||
|
||||
// togli rate gia' presenti
|
||||
for (int i = first; i < row; i++)
|
||||
int i;
|
||||
|
||||
for (i = first; i < row; i++)
|
||||
{
|
||||
to_share -= (is_perc ? perc_rata(i): importo_rata(i,v));
|
||||
if (i == 0 && !is_perc && _tpr > 0 && _tpr < 4)
|
||||
@ -1277,7 +1278,9 @@ word TPagamento::change_value_uguali_possible(int row, real user_val, bool is_pe
|
||||
return P_NEG;
|
||||
|
||||
// togli rate gia' presenti
|
||||
for (int i = first; i < row; i++)
|
||||
int i;
|
||||
|
||||
for (i = first; i < row; i++)
|
||||
{
|
||||
to_share -= (is_perc ? perc_rata(i): importo_rata(i,v));
|
||||
if (i == 0 && !is_perc && _tpr > 0 && _tpr < 4)
|
||||
@ -1306,9 +1309,9 @@ word TPagamento::change_value_uguali_possible(int row, real user_val, bool is_pe
|
||||
void TPagamento::adjust_parameters(bool mcomm)
|
||||
{
|
||||
TDate last_date;
|
||||
int last_type;
|
||||
int last_type = 0;
|
||||
TString16 last_ulc;
|
||||
int last_scad;
|
||||
int last_scad = 0;
|
||||
|
||||
for (int i = 0; i < n_rate(); i++)
|
||||
{
|
||||
@ -1348,9 +1351,10 @@ void TPagamento::adjust_perc(int rdiff, bool v)
|
||||
if (other.is_zero())
|
||||
return;
|
||||
|
||||
const int first = _tpr > 3 ? 1 : 0;
|
||||
const int first = _tpr > 3 ? 1 : 0;
|
||||
int j;
|
||||
|
||||
for (int j = first; j < _rate.items(); j++)
|
||||
for (j = first; j < _rate.items(); j++)
|
||||
{
|
||||
real rvl = importo_rata(j,v);
|
||||
// togli pezzo di troppo
|
||||
@ -1406,7 +1410,9 @@ void TPagamento::adjust_perc_imp(bool is_perc, int rdiff, bool v)
|
||||
ot.set_dec(round(v));
|
||||
}
|
||||
|
||||
for (int j = _rate.items() - 1; j >= first ; j--)
|
||||
int j;
|
||||
|
||||
for (j = _rate.items() - 1; j >= first ; j--)
|
||||
{
|
||||
real rvl = perc_rata(j);
|
||||
// togli pezzo di troppo
|
||||
@ -1551,8 +1557,9 @@ int TPagamento::write(TTable& r)
|
||||
int TPagamento::rewrite(TTable& r)
|
||||
{
|
||||
TString16 s; int err = NOERR;
|
||||
int i;
|
||||
|
||||
for (int i = 0; err == NOERR && i < n_rate(); i++)
|
||||
for (i = 0; err == NOERR && i < n_rate(); i++)
|
||||
{
|
||||
r.zero(); s.format("%s%3d",(const char*)_code, i);
|
||||
r.put("CODTAB", s);
|
||||
@ -1780,7 +1787,9 @@ void TPagamento::set_sheet(TSheet_field& sf, int sscad)
|
||||
if (_inited)
|
||||
{
|
||||
// si istanzia uno sheet di primanota
|
||||
for (int i = 0; i < n_rate(); i++)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_rate(); i++)
|
||||
{
|
||||
TToken_string& ts = sf.row(i);
|
||||
|
||||
@ -1812,7 +1821,9 @@ void TPagamento::set_sheet(TSheet_field& sf, int sscad)
|
||||
else
|
||||
{
|
||||
long scr = 0L;
|
||||
for (int i = 0; i < n_rate(); i++)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_rate(); i++)
|
||||
{
|
||||
TToken_string& s = sf.row(i);
|
||||
scr += scad_rata(i);
|
||||
@ -1851,15 +1862,18 @@ void TPagamento::adjust_fixed_scad()
|
||||
if (!_inited) return;
|
||||
|
||||
const bool are_fixed = _fixd[0] != 0 || _fixd[1] != 0 || _fixd[2] != 0;
|
||||
int i;
|
||||
|
||||
for (int i = 0; i < n_rate(); i++)
|
||||
for (i = 0; i < n_rate(); i++)
|
||||
{
|
||||
TDate d = data_rata(i);
|
||||
|
||||
// riaggiusta se ci sono scadenze fissate
|
||||
if (are_fixed)
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
if (_fixd[i] >= d.day())
|
||||
{
|
||||
@ -1958,12 +1972,10 @@ void TPagamento::adjust_refused_scad()
|
||||
}
|
||||
|
||||
TPagamento::TPagamento(const char* codtab, const char* data) :
|
||||
_new(FALSE), _mcomm(FALSE), _imponlit(0.0), _imposlit(0.0),
|
||||
_speselit(0.0), _in_valuta(FALSE), // _cambio(1.0),
|
||||
_code(codtab), _dirty(FALSE), _inited(FALSE),
|
||||
_def_tpr(1), _def_ulc(""), _roundval(3), _int_rate(30), _tpr(0), _rdiff(FALSE),
|
||||
_was_tpr4(FALSE), _roundlit(0), _imponval(0.0), _imposval(0.0), _speseval(0.0),
|
||||
_tipocf('C'), _codcf(0L)
|
||||
_code(codtab), _imponval(0.0), _imposval(0.0), _speseval(0.0),
|
||||
_imponlit(0.0), _imposlit(0.0), _speselit(0.0), _new(FALSE), _mcomm(FALSE), // _cambio(1.0),
|
||||
_rdiff(FALSE), _tpr(0), _dirty(FALSE), _inited(FALSE), _roundlit(0), _roundval(3), _int_rate(30),
|
||||
_def_tpr(1), _def_ulc(""), _was_tpr4(FALSE), _in_valuta(FALSE), _tipocf('C'), _codcf(0L)
|
||||
{
|
||||
_fixd[0] = _fixd[1] = _fixd[2] = 0;
|
||||
if (data != NULL && *data)
|
||||
|
Loading…
x
Reference in New Issue
Block a user