Errori corretti
git-svn-id: svn://10.65.10.50/trunk@1393 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
fe6168f550
commit
5de033068f
@ -9,9 +9,10 @@
|
|||||||
#include <printapp.h>
|
#include <printapp.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
#include <nditte.h>
|
|
||||||
#include <anagr.h>
|
#include <anagr.h>
|
||||||
#include <comuni.h>
|
#include <comuni.h>
|
||||||
|
#include <attiv.h>
|
||||||
|
#include <nditte.h>
|
||||||
#include "classpim.h"
|
#include "classpim.h"
|
||||||
#include "cg0.h"
|
#include "cg0.h"
|
||||||
#include "cg0400.h"
|
#include "cg0400.h"
|
||||||
@ -114,7 +115,7 @@ bool TIva_array::add_riga(const tiporec& tipo, const real& imponibile,
|
|||||||
class CG0400_application : public TPrintapp
|
class CG0400_application : public TPrintapp
|
||||||
{
|
{
|
||||||
TTable* _tabpim, * _tabreg, * _tabais, * _tablia;
|
TTable* _tabpim, * _tabreg, * _tabais, * _tablia;
|
||||||
TLocalisamfile* _nditte, * _anag, * _com;
|
TLocalisamfile* _nditte, * _anag, * _com, * _attiv;
|
||||||
TMask* _msk;
|
TMask* _msk;
|
||||||
TDate _data;
|
TDate _data;
|
||||||
int _sospmsk, _tipoprog, _livelloprog, _tipo_aliq, _tipo_attiv, _annoiva, _i;
|
int _sospmsk, _tipoprog, _livelloprog, _tipo_aliq, _tipo_attiv, _annoiva, _i;
|
||||||
@ -123,7 +124,7 @@ class CG0400_application : public TPrintapp
|
|||||||
TIva_array _iva_array,_iva1_array;
|
TIva_array _iva_array,_iva1_array;
|
||||||
TGen_array _gen_array,_gen1_array;
|
TGen_array _gen_array,_gen1_array;
|
||||||
TString _cap,_cofi,_paiva,_ragsoc,_comunefis,_provfis,_viafis,_codivamsk,_codattmsk;
|
TString _cap,_cofi,_paiva,_ragsoc,_comunefis,_provfis,_viafis,_codivamsk,_codattmsk;
|
||||||
TString _datast;
|
TString _datast, _cod_att;
|
||||||
Importi _mesi[13];
|
Importi _mesi[13];
|
||||||
liste _tipo_lista;
|
liste _tipo_lista;
|
||||||
|
|
||||||
@ -211,6 +212,11 @@ bool CG0400_application::user_create()
|
|||||||
_anag = new TLocalisamfile(LF_ANAG);
|
_anag = new TLocalisamfile(LF_ANAG);
|
||||||
_nditte = new TLocalisamfile(LF_NDITTE);
|
_nditte = new TLocalisamfile(LF_NDITTE);
|
||||||
_com = new TLocalisamfile(LF_COMUNI);
|
_com = new TLocalisamfile(LF_COMUNI);
|
||||||
|
_attiv = new TLocalisamfile(LF_ATTIV);
|
||||||
|
|
||||||
|
set_real_picture("###.###.###.###");
|
||||||
|
set_print_zero(FALSE);
|
||||||
|
printer().footerlen(5);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -224,6 +230,8 @@ bool CG0400_application::user_destroy()
|
|||||||
delete _anag;
|
delete _anag;
|
||||||
delete _nditte;
|
delete _nditte;
|
||||||
delete _com;
|
delete _com;
|
||||||
|
delete _attiv;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,8 +255,10 @@ void CG0400_application::look_pim()
|
|||||||
TString80 codtab = pim.get("CODTAB");
|
TString80 codtab = pim.get("CODTAB");
|
||||||
int anno = atoi(codtab.mid(0,4));
|
int anno = atoi(codtab.mid(0,4));
|
||||||
int mese = atoi(codtab.mid(13,2));
|
int mese = atoi(codtab.mid(13,2));
|
||||||
|
TString16 codatt = codtab.mid(4,5);
|
||||||
TString16 codiva = codtab.mid(16,4);
|
TString16 codiva = codtab.mid(16,4);
|
||||||
codiva = codiva.trim();
|
codiva = codiva.trim();
|
||||||
|
codatt = codatt.trim();
|
||||||
|
|
||||||
if (anno != _anno) continue;
|
if (anno != _anno) continue;
|
||||||
|
|
||||||
@ -260,6 +270,9 @@ void CG0400_application::look_pim()
|
|||||||
if (mese != _mese)
|
if (mese != _mese)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (codatt != _cod_att) continue;
|
||||||
|
|
||||||
|
|
||||||
while (classify_pim(pim.curr(), imponibile, imposta, tipo))
|
while (classify_pim(pim.curr(), imponibile, imposta, tipo))
|
||||||
{
|
{
|
||||||
switch(tipo)
|
switch(tipo)
|
||||||
@ -514,6 +527,16 @@ bool CG0400_application::set_print(int m)
|
|||||||
_mese = msk.get_int(F_MESE);
|
_mese = msk.get_int(F_MESE);
|
||||||
_st_inizio_anno = msk.get_bool(F_STAMPA);
|
_st_inizio_anno = msk.get_bool(F_STAMPA);
|
||||||
|
|
||||||
|
TLocalisamfile attiv(LF_ATTIV);
|
||||||
|
attiv.zero();
|
||||||
|
attiv.put(ATT_CODDITTA, get_firm());
|
||||||
|
TRectype r(attiv.curr());
|
||||||
|
//prospetto per ogni codice attivita' della ditta
|
||||||
|
for(attiv.read(_isgteq); !attiv.eof(); attiv.next())
|
||||||
|
{
|
||||||
|
if (attiv.curr() != r) break;
|
||||||
|
|
||||||
|
_cod_att = attiv.get("CODATT");
|
||||||
_prima_pagina = TRUE;
|
_prima_pagina = TRUE;
|
||||||
|
|
||||||
_iva_array.destroy();
|
_iva_array.destroy();
|
||||||
@ -522,15 +545,19 @@ bool CG0400_application::set_print(int m)
|
|||||||
_gen1_array.destroy();
|
_gen1_array.destroy();
|
||||||
|
|
||||||
look_pim();
|
look_pim();
|
||||||
|
|
||||||
|
print();
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_real_picture("###.###.###.###");
|
//set_real_picture("###.###.###.###");
|
||||||
set_print_zero(FALSE);
|
//set_print_zero(FALSE);
|
||||||
printer().footerlen(5);
|
//printer().footerlen(5);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -931,7 +958,7 @@ void CG0400_application::preprocess_header()
|
|||||||
int soh = 1;
|
int soh = 1;
|
||||||
TString sep(132);
|
TString sep(132);
|
||||||
TString ragsoc(50);
|
TString ragsoc(50);
|
||||||
TString attprev(5);
|
//TString attprev(5);
|
||||||
TString16 descf;
|
TString16 descf;
|
||||||
|
|
||||||
TLocalisamfile nditte(LF_NDITTE);
|
TLocalisamfile nditte(LF_NDITTE);
|
||||||
@ -940,10 +967,12 @@ void CG0400_application::preprocess_header()
|
|||||||
if (nditte.read() == NOERR)
|
if (nditte.read() == NOERR)
|
||||||
{
|
{
|
||||||
ragsoc = nditte.get(NDT_RAGSOC);
|
ragsoc = nditte.get(NDT_RAGSOC);
|
||||||
attprev = nditte.get(NDT_CODATTPREV);
|
//attprev = nditte.get(NDT_CODATTPREV);
|
||||||
}
|
}
|
||||||
|
|
||||||
TString80 descr = desc_attivita(attprev);
|
//TString80 descr = desc_attivita(attprev);
|
||||||
|
|
||||||
|
TString80 descr = desc_attivita(_cod_att);
|
||||||
|
|
||||||
reset_header();
|
reset_header();
|
||||||
|
|
||||||
@ -973,16 +1002,16 @@ void CG0400_application::preprocess_header()
|
|||||||
sep.fill('-');
|
sep.fill('-');
|
||||||
set_header (soh++, (const char *) sep);
|
set_header (soh++, (const char *) sep);
|
||||||
/*
|
/*
|
||||||
set_header (soh++, "Riepilogo progressivi IVA del periodo %s %d Cod. Att. %s %s", itom(_mese), _anno, (const char*) attprev, (const char*) descr);
|
set_header (soh++, "Riepilogo progressivi IVA del periodo %s %d Cod. Att. %s %s", itom(_mese), _anno, (const char*) _cod_att, (const char*) descr);
|
||||||
set_header (soh++, (const char *) sep);
|
set_header (soh++, (const char *) sep);
|
||||||
*/
|
*/
|
||||||
if (_st_inizio_anno)
|
if (_st_inizio_anno)
|
||||||
{
|
{
|
||||||
if (_prima_pagina)
|
if (_prima_pagina)
|
||||||
set_header(soh++, "Riepilogo progressivi IVA del periodo %s %d Cod. Att. %s %s", itom(_mese), _anno, (const char*) attprev, (const char*) descr);
|
set_header(soh++, "Riepilogo progressivi IVA del periodo %s %d Cod. Att. %s %s", itom(_mese), _anno, (const char*) _cod_att, (const char*) descr);
|
||||||
else set_header(soh++, "Riepilogo progressivi IVA al Mese di: %s %d Cod. Att. %s %s", itom(_mese), _anno, (const char*) attprev, (const char*) descr);
|
else set_header(soh++, "Riepilogo progressivi IVA al Mese di: %s %d Cod. Att. %s %s", itom(_mese), _anno, (const char*) _cod_att, (const char*) descr);
|
||||||
}
|
}
|
||||||
else set_header (soh++, "Riepilogo progressivi IVA del periodo %s %d Cod. Att. %s %s", itom(_mese), _anno, (const char*) attprev, (const char*) descr);
|
else set_header (soh++, "Riepilogo progressivi IVA del periodo %s %d Cod. Att. %s %s", itom(_mese), _anno, (const char*) _cod_att, (const char*) descr);
|
||||||
set_header (soh, (const char *) sep);
|
set_header (soh, (const char *) sep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,8 @@ int main(int argc,char** argv)
|
|||||||
cg1600(argc,argv); break;
|
cg1600(argc,argv); break;
|
||||||
case 6:
|
case 6:
|
||||||
cg1700(argc,argv); break;
|
cg1700(argc,argv); break;
|
||||||
|
//case 7:
|
||||||
|
// cg1800(argc,argv); break;
|
||||||
default:
|
default:
|
||||||
error_box(usage, argv[0]); break;
|
error_box(usage, argv[0]); break;
|
||||||
}
|
}
|
||||||
|
1
cg/cg1.h
1
cg/cg1.h
@ -12,6 +12,7 @@ int cg1400(int argc, char* argv[]);
|
|||||||
int cg1500(int argc, char* argv[]);
|
int cg1500(int argc, char* argv[]);
|
||||||
int cg1600(int argc, char* argv[]);
|
int cg1600(int argc, char* argv[]);
|
||||||
int cg1700(int argc, char* argv[]);
|
int cg1700(int argc, char* argv[]);
|
||||||
|
//int cg1800(int argc, char* argv[]);
|
||||||
|
|
||||||
#ifdef __MAIN__
|
#ifdef __MAIN__
|
||||||
#define extern
|
#define extern
|
||||||
|
@ -10,6 +10,10 @@ MENUBAR MENU_BAR(1)
|
|||||||
MENU MENU_BAR(1)
|
MENU MENU_BAR(1)
|
||||||
SUBMENU MENU_FILE "~File"
|
SUBMENU MENU_FILE "~File"
|
||||||
|
|
||||||
|
MENUBAR MENU_BAR(2)
|
||||||
|
|
||||||
|
MENU MENU_BAR(2)
|
||||||
|
SUBMENU MENU_FILE "~File"
|
||||||
|
|
||||||
MENUBAR MENU_BAR(3)
|
MENUBAR MENU_BAR(3)
|
||||||
|
|
||||||
|
159
cg/cg1300.cpp
159
cg/cg1300.cpp
@ -1,7 +1,160 @@
|
|||||||
#include <checks.h>
|
//********************************
|
||||||
|
//* Aggiornamento Tipo Attivita' *
|
||||||
|
//********************************
|
||||||
|
#include <applicat.h>
|
||||||
|
#include <mask.h>
|
||||||
|
#include <relation.h>
|
||||||
|
#include <tabutil.h>
|
||||||
|
#include <utility.h>
|
||||||
|
#include <progind.h>
|
||||||
|
#include <urldefid.h>
|
||||||
|
#include <prefix.h>
|
||||||
|
#include <mov.h>
|
||||||
|
#include <rmoviva.h>
|
||||||
|
#include "conto.h"
|
||||||
|
#include "cg2103.h"
|
||||||
|
#include "cg1301.h"
|
||||||
|
#include "cg1302.h"
|
||||||
|
#include "cg1303.h"
|
||||||
|
#include "cg1.h"
|
||||||
|
|
||||||
|
class TAgg_attiv : public TApplication
|
||||||
|
{
|
||||||
|
TLocalisamfile* _pcon,* _attiv;
|
||||||
|
TTable* _reg;
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual bool create();
|
||||||
|
virtual bool destroy();
|
||||||
|
virtual bool menu(MENU_TAG m);
|
||||||
|
|
||||||
|
void elabora_mov();
|
||||||
|
|
||||||
|
TAgg_attiv() {};
|
||||||
|
virtual ~TAgg_attiv() {};
|
||||||
|
};
|
||||||
|
|
||||||
|
HIDDEN TAgg_attiv& app() { return (TAgg_attiv&)main_app(); }
|
||||||
|
|
||||||
|
bool TAgg_attiv::create()
|
||||||
|
{
|
||||||
|
TApplication::create();
|
||||||
|
|
||||||
|
_pcon = new TLocalisamfile(LF_PCON);
|
||||||
|
_attiv = new TLocalisamfile(LF_ATTIV);
|
||||||
|
_reg = new TTable("REG");
|
||||||
|
|
||||||
|
dispatch_e_menu (BAR_ITEM(1));
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TAgg_attiv::destroy()
|
||||||
|
{
|
||||||
|
delete _pcon;
|
||||||
|
delete _attiv;
|
||||||
|
delete _reg;
|
||||||
|
|
||||||
|
return TApplication::destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TAgg_attiv::menu(MENU_TAG m)
|
||||||
|
{
|
||||||
|
TMask msk("cg1300a");
|
||||||
|
|
||||||
|
while (msk.run() == K_ENTER)
|
||||||
|
{
|
||||||
|
elabora_mov();
|
||||||
|
message_box("Aggiornamento completato");
|
||||||
|
//return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TAgg_attiv::elabora_mov()
|
||||||
|
{
|
||||||
|
TRelation rel (LF_MOV);
|
||||||
|
rel.add(LF_RMOVIVA, "NUMREG=NUMREG",1);
|
||||||
|
TCursor cursor(&rel,"",1);
|
||||||
|
|
||||||
|
TLocalisamfile& mov = rel.lfile();
|
||||||
|
TLocalisamfile& rmoviva = rel.lfile(LF_RMOVIVA);
|
||||||
|
|
||||||
|
long ditta = get_firm();
|
||||||
|
cursor = 0L;
|
||||||
|
const long nitems = cursor.items();
|
||||||
|
|
||||||
|
TProgind p(nitems ? nitems : 1, "Aggiornamento in corso..." , TRUE, TRUE, 70);
|
||||||
|
|
||||||
|
for (; cursor.pos() < cursor.items(); ++cursor)
|
||||||
|
{
|
||||||
|
p.addstatus(1);
|
||||||
|
const TString16 reg(mov.get(MOV_REG));
|
||||||
|
if (reg.empty()) continue;
|
||||||
|
|
||||||
|
const int annoiva = mov.get_int(MOV_ANNOIVA);
|
||||||
|
TRegistro registro(reg, annoiva);
|
||||||
|
const bool att_mista = registro.attivita_mista();
|
||||||
|
|
||||||
|
if (att_mista)
|
||||||
|
{
|
||||||
|
bool ok = rel.is_first_match(LF_RMOVIVA);
|
||||||
|
while (ok)
|
||||||
|
{
|
||||||
|
const char tipo = rmoviva.get_char("TIPOC");
|
||||||
|
if (tipo <= ' ')
|
||||||
|
{
|
||||||
|
TBill c(rmoviva.get_int("GRUPPO"), rmoviva.get_int("CONTO"), rmoviva.get_long("SOTTOCONTO"));
|
||||||
|
int tipoatt = c.tipo_att();
|
||||||
|
rmoviva.put("TIPOATT", tipoatt);
|
||||||
|
rmoviva.rewrite();
|
||||||
|
}
|
||||||
|
ok = rel.next_match(LF_RMOVIVA);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int cg1300(int argc, char* argv[])
|
int cg1300(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
error_box("Applicazione ancora da sviluppare");
|
switch (*argv[2])
|
||||||
return 1;
|
{
|
||||||
|
case 'A':
|
||||||
|
{
|
||||||
|
TAgg_attiv a;
|
||||||
|
a.run(argc, argv, "Aggiornamento tipo attivita' su movimenti iva");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'I':
|
||||||
|
{
|
||||||
|
TAgg_opintra a;
|
||||||
|
a.run(argc, argv, "Aggiornamento flag op. intracomunitarie");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'T':
|
||||||
|
{
|
||||||
|
TAgg_tconto a;
|
||||||
|
a.run(argc, argv, "Aggiornamento tipo conto");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'P':
|
||||||
|
{
|
||||||
|
TAgg_nprot a;
|
||||||
|
a.run(argc, argv,"Rinumerazione numero di protocollo");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
/*
|
||||||
|
case 'S':
|
||||||
|
TAgg_progr a;
|
||||||
|
title = "Aggiornamento codice attivita' su progressivi";
|
||||||
|
break;
|
||||||
|
case 'V':
|
||||||
|
TVar_data a;
|
||||||
|
title = "Variazione data su stampa bollato registri iva";
|
||||||
|
break;
|
||||||
|
*/
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -5046,7 +5046,7 @@ void CG1600_application::intesta_scalare()
|
|||||||
{
|
{
|
||||||
set_header (3,"@115gEsercizio@125g%d", _anno_esercizio_raf);
|
set_header (3,"@115gEsercizio@125g%d", _anno_esercizio_raf);
|
||||||
databilrafrstr = _databilrafr.string();
|
databilrafrstr = _databilrafr.string();
|
||||||
set_header (4,"@113galla data@122g%s", (const char*) databilrafrstr);
|
set_header (4,"@112galla data@122g%s", (const char*) databilrafrstr);
|
||||||
}
|
}
|
||||||
if (_tipo_stampa == 1)
|
if (_tipo_stampa == 1)
|
||||||
{
|
{
|
||||||
|
@ -1800,6 +1800,15 @@ bool CG3400_application::mask_b_warning (TMask_field& f, KEY k)
|
|||||||
|
|
||||||
void CG3400_application::init_print()
|
void CG3400_application::init_print()
|
||||||
{
|
{
|
||||||
|
// 17.5.95 Leggo parametri di stampa del registro
|
||||||
|
TString16 config;
|
||||||
|
const long codditta = get_firm();
|
||||||
|
const char* reg = (const char*)_reg_cod;
|
||||||
|
|
||||||
|
config.format("REG%05ld%03s", codditta, reg);
|
||||||
|
|
||||||
|
printer().read_configuration(config);
|
||||||
|
|
||||||
if (_stampa_len != 0)
|
if (_stampa_len != 0)
|
||||||
printer().formlen(_stampa_len);
|
printer().formlen(_stampa_len);
|
||||||
|
|
||||||
|
@ -692,6 +692,8 @@ bool CG4400_application::user_create()
|
|||||||
_clifo = new TLocalisamfile(LF_CLIFO);
|
_clifo = new TLocalisamfile(LF_CLIFO);
|
||||||
_occas = new TLocalisamfile(LF_OCCAS);
|
_occas = new TLocalisamfile(LF_OCCAS);
|
||||||
|
|
||||||
|
_desc27 = new TParagraph_string("", 27);
|
||||||
|
|
||||||
_nditte = new TRelation(LF_NDITTE);
|
_nditte = new TRelation(LF_NDITTE);
|
||||||
|
|
||||||
_rel = new TRelation (LF_MOV);
|
_rel = new TRelation (LF_MOV);
|
||||||
@ -747,6 +749,7 @@ bool CG4400_application::user_destroy()
|
|||||||
delete _occas;
|
delete _occas;
|
||||||
delete _cur;
|
delete _cur;
|
||||||
delete _rel;
|
delete _rel;
|
||||||
|
delete _desc27;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -1929,7 +1932,7 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
|||||||
{
|
{
|
||||||
_auto_intraf = FALSE;
|
_auto_intraf = FALSE;
|
||||||
printer().formfeed();
|
printer().formfeed();
|
||||||
printer().footerlen(5);
|
printer().footerlen(5); //devo rimetterlo cosi'
|
||||||
}
|
}
|
||||||
|
|
||||||
_dataregp = _datareg;
|
_dataregp = _datareg;
|
||||||
@ -2016,10 +2019,11 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
|||||||
set_row(_r, "@24g%s", (const char*) numdoc);
|
set_row(_r, "@24g%s", (const char*) numdoc);
|
||||||
if (codcf != 0l)
|
if (codcf != 0l)
|
||||||
set_row(_r, "@31g%6ld", codcf);
|
set_row(_r, "@31g%6ld", codcf);
|
||||||
set_row(_r, "@38g%-.30s",(const char*) ragsoc);
|
*_desc27 = (const char*) ragsoc;
|
||||||
set_row(_r, "@70g%2s", (const char*) _tipodoc);
|
//set_row(_r, "@38g#a", _desc25);
|
||||||
|
set_row(_r, "@68g%2s", (const char*) _tipodoc);
|
||||||
if (_stampa_width == 132)
|
if (_stampa_width == 132)
|
||||||
set_row(_r, "@72g%r", &totdoc);
|
set_row(_r, "@70g%r", &totdoc);
|
||||||
else set_row(_r, "@78g%r", &totdoc);
|
else set_row(_r, "@78g%r", &totdoc);
|
||||||
|
|
||||||
if (_tipo_stampa == 1) //in caso di stampa di prova
|
if (_tipo_stampa == 1) //in caso di stampa di prova
|
||||||
@ -2028,26 +2032,37 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
|||||||
{
|
{
|
||||||
if (protiva != _uprotivap + 1)
|
if (protiva != _uprotivap + 1)
|
||||||
{
|
{
|
||||||
set_row(_r+1, "@5g*** NUM.PROT.FUORI SEQUENZA");
|
set_row(_r+1, "@2g*** NUM.PROT.FUORI SEQUENZA");
|
||||||
riga = _r+2;
|
riga = _r+2;
|
||||||
}
|
}
|
||||||
_uprotivap = uprotiva ? uprotiva : protiva;
|
_uprotivap = uprotiva ? uprotiva : protiva;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* r;
|
||||||
|
int i = 1;
|
||||||
|
while ((r = _desc27->get()) != NULL)
|
||||||
|
{
|
||||||
|
set_row (i, "@38g%s", r);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
if (i > riga) riga = i;
|
||||||
|
|
||||||
if (codcf != 0l && _stampa_ind_comp)
|
if (codcf != 0l && _stampa_ind_comp)
|
||||||
{
|
{
|
||||||
|
//set_row(_r, "@38g%-.27s", (const char*)ragsoc);
|
||||||
if (viacf.not_empty()) //se la via non e' vuota non puo' essere vuoto il comune
|
if (viacf.not_empty()) //se la via non e' vuota non puo' essere vuoto il comune
|
||||||
{
|
{
|
||||||
set_row (_r+1, "@38g%-.24s %-3s",(const char *)viacf, (const char *)civcf);
|
set_row (/*_r+1*/ i++, "@38g%-.23s %-3s",(const char *)viacf, (const char *)civcf);
|
||||||
set_row (_r+2, "@38g%s %-.22s", (const char *)capcf, (const char *)comune);
|
set_row (/*_r+2*/ i++, "@38g%s %-.21s", (const char *)capcf, (const char *)comune);
|
||||||
riga = _r+3;
|
riga = /*_r+3*/ i;
|
||||||
}
|
}
|
||||||
else if (comune.not_empty())
|
else if (comune.not_empty())
|
||||||
{
|
{
|
||||||
set_row (_r+1, "@38g%s %-.22s", (const char *)capcf, (const char *)comune);
|
set_row (/*_r+1*/ i++, "@38g%s %-.21s", (const char *)capcf, (const char *)comune);
|
||||||
riga = _r+2;
|
riga = /*_r+2*/ i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_nrec = riga_rmoviva();
|
_nrec = riga_rmoviva();
|
||||||
if (_nrec > 0)
|
if (_nrec > 0)
|
||||||
{
|
{
|
||||||
@ -2059,16 +2074,16 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
|||||||
intra = riga._intra;
|
intra = riga._intra;
|
||||||
if (_stampa_width == 132)
|
if (_stampa_width == 132)
|
||||||
{
|
{
|
||||||
set_row(rr, "@87g%r", &riga._imponibile);
|
set_row(rr, "@85g%r", &riga._imponibile);
|
||||||
set_row(rr, "@102g%4s",(const char*)riga._codiva);
|
set_row(rr, "@101g%4s",(const char*)riga._codiva);
|
||||||
if (_tipo_reg == 2)
|
if (_tipo_reg == 2)
|
||||||
set_row(rr, "@107g%d", riga._tipodet);
|
set_row(rr, "@106g%d", riga._tipodet);
|
||||||
set_row(rr, "@108g%r", &riga._imposta);
|
set_row(rr, "@107g%r", &riga._imposta);
|
||||||
set_row(rr, "@124g%d", riga._tipocr);
|
set_row(rr, "@123g%d", riga._tipocr);
|
||||||
if (_tipoatt == "E" && _tipo_reg != 2)
|
if (_tipoatt == "E" && _tipo_reg != 2)
|
||||||
set_row(rr, "@126g%d", riga._tipoatt);
|
set_row(rr, "@125g%d", riga._tipoatt);
|
||||||
if (_tipo_stampa == 4) //stampa con riferimento al libro giornale
|
if (_tipo_stampa == 4) //stampa con riferimento al libro giornale
|
||||||
set_row(rr, "@127g%4ld", numgio);
|
set_row(rr, "@126g%5ld", numgio);
|
||||||
}
|
}
|
||||||
else //stampa a 198
|
else //stampa a 198
|
||||||
{
|
{
|
||||||
@ -2097,13 +2112,13 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
|||||||
else if (autof)
|
else if (autof)
|
||||||
tipo_op = "2";
|
tipo_op = "2";
|
||||||
|
|
||||||
set_row(_r, "@68g%s", (const char*) tipo_op);
|
set_row(_r, "@66g%s", (const char*) tipo_op);
|
||||||
|
|
||||||
if (_tipo_stampa == 1) //stampa di prova
|
if (_tipo_stampa == 1) //stampa di prova
|
||||||
{
|
{
|
||||||
if (_stampa_width == 132)
|
if (_stampa_width == 132)
|
||||||
{
|
{
|
||||||
set_row(_r, "@127g%4ld", numreg);
|
set_row(_r, "@126g%5ld", numreg);
|
||||||
if (stampato)
|
if (stampato)
|
||||||
set_row(_r, "@131g*"); //solo in stampa di prova!
|
set_row(_r, "@131g*"); //solo in stampa di prova!
|
||||||
}
|
}
|
||||||
@ -2131,17 +2146,17 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
|||||||
TConto tc (gruppo,conto,sottoc);
|
TConto tc (gruppo,conto,sottoc);
|
||||||
TString80 descr = tc.descrizione();
|
TString80 descr = tc.descrizione();
|
||||||
set_row(_r, "@144g%3d %3d %6d", gruppo, conto, sottoc);
|
set_row(_r, "@144g%3d %3d %6d", gruppo, conto, sottoc);
|
||||||
set_row(_r, "@160g%s", (const char*) descr);
|
set_row(_r, "@159g%-.39s", (const char*) descr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (riga == 0) riga = ++rr;
|
if (riga <= rr) riga = ++rr;
|
||||||
|
|
||||||
if (corrval != ZERO)
|
if (corrval != ZERO)
|
||||||
{
|
{
|
||||||
TString vall (corrval.string("###.###.###.###,@@"));
|
TString vall (corrval.string("###.###.###.###,@@"));
|
||||||
set_row(riga, "@26gCodice valuta %-3s Corrispettivo in valuta %s", (const char*) codval, (const char*) vall);
|
set_row(riga, "@24gCodice valuta %-3s Corrispettivo in valuta %s", (const char*) codval, (const char*) vall);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -2488,7 +2503,6 @@ print_action CG4400_application::postprocess_page (int file, int counter)
|
|||||||
_intesta_liq = FALSE;
|
_intesta_liq = FALSE;
|
||||||
remove(_t);
|
remove(_t);
|
||||||
}
|
}
|
||||||
//_t = NULL; Come ho potuto scrivere cio?!
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2844,7 +2858,7 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
|
|||||||
if (_tipo_stampa == 2 || _tipo_stampa == 4)
|
if (_tipo_stampa == 2 || _tipo_stampa == 4)
|
||||||
{
|
{
|
||||||
if (_u_data.ok())
|
if (_u_data.ok())
|
||||||
if (_data_a < _u_data)
|
if (_data_a <= _u_data)
|
||||||
{
|
{
|
||||||
message_box("Ditta %ld: Il registro %s e' gia' stato stampato come bollato di %s", _ditta, (const char*) _codreg, itom(_fino_a_mese));
|
message_box("Ditta %ld: Il registro %s e' gia' stato stampato come bollato di %s", _ditta, (const char*) _codreg, itom(_fino_a_mese));
|
||||||
continue;
|
continue;
|
||||||
@ -2983,10 +2997,9 @@ void CG4400_application::send_message(char tipo, const TFilename& nome, int mese
|
|||||||
|
|
||||||
if (tipo == 'S' || tipo == 's')
|
if (tipo == 'S' || tipo == 's')
|
||||||
app = "cg4 -2 -S";
|
app = "cg4 -2 -S";
|
||||||
else if (tipo == 'C' || tipo == 'c')
|
else if (tipo == 'C')
|
||||||
app = "cg4 -2 -C";
|
app = "cg4 -2 -C";
|
||||||
else
|
else app = "cg4 -2";
|
||||||
app = "cg4 -2";
|
|
||||||
|
|
||||||
TToken_string ss(10);
|
TToken_string ss(10);
|
||||||
|
|
||||||
@ -3177,7 +3190,6 @@ void CG4400_application::preprocess_header()
|
|||||||
++_pagine_stampate;
|
++_pagine_stampate;
|
||||||
|
|
||||||
if (_tipo_stampa == 3)
|
if (_tipo_stampa == 3)
|
||||||
//set_header(r, "@94gProgr.Studio %ld@114gProgr.Utente @#", _u_stampata);
|
|
||||||
set_header(r, "@94gProgr.Studio %ld@114gProgr.Utente %ld", _u_stampata, _pagine_stampate);
|
set_header(r, "@94gProgr.Studio %ld@114gProgr.Utente %ld", _u_stampata, _pagine_stampate);
|
||||||
|
|
||||||
// cosi' sono sicura che l'aggiornamento viene fatto ad ogni salto pagina
|
// cosi' sono sicura che l'aggiornamento viene fatto ad ogni salto pagina
|
||||||
@ -3239,18 +3251,16 @@ void CG4400_application::preprocess_header()
|
|||||||
{
|
{
|
||||||
if (_stampa_width == 132)
|
if (_stampa_width == 132)
|
||||||
{
|
{
|
||||||
//set_header(r,"@10gNum.@19gDocumento@68gT Tipo@76gIncassi/Pag.@103gCod %c@124gT %c@128gNum", nd1, tipo);
|
set_header(r,"@10gNum.@19gDocumento@66gT Tipo@102gCod %c@123gT %c@128gNum", nd1, tipo);
|
||||||
set_header(r,"@10gNum.@19gDocumento@68gT Tipo@103gCod %c@124gT %c@128gNum", nd1, tipo);
|
|
||||||
r++;
|
r++;
|
||||||
set_header(r, "Data reg. prot.@17gData@24gNumero Codice Ragione sociale/descrizione@68gO Doc.@76gTotale doc.@91gImponibile Iva %c@116gImposta@124g%c %c@128gReg", nd2, cor, type);
|
set_header(r, "Data reg. prot.@17gData@24gNumero Codice Ragione sociale/descrizione@66gO Doc.@74gTotale doc.@90gImponibile Iva %c@115gImposta@123g%c %c@128gReg", nd2, cor, type);
|
||||||
r++;
|
r++;
|
||||||
}
|
}
|
||||||
else //stampa a 198
|
else //stampa a 198
|
||||||
{
|
{
|
||||||
//set_header(r,"Registrazione Documento@68gT Tipo@80gTot.Inc./Pag.@110gCod %c@132g%c T@139gNum.", nd1, tipo, cor);
|
set_header(r,"Registrazione Documento@66gT Tipo@110gCod %c@132g%c T@139gNum.", nd1, tipo, cor);
|
||||||
set_header(r,"Registrazione Documento@68gT Tipo@110gCod %c@132g%c T@139gNum.", nd1, tipo, cor);
|
|
||||||
r++;
|
r++;
|
||||||
set_header(r, "Data Protocollo Data@24gNumero Codice Ragione sociale/descrizione@68gO Documento@80gTot.Documento@99gImponibile Iva %c@124gImposta@132g%c %c@139gReg.", nd2, type, cor);
|
set_header(r, "Data Protocollo Data@24gNumero Codice Ragione sociale/descrizione@66gO Documento@80gTot.Documento@98gImponibile Iva %c@124gImposta@132g%c %c@139gReg.", nd2, type, cor);
|
||||||
r++;
|
r++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3258,12 +3268,11 @@ void CG4400_application::preprocess_header()
|
|||||||
{
|
{
|
||||||
if (_stampa_width == 132)
|
if (_stampa_width == 132)
|
||||||
{
|
{
|
||||||
//set_header(r,"@10gNum.@19gDocumento@68gT Tipo@76gIncassi/Pag.@103gCod %c@124gT %c", nd1, tipo);
|
set_header(r,"@10gNum.@19gDocumento@66gT Tipo@102gCod %c@123gT %c", nd1, tipo);
|
||||||
set_header(r,"@10gNum.@19gDocumento@68gT Tipo@103gCod %c@124gT %c", nd1, tipo);
|
|
||||||
if (_tipo_stampa == 4) //stampa definitiva con rif. al libro giornale
|
if (_tipo_stampa == 4) //stampa definitiva con rif. al libro giornale
|
||||||
set_header(r, "@128gNum.");
|
set_header(r, "@128gNum.");
|
||||||
r++;
|
r++;
|
||||||
set_header(r, "Data reg. prot.@17gData@24gNumero Codice Ragione sociale/descrizione@68gO Doc.@76gTotale doc.@91gImponibile Iva %c@116gImposta@124g%c %c",
|
set_header(r, "Data reg. prot.@17gData@24gNumero Codice Ragione sociale/descrizione@66gO Doc.@74gTotale doc.@90gImponibile Iva %c@115gImposta@123g%c %c",
|
||||||
nd2, cor, type);
|
nd2, cor, type);
|
||||||
if (_tipo_stampa == 4)
|
if (_tipo_stampa == 4)
|
||||||
set_header(r, "@128gop.");
|
set_header(r, "@128gop.");
|
||||||
@ -3271,14 +3280,13 @@ void CG4400_application::preprocess_header()
|
|||||||
}
|
}
|
||||||
else //stampa a 198
|
else //stampa a 198
|
||||||
{
|
{
|
||||||
//set_header(r,"Registrazione Documento@68gT Tipo@80gTot.Inc./Pag.@110gCod %c@132g%c T", nd1, tipo);
|
set_header(r,"Registrazione Documento@66gT Tipo@110gCod %c@132g%c T", nd1, tipo);
|
||||||
set_header(r,"Registrazione Documento@68gT Tipo@110gCod %c@132g%c T", nd1, tipo);
|
|
||||||
if (_tipo_stampa == 4)
|
if (_tipo_stampa == 4)
|
||||||
set_header(r, "@139gNum.");
|
set_header(r, "@139gNum.");
|
||||||
r++;
|
r++;
|
||||||
set_header(r, "Data Protocollo Data@24gNumero Codice Ragione sociale/descrizione@68gO Documento@80gTot.Documento@99gImponibile Iva %c@124gImposta@132g%c %c", nd2, type, cor);
|
set_header(r, "Data Protocollo Data@24gNumero Codice Ragione sociale/descrizione@66gO Documento@80gTot.Documento@98gImponibile Iva %c@124gImposta@132g%c %c", nd2, type, cor);
|
||||||
if (_tipo_stampa == 4)
|
if (_tipo_stampa == 4)
|
||||||
set_header(r, "@139gop. @144gCodice conto @160gDescrizione sottoconto");
|
set_header(r, "@139gop. @144gCodice conto @159gDescrizione sottoconto");
|
||||||
r++;
|
r++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -175,6 +175,7 @@ bool CG4500_application::create()
|
|||||||
{
|
{
|
||||||
TApplication::create();
|
TApplication::create();
|
||||||
create_files();
|
create_files();
|
||||||
|
enable_menu_item(M_FILE_NEW, FALSE);
|
||||||
dispatch_e_menu (BAR_ITEM(1));
|
dispatch_e_menu (BAR_ITEM(1));
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user