Patch level : xx.811
Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione 1.5 fino alla patch 811 git-svn-id: svn://10.65.10.50/trunk@8985 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
623bb0d214
commit
cbb608d183
24
ba/ba0.cpp
24
ba/ba0.cpp
@ -1462,12 +1462,14 @@ bool TMenu_application::test_programs()
|
||||
TToken_string dangerous;
|
||||
|
||||
bool test = FALSE;
|
||||
bool more = FALSE;
|
||||
{
|
||||
TConfig prawin(CONFIG_INSTALL, "Main");
|
||||
test = prawin.get_bool("TestPrograms");
|
||||
}
|
||||
|
||||
if (test)
|
||||
TExternal_app app("ba1 -6");
|
||||
while (test)
|
||||
{
|
||||
TConfig install("install.ini", "Main");
|
||||
TFilename remote_name = install.get("DiskPath");
|
||||
@ -1499,22 +1501,22 @@ bool TMenu_application::test_programs()
|
||||
{
|
||||
dangerous.add(code);
|
||||
const TString& name = scan.token().mid(3);
|
||||
warning_box("ATTENZIONE: Il modulo %s\ndeve essere aggiornato prima di poterlo utilizzare.", (const char*)name);
|
||||
if (!more)
|
||||
warning_box("ATTENZIONE: Il modulo %s\ndeve essere aggiornato prima di poterlo utilizzare.", (const char*)name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dangerous.not_empty() && user() == dongle().administrator())
|
||||
{
|
||||
TExternal_app app("ba1 -6");
|
||||
app.run(TRUE, TRUE, FALSE);
|
||||
return FALSE;
|
||||
if (more)
|
||||
break;
|
||||
if (dangerous.empty() ||
|
||||
(!more && !yesno_box("Vuoi aggiornare i moduli adesso?")))
|
||||
break;
|
||||
app.run(FALSE, TRUE, TRUE, TRUE);
|
||||
more = TRUE; // ricontrolla
|
||||
}
|
||||
|
||||
_menu.set_dangerous_modules(dangerous);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1556,7 +1558,7 @@ bool TMenu_application::create()
|
||||
TFilename menu = (argc() < 2) ? "baprassi" : argv(1);
|
||||
menu.ext("men");
|
||||
_menu.read(menu);
|
||||
dispatch_e_menu(MENU_ITEM(1));
|
||||
dispatch_e_menu(MENU_ITEM(1));
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -1,8 +1,8 @@
|
||||
PAGE "Colori" -1 -1 50 20
|
||||
PAGE "Colori" -1 -1 50 19
|
||||
|
||||
GROUPBOX DLG_NULL 48 3
|
||||
BEGIN
|
||||
PROMPT 1 0 "Maschera"
|
||||
PROMPT 1 0 "@bMaschera"
|
||||
END
|
||||
|
||||
BUTTON 101 10
|
||||
@ -22,7 +22,7 @@ END
|
||||
|
||||
GROUPBOX DLG_NULL 14 4
|
||||
BEGIN
|
||||
PROMPT 1 3 "Normale"
|
||||
PROMPT 1 3 "@bNormale"
|
||||
END
|
||||
|
||||
BUTTON 104 10
|
||||
@ -37,7 +37,7 @@ END
|
||||
|
||||
GROUPBOX DLG_NULL 14 4
|
||||
BEGIN
|
||||
PROMPT 18 3 "Attivo"
|
||||
PROMPT 18 3 "@bAttivo"
|
||||
END
|
||||
|
||||
BUTTON 106 10
|
||||
@ -52,7 +52,7 @@ END
|
||||
|
||||
GROUPBOX DLG_NULL 14 4
|
||||
BEGIN
|
||||
PROMPT 35 3 "Disabilitato"
|
||||
PROMPT 35 3 "@bDisabilitato"
|
||||
END
|
||||
|
||||
BUTTON 108 10
|
||||
@ -72,7 +72,7 @@ END
|
||||
|
||||
GROUPBOX DLG_NULL 14 5
|
||||
BEGIN
|
||||
PROMPT 35 7 "Bottone"
|
||||
PROMPT 35 7 "@bBottone"
|
||||
END
|
||||
|
||||
BUTTON 110 10
|
||||
@ -95,6 +95,11 @@ BEGIN
|
||||
PROMPT 2 -1 "Campi 3D"
|
||||
END
|
||||
|
||||
BUTTON 114 10 2
|
||||
BEGIN
|
||||
PROMT 19 -1 "Font"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 14 8
|
||||
BEGIN
|
||||
PROMPT 35 12 ""
|
||||
|
@ -1,22 +1,20 @@
|
||||
#include <applicat.h>
|
||||
#include <dongle.h>
|
||||
#include <execp.h>
|
||||
#include <isam.h>
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
#include <sheet.h>
|
||||
#include <urldefid.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "ba1.h"
|
||||
|
||||
class TPackFiles_application:public TApplication
|
||||
|
||||
class TPackFiles_application:public TSkeleton_application
|
||||
{
|
||||
TArray_sheet * _selsheet;
|
||||
long _firm;
|
||||
|
||||
protected:
|
||||
virtual bool menu(MENU_TAG);
|
||||
virtual void main_loop();
|
||||
virtual bool create () ;
|
||||
virtual bool destroy();
|
||||
virtual bool extended_firm() const { return TRUE; }
|
||||
@ -30,7 +28,6 @@ public:
|
||||
bool TPackFiles_application::create() // initvar e arrmask
|
||||
|
||||
{
|
||||
TApplication::create();
|
||||
_firm = get_firm();
|
||||
if (!set_firm())
|
||||
return FALSE;
|
||||
@ -40,8 +37,7 @@ bool TPackFiles_application::create() // initvar e arrmask
|
||||
"@1|N.@5|Nome@20|EOD@7|EOX@7|Lung. |Descrizione@43|Flags@7" :
|
||||
"N.@5|Nome@20|EOD@7|EOX@7|Lung. |Descrizione@43|Flags@7",
|
||||
is_prassi ? 0 : 0x10);
|
||||
dispatch_e_menu(BAR_ITEM(1));
|
||||
return TRUE ;
|
||||
return TSkeleton_application::create();
|
||||
}
|
||||
|
||||
bool TPackFiles_application::destroy()
|
||||
@ -49,7 +45,7 @@ bool TPackFiles_application::destroy()
|
||||
{
|
||||
if (_firm) set_firm(_firm);
|
||||
if (_selsheet != NULL) delete _selsheet;
|
||||
return TApplication::destroy() ;
|
||||
return TSkeleton_application::destroy() ;
|
||||
}
|
||||
|
||||
void TPackFiles_application::build_sheet()
|
||||
@ -99,14 +95,14 @@ void TPackFiles_application::search_blanks(TSystemisamfile& f)
|
||||
f.close();
|
||||
}
|
||||
|
||||
bool TPackFiles_application::menu(MENU_TAG m)
|
||||
void TPackFiles_application::main_loop()
|
||||
{
|
||||
KEY tasto;
|
||||
|
||||
do
|
||||
KEY tasto = K_ENTER;
|
||||
while (tasto != K_ESC)
|
||||
{
|
||||
build_sheet();
|
||||
switch(tasto = _selsheet->run())
|
||||
tasto = _selsheet->run();
|
||||
switch(tasto)
|
||||
{
|
||||
case K_ENTER:
|
||||
if (_selsheet->checked()>0)
|
||||
@ -187,8 +183,7 @@ bool TPackFiles_application::menu(MENU_TAG m)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} while (tasto != K_ESC);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
int ba1300(int argc, char** argv)
|
||||
|
@ -83,7 +83,7 @@ ENDPAGE
|
||||
|
||||
PAGE "Permessi" -1 -1 78 20
|
||||
|
||||
TREE F_PERMESSI -3 -7
|
||||
TREE F_PERMESSI -3 -8
|
||||
BEGIN
|
||||
PROMPT 0 1 ""
|
||||
END
|
||||
|
214
ba/ba1600.cpp
214
ba/ba1600.cpp
@ -12,6 +12,7 @@
|
||||
#include <text.h>
|
||||
#include <sheet.h>
|
||||
#include <utility.h>
|
||||
#include <text.h>
|
||||
|
||||
#include "ba1.h"
|
||||
#include "ba1600.h"
|
||||
@ -23,16 +24,21 @@ int find(const TString& name, TString_array & rows) ;
|
||||
///////////////////////////////////////////////////////////
|
||||
// Configurazione per installazione
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TFascicolator_mask;
|
||||
|
||||
class TCreazione_dischi : public TSkeleton_application
|
||||
{
|
||||
protected:
|
||||
TFascicolator_mask* _mask;
|
||||
|
||||
virtual bool use_files() const { return FALSE; }
|
||||
virtual void main_loop();
|
||||
public:
|
||||
virtual bool modify_mode() { return FALSE;}
|
||||
virtual bool modify_mode() { return FALSE; }
|
||||
TFascicolator_mask& mask() const { return *_mask; }
|
||||
};
|
||||
|
||||
|
||||
class TFascicolator : public TCreazione_dischi
|
||||
{
|
||||
protected:
|
||||
@ -42,7 +48,7 @@ public:
|
||||
virtual bool modify_mode() { return TRUE;}
|
||||
};
|
||||
|
||||
|
||||
inline TCreazione_dischi& app() { return (TCreazione_dischi&)main_app(); }
|
||||
|
||||
class TFconv_ini : public TConfig
|
||||
{
|
||||
@ -314,7 +320,7 @@ void TInstall_ini::version_info(const char* module,
|
||||
ver.insert("19", 0);
|
||||
year = atoi(ver.left(4));
|
||||
if (year == 0)
|
||||
main_app().get_version_info(year, release, tag, patchlevel);
|
||||
app().get_version_info(year, release, tag, patchlevel);
|
||||
else
|
||||
{
|
||||
release = atoi(ver.mid(4,2));
|
||||
@ -850,7 +856,6 @@ void TMod_composition_msk::save()
|
||||
if (spc >= 0) n.cut(spc);
|
||||
n.ext("exe");
|
||||
TString16 sub = module;
|
||||
|
||||
FOR_EACH_SHEET_ROW(sheet, sr, srow)
|
||||
{
|
||||
if (n == srow->get(0))
|
||||
@ -859,11 +864,11 @@ void TMod_composition_msk::save()
|
||||
break;
|
||||
}
|
||||
}
|
||||
ini.set(var, prow->get(2), sub);
|
||||
n = prow->get(2);
|
||||
ini.set(var, n, sub);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TMod_composition_msk::TMod_composition_msk(const bool modify_mode)
|
||||
: TMask("ba1600b")
|
||||
{
|
||||
@ -880,7 +885,9 @@ TMod_composition_msk::TMod_composition_msk(const bool modify_mode)
|
||||
miss.set_notify(missing_notify);
|
||||
miss.sheet_mask().set_handler(100, link_handler);
|
||||
prog.sheet_mask().set_handler(102, isam_handler);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
s.disable(); // Read-only sheet
|
||||
//hide(DLG_OK);
|
||||
// hide(F_DESELECT);
|
||||
@ -898,12 +905,12 @@ class TModule_mask : public TMask
|
||||
{
|
||||
bool _dirty_composition;
|
||||
bool module_dependent(int row, TString_array &p_submodules, TString &sub_mod, TString &ver, int & patch) const ;
|
||||
public:
|
||||
|
||||
bool list_is_dirty() {return _dirty_composition;}
|
||||
void dirty_composition( bool val=TRUE ) {_dirty_composition=val;}
|
||||
bool check_patchlevels( TMod_composition_msk &mm);
|
||||
~TModule_mask() {}
|
||||
public:
|
||||
bool list_is_dirty() const { return _dirty_composition;}
|
||||
void dirty_composition(bool val = TRUE) { _dirty_composition = val; }
|
||||
bool check_patchlevels(TMod_composition_msk &mm);
|
||||
virtual ~TModule_mask() {}
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -916,6 +923,8 @@ protected:
|
||||
static bool list_handler(TMask_field& f, KEY k);
|
||||
static bool confirm_handler(TMask_field& f, KEY k);
|
||||
static bool creazip_handler(TMask_field& f, KEY k);
|
||||
static bool testpatch_handler(TMask_field& f, KEY k);
|
||||
static bool why_handler(TMask_field& f, KEY k);
|
||||
static bool modules_notify(TSheet_field& f, int row, KEY k);
|
||||
static bool import_export_handler(TMask_field& f, KEY k);
|
||||
static bool patchl_handler(TMask_field& f, KEY k);
|
||||
@ -1132,10 +1141,6 @@ bool TFascicolator_mask::list_handler(TMask_field& f, KEY k)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool TCreadischi_mask::confirm_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
return TRUE;
|
||||
@ -1193,7 +1198,6 @@ bool TFascicolator_mask::confirm_handler(TMask_field& f, KEY k)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
bool TFascicolator_mask::creazip_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_SPACE)
|
||||
@ -1228,7 +1232,160 @@ bool TCreadischi_mask::creazip_handler(TMask_field& f, KEY k)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TCreadischi_mask::why_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k != K_SPACE)
|
||||
return TRUE;
|
||||
|
||||
TArray_sheet& main_sheet = (TArray_sheet&)f.mask();
|
||||
const TFilename stopfile = main_sheet.row(main_sheet.selected()).get(1);
|
||||
TString16 module = stopfile.name(); module.cut(2);
|
||||
|
||||
TFilename path = app().mask().get(F_DISKPATH);
|
||||
path.add(module); path << "????a.ini";
|
||||
|
||||
TString_array inifiles;
|
||||
list_files(path, inifiles);
|
||||
inifiles.sort();
|
||||
TProgind pi(inifiles.items(), "Scansione archivi successivi...", FALSE, TRUE);
|
||||
|
||||
TString caption; caption << "File eliminabili da " << stopfile.name();
|
||||
TArray_sheet sheet(3, 3, -3, -3, caption, "Modulo|File@20|Ultima Patch@50");
|
||||
|
||||
TAssoc_array files;
|
||||
TString_array para;
|
||||
TToken_string tok;
|
||||
FOR_EACH_ARRAY_ROW_BACK(inifiles, numf, filename)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
const bool is_last = stopfile == *filename;
|
||||
|
||||
TConfig ini(*filename);
|
||||
ini.list_paragraphs(para);
|
||||
FOR_EACH_ARRAY_ROW_BACK(para, nump, paraname) if (paraname->len() == 3)
|
||||
{
|
||||
ini.set_paragraph(*paraname);
|
||||
TAssoc_array& vars = ini.list_variables();
|
||||
FOR_EACH_ASSOC_STRING(vars, obj, key, str)
|
||||
{
|
||||
if (strncmp(key, "File(", 5) == 0)
|
||||
{
|
||||
tok = str;
|
||||
const int pipe = tok.find('|');
|
||||
if (pipe > 0) tok.cut(pipe);
|
||||
tok.lower();
|
||||
|
||||
if (is_last)
|
||||
{
|
||||
const TString* nextpatch = (const TString*)files.objptr(tok);
|
||||
TToken_string row;
|
||||
row = *paraname;
|
||||
row.add(tok);
|
||||
if (nextpatch)
|
||||
row.add(*nextpatch);
|
||||
else
|
||||
row.add("*** Nessuna ***"); // Should never happen!
|
||||
sheet.add(row);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!files.is_key(tok))
|
||||
files.add(tok, *filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_last) break;
|
||||
}
|
||||
sheet.run();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool TCreadischi_mask::testpatch_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k != K_SPACE)
|
||||
return TRUE;
|
||||
|
||||
TMask& m = f.mask();
|
||||
const TString& module = m.get(S_MODULE);
|
||||
TFilename path = app().mask().get(F_DISKPATH);
|
||||
path.add(module); path << "????a.ini";
|
||||
|
||||
TArray_sheet sheet(3, 3, -3, -3, "File eliminabili", "@1|Percorso assoluto@70");
|
||||
sheet.add_button(DLG_USER+1, "Dettagli", 'D');
|
||||
sheet.set_handler(DLG_USER+1, why_handler);
|
||||
|
||||
TString_array& inifiles = sheet.rows_array();
|
||||
list_files(path, inifiles);
|
||||
inifiles.sort();
|
||||
|
||||
if (inifiles.items() > 0)
|
||||
{
|
||||
TProgind pi(inifiles.items(), "Scansione archivi...", FALSE, TRUE);
|
||||
TAssoc_array files;
|
||||
TString_array para;
|
||||
TToken_string tok;
|
||||
FOR_EACH_ARRAY_ROW_BACK(inifiles, numf, filename)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
bool can_be_deleted = TRUE;
|
||||
TConfig ini(*filename, module);
|
||||
ini.list_paragraphs(para);
|
||||
FOR_EACH_ARRAY_ROW_BACK(para, nump, paraname) if (paraname->len() == 3)
|
||||
{
|
||||
ini.set_paragraph(*paraname);
|
||||
TAssoc_array& vars = ini.list_variables();
|
||||
FOR_EACH_ASSOC_STRING(vars, obj, key, str)
|
||||
{
|
||||
if (strncmp(key, "File(", 5) == 0)
|
||||
{
|
||||
tok = str;
|
||||
const int pipe = tok.find('|');
|
||||
if (pipe > 0) tok.cut(pipe);
|
||||
tok.lower();
|
||||
if (!files.is_key(tok))
|
||||
{
|
||||
files.add(tok);
|
||||
can_be_deleted = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (can_be_deleted)
|
||||
filename->insert(" |", 0);
|
||||
else
|
||||
inifiles.destroy(numf, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
if (inifiles.items() == 0)
|
||||
return message_box("Non e' stato rilevato nessun file eliminabile");
|
||||
|
||||
if (sheet.run() == K_ENTER)
|
||||
{
|
||||
const long tot = sheet.checked();
|
||||
if (tot > 0 && yesno_box("Confermare la cancellazione di %ld file", tot))
|
||||
{
|
||||
TWait_cursor hourglass;
|
||||
for (long i = sheet.items()-1; i >= 0; i--) if (sheet.checked(i))
|
||||
{
|
||||
for (int d = 1; d <= 9; d++)
|
||||
{
|
||||
TFilename name = sheet.row(i).get(1);
|
||||
name.ext(""); name << d << ".zip";
|
||||
if (::remove(name) != 0)
|
||||
{
|
||||
if (d == 1)
|
||||
error_box("Errore di cancellazione del file %s", (const char*)name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TCreadischi_mask::import_export_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
@ -1295,15 +1452,15 @@ const TFilename& TCreadischi_mask::build_export_path(TFilename& path) const
|
||||
|
||||
path.cut(0);
|
||||
path << SLASH << "src" << SLASH << module;
|
||||
if (!fexist(path))
|
||||
if (!path.exist())
|
||||
{
|
||||
path.cut(0);
|
||||
path << SLASH << 'u' << SLASH << user() << SLASH << "src" << SLASH << module;
|
||||
if (!fexist(path))
|
||||
if (!path.exist())
|
||||
{
|
||||
path.cut(0);
|
||||
path << SLASH << 'u' << SLASH << user() << SLASH << "p.due" << SLASH << module;
|
||||
if (!fexist(path))
|
||||
if (!path.exist())
|
||||
path.tempdir();
|
||||
}
|
||||
}
|
||||
@ -1369,13 +1526,9 @@ void TCreadischi_mask::load()
|
||||
|
||||
void TCreadischi_mask::save()
|
||||
{
|
||||
TSheet_field& s = sfield(F_SHEET);
|
||||
|
||||
TInstall_ini ini;
|
||||
|
||||
ini.set("DiskSize", get(F_DISKSIZE));
|
||||
ini.set("DiskPath", get(F_DISKPATH));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1802,6 +1955,7 @@ TCreadischi_mask::TCreadischi_mask()
|
||||
m.set_handler(S_LIST, list_handler);
|
||||
m.set_handler(S_CREATEZIP, creazip_handler);
|
||||
m.set_handler(S_CREATEPATCH, creazip_handler);
|
||||
m.set_handler(S_TESTPATCH, testpatch_handler);
|
||||
m.hide(S_IMPORT);
|
||||
m.set_handler(S_EXPORT, import_export_handler);
|
||||
s.disable();
|
||||
@ -1831,22 +1985,22 @@ TFascicolator_mask::TFascicolator_mask()
|
||||
s.enable_column(S_POSTPROCESS,TRUE);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Programma principale
|
||||
///////////////////////////////////////////////////////////
|
||||
void TFascicolator::main_loop()
|
||||
{
|
||||
TFascicolator_mask m;
|
||||
m.load();
|
||||
_mask = new TFascicolator_mask;
|
||||
_mask->load();
|
||||
int key;
|
||||
do
|
||||
{
|
||||
key=m.run();
|
||||
key = _mask->run();
|
||||
if (key == K_ENTER)
|
||||
m.save();
|
||||
_mask->save();
|
||||
}
|
||||
while (key != K_ENTER && key != K_QUIT);
|
||||
delete _mask; _mask = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,7 +21,8 @@
|
||||
#define S_LIST 100
|
||||
#define S_CREATEZIP 151
|
||||
#define S_CREATEPATCH 152
|
||||
#define S_IMPORT 153
|
||||
#define S_EXPORT 154
|
||||
#define S_TESTPATCH 153
|
||||
#define S_IMPORT 160
|
||||
#define S_EXPORT 161
|
||||
|
||||
#endif
|
||||
|
@ -48,7 +48,7 @@ ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
PAGE "Modulo" -1 -1 52 12
|
||||
PAGE "Modulo" -1 -1 52 14
|
||||
|
||||
STRING 101 36
|
||||
BEGIN
|
||||
@ -98,41 +98,45 @@ BEGIN
|
||||
// FLAGS "D"
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 14 2
|
||||
BUTTON DLG_OK 22 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 14 2
|
||||
BUTTON DLG_CANCEL 22 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
BUTTON S_CREATEZIP 20 2
|
||||
BUTTON S_CREATEZIP 22 2
|
||||
BEGIN
|
||||
PROMPT -12 -5 "Crea &Versione"
|
||||
PROMPT -12 6 "Crea &Versione"
|
||||
END
|
||||
|
||||
BUTTON S_CREATEPATCH 20 2
|
||||
BUTTON S_CREATEPATCH 22 2
|
||||
BEGIN
|
||||
PROMPT -22 -5 "Crea &Aggiornamento"
|
||||
PROMPT -12 8 "Crea &Aggiornamento"
|
||||
END
|
||||
|
||||
BUTTON S_LIST 14 1
|
||||
BUTTON S_TESTPATCH 22 2
|
||||
BEGIN
|
||||
PROMPT -13 -4 "Lista file"
|
||||
PROMPT -12 10 "&Patch Obsolete"
|
||||
END
|
||||
|
||||
BUTTON S_IMPORT 14 1
|
||||
BUTTON S_LIST 22 2
|
||||
BEGIN
|
||||
PROMPT -23 -4 "&Importa lista"
|
||||
PROMPT -22 6 "&Lista file"
|
||||
END
|
||||
|
||||
BUTTON S_EXPORT 14 1
|
||||
BUTTON S_IMPORT 22 2
|
||||
BEGIN
|
||||
PROMPT -33 -4 "&Esporta lista"
|
||||
PROMPT -22 8 "&Importa lista"
|
||||
END
|
||||
|
||||
BUTTON S_EXPORT 22 2
|
||||
BEGIN
|
||||
PROMPT -22 10 "&Esporta lista"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
|
@ -201,7 +201,7 @@ int TInstaller_mask::precheck_modules(bool only_newer)
|
||||
&& main_app().has_module(modnumber,CHK_DONGLE) )
|
||||
{
|
||||
// checca il modulo o la patch se ho installata la stessa versione
|
||||
const bool chk = row(r).get_char(C_ISPATCH) == ' ' || release == row(r).get(C_CURRRELEASE) ;
|
||||
const bool chk = row(r).get_char(C_ISPATCH) != 'X' || release == row(r).get(C_CURRRELEASE) ;
|
||||
check(r,chk );
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ END
|
||||
|
||||
BROWSEFILE F_COLUMNIZER 75 5
|
||||
BEGIN
|
||||
PROMPT 1 6 ""
|
||||
PROMPT 1 7 ""
|
||||
END
|
||||
|
||||
SPREADSHEET F_FIELDS 78
|
||||
|
@ -1,8 +1,11 @@
|
||||
#include <direct.h>
|
||||
|
||||
#include <applicat.h>
|
||||
#include <archives.h>
|
||||
#include <config.h>
|
||||
#include <isam.h>
|
||||
#include <mask.h>
|
||||
#include <prefix.h>
|
||||
#include <archives.h>
|
||||
|
||||
#include "ba2200.h"
|
||||
|
||||
@ -18,7 +21,7 @@ protected:
|
||||
virtual bool create();
|
||||
virtual void main_loop();
|
||||
static bool test_firm(TMask_field& f, KEY k);
|
||||
KEY query(long& firm, char& floppy, TString& desc, bool& temp, bool& zip) const;
|
||||
KEY query(int& mode, long& firm, char& floppy, TString& desc, bool& tmp, bool& zip) const;
|
||||
|
||||
public:
|
||||
void stop_job();
|
||||
@ -54,15 +57,14 @@ bool TArchive_app::test_firm(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_SPACE)
|
||||
{
|
||||
const char* d = f.mask().get(F_CODDITTA);
|
||||
const long firm = atol(d);
|
||||
const long firm = f.mask().get_long(F_CODDITTA);
|
||||
if (firm > 0 && !prefix().exist(firm))
|
||||
return f.error_box("La ditta %s non esiste.",d);
|
||||
return f.error_box("La ditta %ld non esiste.", firm);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
KEY TArchive_app::query(long& firm, char& floppy, TString& desc, bool& temp, bool& zip) const
|
||||
KEY TArchive_app::query(int& mode, long& firm, char& floppy, TString& desc, bool& temp, bool& zip) const
|
||||
{
|
||||
TMask m("ba2200");
|
||||
|
||||
@ -71,11 +73,24 @@ KEY TArchive_app::query(long& firm, char& floppy, TString& desc, bool& temp, boo
|
||||
const KEY k = m.run();
|
||||
|
||||
if (k != K_QUIT)
|
||||
{
|
||||
if (m.get(F_DATA) == "T")
|
||||
firm = -1;
|
||||
else
|
||||
{
|
||||
mode = 0x0;
|
||||
firm = 0L;
|
||||
|
||||
if (m.get_bool(F_COM))
|
||||
mode |= 0x1;
|
||||
if (m.get_bool(F_DITTA))
|
||||
{
|
||||
mode |= 0x2;
|
||||
firm = m.get_long(F_CODDITTA);
|
||||
}
|
||||
if (m.get_bool(F_CONFIG))
|
||||
mode |= 0x4;
|
||||
if (m.get_bool(F_770))
|
||||
mode |= 0x8;
|
||||
if (m.get_bool(F_CESP))
|
||||
mode |= 0x10;
|
||||
|
||||
floppy = m.get(F_FLOPPY)[0];
|
||||
desc = m.get(F_DESCR);
|
||||
temp = m.get_bool(F_TEMP);
|
||||
@ -92,32 +107,38 @@ KEY TArchive_app::query(long& firm, char& floppy, TString& desc, bool& temp, boo
|
||||
void TArchive_app::main_loop()
|
||||
{
|
||||
KEY k;
|
||||
int mode;
|
||||
long firm;
|
||||
char floppy;
|
||||
TString desc(80);
|
||||
bool temp;
|
||||
bool zip;
|
||||
|
||||
while ((k = query(firm, floppy, desc, temp, zip)) != K_QUIT)
|
||||
while ((k = query(mode, firm, floppy, desc, temp, zip)) != K_QUIT)
|
||||
{
|
||||
if (k == K_SAVE)
|
||||
if (mode)
|
||||
{
|
||||
if (zip)
|
||||
_arc.zip(firm, floppy, desc);
|
||||
if (k == K_SAVE)
|
||||
{
|
||||
if (zip)
|
||||
_arc.zip(firm, floppy, desc);
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
else
|
||||
_arc.backup(firm, floppy, desc);
|
||||
else
|
||||
_arc.backup(firm, floppy, desc);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
if (zip)
|
||||
_arc.unzip(firm, floppy, temp);
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
else
|
||||
_arc.restore(firm, floppy, temp);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (zip)
|
||||
_arc.unzip(firm, floppy, temp);
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
else
|
||||
_arc.restore(firm, floppy, temp);
|
||||
#endif
|
||||
}
|
||||
error_box("Non e' stato specificato nessun archivio");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,16 @@
|
||||
#define F_CODDITTA 101
|
||||
#define F_RAGSOC 102
|
||||
#define F_DATA 103
|
||||
#define F_FLOPPY 104
|
||||
#define F_DESCR 105
|
||||
#define F_TEMP 106
|
||||
#define F_SALVA 107
|
||||
#define F_RIPR 108
|
||||
#define F_ZIP 109
|
||||
|
||||
#define F_ALL 110
|
||||
#define F_DITTA 111
|
||||
#define F_COM 112
|
||||
#define F_CONFIG 113
|
||||
#define F_770 114
|
||||
#define F_CESP 115
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "ba2200.h"
|
||||
|
||||
PAGE "Salvataggio / Ripristino archivi" -1 -1 72 8
|
||||
PAGE "Salvataggio / Ripristino archivi" -1 -1 72 12
|
||||
|
||||
LIST F_FLOPPY 1 5
|
||||
BEGIN
|
||||
@ -9,43 +9,73 @@ BEGIN
|
||||
ITEM "B|B:"
|
||||
END
|
||||
|
||||
LIST F_DATA 1 14
|
||||
BOOLEAN F_DITTA
|
||||
BEGIN
|
||||
PROMPT 17 1 "Dati "
|
||||
ITEM " |Ditta" MESSAGE ENABLE,1@
|
||||
ITEM "C|Dati comuni" MESSAGE CLEAR,1@|"Archivi comuni",F_RAGSOC
|
||||
ITEM "T|Tutti" MESSAGE CLEAR,1@|"Archivi comuni e ditte",F_RAGSOC
|
||||
END
|
||||
PROMPT 20 1 "Dati ditta"
|
||||
MESSAGE TRUE ENABLE,1@|"X",F_770
|
||||
MESSAGE FALSE CLEAR,1@
|
||||
END
|
||||
|
||||
BOOLEAN F_COM
|
||||
BEGIN
|
||||
PROMPT 20 2 "Dati comuni"
|
||||
MESSAGE TRUE "X",F_CONFIG
|
||||
END
|
||||
|
||||
BOOLEAN F_CONFIG
|
||||
BEGIN
|
||||
PROMPT 20 3 "File di configurazione"
|
||||
END
|
||||
|
||||
BOOLEAN F_770
|
||||
BEGIN
|
||||
PROMPT 20 4 "Dati 770"
|
||||
END
|
||||
|
||||
BOOLEAN F_CESP
|
||||
BEGIN
|
||||
PROMPT 20 5 "Cespiti"
|
||||
END
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 56 1 "Ditta "
|
||||
PROMPT 48 1 "Ditta "
|
||||
USE LF_NDITTE
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
DISPLAY "Codice" CODDITTA
|
||||
DISPLAY "Ragione Sociale@50" RAGSOC
|
||||
OUTPUT F_CODDITTA CODDITTA
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
CHECKTYPE REQUIRED
|
||||
WARNING "Specificare la ditta su cui lavorare"
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 48 2 "Non specificata = Tutte"
|
||||
END
|
||||
|
||||
BUTTON F_ALL 10 2
|
||||
BEGIN
|
||||
PROMPT 56 4 "~Tutti"
|
||||
MESSAGE "X",F_DITTA|"X",F_COM|"X",F_CONFIG|"X",F_770|"X",F_CESP
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 1 2 "Ragione Sociale "
|
||||
PROMPT 1 6 "Ragione Sociale "
|
||||
USE LF_NDITTE KEY 2
|
||||
INPUT RAGSOC F_RAGSOC
|
||||
DISPLAY "Ragione Sociale@50" RAGSOC
|
||||
DISPLAY "Codice@10" CODDITTA
|
||||
COPY OUTPUT F_CODDITTA
|
||||
CHECKTYPE REQUIRED
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
STRING F_DESCR 50
|
||||
BEGIN
|
||||
PROMPT 1 3 "Descrizione "
|
||||
PROMPT 1 7 "Descrizione "
|
||||
END
|
||||
|
||||
BOOLEAN F_ZIP
|
||||
@ -56,7 +86,7 @@ END
|
||||
|
||||
BOOLEAN F_TEMP
|
||||
BEGIN
|
||||
PROMPT 1 5 "Usare direttorio temporaneo durante il ripristino"
|
||||
PROMPT 1 8 "Usare direttorio temporaneo durante il ripristino"
|
||||
END
|
||||
|
||||
BUTTON F_SALVA 15 2
|
||||
|
492
ba/ba2600.cpp
492
ba/ba2600.cpp
@ -166,7 +166,7 @@ TEditMask_control* TEditMask_window::find_sheet(int i)
|
||||
{
|
||||
TEditMask_control& sh=(TEditMask_control& )_controls[j];
|
||||
if (sh.get_idsheet()==i)
|
||||
return &sh;
|
||||
return &sh;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@ -195,12 +195,12 @@ void TEditMask_window::save_page(ostream& out)
|
||||
|
||||
_controls.sort(compare);//ordinamento secondo la priorità focus
|
||||
|
||||
for(int k=1;k<=_total_page ;k++)
|
||||
for (int k=1; k <= _total_page ; k++)
|
||||
{
|
||||
if(page_null(k))
|
||||
if (page_null(k))
|
||||
{
|
||||
out<<"PAGE \""<< _name[k] <<"\" "<< _coordx <<" " <<_coordy;
|
||||
out<<" " <<_lung <<" " <<_alt << "\n\n";
|
||||
out << "PAGE \""<< _name[k] <<"\" "<< _coordx <<" " <<_coordy;
|
||||
out << " " <<_lung <<" " <<_alt << "\n\n";
|
||||
for(int i=0; i<_controls.items(); i++)
|
||||
{
|
||||
TEditMask_control& up=(TEditMask_control& )_controls[i];
|
||||
@ -217,10 +217,10 @@ void TEditMask_window::save_page(ostream& out)
|
||||
else out<<_controls[i];
|
||||
}
|
||||
}
|
||||
out<<"ENDPAGE\n\n";
|
||||
out << "ENDPAGE\n\n";
|
||||
}
|
||||
}
|
||||
out<<"\nENDMASK\n\n";
|
||||
out << "\nENDMASK\n\n";
|
||||
|
||||
}
|
||||
|
||||
@ -248,9 +248,10 @@ void TEditMask_window::create_file()
|
||||
if(up.type()=="BUTTON ")
|
||||
{
|
||||
TString tipo=up.ident();
|
||||
if(tipo=="DLG_OK" || tipo=="DLG_CANCEL" ||\
|
||||
tipo=="DLG_DELREC" ||tipo=="DLG_QUIT" || tipo=="DLG_PRINT" ||\
|
||||
tipo=="DLG_SELECT") up.set_prompt("");
|
||||
if (tipo=="DLG_OK" || tipo=="DLG_CANCEL" ||
|
||||
tipo=="DLG_DELREC" ||tipo=="DLG_QUIT" || tipo=="DLG_PRINT" ||
|
||||
tipo=="DLG_SELECT")
|
||||
up.set_prompt("");
|
||||
}
|
||||
if(xvt_rect_has_point(&r,p) != 0)
|
||||
file<<_controls[i];
|
||||
@ -272,21 +273,21 @@ void TEditMask_window::create_file()
|
||||
//Creazione del file .h
|
||||
void TEditMask_window::create_fileh()
|
||||
{
|
||||
TFilename header(_file);
|
||||
header.lower();
|
||||
header.ext("h");
|
||||
ofstream fileh(header);
|
||||
int k=101;
|
||||
|
||||
for(int i=0; i<_controls.items(); i++)
|
||||
{
|
||||
TEditMask_control& up=(TEditMask_control& )_controls[i];
|
||||
if(up.ident()!=("DLG_NULL"))
|
||||
{
|
||||
fileh<<"#define "<<up.ident()<< " "<< k <<'\n';
|
||||
k++;
|
||||
}
|
||||
}
|
||||
TFilename header(_file);
|
||||
header.lower();
|
||||
header.ext("h");
|
||||
ofstream fileh(header);
|
||||
int k=101;
|
||||
|
||||
for(int i=0; i<_controls.items(); i++)
|
||||
{
|
||||
TEditMask_control& up=(TEditMask_control& )_controls[i];
|
||||
if(up.ident()!=("DLG_NULL"))
|
||||
{
|
||||
fileh<<"#define "<<up.ident()<< " "<< k <<'\n';
|
||||
k++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Definizione di un controllo disabilitato o nascosto
|
||||
@ -446,14 +447,16 @@ void TEditMask_control::get_field(TMask& mask)
|
||||
//Setta le dimensioni del controllo
|
||||
void TEditMask_control::set_dim(int ln, int lg)
|
||||
{
|
||||
_latox=ln; _latoy=lg;
|
||||
_rct=resize_rect(_left,_top,_latox,_latoy,WO_TE,_intool);
|
||||
_latox = ln;
|
||||
_latoy = lg;
|
||||
_rct = resize_rect(_left,_top,_latox,_latoy,WO_TE,_intool);
|
||||
}
|
||||
|
||||
//Setta le coordinate del controllo
|
||||
void TEditMask_control::set_crd(int x, int y)
|
||||
{
|
||||
_left=x; _top=y;
|
||||
_left = x;
|
||||
_top = y;
|
||||
}
|
||||
|
||||
//Legge dalla maschera di supporto i campi comuni opzionali
|
||||
@ -470,59 +473,58 @@ void TEditMask_control::get_option(TMask& mask)
|
||||
//Stampa su file .uml il controllo(i campi comuni e particolari)
|
||||
void TEditMask_control::print_on(ostream& out) const
|
||||
{
|
||||
char c;
|
||||
char c;
|
||||
|
||||
out<<" BEGIN"<<"\n" ;
|
||||
out<<" PROMPT " << _left << " " <<_top<<" \"";
|
||||
|
||||
out<<" BEGIN"<<"\n" ;
|
||||
out<<" PROMPT " << _left << " " <<_top<<" \"";
|
||||
|
||||
out<<_prompt;
|
||||
for(int i=off(); i > 0; i--)
|
||||
out << ' ';
|
||||
out<<"\"\n";
|
||||
|
||||
if(_flag.not_empty())
|
||||
{
|
||||
for(int j=0;j<_flag.len();j++)
|
||||
{
|
||||
c=toupper(_flag.operator[](j));
|
||||
if(c==' ') ;
|
||||
else out<<" FLAGS "<<"\""<< c <<"\"\n";
|
||||
}
|
||||
}
|
||||
|
||||
print_message(out);
|
||||
|
||||
if(_group.not_empty())
|
||||
out<<" GROUP "<<_group<<"\n";
|
||||
|
||||
if(_field.not_empty())
|
||||
{
|
||||
out<<" FIELD ";
|
||||
for(int f=0;f<_field.len();f++)
|
||||
{
|
||||
c=toupper(_field.operator[](f));
|
||||
out<<c;
|
||||
}
|
||||
out<<"\n";
|
||||
}
|
||||
out<<_prompt;
|
||||
for(int i=off(); i > 0; i--)
|
||||
out << ' ';
|
||||
out<<"\"\n";
|
||||
|
||||
if(_key.not_empty())
|
||||
out<<" KEY "<<_key<<"\n";
|
||||
|
||||
|
||||
if(_check.not_empty())
|
||||
{
|
||||
if(_check!=("a"))
|
||||
out<<" CHECKTYPE ";
|
||||
if(_check==("b")) out<<"NORMAL\n";
|
||||
if(_check==("c")) out<<"REQUIRED\n";
|
||||
if(_check==("d")) out<<"SEARCH\n";
|
||||
if(_check==("e")) out<<"FORCED\n";
|
||||
}
|
||||
|
||||
if(_warning.not_empty())
|
||||
out<<" WARNING \""<<_warning<<"\"\n";
|
||||
|
||||
if(_flag.not_empty())
|
||||
{
|
||||
for(int j=0;j<_flag.len();j++)
|
||||
{
|
||||
c=toupper(_flag.operator[](j));
|
||||
if (c!=' ')
|
||||
out<<" FLAGS "<<"\""<< c <<"\"\n";
|
||||
}
|
||||
}
|
||||
|
||||
print_message(out);
|
||||
|
||||
if(_group.not_empty())
|
||||
out<<" GROUP "<<_group<<"\n";
|
||||
|
||||
if(_field.not_empty())
|
||||
{
|
||||
out<<" FIELD ";
|
||||
for(int f=0;f<_field.len();f++)
|
||||
{
|
||||
c=toupper(_field.operator[](f));
|
||||
out<<c;
|
||||
}
|
||||
out<<"\n";
|
||||
}
|
||||
|
||||
if(_key.not_empty())
|
||||
out<<" KEY "<<_key<<"\n";
|
||||
|
||||
|
||||
if(_check.not_empty())
|
||||
{
|
||||
if(_check!=("a"))
|
||||
out<<" CHECKTYPE ";
|
||||
if (_check==("b")) out << "NORMAL\n";
|
||||
if (_check==("c")) out << "REQUIRED\n";
|
||||
if (_check==("d")) out << "SEARCH\n";
|
||||
if (_check==("e")) out << "FORCED\n";
|
||||
}
|
||||
|
||||
if(_warning.not_empty())
|
||||
out<<" WARNING \"" << _warning << "\"\n";
|
||||
}
|
||||
|
||||
//Legge da file .uml lecaratteristiche comuni dei controlli
|
||||
@ -532,11 +534,11 @@ void TEditMask_control::read_field(TScanner& scanner,const TString& tok,bool int
|
||||
|
||||
if(tok=="PROMPT")
|
||||
{
|
||||
_left=scanner.integer();
|
||||
_top=scanner.integer();
|
||||
_prompt=scanner.string();
|
||||
_left = scanner.integer();
|
||||
_top = scanner.integer();
|
||||
_prompt = scanner.string();
|
||||
_intool = intool;
|
||||
_rct=resize_rect(_left,_top,_latox,_latoy,WO_TE,intool);
|
||||
_rct = resize_rect(_left,_top,_latox,_latoy,WO_TE,intool);
|
||||
}
|
||||
|
||||
if(tok=="FLAGS" || tok=="WARNING")
|
||||
@ -716,7 +718,7 @@ void TEditMask_string::print_use(ostream& out)const
|
||||
for(int y=0;_use[k]!='\n' && _use[k];k++,y++)
|
||||
in[y]=_use[k];
|
||||
in[y]='\0';
|
||||
out<<" "<<in<<"\n";
|
||||
out<<" "<< in <<"\n";
|
||||
if(!_use[k]) break;
|
||||
}
|
||||
}
|
||||
@ -1370,52 +1372,56 @@ TEditMask_group::TEditMask_group(const TEditMask_group& ctl)
|
||||
//Presenza o no del flags "R"
|
||||
bool TEditMask_group::fl_crt() const
|
||||
{
|
||||
TString fl=flag();
|
||||
if(fl.find('R')!=-1 || fl.find('r')!=-1)
|
||||
TString fl=flag();
|
||||
if(fl.find('R')!=-1 || fl.find('r')!=-1)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//Fa l'update del controllo
|
||||
void TEditMask_group::update()const
|
||||
{
|
||||
RCT r=rectangle();
|
||||
RCT r=rectangle();
|
||||
|
||||
if(fl_crt()) padre().set_pen(MASK_DARK_COLOR);
|
||||
else padre().set_pen(MASK_LIGHT_COLOR);
|
||||
line(r.left,r.top+ROWY,r.right,r.top+ROWY);
|
||||
line(r.left,r.top+ROWY,r.left,r.bottom);
|
||||
if(fl_crt()) padre().set_pen(MASK_LIGHT_COLOR);
|
||||
else padre().set_pen(MASK_DARK_COLOR);
|
||||
line(r.right,r.top+ROWY,r.right,r.bottom);
|
||||
line(r.left,r.bottom,r.right,r.bottom);
|
||||
padre().set_pen(COLOR_BLACK);
|
||||
frase(r.left+2,r.top);
|
||||
if(fl_crt())
|
||||
padre().set_pen(MASK_DARK_COLOR);
|
||||
else
|
||||
padre().set_pen(MASK_LIGHT_COLOR);
|
||||
line(r.left,r.top+1+ROWY/2,r.right,r.top+1+ROWY/2);
|
||||
line(r.left,r.top+1+ROWY/2,r.left,r.bottom+1-ROWY/2);
|
||||
if(fl_crt())
|
||||
padre().set_pen(MASK_LIGHT_COLOR);
|
||||
else
|
||||
padre().set_pen(MASK_DARK_COLOR);
|
||||
line(r.right,r.top+1+ROWY/2,r.right,r.bottom+1-ROWY/2);
|
||||
line(r.left,r.bottom+1-ROWY/2,r.right,r.bottom+1-ROWY/2);
|
||||
padre().set_pen(COLOR_BLACK);
|
||||
frase(r.left+2,r.top);
|
||||
}
|
||||
|
||||
//Gestisce la maschera di supporto
|
||||
KEY TEditMask_group::main_loop()
|
||||
{
|
||||
TMask _mask("ba2600p");
|
||||
TSheet_field& s=_mask.sfield(F_MESSAGE);
|
||||
|
||||
TMask _mask("ba2600p");
|
||||
TSheet_field& s=_mask.sfield(F_MESSAGE);
|
||||
|
||||
set_field(_mask);
|
||||
set_option(_mask);
|
||||
set_message(s);
|
||||
_mask.set(F_LARGE,_latoy);
|
||||
_mask.set(F_LONGEFF,_latox);
|
||||
KEY k= _mask.run();
|
||||
if(k==K_ENTER)
|
||||
{
|
||||
get_field(_mask);
|
||||
get_option(_mask);
|
||||
get_message(s);
|
||||
_latoy=_mask.get_int(F_LARGE);
|
||||
_latox=_mask.get_int(F_LONGEFF);
|
||||
set_dim(_latox,_latoy);
|
||||
}
|
||||
return k;
|
||||
|
||||
set_field(_mask);
|
||||
set_option(_mask);
|
||||
set_message(s);
|
||||
_mask.set(F_LARGE,_latoy);
|
||||
_mask.set(F_LONGEFF,_latox);
|
||||
KEY k= _mask.run();
|
||||
if(k==K_ENTER)
|
||||
{
|
||||
get_field(_mask);
|
||||
get_option(_mask);
|
||||
get_message(s);
|
||||
_latoy=_mask.get_int(F_LARGE);
|
||||
_latox=_mask.get_int(F_LONGEFF);
|
||||
set_dim(_latox,_latoy);
|
||||
}
|
||||
return k;
|
||||
}
|
||||
|
||||
//Stampa su file .uml il controllo
|
||||
@ -2211,36 +2217,36 @@ bool TEditMask_control::contains(const PNT pnt)
|
||||
//Ritorna il controllo avente il punto pnt
|
||||
TEditMask_control* TEditMask_window::search(const PNT& pnt)
|
||||
{
|
||||
for(int i=_controls.items()-1; i >= 0; i--)
|
||||
{
|
||||
TEditMask_control& down=(TEditMask_control& )_controls[i];
|
||||
if (_page==down.page() && down.contains(pnt))
|
||||
{
|
||||
down.set_selected(TRUE);
|
||||
return &down;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
for(int i=_controls.items()-1; i >= 0; i--)
|
||||
{
|
||||
TEditMask_control& down=(TEditMask_control& )_controls[i];
|
||||
if (_page==down.page() && down.contains(pnt))
|
||||
{
|
||||
down.set_selected(TRUE);
|
||||
return &down;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//Ritorna TRUE se esistono controlli selezionati
|
||||
bool TEditMask_window::search(RCT* rct)
|
||||
{
|
||||
bool sel=FALSE;
|
||||
bool sel=FALSE;
|
||||
|
||||
for(int i=_controls.items()-1; i >= 0; i--)
|
||||
{
|
||||
TEditMask_control& down=(TEditMask_control& )_controls[i];
|
||||
PNT p={down.rectangle().top,down.rectangle().left};
|
||||
bool selected=xvt_rect_has_point(rct,p) != 0;
|
||||
for(int i=_controls.items()-1; i >= 0; i--)
|
||||
{
|
||||
TEditMask_control& down=(TEditMask_control& )_controls[i];
|
||||
PNT p={down.rectangle().top,down.rectangle().left};
|
||||
bool selected=xvt_rect_has_point(rct,p) != 0;
|
||||
|
||||
if (selected && _page==down.page())
|
||||
{
|
||||
down.set_selected(TRUE);
|
||||
sel=TRUE;
|
||||
selected=FALSE;
|
||||
}
|
||||
}
|
||||
if (selected && _page == down.page())
|
||||
{
|
||||
down.set_selected(TRUE);
|
||||
sel=TRUE;
|
||||
selected=FALSE;
|
||||
}
|
||||
}
|
||||
return sel;
|
||||
}
|
||||
|
||||
@ -2254,9 +2260,9 @@ bool TEditMask_control::redesign(int dx, int dy)
|
||||
if (_left < 0) _left = 0;
|
||||
if (_left > 78) _left = 78;
|
||||
|
||||
_top = log.v + dy / ROWY;
|
||||
_top = log.v + dy / ROWY ;
|
||||
if (_top < 0) _top = 0;
|
||||
if (_top > 19) _top = 19;
|
||||
if (_top > ROWY) _top = ROWY;
|
||||
|
||||
resize_rect();
|
||||
|
||||
@ -2955,7 +2961,7 @@ void TEditMask_window::get_mask(TMask& m)
|
||||
}
|
||||
|
||||
//Legge da file .uml solo i controlli
|
||||
void TEditMask_window::read_control(TScanner& scanner,const TString& k, bool intool) //aggiunge i controlli
|
||||
TEditMask_control* TEditMask_window::read_control(TScanner& scanner,const TString& k, bool intool) //aggiunge i controlli
|
||||
{
|
||||
TEditMask_control* ctl=NULL;
|
||||
|
||||
@ -2978,9 +2984,12 @@ void TEditMask_window::read_control(TScanner& scanner,const TString& k, bool int
|
||||
}
|
||||
if (k == "RA") ctl = addradio();
|
||||
|
||||
if(ctl) ctl->read_from(scanner, intool);
|
||||
if(ctl)
|
||||
ctl->read_from(scanner, intool);
|
||||
|
||||
/* else
|
||||
warning_box("Ce sta' un campo un po' strano.. AGGIORNAMI!! "); */
|
||||
return ctl;
|
||||
}
|
||||
|
||||
//Legge da file .uml solo le proprietà della pagina
|
||||
@ -2999,77 +3008,87 @@ void TEditMask_window::read_page(TScanner& scanner, int pg,bool tool)
|
||||
//Legge da file .uml solo la toolbar
|
||||
bool TEditMask_window::read_tool(TScanner& scanner)
|
||||
{
|
||||
TString s;
|
||||
|
||||
_name.add(scanner.string(),0);
|
||||
set_toolbar(TRUE);
|
||||
scanner.rectangle(_rt);
|
||||
_y_tool=_rt.top;
|
||||
s=scanner.pop();
|
||||
while(s!="ENDPAGE")
|
||||
{
|
||||
read_control(scanner,scanner.key(), TRUE);
|
||||
s=scanner.pop();
|
||||
}
|
||||
|
||||
TString s;
|
||||
|
||||
_name.add(scanner.string(),0);
|
||||
set_toolbar(TRUE);
|
||||
scanner.rectangle(_rt);
|
||||
_y_tool=_rt.top;
|
||||
if (_y_tool < 0)
|
||||
_y_tool = _y_tool + 22;
|
||||
s=scanner.pop();
|
||||
int fieldno=1;
|
||||
while(s!="ENDPAGE")
|
||||
{
|
||||
TEditMask_control* ctrl = read_control(scanner,scanner.key(), TRUE);
|
||||
if (ctrl)
|
||||
ctrl->set_focus(fieldno++);
|
||||
s=scanner.pop();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//Gestisce la lettura da file .uml della "maschera"
|
||||
void TEditMask_window::restore_mask(const char* filename)
|
||||
{
|
||||
int pg=0,sh=0;
|
||||
TString in;
|
||||
bool tool=FALSE, endpage=FALSE;
|
||||
_file=filename;
|
||||
_file.lower();
|
||||
TScanner scanner(_file);
|
||||
TEditMask_window* w=this;
|
||||
|
||||
in=scanner.pop();
|
||||
|
||||
if(scanner.ok())
|
||||
int pg=0,sh=0;
|
||||
TString in;
|
||||
bool tool=FALSE, endpage=FALSE;
|
||||
_file=filename;
|
||||
_file.lower();
|
||||
TScanner scanner(_file);
|
||||
TEditMask_window* w=this;
|
||||
|
||||
in=scanner.pop();
|
||||
|
||||
if(scanner.ok())
|
||||
{
|
||||
while(!scanner.eof())
|
||||
{
|
||||
while(!scanner.eof())
|
||||
{
|
||||
for(int i=-1; i<_nsheet; i++)
|
||||
for(int i=-1; i<_nsheet; i++)
|
||||
{
|
||||
if(_nsheet!=0)
|
||||
{
|
||||
if(_nsheet!=0)
|
||||
pg=0; sh++;
|
||||
tool=FALSE;
|
||||
in=scanner.pop();
|
||||
w=find_sheet(sh)->figlio();
|
||||
}
|
||||
while (in!="ENDMASK")
|
||||
{
|
||||
while (in!="ENDPAGE")
|
||||
{
|
||||
pg=0; sh++;
|
||||
tool=FALSE;
|
||||
in=scanner.pop();
|
||||
w=find_sheet(sh)->figlio();
|
||||
}
|
||||
while (in!="ENDMASK")
|
||||
{
|
||||
while(in!="ENDPAGE")
|
||||
if (in =="TOOLBAR")
|
||||
{
|
||||
if(in =="TOOLBAR")
|
||||
tool=w->read_tool(scanner);
|
||||
in=scanner.pop();
|
||||
}
|
||||
if (in == "PAGE")
|
||||
{
|
||||
pg++;
|
||||
int fieldno=1;
|
||||
w->read_page(scanner, pg, tool);
|
||||
in=scanner.pop();
|
||||
while (in != "ENDPAGE")
|
||||
{
|
||||
tool=w->read_tool(scanner);
|
||||
in=scanner.pop();
|
||||
}
|
||||
if(in =="PAGE")
|
||||
{
|
||||
pg++; w->read_page(scanner,pg,tool);
|
||||
TEditMask_control* ctrl = w->read_control(scanner,scanner.key());
|
||||
if (ctrl)
|
||||
ctrl->set_focus(fieldno++);
|
||||
in=scanner.pop();
|
||||
while(in!="ENDPAGE")
|
||||
{
|
||||
w->read_control(scanner,scanner.key());
|
||||
in=scanner.pop();
|
||||
}
|
||||
endpage=TRUE;
|
||||
}
|
||||
if(!endpage) in=scanner.pop();
|
||||
}
|
||||
endpage=TRUE;
|
||||
}
|
||||
in=scanner.pop();
|
||||
}
|
||||
if (!endpage)
|
||||
in=scanner.pop();
|
||||
}
|
||||
in=scanner.pop();
|
||||
}
|
||||
in=scanner.pop();
|
||||
}
|
||||
}
|
||||
in=scanner.pop();
|
||||
}
|
||||
endpage=tool=FALSE;
|
||||
}
|
||||
endpage=tool=FALSE;
|
||||
}
|
||||
|
||||
//Salva come.. la "maschera" su file .uml
|
||||
@ -3226,42 +3245,43 @@ void TMaskEditor_application::new_mask()
|
||||
void TMaskEditor_application::open_mask()
|
||||
{
|
||||
|
||||
TFilename in;
|
||||
|
||||
if (_dirty && !_save && yesno_box("Salvare la maschera corrente?") == K_YES)
|
||||
save_as_mask();
|
||||
|
||||
_dirty = _save = FALSE;
|
||||
destroy_window();
|
||||
|
||||
FILE_SPEC fs;
|
||||
memset(&fs, 0, sizeof(FILE_SPEC));
|
||||
strcpy(fs.type, "UML");
|
||||
strcpy(fs.name, "");
|
||||
strcpy(fs.creator, "ba2");
|
||||
xvt_fsys_get_default_dir(&fs.dir);
|
||||
if (xvt_dm_post_file_open(&fs, "Apri file:") == FL_OK) //apre solo virtualmente
|
||||
{
|
||||
xvt_fsys_set_dir(&fs.dir);
|
||||
in=fs.name;
|
||||
in.lower();
|
||||
}
|
||||
else return;
|
||||
|
||||
if(!in.exist()) {
|
||||
xvt_dm_post_error("Il file non può essere aperto... non esiste!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
destroy_window();
|
||||
_window = new TEditMask_window(-1,-1,68,16,"Maschera", WSF_SIZE,W_DOC);
|
||||
_save=TRUE;
|
||||
_window->set_mod(FALSE);
|
||||
_window->open();
|
||||
_window->restore_mask(fs.name);
|
||||
_window->force_update();
|
||||
}
|
||||
TFilename in;
|
||||
|
||||
if (_dirty && !_save && yesno_box("Salvare la maschera corrente?") == K_YES)
|
||||
save_as_mask();
|
||||
|
||||
_dirty = _save = FALSE;
|
||||
destroy_window();
|
||||
|
||||
FILE_SPEC fs;
|
||||
memset(&fs, 0, sizeof(FILE_SPEC));
|
||||
strcpy(fs.type, "UML");
|
||||
strcpy(fs.name, "");
|
||||
strcpy(fs.creator, "ba2");
|
||||
xvt_fsys_get_default_dir(&fs.dir);
|
||||
if (xvt_dm_post_file_open(&fs, "Apri file:") == FL_OK) //apre solo virtualmente
|
||||
{
|
||||
xvt_fsys_set_dir(&fs.dir);
|
||||
in=fs.name;
|
||||
in.lower();
|
||||
}
|
||||
else return;
|
||||
|
||||
if(!in.exist())
|
||||
{
|
||||
xvt_dm_post_error("Il file non può essere aperto... non esiste!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
destroy_window();
|
||||
_window = new TEditMask_window(-1,-1,68,16,"Maschera", WSF_SIZE,W_DOC);
|
||||
_save=TRUE;
|
||||
_window->set_mod(FALSE);
|
||||
_window->open();
|
||||
_window->restore_mask(fs.name);
|
||||
_window->force_update();
|
||||
}
|
||||
}
|
||||
|
||||
//Risalva la "maschera"
|
||||
|
@ -174,7 +174,7 @@ public:
|
||||
// @cmember Legge da file le proprietà della toolbar
|
||||
bool read_tool(TScanner& scanner);
|
||||
// @cmember Legge da file i controlli presenti in ogni singola pagina
|
||||
void read_control(TScanner& scanner,const TString& k, bool intool=FALSE);
|
||||
TEditMask_control* read_control(TScanner& scanner,const TString& k, bool intool=FALSE);
|
||||
// @cmember Legge le proprietà della "maschera" da quella di supporto
|
||||
void get_mask(TMask& m);
|
||||
// @cmember Gestisce gli eventi
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "ba2600b.h"
|
||||
|
||||
TOOLBAR "" 0 20 0 0
|
||||
TOOLBAR "" 0 18 0 2
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
@ -116,7 +116,7 @@ STRING F_FLAG 15
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
STRING F_GROUP 25 15
|
||||
STRING F_GROUP 80 15
|
||||
BEGIN
|
||||
PROMPT 45 4 "Gruppi: "
|
||||
GROUP 1
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include <config.h>
|
||||
#include <currency.h>
|
||||
#include <printer.h>
|
||||
#include <prefix.h>
|
||||
#include <printer.h>
|
||||
#include <recarray.h>
|
||||
#include <tabapp.h>
|
||||
|
||||
#include "../cg/cglib03.h"
|
||||
@ -12,6 +13,7 @@
|
||||
#include "batbver.h"
|
||||
|
||||
#define REG_JOURNAL 5
|
||||
#define TAB_BANCHE "%BAN"
|
||||
#define TAB_CAMBI "CAM"
|
||||
#define TAB_DELEGHE "%DEL"
|
||||
#define TAB_REGISTRI "REG"
|
||||
@ -42,6 +44,7 @@ protected: // TRelation_application
|
||||
protected:
|
||||
static bool valute_decimals_handler(TMask_field& f, KEY k);
|
||||
static bool change_decimals_handler(TMask_field& f, KEY k);
|
||||
static bool codcab_handler(TMask_field& f, KEY k);
|
||||
|
||||
public:
|
||||
bool exist_journal() { return _exist_journal; }
|
||||
@ -504,6 +507,18 @@ bool TGeneric_table_app::change_decimals_handler(TMask_field& f, KEY k)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TGeneric_table_app::codcab_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_ENTER && !f.empty())
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
const TString& abi = m.get(f.dlg()-1);
|
||||
const TRectype& rec = cache().get(TAB_BANCHE, abi);
|
||||
if (rec.empty())
|
||||
return f.error_box("Il codice ABI %s non esiste", (const char*)abi);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TGeneric_table_app::user_create()
|
||||
{
|
||||
@ -555,6 +570,9 @@ bool TGeneric_table_app::user_create()
|
||||
}
|
||||
if (name == TAB_CAMBI)
|
||||
set_search_field(FLD_TABCAM_D0);
|
||||
|
||||
if (name == TAB_BANCHE)
|
||||
mask.set_handler(102, codcab_handler);
|
||||
}
|
||||
|
||||
return ok;
|
||||
|
@ -239,7 +239,7 @@ void BA3200_application::set_headers()
|
||||
printer().setdate(d);
|
||||
}
|
||||
|
||||
riga.overwrite ("Data @< Pag. @#", riga.len()-22);
|
||||
riga.overwrite ("Data @> Pag. @#", riga.len()-25);
|
||||
|
||||
set_header (last_riga++, "%s", (const char *)riga);
|
||||
|
||||
|
@ -222,7 +222,7 @@ static bool registro_handler(TMask_field& field, KEY key)
|
||||
}
|
||||
static bool codditta_handler(TMask_field& field, KEY key)
|
||||
{
|
||||
if (key == K_TAB && field.focusdirty())
|
||||
if (key == K_TAB)
|
||||
{
|
||||
TMask& m = field.mask();
|
||||
const long codditta = m.get_long(F_CODDITTA);
|
||||
|
@ -133,7 +133,7 @@ bool Stampa_condizioni_pagamento_application::set_print(int)
|
||||
|
||||
if (da.not_empty()) from.put("CODTAB",da);
|
||||
if (a.not_empty()) to.put("CODTAB",a);
|
||||
get_cursor(_cur)->setregion (from, to);
|
||||
get_cursor(_cur)->setregion (from, to, 0x2);
|
||||
rt = TRUE;
|
||||
}
|
||||
return rt;
|
||||
|
@ -5,7 +5,7 @@ PAGE "Stampa condizioni di pagamento" -1 -1 35 6
|
||||
STRING F_INIZIO 4
|
||||
BEGIN
|
||||
PROMPT 2 1 "Da codice "
|
||||
FLAGS "UZ"
|
||||
FLAGS "U#"
|
||||
HELP "Inserire il codice da cui iniziare la stampa. Se in bianco vuol dire dall'inizio"
|
||||
FIELD CODTAB
|
||||
USE %CPG
|
||||
@ -14,12 +14,13 @@ BEGIN
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_INIZIO CODTAB
|
||||
GROUP 1
|
||||
ADD NONE
|
||||
END
|
||||
|
||||
STRING F_FINE 4
|
||||
BEGIN
|
||||
PROMPT 2 3 "A codice "
|
||||
FLAGS "UZ"
|
||||
FLAGS "U#"
|
||||
HELP "Inserire il codice di fine. Se in bianco vuol dire l'ultimo"
|
||||
FIELD CODTAB
|
||||
COPY USE F_INIZIO
|
||||
@ -27,6 +28,7 @@ BEGIN
|
||||
COPY DISPLAY F_INIZIO
|
||||
OUTPUT F_FINE CODTAB
|
||||
GROUP 2
|
||||
ADD NONE
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "ba4300.h"
|
||||
|
||||
TOOLBAR "" 0 18 0 4
|
||||
TOOLBAR "" 0 -4 0 4
|
||||
|
||||
BUTTON DLG_ATT 10 2
|
||||
BEGIN
|
||||
|
171
ba/ba7100.cpp
171
ba/ba7100.cpp
@ -11,6 +11,7 @@
|
||||
#include <relation.h>
|
||||
#include <sheet.h>
|
||||
#include <utility.h>
|
||||
#include <dongle.h>
|
||||
|
||||
#define NO_MFC
|
||||
#include <netsock.h>
|
||||
@ -173,6 +174,8 @@ HIDDEN int str2month(const char* str)
|
||||
return m+1;
|
||||
}
|
||||
|
||||
enum EncodingType { enc_plain_text, enc_quoted_printable, enc_base64 };
|
||||
|
||||
int TMail_box::get(TMail_messages& m)
|
||||
{
|
||||
// Lista dei caratteri validi
|
||||
@ -181,13 +184,13 @@ int TMail_box::get(TMail_messages& m)
|
||||
// Lista per decodifica dei caratteri validi
|
||||
char Deco64[256];
|
||||
memset(Deco64, ' ', sizeof(Deco64));
|
||||
|
||||
for (int i = 0; Base64[i]; i++)
|
||||
Deco64[Base64[i]] = i;
|
||||
|
||||
TString_array a;
|
||||
list(a);
|
||||
|
||||
TString buf;
|
||||
TString buf, boundary;
|
||||
FOR_EACH_ARRAY_ROW(a, r, row)
|
||||
{
|
||||
TMail_message* msgptr = new TMail_message(user());
|
||||
@ -198,8 +201,10 @@ int TMail_box::get(TMail_messages& m)
|
||||
WriteLine(_connection, buf);
|
||||
ReadLine(_connection, buf);
|
||||
bool ok = buf[0] == '+';
|
||||
bool base64 = FALSE;
|
||||
EncodingType encoding = enc_plain_text;
|
||||
bool in_body = FALSE;
|
||||
bool in_section = FALSE;
|
||||
boundary.cut(0);
|
||||
while (ok)
|
||||
{
|
||||
if (!ReadLine(_connection, buf))
|
||||
@ -215,60 +220,106 @@ int TMail_box::get(TMail_messages& m)
|
||||
}
|
||||
if (in_body)
|
||||
{
|
||||
if (base64)
|
||||
if (buf[0] == '-' && boundary.not_empty() && buf.find(boundary) >= 0)
|
||||
break; // Ignora sezioni di attachment
|
||||
|
||||
switch (encoding)
|
||||
{
|
||||
unsigned val = 0;
|
||||
int bits = 0;
|
||||
for (const char* s = buf; *s && *s != '='; s++)
|
||||
case enc_base64:
|
||||
{
|
||||
if (*s==0x0A || *s==0x0D || *s==0x20 || *s==0x09)
|
||||
continue; // Salta eventuali blanks
|
||||
val <<= 6;
|
||||
val |= Deco64[*s];
|
||||
bits += 6;
|
||||
if (bits >= 8)
|
||||
unsigned val = 0;
|
||||
int bits = 0;
|
||||
for (const char* s = buf; *s && *s != '='; s++)
|
||||
{
|
||||
const char c = char((val >> (bits - 8)) & 0xFF);
|
||||
msg << c;
|
||||
bits -= 8;
|
||||
if (*s==0x0A || *s==0x0D || *s==0x20 || *s==0x09)
|
||||
continue; // Salta eventuali blanks
|
||||
val <<= 6;
|
||||
val |= Deco64[*s];
|
||||
bits += 6;
|
||||
if (bits >= 8)
|
||||
{
|
||||
const char c = char((val >> (bits - 8)) & 0xFF);
|
||||
msg << c;
|
||||
bits -= 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const char last = buf.right(1)[0];
|
||||
if (last > '\0' && last < ' ')
|
||||
buf.rtrim(1);
|
||||
msg << buf << '\n';
|
||||
}
|
||||
break;
|
||||
case enc_quoted_printable:
|
||||
{
|
||||
for (const char* s = buf; *s; s++)
|
||||
{
|
||||
if (*s == '=')
|
||||
{
|
||||
s++;
|
||||
if (*s >= ' ')
|
||||
{
|
||||
int c; sscanf(s, "%2X", &c);
|
||||
msg << char(c);
|
||||
s++;
|
||||
}
|
||||
}
|
||||
else
|
||||
msg << *s;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
buf.rtrim();
|
||||
msg << buf << '\n';
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (buf.blank())
|
||||
in_body = TRUE; else
|
||||
if (boundary.not_empty())
|
||||
{
|
||||
if (buf.blank())
|
||||
{
|
||||
in_body = in_section;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (buf.find(boundary) >= 0)
|
||||
in_section = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (buf.blank())
|
||||
{
|
||||
in_body = TRUE;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (buf.compare("From:", 5, TRUE) == 0)
|
||||
{
|
||||
buf.ltrim(6);
|
||||
buf.ltrim(6); buf.trim();
|
||||
msg.set_sender(buf);
|
||||
} else
|
||||
continue;
|
||||
}
|
||||
if (buf.compare("To:", 3, TRUE) == 0)
|
||||
{
|
||||
buf.ltrim(4);
|
||||
buf.ltrim(4); buf.trim();
|
||||
msg.add_recipient(buf);
|
||||
} else
|
||||
continue;
|
||||
}
|
||||
if (buf.compare("Cc:", 3, TRUE) == 0)
|
||||
{
|
||||
buf.ltrim(4);
|
||||
buf.ltrim(4); buf.trim();
|
||||
msg.add_copy_recipient(buf);
|
||||
} else
|
||||
continue;
|
||||
}
|
||||
if (buf.compare("Subject:", 8, TRUE) == 0)
|
||||
{
|
||||
buf.ltrim(9);
|
||||
buf.ltrim(9); buf.trim();
|
||||
msg.set_subject(buf);
|
||||
} else
|
||||
continue;
|
||||
}
|
||||
if (buf.compare("Date:", 5, TRUE) == 0)
|
||||
{
|
||||
TToken_string d(buf.mid(6), ' ');
|
||||
TToken_string d(buf.mid(6), ' '); d.trim();
|
||||
int giorno = d.get_int(1);
|
||||
int mese = str2month(d.get());
|
||||
int anno = d.get_int();
|
||||
@ -277,10 +328,32 @@ int TMail_box::get(TMail_messages& m)
|
||||
buf.cut(0);
|
||||
buf << anno << '/' << mese << '/' << giorno << ' ' << ora;
|
||||
msg.set_date_time(buf);
|
||||
} else
|
||||
continue;
|
||||
}
|
||||
if (buf.compare("Content-Transfer-Encoding:", 26, TRUE) == 0)
|
||||
{
|
||||
base64 = buf.find("base64") > 0;
|
||||
if (buf.find("base64") > 0)
|
||||
encoding = enc_base64; else
|
||||
if (buf.find("quoted-printable") > 0)
|
||||
encoding = enc_quoted_printable;
|
||||
continue;
|
||||
}
|
||||
if (buf.compare("Content-Type:", 13, TRUE) == 0)
|
||||
{
|
||||
int bnd = buf.find("oundary="); // Funziona per Boundary e boundary
|
||||
if (bnd < 0)
|
||||
{
|
||||
ReadLine(_connection, buf);
|
||||
bnd = buf.find("oundary=");
|
||||
}
|
||||
if (bnd > 0)
|
||||
{
|
||||
const int apicia = buf.find('"', bnd);
|
||||
const int apicic = buf.find('"', apicia+1);
|
||||
if (apicia > 0 && apicic > apicia)
|
||||
boundary = buf.sub(apicia+1, apicic);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -343,7 +416,7 @@ TFilter_expr::TFilter_expr(TAutomask& m, int logicnum, const char* expr)
|
||||
|
||||
TLocalisamfile isf(logicnum);
|
||||
TRectype& rec = isf.curr();
|
||||
for (int i = 0; i < numvar(); i++) if (rec.exist(varname(i)))
|
||||
for (int i = 0; i < numvar(); i++) if (!rec.exist(varname(i)))
|
||||
{
|
||||
_error = 883;
|
||||
TString msg;
|
||||
@ -362,7 +435,7 @@ TFilter_expr::TFilter_expr(TAutomask& m, int logicnum, const char* expr)
|
||||
|
||||
class TMailer_mask : public TAutomask
|
||||
{
|
||||
int _timer_id;
|
||||
long _timer_id;
|
||||
int _mail_semaphore;
|
||||
|
||||
protected:
|
||||
@ -596,7 +669,7 @@ bool TMailer_mask::save_curr_line()
|
||||
|
||||
const TString old_mailto = set_ini_var(CONFIG_INSTALL, "Main", "MailTo", "");
|
||||
|
||||
appname << " /i" << tmp;
|
||||
appname << " /i" << tmp << " -u" << ::dongle().administrator();
|
||||
TExternal_app app(appname);
|
||||
bool ok = app.run() == NOERR;
|
||||
if (ok)
|
||||
@ -697,14 +770,20 @@ bool TMailer_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
|
||||
break;
|
||||
case DLG_SAVEREC:
|
||||
if (e == fe_button)
|
||||
save_all_lines();
|
||||
if (jolly == 0)
|
||||
{
|
||||
save_all_lines();
|
||||
}
|
||||
break;
|
||||
case DLG_DELREC:
|
||||
if (e == fe_button)
|
||||
{
|
||||
test_delete();
|
||||
fill_messages();
|
||||
return FALSE;
|
||||
if (jolly == 0)
|
||||
{
|
||||
test_delete();
|
||||
fill_messages();
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case F_FILE:
|
||||
@ -818,6 +897,10 @@ TMailer_mask::TMailer_mask()
|
||||
_timer_id(XVT_TIMER_ERROR), _mail_semaphore(0)
|
||||
{
|
||||
load();
|
||||
if (user() != ::dongle().administrator())
|
||||
{
|
||||
disable(- G_SUPERUSER);
|
||||
}
|
||||
}
|
||||
|
||||
TMailer_mask::~TMailer_mask()
|
||||
|
@ -24,3 +24,4 @@
|
||||
#define F_OPERATOR 103
|
||||
#define F_EXPR 104
|
||||
|
||||
#define G_SUPERUSER 10
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "ba7100a.h"
|
||||
|
||||
TOOLBAR "Toolbar" 0 19 78 3
|
||||
TOOLBAR "Toolbar" 0 -3 0 3
|
||||
|
||||
BUTTON DLG_SAVEREC 10 2
|
||||
BEGIN
|
||||
@ -25,17 +25,19 @@ END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Transazioni" -1 -1 78 20
|
||||
PAGE "Ricezione" -1 -1 78 20
|
||||
|
||||
BOOLEAN F_MAPI
|
||||
BEGIN
|
||||
PROMPT 1 0 "Preleva messaggi MAPI"
|
||||
GROUP G_SUPERUSER
|
||||
END
|
||||
|
||||
NUMBER F_TIMER 4
|
||||
BEGIN
|
||||
PROMPT 41 0 "Controlla la posta ogni "
|
||||
FLAGS "U"
|
||||
GROUP G_SUPERUSER
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
@ -46,17 +48,20 @@ END
|
||||
STRING F_SERVER 80 28
|
||||
BEGIN
|
||||
PROMPT 1 1 "Server "
|
||||
GROUP G_SUPERUSER
|
||||
END
|
||||
|
||||
STRING F_USER 32 8
|
||||
BEGIN
|
||||
PROMPT 41 1 "Utente "
|
||||
GROUP G_SUPERUSER
|
||||
END
|
||||
|
||||
STRING F_PASSWORD 32 8
|
||||
BEGIN
|
||||
PROMPT 61 1 "Password "
|
||||
FLAGS "*"
|
||||
GROUP G_SUPERUSER
|
||||
END
|
||||
|
||||
SPREADSHEET F_MESSAGES
|
||||
@ -70,26 +75,39 @@ BEGIN
|
||||
ITEM "Messaggio@50"
|
||||
ITEM "Mailer@4"
|
||||
ITEM "Id@64"
|
||||
GROUP G_SUPERUSER
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Parametri" -1 -1 78 20
|
||||
PAGE "Spedizione" -1 -1 78 20
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 0 "@bDestinatari"
|
||||
END
|
||||
|
||||
SPREADSHEET F_ADDRESSES 0 6
|
||||
BEGIN
|
||||
PROMPT 0 1 ""
|
||||
ITEM "Indirizzo@50"
|
||||
ITEM "Gruppo@50"
|
||||
GROUP G_SUPERUSER
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 8 "@bRegole"
|
||||
END
|
||||
|
||||
SPREADSHEET F_PARAMS
|
||||
BEGIN
|
||||
PROMPT 0 8 ""
|
||||
PROMPT 0 9 ""
|
||||
ITEM "Indirizzo@40"
|
||||
ITEM "File"
|
||||
ITEM "OP@2"
|
||||
ITEM "Filtro@64"
|
||||
GROUP G_SUPERUSER
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
@ -22,6 +22,29 @@ public:
|
||||
virtual ~TInstall_BA () {}
|
||||
};
|
||||
|
||||
HIDDEN int search_edit(TConfig& cfg, void*)
|
||||
{
|
||||
const TString16 module = cfg.get_paragraph().left(2);
|
||||
TAssoc_array& var = cfg.list_variables();
|
||||
bool dirty = FALSE;
|
||||
FOR_EACH_ASSOC_STRING (var, obj, key, str)
|
||||
{
|
||||
const TFixed_string confr (key);
|
||||
if (confr.compare("Edit_", 5, TRUE) == 0)
|
||||
{
|
||||
if (module.compare(str, 2, TRUE) != 0)
|
||||
{
|
||||
cfg.remove(key);
|
||||
dirty = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dirty)
|
||||
{
|
||||
cfg.set_paragraph("");
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool TInstall_BA::post_installer()
|
||||
{
|
||||
@ -50,6 +73,10 @@ bool TInstall_BA::post_installer()
|
||||
prassis.set_paragraph("mr");
|
||||
prassis.set(tabapp,"mr0 -0");
|
||||
}
|
||||
|
||||
TConfig install ("install.ini");
|
||||
install.for_each_paragraph(search_edit, NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
PAGE "Stampa vettori" -1 -1 50 8
|
||||
|
||||
NUMBER F_INIZIO1 5
|
||||
STRING F_INIZIO1 6
|
||||
BEGIN
|
||||
PROMPT 2 1 "Da codice "
|
||||
FLAGS "RZ"
|
||||
FLAGS "ZU"
|
||||
HELP "Codice da cui iniziare la stampa. Vuoto = inizio archivio"
|
||||
FIELD LF_TABCOM->CODTAB
|
||||
USE %VET
|
||||
@ -17,10 +17,10 @@ KEY 1
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
NUMBER F_FINE1 5
|
||||
STRING F_FINE1 6
|
||||
BEGIN
|
||||
PROMPT 2 3 "A codice "
|
||||
FLAGS "RZ"
|
||||
FLAGS "ZU"
|
||||
HELP "Codice di fine. Vuoto = fine archivio"
|
||||
FIELD LF_TABCOM->CODTAB
|
||||
COPY USE F_INIZIO1
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "ba3100.h"
|
||||
#include "batbban.h"
|
||||
|
||||
TOOLBAR "" 0 19 0 3
|
||||
TOOLBAR "" 0 -3 0 3
|
||||
#include <toolbar.h>
|
||||
ENDPAGE
|
||||
|
||||
@ -13,7 +13,7 @@ BEGIN
|
||||
FIELD CODTAB[1,5]
|
||||
FLAGS "Z"
|
||||
KEY 1
|
||||
USE %BAN KEY 1 SELECT CODTAB ?= "?????"
|
||||
USE %BAN SELECT CODTAB ?= "?????"
|
||||
INPUT CODTAB F_CODICEABI
|
||||
DISPLAY "ABI@5" CODTAB[1,5]
|
||||
DISPLAY "Istituto@50" S0
|
||||
@ -21,7 +21,7 @@ BEGIN
|
||||
OUTPUT H_DENOMABI S0
|
||||
MESSAGE COPY,H_CODICEABI
|
||||
WARNING "Istituto assente"
|
||||
CHECKTYPE FORCED
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_CODICECAB 5
|
||||
|
@ -165,10 +165,10 @@ END
|
||||
|
||||
STRING F_CPAG_NC 2
|
||||
BEGIN
|
||||
FLAGS "UZ"
|
||||
FLAGS "U"
|
||||
PROMPT 38 16 "Cod. pag. per note di credito "
|
||||
FIELD S7
|
||||
USE %CPG SELECT (CODTAB?="??") && (S4=="1")
|
||||
USE %CPG SELECT ((CODTAB?="??")||(CODTAB?="?")) && (S4=="1")
|
||||
INPUT CODTAB F_CPAG_NC
|
||||
DISPLAY "Cod. pagamento" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
|
@ -16,9 +16,9 @@
|
||||
#define LST_TABIVA_S3 115
|
||||
#define LST_TABIVA_S4 116
|
||||
#define CHK_TABIVA_B1 117
|
||||
#define DLG_DEL 120
|
||||
#define FLD_SOSPESO_B2 118
|
||||
#define CHK_TABIVA_B4 119
|
||||
#define CHK_TABIVA_B4 119
|
||||
#define FLD_TABIVA_S10 120
|
||||
#define FLD_TABIVA_S11 121
|
||||
|
||||
#define FLD_TABIVA_I1 122
|
||||
#define FLD_DETRAZIONE 123
|
||||
|
@ -106,19 +106,38 @@ BEGIN
|
||||
HELP "Inserire la percentuale teorica dell'imposta"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 40 4
|
||||
#ifdef COVER
|
||||
|
||||
NUMBER FLD_TABIVA_I1 1
|
||||
BEGIN
|
||||
PROMPT 3 5 "Colonne per allegati imponibili"
|
||||
PROMPT 3 5 "Detraibilita' "
|
||||
SHEET "Codice|Tipo detraibilita'@75"
|
||||
INPUT FLD_TABIVA_I1
|
||||
ITEM " |Regime normale"
|
||||
ITEM "1|IVA indetraibile su acquisti riferiti a ricavi esenti"
|
||||
ITEM "3|IVA indicata per passaggi interni al solo fine del calcolo di ventilazione"
|
||||
ITEM "9|IVA non detraibile per l'articolo 19"
|
||||
OUTPUT FLD_TABIVA_I1
|
||||
OUTPUT FLD_DETRAZIONE
|
||||
FIELD I1
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 25 4
|
||||
STRING FLD_DETRAZIONE 80 52
|
||||
BEGIN
|
||||
PROMPT 44 5 "Indicatori mod. 101/102"
|
||||
PROMPT 22 5 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
#endif
|
||||
|
||||
GROUPBOX DLG_NULL 40 4
|
||||
BEGIN
|
||||
PROMPT 3 6 "@bColonne per allegati imponibili"
|
||||
END
|
||||
|
||||
LIST FLD_TABIVA_S7 1 24
|
||||
BEGIN
|
||||
PROMPT 4 6 "Clienti "
|
||||
PROMPT 4 7 "Clienti "
|
||||
FIELD S7
|
||||
HELP "Inserire il numero della colonna degli allegati clienti relativa all'imposta"
|
||||
ITEM " |Non in allegato"
|
||||
@ -128,7 +147,7 @@ END
|
||||
|
||||
LIST FLD_TABIVA_S8 1 24
|
||||
BEGIN
|
||||
PROMPT 4 7 "Fornitori "
|
||||
PROMPT 4 8 "Fornitori "
|
||||
FIELD S8
|
||||
HELP "Inserire il numero della colonna degli allegati fornitori relativa all'imposta"
|
||||
ITEM " |Non in allegato"
|
||||
@ -137,16 +156,21 @@ BEGIN
|
||||
ITEM "4|Non imponibili"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 25 4
|
||||
BEGIN
|
||||
PROMPT 44 6 "@bIndicatori mod. 101/102"
|
||||
END
|
||||
|
||||
BOOLEAN CHK_TABIVA_B0
|
||||
BEGIN
|
||||
PROMPT 50 6 "Clienti"
|
||||
PROMPT 50 7 "Clienti"
|
||||
FIELD B0
|
||||
HELP "Indicare se il codice deve comparire nel modello 101"
|
||||
END
|
||||
|
||||
BOOLEAN FLD_TABIVA_B1
|
||||
BEGIN
|
||||
PROMPT 50 7 "Fornitori"
|
||||
PROMPT 50 8 "Fornitori"
|
||||
FIELD B1
|
||||
HELP "Indicare se il codice deve comparire nel modello 102"
|
||||
END
|
||||
@ -195,11 +219,10 @@ BEGIN
|
||||
FLAGS "U"
|
||||
SHEET "Riga|Descrizione@60"
|
||||
INPUT FLD_TABIVA_S10
|
||||
ITEM " |Nessuno"
|
||||
ITEM "VP1|Ammontare complessivo operazioni attive"
|
||||
ITEM "VP2|Ammontare complessivo operazioni intracomunitarie"
|
||||
OUTPUT FLD_TABIVA_S10
|
||||
ITEM " |Nessuno"
|
||||
ITEM "VP1|VP1"
|
||||
ITEM "VP2|VP2"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING FLD_TABIVA_S11 3
|
||||
@ -209,11 +232,10 @@ BEGIN
|
||||
FLAGS "U"
|
||||
SHEET "Riga|Descrizione@60"
|
||||
INPUT FLD_TABIVA_S11
|
||||
ITEM " |Nessuno"
|
||||
ITEM "VP3|Ammontare complessivo operazioni passive"
|
||||
ITEM "VP4|Ammontare complessivo operazioni intracomunitarie"
|
||||
OUTPUT FLD_TABIVA_S11
|
||||
ITEM " |Nessuno"
|
||||
ITEM "VP3|VP3"
|
||||
ITEM "VP4|VP4"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
LIST LST_TABIVA_S3 1 31
|
||||
@ -255,21 +277,18 @@ BOOLEAN CHK_TABIVA_B4
|
||||
BEGIN
|
||||
PROMPT 3 17 "Escluso dal calcolo rimborso per aliquota media"
|
||||
FIELD B4
|
||||
HELP "Indicare se il codice NON vale per il calcolo del rimborso per aliquota media"
|
||||
END
|
||||
|
||||
BOOLEAN CHK_TABIVA_S9
|
||||
BEGIN
|
||||
PROMPT 3 18 "Codice per calcolo rimborso infrannuale"
|
||||
FIELD B3
|
||||
HELP "Indicare se il codice vale per il calcolo del rimborso infrannuale"
|
||||
END
|
||||
|
||||
BOOLEAN FLD_SOSPESO_B2
|
||||
BEGIN
|
||||
PROMPT 3 19 "Codice IVA sospeso"
|
||||
FIELD B2
|
||||
HELP "Indicare se il codice iva e' sospeso"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
@ -64,7 +64,7 @@ BEGIN
|
||||
END
|
||||
|
||||
|
||||
GROUPBOX DLG_NULL 75 3
|
||||
GROUPBOX DLG_NULL 75 4
|
||||
BEGIN
|
||||
PROMPT 1 10 "Formato valuta"
|
||||
END
|
||||
@ -79,7 +79,7 @@ END
|
||||
|
||||
LIST F_DECIMALI 1 14
|
||||
BEGIN
|
||||
PROMPT 40 11 "Separatore decimali "
|
||||
PROMPT 2 12 "Separatore decimali "
|
||||
ITEM "I|Virgola (,)"
|
||||
ITEM "E|Punto (.)"
|
||||
FLAGS "D"
|
||||
|
@ -13,42 +13,18 @@ BEGIN
|
||||
PROMPT 1 1 "@bCodice Nomenclatura"
|
||||
END
|
||||
|
||||
STRING NOC_CODICE1 4
|
||||
STRING NOC_CODICE1 8
|
||||
BEGIN
|
||||
PROMPT 2 3 "Codice "
|
||||
FLAGS "U"
|
||||
USE %NOC
|
||||
INPUT CODTAB[1,4] NOC_CODICE1
|
||||
INPUT CODTAB[5,6] NOC_CODICE2
|
||||
INPUT CODTAB[7,8] NOC_CODICE3
|
||||
INPUT CODTAB[1,8] NOC_CODICE1
|
||||
DISPLAY "Codice@8" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT NOC_CODICE1 CODTAB[1,4]
|
||||
OUTPUT NOC_CODICE2 CODTAB[5,6]
|
||||
OUTPUT NOC_CODICE3 CODTAB[7,8]
|
||||
OUTPUT NOC_CODICE1 CODTAB[1,8]
|
||||
OUTPUT NOC_DESCR S0
|
||||
CHECKTYPE REQUIRED
|
||||
FIELD CODTAB[1,4]
|
||||
KEY 1
|
||||
END
|
||||
|
||||
STRING NOC_CODICE2 2
|
||||
BEGIN
|
||||
PROMPT 24 3 ""
|
||||
FLAGS "U"
|
||||
COPY ALL NOC_CODICE1
|
||||
CHECKTYPE REQUIRED
|
||||
FIELD CODTAB[5,6]
|
||||
KEY 1
|
||||
END
|
||||
|
||||
STRING NOC_CODICE3 2
|
||||
BEGIN
|
||||
PROMPT 32 3 ""
|
||||
FLAGS "U"
|
||||
COPY ALL NOC_CODICE1
|
||||
CHECKTYPE REQUIRED
|
||||
FIELD CODTAB[7,8]
|
||||
FIELD CODTAB[1,8]
|
||||
KEY 1
|
||||
END
|
||||
|
||||
|
@ -158,8 +158,8 @@ END
|
||||
|
||||
STRING F_ATTIVITA 5
|
||||
BEGIN
|
||||
PROMPT 1 9 "Codice attivita "
|
||||
FIELD REG->S8
|
||||
PROMPT 1 9 "Codice attivita' "
|
||||
FIELD S8
|
||||
FLAGS "URZ"
|
||||
GROUP GRP_VENDITE GRP_ACQUISTI GRP_RIEPIVA
|
||||
USE LF_ATTIV
|
||||
|
@ -100,7 +100,7 @@ END
|
||||
|
||||
BOOLEAN VAL_INEURO
|
||||
BEGIN
|
||||
PROMPT 40 11 "Espresso in EURO"
|
||||
PROMPT 40 11 "Espresso Contro EURO"
|
||||
FIELD B1
|
||||
END
|
||||
|
||||
|
@ -17,7 +17,7 @@ BEGIN
|
||||
PROMPT 2 2 "Codice vettore "
|
||||
FIELD CODTAB
|
||||
HELP "Codice del vettore"
|
||||
FLAGS "RZU"
|
||||
FLAGS "ZU"
|
||||
USE %VET
|
||||
CHECKTYPE REQUIRED
|
||||
INPUT CODTAB F_CODVETT
|
||||
|
@ -11,5 +11,5 @@ Fields=B3,1|B4,1|B5,1|B6,1|B7,1|B8,1|B9,1|FPC,1
|
||||
ESC|%yr%|||||||||||||||||||||||||||||||||||||||||01-01-%yr%|31-12-%yr%||||||||||||||
|
||||
REG|%yr%VEN|REGISTRO DELLE VENDITE|||||||1|%att%|M|1|||1||||1||||||||||||||||||||||||||||||||||X|X|||
|
||||
REG|%yr%ACQ|REGISTRO DEGLI ACQUISTI|||||||2|%att%|M|2|||1||||1||||||||||||||||||||||||||||||||||||||
|
||||
REG|%yr%GIO|LIBRO GIORNALE|||||||5|%att%|M|5|||1|1|||1||||||||||||||||||||||||||||||||||||||
|
||||
REG|%yr%GIO|LIBRO GIORNALE|||||||5||M|5|||1|1|||1||||||||||||||||||||||||||||||||||||||
|
||||
REG|%yr%COR|REGISTRO DEI CORRISPETTIVI|||||||3|%att%|M|1|||1||||1||||||||||||||||||||||||||||X||||||||||
|
||||
|
@ -147,6 +147,8 @@
|
||||
#define F_DESBANPR 244
|
||||
#define F_TIPODOCFAT 245
|
||||
#define F_CODCAUS 246
|
||||
#define F_CODVALINTRA 247
|
||||
#define F_DESVALINTRA 248
|
||||
|
||||
#define DLG_RIC 300
|
||||
#define DLG_CST 301
|
||||
|
@ -706,9 +706,34 @@ BEGIN
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_CODVALINTRA 3
|
||||
BEGIN
|
||||
PROMPT 2 8 "Valuta INTRA"
|
||||
FLAGS "UZ"
|
||||
FIELD VALINTRA
|
||||
COPY USE F_CODVAL
|
||||
INPUT CODTAB F_CODVALINTRA
|
||||
COPY DISPLAY F_CODVAL
|
||||
OUTPUT F_CODVALINTRA CODTAB
|
||||
OUTPUT F_DESVALINTRA S0
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 4
|
||||
END
|
||||
|
||||
STRING F_DESVALINTRA 50
|
||||
BEGIN
|
||||
PROMPT 22 8 ""
|
||||
COPY USE F_DESVAL
|
||||
INPUT S0 F_DESVALINTRA
|
||||
COPY DISPLAY F_DESVAL
|
||||
COPY OUTPUT F_CODVALINTRA
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 4
|
||||
END
|
||||
|
||||
STRING F_CODLIN 1
|
||||
BEGIN
|
||||
PROMPT 2 8 "Lingua "
|
||||
PROMPT 2 9 "Lingua "
|
||||
FIELD CODLIN
|
||||
USE %LNG
|
||||
FLAGS "U"
|
||||
@ -723,7 +748,7 @@ END
|
||||
|
||||
STRING F_DESLIN 50
|
||||
BEGIN
|
||||
PROMPT 22 8 ""
|
||||
PROMPT 22 9 ""
|
||||
USE %LNG KEY 2
|
||||
INPUT S0 F_DESLIN
|
||||
DISPLAY "Descrizione@50" S0
|
||||
@ -734,7 +759,7 @@ END
|
||||
|
||||
STRING F_CODPAG 4
|
||||
BEGIN
|
||||
PROMPT 2 9 "Pagamento "
|
||||
PROMPT 2 10 "Pagamento "
|
||||
FIELD CODPAG
|
||||
FLAGS "U#"
|
||||
USE %CPG
|
||||
@ -750,37 +775,38 @@ END
|
||||
|
||||
STRING F_DESPAG 50
|
||||
BEGIN
|
||||
PROMPT 22 9 ""
|
||||
PROMPT 22 10 ""
|
||||
USE %CPG KEY 2
|
||||
INPUT S0 F_DESPAG
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice pagamento" CODTAB
|
||||
COPY OUTPUT F_CODPAG
|
||||
CHECKTYPE NORMAL
|
||||
ADD RUN ba3 -6
|
||||
END
|
||||
|
||||
CURRENCY F_FIDO 15
|
||||
BEGIN
|
||||
PROMPT 2 10 "Fido "
|
||||
PROMPT 2 11 "Fido "
|
||||
FIELD FIDO
|
||||
DRIVENBY F_CODVAL
|
||||
HELP "Importo massimo fido del cliente/fornitore"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 76 4
|
||||
GROUPBOX DLG_NULL 76 3
|
||||
BEGIN
|
||||
PROMPT 1 11 "Conto cliente/fornitore"
|
||||
PROMPT 1 12 "@bConto cliente/fornitore"
|
||||
END
|
||||
|
||||
NUMBER F_GRUPPO 3
|
||||
BEGIN
|
||||
PROMPT 2 12 "Gruppo "
|
||||
PROMPT 2 13 "Grp."
|
||||
FIELD GRUPPO
|
||||
END
|
||||
|
||||
NUMBER F_CONTO 3
|
||||
BEGIN
|
||||
PROMPT 27 12 "Conto "
|
||||
PROMPT 11 13 "Cnt."
|
||||
FIELD CONTO
|
||||
USE LF_PCON SELECT (CONTO!="")&&(SOTTOCONTO="")&&(TMCF=#F_TIPOCF)
|
||||
INPUT GRUPPO F_GRUPPO
|
||||
@ -798,7 +824,7 @@ END
|
||||
|
||||
STRING F_DESCONTO 50
|
||||
BEGIN
|
||||
PROMPT 2 13 "Descrizione "
|
||||
PROMPT 22 13 ""
|
||||
USE LF_PCON KEY 2 SELECT (CONTO!="")&&(SOTTOCONTO="")&&(TMCF=#F_TIPOCF)
|
||||
INPUT DESCR F_DESCONTO
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
@ -811,12 +837,12 @@ END
|
||||
|
||||
GROUPBOX DLG_RIC 76 4
|
||||
BEGIN
|
||||
PROMPT 1 15 "Conto di ricavo"
|
||||
PROMPT 1 15 "@bConto di ricavo"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_CST 76 4
|
||||
BEGIN
|
||||
PROMPT 1 15 "Conto di costo"
|
||||
PROMPT 1 15 "@bConto di costo"
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "cg0500.h"
|
||||
|
||||
TOOLBAR "" 0 20 0 2
|
||||
TOOLBAR "" 0 -3 0 3
|
||||
|
||||
#include <toolbar.h>
|
||||
|
||||
@ -300,7 +300,7 @@ END
|
||||
|
||||
LIST F_OP_FINE_ANNO 1 11
|
||||
BEGIN
|
||||
PROMPT 2 14 "Operazioni di fine anno "
|
||||
PROMPT 2 14 "Operazioni di fine anno "
|
||||
ITEM " | "
|
||||
ITEM "C|Chiusura"
|
||||
ITEM "A|Apertura"
|
||||
|
@ -29,7 +29,6 @@ public:
|
||||
TDate _datadoc;
|
||||
TString _numdoc;
|
||||
real _totale;
|
||||
TString _descrizione;
|
||||
TString _causale_fattura;
|
||||
TipoIVA _iva_fattura;
|
||||
};
|
||||
@ -484,11 +483,12 @@ void TPrimanota_application::init_mask(TMask& m)
|
||||
|
||||
// Show/Hide campi valuta: F_VALUTAINTRA, F_CAMBIOINTRA, F_CORRLIRE, F_CORRVAL (GROUP 4)
|
||||
m.show(-4, causale().valintra());
|
||||
if (god_mode("IntraAutoIva"))
|
||||
/* if (god_mode("IntraAutoIva"))
|
||||
{
|
||||
if (m.insert_mode() && causale().valintra() && !causale().intra())
|
||||
m.set(F_SOLAIVA, "X", TRUE); // Propone movimento di sola iva
|
||||
}
|
||||
*/
|
||||
|
||||
m.show(F_CODIVA, m.insert_mode()); // Codice IVA standard
|
||||
|
||||
@ -825,11 +825,6 @@ int TPrimanota_application::read(TMask& m)
|
||||
c.add_to(riga, 4, 0x7); // Conto 105-110
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
if (type2pos('T') >= 0 && type2pos('I') < 0)
|
||||
NFCHECK("Sono spariti i tipi riga!");
|
||||
#endif
|
||||
|
||||
calcola_imp(); // Calcola totale imponibile ed imposte
|
||||
|
||||
if (is_fattura()) // Ci dovrebbero essere delle scadenze
|
||||
@ -1202,7 +1197,6 @@ void TPrimanota_application::genera_incasso(const char* causimm)
|
||||
_incasso->_numdoc = m.get(F_NUMDOC);
|
||||
_incasso->_clifo.get(_rel->cg(0));
|
||||
_incasso->_totale = m.get_real(F_TOTALE);
|
||||
_incasso->_descrizione= m.get(F_DESCR);
|
||||
_incasso->_step = 1;
|
||||
}
|
||||
else
|
||||
@ -1218,7 +1212,7 @@ void TPrimanota_application::genera_incasso(const char* causimm)
|
||||
imp.add_to(row1, 0);
|
||||
row1.add(_incasso->_clifo.string(0x3));
|
||||
row1.add(" ");
|
||||
row1.add(_incasso->_descrizione);
|
||||
row1.add(" ");
|
||||
row1.add(contro.string(0x3));
|
||||
|
||||
TToken_string& row2 = cgs().row(1);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "cg2100.h"
|
||||
|
||||
TOOLBAR "" 0 19 0 3
|
||||
TOOLBAR "" 0 -4 0 4
|
||||
#include <toolbar.h>
|
||||
ENDPAGE
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "cg2100.h"
|
||||
|
||||
TOOLBAR "" 0 19 0 3
|
||||
TOOLBAR "" 0 -4 0 4
|
||||
|
||||
#include <toolbar.h>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "cg2100.h"
|
||||
#include "cg21sld.h"
|
||||
|
||||
TOOLBAR "" 0 19 0 3
|
||||
TOOLBAR "" 0 -4 0 4
|
||||
|
||||
#include <toolbar.h>
|
||||
|
||||
|
@ -36,6 +36,13 @@ TRectype& TMovimentoPN::iva(int i)
|
||||
return _iva.row(i >= 0 ? i+1 : -1, TRUE);
|
||||
}
|
||||
|
||||
void TMovimentoPN::destroy_cg_row(int i)
|
||||
{
|
||||
if (i < 0)
|
||||
_cg.destroy_rows();
|
||||
else
|
||||
_cg.destroy_row(i+1, TRUE);
|
||||
}
|
||||
|
||||
int TMovimentoPN::read_mov_rows()
|
||||
{
|
||||
|
@ -67,6 +67,7 @@ public:
|
||||
int cg_items() const { return _cg.rows(); }
|
||||
int iva_items() const { return _iva.rows(); }
|
||||
void destroy_rows(long numreg);
|
||||
void destroy_cg_row(int i);
|
||||
|
||||
int date2liq(const TDate& data) const; // Estrae dalla data il mese di liquidazione
|
||||
char frequenza_versamenti(int year) const; // Ritorna 'M'ensile o 'T'rimestrale
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "cg21sld.h"
|
||||
|
||||
#include <clifo.h>
|
||||
#include <cfven.h>
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Funzioni di decodifica/calcolo
|
||||
@ -647,6 +648,20 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
|
||||
bool errato = importo != speso;
|
||||
if (errato && a._as400 && speso.is_zero())
|
||||
errato = FALSE;
|
||||
|
||||
/* Richiesto da Cover ed inculato da PRASSI
|
||||
if (nota && errato && speso.is_zero())
|
||||
{
|
||||
const int annorif = m.get_int(F_ANNORIF);
|
||||
const TString& numrif = m.get(F_NUMRIF);
|
||||
if (annorif > 0 && !numrif.blank() &&
|
||||
yesno_box("Si desidera generare automaticamente la partita %d %s?", annorif, (const char*)numrif))
|
||||
{
|
||||
const TBill bill(r, 2, 0x1);
|
||||
errato = !a.crea_partita(bill, annorif, numrif, currig, importo);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if (errato)
|
||||
{
|
||||
@ -1169,8 +1184,9 @@ bool TPrimanota_application::codiva_handler(TMask_field& f, KEY key)
|
||||
bool TPrimanota_application::detrazione_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (key == K_TAB && f.dirty() && app().iva() == iva_acquisti)
|
||||
{
|
||||
TMask_field& ci = f.mask().field(101);
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
TMask_field& ci = m.field(101);
|
||||
ci.set_dirty();
|
||||
ci.on_hit();
|
||||
}
|
||||
@ -1246,7 +1262,7 @@ real TPrimanota_application::calcola_imp() const
|
||||
return imponibili+imposte;
|
||||
}
|
||||
|
||||
// Elimina dallo sheet le righr iva senza importi (imponibile e imposta)
|
||||
// Elimina dallo sheet le righe iva senza importi (imponibile e imposta)
|
||||
// Certified 99%
|
||||
void TPrimanota_application::ivas_pack()
|
||||
{
|
||||
@ -2145,10 +2161,10 @@ bool TPrimanota_application::clifo_handler(TMask_field& f, KEY key)
|
||||
upi.check_type(alleg == 3 ? CHECK_REQUIRED : CHECK_NORMAL);
|
||||
|
||||
const TString& oldpag = m.get(F_CODPAG);
|
||||
if (m.is_running() /* m.insert_mode() && oldpag.empty() */)
|
||||
if (m.is_running())
|
||||
{
|
||||
const TString& s = clifo.get(CLI_CODPAG);
|
||||
if (s.not_empty() && s != oldpag)
|
||||
if (/* s.not_empty() && */ s != oldpag)
|
||||
{
|
||||
TEdit_field& cp = m.efield(F_CODPAG);
|
||||
if (cp.active()) // Se il campo F_CODPAG e' attivo
|
||||
@ -2170,15 +2186,23 @@ bool TPrimanota_application::clifo_handler(TMask_field& f, KEY key)
|
||||
}
|
||||
|
||||
if (a.is_fattura())
|
||||
{
|
||||
{
|
||||
const TRectype& clifov = cliforel.curr(LF_CFVEN);
|
||||
|
||||
if (clifo.get(CLI_CODCAB).not_empty())
|
||||
{
|
||||
m.set(FS_VSABI, clifo.get(CLI_CODABI));
|
||||
m.set(FS_VSCAB, clifo.get(CLI_CODCAB));
|
||||
m.send_key(K_TAB, FS_VSCAB);
|
||||
}
|
||||
if (clifov.get(CFV_CODCABPR).not_empty())
|
||||
{
|
||||
m.set(FS_NSABI, clifov.get(CFV_CODABIPR));
|
||||
m.set(FS_NSCAB, clifov.get(CFV_CODCABPR));
|
||||
m.send_key(K_TAB, FS_NSCAB);
|
||||
}
|
||||
|
||||
const TString& agente = cliforel.curr(LF_CFVEN).get(CLI_CODAG);
|
||||
const TString& agente = clifov.get(CLI_CODAG);
|
||||
if (agente.not_empty())
|
||||
{
|
||||
m.set(FS_AGENTE, agente, TRUE);
|
||||
|
@ -258,6 +258,7 @@ protected:
|
||||
int cerca_conto_cf(TBill& bill) const;
|
||||
|
||||
bool edit_partite(const TMask& m, int riga);
|
||||
bool crea_partita(const TBill& bill, int anno, const TString& numero, int numrig, const TImporto& importo);
|
||||
|
||||
bool notify_cgline_deletion(TPartita& partita, long nreg, int numrig);
|
||||
bool notify_cgline_deletion(int numrig);
|
||||
|
@ -168,10 +168,10 @@ bool TCausale::ok() const
|
||||
{
|
||||
if (iva() == iva_errata)
|
||||
return FALSE;
|
||||
|
||||
/* Non segnalare piu' questa incongruenza di poco conto
|
||||
if (corrispettivi() != reg().corrispettivi())
|
||||
return error_box("Tipo documento e registro incongruenti per i corrispettivi");
|
||||
|
||||
*/
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -826,10 +826,23 @@ bool TPrimanota_application::read_scadenze(TMask& m)
|
||||
const bool in_valuta = m.get(SK_VALUTA).not_empty();
|
||||
|
||||
const real totale = m.get(in_valuta ? SK_TOTDOCVAL : F_TOTALE);
|
||||
if (totale != partita.importo(in_valuta).valore() ||
|
||||
m.get_real(F_IMPOSTE) != partita.get_real(PART_IMPOSTA))
|
||||
if (totale != partita.importo(in_valuta).valore())
|
||||
{
|
||||
warning_box("Gli importi delle scadenze non corrispondono al totale documento");
|
||||
const TCurrency totdoc_c(totale, m.get(SK_VALUTA));
|
||||
const TCurrency totdoc_s(partita.importo(in_valuta).valore(), m.get(SK_VALUTA));
|
||||
const TString i1 = totdoc_c.string(TRUE);
|
||||
const TString i2 = totdoc_s.string(TRUE);
|
||||
warning_box("Il totale documento (%s) non corrisponde a quello del saldaconto (%s).",
|
||||
(const char*)i1, (const char*)i2);
|
||||
}
|
||||
if (m.get_real(F_IMPOSTE) != partita.get_real(PART_IMPOSTA))
|
||||
{
|
||||
const TCurrency imposte_c(m.get_real(F_IMPOSTE));
|
||||
const TCurrency imposte_s(partita.get_real(PART_IMPOSTA));
|
||||
const TString i1 = imposte_c.string(TRUE);
|
||||
const TString i2 = imposte_s.string(TRUE);
|
||||
warning_box("Il totale delle imposte (%s) non corrisponde a quello del saldaconto (%s).",
|
||||
(const char*)i1, (const char*)i2);
|
||||
}
|
||||
|
||||
set_totale_pagamento(FALSE);
|
||||
|
@ -1346,7 +1346,7 @@ bool TGame_mask::edit_scadenza_handler(TMask_field& f, KEY k)
|
||||
#ifdef __EXTRA__
|
||||
TMask* nm = new TNew_mask(gm.conto().tipo(), FALSE, FALSE);
|
||||
nm->set(P_ANNO, game.anno());
|
||||
nm->set(P_NUMERO, game.numero());
|
||||
// nm->set(P_NUMERO, game.numero()); // Non deve proporre nulla: CM000206
|
||||
const KEY k = nm->run();
|
||||
tm = (tipo_movimento)nm->get_int(P_NUOVO);
|
||||
delete nm; nm = NULL;
|
||||
@ -1909,7 +1909,7 @@ bool TPrimanota_application::edit_partite(const TMask& m, int riga)
|
||||
partite().update_reg(pn->curr());
|
||||
|
||||
// Esecuzione maschera di selezione partite
|
||||
TGame_mask* mask = NULL;
|
||||
static TGame_mask* mask = NULL;
|
||||
|
||||
if (mask == NULL)
|
||||
mask = new TGame_mask(b, numreg, riga+1);
|
||||
@ -1930,4 +1930,67 @@ bool TPrimanota_application::edit_partite(const TMask& m, int riga)
|
||||
return changed;
|
||||
}
|
||||
|
||||
bool TPrimanota_application::crea_partita(const TBill& bill, int anno, const TString& numero, int numrig, const TImporto& importo)
|
||||
{
|
||||
TPartita& partita = app().partite().partita(bill, anno, numero);
|
||||
|
||||
TRiga_partite& part = partita.new_row(); // Creazione nuova riga vuota
|
||||
const int nriga = part.get_int(PART_NRIGA); // Nuova riga
|
||||
|
||||
// Copia dati movimento corrente
|
||||
part.put(PART_NREG, NUMREG_PROVVISORIO); // Numero operazione
|
||||
part.put(PART_NUMRIG, numrig); // Riga su cui ho cliccato
|
||||
|
||||
// Forza il gruppo/conto cliente corretto (lo fa gia' anche la new_row)
|
||||
part.put(PART_GRUPPOCL, bill.gruppo());
|
||||
part.put(PART_CONTOCL, bill.conto());
|
||||
|
||||
const TCausale& causale = app().causale();
|
||||
const tipo_movimento tm = (tipo_movimento)causale.tipomov();
|
||||
part.put(PART_TIPOMOV, int(tm));
|
||||
|
||||
TMask& cm = app().curr_mask();
|
||||
|
||||
// Setta il cambio corrente
|
||||
const TValuta valuta(cm, SK_VALUTA, SK_DATACAMBIO, SK_CAMBIO);
|
||||
valuta.put(part);
|
||||
|
||||
part.put(PART_NUMDOC, cm.get(F_NUMDOC));
|
||||
part.put(PART_DATADOC, cm.get(F_DATADOC));
|
||||
part.put(PART_DATAREG, cm.get(F_DATAREG));
|
||||
part.put(PART_DESCR, cm.get(F_DESCR));
|
||||
part.put(PART_DATAPAG, cm.get(F_DATAREG));
|
||||
part.put(PART_TIPOPAG, 1); // Rimessa diretta
|
||||
|
||||
// Copia dati causale corrente
|
||||
part.put(PART_CODCAUS, causale.codice());
|
||||
if (causale.iva() != nessuna_iva)
|
||||
{
|
||||
part.put(PART_REG, cm.get(F_CODREG));
|
||||
part.put(PART_PROTIVA, cm.get(F_PROTIVA));
|
||||
}
|
||||
|
||||
const char sezione = importo.sezione();
|
||||
// Memorizza solo la sezione (importi nulli)
|
||||
part.put(PART_SEZ, sezione);
|
||||
part.put(PART_SEZABB, sezione);
|
||||
part.put(PART_SEZDIFCAM, sezione);
|
||||
|
||||
if (tm != tm_fattura)
|
||||
{
|
||||
// Crea nuovo pagamento
|
||||
TRectype pagamento = partita.pagamento(TPartita::UNASSIGNED, TPartita::UNASSIGNED, nriga);
|
||||
const real implit = importo.valore();
|
||||
pagamento.put(PAGSCA_IMPORTO, implit);
|
||||
if (valuta.in_valuta())
|
||||
{
|
||||
const real impval = valuta.lit2val(implit);
|
||||
pagamento.put(PAGSCA_IMPORTOVAL, impval);
|
||||
}
|
||||
partita.modifica_pagamento(pagamento, valuta, TRUE);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -72,8 +72,7 @@ BEGIN
|
||||
PROMPT 1 7 "Ns. Banca ABI "
|
||||
FLAGS "Z"
|
||||
USE %BAN SELECT CODTAB?="?????"
|
||||
INPUT CODTAB[1,5] 108
|
||||
INPUT CODTAB[6,10] 109
|
||||
INPUT CODTAB 108
|
||||
DISPLAY "ABI@5" CODTAB[1,5]
|
||||
DISPLAY "Denominazione@50" S0
|
||||
OUTPUT 108 CODTAB[1,5]
|
||||
@ -113,7 +112,7 @@ BEGIN
|
||||
PROMPT 1 9 "Vs. Banca ABI "
|
||||
FLAGS "Z"
|
||||
COPY USE 108
|
||||
INPUT CODTAB[1,5] 110
|
||||
INPUT CODTAB 110
|
||||
COPY DISPLAY 108
|
||||
OUTPUT 110 CODTAB[1,5]
|
||||
CHECKTYPE NORMAL
|
||||
|
@ -161,7 +161,6 @@ BEGIN
|
||||
FLAGS "Z"
|
||||
COPY USE FS_NSABI
|
||||
INPUT CODTAB[1,5] FS_VSABI
|
||||
INPUT CODTAB[6,10] FS_VSCAB
|
||||
COPY DISPLAY FS_NSABI
|
||||
OUTPUT FS_VSABI CODTAB[1,5]
|
||||
OUTPUT FS_VSCAB CODTAB[6,10]
|
||||
@ -203,6 +202,7 @@ BEGIN
|
||||
DISPLAY "Descrizione@50" RAGSOC
|
||||
OUTPUT FS_AGENTE CODAGE
|
||||
OUTPUT FS_DESCAGENTE RAGSOC
|
||||
ADD RUN PR0 -4
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
@ -211,9 +211,10 @@ BEGIN
|
||||
PROMPT 25 10 ""
|
||||
USE LF_AGENTI KEY 2
|
||||
INPUT RAGSOC FS_DESCAGENTE
|
||||
DISPLAY "Descrizione@50" RAGSOC
|
||||
DISPLAY "Descrizione@60" RAGSOC
|
||||
DISPLAY "Codice" CODAGE
|
||||
COPY OUTPUT FS_AGENTE
|
||||
ADD RUN PR0 -4
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
|
@ -406,19 +406,23 @@ void TBalance::read(const TBill& b, int esercizio, bool ignora_movap)
|
||||
curr.put(PCN_GRUPPO, b.gruppo());
|
||||
curr.put(PCN_CONTO, b.conto());
|
||||
const int err = pcon.read();
|
||||
CHECK(err == NOERR, "Impossibile stabilire indicatore di bilancio");
|
||||
const int indbil = curr.get_int(PCN_INDBIL);
|
||||
if (indbil == 1 || indbil == 2 || indbil == 5)
|
||||
{
|
||||
TEsercizi_contabili esercizi;
|
||||
const int precedente = esercizi.pred(esercizio);
|
||||
if (precedente > 0 && find(b, precedente, si, pd, pa, sf))
|
||||
{
|
||||
_saldo_ini = si;
|
||||
_saldo_ini += pd;
|
||||
_saldo_ini += pa;
|
||||
if (err == NOERR)
|
||||
{
|
||||
const int indbil = curr.get_int(PCN_INDBIL);
|
||||
if (indbil == 1 || indbil == 2 || indbil == 5)
|
||||
{
|
||||
TEsercizi_contabili esercizi;
|
||||
const int precedente = esercizi.pred(esercizio);
|
||||
if (precedente > 0 && find(b, precedente, si, pd, pa, sf))
|
||||
{
|
||||
_saldo_ini = si;
|
||||
_saldo_ini += pd;
|
||||
_saldo_ini += pa;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
NFCHECK("Impossibile stabilire indicatore di bilancio");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -705,7 +709,7 @@ void TMastrino::read(const TBill& conto,
|
||||
TString caption(80);
|
||||
caption.format("Caricamento mastrino %03d.%03d.%06ld",
|
||||
_conto.gruppo(), _conto.conto(), _conto.sottoconto());
|
||||
TProgind pi(num_giorni, caption, FALSE, TRUE, 48);
|
||||
TProgind pi(num_giorni, caption, FALSE, TRUE);
|
||||
|
||||
// Stima dimensione mastrino
|
||||
_riga.choose_step(num_giorni);
|
||||
@ -883,14 +887,17 @@ TImporto TMastrino::saldo_periodo() const
|
||||
|
||||
bool TMastrino::expandable(long rec) const
|
||||
{
|
||||
bool e = FALSE;
|
||||
if (row(rec).tipo() == riga_mastrino)
|
||||
bool e = FALSE;
|
||||
if (rec >= 0 && rec < items())
|
||||
{
|
||||
if (rec < items()-1)
|
||||
e = row(rec+1).tipo() != riga_contropartita;
|
||||
else
|
||||
e = TRUE;
|
||||
}
|
||||
if (row(rec).tipo() == riga_mastrino)
|
||||
{
|
||||
if (rec < items()-1)
|
||||
e = row(rec+1).tipo() != riga_contropartita;
|
||||
else
|
||||
e = TRUE;
|
||||
}
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
@ -2363,11 +2370,14 @@ bool TMastrini_grid::on_record(long rec)
|
||||
|
||||
void TMastrini_grid::on_dbl_cell(long rec, short id)
|
||||
{
|
||||
if (_mastrino.expandable(rec))
|
||||
_mastrino.expand(rec);
|
||||
else
|
||||
_mastrino.collapse(rec);
|
||||
update();
|
||||
if (rec >= 0 && rec < items())
|
||||
{
|
||||
if (_mastrino.expandable(rec))
|
||||
_mastrino.expand(rec);
|
||||
else
|
||||
_mastrino.collapse(rec);
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void TMastrini_grid::on_grid_button()
|
||||
|
@ -10,7 +10,8 @@
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
#include <sheet.h>
|
||||
|
||||
#include <utility.h>
|
||||
|
||||
#include "cg4300.h"
|
||||
#include "cg4300a.h"
|
||||
|
||||
@ -378,15 +379,15 @@ bool TLiquidazione_app::user_create()
|
||||
|
||||
if (!nocalc)
|
||||
{
|
||||
// se ci sono altri mesi dopo l'ultimo calcolato, invalida il
|
||||
// flag 'calcolato' del primo, per causare il ricalcolo dei
|
||||
// successivi (evitando problemi per credito precedente)
|
||||
for (m = _month+1; m <= 13; m++)
|
||||
// se ci sono altri mesi dopo l'ultimo calcolato, invalida il
|
||||
// flag 'calcolato' del primo, per causare il ricalcolo dei
|
||||
// successivi (evitando problemi per credito precedente)
|
||||
for (m = _month+1; m <= 13; m++)
|
||||
if (look_lim(m))
|
||||
{
|
||||
_lim->put("B0","");
|
||||
_lim->rewrite();
|
||||
break;
|
||||
_lim->put("B0","");
|
||||
_lim->rewrite();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
20
cg/cg4300.h
20
cg/cg4300.h
@ -163,9 +163,10 @@ class _DescrItem : public TObject
|
||||
public:
|
||||
word _flags;
|
||||
word _f0, _f1, _f2, _f3;
|
||||
TString _s0, _s1, _s2, _s3, _s4, _s5;
|
||||
TString _s0, _s1, _s2, _s3, _s4, _s5, _s6;
|
||||
real _r0, _r1, _r2, _r3, _r4, _r5,
|
||||
_r6, _r7, _r8, _r9, _r10,_r11, _r12, _r13, _r14, _r15;
|
||||
_r6, _r7, _r8, _r9, _r10, _r11, _r12,
|
||||
_r13, _r14, _r15, _r16, _r17, _r18, _r19;
|
||||
TArray _arr;
|
||||
TDate _d0;
|
||||
|
||||
@ -239,7 +240,7 @@ class TLiquidazione_app : public TPrint_application
|
||||
wht _what;
|
||||
TBit_array _selected;
|
||||
int _menu; // 1 = Liquidazione, 2 = Deleghe, 3 = Acconti
|
||||
TString _year; // anno di calcolo
|
||||
TString16 _year; // anno di calcolo
|
||||
int _month; // mese da calcolare
|
||||
TDate _date; // data di stampa
|
||||
bool _isprint; // vuoi stampare o no?
|
||||
@ -274,7 +275,7 @@ class TLiquidazione_app : public TPrint_application
|
||||
bool _riepilogo; // stampa riepilogo sul registro
|
||||
bool _sind11; // somma imposte non detraibili in trasferimento IVA11 (da configurazione dati studio)
|
||||
tbc _basecalc; // tipo base di calcolo acconto
|
||||
TString _freqviva; // frequenza versamenti (M|T)
|
||||
TString16 _freqviva; // frequenza versamenti (M|T)
|
||||
long _n_ditte; // numero ditte
|
||||
bool _comp_acconto; // stiamo calcolando l'acconto
|
||||
TArray _nomiditte; // array descr. ditte per sheet
|
||||
@ -577,9 +578,14 @@ public:
|
||||
void set_plm(_DescrItem& d);
|
||||
bool set_annual(_DescrItem& d);
|
||||
void set_grand(_DescrItem& d);
|
||||
void set_grand_1999(_DescrItem& d, int &rw);
|
||||
void set_grand_2000(_DescrItem& d, int &rw);
|
||||
void set_pim_head(_DescrItem& d);
|
||||
void set_liqacc(_DescrItem& d);
|
||||
|
||||
// Utility per stampare nella colonna debito o credito
|
||||
void print_importo(int rw, const char* prompt, real imp, bool red = FALSE);
|
||||
|
||||
// cercapalle in tabelle con opzione di creazione se serve
|
||||
bool look_pim(int m, const char* a, const char* r, const char* cr,
|
||||
const char* i, int tipodet = 0, bool create = FALSE);
|
||||
@ -629,8 +635,8 @@ public:
|
||||
// questa serve per i progressivi: la data passata va bene
|
||||
// se il movimento deve essere considerato in calcolo e riepilogo
|
||||
// per la liquidazione di month
|
||||
bool is_date_ok (TDate& d, int month, int liqmonth, int year);
|
||||
bool is_in_liq_period(TDate& d);
|
||||
bool is_date_ok (const TDate& d, int month, int liqmonth, int year);
|
||||
bool is_in_liq_period(const TDate& d);
|
||||
bool is_first_month (int m);
|
||||
int liq_month(int x);
|
||||
|
||||
@ -656,6 +662,8 @@ public:
|
||||
void set_acconto_p(_DescrItem& d);
|
||||
void set_acchead_p(_DescrItem& d);
|
||||
|
||||
real credito_utilizzato(int month, bool iva, bool f24) const;
|
||||
|
||||
// cippiuppiu'
|
||||
TLiquidazione_app(int men);
|
||||
virtual ~TLiquidazione_app() {}
|
||||
|
381
cg/cg4301.cpp
381
cg/cg4301.cpp
@ -156,17 +156,22 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
|
||||
_isintr = !cnf.get_bool("InTrTr") && _freqviva != "M";
|
||||
if (_isbenzinaro)
|
||||
_gest4 = cnf.get_bool("GesT74");
|
||||
// controlla che il periodo corrente non sia l'inizio dell'attivita'
|
||||
// nel caso, differita va a FALSE
|
||||
_monthinatt = 1;
|
||||
}
|
||||
TDate inatt(_nditte->lfile().get("DINIZIOATT"));
|
||||
|
||||
// controlla che il periodo corrente non sia l'inizio dell'attivita'
|
||||
// nel caso, differita va a FALSE
|
||||
_monthinatt = 1;
|
||||
const TDate inatt(_nditte->curr().get("DINIZIOATT"));
|
||||
if (is_in_liq_period(inatt))
|
||||
_isdifferita = FALSE;
|
||||
if (inatt.year() == atoi(_year))
|
||||
_monthinatt = inatt.month();
|
||||
|
||||
{
|
||||
if (is_in_liq_period(inatt)) _isdifferita = FALSE;
|
||||
if (inatt.year() == atoi(_year)) _monthinatt = inatt.month();
|
||||
TConfig cnf1(CONFIG_STUDIO, "cg");
|
||||
_isricacq = cnf1.get_bool("RicAcq") && month == 13;
|
||||
}
|
||||
|
||||
// ricalcolo normale
|
||||
// lim c'e' solo per i trimestri
|
||||
bool ok = _lim->get_bool("B0");
|
||||
@ -365,10 +370,10 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
|
||||
//if (calc || !recalc)
|
||||
//fine
|
||||
|
||||
// Se siamo in annuale e se non e' stato indicato di ricalcolare (stampa liquidazione chiamata
|
||||
// dalla stampa registri) non riscrivere i risultati delle liquidazioni,
|
||||
if ((is_month_ok_strict(month) && _month != 13 && _recalc != never) || _is_interactive /*month == 13*/ )
|
||||
write_liq(month, atts);
|
||||
// Se siamo in annuale e se non e' stato indicato di ricalcolare (stampa liquidazione chiamata
|
||||
// dalla stampa registri) non riscrivere i risultati delle liquidazioni,
|
||||
if ((is_month_ok_strict(month) && _month != 13 && _recalc != never) || _is_interactive /*month == 13*/ )
|
||||
write_liq(month, atts);
|
||||
|
||||
// occorre poterla chiamare altre volte con mesi diversi
|
||||
_nditte->restore_status();
|
||||
@ -394,8 +399,6 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//in caso di stampa registri e in caso sia
|
||||
//stato calcolato l'acconto (metodo analitico)
|
||||
//deve essere stampato il prospetto di liquidazione
|
||||
@ -776,7 +779,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
||||
TString tipocr_s = _rmoviva->get(RMI_TIPOCR);
|
||||
int tipocr = atoi(tipocr_s);
|
||||
real imponibile = _rmoviva->get_real(RMI_IMPONIBILE);
|
||||
real imposta = _rmoviva->get_real(RMI_IMPOSTA);
|
||||
const real imposta = _rmoviva->get_real(RMI_IMPOSTA);
|
||||
bool intra = _rmoviva->get_bool(RMI_INTRA);
|
||||
int tipoatt = _rmoviva->get_int(RMI_TIPOATT);
|
||||
// autofatture art. 17 per non residenti, con trattamento
|
||||
@ -937,22 +940,25 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
||||
// else fuck it up, dirty dick head.
|
||||
break;
|
||||
case vendita: // VENDITA
|
||||
if (tipocr == 4)
|
||||
/*
|
||||
* Vendite strum. art 17 (cess. amm.)
|
||||
* Comprende anche autofatture, anche nell'annuale
|
||||
* (Sergio 1995)
|
||||
*/
|
||||
{
|
||||
/* NO!
|
||||
* Invece non le deve comprendere nell'annuale
|
||||
* (Vladimiro 1995, piu' tardi)
|
||||
*/
|
||||
if (!(_month == 13 && autodafe))
|
||||
{
|
||||
cess_amm += imponibile;
|
||||
cess_amm_iva += imposta;
|
||||
}
|
||||
if (tipoiva != "NS") /* Segnalazione CM000219: I non soggetti non vanno considerati */
|
||||
{
|
||||
if (tipocr == 4)
|
||||
/*
|
||||
* Vendite strum. art 17 (cess. amm.)
|
||||
* Comprende anche autofatture, anche nell'annuale
|
||||
* (Sergio 1995)
|
||||
*/
|
||||
{
|
||||
/* NO!
|
||||
* Invece non le deve comprendere nell'annuale
|
||||
* (Vladimiro 1995, piu' tardi)
|
||||
*/
|
||||
if (!(_month == 13 && autodafe))
|
||||
{
|
||||
cess_amm += imponibile;
|
||||
cess_amm_iva += imposta;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
default: // Chissa'... forse in futuro vi sara' un ulteriore tipo di movimento...
|
||||
@ -1250,7 +1256,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
||||
// totale acquisti
|
||||
acquisti += imponibile;
|
||||
acquisti_iva += imposta;
|
||||
|
||||
|
||||
const int yr = datedoc.year();
|
||||
|
||||
if (year_int > 1997 && (yr < (year_int-1) && yr > (year_int-4))) // Prende un intervallo di 2 anni al massimo
|
||||
@ -2412,24 +2418,25 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
// Calcolo liq. mensili e liq. annuali. Scrive le lim
|
||||
{
|
||||
TToken_string atts(codatts);
|
||||
const char* tmpatt;
|
||||
const int year_int = atoi(_year);
|
||||
|
||||
if (_ver->read(atoi(_year),_month)!=NOERR)
|
||||
if (_ver->read(year_int, _month)!=NOERR)
|
||||
warning_box("Errore %d in lettura tabella versamenti ed interessi.",_ver->status());
|
||||
// evita casino se differita ma si sta ricalcolando il primo
|
||||
// mese con ricalcolo di piu' mesi
|
||||
bool wasdifferita = (_isdifferita && month <= _monthinatt &&
|
||||
_month > _monthinatt);
|
||||
|
||||
/* Cazzata galattica: già gestito BENE da update_firm, prima di chiamare questa funzione
|
||||
// evita casino se differita ma si sta ricalcolando il primo mese con ricalcolo di piu' mesi
|
||||
const bool wasdifferita = (_isdifferita && month <= _monthinatt && _month > _monthinatt);
|
||||
if (wasdifferita) _isdifferita = FALSE;
|
||||
|
||||
*/
|
||||
// liq. differita: considera mese precedente (solo per i risultati)
|
||||
int deltam = month;
|
||||
if (_isdifferita && !is_first_month(month) && month != 13)
|
||||
month -= (_freqviva == "T" ? 3 : 1);
|
||||
deltam -= month;
|
||||
|
||||
|
||||
look_lia();
|
||||
const bool new_age_2000 = (year_int >= 2000) && (_lia->get("S9") == "NV");
|
||||
|
||||
real risultato = 0.0;
|
||||
real detrazioni = 0.0;
|
||||
real versamenti = 0.0;
|
||||
@ -2445,7 +2452,10 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
real iva_vend = 0.0;
|
||||
real iva_acq = 0.0;
|
||||
real conguaglio = 0.0;
|
||||
|
||||
real variazioni_imposta = 0.0;
|
||||
real imposta_non_versata = 0.0;
|
||||
real crediti_speciali = 0.0;
|
||||
|
||||
// totali per regimi agricoli
|
||||
real acq_noCEE = 0.0;
|
||||
real imp_agr1 = 0.0;
|
||||
@ -2475,11 +2485,24 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
bool almeno_una_normale = FALSE;
|
||||
int attc = 0; // counter attivita'
|
||||
|
||||
// nuova liquidazione
|
||||
real credito_utilizzabile_inizio_anno = ZERO;
|
||||
real credito_utilizzato_inizio_anno = ZERO;
|
||||
real credito_utilizzato_iva = ZERO;
|
||||
if (new_age_2000)
|
||||
{
|
||||
credito_utilizzato_inizio_anno = _lia->get_real("R15");
|
||||
credito_utilizzabile_inizio_anno = _lia->get_real("R0") - credito_utilizzato_inizio_anno;
|
||||
if (credito_utilizzabile_inizio_anno < ZERO)
|
||||
credito_utilizzabile_inizio_anno = ZERO;
|
||||
}
|
||||
|
||||
TLocalisamfile& attiv = _nditte->lfile(LF_ATTIV);
|
||||
|
||||
const char* tmpatt;
|
||||
while ((tmpatt = atts.get()) != NULL)
|
||||
{
|
||||
TString att(tmpatt);
|
||||
const TString16 att = tmpatt;
|
||||
|
||||
// Reperisce il flag di regime agricolo per ogni attivita'...
|
||||
attiv.put(ATT_CODATT,att);
|
||||
@ -2493,11 +2516,11 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
// usa i totali del mese di dicembre dell'anno
|
||||
// precedente
|
||||
differita = TRUE;
|
||||
TString yr(_year);
|
||||
const TString16 yr(_year); // Salvo anno corrente
|
||||
_year.format("%d", year_int-1);
|
||||
if (!look_lim(12)) //controlla solamente, il vero posizionamento lo fa dopo
|
||||
{
|
||||
_year = yr;
|
||||
_year = yr; // Ripristino anno corrente
|
||||
differita = FALSE;
|
||||
}
|
||||
}
|
||||
@ -2593,38 +2616,68 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
* rimborso se chiesto e previsto
|
||||
* in annuale non si chiede e non va sommato se no lo cumula
|
||||
*/
|
||||
if (attc == 0 && is_lim && m < 13)
|
||||
{
|
||||
risultato += _lim->get_real("R1");
|
||||
rimborsi += _lim->get_real("R1");
|
||||
res_debt += _lim->get_real("R1");
|
||||
if (attc == 0 && is_lim && m < 13 && is_month_ok_strict(m,month))
|
||||
{
|
||||
const real rimborso_richiesto = _lim->get_real("R1");
|
||||
risultato += rimborso_richiesto;
|
||||
rimborsi += rimborso_richiesto;
|
||||
res_debt += rimborso_richiesto;
|
||||
}
|
||||
|
||||
/*
|
||||
* rettifiche gia' col loro bravo segno
|
||||
*/
|
||||
if (attc == 0 && is_lim)
|
||||
if (attc == 0 && is_lim && is_month_ok_strict(m,month))
|
||||
{
|
||||
// se sono per benzinaro le conta solo in annuale,
|
||||
// se no vanno solo in periodica
|
||||
// almeno cosi' dicevano fino ad agosto
|
||||
// poi, sara' il caldo, mi hanno detto che e' sbagliato
|
||||
TString descrett(_lim->get("S0"));
|
||||
bool isforbenzinaro = descrett[0] == '$' ||
|
||||
(descrett[0] == '>' && descrett[1] == '>');
|
||||
|
||||
if (/*(isforbenzinaro && _isannual) || ...alla cincia quest'idea non piaceva piu'
|
||||
(!isforbenzinaro && !_isannual) adesso la storia e' cosi':
|
||||
in ANNUALE solo se benzinaro, altrimenti niente; diversamente tutto*/
|
||||
!(month == 13 && !isforbenzinaro) && m < 13)
|
||||
bool somma_rettifiche = FALSE;
|
||||
if (year_int < 2000)
|
||||
{
|
||||
risultato += _lim->get_real("R5");
|
||||
rettifiche += _lim->get_real("R5");
|
||||
if (_lim->get_real("R5").sign() < 0)
|
||||
res_cred += abs(_lim->get_real("R5"));
|
||||
else
|
||||
res_debt += abs(_lim->get_real("R5"));
|
||||
// se sono per benzinaro le conta solo in annuale,
|
||||
// se no vanno solo in periodica
|
||||
// almeno cosi' dicevano fino ad agosto
|
||||
// poi, sara' il caldo, mi hanno detto che e' sbagliato
|
||||
const TString& descrett = _lim->get("S0");
|
||||
const bool isforbenzinaro = descrett[0] == '$' || (descrett[0] == '>' && descrett[1] == '>');
|
||||
somma_rettifiche = !(month == 13 && !isforbenzinaro) && m < 13;
|
||||
}
|
||||
else
|
||||
{
|
||||
somma_rettifiche = month < 13 || m < 13; // CM00278
|
||||
}
|
||||
if (somma_rettifiche)
|
||||
{
|
||||
const real rett = _lim->get_real("R5");
|
||||
risultato += rett;
|
||||
rettifiche += rett;
|
||||
if (rett.sign() < 0)
|
||||
res_cred -= rett;
|
||||
else
|
||||
res_debt += rett;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Somme varie per 13a
|
||||
*/
|
||||
if (attc == 0 && is_lim && m < 13 && is_month_ok_strict(m,month))
|
||||
{
|
||||
const real r17 = _lim->get_real("R17");
|
||||
variazioni_imposta += r17;
|
||||
risultato += r17;
|
||||
if (r17.sign() >= 0)
|
||||
res_debt += r17;
|
||||
else
|
||||
res_cred -= r17;
|
||||
|
||||
const real r18 = _lim->get_real("R18");
|
||||
imposta_non_versata += r18;
|
||||
risultato += r18;
|
||||
res_debt += r18;
|
||||
|
||||
const real r19 = _lim->get_real("R19");
|
||||
crediti_speciali += r19;
|
||||
risultato -= r19;
|
||||
res_cred += r19;
|
||||
}
|
||||
} // fine ciclo sul mese
|
||||
|
||||
@ -2677,6 +2730,8 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
} // __ end of agricolo
|
||||
} // end ciclo su attivita'
|
||||
|
||||
real credito_utilizzabile = ZERO;
|
||||
|
||||
if (month < 13) // va bene anche se differita sommando deltam (che e' 0 normalmente)
|
||||
{
|
||||
// toglie credito precedente
|
||||
@ -2687,21 +2742,51 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
debt_precd = debt_prec(month+deltam);
|
||||
risultato += debt_precd;
|
||||
res_debt += debt_precd;
|
||||
|
||||
if (new_age_2000 && credito_utilizzabile_inizio_anno > ZERO &&
|
||||
(_freqviva == "M" || is_trim(month+deltam)))
|
||||
{
|
||||
real debiti = res_debt; round_mille_lire(debiti);
|
||||
real crediti = res_cred; round_mille_lire(crediti);
|
||||
const real risul = debiti - crediti;
|
||||
if (risul > ZERO)
|
||||
{
|
||||
credito_utilizzabile = credito_utilizzabile_inizio_anno;
|
||||
credito_utilizzabile -= credito_utilizzato(month+deltam, TRUE, TRUE);
|
||||
if (credito_utilizzabile < ZERO) credito_utilizzabile = ZERO;
|
||||
credito_utilizzato_iva = min(risul, credito_utilizzabile);
|
||||
res_cred += credito_utilizzato_iva;
|
||||
risultato -= credito_utilizzato_iva;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// per l'annuale considera solo il credito a inizio anno
|
||||
// const real cred_res = _lia->get_real("R15");
|
||||
cred_prec = credito_prec(_freqviva == "M" ? 1 : 3);
|
||||
// cred_trasf= cred_res > ZERO ? cred_res - cred_prec : ZERO; vacca la pt
|
||||
cred_trasf = _lia->get_real("R15");
|
||||
const real cred_res = cred_prec - cred_trasf;
|
||||
// risultato -= cred_prec - cred_trasf;
|
||||
// res_cred += cred_prec + cred_trasf;
|
||||
risultato -= cred_res;
|
||||
res_cred += cred_res;
|
||||
}
|
||||
if (new_age_2000)
|
||||
{
|
||||
cred_prec = ZERO;
|
||||
if (credito_utilizzabile_inizio_anno > ZERO)
|
||||
{
|
||||
credito_utilizzato_iva = credito_utilizzato(13, TRUE, FALSE); // CM00285
|
||||
res_cred += credito_utilizzato_iva;
|
||||
risultato -= credito_utilizzato_iva;
|
||||
|
||||
// Calcola credito utilizzabile da riportare nell'anno successivo
|
||||
credito_utilizzabile = credito_utilizzabile_inizio_anno;
|
||||
credito_utilizzabile -= credito_utilizzato(13, TRUE, TRUE);
|
||||
if (credito_utilizzabile < ZERO) credito_utilizzabile = ZERO;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// per l'annuale considera solo il credito a inizio anno
|
||||
cred_prec = credito_prec(_freqviva == "M" ? 1 : 3);
|
||||
cred_trasf = _lia->get_real("R15");
|
||||
const real cred_res = cred_prec - cred_trasf;
|
||||
risultato -= cred_res;
|
||||
res_cred += cred_res;
|
||||
}
|
||||
}
|
||||
|
||||
if (month == 13)
|
||||
{
|
||||
@ -2777,7 +2862,7 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
_pla->rewrite();
|
||||
|
||||
// scrivi nuovo prorata in tabella anno successivo
|
||||
TString yr = _year;
|
||||
const TString16 yr = _year;
|
||||
_year.format("%d", atoi(_year) + 1);
|
||||
look_pla(att, TRUE);
|
||||
_pla->put("R8", prorata);
|
||||
@ -2803,7 +2888,7 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
if (atoi(_year) <= 1997)
|
||||
{
|
||||
if (tot_cong.sign() > 0) res_debt += tot_cong;
|
||||
if (tot_cong.sign() < 0) res_cred += abs(tot_cong);
|
||||
if (tot_cong.sign() < 0) res_cred -= tot_cong;
|
||||
}
|
||||
else // Nuovo prorata dal 1998, congloba il conguaglio pro-rata nell'IVA ammessa in detrazione
|
||||
{
|
||||
@ -2823,20 +2908,32 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
// azzeriamo tutto (tranne r1, r5, s1, s0, s7)
|
||||
TString codtab = _lim->get("CODTAB");
|
||||
|
||||
real r5 = _lim->get("R5");
|
||||
real r1 = _lim->get("R1");
|
||||
real rimborso = _lim->get("R1");
|
||||
real r5 = _lim->get("R5"); // Rettifiche
|
||||
real credito_utilizzato_f24 = _lim->get("R16");
|
||||
real r17 = _lim->get("R17");
|
||||
real r18 = _lim->get("R18");
|
||||
real r19 = _lim->get("R19");
|
||||
TString s7 = _lim->get("S7");
|
||||
TString s0 = _lim->get("S0");
|
||||
TString s1 = _lim->get("S1");
|
||||
const TString s0 = _lim->get("S0"); // Descrizioni rettifiche
|
||||
const TString s1 = _lim->get("S1");
|
||||
const TString s2 = _lim->get("S2");
|
||||
const TString s3 = _lim->get("S3");
|
||||
bool wasb0 = _lim->get_bool("B0");
|
||||
bool wasb1 = _lim->get_bool("B1");
|
||||
|
||||
_lim->zero();
|
||||
_lim->put("CODTAB", codtab);
|
||||
_lim->put("R1", r1);
|
||||
_lim->put("R5", r5);
|
||||
_lim->put("R1", rimborso);
|
||||
_lim->put("R5", r5); // Rettifiche
|
||||
_lim->put("R16", credito_utilizzato_f24);
|
||||
_lim->put("R17", r17);
|
||||
_lim->put("R18", r18);
|
||||
_lim->put("R19", r19);
|
||||
_lim->put("S0", s0);
|
||||
_lim->put("S1", s1);
|
||||
_lim->put("S2", s2);
|
||||
_lim->put("S3", s3);
|
||||
_lim->put("S7", s7);
|
||||
_lim->put("B0", wasb0 ? "X" : "");
|
||||
_lim->put("B1", wasb1 ? "X" : "");
|
||||
@ -2861,7 +2958,7 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
// in annuale si arrotondera' a 1000 in stampa
|
||||
// se no il conguaglio prorata fa casino
|
||||
risultato.round(ROUND_LIRA);
|
||||
|
||||
|
||||
_lim->put("R0",risultato);
|
||||
_lim->put("R2",cred_cost);
|
||||
_lim->put("R3",deb_mens);
|
||||
@ -2879,6 +2976,10 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
// anno precedente
|
||||
_lim->put("R1",rimborsi);
|
||||
_lim->put("R5",rettifiche);
|
||||
|
||||
_lim->put("R17", variazioni_imposta);
|
||||
_lim->put("R18", imposta_non_versata);
|
||||
_lim->put("R19", crediti_speciali);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2892,8 +2993,8 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
if (_isintr && ( true_trim || (month == 12 && _isbenzinaro && _gest4)
|
||||
|| (month == 13 && !(_isbenzinaro && _gest4)) ))
|
||||
{
|
||||
real interesse = interesse_trimestrale(_month);
|
||||
real ivi = risultato * (interesse / CENTO);
|
||||
const real interesse = interesse_trimestrale(_month);
|
||||
real ivi = risultato.sign() > 0 ? (risultato * interesse / CENTO) : ZERO;
|
||||
ivi.ceil(ROUND_LIRA);
|
||||
_lim->put("R14", ivi);
|
||||
}
|
||||
@ -2903,17 +3004,17 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
|| (month == 13 && !(_isbenzinaro && _gest4)) ))
|
||||
_lim->put("R10",interesse_trimestrale(_month));
|
||||
|
||||
// totale conguaglio su tutte le attivita'
|
||||
_lim->put("R7", tot_cong);
|
||||
_lim->put("R7", tot_cong); // totale conguaglio su tutte le attivita'
|
||||
_lim->put("R8", versamenti);
|
||||
_lim->put("R9", vers_int);
|
||||
_lim->put("R11", acc_dec);
|
||||
_lim->put("R12", res_cred);
|
||||
_lim->put("R13", res_debt);
|
||||
|
||||
_lam->put("R0", iva_vend);
|
||||
_lam->put("R1", iva_acq);
|
||||
_lam->put("R2", cred_prec);
|
||||
_lam->put("R3", debt_precd);
|
||||
_lim->put("R11", acc_dec);
|
||||
_lim->put("R12", res_cred);
|
||||
_lim->put("R13", res_debt);
|
||||
|
||||
if (!_recalc_only && _recalc != never)
|
||||
{
|
||||
@ -2926,15 +3027,16 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
|
||||
if (_recalc_only)
|
||||
_lim->put("B1", "X");
|
||||
|
||||
|
||||
/* Cazzata galattica: vedi sopra
|
||||
if (wasdifferita) _isdifferita = TRUE;
|
||||
*/
|
||||
|
||||
// AWFUL! se siamo in annuale, occorre arrotondare alle 1000 lire
|
||||
// TUTTI gli ADDENDI e non il risultato. Cio' e' disonesto e mostruoso;
|
||||
// siccome sa di ricorso al TAR nonche' di errore della Prassi
|
||||
// schiaffo tutto il codice nell'IF che segue, e se lo si vuole togliere
|
||||
// non si fara' che scancellare tutto il blocco
|
||||
if (month == 13)
|
||||
const bool after2000 = atoi(_year) >= 2000; // CM000222
|
||||
if (month == 13 || after2000)
|
||||
{
|
||||
// molto codice duplicato, ma ne val la pena (vedi sopra)
|
||||
round_mille_lire(iva_vend);
|
||||
@ -2949,55 +3051,80 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
round_mille_lire(cred_trasf);
|
||||
round_mille_lire(tot_cong);
|
||||
round_mille_lire(acc_dec);
|
||||
round_mille_lire(debt_precd);
|
||||
round_mille_lire(debt_precd);
|
||||
round_mille_lire(variazioni_imposta);
|
||||
round_mille_lire(imposta_non_versata);
|
||||
round_mille_lire(credito_utilizzato_iva);
|
||||
round_mille_lire(crediti_speciali);
|
||||
|
||||
|
||||
// res_cred = iva_acq + versamenti + vers_int + cred_prec + cred_trasf + acc_dec;
|
||||
res_cred = iva_acq + versamenti + vers_int + cred_prec - cred_trasf + acc_dec;
|
||||
res_debt = iva_vend + rimborsi + debt_precd; // Tolto la somma di deb_mens, perche' gia' presente in iva_vend
|
||||
res_cred = iva_acq + versamenti + vers_int + cred_prec - cred_trasf + acc_dec + credito_utilizzato_iva + crediti_speciali;
|
||||
res_debt = iva_vend + rimborsi + debt_precd + imposta_non_versata;
|
||||
|
||||
if (atoi(_year) <= 1997) // Non vale piu' dal 1998 in poi; iva_acq e' gia' ok e cosi' res_cred.
|
||||
if (tot_cong.sign() > 0) res_debt += tot_cong;
|
||||
else res_cred -= tot_cong;
|
||||
if (atoi(_year) < 1998) // Non vale piu' dal 1998 in poi; iva_acq e' gia' ok e cosi' res_cred.
|
||||
{
|
||||
if (tot_cong.sign() > 0)
|
||||
res_debt += tot_cong;
|
||||
else
|
||||
res_cred -= tot_cong;
|
||||
}
|
||||
|
||||
if (rettifiche.sign() > 0) res_debt += rettifiche;
|
||||
else res_cred -= rettifiche;
|
||||
if (rettifiche.sign() >= 0)
|
||||
res_debt += rettifiche;
|
||||
else
|
||||
res_cred -= rettifiche;
|
||||
|
||||
if (variazioni_imposta.sign() >= 0)
|
||||
res_debt += variazioni_imposta;
|
||||
else
|
||||
res_cred -= variazioni_imposta;
|
||||
|
||||
if (almeno_una_normale)
|
||||
res_cred += detrazioni;
|
||||
|
||||
risultato = res_debt - res_cred;
|
||||
|
||||
|
||||
// tut ricalcule', riscrivem
|
||||
_lim->put("R0", risultato);
|
||||
_lim->put("R2", cred_cost);
|
||||
_lim->put("R3", deb_mens);
|
||||
_lim->put("R1", rimborsi);
|
||||
_lim->put("R5", rettifiche);
|
||||
_lim->put("R6", detrazioni);
|
||||
_lim->put("R7", tot_cong);
|
||||
_lim->put("R8", versamenti);
|
||||
_lim->put("R9", vers_int);
|
||||
_lam->put("R0", iva_vend);
|
||||
_lam->put("R1", iva_acq);
|
||||
_lam->put("R2", cred_prec);
|
||||
_lam->put("R3", debt_precd);
|
||||
_lam->put("R4", cred_trasf);
|
||||
|
||||
_lim->put("R0", risultato);
|
||||
_lim->put("R1", rimborsi);
|
||||
_lim->put("R2", cred_cost);
|
||||
_lim->put("R3", deb_mens);
|
||||
_lim->put("R5", rettifiche);
|
||||
_lim->put("R6", detrazioni);
|
||||
_lim->put("R7", tot_cong);
|
||||
_lim->put("R8", versamenti);
|
||||
_lim->put("R9", vers_int);
|
||||
_lim->put("R11", acc_dec);
|
||||
_lim->put("R12", res_cred);
|
||||
_lim->put("R13", res_debt);
|
||||
|
||||
// Riporta eventuale credito nella tabella parametri liquidazione dell'anno successivo
|
||||
if (risultato < 0) // Risultato a credito
|
||||
if (after2000) // Anche R14
|
||||
{
|
||||
TString yr = _year;
|
||||
_year = format("%d", atoi(_year) + 1);
|
||||
if (look_lia(0l, TRUE))
|
||||
real ivi = _lim->get("R14");
|
||||
round_mille_lire(ivi);
|
||||
_lim->put("R14", ivi);
|
||||
}
|
||||
_lim->put("R15", credito_utilizzato_iva);
|
||||
|
||||
if (month == 13)
|
||||
{
|
||||
// Riporta eventuale credito nella tabella parametri liquidazione dell'anno successivo
|
||||
const real riporto = credito_utilizzabile - risultato;
|
||||
if (riporto > ZERO) // Risultato a credito
|
||||
{
|
||||
_lia->put("R0", abs(risultato));
|
||||
_lia->rewrite();
|
||||
const TString16 yr = _year;
|
||||
_year.format("%d", atoi(_year) + 1);
|
||||
if (look_lia(0l, TRUE))
|
||||
{
|
||||
_lia->put("R0", riporto);
|
||||
_lia->rewrite();
|
||||
}
|
||||
_year = yr;
|
||||
}
|
||||
_year = yr;
|
||||
}
|
||||
// ciapa
|
||||
}
|
||||
@ -3048,7 +3175,7 @@ void TLiquidazione_app::recalc_annual(const char* att)
|
||||
_CorrItem *cc;
|
||||
bool is_key;
|
||||
|
||||
for (_pim->first(); !_pim->eof(); _pim->next())
|
||||
for (_pim->first(); !_pim->eof(); _pim->next())
|
||||
{
|
||||
if (_year != *_pim_anno || _month != atoi(*_pim_mese)) // In questo caso _month vale sempre 13
|
||||
continue;
|
||||
|
@ -75,14 +75,17 @@ int TLiquidazione_app::next_trim(int x)
|
||||
return x + (2 - ((x-1) % 3));
|
||||
}
|
||||
|
||||
bool TLiquidazione_app::is_in_liq_period(TDate& d)
|
||||
bool TLiquidazione_app::is_in_liq_period(const TDate& d)
|
||||
{
|
||||
bool ok = FALSE;
|
||||
const int y = atoi(_year);
|
||||
if (_freqviva == "M") ok = d.month() == _month && d.year() == y;
|
||||
if (_freqviva == "M")
|
||||
{
|
||||
ok = d.month() == _month && d.year() == y;
|
||||
}
|
||||
else
|
||||
{
|
||||
int m = liq_month(_month);
|
||||
const int m = liq_month(_month);
|
||||
ok = d.month() > m - 3 && d.month() <= m && d.year() == y;
|
||||
}
|
||||
return ok;
|
||||
@ -102,7 +105,7 @@ int TLiquidazione_app::previous_month(int m)
|
||||
return m == 3 ? 3 : m - 3;
|
||||
}
|
||||
|
||||
bool TLiquidazione_app::is_date_ok(TDate& d, int month, int liqmonth, int year)
|
||||
bool TLiquidazione_app::is_date_ok(const TDate& d, int month, int liqmonth, int year)
|
||||
// TRUE se la data passata va considerata nel
|
||||
// ricalcolo dei progressivi mensili per il mese e anno
|
||||
// selezionati. Vedi cg4301.cpp per maggiori informazioni
|
||||
@ -111,7 +114,7 @@ bool TLiquidazione_app::is_date_ok(TDate& d, int month, int liqmonth, int year)
|
||||
|
||||
bool ok;
|
||||
|
||||
if (year < 1998 || _recalc_regis) // Vecchia selezione o calcolo progoressivi per stampa registri bollati
|
||||
if (year < 1998 || _recalc_regis) // Vecchia selezione o calcolo progressivi per stampa registri bollati
|
||||
{
|
||||
if (d.month() > month || d.year() != atoi(_year))
|
||||
return FALSE;
|
||||
@ -808,14 +811,20 @@ real TLiquidazione_app::debt_prec(int month)
|
||||
real TLiquidazione_app::credito_prec(int month)
|
||||
// ritorna l'appropriato credito precedente al mese in corso
|
||||
{
|
||||
real c(0.0);
|
||||
real c = ZERO;
|
||||
|
||||
const bool lia_ok = look_lia();
|
||||
const bool old_age = atoi(_year) < 2000 || _lia->get("S9") != "NV";
|
||||
|
||||
if (is_first_month(month))
|
||||
{
|
||||
// credito inizio anno
|
||||
if (lia_ok)
|
||||
c = _lia->get_real("R0");
|
||||
{
|
||||
// Dal 2000 se S8="NV" il credito precedente non esiste piu'
|
||||
if (old_age)
|
||||
c = _lia->get_real("R0");
|
||||
}
|
||||
// e' positivo o 0
|
||||
}
|
||||
else
|
||||
@ -824,17 +833,21 @@ real TLiquidazione_app::credito_prec(int month)
|
||||
if (c.sign() < 0)
|
||||
c = abs(c);
|
||||
else
|
||||
c = real(0.0);
|
||||
c = ZERO;
|
||||
|
||||
// Nel caso di trimestrali considera dal trimestre corrispondente a
|
||||
// quello impostato+1. Ad es. se m == 1 considera dal I trim. (m=3)
|
||||
// se m == 2 idem (m=3). Se m == 3 considera dal II trim. (m=6).
|
||||
const int crm = _lia->get_int("I0") + 1;
|
||||
if (lia_ok && crm > 1) // Vale dal mese successivo a quello impostato
|
||||
// Dal 2000 se S8="NV" il credito trasferito non esiste piu'
|
||||
if (old_age)
|
||||
{
|
||||
// Toglie il Credito Trasferito
|
||||
if (month == liq_month(crm))
|
||||
c -= _lia->get_real("R15");
|
||||
// Nel caso di trimestrali considera dal trimestre corrispondente a
|
||||
// quello impostato+1. Ad es. se m == 1 considera dal I trim. (m=3)
|
||||
// se m == 2 idem (m=3). Se m == 3 considera dal II trim. (m=6).
|
||||
const int crm = _lia->get_int("I0") + 1;
|
||||
if (lia_ok && crm > 1) // Vale dal mese successivo a quello impostato
|
||||
{
|
||||
// Toglie il Credito Trasferito
|
||||
if (month == liq_month(crm))
|
||||
c -= _lia->get_real("R15");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -990,3 +1003,25 @@ bool TLiquidazione_app::look_conc(TString& uffcon, TString& uffiva)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
real TLiquidazione_app::credito_utilizzato(int month, bool iva, bool f24) const
|
||||
{
|
||||
real credito;
|
||||
|
||||
TTable lim("LIM");
|
||||
TString16 cod;
|
||||
for (int m = 1; m <= month; m++)
|
||||
{
|
||||
cod.format("%s%02d", (const char*)_year, m);
|
||||
lim.put("CODTAB", cod);
|
||||
if (lim.read() == NOERR)
|
||||
{
|
||||
if (iva && m < month)
|
||||
credito += lim.get_real("R15"); // Credito utilizzato IVA
|
||||
if (f24 && m < 13)
|
||||
credito += lim.get_real("R16"); // Credito utilizzato F24
|
||||
}
|
||||
}
|
||||
|
||||
return credito;
|
||||
}
|
||||
|
@ -486,16 +486,20 @@ _DescrItem* TLiquidazione_app::recalc_rimborso(int month, const char* codatts,
|
||||
}
|
||||
}
|
||||
|
||||
// condizione 1
|
||||
real prc = es_ni/vol_aff; prc.round(2);
|
||||
// condizione 1: prc = es_ni / vol_aff
|
||||
|
||||
if (stliq && !vol_aff.is_zero() && prc > MIN_PARTE_ESENTE)
|
||||
{
|
||||
rimborsami = TRUE;
|
||||
d = new _DescrItem(RIMBORSO);
|
||||
d->_f0 = TRUE;
|
||||
d->_r0 = es_ni;
|
||||
d->_r1 = vol_aff;
|
||||
if (stliq && !vol_aff.is_zero())
|
||||
{
|
||||
real prc = es_ni / vol_aff;
|
||||
prc.round(2);
|
||||
if (prc > MIN_PARTE_ESENTE)
|
||||
{
|
||||
rimborsami = TRUE;
|
||||
d = new _DescrItem(RIMBORSO);
|
||||
d->_f0 = TRUE;
|
||||
d->_r0 = es_ni;
|
||||
d->_r1 = vol_aff;
|
||||
}
|
||||
}
|
||||
|
||||
// Condizione 2...
|
||||
@ -573,16 +577,16 @@ _DescrItem* TLiquidazione_app::recalc_rimborso(int month, const char* codatts,
|
||||
}
|
||||
|
||||
// finalmente
|
||||
alv = ivav/vtot; alv.round(4);
|
||||
ala = ivaa/atot; ala.round(4);
|
||||
alv = ivav.is_zero() ? ZERO : ivav/vtot; alv.round(4);
|
||||
ala = ivaa.is_zero() ? ZERO : ivaa/atot; ala.round(4);
|
||||
|
||||
// vedi condizioni
|
||||
rimborsami = ala > alv;
|
||||
|
||||
if (rimborsami)
|
||||
if (rimborsami && !alv.is_zero())
|
||||
{
|
||||
// vedi di quanto ala eccede alv; deve essere > 10%
|
||||
real ecc = ((ala/alv) - real(1.0));
|
||||
real ecc = (ala/alv) - real(1.0);
|
||||
rimborsami = (ecc >= SOGLIA_MAGGIORE_ALIQUOTA_DEL_CAZZO_PER_AVER_DIRITTO_AL_RIMBORSO);
|
||||
}
|
||||
|
||||
|
305
cg/cg4304.cpp
305
cg/cg4304.cpp
@ -965,7 +965,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
||||
real am = _pla->get_real("R4");
|
||||
real iaq = _pla->get_real("R11"); // IVA acquisti
|
||||
real ppg = _pla->get_real("R12"); // pro-rata pagato
|
||||
|
||||
|
||||
// calcola nuovo prorata per ogni attivita' (miste: 1+2)
|
||||
real pr(0.0);
|
||||
if (atoi(_year) > 1997) // Calcolo dal 1998 in poi
|
||||
@ -1033,46 +1033,52 @@ void TLiquidazione_app::describe_liq(int month, const char* codatts,
|
||||
_DescrItem* d = new _DescrItem(THE_END);
|
||||
|
||||
// gli diamo la stessa struttura di LIM
|
||||
d->_r0 = _lim->get_real("R0");
|
||||
d->_r1 = _lim->get_real("R1");
|
||||
d->_r2 = _lim->get_real("R2");
|
||||
d->_r3 = _lim->get_real("R3");
|
||||
d->_r4 = _lim->get_real("R4");
|
||||
d->_r5 = _lim->get_real("R5");
|
||||
d->_r6 = _lim->get_real("R6");
|
||||
d->_r7 = _lim->get_real("R14");
|
||||
d->_r9 = _lim->get_real("R9");
|
||||
d->_r0 = _lim->get_real("R0");
|
||||
d->_r1 = _lim->get_real("R1");
|
||||
d->_r2 = _lim->get_real("R2");
|
||||
d->_r3 = _lim->get_real("R3");
|
||||
d->_r4 = _lim->get_real("R4");
|
||||
d->_r5 = _lim->get_real("R5"); // rettifiche
|
||||
d->_r6 = _lim->get_real("R6");
|
||||
d->_r7 = _lim->get_real("R14");
|
||||
d->_r9 = _lim->get_real("R9");
|
||||
if (atoi(_year) <= 1997) // Dal 1998 in poi il conguaglio prorata non va stampato, ma conglobato nell'iva acquisti
|
||||
d->_r10 = _lim->get_real("R7"); // totale conguaglio prorata
|
||||
|
||||
TToken_string tt(80);
|
||||
tt.add(_lam->get_real("R0").string());
|
||||
tt.add(_lam->get_real("R1").string());
|
||||
tt.add(_lam->get_real("R2").string());
|
||||
tt.add(_lam->get_real("R3").string());
|
||||
tt.add(_lam->get_real("R4").string());
|
||||
tt.add(_lam->get("R0"));
|
||||
tt.add(_lam->get("R1"));
|
||||
tt.add(_lam->get("R2"));
|
||||
tt.add(_lam->get("R3"));
|
||||
tt.add(_lam->get("R4"));
|
||||
|
||||
d->_s0 = tt;
|
||||
d->_s1 = _lim->get_real("R11").string();
|
||||
d->_s2 = _lim->get_real("R12").string();
|
||||
d->_s3 = _lim->get_real("R13").string();
|
||||
d->_s0 = tt;
|
||||
d->_s1 = _lim->get("R11");
|
||||
d->_s2 = _lim->get("R12");
|
||||
d->_s3 = _lim->get("R13");
|
||||
|
||||
// descrizione rettifiche
|
||||
if (month < 13)
|
||||
{
|
||||
d->_s4 = _lim->get("S0");
|
||||
d->_s5 = _lim->get("S1");
|
||||
d->_s4 = _lim->get("S0");
|
||||
d->_s5 = _lim->get("S1");
|
||||
d->_s6 = _lim->get("S2");
|
||||
}
|
||||
d->_r11 = (const char*)_lim->get("R10"); // tasso di interesse
|
||||
d->_r11 = _lim->get_real("R10"); // tasso di interesse
|
||||
|
||||
d->_r15 = _lim->get_real("R15"); // Credito utilizzato IVA
|
||||
d->_r16 = _lim->get_real("R16"); // Credito utilizzato F24
|
||||
d->_r17 = _lim->get_real("R17"); // Variazioni d'imposta
|
||||
d->_r18 = _lim->get_real("R18"); // Imposta non versata
|
||||
d->_r19 = _lim->get_real("R19"); // Crediti speciali
|
||||
|
||||
d->_f1 = is_first_month(month);
|
||||
d->_f1 = is_first_month(month);
|
||||
|
||||
// rispettiamo tutte le casistiche per i versamenti se non siamo in visualizzazione
|
||||
// analogamente in Visualizzazione ma solo nel caso dell'annuale.
|
||||
// In tutti gli altri casi va a cercare la delega
|
||||
d->_r8 = (_month == 13 || !_is_visliq) ? _lim->get_real("R8") : versamenti_IVA(_month, "1");
|
||||
|
||||
|
||||
// aggiunge eventuale satellite per rimborso infraannuale
|
||||
if (di != NULL)
|
||||
{
|
||||
@ -1373,17 +1379,14 @@ void TLiquidazione_app::set_liqacc(_DescrItem& d)
|
||||
set_row(6,"");
|
||||
set_row(7,"@72gCredito@90gDebito"); set_row(8,"");
|
||||
if (!_isdiffacc)
|
||||
set_row(9,"@11gIva sulle operazioni annotate fino al 20 Dicembre@81g%r",
|
||||
&(d._r0));
|
||||
else set_row(9,"@11gIva sulle operazioni di vendita@81g%r",
|
||||
&(d._r0));
|
||||
set_row(9,"@11gIva sulle operazioni annotate fino al 20 Dicembre@81g%r", &(d._r0));
|
||||
else
|
||||
set_row(9,"@11gIva sulle operazioni di vendita@81g%r", &(d._r0));
|
||||
int i = 10;
|
||||
if (!_isdiffacc)
|
||||
{
|
||||
set_row(i++,"@11gIva su operazioni fino al 20 Dic., ma non fatturate@81g%r",
|
||||
&(d._r1));
|
||||
set_row(i++,"@11gIva su operazioni fino al 20 Dic., ma non annotate@81g%r",
|
||||
&(d._r2));
|
||||
set_row(i++,"@11gIva su operazioni fino al 20 Dic., ma non fatturate@81g%r", &(d._r1));
|
||||
set_row(i++,"@11gIva su operazioni fino al 20 Dic., ma non annotate@81g%r", &(d._r2));
|
||||
}
|
||||
set_row(i,"@11gRettifiche iva a debito");
|
||||
if (d._r3.sign() > 0)
|
||||
@ -1393,9 +1396,9 @@ void TLiquidazione_app::set_liqacc(_DescrItem& d)
|
||||
set_row(i++,"@11gRISULTATO@81g%r", &r1);
|
||||
|
||||
if (!_isdiffacc)
|
||||
set_row(i++,"@11gIva sugli acquisti annotati fino al 20 Dicembre@64g%r",
|
||||
&r2);
|
||||
else set_row(i++,"@11gIva sulle operazioni di acquisto@64g%r", &r2);
|
||||
set_row(i++,"@11gIva sugli acquisti annotati fino al 20 Dicembre@64g%r", &r2);
|
||||
else
|
||||
set_row(i++,"@11gIva sulle operazioni di acquisto@64g%r", &r2);
|
||||
if (d._r6 != ZERO)
|
||||
set_row(i++,"@11gmeno perc. di prorata pari a lire %r", &(d._r6));
|
||||
set_row(i++, "@11gCredito precedente@64g%r", &(d._r9));
|
||||
@ -1749,8 +1752,7 @@ void TLiquidazione_app::set_pumpam(_DescrItem& d)
|
||||
set_auto_ff(TRUE);
|
||||
}
|
||||
|
||||
|
||||
void TLiquidazione_app::set_grand(_DescrItem& d)
|
||||
void TLiquidazione_app::set_grand_1999(_DescrItem& d, int& rw)
|
||||
{
|
||||
real& risultato = d._r0;
|
||||
real& rimborso = d._r1;
|
||||
@ -1779,11 +1781,6 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
|
||||
if (rettifiche.sign() > 0) rett_debt = rettifiche;
|
||||
if (rettifiche.sign() < 0) rett_cred = -rettifiche;
|
||||
|
||||
set_bookmark("Riepilogativo liquidazione", _firm_bookmark);
|
||||
|
||||
set_row(1,""); set_row(2,""); set_row(3,""); set_row(4,"");
|
||||
set_row(5,"@11g@bCALCOLO LIQUIDAZIONE D'IMPOSTA@r");
|
||||
set_row(6,""); int rw = 7;
|
||||
set_row(rw++," @66gCredito@84gDebito"); set_row(rw++,"");
|
||||
set_row(rw++,"@11gIva sulle operazioni di vendita@75g%r", &iva_vend);
|
||||
set_row(rw++,"%s@11gRettifiche IVA a debito%s@75g%r",
|
||||
@ -1889,7 +1886,7 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
|
||||
if (_is_visliq && _month != 13)
|
||||
{
|
||||
// stampa versamenti (anche 0) ad uso visualizzazione liquidazione IVA
|
||||
rw ++;
|
||||
rw++;
|
||||
set_row(rw++,"@11g$[r]Versamenti effettuati$[n]@58g%r", &versamenti);
|
||||
set_row(rw++, "");
|
||||
set_row(rw++, "");
|
||||
@ -1898,15 +1895,225 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
|
||||
if (!_is_visliq)
|
||||
{
|
||||
// descrizione rettifiche
|
||||
if (!(d._s4.empty() && d._s5.empty()))
|
||||
if (d._s4.not_empty() || d._s5.not_empty())
|
||||
{
|
||||
rw++;
|
||||
set_row(rw++, "@11g@bDESCRIZIONE RETTIFICHE@r");
|
||||
rw++;
|
||||
if (d._s4.not_empty()) { set_row(rw++, "@11g%t", &(d._s4)); }
|
||||
if (d._s5.not_empty()) { set_row(rw++, "@11g%t", &(d._s5)); }
|
||||
}
|
||||
if (!d._s4.empty()) { set_row(rw++, "@11g%t", &(d._s4)); }
|
||||
if (!d._s5.empty()) { set_row(rw++, "@11g%t", &(d._s5)); }
|
||||
}
|
||||
}
|
||||
|
||||
void TLiquidazione_app::print_importo(int rw, const char* prompt, real imp, bool red)
|
||||
{
|
||||
int tab = 75;
|
||||
if (imp < ZERO)
|
||||
{ imp = -imp; tab = 58; }
|
||||
TString256 str;
|
||||
str << "@11g";
|
||||
if (red) str << "$[r]";
|
||||
str << prompt;
|
||||
if (red) str << "$[n]";
|
||||
str << '@' << tab << "g%r";
|
||||
set_row(rw, str, &imp);
|
||||
}
|
||||
|
||||
void TLiquidazione_app::set_grand_2000(_DescrItem& d, int &rw)
|
||||
{
|
||||
real& risultato = d._r0;
|
||||
real& rimborso = d._r1;
|
||||
real& cred_cost = d._r2;
|
||||
real& deb_mens = d._r3;
|
||||
real& rettifiche = d._r5;
|
||||
real& detrazioni = d._r6;
|
||||
real& interessi = d._r7;
|
||||
real& versamenti = d._r8;
|
||||
real& vers_int = d._r9;
|
||||
TToken_string tt(d._s0);
|
||||
real iva_vend(tt.get(0));
|
||||
real iva_acq(tt.get(1));
|
||||
real cred_prec(tt.get(2));
|
||||
real debt_prec(tt.get(3));
|
||||
real cred_trasf(tt.get(4)); cred_trasf = -cred_trasf;
|
||||
|
||||
real acc_dec(d._s1);
|
||||
real res_cred(d._s2);
|
||||
real res_debt(d._s3);
|
||||
real rett_debt(0.0);
|
||||
real rett_cred(0.0);
|
||||
real& interesse = d._r11;
|
||||
|
||||
real& credito_utilizzato_iva = d._r15;
|
||||
real& credito_utilizzato_f24 = d._r16;
|
||||
real& variazioni_imposta = d._r17;
|
||||
real& imposta_non_versata = d._r18;
|
||||
real& crediti_speciali = d._r19;
|
||||
|
||||
if (rettifiche.sign() > 0) rett_debt = rettifiche;
|
||||
if (rettifiche.sign() < 0) rett_cred = -rettifiche;
|
||||
|
||||
set_row(rw++," @66gCredito@84gDebito"); set_row(rw++,"");
|
||||
|
||||
// Se sono in visualizzazione stampo i due importi separati, altrimenti li sommo
|
||||
if (!_is_visliq)
|
||||
iva_vend += rett_debt;
|
||||
set_row(rw++,"@11gIVA esigibile per il periodo@75g%r", &iva_vend);
|
||||
if (_is_visliq)
|
||||
set_row(rw++,"@11g$[r]Rettifiche IVA a debito$[n]@75g%r", &rett_debt); // Rettifiche modificabili
|
||||
|
||||
// Se sono in visualizzazione stampo i due importi separati, altrimenti li sommo
|
||||
if (!_is_visliq)
|
||||
iva_acq += rett_cred;
|
||||
set_row(rw++,"@11gIva che si detrae per il periodo@58g%r", &iva_acq);
|
||||
if (_is_visliq)
|
||||
set_row(rw++,"@11g$[r]Rettifiche IVA a credito$[n]@58g%r", &rett_cred);
|
||||
|
||||
real iva_deb_cred = iva_vend - iva_acq;
|
||||
if (_is_visliq)
|
||||
iva_deb_cred += rett_debt - rett_cred;
|
||||
|
||||
print_importo(rw++, "IVA a debito o a credito per il periodo", iva_deb_cred);
|
||||
|
||||
rw++;
|
||||
print_importo(rw++, "Variazioni d'imposta", variazioni_imposta, _is_visliq);
|
||||
print_importo(rw++, "Imposta non versata", imposta_non_versata, _is_visliq);
|
||||
|
||||
// debito liq. precedente < 50000
|
||||
if (debt_prec > ZERO)
|
||||
set_row(rw++,"@11gDebito o credito da liquidazione precedente@75g%r", &debt_prec);
|
||||
else
|
||||
if (cred_prec > ZERO)
|
||||
set_row(rw++,"@11gDebito o credito da liquidazione precedente@58g%r", &cred_prec);
|
||||
set_row(rw++,"%s@11gRimborsi%s@75g%r",
|
||||
_is_visliq ? "$[r]" : "", _is_visliq ? "$[n]" : "", &rimborso);
|
||||
set_row(rw++,"@11gCredito IVA compensabile detratto@58g%r", &credito_utilizzato_iva);
|
||||
|
||||
real cre_deb_per = risultato + crediti_speciali + acc_dec + vers_int;
|
||||
if (_month == 13) cre_deb_per += versamenti;
|
||||
|
||||
print_importo(rw++, "IVA dovuta o a credito per il periodo", cre_deb_per);
|
||||
|
||||
#ifdef DBG
|
||||
TRACE("Risultato = %s +", risultato.string("###.###.###.###"));
|
||||
TRACE("Crediti speciali = %s +", crediti_speciali.string("###.###.###.###"));
|
||||
TRACE("Accantonamenti = %s +", acc_dec.string("###.###.###.###"));
|
||||
TRACE("Versamenti = %s +", versamenti.string("###.###.###.###"));
|
||||
TRACE("Vers int = %s +", vers_int.string("###.###.###.###"));
|
||||
TRACE("IVA dov o cre = %s\n", cre_deb_per.string("###.###.###.###"));
|
||||
#endif
|
||||
|
||||
if (crediti_speciali != ZERO || _is_visliq)
|
||||
set_row(rw++,"%s@11gCrediti speciali%s@58g%r",
|
||||
_is_visliq ? "$[r]" : "", _is_visliq ? "$[n]" : "", &crediti_speciali);
|
||||
|
||||
if (_freqviva == "T" && interessi != ZERO)
|
||||
set_row(rw++,"@11gInteressi dovuti per liquidazioni trimestrali %6.2r%%@75g%r",&interesse, &interessi);
|
||||
else
|
||||
{
|
||||
if (_is_visliq)
|
||||
rw++;
|
||||
}
|
||||
|
||||
if (!acc_dec.is_zero())
|
||||
set_row(rw++,"%s@11gAcconto versato%s@58g%r",
|
||||
_is_visliq ? "$[r]" : "", _is_visliq ? "$[n]" : "", &acc_dec);
|
||||
else
|
||||
{
|
||||
if (_is_visliq)
|
||||
rw++;
|
||||
}
|
||||
|
||||
// versamenti effettuati
|
||||
if (!versamenti.is_zero() && (_month==13 || !_is_visliq))
|
||||
{
|
||||
set_row(rw++,"@11gVersamenti effettuati@58g%r", &versamenti);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_is_visliq)
|
||||
rw++;
|
||||
}
|
||||
// versamenti integrativi
|
||||
if (!vers_int.is_zero() && !_is_visliq)
|
||||
{
|
||||
set_row(rw++,"@11gVersamenti integrativi@58g%r", &vers_int);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_is_visliq)
|
||||
rw++;
|
||||
}
|
||||
|
||||
const real iva = risultato + interessi;
|
||||
if (iva > ZERO)
|
||||
{
|
||||
if (iva >= IVA_DA_RIPORTARE || _isannual || _isriepilogo)
|
||||
set_row(rw++,"@23gIMPORTO DA VERSARE@75g%r",&iva);
|
||||
else
|
||||
set_row(rw++,"@23gIMPORTO DA NON VERSARE@75g%r",&iva);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_isannual)
|
||||
{
|
||||
const int year = atoi(_year)+1;
|
||||
const long ditta = get_firm();
|
||||
TString16 cod; cod.format("%05ld%04d", ditta, year);
|
||||
TTable lia("%LIA");
|
||||
lia.put("CODTAB", cod);
|
||||
if (lia.read() == NOERR)
|
||||
{
|
||||
real credito = lia.get_real("R0");
|
||||
if (credito > ZERO)
|
||||
set_row(rw++,"@11gCREDITO RIPORTATO NELL'ANNO SUCCESSIVO@58g%r", &credito);
|
||||
}
|
||||
}
|
||||
if (_is_visliq)
|
||||
rw++;
|
||||
}
|
||||
|
||||
if (_is_visliq && _month != 13)
|
||||
{
|
||||
rw++;
|
||||
set_row(rw++,"@11g$[r]Descrizione$[n]");
|
||||
|
||||
// stampa versamenti (anche 0) ad uso visualizzazione liquidazione IVA
|
||||
rw++;
|
||||
set_row(rw++,"@11g$[r]Versamenti effettuati$[n]@58g%r", &versamenti);
|
||||
set_row(rw++, "");
|
||||
set_row(rw++, "");
|
||||
}
|
||||
|
||||
if (!_is_visliq)
|
||||
{
|
||||
// descrizione rettifiche
|
||||
if (d._s6.not_empty())
|
||||
{
|
||||
rw++;
|
||||
set_row(rw++, "@11g@bDESCRIZIONE RETTIFICHE@r");
|
||||
rw++;
|
||||
if (d._s6.not_empty()) { set_row(rw++, "@11g%t", &(d._s6)); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void TLiquidazione_app::set_grand(_DescrItem& d)
|
||||
{
|
||||
set_bookmark("Riepilogativo liquidazione", _firm_bookmark);
|
||||
|
||||
set_row(1,""); set_row(2,""); set_row(3,""); set_row(4,"");
|
||||
set_row(5,"@11g@bCALCOLO LIQUIDAZIONE D'IMPOSTA@r");
|
||||
set_row(6,"");
|
||||
int rw = 7;
|
||||
|
||||
const bool new_print = atoi(_year) >= 2000;
|
||||
if (new_print)
|
||||
set_grand_2000(d, rw);
|
||||
else
|
||||
set_grand_1999(d, rw);
|
||||
|
||||
// rapportini per rimborso infraannuale
|
||||
// non si stampano se la stampa serve per la visualizz.
|
||||
@ -2129,11 +2336,13 @@ void TLiquidazione_app::set_ventila(_DescrItem& d)
|
||||
set_row(10,"");
|
||||
int row = 11;
|
||||
real t1, t2, t3;
|
||||
TString80 s0;
|
||||
for(int i = 0; i < d._arr.items(); i++)
|
||||
{
|
||||
_vDesc& vd = (_vDesc&)d._arr[i];
|
||||
look_iva(vd._codiva);
|
||||
TString s0 = _iva->get("S0");
|
||||
s0 = _iva->get("S0"); s0.cut(23);
|
||||
|
||||
set_row(row+i,"@8g%5s@17g%-23s@41g%r@68g%r@89g%r",
|
||||
(const char*)vd._codiva,
|
||||
(const char*)s0,
|
||||
@ -2263,7 +2472,7 @@ void TLiquidazione_app::set_regagr(_DescrItem& d)
|
||||
if (di._flags != PROGAGR)
|
||||
continue;
|
||||
look_iva(di._s0);
|
||||
des = _iva->get("S0");
|
||||
des = _iva->get("S0"); des.cut(25);
|
||||
al = _iva->get_real("R0");
|
||||
set_row(r,"%4s %-25s@48g%s %%", (const char*) di._s0, (const char*) des, al.string("#@,@@"));
|
||||
set_row(r,"@56g%r@75g%4s",&di._r0, (const char*)di._s1);
|
||||
|
@ -97,18 +97,16 @@ bool TLiquidazione_app::extract_deleghe()
|
||||
_freqviva = _lia->get("S7");
|
||||
|
||||
buf.format("Estrazione deleghe (%d):\nditta %s\n ",
|
||||
_month,
|
||||
(const char*)_nditte_r->get("RAGSOC"));
|
||||
_month, (const char*)_nditte_r->get("RAGSOC"));
|
||||
_prind->set_text(buf);
|
||||
|
||||
|
||||
if (is_month_ok_strict(_month) || _month == 13)
|
||||
{
|
||||
bool mens = _freqviva == "M";
|
||||
_isbenzinaro = _nditte->curr(LF_ATTIV).get_bool("ART74_4");
|
||||
bool mens = _freqviva == "M";
|
||||
_isriepilogo = _month == 13;
|
||||
_isendliq = _isannual || _isriepilogo;
|
||||
|
||||
if (mens || _isbenzinaro || _month!=12)
|
||||
extract_delega(_month, desc);
|
||||
}
|
||||
|
@ -1263,9 +1263,10 @@ int TStampa_registri_app::setta_riga(int r, const TRigaiva& riga, real& tot1,
|
||||
if (riga._imponibilep != ZERO)
|
||||
set_row(r, "@81g%r", &riga._imponibilep);
|
||||
if (riga._impostap != ZERO)
|
||||
set_row(r++, "@98g%r", &riga._impostap);
|
||||
}
|
||||
else r++;
|
||||
set_row(r, "@98g%r", &riga._impostap);
|
||||
}
|
||||
r++; // Incrementa sempre: cazzone!
|
||||
|
||||
tot1 += riga._imponibile;
|
||||
tot2 += riga._imposta;
|
||||
tot3 += riga._imponibilep;
|
||||
@ -1566,9 +1567,8 @@ int TStampa_registri_app::stampa_acquisti(int row)
|
||||
set_row(rw, "Cod.");
|
||||
rw++;
|
||||
set_row(rw, "iva Descrizione@34gImponibile@53gImposta");
|
||||
if (_tipo_stampa != prova) set_row(rw++, "@86gImponibile@106gImposta");
|
||||
else rw++;
|
||||
rw++;
|
||||
if (_tipo_stampa != prova) set_row(rw, "@86gImponibile@106gImposta");
|
||||
rw+=2;
|
||||
}
|
||||
rw = setta_riga(rw, riga, tot_imponib, tot_imposta, tot_imponibp, tot_impostap);
|
||||
tdetprec = riga._tipodet;
|
||||
@ -1598,9 +1598,8 @@ int TStampa_registri_app::stampa_acquisti(int row)
|
||||
rw++;
|
||||
set_row(rw, "iva Descrizione@34gImponibile@53gImposta");
|
||||
if (_tipo_stampa != prova)
|
||||
set_row(rw++, "@86gImponibile@106gImposta");
|
||||
else rw++;
|
||||
rw++;
|
||||
set_row(rw, "@86gImponibile@106gImposta");
|
||||
rw+=2;
|
||||
}
|
||||
rw = setta_riga(rw, riga, tot_imponib, tot_imposta, tot_imponibp, tot_impostap);
|
||||
tdetprec = riga._tipodet;
|
||||
@ -1630,9 +1629,8 @@ int TStampa_registri_app::stampa_acquisti(int row)
|
||||
rw++;
|
||||
set_row(rw, "iva Descrizione@34gImponibile@53gImposta");
|
||||
if (_tipo_stampa != prova)
|
||||
set_row(rw++, "@86gImponibile@106gImposta");
|
||||
else rw++;
|
||||
rw++;
|
||||
set_row(rw, "@86gImponibile@106gImposta");
|
||||
rw+=2;
|
||||
}
|
||||
rw = setta_riga(rw, riga, tot_imponib, tot_imposta, tot_imponibp, tot_impostap);
|
||||
tdetprec = riga._tipodet;
|
||||
@ -2141,9 +2139,6 @@ bool TStampa_registri_app::preprocess_page(int file, int counter)
|
||||
long numreg = mov.get_long(MOV_NUMREG);
|
||||
long protiva = mov.get_long(MOV_PROTIVA);
|
||||
long uprotiva = mov.get_long(MOV_UPROTIVA);
|
||||
real totdoc = mov.get_real(MOV_TOTDOC);
|
||||
real ritsoc = mov.get_real(MOV_RITSOC);
|
||||
real ritfis = mov.get_real(MOV_RITFIS);
|
||||
TString16 numdoc = mov.get(MOV_NUMDOC);
|
||||
int meseliq = mov.get_int(MOV_MESELIQ);
|
||||
char tipocf = mov.get(MOV_TIPO)[0];
|
||||
@ -2155,6 +2150,15 @@ bool TStampa_registri_app::preprocess_page(int file, int counter)
|
||||
real corrval = mov.get_real(MOV_CORRVALUTA);
|
||||
bool autof = caus.get_bool(CAU_AUTOFATT);
|
||||
TString80 descrcau = caus.get(CAU_DESCR);
|
||||
|
||||
real totdoc = mov.get_real(MOV_TOTDOC);
|
||||
real ritsoc = mov.get_real(MOV_RITSOC);
|
||||
real ritfis = mov.get_real(MOV_RITFIS);
|
||||
if (totdoc < ZERO) // Controlla il segno corretto da assegnare alle ritenute
|
||||
{
|
||||
ritsoc = -ritsoc;
|
||||
ritfis = -ritfis;
|
||||
}
|
||||
|
||||
if (_cur->pos() == 0)
|
||||
_uprotivap = uprotiva ? uprotiva : protiva;
|
||||
|
@ -3,74 +3,35 @@
|
||||
|
||||
class TAp_eser : public TSkeleton_application
|
||||
{
|
||||
TTable* _esc, * _reg;
|
||||
int _anno, _newanno;
|
||||
TDate _dataini, _datafin, _datainp, _datafip;
|
||||
TString _conserva;
|
||||
|
||||
protected:
|
||||
|
||||
bool check_esercizio(TString& cod, TDate s1, TDate f1);
|
||||
bool check_esercizio(const TString& cod, TDate s1, TDate f1);
|
||||
static bool mask_dataini (TMask_field&, KEY);
|
||||
static bool mask_newanno (TMask_field&, KEY);
|
||||
|
||||
public:
|
||||
virtual bool create();
|
||||
virtual bool destroy();
|
||||
virtual void main_loop();
|
||||
|
||||
bool set();
|
||||
bool apertura_es();
|
||||
|
||||
TAp_eser() {}
|
||||
};
|
||||
|
||||
//TDate InizioEsercizio(int anno)
|
||||
//{
|
||||
// TTable TabEs ("ESC");
|
||||
// TString codtab;
|
||||
// TDate inizio_es;
|
||||
//
|
||||
// TabEs.zero();
|
||||
// codtab.format ("%04d", anno);
|
||||
// TabEs.put ("CODTAB", codtab);
|
||||
// TabEs.read();
|
||||
// if (TabEs.good())
|
||||
// inizio_es= TabEs.get_date ("D0");
|
||||
//
|
||||
// return inizio_es;
|
||||
//}
|
||||
|
||||
//TDate FineEsercizio(int anno)
|
||||
//{
|
||||
// TTable TabEs ("ESC");
|
||||
// TString codtab;
|
||||
// TDate fine_es;
|
||||
//
|
||||
// TabEs.zero();
|
||||
// codtab.format ("%04d", anno);
|
||||
// TabEs.put ("CODTAB", codtab);
|
||||
// TabEs.read();
|
||||
// if (TabEs.good())
|
||||
// fine_es= TabEs.get_date ("D1");
|
||||
//
|
||||
// return fine_es;
|
||||
//}
|
||||
|
||||
bool TAp_eser::mask_newanno (TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_ENTER)
|
||||
{
|
||||
int newanno = f.mask().get_int(F_NUOVOANNO);
|
||||
int anno = f.mask().get_int(F_ANNO);
|
||||
TString16 codtab; codtab.format ("%04d", newanno);
|
||||
TString16 codtab; codtab.format("%04d", newanno);
|
||||
TTable TabEs("ESC");
|
||||
TabEs.put ("CODTAB", codtab);
|
||||
if (TabEs.read() == NOERR)
|
||||
{
|
||||
f.warning_box ("Il codice %s e' gia' presente nella tabella degli esercizi!",
|
||||
(const char*)codtab);
|
||||
return FALSE;
|
||||
}
|
||||
return f.warning_box ("Il codice %04d e' gia' presente nella tabella degli esercizi!",
|
||||
newanno);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -91,22 +52,12 @@ bool TAp_eser::mask_dataini (TMask_field& f, KEY k)
|
||||
}
|
||||
|
||||
bool TAp_eser::create()
|
||||
{
|
||||
_esc = new TTable("ESC");
|
||||
_reg = new TTable("REG");
|
||||
|
||||
{
|
||||
open_files(LF_TAB, 0);
|
||||
enable_menu_item(M_FILE_NEW, FALSE);
|
||||
return TSkeleton_application::create();
|
||||
}
|
||||
|
||||
bool TAp_eser::destroy()
|
||||
{
|
||||
delete _esc;
|
||||
delete _reg;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void TAp_eser::main_loop()
|
||||
{
|
||||
TTable TabEs ("ESC");
|
||||
@ -129,6 +80,7 @@ void TAp_eser::main_loop()
|
||||
{
|
||||
rn = TabEs.recno();
|
||||
fine = TabEs.get_date("D1");
|
||||
_conserva = TabEs.get("S1");
|
||||
}
|
||||
|
||||
TabEs.readat(rn);
|
||||
@ -140,8 +92,7 @@ void TAp_eser::main_loop()
|
||||
msk.set(F_ANNO, anno);
|
||||
msk.set(F_DATAINIC, inizio.string());
|
||||
msk.set(F_DATAFINC, fine.string());
|
||||
// msk.set(F_NUOVOANNO, anno+1);
|
||||
|
||||
|
||||
msk.set_handler (F_NUOVOANNO, mask_newanno);
|
||||
msk.set_handler (F_DATAINI, mask_dataini);
|
||||
|
||||
@ -230,13 +181,14 @@ bool TAp_eser::apertura_es()
|
||||
TabEs.put ("CODTAB", annonew);
|
||||
TabEs.put ("D0", _dataini);
|
||||
TabEs.put ("D1", _datafin);
|
||||
TabEs.put ("S1", _conserva);
|
||||
TabEs.write();
|
||||
message_box("Apertura nuovo esercizio completata");
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TAp_eser::check_esercizio(TString& cod, TDate s1, TDate f1)
|
||||
bool TAp_eser::check_esercizio(const TString& cod, TDate s1, TDate f1)
|
||||
{
|
||||
// -----------------------------------------------------------------------------------------
|
||||
// chiamata prima di registrare. Controlla:
|
||||
|
@ -397,7 +397,7 @@ bool TApertura_chiusura::attivo_passivo (TMask_field& f, KEY k)
|
||||
{
|
||||
int indbil = pcon.get_int(PCN_INDBIL);
|
||||
if (indbil != 1 && indbil != 2 && indbil != 5)
|
||||
return f.warning_box("Indicatore di bilancio errato");
|
||||
return f.warning_box("Indicatore di bilancio del conto %d %d errato: deve essere 1,2 o 5", g, c);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
@ -428,7 +428,7 @@ bool TApertura_chiusura::costi_ricavi (TMask_field& f, KEY k)
|
||||
{
|
||||
int indbil = pcon.get_int(PCN_INDBIL);
|
||||
if (indbil != 3 && indbil != 4)
|
||||
return f.warning_box("Indicatore di bilancio errato");
|
||||
return f.warning_box("Indicatore di bilancio del conto %d %d errato: deve essere 3 o 4", g, c);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -35,6 +35,7 @@ protected: // Applicat
|
||||
static bool agrmin_handler(TMask_field& f, KEY k);
|
||||
static bool credres_handler(TMask_field& f, KEY k);
|
||||
static bool credpreccost_handler(TMask_field& f, KEY k);
|
||||
static bool utcred_handler(TMask_field& f, KEY k);
|
||||
|
||||
protected: // Relapp
|
||||
virtual bool user_create();
|
||||
@ -49,6 +50,7 @@ protected: // Relapp
|
||||
virtual bool protected_record(TRectype&) { return TRUE; }
|
||||
virtual void init_query_mode(TMask&);
|
||||
virtual void init_insert_mode(TMask& m);
|
||||
virtual void init_modify_mode(TMask& m);
|
||||
virtual int rewrite(const TMask& m);
|
||||
// non si possono aggiungere record, se non ci sono vengono
|
||||
// creati automaticamente
|
||||
@ -61,7 +63,8 @@ protected:
|
||||
static bool sheet_action(TSheet_field& s, int r, KEY k);
|
||||
|
||||
public:
|
||||
|
||||
|
||||
TRelation & rel() const { return *_rel;}
|
||||
TParaliq_app() {}
|
||||
virtual ~TParaliq_app() {}
|
||||
};
|
||||
@ -157,6 +160,42 @@ bool TParaliq_app::credpreccost_handler(TMask_field& f, KEY k)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TParaliq_app::utcred_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if ((k == K_TAB && f.focusdirty()) || !f.mask().is_running())
|
||||
{
|
||||
TMask & m = f.mask();
|
||||
const int anno_liq = m.get_int(F_YEAR);
|
||||
TString80 cod_mesi;
|
||||
TString des_mesi(128);
|
||||
TString16 mese;
|
||||
TList_field & mese_res = ((TList_field &) m.field(F_MESE_RES_AL));
|
||||
|
||||
if (anno_liq >= 2000 && f.get().not_empty())
|
||||
{
|
||||
m.field(F_CRED_PREC).set_prompt("Credito compensabile inizio anno ");
|
||||
m.field(F_CRED_RES).set_prompt("Credito in compensaz.utilizzato ");
|
||||
m.enable(F_UTCR_IVA);
|
||||
cod_mesi = "0|-1";
|
||||
des_mesi = " |Inizio Anno";
|
||||
mese = m.get_real(F_CRED_RES) != ZERO ? "-1" : "0";
|
||||
}
|
||||
else
|
||||
{
|
||||
m.field(F_CRED_PREC).set_prompt("Credito precedente ");
|
||||
m.field(F_CRED_RES).set_prompt("Credito residuo ");
|
||||
cod_mesi = "0|1|2|3|4|5|6|7|8|9|10|11|12";
|
||||
des_mesi = " |Gennaio|Febbraio|Marzo|Aprile|Maggio|Giugno|Luglio|Agosto|Settembre|Ottobre|Novembre|Dicembre";
|
||||
mese = app().rel().lfile().get("I0");
|
||||
if (!m.edit_mode() || atoi(mese) < 0)
|
||||
mese.cut(0);
|
||||
}
|
||||
mese_res.replace_items(cod_mesi, des_mesi);
|
||||
m.set(F_MESE_RES_AL, mese);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void TParaliq_app::check_registers(int year)
|
||||
{
|
||||
// controlla che per ogni data attivita' esistano almeno un registro
|
||||
@ -265,6 +304,7 @@ bool TParaliq_app::user_create()
|
||||
_msk->set_handler(F_CRED_PREC,credpreccost_handler);
|
||||
_msk->set_handler(F_CRED_COST,credpreccost_handler);
|
||||
_msk->set_handler(F_CODDITTA,ditta_handler);
|
||||
_msk->set_handler(F_UTCR_IVA,utcred_handler);
|
||||
((TSheet_field&)_msk->field(F_SHEET_PLA)).set_notify(sheet_action);
|
||||
return TRUE;
|
||||
}
|
||||
@ -295,7 +335,24 @@ void TParaliq_app::init_query_mode(TMask& m)
|
||||
void TParaliq_app::init_insert_mode(TMask& m)
|
||||
{
|
||||
// Inizializza array delle attivita'
|
||||
init_array(m, TRUE);
|
||||
init_array(m, TRUE);
|
||||
init_modify_mode(m);
|
||||
}
|
||||
|
||||
|
||||
void TParaliq_app::init_modify_mode(TMask& m)
|
||||
{
|
||||
const int anno_liq = m.get_int(F_YEAR);
|
||||
|
||||
if (anno_liq >= 2000)
|
||||
{
|
||||
m.enable(F_UTCR_IVA);
|
||||
}
|
||||
else
|
||||
{
|
||||
m.set(F_UTCR_IVA, " ", TRUE);
|
||||
m.disable(F_UTCR_IVA);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define F_CRED_RES 310
|
||||
#define F_MESE_RES_AL 311
|
||||
#define F_CODVAL 312
|
||||
#define F_UTCR_IVA 313
|
||||
|
||||
#define F_CODATT 101
|
||||
#define F_DESATT 150
|
||||
|
@ -63,7 +63,7 @@ BEGIN
|
||||
FLAGS "HD"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 75 6
|
||||
GROUPBOX DLG_NULL 75 7
|
||||
BEGIN
|
||||
PROMPT 2 4 "Parametri ditta"
|
||||
END
|
||||
@ -83,11 +83,11 @@ BEGIN
|
||||
FIELD B1
|
||||
END
|
||||
|
||||
CURRENCY F_CRED_PREC 18
|
||||
CURRENCY F_CRED_COST 18
|
||||
BEGIN
|
||||
PROMPT 4 6 "Credito precedente "
|
||||
HELP "Eventuale credito di imposta dell'anno precedente"
|
||||
FIELD R0
|
||||
PROMPT 4 6 "Credito di costo "
|
||||
HELP "Eventuale credito di costo dell'anno precedente"
|
||||
FIELD R5
|
||||
FLAGS "R"
|
||||
DRIVENBY F_CODVAL
|
||||
END
|
||||
@ -98,18 +98,26 @@ BEGIN
|
||||
FIELD B2
|
||||
END
|
||||
|
||||
CURRENCY F_CRED_COST 18
|
||||
LISTBOX F_UTCR_IVA 2 34
|
||||
BEGIN
|
||||
PROMPT 4 7 "Credito di costo "
|
||||
HELP "Eventuale credito di costo dell'anno precedente"
|
||||
FIELD R5
|
||||
PROMPT 4 7 "Utilizzo credito IVA "
|
||||
ITEM " |Visibile e utilizzato solo in IVA"
|
||||
ITEM "NV|Non visibile ma compensabile"
|
||||
FIELD S9
|
||||
END
|
||||
|
||||
CURRENCY F_CRED_PREC 18
|
||||
BEGIN
|
||||
PROMPT 4 8 "Credito compensabile inizio anno "
|
||||
HELP "Eventuale credito di imposta dell'anno precedente"
|
||||
FIELD R0
|
||||
FLAGS "R"
|
||||
DRIVENBY F_CODVAL
|
||||
END
|
||||
|
||||
CURRENCY F_CRED_RES 18
|
||||
BEGIN
|
||||
PROMPT 4 8 "Credito residuo "
|
||||
PROMPT 4 9 "Credito in compensaz.utilizzato "
|
||||
FIELD R15
|
||||
FLAGS "R"
|
||||
DRIVENBY F_CODVAL
|
||||
@ -119,15 +127,14 @@ END
|
||||
|
||||
LISTBOX F_MESE_RES_AL 14
|
||||
BEGIN
|
||||
PROMPT 45 8 "Al mese di "
|
||||
PROMPT 54 9 "A "
|
||||
ITEM "0|"
|
||||
FLAGS "M"
|
||||
FIELD I0
|
||||
END
|
||||
|
||||
SPREADSHEET F_SHEET_PLA 78
|
||||
BEGIN
|
||||
PROMPT 1 10 "Parametri attivita'"
|
||||
PROMPT 1 11 "Parametri attivita'"
|
||||
ITEM "Attiv.@5F"
|
||||
ITEM "Tipo@3"
|
||||
ITEM "Prorata"
|
||||
|
686
cg/cg5500.cpp
686
cg/cg5500.cpp
File diff suppressed because it is too large
Load Diff
16
cg/cg5500.h
16
cg/cg5500.h
@ -43,12 +43,13 @@ class Visliq_app : public TSkeleton_application
|
||||
bool _is_annual;
|
||||
|
||||
const char* itoname(int m);
|
||||
|
||||
|
||||
bool is_trim(int x);
|
||||
bool is_month_ok(int x, int month = -1);
|
||||
|
||||
protected:
|
||||
|
||||
virtual void main_loop();
|
||||
virtual bool create();
|
||||
virtual bool destroy();
|
||||
|
||||
@ -81,7 +82,6 @@ public:
|
||||
void write_general(TMask& m);
|
||||
void write_liq();
|
||||
void write_del();
|
||||
|
||||
|
||||
void set_freqviva();
|
||||
void set_freqviva(const char* f) { _freqviva = f; }
|
||||
@ -99,15 +99,19 @@ public:
|
||||
TTable* del() { return _del; }
|
||||
|
||||
// riaggiusta la liquidazione del mese dato
|
||||
void recalc_liq_data(TViswin & v, real& rimb, real& rett, real& vers,
|
||||
real& acc, TString& d1, TString& d2, TDate& date, TString&
|
||||
abi, TString& cab, TString& con);
|
||||
void recalc_liq_data(TViswin* v, real& rimb, real& rett, real& vers, real& acc,
|
||||
real& varimp, real& impnonver, real& credspec,
|
||||
TString& d1, TString& d2, TString& d3, TDate& date,
|
||||
TString& abi, TString& cab, TString& con);
|
||||
|
||||
// Calcolo del credito utilizzato IVA ed F24
|
||||
real credito_utilizzato(int year, int month) const;
|
||||
|
||||
// riaggiusta le liquidazioni successive se serve
|
||||
void recalc_next_liq(int start_month, TSheet_field* sl, TSheet_field* sv);
|
||||
|
||||
// workhorses
|
||||
virtual void main_loop();
|
||||
void vis_liq();
|
||||
bool vis_all();
|
||||
bool vis_one(int);
|
||||
|
||||
|
11
cg/cg5500a.h
11
cg/cg5500a.h
@ -1,11 +1,11 @@
|
||||
#define F_CODDITTA 101
|
||||
#define F_RAGSOC 102
|
||||
#define F_CODDITTA 151
|
||||
#define F_RAGSOC 152
|
||||
#define F_MONTHS 103
|
||||
#define F_TRIMS 104
|
||||
#define F_YEAR 105
|
||||
#define F_VISLIQ1 106
|
||||
#define F_VISLIQ2 107
|
||||
#define F_CREDPREC 108
|
||||
#define F_CREDPREC 158
|
||||
#define F_VISFLQ 109
|
||||
#define F_ACCONTO 110
|
||||
#define F_RIMBORSO 111
|
||||
@ -21,6 +21,11 @@
|
||||
#define F_DELCON 121
|
||||
#define F_PERIODOM 122
|
||||
#define F_PERIODOT 123
|
||||
#define F_DESCR3 124
|
||||
#define F_VARIMP 125
|
||||
#define F_VARIMP_DC 126
|
||||
#define F_IMPNONVER 127
|
||||
#define F_CREDSPEC 128
|
||||
|
||||
#define F_CODDITTA2 201
|
||||
#define F_RAGSOC2 202
|
||||
|
@ -49,18 +49,23 @@ END
|
||||
|
||||
CURRENCY F_CREDPREC 15
|
||||
BEGIN
|
||||
PROMPT 1 5 "Credito inizio anno "
|
||||
PROMPT 1 5 "Credito compensabile inizio anno "
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
SPREADSHEET F_VISLIQ1 78 11
|
||||
SPREADSHEET F_VISLIQ1 78
|
||||
BEGIN
|
||||
PROMPT 1 7 "Liquidazione"
|
||||
ITEM "Mese@10"
|
||||
ITEM "Risultato@15"
|
||||
ITEM "D/C"
|
||||
ITEM "IVA rimborso@15"
|
||||
ITEM "IVA rettifiche@15"
|
||||
ITEM "D/C"
|
||||
PROMPT 1 7 "Liquidazione"
|
||||
ITEM "Mese@10"
|
||||
ITEM "Risultato@15"
|
||||
ITEM "D/C@3"
|
||||
ITEM "IVA rimborso@15"
|
||||
ITEM "IVA rettifiche@15"
|
||||
ITEM "D/C@3"
|
||||
ITEM "Credito\nutilizzato IVA@15"
|
||||
ITEM "Credito\nutilizzato F24@15"
|
||||
ITEM "Credito IVA\nresiduo@15"
|
||||
ITEM "Descrizione@35"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
@ -84,7 +89,7 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
SPREADSHEET F_VISLIQ2 78 11
|
||||
SPREADSHEET F_VISLIQ2 76
|
||||
BEGIN
|
||||
PROMPT 1 5 "Versamenti"
|
||||
ITEM "Mese@15"
|
||||
@ -103,20 +108,20 @@ PAGE "Prospetto mensile" -1 -1 50 10
|
||||
|
||||
STRING 101 20
|
||||
BEGIN
|
||||
PROMPT 1 2 "Mese "
|
||||
FLAGS "D"
|
||||
PROMPT 1 1 "Mese "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
|
||||
CURRENCY 102 15
|
||||
BEGIN
|
||||
PROMPT 1 3 "Risultato "
|
||||
PROMPT 1 2 "Risultato "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
LIST 103 1 10
|
||||
BEGIN
|
||||
PROMPT 1 4 "Importo a "
|
||||
PROMPT 35 2 ""
|
||||
ITEM " | "
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
@ -125,23 +130,53 @@ END
|
||||
|
||||
CURRENCY 104 15
|
||||
BEGIN
|
||||
PROMPT 1 5 "IVA a rimborso "
|
||||
PROMPT 1 3 "IVA rimborso "
|
||||
PICTURE "."
|
||||
GROUP 11
|
||||
END
|
||||
|
||||
CURRENCY 105 15
|
||||
BEGIN
|
||||
PROMPT 1 6 "Rettifiche "
|
||||
PROMPT 1 4 "IVA rettifiche "
|
||||
GROUP 11
|
||||
END
|
||||
|
||||
LIST 106 1 10
|
||||
BEGIN
|
||||
PROMPT 1 7 "Rettifica a "
|
||||
PROMPT 35 4 ""
|
||||
ITEM " | "
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
FLAGS "U"
|
||||
FLAGS "U"
|
||||
GROUP 11
|
||||
END
|
||||
|
||||
|
||||
CURRENCY 107 15
|
||||
BEGIN
|
||||
PROMPT 1 3 "Credito utilizzato IVA "
|
||||
FLAGS "D"
|
||||
GROUP 12
|
||||
END
|
||||
|
||||
CURRENCY 108 15
|
||||
BEGIN
|
||||
PROMPT 1 4 "Credito utilizzato F24 "
|
||||
GROUP 12
|
||||
END
|
||||
|
||||
CURRENCY 109 15
|
||||
BEGIN
|
||||
PROMPT 1 5 "Credito IVA residuo "
|
||||
FLAGS "D"
|
||||
GROUP 12
|
||||
END
|
||||
|
||||
STRING 110 50 35
|
||||
BEGIN
|
||||
PROMPT 1 6 "Descr. "
|
||||
GROUP 12
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -13 -1 ""
|
||||
@ -155,7 +190,6 @@ END
|
||||
BUTTON 100 10 2
|
||||
BEGIN
|
||||
PROMPT -33 -1 "Dettaglio"
|
||||
// FLAGS "H"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
@ -226,22 +260,11 @@ BEGIN
|
||||
END
|
||||
|
||||
|
||||
CURRENCY 106 15 0
|
||||
CURRENCY 106 15
|
||||
BEGIN
|
||||
PROMPT 1 6 "Versamenti "
|
||||
END
|
||||
|
||||
/*
|
||||
LIST 107 1 10
|
||||
BEGIN
|
||||
PROMPT 1 7 "Importo a "
|
||||
ITEM " | "
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
FLAGS "U"
|
||||
END
|
||||
*/
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -13 -1 ""
|
||||
|
147
cg/cg5500c.uml
147
cg/cg5500c.uml
@ -2,7 +2,7 @@
|
||||
|
||||
TOOLBAR "" 0 20 0 2
|
||||
|
||||
BUTTON DLG_SAVEREC 8 2
|
||||
BUTTON DLG_SAVEREC 10 2
|
||||
BEGIN
|
||||
PROMPT -13 -1 "~Registra"
|
||||
PICTURE BMP_SAVEREC
|
||||
@ -10,12 +10,12 @@ PICTURE BMP_SAVERECDN
|
||||
MESSAGE EXIT,K_SAVE
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 8 2
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT -23 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 8 2
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -33 -1 ""
|
||||
MESSAGE EXIT,K_QUIT
|
||||
@ -24,15 +24,15 @@ END
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Visualizzazione liquidazione" -1 -1 77 20
|
||||
|
||||
|
||||
GROUPBOX DLG_NULL 79 3
|
||||
BEGIN
|
||||
PROMPT 0 1 "@BDitta corrente"
|
||||
END
|
||||
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 2 2 "Codice ditta "
|
||||
PROMPT 2 2 "Codice ditta "
|
||||
FLAGS "FRD"
|
||||
USE LF_NDITTE KEY 1
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
@ -42,36 +42,41 @@ END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 22 2 ""
|
||||
FLAGS "D"
|
||||
PROMPT 22 2 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
CURRENCY F_CREDPREC 15
|
||||
BEGIN
|
||||
PROMPT 1 4 "Credito inizio anno "
|
||||
PROMPT 1 4 "Credito compensabile inizio anno "
|
||||
FLAGS "R"
|
||||
END
|
||||
|
||||
SPREADSHEET F_VISLIQ1 78 5
|
||||
BEGIN
|
||||
PROMPT 1 7 "Liquidazione"
|
||||
ITEM "Mese@10"
|
||||
ITEM "Risultato@15"
|
||||
ITEM "D/C"
|
||||
ITEM "IVA rimborso@15"
|
||||
ITEM "IVA rettifiche@15"
|
||||
ITEM "D/C"
|
||||
PROMPT 1 7 "Liquidazione"
|
||||
ITEM "Mese@10"
|
||||
ITEM "Risultato@15"
|
||||
ITEM "D/C@3"
|
||||
ITEM "IVA rimborso@15"
|
||||
ITEM "IVA rettifiche@15"
|
||||
ITEM "D/C@3"
|
||||
ITEM "Credito\nutilizzato IVA@15"
|
||||
ITEM "Credito\nutilizzato F24@15"
|
||||
ITEM "Credito IVA\nresiduo@15"
|
||||
ITEM "Descrizione@35"
|
||||
END
|
||||
|
||||
SPREADSHEET F_VISLIQ2 78 5
|
||||
BEGIN
|
||||
PROMPT 1 13 "Versamenti"
|
||||
ITEM "Mese@10"
|
||||
ITEM "Data@10"
|
||||
ITEM "ABI@5"
|
||||
ITEM "CAB@5"
|
||||
ITEM "Conc.@5"
|
||||
ITEM "Versamenti@15"
|
||||
// ITEM "D/C"
|
||||
PROMPT 1 13 "Versamenti"
|
||||
ITEM "Mese@10"
|
||||
ITEM "Data@10"
|
||||
ITEM "ABI@5"
|
||||
ITEM "CAB@5"
|
||||
ITEM "Conc.@5"
|
||||
ITEM "Versamenti@15"
|
||||
// ITEM "D/C"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
@ -81,11 +86,10 @@ PAGE "Prospetto mensile" -1 -1 50 10
|
||||
|
||||
STRING 101 20
|
||||
BEGIN
|
||||
PROMPT 1 1 "Mese "
|
||||
FLAGS "D"
|
||||
PROMPT 1 1 "Mese "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
|
||||
CURRENCY 102 15
|
||||
BEGIN
|
||||
PROMPT 1 2 "Risultato "
|
||||
@ -94,62 +98,90 @@ END
|
||||
|
||||
LIST 103 1 10
|
||||
BEGIN
|
||||
PROMPT 1 3 "Importo a "
|
||||
ITEM " | "
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
FLAGS "DU"
|
||||
PROMPT 35 2 ""
|
||||
ITEM " | "
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
FLAGS "DU"
|
||||
END
|
||||
|
||||
CURRENCY 104 15
|
||||
BEGIN
|
||||
PROMPT 1 4 "IVA a rimborso "
|
||||
PROMPT 1 3 "IVA rimborso "
|
||||
GROUP 11
|
||||
END
|
||||
|
||||
|
||||
CURRENCY 105 15
|
||||
BEGIN
|
||||
PROMPT 1 5 "Rettifiche "
|
||||
PROMPT 1 4 "IVA rettifiche "
|
||||
GROUP 11
|
||||
END
|
||||
|
||||
LIST 106 1 10
|
||||
BEGIN
|
||||
PROMPT 1 6 "Rettifica a "
|
||||
ITEM " | "
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
FLAGS "U"
|
||||
PROMPT 35 4 ""
|
||||
ITEM " | "
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
FLAGS "U"
|
||||
GROUP 11
|
||||
END
|
||||
|
||||
|
||||
CURRENCY 107 15
|
||||
BEGIN
|
||||
PROMPT 1 3 "Credito utilizzato IVA "
|
||||
FLAGS "D"
|
||||
GROUP 12
|
||||
END
|
||||
|
||||
CURRENCY 108 15
|
||||
BEGIN
|
||||
PROMPT 1 4 "Credito utilizzato F24 "
|
||||
GROUP 12
|
||||
END
|
||||
|
||||
CURRENCY 109 15
|
||||
BEGIN
|
||||
PROMPT 1 5 "Credito IVA residuo "
|
||||
FLAGS "D"
|
||||
GROUP 12
|
||||
END
|
||||
|
||||
STRING 110 50 35
|
||||
BEGIN
|
||||
PROMPT 1 6 "Descr. "
|
||||
GROUP 12
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -13 -1 ""
|
||||
PROMPT -13 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT -23 -1 ""
|
||||
PROMPT -23 -1 ""
|
||||
END
|
||||
|
||||
BUTTON 100 10 2
|
||||
BEGIN
|
||||
PROMPT -33 -1 "Dettaglio"
|
||||
// FLAGS "H"
|
||||
PROMPT -33 -1 "Dettaglio"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
ENDMASK
|
||||
|
||||
PAGE "Prospetto versamenti" -1 -1 50 12
|
||||
|
||||
|
||||
STRING 101 20
|
||||
BEGIN
|
||||
PROMPT 1 1 "Mese "
|
||||
PROMPT 1 1 "Mese "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
DATE 102
|
||||
BEGIN
|
||||
PROMPT 1 2 "Data "
|
||||
PROMPT 1 2 "Data "
|
||||
END
|
||||
|
||||
NUMBER 103 5
|
||||
@ -201,32 +233,23 @@ END
|
||||
CURRENCY 106 15
|
||||
BEGIN
|
||||
PROMPT 1 6 "Versamenti "
|
||||
FLAGS "R"
|
||||
END
|
||||
|
||||
/*
|
||||
LIST 107 1 10
|
||||
BEGIN
|
||||
PROMPT 1 7 "Importo a "
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
FLAGS "U"
|
||||
END
|
||||
*/
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -13 -1 ""
|
||||
PROMPT -13 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT -23 -1 ""
|
||||
PROMPT -23 -1 ""
|
||||
END
|
||||
|
||||
BUTTON 100 10 2
|
||||
BEGIN
|
||||
PROMPT -33 -1 "Dettaglio"
|
||||
// FLAGS "H"
|
||||
PROMPT -33 -1 "Dettaglio"
|
||||
// FLAGS "H"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
@ -39,33 +39,33 @@ LISTBOX F_PERIODOM 30
|
||||
BEGIN
|
||||
PROMPT 2 3 "Periodo liquidazione "
|
||||
FLAGS "D"
|
||||
ITEM "1|Gennaio"
|
||||
ITEM "2|Febbraio"
|
||||
ITEM "3|Marzo"
|
||||
ITEM "4|Aprile"
|
||||
ITEM "5|Maggio"
|
||||
ITEM "6|Giugno"
|
||||
ITEM "7|Luglio"
|
||||
ITEM "8|Agosto"
|
||||
ITEM "9|Settembre"
|
||||
ITEM "10|Ottobre"
|
||||
ITEM "11|Novembre"
|
||||
ITEM "12|Dicembre"
|
||||
ITEM "13|Annuale"
|
||||
ITEM "1|Gennaio"
|
||||
ITEM "2|Febbraio"
|
||||
ITEM "3|Marzo"
|
||||
ITEM "4|Aprile"
|
||||
ITEM "5|Maggio"
|
||||
ITEM "6|Giugno"
|
||||
ITEM "7|Luglio"
|
||||
ITEM "8|Agosto"
|
||||
ITEM "9|Settembre"
|
||||
ITEM "10|Ottobre"
|
||||
ITEM "11|Novembre"
|
||||
ITEM "12|Dicembre"
|
||||
ITEM "13|Annuale"
|
||||
END
|
||||
|
||||
LISTBOX F_PERIODOT 30
|
||||
BEGIN
|
||||
PROMPT 2 3 "Periodo liquidazione "
|
||||
FLAGS "D"
|
||||
ITEM "3|1° Trimestre"
|
||||
ITEM "6|2° Trimestre"
|
||||
ITEM "9|3° Trimestre"
|
||||
ITEM "12|4° Trimestre"
|
||||
ITEM "13|Annuale"
|
||||
ITEM "3|1° Trimestre"
|
||||
ITEM "6|2° Trimestre"
|
||||
ITEM "9|3° Trimestre"
|
||||
ITEM "12|4° Trimestre"
|
||||
ITEM "13|Annuale"
|
||||
END
|
||||
|
||||
BROWSEFILE F_VISFLQ 76 10
|
||||
BROWSEFILE F_VISFLQ 78 10
|
||||
BEGIN
|
||||
PROMPT 1 4 ""
|
||||
END
|
||||
@ -74,7 +74,7 @@ END
|
||||
|
||||
CURRENCY F_RIMBORSO 15
|
||||
BEGIN
|
||||
PROMPT 3 17 "Rimborso infrannuale: "
|
||||
PROMPT 2 17 "Rimborsi : "
|
||||
GROUP 1
|
||||
FLAGS "H"
|
||||
END
|
||||
@ -194,6 +194,54 @@ BEGIN
|
||||
GROUP 4
|
||||
END
|
||||
|
||||
/* gruppo 5: edit descrizione */
|
||||
|
||||
STRING F_DESCR3 60
|
||||
BEGIN
|
||||
PROMPT 2 18 "Descrizione "
|
||||
GROUP 5
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
/* gruppo 6: edit Variazioni d'imposta */
|
||||
|
||||
NUMBER F_VARIMP 15
|
||||
BEGIN
|
||||
PROMPT 2 17 "Variazioni d'imposta "
|
||||
PICTURE "."
|
||||
GROUP 6
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
LIST F_VARIMP_DC 7
|
||||
BEGIN
|
||||
PROMPT 40 17 "a "
|
||||
GROUP 6
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
/* gruppo 7: edit Imposta non versata*/
|
||||
|
||||
NUMBER F_IMPNONVER 15
|
||||
BEGIN
|
||||
PROMPT 2 17 "Imposta non versata "
|
||||
PICTURE "."
|
||||
GROUP 7
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
/* gruppo 8: edit crediti speciali */
|
||||
|
||||
NUMBER F_CREDSPEC 15 0
|
||||
BEGIN
|
||||
PROMPT 2 17 "Crediti speciali : "
|
||||
GROUP 8
|
||||
FLAGS "HR"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
|
||||
ENDPAGE
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
BUTTON DLG_SAVEREC 8 2
|
||||
BUTTON DLG_SAVEREC 10 2
|
||||
BEGIN
|
||||
PROMPT -14 -1 "~Registra"
|
||||
PICTURE BMP_SAVEREC
|
||||
@ -6,19 +6,19 @@ PICTURE BMP_SAVERECDN
|
||||
MESSAGE EXIT,K_SAVE
|
||||
END
|
||||
|
||||
BUTTON DLG_RECALC 8 2
|
||||
BUTTON DLG_RECALC 10 2
|
||||
BEGIN
|
||||
PROMPT -24 -1 "Ri~calcola"
|
||||
PICTURE BMP_RECALC
|
||||
MESSAGE EXIT,K_INS
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 8 2
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT -34 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 8 2
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -44 -1 ""
|
||||
MESSAGE EXIT,K_QUIT
|
||||
|
@ -6,16 +6,23 @@ bool Visliq_app::look_lim(int m)
|
||||
bool ok = FALSE;
|
||||
|
||||
_lim_r->zero();
|
||||
_lam_r->zero();
|
||||
(*_lim_anno) = _year;
|
||||
(*_lim_mese) = format("%02d",m);
|
||||
|
||||
if (_lim->read() == NOERR)
|
||||
{
|
||||
_lam_r->zero();
|
||||
(*_lam_anno) = _year;
|
||||
(*_lam_mese) = format("%02d",m);
|
||||
_lam->read();
|
||||
}
|
||||
else
|
||||
{
|
||||
_lim_r->zero();
|
||||
(*_lim_anno) = _year;
|
||||
(*_lim_mese) = format("%02d",m);
|
||||
}
|
||||
|
||||
return _lim->good() && _lam->good();
|
||||
}
|
||||
|
||||
|
@ -6,8 +6,6 @@
|
||||
#include <prefix.h>
|
||||
#include <sheet.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
#include <urldefid.h>
|
||||
|
||||
#include <nditte.h>
|
||||
|
||||
@ -68,8 +66,9 @@ void TDich_periodica_selfirm_mask::build_nomiditte()
|
||||
bool good = prefix().exist(dt.get_long("CODDITTA"));
|
||||
|
||||
if (good)
|
||||
{
|
||||
lia.put("CODTAB", format("%05ld%d",dt.get_long("CODDITTA"),_year));
|
||||
{
|
||||
TString16 cod; cod.format("%05ld%d", dt.get_long("CODDITTA"),_year);
|
||||
lia.put("CODTAB", cod);
|
||||
if (lia.read() != NOERR)
|
||||
good = FALSE;
|
||||
else
|
||||
|
@ -22,7 +22,7 @@ END
|
||||
|
||||
LIST F_MONTHS 30
|
||||
BEGIN
|
||||
PROMPT 1 5 "Mese liquidazione "
|
||||
PROMPT 1 5 "Iva periodica di "
|
||||
ITEM "1|Gennaio"
|
||||
ITEM "2|Febbraio"
|
||||
ITEM "3|Marzo"
|
||||
@ -39,7 +39,7 @@ END
|
||||
|
||||
LIST F_TRIMS 30
|
||||
BEGIN
|
||||
PROMPT 1 5 "Trim. liq. "
|
||||
PROMPT 1 5 "Iva periodica del "
|
||||
ITEM "3|1° Trimestre"
|
||||
ITEM "6|2° Trimestre"
|
||||
ITEM "9|3° Trimestre"
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include <direct.h>
|
||||
|
||||
#include <applicat.h>
|
||||
#include <colors.h>
|
||||
#include <config.h>
|
||||
#include <mask.h>
|
||||
#include <prefix.h>
|
||||
@ -19,7 +18,6 @@
|
||||
|
||||
class TRic_archivi : public TSkeleton_application
|
||||
{
|
||||
//TTable* _tab_tra;
|
||||
TTransfer_file* _tras_file;
|
||||
TLocalisamfile* _caus;
|
||||
TLocalisamfile* _rcaus;
|
||||
@ -32,7 +30,6 @@ class TRic_archivi : public TSkeleton_application
|
||||
TLocalisamfile* _part;
|
||||
TLocalisamfile* _scad;
|
||||
TLocalisamfile* _pagsca;
|
||||
//TLocalisamfile* _tab;
|
||||
|
||||
TString80 TEMP;
|
||||
|
||||
@ -246,7 +243,7 @@ bool TRic_archivi::leggi_marker()
|
||||
if (_dittaric != 0)
|
||||
{
|
||||
if (!prefix().exist(_dittaric))
|
||||
return error_box("Gli archivi della ditta %ld non sono presenti su disco", _dittaric);
|
||||
return error_box("Libreria archivi ditta %s non presente su disco", (const char*)_dittaric);
|
||||
}
|
||||
else
|
||||
return error_box("Codici NON PRESENTI in tabella ricezione: caricarli e riprovare");
|
||||
@ -419,9 +416,9 @@ void TRic_archivi::main_loop()
|
||||
aggiorna_tabella();
|
||||
_tras_file->close(); // Chiude il trasfer letto dalla directory della ditta
|
||||
::remove(_trasf);
|
||||
TString80 tab = _tras_file->path(_dittaric);
|
||||
TString tabcdx = tab;
|
||||
TString tabdbf = tab;
|
||||
TFilename tab = _tras_file->path(_dittaric);
|
||||
TFilename tabcdx = tab;
|
||||
TFilename tabdbf = tab;
|
||||
tabcdx << "\\ttab.cdx";
|
||||
tabdbf << "\\ttab.dbf";
|
||||
::remove(tabcdx);
|
||||
@ -694,7 +691,6 @@ void TRic_archivi::trasfer2tempfile()
|
||||
void TRic_archivi::ditta_ricevente()
|
||||
{
|
||||
TLocalisamfile nditte (LF_NDITTE);
|
||||
|
||||
nditte.setkey(1);
|
||||
nditte.zero();
|
||||
nditte.put(NDT_CODDITTA, _dittaric);
|
||||
|
@ -70,12 +70,12 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 9 2
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 9 2
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
@ -16,17 +16,14 @@ END
|
||||
STRING F_PATHNAME 30
|
||||
BEGIN
|
||||
PROMPT 2 4 "Indirizzario "
|
||||
HELP "Specificare il percorso completo dove ricercare il file di ricezione dati"
|
||||
FLAGS "U"
|
||||
//VALIDATE FILENAME_FUNC
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 9 2
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 9 2
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
@ -9,12 +9,12 @@ BEGIN
|
||||
ITEM "B:|B:"
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 9 2
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 9 2
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
@ -1430,6 +1430,7 @@ void TRic_tab::ricevi_movSC(TString& key, char uselab)
|
||||
partita.put(PART_DATADOC, _tpart->get_date(PART_DATADOC));
|
||||
partita.put(PART_DATAPAG, _tpart->get_date(PART_DATAPAG));
|
||||
partita.put(PART_NUMDOC, _tpart->get (PART_NUMDOC));
|
||||
partita.put(PART_DESCR, _tpart->get (PART_DESCR));
|
||||
partita.put(PART_REG, _tpart->get (PART_REG));
|
||||
partita.put(PART_PROTIVA, _tpart->get_long(PART_PROTIVA));
|
||||
partita.put(PART_CODCAUS, _tpart->get (PART_CODCAUS));
|
||||
@ -1534,6 +1535,18 @@ void TRic_tab::ricevi_movSC(TString& key, char uselab)
|
||||
pag.put(PAGSCA_IMPORTO, _tpagsca->get_real(PAGSCA_IMPORTO));
|
||||
pag.put(PAGSCA_IMPORTOVAL, _tpagsca->get_real(PAGSCA_IMPORTOVAL));
|
||||
pag.put(PAGSCA_RITENUTE, _tpagsca->get_real(PAGSCA_RITENUTE));
|
||||
|
||||
pag.put(PAGSCA_TIPOCC, _tpagsca->get(PAGSCA_TIPOCC));
|
||||
pag.put(PAGSCA_GRUPPOC, _tpagsca->get(PAGSCA_GRUPPOC));
|
||||
pag.put(PAGSCA_CONTOC, _tpagsca->get(PAGSCA_CONTOC));
|
||||
pag.put(PAGSCA_SOTTOCONTC, _tpagsca->get(PAGSCA_SOTTOCONTC));
|
||||
|
||||
pag.put(PAGSCA_CODABI, _tpagsca->get(PAGSCA_CODABI));
|
||||
pag.put(PAGSCA_CODCAB, _tpagsca->get(PAGSCA_CODCAB));
|
||||
pag.put(PAGSCA_CODABIPR, _tpagsca->get(PAGSCA_CODABIPR));
|
||||
pag.put(PAGSCA_CODCABPR, _tpagsca->get(PAGSCA_CODCABPR));
|
||||
|
||||
pag.put(PAGSCA_CODAG, _tpagsca->get(PAGSCA_CODAG));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,42 +27,42 @@
|
||||
#include "cglib04.h"
|
||||
#include "cg6700.h"
|
||||
|
||||
HIDDEN const char* err_msg[] = {"*** Data operazione non valida",
|
||||
HIDDEN const char* err_msg[] = {"*** Data operazione non valida", // 0
|
||||
"*** Data operazione non compresa in alcun esercizio",
|
||||
"*** Data competenza non valida",
|
||||
"*** Data competenza non compresa in alcun esercizio",
|
||||
"--- Data competenza incompatibile con data operazione",
|
||||
"*** Data operazione antecedente ad ultima stampa giornale",
|
||||
"*** Data operazione antecedente ad ultima stampa giornale", // 5
|
||||
"--- Data documento non valida",
|
||||
"*** Codice causale non valido o non presente in archivio",
|
||||
"--- Codice pagamento non valido o non presente in tabella",
|
||||
"*** Codice registro IVA non valido o non presente in tabella",
|
||||
"*** Codice cliente/fornitore non valido o non presente in anagrafica",
|
||||
"*** Codice cliente/fornitore non valido o non presente in anagrafica", // 10
|
||||
"--- Data 74 ter non valida",
|
||||
"*** Data operazione antecedente ad ultima stampa registro IVA",
|
||||
"*** Tipo anagrafico C/F errato",
|
||||
"*** Codice anagrafico C/F/Piano Conti errato",
|
||||
"*** Rif. partite saldaconto errato",
|
||||
"*** Rif. partite saldaconto errato", // 15
|
||||
"--- Codice valuta errato",
|
||||
"*** Data cambio non valida",
|
||||
"*** Data pagamento/incasso non valida",
|
||||
"*** Tipo pagamento errato",
|
||||
"*** Segno D/A errato",
|
||||
"*** Segno D/A errato", // 20
|
||||
"*** Cambio mancante",
|
||||
"*** Gruppo/Conto errato",
|
||||
"*** Rif. rata partite saldaconto errato",
|
||||
"*** Data scadenza non valida",
|
||||
"--- Ulteriore classificazione non valida o non presente in archivio",
|
||||
"--- Ulteriore classificazione non valida o non presente in archivio", // 25
|
||||
"*** Importo rata in lire mancante",
|
||||
"*** Importo rata in valuta mancante",
|
||||
"--- Codice Nostra banca non valido o non presente in archivio",
|
||||
"--- Codice Vostra banca non valido o non presente in archivio",
|
||||
"--- Codice agente non valido o non presente in archivio",
|
||||
"--- Codice agente non valido o non presente in archivio", // 30
|
||||
"--- Data sollecito non valida",
|
||||
"*** Rif. fattura errato",
|
||||
"*** Rif. rata fattura errato",
|
||||
"*** In acconto/a saldo errato",
|
||||
"*** Importo inc./pag. in lire mancante",
|
||||
"*** Importo inc./pag. in lire mancante", // 35
|
||||
"*** Importo inc./pag. in valuta mancante",
|
||||
"*** Flag abbuono attivo/passivo errato",
|
||||
"*** Codice valuta errato",
|
||||
@ -148,7 +148,7 @@ public:
|
||||
bool cerca_tipopag_codpag(TString& codpag, int tipopag);
|
||||
bool ulteriore_classificazione(int tipopag, TString& ultclass);
|
||||
bool banca(long abi,long cab);
|
||||
bool agente(TString& codag);
|
||||
bool agente(const char* codag) const;
|
||||
bool record_partite(int nriga);
|
||||
bool record_scadenze(int nriga,int nrata);
|
||||
void descrizione_pagamento(TString& descr,int tipopag,TString& ultclass,TString& codpag);
|
||||
@ -478,7 +478,7 @@ bool TRic_ListaMov::check_archivi(TProgind* pnd)
|
||||
long ditta_ric = get_firm();
|
||||
|
||||
if (!prefix().exist(ditta_ric))
|
||||
return error_box("Rilevati errori gravi negli archivi: procedura interrotta");
|
||||
return error_box("Non esistono gli archivi della ditta %05ld: procedura interrotta", ditta_ric);
|
||||
|
||||
TTransfer_file& tr = trasfer();
|
||||
|
||||
@ -487,11 +487,12 @@ bool TRic_ListaMov::check_archivi(TProgind* pnd)
|
||||
_pathfile = _pathfile << HEADER;
|
||||
|
||||
if (!tr.open(_pathfile))
|
||||
return error_box("Al momento non presenti trasferimenti attivi sulla ditta selezionata");
|
||||
return error_box("Al momento non ci sono trasferimenti attivi sulla ditta selezionata");
|
||||
|
||||
if (!tr.read_control_rec())
|
||||
return error_box("Rilevati errori gravi negli archivi: procedura interrotta");
|
||||
else _record = tr.record();
|
||||
else
|
||||
_record = tr.record();
|
||||
|
||||
TString16 sd = look_sdt();
|
||||
|
||||
@ -1413,17 +1414,15 @@ bool TRic_ListaMov::cerca_codpag(TString& codpag)
|
||||
bool TRic_ListaMov::cerca_tipopag_codpag(TString& codpag, int tipopag)
|
||||
{
|
||||
TTable rpg ("%RPG");
|
||||
TString dep;
|
||||
TString16 dep;
|
||||
|
||||
for (int i = 0; !rpg.eof(); rpg.next(), i++)
|
||||
for (int i = 0; ; i++)
|
||||
{
|
||||
dep.format("%-s%3d", (const char*) codpag, i);
|
||||
|
||||
rpg.zero();
|
||||
rpg.put("CODTAB", dep);
|
||||
if (rpg.read() == NOERR)
|
||||
{
|
||||
int tipo = rpg.get_int("I1");
|
||||
const int tipo = rpg.get_int("I1");
|
||||
if (tipo == tipopag)
|
||||
{
|
||||
_tipopag_pag = tipo;
|
||||
@ -1431,7 +1430,7 @@ bool TRic_ListaMov::cerca_tipopag_codpag(TString& codpag, int tipopag)
|
||||
}
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@ -1472,22 +1471,25 @@ bool TRic_ListaMov::banca(long abi,long cab)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool TRic_ListaMov::agente(TString& codag)
|
||||
bool TRic_ListaMov::agente(const char* codag) const
|
||||
{
|
||||
if (codag == "")
|
||||
return TRUE;
|
||||
|
||||
TTable ag ("%AGE");
|
||||
TString dep;
|
||||
|
||||
dep.format("%5s", (const char*) codag);
|
||||
|
||||
ag.zero();
|
||||
ag.put("CODTAB", dep);
|
||||
if (ag.read() == NOERR)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
static int test_file = -1;
|
||||
|
||||
bool ok = TRUE;
|
||||
if (codag && *codag)
|
||||
{
|
||||
if (test_file < 0)
|
||||
{
|
||||
TDir d; d.get(LF_AGENTI);
|
||||
test_file = fexist(d.filename()); // Controlla l'esistenza del file
|
||||
}
|
||||
if (test_file)
|
||||
{
|
||||
const TRectype& age = cache().get(LF_AGENTI, codag);
|
||||
ok = !age.empty();
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TRic_ListaMov::controlla_scadenze()
|
||||
@ -1564,8 +1566,7 @@ bool TRic_ListaMov::controlla_scadenze()
|
||||
scad.readat(nrec);
|
||||
return TRUE;
|
||||
}
|
||||
cerca_tipopag_codpag(codpag,tipopag);
|
||||
if (tipopag != _tipopag_pag)
|
||||
if (!cerca_tipopag_codpag(codpag,tipopag))
|
||||
{
|
||||
scad.readat(nrec);
|
||||
return TRUE;
|
||||
@ -1756,8 +1757,8 @@ void TRic_ListaMov::stampa_errori_scadenze(int riga)
|
||||
_errore_grave_SC = TRUE;
|
||||
set_row(++riga, "@30g%s", (const char*) err_msg[19]);
|
||||
}
|
||||
cerca_tipopag_codpag(codpag,tipopag);
|
||||
if (tipopag != _tipopag_pag)
|
||||
|
||||
if (!cerca_tipopag_codpag(codpag,tipopag))
|
||||
{
|
||||
_errore_grave_SC = TRUE;
|
||||
set_row(++riga, "@30g%s", (const char*) err_msg[40]);
|
||||
|
@ -736,7 +736,7 @@ bool TVar_mov::setta_campi_maschera_iva(TMask& m)
|
||||
m.enable(F_LOCALITA);
|
||||
m.enable(F_CAPOCC);
|
||||
m.enable(F_PROVOCC);
|
||||
m.enable(F_PROVV);
|
||||
m.disable(F_PROVV); // CM000232
|
||||
m.disable(F_IMPONIBILE);
|
||||
m.disable(F_CODIVA);
|
||||
m.disable(F_IMPOSTA);
|
||||
|
@ -184,7 +184,6 @@ bool TVar_sc::gestione_handler(TMask_field& f, KEY k)
|
||||
rp.sheet_mask().set_handler(110, datascad_handler);
|
||||
rp.sheet_mask().set_handler(120, banca_handler);
|
||||
rp.sheet_mask().set_handler(122, banca_handler);
|
||||
rp.sheet_mask().set_handler(123, codag_handler);
|
||||
rp.sheet_mask().set_handler(124, datasoll_handler);
|
||||
rp.sheet_mask().set_handler(116, importo_handler);
|
||||
rp.sheet_mask().set_handler(117, impval_handler);
|
||||
@ -234,7 +233,6 @@ bool TVar_sc::gestione_handler(TMask_field& f, KEY k)
|
||||
rp.sheet_mask().set_handler(131, passat_handler);
|
||||
rp.sheet_mask().set_handler(127, banca_handler);
|
||||
rp.sheet_mask().set_handler(129, banca_handler);
|
||||
rp.sheet_mask().set_handler(130, codag_handler);
|
||||
rp.sheet_mask().set_handler(124, contropartita_handler);
|
||||
rp.sheet_mask().set_handler(115, ritenute_handler);
|
||||
rp.sheet_mask().set_handler(116, sezione_abb_handler);
|
||||
@ -1512,29 +1510,6 @@ bool TVar_sc::banca_handler(TMask_field& f, KEY k)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TVar_sc::codag_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if ( (k == K_TAB || k == K_ENTER) && f.mask().is_running())
|
||||
{
|
||||
TString dep;
|
||||
TString codag = f.get();
|
||||
|
||||
if (codag.empty()) return TRUE;
|
||||
|
||||
TTable age ("AGE");
|
||||
if (real::is_natural(codag))
|
||||
dep.format("%05s", (const char*) codag);
|
||||
else
|
||||
dep.format("%-5s", (const char*) codag);
|
||||
|
||||
age.zero();
|
||||
age.put("CODTAB", dep);
|
||||
if (age.read() != NOERR)
|
||||
return f.warning_box("Codice agente errato o non presente in tabella");
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TVar_sc::datasoll_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if ( (k == K_TAB || k == K_ENTER) && f.mask().is_running())
|
||||
|
343
cg/cg6804a.uml
343
cg/cg6804a.uml
@ -1,171 +1,172 @@
|
||||
#include "cg6804a.h"
|
||||
|
||||
TOOLBAR "" 0 20 0 2
|
||||
|
||||
BUTTON DLG_OK 9 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 "~Conferma"
|
||||
MESSAGE EXIT,K_ENTER
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 9 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Variazione Movimenti Saldaconto" -1 -1 78 10
|
||||
|
||||
LIST F_TIPOCF 1 12
|
||||
BEGIN
|
||||
PROMPT 1 1 "Tipo conto "
|
||||
ITEM " |Conto"
|
||||
MESSAGE SHOW,1@|RESET,1@|HIDE,2@|HIDE,3@
|
||||
ITEM "C|Cliente"
|
||||
MESSAGE HIDE,1@|SHOW,2@|RESET,2@|HIDE,3@
|
||||
ITEM "F|Fornitore"
|
||||
MESSAGE HIDE,1@|HIDE,2@|SHOW,3@|RESET,3@
|
||||
END
|
||||
|
||||
NUMBER F_GRUPPO 3
|
||||
BEGIN
|
||||
PROMPT 28 1 "Gruppo "
|
||||
USE LF_PCON SELECT CONTO==""
|
||||
INPUT GRUPPO F_GRUPPO
|
||||
DISPLAY "Gruppo" GRUPPO
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_GRUPPO GRUPPO
|
||||
CHECKTYPE NORMAL
|
||||
ADD RUN cg0 -0
|
||||
END
|
||||
|
||||
NUMBER F_CONTO 3
|
||||
BEGIN
|
||||
PROMPT 41 1 "Conto "
|
||||
USE LF_PCON SELECT (CONTO!="")&&(SOTTOCONTO="")
|
||||
INPUT GRUPPO F_GRUPPO
|
||||
INPUT CONTO F_CONTO
|
||||
DISPLAY "Gruppo" GRUPPO
|
||||
DISPLAY "Conto" CONTO
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
DISPLAY "Tipo" TMCF
|
||||
OUTPUT F_TIPOCF TMCF
|
||||
OUTPUT F_GRUPPO GRUPPO
|
||||
OUTPUT F_CONTO CONTO
|
||||
CHECKTYPE NORMAL
|
||||
ADD RUN cg0 -0
|
||||
END
|
||||
|
||||
NUMBER F_SOTTOCONTO 6
|
||||
BEGIN
|
||||
PROMPT 54 1 "Sottoconto "
|
||||
USE LF_PCON SELECT SOTTOCONTO!=""
|
||||
COPY INPUT F_CONTO
|
||||
INPUT SOTTOCONTO F_SOTTOCONTO
|
||||
DISPLAY "Gruppo" GRUPPO
|
||||
DISPLAY "Conto" CONTO
|
||||
DISPLAY "Sottoconto" SOTTOCONTO
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_GRUPPO GRUPPO
|
||||
OUTPUT F_CONTO CONTO
|
||||
OUTPUT F_SOTTOCONTO SOTTOCONTO
|
||||
OUTPUT F_DESCR DESCR
|
||||
ADD RUN cg0 -0
|
||||
GROUP 1
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
NUMBER F_CLIENTE 6
|
||||
BEGIN
|
||||
PROMPT 54 1 "Cliente "
|
||||
USE LF_CLIFO
|
||||
INPUT TIPOCF "C"
|
||||
INPUT CODCF F_CLIENTE
|
||||
DISPLAY "Cliente" CODCF
|
||||
DISPLAY "Descrizione@50" RAGSOC
|
||||
OUTPUT F_CLIENTE CODCF
|
||||
OUTPUT F_DESCRCLI RAGSOC
|
||||
ADD RUN cg0 -1 C
|
||||
GROUP 2
|
||||
CHECKTYPE NORMAL
|
||||
MESSAGE COPY,F_SOTTOCONTO
|
||||
END
|
||||
|
||||
NUMBER F_FORNITORE 6
|
||||
BEGIN
|
||||
PROMPT 54 1 "Fornitore "
|
||||
USE LF_CLIFO
|
||||
INPUT TIPOCF "F"
|
||||
INPUT CODCF F_FORNITORE
|
||||
DISPLAY "Fornitore" CODCF
|
||||
DISPLAY "Descrizione@50" RAGSOC
|
||||
OUTPUT F_FORNITORE CODCF
|
||||
OUTPUT F_DESCRFOR RAGSOC
|
||||
ADD RUN cg0 -1 F
|
||||
GROUP 3
|
||||
CHECKTYPE NORMAL
|
||||
MESSAGE COPY,F_SOTTOCONTO
|
||||
END
|
||||
|
||||
STRING F_DESCR 50 58
|
||||
BEGIN
|
||||
PROMPT 1 2 "Descrizione "
|
||||
USE LF_PCON KEY 2
|
||||
INPUT DESCR F_DESCR
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
DISPLAY "Gruppo" GRUPPO
|
||||
DISPLAY "Conto" CONTO
|
||||
DISPLAY "Sottoconto" SOTTOCONTO
|
||||
COPY OUTPUT F_SOTTOCONTO
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 1
|
||||
ADD RUN cg0 -0
|
||||
END
|
||||
|
||||
STRING F_DESCRCLI 50 58
|
||||
BEGIN
|
||||
PROMPT 1 2 "Descrizione "
|
||||
USE LF_CLIFO KEY 2
|
||||
INPUT TIPOCF "C"
|
||||
INPUT RAGSOC F_DESCRCLI
|
||||
DISPLAY "Gruppo" GRUPPO
|
||||
DISPLAY "Conto" CONTO
|
||||
DISPLAY "Sottoconto" CODCF
|
||||
DISPLAY "Ragione sociale@50" RAGSOC
|
||||
COPY OUTPUT F_CLIENTE
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 2
|
||||
ADD RUN cg0 -1
|
||||
END
|
||||
|
||||
STRING F_DESCRFOR 50 58
|
||||
BEGIN
|
||||
PROMPT 1 2 "Descrizione "
|
||||
USE LF_CLIFO KEY 2
|
||||
INPUT TIPOCF "F"
|
||||
INPUT RAGSOC F_DESCRFOR
|
||||
COPY DISPLAY F_DESCRCLI
|
||||
COPY OUTPUT F_FORNITORE
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 3
|
||||
ADD RUN cg0 -1
|
||||
END
|
||||
|
||||
NUMBER F_ANNO 4
|
||||
BEGIN
|
||||
PROMPT 1 4 "Anno riferimento partita "
|
||||
END
|
||||
|
||||
STRING F_NUMPART 7
|
||||
BEGIN
|
||||
PROMPT 1 5 "Numero riferimento partita "
|
||||
END
|
||||
|
||||
NUMBER F_NRIGA 4
|
||||
BEGIN
|
||||
PROMPT 1 6 "Numero riga riferimento partita "
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
#include "cg6804a.h"
|
||||
|
||||
TOOLBAR "" 0 20 0 2
|
||||
|
||||
BUTTON DLG_OK 9 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 "~Conferma"
|
||||
MESSAGE EXIT,K_ENTER
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 9 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Variazione Movimenti Saldaconto" -1 -1 78 10
|
||||
|
||||
LIST F_TIPOCF 1 12
|
||||
BEGIN
|
||||
PROMPT 1 1 "Tipo conto "
|
||||
ITEM " |Conto"
|
||||
MESSAGE SHOW,1@|RESET,1@|HIDE,2@|HIDE,3@
|
||||
ITEM "C|Cliente"
|
||||
MESSAGE HIDE,1@|SHOW,2@|RESET,2@|HIDE,3@
|
||||
ITEM "F|Fornitore"
|
||||
MESSAGE HIDE,1@|HIDE,2@|SHOW,3@|RESET,3@
|
||||
END
|
||||
|
||||
NUMBER F_GRUPPO 3
|
||||
BEGIN
|
||||
PROMPT 28 1 "Gruppo "
|
||||
USE LF_PCON SELECT CONTO==""
|
||||
INPUT GRUPPO F_GRUPPO
|
||||
DISPLAY "Gruppo" GRUPPO
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_GRUPPO GRUPPO
|
||||
CHECKTYPE NORMAL
|
||||
ADD RUN cg0 -0
|
||||
END
|
||||
|
||||
NUMBER F_CONTO 3
|
||||
BEGIN
|
||||
PROMPT 41 1 "Conto "
|
||||
USE LF_PCON SELECT (CONTO!="")&&(SOTTOCONTO="")
|
||||
INPUT GRUPPO F_GRUPPO
|
||||
INPUT CONTO F_CONTO
|
||||
DISPLAY "Gruppo" GRUPPO
|
||||
DISPLAY "Conto" CONTO
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
DISPLAY "Tipo" TMCF
|
||||
OUTPUT F_TIPOCF TMCF
|
||||
OUTPUT F_GRUPPO GRUPPO
|
||||
OUTPUT F_CONTO CONTO
|
||||
CHECKTYPE NORMAL
|
||||
ADD RUN cg0 -0
|
||||
END
|
||||
|
||||
NUMBER F_SOTTOCONTO 6
|
||||
BEGIN
|
||||
PROMPT 54 1 "Sottoconto "
|
||||
USE LF_PCON SELECT SOTTOCONTO!=""
|
||||
COPY INPUT F_CONTO
|
||||
INPUT SOTTOCONTO F_SOTTOCONTO
|
||||
DISPLAY "Gruppo" GRUPPO
|
||||
DISPLAY "Conto" CONTO
|
||||
DISPLAY "Sottoconto" SOTTOCONTO
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_GRUPPO GRUPPO
|
||||
OUTPUT F_CONTO CONTO
|
||||
OUTPUT F_SOTTOCONTO SOTTOCONTO
|
||||
OUTPUT F_DESCR DESCR
|
||||
ADD RUN cg0 -0
|
||||
GROUP 1
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
NUMBER F_CLIENTE 6
|
||||
BEGIN
|
||||
PROMPT 54 1 "Cliente "
|
||||
USE LF_CLIFO
|
||||
INPUT TIPOCF "C"
|
||||
INPUT CODCF F_CLIENTE
|
||||
DISPLAY "Cliente" CODCF
|
||||
DISPLAY "Descrizione@50" RAGSOC
|
||||
OUTPUT F_CLIENTE CODCF
|
||||
OUTPUT F_DESCRCLI RAGSOC
|
||||
ADD RUN cg0 -1 C
|
||||
GROUP 2
|
||||
CHECKTYPE NORMAL
|
||||
MESSAGE COPY,F_SOTTOCONTO
|
||||
END
|
||||
|
||||
NUMBER F_FORNITORE 6
|
||||
BEGIN
|
||||
PROMPT 54 1 "Fornitore "
|
||||
USE LF_CLIFO
|
||||
INPUT TIPOCF "F"
|
||||
INPUT CODCF F_FORNITORE
|
||||
DISPLAY "Fornitore" CODCF
|
||||
DISPLAY "Descrizione@50" RAGSOC
|
||||
OUTPUT F_FORNITORE CODCF
|
||||
OUTPUT F_DESCRFOR RAGSOC
|
||||
ADD RUN cg0 -1 F
|
||||
GROUP 3
|
||||
CHECKTYPE NORMAL
|
||||
MESSAGE COPY,F_SOTTOCONTO
|
||||
END
|
||||
|
||||
STRING F_DESCR 50 58
|
||||
BEGIN
|
||||
PROMPT 1 2 "Descrizione "
|
||||
USE LF_PCON KEY 2
|
||||
INPUT DESCR F_DESCR
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
DISPLAY "Gruppo" GRUPPO
|
||||
DISPLAY "Conto" CONTO
|
||||
DISPLAY "Sottoconto" SOTTOCONTO
|
||||
COPY OUTPUT F_SOTTOCONTO
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 1
|
||||
ADD RUN cg0 -0
|
||||
END
|
||||
|
||||
STRING F_DESCRCLI 50 58
|
||||
BEGIN
|
||||
PROMPT 1 2 "Descrizione "
|
||||
USE LF_CLIFO KEY 2
|
||||
INPUT TIPOCF "C"
|
||||
INPUT RAGSOC F_DESCRCLI
|
||||
DISPLAY "Gruppo" GRUPPO
|
||||
DISPLAY "Conto" CONTO
|
||||
DISPLAY "Sottoconto" CODCF
|
||||
DISPLAY "Ragione sociale@50" RAGSOC
|
||||
COPY OUTPUT F_CLIENTE
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 2
|
||||
ADD RUN cg0 -1
|
||||
END
|
||||
|
||||
STRING F_DESCRFOR 50 58
|
||||
BEGIN
|
||||
PROMPT 1 2 "Descrizione "
|
||||
USE LF_CLIFO KEY 2
|
||||
INPUT TIPOCF "F"
|
||||
INPUT RAGSOC F_DESCRFOR
|
||||
COPY DISPLAY F_DESCRCLI
|
||||
COPY OUTPUT F_FORNITORE
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 3
|
||||
ADD RUN cg0 -1
|
||||
END
|
||||
|
||||
NUMBER F_ANNO 4
|
||||
BEGIN
|
||||
PROMPT 1 4 "Anno riferimento partita "
|
||||
END
|
||||
|
||||
STRING F_NUMPART 7
|
||||
BEGIN
|
||||
PROMPT 1 5 "Numero riferimento partita "
|
||||
FLAGS "_U"
|
||||
END
|
||||
|
||||
NUMBER F_NRIGA 4
|
||||
BEGIN
|
||||
PROMPT 1 6 "Numero riga riferimento partita "
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
|
@ -1,24 +1,24 @@
|
||||
TOOLBAR "" 0 20 0 2
|
||||
|
||||
BUTTON DLG_OK 8 2
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -14 -1 "~Conferma"
|
||||
MESSAGE EXIT,K_SAVE
|
||||
END
|
||||
|
||||
BUTTON DLG_DELREC 8 2
|
||||
BUTTON DLG_DELREC 10 2
|
||||
BEGIN
|
||||
PROMPT -24 -1 "~Elimina"
|
||||
MESSAGE EXIT,K_DEL
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 8 2
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT -34 -1 ""
|
||||
MESSAGE EXIT,K_ESC
|
||||
END
|
||||
|
||||
BUTTON 100 8 2
|
||||
BUTTON 100 10 2
|
||||
BEGIN
|
||||
PROMPT -44 -1 "~Gestione"
|
||||
END
|
||||
@ -74,7 +74,7 @@ END
|
||||
STRING 107 7
|
||||
BEGIN
|
||||
PROMPT 28 4 "Numero "
|
||||
FLAGS "UD"
|
||||
FLAGS "_UD"
|
||||
END
|
||||
|
||||
NUMBER 108 4
|
||||
|
@ -1,19 +1,19 @@
|
||||
TOOLBAR "" 0 20 0 2
|
||||
|
||||
BUTTON DLG_OK 8 2
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -13 -1 "~Conferma"
|
||||
MESSAGE EXIT,K_SAVE
|
||||
PICTURE BMP_SAVEREC
|
||||
END
|
||||
|
||||
BUTTON DLG_DELREC 8 2
|
||||
BUTTON DLG_DELREC 10 2
|
||||
BEGIN
|
||||
PROMPT -23 -1 "~Elimina"
|
||||
MESSAGE EXIT,K_DEL
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 8 2
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT -33 -1 ""
|
||||
MESSAGE EXIT,K_ESC
|
||||
@ -71,7 +71,7 @@ END
|
||||
STRING 107 7
|
||||
BEGIN
|
||||
PROMPT 22 4 "Numero "
|
||||
FLAGS "UD"
|
||||
FLAGS "_UD"
|
||||
END
|
||||
|
||||
NUMBER 108 4
|
||||
@ -130,9 +130,10 @@ END
|
||||
CURRENCY 116 15
|
||||
BEGIN
|
||||
PROMPT 18 9 ""
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER 117 15 3
|
||||
NUMBER 117 15
|
||||
BEGIN
|
||||
PROMPT 40 9 "Importo in valuta "
|
||||
PICTURE ".3"
|
||||
@ -201,12 +202,12 @@ END
|
||||
STRING 123 5
|
||||
BEGIN
|
||||
PROMPT 1 13 "Codice agente "
|
||||
USE AGE
|
||||
INPUT CODTAB 123
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Denominazione@50" S0
|
||||
OUTPUT 123 CODTAB
|
||||
FLAGS "U"
|
||||
USE LF_AGENTI
|
||||
INPUT CODAGE 123
|
||||
DISPLAY "Codice" CODAGE
|
||||
DISPLAY "Denominazione@50" RAGSOC
|
||||
OUTPUT 123 CODAGE
|
||||
FLAGS "UZ"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
@ -221,4 +222,3 @@ BEGIN
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
TOOLBAR "" 0 20 0 2
|
||||
|
||||
BUTTON DLG_OK 8 2
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -13 -1 "~Conferma"
|
||||
MESSAGE EXIT,K_SAVE
|
||||
END
|
||||
|
||||
BUTTON DLG_DELREC 8 2
|
||||
BUTTON DLG_DELREC 10 2
|
||||
BEGIN
|
||||
PROMPT -23 -1 "~Elimina"
|
||||
MESSAGE EXIT,K_DEL
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 8 2
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT -33 -1 ""
|
||||
MESSAGE EXIT,K_ESC
|
||||
@ -70,7 +70,7 @@ END
|
||||
STRING 107 7
|
||||
BEGIN
|
||||
PROMPT 28 4 "Numero "
|
||||
FLAGS "UD"
|
||||
FLAGS "_UD"
|
||||
END
|
||||
|
||||
NUMBER 110 4
|
||||
@ -103,9 +103,10 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
CURRENCY 113 15
|
||||
NUMBER 113 15
|
||||
BEGIN
|
||||
PROMPT 20 8 ""
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
STRING 114 1
|
||||
@ -117,6 +118,7 @@ END
|
||||
CURRENCY 115 15
|
||||
BEGIN
|
||||
PROMPT 20 9 ""
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
STRING 116 1
|
||||
@ -125,9 +127,10 @@ BEGIN
|
||||
FLAGS "U"
|
||||
END
|
||||
|
||||
CURRENCY 117 15
|
||||
NUMBER 117 15
|
||||
BEGIN
|
||||
PROMPT 20 10 ""
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
STRING 118 1
|
||||
@ -139,6 +142,7 @@ END
|
||||
CURRENCY 119 15
|
||||
BEGIN
|
||||
PROMPT 20 11 ""
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER 120 15
|
||||
@ -248,12 +252,12 @@ END
|
||||
STRING 130 5
|
||||
BEGIN
|
||||
PROMPT 1 16 "Codice agente "
|
||||
USE AGE
|
||||
INPUT CODTAB 130
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Denominazione@50" S0
|
||||
OUTPUT 130 CODTAB
|
||||
FLAGS "U"
|
||||
USE LF_AGENTI
|
||||
INPUT CODAGE 130
|
||||
DISPLAY "Codice" CODAGE
|
||||
DISPLAY "Denominazione@50" RAGSOC
|
||||
OUTPUT 130 CODAGE
|
||||
FLAGS "UZ"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
@ -264,4 +268,3 @@ BEGIN
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
|
@ -1094,7 +1094,9 @@ void TInv_cont::crea_record_controllo(TMask& m)
|
||||
}
|
||||
|
||||
const char* TInv_cont::cerca_provincia(const TString& comcf)
|
||||
{
|
||||
{
|
||||
HIDDEN TString16 TEMP;
|
||||
|
||||
TLocalisamfile comuni(LF_COMUNI);
|
||||
|
||||
comuni.setkey(1);
|
||||
|
@ -1682,7 +1682,7 @@ void TInv_cont::partita2trasfer(TString& record, bool crea_record_riferimento)
|
||||
{
|
||||
if (tipomov == 2) // Note di credito sia contabili che extracontabili
|
||||
{
|
||||
str.format("%2s",(const char*) _cpg_nc);
|
||||
str.format("%-2s", (const char*) _cpg_nc);
|
||||
record.overwrite(str,112);
|
||||
}
|
||||
int tipopag = _tpart->get_int (PART_TIPOPAG);
|
||||
|
419
cg/cginst.ini
419
cg/cginst.ini
@ -1,9 +1,9 @@
|
||||
[cg]
|
||||
Data = 08-05-1998
|
||||
Data = 11-10-1999
|
||||
Descrizione = Contabilita' Generale
|
||||
Dischi = 1
|
||||
Moduli = ba
|
||||
Patch = 25
|
||||
Patch = 640
|
||||
PostProcess = bainst -0 CG
|
||||
PreProcess =
|
||||
Prezzo(1) = 1000,350
|
||||
@ -12,13 +12,13 @@ Prezzo(3) = 200,70
|
||||
Prezzo(5) = 150,60
|
||||
Prezzo(9) = 100,40
|
||||
Prezzo(30) = 50,20
|
||||
Versione = 19980103
|
||||
Versione = 19980105
|
||||
|
||||
[cg0]
|
||||
File(0) = cg00.bmp
|
||||
File(1) = cgarea.men
|
||||
Patch = 25
|
||||
Versione = 19980103
|
||||
Patch = 640
|
||||
Versione = 19980105
|
||||
|
||||
[cg1]
|
||||
File(2) = ab0.exe
|
||||
@ -32,112 +32,83 @@ File(9) = batbcfi.rpt
|
||||
File(10) = batbdel.msk
|
||||
File(11) = batbdpn.msk
|
||||
File(12) = batbdpn.rpt
|
||||
File(13) = batbind.msk
|
||||
File(14) = batbinl.msk
|
||||
File(15) = batbins.msk
|
||||
File(16) = batbivd.msk
|
||||
File(17) = batbivd.rpt
|
||||
File(18) = batblbu.msk
|
||||
File(19) = batblia.msk
|
||||
File(20) = batbpdb.msk
|
||||
File(21) = batbtra.msk
|
||||
File(22) = batbver.msk
|
||||
File(23) = batbver.rpt
|
||||
File(24) = cb0000.exe
|
||||
File(25) = cg01.bmp
|
||||
File(26) = cg0500a.msk
|
||||
File(27) = cg2.exe|X
|
||||
File(28) = cg2100a.msk
|
||||
File(29) = cg2100b.msk
|
||||
File(30) = cg2100c.msk
|
||||
File(31) = cg2100i.msk
|
||||
File(32) = cg2100k.msk
|
||||
File(33) = cg2100n.msk
|
||||
File(34) = cg2100o.msk
|
||||
File(35) = cg2100p.msk
|
||||
File(36) = cg2100s.msk
|
||||
File(37) = cg2200a.msk
|
||||
File(38) = cg3.exe
|
||||
File(39) = cg3100a.msk
|
||||
File(40) = cg3100b.msk
|
||||
File(41) = cg3100c.msk
|
||||
File(42) = cg3200a.msk
|
||||
File(43) = cg3300.frm
|
||||
File(44) = cg3300a.msk
|
||||
File(45) = cg3300b.msk
|
||||
File(46) = cg3300c.msk
|
||||
File(47) = cg3400a.msk
|
||||
File(48) = cg3400b.msk
|
||||
File(49) = cg3500a.msk
|
||||
File(50) = cg3600a.msk
|
||||
File(51) = cg3600b.msk
|
||||
File(52) = cg3700a.msk
|
||||
File(53) = cg4.exe
|
||||
File(54) = cg4100a.msk
|
||||
File(55) = cg4100b.msk
|
||||
File(56) = cg4200a.msk
|
||||
File(57) = cg4300a.msk
|
||||
File(58) = cg4300b.msk
|
||||
File(59) = cg4300c.msk
|
||||
File(60) = cg4400a.msk
|
||||
File(61) = cg4400b.msk
|
||||
File(62) = cg4500a.msk
|
||||
File(63) = cg4500b.msk
|
||||
File(64) = cg4600a.msk
|
||||
File(65) = cg4700a.msk
|
||||
File(66) = cg4800a.msk
|
||||
File(67) = cg4800b.msk
|
||||
File(68) = cg4900a.msk
|
||||
File(69) = cg4900b.msk
|
||||
File(70) = cg4900c.msk
|
||||
File(71) = cg4900d.msk
|
||||
File(72) = cg5.exe
|
||||
File(73) = cg5000a.msk
|
||||
File(74) = cg5100a.msk
|
||||
File(75) = cg5200a.msk
|
||||
File(76) = cg5300a.msk
|
||||
File(77) = cg5400a.msk
|
||||
File(78) = cg5400b.msk
|
||||
File(79) = cg5500a.msk
|
||||
File(80) = cg5500b.msk
|
||||
File(81) = cg5500c.msk
|
||||
File(82) = cg5500d.msk
|
||||
File(83) = cg5600a.msk
|
||||
File(84) = cg6.exe
|
||||
File(85) = cg6400a.msk
|
||||
File(86) = cg6400b.msk
|
||||
File(87) = cg6400c.msk
|
||||
File(88) = cg6600a.msk
|
||||
File(89) = cg6700a.msk
|
||||
File(90) = cg6800a.msk
|
||||
File(91) = cg6800b.msk
|
||||
File(92) = cg6800c.msk
|
||||
File(93) = cg6801a.msk
|
||||
File(94) = cg6802a.msk
|
||||
File(95) = cg6802b.msk
|
||||
File(96) = cg6803a.msk
|
||||
File(97) = cg6804a.msk
|
||||
File(98) = cg6804b.msk
|
||||
File(99) = cg6804c.msk
|
||||
File(100) = cg6804d.msk
|
||||
File(101) = cg6804e.msk
|
||||
File(102) = cg6804f.msk
|
||||
File(103) = cg6804g.msk
|
||||
File(104) = cg6900a.msk
|
||||
File(105) = cg6900b.msk
|
||||
File(106) = cg6903a.msk
|
||||
File(107) = cgaddon.men
|
||||
File(108) = cgprassi.hlp
|
||||
File(109) = cgprassi.men
|
||||
File(110) = cgtrc.ini
|
||||
File(111) = cgtrcpc.ini
|
||||
File(112) = dummy.ldb
|
||||
File(113) = dummy.mdb
|
||||
File(114) = pec.frm
|
||||
File(115) = trrice.exe
|
||||
File(116) = vcopia.exe
|
||||
Patch = 25
|
||||
Versione = 19980103
|
||||
File(13) = batbivd.msk
|
||||
File(14) = batbivd.rpt
|
||||
File(15) = batblbu.msk
|
||||
File(16) = batblia.msk
|
||||
File(17) = batbpdb.msk
|
||||
File(18) = batbver.msk
|
||||
File(19) = batbver.rpt
|
||||
File(20) = cb0000.exe
|
||||
File(21) = cg01.bmp
|
||||
File(22) = cg2.exe
|
||||
File(23) = cg2100a.msk
|
||||
File(24) = cg2100b.msk
|
||||
File(25) = cg2100c.msk
|
||||
File(26) = cg2100i.msk
|
||||
File(27) = cg2100k.msk
|
||||
File(28) = cg2100n.msk
|
||||
File(29) = cg2100o.msk
|
||||
File(30) = cg2100p.msk
|
||||
File(31) = cg2100s.msk
|
||||
File(32) = cg2104a.msk
|
||||
File(33) = cg2200a.msk
|
||||
File(34) = cg3.exe
|
||||
File(35) = cg3100a.msk
|
||||
File(36) = cg3100b.msk
|
||||
File(37) = cg3200a.msk
|
||||
File(38) = cg3300.frm
|
||||
File(39) = cg3300a.msk
|
||||
File(40) = cg3300b.msk
|
||||
File(41) = cg3300c.msk
|
||||
File(42) = cg3400a.msk
|
||||
File(43) = cg3400b.msk
|
||||
File(44) = cg3500a.msk
|
||||
File(45) = cg3600a.msk
|
||||
File(46) = cg3600b.msk
|
||||
File(47) = cg3700a.msk
|
||||
File(48) = cg4.exe
|
||||
File(49) = cg4100a.msk
|
||||
File(50) = cg4100b.msk
|
||||
File(51) = cg4200a.msk
|
||||
File(52) = cg4300a.msk
|
||||
File(53) = cg4300b.msk
|
||||
File(54) = cg4300c.msk
|
||||
File(55) = cg4400a.msk
|
||||
File(56) = cg4400b.msk
|
||||
File(57) = cg4500a.msk
|
||||
File(58) = cg4500b.msk
|
||||
File(59) = cg4600a.msk
|
||||
File(60) = cg4700a.msk
|
||||
File(61) = cg4800a.msk
|
||||
File(62) = cg4800b.msk
|
||||
File(63) = cg4900a.msk
|
||||
File(64) = cg4900b.msk
|
||||
File(65) = cg4900c.msk
|
||||
File(66) = cg4900d.msk
|
||||
File(67) = cg4a00a.msk
|
||||
File(68) = cg5.exe
|
||||
File(69) = cg5000a.msk
|
||||
File(70) = cg5100a.msk
|
||||
File(71) = cg5200a.msk
|
||||
File(72) = cg5300a.msk
|
||||
File(73) = cg5400a.msk
|
||||
File(74) = cg5400b.msk
|
||||
File(75) = cg5500a.msk
|
||||
File(76) = cg5500b.msk
|
||||
File(77) = cg5500c.msk
|
||||
File(78) = cg5500d.msk
|
||||
File(79) = cg5600a.msk
|
||||
File(80) = cg5700a.frm
|
||||
File(81) = cg5700a.msk
|
||||
File(82) = cg5700b.msk
|
||||
File(83) = dummy.ldb
|
||||
File(84) = dummy.mdb
|
||||
File(85) = pec.frm
|
||||
File(86) = trrice.exe
|
||||
File(87) = vcopia.exe
|
||||
Patch = 640
|
||||
Versione = 19980105
|
||||
|
||||
[cg2]
|
||||
File(117) = recdesc\f103.dir
|
||||
@ -168,89 +139,145 @@ Patch = 25
|
||||
Versione = 19980103
|
||||
|
||||
[cg9]
|
||||
File(141) = bastcam.msk
|
||||
File(142) = bastcco.msk
|
||||
File(143) = bastcve.msk
|
||||
File(144) = bastesc.msk
|
||||
File(145) = bastleg.msk
|
||||
File(146) = bastmag.msk
|
||||
File(147) = bastmsp.msk
|
||||
File(148) = bastndo.msk
|
||||
File(149) = bastnot.msk
|
||||
File(150) = bastpor.msk
|
||||
File(151) = bastreg.msk
|
||||
File(152) = bastscc.msk
|
||||
File(153) = bastspp.msk
|
||||
File(154) = basttit.msk
|
||||
File(155) = basttri.msk
|
||||
File(156) = bastums.msk
|
||||
File(157) = bastvet.msk
|
||||
File(158) = bastzon.msk
|
||||
File(159) = batbcam.msk
|
||||
File(160) = batbcam.rpt
|
||||
File(161) = batbcco.msk
|
||||
File(162) = batbcco.rpt
|
||||
File(163) = batbcve.msk
|
||||
File(164) = batbcve.rpt
|
||||
File(165) = batbesc.msk
|
||||
File(166) = batbesc.rpt
|
||||
File(167) = batbleg.msk
|
||||
File(168) = batbleg.rpt
|
||||
File(169) = batbmsp.msk
|
||||
File(170) = batbmsp.rpt
|
||||
File(171) = batbndo.msk
|
||||
File(172) = batbndo.rpt
|
||||
File(173) = batbnot.msk
|
||||
File(174) = batbnot.rpt
|
||||
File(175) = batbpor.msk
|
||||
File(176) = batbpor.rpt
|
||||
File(177) = batbreg.msk
|
||||
File(178) = batbreg.rpt
|
||||
File(179) = batbscc.msk
|
||||
File(180) = batbscc.rpt
|
||||
File(181) = batbspp.msk
|
||||
File(182) = batbspp.rpt
|
||||
File(183) = batbtit.msk
|
||||
File(184) = batbtit.rpt
|
||||
File(185) = batbtri.msk
|
||||
File(186) = batbtri.rpt
|
||||
File(187) = batbums.msk
|
||||
File(188) = batbums.rpt
|
||||
File(189) = batbvet.msk
|
||||
File(190) = batbvet.rpt
|
||||
File(191) = batbzon.msk
|
||||
File(192) = batbzon.rpt
|
||||
File(193) = cg0.exe|X
|
||||
File(194) = cg0100a.msk
|
||||
File(195) = cg0200a.msk
|
||||
File(196) = cg0200b.msk
|
||||
File(197) = cg0300a.msk
|
||||
File(198) = cg0400a.msk
|
||||
File(199) = cg0400b.msk
|
||||
File(200) = cg1.exe
|
||||
File(201) = cg1100a.msk
|
||||
File(202) = cg1200a.msk
|
||||
File(203) = cg1200b.msk
|
||||
File(204) = cg1300a.msk
|
||||
File(205) = cg1300b.msk
|
||||
File(206) = cg1300c.msk
|
||||
File(207) = cg1300d.msk
|
||||
File(208) = cg1400a.msk
|
||||
File(209) = cg1500a.msk
|
||||
File(210) = cg1600a.msk
|
||||
File(211) = cg1700a.msk
|
||||
File(212) = recdesc\f16.dir
|
||||
File(213) = recdesc\f16.trr
|
||||
File(214) = recdesc\f17.dir
|
||||
File(215) = recdesc\f17.trr
|
||||
File(216) = recdesc\f18.dir
|
||||
File(217) = recdesc\f18.trr
|
||||
File(218) = recdesc\f19.dir
|
||||
File(219) = recdesc\f19.trr
|
||||
File(220) = recdesc\f20.dir
|
||||
File(221) = recdesc\f20.trr
|
||||
File(222) = recdesc\f78.dir
|
||||
File(223) = recdesc\f78.trr
|
||||
Patch = 25
|
||||
Versione = 19980103
|
||||
File(88) = bastcam.msk
|
||||
File(89) = bastcco.msk
|
||||
File(90) = bastcve.msk
|
||||
File(91) = bastesc.msk
|
||||
File(92) = bastleg.msk
|
||||
File(93) = bastmsp.msk
|
||||
File(94) = bastndo.msk
|
||||
File(95) = bastnot.msk
|
||||
File(96) = bastpor.msk
|
||||
File(97) = bastreg.msk
|
||||
File(98) = bastscc.msk
|
||||
File(99) = bastspp.msk
|
||||
File(100) = basttit.msk
|
||||
File(101) = basttri.msk
|
||||
File(102) = bastums.msk
|
||||
File(103) = bastvet.msk
|
||||
File(104) = bastzon.msk
|
||||
File(105) = batbcam.msk
|
||||
File(106) = batbcam.rpt
|
||||
File(107) = batbcco.msk
|
||||
File(108) = batbcco.rpt
|
||||
File(109) = batbcve.msk
|
||||
File(110) = batbcve.rpt
|
||||
File(111) = batbesc.msk
|
||||
File(112) = batbesc.rpt
|
||||
File(113) = batbind.msk
|
||||
File(114) = batbinl.msk
|
||||
File(115) = batbins.msk
|
||||
File(116) = batbleg.msk
|
||||
File(117) = batbleg.rpt
|
||||
File(118) = batbmsp.msk
|
||||
File(119) = batbmsp.rpt
|
||||
File(120) = batbndo.msk
|
||||
File(121) = batbndo.rpt
|
||||
File(122) = batbnot.msk
|
||||
File(123) = batbnot.rpt
|
||||
File(124) = batbpor.msk
|
||||
File(125) = batbpor.rpt
|
||||
File(126) = batbreg.msk
|
||||
File(127) = batbreg.rpt
|
||||
File(128) = batbscc.msk
|
||||
File(129) = batbscc.rpt
|
||||
File(130) = batbspp.msk
|
||||
File(131) = batbspp.rpt
|
||||
File(132) = batbtit.msk
|
||||
File(133) = batbtit.rpt
|
||||
File(134) = batbtra.msk
|
||||
File(135) = batbtri.msk
|
||||
File(136) = batbtri.rpt
|
||||
File(137) = batbums.msk
|
||||
File(138) = batbums.rpt
|
||||
File(139) = batbvet.msk
|
||||
File(140) = batbvet.rpt
|
||||
File(141) = batbzon.msk
|
||||
File(142) = batbzon.rpt
|
||||
File(143) = cg0.exe
|
||||
File(144) = cg0100a.msk
|
||||
File(145) = cg0200a.msk
|
||||
File(146) = cg0200b.msk
|
||||
File(147) = cg0400a.msk
|
||||
File(148) = cg0400b.msk
|
||||
File(149) = cg0500a.msk
|
||||
File(150) = cg1.exe
|
||||
File(151) = cg1100a.msk
|
||||
File(152) = cg1200a.msk
|
||||
File(153) = cg1200b.msk
|
||||
File(154) = cg1300a.msk
|
||||
File(155) = cg1300b.msk
|
||||
File(156) = cg1300c.msk
|
||||
File(157) = cg1300d.msk
|
||||
File(158) = cg1300e.msk
|
||||
File(159) = cg1400a.msk
|
||||
File(160) = cg1500a.msk
|
||||
File(161) = cg1600a.msk
|
||||
File(162) = cg1700a.msk
|
||||
File(163) = cg6.exe
|
||||
File(164) = cg6400a.msk
|
||||
File(165) = cg6400b.msk
|
||||
File(166) = cg6400c.msk
|
||||
File(167) = cg6600a.msk
|
||||
File(168) = cg6700a.msk
|
||||
File(169) = cg6800a.msk
|
||||
File(170) = cg6800b.msk
|
||||
File(171) = cg6800c.msk
|
||||
File(172) = cg6801a.msk
|
||||
File(173) = cg6802a.msk
|
||||
File(174) = cg6802b.msk
|
||||
File(175) = cg6803a.msk
|
||||
File(176) = cg6804a.msk
|
||||
File(177) = cg6804b.msk
|
||||
File(178) = cg6804c.msk
|
||||
File(179) = cg6804d.msk
|
||||
File(180) = cg6804e.msk
|
||||
File(181) = cg6804f.msk
|
||||
File(182) = cg6804g.msk
|
||||
File(183) = cg6900a.msk
|
||||
File(184) = cg6900b.msk
|
||||
File(185) = cg6903a.msk
|
||||
File(186) = cgaddon.men
|
||||
File(187) = cgprassi.hlp
|
||||
File(188) = cgprassi.men
|
||||
File(189) = cgtrc.ini
|
||||
File(190) = cgtrcpc.ini
|
||||
File(191) = recdesc\f103.dir
|
||||
File(192) = recdesc\f103.trr
|
||||
File(193) = recdesc\f104.dir
|
||||
File(194) = recdesc\f104.trr
|
||||
File(195) = recdesc\f16.dir
|
||||
File(196) = recdesc\f16.trr
|
||||
File(197) = recdesc\f17.dir
|
||||
File(198) = recdesc\f17.trr
|
||||
File(199) = recdesc\f18.dir
|
||||
File(200) = recdesc\f18.trr
|
||||
File(201) = recdesc\f19.dir
|
||||
File(202) = recdesc\f19.trr
|
||||
File(203) = recdesc\f20.dir
|
||||
File(204) = recdesc\f20.trr
|
||||
File(205) = recdesc\f21.dir
|
||||
File(206) = recdesc\f21.trr
|
||||
File(207) = recdesc\f22.dir
|
||||
File(208) = recdesc\f22.trr
|
||||
File(209) = recdesc\f23.dir
|
||||
File(210) = recdesc\f23.trr
|
||||
File(211) = recdesc\f24.dir
|
||||
File(212) = recdesc\f24.trr
|
||||
File(213) = recdesc\f25.dir
|
||||
File(214) = recdesc\f25.trr
|
||||
File(215) = recdesc\f26.dir
|
||||
File(216) = recdesc\f26.trr
|
||||
File(217) = recdesc\f27.dir
|
||||
File(218) = recdesc\f27.trr
|
||||
File(219) = recdesc\f28.dir
|
||||
File(220) = recdesc\f28.trr
|
||||
File(221) = recdesc\f29.dir
|
||||
File(222) = recdesc\f29.trr
|
||||
File(223) = recdesc\f30.dir
|
||||
File(224) = recdesc\f30.trr
|
||||
File(225) = recdesc\f78.dir
|
||||
File(226) = recdesc\f78.trr
|
||||
Patch = 640
|
||||
Versione = 19980105
|
||||
|
||||
|
@ -459,11 +459,12 @@ TCodiceIVA::TCodiceIVA(const char* cod) : TRectype(LF_TABCOM)
|
||||
|
||||
bool TCodiceIVA::read(const char* cod)
|
||||
{
|
||||
if (cod == NULL)
|
||||
cod = "";
|
||||
if (cod && *cod)
|
||||
*this = cache().get("%IVA", cod);
|
||||
else
|
||||
zero();
|
||||
|
||||
*this = cache().get("%IVA", cod);
|
||||
return !this->empty();
|
||||
return !empty();
|
||||
}
|
||||
|
||||
real TCodiceIVA::imposta(const real & imponibile, int ndec, const char * codval) const
|
||||
|
@ -827,19 +827,25 @@ void TSaldo_agg::registra()
|
||||
curr.put(PCN_GRUPPO, tcon.gruppo());
|
||||
curr.put(PCN_CONTO, tcon.conto());
|
||||
const int err = pcon.read();
|
||||
CHECK(err == NOERR, "Impossibile stabilire indicatore di bilancio");
|
||||
const int indbil = curr.get_int(PCN_INDBIL);
|
||||
if (indbil == 1 || indbil == 2 || indbil == 5)
|
||||
if (err == NOERR)
|
||||
{
|
||||
TSaldo saldo;
|
||||
si = saldo.saldofin_esprec(annoes, tcon.gruppo(), tcon.conto(), tcon.sottoconto());
|
||||
if (si < ZERO)
|
||||
const int indbil = curr.get_int(PCN_INDBIL);
|
||||
if (indbil == 1 || indbil == 2 || indbil == 5)
|
||||
{
|
||||
flag_salini = 'A'; si = -si;
|
||||
}
|
||||
else
|
||||
flag_salini = 'D';
|
||||
}
|
||||
TSaldo saldo;
|
||||
si = saldo.saldofin_esprec(annoes, tcon.gruppo(), tcon.conto(), tcon.sottoconto());
|
||||
if (si < ZERO)
|
||||
{
|
||||
flag_salini = 'A'; si = -si;
|
||||
}
|
||||
else
|
||||
flag_salini = 'D';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Era errore fatale
|
||||
}
|
||||
}
|
||||
|
||||
TImporto sf(flag_salini, si);
|
||||
|
586
cg/cglib04.cpp
586
cg/cglib04.cpp
@ -12,6 +12,7 @@
|
||||
|
||||
#include "cglib01.h"
|
||||
#include "cglib04.h"
|
||||
#include "cgsaldac.h"
|
||||
|
||||
const int size = 256; //Lunghezza del record del TRASFER
|
||||
const int sizeH = 1024; //Lunghezza del record dell'HEADER
|
||||
@ -23,6 +24,7 @@ const int RIC_SIZE = 512;
|
||||
|
||||
HIDDEN char _isam_string[RIC_SIZE];
|
||||
HIDDEN char __dep[LEN_REC_HEAD];
|
||||
HIDDEN TString TEMP;
|
||||
|
||||
//ritorna falso se la causale non e' significativa
|
||||
bool look_causale (const char* codcaus)
|
||||
@ -92,9 +94,9 @@ HIDDEN void __getfieldbuff(int l, int t, const char* recin, char *s)
|
||||
if (*s)
|
||||
{
|
||||
if (t == _datefld)
|
||||
{
|
||||
{
|
||||
const TDate dt(atol(s));
|
||||
strcpy(s, dt.string(full));
|
||||
strcpy(s, dt.string(full));
|
||||
} else
|
||||
if (t == _boolfld)
|
||||
{
|
||||
@ -316,7 +318,8 @@ const char* TTransfer_file::record() const
|
||||
return __dep;
|
||||
}
|
||||
|
||||
TTransfer_file::TTransfer_file(char scelta)
|
||||
TTransfer_file::TTransfer_file(char scelta)
|
||||
: _comuni2(LF_COMUNI, 2)
|
||||
{
|
||||
_trasfer = NULL;
|
||||
_tot_rec = 0L;
|
||||
@ -328,7 +331,10 @@ TTransfer_file::TTransfer_file(char scelta)
|
||||
if (scelta == 'S')
|
||||
_trc.leggi_modulo(tracciato_AS);
|
||||
else
|
||||
_trc.leggi_modulo(tracciato_PC);
|
||||
if (scelta == 'P')
|
||||
_trc.leggi_modulo(tracciato_PC);
|
||||
|
||||
_tpcon = NULL;
|
||||
|
||||
_npoccas = 0L;
|
||||
}
|
||||
@ -802,17 +808,12 @@ else
|
||||
{
|
||||
TToken_string * data = (TToken_string *) _trc.objptr(key);
|
||||
|
||||
pos_campo = data->get_int(2);
|
||||
// NB
|
||||
// Nel tracciato parto da 1 (per compatibilita'),
|
||||
// la fseek() conta da 0
|
||||
pos_campo -= 1;
|
||||
|
||||
pos_campo = data->get_int(2) - 1;
|
||||
if (seek)
|
||||
{
|
||||
//pos_campo -= 1;
|
||||
fseek(_trasfer,pos_campo,SEEK_CUR);
|
||||
}
|
||||
}
|
||||
return pos_campo;
|
||||
}
|
||||
@ -957,8 +958,8 @@ char TTransfer_file::TipoConto(int g, int c)
|
||||
|
||||
if (g != 0 && c != 0)
|
||||
{
|
||||
/*
|
||||
TLocalisamfile pcon (LF_PCON);
|
||||
|
||||
pcon.setkey(1);
|
||||
pcon.zero();
|
||||
pcon.put(PCN_GRUPPO, g);
|
||||
@ -966,7 +967,12 @@ char TTransfer_file::TipoConto(int g, int c)
|
||||
pcon.put(PCN_SOTTOCONTO, 0l);
|
||||
if (pcon.read() == NOERR)
|
||||
tipo = pcon.get_char(PCN_TMCF);
|
||||
else // Se non lo trova sul piano dei conti standard, prova su quello temporaneo
|
||||
*/
|
||||
TString16 gcs; gcs.format("%d|%d|0", g, c);
|
||||
tipo = cache().get(LF_PCON, gcs).get_char(PCN_TMCF);
|
||||
|
||||
if (tipo <= ' ') // Se non lo trova sul piano dei conti standard, prova su quello temporaneo
|
||||
{
|
||||
if (_tpcon != NULL) // Valido solo se si sta trasferendo anche il piano dei conti
|
||||
{
|
||||
_tpcon->put(PCN_GRUPPO, g);
|
||||
@ -975,9 +981,10 @@ char TTransfer_file::TipoConto(int g, int c)
|
||||
if (_tpcon->read() == NOERR)
|
||||
tipo = _tpcon->get_char(PCN_TMCF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tipo == '\0')
|
||||
if (tipo < ' ')
|
||||
tipo = ' ';
|
||||
return tipo;
|
||||
}
|
||||
@ -1024,7 +1031,7 @@ const char* TTransfer_file::numero_civico(TString& indirizzo)
|
||||
const char* TTransfer_file::cerca_comune_cap(TString& field, const TString& localita)
|
||||
{
|
||||
TLocalisamfile comuni (LF_COMUNI);
|
||||
TString cap = field;
|
||||
TString16 cap = field;
|
||||
bool trovato = FALSE;
|
||||
bool prima_volta = TRUE;
|
||||
|
||||
@ -1072,9 +1079,9 @@ const char* TTransfer_file::cerca_comune_cap(TString& field, const TString& loca
|
||||
}
|
||||
|
||||
const char* TTransfer_file::cerca_cap_comune(const TString& localita)
|
||||
{
|
||||
{
|
||||
/*
|
||||
TLocalisamfile comuni (LF_COMUNI);
|
||||
|
||||
comuni.setkey(2);
|
||||
comuni.zero();
|
||||
comuni.put(COM_DENCOM, localita);
|
||||
@ -1082,14 +1089,16 @@ const char* TTransfer_file::cerca_cap_comune(const TString& localita)
|
||||
TEMP = comuni.get(COM_CAPCOM);
|
||||
else
|
||||
TEMP = "";
|
||||
|
||||
return TEMP;
|
||||
*/
|
||||
const TRectype& rec = _comuni2.get(localita);
|
||||
return rec.get(COM_CAPCOM);
|
||||
}
|
||||
|
||||
const char* TTransfer_file::cerca_comune_den(TString& field)
|
||||
const char* TTransfer_file::cerca_comune_den(const TString& field)
|
||||
{
|
||||
/*
|
||||
TLocalisamfile comuni (LF_COMUNI);
|
||||
|
||||
comuni.setkey(2);
|
||||
comuni.zero();
|
||||
comuni.put(COM_DENCOM, field);
|
||||
@ -1097,13 +1106,16 @@ const char* TTransfer_file::cerca_comune_den(TString& field)
|
||||
TEMP = comuni.get(COM_COM);
|
||||
else
|
||||
TEMP = "";
|
||||
|
||||
return TEMP;
|
||||
*/
|
||||
const TRectype& rec = _comuni2.get(field);
|
||||
return rec.get(COM_COM);
|
||||
}
|
||||
|
||||
void TTransfer_file::write_tmp_tabelle(TString& record, bool create)
|
||||
{
|
||||
TString sigla,key,str,numero,comune;
|
||||
TString16 sigla,key,cap;
|
||||
|
||||
int numfield = 2; //Per le tabelle il primo campo della mappa non e' significativo
|
||||
//ai fini del trasferimento (flag di record gia trasferito).
|
||||
TMappa_trc& trc = mappa();
|
||||
@ -1112,9 +1124,6 @@ void TTransfer_file::write_tmp_tabelle(TString& record, bool create)
|
||||
int logicnum;
|
||||
int campi_righe = 0;
|
||||
int num_riga = 1;
|
||||
TToken_string data;
|
||||
TString cap = "";
|
||||
TString tmp_path;
|
||||
|
||||
sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
@ -1133,10 +1142,11 @@ void TTransfer_file::write_tmp_tabelle(TString& record, bool create)
|
||||
{
|
||||
_prog->addstatus(1);
|
||||
trasfer_data_tab(*file, *dep);
|
||||
delete file;
|
||||
delete dep;
|
||||
delete file; file = NULL;
|
||||
delete dep; dep = NULL;
|
||||
}
|
||||
|
||||
TFilename tmp_path;
|
||||
if (sigla == "W1")
|
||||
{
|
||||
if (logicnum == LF_CAUSALI)
|
||||
@ -1164,16 +1174,13 @@ void TTransfer_file::write_tmp_tabelle(TString& record, bool create)
|
||||
|
||||
if (campi_righe == CAMPI_RCAUS)
|
||||
{
|
||||
TString16 gruppo(dep->get("GRUPPO"));
|
||||
//
|
||||
// scarta le righe non significative
|
||||
// -------------------- NB -----------------------
|
||||
// supponiamo il GRUPPO INDISPENSABILE !!!!!!!!!!!!!
|
||||
//
|
||||
if (gruppo.not_empty())
|
||||
if (dep->get("GRUPPO").not_empty())
|
||||
{
|
||||
dep->put("NRIGA", num_riga++);
|
||||
|
||||
trasfer_data_tab(*file, *dep);
|
||||
}
|
||||
else
|
||||
@ -1185,7 +1192,7 @@ void TTransfer_file::write_tmp_tabelle(TString& record, bool create)
|
||||
|
||||
int from = trc.from(key);
|
||||
int to = trc.to(key);
|
||||
TString fname = trc.field_name(key);
|
||||
TString16 fname = trc.field_name(key);
|
||||
int flag = trc.flag(key);
|
||||
TString field = record.sub(from-1,to);
|
||||
|
||||
@ -1271,8 +1278,8 @@ void TTransfer_file::write_tmp_tabelle(TString& record, bool create)
|
||||
//alfanumerico di 4 trattato con il flag Z. Dunque in ricezione se si tratta
|
||||
//di un numero va riempito con degli 0. Se si tratta di un alfa va allineato a destra.
|
||||
if (fname == "CODPAG")
|
||||
{
|
||||
TString f = field;
|
||||
{
|
||||
TString16 f = field;
|
||||
//if (real::is_natural(f))
|
||||
// field.format("%04s", (const char*) f);
|
||||
//else
|
||||
@ -1284,7 +1291,7 @@ void TTransfer_file::write_tmp_tabelle(TString& record, bool create)
|
||||
field = field.rtrim();
|
||||
if (field != "")
|
||||
{
|
||||
numero = numero_civico(field);
|
||||
const char* numero = numero_civico(field);
|
||||
dep->put(CLI_CIVCF, (const char*)numero);
|
||||
}
|
||||
}
|
||||
@ -1299,7 +1306,7 @@ void TTransfer_file::write_tmp_tabelle(TString& record, bool create)
|
||||
|
||||
if (fname == "LOCALITACF")
|
||||
{
|
||||
comune = "";
|
||||
TString80 comune;
|
||||
|
||||
if (cap.not_empty())
|
||||
comune = cerca_comune_cap(cap,field);
|
||||
@ -1559,191 +1566,191 @@ void TTransfer_file::write_tmp_movPN(TString& record)
|
||||
int solo_sezionale = atoi(record.mid(218,1));
|
||||
if (solo_sezionale != 1)
|
||||
{
|
||||
sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
|
||||
if (trc.is_key((const char *) key))
|
||||
{
|
||||
int logicnum_p = 0;
|
||||
|
||||
_numreg = atol(record.sub(2,8));
|
||||
sigla = record.mid(0,2);
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
|
||||
if (_numreg == _numreg_p)
|
||||
{
|
||||
numfield = fnrmov;
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
}
|
||||
|
||||
_annoes = annoes_datacomp(record,datacomp);
|
||||
_numreg_p = _numreg;
|
||||
|
||||
do
|
||||
{
|
||||
logicnum = trc.logicnum(key);
|
||||
|
||||
if (logicnum != logicnum_p)
|
||||
{
|
||||
if (logicnum_p)
|
||||
{
|
||||
trasfer_data_mov(*file, *dep);
|
||||
delete file;
|
||||
delete dep;
|
||||
}
|
||||
|
||||
if (sigla == "Z1")
|
||||
{
|
||||
if (logicnum == LF_MOV)
|
||||
tmp_path = _tmpmov;
|
||||
else
|
||||
tmp_path = _tmprmov;
|
||||
}
|
||||
if (trc.is_key((const char *) key))
|
||||
{
|
||||
int logicnum_p = 0;
|
||||
|
||||
_numreg = atol(record.sub(2,8));
|
||||
|
||||
file = new TIsamtempfile(logicnum, tmp_path, create);
|
||||
dep = new TRectype (logicnum);
|
||||
dep->zero();
|
||||
|
||||
logicnum_p = logicnum;
|
||||
}
|
||||
|
||||
int from = trc.from(key);
|
||||
int to = trc.to(key);
|
||||
TString fname = trc.field_name(key);
|
||||
TString field = record.sub(from-1,to);
|
||||
int flag = trc.flag(key);
|
||||
int dec = trc.flag_bis(key);
|
||||
|
||||
TRecfield campo (*dep,fname);
|
||||
if (campo.type() == _realfld)
|
||||
negativo(field);
|
||||
|
||||
if (flag == 3)
|
||||
{
|
||||
if (dec > 0)
|
||||
decimali(field,dec);
|
||||
|
||||
real appoggio (field);
|
||||
field = appoggio.string();
|
||||
if (_numreg == _numreg_p)
|
||||
{
|
||||
numfield = fnrmov;
|
||||
key.format("%2s%d", (const char*)sigla,numfield);
|
||||
}
|
||||
|
||||
if (logicnum == LF_MOV)
|
||||
{
|
||||
if (fname == "REG")
|
||||
{
|
||||
if (real::is_natural(field))
|
||||
field.format("%03s", (const char*) field);
|
||||
else
|
||||
field.format("%-3s", (const char*) field);
|
||||
}
|
||||
|
||||
//Il codice pagamento su AS400 e' un alfanumerico di due, mentre su PC e' un
|
||||
//alfanumerico di 4 trattato con il flag Z. Dunque in ricezione se si tratta
|
||||
//di un numero va riempito con degli 0. Se si tratta di un alfa va allineato a destra.
|
||||
if (fname == "CODPAG")
|
||||
{
|
||||
TString f = field;
|
||||
//if (real::is_natural(f))
|
||||
// field.format("%04s", (const char*) f);
|
||||
//else
|
||||
field.format("%-4s", (const char*) f);
|
||||
}
|
||||
|
||||
if (fname == "CODCAUS")
|
||||
_annoes = annoes_datacomp(record,datacomp);
|
||||
_numreg_p = _numreg;
|
||||
|
||||
do
|
||||
{
|
||||
logicnum = trc.logicnum(key);
|
||||
|
||||
if (logicnum != logicnum_p)
|
||||
{
|
||||
if (field == "000")
|
||||
field = "";
|
||||
|
||||
int nr = atoi(record.sub(8,10));
|
||||
if (nr == 1)
|
||||
if (logicnum_p)
|
||||
{
|
||||
TString descr = record.sub(44,74);
|
||||
dep->put(RMV_DESCR, descr); // Descrizione della prima riga riportata sulla testata
|
||||
trasfer_data_mov(*file, *dep);
|
||||
delete file;
|
||||
delete dep;
|
||||
}
|
||||
}
|
||||
|
||||
if (sigla == "Z1")
|
||||
{
|
||||
if (logicnum == LF_MOV)
|
||||
tmp_path = _tmpmov;
|
||||
else
|
||||
tmp_path = _tmprmov;
|
||||
}
|
||||
|
||||
file = new TIsamtempfile(logicnum, tmp_path, create);
|
||||
dep = new TRectype (logicnum);
|
||||
dep->zero();
|
||||
|
||||
logicnum_p = logicnum;
|
||||
}
|
||||
|
||||
if (fname == "TIPODOC")
|
||||
tipodoc = field;
|
||||
}
|
||||
|
||||
if (fname == "IMPORTO")
|
||||
{
|
||||
real imp = real::ita2eng(field);
|
||||
importo = imp;
|
||||
}
|
||||
|
||||
if (logicnum == LF_RMOV)
|
||||
{
|
||||
if (fname == "NUMRIG")
|
||||
{
|
||||
int nriga = atoi(field);
|
||||
field.format("%3d", nriga);
|
||||
}
|
||||
if (fname == "GRUPPO" || fname == "GRUPPOC")
|
||||
{
|
||||
int gruppo = atoi(field);
|
||||
field.format("%3d", gruppo);
|
||||
}
|
||||
if (fname == "CONTO" || fname == "CONTOC")
|
||||
{
|
||||
int conto = atoi(field);
|
||||
field.format("%3d", conto);
|
||||
}
|
||||
if (fname == "SOTTOCONTO" || fname == "SOTTOCONTC")
|
||||
{
|
||||
long sottoc = atol(field);
|
||||
field.format("%6ld", sottoc);
|
||||
int from = trc.from(key);
|
||||
int to = trc.to(key);
|
||||
TString fname = trc.field_name(key);
|
||||
TString field = record.sub(from-1,to);
|
||||
int flag = trc.flag(key);
|
||||
int dec = trc.flag_bis(key);
|
||||
|
||||
TRecfield campo (*dep,fname);
|
||||
if (campo.type() == _realfld)
|
||||
negativo(field);
|
||||
|
||||
if (flag == 3)
|
||||
{
|
||||
if (dec > 0)
|
||||
decimali(field,dec);
|
||||
|
||||
real appoggio (field);
|
||||
field = appoggio.string();
|
||||
}
|
||||
}
|
||||
|
||||
if (logicnum == LF_MOV && (fname == "NUMREG" || flag == 2) )
|
||||
{
|
||||
if (fname == "NUMREG")
|
||||
|
||||
if (logicnum == LF_MOV)
|
||||
{
|
||||
dep->put(MOV_ANNOES, _annoes);
|
||||
dep->put(MOV_NUMREG, _numreg);
|
||||
dep->put(MOV_DATAREG, _datareg);
|
||||
dep->put(MOV_DATACOMP, datacomp);
|
||||
int annoiva = _datareg.year();
|
||||
dep->put(MOV_ANNOIVA, annoiva);
|
||||
}
|
||||
if (flag == 2)
|
||||
{
|
||||
TString f = converti(field,FALSE);
|
||||
dep->put(fname,f);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (logicnum == LF_RMOV && (fname == "NUMREG" || fname == "NUMRIG") )
|
||||
{
|
||||
if (fname == "NUMREG")
|
||||
{
|
||||
dep->put(RMV_ANNOES, _annoes);
|
||||
dep->put(RMV_NUMREG, _numreg);
|
||||
if (fname == "REG")
|
||||
{
|
||||
if (real::is_natural(field))
|
||||
field.format("%03s", (const char*) field);
|
||||
else
|
||||
field.format("%-3s", (const char*) field);
|
||||
}
|
||||
|
||||
//Il codice pagamento su AS400 e' un alfanumerico di due, mentre su PC e' un
|
||||
//alfanumerico di 4 trattato con il flag Z. Dunque in ricezione se si tratta
|
||||
//di un numero va riempito con degli 0. Se si tratta di un alfa va allineato a destra.
|
||||
if (fname == "CODPAG")
|
||||
{
|
||||
TString f = field;
|
||||
//if (real::is_natural(f))
|
||||
// field.format("%04s", (const char*) f);
|
||||
//else
|
||||
field.format("%-4s", (const char*) f);
|
||||
}
|
||||
|
||||
|
||||
if (fname == "CODCAUS")
|
||||
{
|
||||
if (field == "000")
|
||||
field = "";
|
||||
|
||||
int nr = atoi(record.sub(8,10));
|
||||
if (nr == 1)
|
||||
{
|
||||
TString descr = record.sub(44,74);
|
||||
dep->put(RMV_DESCR, descr); // Descrizione della prima riga riportata sulla testata
|
||||
}
|
||||
}
|
||||
|
||||
if (fname == "TIPODOC")
|
||||
tipodoc = field;
|
||||
}
|
||||
|
||||
if (fname == "IMPORTO")
|
||||
{
|
||||
real imp = real::ita2eng(field);
|
||||
importo = imp;
|
||||
}
|
||||
|
||||
if (logicnum == LF_RMOV)
|
||||
{
|
||||
if (fname == "NUMRIG")
|
||||
{
|
||||
dep->put(RMV_NUMRIG, field);
|
||||
dep->put(RMV_DATAREG, _datareg);
|
||||
}
|
||||
int nriga = atoi(field);
|
||||
field.format("%3d", nriga);
|
||||
}
|
||||
if (fname == "GRUPPO" || fname == "GRUPPOC")
|
||||
{
|
||||
int gruppo = atoi(field);
|
||||
field.format("%3d", gruppo);
|
||||
}
|
||||
if (fname == "CONTO" || fname == "CONTOC")
|
||||
{
|
||||
int conto = atoi(field);
|
||||
field.format("%3d", conto);
|
||||
}
|
||||
if (fname == "SOTTOCONTO" || fname == "SOTTOCONTC")
|
||||
{
|
||||
long sottoc = atol(field);
|
||||
field.format("%6ld", sottoc);
|
||||
}
|
||||
}
|
||||
else
|
||||
dep->put(fname, field);
|
||||
|
||||
numfield++;
|
||||
key.format("%2s%d", (const char*) sigla,numfield);
|
||||
}
|
||||
while (trc.is_key((const char*) key));
|
||||
_prog->addstatus(1);
|
||||
|
||||
if (importo != ZERO)
|
||||
trasfer_data_mov(*file, *dep);
|
||||
|
||||
if (create)
|
||||
create = FALSE; // I files (mov e rmov) vanno creati la prima volta che si tenta di scrivere un record su di essi
|
||||
|
||||
delete file;
|
||||
delete dep;
|
||||
} // if (trc.is_key((const char*) key))
|
||||
if (logicnum == LF_MOV && (fname == "NUMREG" || flag == 2) )
|
||||
{
|
||||
if (fname == "NUMREG")
|
||||
{
|
||||
dep->put(MOV_ANNOES, _annoes);
|
||||
dep->put(MOV_NUMREG, _numreg);
|
||||
dep->put(MOV_DATAREG, _datareg);
|
||||
dep->put(MOV_DATACOMP, datacomp);
|
||||
int annoiva = _datareg.year();
|
||||
dep->put(MOV_ANNOIVA, annoiva);
|
||||
}
|
||||
if (flag == 2)
|
||||
{
|
||||
TString f = converti(field,FALSE);
|
||||
dep->put(fname,f);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (logicnum == LF_RMOV && (fname == "NUMREG" || fname == "NUMRIG") )
|
||||
{
|
||||
if (fname == "NUMREG")
|
||||
{
|
||||
dep->put(RMV_ANNOES, _annoes);
|
||||
dep->put(RMV_NUMREG, _numreg);
|
||||
}
|
||||
|
||||
if (fname == "NUMRIG")
|
||||
{
|
||||
dep->put(RMV_NUMRIG, field);
|
||||
dep->put(RMV_DATAREG, _datareg);
|
||||
}
|
||||
}
|
||||
else
|
||||
dep->put(fname, field);
|
||||
|
||||
numfield++;
|
||||
key.format("%2s%d", (const char*) sigla,numfield);
|
||||
}
|
||||
while (trc.is_key((const char*) key));
|
||||
_prog->addstatus(1);
|
||||
|
||||
if (importo != ZERO)
|
||||
trasfer_data_mov(*file, *dep);
|
||||
|
||||
if (create)
|
||||
create = FALSE; // I files (mov e rmov) vanno creati la prima volta che si tenta di scrivere un record su di essi
|
||||
|
||||
delete file;
|
||||
delete dep;
|
||||
} // if (trc.is_key((const char*) key))
|
||||
} // if (solo_sezionale != 1)
|
||||
}
|
||||
|
||||
@ -1790,19 +1797,6 @@ int TTransfer_file::cerca_annoes(long numreg,TString& tipodoc)
|
||||
return anno;
|
||||
}
|
||||
|
||||
/*void TTransfer_file::ricerca_comune(const TString& com)
|
||||
{
|
||||
TLocalisamfile comuni (LF_COMUNI);
|
||||
|
||||
comuni.setkey(2);
|
||||
comuni.zero();
|
||||
comuni.put(COM_DENCOM, com);
|
||||
if (comuni.read() == NOERR)
|
||||
_cod_com = comuni.get(COM_COM);
|
||||
else
|
||||
_cod_com = "";
|
||||
}*/
|
||||
|
||||
const char* TTransfer_file::scrivi_occasionali(const TString& record)
|
||||
{
|
||||
TString cfpi,ragsoc,ind,com,cap,app,civ;
|
||||
@ -2106,7 +2100,7 @@ void TTransfer_file::write_tmp_movSC(TString& record)
|
||||
_numrigSC = atoi(record.sub(8,10));
|
||||
TString app (record.sub(26,28));
|
||||
int anno = atoi(app);
|
||||
if (anno <= 25)
|
||||
if (anno < 80)
|
||||
annostr = "20";
|
||||
else
|
||||
annostr = "19";
|
||||
@ -2300,7 +2294,7 @@ void TTransfer_file::partita(TString& record)
|
||||
{
|
||||
TString app = field;
|
||||
int anno = atoi(field);
|
||||
if (anno <= 25)
|
||||
if (anno < 80)
|
||||
{
|
||||
field = "20";
|
||||
field << app;
|
||||
@ -2480,7 +2474,7 @@ void TTransfer_file::scadenza(TString& record)
|
||||
{
|
||||
TString app = field;
|
||||
int anno = atoi(field);
|
||||
if (anno <= 25)
|
||||
if (anno < 80)
|
||||
{
|
||||
field = "20";
|
||||
field << app;
|
||||
@ -2552,7 +2546,7 @@ void TTransfer_file::scadenza(TString& record)
|
||||
_SCAnumrig = atoi(record.sub(8,10));
|
||||
TString app (record.sub(26,28));
|
||||
int anno = atoi(app);
|
||||
if (anno <= 25)
|
||||
if (anno < 80)
|
||||
annostr = "20";
|
||||
else
|
||||
annostr = "19";
|
||||
@ -2869,7 +2863,7 @@ void TTransfer_file::pagsca(TString& record)
|
||||
{
|
||||
TString app = field;
|
||||
int anno = atoi(field);
|
||||
if (anno <= 25)
|
||||
if (anno < 80)
|
||||
{
|
||||
field = "20";
|
||||
field << app;
|
||||
@ -3054,12 +3048,11 @@ void TTransfer_file::new_key(TString& key, int tipo, TString& buffer)
|
||||
//in un file con record odinati in modo sequenziale
|
||||
bool TTransfer_file::ordina_trasfer(const char* orig)
|
||||
{
|
||||
const char* const rflag = "rb";
|
||||
|
||||
open(orig);
|
||||
|
||||
FILE* i = fopen(orig, rflag);
|
||||
if (!i) return error_box("Impossibile leggere il file %s", orig);
|
||||
FILE* i = fopen(orig, "rb");
|
||||
if (i == NULL)
|
||||
return error_box("Impossibile leggere il file %s", orig);
|
||||
|
||||
long dim_t = determina_dimensione(i); //Determina la dimensione del trasfer
|
||||
|
||||
@ -3068,19 +3061,21 @@ bool TTransfer_file::ordina_trasfer(const char* orig)
|
||||
|
||||
int pos = 0;
|
||||
|
||||
TString80 tmptab = "%";
|
||||
|
||||
TFilename tmptab = "%";
|
||||
const long ditta = prefix().get_codditta();
|
||||
tmptab << firm2dir(ditta);
|
||||
tmptab << "\\" << TEMP_TAB;
|
||||
tmptab << firm2dir(ditta);
|
||||
tmptab.add(TEMP_TAB);
|
||||
_ttab = new TIsamtempfile(LF_TAB, tmptab, TRUE);
|
||||
|
||||
long cicli = dim_t / size;
|
||||
TProgind prog (cicli,"Ordinamento file TRASFER in corso\nPrego attendere",FALSE, TRUE, 1);
|
||||
TProgind prog (cicli,"Ordinamento file TRASFER in corso\nPrego attendere",FALSE, TRUE);
|
||||
|
||||
bool ok = TRUE;
|
||||
bool ok = TRUE;
|
||||
|
||||
TRic_recfield recf (_ttab->curr(), "S0", 0, size);
|
||||
|
||||
TString80 key;
|
||||
TString16 app;
|
||||
|
||||
while (ok)
|
||||
{
|
||||
@ -3100,14 +3095,13 @@ bool TTransfer_file::ordina_trasfer(const char* orig)
|
||||
|
||||
prog.addstatus(1);
|
||||
|
||||
TString key = buffer.mid(0,15);
|
||||
key = buffer.mid(0,15);
|
||||
|
||||
if (buffer.mid(0,2) == "B1")
|
||||
{
|
||||
TString app; // Modifica del 06-09-96 relativa all'allineamento
|
||||
app = buffer.mid(28,7);
|
||||
app = buffer.mid(28,7); // Modifica del 06-09-96 relativa all'allineamento
|
||||
app.trim(); // del numero di riferimento partita che per i file
|
||||
app.format("%-7s", (const char*) app); // temporanei deve essere sempre a sinistra
|
||||
app.format("%-7s", (const char*)app); // temporanei deve essere sempre a sinistra
|
||||
buffer.overwrite(app,28); // indipendentemente da quello che c'e' sul trasfer
|
||||
|
||||
int tipomov = atoi(buffer.mid(37,1));
|
||||
@ -3119,10 +3113,12 @@ bool TTransfer_file::ordina_trasfer(const char* orig)
|
||||
recf = buffer;
|
||||
|
||||
int rc = _ttab->write();
|
||||
|
||||
/*
|
||||
#ifdef DBG
|
||||
if (rc != NOERR) error_box("ERRORE. Per qualche motivo la write e' fallita!!! Errore n. %d",rc );
|
||||
if (rc != NOERR)
|
||||
error_box("ERRORE. Per qualche motivo la write e' fallita!!! Errore n. %d",rc );
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
|
||||
fclose(i);
|
||||
@ -3139,7 +3135,7 @@ bool TTransfer_file::fcopytemp(const char* orig, const char* dest)
|
||||
bool is_delete = FALSE, tpcon_valid = FALSE;
|
||||
|
||||
const char* const rflag = "rb";
|
||||
const char* const wflag = "ab";
|
||||
const char* wflag = "ab";
|
||||
|
||||
TLocalisamfile tabella(LF_TAB);
|
||||
|
||||
@ -3159,17 +3155,17 @@ bool TTransfer_file::fcopytemp(const char* orig, const char* dest)
|
||||
{
|
||||
_tmpcaus = "%";
|
||||
_tmpcaus << path();
|
||||
_tmpcaus << "\\" << TEMP_CAUS;
|
||||
_tmpcaus << SLASH << TEMP_CAUS;
|
||||
_tmprcaus = "%";
|
||||
_tmprcaus << path();
|
||||
_tmprcaus << "\\" << TEMP_RCAUS;
|
||||
_tmprcaus << SLASH << TEMP_RCAUS;
|
||||
nrec_cau = atol(nrec.mid(pos*6,6));
|
||||
}
|
||||
if ( (pos = sigle.find('A')) >= 0)
|
||||
{
|
||||
_tmpclifo = "%";
|
||||
_tmpclifo << path();
|
||||
_tmpclifo << "\\" << TEMP_CLIFO;
|
||||
_tmpclifo << SLASH << TEMP_CLIFO;
|
||||
nrec_clifo = atol(nrec.mid(pos*6,6));
|
||||
}
|
||||
if ( (pos = sigle.find('P')) >= 0)
|
||||
@ -3178,17 +3174,17 @@ bool TTransfer_file::fcopytemp(const char* orig, const char* dest)
|
||||
|
||||
_tmppcon = "%";
|
||||
_tmppcon << path();
|
||||
_tmppcon << "\\" << TEMP_PCON;
|
||||
_tmppcon << SLASH << TEMP_PCON;
|
||||
nrec_pcon = atol(nrec.mid(pos*6,6));
|
||||
}
|
||||
if ( (pos = sigle.find('Z')) >= 0)
|
||||
{
|
||||
_tmpmov = "%";
|
||||
_tmpmov << path();
|
||||
_tmpmov << "\\" << TEMP_MOV;
|
||||
_tmpmov << SLASH << TEMP_MOV;
|
||||
_tmprmov = "%";
|
||||
_tmprmov << path();
|
||||
_tmprmov << "\\" << TEMP_RMOV;
|
||||
_tmprmov << SLASH << TEMP_RMOV;
|
||||
nrec_mov = atol(nrec.mid(pos*6,6));
|
||||
}
|
||||
if ( (pos = sigle.find('U')) >= 0)
|
||||
@ -3196,18 +3192,16 @@ bool TTransfer_file::fcopytemp(const char* orig, const char* dest)
|
||||
is_delete = TRUE;
|
||||
|
||||
_tmpmov = "%";
|
||||
_tmpmov << path();
|
||||
_tmpmov << "\\" << TEMP_MOV;
|
||||
_tmpmov << path();
|
||||
_tmpmov.add(TEMP_MOV);
|
||||
_tmprmoviva = "%";
|
||||
_tmprmoviva << path();
|
||||
_tmprmoviva << "\\" << TEMP_RMOVIVA;
|
||||
_tmprmoviva.add(TEMP_RMOVIVA);
|
||||
nrec_moviva = atol(nrec.mid(pos*6,6));
|
||||
|
||||
TString80 tmpocc = "%";
|
||||
|
||||
const long ditta = prefix().get_codditta();
|
||||
tmpocc << firm2dir(ditta);
|
||||
tmpocc << "\\" << TEMP_OCC;
|
||||
TFilename tmpocc = "%";
|
||||
tmpocc << path();
|
||||
tmpocc.add(TEMP_OCC);
|
||||
_toccas = new TIsamtempfile(LF_OCCAS, tmpocc, TRUE);
|
||||
}
|
||||
if ( (pos = sigle.find('B')) >= 0)
|
||||
@ -3261,12 +3255,19 @@ bool TTransfer_file::fcopytemp(const char* orig, const char* dest)
|
||||
scrivi_SC(nrec_salda);
|
||||
|
||||
if (is_delete)
|
||||
{
|
||||
delete _toccas;
|
||||
_toccas = NULL;
|
||||
}
|
||||
|
||||
if (tpcon_valid)
|
||||
{
|
||||
delete _tpcon;
|
||||
_tpcon = NULL;
|
||||
}
|
||||
|
||||
delete _ttab;
|
||||
_ttab = NULL;
|
||||
|
||||
return ok;
|
||||
}
|
||||
@ -3361,7 +3362,7 @@ void TTransfer_file::scrivi_header(const char* dest, const char* wflag)
|
||||
app1.insert(str,15);
|
||||
app1.insert("0",70);
|
||||
int pre = atoi(app1.sub(78,80));
|
||||
if (pre <= 25)
|
||||
if (pre < 80)
|
||||
app1.insert("20",78);
|
||||
else
|
||||
app1.insert("19",78);
|
||||
@ -3603,20 +3604,19 @@ bool TTransfer_file::fcopytemp_PC(const char* orig, const char* dest)
|
||||
{
|
||||
_tmpmov = "%";
|
||||
_tmpmov << path();
|
||||
_tmpmov << "\\" << TEMP_MOV;
|
||||
_tmpmov.add(TEMP_MOV);
|
||||
_tmprmov = "%";
|
||||
_tmprmov << path();
|
||||
_tmprmov << "\\" << TEMP_RMOV;
|
||||
_tmprmov.add(TEMP_RMOV);
|
||||
_tmov = new TIsamtempfile(LF_MOV, _tmpmov, TRUE);
|
||||
_depmov = new TRectype (LF_MOV);
|
||||
_trmov = new TIsamtempfile(LF_RMOV, _tmprmov, TRUE);
|
||||
_deprmov = new TRectype (LF_RMOV);
|
||||
|
||||
TString80 tmpocc = "%";
|
||||
|
||||
TFilename tmpocc = "%";
|
||||
const long ditta = prefix().get_codditta();
|
||||
tmpocc << firm2dir(ditta);
|
||||
tmpocc << "\\" << TEMP_OCC;
|
||||
tmpocc.add(TEMP_OCC);
|
||||
_toccas = new TIsamtempfile(LF_OCCAS, tmpocc, TRUE);
|
||||
_depoccas = new TRectype (LF_OCCAS);
|
||||
}
|
||||
@ -3626,10 +3626,10 @@ bool TTransfer_file::fcopytemp_PC(const char* orig, const char* dest)
|
||||
|
||||
_tmpmov = "%";
|
||||
_tmpmov << path();
|
||||
_tmpmov << "\\" << TEMP_MOV;
|
||||
_tmpmov.add(TEMP_MOV);
|
||||
_tmprmoviva = "%";
|
||||
_tmprmoviva << path();
|
||||
_tmprmoviva << "\\" << TEMP_RMOVIVA;
|
||||
_tmprmoviva << path();
|
||||
_tmprmoviva.add(TEMP_RMOVIVA);
|
||||
_triva = new TIsamtempfile(LF_RMOVIVA, _tmprmoviva, TRUE);
|
||||
_depriva = new TRectype (LF_RMOVIVA);
|
||||
}
|
||||
@ -3638,14 +3638,14 @@ bool TTransfer_file::fcopytemp_PC(const char* orig, const char* dest)
|
||||
TTrec trec;
|
||||
|
||||
_tmppart = "%";
|
||||
_tmppart << path();
|
||||
_tmppart << "\\" << TEMP_PART;
|
||||
_tmppart << path();
|
||||
_tmppart.add(TEMP_PART);
|
||||
_tmpscad = "%";
|
||||
_tmpscad << path();
|
||||
_tmpscad << "\\" << TEMP_SCAD;
|
||||
_tmpscad.add(TEMP_SCAD);
|
||||
_tmppagsca = "%";
|
||||
_tmppagsca << path();
|
||||
_tmppagsca << "\\" << TEMP_PAGSCA;
|
||||
_tmppagsca << path();
|
||||
_tmppagsca.add(TEMP_PAGSCA);
|
||||
|
||||
_tpart = new TIsamtempfile(LF_PARTITE, _tmppart, TRUE);
|
||||
//_deppart = new TRectype (LF_PARTITE);
|
||||
@ -3668,7 +3668,7 @@ bool TTransfer_file::fcopytemp_PC(const char* orig, const char* dest)
|
||||
|
||||
long dim_t = determina_dimensione(i); //Determina la dimensione del trasfer
|
||||
long cicli = dim_t / size;
|
||||
_prog = new TProgind (cicli,"Elaborazione file TRASFER in corso\nPrego attendere",FALSE, TRUE, 1);
|
||||
_prog = new TProgind (cicli,"Elaborazione file TRASFER in corso\nPrego attendere",FALSE, TRUE);
|
||||
|
||||
while (ok)
|
||||
{
|
||||
@ -4522,7 +4522,8 @@ void TTransfer_file::write_righe_contabili(TString& record)
|
||||
_trmov->zero();
|
||||
_trmov->curr() = *_deprmov;
|
||||
_trmov->write();
|
||||
}
|
||||
}
|
||||
|
||||
_prog->addstatus(1);
|
||||
}
|
||||
|
||||
@ -4661,6 +4662,15 @@ void TTransfer_file::write_righe_IVA(TString& record)
|
||||
_prog->addstatus(1);
|
||||
}
|
||||
|
||||
static void align_numpart(char tipocf, TString& numpart)
|
||||
{
|
||||
const char all = TPartita::allineamento_richiesto(tipocf);
|
||||
if (all == 'R')
|
||||
numpart.right_just(7);
|
||||
else
|
||||
numpart.trim();
|
||||
}
|
||||
|
||||
void TTransfer_file::write_partite(TString& record)
|
||||
{
|
||||
TString sigla,key;
|
||||
@ -4803,6 +4813,12 @@ void TTransfer_file::write_partite(TString& record)
|
||||
field.format("%6ld", sottoc);
|
||||
}
|
||||
|
||||
if (fname == PART_NUMPART)
|
||||
{
|
||||
const char tipocf = _deppart->get_char(PART_TIPOCF);
|
||||
align_numpart(tipocf, field);
|
||||
}
|
||||
|
||||
if (flag == 2)
|
||||
{
|
||||
TString f = converti(field,TRUE);
|
||||
@ -4922,6 +4938,12 @@ void TTransfer_file::write_scadenze(TString& record)
|
||||
field.format("%6ld", app);
|
||||
}
|
||||
|
||||
if (fname == SCAD_NUMPART)
|
||||
{
|
||||
const char tipocf = _deppart->get_char(SCAD_TIPOCF);
|
||||
align_numpart(tipocf, field);
|
||||
}
|
||||
|
||||
if (flag == 2)
|
||||
{
|
||||
TString f = converti(field,TRUE);
|
||||
@ -5057,6 +5079,12 @@ void TTransfer_file::write_pagsca(TString& record)
|
||||
{
|
||||
int app = atoi(field);
|
||||
field.format("%4d", app);
|
||||
}
|
||||
|
||||
if (fname == PAGSCA_NUMPART)
|
||||
{
|
||||
const char tipocf = _deppart->get_char(PAGSCA_TIPOC);
|
||||
align_numpart(tipocf, field);
|
||||
}
|
||||
|
||||
if (flag == 2)
|
||||
@ -5199,19 +5227,20 @@ int pack(bool vis, int num, TString& name)
|
||||
|
||||
const char* converti (TString& data_AS400,bool anno_di_quattro)
|
||||
{
|
||||
if (data_AS400 == "000000" || data_AS400 == "00000000") return TEMP = "";
|
||||
if (data_AS400 == "000000" || data_AS400 == "00000000")
|
||||
return TEMP = "";
|
||||
|
||||
if (anno_di_quattro)
|
||||
{
|
||||
TEMP = data_AS400.mid(6,2);
|
||||
TEMP << "-" << data_AS400.mid(4,2);
|
||||
TEMP << "-" << data_AS400.mid(0,4);
|
||||
TEMP << '-' << data_AS400.mid(4,2);
|
||||
TEMP << '-' << data_AS400.mid(0,4);
|
||||
}
|
||||
else
|
||||
{
|
||||
TEMP = data_AS400.mid(4,2);
|
||||
TEMP << "-" << data_AS400.mid(2,2);
|
||||
TEMP << "-" << "19" << data_AS400.mid(0,2);
|
||||
TEMP << "-" << (data_AS400[0] < '8' ? "20" : "19") << data_AS400.mid(0,2);
|
||||
}
|
||||
return TEMP;
|
||||
}
|
||||
@ -5235,15 +5264,6 @@ const char* riconverti (TString& data_PC,bool anno_di_quattro)
|
||||
|
||||
void TTransfer_file::datafine_esprec(const int aep, TDate& datacomp)
|
||||
{
|
||||
/* Guy: Oink!
|
||||
TTable esc("ESC");
|
||||
for (int err = esc.first(); err == NOERR; err = esc.next())
|
||||
{
|
||||
const anno = esc.get_int("CODTAB");
|
||||
if (anno == aep)
|
||||
datacomp = esc.get("D1");
|
||||
}
|
||||
*/
|
||||
TEsercizi_contabili esc;
|
||||
if (esc.exist(aep))
|
||||
datacomp = esc[aep].fine();
|
||||
|
18
cg/cglib04.h
18
cg/cglib04.h
@ -3,8 +3,8 @@
|
||||
#ifndef __CGLIB04_H
|
||||
#define __CGLIB04_H
|
||||
|
||||
#ifndef __ISAM_H
|
||||
#include <isam.h>
|
||||
#ifndef __RECARRAY_H
|
||||
#include <recarray.h>
|
||||
#endif
|
||||
|
||||
#ifndef __PROGIND_H
|
||||
@ -42,8 +42,7 @@ class TProgind;
|
||||
|
||||
static unsigned char _tabella[10] = {0x7d,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52};
|
||||
|
||||
HIDDEN TString80 TEMP;
|
||||
HIDDEN TString16 HEADER = "\\header";
|
||||
#define HEADER "\\header"
|
||||
|
||||
const int CAMPI_RCAUS = 6;
|
||||
|
||||
@ -128,7 +127,7 @@ class TTransfer_file
|
||||
TString _curfile;
|
||||
TString256 _control_rec_t; // Buffer per il record di controllo del trasfer
|
||||
TFixed_string* _control_rec; // Buffer per il record di controllo
|
||||
// TString _control_rec; // Buffer per il record di controllo dell'header
|
||||
// TString _control_rec; // Buffer per il record di controllo dell'header
|
||||
TString256 _record; // Buffer per il record corrente
|
||||
TProgind* _prog;
|
||||
TIsamtempfile* _tcaus;
|
||||
@ -154,9 +153,10 @@ class TTransfer_file
|
||||
//TRectype* _deppart;
|
||||
//TRectype* _depscad;
|
||||
//TRectype* _deppagsca;
|
||||
TExtrectype* _deppart;
|
||||
TExtrectype* _depscad;
|
||||
TExtrectype* _deppagsca;
|
||||
TExtrectype* _deppart;
|
||||
TExtrectype* _depscad;
|
||||
TExtrectype* _deppagsca;
|
||||
TRecord_cache _comuni2;
|
||||
|
||||
TRecnotype _rec; //Serve alle funzioni per istanziare un Isamtempfile localmente
|
||||
|
||||
@ -269,7 +269,7 @@ public:
|
||||
|
||||
const char* cerca_comune_cap(TString& field,const TString& localita);
|
||||
const char* cerca_cap_comune(const TString& localita);
|
||||
const char* cerca_comune_den(TString& field);
|
||||
const char* cerca_comune_den(const TString& field);
|
||||
void datafine_esprec(const int aep, TDate& datacomp);
|
||||
|
||||
bool fcopytemp(const char* orig, const char* dest);
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include <currency.h>
|
||||
#include <msksheet.h>
|
||||
#include <recarray.h>
|
||||
#include <tabutil.h>
|
||||
|
@ -5,6 +5,10 @@
|
||||
#include <date.h>
|
||||
#endif
|
||||
|
||||
#ifndef __CURRENCY_H
|
||||
#include <currency.h>
|
||||
#endif
|
||||
|
||||
#ifndef __REAL_H
|
||||
#include <real.h>
|
||||
#endif
|
||||
@ -223,6 +227,13 @@ public:
|
||||
void set_total_valuta(const real& ib, const real& im, const real& sp, const real& cambio,
|
||||
const real& ibl, const real& iml, const real& spl, const char* codval);
|
||||
|
||||
void set_total(const TCurrency& ib, const TCurrency& im, const TCurrency& sp)
|
||||
{ set_total(ib.get_num(), im.get_num(), sp.get_num());}
|
||||
void set_total_valuta(const TCurrency& ib, const TCurrency& im, const TCurrency& sp,
|
||||
const TCurrency& ibl, const TCurrency& iml, const TCurrency& spl)
|
||||
{ set_total_valuta(ib.get_num(), im.get_num(), sp.get_num(), ib.get_base_change(),
|
||||
ibl.get_num(), iml.get_num(), spl.get_num(), ib.get_value());}
|
||||
|
||||
// istanzia uno sheet field come diobue comanda
|
||||
void set_sheet(TSheet_field& sf, int sscad = -1);
|
||||
|
||||
|
@ -105,8 +105,8 @@ Flags = ""
|
||||
Item_01 = "Parametri liquidazione", "cg5 -3", "F"
|
||||
Item_02 = "Liquidazione", "cg4 -2", "F"
|
||||
Item_03 = "Visualizzazione liquidazione", "cg5 -5", "F"
|
||||
Item_04 = "Riepilogo progressivi", "cg0 -3", "F"
|
||||
Item_05 = "Prospetto dich. IVA periodica", "cg5 -7", "F"
|
||||
Item_04 = "Prospetto dich. IVA periodica", "cg5 -7", "F"
|
||||
Item_05 = "Riepilogo progressivi", "cg0 -3", "F"
|
||||
Item_06 = "Stampa registri", "cg4 -3", "F"
|
||||
Item_07 = "Liste fatture", [PRASSICG_026]
|
||||
Item_08 = "Gestione acconti IVA", [PRASSICG_027]
|
||||
|
@ -947,7 +947,7 @@ char TPartita::allineamento_richiesto(char tipocf)
|
||||
{
|
||||
case 'C': all = _cli_align; break;
|
||||
case 'F': all = _for_align; break;
|
||||
default : all = 'L'; break;
|
||||
default : all = (_cli_align == _for_align) ? _cli_align : 'L'; break;
|
||||
}
|
||||
return all;
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
20
|
||||
0
|
||||
$clifo|0|0|636|0|Clienti/Fornitori|NCF||
|
||||
$clifo|0|0|639|0|Clienti/Fornitori|NCF||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user