Correzione errori marginali
git-svn-id: svn://10.65.10.50/trunk@792 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
471dfd167d
commit
af3b1f3113
@ -144,9 +144,9 @@ bool CG0100_application::protected_record(TRectype &rec)
|
|||||||
void CG0100_application::init_query_mode(TMask& m)
|
void CG0100_application::init_query_mode(TMask& m)
|
||||||
|
|
||||||
{
|
{
|
||||||
m.send_key(K_SHIFT + K_CTRL + 's', -1);
|
m.show(-1); //m.send_key(K_SHIFT + K_CTRL + 's', -1);
|
||||||
m.send_key(K_SHIFT + K_CTRL + 's', -2);
|
m.show(-2); //m.send_key(K_SHIFT + K_CTRL + 's', -2);
|
||||||
m.send_key(K_SHIFT + K_CTRL + 's', -3);
|
m.show(-3); //m.send_key(K_SHIFT + K_CTRL + 's', -3);
|
||||||
}
|
}
|
||||||
|
|
||||||
HIDDEN bool tmcf_handler(TMask_field& f, KEY key)
|
HIDDEN bool tmcf_handler(TMask_field& f, KEY key)
|
||||||
@ -174,12 +174,12 @@ void CG0100_application::init_insert_mode(TMask& m)
|
|||||||
bool ivd_enable = TRUE;
|
bool ivd_enable = TRUE;
|
||||||
|
|
||||||
if (conto == 0 && sottoc == 0)
|
if (conto == 0 && sottoc == 0)
|
||||||
m.send_key(K_SHIFT + K_CTRL + 'h', -1);
|
m.show(-1, FALSE); // send_key(K_SHIFT + K_CTRL + 'h', -1);
|
||||||
else
|
else
|
||||||
if (sottoc == 0)
|
if (sottoc == 0)
|
||||||
m.send_key(K_SHIFT + K_CTRL + 'h', -2);
|
m.show(-2, FALSE); //m.send_key(K_SHIFT + K_CTRL + 'h', -2);
|
||||||
else
|
else
|
||||||
m.send_key(K_SHIFT + K_CTRL + 'h', -3);
|
m.show(-3, FALSE); //m.send_key(K_SHIFT + K_CTRL + 'h', -3);
|
||||||
|
|
||||||
TLocalisamfile& pconti = _rel->lfile();
|
TLocalisamfile& pconti = _rel->lfile();
|
||||||
TString s(15), s2(1), s3(8), s4(2);
|
TString s(15), s2(1), s3(8), s4(2);
|
||||||
|
@ -131,7 +131,6 @@ LIST FLD_CM1_SEZIVD 1 22
|
|||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 7 "Sez. e classe IV dir. "
|
PROMPT 1 7 "Sez. e classe IV dir. "
|
||||||
FIELD LF_PCON->SEZIVD
|
FIELD LF_PCON->SEZIVD
|
||||||
GROUP 1 4
|
|
||||||
ITEM "0|0. Nessuna" MESSAGE CLEAR,5@|CLEAR,6@
|
ITEM "0|0. Nessuna" MESSAGE CLEAR,5@|CLEAR,6@
|
||||||
ITEM "1|1. Attivita'" MESSAGE ENABLE,5@|ENABLE,6@
|
ITEM "1|1. Attivita'" MESSAGE ENABLE,5@|ENABLE,6@
|
||||||
ITEM "2|2. Passivita'" MESSAGE ENABLE,5@|ENABLE,6@
|
ITEM "2|2. Passivita'" MESSAGE ENABLE,5@|ENABLE,6@
|
||||||
@ -140,6 +139,7 @@ BEGIN
|
|||||||
ITEM "7|7. C.ordine passivo" MESSAGE CLEAR,5@|ENABLE,6@
|
ITEM "7|7. C.ordine passivo" MESSAGE CLEAR,5@|ENABLE,6@
|
||||||
ITEM "9|9. Conto economico" MESSAGE ENABLE,5@|ENABLE,6@
|
ITEM "9|9. Conto economico" MESSAGE ENABLE,5@|ENABLE,6@
|
||||||
HELP "Codice del conto secondo la IV direttiva CEE"
|
HELP "Codice del conto secondo la IV direttiva CEE"
|
||||||
|
GROUP 1 4
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING FLD_CM1_LETTIVD 1 1
|
STRING FLD_CM1_LETTIVD 1 1
|
||||||
@ -155,7 +155,7 @@ STRING FLD_CM1_LETTIVDH 1
|
|||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 56 7 ""
|
PROMPT 56 7 ""
|
||||||
FLAGS "HDU"
|
FLAGS "HDU"
|
||||||
GROUP 5
|
GROUP 1 5
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER FLD_CM1_NUMRIVD 8 4
|
NUMBER FLD_CM1_NUMRIVD 8 4
|
||||||
@ -171,7 +171,7 @@ NUMBER FLD_CM1_NUMRIVDH 8 4
|
|||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 60 7 ""
|
PROMPT 60 7 ""
|
||||||
FLAGS "HDMZ"
|
FLAGS "HDMZ"
|
||||||
GROUP 5
|
GROUP 1 5
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER FLD_CM1_NUMIVD 2
|
NUMBER FLD_CM1_NUMIVD 2
|
||||||
|
10
cg/cg1.url
10
cg/cg1.url
@ -11,16 +11,6 @@ MENU MENU_BAR(1)
|
|||||||
SUBMENU MENU_FILE "~File"
|
SUBMENU MENU_FILE "~File"
|
||||||
|
|
||||||
|
|
||||||
MENUBAR MENU_BAR(2)
|
|
||||||
|
|
||||||
MENU MENU_BAR(2)
|
|
||||||
SUBMENU MENU_FILE "~File"
|
|
||||||
|
|
||||||
MENU BAR_ITEM(1)
|
|
||||||
ITEM MENU_ITEM(1) "~Header"
|
|
||||||
ITEM MENU_ITEM(2) "~Body"
|
|
||||||
ITEM MENU_ITEM(3) "~Footer"
|
|
||||||
|
|
||||||
MENUBAR MENU_BAR(3)
|
MENUBAR MENU_BAR(3)
|
||||||
|
|
||||||
MENU MENU_BAR(3)
|
MENU MENU_BAR(3)
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
#include <printapp.h>
|
#include <config.h>
|
||||||
|
#include <execp.h>
|
||||||
#include <mask.h>
|
#include <mask.h>
|
||||||
|
#include <mailbox.h>
|
||||||
|
#include <printapp.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
#include <mailbox.h>
|
|
||||||
#include <execp.h>
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#include <nditte.h>
|
|
||||||
#include <clifo.h>
|
|
||||||
#include <mov.h>
|
|
||||||
#include <comuni.h>
|
#include <comuni.h>
|
||||||
#include <cfven.h>
|
#include <cfven.h>
|
||||||
|
#include <clifo.h>
|
||||||
#include <indsp.h>
|
#include <indsp.h>
|
||||||
|
#include <mov.h>
|
||||||
|
#include <nditte.h>
|
||||||
|
|
||||||
#include "cg1.h"
|
#include "cg1.h"
|
||||||
#include "cg1200a.h"
|
#include "cg1200a.h"
|
||||||
|
101
cg/cg1300.cpp
101
cg/cg1300.cpp
@ -1,102 +1,7 @@
|
|||||||
#include <applicat.h>
|
#include <checks.h>
|
||||||
#include <mask.h>
|
|
||||||
#include <form.h>
|
|
||||||
#include <utility.h>
|
|
||||||
#include <urldefid.h>
|
|
||||||
|
|
||||||
|
|
||||||
class TEdit_form : public TApplication
|
|
||||||
{
|
|
||||||
const char* _name;
|
|
||||||
TForm* _form;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual bool create();
|
|
||||||
virtual bool destroy();
|
|
||||||
virtual bool menu(MENU_TAG);
|
|
||||||
|
|
||||||
public:
|
|
||||||
TEdit_form(const char* name);
|
|
||||||
const char* name() const { return _name; }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
TEdit_form::TEdit_form(const char* name)
|
|
||||||
: _name(name), _form(NULL)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
bool TEdit_form::create()
|
|
||||||
{
|
|
||||||
_form = new TForm(name());
|
|
||||||
dispatch_e_menu(MENU_ITEM(2));
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool TEdit_form::destroy()
|
|
||||||
{
|
|
||||||
delete _form;
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool TEdit_form::menu(MENU_TAG tag)
|
|
||||||
{
|
|
||||||
char sec = 'B';
|
|
||||||
switch(tag)
|
|
||||||
{
|
|
||||||
case MENU_ITEM(1):
|
|
||||||
sec = 'H'; break;
|
|
||||||
case MENU_ITEM(3):
|
|
||||||
sec = 'F'; break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
_form->edit(sec, odd_page);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int cg1300(int argc, char* argv[])
|
int cg1300(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
TApplication::check_parameters(argc, argv);
|
error_box("Applicazione ancora da sviluppare");
|
||||||
if (argc < 3)
|
return 1;
|
||||||
{
|
|
||||||
error_box("Specificare il nome del profilo di stampa");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
TFilename form(argv[2]); form.ext("frm");
|
|
||||||
|
|
||||||
const char mode = argc > 3 ? toupper(argv[3][1]) : 'M';
|
|
||||||
const bool crea = (mode == 'C') || !fexist(form);
|
|
||||||
|
|
||||||
if (crea)
|
|
||||||
{
|
|
||||||
TFilename base(form.left(3)); base.ext("frm");
|
|
||||||
if (!fexist(base))
|
|
||||||
{
|
|
||||||
error_box("Non esiste il file %s", (const char*)base);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
if (!fcopy(base, form))
|
|
||||||
{
|
|
||||||
error_box("Impossibile copiare %s in %s", (const char*)base, (const char*)form);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fexist(form))
|
|
||||||
{
|
|
||||||
error_box("Non esiste il file %s", (const char*)form);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
TEdit_form a(form);
|
|
||||||
TString80 title;
|
|
||||||
title << (crea ? "Creazione" : "Modifica") << ": " << a.name();
|
|
||||||
a.run(argc, argv, title);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
@ -416,19 +416,22 @@ const char* TPrimanota_application::get_next_key()
|
|||||||
TToken_string k(80);
|
TToken_string k(80);
|
||||||
k.add(F_NUMREG); k.add(_lastreg+1);
|
k.add(F_NUMREG); k.add(_lastreg+1);
|
||||||
|
|
||||||
TMask& m = curr_mask();
|
if (_rel->good()) // Not reinsert
|
||||||
if (m.insert_mode())
|
|
||||||
{
|
{
|
||||||
k.add(F_CODCAUS); k.add(m.get(F_CODCAUS)); // Ricopia causale
|
TMask& m = curr_mask();
|
||||||
k.add(F_DATAREG); k.add(m.get(F_DATAREG)); // data operazione
|
if (m.insert_mode())
|
||||||
k.add(F_DATACOMP); k.add(m.get(F_DATACOMP)); // competenza
|
|
||||||
k.add(F_DATADOC); k.add(m.get(F_DATADOC)); // documento
|
|
||||||
|
|
||||||
if (iva() == iva_vendite)
|
|
||||||
{
|
{
|
||||||
const long n = m.get_long(F_NUMDOC);
|
k.add(F_CODCAUS); k.add(m.get(F_CODCAUS)); // Ricopia causale
|
||||||
if (n > 0)
|
k.add(F_DATAREG); k.add(m.get(F_DATAREG)); // data operazione
|
||||||
{ k.add(F_NUMDOC); k.add(n+1); } // incrementa numero documento
|
k.add(F_DATACOMP); k.add(m.get(F_DATACOMP)); // competenza
|
||||||
|
k.add(F_DATADOC); k.add(m.get(F_DATADOC)); // documento
|
||||||
|
|
||||||
|
if (iva() == iva_vendite)
|
||||||
|
{
|
||||||
|
const long n = m.get_long(F_NUMDOC);
|
||||||
|
if (n > 0)
|
||||||
|
{ k.add(F_NUMDOC); k.add(n+1); } // incrementa numero documento
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -443,11 +446,6 @@ void TPrimanota_application::init_insert_mode(TMask& m)
|
|||||||
|
|
||||||
init_mask(m);
|
init_mask(m);
|
||||||
_saldi.reset(); // Inizializza saldi
|
_saldi.reset(); // Inizializza saldi
|
||||||
_saldi.set_movprovv(_rel->lfile().get_char("PROVVIS") > ' ' ? TRUE : FALSE);
|
|
||||||
_saldi.set_movap(causale().apertura());
|
|
||||||
_saldi.set_anno_es(m.get_int(F_ANNOES));
|
|
||||||
_saldi.set_num_ulmov(m.get_long(F_NUMREG));
|
|
||||||
_saldi.set_data_ulmov((TDate)m.get(F_DATAREG));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -537,10 +535,9 @@ int TPrimanota_application::read(TMask& m)
|
|||||||
TImporto import(sezione, im);
|
TImporto import(sezione, im);
|
||||||
import.add_to(riga); // Dare/Avere 101-102
|
import.add_to(riga); // Dare/Avere 101-102
|
||||||
|
|
||||||
TConto conto; get_conto(r, conto);
|
TConto conto; get_conto(r, conto);
|
||||||
riga.add(conto.string(0x3)); // Conto 103-107
|
riga.add(conto.string(0x3)); // Conto 103-107
|
||||||
if (conto.ok())
|
_saldi.aggiorna(conto, im, sezione, FALSE);
|
||||||
_saldi.aggiorna(conto, im, sezione, FALSE);
|
|
||||||
|
|
||||||
riga.add(""); // Codice descrizione 108
|
riga.add(""); // Codice descrizione 108
|
||||||
riga.add(r.get("DESCR")); // Descrizione riga 109
|
riga.add(r.get("DESCR")); // Descrizione riga 109
|
||||||
@ -616,6 +613,8 @@ void TPrimanota_application::mask2rel(const TMask& m)
|
|||||||
_saldi.set_movprovv(m.get_bool(F_PROVVISORIO));
|
_saldi.set_movprovv(m.get_bool(F_PROVVISORIO));
|
||||||
_saldi.set_movap(causale().apertura());
|
_saldi.set_movap(causale().apertura());
|
||||||
_saldi.set_anno_es(annoes);
|
_saldi.set_anno_es(annoes);
|
||||||
|
_saldi.set_num_ulmov(m.get_long(F_NUMREG));
|
||||||
|
_saldi.set_data_ulmov((TDate)m.get(F_DATAREG));
|
||||||
|
|
||||||
_rel->destroy_rows(); // Destroy all records
|
_rel->destroy_rows(); // Destroy all records
|
||||||
cgs_pack(); // Destroy all null rows
|
cgs_pack(); // Destroy all null rows
|
||||||
|
@ -115,6 +115,13 @@ int TMovimentoPN::write_rec(bool re, const TRectype& rec, TLocalisamfile& f)
|
|||||||
if (scrivi)
|
if (scrivi)
|
||||||
f.write(rec);
|
f.write(rec);
|
||||||
|
|
||||||
|
#ifdef TRC
|
||||||
|
const long numreg = rec.get_long("NUMREG");
|
||||||
|
const int numrig = f.num() == LF_MOV ? 0 : rec.get_int("NUMRIG");
|
||||||
|
TRACE("write file=%d record=%ld nummov=%ld numrig=%d status=%d",
|
||||||
|
f.num(), f.recno(), numreg, numrig, f.status());
|
||||||
|
#endif
|
||||||
|
|
||||||
return f.status();
|
return f.status();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,6 +241,7 @@ BEGIN
|
|||||||
ITEM "4|4. Vendita beni strumentali art. 17"
|
ITEM "4|4. Vendita beni strumentali art. 17"
|
||||||
ITEM "5|5. Beni per rivendita da non ventilare"
|
ITEM "5|5. Beni per rivendita da non ventilare"
|
||||||
ITEM "8|8. Altri beni strumentali acquistati in leasing"
|
ITEM "8|8. Altri beni strumentali acquistati in leasing"
|
||||||
|
ITEM "9|9. Spese generali"
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
HELP "Tipo Costo/Ricavo del conto"
|
HELP "Tipo Costo/Ricavo del conto"
|
||||||
END
|
END
|
||||||
|
@ -6,10 +6,8 @@
|
|||||||
// *TBI* Aggiornamento cespiti
|
// *TBI* Aggiornamento cespiti
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
//#if XVT_OS == XVT_OS_SCOUNIX
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
//#endif
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <isam.h>
|
#include <isam.h>
|
||||||
@ -42,7 +40,8 @@ struct therec {
|
|||||||
class CG4100_App : public TApplication
|
class CG4100_App : public TApplication
|
||||||
{
|
{
|
||||||
TString _year;
|
TString _year;
|
||||||
char _optype;
|
char _optype;
|
||||||
|
TMask* _msk;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -78,9 +77,13 @@ bool CG4100_App::create()
|
|||||||
if (fexist("__mov__.sav"))
|
if (fexist("__mov__.sav"))
|
||||||
warning_box("Un'operazione di riordino movimenti si e' conclusa"
|
warning_box("Un'operazione di riordino movimenti si e' conclusa"
|
||||||
" impropriamente. Si raccomanda di rieseguirla");
|
" impropriamente. Si raccomanda di rieseguirla");
|
||||||
|
|
||||||
if (argc() > 2)
|
if (argc() > 2)
|
||||||
_optype = toupper(argv(2)[0]);
|
_optype = toupper(argv(2)[0]);
|
||||||
dispatch_e_menu(MENU_ITEM(1));
|
|
||||||
|
_msk = new TMask(_optype == 'S' ? "cg4100b" : "cg4100a");
|
||||||
|
|
||||||
|
dispatch_e_menu(MENU_ITEM(1));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,33 +93,30 @@ bool CG4100_App::destroy()
|
|||||||
#if XVT_OS == XVT_OS_SCOUNIX
|
#if XVT_OS == XVT_OS_SCOUNIX
|
||||||
signal(SIGINT,SIG_DFL);
|
signal(SIGINT,SIG_DFL);
|
||||||
#endif
|
#endif
|
||||||
|
delete _msk;
|
||||||
return TApplication::destroy();
|
return TApplication::destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG4100_App::set_parms()
|
bool CG4100_App::set_parms()
|
||||||
{
|
{
|
||||||
const bool saldi = _optype == 'S';
|
_msk->run();
|
||||||
TMask m(saldi ? "cg4100b" : "cg4100a");
|
|
||||||
|
|
||||||
m.run();
|
if (_optype == 'S')
|
||||||
|
_year = _msk->get(FLD_CG41_YEAR);
|
||||||
if (saldi)
|
|
||||||
_year = m.get(FLD_CG41_YEAR);
|
|
||||||
else
|
else
|
||||||
_year = 0;
|
_year = 0;
|
||||||
|
|
||||||
return m.last_key() == K_ENTER;
|
return _msk->last_key() == K_ENTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CG4100_App::menu(MENU_TAG m)
|
bool CG4100_App::menu(MENU_TAG)
|
||||||
{
|
{
|
||||||
if (_optype == 'S')
|
if (_optype == 'S')
|
||||||
sort_sal();
|
sort_sal();
|
||||||
else
|
else
|
||||||
if (_optype == 'M')
|
sort_mov();
|
||||||
sort_mov();
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,7 +417,7 @@ bool CG4100_App::sort_sal()
|
|||||||
int cg4100(int argc, char* argv[])
|
int cg4100(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
CG4100_App main_app;
|
CG4100_App main_app;
|
||||||
main_app.run(argc, argv, "Riordinamento movimenti/Ricalcolo Saldi");
|
main_app.run(argc, argv, "Ricalcolo Saldi");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
124
cg/cg4400.cpp
124
cg/cg4400.cpp
@ -1,10 +1,132 @@
|
|||||||
|
#include <config.h>
|
||||||
|
#include <execp.h>
|
||||||
|
#include <isam.h>
|
||||||
|
#include <mailbox.h>
|
||||||
|
#include <mask.h>
|
||||||
|
#include <prefix.h>
|
||||||
|
#include <printapp.h>
|
||||||
|
#include <sheet.h>
|
||||||
|
#include <tabutil.h>
|
||||||
|
#include <text.h>
|
||||||
|
#include <utility.h>
|
||||||
|
#include <urldefid.h>
|
||||||
|
|
||||||
|
#include "conto.h"
|
||||||
|
#include "cglib03.h"
|
||||||
|
|
||||||
|
#include <nditte.h>
|
||||||
|
#include <anagr.h>
|
||||||
|
#include <comuni.h>
|
||||||
|
#include <unloc.h>
|
||||||
|
#include <mov.h>
|
||||||
|
#include <rmoviva.h>
|
||||||
|
#include <clifo.h>
|
||||||
|
#include <occas.h>
|
||||||
|
#include <causali.h>
|
||||||
|
|
||||||
|
|
||||||
// cg4400.cpp
|
// cg4400.cpp
|
||||||
// Stampa registri IVA
|
// Stampa registri IVA
|
||||||
#include "cg4.h"
|
#include "cg4.h"
|
||||||
#include "cg4400.h"
|
|
||||||
#include "cg4400a.h"
|
#include "cg4400a.h"
|
||||||
#include "cg4400b.h"
|
#include "cg4400b.h"
|
||||||
|
|
||||||
|
const int TABREG = (int)TTable::name2log("REG");
|
||||||
|
|
||||||
|
class CG4400_application : public TPrintapp
|
||||||
|
{
|
||||||
|
TCursor * _cur;
|
||||||
|
TRelation *_rel;
|
||||||
|
TLocalisamfile *_clifo, *_nditte, *_occas, *_tab, *_tabcom, *_com, *_anag, *_unloc, *_attiv;
|
||||||
|
TTable *_tabreg, *_tablbu, *_tabinl, *_tablim, *_tabpim, *_tablia, *_tabiva;
|
||||||
|
TTable *_tabpla, *_tabppa, *_tabvid;
|
||||||
|
TRigaiva_array _iva_array, _riga_rmi;
|
||||||
|
TTipodoc_array _doc_array;
|
||||||
|
TRiga_array _tot_iva_array;
|
||||||
|
|
||||||
|
TBit_array _selected;
|
||||||
|
TArray_sheet *_ditte;
|
||||||
|
bool _st_liq[12];
|
||||||
|
TRecnotype _nrec;
|
||||||
|
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 _rif_vid, _intesta_vidi, _intesta_liq, _stampa_data_reg, _ok_vidi;
|
||||||
|
char _frequiva, _tipo_riepilogativo;
|
||||||
|
TDate _data_da, _data_a, _data_stampa, _dataregp, _dataregs, _datareg;
|
||||||
|
TDate _u_data;
|
||||||
|
long _n_ditte, _u_stampata, _primast, __firm, _uprotivap;
|
||||||
|
long _numini, _pagine_stampate;
|
||||||
|
int _fino_a_mese, _tipo_reg, _tipo_stampa, _cod_un_loc;
|
||||||
|
int _annoes, _r, _stampa_width, _mese_ultima_liq, _mese_credito;
|
||||||
|
int _stampa_len, _stampa_mese;
|
||||||
|
real _totale_doc, _credito;
|
||||||
|
TString _codreg, _desc_lib, _codatt, _attivita, _tipoatt;
|
||||||
|
TString _tipodoc, _descr_doc, _codlib, _codice_vidi;
|
||||||
|
TString _cofi,_cap,_paiva,_ragsoc,_comunefis,_provfis,_viafis;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
const char* desc_attivita ();
|
||||||
|
const char* tipo_attivita ();
|
||||||
|
const char* descr_doc ();
|
||||||
|
const char* descr_iva (const char *);
|
||||||
|
TRectype& ricerca_occ(const char*);
|
||||||
|
TRectype& ricerca_cf (char, long);
|
||||||
|
TRectype& look_comuni(const char*);
|
||||||
|
int setta_riga (int, const TRigaiva&, real&, real&, real&, real&);
|
||||||
|
int riga_rmoviva();
|
||||||
|
bool set_print(int);
|
||||||
|
bool set_ditte(TMask&);
|
||||||
|
bool compila_reg(const TMask&);
|
||||||
|
bool compila_lib();
|
||||||
|
bool controlla_liquidazione();
|
||||||
|
bool controlla_mov();
|
||||||
|
bool stampo_liquidazione(int);
|
||||||
|
bool ventilazione(const char*);
|
||||||
|
bool cerca_libro_gio(TString&);
|
||||||
|
bool look_reg (long, int, TString&, int, const char*, int*);
|
||||||
|
bool look_regs(int, TString&, int, int*);
|
||||||
|
bool stampa_totali_finali();
|
||||||
|
bool stampa_datareg();
|
||||||
|
bool stampa_registri_IVA(const TMask&);
|
||||||
|
void cerca_reg(const TString&, byte*);
|
||||||
|
void set_page_tot_reg();
|
||||||
|
void send_message(char, const TFilename&,int);
|
||||||
|
void aggiorna_reg();
|
||||||
|
void aggiorna_lib();
|
||||||
|
void calcola_progressivi();
|
||||||
|
bool user_create();
|
||||||
|
bool user_destroy();
|
||||||
|
bool preprocess_page(int, int);
|
||||||
|
int stampa_intestazione();
|
||||||
|
int stampa_prospetto();
|
||||||
|
void stampa_plafonds(int);
|
||||||
|
void get_dati_ditta();
|
||||||
|
void stampa_vidi();
|
||||||
|
int stampa_acquisti(int);
|
||||||
|
real stampa_valori_plafonds(const real&, const int, TTable&);
|
||||||
|
bool preprocess_print(int, int);
|
||||||
|
//print_action postprocess_print(int, int);
|
||||||
|
print_action postprocess_page (int, int);
|
||||||
|
void preprocess_header();
|
||||||
|
|
||||||
|
static bool filter_func (const TRelation * r);
|
||||||
|
|
||||||
|
static bool mask_tipo_stampa (TMask_field&, KEY);
|
||||||
|
static bool mask_firm_to (TMask_field&, KEY);
|
||||||
|
static bool mask_cod (TMask_field&, KEY);
|
||||||
|
static bool mask_libun (TMask_field&, KEY);
|
||||||
|
static bool mask_data (TMask_field&, KEY);
|
||||||
|
static bool mask_mese (TMask_field&, KEY);
|
||||||
|
static bool mask_fino_a_mese (TMask_field&, KEY);
|
||||||
|
static bool mask_select (TMask_field&, KEY);
|
||||||
|
static bool mask_azzera (TMask_field&, KEY);
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
CG4400_application() : TPrintapp(), _ditte(NULL) {}
|
||||||
|
virtual ~CG4400_application() {}
|
||||||
|
};
|
||||||
|
|
||||||
static TString256 TMP;
|
static TString256 TMP;
|
||||||
|
|
||||||
inline CG4400_application& app() { return (CG4400_application&)main_app(); }
|
inline CG4400_application& app() { return (CG4400_application&)main_app(); }
|
||||||
|
10
cg/cglib.h
10
cg/cglib.h
@ -74,10 +74,10 @@ public:
|
|||||||
bool prg_attuali(int,TConto&,real&,real&);
|
bool prg_attuali(int,TConto&,real&,real&);
|
||||||
bool prg_mov_eliminati(int,TConto&,real&,real&);
|
bool prg_mov_eliminati(int,TConto&,real&,real&);
|
||||||
|
|
||||||
real saldo() const {return _saldo;}
|
const real& saldo() const { return _saldo;}
|
||||||
real saldoini() const {return _saldo_iniziale;}
|
const real& saldoini() const { return _saldo_iniziale;}
|
||||||
real prgdare() const {return _prg_dare;}
|
const real& prgdare() const { return _prg_dare;}
|
||||||
real prgavere() const {return _prg_avere;}
|
const real& prgavere() const { return _prg_avere;}
|
||||||
bool prg_attuali(int,TConto&,int,real&,real&);
|
bool prg_attuali(int,TConto&,int,real&,real&);
|
||||||
bool prg_mov_eliminati(int,TConto&,int,real&,real&);
|
bool prg_mov_eliminati(int,TConto&,int,real&,real&);
|
||||||
Saldo();
|
Saldo();
|
||||||
@ -123,7 +123,7 @@ public:
|
|||||||
bool movap() const { return _movap; }
|
bool movap() const { return _movap; }
|
||||||
|
|
||||||
void set_movprovv (bool p) { _provv = p; }
|
void set_movprovv (bool p) { _provv = p; }
|
||||||
bool movprovv() { return _provv; }
|
bool movprovv() const { return _provv; }
|
||||||
|
|
||||||
void set_data_ulmov (const TDate& data) { _data_ulmov = data; }
|
void set_data_ulmov (const TDate& data) { _data_ulmov = data; }
|
||||||
const TDate& data_ulmov() const { return _data_ulmov; }
|
const TDate& data_ulmov() const { return _data_ulmov; }
|
||||||
|
@ -8,9 +8,10 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <isam.h>
|
#include <isam.h>
|
||||||
#include <saldi.h>
|
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
|
||||||
|
#include <saldi.h>
|
||||||
|
|
||||||
#include "conto.h"
|
#include "conto.h"
|
||||||
#include "cglib.h"
|
#include "cglib.h"
|
||||||
|
|
||||||
@ -167,18 +168,48 @@ void TSaldo_agg::registra()
|
|||||||
int conti = _tab_conti.items();
|
int conti = _tab_conti.items();
|
||||||
|
|
||||||
_tab_conti.restart();
|
_tab_conti.restart();
|
||||||
for (int i=0; i < conti; i++)
|
for (int i = 0; i < conti; i++)
|
||||||
{
|
{
|
||||||
THash_object * hobj = tconti();
|
THash_object * hobj = tconti();
|
||||||
TConto & tcon = (TConto &)hobj->obj();
|
const TConto& tcon = (TConto &)hobj->obj();
|
||||||
|
CHECK(tcon.ok(), "Tentativo di saldare un conto incompleto");
|
||||||
|
|
||||||
if (!tcon.ok()) continue;
|
|
||||||
saldi.zero();
|
saldi.zero();
|
||||||
saldi.put(SLD_ANNOES, atoi(hobj->key().left(4)) );
|
saldi.put(SLD_ANNOES, atoi(hobj->key().left(4)) );
|
||||||
saldi.put(SLD_GRUPPO, tcon.gruppo());
|
saldi.put(SLD_GRUPPO, tcon.gruppo());
|
||||||
saldi.put(SLD_CONTO, tcon.conto());
|
saldi.put(SLD_CONTO, tcon.conto());
|
||||||
saldi.put(SLD_SOTTOCONTO, tcon.sottoconto());
|
saldi.put(SLD_SOTTOCONTO, tcon.sottoconto());
|
||||||
if (saldi.read(_isequal, _lock) == NOERR)
|
|
||||||
|
bool update = TRUE;
|
||||||
|
|
||||||
|
if (saldi.read(_isequal, _lock) != NOERR)
|
||||||
|
{
|
||||||
|
saldi.zero();
|
||||||
|
saldi.put(SLD_ANNOES, anno_es());
|
||||||
|
saldi.put(SLD_GRUPPO, tcon.gruppo());
|
||||||
|
saldi.put(SLD_CONTO, tcon.conto());
|
||||||
|
saldi.put(SLD_SOTTOCONTO, tcon.sottoconto());
|
||||||
|
s = tcon.saldo();
|
||||||
|
if (s < ZERO)
|
||||||
|
{ Flagsalini = "A"; s = -s; }
|
||||||
|
else
|
||||||
|
Flagsalini = "D";
|
||||||
|
|
||||||
|
saldi.put(SLD_FLAGSALINI, (const char *) Flagsalini);
|
||||||
|
saldi.put(SLD_SALDO, s);
|
||||||
|
saldi.put(SLD_PDAREPRO, tcon.darepro());
|
||||||
|
saldi.put(SLD_PAVEREPRO, tcon.averepro());
|
||||||
|
saldi.put(SLD_PDARE, tcon.dare());
|
||||||
|
|
||||||
|
saldi.put(SLD_PAVERE, tcon.avere());
|
||||||
|
if (_num_ulmov != 0L) saldi.put(SLD_NUMULTMOV, _num_ulmov);
|
||||||
|
if (_data_ulmov.ok()) saldi.put(SLD_DATAULMOV, _data_ulmov);
|
||||||
|
update = saldi.write() == _isreinsert;
|
||||||
|
if (update)
|
||||||
|
saldi.read(_isequal, _lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (update)
|
||||||
{
|
{
|
||||||
num_ulmov = saldi.get_long(SLD_NUMULTMOV);
|
num_ulmov = saldi.get_long(SLD_NUMULTMOV);
|
||||||
data_ulmov = saldi.get_date(SLD_DATAULMOV);
|
data_ulmov = saldi.get_date(SLD_DATAULMOV);
|
||||||
@ -202,7 +233,7 @@ void TSaldo_agg::registra()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
Flagsalini = "D";
|
Flagsalini = "D";
|
||||||
saldi.put(SLD_FLAGSALINI, (const char *) Flagsalini);
|
saldi.put(SLD_FLAGSALINI, Flagsalini);
|
||||||
saldi.put(SLD_SALDO, s);
|
saldi.put(SLD_SALDO, s);
|
||||||
}
|
}
|
||||||
r = saldi.get_real(SLD_PDAREPRO);
|
r = saldi.get_real(SLD_PDAREPRO);
|
||||||
@ -219,32 +250,6 @@ void TSaldo_agg::registra()
|
|||||||
saldi.put(SLD_PAVERE, r);
|
saldi.put(SLD_PAVERE, r);
|
||||||
saldi.rewrite();
|
saldi.rewrite();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
saldi.zero();
|
|
||||||
saldi.put(SLD_ANNOES, anno_es());
|
|
||||||
saldi.put(SLD_GRUPPO, tcon.gruppo());
|
|
||||||
saldi.put(SLD_CONTO, tcon.conto());
|
|
||||||
saldi.put(SLD_SOTTOCONTO, tcon.sottoconto());
|
|
||||||
s = tcon.saldo();
|
|
||||||
if (s < ZERO)
|
|
||||||
{
|
|
||||||
Flagsalini = "A"; s = -s;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Flagsalini = "D";
|
|
||||||
|
|
||||||
saldi.put(SLD_FLAGSALINI, (const char *) Flagsalini);
|
|
||||||
saldi.put(SLD_SALDO, s);
|
|
||||||
saldi.put(SLD_PDAREPRO, tcon.darepro());
|
|
||||||
saldi.put(SLD_PAVEREPRO, tcon.averepro());
|
|
||||||
saldi.put(SLD_PDARE, tcon.dare());
|
|
||||||
|
|
||||||
saldi.put(SLD_PAVERE, tcon.avere());
|
|
||||||
if (_num_ulmov != 0L) saldi.put(SLD_NUMULTMOV, _num_ulmov);
|
|
||||||
if (_data_ulmov.ok()) saldi.put(SLD_DATAULMOV, _data_ulmov);
|
|
||||||
saldi.write();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
11
cg/conto.h
11
cg/conto.h
@ -71,10 +71,19 @@ public:
|
|||||||
: TBill(tgcsd, from, mode) {};
|
: TBill(tgcsd, from, mode) {};
|
||||||
|
|
||||||
real& dare() { return _dare; }
|
real& dare() { return _dare; }
|
||||||
|
const real& dare() const { return _dare; }
|
||||||
|
|
||||||
real& avere() { return _avere; }
|
real& avere() { return _avere; }
|
||||||
|
const real& avere() const { return _avere; }
|
||||||
|
|
||||||
real& darepro() { return _darepro; }
|
real& darepro() { return _darepro; }
|
||||||
|
const real& darepro() const { return _darepro; }
|
||||||
|
|
||||||
real& averepro() { return _averepro; }
|
real& averepro() { return _averepro; }
|
||||||
real& saldo() { return _saldo; }
|
const real& averepro() const { return _averepro; }
|
||||||
|
|
||||||
|
real& saldo() { return _saldo; }
|
||||||
|
const real& saldo() const { return _saldo; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user