Modifiche dalla versione Linux sulla 2.1
git-svn-id: svn://10.65.10.50/trunk@12032 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
52950e9510
commit
22749170d3
@ -14,7 +14,7 @@ class TViswin;
|
||||
#endif
|
||||
|
||||
#ifndef __CLIFOR_H
|
||||
#include "clifor.h"
|
||||
#include "../ve/clifor.h"
|
||||
#endif
|
||||
|
||||
#ifndef __CURRENCY_H
|
||||
@ -1226,8 +1226,8 @@ public:
|
||||
|
||||
class TMovimentoPN_VE : public TMovimentoPN
|
||||
{
|
||||
TCausale * _caus;
|
||||
bool _valuta;
|
||||
TCausale * _caus;
|
||||
|
||||
protected:
|
||||
// simula il K_SPACE di iva_notify
|
||||
@ -1363,8 +1363,8 @@ class TDocumentoEsteso : public TDocumento
|
||||
// real _importi_netti, _imposte;
|
||||
|
||||
// membri per il calcolo del riepilogo IVA
|
||||
bool _sum_selected; // TRUE se ha selezionato una riga del riepilogo, funge da semaforo per leggere la prossima
|
||||
int _sum_filter; // Filtro corrente della riga TRiepilogo_iva in corso di stampa (-1 se non ha ancora calcolato la tabella)
|
||||
bool _sum_selected; // TRUE se ha selezionato una riga del riepilogo, funge da semaforo per leggere la prossima
|
||||
TString_array _order_array; // Array di TToken_string contenenti i codici IVA soddisfacenti ad ogni tipo di filtro
|
||||
TAssoc_array _summary_table; // Array associativo contenete imonibili ed imposte pronte per la stampa;
|
||||
TArray _summary_array; // Array dove vengono memorizzate le imposte/imponibili per riga
|
||||
@ -1414,4 +1414,4 @@ public:
|
||||
virtual ~TDocumentoEsteso();
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -567,7 +567,7 @@ real TRiga_documento::imponibile(bool lordo) const
|
||||
if (is_omaggio() && _iva_calc_mode > 0)
|
||||
{
|
||||
TDocumento_variable_field * f = (TDocumento_variable_field *) variable_field(field);
|
||||
CHECKS(f, "Field UNKNOWN : ", field);
|
||||
CHECKS(f, "Field UNKNOWN : ", (const char *) field);
|
||||
f->set_dirty(TRUE);
|
||||
r = get_real(field);
|
||||
f->set_dirty(TRUE);
|
||||
|
@ -80,7 +80,10 @@ const char* TMov_mag_doc::codmag_rauto(int r) const
|
||||
if (b[i].get_char(RMOVMAG_TIPORIGA) == 'D')
|
||||
j++;
|
||||
|
||||
return j >=0 ? _codmagc.row(j) : NULL;
|
||||
if (j >= 0)
|
||||
return _codmagc.row(j);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
@ -425,7 +428,9 @@ real TDocumento::bolli(real & imp, int ndec, TTipo_importo t) const
|
||||
{
|
||||
case _ric_ban:
|
||||
{
|
||||
for (int i = 0; i < nscagl - 1; i++)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nscagl - 1; i++)
|
||||
if ((real &) sca_bolli[i] >= imp)
|
||||
break;
|
||||
if (imp_bolli.items() > 0)
|
||||
@ -865,9 +870,10 @@ int TDocumento::write_rewrite(TBaseisamfile & f, bool re) const
|
||||
if (do_movmag)
|
||||
{
|
||||
TRecord_array & b = mov.body();
|
||||
const int mag_rows = mov.rows();
|
||||
const int mag_rows = mov.rows();
|
||||
int i;
|
||||
|
||||
for (int i = mag_rows; i > 0; i--)
|
||||
for (i = mag_rows; i > 0; i--)
|
||||
{
|
||||
TRectype & r = b[i];
|
||||
if (r.get_char(RMOVMAG_TIPORIGA) == riga_dadocumento)
|
||||
@ -988,8 +994,7 @@ int TDocumento::write_rewrite(TBaseisamfile & f, bool re) const
|
||||
for (int i = rows; i > 0; i--)
|
||||
{
|
||||
TRiga_documento & r = myself.row(i);
|
||||
long r_num = r.get_long("MOVMAG");
|
||||
//if (r_num == num) per ora non ci sono movimenti diversi per righe diverse
|
||||
|
||||
r.zero("MOVMAG");
|
||||
}
|
||||
myself.zero("MOVMAG");
|
||||
@ -1027,7 +1032,7 @@ int TDocumento::write_rewrite(TBaseisamfile & f, bool re) const
|
||||
if (r.is_evadibile() && is_ordine())
|
||||
{
|
||||
docevaso &= r.is_evasa();
|
||||
const TDate dcons = r.get(RDOC_DATACONS);
|
||||
const TDate dcons = r.get_date(RDOC_DATACONS);
|
||||
if (!dcons.ok())
|
||||
r.put(RDOC_DATACONS, datacons);
|
||||
}
|
||||
@ -1088,7 +1093,9 @@ int TDocumento::write_rewrite(TBaseisamfile & f, bool re) const
|
||||
st_agg = new TStats_agg;
|
||||
_docs_to_agg.add(key, st_agg, TRUE);
|
||||
}
|
||||
for (int i = physical_rows(); i > 0; i--)
|
||||
int i;
|
||||
|
||||
for (i = physical_rows(); i > 0; i--)
|
||||
if (is_nota_credito)
|
||||
st_agg->sub(myself.row(i));
|
||||
else
|
||||
@ -1318,7 +1325,9 @@ TProvvigioni_agente& TDocumento::calc_provvigioni(const bool generata)
|
||||
}
|
||||
|
||||
// Setta le rate rimanenti
|
||||
for (int i = 1; i <= nrate; i++)
|
||||
int i;
|
||||
|
||||
for (i = 1; i <= nrate; i++)
|
||||
{
|
||||
if (i == nrate && is_anticipo)
|
||||
break;
|
||||
@ -1465,7 +1474,7 @@ void TDocumento::set_fields(TAuto_variable_rectype & rec)
|
||||
{
|
||||
TTipo_documento & tipo_doc = (TTipo_documento &) tipo();
|
||||
const TString& tot_doc = tipo_doc.totale_doc();
|
||||
const TString& tot_provv = tipo_doc.totprovv();
|
||||
// const TString& tot_provv = tipo_doc.totprovv();
|
||||
|
||||
for (const TFormula_documento* f = tipo_doc.first_formula(); f; f = tipo_doc.succ_formula())
|
||||
{
|
||||
@ -1569,8 +1578,10 @@ void TDocumento::calc_iva_fattura_commerciale()
|
||||
tda.add(new TDistrib(t.iva_sconto(), ndec));
|
||||
tda.add(new TDistrib(t.sconto_perc(), ndec));
|
||||
tda.add(new TDistrib(t.sconto_imp(), ndec));
|
||||
|
||||
int k;
|
||||
|
||||
for (int k = 0; k < MAX_IVA_SLICES; k++)
|
||||
for (k = 0; k < MAX_IVA_SLICES; k++)
|
||||
for (int j = 0; j < 7; j++)
|
||||
{
|
||||
const real p (tabella_ripartizione.row(k).get(0));
|
||||
@ -1696,7 +1707,10 @@ void TDocumento::update_tabella_iva()
|
||||
real tot_sconti_imp = tot_sconti - tot_sconti_perc;
|
||||
|
||||
table.restart();
|
||||
for (TRiepilogo_iva * ri = (TRiepilogo_iva *) table.get(); ri != NULL;
|
||||
|
||||
TRiepilogo_iva * ri;
|
||||
|
||||
for (ri = (TRiepilogo_iva *) table.get(); ri != NULL;
|
||||
ri = (TRiepilogo_iva *) table.get())
|
||||
d.add(ri->imp() - ri->imp_spese_row());
|
||||
|
||||
@ -2092,7 +2106,9 @@ void TDocumento::update_spese_aut(TString_array & spese_aut, bool preserve_old,
|
||||
if (tipo().spese_aut())
|
||||
{
|
||||
const int nrows = physical_rows();
|
||||
for (int i = nrows; i > 0; i--)
|
||||
int i;
|
||||
|
||||
for (i = nrows; i > 0; i--)
|
||||
{
|
||||
TRiga_documento & r = row(i);
|
||||
bool tipo_spese = r.get("GENTIPO").empty();
|
||||
@ -2177,7 +2193,7 @@ real TDocumento::calc_conai_qta(int type)
|
||||
{
|
||||
const char * const __conai_art_names[] = {"CONACC", "CONALL", "CONCAR", "CONPLA", "CONLEG", "CONVET"};
|
||||
const char * const __conai_cf_names[] = {"ESACC", "ESALL", "ESCAR", "ESPLA", "ESLEG", "ESVET"};
|
||||
const real perc_esenz = clifor().vendite().get(__conai_cf_names[type]);
|
||||
const real perc_esenz = clifor().vendite().get_real(__conai_cf_names[type]);
|
||||
real qta = ZERO;
|
||||
|
||||
if (perc_esenz < 100.0)
|
||||
@ -2189,7 +2205,7 @@ real TDocumento::calc_conai_qta(int type)
|
||||
TArticolo_giacenza * art = r.articolo();
|
||||
if (art != NULL)
|
||||
{
|
||||
const real row_qta = r.get(RDOC_QTA);
|
||||
const real row_qta = r.get_real(RDOC_QTA);
|
||||
qta += row_qta*art->get_real(__conai_art_names[type]);
|
||||
}
|
||||
}
|
||||
@ -2219,7 +2235,9 @@ void TDocumento::update_conai()
|
||||
bool updated[6] = {FALSE,FALSE,FALSE,FALSE,FALSE,FALSE};
|
||||
|
||||
const int nrows = physical_rows();
|
||||
for (int i = nrows; i > 0; i--)
|
||||
int i;
|
||||
|
||||
for (i = nrows; i > 0; i--)
|
||||
{
|
||||
TRiga_documento& r = row(i);
|
||||
const bool tipo_conai = r.get_char("GENTIPO") == 'C';
|
||||
|
@ -406,8 +406,9 @@ void TExpr_documento::evaluate_user_func(int index, int nparms, TEval_stack & st
|
||||
for (int i = nrows; i > 0; i--)
|
||||
{
|
||||
TRiga_documento & riga = (TRiga_documento &) (*_doc)[i];
|
||||
int j;
|
||||
|
||||
for (int j = cond_nvars - 1; j >= 0; j--)
|
||||
for (j = cond_nvars - 1; j >= 0; j--)
|
||||
{
|
||||
const char* s = cond_expr.varname(j);
|
||||
TFieldref f(s,0);
|
||||
|
@ -18,7 +18,7 @@ TDate TLista_documenti::num2date(char provv, int anno, const char* codnum, long
|
||||
if (doc.read(_isgteq) != NOERR) // In caso d'errore ...
|
||||
doc.last(); // prendi l'ultimo
|
||||
|
||||
return doc.get(DOC_DATADOC);
|
||||
return doc.get_date(DOC_DATADOC);
|
||||
}
|
||||
|
||||
int TLista_documenti::read(char provv, char tipocf, long clifo, int anno,
|
||||
@ -295,7 +295,9 @@ int TLista_clifo::ordina_per_zona()
|
||||
|
||||
int TLista_clifo::find(long cod) const
|
||||
{
|
||||
for (int i = items()-1; i >= 0; i--)
|
||||
int i;
|
||||
|
||||
for (i = items()-1; i >= 0; i--)
|
||||
if (clifo(i).codice() == cod) break;
|
||||
return i;
|
||||
}
|
||||
@ -391,7 +393,7 @@ bool TElaborazione_esterna::elabora(TLista_documenti& doc_in, TLista_documenti&
|
||||
const int rows = d.physical_rows();
|
||||
if (rows > 0)
|
||||
{
|
||||
const row_fields = d[1].items();
|
||||
const int row_fields = d[1].items();
|
||||
|
||||
for (int r = 1; r <= rows; r++)
|
||||
{
|
||||
|
@ -38,8 +38,10 @@ void TFatturazione_bolle::stati_validi(TToken_string& stati) const
|
||||
bool TFatturazione_bolle::raggruppa(TDocumento& doc_in, TDocumento& doc_out)
|
||||
{
|
||||
#ifdef DBG
|
||||
const TString16 tipodoc = doc_in.tipo().codice();
|
||||
for (int i = 0; i < TElaborazione::_max_tipi_doc_elab; i++)
|
||||
const TString16 tipodoc = doc_in.tipo().codice();
|
||||
int i;
|
||||
|
||||
for (i = 0; i < TElaborazione::_max_tipi_doc_elab; i++)
|
||||
{
|
||||
if (tipodoc == tipo_iniziale(i))
|
||||
break;
|
||||
@ -134,7 +136,7 @@ bool TFatturazione_bolle::raggruppa(TDocumento& doc_in, TDocumento& doc_out)
|
||||
if (row_ord != NULL)
|
||||
{
|
||||
tmp = *rin; rin = &tmp;
|
||||
const real ord_price = row_ord->get(RDOC_PREZZO);
|
||||
const real ord_price = row_ord->get_real(RDOC_PREZZO);
|
||||
const TString ord_scont = row_ord->get(RDOC_SCONTO);
|
||||
tmp.put(RDOC_PREZZO, ord_price);
|
||||
tmp.put(RDOC_SCONTO, ord_scont);
|
||||
|
@ -656,7 +656,7 @@ error_type TIVA_array::add_omaggi(const TRiga_documento & r, const TBill& conto,
|
||||
|
||||
r_storno.set_tipo("01");
|
||||
r_storno.put(RDOC_CODIVA, _ivasto);
|
||||
real prezzo = r_storno.get(RDOC_PREZZO);
|
||||
real prezzo = r_storno.get_real(RDOC_PREZZO);
|
||||
prezzo = -prezzo;
|
||||
r_storno.put(RDOC_PREZZO, prezzo);
|
||||
add(r_storno, conto, ndec, p);
|
||||
@ -1981,7 +1981,9 @@ error_type TContabilizzazione::adjust_iva_rows(TDocumento& doc)
|
||||
TGeneric_distrib gd_iva(iva_g, ndec); // Instanzia il TGeneric_ditrib con la vera Imposta
|
||||
TGeneric_distrib gd_imp(imponibile, ndec);
|
||||
// Adesso scorre tutte le righe IVA contabili con questo codice IVA
|
||||
for (int i = 0; i < items; i++)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < items; i++)
|
||||
{
|
||||
TRectype& ie = _movimento->iva(i);
|
||||
if (ie.get(RMI_CODIVA) == codiva) // Se il codice IVA e' uguale
|
||||
@ -2422,7 +2424,7 @@ error_type TContabilizzazione::write_scadenze(TDocumento& doc)
|
||||
}
|
||||
else
|
||||
{
|
||||
TDate ddr = doc.get(DOC_DATADOCRIF);
|
||||
TDate ddr = doc.get_date(DOC_DATADOCRIF);
|
||||
if (ddr.ok())
|
||||
anno = ddr.year();
|
||||
}
|
||||
@ -2565,8 +2567,10 @@ error_type TContabilizzazione::write_scadenze(TDocumento& doc)
|
||||
pag.set_rata(0, in_valuta ? anticipo.get_num() : ZERO, anticipo_base.get_num(), first_date, 1, "", FALSE);
|
||||
}
|
||||
|
||||
real imponibile, imponibile_val;
|
||||
for (int i = pag.n_rate()-1; i >= 0; i--)
|
||||
real imponibile, imponibile_val;
|
||||
int i;
|
||||
|
||||
for (i = pag.n_rate()-1; i >= 0; i--)
|
||||
{
|
||||
if (in_valuta)
|
||||
imponibile_val += pag.tval_rata(i);
|
||||
@ -2623,10 +2627,12 @@ error_type TContabilizzazione::write_scadenze(TDocumento& doc)
|
||||
|
||||
const TDate datadocrif = doc.get_date(DOC_DATADOCRIF);
|
||||
const TString16 numdocrif = doc.get(DOC_NUMDOCRIF);
|
||||
for (int p = newgame->prima_fattura(); p > 0 && p < nuova_riga; p++)
|
||||
int p;
|
||||
|
||||
for (p = newgame->prima_fattura(); p > 0 && p < nuova_riga; p++)
|
||||
{
|
||||
const TRiga_partite& fatt = newgame->riga(p);
|
||||
const TDate datadoc = fatt.get(PART_DATADOC);
|
||||
const TDate datadoc = fatt.get_date(PART_DATADOC);
|
||||
const TString16 numdoc = fatt.get(PART_NUMDOC);
|
||||
if (datadoc.year() == datadocrif.year() && numdoc == numdocrif)
|
||||
break;
|
||||
@ -3373,15 +3379,15 @@ error_type TContabilizzazione::write_intra(TDocumento& doc)
|
||||
rc->put("PROV", provincia);
|
||||
righe.add(key, rc);
|
||||
}
|
||||
const real qta = rr.get(RDOC_QTA);
|
||||
const real qta = rr.get_real(RDOC_QTA);
|
||||
TCurrency_documento imp_val(rr.exist("VALINTRA") ? rr.get_real("VALINTRA") :rr.importo(TRUE, FALSE), doc);
|
||||
TCurrency_documento imp(imp_val); imp.change_to_firm_val();
|
||||
imp_val.change_value(codvali, cambioi);
|
||||
real ammlire = rc->get("AMMLIRE");
|
||||
real ammvaluta = rc->get("AMMVALUTA");
|
||||
real massakg = rc->get("MASSAKG");
|
||||
real massaums = rc->get("MASSAUMS");
|
||||
real valstat = rc->get("VALSTAT");
|
||||
real ammlire = rc->get_real("AMMLIRE");
|
||||
real ammvaluta = rc->get_real("AMMVALUTA");
|
||||
real massakg = rc->get_real("MASSAKG");
|
||||
real massaums = rc->get_real("MASSAUMS");
|
||||
real valstat = rc->get_real("VALSTAT");
|
||||
|
||||
ammlire += imp.get_num();
|
||||
ammvaluta += is_val ? imp_val.get_num() : ZERO;
|
||||
@ -3445,7 +3451,7 @@ error_type TContabilizzazione::write_intra(TDocumento& doc)
|
||||
void TContabilizzazione::aggiorna_saldi(TSaldo_agg& saldo, TMovimentoPN& mv, bool save)
|
||||
{
|
||||
const TRectype& mov = mv.curr();
|
||||
const TDate datareg = mov.get(MOV_DATAREG);
|
||||
const TDate datareg = mov.get_date(MOV_DATAREG);
|
||||
const TString4 codcaus = mov.get(MOV_CODCAUS);
|
||||
|
||||
tiposal tsal = normale;
|
||||
@ -3887,4 +3893,3 @@ bool TContabilizzazione::call_exe(const TDocumento& doc, const TMovimentoPN& mov
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
@ -164,8 +164,10 @@ error_type TGenerazione_effetti::write_groups()
|
||||
{
|
||||
const int items = _effetti_array.items();
|
||||
int err = NOERR;
|
||||
int i;
|
||||
|
||||
_error = no_error;
|
||||
for (int i = 0; i<items && err == NOERR; i++) // scorre gli effetti generati e li scrive su file
|
||||
for (i = 0; i<items && err == NOERR; i++) // scorre gli effetti generati e li scrive su file
|
||||
{
|
||||
TEffetto& effetto = (TEffetto&)_effetti_array[i];
|
||||
const real importo = effetto.get_real(EFF_IMPORTO);
|
||||
@ -368,7 +370,9 @@ long TGenerazione_effetti::group_bills(TAssoc_array& group_array)
|
||||
if (is_nota_credito)
|
||||
{
|
||||
// Cerca fattura da pagare con la nota di credito
|
||||
for (int r = 1; r <= rows; r++)
|
||||
int r;
|
||||
|
||||
for (r = 1; r <= rows; r++)
|
||||
{
|
||||
const int annoeff = effetto.row_r(r).get_int(REFF_ANNODOC);
|
||||
const long codeff = effetto.row_r(r).get_long(REFF_NFATT);
|
||||
@ -377,7 +381,7 @@ long TGenerazione_effetti::group_bills(TAssoc_array& group_array)
|
||||
}
|
||||
if (r <= rows) // Se l'ha trovata ...
|
||||
{
|
||||
const real importo_rata_lit = effetto.row_r(r).get(REFF_IMPORTO);
|
||||
const real importo_rata_lit = effetto.row_r(r).get_real(REFF_IMPORTO);
|
||||
const real importo_rata_val = valuta ? effetto.row_r(r).get_real(REFF_IMPORTOVAL) : ZERO;
|
||||
real delta_lit = imprata - importo_rata_lit;
|
||||
real delta_val = valuta ? imprataval - importo_rata_val : ZERO;
|
||||
|
@ -59,7 +59,7 @@ bool TConsegna_mask::on_field_event(class TOperable_field& f, TField_event e, lo
|
||||
if (e == fe_modify && jolly > 0 && f.get().not_empty())
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
const real qta_daevadere = m.get(S_QTADAEVADERE);
|
||||
const real qta_daevadere = m.get_real(S_QTADAEVADERE);
|
||||
if (qta_daevadere.is_zero())
|
||||
{
|
||||
const TString& residuo = m.get(S_QTARESIDUA);
|
||||
@ -112,7 +112,7 @@ bool TConsegna_mask::on_field_event(class TOperable_field& f, TField_event e, lo
|
||||
return true;
|
||||
}
|
||||
|
||||
rows_sort_func(TSheet_field & s, int i, int j)
|
||||
int rows_sort_func(TSheet_field & s, int i, int j)
|
||||
{
|
||||
TToken_string & s1 = (TToken_string & )(s.row(i));
|
||||
TToken_string & s2 = (TToken_string & )(s.row(j));
|
||||
@ -121,7 +121,7 @@ rows_sort_func(TSheet_field & s, int i, int j)
|
||||
real rr1, rr2;
|
||||
int fields[] = {S_CODART, S_LIVGIAC1, S_LIVGIAC2, S_LIVGIAC3, S_LIVGIAC4,
|
||||
S_CODMAG, S_CODDEP, S_RIGAEVASA, S_DATACONS, S_QTARESIDUA, -1};
|
||||
int ret(0), field(0);
|
||||
int ret = 0, field = 0;
|
||||
while (fields[field] >= 0)
|
||||
{
|
||||
if (fields[field] == S_QTARESIDUA)
|
||||
@ -405,7 +405,7 @@ bool TConsegna_ordini::elabora(TLista_documenti& doc_in, TLista_documenti& doc_o
|
||||
outrec.put(qta_field, daeva);
|
||||
if (qta_field != RDOC_QTA)
|
||||
{
|
||||
const real q = inrec.get(RDOC_QTA);
|
||||
const real q = inrec.get_real(RDOC_QTA);
|
||||
if (q.is_zero())
|
||||
outrec.put(RDOC_QTA, UNO); // Pezza temporanea
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ void TDocumentoEsteso::scadenze_recalc()
|
||||
TPagamento& pag = pagamento();
|
||||
real totspese = spese();//tot_spese();
|
||||
real totimposte = imposta(TRUE);//tot_imposte();
|
||||
real pagato = hh.get(DOC_IMPPAGATO);
|
||||
real pagato = hh.get_real(DOC_IMPPAGATO);
|
||||
const bool saldo = hh.get_bool(DOC_ACCSALDO);
|
||||
real totimponibili = totale_doc() - totimposte - totspese;//tot_documento() - totimposte - totspese;
|
||||
const bool is_in_valuta = in_valuta();
|
||||
|
@ -92,8 +92,9 @@ TDocumento_mask::TDocumento_mask(const char* td)
|
||||
|
||||
const TString_array& handlers = tdoc.handlers();
|
||||
int numhandler = handlers.items();
|
||||
int i;
|
||||
|
||||
for (int i = 0; i < numhandler; i ++ )
|
||||
for (i = 0; i < numhandler; i ++ )
|
||||
{
|
||||
TToken_string& riga = (TToken_string&) handlers[i];
|
||||
user_set_handler( riga.get_int( 0 ), riga.get_int( 1 ) );
|
||||
@ -233,9 +234,10 @@ void TDocumento_mask::configura_sheet(TSheet_field& sheet)
|
||||
int ncols = sheet_columns.items();
|
||||
|
||||
TToken_string colonne;
|
||||
colonne = "0";
|
||||
int i;
|
||||
|
||||
for (int i = 0; i < ncols; i ++ )
|
||||
colonne = "0";
|
||||
for (i = 0; i < ncols; i ++ )
|
||||
{
|
||||
TToken_string& sheet_col = (TToken_string&) sheet_columns[i];
|
||||
const int field_id = sheet_col.get_int(0);
|
||||
@ -402,7 +404,7 @@ void TDocumento_mask::occ2mask()
|
||||
void TDocumento_mask::cli2mask()
|
||||
{
|
||||
TCli_for & c = doc().clifor();
|
||||
TOccasionale & o = doc().occas();
|
||||
// TOccasionale & o = doc().occas();
|
||||
|
||||
const bool onload = !is_running();
|
||||
|
||||
@ -692,7 +694,7 @@ void TDocumento_mask::doc2mask(bool reload_clifo)
|
||||
for (int i = 0; i < righe; i++)
|
||||
{
|
||||
s.insert(-1, FALSE);
|
||||
TToken_string& r = s.row(i);
|
||||
s.row(i); // qui verificare
|
||||
doc()[i+1].autoload(s);
|
||||
s.check_row(i, 0x2);
|
||||
}
|
||||
@ -733,7 +735,7 @@ TVariable_mask* TDocumento_mask::riga_mask(int numriga)
|
||||
for(int i = 1; i <= numhandler; i++)
|
||||
{
|
||||
TString8 chiave; chiave.format("%d", i );
|
||||
TToken_string riga = pro.get( chiave, "HANDLERS" );
|
||||
TToken_string riga(pro.get(chiave, "HANDLERS"));
|
||||
row_set_handler( *m, riga.get_int( 0 ), riga.get_int( 1 ) );
|
||||
}
|
||||
|
||||
@ -1426,7 +1428,7 @@ void TDocument_tree::format_field(const TRectype& rec, const TString& field, TSt
|
||||
const int len = rec.length(fld.name());
|
||||
const int ndec = rec.ndec(fld.name());
|
||||
TString8 pic; pic.format(".%d", ndec);
|
||||
const real r = value;
|
||||
const real r(value);
|
||||
str = r.string(pic);
|
||||
str.right_just(len);
|
||||
}
|
||||
@ -1503,12 +1505,12 @@ bool TDocument_tree::get_description(TString& str) const
|
||||
const TTipo_documento& tipo = TDocumento::tipo(tipodoc);
|
||||
if (codart.not_empty())
|
||||
{
|
||||
const real qta = rec.get(tipo.field_qta());
|
||||
const real qta = rec.get_real(tipo.field_qta());
|
||||
str << qta.string("###.###.##@,@@@");
|
||||
|
||||
if (tipo.is_ordine())
|
||||
{
|
||||
const real qta_evasa = rec.get(tipo.field_qtaevasa());
|
||||
const real qta_evasa = rec.get_real(tipo.field_qtaevasa());
|
||||
const real residuo = qta_evasa < qta ? (qta-qta_evasa) : ZERO;
|
||||
str << residuo.string("###.###.##@,@@@");
|
||||
}
|
||||
@ -2396,7 +2398,7 @@ bool TDocumento_mask::codval_handler( TMask_field& f, KEY key )
|
||||
TMask& m = f.mask();
|
||||
|
||||
// Cerco un cambio per la data specificata, se non lo trovo lo invento
|
||||
TDate datacam = m.get(F_DATACAMBIO);
|
||||
TDate datacam = m.get_date(F_DATACAMBIO);
|
||||
if (!datacam.ok())
|
||||
{
|
||||
datacam = m.get_date(F_DATADOC);
|
||||
@ -2408,7 +2410,7 @@ bool TDocumento_mask::codval_handler( TMask_field& f, KEY key )
|
||||
real cambio = exc.get_change(et); // Determino il cambio standard ed il "Contro-Euro"
|
||||
TString16 key;
|
||||
key.format("%-3s%s", (const char*)f.get(), (const char*)datacam.string(ANSI));
|
||||
const real giornaliero = cache().get("CAM", key, "S4");
|
||||
const real giornaliero(cache().get("CAM", key, "S4"));
|
||||
if (!giornaliero.is_zero())
|
||||
cambio = giornaliero; // Ho trovato un cambio per il giorno!
|
||||
m.set(F_CAMBIO, cambio);
|
||||
@ -2417,4 +2419,4 @@ bool TDocumento_mask::codval_handler( TMask_field& f, KEY key )
|
||||
m.sfield(F_SHEET).force_update(); // Aggiorna punti decimali degli importi
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -438,7 +438,7 @@ bool pricerange_handler(TMask_field& f, KEY key )
|
||||
const int current_doc_row = sh.selected() + 1;
|
||||
TRiga_documento & riga = mask.doc()[current_doc_row];
|
||||
const real old_price = riga.get_real(RDOC_PREZZO);
|
||||
const real new_price = row_mask.get(FR_PREZZO);
|
||||
const real new_price = row_mask.get_real(FR_PREZZO);
|
||||
|
||||
if (old_price != ZERO)
|
||||
{
|
||||
@ -893,8 +893,8 @@ bool um_handler( TMask_field& f, KEY key )
|
||||
// Se qualcuno cerca di modificare la maschera
|
||||
if ( key == K_TAB && f.focusdirty())
|
||||
{
|
||||
TMask& row_mask = f.mask( );
|
||||
TDocumento_mask & mask = (TDocumento_mask &) row_mask.get_sheet()->mask();
|
||||
TMask& row_mask = f.mask( );
|
||||
// TDocumento_mask & mask = (TDocumento_mask &) row_mask.get_sheet()->mask();
|
||||
TTable & ums = (TTable &) ((TEdit_field &) f).browse()->cursor()->file();
|
||||
|
||||
const TString16 um(f.get());
|
||||
@ -1208,7 +1208,7 @@ bool sppr_handler( TMask_field& f, KEY key )
|
||||
|
||||
if (!perc_fl)
|
||||
{
|
||||
const real cambio = mask.get(F_CAMBIO);
|
||||
const real cambio = mask.get_real(F_CAMBIO);
|
||||
real prezzo = sp.prezzo();
|
||||
const TString& doc_valuta = mask.get(F_CODVAL);
|
||||
const bool controeuro = mask.get_bool(F_CONTROEURO);
|
||||
|
Loading…
x
Reference in New Issue
Block a user