Errori corretti
git-svn-id: svn://10.65.10.50/trunk@1590 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
79c2bab453
commit
0303a5c42a
@ -1,6 +1,6 @@
|
|||||||
//
|
//********************************
|
||||||
//Riepilogo Progressivi IVA
|
//* Riepilogo Progressivi IVA *
|
||||||
//
|
//********************************
|
||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <date.h>
|
#include <date.h>
|
||||||
#include <lffiles.h>
|
#include <lffiles.h>
|
||||||
@ -176,7 +176,7 @@ const char* CG0400_application::desc_attivita(const char* codatt)
|
|||||||
const char* CG0400_application::desc_iva(const char* cod)
|
const char* CG0400_application::desc_iva(const char* cod)
|
||||||
{
|
{
|
||||||
TTable tab_iva("%IVA");
|
TTable tab_iva("%IVA");
|
||||||
TString codtab(format ("%-4s", cod));
|
TString codtab(format("%-4s", cod));
|
||||||
|
|
||||||
tab_iva.zero();
|
tab_iva.zero();
|
||||||
tab_iva.put("CODTAB", codtab);
|
tab_iva.put("CODTAB", codtab);
|
||||||
@ -257,6 +257,7 @@ void CG0400_application::look_pim()
|
|||||||
int mese = atoi(codtab.mid(13,2));
|
int mese = atoi(codtab.mid(13,2));
|
||||||
TString16 codatt = codtab.mid(4,5);
|
TString16 codatt = codtab.mid(4,5);
|
||||||
TString16 codiva = codtab.mid(16,4);
|
TString16 codiva = codtab.mid(16,4);
|
||||||
|
TString16 tipoiva = pim.get("S5");
|
||||||
codiva = codiva.trim();
|
codiva = codiva.trim();
|
||||||
codatt = codatt.trim();
|
codatt = codatt.trim();
|
||||||
|
|
||||||
@ -272,6 +273,9 @@ void CG0400_application::look_pim()
|
|||||||
|
|
||||||
if (codatt != _cod_att) continue;
|
if (codatt != _cod_att) continue;
|
||||||
|
|
||||||
|
//Modifica del 12/07/1995
|
||||||
|
if (tipoiva == "VE") continue; //i codici iva di tipo "VE"
|
||||||
|
//Fine //non devono essere stampati
|
||||||
|
|
||||||
while (classify_pim(pim.curr(), imponibile, imposta, tipo))
|
while (classify_pim(pim.curr(), imponibile, imposta, tipo))
|
||||||
{
|
{
|
||||||
@ -325,9 +329,14 @@ void CG0400_application::cerca_i_pim()
|
|||||||
TString16 codatt = codtab.mid(4,5);
|
TString16 codatt = codtab.mid(4,5);
|
||||||
int mese = atoi(codtab.mid(13,2));
|
int mese = atoi(codtab.mid(13,2));
|
||||||
TString16 codiva = codtab.mid(16,4);
|
TString16 codiva = codtab.mid(16,4);
|
||||||
|
TString16 tipoiva = pim.get("S5");
|
||||||
|
|
||||||
if (anno != _annoiva) continue;
|
if (anno != _annoiva) continue;
|
||||||
|
|
||||||
|
//Modifica del 12/07/1995
|
||||||
|
if (tipoiva == "VE") continue;
|
||||||
|
//Fine
|
||||||
|
|
||||||
if (_livelloprog == 1) //riepilogo per aliquota
|
if (_livelloprog == 1) //riepilogo per aliquota
|
||||||
{
|
{
|
||||||
codiva = codiva.trim();
|
codiva = codiva.trim();
|
||||||
|
163
cg/cg3200.cpp
163
cg/cg3200.cpp
@ -134,6 +134,7 @@ public:
|
|||||||
void data_fine_esercizio(int);
|
void data_fine_esercizio(int);
|
||||||
const char* descrizione_gruppo();
|
const char* descrizione_gruppo();
|
||||||
const char* descrizione_conto();
|
const char* descrizione_conto();
|
||||||
|
const char* descrizione_sottoconto();
|
||||||
const char* descrizione_classe(char,char,int,int);
|
const char* descrizione_classe(char,char,int,int);
|
||||||
bool almeno_un_record();
|
bool almeno_un_record();
|
||||||
void ricerca_dati_ditta();
|
void ricerca_dati_ditta();
|
||||||
@ -289,6 +290,11 @@ bool sottoc_handler_ini(TMask_field& f, KEY key)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Inizio modifica del 02-05-95 riguardo controlli di validita' su gruppo, //
|
||||||
|
// conto e sottoconto iniziale e finale. //
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
bool sottoc_handler_fine(TMask_field& f, KEY key)
|
bool sottoc_handler_fine(TMask_field& f, KEY key)
|
||||||
{
|
{
|
||||||
const short id = f.dlg();
|
const short id = f.dlg();
|
||||||
@ -409,7 +415,7 @@ bool TMastrini_application::contoi_hnd (TMask_field& f, KEY k)
|
|||||||
|
|
||||||
const short id = f.dlg();
|
const short id = f.dlg();
|
||||||
|
|
||||||
if ( (k == K_ENTER || k == K_TAB) && f.mask().is_running())
|
if (k == K_TAB && f.mask().is_running())
|
||||||
{
|
{
|
||||||
int gruppo = f.mask().get_int(F_GRUPPOINI);
|
int gruppo = f.mask().get_int(F_GRUPPOINI);
|
||||||
int conto = f.mask().get_int(id);
|
int conto = f.mask().get_int(id);
|
||||||
@ -496,7 +502,7 @@ bool TMastrini_application::contof_hnd (TMask_field& f, KEY k)
|
|||||||
return f.error_box("Il conto di partenza deve essere inferiore o uguale al conto di arrivo");
|
return f.error_box("Il conto di partenza deve essere inferiore o uguale al conto di arrivo");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (k == K_ENTER || k == K_TAB) && f.mask().is_running())
|
if (k == K_TAB && f.mask().is_running())
|
||||||
{
|
{
|
||||||
int gruppo = f.mask().get_int(F_GRUPPOFINE);
|
int gruppo = f.mask().get_int(F_GRUPPOFINE);
|
||||||
int conto = f.mask().get_int(id);
|
int conto = f.mask().get_int(id);
|
||||||
@ -546,6 +552,10 @@ bool TMastrini_application::contof_hnd (TMask_field& f, KEY k)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// FINE MODIFICA DEL 02-05-95 //
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
bool TMastrini_application::check_ordine(TMask_field& f, KEY k)
|
bool TMastrini_application::check_ordine(TMask_field& f, KEY k)
|
||||||
{
|
{
|
||||||
int gruppof = f.mask().get_int(F_GRUPPOFINE);
|
int gruppof = f.mask().get_int(F_GRUPPOFINE);
|
||||||
@ -943,11 +953,11 @@ void TMastrini_application::fai_stampa198()
|
|||||||
|
|
||||||
// Stampa saldo movimenti
|
// Stampa saldo movimenti
|
||||||
|
|
||||||
set_row (_rw,"@153g#t", &_saldo_movimenti_str);
|
set_row (_rw,"@149g#t", &_saldo_movimenti_str);
|
||||||
|
|
||||||
set_row (_rw,"@169g#3t", &_g_contr);
|
set_row (_rw,"@165g#3t", &_g_contr);
|
||||||
set_row (_rw,"@172g#3t", &_c_contr);
|
set_row (_rw,"@169g#3t", &_c_contr);
|
||||||
set_row (_rw,"@175g#6t", &_s_contr);
|
set_row (_rw,"@173g#6t", &_s_contr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TMastrini_application::stampa_totali132()
|
void TMastrini_application::stampa_totali132()
|
||||||
@ -1144,32 +1154,32 @@ void TMastrini_application::stampa_totali198()
|
|||||||
if (_nummast == 1 || _nummast == 3)
|
if (_nummast == 1 || _nummast == 3)
|
||||||
_rw = 1;
|
_rw = 1;
|
||||||
|
|
||||||
sep.fill('-'); //Stampa 132 - (sep(132))
|
sep.fill('-'); //Stampa 198 - (sep(198))
|
||||||
set_row(_rw++,"@0g%s", (const char *) sep);
|
set_row(_rw++,"@0g%s", (const char *) sep);
|
||||||
|
|
||||||
_totprogre_dare=_progredare+_totale_periodo_dare;
|
_totprogre_dare=_progredare+_totale_periodo_dare;
|
||||||
_totprogre_avere=_progreavere+_totale_periodo_avere;
|
_totprogre_avere=_progreavere+_totale_periodo_avere;
|
||||||
TString string = _totale_periodo_dare.string("###.###.###.###");
|
TString string = _totale_periodo_dare.string("###.###.###.###");
|
||||||
set_row (_rw,"@32gTOTALI PERIODO@102g%15s", (const char*)string);
|
set_row (_rw,"@32gTOTALI PERIODO@101g%15s", (const char*)string);
|
||||||
string = _totale_periodo_avere.string("###.###.###.###");
|
string = _totale_periodo_avere.string("###.###.###.###");
|
||||||
set_row (_rw,"@119g%15s", (const char*)string);
|
set_row (_rw,"@117g%15s", (const char*)string);
|
||||||
string = _saldo_movimenti.string("###.###.###.###");
|
string = _saldo_movimenti.string("###.###.###.###");
|
||||||
set_row (_rw++,"@153g%15s", (const char*)string);
|
set_row (_rw++,"@149g%15s", (const char*)string);
|
||||||
string = _totprogre_dare.string("###.###.###.###");
|
string = _totprogre_dare.string("###.###.###.###");
|
||||||
set_row (_rw,"@32gTOTALI PROGRESSIVI@102g%15s",(const char*)string);
|
set_row (_rw,"@32gTOTALI PROGRESSIVI@101g%15s",(const char*)string);
|
||||||
string = _totprogre_avere.string("###.###.###.###");
|
string = _totprogre_avere.string("###.###.###.###");
|
||||||
set_row (_rw,"@119g%15s", (const char*)string);
|
set_row (_rw,"@117g%15s", (const char*)string);
|
||||||
string = _saldo_progressivi.string("###.###.###.###");
|
string = _saldo_progressivi.string("###.###.###.###");
|
||||||
set_row (_rw++,"@136g%15s", (const char*)string);
|
set_row (_rw++,"@133g%15s", (const char*)string);
|
||||||
if (_stampaprogre) //Progressivi attuali
|
if (_stampaprogre) //Progressivi attuali
|
||||||
{
|
{
|
||||||
set_row(_rw,"@32gTOTALI PROGRESSIVI AL@55g%s",(const char*)_ultima_data_reg.string());
|
set_row(_rw,"@32gTOTALI PROGRESSIVI AL@55g%s",(const char*)_ultima_data_reg.string());
|
||||||
TString str = _totprogre_dare_al.string("###.###.###.###");
|
TString str = _totprogre_dare_al.string("###.###.###.###");
|
||||||
set_row (_rw,"@102g%15s", (const char*)str);
|
set_row (_rw,"@101g%15s", (const char*)str);
|
||||||
str = _totprogre_avere_al.string("###.###.###.###");
|
str = _totprogre_avere_al.string("###.###.###.###");
|
||||||
set_row (_rw,"@119g%15s", (const char*)str);
|
set_row (_rw,"@117g%15s", (const char*)str);
|
||||||
str = _saldo_progressivi.string("###.###.###.###");
|
str = _saldo_progressivi.string("###.###.###.###");
|
||||||
set_row (_rw,"@136g%15s", (const char*)str);
|
set_row (_rw,"@133g%15s", (const char*)str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1196,14 +1206,14 @@ void TMastrini_application::carica_array_totali198()
|
|||||||
_totprogre_dare=_progredare+_totale_periodo_dare;
|
_totprogre_dare=_progredare+_totale_periodo_dare;
|
||||||
_totprogre_avere=_progreavere+_totale_periodo_avere;
|
_totprogre_avere=_progreavere+_totale_periodo_avere;
|
||||||
|
|
||||||
r.add("@32gTOTALI PERIODO@102g%15s@119g%15s@153g%15s");
|
r.add("@32gTOTALI PERIODO@101g%15s@117g%15s@149g%15s");
|
||||||
r.add(_totale_periodo_dare.string("###.###.###.###"));
|
r.add(_totale_periodo_dare.string("###.###.###.###"));
|
||||||
r.add(_totale_periodo_avere.string("###.###.###.###"));
|
r.add(_totale_periodo_avere.string("###.###.###.###"));
|
||||||
r.add(_saldo_movimenti.string("###.###.###.###"));
|
r.add(_saldo_movimenti.string("###.###.###.###"));
|
||||||
_lista.add(r);
|
_lista.add(r);
|
||||||
r = "";
|
r = "";
|
||||||
|
|
||||||
r.add("@32gTOTALI PROGRESSIVI@102g%15s@119g%15s@136g%15s");
|
r.add("@32gTOTALI PROGRESSIVI@101g%15s@117g%15s@133g%15s");
|
||||||
r.add(_totprogre_dare.string("###.###.###.###"));
|
r.add(_totprogre_dare.string("###.###.###.###"));
|
||||||
r.add(_totprogre_avere.string("###.###.###.###"));
|
r.add(_totprogre_avere.string("###.###.###.###"));
|
||||||
r.add(_saldo_progressivi.string("###.###.###.###"));
|
r.add(_saldo_progressivi.string("###.###.###.###"));
|
||||||
@ -1212,7 +1222,7 @@ void TMastrini_application::carica_array_totali198()
|
|||||||
|
|
||||||
if (_stampaprogre) //Progressivi attuali
|
if (_stampaprogre) //Progressivi attuali
|
||||||
{
|
{
|
||||||
r.add("@32gTOTALI PROGRESSIVI AL@55g%s@102g%15s@119g%15s@136g%15s");
|
r.add("@32gTOTALI PROGRESSIVI AL@55g%s@101g%15s@117g%15s@133g%15s");
|
||||||
r.add(_ultima_data_reg.string());
|
r.add(_ultima_data_reg.string());
|
||||||
r.add(_totprogre_dare_al.string("###.###.###.###"));
|
r.add(_totprogre_dare_al.string("###.###.###.###"));
|
||||||
r.add(_totprogre_avere_al.string("###.###.###.###"));
|
r.add(_totprogre_avere_al.string("###.###.###.###"));
|
||||||
@ -1509,6 +1519,13 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
|||||||
if (_numcarat == 2)
|
if (_numcarat == 2)
|
||||||
set_row (_rw, "@197g*");
|
set_row (_rw, "@197g*");
|
||||||
|
|
||||||
|
if (_stampa_mov_prov && provvis.trim().not_empty())
|
||||||
|
if (_numcarat == 1)
|
||||||
|
set_row(_rw, "@129gP");
|
||||||
|
else
|
||||||
|
if (_numcarat == 2)
|
||||||
|
set_row(_rw, "@195gP");
|
||||||
|
|
||||||
_codcaus = _mov->curr().get(MOV_CODCAUS);
|
_codcaus = _mov->curr().get(MOV_CODCAUS);
|
||||||
_tipodoc = _mov->curr().get(MOV_TIPODOC);
|
_tipodoc = _mov->curr().get(MOV_TIPODOC);
|
||||||
if (_stampatotiva && (_tmcf == 'C' || _tmcf == 'F'))
|
if (_stampatotiva && (_tmcf == 'C' || _tmcf == 'F'))
|
||||||
@ -1804,7 +1821,7 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
|||||||
{
|
{
|
||||||
_saldo_progressivi += _importo;
|
_saldo_progressivi += _importo;
|
||||||
_saldo_movimenti += _importo;
|
_saldo_movimenti += _importo;
|
||||||
set_row (_rw,"@102g%s", (const char*) _importo_str);
|
set_row (_rw,"@101g%s", (const char*) _importo_str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (_sezione == "A")
|
else if (_sezione == "A")
|
||||||
@ -1819,7 +1836,7 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
|||||||
{
|
{
|
||||||
_saldo_progressivi -= _importo;
|
_saldo_progressivi -= _importo;
|
||||||
_saldo_movimenti -= _importo;
|
_saldo_movimenti -= _importo;
|
||||||
set_row (_rw,"@119g%s", (const char*) _importo_str);
|
set_row (_rw,"@117g%s", (const char*) _importo_str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1830,10 +1847,10 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
|||||||
ricerca_regiva();
|
ricerca_regiva();
|
||||||
_protiva = atol(_mov->curr().get(MOV_PROTIVA));
|
_protiva = atol(_mov->curr().get(MOV_PROTIVA));
|
||||||
if (_protiva != 0)
|
if (_protiva != 0)
|
||||||
set_row (_rw,"@191g%5d", _protiva);
|
set_row (_rw,"@189g%5d", _protiva);
|
||||||
|
|
||||||
if (_tipo < 3)
|
if (_tipo < 3)
|
||||||
set_row (_rw,"@182g#t" , &_regiva);
|
set_row (_rw,"@180g#t" , &_regiva);
|
||||||
_dataregrmov = current_cursor()->curr(LF_RMOV).get_date(RMV_DATAREG);
|
_dataregrmov = current_cursor()->curr(LF_RMOV).get_date(RMV_DATAREG);
|
||||||
dataregrmovstring=_dataregrmov.string();
|
dataregrmovstring=_dataregrmov.string();
|
||||||
|
|
||||||
@ -1849,7 +1866,7 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
|||||||
if (((gruppof!=_gruppo)||(contof!=_conto)||(sottocf!=_sottoc))||(rmov.eof()))
|
if (((gruppof!=_gruppo)||(contof!=_conto)||(sottocf!=_sottoc))||(rmov.eof()))
|
||||||
datasucc = ("");
|
datasucc = ("");
|
||||||
if (datasucc != _dataregrmov)
|
if (datasucc != _dataregrmov)
|
||||||
set_row (_rw,"@136g#t", &_saldo_progressivi_str);
|
set_row (_rw,"@133g#t", &_saldo_progressivi_str);
|
||||||
rmov.readat(rec);
|
rmov.readat(rec);
|
||||||
}
|
}
|
||||||
_rw = 1;
|
_rw = 1;
|
||||||
@ -1859,6 +1876,8 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
|||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -2045,6 +2064,8 @@ print_action TMastrini_application::postprocess_print(int file, int counter)
|
|||||||
{
|
{
|
||||||
if (file == LF_SALDI)
|
if (file == LF_SALDI)
|
||||||
{
|
{
|
||||||
|
_msk->reset(F_TIPOCF_INI);
|
||||||
|
|
||||||
_msk->reset(F_GRUPPOINI);
|
_msk->reset(F_GRUPPOINI);
|
||||||
|
|
||||||
_msk->reset(F_CONTOINI_CONTO);
|
_msk->reset(F_CONTOINI_CONTO);
|
||||||
@ -2055,6 +2076,12 @@ print_action TMastrini_application::postprocess_print(int file, int counter)
|
|||||||
_msk->reset(F_SOTTOCINI_CLIENTE);
|
_msk->reset(F_SOTTOCINI_CLIENTE);
|
||||||
_msk->reset(F_SOTTOCINI_FORN);
|
_msk->reset(F_SOTTOCINI_FORN);
|
||||||
|
|
||||||
|
_msk->reset(F_DESCRINI_CONTO);
|
||||||
|
_msk->reset(F_DESCRINI_CLIENTE);
|
||||||
|
_msk->reset(F_DESCRINI_FORN);
|
||||||
|
|
||||||
|
_msk->reset(F_TIPOCF_FINE);
|
||||||
|
|
||||||
_msk->reset(F_GRUPPOFINE);
|
_msk->reset(F_GRUPPOFINE);
|
||||||
|
|
||||||
_msk->reset(F_CONTOFINE_CONTO);
|
_msk->reset(F_CONTOFINE_CONTO);
|
||||||
@ -2064,6 +2091,10 @@ print_action TMastrini_application::postprocess_print(int file, int counter)
|
|||||||
_msk->reset(F_SOTTOCFINE_CONTO);
|
_msk->reset(F_SOTTOCFINE_CONTO);
|
||||||
_msk->reset(F_SOTTOCFINE_CLIENTE);
|
_msk->reset(F_SOTTOCFINE_CLIENTE);
|
||||||
_msk->reset(F_SOTTOCFINE_FORN);
|
_msk->reset(F_SOTTOCFINE_FORN);
|
||||||
|
|
||||||
|
_msk->reset(F_DESCRFINE_CONTO);
|
||||||
|
_msk->reset(F_DESCRFINE_CLIENTE);
|
||||||
|
_msk->reset(F_DESCRFINE_FORN);
|
||||||
}
|
}
|
||||||
return NEXT_PAGE;
|
return NEXT_PAGE;
|
||||||
}
|
}
|
||||||
@ -2440,24 +2471,32 @@ void TMastrini_application::crea_intestazione()
|
|||||||
sep.fill('-'); //Stampa 132 - (sep(132))
|
sep.fill('-'); //Stampa 132 - (sep(132))
|
||||||
set_header (6, (const char *) sep);
|
set_header (6, (const char *) sep);
|
||||||
set_header (7,"Operazione@19gDocumento@117gContro@131gA");
|
set_header (7,"Operazione@19gDocumento@117gContro@131gA");
|
||||||
|
if (_stampa_mov_prov)
|
||||||
|
set_header(7,"@129gM");
|
||||||
set_header (8,"Data");
|
set_header (8,"Data");
|
||||||
if (_stampanum < 3)
|
if (_stampanum < 3)
|
||||||
set_header (8,"@11gnumero");
|
set_header (8,"@11gnumero");
|
||||||
set_header (8,"@19gData@30gNumero@38gCod.Causale@61gDescrizione@96gDare@111gAvere@117gPartita@131gC");
|
set_header (8,"@19gData@30gNumero@38gCod.Causale@61gDescrizione@96gDare@111gAvere@117gPartita@131gC");
|
||||||
|
if (_stampa_mov_prov)
|
||||||
|
set_header(8,"@129gP");
|
||||||
sep.fill('-');
|
sep.fill('-');
|
||||||
set_header (9, (const char *) sep);
|
set_header (9, (const char *) sep);
|
||||||
}
|
}
|
||||||
else if (_numcarat == 2)
|
else if (_numcarat == 2)
|
||||||
{
|
{
|
||||||
sep1.fill('-'); //Stampa 198 - (sep1(198))
|
sep1.fill('-'); //Stampa 198 - (sep1(198))
|
||||||
set_header (6,"@1g%s", (const char *) sep1);
|
set_header (6,"@0g%s", (const char *) sep1);
|
||||||
set_header (7,"Operazione@23gData@34gNumero@172gContro@182gReg@190gNumero@197gA");
|
set_header (7,"Operazione@23gData@34gNumero@169gContro@180gReg@188gNumero@197gA");
|
||||||
|
if (_stampa_mov_prov)
|
||||||
|
set_header(7,"@195gM");
|
||||||
set_header (8,"Data");
|
set_header (8,"Data");
|
||||||
if (_stampanum < 3)
|
if (_stampanum < 3)
|
||||||
set_header (8,"@11gnumero");
|
set_header (8,"@11gnumero");
|
||||||
set_header (8,"@23gDocumento@42gCod.Causale@70gDescrizione@113gDare@129gAvere@136gSaldo progress.@156gSaldo movim.@172gPartita@182gIva@186gProtocollo@197gC");
|
set_header (8,"@23gDocumento@42gCod.Causale@70gDescrizione@112gDare@127gAvere@133gSaldo progress.@152gSaldo movim.@169gPartita@180gIva@184gProtocollo@197gC");
|
||||||
|
if (_stampa_mov_prov)
|
||||||
|
set_header(8,"@195gP");
|
||||||
sep1.fill('-');
|
sep1.fill('-');
|
||||||
set_header (9,"@1g%s", (const char *) sep1);
|
set_header (9,"@0g%s", (const char *) sep1);
|
||||||
}
|
}
|
||||||
|
|
||||||
calcola_progressivi();
|
calcola_progressivi();
|
||||||
@ -2477,11 +2516,11 @@ void TMastrini_application::crea_intestazione()
|
|||||||
if (_numcarat == 2)
|
if (_numcarat == 2)
|
||||||
{
|
{
|
||||||
TString string = _progredare.string("###.###.###.###");
|
TString string = _progredare.string("###.###.###.###");
|
||||||
set_header (10,"@70gPROGRESSIVI PRECEDENTI@102g%15s",(const char*)string);
|
set_header (10,"@70gPROGRESSIVI PRECEDENTI@101g%15s",(const char*)string);
|
||||||
string = _progreavere.string("###.###.###.###");
|
string = _progreavere.string("###.###.###.###");
|
||||||
set_header (10,"@119g%15s",(const char*) string);
|
set_header (10,"@117g%15s",(const char*) string);
|
||||||
string = _saldo_progre_prec.string("###.###.###.###");
|
string = _saldo_progre_prec.string("###.###.###.###");
|
||||||
set_header (10,"@136g%15s",(const char*) string);
|
set_header (10,"@133g%15s",(const char*) string);
|
||||||
}
|
}
|
||||||
_riporto_dare = _progredare;
|
_riporto_dare = _progredare;
|
||||||
_riporto_avere = _progreavere;
|
_riporto_avere = _progreavere;
|
||||||
@ -2501,9 +2540,9 @@ void TMastrini_application::crea_intestazione()
|
|||||||
if (_numcarat == 2)
|
if (_numcarat == 2)
|
||||||
{
|
{
|
||||||
TString string = _riporto_dare.string("###.###.###.###");
|
TString string = _riporto_dare.string("###.###.###.###");
|
||||||
set_header (10,"@32gA RIPORTO@102g%15s",(const char*) string);
|
set_header (10,"@32gA RIPORTO@101g%15s",(const char*) string);
|
||||||
string = _riporto_avere.string("###.###.###.###");
|
string = _riporto_avere.string("###.###.###.###");
|
||||||
set_header (10,"@119g%15s",(const char*) string);
|
set_header (10,"@117g%15s",(const char*) string);
|
||||||
}
|
}
|
||||||
_riporto_parziale_dare = ZERO;
|
_riporto_parziale_dare = ZERO;
|
||||||
_riporto_parziale_avere = ZERO;
|
_riporto_parziale_avere = ZERO;
|
||||||
@ -2577,25 +2616,33 @@ int TMastrini_application::crea_intestazione(int start_riga)
|
|||||||
sep.fill('-'); //Stampa 132 - (sep(132))
|
sep.fill('-'); //Stampa 132 - (sep(132))
|
||||||
set_row (r++,"@1g%s", (const char *) sep);
|
set_row (r++,"@1g%s", (const char *) sep);
|
||||||
set_row (r++,"Operazione@19gDocumento@117gContro@131gA");
|
set_row (r++,"Operazione@19gDocumento@117gContro@131gA");
|
||||||
|
if (_stampa_mov_prov)
|
||||||
|
set_header(r-1,"@129gM");
|
||||||
set_row (r,"Data");
|
set_row (r,"Data");
|
||||||
if (_stampanum < 3)
|
if (_stampanum < 3)
|
||||||
set_row (r,"@11gnumero");
|
set_row (r,"@11gnumero");
|
||||||
set_row (r++,"@19gData@30gNumero@38gCod.Causale@61gDescrizione@96gDare@111gAvere@117gPartita@131gC");
|
set_row (r++,"@19gData@30gNumero@38gCod.Causale@61gDescrizione@96gDare@111gAvere@117gPartita@131gC");
|
||||||
|
if (_stampa_mov_prov)
|
||||||
|
set_header(r-1,"@129gP");
|
||||||
sep.fill('-');
|
sep.fill('-');
|
||||||
set_row (r++,"@1g%s", (const char *) sep);
|
set_row (r++,"@1g%s", (const char *) sep);
|
||||||
}
|
}
|
||||||
else if (_numcarat == 2)
|
else if (_numcarat == 2)
|
||||||
{
|
{
|
||||||
sep1.fill('-'); //Stampa 198 - (sep1(198))
|
sep1.fill('-'); //Stampa 198 - (sep1(198))
|
||||||
set_row (r++,"@1g%s", (const char *) sep1);
|
set_row (r++,"@0g%s", (const char *) sep1);
|
||||||
set_row (r++,"Operazione@23gData@34gNumero@172gContro@182gReg@190gNumero@197gA");
|
set_row (r++,"Operazione@23gData@34gNumero@169gContro@180gReg@188gNumero@197gA");
|
||||||
|
if (_stampa_mov_prov)
|
||||||
|
set_row(r-1,"@195gM");
|
||||||
set_row (r,"Data");
|
set_row (r,"Data");
|
||||||
if (_stampanum < 3)
|
if (_stampanum < 3)
|
||||||
set_row (r,"@11gnumero");
|
set_row (r,"@11gnumero");
|
||||||
set_row (r,"@23gDocumento@42gCod.Causale@70gDescrizione@113gDare@129gAvere");
|
set_row (r,"@23gDocumento@42gCod.Causale@70gDescrizione@112gDare@127gAvere");
|
||||||
set_row (r++,"@136gSaldo progress.@156gSaldo movim.@172gPartita@182gIva@186gProtocollo@197gC");
|
set_row (r++,"@133gSaldo progress.@152gSaldo movim.@169gPartita@180gIva@184gProtocollo@197gC");
|
||||||
|
if (_stampa_mov_prov)
|
||||||
|
set_row (r-1,"@195gP");
|
||||||
sep1.fill('-');
|
sep1.fill('-');
|
||||||
set_row (r++,"@1g%s", (const char *) sep1);
|
set_row (r++,"@0g%s", (const char *) sep1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
@ -2629,9 +2676,9 @@ void TMastrini_application::stampa_progre_riporto()
|
|||||||
if (_numcarat == 2)
|
if (_numcarat == 2)
|
||||||
{
|
{
|
||||||
TString string = _riporto_dare.string("###.###.###.###");
|
TString string = _riporto_dare.string("###.###.###.###");
|
||||||
set_row (_rw,"@32gA RIPORTO@102g%15s",(const char*) string);
|
set_row (_rw,"@32gA RIPORTO@101g%15s",(const char*) string);
|
||||||
string = _riporto_avere.string("###.###.###.###");
|
string = _riporto_avere.string("###.###.###.###");
|
||||||
set_row (_rw++,"@119g%15s",(const char*) string);
|
set_row (_rw++,"@117g%15s",(const char*) string);
|
||||||
}
|
}
|
||||||
_riporto_parziale_dare = ZERO;
|
_riporto_parziale_dare = ZERO;
|
||||||
_riporto_parziale_avere = ZERO;
|
_riporto_parziale_avere = ZERO;
|
||||||
@ -2674,9 +2721,9 @@ int TMastrini_application::stampa_progre_riporto(int start_riga)
|
|||||||
if (_numcarat == 2)
|
if (_numcarat == 2)
|
||||||
{
|
{
|
||||||
TString string = _riporto_dare.string("###.###.###.###");
|
TString string = _riporto_dare.string("###.###.###.###");
|
||||||
set_row (r,"@32gA RIPORTO@102g%15s",(const char*) string);
|
set_row (r,"@32gA RIPORTO@101g%15s",(const char*) string);
|
||||||
string = _riporto_avere.string("###.###.###.###");
|
string = _riporto_avere.string("###.###.###.###");
|
||||||
set_row (r++,"@119g%15s",(const char*) string);
|
set_row (r++,"@117g%15s",(const char*) string);
|
||||||
}
|
}
|
||||||
_riporto_parziale_dare = ZERO;
|
_riporto_parziale_dare = ZERO;
|
||||||
_riporto_parziale_avere = ZERO;
|
_riporto_parziale_avere = ZERO;
|
||||||
@ -2913,11 +2960,11 @@ void TMastrini_application::stampa_progressivi()
|
|||||||
if (_numcarat == 2)
|
if (_numcarat == 2)
|
||||||
{
|
{
|
||||||
TString string = _progredare.string("###.###.###.###");
|
TString string = _progredare.string("###.###.###.###");
|
||||||
set_row (_rw,"@70gPROGRESSIVI PRECEDENTI@102g%15s",(const char*)string);
|
set_row (_rw,"@70gPROGRESSIVI PRECEDENTI@101g%15s",(const char*)string);
|
||||||
string = _progreavere.string("###.###.###.###");
|
string = _progreavere.string("###.###.###.###");
|
||||||
set_row (_rw,"@119g%15s",(const char*) string);
|
set_row (_rw,"@117g%15s",(const char*) string);
|
||||||
string = _saldo_progre_prec.string("###.###.###.###");
|
string = _saldo_progre_prec.string("###.###.###.###");
|
||||||
set_row (_rw++,"@136g%15s",(const char*) string);
|
set_row (_rw++,"@133g%15s",(const char*) string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2938,11 +2985,11 @@ int TMastrini_application::stampa_progressivi(int start_riga)
|
|||||||
if (_numcarat == 2)
|
if (_numcarat == 2)
|
||||||
{
|
{
|
||||||
TString string = _progredare.string("###.###.###.###");
|
TString string = _progredare.string("###.###.###.###");
|
||||||
set_row (r,"@70gPROGRESSIVI PRECEDENTI@102g%15s",(const char*)string);
|
set_row (r,"@70gPROGRESSIVI PRECEDENTI@101g%15s",(const char*)string);
|
||||||
string = _progreavere.string("###.###.###.###");
|
string = _progreavere.string("###.###.###.###");
|
||||||
set_row (r,"@119g%15s",(const char*) string);
|
set_row (r,"@117g%15s",(const char*) string);
|
||||||
string = _saldo_progre_prec.string("###.###.###.###");
|
string = _saldo_progre_prec.string("###.###.###.###");
|
||||||
set_row (r++,"@136g%15s",(const char*) string);
|
set_row (r++,"@133g%15s",(const char*) string);
|
||||||
}
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
@ -3061,6 +3108,7 @@ void TMastrini_application::ricerca_clifo()
|
|||||||
if (_numcarat == 2)
|
if (_numcarat == 2)
|
||||||
{
|
{
|
||||||
set_header (5,"@134g%-4s",(const char*) ptel);
|
set_header (5,"@134g%-4s",(const char*) ptel);
|
||||||
|
if (tel != "")
|
||||||
set_header (5,"@138g/@139g%-10s",(const char*) tel);
|
set_header (5,"@138g/@139g%-10s",(const char*) tel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3177,6 +3225,7 @@ int TMastrini_application::ricerca_clifo(int start)
|
|||||||
if (_numcarat == 2)
|
if (_numcarat == 2)
|
||||||
{
|
{
|
||||||
set_row (r,"@134g%-4s",(const char*) ptel);
|
set_row (r,"@134g%-4s",(const char*) ptel);
|
||||||
|
if (tel != "")
|
||||||
set_row (r++,"@138g/@139g%-10s",(const char*) tel);
|
set_row (r++,"@138g/@139g%-10s",(const char*) tel);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
@ -3202,7 +3251,6 @@ void TMastrini_application::ricerca_classe_IV(bool scelta)
|
|||||||
_numrivd_int = pconti.get_int (PCN_NUMRIVD);
|
_numrivd_int = pconti.get_int (PCN_NUMRIVD);
|
||||||
_numrivd = itor(_numrivd_int);
|
_numrivd = itor(_numrivd_int);
|
||||||
_numivd = pconti.get_int (PCN_NUMIVD);
|
_numivd = pconti.get_int (PCN_NUMIVD);
|
||||||
_descr = pconti.get (PCN_DESCR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TMastrini_application::ricerca_gruppo()
|
void TMastrini_application::ricerca_gruppo()
|
||||||
@ -3232,7 +3280,7 @@ void TMastrini_application::ricerca_gruppo()
|
|||||||
set_header(3,"@27g%-.30s",(const char*) descrizione_gruppo());
|
set_header(3,"@27g%-.30s",(const char*) descrizione_gruppo());
|
||||||
set_header(3,"@59g%-.30s",(const char*) descrizione_conto());
|
set_header(3,"@59g%-.30s",(const char*) descrizione_conto());
|
||||||
|
|
||||||
set_header(3,"@91g%-.41s",(const char*) _descr);
|
set_header(3,"@91g%-.41s",(const char*) descrizione_sottoconto());
|
||||||
set_header(4, "@0gClasse@12g%c", _lettivd);
|
set_header(4, "@0gClasse@12g%c", _lettivd);
|
||||||
set_header(4, "@14g%-8s",(const char*) _numrivd);
|
set_header(4, "@14g%-8s",(const char*) _numrivd);
|
||||||
if (_numivd != 0)
|
if (_numivd != 0)
|
||||||
@ -3288,7 +3336,7 @@ int TMastrini_application::ricerca_gruppo(int start)
|
|||||||
set_row(r,"@27g%-.30s",(const char*) descrizione_gruppo());
|
set_row(r,"@27g%-.30s",(const char*) descrizione_gruppo());
|
||||||
set_row(r,"@59g%-.30s",(const char*) descrizione_conto());
|
set_row(r,"@59g%-.30s",(const char*) descrizione_conto());
|
||||||
|
|
||||||
set_row(r++,"@91g%-.41s",(const char*) _descr);
|
set_row(r++,"@91g%-.41s",(const char*) descrizione_sottoconto());
|
||||||
set_row(r, "@0gClasse@12g%c", _lettivd);
|
set_row(r, "@0gClasse@12g%c", _lettivd);
|
||||||
set_row(r, "@14g%-8s",(const char*) _numrivd);
|
set_row(r, "@14g%-8s",(const char*) _numrivd);
|
||||||
if (_numivd != 0)
|
if (_numivd != 0)
|
||||||
@ -3378,6 +3426,19 @@ const char* TMastrini_application::descrizione_conto()
|
|||||||
return TMP;
|
return TMP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* TMastrini_application::descrizione_sottoconto()
|
||||||
|
{
|
||||||
|
TLocalisamfile pconti(LF_PCON);
|
||||||
|
|
||||||
|
pconti.zero();
|
||||||
|
pconti.put(PCN_GRUPPO, _gruppo);
|
||||||
|
pconti.put(PCN_CONTO, _conto);
|
||||||
|
pconti.put(PCN_SOTTOCONTO, _sottoc);
|
||||||
|
if (pconti.read() != NOERR) pconti.zero();
|
||||||
|
TMP = pconti.get(PCN_DESCR);
|
||||||
|
return TMP;
|
||||||
|
}
|
||||||
|
|
||||||
bool TMastrini_application::user_create()
|
bool TMastrini_application::user_create()
|
||||||
{
|
{
|
||||||
TToken_string exp;
|
TToken_string exp;
|
||||||
|
146
cg/cg4400.cpp
146
cg/cg4400.cpp
@ -94,35 +94,6 @@ bool CG4400_application::mask_azzera (TMask_field& f, KEY k)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
bool CG4400_application::mask_firm_to (TMask_field& f, KEY k)
|
|
||||||
{
|
|
||||||
if (k == K_TAB && f.focusdirty())
|
|
||||||
{
|
|
||||||
TMask& m = f.mask();
|
|
||||||
const long from = m.get_long(DA_CODICE);
|
|
||||||
long to = m.get_long(A_CODICE);
|
|
||||||
if (from != 0 || to != 0)
|
|
||||||
{
|
|
||||||
TBit_array& sel = app()._selected;
|
|
||||||
if (to == 0) to = 99999;
|
|
||||||
for (int i = 0; i < app()._ditte->items(); i++)
|
|
||||||
{
|
|
||||||
TToken_string& d = app()._ditte->row(i);
|
|
||||||
const long cod = d.get_long(1);
|
|
||||||
if (cod >= from && cod <= to)
|
|
||||||
sel.set(i);
|
|
||||||
}
|
|
||||||
// m.reset(DA_CODICE);
|
|
||||||
// m.reset(A_CODICE);
|
|
||||||
const long numd = sel.ones();
|
|
||||||
f.mask().set(F_SELECT, numd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool CG4400_application::mask_tipo_stampa(TMask_field& f, KEY k)
|
bool CG4400_application::mask_tipo_stampa(TMask_field& f, KEY k)
|
||||||
{
|
{
|
||||||
TMask& m = f.mask();
|
TMask& m = f.mask();
|
||||||
@ -801,12 +772,18 @@ void CG4400_application::calcola_progressivi()
|
|||||||
impo = cs.get(0);
|
impo = cs.get(0);
|
||||||
impos = cs.get(1);
|
impos = cs.get(1);
|
||||||
}
|
}
|
||||||
TToken_string fatt_rit (pim.get("S1"));
|
//se in sospensione d'imposta l'imponibile e l'iva li trovo in R11 e R12
|
||||||
|
if (_sosp_imposta) //in genere non sara' mai un corrispettivo
|
||||||
|
{
|
||||||
|
impo = pim.get_real("R11");
|
||||||
|
impos = pim.get_real("R12");
|
||||||
|
}
|
||||||
|
TToken_string fatt_rit (pim.get("S1")); //e' sempre un acquisto
|
||||||
real im (fatt_rit.get(0));
|
real im (fatt_rit.get(0));
|
||||||
real is (fatt_rit.get(1));
|
real is (fatt_rit.get(1));
|
||||||
impo += im;
|
impo += im;
|
||||||
impos += is;
|
impos += is;
|
||||||
implo += im+is;
|
implo += im+is; // potrei percio' ignorare l'importo lordo
|
||||||
if (impo != ZERO || impos != ZERO || implo != ZERO)
|
if (impo != ZERO || impos != ZERO || implo != ZERO)
|
||||||
_tot_iva_array.add_riga(impo,impos,implo,ZERO,ZERO,ZERO,codiva);
|
_tot_iva_array.add_riga(impo,impos,implo,ZERO,ZERO,ZERO,codiva);
|
||||||
if (_tipo_reg == 2) //registro acquisti
|
if (_tipo_reg == 2) //registro acquisti
|
||||||
@ -849,6 +826,12 @@ void CG4400_application::calcola_progressivi()
|
|||||||
impo = cs.get(0);
|
impo = cs.get(0);
|
||||||
impos = cs.get(1);
|
impos = cs.get(1);
|
||||||
}
|
}
|
||||||
|
//se in sospensione d'imposta l'imponibile e l'iva li trovo in R11 e R12
|
||||||
|
if (_sosp_imposta)
|
||||||
|
{
|
||||||
|
impo = pim.get_real("R11");
|
||||||
|
impos = pim.get_real("R12");
|
||||||
|
}
|
||||||
TToken_string fatt_rit (pim.get("S1"));
|
TToken_string fatt_rit (pim.get("S1"));
|
||||||
real im (fatt_rit.get(0));
|
real im (fatt_rit.get(0));
|
||||||
real is (fatt_rit.get(1));
|
real is (fatt_rit.get(1));
|
||||||
@ -1401,93 +1384,6 @@ int CG4400_application::stampa_acquisti(int row)
|
|||||||
return rw;
|
return rw;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
void CG4400_application::set_page_tot_reg()
|
|
||||||
{
|
|
||||||
TString16 codivaprec = "";
|
|
||||||
int row=0, rr=0;
|
|
||||||
|
|
||||||
rr = stampa_prospetto();
|
|
||||||
|
|
||||||
//if (_nrec > 0) //numero di records di rmoviva
|
|
||||||
if (_esiste_riga_iva && _stampa)
|
|
||||||
{
|
|
||||||
real tot_imponib, tot_imposta, tot_imponibp, tot_impostap, tot_lordo;
|
|
||||||
real dep_imponib, dep_imposta, dep_lordo;
|
|
||||||
tot_imponib = tot_imposta = tot_imponibp = tot_impostap = tot_lordo = ZERO;
|
|
||||||
dep_imponib = dep_imposta = dep_lordo = ZERO;
|
|
||||||
|
|
||||||
_tot_iva_array.sort(compare_rows); //viene ordinato per codice iva
|
|
||||||
|
|
||||||
for (int k = 0; k < _tot_iva_array.items(); k++)
|
|
||||||
{
|
|
||||||
TRiga& riga = (TRiga&)_tot_iva_array[k];
|
|
||||||
//row = rr+k;
|
|
||||||
if (codivaprec == "")
|
|
||||||
codivaprec = riga._codiva;
|
|
||||||
if (codivaprec != riga._codiva)
|
|
||||||
{
|
|
||||||
set_row(rr, "%3s", (const char*)codivaprec);
|
|
||||||
TString descr = descr_iva(codivaprec);
|
|
||||||
set_row(rr, "@5g%s",(const char*)descr);
|
|
||||||
if (dep_imponib != ZERO)
|
|
||||||
set_row(rr, "@25g%r", &dep_imponib);
|
|
||||||
if (dep_imposta != ZERO)
|
|
||||||
set_row(rr, "@41g%r", &dep_imposta);
|
|
||||||
if (dep_lordo != ZERO)
|
|
||||||
set_row(rr, "@61g%r", &dep_lordo);
|
|
||||||
}
|
|
||||||
rr++;
|
|
||||||
codivaprec = riga._codiva;
|
|
||||||
dep_imponib = dep_imposta = dep_lordo = ZERO;
|
|
||||||
}
|
|
||||||
if (riga._tipodoc == "FS")
|
|
||||||
{
|
|
||||||
real somma = -(riga._imponibile + riga._imposta);
|
|
||||||
dep_lordo += somma;
|
|
||||||
}
|
|
||||||
else if (riga._tipodoc == "CR" || riga._tipodoc == "RF" || riga._tipodoc == "SC")
|
|
||||||
{
|
|
||||||
dep_lordo += riga._imponibile + riga._imposta;
|
|
||||||
tot_lordo += riga._imponibile + riga._imposta;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (riga._tipodoc != "CR" && riga._tipodoc != "SC" && riga._tipodoc == "RF")
|
|
||||||
{
|
|
||||||
dep_imponib += riga._imponibile;
|
|
||||||
dep_imposta += riga._imposta;
|
|
||||||
tot_imponib += riga._imponibile;
|
|
||||||
tot_imposta += riga._imposta;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (k == (_tot_iva_array.items()-1))
|
|
||||||
{
|
|
||||||
set_row(rr, "%3s", (const char*)riga._codiva);
|
|
||||||
TString descr = descr_iva(riga._codiva);
|
|
||||||
set_row(rr, "@5g%s", (const char*)descr);
|
|
||||||
if (dep_imponib != ZERO)
|
|
||||||
set_row(rr, "@25g%r", &dep_imponib);
|
|
||||||
if (dep_imposta != ZERO)
|
|
||||||
set_row(rr, "@41g%r", &dep_imposta);
|
|
||||||
if (dep_lordo != ZERO)
|
|
||||||
set_row(rr, "@61g%r", &dep_lordo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_tot_iva_array.destroy();
|
|
||||||
rr++;
|
|
||||||
set_row(++rr, "TOTALE@25g%r@41g%r", &tot_imponib, &tot_imposta);
|
|
||||||
if (_corrispettivi)
|
|
||||||
if (tot_lordo != ZERO)
|
|
||||||
set_row(rr, "@61g%r", &tot_lordo);
|
|
||||||
|
|
||||||
if (_tipo_reg == 2) rr = stampa_acquisti(rr);
|
|
||||||
|
|
||||||
if (_tipo_reg == 2 && _tipo_stampa != 1)
|
|
||||||
stampa_plafonds(rr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
void CG4400_application::set_page_tot_reg()
|
void CG4400_application::set_page_tot_reg()
|
||||||
{
|
{
|
||||||
int rr=0;
|
int rr=0;
|
||||||
@ -1830,6 +1726,7 @@ bool CG4400_application::compila_reg(const TMask& m)
|
|||||||
_pagine_stampate = _tabreg->get_long("I1");
|
_pagine_stampate = _tabreg->get_long("I1");
|
||||||
_numini = _pagine_stampate;
|
_numini = _pagine_stampate;
|
||||||
_corrispettivi = _tabreg->get_bool("B0");
|
_corrispettivi = _tabreg->get_bool("B0");
|
||||||
|
_sosp_imposta = _tabreg->get_bool("B1");
|
||||||
_liquidazione = _tabreg->get_bool("B7");
|
_liquidazione = _tabreg->get_bool("B7");
|
||||||
_riep_liq = _tabreg->get_bool("B6");
|
_riep_liq = _tabreg->get_bool("B6");
|
||||||
_stampa_cred_pre = _tabreg->get_bool("B4");
|
_stampa_cred_pre = _tabreg->get_bool("B4");
|
||||||
@ -2694,6 +2591,7 @@ void CG4400_application::look_reg()
|
|||||||
_liquidazione = _tabreg->get_bool("B7");
|
_liquidazione = _tabreg->get_bool("B7");
|
||||||
_riep_liq = _tabreg->get_bool("B6");
|
_riep_liq = _tabreg->get_bool("B6");
|
||||||
_corrispettivi = _tabreg->get_bool("B0");
|
_corrispettivi = _tabreg->get_bool("B0");
|
||||||
|
_sosp_imposta = _tabreg->get_bool("B1");
|
||||||
_pagine_stampate = _tabreg->get_long("I1");
|
_pagine_stampate = _tabreg->get_long("I1");
|
||||||
_numini = _pagine_stampate;
|
_numini = _pagine_stampate;
|
||||||
_cod_un_loc = _tabreg->get_int("I7");
|
_cod_un_loc = _tabreg->get_int("I7");
|
||||||
@ -3228,11 +3126,23 @@ void CG4400_application::preprocess_header()
|
|||||||
|
|
||||||
r++;
|
r++;
|
||||||
|
|
||||||
|
/*
|
||||||
if (!_intesta_vidi)
|
if (!_intesta_vidi)
|
||||||
set_header(r, "Registro IVA: %s %s %s Attivita\' %s %s",
|
set_header(r, "Registro IVA: %s %s %s Attivita\' %s %s",
|
||||||
(const char *) _codreg, (const char *) _desc_lib,
|
(const char *) _codreg, (const char *) _desc_lib,
|
||||||
(const char *) data, (const char *) _codatt,
|
(const char *) data, (const char *) _codatt,
|
||||||
(const char *) _attivita);
|
(const char *) _attivita);
|
||||||
|
*/
|
||||||
|
if (!_intesta_vidi)
|
||||||
|
{
|
||||||
|
if (_intesta_liq)
|
||||||
|
set_header(r, "Registro IVA: %s %s %s", (const char*)_codreg,
|
||||||
|
(const char*)_desc_lib, (const char*) data);
|
||||||
|
else set_header(r, "Registro IVA: %s %s %s Attivita\' %s %s",
|
||||||
|
(const char*) _codreg, (const char*) _desc_lib,
|
||||||
|
(const char*) data, (const char*) _codatt,
|
||||||
|
(const char*) _attivita);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
set_header(r++, "Registro IVA: %s %s", (const char *) _codreg, (const char *) _desc_lib);
|
set_header(r++, "Registro IVA: %s %s", (const char *) _codreg, (const char *) _desc_lib);
|
||||||
|
@ -54,6 +54,7 @@ class CG4400_application : public TPrintapp
|
|||||||
bool _mov_empty, _stampa_ind_ditta, _stampa_tutti_i_registri, _auto_intraf, _stampa;
|
bool _mov_empty, _stampa_ind_ditta, _stampa_tutti_i_registri, _auto_intraf, _stampa;
|
||||||
bool _corrispettivi, _liquidazione, _riep_liq, _stampa_ind_comp, _esiste_riga_iva, _stampa_cred_pre;
|
bool _corrispettivi, _liquidazione, _riep_liq, _stampa_ind_comp, _esiste_riga_iva, _stampa_cred_pre;
|
||||||
bool _rif_vid, _intesta_vidi, _intesta_liq, _stampa_data_reg, _ok_vidi;
|
bool _rif_vid, _intesta_vidi, _intesta_liq, _stampa_data_reg, _ok_vidi;
|
||||||
|
bool _sosp_imposta;
|
||||||
char _frequiva, _tipo_riepilogativo;
|
char _frequiva, _tipo_riepilogativo;
|
||||||
TDate _data_da, _data_a, _data_stampa, _dataregp, _dataregs, _datareg;
|
TDate _data_da, _data_a, _data_stampa, _dataregp, _dataregs, _datareg;
|
||||||
TDate _u_data;
|
TDate _u_data;
|
||||||
@ -66,7 +67,7 @@ class CG4400_application : public TPrintapp
|
|||||||
TString _codreg, _desc_lib, _codatt, _attivita, _tipoatt;
|
TString _codreg, _desc_lib, _codatt, _attivita, _tipoatt;
|
||||||
TString _tipodoc, _descr_doc, _codlib, _codice_vidi;
|
TString _tipodoc, _descr_doc, _codlib, _codice_vidi;
|
||||||
TString _cofi,_cap,_paiva,_ragsoc,_comunefis,_provfis,_viafis;
|
TString _cofi,_cap,_paiva,_ragsoc,_comunefis,_provfis,_viafis;
|
||||||
TFilename _t;
|
TFilename _t, _pippo;
|
||||||
|
|
||||||
TParagraph_string* _desc27;
|
TParagraph_string* _desc27;
|
||||||
messaggio _scelta;
|
messaggio _scelta;
|
||||||
|
@ -34,7 +34,7 @@ BEGIN
|
|||||||
PROMPT 16 2 "Scelta ditte"
|
PROMPT 16 2 "Scelta ditte"
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER DA_CODICE 6
|
NUMBER DA_CODICE 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 17 3 "Da codice "
|
PROMPT 17 3 "Da codice "
|
||||||
HELP "Codice ditta di inizio selezione"
|
HELP "Codice ditta di inizio selezione"
|
||||||
@ -42,11 +42,11 @@ END
|
|||||||
|
|
||||||
BUTTON BUT_DFR 2 1
|
BUTTON BUT_DFR 2 1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 34 3 "*"
|
PROMPT 33 3 "*"
|
||||||
PICTURE 109
|
PICTURE 109
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER A_CODICE 6
|
NUMBER A_CODICE 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 17 4 "A codice "
|
PROMPT 17 4 "A codice "
|
||||||
HELP "Codice ditta di fine selezione"
|
HELP "Codice ditta di fine selezione"
|
||||||
@ -54,14 +54,14 @@ END
|
|||||||
|
|
||||||
BUTTON BUT_DTO 2 1
|
BUTTON BUT_DTO 2 1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 34 4 "*"
|
PROMPT 33 4 "*"
|
||||||
PICTURE 109
|
PICTURE 109
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_SELECT 5
|
STRING F_SELECT 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 17 5 "Scelte n. "
|
PROMPT 17 5 "Scelte n. "
|
||||||
FLAGS "D"
|
FLAGS "DR"
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_SELECT 10 2
|
BUTTON DLG_SELECT 10 2
|
||||||
|
@ -17,6 +17,7 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t)
|
|||||||
|
|
||||||
const bool vola = pimr.get_bool("B2");
|
const bool vola = pimr.get_bool("B2");
|
||||||
const bool rimb = pimr.get_bool("B3");
|
const bool rimb = pimr.get_bool("B3");
|
||||||
|
const bool ricl = pimr.get_bool("B4");
|
||||||
|
|
||||||
TString tipoiva = pimr.get("S5");
|
TString tipoiva = pimr.get("S5");
|
||||||
|
|
||||||
@ -31,17 +32,19 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t)
|
|||||||
switch(tocheck)
|
switch(tocheck)
|
||||||
{
|
{
|
||||||
case acq_norm:
|
case acq_norm:
|
||||||
found = tipomov == 2 && tipoiva != "NS";
|
//found = tipomov == 2 && tipoiva != "NS";
|
||||||
|
found = tipomov == 2;
|
||||||
found &= (tipodet == 0 /* || tipodet == 1 || tipodet == 3 ||
|
found &= (tipodet == 0 /* || tipodet == 1 || tipodet == 3 ||
|
||||||
tipodet == 5 || tipodet == 9 */);
|
tipodet == 5 || tipodet == 9 */);
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
imp = pimr.get_real("R0");
|
imp = pimr.get_real("R0") - pimr.get_real("R9");
|
||||||
iva = pimr.get_real("R1");
|
iva = pimr.get_real("R1") - pimr.get_real("R10");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case vend_norm:
|
case vend_norm:
|
||||||
found = tipomov == 1 /* && corrisp == 1 */ && tipoiva != "NS";
|
//found = tipomov == 1 /* && corrisp == 1 */ && tipoiva != "NS";
|
||||||
|
found = tipomov == 1 /* && corrisp == 1 */;
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
imp = pimr.get_real("R0");
|
imp = pimr.get_real("R0");
|
||||||
@ -65,7 +68,8 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t)
|
|||||||
found = !imp.is_zero() || !iva.is_zero();
|
found = !imp.is_zero() || !iva.is_zero();
|
||||||
break;
|
break;
|
||||||
case bolle_doganali:
|
case bolle_doganali:
|
||||||
if (tipomov == 2 && tipoiva != "NS")
|
//if (tipomov == 2 && tipoiva != "NS")
|
||||||
|
if (tipomov == 2)
|
||||||
{
|
{
|
||||||
imp = pimr.get_real("R9");
|
imp = pimr.get_real("R9");
|
||||||
iva = pimr.get_real("R10");
|
iva = pimr.get_real("R10");
|
||||||
@ -75,6 +79,7 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t)
|
|||||||
case base_ventilazione:
|
case base_ventilazione:
|
||||||
found = (tipomov == 2 && tipodet != 9 && tipocr == 1);
|
found = (tipomov == 2 && tipodet != 9 && tipocr == 1);
|
||||||
found &= (tipoiva != "NS" && tipoiva != "NI" && tipoiva != "ES");
|
found &= (tipoiva != "NS" && tipoiva != "NI" && tipoiva != "ES");
|
||||||
|
found &= (ricl ? TRUE : tipodet == 3);
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
imp = pimr.get_real("R0");
|
imp = pimr.get_real("R0");
|
||||||
@ -83,9 +88,13 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t)
|
|||||||
found &= !imp.is_zero() || !iva.is_zero();
|
found &= !imp.is_zero() || !iva.is_zero();
|
||||||
break;
|
break;
|
||||||
case acq_beni_riv:
|
case acq_beni_riv:
|
||||||
|
/*
|
||||||
found = (tipomov == 2 && tipodet != 9 &&
|
found = (tipomov == 2 && tipodet != 9 &&
|
||||||
(tipocr == 1 || (tipocr == 5 && tipodet == 3)));
|
(tipocr == 1 || (tipocr == 5 && tipodet == 3)));
|
||||||
found &= tipoiva != "NS" && tipoiva != "NI" && tipoiva != "ES";
|
found &= tipoiva != "NS" && tipoiva != "NI" && tipoiva != "ES";
|
||||||
|
found &= (ricl ? TRUE : tipodet == 3);
|
||||||
|
*/
|
||||||
|
found = (tipomov == 2 && (tipocr == 1 || tipocr == 5));
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
imp = pimr.get_real("R0");
|
imp = pimr.get_real("R0");
|
||||||
@ -111,8 +120,9 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t)
|
|||||||
found = !imp.is_zero() || !iva.is_zero();
|
found = !imp.is_zero() || !iva.is_zero();
|
||||||
break;
|
break;
|
||||||
case acq_beni_ammort:
|
case acq_beni_ammort:
|
||||||
found = tipomov == 2 && tipocr == 2 &&
|
//found = tipomov == 2 && tipocr == 2 &&
|
||||||
tipodet == 0 && tipoiva != "NS";
|
// tipodet == 0 && tipoiva != "NS";
|
||||||
|
found = tipomov == 2 && tipocr == 2 && tipodet == 0;
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
imp = pimr.get_real("R0");
|
imp = pimr.get_real("R0");
|
||||||
@ -121,8 +131,9 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case acq_beni_ammort_nd:
|
case acq_beni_ammort_nd:
|
||||||
found = tipomov == 2 && tipocr ==2 &&
|
//found = tipomov == 2 && tipocr ==2 &&
|
||||||
tipodet != 0 && tipoiva != "NS";
|
// tipodet != 0 && tipoiva != "NS";
|
||||||
|
found = tipomov == 2 && tipocr ==2 && tipodet != 0;
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
imp = pimr.get_real("R0");
|
imp = pimr.get_real("R0");
|
||||||
@ -131,7 +142,8 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case acq_beni_leasing:
|
case acq_beni_leasing:
|
||||||
found = tipomov == 2 && tipocr == 8 && tipoiva != "NS";
|
//found = tipomov == 2 && tipocr == 8 && tipoiva != "NS";
|
||||||
|
found = tipomov == 2 && tipocr == 8;
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
imp = pimr.get_real("R0");
|
imp = pimr.get_real("R0");
|
||||||
@ -140,7 +152,8 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case acq_amm_ultdetr:
|
case acq_amm_ultdetr:
|
||||||
found = tipomov == 2 && tipocr == 3 && tipoiva != "NS";
|
//found = tipomov == 2 && tipocr == 3 && tipoiva != "NS";
|
||||||
|
found = tipomov == 2 && tipocr == 3;
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
imp = pimr.get_real("R0");
|
imp = pimr.get_real("R0");
|
||||||
@ -176,7 +189,8 @@ bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case cess_amm:
|
case cess_amm:
|
||||||
found = tipomov == 1 && tipocr == 4 && tipoiva != "NS";
|
//found = tipomov == 1 && tipocr == 4 && tipoiva != "NS";
|
||||||
|
found = tipomov == 1 && tipocr == 4;
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
imp = pimr.get_real("R0");
|
imp = pimr.get_real("R0");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user