Merge della 97.02
git-svn-id: svn://10.65.10.50/trunk@5414 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
422ca7ce14
commit
053c2b9a8f
@ -2812,7 +2812,7 @@ void TMastrini_application::crea_intestazione()
|
|||||||
sep1 ="";
|
sep1 ="";
|
||||||
set_header(11,"@1g%s",(const char*) sep1);
|
set_header(11,"@1g%s",(const char*) sep1);
|
||||||
}
|
}
|
||||||
if (_pagina != np)
|
if (_pagina != np && _nummast == 3)
|
||||||
_pagina = np;
|
_pagina = np;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,6 +217,7 @@ public:
|
|||||||
|
|
||||||
const char* get_descr_caus (const char * codcaus);
|
const char* get_descr_caus (const char * codcaus);
|
||||||
TRectype& look_com (const char * cod);
|
TRectype& look_com (const char * cod);
|
||||||
|
TRectype& look_com (const TString& stato, const TString& cod);
|
||||||
const char* get_codiva_des(const char* codiva);
|
const char* get_codiva_des(const char* codiva);
|
||||||
void get_date_aep(int aep, TDate* in, TDate* fin);
|
void get_date_aep(int aep, TDate* in, TDate* fin);
|
||||||
void update_totals (char sezione, real& importo);
|
void update_totals (char sezione, real& importo);
|
||||||
@ -284,6 +285,17 @@ HIDDEN bool libro_cronologico()
|
|||||||
return conf.get_bool("GsLbCn");
|
return conf.get_bool("GsLbCn");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRectype& TStampa_giornale::look_com (const TString& stato, const TString& cod)
|
||||||
|
{
|
||||||
|
_com->zero();
|
||||||
|
_com->put(COM_COM, cod);
|
||||||
|
_com->put(COM_STATO, stato);
|
||||||
|
if (_com->read() != NOERR)
|
||||||
|
_com->zero();
|
||||||
|
|
||||||
|
return _com->curr();
|
||||||
|
}
|
||||||
|
|
||||||
TRectype& TStampa_giornale::look_com (const char * cod)
|
TRectype& TStampa_giornale::look_com (const char * cod)
|
||||||
{
|
{
|
||||||
_com->zero();
|
_com->zero();
|
||||||
@ -1440,7 +1452,7 @@ int TStampa_giornale::setta_righe_indirizzo(char tipocf, long codcf,int rdes)
|
|||||||
codanagr = _clifo->get_long(CLI_CODANAGPER);
|
codanagr = _clifo->get_long(CLI_CODANAGPER);
|
||||||
}
|
}
|
||||||
|
|
||||||
TRectype rec = look_com (comcf);
|
TRectype rec = look_com (statocf, comcf);
|
||||||
comune = rec.get(COM_DENCOM);
|
comune = rec.get(COM_DENCOM);
|
||||||
prov = rec.get(COM_PROVCOM);
|
prov = rec.get(COM_PROVCOM);
|
||||||
if (comcf.empty()) comune = _clifo->get(CLI_LOCCF);
|
if (comcf.empty()) comune = _clifo->get(CLI_LOCCF);
|
||||||
@ -1477,14 +1489,13 @@ int TStampa_giornale::setta_righe_indirizzo(char tipocf, long codcf,int rdes)
|
|||||||
if (datana.not_empty())
|
if (datana.not_empty())
|
||||||
{
|
{
|
||||||
codcomna = _clifo->get("COMNASC");
|
codcomna = _clifo->get("COMNASC");
|
||||||
TRectype dep = look_com (codcomna);
|
statona = _clifo->get("STATONASC");
|
||||||
|
TRectype dep = look_com (statona,codcomna);
|
||||||
|
|
||||||
comna = dep.get(COM_DENCOM);
|
comna = dep.get(COM_DENCOM);
|
||||||
provna = dep.get(COM_PROVCOM);
|
provna = dep.get(COM_PROVCOM);
|
||||||
capna = dep.get(COM_CAPCOM);
|
capna = dep.get(COM_CAPCOM);
|
||||||
|
|
||||||
statona = dep.get("STATO");
|
|
||||||
|
|
||||||
sprintf (riga, "@%dg%s %s %s %s", POSCONTO,
|
sprintf (riga, "@%dg%s %s %s %s", POSCONTO,
|
||||||
(const char*)datana,
|
(const char*)datana,
|
||||||
(const char*)comna,
|
(const char*)comna,
|
||||||
|
@ -737,7 +737,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
vssp_imp += vsimp_imp;
|
vssp_imp += vsimp_imp;
|
||||||
vssp_iva += vsimp_iva;
|
vssp_iva += vsimp_iva;
|
||||||
}
|
}
|
||||||
else if (fattrit && month != 13)
|
else if (fattrit)
|
||||||
{
|
{
|
||||||
rit_imp = imponibile;
|
rit_imp = imponibile;
|
||||||
rit_iva = imposta;
|
rit_iva = imposta;
|
||||||
@ -1075,7 +1075,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
vendite += imponibile;
|
vendite += imponibile;
|
||||||
vendite_iva += imposta;
|
vendite_iva += imposta;
|
||||||
}
|
}
|
||||||
else if (liq && tipomov == acquisto)
|
else if ((liq || fattrit && month == 13) && tipomov == acquisto)
|
||||||
{
|
{
|
||||||
// totale acquisti
|
// totale acquisti
|
||||||
acquisti += imponibile;
|
acquisti += imponibile;
|
||||||
|
@ -499,6 +499,10 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt)
|
|||||||
int tipodet = atoi(*_pim_tipodet);
|
int tipodet = atoi(*_pim_tipodet);
|
||||||
TString codiva((const char*)(*_pim_codiva));
|
TString codiva((const char*)(*_pim_codiva));
|
||||||
TString other = _pim->get("S4");
|
TString other = _pim->get("S4");
|
||||||
|
TToken_string s1(_pim->get("S1"),'!'); // Imponibile/iva fatture in ritardo
|
||||||
|
real rit_imp(s1.get(0));
|
||||||
|
real rit_iva(s1.get(1));
|
||||||
|
const bool is_rit= tipodet != 0 && month == 13 && rit_imp != 0.0; //Se fattura in ritardo con tipo detr. != 0 e si sta calcolando l'annuale
|
||||||
|
|
||||||
// ACHTUNG! Corrispettivi da ventileer possono ventilare
|
// ACHTUNG! Corrispettivi da ventileer possono ventilare
|
||||||
// ad un altro codiva; in tal caso si scrive quello
|
// ad un altro codiva; in tal caso si scrive quello
|
||||||
@ -517,7 +521,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt)
|
|||||||
|
|
||||||
// questi non vanno in liquidazione, i totali sono
|
// questi non vanno in liquidazione, i totali sono
|
||||||
// gia' calcolati altrove
|
// gia' calcolati altrove
|
||||||
if (tipodet == 1 || tipodet == 3 || tipodet == 9)
|
if ((tipodet == 1 || tipodet == 3 || tipodet == 9) && !is_rit)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// se ha tutti gli importi nulli viene da un annullamento di
|
// se ha tutti gli importi nulli viene da un annullamento di
|
||||||
@ -573,10 +577,11 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt)
|
|||||||
|
|
||||||
if (tipomov == acquisto)
|
if (tipomov == acquisto)
|
||||||
{
|
{
|
||||||
d->_r4 += _pim->get_real("R0");
|
// Ci sono anche le fatture in ritardo (solo in annuale)! Con tipo detraibilita' 1,3,9
|
||||||
d->_r5 += _pim->get_real("R1");
|
d->_r4 += is_rit ? rit_imp : _pim->get_real("R0");
|
||||||
t4 += _pim->get_real("R0");
|
d->_r5 += is_rit ? rit_iva : _pim->get_real("R1");
|
||||||
t5 += _pim->get_real("R1");
|
t4 += is_rit ? rit_imp : _pim->get_real("R0");
|
||||||
|
t5 += is_rit ? rit_iva : _pim->get_real("R1");
|
||||||
}
|
}
|
||||||
else // vendita
|
else // vendita
|
||||||
{
|
{
|
||||||
@ -673,7 +678,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt)
|
|||||||
|
|
||||||
real impc,ivac; // Aggiunge lo scorporo dei corrispettivi
|
real impc,ivac; // Aggiunge lo scorporo dei corrispettivi
|
||||||
const int ditems = _descr_arr.items();
|
const int ditems = _descr_arr.items();
|
||||||
for (int i=0;i<ditems;i++) // scorre le righe memorizzate
|
for (int i=last+1;i<ditems;i++) // scorre le righe memorizzate
|
||||||
{
|
{
|
||||||
_DescrItem& dd = (_DescrItem&) _descr_arr[i];
|
_DescrItem& dd = (_DescrItem&) _descr_arr[i];
|
||||||
if (corr_ann.is_key(dd._s1) && dd._flags == PIM_ROW && dd._s0 == ref) // Se esiste il codice iva corrispondente sull'array corrispettivi
|
if (corr_ann.is_key(dd._s1) && dd._flags == PIM_ROW && dd._s0 == ref) // Se esiste il codice iva corrispondente sull'array corrispettivi
|
||||||
|
@ -159,6 +159,18 @@ TRectype& CG4400_application::ricerca_occ(const char * occ)
|
|||||||
return occas.curr();
|
return occas.curr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRectype& CG4400_application::look_comuni (const TString& stato, const TString& cod)
|
||||||
|
{
|
||||||
|
_com->zero();
|
||||||
|
_com->put(COM_STATO, stato);
|
||||||
|
_com->put(COM_COM, cod);
|
||||||
|
_com->read();
|
||||||
|
if (_com->bad())
|
||||||
|
_com->zero();
|
||||||
|
|
||||||
|
return _com->curr();
|
||||||
|
}
|
||||||
|
|
||||||
TRectype& CG4400_application::look_comuni (const char* cod)
|
TRectype& CG4400_application::look_comuni (const char* cod)
|
||||||
{
|
{
|
||||||
_com->zero();
|
_com->zero();
|
||||||
@ -2038,7 +2050,7 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
|||||||
reset_print();
|
reset_print();
|
||||||
int rr = 0, riga = 0;
|
int rr = 0, riga = 0;
|
||||||
bool intra;
|
bool intra;
|
||||||
TString80 comune, prov, comcf, capcf, civcf;
|
TString80 comune, prov, comcf, capcf, civcf, stacf;
|
||||||
TString80 viacf;
|
TString80 viacf;
|
||||||
TString ragsoc;
|
TString ragsoc;
|
||||||
TString tipo_op = "";
|
TString tipo_op = "";
|
||||||
@ -2152,6 +2164,7 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
|||||||
capcf = dep.get (CLI_CAPCF);
|
capcf = dep.get (CLI_CAPCF);
|
||||||
comcf = dep.get (CLI_COMCF);
|
comcf = dep.get (CLI_COMCF);
|
||||||
comune = dep.get (CLI_LOCCF);
|
comune = dep.get (CLI_LOCCF);
|
||||||
|
stacf = dep.get (CLI_STATOCF);
|
||||||
char tipoa = dep.get_char(CLI_TIPOAPER);
|
char tipoa = dep.get_char(CLI_TIPOAPER);
|
||||||
if (tipoa == 'F')
|
if (tipoa == 'F')
|
||||||
{
|
{
|
||||||
@ -2171,8 +2184,9 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
|||||||
civcf = dep.get (OCC_CIV);
|
civcf = dep.get (OCC_CIV);
|
||||||
capcf = dep.get (OCC_CAP);
|
capcf = dep.get (OCC_CAP);
|
||||||
comcf = dep.get (OCC_COM);
|
comcf = dep.get (OCC_COM);
|
||||||
|
stacf = dep.get (OCC_STATO);
|
||||||
}
|
}
|
||||||
TRectype com = look_comuni(comcf);
|
TRectype com = look_comuni(stacf,comcf);
|
||||||
if (!com.empty())
|
if (!com.empty())
|
||||||
{
|
{
|
||||||
comune = com.get(COM_DENCOM);
|
comune = com.get(COM_DENCOM);
|
||||||
|
@ -95,7 +95,8 @@ public:
|
|||||||
const char* descr_iva (const char*);
|
const char* descr_iva (const char*);
|
||||||
TRectype& ricerca_occ(const char*);
|
TRectype& ricerca_occ(const char*);
|
||||||
TRectype& ricerca_cf (char, long);
|
TRectype& ricerca_cf (char, long);
|
||||||
TRectype& look_comuni(const char*);
|
TRectype& look_comuni(const TString& stato, const TString& cod);
|
||||||
|
TRectype& look_comuni(const char* cod);
|
||||||
TArray_sheet* get_ditte_sheet() { return _ditte; }
|
TArray_sheet* get_ditte_sheet() { return _ditte; }
|
||||||
int setta_riga (int, const TRigaiva&, real&, real&, real&, real&);
|
int setta_riga (int, const TRigaiva&, real&, real&, real&, real&);
|
||||||
int riga_rmoviva();
|
int riga_rmoviva();
|
||||||
|
@ -1106,7 +1106,7 @@ void TInv_cont::sola_iva(TString& record, long nreg)
|
|||||||
bool TInv_cont::invio_mov_PN()
|
bool TInv_cont::invio_mov_PN()
|
||||||
{
|
{
|
||||||
int size = 256;
|
int size = 256;
|
||||||
TString record(size);
|
TString record(size),head_descr;
|
||||||
bool almeno_una_riga = FALSE;
|
bool almeno_una_riga = FALSE;
|
||||||
|
|
||||||
long cicli = _tmov->items();
|
long cicli = _tmov->items();
|
||||||
@ -1123,6 +1123,8 @@ bool TInv_cont::invio_mov_PN()
|
|||||||
record.spaces();
|
record.spaces();
|
||||||
|
|
||||||
long nreg = _tmov->get_long(RMV_NUMREG);
|
long nreg = _tmov->get_long(RMV_NUMREG);
|
||||||
|
head_descr = _tmov->get(MOV_DESCR); // Descrizione di testata
|
||||||
|
|
||||||
|
|
||||||
testata_mov_PN();
|
testata_mov_PN();
|
||||||
|
|
||||||
@ -1146,6 +1148,8 @@ bool TInv_cont::invio_mov_PN()
|
|||||||
testata_trasfer(nreg,nrig,record);
|
testata_trasfer(nreg,nrig,record);
|
||||||
|
|
||||||
TString descr = _trmov->get(RMV_DESCR);
|
TString descr = _trmov->get(RMV_DESCR);
|
||||||
|
if (descr.empty())
|
||||||
|
descr = head_descr; // Se non esiste la descrizione della riga ci mette quella della testata
|
||||||
str.format("%-.30s", (const char*) descr);
|
str.format("%-.30s", (const char*) descr);
|
||||||
record.overwrite(str,44); //Descrizione riga di movimento
|
record.overwrite(str,44); //Descrizione riga di movimento
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user