Patch level : 4.0 649

Ricompilazione Demo : [ ]
Commento            :

Riportata la versione 3.1 patch 848


git-svn-id: svn://10.65.10.50/trunk@14997 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2007-03-07 10:23:42 +00:00
parent d17fef3cf2
commit 5e9ba7c01e
12 changed files with 169 additions and 175 deletions

View File

@ -947,7 +947,7 @@ void TMenu_application::reload_images()
const TString& TMenu_application::ask_user_password()
{
TString utente = user();
TString16 utente = user();
#ifndef _DEMO_
// Disabilita le voci di personalizzazione

View File

@ -35,15 +35,16 @@
HIDDEN int compare_version(const char* v1, int p1, const char* v2, int p2)
{
TString16 ver1(v1), ver2(v2);
ver1.trim();
if (ver1.len() == 4)
ver1.insert((v1[0] == '9') ? "19" : "20", 0);
ver2.trim();
if (ver2.len() == 4)
ver2.insert((v2[0] == '9') ? "19" : "20", 0);
int res = ver1.compare(ver2, -1, true);
ver1.trim();
ver1.ltrim(ver1.len() == 4 ? 2 : 4);
ver2.trim();
ver2.ltrim(ver2.len() == 4 ? 2 : 4);
int res = ver1.compare(ver2, -1, TRUE);
if (res == 0)
res = p1 - p2;
return res;
@ -338,7 +339,8 @@ bool TInstaller_mask::autoload()
}
if (!ininame.exist())
{
bool httpresult;
bool httpresult = http_isredirected_server(http_server, http_path);
TFilename remote_ini = http_path;
remote_ini << TInstall_ini::default_name();
{
@ -496,7 +498,8 @@ bool TInstaller_mask::autoload()
const TString16 patchversion = ini.get("Versione");
const int patchlevel = ini.get_int("Patch");
TToken_string& row = mask_rows.row(r);
if (patchversion == row.get(C_RELEASE) // se le versioni corrispondono ...
const TString16 release(row.get(C_RELEASE));
if (patchversion.mid(4) == release.mid(4) // se le versioni corrispondono ...
&& patchlevel > row.get_int(C_PATCH)) // ..e il patchlevel è superiore
{
TString16 patch; patch.format("%03d", patchlevel); //aggiunge zeri per avere 3 cifre sempre
@ -506,6 +509,8 @@ bool TInstaller_mask::autoload()
row.add(row.get(C_PATCH), C_BASEPATCH); // memorizza patch del modulo
}
row.add(patch, C_PATCH); // aggiorna il patchlevel mostrato per il modulo
if (release < patchversion)
row.add(patchversion, C_RELEASE);
}
}
else
@ -822,8 +827,7 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
if (is_a_patch)
msg << TR(" della patch ") << patchlevel ;
msg << TR(" del modulo '") << module << TR("' in corso...");
xvtil_statbar_set(msg);
TProgind pi(dischi, msg, false, true);
TFilename tempdir; tempdir.tempdir();
// File tottale dei vari sotto-zip
@ -907,8 +911,7 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
{
msg.cut(0);
msg << TR("Aggiornamento del modulo '") << module << TR("' in corso...");
xvtil_statbar_set(msg);
pi.set_text(msg);
ok = move_module(module, *ini, true);
if (ok)
@ -1111,8 +1114,8 @@ bool TInstaller_mask::install_patches(const TString& module, const TString& last
const TString16 patchmodule = ininame.mid(pos-6, 2);
TConfig ini(ininame, patchmodule);
const int patchlevel = ini.get_int("Patch");
const char * patchversion = ini.get("Versione");
if (ok && lastrelease == patchversion // installa solo le patch della stessa ver..
const TString16 patchversion = ini.get("Versione");
if (ok && lastrelease.mid(4) == patchversion.mid(4) // installa solo le patch della stessa ver..
&& (only_newer ? lastpatch < patchlevel : lastpatch <= patchlevel)) // ... e patch superiore o uguale (reinstalla l'ultima patch)
ok = install(module, patchlevel);
}
@ -1196,24 +1199,35 @@ void TInstaller_mask::install_selection()
bool is_patch = row->get_char(C_ISPATCH) == 'X';
bool has_patch = row->get_char(C_ISPATCH) == '+';
const int cmp = compare_version(oldver, oldpatch, newver, newpatch);
//versione e patch coincidono
if (cmp == 0)
ok = noyes_box(FR("Si desidera reinstallare la versione %s.%d del modulo '%s' ?"), (const char*)newver, newpatch, (const char*)modulo);
//ci sono ANCHE i pacchi
if (!is_patch && cmp > 0)
{
TString256 msg;
msg.format(FR("Si desidera ritornare alla versione %s.%d del modulo '%s' ?\nAttenzione: non e' garantito il corretto\nfunzionamento di tutti i programmi!"), (const char*)newver, newpatch, (const char*)modulo);
ok = noyes_box(msg);
}
//ci sono SOLO patch da installare
if (ok && is_patch)
{
// installo le patch solo se esiste già un modulo installato della stessa versione
if (!oldver.blank() )
{
if (oldver != newver)
if (compare_version(oldver, 0, newver, 0)) //controlla SOLO la versione indipendentemente dall'anno!
ok = error_box(FR("Il modulo '%s' installato ha versione %s:\nimpossibile installare le patch della versione %s"),(const char *)modulo,(const char *)oldver,(const char *)newver);
} else
ok =false;//error_box("Impossibile installare le patch perche' il modulo '%s' non e' installato",(const char *)modulo);
}
if (newpatch < oldpatch)
{
TString256 msg;
msg.format(FR("Si desidera ritornare alla patch %s.%d del modulo '%s' ?\nAttenzione: non e' garantito il corretto\nfunzionamento di tutti i programmi!"), (const char*)newver, newpatch, (const char*)modulo);
ok = noyes_box(msg);
} }
if (ok)
{
if (has_patch)

View File

@ -1,6 +1,7 @@
#include <config.h>
#include <currency.h>
#include <prefix.h>
#include <defmask.h>
#include <printer.h>
#include <recarray.h>
#include <tabapp.h>
@ -22,6 +23,7 @@
#define TAB_BANCHE "%BAN"
#define TAB_CAMBI "CAM"
#define TAB_DELEGHE "%DEL"
#define TAB_DET "%DET"
#define TAB_IVDIRETTIVA "%IVD"
#define TAB_REGISTRI "REG"
#define TAB_VALUTE "%VAL"
@ -199,6 +201,13 @@ void TGeneric_table_app::init_modify_mode(TMask& m)
{
load_rec_in_disabled_fields(m);
}
if (n == TAB_DET)
{
const bool prot = get_relation()->curr().get_bool(FPC);
m.enable(DLG_SAVEREC, !prot);
m.enable(DLG_DELREC, !prot);
}
}
void TGeneric_table_app::init_query_mode(TMask& m)

View File

@ -29,19 +29,73 @@ TMask_print_table::TMask_print_table(const char * name)
f.enable_check();
}
///////////////////////////////////////////////////////////
// TTable_recordset
///////////////////////////////////////////////////////////
class TTable_recordset : public TISAM_recordset
{
TMask * _mask;
protected:
void set_custom_filter(TCursor& cursor) const;
public:
TTable_recordset(const char* use, TMask * mask) : TISAM_recordset(use), _mask(mask) { }
virtual ~TTable_recordset() { }
};
void TTable_recordset::set_custom_filter(TCursor& cursor) const
{
CHECK(_mask, "NULL selection mask");
TRectype from(cursor.curr()); from.zero();
TRectype to(from);
for (int i = _mask->fields() - 1; i >= 0; i--)
{
TMask_field& f = _mask->fld(i);
const TString & val = f.get();
if (val.full())
{
const TFieldref * ref = f.field();
if (ref != NULL && ref->ok())
{
const bool is_final = f.in_group(2);
ref->write(val, is_final ? to : from);
}
}
}
cursor.setregion(from, to);
}
///////////////////////////////////////////////////////////
// TTable_report
///////////////////////////////////////////////////////////
class TTable_report : public TReport
{
TMask * _mask;
protected:
virtual bool set_recordset(const TString& query);
public:
virtual bool use_mask() { return false;}
TTable_report() {}
TTable_report(TMask * mask) : _mask(mask) {}
virtual ~TTable_report() {}
};
bool TTable_report::set_recordset(const TString& query)
{
return TReport::set_recordset(new TTable_recordset(query, _mask));
}
///////////////////////////////////////////////////////////
// TTable_reporter
///////////////////////////////////////////////////////////
@ -79,14 +133,14 @@ void TTable_reporter::main_loop()
while (m.run() == K_ENTER)
{
TTable_report rep;
TTable_report rep(&m);
TReport_book book;
TString name(m.get(F_REPORT));
if (name.empty())
name = rptname;
rep.load(name);
rep.mask2report(m);
// rep.mask2report(m);
book.add(rep);
book.print_or_preview();
}

View File

@ -1,6 +1,7 @@
#include <config.h>
#include <execp.h>
#include <inst.h>
#include <recarray.h>
#include <tabutil.h>
#include "bainst.h"
#include "bainst00.h"
@ -18,6 +19,7 @@ protected:
virtual bool post_installer();
virtual bool preload_mask();
virtual bool some_to_load();
void check_std_code_det(const char * code, const char * descr);
public:
virtual ~TInstall_BA () {}
@ -101,19 +103,39 @@ bool TInstall_BA::preload_mask()
if (empty)
_m->set(F_TAB_CEE,"X");
}
check_std_code_det("1", "IVA indetraibile su acquisti riferiti a ricavi esenti");
check_std_code_det("3", "IVA indicata per passaggi interni al solo fine del calcolo di ventilazione");
check_std_code_det("9", "IVA non detraibile per l'articolo 19");
return TInstallmodule_app::preload_mask();
}
bool TInstall_BA ::install_com()
void TInstall_BA::check_std_code_det(const char * code, const char * descr)
{
const TToken_string key(code);
const TRectype & tab = cache().get("%DET", key);
if (tab.empty())
{
TTable det("%DET");
det.curr().put("CODTAB", key);
det.curr().put("I0", key);
det.curr().put("S0", descr);
det.curr().put("R0", CENTO);
det.write();
}
}
bool TInstall_BA::install_com()
{
bool ok=TRUE;
TStd_filename txtfile;
if (_m->get_bool(F_DEFAULTSDATA) && txtfile.check(TRUE,"lfiva.txt"))
{
TSystemisamfile tabcom(LF_TABCOM);
tabcom.load((const char *)txtfile);
}
if (_m->get_bool(F_TAB_CEE) && txtfile.check(TRUE,"batbsce.txt"))
{
TSystemisamfile tabcom(LF_TABCOM);

View File

@ -9,8 +9,6 @@ bool all_ok;
class TInstall_CG : public TInstallmodule_app
{
private:
bool CreaExeIni(const char * exename);
protected:
virtual bool modal() const {return FALSE;}
@ -23,19 +21,9 @@ public:
};
// crea il .ini per i files exe copiati nella directory di EASYCAMPO
bool TInstall_CG ::CreaExeIni(const char * exename)
{
return TRUE;
}
bool TInstall_CG ::post_installer()
{
bool ok=TRUE;
// copia dll (ex file PRASSI.PR inst.exe
// ok &= CreaExeIni("CB0000.EXE");
// ok &= CreaExeIni("TRRICE.EXE");
// ok &= CreaExeIni("VCOPIA.EXE");
return ok;
}

View File

@ -1,24 +0,0 @@
// posizione file comuni in _arrfiles
// campi maschera batb%cpg.msk
#define F_CODICE 101
#define F_DESC 102
#define F_TIPO 103
#define F_INIZIOSCAD 104
#define F_MESECOMM 105
#define F_RATEDIFF 106

View File

@ -1,79 +0,0 @@
#include "batbcpg.h"
TOOLBAR "" 0 20 0 2
#include <toolbar.h>
ENDPAGE
PAGE "Tabella pagamenti" -1 -1 78 15
STRING F_CODICE 4
BEGIN
PROMPT 4 1 "Codice "
HELP "Codice di pagamento"
FIELD LF_TABCOM->CODTAB
FLAGS "UZ"
USE %CPG
INPUT CODTAB F_CODICE
DISPLAY "Codice" CODTAB
DISPLAY "Tipo di pagamento@50" S0
OUTPUT F_CODICE CODTAB
OUTPUT F_DESC S0
CHECKTYPE REQUIRED
KEY 1
END
STRING F_DESC 50
BEGIN
PROMPT 4 3 "Descrizione "
HELP "Descrizione del tipo di pagamento"
FIELD LF_TABCOM->S0
USE %CPG KEY 2
CHECKTYPE REQUIRED
INPUT S0 F_DESC
DISPLAY "Tipo di pagamento@50" S0
DISPLAY "Codice" CODTAB
OUTPUT F_CODICE CODTAB
OUTPUT F_DESC S0
KEY 2
END
LIST F_TIPO 2 32
BEGIN
PROMPT 4 5 "Tipo "
FIELD LF_TABCOM->I0
ITEM "1|Rimessa Diretta"
ITEM "2|Tratta"
ITEM "3|Ricevuta Bancaria"
ITEM "4|Cessione"
ITEM "5|Paghero'"
ITEM "6|Lettera di credito"
ITEM "7|Tratta accettata"
ITEM "8|Rapporti interbancari diretti"
ITEM "9|Bonifico"
ITEM "10|Altro"
END
LIST F_INIZIOSCAD 14
BEGIN
PROMPT 4 7 "Inizio scadenze "
FIELD LF_TABCOM->S7
ITEM "F|Data fattura"
ITEM "M|Fine mese"
ITEM "D|Data fissa"
END
BOOLEAN F_MESECOMM
BEGIN
PROMPT 4 9 "Mese commerciale"
FIELD LF_TABCOM->B0
END
BOOLEAN F_RATEDIFF
BEGIN
PROMPT 4 11 "Rate differenziate "
FIELD LF_TABCOM->B1
END
ENDPAGE
ENDMASK

View File

@ -29,12 +29,12 @@ BEGIN
FLAGS "U"
END
STRING F_DESC 50
STRING F_DESC 70 50
BEGIN
PROMPT 10 2 "Descrizione "
FIELD S0
USE %DET KEY 2
INPUT CODTAB F_CODICE
INPUT S0 F_DESC
DISPLAY "Descrizione@50" S0
DISPLAY "Codice" CODTAB
DISPLAY "Percentuale" R0

View File

@ -142,7 +142,8 @@ BEGIN
HELP "Inserire il numero della colonna degli allegati clienti relativa all'imposta"
ITEM " |Non in allegato"
ITEM "1|Imponibili"
ITEM "3|Non imponibili"
ITEM "2|Non imponibili"
ITEM "3|Senza applicaz.imposta"
END
LIST FLD_TABIVA_S8 1 24
@ -152,8 +153,8 @@ BEGIN
HELP "Inserire il numero della colonna degli allegati fornitori relativa all'imposta"
ITEM " |Non in allegato"
ITEM "1|Imponibili"
ITEM "2|Non imponibili"
ITEM "3|Senza applicaz.imposta"
ITEM "4|Non imponibili"
END
GROUPBOX DLG_NULL 25 4

View File

@ -1,9 +1,8 @@
// campi maschera batb%trb.msk
#define F_CODICE 101
#define F_DESCR 102
#define F_SEZIONE 103

View File

@ -16,35 +16,45 @@ END
STRING F_CODICE 4
BEGIN
PROMPT 4 2 "Codice "
HELP "Codice tributo"
FIELD CODTAB
KEY 1
USE %TRB
INPUT CODTAB F_CODICE
DISPLAY "Codice" CODTAB
DISPLAY "Descrizione @50" S0
OUTPUT F_CODICE CODTAB
OUTPUT F_DESCR S0
FLAGS "Z"
CHECKTYPE REQUIRED
PROMPT 4 2 "Codice "
FIELD CODTAB
KEY 1
USE %TRB
INPUT CODTAB F_CODICE
DISPLAY "Codice" CODTAB
DISPLAY "Descrizione@50" S0
DISPLAY "Sezione" S6
OUTPUT F_CODICE CODTAB
OUTPUT F_DESCR S0
FLAGS "U"
CHECKTYPE REQUIRED
END
STRING F_DESCR 50
BEGIN
PROMPT 4 4 "Descrizione "
HELP "Descrizione del codice tributo"
FIELD LF_TABCOM->S0
KEY 2
USE %TRB KEY 2
INPUT CODTAB F_CODICE
INPUT S0 F_DESCR
DISPLAY "Descrizione @50" S0
DISPLAY "Codice" CODTAB
OUTPUT F_CODICE CODTAB
OUTPUT F_DESCR S0
CHECKTYPE REQUIRED
PROMPT 4 4 "Descrizione "
FIELD S0
KEY 2
USE %TRB KEY 2
INPUT S0 F_DESCR
DISPLAY "Descrizione@50" S0
DISPLAY "Codice" CODTAB
DISPLAY "Sezione" S6
COPY OUTPUT F_CODICE
CHECKTYPE REQUIRED
END
LIST F_SEZIONE 1 50
BEGIN
PROMPT 4 5 "Sezione "
ITEM "E|Erario"
ITEM "I|INPS"
ITEM "R|Regioni"
ITEM "L|ICI ed altri tributi locali"
ITEM "P|Altri enti previdenziali ed assicurativi"
FIELD S6
END
ENDPAGE
ENDMASK