Correzioni AGA (Spagoni) n. 294 297-301 303 (cg01* - cg02*)

Correzione AGA n. 254 (cg17*)
Correzione AGA (Spagoni) n. 283 (cg5*)


git-svn-id: svn://10.65.10.50/trunk@251 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1994-09-16 10:13:08 +00:00
parent f676dbb351
commit 34e4b78523
6 changed files with 119 additions and 131 deletions

View File

@ -111,6 +111,6 @@ if [ "$1" = "" -o "$1" = "etc" ];
then then
gmake $FLAGS $1 gmake $FLAGS $1
else else
gmake $FLAGS $P2HOME/campo/$1 gmake $FLAGS $EP$1
fi fi
rm /tmp/build_cg_$1 rm /tmp/build_cg_$1

View File

@ -66,22 +66,6 @@ bool CG0100_application::protected_record(TRectype &rec)
pconti.next(); pconti.next();
return pconti.good() && (pconti.curr() == rec1); return pconti.good() && (pconti.curr() == rec1);
//
// if (pconti.bad()) return FALSE;
// const int ngruppo = pconti.get_int(PCN_GRUPPO);
// const int nconto = pconti.get_int(PCN_CONTO);
// Cercavo di cancellare un gruppo e ho trovato un conto dello stesso gruppo
// if (conto == 0 && gruppo == ngruppo)
// return TRUE;
// Cercavo di cancellare un conto e ho trovato un sottoconto
// dello stesso gruppo e conto
// if (gruppo == ngruppo && conto == nconto)
// return TRUE;
// return FALSE;
} }
void CG0100_application::init_query_mode(TMask& m) void CG0100_application::init_query_mode(TMask& m)
@ -155,7 +139,8 @@ void CG0100_application::init_insert_mode(TMask& m)
m.send_key(K_SHIFT + K_CTRL + 'h', -3); m.send_key(K_SHIFT + K_CTRL + 'h', -3);
TLocalisamfile& pconti = *_rel->lfile(); TLocalisamfile& pconti = *_rel->lfile();
TString s(15), s1(1), s2(1), s3(8), s4(2); TString s(15), s2(1), s3(8), s4(2);
int s1 = 0;
pconti.setkey(1) ; pconti.setkey(1) ;
@ -170,12 +155,11 @@ void CG0100_application::init_insert_mode(TMask& m)
if (pconti.good()) if (pconti.good())
{ {
s = pconti.get(PCN_CODCBL); s = pconti.get(PCN_CODCBL);
s1 = pconti.get(PCN_SEZIVD); s1 = atoi(pconti.get(PCN_SEZIVD));
s2 = pconti.get(PCN_LETTIVD); s2 = pconti.get(PCN_LETTIVD);
s3 = pconti.get(PCN_NUMRIVD); s3 = pconti.get(PCN_NUMRIVD);
s4 = pconti.get(PCN_NUMIVD); s4 = pconti.get(PCN_NUMIVD);
indbil = pconti.get_int(PCN_INDBIL); indbil = pconti.get_int(PCN_INDBIL);
m.show(FLD_CM1_RICSER, indbil == PASSIVITA || indbil == RICAVI);
} }
if (indbil == ORDINE) if (indbil == ORDINE)
{ {
@ -183,16 +167,17 @@ void CG0100_application::init_insert_mode(TMask& m)
m.show(FLD_CM1_SEZIVDH); m.show(FLD_CM1_SEZIVDH);
m.disable(FLD_CM1_SEZIVDH); m.disable(FLD_CM1_SEZIVDH);
m.set(FLD_CM1_SEZIVDH, s1); m.set(FLD_CM1_SEZIVDH, s1);
ivd_enable = s1.empty(); ivd_enable = (s1 == 0);
} }
else else
{ {
m.show(FLD_CM1_SEZIVD); m.show(FLD_CM1_SEZIVD);
m.hide(FLD_CM1_SEZIVDH); m.hide(FLD_CM1_SEZIVDH);
ivd_enable = s1.empty() && s2.empty() && s3.empty() && s4.empty(); ivd_enable = (s1 == 0) && s2.empty() && s3.empty() && s4.empty();
} }
} }
else ivd_enable = TRUE; else ivd_enable = TRUE;
m.show(FLD_CM1_RICSER, indbil == PASSIVITA || indbil == RICAVI);
if (conto != 0) if (conto != 0)
{ {
if (indbil != ORDINE) if (indbil != ORDINE)

View File

@ -58,6 +58,7 @@ BEGIN
DISPLAY "Gruppo" GRUPPO DISPLAY "Gruppo" GRUPPO
DISPLAY "Conto" CONTO DISPLAY "Conto" CONTO
DISPLAY "Sottoconto" SOTTOCONTO DISPLAY "Sottoconto" SOTTOCONTO
DISPLAY "Sospeso" SOSPESO
DISPLAY "Descrizione@50" DESCR DISPLAY "Descrizione@50" DESCR
OUTPUT FLD_CM1_SOTTOCONTO SOTTOCONTO OUTPUT FLD_CM1_SOTTOCONTO SOTTOCONTO
OUTPUT FLD_CM1_GRUPPO GRUPPO OUTPUT FLD_CM1_GRUPPO GRUPPO
@ -74,6 +75,7 @@ BEGIN
USE LF_PCON KEY 2 USE LF_PCON KEY 2
INPUT DESCR FLD_CM1_DESC INPUT DESCR FLD_CM1_DESC
DISPLAY "Descrizione@50" DESCR DISPLAY "Descrizione@50" DESCR
DISPLAY "Sospeso" SOSPESO
DISPLAY "Gruppo" GRUPPO DISPLAY "Gruppo" GRUPPO
DISPLAY "Conto" CONTO DISPLAY "Conto" CONTO
DISPLAY "Sottoconto " SOTTOCONTO DISPLAY "Sottoconto " SOTTOCONTO
@ -98,7 +100,7 @@ END
LIST FLD_CM1_INDBIL 1 17 LIST FLD_CM1_INDBIL 1 17
BEGIN BEGIN
PROMPT 4 6 "Indicatore di bilancio " PROMPT 4 6 "Sezione di bilancio "
FIELD LF_PCON->INDBIL FIELD LF_PCON->INDBIL
GROUP 1 3 GROUP 1 3
HELP "Inserire l' indicatore di bilancio" HELP "Inserire l' indicatore di bilancio"
@ -114,7 +116,7 @@ BEGIN
PROMPT 4 7 "Sez. e classe IV dir.: " PROMPT 4 7 "Sez. e classe IV dir.: "
FIELD LF_PCON->SEZIVD FIELD LF_PCON->SEZIVD
GROUP 1 4 GROUP 1 4
ITEM "0|Nessuna" ITEM "0|Nessuna" MESSAGE RESET,5@
ITEM "1|Attivita'" ITEM "1|Attivita'"
ITEM "2|Passivita'" ITEM "2|Passivita'"
ITEM "9|Conto economico" ITEM "9|Conto economico"
@ -125,7 +127,7 @@ LIST FLD_CM1_SEZIVDH 1 19
BEGIN BEGIN
PROMPT 4 7 "Sez. e classe IV dir.: " PROMPT 4 7 "Sez. e classe IV dir.: "
FIELD LF_PCON->SEZIVD FIELD LF_PCON->SEZIVD
ITEM "0|Nessuna" ITEM "0|Nessuna" MESSAGE RESET,5@
ITEM "1|C.ordine attivo" ITEM "1|C.ordine attivo"
ITEM "2|C.ordine passivo" ITEM "2|C.ordine passivo"
ITEM "5|C.ordine" ITEM "5|C.ordine"
@ -136,7 +138,7 @@ STRING FLD_CM1_LETTIVD 1 1
BEGIN BEGIN
PROMPT 51 7 "" PROMPT 51 7 ""
FIELD LF_PCON->LETTIVD FIELD LF_PCON->LETTIVD
GROUP 1 4 GROUP 1 4 5
FLAGS "U" FLAGS "U"
END END
@ -144,14 +146,14 @@ STRING FLD_CM1_LETTIVDH 1
BEGIN BEGIN
PROMPT 51 7 "" PROMPT 51 7 ""
FLAGS "HDU" FLAGS "HDU"
GROUP 4 GROUP 4 5
END END
NUMBER FLD_CM1_NUMRIVD 8 4 NUMBER FLD_CM1_NUMRIVD 8 4
BEGIN BEGIN
PROMPT 55 7 "" PROMPT 55 7 ""
FIELD LF_PCON->NUMRIVD FIELD LF_PCON->NUMRIVD
GROUP 1 4 GROUP 1 4 5
FLAGS "MZ" FLAGS "MZ"
END END
@ -159,7 +161,7 @@ NUMBER FLD_CM1_NUMRIVDH 8 4
BEGIN BEGIN
PROMPT 55 7 "" PROMPT 55 7 ""
FLAGS "HDMZ" FLAGS "HDMZ"
GROUP 4 GROUP 4 5
END END
NUMBER FLD_CM1_NUMIVD 2 NUMBER FLD_CM1_NUMIVD 2
@ -167,7 +169,7 @@ BEGIN
PROMPT 66 7 "" PROMPT 66 7 ""
FIELD LF_PCON->NUMIVD FIELD LF_PCON->NUMIVD
FLAGS "RZ" FLAGS "RZ"
GROUP 1 4 GROUP 1 4 5
USE %IVD USE %IVD
INPUT CODTAB[1,1] FLD_CM1_SEZIVD INPUT CODTAB[1,1] FLD_CM1_SEZIVD
INPUT CODTAB[2,2] FLD_CM1_LETTIVD INPUT CODTAB[2,2] FLD_CM1_LETTIVD
@ -190,7 +192,7 @@ NUMBER FLD_CM1_NUMIVDH 2
BEGIN BEGIN
PROMPT 66 7 "" PROMPT 66 7 ""
FLAGS "HDRZ" FLAGS "HDRZ"
GROUP 1 4 GROUP 1 4 5
END END
LIST FLD_CM1_SEZIVDOPP 1 17 LIST FLD_CM1_SEZIVDOPP 1 17
@ -198,7 +200,7 @@ BEGIN
PROMPT 4 8 "Classe segno opp.: " PROMPT 4 8 "Classe segno opp.: "
FIELD LF_PCON->SEZIVDOPP FIELD LF_PCON->SEZIVDOPP
GROUP 1 2 4 GROUP 1 2 4
ITEM "0|Nessuna" ITEM "0|Nessuna" MESSAGE RESET,6@
ITEM "1|Attivita'" ITEM "1|Attivita'"
ITEM "2|Passivita'" ITEM "2|Passivita'"
ITEM "9|Conto economico" ITEM "9|Conto economico"
@ -210,7 +212,7 @@ BEGIN
PROMPT 51 8 "" PROMPT 51 8 ""
FIELD LF_PCON->LETTIVDOPP FIELD LF_PCON->LETTIVDOPP
FLAGS "U" FLAGS "U"
GROUP 1 2 4 GROUP 1 2 4 6
END END
NUMBER FLD_CM1_NUMRIVDOPP 8 4 NUMBER FLD_CM1_NUMRIVDOPP 8 4
@ -218,7 +220,7 @@ BEGIN
PROMPT 55 8 "" PROMPT 55 8 ""
FIELD LF_PCON->NUMRIVDOPP FIELD LF_PCON->NUMRIVDOPP
FLAGS "MZ" FLAGS "MZ"
GROUP 1 2 4 GROUP 1 2 4 6
END END
NUMBER FLD_CM1_NUMIVDOPP 2 NUMBER FLD_CM1_NUMIVDOPP 2
@ -226,7 +228,7 @@ BEGIN
PROMPT 66 8 "" PROMPT 66 8 ""
FIELD LF_PCON->NUMIVDOPP FIELD LF_PCON->NUMIVDOPP
FLAGS "RZ" FLAGS "RZ"
GROUP 1 2 4 GROUP 1 2 4 6
COPY USE FLD_CM1_NUMIVD COPY USE FLD_CM1_NUMIVD
INPUT CODTAB[1,1] FLD_CM1_SEZIVDOPP INPUT CODTAB[1,1] FLD_CM1_SEZIVDOPP
INPUT CODTAB[2,2] FLD_CM1_LETTIVDOPP INPUT CODTAB[2,2] FLD_CM1_LETTIVDOPP
@ -245,7 +247,7 @@ LIST FLD_CM1_TIPOSPRIC 1 45
BEGIN BEGIN
PROMPT 4 9 "Tipo Spesa/Ricavo " PROMPT 4 9 "Tipo Spesa/Ricavo "
FIELD LF_PCON->TIPOSPRIC FIELD LF_PCON->TIPOSPRIC
GROUP 1 GROUP 1 2
HELP "Specificare il tipo Spesa/Ricavo" HELP "Specificare il tipo Spesa/Ricavo"
ITEM "0|Acquisti o vendite in genere" ITEM "0|Acquisti o vendite in genere"
ITEM "1|Acquisti beni per rivendita" ITEM "1|Acquisti beni per rivendita"
@ -262,7 +264,7 @@ BEGIN
PROMPT 4 10 "Ricavi per servizi " PROMPT 4 10 "Ricavi per servizi "
FIELD RICSER FIELD RICSER
FLAGS "H" FLAGS "H"
ITEM "0|Altre passivita'" ITEM "0|Altre attivita'"
ITEM "1|Servizi" ITEM "1|Servizi"
END END
@ -322,6 +324,7 @@ BOOLEAN FLD_CM2_SOSPESO
BEGIN BEGIN
PROMPT 50 15 "Conto sospeso" PROMPT 50 15 "Conto sospeso"
FIELD LF_PCON->SOSPESO FIELD LF_PCON->SOSPESO
GROUP 1 2
END END
ENDPAGE ENDPAGE

View File

@ -32,7 +32,7 @@ BEGIN
PROMPT 30 8 "" PROMPT 30 8 ""
END END
BUTTON DLG_CANCEL 9 2 BUTTON DLG_QUIT 9 2
BEGIN BEGIN
PROMPT 46 8 "" PROMPT 46 8 ""
END END

View File

@ -1,15 +1,15 @@
#include <confapp.h> #include <confapp.h>
class CG5_App : public TConfig_application class CG5_App : public TConfig_application
{ {
public: public:
CG5_App() : TConfig_application(CONFIG_STUDIO) {} CG5_App() : TConfig_application(CONFIG_STUDIO) {}
virtual ~CG5_App() {} virtual ~CG5_App() {}
}; };
int cg5000 (int argc, char* argv[]) int cg5000 (int argc, char* argv[])
{ {
CG5_App appc; CG5_App appc;
appc.run(argc, argv, "Configurazione Studio"); appc.run(argc, argv, "Parametri Studio");
return 0; return 0;
} }

View File

@ -1,78 +1,78 @@
#include <confapp.h> #include <confapp.h>
#include <lffiles.h> #include <lffiles.h>
#include <files.h> #include <files.h>
#include "cg5100a.h" #include "cg5100a.h"
class CG51_App : public TConfig_application class CG51_App : public TConfig_application
{ {
public: public:
virtual bool preprocess_config (TMask& mask, TConfig& config); virtual bool preprocess_config (TMask& mask, TConfig& config);
virtual bool postprocess_config (TMask& mask, TConfig& config); virtual bool postprocess_config (TMask& mask, TConfig& config);
virtual bool postprocess_config_changed(const char* par, const char* var, virtual bool postprocess_config_changed(const char* par, const char* var,
const char* oldv, const char* newv); const char* oldv, const char* newv);
CG51_App() : TConfig_application(CONFIG_DITTA) {} CG51_App() : TConfig_application(CONFIG_DITTA) {}
virtual ~CG51_App() {} virtual ~CG51_App() {}
}; };
bool CG51_App::preprocess_config (TMask& mask, TConfig& config) bool CG51_App::preprocess_config (TMask& mask, TConfig& config)
{ {
// these are disabled in normal applications // these are disabled in normal applications
mask.enable(CHK_ANCFCM); mask.enable(CHK_ANCFCM);
mask.enable(CHK_PCTCCM); mask.enable(CHK_PCTCCM);
disable_menu_item(M_FILE_NEW); disable_menu_item(M_FILE_NEW);
disable_menu_item(M_FILE_REVERT); disable_menu_item(M_FILE_REVERT);
return TRUE; return TRUE;
} }
bool CG51_App::postprocess_config(TMask& mask, TConfig& config) bool CG51_App::postprocess_config(TMask& mask, TConfig& config)
{ {
enable_menu_item(M_FILE_NEW); enable_menu_item(M_FILE_NEW);
enable_menu_item(M_FILE_REVERT); enable_menu_item(M_FILE_REVERT);
return TRUE; return TRUE;
} }
bool CG51_App::postprocess_config_changed(const char* par, const char* var, bool CG51_App::postprocess_config_changed(const char* par, const char* var,
const char* oldv, const char* newv) const char* oldv, const char* newv)
{ {
TString v(var); TString v(var);
TDir dir; TDir dir;
TString file(16); TString file(16);
if (v == "AnCfCm") if (v == "AnCfCm")
{ {
dir.get(LF_CLIFO, _lock, _nordir, _sysdirop); dir.get(LF_CLIFO, _lock, _nordir, _sysdirop);
file = dir.name(); file = dir.name();
file[0] = *newv == 'X' ? '%' : '$'; file[0] = *newv == 'X' ? '%' : '$';
dir.set(file, dir.eod(), dir.flags(), dir.des(), dir.expr()); dir.set(file, dir.eod(), dir.flags(), dir.des(), dir.expr());
dir.put(LF_CLIFO, _nordir, _sysdirop); dir.put(LF_CLIFO, _nordir, _sysdirop);
} }
else if (v == "PcTcCm") else if (v == "PcTcCm")
{ {
dir.get(LF_PCON, _lock, _nordir, _sysdirop); dir.get(LF_PCON, _lock, _nordir, _sysdirop);
file = dir.name(); file = dir.name();
file[0] = *newv == 'X' ? '%' : '$'; file[0] = *newv == 'X' ? '%' : '$';
dir.set(file, dir.eod(), dir.flags(), dir.des(), dir.expr()); dir.set(file, dir.eod(), dir.flags(), dir.des(), dir.expr());
dir.put(LF_PCON, _nordir, _sysdirop); dir.put(LF_PCON, _nordir, _sysdirop);
dir.get(LF_CAUSALI, _lock, _nordir, _sysdirop); dir.get(LF_CAUSALI, _lock, _nordir, _sysdirop);
file = dir.name(); file = dir.name();
file[0] = *newv == 'X' ? '%' : '$'; file[0] = *newv == 'X' ? '%' : '$';
dir.set(file, dir.eod(), dir.flags(), dir.des(), dir.expr()); dir.set(file, dir.eod(), dir.flags(), dir.des(), dir.expr());
dir.put(LF_CAUSALI, _nordir, _sysdirop); dir.put(LF_CAUSALI, _nordir, _sysdirop);
dir.get(LF_RCAUSALI, _lock, _nordir, _sysdirop); dir.get(LF_RCAUSALI, _lock, _nordir, _sysdirop);
file = dir.name(); file = dir.name();
file[0] = *newv == 'X' ? '%' : '$'; file[0] = *newv == 'X' ? '%' : '$';
dir.set(file, dir.eod(), dir.flags(), dir.des(), dir.expr()); dir.set(file, dir.eod(), dir.flags(), dir.des(), dir.expr());
dir.put(LF_RCAUSALI, _nordir, _sysdirop); dir.put(LF_RCAUSALI, _nordir, _sysdirop);
} }
return TRUE; return TRUE;
} }
int cg5100 (int argc, char* argv[]) int cg5100 (int argc, char* argv[])
{ {
CG51_App appc; CG51_App appc;
appc.run(argc, argv, "Configurazione Ditta"); appc.run(argc, argv, "Parametri Ditta");
return 0; return 0;
} }