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 <tabutil.h>
|
||||
#include <utility.h>
|
||||
#include <nditte.h>
|
||||
#include <anagr.h>
|
||||
#include <comuni.h>
|
||||
#include <comuni.h>
|
||||
#include <attiv.h>
|
||||
#include <nditte.h>
|
||||
#include "classpim.h"
|
||||
#include "cg0.h"
|
||||
#include "cg0400.h"
|
||||
@ -114,7 +115,7 @@ bool TIva_array::add_riga(const tiporec& tipo, const real& imponibile,
|
||||
class CG0400_application : public TPrintapp
|
||||
{
|
||||
TTable* _tabpim, * _tabreg, * _tabais, * _tablia;
|
||||
TLocalisamfile* _nditte, * _anag, * _com;
|
||||
TLocalisamfile* _nditte, * _anag, * _com, * _attiv;
|
||||
TMask* _msk;
|
||||
TDate _data;
|
||||
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;
|
||||
TGen_array _gen_array,_gen1_array;
|
||||
TString _cap,_cofi,_paiva,_ragsoc,_comunefis,_provfis,_viafis,_codivamsk,_codattmsk;
|
||||
TString _datast;
|
||||
TString _datast, _cod_att;
|
||||
Importi _mesi[13];
|
||||
liste _tipo_lista;
|
||||
|
||||
@ -210,7 +211,12 @@ bool CG0400_application::user_create()
|
||||
_tablia = new TTable("%LIA");
|
||||
_anag = new TLocalisamfile(LF_ANAG);
|
||||
_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;
|
||||
}
|
||||
@ -224,6 +230,8 @@ bool CG0400_application::user_destroy()
|
||||
delete _anag;
|
||||
delete _nditte;
|
||||
delete _com;
|
||||
delete _attiv;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -247,8 +255,10 @@ void CG0400_application::look_pim()
|
||||
TString80 codtab = pim.get("CODTAB");
|
||||
int anno = atoi(codtab.mid(0,4));
|
||||
int mese = atoi(codtab.mid(13,2));
|
||||
TString16 codatt = codtab.mid(4,5);
|
||||
TString16 codiva = codtab.mid(16,4);
|
||||
codiva = codiva.trim();
|
||||
codatt = codatt.trim();
|
||||
|
||||
if (anno != _anno) continue;
|
||||
|
||||
@ -260,6 +270,9 @@ void CG0400_application::look_pim()
|
||||
if (mese != _mese)
|
||||
continue;
|
||||
|
||||
if (codatt != _cod_att) continue;
|
||||
|
||||
|
||||
while (classify_pim(pim.curr(), imponibile, imposta, tipo))
|
||||
{
|
||||
switch(tipo)
|
||||
@ -514,23 +527,37 @@ bool CG0400_application::set_print(int m)
|
||||
_mese = msk.get_int(F_MESE);
|
||||
_st_inizio_anno = msk.get_bool(F_STAMPA);
|
||||
|
||||
_prima_pagina = TRUE;
|
||||
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;
|
||||
|
||||
_iva_array.destroy();
|
||||
_iva1_array.destroy();
|
||||
_gen_array.destroy();
|
||||
_gen1_array.destroy();
|
||||
|
||||
look_pim();
|
||||
_iva_array.destroy();
|
||||
_iva1_array.destroy();
|
||||
_gen_array.destroy();
|
||||
_gen1_array.destroy();
|
||||
|
||||
look_pim();
|
||||
|
||||
print();
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
set_real_picture("###.###.###.###");
|
||||
set_print_zero(FALSE);
|
||||
printer().footerlen(5);
|
||||
//set_real_picture("###.###.###.###");
|
||||
//set_print_zero(FALSE);
|
||||
//printer().footerlen(5);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -931,7 +958,7 @@ void CG0400_application::preprocess_header()
|
||||
int soh = 1;
|
||||
TString sep(132);
|
||||
TString ragsoc(50);
|
||||
TString attprev(5);
|
||||
//TString attprev(5);
|
||||
TString16 descf;
|
||||
|
||||
TLocalisamfile nditte(LF_NDITTE);
|
||||
@ -940,10 +967,12 @@ void CG0400_application::preprocess_header()
|
||||
if (nditte.read() == NOERR)
|
||||
{
|
||||
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();
|
||||
|
||||
@ -973,16 +1002,16 @@ void CG0400_application::preprocess_header()
|
||||
sep.fill('-');
|
||||
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);
|
||||
*/
|
||||
if (_st_inizio_anno)
|
||||
{
|
||||
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);
|
||||
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);
|
||||
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*) _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);
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,8 @@ int main(int argc,char** argv)
|
||||
cg1600(argc,argv); break;
|
||||
case 6:
|
||||
cg1700(argc,argv); break;
|
||||
//case 7:
|
||||
// cg1800(argc,argv); break;
|
||||
default:
|
||||
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 cg1600(int argc, char* argv[]);
|
||||
int cg1700(int argc, char* argv[]);
|
||||
//int cg1800(int argc, char* argv[]);
|
||||
|
||||
#ifdef __MAIN__
|
||||
#define extern
|
||||
|
16
cg/cg1.url
16
cg/cg1.url
@ -2,32 +2,36 @@
|
||||
|
||||
|
||||
MENU TASK_MENUBAR
|
||||
SUBMENU MENU_FILE "~File"
|
||||
SUBMENU MENU_FILE "~File"
|
||||
|
||||
|
||||
MENUBAR 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)
|
||||
|
||||
MENU MENU_BAR(3)
|
||||
SUBMENU MENU_FILE "~File"
|
||||
SUBMENU MENU_FILE "~File"
|
||||
|
||||
MENUBAR MENU_BAR(4)
|
||||
|
||||
MENU MENU_BAR(4)
|
||||
SUBMENU MENU_FILE "~File"
|
||||
SUBMENU MENU_FILE "~File"
|
||||
|
||||
MENUBAR MENU_BAR(5)
|
||||
|
||||
MENU MENU_BAR(5)
|
||||
SUBMENU MENU_FILE "~File"
|
||||
SUBMENU MENU_FILE "~File"
|
||||
|
||||
MENUBAR MENU_BAR(6)
|
||||
|
||||
MENU MENU_BAR(6)
|
||||
SUBMENU MENU_FILE "~File"
|
||||
SUBMENU MENU_FILE "~File"
|
||||
|
||||
|
161
cg/cg1300.cpp
161
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[])
|
||||
{
|
||||
error_box("Applicazione ancora da sviluppare");
|
||||
return 1;
|
||||
{
|
||||
switch (*argv[2])
|
||||
{
|
||||
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);
|
||||
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)
|
||||
{
|
||||
@ -5054,7 +5054,7 @@ void CG1600_application::intesta_scalare()
|
||||
set_header (4,"@86galla data@96g%s", (const char*) datalimitestr);
|
||||
}
|
||||
else if (_tipo_stampa == 2)
|
||||
set_header (4,"@90gall' ultima immissione");
|
||||
set_header (4,"@90gall'ultima immissione");
|
||||
|
||||
sep.fill('-'); //Stampa 132 - (sep(132))
|
||||
set_header (5, (const char *) sep);
|
||||
@ -5073,7 +5073,7 @@ void CG1600_application::intesta_verifica()
|
||||
set_header (3,"@65galla data@75g%s", (const char*) datafinestr);
|
||||
}
|
||||
else if (_tipo_stampa == 2)
|
||||
set_header (3,"@42gall' ultima immissione");
|
||||
set_header (3,"@42gall'ultima immissione");
|
||||
|
||||
if (_stampa_modulo)
|
||||
{
|
||||
|
@ -1800,6 +1800,15 @@ bool CG3400_application::mask_b_warning (TMask_field& f, KEY k)
|
||||
|
||||
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)
|
||||
printer().formlen(_stampa_len);
|
||||
|
||||
|
110
cg/cg4400.cpp
110
cg/cg4400.cpp
@ -692,6 +692,8 @@ bool CG4400_application::user_create()
|
||||
_clifo = new TLocalisamfile(LF_CLIFO);
|
||||
_occas = new TLocalisamfile(LF_OCCAS);
|
||||
|
||||
_desc27 = new TParagraph_string("", 27);
|
||||
|
||||
_nditte = new TRelation(LF_NDITTE);
|
||||
|
||||
_rel = new TRelation (LF_MOV);
|
||||
@ -747,6 +749,7 @@ bool CG4400_application::user_destroy()
|
||||
delete _occas;
|
||||
delete _cur;
|
||||
delete _rel;
|
||||
delete _desc27;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -1238,7 +1241,7 @@ int CG4400_application::stampa_prospetto()
|
||||
}
|
||||
}
|
||||
rr++;
|
||||
set_row(rr, "iva Descrizione@30gImponibile@49gImposta");
|
||||
set_row(rr, "iva Descrizione@30gImponibile@49gImposta");
|
||||
if (_tipo_reg == 1 && _corrispettivi)
|
||||
set_row(rr, "@63gImporti lordi");
|
||||
if (_tipo_stampa != 1)
|
||||
@ -1274,7 +1277,7 @@ int CG4400_application::stampa_acquisti(int row)
|
||||
set_row(rw++, "----- Indetraibile su op.es. -----");
|
||||
set_row(rw, "Cod.");
|
||||
rw++;
|
||||
set_row(rw, "iva Descrizione@30gImponibile@49gImposta");
|
||||
set_row(rw, "iva Descrizione@30gImponibile@49gImposta");
|
||||
if (_tipo_stampa != 1)
|
||||
set_row(rw++, "@86gImponibile@106gImposta");
|
||||
else rw++;
|
||||
@ -1308,7 +1311,7 @@ int CG4400_application::stampa_acquisti(int row)
|
||||
set_row(rw++, "----- Passaggi interni -----");
|
||||
set_row(rw, "Cod.");
|
||||
rw++;
|
||||
set_row(rw, "iva Descrizione@30gImponibile@49gImposta");
|
||||
set_row(rw, "iva Descrizione@30gImponibile@49gImposta");
|
||||
if (_tipo_stampa != 1)
|
||||
set_row(rw++, "@86gImponibile@106gImposta");
|
||||
else rw++;
|
||||
@ -1341,7 +1344,7 @@ int CG4400_application::stampa_acquisti(int row)
|
||||
set_row(rw++, "----- N.D. 9 - acquisti indeducibili per ART.19 -----");
|
||||
set_row(rw, "Cod.");
|
||||
rw++;
|
||||
set_row(rw, "iva Descrizione@30gImponibile@49gImposta");
|
||||
set_row(rw, "iva Descrizione@30gImponibile@49gImposta");
|
||||
if (_tipo_stampa != 1)
|
||||
set_row(rw++, "@86gImponibile@106gImposta");
|
||||
else rw++;
|
||||
@ -1929,7 +1932,7 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
||||
{
|
||||
_auto_intraf = FALSE;
|
||||
printer().formfeed();
|
||||
printer().footerlen(5);
|
||||
printer().footerlen(5); //devo rimetterlo cosi'
|
||||
}
|
||||
|
||||
_dataregp = _datareg;
|
||||
@ -1969,11 +1972,11 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
||||
if (ocfpi.trim().empty())
|
||||
{
|
||||
TRectype dep = ricerca_cf(tipocf, codcf);
|
||||
ragsoc = dep.get (CLI_RAGSOC);
|
||||
viacf = dep.get (CLI_INDCF);
|
||||
civcf = dep.get (CLI_CIVCF);
|
||||
capcf = dep.get (CLI_CAPCF);
|
||||
comcf = dep.get (CLI_COMCF);
|
||||
ragsoc = dep.get (CLI_RAGSOC);
|
||||
viacf = dep.get (CLI_INDCF);
|
||||
civcf = dep.get (CLI_CIVCF);
|
||||
capcf = dep.get (CLI_CAPCF);
|
||||
comcf = dep.get (CLI_COMCF);
|
||||
char tipoa = dep.get_char(CLI_TIPOAPER);
|
||||
if (tipoa == 'F')
|
||||
{
|
||||
@ -2016,10 +2019,11 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
||||
set_row(_r, "@24g%s", (const char*) numdoc);
|
||||
if (codcf != 0l)
|
||||
set_row(_r, "@31g%6ld", codcf);
|
||||
set_row(_r, "@38g%-.30s",(const char*) ragsoc);
|
||||
set_row(_r, "@70g%2s", (const char*) _tipodoc);
|
||||
*_desc27 = (const char*) ragsoc;
|
||||
//set_row(_r, "@38g#a", _desc25);
|
||||
set_row(_r, "@68g%2s", (const char*) _tipodoc);
|
||||
if (_stampa_width == 132)
|
||||
set_row(_r, "@72g%r", &totdoc);
|
||||
set_row(_r, "@70g%r", &totdoc);
|
||||
else set_row(_r, "@78g%r", &totdoc);
|
||||
|
||||
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)
|
||||
{
|
||||
set_row(_r+1, "@5g*** NUM.PROT.FUORI SEQUENZA");
|
||||
set_row(_r+1, "@2g*** NUM.PROT.FUORI SEQUENZA");
|
||||
riga = _r+2;
|
||||
}
|
||||
_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)
|
||||
{
|
||||
//set_row(_r, "@38g%-.27s", (const char*)ragsoc);
|
||||
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+2, "@38g%s %-.22s", (const char *)capcf, (const char *)comune);
|
||||
riga = _r+3;
|
||||
set_row (/*_r+1*/ i++, "@38g%-.23s %-3s",(const char *)viacf, (const char *)civcf);
|
||||
set_row (/*_r+2*/ i++, "@38g%s %-.21s", (const char *)capcf, (const char *)comune);
|
||||
riga = /*_r+3*/ i;
|
||||
}
|
||||
else if (comune.not_empty())
|
||||
{
|
||||
set_row (_r+1, "@38g%s %-.22s", (const char *)capcf, (const char *)comune);
|
||||
riga = _r+2;
|
||||
set_row (/*_r+1*/ i++, "@38g%s %-.21s", (const char *)capcf, (const char *)comune);
|
||||
riga = /*_r+2*/ i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_nrec = riga_rmoviva();
|
||||
if (_nrec > 0)
|
||||
{
|
||||
@ -2059,16 +2074,16 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
||||
intra = riga._intra;
|
||||
if (_stampa_width == 132)
|
||||
{
|
||||
set_row(rr, "@87g%r", &riga._imponibile);
|
||||
set_row(rr, "@102g%4s",(const char*)riga._codiva);
|
||||
set_row(rr, "@85g%r", &riga._imponibile);
|
||||
set_row(rr, "@101g%4s",(const char*)riga._codiva);
|
||||
if (_tipo_reg == 2)
|
||||
set_row(rr, "@107g%d", riga._tipodet);
|
||||
set_row(rr, "@108g%r", &riga._imposta);
|
||||
set_row(rr, "@124g%d", riga._tipocr);
|
||||
set_row(rr, "@106g%d", riga._tipodet);
|
||||
set_row(rr, "@107g%r", &riga._imposta);
|
||||
set_row(rr, "@123g%d", riga._tipocr);
|
||||
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
|
||||
set_row(rr, "@127g%4ld", numgio);
|
||||
set_row(rr, "@126g%5ld", numgio);
|
||||
}
|
||||
else //stampa a 198
|
||||
{
|
||||
@ -2097,13 +2112,13 @@ bool CG4400_application::preprocess_page(int file, int counter)
|
||||
else if (autof)
|
||||
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 (_stampa_width == 132)
|
||||
{
|
||||
set_row(_r, "@127g%4ld", numreg);
|
||||
set_row(_r, "@126g%5ld", numreg);
|
||||
if (stampato)
|
||||
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);
|
||||
TString80 descr = tc.descrizione();
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
if (riga == 0) riga = ++rr;
|
||||
if (riga <= rr) riga = ++rr;
|
||||
|
||||
if (corrval != ZERO)
|
||||
{
|
||||
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;
|
||||
@ -2488,7 +2503,6 @@ print_action CG4400_application::postprocess_page (int file, int counter)
|
||||
_intesta_liq = FALSE;
|
||||
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 (_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));
|
||||
continue;
|
||||
@ -2983,10 +2997,9 @@ void CG4400_application::send_message(char tipo, const TFilename& nome, int mese
|
||||
|
||||
if (tipo == 'S' || tipo == 's')
|
||||
app = "cg4 -2 -S";
|
||||
else if (tipo == 'C' || tipo == 'c')
|
||||
else if (tipo == 'C')
|
||||
app = "cg4 -2 -C";
|
||||
else
|
||||
app = "cg4 -2";
|
||||
else app = "cg4 -2";
|
||||
|
||||
TToken_string ss(10);
|
||||
|
||||
@ -3177,7 +3190,6 @@ void CG4400_application::preprocess_header()
|
||||
++_pagine_stampate;
|
||||
|
||||
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);
|
||||
|
||||
// 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)
|
||||
{
|
||||
//set_header(r,"@10gNum.@19gDocumento@68gT Tipo@76gIncassi/Pag.@103gCod %c@124gT %c@128gNum", nd1, tipo);
|
||||
set_header(r,"@10gNum.@19gDocumento@68gT Tipo@103gCod %c@124gT %c@128gNum", nd1, tipo);
|
||||
set_header(r,"@10gNum.@19gDocumento@66gT Tipo@102gCod %c@123gT %c@128gNum", nd1, tipo);
|
||||
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++;
|
||||
}
|
||||
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@68gT Tipo@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);
|
||||
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++;
|
||||
}
|
||||
}
|
||||
@ -3258,12 +3268,11 @@ void CG4400_application::preprocess_header()
|
||||
{
|
||||
if (_stampa_width == 132)
|
||||
{
|
||||
//set_header(r,"@10gNum.@19gDocumento@68gT Tipo@76gIncassi/Pag.@103gCod %c@124gT %c", nd1, tipo);
|
||||
set_header(r,"@10gNum.@19gDocumento@68gT Tipo@103gCod %c@124gT %c", nd1, tipo);
|
||||
set_header(r,"@10gNum.@19gDocumento@66gT Tipo@102gCod %c@123gT %c", nd1, tipo);
|
||||
if (_tipo_stampa == 4) //stampa definitiva con rif. al libro giornale
|
||||
set_header(r, "@128gNum.");
|
||||
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);
|
||||
if (_tipo_stampa == 4)
|
||||
set_header(r, "@128gop.");
|
||||
@ -3271,14 +3280,13 @@ void CG4400_application::preprocess_header()
|
||||
}
|
||||
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@68gT Tipo@110gCod %c@132g%c T", nd1, tipo);
|
||||
set_header(r,"Registrazione Documento@66gT Tipo@110gCod %c@132g%c T", nd1, tipo);
|
||||
if (_tipo_stampa == 4)
|
||||
set_header(r, "@139gNum.");
|
||||
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)
|
||||
set_header(r, "@139gop. @144gCodice conto @160gDescrizione sottoconto");
|
||||
set_header(r, "@139gop. @144gCodice conto @159gDescrizione sottoconto");
|
||||
r++;
|
||||
}
|
||||
}
|
||||
|
@ -174,7 +174,8 @@ void CG4500_application::destroy_files()
|
||||
bool CG4500_application::create()
|
||||
{
|
||||
TApplication::create();
|
||||
create_files();
|
||||
create_files();
|
||||
enable_menu_item(M_FILE_NEW, FALSE);
|
||||
dispatch_e_menu (BAR_ITEM(1));
|
||||
|
||||
return TRUE;
|
||||
@ -226,7 +227,7 @@ bool CG4500_application::set()
|
||||
int anno = TabEs.get_int ("CODTAB");
|
||||
TDate inizio = TabEs.get_date("D0"); //data inizio es. in corso
|
||||
TDate fine = TabEs.get_date("D1"); //data fine es. in corso
|
||||
|
||||
|
||||
m.set(F_ANNO, anno);
|
||||
m.set(F_DATAINIC, inizio.string());
|
||||
m.set(F_DATAFINC, fine.string());
|
||||
|
Loading…
x
Reference in New Issue
Block a user