Patch level : 10.946

Files correlati     :  cg1.exe
Ricompilazione Demo : [ ]
Commento            :

Bug 	0001800: BIancio di verifica ( ba1 -5)

Nel bilancio di verifica aggiungere un opzione per stampare il bilancio completo per facilitare l'esportazione excel


git-svn-id: svn://10.65.10.50/branches/R_10_00@21724 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2011-03-01 08:57:36 +00:00
parent 44873c0fc3
commit 6dab34978e
3 changed files with 50 additions and 20 deletions

View File

@ -90,7 +90,7 @@ class TStampa_bilanci : public TPrintapp
int _annoes, _bilancio, _tipo_stampa, _tipo_stampa1,_stampa_width,_gp,_cp,_i; int _annoes, _bilancio, _tipo_stampa, _tipo_stampa1,_stampa_width,_gp,_cp,_i;
int _eof1, _eof2, _gruppo_dare, _gruppo_avere, _conto_dare, _conto_avere; int _eof1, _eof2, _gruppo_dare, _gruppo_avere, _conto_dare, _conto_avere;
int _add_file_da, _add_file_a, _indbil_dare, _indbil_avere, _indbil; int _add_file_da, _add_file_a, _indbil_dare, _indbil_avere, _indbil;
int _eof3, _eof4, _eof5, _eof6, _verifica, _stampac, _stampav, _ordinamento; int _eof3, _eof4, _eof5, _eof6, _verifica, _stampac, _stampav, _ordinamento, _print_full_code;
int _gruppo, _conto, _gruppo_succ, _conto_succ, _annoapp; int _gruppo, _conto, _gruppo_succ, _conto_succ, _annoapp;
long _sottoconto_dare, _sottoconto_avere, _sottoconto, _sottoconto_succ; long _sottoconto_dare, _sottoconto_avere, _sottoconto, _sottoconto_succ;
@ -2943,9 +2943,10 @@ void TStampa_bilanci::set_page(int file, int counter)
_mov_dare,_mov_avere,_saldofinale,app); _mov_dare,_mov_avere,_saldofinale,app);
} }
else else
{
if (_stampa_width == 132) if (_stampa_width == 132)
{ {
set_row(r,"@1g%6ld",(const char*)_sottoconto); set_row(r,"@1g%6ld", _sottoconto);
if ((_saldo_dare != ZERO) || (_saldo_avere != ZERO) || (_mov_dare != ZERO) || if ((_saldo_dare != ZERO) || (_saldo_avere != ZERO) || (_mov_dare != ZERO) ||
(_mov_avere != ZERO) || (_saldofinale != ZERO)) (_mov_avere != ZERO) || (_saldofinale != ZERO))
set_row(r," %s",(const char*)udata); set_row(r," %s",(const char*)udata);
@ -2958,7 +2959,7 @@ void TStampa_bilanci::set_page(int file, int counter)
} }
else if (app == 'D') else if (app == 'D')
{ {
set_row(r,"@1g%6ld",(const char*)_sottoconto); set_row(r,"@1g%6ld", _sottoconto);
if ((_saldo_dare != ZERO) || (_saldo_avere != ZERO) || (_mov_dare != ZERO) || if ((_saldo_dare != ZERO) || (_saldo_avere != ZERO) || (_mov_dare != ZERO) ||
(_mov_avere != ZERO) || (_saldofinale != ZERO)) (_mov_avere != ZERO) || (_saldofinale != ZERO))
set_row(r," %s",(const char*)udata); set_row(r," %s",(const char*)udata);
@ -2969,7 +2970,7 @@ void TStampa_bilanci::set_page(int file, int counter)
} }
else else
{ {
set_row(r,"@1g%6ld",(const char*)_sottoconto); set_row(r,"@1g%6ld", _sottoconto);
if ((_saldo_dare != ZERO) || (_saldo_avere != ZERO) || (_mov_dare != ZERO) || if ((_saldo_dare != ZERO) || (_saldo_avere != ZERO) || (_mov_dare != ZERO) ||
(_mov_avere != ZERO) || (_saldofinale != ZERO)) (_mov_avere != ZERO) || (_saldofinale != ZERO))
set_row(r," %s",(const char*)udata); set_row(r," %s",(const char*)udata);
@ -2980,6 +2981,7 @@ void TStampa_bilanci::set_page(int file, int counter)
} }
} }
} }
}
else //_verifica != 3 else //_verifica != 3
{ {
if (!_eof1) if (!_eof1)
@ -3028,14 +3030,24 @@ void TStampa_bilanci::set_page(int file, int counter)
else else
{ {
*_d = (const char*) _descr_succ; *_d = (const char*) _descr_succ;
if (_print_full_code)
if (_stampa_width == 132) set_row(r,"@1g%3d %3d %6ld", _gruppo_succ, _conto_succ, _sottoconto_succ);
else
{ {
set_row(r,"@1g%6ld",(const char*)_sottoconto_succ); set_row(r,"@1g%6ld", _sottoconto_succ);
if ((_saldoini_dare_succ != ZERO) || (_saldoini_avere_succ != ZERO) || if ((_saldoini_dare_succ != ZERO) || (_saldoini_avere_succ != ZERO) ||
(_mov_dare_succ != ZERO) || (_mov_avere_succ != ZERO) || (_mov_dare_succ != ZERO) || (_mov_avere_succ != ZERO) ||
(_saldofinale_succ != ZERO)) (_saldofinale_succ != ZERO))
set_row(r," %s",(const char*)udata); set_row(r," %s",(const char*)udata);
}
if (_stampa_width == 132)
{
// set_row(r,"@1g%6ld",(const char*)_sottoconto_succ);
// if ((_saldoini_dare_succ != ZERO) || (_saldoini_avere_succ != ZERO) ||
// (_mov_dare_succ != ZERO) || (_mov_avere_succ != ZERO) ||
// (_saldofinale_succ != ZERO))
// set_row(r," %s",(const char*)udata);
set_row(r,"@17g#a@46g!%r@64g%r@80g!%r@98g%r@114g!@115g%r", set_row(r,"@17g#a@46g!%r@64g%r@80g!%r@98g%r@114g!@115g%r",
_d,&_saldoini_dare_succ,&_saldoini_avere_succ, _d,&_saldoini_dare_succ,&_saldoini_avere_succ,
&_mov_dare_succ,&_mov_avere_succ,&_saldofinale_succ); &_mov_dare_succ,&_mov_avere_succ,&_saldofinale_succ);
@ -3046,11 +3058,11 @@ void TStampa_bilanci::set_page(int file, int counter)
} }
else // Stampa estesa else // Stampa estesa
{ {
set_row(r,"@1g%6ld",(const char*)_sottoconto_succ); // set_row(r,"@1g%6ld",(const char*)_sottoconto_succ);
if ((_saldoini_dare_succ != ZERO) || (_saldoini_avere_succ != ZERO) || // if ((_saldoini_dare_succ != ZERO) || (_saldoini_avere_succ != ZERO) ||
(_mov_dare_succ != ZERO) || (_mov_avere_succ != ZERO) || // (_mov_dare_succ != ZERO) || (_mov_avere_succ != ZERO) ||
(_saldofinale_succ != ZERO)) // (_saldofinale_succ != ZERO))
set_row(r," %s",(const char*)udata); // set_row(r," %s",(const char*)udata);
if (app == 'D') if (app == 'D')
{ {
set_row(r,"@17g#a@46g!%r@64g%r@80g!%r@98g%r@114g!%r@148g!", set_row(r,"@17g#a@46g!%r@64g%r@80g!%r@98g%r@114g!%r@148g!",
@ -3717,6 +3729,7 @@ void TStampa_bilanci::stampa_un_bilancio(const TMask& m)
_stampa_width = (m.get_int(F_MODULO) == 1) ? 132 : 148; //perche' questo e' in realta' il margine dx (vedi es. di stampa AS/400) _stampa_width = (m.get_int(F_MODULO) == 1) ? 132 : 148; //perche' questo e' in realta' il margine dx (vedi es. di stampa AS/400)
_verifica = m.get_int(F_VERIFICA); //tipo di bilancio di verifica da stampare _verifica = m.get_int(F_VERIFICA); //tipo di bilancio di verifica da stampare
_print_full_code = _verifica == 1 && m.get_bool(F_PRINT_FULL_CODE);
if ( (_verifica == 1)||(_verifica == 2) ) if ( (_verifica == 1)||(_verifica == 2) )
_prog = new TProgind(_pcn->items(),TR("Elaborazione in corso..."),FALSE); _prog = new TProgind(_pcn->items(),TR("Elaborazione in corso..."),FALSE);
_tipo_stampa1 = m.get_int(F_STAMPA1); _tipo_stampa1 = m.get_int(F_STAMPA1);
@ -3993,7 +4006,12 @@ void TStampa_bilanci::preprocess_header()
set_header(++r, (const char*)riga); set_header(++r, (const char*)riga);
r++; r++;
TString h("@7g!@46g!@55g"); TString h;
if (_print_full_code)
h << "@46g!@55g";
else
h << "@7g!@46g!@55g";
if ( ((_datada == _dataini)&&(_tipo_stampa1 == 1))||(_tipo_stampa1 != 1) ) if ( ((_datada == _dataini)&&(_tipo_stampa1 == 1))||(_tipo_stampa1 != 1) )
{ {
@ -4021,8 +4039,11 @@ void TStampa_bilanci::preprocess_header()
} }
r++; r++;
if ( (_verifica == 1)||(_verifica == 3) ) if ( (_verifica == 1)||(_verifica == 3))
{ {
if (_print_full_code)
set_header(r,FR("@2gcodice conto !@46g!@47g%.67s@80g!@83g@114g!"),(const char*)riga);
else
set_header(r,FR("@2gcod. ! ultima !@46g!@47g%.67s@80g!@83g@114g!"),(const char*)riga); set_header(r,FR("@2gcod. ! ultima !@46g!@47g%.67s@80g!@83g@114g!"),(const char*)riga);
if (_stampa_width == 132) if (_stampa_width == 132)
set_header(r,FR("@121gSALDO")); set_header(r,FR("@121gSALDO"));
@ -4030,6 +4051,9 @@ void TStampa_bilanci::preprocess_header()
set_header(r,"%.33s@148g!",(const char*)riga); set_header(r,"%.33s@148g!",(const char*)riga);
r++; r++;
if (_print_full_code)
set_header(r,FR("@2g ! denominazione@46g!@53gDare@63g!@69gAvere@80g!@87gDare@97g!@103gAvere@114g!"));
else
set_header(r,FR("@2gconto! data ! denominazione@46g!@53gDare@63g!@69gAvere@80g!@87gDare@97g!@103gAvere@114g!")); set_header(r,FR("@2gconto! data ! denominazione@46g!@53gDare@63g!@69gAvere@80g!@87gDare@97g!@103gAvere@114g!"));
if (_stampa_width != 132) if (_stampa_width != 132)
set_header(r,FR("@121gDare@131g!@137gAvere@148g!")); set_header(r,FR("@121gDare@131g!@137gAvere@148g!"));

View File

@ -33,6 +33,7 @@
#define F_A_CONTO 137 #define F_A_CONTO 137
#define F_A_SOTTOCONTO 138 #define F_A_SOTTOCONTO 138
#define F_A_DESCRIZIONE 139 #define F_A_DESCRIZIONE 139
#define F_PRINT_FULL_CODE 140
#endif // __CG1500_H #endif // __CG1500_H

View File

@ -181,11 +181,11 @@ BEGIN
PROMPT 2 1 "@bStampa bilancio di verifica " PROMPT 2 1 "@bStampa bilancio di verifica "
HELP "Tipo di bilancio di verifica" HELP "Tipo di bilancio di verifica"
ITEM "1|Bilancio" ITEM "1|Bilancio"
MESSAGE SHOW,F_HIDE_CLIFO MESSAGE SHOW,F_HIDE_CLIFO|SHOW,F_PRINT_FULL_CODE
ITEM "2|Saldi di mastro" ITEM "2|Saldi di mastro"
MESSAGE HIDE,F_HIDE_CLIFO MESSAGE HIDE,F_HIDE_CLIFO|HIDE,F_PRINT_FULL_CODE
ITEM "3|Situazione C/F" ITEM "3|Situazione C/F"
MESSAGE HIDE,F_HIDE_CLIFO MESSAGE HIDE,F_HIDE_CLIFO|HIDE,F_PRINT_FULL_CODE
END END
RADIOBUTTON F_STAMPAC 36 RADIOBUTTON F_STAMPAC 36
@ -222,6 +222,11 @@ BEGIN
PROMPT 2 10 "Non stampare il dettaglio dei clienti/fornitori" PROMPT 2 10 "Non stampare il dettaglio dei clienti/fornitori"
END END
BOOLEAN F_PRINT_FULL_CODE
BEGIN
PROMPT 2 11 "Stampa il codice completo"
END
LIST F_SITUAZIONE 11 LIST F_SITUAZIONE 11
BEGIN BEGIN
PROMPT 2 10 "Tipo situazione " PROMPT 2 10 "Tipo situazione "