cg1500.* Stampa importi a 16 caratteri sulla stampa bilanci
cg1600.* Stampa importi a 16 caratteri sulla stampa IV direttiva cg2100.* Supporto per il fantastico Easydoc (quando funzionera'?) git-svn-id: svn://10.65.10.50/trunk@5382 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a62083685c
commit
9d40ef1982
862
cg/cg1500.cpp
862
cg/cg1500.cpp
File diff suppressed because it is too large
Load Diff
@ -22,6 +22,8 @@
|
|||||||
#define F_MODULO 121
|
#define F_MODULO 121
|
||||||
#define F_STAMPAMPROV 122
|
#define F_STAMPAMPROV 122
|
||||||
#define F_QUADRATURA 123
|
#define F_QUADRATURA 123
|
||||||
|
#define F_SEPARATOR 124
|
||||||
|
#define F_PICTURE 125
|
||||||
|
|
||||||
#endif // __CG1500_H
|
#endif // __CG1500_H
|
||||||
|
|
||||||
|
@ -199,7 +199,6 @@ END
|
|||||||
RADIOBUTTON F_STAMPAC 36
|
RADIOBUTTON F_STAMPAC 36
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 34 1 "Tipo stampa "
|
PROMPT 34 1 "Tipo stampa "
|
||||||
HELP "Help tipo di stampa del bilancio"
|
|
||||||
ITEM "1|Conti movimentati"
|
ITEM "1|Conti movimentati"
|
||||||
ITEM "2|Conti con saldo diverso da zero"
|
ITEM "2|Conti con saldo diverso da zero"
|
||||||
END
|
END
|
||||||
@ -207,34 +206,35 @@ END
|
|||||||
RADIOBUTTON F_STAMPAV 36
|
RADIOBUTTON F_STAMPAV 36
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 34 1 "Tipo stampa "
|
PROMPT 34 1 "Tipo stampa "
|
||||||
HELP "Help tipo di stampa del bilancio"
|
|
||||||
ITEM "1|Conti movimentati"
|
ITEM "1|Conti movimentati"
|
||||||
ITEM "2|Conti con saldo diverso da zero"
|
ITEM "2|Conti con saldo diverso da zero"
|
||||||
ITEM "3|Tutti i conti"
|
ITEM "3|Tutti i conti"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_SEPARATOR
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 7 "Non stampare i separatori delle migliaia"
|
||||||
|
MESSAGE FALSE " 123.456.789.012",F_PICTURE
|
||||||
|
MESSAGE TRUE "1234567890123456",F_PICTURE
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_PICTURE 16
|
||||||
|
BEGIN
|
||||||
|
PROMPT 50 7 ""
|
||||||
|
FLAGS "DR"
|
||||||
|
END
|
||||||
|
|
||||||
LIST F_SITUAZIONE 11
|
LIST F_SITUAZIONE 11
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 10 "Tipo situazione "
|
PROMPT 2 10 "Tipo situazione "
|
||||||
HELP "Indicare il tipo di situazione che si vuole ottenere"
|
|
||||||
ITEM " |Entrambi"
|
ITEM " |Entrambi"
|
||||||
ITEM "C|Clienti"
|
ITEM "C|Clienti"
|
||||||
ITEM "F|Fornitori"
|
ITEM "F|Fornitori"
|
||||||
END
|
END
|
||||||
|
|
||||||
/*
|
|
||||||
RADIOBUTTON F_STAMPAC 35
|
|
||||||
BEGIN
|
|
||||||
PROMPT 37 10 "Tipo stampa "
|
|
||||||
ITEM "1|Conti movimentati"
|
|
||||||
ITEM "2|Conti con saldo diverso da zero"
|
|
||||||
END
|
|
||||||
*/
|
|
||||||
|
|
||||||
LIST F_ORDINAMENTO 11
|
LIST F_ORDINAMENTO 11
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 11 "Tipo ordinamento "
|
PROMPT 2 11 "Tipo ordinamento "
|
||||||
HELP "Indicare il tipo di ordinamento da effettuare"
|
|
||||||
ITEM "1|Per codice"
|
ITEM "1|Per codice"
|
||||||
ITEM "2|Alfabetico"
|
ITEM "2|Alfabetico"
|
||||||
END
|
END
|
||||||
|
851
cg/cg1600.cpp
851
cg/cg1600.cpp
File diff suppressed because it is too large
Load Diff
@ -23,6 +23,8 @@
|
|||||||
#define F_ANNORAFFR 117
|
#define F_ANNORAFFR 117
|
||||||
#define F_STAMPAMOVPROV 118
|
#define F_STAMPAMOVPROV 118
|
||||||
#define F_QUADRATURA 119
|
#define F_QUADRATURA 119
|
||||||
|
#define F_SEPARATOR 120
|
||||||
|
#define F_PICTURE 121
|
||||||
|
|
||||||
#endif // __CG1600_H
|
#endif // __CG1600_H
|
||||||
|
|
||||||
|
@ -62,10 +62,10 @@ BEGIN
|
|||||||
HELP "Indicare il tipo di bilancio da stampare"
|
HELP "Indicare il tipo di bilancio da stampare"
|
||||||
ITEM "1|Bilancio scalare"
|
ITEM "1|Bilancio scalare"
|
||||||
MESSAGE HIDE,F_TIPOSTAMPA1|RESET,F_TIPOSTAMPA1|SHOW,F_TIPOSTAMPA|K_SPACE,F_TIPOSTAMPA
|
MESSAGE HIDE,F_TIPOSTAMPA1|RESET,F_TIPOSTAMPA1|SHOW,F_TIPOSTAMPA|K_SPACE,F_TIPOSTAMPA
|
||||||
MESSAGE SHOW,F_ANNORAFFR|SHOW,F_DATABILRAF
|
MESSAGE SHOW,F_ANNORAFFR|SHOW,F_DATABILRAF|HIDE,F_SEPARATOR
|
||||||
ITEM "2|Bilancio di verifica"
|
ITEM "2|Bilancio di verifica"
|
||||||
MESSAGE HIDE,F_TIPOSTAMPA|RESET,F_TIPOSTAMPA|SHOW,F_TIPOSTAMPA1|K_SPACE,F_TIPOSTAMPA1
|
MESSAGE HIDE,F_TIPOSTAMPA|RESET,F_TIPOSTAMPA|SHOW,F_TIPOSTAMPA1|K_SPACE,F_TIPOSTAMPA1
|
||||||
MESSAGE HIDE,F_ANNORAFFR|HIDE,F_DATABILRAF
|
MESSAGE HIDE,F_ANNORAFFR|HIDE,F_DATABILRAF|SHOW,F_SEPARATOR
|
||||||
END
|
END
|
||||||
|
|
||||||
LIST F_TIPOSTAMPA 23
|
LIST F_TIPOSTAMPA 23
|
||||||
@ -193,6 +193,12 @@ BEGIN
|
|||||||
PROMPT 4 14 "Quadratura con Libro Giornale"
|
PROMPT 4 14 "Quadratura con Libro Giornale"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_SEPARATOR
|
||||||
|
BEGIN
|
||||||
|
PROMPT 4 15 "Non stampare il separatre delle migliaia"
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
BUTTON DLG_OK 9 2
|
BUTTON DLG_OK 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -12 -1 ""
|
PROMPT -12 -1 ""
|
||||||
|
@ -140,6 +140,12 @@ TMask* TPrimanota_application::load_mask(int n)
|
|||||||
m->set_handler(SK_DATACAMBIO, datacambio_handler);
|
m->set_handler(SK_DATACAMBIO, datacambio_handler);
|
||||||
m->set_handler(SK_CAMBIO, cambio_handler);
|
m->set_handler(SK_CAMBIO, cambio_handler);
|
||||||
m->set_handler(SK_TOTDOCVAL, totdocval_handler);
|
m->set_handler(SK_TOTDOCVAL, totdocval_handler);
|
||||||
|
|
||||||
|
if (easydoc_installed())
|
||||||
|
{
|
||||||
|
m->show(F_EASYDOC);
|
||||||
|
m->set_handler(F_EASYDOC, easydoc_handler);
|
||||||
|
}
|
||||||
|
|
||||||
TSheet_field& cg = (TSheet_field&)m->field(F_SHEETCG);
|
TSheet_field& cg = (TSheet_field&)m->field(F_SHEETCG);
|
||||||
cg.set_notify(cg_notify);
|
cg.set_notify(cg_notify);
|
||||||
@ -1162,6 +1168,9 @@ bool TPrimanota_application::remove()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
link_cesp(m, "Remove");
|
link_cesp(m, "Remove");
|
||||||
|
|
||||||
|
if (easydoc_connected())
|
||||||
|
run_easydoc("Elimina");
|
||||||
}
|
}
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
@ -1629,6 +1638,10 @@ bool TPrimanota_application::link_cesp(const TMask& msk, const char* action)
|
|||||||
if (causale().link_cespiti() <= ' ')
|
if (causale().link_cespiti() <= ' ')
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
// Controlla l'esistenza del programma cespiti
|
||||||
|
if (!fexist("cespcg.exe"))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
// Cerca una riga con tipo costo/ricavo
|
// Cerca una riga con tipo costo/ricavo
|
||||||
for (int i = _rel->cg_items()-1; i >= 0; i--)
|
for (int i = _rel->cg_items()-1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
@ -1641,10 +1654,6 @@ bool TPrimanota_application::link_cesp(const TMask& msk, const char* action)
|
|||||||
if (i < 0)
|
if (i < 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// Controlla l'esistenza del programma cespiti
|
|
||||||
if (!fexist("cespcg.exe"))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
TFilename cespini;
|
TFilename cespini;
|
||||||
cespini.tempdir();
|
cespini.tempdir();
|
||||||
cespini.add("ActCsp.ini");
|
cespini.add("ActCsp.ini");
|
||||||
@ -1656,7 +1665,7 @@ bool TPrimanota_application::link_cesp(const TMask& msk, const char* action)
|
|||||||
TString appname;
|
TString appname;
|
||||||
appname << "cespcg -t /i" << cespini;
|
appname << "cespcg -t /i" << cespini;
|
||||||
TExternal_app app(appname);
|
TExternal_app app(appname);
|
||||||
bool ok = app.run() == 0;
|
bool ok = app.run(FALSE, 0x3) == 0; // Force user name!
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
#define F_STAMPATO 143
|
#define F_STAMPATO 143
|
||||||
#define F_REGST 144
|
#define F_REGST 144
|
||||||
#define F_ADJUST_PRORATA 145
|
#define F_ADJUST_PRORATA 145
|
||||||
|
#define F_EASYDOC 146
|
||||||
|
|
||||||
#define F_SHEETCG 190
|
#define F_SHEETCG 190
|
||||||
#define F_SHEETIVA 191
|
#define F_SHEETIVA 191
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
#include "cg2100.h"
|
#include "cg2100.h"
|
||||||
|
|
||||||
TOOLBAR "" 0 20 0 2
|
TOOLBAR "" 0 19 0 3
|
||||||
|
|
||||||
#include <toolbar.h>
|
#include <toolbar.h>
|
||||||
|
|
||||||
|
BUTTON F_EASYDOC 10
|
||||||
|
BEGIN
|
||||||
|
PROMPT -66 -3 "&Immagine"
|
||||||
|
FLAGS "H"
|
||||||
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Testata" -1 -1 77 20
|
PAGE "Testata" -1 -1 77 20
|
||||||
|
@ -11,6 +11,12 @@ BEGIN
|
|||||||
FLAGS "H"
|
FLAGS "H"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BUTTON F_EASYDOC 10
|
||||||
|
BEGIN
|
||||||
|
PROMPT -66 -3 "&Immagine"
|
||||||
|
FLAGS "H"
|
||||||
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Testata" -1 -1 77 20
|
PAGE "Testata" -1 -1 77 20
|
||||||
|
@ -1121,12 +1121,15 @@ bool TPrimanota_application::codiva_handler(TMask_field& f, KEY key)
|
|||||||
TMask_field& im = m.field(101);
|
TMask_field& im = m.field(101);
|
||||||
im.set_dirty();
|
im.set_dirty();
|
||||||
im.on_hit();
|
im.on_hit();
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (key == K_ENTER)
|
if (key == K_ENTER)
|
||||||
{
|
{
|
||||||
if (f.get().empty() && f.mask().get(101).not_empty())
|
if (f.get().empty() && f.mask().get(101).not_empty())
|
||||||
return f.error_box("Codice IVA obbligatorio");
|
return f.error_box("Codice IVA obbligatorio");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1463,7 +1466,11 @@ bool TPrimanota_application::iva_handler(TMask_field& f, KEY k)
|
|||||||
TToken_string& row = iva.row(i);
|
TToken_string& row = iva.row(i);
|
||||||
const real im(row.get(0));
|
const real im(row.get(0));
|
||||||
if (!im.is_zero())
|
if (!im.is_zero())
|
||||||
{
|
{
|
||||||
|
const TFixed_string codiva = row.get(1);
|
||||||
|
if (codiva.blank())
|
||||||
|
return error_box("Il codice IVA della riga %d e' obbligatorio", i+1);
|
||||||
|
|
||||||
TBill c(row, 5, 0x1);
|
TBill c(row, 5, 0x1);
|
||||||
if (!c.ok() || !c.find())
|
if (!c.ok() || !c.find())
|
||||||
return error_box("Il conto della riga iva %d e' errato o incompleto", i+1);
|
return error_box("Il conto della riga iva %d e' errato o incompleto", i+1);
|
||||||
|
@ -137,6 +137,7 @@ class TPrimanota_application : public TRelation_application
|
|||||||
|
|
||||||
static bool pag_notify(TSheet_field& s, int r, KEY key);
|
static bool pag_notify(TSheet_field& s, int r, KEY key);
|
||||||
static bool pag_sheet_handler(TMask_field& f, KEY key);
|
static bool pag_sheet_handler(TMask_field& f, KEY key);
|
||||||
|
static bool easydoc_handler(TMask_field& f, KEY k);
|
||||||
|
|
||||||
void reset_sheet_row(TSheet_field& s, int n);
|
void reset_sheet_row(TSheet_field& s, int n);
|
||||||
int crea_somma_spese(TImporto& imp);
|
int crea_somma_spese(TImporto& imp);
|
||||||
@ -286,7 +287,12 @@ public:
|
|||||||
TString_array& pag_rows() { return _pag_rows; }
|
TString_array& pag_rows() { return _pag_rows; }
|
||||||
TImporto get_cgs_imp(int n);
|
TImporto get_cgs_imp(int n);
|
||||||
|
|
||||||
|
bool easydoc_installed() const;
|
||||||
|
bool easydoc_connected() const;
|
||||||
|
bool run_easydoc(const char* azione) const;
|
||||||
|
|
||||||
TPrimanota_application();
|
TPrimanota_application();
|
||||||
|
virtual ~TPrimanota_application() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
inline TPrimanota_application& app()
|
inline TPrimanota_application& app()
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
#include <colors.h>
|
#include <colors.h>
|
||||||
|
#include <execp.h>
|
||||||
|
#include <modaut.h>
|
||||||
|
#include <utility.h>
|
||||||
#include <varmask.h>
|
#include <varmask.h>
|
||||||
|
|
||||||
|
#include "cg2100.h"
|
||||||
#include "cg2102.h"
|
#include "cg2102.h"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -322,6 +326,7 @@ bool TPrimanota_application::test_prorata()
|
|||||||
ok = !esiste_riga_iva_detraibile;
|
ok = !esiste_riga_iva_detraibile;
|
||||||
else
|
else
|
||||||
ok = esiste_riga_iva_detraibile;
|
ok = esiste_riga_iva_detraibile;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
@ -375,3 +380,77 @@ bool TPrimanota_application::prorata_handler(TMask_field& f, KEY k)
|
|||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// Gestione EasyDoc
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
bool TPrimanota_application::easydoc_installed() const
|
||||||
|
{
|
||||||
|
bool ok = has_module(AIAUT);
|
||||||
|
ok &= fexist("C:/EASYDOC/EASYDOC.EXE");
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TPrimanota_application::easydoc_connected() const
|
||||||
|
{
|
||||||
|
return easydoc_installed();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TPrimanota_application::run_easydoc(const char* azione) const
|
||||||
|
{
|
||||||
|
const TMask& m = curr_mask();
|
||||||
|
|
||||||
|
TString cmdline = "c:/EASYDOC/EASYDOC ";
|
||||||
|
TFilename ininame;
|
||||||
|
|
||||||
|
if (azione && *azione)
|
||||||
|
{
|
||||||
|
ininame.tempdir(); ininame.add("easydoc.ini");
|
||||||
|
cmdline << ' ' << ininame;
|
||||||
|
|
||||||
|
TConfig ini(ininame, "EASYDOC");
|
||||||
|
ini.set("Azione", azione);
|
||||||
|
|
||||||
|
TFilename archivio = get_firm_dir(); archivio.add("easydoc.mdb");
|
||||||
|
ini.set("Archivio", archivio);
|
||||||
|
ini.set("Cartella", "mov");
|
||||||
|
ini.set("Campo1", m.get(F_NUMREG));
|
||||||
|
if (stricmp("Azione", "Scan") == 0 || stricmp("Azione", "Aggiungi") == 0)
|
||||||
|
{
|
||||||
|
ini.set("Campo2", m.get(F_DATAREG));
|
||||||
|
ini.set("Descrizione", m.get(F_DESCR));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TExternal_app app(cmdline);
|
||||||
|
bool ok = app.run(FALSE, FALSE) == 0;
|
||||||
|
|
||||||
|
if (ininame.not_empty())
|
||||||
|
::remove(ininame);
|
||||||
|
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TPrimanota_application::easydoc_handler(TMask_field& f, KEY k)
|
||||||
|
{
|
||||||
|
if (k == K_SPACE)
|
||||||
|
{
|
||||||
|
const TMask& m = f.mask();
|
||||||
|
if (m.insert_mode())
|
||||||
|
app().run_easydoc("Scan");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (m.edit_mode())
|
||||||
|
{
|
||||||
|
if (app().easydoc_connected())
|
||||||
|
app().run_easydoc("Visualizza");
|
||||||
|
else
|
||||||
|
app().run_easydoc("Scan");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
app().run_easydoc("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
@ -363,6 +363,8 @@ END
|
|||||||
BUTTON DLG_DELREC 9 2
|
BUTTON DLG_DELREC 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -34 -1 "Elimina"
|
PROMPT -34 -1 "Elimina"
|
||||||
|
PICTURE BMP_DELREC
|
||||||
|
PICTURE BMP_DELRECDN
|
||||||
MESSAGE EXIT,K_DEL
|
MESSAGE EXIT,K_DEL
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@ -255,6 +255,8 @@ END
|
|||||||
BUTTON DLG_DELREC 9 2
|
BUTTON DLG_DELREC 9 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -33 -1 "Elimina"
|
PROMPT -33 -1 "Elimina"
|
||||||
|
PICTURE BMP_DELREC
|
||||||
|
PICTURE BMP_DELRECDN
|
||||||
MESSAGE EXIT,K_DEL
|
MESSAGE EXIT,K_DEL
|
||||||
END
|
END
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user