Patch level : 10.0 67
Files correlati : Ricompilazione Demo : [ ] Commento : RIportata la verione 3.2 1167 git-svn-id: svn://10.65.10.50/trunk@16733 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
bc6e158969
commit
3d7dab8e40
33
co/co0.cpp
Executable file
33
co/co0.cpp
Executable file
@ -0,0 +1,33 @@
|
||||
#include <xvt.h>
|
||||
#include "co0.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
const int n = argc > 1 ? argv[1][1]-'0' : 0;
|
||||
switch (n)
|
||||
{
|
||||
case 8:
|
||||
co0900(argc, argv); // Aggiornamento prezzi
|
||||
break;
|
||||
case 7:
|
||||
co0800(argc, argv); // Importazione conferimenti
|
||||
break;
|
||||
case 6:
|
||||
co0700(argc, argv); // Conferimenti
|
||||
break;
|
||||
case 5:
|
||||
co0600(argc, argv); // Anagrafica soci
|
||||
break;
|
||||
case 4:
|
||||
co0500(argc, argv); // Anagrafica mercati
|
||||
break;
|
||||
case 2:
|
||||
co0300(argc, argv); // Parametri Ditta
|
||||
break;
|
||||
case 0:
|
||||
co0100(argc, argv); // Tabelle modulo cooperative
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
7
co/co0.h
Executable file
7
co/co0.h
Executable file
@ -0,0 +1,7 @@
|
||||
int co0100(int argc, char* argv[]);
|
||||
int co0300(int argc, char* argv[]);
|
||||
int co0500(int argc, char* argv[]);
|
||||
int co0600(int argc, char* argv[]);
|
||||
int co0700(int argc, char* argv[]);
|
||||
int co0800(int argc, char* argv[]);
|
||||
int co0900(int argc, char* argv[]);
|
99
co/co0100.cpp
Executable file
99
co/co0100.cpp
Executable file
@ -0,0 +1,99 @@
|
||||
// gestione tabelle cooperative
|
||||
#include <automask.h>
|
||||
#include <modaut.h>
|
||||
#include <tabapp.h>
|
||||
|
||||
#include "cotbcoa.h"
|
||||
|
||||
class TMask_tabco : public TAutomask
|
||||
{
|
||||
|
||||
protected:
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
public:
|
||||
TMask_tabco(const char* name);
|
||||
virtual ~TMask_tabco();
|
||||
};
|
||||
|
||||
TMask_tabco::TMask_tabco(const char* name) : TAutomask(name)
|
||||
{
|
||||
}
|
||||
|
||||
TMask_tabco::~TMask_tabco()
|
||||
{
|
||||
}
|
||||
|
||||
bool TMask_tabco::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
class TTab_app_co : public Tab_application
|
||||
{
|
||||
protected: // TRelation_application
|
||||
virtual bool user_destroy() ;
|
||||
virtual bool user_create() ;
|
||||
virtual int rewrite(const TMask& m);
|
||||
|
||||
virtual TString& get_mask_name(TString& name) const;
|
||||
virtual TMask* set_mask(TMask * m=NULL);
|
||||
|
||||
public:
|
||||
TTab_app_co();
|
||||
};
|
||||
|
||||
HIDDEN inline TTab_app_co& app() { return (TTab_app_co&)main_app(); }
|
||||
|
||||
// costruttore
|
||||
TTab_app_co::TTab_app_co() {}
|
||||
|
||||
TString& TTab_app_co::get_mask_name(TString& name) const
|
||||
{
|
||||
name = get_tabname();
|
||||
if (name[0] == '%')
|
||||
name = name.mid(1);
|
||||
name.insert("cotb", 0);
|
||||
return name;
|
||||
}
|
||||
|
||||
TMask* TTab_app_co::set_mask(TMask* m)
|
||||
{
|
||||
if (m == NULL)
|
||||
{
|
||||
TFilename name; get_mask_name(name);
|
||||
m = new TMask_tabco(name);
|
||||
if (get_tabname() == "%COA")
|
||||
set_search_field(F_CODARTMER);
|
||||
}
|
||||
return TTable_application::set_mask(m);
|
||||
}
|
||||
|
||||
bool TTab_app_co::user_create()
|
||||
{
|
||||
bool ok = Tab_application::user_create();
|
||||
|
||||
if (ok)
|
||||
{
|
||||
TMask& mask = *set_mask();
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TTab_app_co::user_destroy()
|
||||
{
|
||||
return Tab_application::user_destroy();
|
||||
}
|
||||
|
||||
int TTab_app_co::rewrite(const TMask& m)
|
||||
{
|
||||
return Tab_application::rewrite(m);
|
||||
}
|
||||
|
||||
int co0100(int argc, char* argv[])
|
||||
{
|
||||
TTab_app_co a;
|
||||
a.run(argc, argv, TR("Tabella"));
|
||||
return 0;
|
||||
}
|
||||
|
63
co/co0300.cpp
Executable file
63
co/co0300.cpp
Executable file
@ -0,0 +1,63 @@
|
||||
#include <confapp.h>
|
||||
|
||||
#include "coconf.h"
|
||||
#include "../ve/velib.h"
|
||||
|
||||
class TConf_coop_ditta : public TConfig_application
|
||||
{
|
||||
static bool check_fields(TMask_field& f, KEY k);
|
||||
virtual TMask* create_mask(const TFilename& f);
|
||||
|
||||
public:
|
||||
// @cmember Disabilita la verifica del modulo in chiave
|
||||
virtual bool check_autorization() const { return false; }
|
||||
virtual const char * extra_modules() const {return "ba";}
|
||||
|
||||
virtual bool preprocess_config (TMask& mask, TConfig& config);
|
||||
virtual bool postprocess_config (TMask& mask, TConfig& config);
|
||||
virtual bool user_create( );
|
||||
virtual bool user_destroy( );
|
||||
|
||||
TConf_coop_ditta() : TConfig_application( CONFIG_DITTA ){ }
|
||||
virtual ~TConf_coop_ditta( ){ }
|
||||
};
|
||||
|
||||
bool TConf_coop_ditta::check_fields(TMask_field& f, KEY k)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TConf_coop_ditta::preprocess_config (TMask& mask, TConfig& config)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TConf_coop_ditta::postprocess_config (TMask& mask, TConfig& config)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
TMask* TConf_coop_ditta::create_mask(const TFilename& f)
|
||||
{
|
||||
TMask* m = TConfig_application::create_mask(f);
|
||||
return m;
|
||||
}
|
||||
|
||||
bool TConf_coop_ditta::user_create( )
|
||||
{
|
||||
TConfig conf(CONFIG_DITTA);
|
||||
conf.set( "EdMask", "co0300a", "co");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TConf_coop_ditta::user_destroy( )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
int co0300(int argc, char* argv[])
|
||||
{
|
||||
TConf_coop_ditta appc;
|
||||
appc.run(argc, argv, TR("Parametri ditta cooperative"));
|
||||
return 0;
|
||||
}
|
162
co/co0300a.uml
Executable file
162
co/co0300a.uml
Executable file
@ -0,0 +1,162 @@
|
||||
#include "coconf.h"
|
||||
|
||||
TOOLBAR "" 0 20 0 2
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Configurazione ditta per cooperative" -1 -1 0 0
|
||||
|
||||
GROUPBOX DLG_NULL 76 3
|
||||
BEGIN
|
||||
PROMPT 1 1 "@bDitta corrente"
|
||||
END
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 2 2 "Codice "
|
||||
FLAGS "FD"
|
||||
USE LF_NDITTE
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 22 2 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_RITQTA 5 2
|
||||
BEGIN
|
||||
PROMPT 2 4 "% ritenuta su quantita' "
|
||||
FIELD RitQta
|
||||
END
|
||||
|
||||
|
||||
NUMBER F_RITPREZZO 5 2
|
||||
BEGIN.
|
||||
PROMPT 2 5 "% ritenuta su prezzo "
|
||||
FIELD RitPrezzo
|
||||
END
|
||||
|
||||
STRING F_SPESARITACC 8
|
||||
BEGIN
|
||||
PROMPT 2 6 "Cod.spesa rit. per acc. "
|
||||
USE SPP SELECT (S6="P")
|
||||
FLAGS "U"
|
||||
INPUT CODTAB F_SPESARITACC
|
||||
DISPLAY "Codice " CODTAB
|
||||
DISPLAY "Descrizione@50 " S0
|
||||
OUTPUT F_SPESARITACC CODTAB
|
||||
OUTPUT F_D_SPESARITACC S0
|
||||
FIELD SpesaRitAcc
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_D_SPESARITACC 50
|
||||
BEGIN
|
||||
PROMPT 40 6 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_SPESADIRITTI1 8
|
||||
BEGIN
|
||||
PROMPT 2 7 "Cod.spesa dir. di merc. 1 "
|
||||
USE SPP SELECT (S6="P")
|
||||
FLAGS "U"
|
||||
INPUT CODTAB F_SPESADIRITTI1
|
||||
DISPLAY "Codice@8" CODTAB
|
||||
DISPLAY "Descrizione@50 " S0
|
||||
OUTPUT F_SPESADIRITTI1 CODTAB
|
||||
OUTPUT F_D_SPESADIRITTI1 S0
|
||||
FIELD SpesaDiritti1
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_D_SPESADIRITTI1 50
|
||||
BEGIN
|
||||
PROMPT 40 7 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_SPESADIRITTI2 8
|
||||
BEGIN
|
||||
PROMPT 2 8 "Cod.spesa dir. di merc. 2 "
|
||||
USE SPP SELECT (S6="P")
|
||||
FLAGS "U"
|
||||
INPUT CODTAB F_SPESADIRITTI2
|
||||
DISPLAY "Codice@8" CODTAB
|
||||
DISPLAY "Descrizione@50 " S0
|
||||
OUTPUT F_SPESADIRITTI2 CODTAB
|
||||
OUTPUT F_D_SPESADIRITTI2 S0
|
||||
FIELD SpesaDiritti2
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_D_SPESADIRITTI2 50
|
||||
BEGIN
|
||||
PROMPT 40 8 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_SPESAFACC 8
|
||||
BEGIN
|
||||
PROMPT 2 9 "Cod.spesa facchinaggio "
|
||||
USE SPP SELECT (S6="Q")
|
||||
FLAGS "U"
|
||||
INPUT CODTAB F_SPESAFACC
|
||||
DISPLAY "Codice " CODTAB
|
||||
DISPLAY "Descrizione@50 " S0
|
||||
OUTPUT F_SPESAFACC CODTAB
|
||||
OUTPUT F_D_SPESAFACC S0
|
||||
FIELD SpesaFacc
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_D_SPESAFACC 50
|
||||
BEGIN
|
||||
PROMPT 40 9 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_SPESACASSE 8
|
||||
BEGIN
|
||||
PROMPT 2 10 "Cod.spesa ricambio casse "
|
||||
USE SPP SELECT (S6="Q")
|
||||
FLAGS "U"
|
||||
INPUT CODTAB F_SPESACASSE
|
||||
DISPLAY "Codice " CODTAB
|
||||
DISPLAY "Descrizione@50 " S0
|
||||
OUTPUT F_SPESACASSE CODTAB
|
||||
OUTPUT F_D_SPESACASSE S0
|
||||
FIELD SpesaCasse
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_D_SPESACASSE 50
|
||||
BEGIN
|
||||
PROMPT 40 10 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_PROGQTA 14 3
|
||||
BEGIN
|
||||
PROMPT 2 12 "Prog. q.ta da accreditare "
|
||||
FIELD ProgQta
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
115
co/co0500.cpp
Executable file
115
co/co0500.cpp
Executable file
@ -0,0 +1,115 @@
|
||||
// gestione anagrafica mercati cooperative
|
||||
#include <automask.h>
|
||||
#include <execp.h>
|
||||
#include <relapp.h>
|
||||
#include <pconti.h>
|
||||
#include <recarray.h>
|
||||
|
||||
#include "co0500a.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//MASCHERA
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
class TCoop_mercati_msk : public TAutomask
|
||||
{
|
||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
|
||||
public:
|
||||
TCoop_mercati_msk() : TAutomask("co0500a") {}
|
||||
};
|
||||
|
||||
bool TCoop_mercati_msk::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
class TCoop_mercati_application : public TRelation_application
|
||||
|
||||
{
|
||||
TCoop_mercati_msk* _msk;
|
||||
TRelation* _rel;
|
||||
|
||||
protected:
|
||||
virtual TMask* get_mask(int mode = MODE_QUERY) { CHECK(_msk, "Null mask"); return _msk; }
|
||||
virtual bool changing_mask(int mode) { return false; }
|
||||
virtual TRelation* get_relation() const { CHECK(_rel, "Null relation"); return _rel; }
|
||||
|
||||
virtual void init_query_mode(TMask& m);
|
||||
virtual void init_query_insert_mode(TMask& m);
|
||||
virtual void init_insert_mode(TMask& m);
|
||||
virtual void init_modify_mode(TMask& m);
|
||||
|
||||
void show_mercato(TMask& m, const bool show = true);
|
||||
|
||||
virtual bool user_create() ;
|
||||
virtual bool user_destroy() ;
|
||||
|
||||
public:
|
||||
TCoop_mercati_application() : _msk(NULL), _rel(NULL) { }
|
||||
virtual ~TCoop_mercati_application() {}
|
||||
};
|
||||
|
||||
void TCoop_mercati_application::show_mercato(TMask& m, const bool show)
|
||||
{
|
||||
if (show)
|
||||
{
|
||||
m.show(-1);
|
||||
m.hide(-2);
|
||||
//m.enable(-1);
|
||||
//m.disable(-2);
|
||||
}
|
||||
else
|
||||
{
|
||||
m.show(-2);
|
||||
m.hide(-1);
|
||||
//m.enable(-2);
|
||||
//m.disable(-1);
|
||||
}
|
||||
}
|
||||
void TCoop_mercati_application::init_query_mode(TMask& m)
|
||||
{
|
||||
show_mercato(m);
|
||||
}
|
||||
|
||||
void TCoop_mercati_application::init_query_insert_mode(TMask& m)
|
||||
{
|
||||
show_mercato(m, false);
|
||||
}
|
||||
|
||||
void TCoop_mercati_application::init_insert_mode(TMask& m)
|
||||
{
|
||||
show_mercato(m, false);
|
||||
}
|
||||
|
||||
void TCoop_mercati_application::init_modify_mode(TMask& m)
|
||||
{
|
||||
show_mercato(m);
|
||||
}
|
||||
|
||||
bool TCoop_mercati_application::user_create()
|
||||
{
|
||||
_rel = new TRelation(LF_MERCATICOOP);
|
||||
_msk = new TCoop_mercati_msk;
|
||||
TString title;
|
||||
_msk->get_caption(title);
|
||||
set_title(title);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TCoop_mercati_application::user_destroy()
|
||||
{
|
||||
if (_msk)
|
||||
delete _msk;
|
||||
if (_rel)
|
||||
delete _rel;
|
||||
return true;
|
||||
}
|
||||
|
||||
int co0500(int argc, char* argv[])
|
||||
{
|
||||
TCoop_mercati_application a;
|
||||
|
||||
a.run(argc, argv, TR("Anagrafica mercati"));
|
||||
return 0;
|
||||
}
|
||||
|
21
co/co0500a.h
Executable file
21
co/co0500a.h
Executable file
@ -0,0 +1,21 @@
|
||||
// campi per la maschera co0500a
|
||||
|
||||
#define F_CODMERCATO 101
|
||||
#define F_DESMERCATO 102
|
||||
#define F_CODCF 103
|
||||
#define F_RAGSOC 104
|
||||
#define F_DIRITTI1 105
|
||||
#define F_ARROT1 106
|
||||
#define F_CODIVA1 107
|
||||
#define F_DESIVA1 108
|
||||
#define F_DIRITTI2 109
|
||||
#define F_ARROT2 110
|
||||
#define F_CODIVA2 111
|
||||
#define F_DESIVA2 112
|
||||
#define F_SPESEFACC 113
|
||||
#define F_CODIVAFACC 114
|
||||
#define F_DESIVAFACC 115
|
||||
#define F_SPESECASSE 116
|
||||
#define F_CODIVACASS 117
|
||||
#define F_DESIVACASS 118
|
||||
|
256
co/co0500a.uml
Executable file
256
co/co0500a.uml
Executable file
@ -0,0 +1,256 @@
|
||||
#include "co0500a.h"
|
||||
|
||||
TOOLBAR "" 0 -2 0 2
|
||||
|
||||
#include <toolbar.h>
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Anagrafica mercati" 0 -1 0 19
|
||||
|
||||
GROUPBOX DLG_NULL 78 3
|
||||
BEGIN
|
||||
PROMPT 1 1 ""
|
||||
END
|
||||
|
||||
// query mode
|
||||
NUMBER F_CODMERCATO 6
|
||||
BEGIN
|
||||
PROMPT 2 2 "Cod. mercato "
|
||||
FIELD CODCF
|
||||
KEY 1
|
||||
USE LF_MERCATICOOP KEY 1
|
||||
JOIN LF_CLIFO TO LF_MERCATICOOP INTO TIPOCF=='C' CODCF==CODCF
|
||||
INPUT CODCF F_CODMERCATO
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Ragione sociale@50" 20->RAGSOC
|
||||
OUTPUT F_CODMERCATO CODCF
|
||||
OUTPUT F_CODCF CODCF
|
||||
OUTPUT F_DESMERCATO 20->RAGSOC
|
||||
OUTPUT F_RAGSOC 20->RAGSOC
|
||||
CHEKCTYPE REQUIRED
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
STRING F_DESMERCATO 50
|
||||
BEGIN
|
||||
PROMPT 25 2 ""
|
||||
KEY 2
|
||||
USE LF_CLIFO KEY 2
|
||||
JOIN LF_MERCATICOOP INTO CODCF==CODCF
|
||||
INPUT TIPOCF "C"
|
||||
INPUT RAGSOC F_DESMERCATO
|
||||
DISPLAY "Descrizione@50" RAGSOC
|
||||
DISPLAY "Codice" LF_MERCATICOOP->CODCF
|
||||
COPY OUTPUT F_CODMERCATO
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
// query INSERT mode
|
||||
NUMBER F_CODCF 6
|
||||
BEGIN
|
||||
PROMPT 2 2 "Cliente "
|
||||
FIELD CODCF
|
||||
KEY 1
|
||||
USE LF_CLIFO KEY 1
|
||||
INPUT TIPOCF "C" SELECT
|
||||
INPUT CODCF F_CODCF
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Ragione sociale@50" RAGSOC
|
||||
OUTPUT F_CODCF CODCF
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
OUTPUT F_CODMERCATO CODCF
|
||||
OUTPUT F_DESMERCATO RAGSOC
|
||||
CHECKTYPE REQUIRED
|
||||
ADD RUN cg0 -1 C
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 25 2 ""
|
||||
USE LF_CLIFO KEY 2
|
||||
INPUT TIPOCF "C" SELECT
|
||||
INPUT RAGSOC F_RAGSOC
|
||||
DISPLAY "Ragione sociale@60" RAGSOC
|
||||
DISPLAY "Codice" CODCF
|
||||
COPY OUTPUT F_CODCF
|
||||
CHECKTYPE REQUIRED
|
||||
ADD RUN cg0 -1 C
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 31 6 "Perc."
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 41 6 "Arr."
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 45 6 "Cod.Iva"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 7 "1a % diritti di mercato"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 8 "2a % diritti di mercato"
|
||||
END
|
||||
|
||||
NUMBER F_DIRITTI1 5 2
|
||||
BEGIN
|
||||
PROMPT 21 7 ""
|
||||
FIELD DIRITTI1
|
||||
END
|
||||
|
||||
LISTBOX F_ARROT1 12
|
||||
BEGIN
|
||||
PROMPT 28 7 ""
|
||||
FIELD ARROT1
|
||||
ITEM " |Matematico"
|
||||
ITEM "0|per Eccesso"
|
||||
ITEM "1|per Difetto"
|
||||
END
|
||||
|
||||
STRING F_CODIVA1 4
|
||||
BEGIN
|
||||
PROMPT 45 7 ""
|
||||
FIELD CODIVA1
|
||||
USE %IVA
|
||||
INPUT CODTAB F_CODIVA1
|
||||
DISPLAY "Codice@20" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_CODIVA1 CODTAB
|
||||
OUTPUT F_DESIVA1 S0
|
||||
FLAGS "U"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESIVA1 50 30
|
||||
BEGIN
|
||||
PROMPT 52 7 ""
|
||||
USE %IVA KEY 2
|
||||
INPUT S0 F_DESIVA1
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice@20" CODTAB
|
||||
OUTPUT F_CODIVA1 CODTAB
|
||||
OUTPUT F_DESIVA1 S0
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
NUMBER F_DIRITTI2 5 2
|
||||
BEGIN
|
||||
PROMPT 21 8 ""
|
||||
FIELD DIRITTI2
|
||||
END
|
||||
|
||||
LISTBOZ F_ARROT2 12
|
||||
BEGIN
|
||||
PROMPT 28 8 ""
|
||||
FIELD ARROT2
|
||||
ITEM " |Matematico"
|
||||
ITEM "0|per Eccesso"
|
||||
ITEM "1|per Difetto"
|
||||
END
|
||||
|
||||
STRING F_CODIVA2 4
|
||||
BEGIN
|
||||
PROMPT 45 8 ""
|
||||
FIELD CODIVA2
|
||||
USE %IVA
|
||||
INPUT CODTAB F_CODIVA2
|
||||
DISPLAY "Codice@20" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_CODIVA2 CODTAB
|
||||
OUTPUT F_DESIVA2 S0
|
||||
FLAGS "U"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESIVA2 50 30
|
||||
BEGIN
|
||||
PROMPT 52 8 ""
|
||||
USE %IVA KEY 2
|
||||
INPUT S0 F_DESIVA2
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice@20" CODTAB
|
||||
OUTPUT F_CODIVA2 CODTAB
|
||||
OUTPUT F_DESIVA2 S0
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
NUMBER F_SPESEFACC 9 2
|
||||
BEGIN
|
||||
PROMPT 1 10 "Spese facchinaggio (Euro/kg) "
|
||||
FIELD SPESEFACC
|
||||
END
|
||||
|
||||
STRING F_CODIVAFACC 4
|
||||
BEGIN
|
||||
PROMPT 45 10 ""
|
||||
FIELD CODIVAFACC
|
||||
USE %IVA
|
||||
INPUT CODTAB F_CODIVAFACC
|
||||
DISPLAY "Codice@20" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_CODIVAFACC CODTAB
|
||||
OUTPUT F_DESIVAFACC S0
|
||||
FLAGS "U"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESIVAFACC 50 30
|
||||
BEGIN
|
||||
PROMPT 52 10 ""
|
||||
USE %IVA KEY 2
|
||||
INPUT S0 F_DESIVAFACC
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice@20" CODTAB
|
||||
OUTPUT F_CODIVAFACC CODTAB
|
||||
OUTPUT F_DESIVAFACC S0
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
NUMBER F_SPESECASSE 9 2
|
||||
BEGIN
|
||||
PROMPT 1 11 "Spese ricambio casse (Euro/cassa) "
|
||||
FIELD SPESECASSE
|
||||
END
|
||||
|
||||
STRING F_CODIVACASS 4
|
||||
BEGIN
|
||||
PROMPT 45 11 ""
|
||||
FIELD CODIVACASS
|
||||
USE %IVA
|
||||
INPUT CODTAB F_CODIVACASS
|
||||
DISPLAY "Codice@20" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_CODIVACASS CODTAB
|
||||
OUTPUT F_DESIVACASS S0
|
||||
FLAGS "U"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESIVACASS 50 30
|
||||
BEGIN
|
||||
PROMPT 52 11 ""
|
||||
USE %IVA KEY 2
|
||||
INPUT S0 F_DESIVACASS
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice@20" CODTAB
|
||||
OUTPUT F_CODIVACASS CODTAB
|
||||
OUTPUT F_DESIVACASS S0
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
186
co/co0600.cpp
Executable file
186
co/co0600.cpp
Executable file
@ -0,0 +1,186 @@
|
||||
// gestione anagrafica soci cooperative
|
||||
#include <automask.h>
|
||||
#include <execp.h>
|
||||
#include <relapp.h>
|
||||
#include <pconti.h>
|
||||
#include <recarray.h>
|
||||
|
||||
#include "co0600a.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//MASCHERA
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
class TCoop_soci_msk : public TAutomask
|
||||
{
|
||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
|
||||
public:
|
||||
void calcola_dati_nascita(const TString& cf, TDate& datanasc, TString8& comnasc);
|
||||
TCoop_soci_msk() : TAutomask("co0600a") {}
|
||||
};
|
||||
|
||||
void TCoop_soci_msk::calcola_dati_nascita(const TString& cf, TDate& datanasc, TString8& comnasc)
|
||||
{
|
||||
comnasc = "";
|
||||
datanasc = TDate(NULLDATE);
|
||||
if (cf.not_empty())
|
||||
{
|
||||
comnasc = cf.sub(11,15);
|
||||
int a = atoi(cf.sub(6,8));
|
||||
a+=1900;
|
||||
char mc = cf[8];
|
||||
int m = 0;
|
||||
switch (mc)
|
||||
{
|
||||
case 'A': m = 1; break;
|
||||
case 'B': m = 2; break;
|
||||
case 'C': m = 3; break;
|
||||
case 'D': m = 4; break;
|
||||
case 'E': m = 5; break;
|
||||
case 'H': m = 6; break;
|
||||
case 'L': m = 7; break;
|
||||
case 'M': m = 8; break;
|
||||
case 'P': m = 9; break;
|
||||
case 'R': m = 10; break;
|
||||
case 'S': m = 11; break;
|
||||
case 'T': m = 12; break;
|
||||
default: m = 0; break;
|
||||
}
|
||||
int g = atoi(cf.sub(9,11));
|
||||
if (g > 40)
|
||||
g-=40;
|
||||
if (g > 0 && m > 0 && a > 0)
|
||||
{
|
||||
datanasc.set_day(g);
|
||||
datanasc.set_month(m);
|
||||
datanasc.set_year(a);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool TCoop_soci_msk::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
switch (o.dlg())
|
||||
{
|
||||
case F_COFISOCIO:
|
||||
if (e == fe_modify || e == fe_init)
|
||||
{
|
||||
TMask& m = o.mask();
|
||||
TString80 cf = m.get(F_COFISOCIO);
|
||||
TDate datanasc;
|
||||
TString8 comnasc;
|
||||
calcola_dati_nascita(cf, datanasc, comnasc);
|
||||
if (datanasc.ok())
|
||||
{
|
||||
m.set(F_DATANASC, datanasc);
|
||||
m.set(F_COMNASC, comnasc);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case F_DATALIC:
|
||||
if (e == fe_modify)
|
||||
{
|
||||
TMask& m = o.mask();
|
||||
TString16 data = o.get();
|
||||
|
||||
if (data.full())
|
||||
{
|
||||
TDate datalic(data);
|
||||
|
||||
datalic.addyear(6);
|
||||
m.set(F_DATASCALIC, datalic);
|
||||
}
|
||||
else
|
||||
m.reset(F_DATASCALIC);
|
||||
}
|
||||
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
class TCoop_soci_application : public TRelation_application
|
||||
|
||||
{
|
||||
TMask* _msk;
|
||||
TRelation* _rel;
|
||||
|
||||
protected:
|
||||
virtual TMask* get_mask(int mode = MODE_QUERY) { CHECK(_msk, "Null mask"); return _msk; }
|
||||
virtual bool changing_mask(int mode) { return false; }
|
||||
virtual TRelation* get_relation() const { CHECK(_rel, "Null relation"); return _rel; }
|
||||
|
||||
virtual void init_query_mode(TMask& m);
|
||||
virtual void init_query_insert_mode(TMask& m);
|
||||
virtual void init_insert_mode(TMask& m);
|
||||
virtual void init_modify_mode(TMask& m);
|
||||
|
||||
void show_socio(TMask& m, const bool show = true);
|
||||
|
||||
virtual bool user_create() ;
|
||||
virtual bool user_destroy() ;
|
||||
|
||||
public:
|
||||
TCoop_soci_application() : _msk(NULL), _rel(NULL) { }
|
||||
virtual ~TCoop_soci_application() {}
|
||||
};
|
||||
|
||||
void TCoop_soci_application::show_socio(TMask& m, const bool show)
|
||||
{
|
||||
if (show)
|
||||
{
|
||||
m.show(-1);
|
||||
m.hide(-2);
|
||||
}
|
||||
else
|
||||
{
|
||||
m.show(-2);
|
||||
m.hide(-1);
|
||||
}
|
||||
}
|
||||
void TCoop_soci_application::init_query_mode(TMask& m)
|
||||
{
|
||||
show_socio(m);
|
||||
}
|
||||
|
||||
void TCoop_soci_application::init_query_insert_mode(TMask& m)
|
||||
{
|
||||
show_socio(m, false);
|
||||
}
|
||||
|
||||
void TCoop_soci_application::init_insert_mode(TMask& m)
|
||||
{
|
||||
show_socio(m, false);
|
||||
}
|
||||
|
||||
void TCoop_soci_application::init_modify_mode(TMask& m)
|
||||
{
|
||||
show_socio(m);
|
||||
}
|
||||
|
||||
bool TCoop_soci_application::user_create()
|
||||
{
|
||||
_rel = new TRelation(LF_SOCICOOP);
|
||||
_msk = new TCoop_soci_msk;
|
||||
TString title;
|
||||
_msk->get_caption(title);
|
||||
set_title(title);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TCoop_soci_application::user_destroy()
|
||||
{
|
||||
if (_msk)
|
||||
delete _msk;
|
||||
if (_rel)
|
||||
delete _rel;
|
||||
return true;
|
||||
}
|
||||
|
||||
int co0600(int argc, char* argv[])
|
||||
{
|
||||
TCoop_soci_application a;
|
||||
|
||||
a.run(argc, argv, TR("Anagrafica soci"));
|
||||
return 0;
|
||||
}
|
||||
|
60
co/co0600a.h
Executable file
60
co/co0600a.h
Executable file
@ -0,0 +1,60 @@
|
||||
// campi per la maschera co0600a
|
||||
|
||||
#define F_CODSOCIO 101
|
||||
#define F_DESSOCIO 102
|
||||
#define F_CODCF 103
|
||||
#define F_RAGSOC 104
|
||||
#define F_DATAASS 105
|
||||
#define F_DATAREC 106
|
||||
#define F_NUMQUOTE 107
|
||||
#define F_VALQUOTE 108
|
||||
#define F_LIBLAVORO 109
|
||||
#define F_DATAEMISS 110
|
||||
#define F_COMEMISS 111
|
||||
#define F_NOMEBARCA 112
|
||||
#define F_TIPOPROP 113
|
||||
#define F_TIPOCOMAPP 114
|
||||
#define F_LICENZA 115
|
||||
#define F_DATALIC 116
|
||||
#define F_COMPAGNIA1 117
|
||||
#define F_QUOTA1 118
|
||||
#define F_COMPAGNIA2 119
|
||||
#define F_QUOTA2 120
|
||||
#define F_COMPAGNIA3 121
|
||||
#define F_QUOTA3 122
|
||||
#define F_DATANASC 123
|
||||
#define F_COMNASC 124
|
||||
#define F_COFISOCIO 125
|
||||
#define F_DATADEL 126
|
||||
#define F_DATASCALIC 127
|
||||
|
||||
#define F_D_COMEMISS 131
|
||||
#define F_P_COMEMISS 132
|
||||
#define F_D_COMPAGNIA1 133
|
||||
#define F_D_COMPAGNIA2 134
|
||||
#define F_D_COMPAGNIA3 135
|
||||
#define F_D_COMNASC 136
|
||||
#define F_P_COMNASC 137
|
||||
|
||||
#define F_IMBARCAZIONI 151
|
||||
|
||||
#define F_I_TIPOCOMAPP 101
|
||||
#define F_I_TARGA 102
|
||||
#define F_I_MOTOBARCA 103
|
||||
#define F_I_DATAISC 104
|
||||
#define F_I_LUNGHEZZA 105
|
||||
#define F_I_LARGHEZZA 106
|
||||
#define F_I_ALTEZZA 107
|
||||
#define F_I_STLORDA 108
|
||||
#define F_I_SCADCOLL 109
|
||||
#define F_I_SCADSPEC 110
|
||||
#define F_I_STNETTA 111
|
||||
#define F_I_GT 112
|
||||
#define F_I_HP 113
|
||||
#define F_I_KW 114
|
||||
#define F_I_RIP 115
|
||||
#define F_I_SCADLICNAV 116
|
||||
#define F_I_SCADRUOLEQ 117
|
||||
#define F_I_NRRUOLEQUI 118
|
||||
#define F_I_SCADLICPES 119
|
||||
#define F_I_SCADPAGLIC 120
|
553
co/co0600a.uml
Executable file
553
co/co0600a.uml
Executable file
@ -0,0 +1,553 @@
|
||||
#include "co0600a.h"
|
||||
|
||||
TOOLBAR "" 0 -2 0 2
|
||||
|
||||
#include <toolbar.h>
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Anagrafica soci" 0 -1 0 20
|
||||
|
||||
GROUPBOX DLG_NULL 78 5
|
||||
BEGIN
|
||||
PROMPT 1 1 ""
|
||||
END
|
||||
|
||||
NUMBER F_CODSOCIO 6
|
||||
BEGIN
|
||||
PROMPT 2 2 "Cod. socio "
|
||||
FIELD CODCF
|
||||
KEY 1
|
||||
USE LF_SOCICOOP KEY 1
|
||||
JOIN LF_CLIFO TO LF_SOCICOOP INTO TIPOCF=='F' CODCF==CODCF
|
||||
INPUT CODCF F_CODSOCIO
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Ragione sociale@50" 20->RAGSOC
|
||||
DISPLAY "Codice fiscale@16" 20->COFI
|
||||
OUTPUT F_CODSOCIO CODCF
|
||||
OUTPUT F_DESSOCIO 20->RAGSOC
|
||||
OUTPUT F_CODCF CODCF
|
||||
OUTPUT F_RAGSOC 20->RAGSOC
|
||||
OUTPUT F_COFISOCIO 20->COFI
|
||||
CHECKTYPE REQUIRED
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
STRING F_DESSOCIO 50
|
||||
BEGIN
|
||||
PROMPT 25 2 ""
|
||||
FLAGS "D"
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
NUMBER F_CODCF 6
|
||||
BEGIN
|
||||
PROMPT 2 2 "Fornitore "
|
||||
FIELD CODCF
|
||||
KEY 1
|
||||
USE LF_CLIFO KEY 1
|
||||
INPUT TIPOCF "F" SELECT
|
||||
INPUT CODCF F_CODCF
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Ragione sociale@50" RAGSOC
|
||||
DISPLAY "Codice fiscale@16" COFI
|
||||
COPY OUTPUT F_CODSOCIO
|
||||
CHECKTYPE REQUIRED
|
||||
ADD RUN cg0 -1 F
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 25 2 ""
|
||||
USE LF_CLIFO KEY 2
|
||||
INPUT TIPOCF "F" SELECT
|
||||
INPUT RAGSOC F_RAGSOC
|
||||
DISPLAY "Ragione sociale@60" RAGSOC
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Codice fiscale@16" COFI
|
||||
COPY OUTPUT F_CODCF
|
||||
CHECKTYPE REQUIRED
|
||||
ADD RUN cg0 -1 F
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
STRING F_COFISOCIO 16
|
||||
BEGIN
|
||||
PROMPT 2 3 "Cod. fisc. "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
DATE F_DATANASC
|
||||
BEGIN
|
||||
PROMPT 2 4 "Nato il "
|
||||
FIELD DATANASC
|
||||
END
|
||||
|
||||
STRING F_COMNASC 4
|
||||
BEGIN
|
||||
PROMPT 25 4 "a "
|
||||
FIELD COMNASC
|
||||
FLAGS "U"
|
||||
USE LF_COMUNI KEY 1
|
||||
INPUT COM F_COMNASC
|
||||
DISPLAY "Codice" COM
|
||||
DISPLAY "Comune@50" DENCOM
|
||||
OUTPUT F_COMNASC COM
|
||||
OUTPUT F_D_COMNASC DENCOM
|
||||
OUTPUT F_P_COMNASC PROVCOM
|
||||
HELP "Codice del comune di nascita"
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Comune assente"
|
||||
ADD RUN ba4 -0
|
||||
END
|
||||
|
||||
STRING F_D_COMNASC 50 30
|
||||
BEGIN
|
||||
PROMPT 34 4 ""
|
||||
USE LF_COMUNI KEY 2
|
||||
INPUT DENCOM F_D_COMNASC
|
||||
DISPLAY "Comune@50" DENCOM
|
||||
DISPLAY "Codice" COM
|
||||
COPY OUTPUT F_COMNASC
|
||||
HELP "Nome del comune di nascita"
|
||||
ADD RUN ba4 -0
|
||||
END
|
||||
|
||||
STRING F_P_COMNASC 5
|
||||
BEGIN
|
||||
PROMPT 69 4 "Pr."
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 7
|
||||
BEGIN
|
||||
PROMPT 1 6 "Dati rapporto cooperativa"
|
||||
END
|
||||
|
||||
DATE F_DATAASS
|
||||
BEGIN
|
||||
PROMPT 2 7 "Data assunzione "
|
||||
FIELD DATAASS
|
||||
END
|
||||
|
||||
DATE F_DATAREC
|
||||
BEGIN
|
||||
PROMPT 42 7 "Data recessione "
|
||||
FIELD DATAREC
|
||||
END
|
||||
|
||||
NUMBER F_NUMQUOTE 5
|
||||
BEGIN
|
||||
PROMPT 2 8 "Num. quote o azioni "
|
||||
FIELD NUMQUOTE
|
||||
END
|
||||
|
||||
NUMBER F_VALQUOTE 10 2
|
||||
BEGIN
|
||||
PROMPT 42 8 "Valore "
|
||||
FIELD VALQUOTE
|
||||
END
|
||||
|
||||
STRING F_LIBLAVORO 10
|
||||
BEGIN
|
||||
PROMPT 2 9 "Num. libretto lavoro "
|
||||
FIELD LIBLAVORO
|
||||
END
|
||||
|
||||
DATE F_DATAEMISS
|
||||
BEGIN
|
||||
PROMPT 42 9 "Data emissione "
|
||||
FIELD DATAEMISS
|
||||
END
|
||||
|
||||
STRING F_COMEMISS 4
|
||||
BEGIN
|
||||
PROMPT 2 10 "Comune di emissione "
|
||||
FIELD COMEMISS
|
||||
FLAGS "U"
|
||||
USE LF_COMUNI KEY 1
|
||||
INPUT COM F_COMEMISS
|
||||
DISPLAY "Codice" COM
|
||||
DISPLAY "Comune@50" DENCOM
|
||||
OUTPUT F_COMEMISS COM
|
||||
OUTPUT F_D_COMEMISS DENCOM
|
||||
OUTPUT F_P_COMEMISS PROVCOM
|
||||
HELP "Codice del comune di emissione"
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Comune assente"
|
||||
ADD RUN ba4 -0
|
||||
END
|
||||
|
||||
STRING F_D_COMEMISS 50 35
|
||||
BEGIN
|
||||
PROMPT 30 10 ""
|
||||
USE LF_COMUNI KEY 2
|
||||
INPUT DENCOM F_D_COMEMISS
|
||||
DISPLAY "Comune@50" DENCOM
|
||||
DISPLAY "Codice" COM
|
||||
COPY OUTPUT F_COMEMISS
|
||||
HELP "Nome del comune del recapito"
|
||||
ADD RUN ba4 -0
|
||||
END
|
||||
|
||||
STRING F_P_COMEMISS 5
|
||||
BEGIN
|
||||
PROMPT 69 10 "Pr."
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
DATE F_DATADEL
|
||||
BEGIN
|
||||
PROMPT 2 11 "Data delibera "
|
||||
FIELD DATADEL
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 5
|
||||
BEGIN
|
||||
PROMPT 1 13 "Imbarcazione principale"
|
||||
END
|
||||
|
||||
STRING F_NOMEBARCA 25
|
||||
BEGIN
|
||||
PROMPT 2 14 "Nome barca "
|
||||
FIELD NOMEBARCA
|
||||
END
|
||||
|
||||
LISTBOX F_TIPOPROP 1 10
|
||||
BEGIN
|
||||
PROMPT 45 14 "Tipo propulsione "
|
||||
FIELD TIPOPROP
|
||||
FLAGS "U"
|
||||
ITEM "0|Motore"
|
||||
ITEM "1|Vela"
|
||||
END
|
||||
|
||||
LISTBOX F_TIPOCOMAPP 1 15
|
||||
BEGIN
|
||||
PROMPT 2 15 "Tipo comm. app. "
|
||||
FIELD TIPOCOMAPP
|
||||
FLAGS "U"
|
||||
ITEM "0|Acque interne"
|
||||
ITEM "1|Acque marittime"
|
||||
END
|
||||
|
||||
STRING F_LICENZA 10
|
||||
BEGIN
|
||||
PROMPT 45 15 "Licenza "
|
||||
FIELD LICENZA
|
||||
END
|
||||
|
||||
DATE F_DATALIC
|
||||
BEGIN
|
||||
PROMPT 2 16 "Data rilascio "
|
||||
FIELD DATALIC
|
||||
END
|
||||
|
||||
DATE F_DATASCALIC
|
||||
BEGIN
|
||||
PROMPT 45 16 "Data scadenza "
|
||||
FIELD DATASCALIC
|
||||
FLAGS 'D'
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 5
|
||||
BEGIN
|
||||
PROMPT 1 18 "Compagnie di appartenenza"
|
||||
END
|
||||
|
||||
NUMBER F_COMPAGNIA1 4
|
||||
BEGIN
|
||||
PROMPT 2 19 "1 "
|
||||
FLAGS "Z"
|
||||
FIELD COMPAGNIA1
|
||||
USE %CMP
|
||||
INPUT CODTAB F_COMPAGNIA1
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_COMPAGNIA1 CODTAB
|
||||
OUTPUT F_D_COMPAGNIA1 S0
|
||||
FLAGS "U"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_D_COMPAGNIA1 50 40
|
||||
BEGIN
|
||||
PROMPT 13 19 ""
|
||||
USE %CMP KEY 2
|
||||
INPUT S0 F_D_COMPAGNIA1
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
OUTPUT F_COMPAGNIA1 CODTAB
|
||||
OUTPUT F_D_COMPAGNIA1 S0
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
NUMBER F_QUOTA1 5 1
|
||||
BEGIN
|
||||
PROMPT 62 19 "Valore "
|
||||
FIELD QUOTA1
|
||||
END
|
||||
|
||||
NUMBER F_COMPAGNIA2 4
|
||||
BEGIN
|
||||
PROMPT 2 20 "2 "
|
||||
FLAGS "Z"
|
||||
FIELD COMPAGNIA2
|
||||
USE %CMP
|
||||
INPUT CODTAB F_COMPAGNIA2
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_COMPAGNIA2 CODTAB
|
||||
OUTPUT F_D_COMPAGNIA2 S0
|
||||
FLAGS "U"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_D_COMPAGNIA2 50 40
|
||||
BEGIN
|
||||
PROMPT 13 20 ""
|
||||
USE %CMP KEY 2
|
||||
INPUT S0 F_D_COMPAGNIA2
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
OUTPUT F_COMPAGNIA2 CODTAB
|
||||
OUTPUT F_D_COMPAGNIA2 S0
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
NUMBER F_QUOTA2 5 1
|
||||
BEGIN
|
||||
PROMPT 62 20 "Valore "
|
||||
FIELD QUOTA2
|
||||
END
|
||||
|
||||
NUMBER F_COMPAGNIA3 4
|
||||
BEGIN
|
||||
PROMPT 2 21 "3 "
|
||||
FLAGS "Z"
|
||||
FIELD COMPAGNIA3
|
||||
USE %CMP
|
||||
INPUT CODTAB F_COMPAGNIA3
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_COMPAGNIA3 CODTAB
|
||||
OUTPUT F_D_COMPAGNIA3 S0
|
||||
FLAGS "U"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_D_COMPAGNIA3 50 40
|
||||
BEGIN
|
||||
PROMPT 13 21 ""
|
||||
USE %CMP KEY 2
|
||||
INPUT S0 F_D_COMPAGNIA3
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
OUTPUT F_COMPAGNIA3 CODTAB
|
||||
OUTPUT F_D_COMPAGNIA3 S0
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
NUMBER F_QUOTA3 5 1
|
||||
BEGIN
|
||||
PROMPT 62 21 "Valore "
|
||||
FIELD QUOTA3
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Imbarcazioni" 0 -1 0 20
|
||||
|
||||
SPREADSHEET F_IMBARCAZIONI
|
||||
BEGIN
|
||||
PROMPT 2 5 "Imbarcazioni"
|
||||
FLAGS "A"
|
||||
USE LF_IMBARCAZIONI KEY PROGIMB
|
||||
INPUT CODCF F_CODCF
|
||||
ITEM "Tipo comm.app."
|
||||
ITEM "Targa@10"
|
||||
ITEM "Motobarca@30"
|
||||
ITEM "Data iscr."
|
||||
ITEM "Lunghezza"
|
||||
ITEM "Larghezza"
|
||||
ITEM "Altezza"
|
||||
ITEM "St.lorda"
|
||||
ITEM "Scad. coll."
|
||||
ITEM "Scad. spec."
|
||||
ITEM "St.netta"
|
||||
ITEM "GT@7"
|
||||
ITEM "HP@7"
|
||||
ITEM "KW@7"
|
||||
ITEM "R.I.P.@10"
|
||||
ITEM "Scad.lic.nav."
|
||||
ITEM "Scad.ruol.equip."
|
||||
ITEM "Nr. ruol. equip."
|
||||
ITEM "Scad.lic.pesca"
|
||||
ITEM "Scad.pag.lic.pesca"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
PAGE "Imbarcazione" -1 -1 75 16
|
||||
|
||||
LISTBOX F_I_TIPOCOMAPP 1 15
|
||||
BEGIN
|
||||
PROMPT 2 2 "Tipo comm. app. "
|
||||
FIELD 162->TIPOCOMAPP
|
||||
FLAGS "U"
|
||||
ITEM "0|Acque interne"
|
||||
MESSAGE ENABLE,1@|CLEAR,2@
|
||||
ITEM "1|Acque marittime"
|
||||
MESSAGE ENABLE,2@|CLEAR,1@
|
||||
END
|
||||
|
||||
STRING F_I_TARGA 10
|
||||
BEGIN
|
||||
PROMPT 2 3 "Numero iscr. (targa) "
|
||||
FIELD 162->TARGA
|
||||
END
|
||||
|
||||
DATA F_I_DATAISC
|
||||
BEGIN
|
||||
PROMPT 35 3 "Data iscr. "
|
||||
FIELD 162->DATAISC
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
STRING F_I_MOTOBARCA 30
|
||||
BEGIN
|
||||
PROMPT 2 4 "Nome motobarca "
|
||||
FIELD 162->MOTOBARCA
|
||||
END
|
||||
|
||||
NUMBER F_I_LUNGHEZZA 6 2
|
||||
BEGIN
|
||||
PROMPT 2 5 "Lunghezza "
|
||||
FIELD 162->LUNGHEZZA
|
||||
END
|
||||
|
||||
NUMBER F_I_LARGHEZZA 6 2
|
||||
BEGIN
|
||||
PROMPT 35 5 "Larghezza "
|
||||
FIELD 162->LARGHEZZA
|
||||
END
|
||||
|
||||
NUBER F_I_ALTEZZA 6 2
|
||||
BEGIN
|
||||
PROMPT 58 5 "Altezza "
|
||||
FIELD 162->ALTEZZA
|
||||
END
|
||||
|
||||
NUBER F_I_STLORDA 7 2
|
||||
BEGIN
|
||||
PROMPT 2 6 "Stazza lorda "
|
||||
FIELD 162->STLORDA
|
||||
END
|
||||
|
||||
DATE F_I_SCADCOLL
|
||||
BEGIN
|
||||
PROMPT 2 7 "Scad. collaudo "
|
||||
FIELD 162->SCADCOLL
|
||||
END
|
||||
|
||||
DATE F_I_SCADSPEC
|
||||
BEGIN
|
||||
PROMPT 35 7 "Scad. speciale "
|
||||
FIELD 162->SCADSPEC
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
NUBER F_I_STNETTA 7 2
|
||||
BEGIN
|
||||
PROMPT 2 8 "Stazza netta "
|
||||
FIELD 162->STNETTA
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
NUBER F_I_GT 7 2
|
||||
BEGIN
|
||||
PROMPT 35 8 "GT "
|
||||
FIELD 162->GT
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
NUBER F_I_HP 7 2
|
||||
BEGIN
|
||||
PROMPT 2 9 "HP "
|
||||
FIELD 162->HP
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
NUBER F_I_KW 7 2
|
||||
BEGIN
|
||||
PROMPT 35 9 "KW "
|
||||
FIELD 162->KW
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
STRING F_I_RIP 30
|
||||
BEGIN
|
||||
PROMPT 2 10 "R.I.P. "
|
||||
FIELD 162->RIP
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
DATE F_I_SCADLICNAV
|
||||
BEGIN
|
||||
PROMPT 2 12 "Scad. licenza navigazione "
|
||||
FIELD 162->SCADLICNAV
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
DATE F_I_SCADRUOLEQ
|
||||
BEGIN
|
||||
PROMPT 2 13 "Scad. ruolino equip."
|
||||
FIELD 162->SCADRUOLEQ
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
STRING F_I_NRRUOLEQUI 15
|
||||
BEGIN
|
||||
PROMPT 35 13 "Nr. ruolino equip."
|
||||
FIELD 162->NRRUOLEQUI
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
DATE F_I_SCADLICPES
|
||||
BEGIN
|
||||
PROMPT 2 14 "Scad. licenza pesca "
|
||||
FIELD 162->SCADLICPES
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
DATE F_I_SCADPAGLIC
|
||||
BEGIN
|
||||
PROMPT 35 14 "Scad. pag. lic. pesca "
|
||||
FIELD 162->SCADPAGLIC
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 9 2
|
||||
BEGIN
|
||||
PROMPT -13 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 9 2
|
||||
BEGIN
|
||||
PROMPT -23 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_DELREC 9 2
|
||||
BEGIN
|
||||
PROMPT -33 -1 ""
|
||||
MESSAGE EXIT, K_DEL
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
|
282
co/co0700.cpp
Executable file
282
co/co0700.cpp
Executable file
@ -0,0 +1,282 @@
|
||||
#include "../ve/velib.h"
|
||||
#include "../ve/sconti.h"
|
||||
#include "../mg/mglib.h"
|
||||
|
||||
#include "../ve/vepriv.h"
|
||||
#include "../ve/veuml.h"
|
||||
|
||||
#include <automask.h>
|
||||
#include <defmask.h>
|
||||
#include <execp.h>
|
||||
#include <agasys.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "../mg/anamag.h"
|
||||
#include "../ve/ve0100.h"
|
||||
#include "../ve/veini.h"
|
||||
#include "../ve/veuml.h"
|
||||
#include "../ve/veuml1.h"
|
||||
#include "../ve/verig.h"
|
||||
|
||||
#include <clifo.h>
|
||||
#include "socicoop.h"
|
||||
|
||||
#include <user.h>
|
||||
|
||||
#include "colib.h"
|
||||
|
||||
|
||||
// Definizione della classe dell'applicazione motore
|
||||
class TConferimenti_application : public TMotore_application
|
||||
{
|
||||
TAssoc_array _masks; // assoc_array delle maschere da utilizzare
|
||||
TString4 _tipodoc;
|
||||
real _ritprezzo;
|
||||
real _ritqta;
|
||||
TString_array _speserit;
|
||||
|
||||
protected:
|
||||
virtual TMask* get_mask( int mode );
|
||||
virtual void on_firm_change();
|
||||
int write( const TMask& m );
|
||||
int rewrite( const TMask& m );
|
||||
real get_perc_socio(const long codsocio, const TString& codcomp) const;
|
||||
|
||||
public:
|
||||
virtual TMask & query_mask();
|
||||
virtual TDocumento_mask & edit_mask() const;
|
||||
real ritprezzo() {return _ritprezzo;};
|
||||
real ritqta() {return _ritqta;};
|
||||
TString_array& speserit() {return _speserit;};
|
||||
|
||||
TConferimenti_application() {}
|
||||
};
|
||||
|
||||
inline TConferimenti_application& cfapp() { return (TConferimenti_application &) main_app(); };
|
||||
|
||||
// maschera di ricerca
|
||||
class TConferimenti_query_mask : public TAutomask
|
||||
{
|
||||
protected:
|
||||
public:
|
||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
|
||||
TConferimenti_query_mask() : TAutomask("co0700a") {}
|
||||
virtual ~TConferimenti_query_mask() {}
|
||||
};
|
||||
|
||||
// maschera di edit
|
||||
class TConferimenti_mask : public TDocumento_mask
|
||||
{
|
||||
bool _rigaspesa;
|
||||
|
||||
protected:
|
||||
|
||||
public:
|
||||
virtual TVariable_mask* riga_mask(int numriga);
|
||||
TConferimenti_mask(const char* tipodoc);
|
||||
virtual ~TConferimenti_mask() {}
|
||||
};
|
||||
|
||||
TConferimenti_mask::TConferimenti_mask(const char* tipodoc):
|
||||
TDocumento_mask(tipodoc)
|
||||
{
|
||||
}
|
||||
|
||||
int TConferimenti_application::rewrite( const TMask& m )
|
||||
{
|
||||
int err = NOERR;
|
||||
const TTipo_documento tipodoc(m.get(172));
|
||||
if (tipodoc.tipo() == 5)
|
||||
{
|
||||
const long codmercato = m.get_long(343);
|
||||
TDocumento & doc = ((TConferimenti_mask & )m).doc();
|
||||
doc.put("SPESEUPD", false);
|
||||
doc.put("RAGGR", true);
|
||||
update_spese_doc(codmercato, doc);
|
||||
err = TMotore_application::rewrite(m);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
int TConferimenti_application::write( const TMask& m )
|
||||
{
|
||||
int err = NOERR;
|
||||
const TTipo_documento tipodoc(m.get(172));
|
||||
if (tipodoc.tipo() == 5)
|
||||
{
|
||||
const char confda = m.get(401)[0];
|
||||
const long codmercato = m.get_long(343);
|
||||
if (confda=='S') // conferimento da socio
|
||||
{
|
||||
TDocumento & doc = ((TConferimenti_mask & )m).doc();
|
||||
doc.put("SPESEUPD", false);
|
||||
doc.put("RAGGR", true);
|
||||
update_spese_doc(codmercato, doc);
|
||||
err = TMotore_application::write(m);
|
||||
}
|
||||
else // conferimento da compagnia
|
||||
{
|
||||
TDocumento& doc = ((TConferimenti_mask&) m).doc();
|
||||
if (doc.physical_rows() > 0)
|
||||
{
|
||||
const TString8 codcomp = m.get(344);
|
||||
TLista_documenti listadoc;
|
||||
if (compagnia2soci(doc, codcomp, codmercato, listadoc) > 0)
|
||||
err = listadoc.write();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
err = TMotore_application::write(m);
|
||||
return err;
|
||||
}
|
||||
|
||||
void TConferimenti_application::on_firm_change()
|
||||
{
|
||||
TConfig d(CONFIG_DITTA, "co");
|
||||
_ritprezzo = real(d.get("RitPrezzo"));
|
||||
_ritqta = real(d.get("RitQta"));
|
||||
}
|
||||
|
||||
TMask& TConferimenti_application::query_mask()
|
||||
{
|
||||
TMask* m = (TMask*) _masks.objptr("co0700a");
|
||||
if (m == NULL)
|
||||
{
|
||||
m = new TConferimenti_query_mask();
|
||||
_masks.add("co0700a", m);
|
||||
}
|
||||
return *m;
|
||||
}
|
||||
|
||||
TDocumento_mask& TConferimenti_application::edit_mask() const
|
||||
{
|
||||
TDocumento_mask* m = (TDocumento_mask*) _masks.objptr(_tipodoc);
|
||||
if (m == NULL)
|
||||
{
|
||||
m = new TConferimenti_mask(_tipodoc);
|
||||
((TAssoc_array&)_masks).add(_tipodoc, m);
|
||||
}
|
||||
return *m;
|
||||
}
|
||||
|
||||
TMask* TConferimenti_application::get_mask( int mode )
|
||||
{
|
||||
TMask* m = NULL;
|
||||
if (mode == MODE_MOD || mode == MODE_INS)
|
||||
{
|
||||
_tipodoc = query_mask().get(F_TIPODOC);
|
||||
m = &edit_mask();
|
||||
}
|
||||
else
|
||||
m = &query_mask();
|
||||
return m;
|
||||
}
|
||||
|
||||
bool TConferimenti_query_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
switch (o.dlg())
|
||||
{
|
||||
case F_ANNO:
|
||||
if (e == fe_modify)
|
||||
app().update_navigation_bar();
|
||||
break;
|
||||
case F_CODNUM:
|
||||
if (e == fe_modify)
|
||||
{
|
||||
TMask& m = o.mask();
|
||||
|
||||
TTable & tabnum = ((TTable &) ((TEdit_field &)o).browse()->cursor()->file());
|
||||
if ( tabnum.good())
|
||||
{
|
||||
TCodice_numerazione cod_num(tabnum.curr());
|
||||
m.set( F_DESNUM, cod_num.descrizione());
|
||||
// Propone il primo tipo di documento come default
|
||||
if (m.field(F_TIPODOC).empty() || o.focusdirty())
|
||||
{
|
||||
m.set( F_TIPODOC, cod_num.tipo_doc(0));
|
||||
m.send_key( K_TAB, F_TIPODOC );
|
||||
}
|
||||
// Setta la numerazione a definitiva
|
||||
}
|
||||
else
|
||||
{
|
||||
m.set( F_DESNUM, "" );
|
||||
m.set( F_TIPODOC, "" );
|
||||
}
|
||||
|
||||
app().update_navigation_bar();
|
||||
}
|
||||
break;
|
||||
case F_TIPODOC:
|
||||
if (e == fe_modify)
|
||||
{
|
||||
TMask& m = o.mask();
|
||||
|
||||
if (m.get(F_TIPODOC).full())
|
||||
{
|
||||
TCodice_numerazione cod_num(m.get(F_CODNUM));
|
||||
const TString& tipo = o.get();
|
||||
int last = cod_num.ntipi_doc();
|
||||
for (int i = 0; i < last; i++ )
|
||||
{
|
||||
const TString& curtipo = cod_num.tipo_doc(i);
|
||||
if (curtipo == tipo)
|
||||
return TRUE;
|
||||
}
|
||||
return o.error_box(TR("Tipo non valido per la numerazione selezionata!"));
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool confer_codart_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
bool ok = codart_handler(f, key);
|
||||
if (ok && f.to_check(key))
|
||||
{
|
||||
TMask& row_mask = f.mask();
|
||||
row_mask.set(FR_SCONTO, cfapp().ritprezzo(), true);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool confer_qtagg1_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (f.to_check(key))
|
||||
{
|
||||
TMask& row_mask = f.mask();
|
||||
real qtagg1 = f.get();
|
||||
real qta = qtagg1*cfapp().ritqta()/CENTO;
|
||||
row_mask.set(FR_QTA, qtagg1-qta, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
TVariable_mask* TConferimenti_mask::riga_mask(int numriga)
|
||||
{
|
||||
TVariable_mask* m = TDocumento_mask::riga_mask(numriga);
|
||||
const TRiga_documento& riga = doc()[numriga + 1];
|
||||
const TTipo_riga_documento& tiporiga = riga.tipo();
|
||||
if (tiporiga.tipo() == 'M') // riga merce
|
||||
{
|
||||
m->set_handler(FR_CODART, confer_codart_handler);
|
||||
m->set_handler(FR_QTAGG1, confer_qtagg1_handler);
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
int co0700( int argc, char* argv[])
|
||||
{
|
||||
TConferimenti_application a;
|
||||
|
||||
a.run( argc, argv, TR("Conferimenti cooperative"));
|
||||
return 0;
|
||||
}
|
183
co/co0700a.uml
Executable file
183
co/co0700a.uml
Executable file
@ -0,0 +1,183 @@
|
||||
#include "veuml.h"
|
||||
|
||||
TOOLBAR "" 0 20 60 2
|
||||
#include "toolbar.h"
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Estremi del documento" 1 1 60 14
|
||||
|
||||
GROUPBOX DLG_NULL 78 3
|
||||
BEGIN
|
||||
PROMPT 1 1 "@bDitta"
|
||||
END
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 3 2 "Codice "
|
||||
FLAGS "FD"
|
||||
USE LF_NDITTE
|
||||
CHECKTYPE NORMAL
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
OUTPUT F_RAGSOCDITTA RAGSOC
|
||||
END
|
||||
|
||||
STRING F_RAGSOCDITTA 50
|
||||
BEGIN
|
||||
PROMPT 17 2 "Ragione "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 7
|
||||
BEGIN
|
||||
PROMPT 1 4 "Estremi del documento"
|
||||
END
|
||||
|
||||
LISTBOX F_PROVV 14
|
||||
BEGIN
|
||||
FIELD PROVV
|
||||
PROMPT 46 7 "Tipo "
|
||||
ITEM "D|Definitiva "
|
||||
ITEM "P|Provvisoria"
|
||||
KEY 1 2
|
||||
FLAGS "DPG"
|
||||
END
|
||||
|
||||
STRING F_CODNUM 4
|
||||
BEGIN
|
||||
PROMPT 2 5 "Numerazione "
|
||||
FIELD CODNUM
|
||||
HELP "Codice numerazione"
|
||||
USE %NUM SELECT I1>4
|
||||
INPUT CODTAB F_CODNUM
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_CODNUM CODTAB
|
||||
OUTPUT F_DESNUM S0
|
||||
CHECKTYPE FORCED
|
||||
FLAG "UPA"
|
||||
WARNING "Numerazione assente"
|
||||
KEY 1 2
|
||||
END
|
||||
|
||||
STRING F_DESNUM 50
|
||||
BEGIN
|
||||
PROMPT 24 5 ""
|
||||
HELP "Descrizione numerazione"
|
||||
USE %NUM KEY 2 SELECT I1>4
|
||||
INPUT S0 F_DESNUM
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
COPY OUTPUT F_CODNUM
|
||||
END
|
||||
|
||||
STRING F_TIPODOC 4
|
||||
BEGIN
|
||||
PROMPT 2 6 "Tipo "
|
||||
FIELD TIPODOC
|
||||
HELP "Codice tipo documento"
|
||||
USE %TIP SELECT I1>4
|
||||
INPUT CODTAB F_TIPODOC
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_TIPODOC CODTAB
|
||||
OUTPUT F_DESTIPODOC S0
|
||||
CHECKTYPE FORCED
|
||||
FLAG "UP"
|
||||
END
|
||||
|
||||
STRING F_DESTIPODOC 50
|
||||
BEGIN
|
||||
PROMPT 24 6 ""
|
||||
HELP "Descrizione tipo documento"
|
||||
USE %TIP KEY 2 SELECT I1>4
|
||||
INPUT S0 F_DESTIPODOC
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
COPY OUTPUT F_TIPODOC
|
||||
END
|
||||
|
||||
NUMBER F_ANNO 4
|
||||
BEGIN
|
||||
PROMPT 2 7 "Esercizio "
|
||||
FIELD ANNO
|
||||
CHECKTYPE REQUIRED
|
||||
NUM_EXPR #F_ANNO>0
|
||||
FLAG "AP"
|
||||
KEY 1 2
|
||||
WARNING "Inserire un anno valido"
|
||||
END
|
||||
|
||||
NUMBER F_NDOC 6
|
||||
BEGIN
|
||||
PROMPT 24 7 "Numero "
|
||||
FIELD NDOC
|
||||
USE LF_DOC
|
||||
JOIN LF_CLIFO TO LF_DOC INTO TIPOCF==TIPOCF CODCF==CODCF
|
||||
INPUT PROVV F_PROVV SELECT
|
||||
INPUT ANNO F_ANNO SELECT
|
||||
INPUT CODNUM F_CODNUM SELECT
|
||||
INPUT NDOC F_NDOC
|
||||
DISPLAY "Num." CODNUM
|
||||
DISPLAY "Anno" ANNO
|
||||
DISPLAY "Provv" PROVV
|
||||
DISPLAY "Tipo" TIPODOC
|
||||
DISPLAY "N.Doc. " NDOC
|
||||
DISPLAY "Stato@R" STATO
|
||||
DISPLAY "Data\ndocumento" DATADOC
|
||||
DISPLAY "C/F" TIPOCF
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Ragione Sociale@50" LF_CLIFO->RAGSOC
|
||||
OUTPUT F_NDOC NDOC
|
||||
OUTPUT F_STATO STATO
|
||||
OUTPUT F_TIPODOC TIPODOC
|
||||
OUTPUT F_PROVV PROVV
|
||||
CHECKTYPE REQUIRED
|
||||
KEY 1 2
|
||||
FLAG "R"
|
||||
END
|
||||
|
||||
STRING F_STATO 1
|
||||
BEGIN
|
||||
PROMPT 69 7 "Stato "
|
||||
FIELD STATO
|
||||
FLAG "D"
|
||||
END
|
||||
|
||||
LIST F_TIPOCF 1 12
|
||||
BEGIN
|
||||
PROMPT 2 8 "Socio "
|
||||
ITEM "F|Fornitore"
|
||||
KEY 2
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_CODCF 6
|
||||
BEGIN
|
||||
PROMPT 24 8 "Codice "
|
||||
USE LF_DOC KEY 2 SELECT (CODNUM==#F_CODNUM) && (PROVV==#F_PROVV) && (ANNO==#F_ANNO)
|
||||
JOIN LF_CLIFO INTO TIPOCF==TIPOCF CODCF==CODCF
|
||||
JOIN LF_SOCICOOP TO LF_CLIFO INTO CODCF==CODCF
|
||||
INPUT TIPOCF F_TIPOCF SELECT
|
||||
INPUT CODCF F_CODCF
|
||||
INPUT PROVV F_PROVV
|
||||
INPUT ANNO F_ANNO
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Ragione Sociale@50" LF_CLIFO->RAGSOC
|
||||
DISPLAY "Partita IVA@12" LF_CLIFO->PAIV
|
||||
DISPLAY "Num." CODNUM
|
||||
DISPLAY "Anno" ANNO
|
||||
//DISPLAY "Provv" PROVV
|
||||
DISPLAY "Tipo" TIPODOC
|
||||
DISPLAY "N.Doc. " NDOC
|
||||
DISPLAY "Data\ndocumento" DATADOC
|
||||
//DISPLAY "Valuta" CODVAL
|
||||
DISPLAY "Totale\ndocumento@18V" G1:TOTDOC
|
||||
COPY OUTPUT F_NDOC
|
||||
OUTPUT F_CODCF CODCF
|
||||
CHECKTYPE NORMAL
|
||||
KEY 2
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
290
co/co0800.cpp
Executable file
290
co/co0800.cpp
Executable file
@ -0,0 +1,290 @@
|
||||
#include <applicat.h>
|
||||
#include <automask.h>
|
||||
#include <execp.h>
|
||||
#include <filetext.h>
|
||||
#include <progind.h>
|
||||
#include <printer.h>
|
||||
#include <sort.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "co0.h"
|
||||
#include "co0800a.h"
|
||||
#include "colib.h"
|
||||
|
||||
#include "clifo.h"
|
||||
#include "comuni.h"
|
||||
#include "doc.h"
|
||||
#include "rdoc.h"
|
||||
|
||||
#include "..\cg\cglib01.h"
|
||||
#include "..\ve\velib.h"
|
||||
|
||||
// TAutomask
|
||||
|
||||
class TImportazioneConf_mask : public TAutomask
|
||||
{
|
||||
protected:
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
public:
|
||||
TImportazioneConf_mask();
|
||||
virtual ~TImportazioneConf_mask() {};
|
||||
};
|
||||
|
||||
TImportazioneConf_mask::TImportazioneConf_mask() :TAutomask("co0800a")
|
||||
{
|
||||
}
|
||||
|
||||
bool TImportazioneConf_mask::on_field_event(TOperable_field& f, TField_event e, long jolly)
|
||||
{
|
||||
switch (f.dlg())
|
||||
{
|
||||
case F_PERCORSO:
|
||||
if (e == fe_button)
|
||||
{
|
||||
FILE_SPEC fs;
|
||||
|
||||
memset(&fs, 0, sizeof(FILE_SPEC));
|
||||
strcpy(fs.type, "");
|
||||
strcpy(fs.name, f.get());
|
||||
xvt_fsys_get_default_dir(&fs.dir);
|
||||
xvt_fsys_save_dir();
|
||||
if (xvt_dm_post_file_open(&fs, TR("Selezione file")) == FL_OK)
|
||||
{
|
||||
TFilename n;
|
||||
xvt_fsys_convert_dir_to_str(&fs.dir, n.get_buffer(n.size()), n.size());
|
||||
n.add(fs.name);
|
||||
f.set(n);
|
||||
}
|
||||
xvt_fsys_restore_dir();
|
||||
f.set_focus();
|
||||
}
|
||||
else
|
||||
if(e==fe_close) //se e = alla pressione del bottone 'chiudi' (fe_close) controlla che il campo sia stato
|
||||
{ //riempito correttamente nella maschera
|
||||
TFilename n=f.get();
|
||||
|
||||
return n.exist();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// TSkeleton_application
|
||||
|
||||
class TImportazioneConf : public TSkeleton_application
|
||||
{
|
||||
TRelation* _rel;
|
||||
TCursor* _cur;
|
||||
TProgind* _prog;
|
||||
|
||||
public:
|
||||
virtual bool create();
|
||||
virtual bool destroy();
|
||||
virtual void main_loop();
|
||||
TImportazioneConf() {}
|
||||
};
|
||||
|
||||
TImportazioneConf& app() { return (TImportazioneConf&) main_app(); }
|
||||
|
||||
bool TImportazioneConf::create()
|
||||
{
|
||||
open_files(LF_CLIFO, 0);
|
||||
return TSkeleton_application::create();
|
||||
}
|
||||
|
||||
bool TImportazioneConf::destroy()
|
||||
{
|
||||
return TApplication::destroy();
|
||||
}
|
||||
|
||||
void TImportazioneConf::main_loop()
|
||||
{
|
||||
//TConfig configfile("co0800.ini");
|
||||
TImportazioneConf_mask mask;
|
||||
TFilename trecfile;
|
||||
|
||||
TConfig confditta(CONFIG_DITTA, "co");
|
||||
const real ritqta = real(confditta.get("RitQta"));
|
||||
const real ritprezzo = real(confditta.get("RitPrezzo"));
|
||||
|
||||
|
||||
//mask.set(F_PERCORSO, configfile.get("PERCORSO", "OPZIONI"));
|
||||
|
||||
while (mask.run() == K_ENTER)
|
||||
{
|
||||
const TString4 codnum = mask.get(F_CODNUM);
|
||||
const TString4 codtipo = mask.get(F_TIPO);
|
||||
const long codmercato = mask.get_long(F_CODMERCATO);
|
||||
TDocumento_mask m(codtipo);
|
||||
TFilename nomefile = mask.get(F_PERCORSO);
|
||||
TString16 last_cf;
|
||||
TDate last_data;
|
||||
int fcf = -1, fdata = -1;
|
||||
TLocalisamfile clifo(LF_CLIFO);
|
||||
|
||||
trecfile = "cotr"; trecfile << codmercato;
|
||||
if (!trecfile.custom_path())
|
||||
trecfile = "co0800.ini";
|
||||
|
||||
TFile_text input_docs(nomefile, trecfile); //crea un oggetto articoli di tipo TFile_text
|
||||
TRecord_text trec; //crea un record vuoto con nome trec
|
||||
TTracciato_record& rec = *(input_docs.t_rec(""));
|
||||
const int nfields = rec.tracciati_campo().items();
|
||||
|
||||
clifo.setkey(4);
|
||||
for (int f = 0; f < nfields; f++)
|
||||
{
|
||||
const TTracciato_campo& c = rec.get(f);
|
||||
const TString name = c.name();
|
||||
if (name == "CF")
|
||||
fcf = f;
|
||||
else
|
||||
if (name == DOC_DATADOC)
|
||||
fdata = f;
|
||||
}
|
||||
|
||||
if (fcf < 0)
|
||||
{
|
||||
error_box("Manca il campo codice fiscale nel tracciato");
|
||||
return;
|
||||
}
|
||||
if (fdata < 0)
|
||||
{
|
||||
error_box("Manca il campo data documento nel tracciato");
|
||||
return;
|
||||
}
|
||||
const long size = fsize(nomefile);
|
||||
input_docs.open(); //applico il metodo open che apre il file in lettura (contenuta in TFile_text)
|
||||
ifstream & rf = *input_docs.read_file();
|
||||
|
||||
TProgind p(size, TR("Importazione conferimenti"), true, true);
|
||||
TDocumento * d = NULL;
|
||||
for (int i = 0; input_docs.ok_r(); i++) //ok_r é una funzione che indica la fine del file
|
||||
{
|
||||
if (!p.setstatus(rf.tellg()))
|
||||
break;
|
||||
if (input_docs.read(trec) == NOERR)
|
||||
{
|
||||
|
||||
const TString16 cf = trec.get(fcf);
|
||||
const TDate datadoc(trec.get(fdata));
|
||||
|
||||
if ((cf != last_cf) || (datadoc != last_data))
|
||||
{
|
||||
if (d != NULL && d->rows() > 0)
|
||||
{
|
||||
m.doc() = *d;
|
||||
m.doc2mask();
|
||||
m.mask2doc();
|
||||
*d = m.doc();
|
||||
TSheet_field& sh = m.sheet();
|
||||
for (int i = 1; i <= m.doc().physical_rows(); i++)
|
||||
{
|
||||
TRiga_documento& r = (*d)[i];
|
||||
r.autosave(sh);
|
||||
r.put(RDOC_SCONTO, ritprezzo);
|
||||
}
|
||||
update_spese_doc(codmercato, *d);
|
||||
d->stato(d->tipo().stato_finale_inserimento());
|
||||
d->write();
|
||||
delete d;
|
||||
d = NULL;
|
||||
}
|
||||
d = new TDocumento;
|
||||
d->zero();
|
||||
d->set_key(*d, 'D', datadoc.year(), codnum, 0L);
|
||||
clifo.put(CLI_TIPOCF, "F");
|
||||
clifo.put(CLI_COFI, cf);
|
||||
int err = clifo.read(_isequal);
|
||||
if (err != NOERR)
|
||||
error_box("Fornitore con codice fiscale %s assente errore : %d)", (const char *) cf, err);
|
||||
|
||||
const long codcf = clifo.get_long(CLI_CODCF);
|
||||
d->put(DOC_TIPODOC, codtipo);
|
||||
d->put(DOC_TIPOCF, "F");
|
||||
d->put(DOC_CODCF, codcf);
|
||||
d->put(DOC_DATADOC, datadoc);
|
||||
d->put("MERCATO", codmercato);
|
||||
for (int f = 0; f < nfields; f++)
|
||||
{
|
||||
const TTracciato_campo& c = rec.get(f);
|
||||
const TString& name = c.name();
|
||||
|
||||
if (name != "CF" && name != "DATADOC")
|
||||
if (name.full() && ((name.find("->") < 0) || (name.starts_with("33->"))))
|
||||
d->put(name, trec.get(f));
|
||||
}
|
||||
last_cf = cf;
|
||||
last_data = datadoc;
|
||||
}
|
||||
TRiga_documento& row = d->new_row("CO");
|
||||
|
||||
for (int f = 0; f < nfields; f++)
|
||||
{
|
||||
const TTracciato_campo& c = rec.get(f);
|
||||
TString name = c.name();
|
||||
TString val;
|
||||
|
||||
if (name.starts_with("34->"))
|
||||
{
|
||||
name.ltrim(4);
|
||||
val = trec.get(f);
|
||||
if (row.type(name) == _realfld)
|
||||
{
|
||||
val.replace(',', '.');
|
||||
real v(val);
|
||||
row.put(name, v);
|
||||
}
|
||||
else
|
||||
row.put(name, val);
|
||||
}
|
||||
}
|
||||
TString80 codice = row.get(RDOC_CODART);
|
||||
TString80 key;
|
||||
key.format("%06ld%s", codmercato, (const char*) codice);
|
||||
const TRectype& rec = cache().get("%COA", key);
|
||||
|
||||
if (!rec.empty())
|
||||
{
|
||||
codice = rec.get("S1");
|
||||
row.put(RDOC_CODART, codice);
|
||||
}
|
||||
real qta = row.get(RDOC_QTAGG1);
|
||||
if (ritqta > ZERO)
|
||||
qta -= qta*ritqta/CENTO;
|
||||
row.put(RDOC_QTA, qta);
|
||||
|
||||
}
|
||||
}
|
||||
if (d !=NULL && d->rows() > 0)
|
||||
{
|
||||
m.doc() = *d;
|
||||
m.doc2mask();
|
||||
m.mask2doc();
|
||||
*d = m.doc();
|
||||
TSheet_field& sh = m.sheet();
|
||||
for (int i = 1; i <= m.doc().physical_rows(); i++)
|
||||
{
|
||||
TRiga_documento& r = (*d)[i];
|
||||
r.autosave(sh);
|
||||
r.put(RDOC_SCONTO, ritprezzo);
|
||||
}
|
||||
update_spese_doc(codmercato, *d);
|
||||
d->stato(d->tipo().stato_finale_inserimento());
|
||||
d->write();
|
||||
}
|
||||
input_docs.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int co0800(int argc, char* argv[])
|
||||
{
|
||||
TImportazioneConf main_app;
|
||||
main_app.run(argc, argv, TR("Importazione conferimenti"));
|
||||
return TRUE;
|
||||
}
|
||||
|
34
co/co0800.ini
Executable file
34
co/co0800.ini
Executable file
@ -0,0 +1,34 @@
|
||||
[MAIN]
|
||||
DECSEP =
|
||||
FIELDSEP =
|
||||
RECORDSEP = \n
|
||||
RECORDSIZE =
|
||||
SKIPLINES = 1
|
||||
TYPEFIELD = -1
|
||||
TYPELEN = -1
|
||||
TYPEPOS = -1
|
||||
|
||||
[RECORD]
|
||||
LENGTH(0) = 16
|
||||
LENGTH(1) = 30
|
||||
LENGTH(2) = 6
|
||||
LENGTH(3) = 4
|
||||
LENGTH(4) = 10
|
||||
LENGTH(5) = 21
|
||||
LENGTH(6) = 10
|
||||
LENGTH(7) = 30
|
||||
LENGTH(8) = 13
|
||||
POSITION(0) = 0
|
||||
POSITION(1) = 16
|
||||
POSITION(2) = 46
|
||||
POSITION(3) = 52
|
||||
POSITION(4) = 56
|
||||
POSITION(5) = 66
|
||||
POSITION(6) = 86
|
||||
POSITION(7) = 96
|
||||
POSITION(8)= 126
|
||||
NAME(0) = CF
|
||||
NAME(2) = NFASTA
|
||||
NAME(4) = DATADOC
|
||||
NAME(6) = 34->CODART
|
||||
NAME(8) = 34->QTAGG1
|
9
co/co0800a.h
Executable file
9
co/co0800a.h
Executable file
@ -0,0 +1,9 @@
|
||||
// campi per la maschera co0800a
|
||||
|
||||
#define F_PERCORSO 101
|
||||
#define F_CODMERCATO 102
|
||||
#define F_DESMERCATO 103
|
||||
#define F_CODNUM 104
|
||||
#define F_DESNUM 105
|
||||
#define F_TIPO 106
|
||||
#define F_DESTIPO 107
|
112
co/co0800a.uml
Executable file
112
co/co0800a.uml
Executable file
@ -0,0 +1,112 @@
|
||||
#include "co0800a.h"
|
||||
|
||||
TOOLBAR "" 0 20 0 4
|
||||
|
||||
STRING DLG_PROFILE 70 50
|
||||
BEGIN
|
||||
PROMPT 9 -3 "Profilo "
|
||||
PSELECT
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Importazione conferimenti da mercato" 0 -1 0 19
|
||||
|
||||
STRING F_PERCORSO 50
|
||||
BEGIN
|
||||
PROMPT 2 2 "File da importare "
|
||||
CHECKTYPE REQUIRED
|
||||
VALIDATE NOT_EMPTY_FUNC
|
||||
FLAGS "B"
|
||||
HELP "Percorso e nome file da importare"
|
||||
WARNING "E' necessario specificare il nome del file da importare"
|
||||
END
|
||||
|
||||
NUMBER F_CODMERCATO 6
|
||||
BEGIN
|
||||
PROMPT 2 4 "Mercato "
|
||||
USE LF_MERCATICOOP
|
||||
JOIN LF_CLIFO INTO TIPOCF=='C' CODCF==CODCF
|
||||
INPUT CODCF F_CODMERCATO
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Descrizione@50" 20->RAGSOC
|
||||
OUTPUT F_CODMERCATO CODCF
|
||||
OUTPUT F_DESMERCATO 20->RAGSOC
|
||||
FLAG "U"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESMERCATO 50
|
||||
BEGIN
|
||||
PROMPT 25 4 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CODNUM 4
|
||||
BEGIN
|
||||
PROMPT 2 6 "Numerazione "
|
||||
//FIELD CODNUM
|
||||
HELP "Codice numerazione"
|
||||
USE %NUM SELECT I1==5
|
||||
INPUT CODTAB F_CODNUM
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_CODNUM CODTAB
|
||||
OUTPUT F_DESNUM S0
|
||||
CHECKTYPE FORCED
|
||||
FLAG "UPA"
|
||||
WARNING "Numerazione assente"
|
||||
KEY 1 2
|
||||
END
|
||||
|
||||
STRING F_DESNUM 50
|
||||
BEGIN
|
||||
PROMPT 25 6 ""
|
||||
HELP "Descrizione numerazione"
|
||||
USE %NUM KEY 2 SELECT I1==5
|
||||
INPUT S0 F_DESNUM
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
COPY OUTPUT F_CODNUM
|
||||
END
|
||||
|
||||
STRING F_TIPO 4
|
||||
BEGIN
|
||||
PROMPT 2 8 "Tipo "
|
||||
//FIELD TIPODOC
|
||||
HELP "Codice tipo documento"
|
||||
USE %TIP SELECT I1==5
|
||||
INPUT CODTAB F_TIPO
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_TIPO CODTAB
|
||||
OUTPUT F_DESTIPO S0
|
||||
CHECKTYPE FORCED
|
||||
FLAG "UP"
|
||||
END
|
||||
|
||||
STRING F_DESTIPO 50
|
||||
BEGIN
|
||||
PROMPT 25 8 ""
|
||||
HELP "Descrizione tipo documento"
|
||||
USE %TIP KEY 2 SELECT I1==5
|
||||
INPUT S0 F_DESTIPO
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
COPY OUTPUT F_TIPO
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
183
co/co0900.cpp
Executable file
183
co/co0900.cpp
Executable file
@ -0,0 +1,183 @@
|
||||
#include <applicat.h>
|
||||
#include <automask.h>
|
||||
#include <execp.h>
|
||||
#include <filetext.h>
|
||||
#include <progind.h>
|
||||
#include <printer.h>
|
||||
#include <reprint.h>
|
||||
#include <reputils.h>
|
||||
#include <sort.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "co0.h"
|
||||
#include "co0900a.h"
|
||||
|
||||
#include "clifo.h"
|
||||
#include "comuni.h"
|
||||
#include "doc.h"
|
||||
#include "rdoc.h"
|
||||
|
||||
#include "..\cg\cglib01.h"
|
||||
#include "..\ve\velib.h"
|
||||
|
||||
// TAutomask
|
||||
|
||||
class TAggiornaPrezzi_mask : public TAutomask
|
||||
{
|
||||
protected:
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
public:
|
||||
TAggiornaPrezzi_mask();
|
||||
virtual ~TAggiornaPrezzi_mask() {};
|
||||
};
|
||||
|
||||
TAggiornaPrezzi_mask::TAggiornaPrezzi_mask() :TAutomask ("co0900a")
|
||||
{
|
||||
}
|
||||
|
||||
bool TAggiornaPrezzi_mask::on_field_event(TOperable_field& f, TField_event e, long jolly)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
HIDDEN bool browse_file_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_F9)
|
||||
{
|
||||
FILE_SPEC fs; memset(&fs, 0, sizeof(FILE_SPEC));
|
||||
strcpy(fs.type, "");
|
||||
strcpy(fs.name, f.get());
|
||||
xvt_fsys_get_default_dir(&fs.dir);
|
||||
xvt_fsys_save_dir();
|
||||
if (xvt_dm_post_file_open(&fs, TR("Selezione file")) == FL_OK)
|
||||
{
|
||||
TFilename n;
|
||||
xvt_fsys_convert_dir_to_str(&fs.dir, n.get_buffer(n.size()), n.size());
|
||||
n.add(fs.name);
|
||||
f.set(n);
|
||||
}
|
||||
xvt_fsys_restore_dir();
|
||||
f.set_focus();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// TSkeleton_application
|
||||
|
||||
class TAggiornaPrezzi : public TSkeleton_application
|
||||
{
|
||||
TAggiornaPrezzi_mask* _msk;
|
||||
TRelation* _rel;
|
||||
TCursor* _cur;
|
||||
TProgind* _prog;
|
||||
|
||||
public:
|
||||
virtual bool create();
|
||||
virtual bool destroy();
|
||||
virtual void main_loop();
|
||||
TAggiornaPrezzi() {}
|
||||
};
|
||||
|
||||
TAggiornaPrezzi& app() { return (TAggiornaPrezzi&) main_app(); }
|
||||
|
||||
bool TAggiornaPrezzi::create()
|
||||
{
|
||||
open_files(LF_CLIFO, 0);
|
||||
_msk = new TAggiornaPrezzi_mask();
|
||||
return TSkeleton_application::create ();
|
||||
}
|
||||
|
||||
bool TAggiornaPrezzi::destroy()
|
||||
{
|
||||
delete _msk;
|
||||
return TApplication::destroy();
|
||||
}
|
||||
|
||||
void TAggiornaPrezzi::main_loop()
|
||||
{
|
||||
// TConfig configfile("co0900.ini");
|
||||
|
||||
if (_msk->run() == K_ENTER)
|
||||
{
|
||||
TLog_report log("Errori generazione documenti pianificazione");
|
||||
bool errors = false;
|
||||
|
||||
TRelation rel_doc(LF_DOC);
|
||||
TRectype darec(LF_DOC), arec(LF_DOC);
|
||||
const TDate dadata = _msk->get_date(F_DATAINI);
|
||||
const TDate adata = _msk->get_date(F_DATAFIN);
|
||||
const int anno = dadata.year();
|
||||
const TString8 codnum = _msk->get(F_CODNUM);
|
||||
const TString8 codmer = _msk->get(F_CODMER);
|
||||
const TString80 codart = _msk->get(F_CODART);
|
||||
const real prezzo = _msk->get_real(F_PREZZO);
|
||||
|
||||
darec.put(DOC_DATADOC, dadata);
|
||||
darec.put(DOC_PROVV, "D");
|
||||
darec.put(DOC_ANNO, anno);
|
||||
darec.put(DOC_CODNUM, codnum);
|
||||
|
||||
arec.put(DOC_DATADOC, adata);
|
||||
arec.put(DOC_PROVV, "D");
|
||||
arec.put(DOC_ANNO, anno);
|
||||
arec.put(DOC_CODNUM, codnum);
|
||||
|
||||
TString filtro;
|
||||
filtro << "CODNUM='" << codnum << "'";
|
||||
TCursor cur_doc (&rel_doc, filtro, 3, &darec, &arec);
|
||||
const long items = cur_doc.items();
|
||||
TProgind progind(items, "Aggiornamento prezzi in corso...", false, true);
|
||||
|
||||
for (cur_doc = 0; cur_doc.pos() < items; ++cur_doc)
|
||||
{
|
||||
TDocumento doc(cur_doc.curr());
|
||||
|
||||
if (codmer == doc.get("MERCATO"))
|
||||
{
|
||||
bool rewrite = false;
|
||||
|
||||
progind.addstatus(1);
|
||||
for (int i = 1; i <= doc.rows(); i++)
|
||||
{
|
||||
TRiga_documento& row = doc[i];
|
||||
const TString80 codice(row.get(RDOC_CODART));
|
||||
|
||||
if (row.is_articolo() && codice == codart)
|
||||
{
|
||||
rewrite = true;
|
||||
row.put(RDOC_PREZZO, prezzo);
|
||||
}
|
||||
}
|
||||
if (rewrite)
|
||||
{
|
||||
int err = doc.rewrite();
|
||||
if (err != NOERR)
|
||||
{
|
||||
TString errore;
|
||||
errore.format("Errore %d nell'aggiornamento del documento %ld", err, doc.get_long(DOC_NDOC));
|
||||
log.log(2, errore);
|
||||
errors = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (errors)
|
||||
{
|
||||
TReport_book buc;
|
||||
buc.add(log);
|
||||
buc.preview();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int co0900(int argc, char* argv[])
|
||||
{
|
||||
TAggiornaPrezzi main_app;
|
||||
main_app.run(argc, argv, TR("Aggiornamento prezzi"));
|
||||
return TRUE;
|
||||
}
|
||||
|
11
co/co0900a.h
Executable file
11
co/co0900a.h
Executable file
@ -0,0 +1,11 @@
|
||||
// campi per la maschera co0900a
|
||||
|
||||
#define F_CODMER 101
|
||||
#define F_DESMER 102
|
||||
#define F_CODART 103
|
||||
#define F_DESART 104
|
||||
#define F_DATAINI 105
|
||||
#define F_DATAFIN 106
|
||||
#define F_PREZZO 107
|
||||
#define F_CODNUM 108
|
||||
#define F_DESNUM 109
|
116
co/co0900a.uml
Executable file
116
co/co0900a.uml
Executable file
@ -0,0 +1,116 @@
|
||||
#include "co0900a.h"
|
||||
|
||||
TOOLBAR "" 0 20 0 2
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Aggiornamento prezzi" 0 -1 0 19
|
||||
|
||||
STRING F_CODNUM 4
|
||||
BEGIN
|
||||
PROMPT 2 2 "Numerazione "
|
||||
FIELD CODNUM
|
||||
HELP "Codice numerazione"
|
||||
USE %NUM SELECT I1==5
|
||||
INPUT CODTAB F_CODNUM
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_CODNUM CODTAB
|
||||
OUTPUT F_DESNUM S0
|
||||
CHECKTYPE FORCED
|
||||
FLAG "UPA"
|
||||
WARNING "Numerazione assente"
|
||||
KEY 1 2
|
||||
END
|
||||
|
||||
STRING F_DESNUM 50
|
||||
BEGIN
|
||||
PROMPT 37 2 ""
|
||||
HELP "Descrizione numerazione"
|
||||
USE %NUM KEY 2 SELECT I1==5
|
||||
INPUT S0 F_DESNUM
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
COPY OUTPUT F_CODNUM
|
||||
END
|
||||
|
||||
NUMBER F_CODMER 6
|
||||
BEGIN
|
||||
PROMPT 2 4 "Mercato "
|
||||
USE LF_MERCATICOOP
|
||||
JOIN LF_CLIFO INTO TIPOCF=='C' CODCF==CODCF
|
||||
INPUT CODCF F_CODMER
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Descrizione@50" 20->RAGSOC
|
||||
OUTPUT F_CODMER CODCF
|
||||
OUTPUT F_DESMER 20->RAGSOC
|
||||
FLAG "U"
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_DESMER 50
|
||||
BEGIN
|
||||
PROMPT 37 4 ""
|
||||
USE LF_CLIFO KEY 2
|
||||
JOIN LF_MERCATICOOP INTO CODCF==CODCF
|
||||
INPUT TIPOCF "C"
|
||||
INPUT RAGSOC F_DESMER
|
||||
DISPLAY "Descrizione@50" RAGSOC
|
||||
DISPLAY "Codice" LF_MERCATICOOP->CODCF
|
||||
COPY OUTPUT F_CODMER
|
||||
END
|
||||
|
||||
STRING F_CODART 20
|
||||
BEGIN
|
||||
PROMPT 2 6 "Articolo "
|
||||
FLAG "U"
|
||||
USE LF_ANAMAG
|
||||
INPUT CODART F_CODART
|
||||
DISPLAY "Codice@20" CODART
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_CODART CODART
|
||||
OUTPUT F_DESART DESCR
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESART 50
|
||||
BEGIN
|
||||
PROMPT 37 6 ""
|
||||
USE LF_ANAMAG KEY 2
|
||||
INPUT DESCR F_DESART
|
||||
DISPLAY "Codice@20" CODART
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_CODART CODART
|
||||
OUTPUT F_DESART DESCR
|
||||
END
|
||||
|
||||
DATE F_DATAINI
|
||||
BEGIN
|
||||
PROMPT 2 8 "Data iniz. "
|
||||
END
|
||||
|
||||
DATE F_DATAFIN
|
||||
BEGIN
|
||||
PROMPT 37 8 "Data fin. "
|
||||
END
|
||||
|
||||
CURRENCY F_PREZZO 18
|
||||
BEGIN
|
||||
PROMPT 2 10 "Prezzo "
|
||||
FLAG "U"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
22
co/co1.cpp
Executable file
22
co/co1.cpp
Executable file
@ -0,0 +1,22 @@
|
||||
#include <xvt.h>
|
||||
#include "co1.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
const int n = argc > 1 ? argv[1][1]-'0' : 0;
|
||||
switch (n)
|
||||
{
|
||||
case 2:
|
||||
co1300(argc, argv); // Stampa estratto conto
|
||||
break;
|
||||
case 3:
|
||||
co1400(argc, argv); // Fatturazione Conferimenti
|
||||
break;
|
||||
//case 4:
|
||||
// co1500(argc, argv); // Invio mov.coop. a TeamSystem
|
||||
// break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
3
co/co1.h
Executable file
3
co/co1.h
Executable file
@ -0,0 +1,3 @@
|
||||
int co1300(int argc, char* argv[]);
|
||||
int co1400(int argc, char* argv[]);
|
||||
//int co1500(int argc, char* argv[]);
|
2
co/co1100a.h
Executable file
2
co/co1100a.h
Executable file
@ -0,0 +1,2 @@
|
||||
#define F_CODDITTA 101
|
||||
#define F_RAGSOC 102
|
77
co/co1100a.rep
Executable file
77
co/co1100a.rep
Executable file
@ -0,0 +1,77 @@
|
||||
|
||||
<report name="co1100a" orientation="2" lpi="6">
|
||||
<description>Stampa libro soci</description>
|
||||
<font face="Courier New" size="7" />
|
||||
<section type="Head" />
|
||||
<section type="Head" level="1">
|
||||
<field border="2" y="0.5" type="Linea" width="196" height="0" pattern="1" />
|
||||
<field x="1" y="1" type="Testo" width="5" pattern="1" text="Codice" />
|
||||
<field x="8" y="1" type="Testo" width="20" pattern="1" text="Denominazine Indirizzo" />
|
||||
<field x="40" y="1" type="Testo" width="3" pattern="1" text="Cap" />
|
||||
<field x="46" y="1" type="Testo" width="8" pattern="1" text="Localit&#E0;" />
|
||||
<field x="67" y="1" type="Testo" width="5" pattern="1" text="Prov." />
|
||||
<field x="76" y="1" type="Testo" width="14" pattern="1" text="Codice fiscale" />
|
||||
<field x="95" y="1" type="Testo" width="11" pattern="1" text="Partita iva" />
|
||||
<field x="108" y="1" type="Testo" width="13" pattern="1" text="Data nascita" />
|
||||
<field x="122" y="1" type="Testo" width="13" pattern="1" text="Luogo nascita" />
|
||||
<field x="137" y="1" type="Testo" width="5" pattern="1" text="Prov." />
|
||||
<field x="144" y="1" type="Testo" width="15" pattern="1" text="Data assunzione" />
|
||||
<field x="161" y="1" type="Testo" width="12" pattern="1" text="Data recess." />
|
||||
<field x="175" y="1" type="Testo" width="7" pattern="1" text="N.quote" />
|
||||
<field x="184" y="1" type="Testo" width="12" pattern="1" text="Valore quote" />
|
||||
<field border="2" y="2.5" type="Linea" width="196" height="0" pattern="1" />
|
||||
</section>
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1">
|
||||
<field type="Numero" align="right" width="6" pattern="1">
|
||||
<source>CLIFO.CODCF</source>
|
||||
</field>
|
||||
<field x="8" type="Stringa" width="30" height="2" pattern="1">
|
||||
<source>CLIFO.RAGSOC</source>
|
||||
</field>
|
||||
<field x="39" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<source>CLIFO.CAPCF</source>
|
||||
</field>
|
||||
<field x="46" type="Stringa" width="20" height="2" pattern="1">
|
||||
<source>101@.DENCOM</source>
|
||||
</field>
|
||||
<field x="67.5" type="Stringa" width="2" pattern="1">
|
||||
<source>COMUNI.PROVCOM</source>
|
||||
</field>
|
||||
<field x="76" type="Stringa" width="16" pattern="1">
|
||||
<source>CLIFO.COFI</source>
|
||||
</field>
|
||||
<field x="95" type="Stringa" width="12" pattern="1">
|
||||
<source>CLIFO.PAIV</source>
|
||||
</field>
|
||||
<field x="110" type="Data" width="10" pattern="1">
|
||||
<source>CLIFO.DATANASC</source>
|
||||
</field>
|
||||
<field x="122" type="Stringa" width="20" height="2" pattern="1">
|
||||
<source>102@.DENCOM</source>
|
||||
</field>
|
||||
<field x="143" type="Stringa" width="2" pattern="1">
|
||||
<source>102@.PROVCOM</source>
|
||||
</field>
|
||||
<field x="147" type="Data" width="10" pattern="1">
|
||||
<source>SOCICOOP.DATAASS</source>
|
||||
</field>
|
||||
<field x="161" type="Data" width="10" pattern="1">
|
||||
<source>SOCICOOP.DATAREC</source>
|
||||
</field>
|
||||
<field x="175" type="Stringa" width="5" pattern="1">
|
||||
<source>SOCICOOP.NUMQUOTE</source>
|
||||
</field>
|
||||
<field x="184" type="Stringa" width="10" pattern="1">
|
||||
<source>SOCICOOP.VALQUOTE</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" />
|
||||
<section type="Foot" level="1" />
|
||||
<sql>USE CLIFO
|
||||
JOIN COMUNI ALIAS 101 INTO STATO==STATOCF COM==COMCF
|
||||
JOIN COMUNI ALIAS 102 INTO COM==COMNASC
|
||||
JOIN SOCICOOP INTO CODCF=CODCF
|
||||
FROM TIPOCF='F'
|
||||
TO TIPOCF='F'</sql>
|
||||
</report>
|
39
co/co1100a.uml
Executable file
39
co/co1100a.uml
Executable file
@ -0,0 +1,39 @@
|
||||
#include "co1100a.h"
|
||||
|
||||
PAGE "Stampa libro soci" 0 -1 78 7
|
||||
|
||||
GROUPBOX DLG_NULL 76 3
|
||||
BEGIN
|
||||
PROMPT 2 1 "@bDitta corrente"
|
||||
END
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 3 2 "Codice "
|
||||
FLAGS "FD"
|
||||
USE LF_NDITTE
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 23 2 ""
|
||||
FLAGS "D"
|
||||
//FIELD RAGSOC
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
8
co/co1200a.h
Executable file
8
co/co1200a.h
Executable file
@ -0,0 +1,8 @@
|
||||
#define F_FROMCLIENTE 101
|
||||
#define F_TOCLIENTE 102
|
||||
#define F_DADATA 103
|
||||
#define F_ADATA 104
|
||||
#define F_ANNO 105
|
||||
#define F_FROMCODART 106
|
||||
#define F_TOCODART 107
|
||||
#define F_CODNUM 108
|
183
co/co1200a.rep
Executable file
183
co/co1200a.rep
Executable file
@ -0,0 +1,183 @@
|
||||
|
||||
<report name="co1200a" orientation="2" lpi="6">
|
||||
<description>STAMPA CONFERIMENTI</description>
|
||||
<font face="Courier New" size="8" />
|
||||
<section type="Head" />
|
||||
<section type="Head" level="1">
|
||||
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1.101|RESET,F1.102|RESET,F1.103|RESET,F1.104|RESET,F1.105|RESET,F1.106|RESET,F1.107|RESET,F1.108</prescript>
|
||||
<field border="2" y="0.43" type="Linea" width="196" height="0" pattern="1" />
|
||||
<field y="1" type="Testo" width="5" pattern="1" text="Ditta" />
|
||||
<field y="2" type="Testo" width="10" pattern="1" text="Dalla data" />
|
||||
<field x="11" y="2" type="Data" align="right" width="5" pattern="1">
|
||||
<source>#DADATA</source>
|
||||
</field>
|
||||
<field x="22" y="2" type="Testo" width="10" pattern="1" text="alla data" />
|
||||
<field x="32" y="2" type="Data" width="10" pattern="1">
|
||||
<source>#ADATA</source>
|
||||
</field>
|
||||
<field x="48" y="2" type="Testo" width="11" pattern="1" text="Dal mercato" />
|
||||
<field x="60" y="2" type="Numero" align="right" width="4" pattern="1">
|
||||
<source>#DAMERCATO</source>
|
||||
</field>
|
||||
<field x="67" y="2" type="Testo" width="10" pattern="1" text="al mercato" />
|
||||
<field x="78" y="2" type="Numero" align="right" width="4" pattern="1">
|
||||
<source>#AMERCATO</source>
|
||||
</field>
|
||||
<field x="87" y="2" type="Testo" width="18" pattern="1" text="Dal tipo movimento" />
|
||||
<field x="107" y="2" type="Stringa" align="right" width="4" pattern="1">
|
||||
<source>#DACODART</source>
|
||||
</field>
|
||||
<field x="113" y="2" type="Testo" width="18" pattern="1" text="Dal tipo movimento" />
|
||||
<field x="133" y="2" type="Stringa" width="4" pattern="1">
|
||||
<source>#DACODART</source>
|
||||
</field>
|
||||
<field border="2" x="0.12" y="3.68" type="Linea" width="196" height="0" pattern="1" />
|
||||
<field y="4" type="Testo" width="4" pattern="1" text="Data">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="10" y="4" type="Testo" width="12" pattern="1" text="Codice socio">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="44.5" y="4" type="Testo" width="8" pattern="1" text="N.f.asta ">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="56" y="4" type="Testo" width="14" pattern="1" text="Tipo movimento">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="92" y="4" type="Testo" width="14" pattern="1" text="Codice mercato">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="131" y="4" type="Testo" width="6" pattern="1" text="N.reg.">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="15" y="5" type="Testo" width="8" pattern="1" text="Quantit&#E0;" />
|
||||
<field x="26" y="5" type="Testo" width="6" pattern="1" text="Prezzo" />
|
||||
<field x="52" y="5" type="Testo" width="11" pattern="1" text="Spese varie" />
|
||||
<field x="67" y="5" type="Testo" width="13" pattern="1" text="Totale ricavo" />
|
||||
<field x="82" y="5" type="Testo" width="5" pattern="1" text="A.iva" />
|
||||
<field x="91" y="5" type="Testo" width="7" pattern="1" text="Imposta" />
|
||||
<field x="109" y="5" type="Testo" width="6" pattern="1" text="Totale" />
|
||||
<field x="124" y="5" type="Testo" width="13" pattern="1" text="Rit.acc.spese" />
|
||||
<field x="38.62" y="5.12" type="Testo" width="7" pattern="1" text="Importo" />
|
||||
<field border="2" x="-5.13" y="6.5" type="Linea" width="196" height="0" pattern="1" />
|
||||
</section>
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1" />
|
||||
<section type="Head" level="11" />
|
||||
<section type="Body" level="11">
|
||||
<sql>USE RDOC
|
||||
JOIN 47 INTO CODART==CODARTMAG
|
||||
FROM PROVV=#PARENT.PROVV ANNO=#PARENT.ANNO CODNUM=#PARENT.CODNUM NDOC=#PARENT.NDOC
|
||||
TO PROVV=#PARENT.PROVV ANNO=#PARENT.ANNO CODNUM=#PARENT.CODNUM NDOC=#PARENT.NDOC
|
||||
</sql>
|
||||
<field x="1" y="1" type="Data" width="10" pattern="1">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<source>#PARENT.DATADOC</source>
|
||||
</field>
|
||||
<field x="15" y="1" type="Stringa" width="10" pattern="1">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<source>#PARENT.CODCF</source>
|
||||
</field>
|
||||
<field x="26" y="1" type="Stringa" width="35" pattern="1">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<prescript description="B11.0 PRESCRIPT">MESSAGE _ISAMREAD,CLIFO,TIPOCF='C'!CODCF=#PARENT.CODCF,RAGSOC</prescript>
|
||||
</field>
|
||||
<field x="71" y="1" type="Stringa" width="10" pattern="1">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<source>#PARENT.NFASTA</source>
|
||||
</field>
|
||||
<field x="83" y="1" type="Stringa" width="10" pattern="1">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<source>RDOC.CODARTMAG</source>
|
||||
</field>
|
||||
<field x="94" y="1" type="Stringa" width="35" pattern="1">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<source>ANAMAG.DESCR</source>
|
||||
</field>
|
||||
<field x="140" y="1" type="Stringa" width="10" pattern="1">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<source>#PARENT.MERCATO</source>
|
||||
</field>
|
||||
<field x="151" y="1" type="Stringa" width="10" pattern="1">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<prescript description="B11.0 PRESCRIPT">MESSAGE _ISAMREAD,CLIFO,TIPOCF='C'!CODCF=#PARENT.MERCATO,RAGSOC</prescript>
|
||||
</field>
|
||||
<field x="161.5" y="1" type="Numero" align="right" width="10" pattern="1">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<source>#PARENT.NDOC</source>
|
||||
</field>
|
||||
<field x="1" y="3" type="Testo" width="12" pattern="1" text="Cooperativa:">
|
||||
<source>#PARENT.101@.CODCF</source>
|
||||
</field>
|
||||
<field x="15" y="3" type="Numero" align="right" width="15" pattern="1">
|
||||
<source>RDOC.QTAGG1</source>
|
||||
<prescript>MESSAGE ADD,F1.101</prescript>
|
||||
</field>
|
||||
<field x="32" y="3" type="Numero" align="right" width="4" pattern="1">
|
||||
<source>RDOC.PREZZONN</source>
|
||||
</field>
|
||||
<field x="65" y="3" type="Valuta" align="right" width="11" pattern="1" text="#########,@@">
|
||||
<source>RDOC.IMPCNN</source>
|
||||
<prescript>MESSAGE ADD,F1.103</prescript>
|
||||
</field>
|
||||
<field x="101" y="3" type="Testo" align="right" width="13" pattern="1" text="Numero casse:">
|
||||
<source>N1</source>
|
||||
</field>
|
||||
<field x="115" y="3" type="Numero" align="right" width="10" pattern="1">
|
||||
<source>RDOC.NCOLLI</source>
|
||||
</field>
|
||||
<field x="141" y="3" type="Testo" align="right" width="23" pattern="1" text="Detrazione su quantit&#E0;:">
|
||||
<source>N1</source>
|
||||
</field>
|
||||
<field x="1" y="5" type="Testo" width="10" pattern="1" text="Pescatore:">
|
||||
<source>#PARENT.101@.CODCF</source>
|
||||
</field>
|
||||
<field x="15" y="5" type="Numero" align="right" width="13" pattern="1">
|
||||
<source>RDOC.QTA</source>
|
||||
<prescript>MESSAGE ADD,F1.102</prescript>
|
||||
</field>
|
||||
<field x="32" y="5" type="Prezzo" align="right" width="11" pattern="1" text="#########,@@">
|
||||
<source>RDOC.PREZZONS</source>
|
||||
</field>
|
||||
<field x="65" y="5" type="Valuta" align="right" width="11" pattern="1" text="#########,@@">
|
||||
<source>RDOC.IMPCNS</source>
|
||||
<prescript>MESSAGE ADD,F1.104</prescript>
|
||||
</field>
|
||||
<field x="101" y="5" type="Valuta" align="right" width="11" pattern="1" text="#########,@@">
|
||||
<source>RDOC.IMPCNS</source>
|
||||
<prescript>MESSAGE ADD,F1.105</prescript>
|
||||
</field>
|
||||
<field x="141" y="5" type="Valuta" align="right" width="11" pattern="1" text="#########,@@">
|
||||
<source>RDOC.IMPCNS</source>
|
||||
<prescript>MESSAGE ADD,F1.106</prescript>
|
||||
</field>
|
||||
<field x="158.5" y="5" type="Valuta" align="right" width="13" pattern="1" text="#########,@@">
|
||||
<source>RDOC.RITENUTA</source>
|
||||
<prescript>MESSAGE ADD,F1.107</prescript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" level="11" />
|
||||
<section type="Foot" />
|
||||
<section type="Foot" level="1">
|
||||
<field x="1" y="0.5" type="Testo" align="right" width="10" pattern="1" text="Totali :">
|
||||
<source>RDOC.IMPCNS</source>
|
||||
</field>
|
||||
<field x="60" y="0.5" type="Testo" align="right" width="15" pattern="1" text="Numero casse :">
|
||||
<source>RDOC.IMPCNS</source>
|
||||
</field>
|
||||
<field x="13" y="0.5" type="Numero" align="right" width="11" id="101" pattern="1" />
|
||||
<field x="13" y="2" type="Numero" align="right" width="11" id="102" pattern="1" />
|
||||
<field x="35" y="0.5" type="Valuta" align="right" width="11" id="103" pattern="1" text="#########,@@" />
|
||||
<field x="35" y="2" type="Valuta" align="right" width="11" id="104" pattern="1" text="#########,@@" />
|
||||
<field x="76" y="2" type="Valuta" align="right" width="11" id="105" pattern="1" text="#########,@@" />
|
||||
<field x="100" y="2" type="Valuta" align="right" width="11" id="106" pattern="1" text="#########,@@" />
|
||||
<field x="117" y="2" type="Valuta" align="right" width="11" id="107" pattern="1" text="#########,@@" />
|
||||
<field x="76" y="0.5" type="Numero" align="right" width="10" id="108" pattern="1" />
|
||||
</section>
|
||||
<sql>USE DOC
|
||||
SELECT (NUM(ANSI(DATADOC))E;=NUM(ANSI(#DADATA)))(NUM(ANSI(DATADOC))C;=NUM(ANSI(#ADATA)))
|
||||
FROM PROVV='D' ANNO=#ANNO CODNUM=#CODNUM
|
||||
TO PROVV='D' ANNO=#ANNO CODNUM=#CODNUM
|
||||
|
||||
</sql>
|
||||
</report>
|
113
co/co1200a.uml
Executable file
113
co/co1200a.uml
Executable file
@ -0,0 +1,113 @@
|
||||
#include "co1200a.h"
|
||||
|
||||
PAGE "Stampa Conferimenti" -1 -1 78 10
|
||||
|
||||
NUMBER F_FROMCLIENTE 6
|
||||
BEGIN
|
||||
PROMPT 5 1 "Da mercato "
|
||||
USE LF_CLIFO
|
||||
INPUT TIPOCF "C"
|
||||
INPUT CODCF F_FROMCLIENTE
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Ragione sociale@50" RAGSOC
|
||||
OUTPUT F_FROMCLIENTE CODCF
|
||||
FIELD #DAMERCATO
|
||||
END
|
||||
|
||||
NUMBER F_TOCLIENTE 6
|
||||
BEGIN
|
||||
PROMPT 5 2 "A mercato "
|
||||
USE LF_CLIFO
|
||||
INPUT TIPOCF "C"
|
||||
INPUT CODCF F_TOCLIENTE
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Ragione sociale@50" RAGSOC
|
||||
OUTPUT F_TOCLIENTE CODCF
|
||||
NUM_EXPR #F_TOCLIENTE>=#F_FROMCLIENTE
|
||||
WARNING "Range codice cliente non corretto"
|
||||
FIELD #AMERCATO
|
||||
END
|
||||
|
||||
DATE F_DADATA
|
||||
BEGIN
|
||||
PROMPT 50 1 "Da data "
|
||||
FIELD #DADATA
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
DATE F_ADATA
|
||||
BEGIN
|
||||
PROMPT 50 2 "A data "
|
||||
FIELD #ADATA
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_ANNO 4
|
||||
BEGIN
|
||||
PROMPT 50 3 "Anno "
|
||||
FIELD #ANNO
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_FROMCODART 20
|
||||
BEGIN
|
||||
PROMPT 5 4 "Da tipo movimento "
|
||||
FLAGS "U"
|
||||
USE LF_ANAMAG
|
||||
INPUT CODART F_FROMCODART
|
||||
DISPLAY "Articolo@20" CODART
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_FROMCODART CODART
|
||||
GROUP G_ART G_ALL
|
||||
FIELD #DACODART
|
||||
END
|
||||
|
||||
STRING F_TOCODART 20
|
||||
BEGIN
|
||||
PROMPT 5 5 "A tipo movimento "
|
||||
FLAGS "U"
|
||||
USE LF_ANAMAG
|
||||
INPUT CODART F_TOCODART
|
||||
DISPLAY "Articolo@20" CODART
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_TOCODART CODART
|
||||
GROUP G_ART G_ALL
|
||||
STR_EXPR #F_TOCODART>=#F_FROMCODART
|
||||
WARNING "Range codice articolo non corretto"
|
||||
FIELD #ACODART
|
||||
END
|
||||
|
||||
STRING F_CODNUM 4
|
||||
BEGIN
|
||||
PROMPT 5 6 "Numerazione "
|
||||
USE %NUM
|
||||
INPUT CODTAB F_CODNUM
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizone@50" S0
|
||||
OUTPUT F_CODNUM CODTAB
|
||||
CHECKTYPE REQUIRED
|
||||
FIELD #CODNUM
|
||||
END
|
||||
|
||||
BUTTON DLG_PRINT 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 "~Stampa"
|
||||
MESSAGE EXIT,K_ENTER
|
||||
END
|
||||
|
||||
STRING DLG_PROFILE 50
|
||||
BEGIN
|
||||
PROMPT 5 7 "Profilo "
|
||||
PSELECT
|
||||
END
|
||||
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
138
co/co1300.cpp
Executable file
138
co/co1300.cpp
Executable file
@ -0,0 +1,138 @@
|
||||
#include <applicat.h>
|
||||
#include <automask.h>
|
||||
#include <reprint.h>
|
||||
#include <textset.h>
|
||||
|
||||
#include "co1.h"
|
||||
#include "co1300a.h"
|
||||
|
||||
#include <socicoop.h>
|
||||
|
||||
#include "..\ve\velib.h"
|
||||
#include "..\ve\velib07.h"
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// MASCHERA
|
||||
////////////////////////////////////////////////////////
|
||||
class TEstrattoConto_mask : public TAutomask
|
||||
{
|
||||
protected:
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
public:
|
||||
TEstrattoConto_mask();
|
||||
virtual ~TEstrattoConto_mask() {};
|
||||
};
|
||||
|
||||
TEstrattoConto_mask::TEstrattoConto_mask() :TAutomask ("co1300a")
|
||||
{
|
||||
}
|
||||
|
||||
bool TEstrattoConto_mask::on_field_event(TOperable_field& f, TField_event e, long jolly)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// REPORT
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
class TEstrattoConto_rep : public TDocument_report
|
||||
{
|
||||
protected:
|
||||
virtual bool use_mask() {return false;}
|
||||
};
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// APPLICAZIONE
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
struct TRiga_totale
|
||||
{
|
||||
TString80 _descr;
|
||||
real _qta;
|
||||
real _acc;
|
||||
real _impcredito;
|
||||
real _impdebito;
|
||||
};
|
||||
|
||||
class TEstrattoConto : public TSkeleton_application
|
||||
{
|
||||
public:
|
||||
virtual void main_loop();
|
||||
};
|
||||
|
||||
void TEstrattoConto::main_loop()
|
||||
{
|
||||
TEstrattoConto_mask m;
|
||||
while (m.run() == K_ENTER)
|
||||
{
|
||||
TReport_book book;
|
||||
TEstrattoConto_rep rep;
|
||||
rep.load("co1300a");
|
||||
|
||||
const TDate dataini = m.get_date(F_DATAINI);
|
||||
const TDate datafin = m.get_date(F_DATAFIN);
|
||||
const int anno = dataini.year();
|
||||
|
||||
// creo recordset dei soci da stampare
|
||||
TISAM_recordset soci("USE SOCICOOP\nFROM CODCF=#DASOCIO\nTO CODCF=#ASOCIO");
|
||||
soci.set_var("#DASOCIO", m.get_long(F_DASOCIO));
|
||||
soci.set_var("#ASOCIO", m.get_long(F_ASOCIO));
|
||||
|
||||
for (bool ok = soci.move_first(); ok; ok = soci.move_next())
|
||||
{
|
||||
TRecordset * r = rep.recordset();
|
||||
long codcf = soci.get(SC_CODCF).as_int();
|
||||
r->set_var("#SOCIO", soci.get("CODCF"));
|
||||
r->set_var("#ANNO", TVariant(long(anno)));
|
||||
r->set_var("#DATAINI", dataini);
|
||||
r->set_var("#DATAFIN", datafin);
|
||||
|
||||
// calcolo totali per articolo
|
||||
TAssoc_array totali_art;
|
||||
|
||||
TReport_section& body2 = rep.section('B', 12);
|
||||
for (bool ok = r->move_first(); ok; ok = r->move_next())
|
||||
{
|
||||
TRecordset* rr = rep.section('B', 11).recordset();
|
||||
for (bool okr = rr->move_first(); okr; okr = rr->move_next())
|
||||
{
|
||||
const TString& codart = rr->get(RDOC_CODART).as_string();
|
||||
TRiga_totale* rt = (TRiga_totale*) totali_art.objptr(codart);
|
||||
if (rt == NULL)
|
||||
{
|
||||
rt = new TRiga_totale;
|
||||
rt->_descr = rr->get(RDOC_DESCR).as_string();
|
||||
totali_art.add(codart, (TObject*) rt);
|
||||
}
|
||||
// sommare qta e importi
|
||||
real qta = rr->get(RDOC_QTA).as_real();
|
||||
rt->_qta += qta;
|
||||
}
|
||||
}
|
||||
// devo passare il recordset al report
|
||||
TCSV_recordset csv("");
|
||||
|
||||
FOR_EACH_ASSOC_OBJECT(totali_art, o, k, it)
|
||||
{
|
||||
TRiga_totale& rt = (TRiga_totale&) *it;
|
||||
csv.new_rec("");
|
||||
TVariant descr = rt._descr;
|
||||
csv.set(0, descr);
|
||||
csv.set(1, rt._qta);
|
||||
}
|
||||
body2.set_recordset(&csv);
|
||||
book.add(rep);
|
||||
}
|
||||
book.print_or_preview();
|
||||
}
|
||||
}
|
||||
|
||||
int co1300(int argc, char* argv[])
|
||||
{
|
||||
TEstrattoConto a;
|
||||
a.run(argc, argv, TR("Stampa estratto conto"));
|
||||
return 0;
|
||||
}
|
9
co/co1300a.h
Executable file
9
co/co1300a.h
Executable file
@ -0,0 +1,9 @@
|
||||
// campi per la maschera co1300a
|
||||
|
||||
#define F_DASOCIO 101
|
||||
#define F_ASOCIO 102
|
||||
#define F_ANNO 103
|
||||
#define F_DATAINI 104
|
||||
#define F_DATAFIN 105
|
||||
#define F_DESDASOCIO 106
|
||||
#define F_DESASOCIO 107
|
229
co/co1300a.rep
Executable file
229
co/co1300a.rep
Executable file
@ -0,0 +1,229 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<report name="co1300a" orientation="2" lpi="6">
|
||||
<description>Stampa Estratto Conto Socio</description>
|
||||
<font face="Courier New" size="8" />
|
||||
<section type="Head">
|
||||
<field x="1" y="1" type="Stringa" width="10" pattern="1">
|
||||
<source>101@.CODCF</source>
|
||||
</field>
|
||||
<field x="133" y="1" type="Data" width="12" pattern="1">
|
||||
<source>#SYSTEM.DATE</source>
|
||||
</field>
|
||||
<field x="1" y="2" type="Stringa" width="50" pattern="1">
|
||||
<source>101@.RAGSOC</source>
|
||||
</field>
|
||||
<field x="68" y="2" type="Testo" width="20" pattern="1" text="Estratto conto">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="90" y="2" type="Data" width="12" pattern="1">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<source>#DATAINI</source>
|
||||
</field>
|
||||
<field x="107" y="2" type="Testo" width="1" pattern="1" text="-">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="110" y="2" type="Data" width="12" pattern="1">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<source>#DATAFIN</source>
|
||||
</field>
|
||||
<field x="1" y="3" type="Stringa" width="50" pattern="1">
|
||||
<source>101@.INDCF+" ,"+101@.CIVCF</source>
|
||||
</field>
|
||||
<field x="1" y="4" type="Stringa" width="50" pattern="1">
|
||||
<source>101@.LOCALITACF</source>
|
||||
</field>
|
||||
<field x="1" y="5" type="Stringa" width="50" pattern="1">
|
||||
<source>101@.CAPCF+" "+COMUNI.DENCOM+" "+COMUNI.PROVCOM</source>
|
||||
</field>
|
||||
<field x="1" y="8" type="Testo" width="10" pattern="1" text="Data">
|
||||
<source>#PARENT.DATADOC</source>
|
||||
</field>
|
||||
<field x="12" y="8" type="Testo" width="30" pattern="1" text="Articolo">
|
||||
<source>DESCR</source>
|
||||
</field>
|
||||
<field x="43" y="8" type="Testo" width="10" pattern="1" text="N.f.asta">
|
||||
<source>#PARENT.NFASTA</source>
|
||||
</field>
|
||||
<field x="52" y="8" type="Testo" align="right" width="10" pattern="1" text="Q.ta">
|
||||
<source>Q.ta</source>
|
||||
</field>
|
||||
<field x="63" y="8" type="Testo" align="right" width="10" pattern="1" text="Prezzo">
|
||||
<source>34.PREZZONN</source>
|
||||
</field>
|
||||
<field x="74" y="8" type="Testo" align="right" width="10" pattern="1" text="Prz.-acc.">
|
||||
<source>PREZZONS</source>
|
||||
</field>
|
||||
<field x="85" y="8" type="Testo" align="right" width="10" pattern="1" text="Acc.">
|
||||
<source>RITENUTA</source>
|
||||
</field>
|
||||
<field x="96" y="8" type="Testo" align="right" width="15" pattern="1" text="Imp.a credito">
|
||||
<source>IMPCNS</source>
|
||||
</field>
|
||||
<field x="112" y="8" type="Testo" align="right" width="15" pattern="1" text="Imp.a debito">
|
||||
<source>IMPCNS</source>
|
||||
</field>
|
||||
<field x="128" y="8" type="Testo" align="right" width="10" pattern="1" text="Imposta" />
|
||||
<field x="140" y="8" type="Testo" width="20" pattern="1" text="Mercato" />
|
||||
</section>
|
||||
<section type="Head" level="1" />
|
||||
<section type="Head" level="2" />
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1" />
|
||||
<section type="Head" level="11" />
|
||||
<section type="Body" level="11">
|
||||
<sql>USE RDOC
|
||||
SELECT (TIPORIGA='CO')||(TIPORIGA='06')
|
||||
JOIN %SPP ALIAS 201 INTO CODTAB==CODART
|
||||
FROM CODNUM=#PARENT.CODNUM ANNO=#PARENT.ANNO PROVV=#PARENT.PROVV NDOC=#PARENT.NDOC
|
||||
TO CODNUM=#PARENT.CODNUM ANNO=#PARENT.ANNO PROVV=#PARENT.PROVV NDOC=#PARENT.NDOC
|
||||
</sql>
|
||||
<field type="Data" width="11" pattern="1">
|
||||
<source>#PARENT.DATADOC</source>
|
||||
</field>
|
||||
<field x="12" type="Stringa" width="30" pattern="1">
|
||||
<source>DESCR</source>
|
||||
</field>
|
||||
<field x="43" type="Data" width="8" pattern="1">
|
||||
<source>33.NFASTA</source>
|
||||
</field>
|
||||
<field x="141" type="Stringa" hidden="1" align="right" bg_color="#00FFFF" width="12" id="100" pattern="1">
|
||||
<font face="Arial" size="10" />
|
||||
<source>34.TIPORIGA</source>
|
||||
<prescript description="B11.100 PRESCRIPT">#THIS @
|
||||
"CO" = \ confronta tiporiga con "CO"
|
||||
IF
|
||||
#101 ENABLE
|
||||
#102 ENABLE
|
||||
#103 ENABLE
|
||||
#104 ENABLE
|
||||
#105 ENABLE
|
||||
#106 DISABLE
|
||||
#107 ENABLE
|
||||
ELSE
|
||||
#101 DISABLE
|
||||
#102 DISABLE
|
||||
#103 DISABLE
|
||||
#104 DISABLE
|
||||
#105 DISABLE
|
||||
#106 ENABLE
|
||||
#107 ENABLE
|
||||
THEN</prescript>
|
||||
</field>
|
||||
<field x="52" type="Numero" align="right" width="10" id="101" pattern="1" hide_zero="1" text="###.###,@@">
|
||||
<groups>1</groups>
|
||||
<source>QTA</source>
|
||||
<postscript description="B11.101 POSTSCRIPT">MESSAGE ADD,F2.101</postscript>
|
||||
</field>
|
||||
<field x="63" type="Prezzo" align="right" width="10" codval="33.CODVAL" id="102" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<groups>1</groups>
|
||||
<source>PREZZONN</source>
|
||||
</field>
|
||||
<field x="74" type="Prezzo" align="right" width="10" id="103" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<groups>1</groups>
|
||||
<source>PREZZONS</source>
|
||||
</field>
|
||||
<field x="85" type="Prezzo" align="right" width="10" id="104" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<groups>1</groups>
|
||||
<source>IMPCNN-IMPCNS</source>
|
||||
<postscript description="B11.104 POSTSCRIPT">MESSAGE ADD,F2.104</postscript>
|
||||
</field>
|
||||
<field x="96" type="Prezzo" align="right" width="15" id="105" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<groups>1</groups>
|
||||
<source>IMPCNS</source>
|
||||
<postscript description="B11.105 POSTSCRIPT">MESSAGE ADD,F2.105
|
||||
MESSAGE ADD,F2.115</postscript>
|
||||
</field>
|
||||
<field x="112" type="Prezzo" align="right" width="15" id="106" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<groups>2</groups>
|
||||
<source>IMPCNS</source>
|
||||
<postscript description="B11.106 POSTSCRIPT">MESSAGE ADD,F2.106</postscript>
|
||||
</field>
|
||||
<field x="128" type="Prezzo" align="right" width="10" id="107" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>IMPOSTA</source>
|
||||
<postscript description="B11.107 POSTSCRIPT">MESSAGE ADD,F2.107</postscript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" level="11" />
|
||||
<section type="Head" level="12" />
|
||||
<section deactivated="1" type="Body" level="12" hidden="1">
|
||||
<sql>USE RDOC
|
||||
SELECT (TIPORIGA='CO')||(TIPORIGA='06')
|
||||
JOIN %SPP ALIAS 201 INTO CODTAB==CODART
|
||||
FROM CODNUM=#PARENT.CODNUM ANNO=#PARENT.ANNO PROVV=#PARENT.PROVV NDOC=#PARENT.NDOC
|
||||
TO CODNUM=#PARENT.CODNUM ANNO=#PARENT.ANNO PROVV=#PARENT.PROVV NDOC=#PARENT.NDOC
|
||||
</sql>
|
||||
<field x="13" type="Stringa" width="30" pattern="1">
|
||||
<source>DESCR</source>
|
||||
</field>
|
||||
<field x="142" type="Stringa" hidden="1" align="right" bg_color="#00FFFF" width="12" id="100" pattern="1">
|
||||
<font face="Arial" size="10" />
|
||||
<source>34.TIPORIGA</source>
|
||||
<prescript>#THIS @
|
||||
"CO" = \ confronta tiporiga con "CO"
|
||||
IF
|
||||
#101 ENABLE
|
||||
#102 ENABLE
|
||||
#103 ENABLE
|
||||
#104 ENABLE
|
||||
#105 ENABLE
|
||||
#106 DISABLE
|
||||
#107 ENABLE
|
||||
ELSE
|
||||
#101 DISABLE
|
||||
#102 DISABLE
|
||||
#103 DISABLE
|
||||
#104 DISABLE
|
||||
#105 DISABLE
|
||||
#106 ENABLE
|
||||
#107 ENABLE
|
||||
THEN</prescript>
|
||||
</field>
|
||||
<field x="53" type="Numero" align="right" width="10" id="101" pattern="1" hide_zero="1" text="###.###.@@">
|
||||
<source>QTA</source>
|
||||
<postscript>MESSAGE ADD,F2.101</postscript>
|
||||
</field>
|
||||
<field x="64" type="Prezzo" align="right" width="10" id="102" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>PREZZONN</source>
|
||||
</field>
|
||||
<field x="75" type="Prezzo" align="right" width="10" id="103" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>PREZZONS</source>
|
||||
</field>
|
||||
<field x="86" type="Prezzo" align="right" width="10" id="104" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>IMPCNN-IMPCNS</source>
|
||||
<prescript>MESSAGE ADD,F2.104</prescript>
|
||||
</field>
|
||||
<field x="97" type="Prezzo" align="right" width="15" id="105" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>IMPCNS</source>
|
||||
<postscript>MESSAGE ADD,F2.105</postscript>
|
||||
</field>
|
||||
<field x="113" type="Prezzo" align="right" width="15" id="106" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>IMPCNS</source>
|
||||
<postscript>MESSAGE ADD,F2.106</postscript>
|
||||
</field>
|
||||
<field x="129" type="Prezzo" align="right" width="10" id="107" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<source>IMPOSTA</source>
|
||||
<postscript>MESSAGE ADD,F2.107</postscript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" level="12" />
|
||||
<section type="Foot" />
|
||||
<section type="Foot" level="1" />
|
||||
<section type="Foot" level="2">
|
||||
<field x="30" type="Testo" width="10" pattern="1" text="TOTALI" />
|
||||
<field x="92" y="3" type="Testo" width="35" pattern="1" text="Progressivo annuo conferimenti" />
|
||||
<field x="52" type="Numero" align="right" width="10" id="101" pattern="1" hide_zero="1" text="###.###,@@">
|
||||
<postscript description="F2.101 POSTSCRIPT">MESSAGE ADD,F2.101</postscript>
|
||||
</field>
|
||||
<field x="96" type="Prezzo" align="right" width="15" id="105" pattern="1" hide_zero="1" text="#########,@@" />
|
||||
<field x="112" type="Prezzo" align="right" width="15" id="106" pattern="1" hide_zero="1" text="#########,@@" />
|
||||
<field x="128" type="Prezzo" align="right" width="15" id="107" pattern="1" hide_zero="1" text="#########,@@" />
|
||||
<field x="128" y="3" type="Prezzo" align="right" width="15" id="115" pattern="1" text="###.###.###,@@" />
|
||||
</section>
|
||||
<sql>USE DOC
|
||||
KEY 2
|
||||
SELECT (NUM(ANSI(DATADOC)E;=ANSI(#DATAINI)))(NUM(ANSI(DATADOC)C;=ANSI(#DATAFIN)))
|
||||
JOIN CLIFO ALIAS 101 INTO TIPOCF==TIPOCF CODCF==CODCF
|
||||
JOIN COMUNI TO 101@ INTO STATO==STATOCF COM==COMCF
|
||||
FROM TIPOCF='F' CODCF=#SOCIO PROVV='D' ANNO=#ANNO DATADOC=#DATAINI
|
||||
TO TIPOCF='F' CODCF=#SOCIO PROVV='D' ANNO=#ANNO DATADOC=#DATAFIN</sql>
|
||||
</report>
|
86
co/co1300a.uml
Executable file
86
co/co1300a.uml
Executable file
@ -0,0 +1,86 @@
|
||||
#include "co1300a.h"
|
||||
|
||||
TOOLBAR "" 0 20 0 2
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Stampa estratto conto" 0 -1 0 19
|
||||
|
||||
GROUPBOX DLG_NULL 78 4
|
||||
BEGIN
|
||||
PROMPT 1 1 "Selezione soci"
|
||||
END
|
||||
|
||||
NUMBER F_DASOCIO 6
|
||||
BEGIN
|
||||
PROMPT 2 2 "Da socio "
|
||||
FIELD DASOCIO
|
||||
USE LF_SOCICOOP KEY 1
|
||||
JOIN LF_CLIFO TO LF_SOCICOOP INTO TIPOCF=='F' CODCF==CODCF
|
||||
INPUT CODCF F_DASOCIO
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Ragione sociale@50" 20->RAGSOC
|
||||
DISPLAY "Codice fiscale@16" 20->COFI
|
||||
OUTPUT F_DASOCIO CODCF
|
||||
OUTPUT F_DESDASOCIO 20->RAGSOC
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESDASOCIO 50
|
||||
BEGIN
|
||||
PROMPT 25 2 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_ASOCIO 6
|
||||
BEGIN
|
||||
PROMPT 2 3 "A socio "
|
||||
FIELD ASOCIO
|
||||
USE LF_SOCICOOP KEY 1
|
||||
JOIN LF_CLIFO TO LF_SOCICOOP INTO TIPOCF=='F' CODCF==CODCF
|
||||
INPUT CODCF F_ASOCIO
|
||||
DISPLAY "Codice" CODCF
|
||||
DISPLAY "Ragione sociale@50" 20->RAGSOC
|
||||
DISPLAY "Codice fiscale@16" 20->COFI
|
||||
OUTPUT F_ASOCIO CODCF
|
||||
OUTPUT F_DESASOCIO 20->RAGSOC
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESASOCIO 50
|
||||
BEGIN
|
||||
PROMPT 25 3 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 3
|
||||
BEGIN
|
||||
PROMPT 1 5 "Selezione periodo"
|
||||
END
|
||||
|
||||
DATE F_DATAINI
|
||||
BEGIN
|
||||
PROMPT 2 6 "Data iniziale "
|
||||
FIELD DATAINI
|
||||
END
|
||||
|
||||
DATE F_DATAFIN
|
||||
BEGIN
|
||||
PROMPT 37 6 "Data fin. "
|
||||
FIELD DATAFIN
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
98
co/co1400.cpp
Executable file
98
co/co1400.cpp
Executable file
@ -0,0 +1,98 @@
|
||||
#include <progind.h>
|
||||
|
||||
#include "../ve/ve6200.h"
|
||||
#include "../ve/ve6200a.h"
|
||||
|
||||
#include <doc.h>
|
||||
class TFatturazione_cooperative : public TFatturazione_bolle
|
||||
{
|
||||
virtual void campi_raggruppamento_righe(TToken_string& campi_riga) const;
|
||||
virtual void campi_raggruppamento(TToken_string& campi) const;
|
||||
virtual bool doc_raggruppabile(const TDocumento & doc) const { return true; }
|
||||
virtual bool doc_raggruppabile(const TDocumento & doc_in, const TDocumento & doc_out, TToken_string & campi) const;
|
||||
virtual void add_rows(TRiga_documento & rout, TRiga_documento & rin);
|
||||
virtual void create_row(TDocumento& doc_out, const TRiga_documento & rin);
|
||||
virtual const TString & get_tipo_out(const TDocumento & doc_out);
|
||||
|
||||
|
||||
public:
|
||||
TFatturazione_cooperative(const char* cod) : TFatturazione_bolle(cod) {}
|
||||
virtual ~TFatturazione_cooperative() { }
|
||||
};
|
||||
|
||||
void TFatturazione_cooperative::campi_raggruppamento_righe(TToken_string& campi_riga) const
|
||||
{
|
||||
campi_riga = "CODART|UMQTA!CODIVA"; // Uguali sempre
|
||||
}
|
||||
|
||||
void TFatturazione_cooperative::campi_raggruppamento(TToken_string& campi) const
|
||||
{
|
||||
campi = "TIPOCF|CODCF|CODVAL|CODLIN";
|
||||
}
|
||||
|
||||
void TFatturazione_cooperative::add_rows(TRiga_documento & rout, TRiga_documento & rin)
|
||||
{
|
||||
real valore = rout.get_real(RDOC_PREZZO);
|
||||
|
||||
valore += rin.doc().imponibile();
|
||||
rout.put(RDOC_PREZZO, valore);
|
||||
}
|
||||
|
||||
bool TFatturazione_cooperative::doc_raggruppabile(const TDocumento & doc_in, const TDocumento & doc_out, TToken_string & campi) const
|
||||
{
|
||||
if (doc_in.physical_rows() > 0 && doc_out.physical_rows() > 0)
|
||||
{
|
||||
const TRiga_documento & rout = doc_out[1];
|
||||
const TRiga_documento & rin = doc_in[1];
|
||||
const TString art_in = rin.get(RDOC_CODART);
|
||||
const TString art_out = rout.get(RDOC_CODART);
|
||||
bool raggruppa = art_in == art_out;
|
||||
|
||||
if (raggruppa)
|
||||
{
|
||||
const TString iva_in = rin.get(RDOC_CODIVA);
|
||||
const TString iva_out = rout.get(RDOC_CODIVA);
|
||||
raggruppa = iva_in == iva_out;
|
||||
}
|
||||
return raggruppa;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void TFatturazione_cooperative::create_row(TDocumento& doc_out, const TRiga_documento & rin)
|
||||
{
|
||||
if (rin.get_int(RDOC_NRIGA) == 1)
|
||||
{
|
||||
TFatturazione_bolle::create_row(doc_out, rin);
|
||||
TRiga_documento & rout = doc_out[1];
|
||||
const real valore = rin.doc().imponibile();
|
||||
|
||||
rout.put(RDOC_QTA, 1);
|
||||
rout.put(RDOC_PREZZO, valore);
|
||||
rout.zero(RDOC_SCONTO);
|
||||
}
|
||||
}
|
||||
|
||||
const TString & TFatturazione_cooperative::get_tipo_out(const TDocumento & doc_out)
|
||||
{
|
||||
const TString & art = doc_out[1].get(RDOC_CODARTMAG);
|
||||
const TString & tipodoc = cache().get(LF_ANAMAG, art, ANAMAG_USER2);
|
||||
|
||||
if (tipodoc.full() && !cache().get("%TIP", tipodoc).empty())
|
||||
return tipodoc;
|
||||
else
|
||||
return get("S8");
|
||||
};
|
||||
|
||||
class TFatturazione_cooperative_app : public TFatturazione_bolle_app
|
||||
{
|
||||
protected:
|
||||
virtual TFatturazione_bolle * elab(const TString & cod) const { return new TFatturazione_cooperative(cod);}
|
||||
};
|
||||
|
||||
int co1400(int argc, char *argv[])
|
||||
{
|
||||
TFatturazione_cooperative_app a;
|
||||
a.run (argc, argv, "Fatturazione Conferimenti");
|
||||
return TRUE;
|
||||
}
|
967
co/co1500.cpp
Executable file
967
co/co1500.cpp
Executable file
@ -0,0 +1,967 @@
|
||||
#include "co1.h"
|
||||
#include "co1500a.h"
|
||||
|
||||
#include <automask.h>
|
||||
#include <progind.h>
|
||||
#include <reprint.h>
|
||||
|
||||
#include <clifo.h>
|
||||
#include <mov.h>
|
||||
#include <rmov.h>
|
||||
#include <rmoviva.h>
|
||||
/*#include <anagr.h>
|
||||
#include <anafis.h>
|
||||
#include <comuni.h>
|
||||
#include <causali.h>
|
||||
#include <nditte.h>
|
||||
#include <multirel.h>*/
|
||||
|
||||
#include "..\tc\tc0701.h"
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TClifoCoop_recset
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TClifoCoop_recset : public TAS400_recordset
|
||||
{
|
||||
TAssoc_array _index;
|
||||
|
||||
protected:
|
||||
void add_field(const char* name = "Filler", int from = -1, char tipo = 'a',
|
||||
int len = 0, const char* def = NULL);
|
||||
|
||||
public:
|
||||
bool find(char tipocf, long codcf);
|
||||
virtual const TVariant& get(const char* column_name) const;
|
||||
|
||||
TClifoCoop_recset(const char * query);
|
||||
};
|
||||
|
||||
void TClifoCoop_recset::add_field(const char* name, int from, char tipo, int len, const char* def)
|
||||
{
|
||||
const bool required = false;
|
||||
const TFieldtypes t = tipo == 'n' ? _longzerofld : _alfafld;
|
||||
const int pos = from - 1;
|
||||
if (def && *def)
|
||||
{
|
||||
CHECKS(def == NULL || (int)strlen(def) <= len, "Invalid default value ", def);
|
||||
TVariant var(def); var.convert_to(t);
|
||||
create_field(name, pos, len, t, required, var);
|
||||
}
|
||||
else
|
||||
create_field(name, pos, len, t, required);
|
||||
}
|
||||
|
||||
const TVariant& TClifoCoop_recset::get(const char* column_name) const
|
||||
{
|
||||
TFixed_string fname(column_name);
|
||||
|
||||
if (fname == CLI_COFI)
|
||||
{
|
||||
TVariant& var = get_tmp_var();
|
||||
TString80 s(TAS400_recordset::get(fname).as_string());
|
||||
|
||||
var.set(s.trim());
|
||||
return var;
|
||||
}
|
||||
return TAS400_recordset::get(fname);
|
||||
}
|
||||
|
||||
|
||||
TClifoCoop_recset::TClifoCoop_recset(const char * query)
|
||||
: TAS400_recordset(TString("AS400(213)\n") << query)
|
||||
{
|
||||
const char a = 'a';
|
||||
const char n = 'n';
|
||||
const bool o = true;
|
||||
const bool f = false;
|
||||
|
||||
add_field(CLI_TIPOCF, 1, a, 1);
|
||||
add_field(CLI_CODCF, 2, n, 6);
|
||||
add_field("LIBERO", 8, a, 10);
|
||||
add_field(CLI_RAGSOC, 18, a, 50);
|
||||
add_field(CLI_INDCF, 68, a, 30);
|
||||
add_field(CLI_CAPCF, 98, n, 5);
|
||||
add_field(CLI_LOCCF, 103, a, 25);
|
||||
add_field("PROV", 128, a, 2);
|
||||
add_field("LIBERO2", 130, a, 9);
|
||||
add_field(CLI_COFI, 139, a, 16);
|
||||
add_field("LIBERO3", 155, a, 45);
|
||||
add_field(CLI_PAIV, 201, a, 11);
|
||||
add_field("FINE-RECORD", 211, a, 2, "\r\n"); // terminatore record
|
||||
|
||||
TString16 pos, key;
|
||||
|
||||
for (bool ok = move_first(); ok; ok = move_next())
|
||||
{
|
||||
pos.format("%ld", current_row());
|
||||
key.format("%c|%ld", get(CLI_TIPOCF).as_string()[0], get(CLI_CODCF).as_int());
|
||||
|
||||
_index.add(key, pos);
|
||||
}
|
||||
}
|
||||
|
||||
bool TClifoCoop_recset::find(char tipocf, long codcf)
|
||||
{
|
||||
TString16 key;
|
||||
|
||||
key.format("%c|%ld", tipocf, codcf);
|
||||
|
||||
TString * s = (TString *) _index.objptr(key);
|
||||
long pos = 0L;
|
||||
const bool ok = s && s->full();
|
||||
|
||||
if (ok)
|
||||
pos = atoi(*s);
|
||||
move_to(pos);
|
||||
return ok;
|
||||
}
|
||||
|
||||
class TMovCoop_recset;
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TIVACoop_recset
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TIVACoop_recset : public TAS400_recordset
|
||||
{
|
||||
|
||||
TRecnotype _first, _last;
|
||||
long _numreg;
|
||||
|
||||
private:
|
||||
void add_field(const char* name = "Filler", int from = -1, char tipo = 'a',
|
||||
int len = 0, const char* def = NULL);
|
||||
|
||||
public:
|
||||
bool find(long numreg);
|
||||
virtual const TVariant& get(const char* column_name) const;
|
||||
virtual bool move_to(TRecnotype pos);
|
||||
|
||||
TIVACoop_recset(TMovCoop_recset & mov);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TRMovCoop_recset
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TRMovCoop_recset : public TAS400_recordset
|
||||
{
|
||||
TRecnotype _first, _last;
|
||||
long _numreg;
|
||||
|
||||
private:
|
||||
void add_field(const char* name = "Filler", int from = -1, char tipo = 'a',
|
||||
int len = 0, const char* def = NULL);
|
||||
|
||||
|
||||
public:
|
||||
bool find(long numreg);
|
||||
virtual const TVariant& get(const char* column_name) const;
|
||||
virtual bool move_to(TRecnotype pos);
|
||||
|
||||
TRMovCoop_recset(TMovCoop_recset & mov);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TMovCoop_recset
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TMovCoop_recset : public TAS400_recordset
|
||||
{
|
||||
bool _indetraibile;
|
||||
protected:
|
||||
void add_field(const char* name = "Filler", int from = -1, char tipo = 'a',
|
||||
int len = 0, const char* def = NULL);
|
||||
|
||||
public:
|
||||
bool vendite() const { return get("TIPOR").as_int() == 2;}
|
||||
bool acquisti() const { return !vendite();}
|
||||
bool fattura() const { return get("TIPOM").as_int() == 0;}
|
||||
bool nota_credito() const { return !fattura();}
|
||||
virtual const TVariant& get(const char* column_name) const;
|
||||
bool indetraibile() const { return _indetraibile;}
|
||||
|
||||
TMovCoop_recset(const char * query, TArray & recsets);
|
||||
};
|
||||
|
||||
void TMovCoop_recset::add_field(const char* name, int from, char tipo, int len, const char* def)
|
||||
{
|
||||
const bool required = false;
|
||||
const TFieldtypes t = tipo == 'n' ? _longzerofld : _alfafld;
|
||||
const int pos = from - 1;
|
||||
|
||||
if (def && *def)
|
||||
{
|
||||
CHECKS(def == NULL || (int)strlen(def) <= len, "Invalid default value ", def);
|
||||
TVariant var(def); var.convert_to(t);
|
||||
create_field(name, pos, len, t, required, var);
|
||||
}
|
||||
else
|
||||
create_field(name, pos, len, t, required);
|
||||
}
|
||||
|
||||
const TVariant& TMovCoop_recset::get(const char* column_name) const
|
||||
{
|
||||
TString16 fname(column_name);
|
||||
TVariant& var = get_tmp_var();
|
||||
|
||||
if (fname == MOV_TIPO)
|
||||
{
|
||||
var = vendite() ? "C" : "F";
|
||||
return var;
|
||||
}
|
||||
else
|
||||
if (fname == MOV_REG)
|
||||
{
|
||||
var = vendite() ? "V00" : "A00";
|
||||
return var;
|
||||
}
|
||||
else
|
||||
if (fname == MOV_CODCF)
|
||||
{
|
||||
if (vendite())
|
||||
fname = fattura() ? "S1" : "S2";
|
||||
else
|
||||
fname = fattura() ? "S2" : "S1";
|
||||
}
|
||||
else
|
||||
if (fname == MOV_CODCAUS)
|
||||
{
|
||||
((TMovCoop_recset *)this)->_indetraibile = TAS400_recordset::get(fname).as_int() == 4;
|
||||
int ccaus;
|
||||
|
||||
if (vendite())
|
||||
ccaus = fattura() ? 1 : 2;
|
||||
else
|
||||
ccaus = fattura() ? 11 : 12;
|
||||
var.set(ccaus);
|
||||
return var;
|
||||
}
|
||||
|
||||
var = TAS400_recordset::get(fname);
|
||||
|
||||
if (fname == MOV_DATAREG || fname == MOV_DATADOC)
|
||||
{
|
||||
const TDate d(atol(var.as_string()) + 20000000L);
|
||||
|
||||
var.set(d);
|
||||
}
|
||||
else
|
||||
if (fname == MOV_TOTDOC || fname == RMI_IMPONIBILE ||
|
||||
fname == RMI_IMPOSTA)
|
||||
{
|
||||
const real r = var.as_real() / CENTO;
|
||||
|
||||
var.set(r);
|
||||
}
|
||||
return var;
|
||||
}
|
||||
|
||||
TMovCoop_recset::TMovCoop_recset(const char * query, TArray & recsets)
|
||||
: TAS400_recordset(TString("AS400(543)\n") << query),
|
||||
_indetraibile(false)
|
||||
{
|
||||
const char a = 'a';
|
||||
const char n = 'n';
|
||||
|
||||
add_field("TIPOR", 1, n, 1);
|
||||
add_field("L00", 2, a, 6);
|
||||
add_field("L01", 8, n, 1);
|
||||
add_field("L02", 9, n, 4);
|
||||
add_field("NUMREG", 13, n, 7);
|
||||
add_field("L03", 20, n, 2);
|
||||
add_field("PROG", 22, n, 1);
|
||||
add_field("L04", 23, n, 2);
|
||||
add_field("L05", 25, a, 2);
|
||||
add_field(MOV_DATAREG, 27, a, 6);
|
||||
add_field("L07", 33, a, 6);
|
||||
add_field("L08", 39, a, 1);
|
||||
add_field(MOV_PROTIVA, 40, n, 7);
|
||||
add_field(MOV_NUMDOC, 47, n, 9);
|
||||
add_field(MOV_DATADOC, 56, a, 6);
|
||||
add_field("L09", 62, a, 1);
|
||||
add_field(MOV_CODCAUS, 63, n, 2);
|
||||
add_field(RMI_CODIVA, 65, n, 2);
|
||||
add_field("TIPOM", 67, n, 1);
|
||||
add_field("L10", 68, a, 18);
|
||||
add_field("G1", 86, a, 2);
|
||||
add_field("C1", 88, a, 2);
|
||||
add_field("S1", 90, n, 7);
|
||||
add_field("L11", 97, n, 6);
|
||||
add_field("G2", 103, a, 2);
|
||||
add_field("C2", 105, a, 2);
|
||||
add_field("S2", 107, n, 7);
|
||||
add_field("L12", 114, n, 6);
|
||||
add_field("G3", 120, a, 2);
|
||||
add_field("C3", 122, a, 2);
|
||||
add_field("S3", 124, n, 7);
|
||||
add_field("L13", 131, a, 152);
|
||||
add_field("ANNO", 283, n, 4);
|
||||
add_field("NUMDOC1", 287, a, 13);
|
||||
add_field("L15", 300, a, 18);
|
||||
add_field("CODICEE", 318, a, 1);
|
||||
add_field("L16", 319, a, 29);
|
||||
add_field("L17", 348, a, 20);
|
||||
add_field("L18", 368, a, 68);
|
||||
add_field("L19", 131, a, 152);
|
||||
add_field("L20", 436, n, 1);
|
||||
add_field("L21", 437, a, 24);
|
||||
add_field("L22", 461, a, 39);
|
||||
add_field("ANNULLATO", 500, a, 1);
|
||||
add_field("L23", 501, a, 5);
|
||||
add_field(RMI_IMPONIBILE, 506, n, 11);
|
||||
add_field(RMI_IMPOSTA, 517, n, 9);
|
||||
add_field(MOV_TOTDOC, 526, n, 11);
|
||||
add_field("L24", 537, n, 5);
|
||||
add_field("FINE-RECORD", 541, a, 2, "\r\n"); // terminatore record
|
||||
|
||||
bool ok;
|
||||
|
||||
for (ok = move_last(); ok;)
|
||||
{
|
||||
const int p = current_row();
|
||||
|
||||
if (get("ANNULLATO").as_string()[0] == 'A')
|
||||
{
|
||||
destroy(p);
|
||||
if (p <= last())
|
||||
move_to(p);
|
||||
else
|
||||
move_last();
|
||||
}
|
||||
else
|
||||
ok = move_prev();
|
||||
}
|
||||
|
||||
long numreg = 0L;
|
||||
|
||||
for (ok = move_first(); ok; ok = move_next())
|
||||
{
|
||||
if (get("PROG").as_int() == 1)
|
||||
numreg++;
|
||||
set(MOV_NUMREG, numreg);
|
||||
}
|
||||
|
||||
recsets.add(new TIVACoop_recset(*this), LF_RMOVIVA);
|
||||
recsets.add(new TRMovCoop_recset(*this), LF_RMOV);
|
||||
|
||||
for (ok = move_last(); ok;)
|
||||
{
|
||||
const int p = current_row();
|
||||
|
||||
if (get("PROG").as_int() > 1)
|
||||
{
|
||||
destroy(p);
|
||||
if (p <= last())
|
||||
move_to(p);
|
||||
else
|
||||
move_last();
|
||||
}
|
||||
else
|
||||
ok = move_prev();
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TIVACoop_recset
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
void TIVACoop_recset::add_field(const char* name, int from, char tipo, int len, const char* def)
|
||||
{
|
||||
const bool required = false;
|
||||
const TFieldtypes t = tipo == 'n' ? _longzerofld : _alfafld;
|
||||
const int pos = from - 1;
|
||||
|
||||
if (def && *def)
|
||||
{
|
||||
CHECKS(def == NULL || (int)strlen(def) <= len, "Invalid default value ", def);
|
||||
TVariant var(def); var.convert_to(t);
|
||||
create_field(name, pos, len, t, required, var);
|
||||
}
|
||||
else
|
||||
create_field(name, pos, len, t, required);
|
||||
}
|
||||
|
||||
bool TIVACoop_recset::find(long numreg)
|
||||
{
|
||||
if (numreg != _numreg)
|
||||
{
|
||||
_first = _last = -1L;
|
||||
|
||||
bool ok = false;
|
||||
TRecnotype f = 0L, l = last();
|
||||
TRecnotype pos = f + (l - f) / 2;
|
||||
|
||||
while (!ok && f <= l)
|
||||
{
|
||||
TAS400_recordset::move_to(pos);
|
||||
|
||||
const long n = get(RMI_NUMREG).as_int();
|
||||
|
||||
if (n > numreg)
|
||||
l = pos - 1;
|
||||
else
|
||||
if (n < numreg)
|
||||
f = pos + 1;
|
||||
else
|
||||
{
|
||||
f = pos;
|
||||
ok = true;
|
||||
}
|
||||
pos = f + (l - f) / 2;
|
||||
}
|
||||
if (ok)
|
||||
{
|
||||
bool ok1 = TAS400_recordset::move_to(f);
|
||||
|
||||
while (ok1 && numreg == get(RMV_NUMREG).as_int())
|
||||
{
|
||||
f = current_row();
|
||||
ok1 = TAS400_recordset::move_prev();
|
||||
}
|
||||
ok1 = TAS400_recordset::move_to(f);
|
||||
while (ok1 && numreg == get(RMV_NUMREG).as_int())
|
||||
{
|
||||
l = current_row();
|
||||
ok1 = TAS400_recordset::move_next();
|
||||
}
|
||||
_first = f;
|
||||
_last = l;
|
||||
_numreg = numreg;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
const TVariant& TIVACoop_recset::get(const char* column_name) const
|
||||
{
|
||||
const TFixed_string fname(column_name);
|
||||
|
||||
if (fname == RMI_IMPONIBILE || fname == RMI_IMPOSTA)
|
||||
{
|
||||
TVariant& var = get_tmp_var();
|
||||
|
||||
var.set(TAS400_recordset::get(fname).as_real() / CENTO);
|
||||
return var;
|
||||
}
|
||||
return TAS400_recordset::get(fname);
|
||||
}
|
||||
|
||||
bool TIVACoop_recset::move_to(TRecnotype pos)
|
||||
{
|
||||
if (_first < 0L)
|
||||
return TAS400_recordset::move_to(pos);
|
||||
if (pos == 0L)
|
||||
pos = _first;
|
||||
if (pos <= _last)
|
||||
return TAS400_recordset::move_to(pos);
|
||||
return false;
|
||||
}
|
||||
|
||||
TIVACoop_recset::TIVACoop_recset(TMovCoop_recset & mov)
|
||||
:TAS400_recordset("AS400(60)\n"),
|
||||
_first(-1L), _last(-1L), _numreg(-1L)
|
||||
{
|
||||
const char a = 'a';
|
||||
const char n = 'n';
|
||||
TVariant var;
|
||||
|
||||
add_field(RMI_NUMREG, 1, n, 7);
|
||||
add_field(RMI_NUMRIG, 8, n, 3);
|
||||
add_field(RMI_CODIVA, 11, n, 3);
|
||||
add_field(RMI_IMPONIBILE, 14, n, 15); // 18
|
||||
add_field(RMI_IMPOSTA, 29, n, 15); // 18
|
||||
add_field(RMI_TIPODET, 44, n, 1);
|
||||
add_field(RMI_TIPOCR, 45, n, 1);
|
||||
add_field(RMI_INTRA, 46, a, 1);
|
||||
add_field(RMI_TIPOATT, 47, n, 1);
|
||||
add_field(RMI_TIPOC, 48, a, 1);
|
||||
add_field(RMI_GRUPPO, 49, n, 3);
|
||||
add_field(RMI_CONTO, 52, n, 3); // 18
|
||||
add_field(RMI_SOTTOCONTO, 55, n, 6);
|
||||
TString4 fgr, fco, fso;
|
||||
|
||||
for (bool ok = mov.move_first(); ok; ok = mov.move_next())
|
||||
{
|
||||
new_rec();
|
||||
set(RMI_NUMREG, mov.get(MOV_NUMREG));
|
||||
set(RMI_NUMRIG, mov.get("PROG"));
|
||||
|
||||
int civa = mov.get(RMI_CODIVA).as_int();
|
||||
int ccaus = mov.get(MOV_CODCAUS).as_int();
|
||||
const bool indetraibile = mov.indetraibile();
|
||||
|
||||
if (civa == 0)
|
||||
civa = 310;
|
||||
else
|
||||
if (indetraibile)
|
||||
set(RMI_TIPODET, "9");
|
||||
var.set(civa);
|
||||
set(RMI_CODIVA, var);
|
||||
set(RMI_IMPONIBILE, mov.TAS400_recordset::get(RMI_IMPONIBILE));
|
||||
set(RMI_IMPOSTA, mov.TAS400_recordset::get(RMI_IMPOSTA));
|
||||
if (mov.vendite())
|
||||
{
|
||||
if (mov.fattura())
|
||||
{
|
||||
fgr = "G2"; fco = "C2"; fso = "S2";
|
||||
}
|
||||
else
|
||||
{
|
||||
fgr = "G1"; fco = "C1"; fso = "S1";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mov.fattura())
|
||||
{
|
||||
fgr = "G1"; fco = "C1"; fso = "S1";
|
||||
}
|
||||
else
|
||||
{
|
||||
fgr = "G2"; fco = "C2"; fso = "S2";
|
||||
}
|
||||
}
|
||||
set(RMI_GRUPPO, mov.get(fgr));
|
||||
set(RMI_CONTO, mov.get(fco));
|
||||
set(RMI_SOTTOCONTO,mov.get(fso));
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TRMovCoop_recset
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
void TRMovCoop_recset::add_field(const char* name, int from, char tipo, int len, const char* def)
|
||||
{
|
||||
const bool required = false;
|
||||
const TFieldtypes t = tipo == 'n' ? _longzerofld : _alfafld;
|
||||
const int pos = from - 1;
|
||||
|
||||
if (def && *def)
|
||||
{
|
||||
CHECKS(def == NULL || (int)strlen(def) <= len, "Invalid default value ", def);
|
||||
TVariant var(def); var.convert_to(t);
|
||||
create_field(name, pos, len, t, required, var);
|
||||
}
|
||||
else
|
||||
create_field(name, pos, len, t, required);
|
||||
}
|
||||
|
||||
bool TRMovCoop_recset::find(long numreg)
|
||||
{
|
||||
if (numreg != _numreg)
|
||||
{
|
||||
_first = _last = -1L;
|
||||
|
||||
bool ok = false;
|
||||
TRecnotype f = 0L, l= last();
|
||||
TRecnotype pos = f + (l - f) / 2;
|
||||
|
||||
while (!ok && f <= l)
|
||||
{
|
||||
TAS400_recordset::move_to(pos);
|
||||
|
||||
const long n = get(RMV_NUMREG).as_int();
|
||||
|
||||
if (n > numreg)
|
||||
l = pos - 1;
|
||||
else
|
||||
if (n < numreg)
|
||||
f = pos + 1;
|
||||
else
|
||||
{
|
||||
f = pos;
|
||||
ok = true;
|
||||
}
|
||||
pos = f + (l - f) / 2;
|
||||
}
|
||||
if (ok)
|
||||
{
|
||||
bool ok1 = TAS400_recordset::move_to(f);
|
||||
|
||||
while (ok1 && numreg == get(RMV_NUMREG).as_int())
|
||||
{
|
||||
f = current_row();
|
||||
ok1 = TAS400_recordset::move_prev();
|
||||
}
|
||||
ok1 = TAS400_recordset::move_to(f);
|
||||
while (ok1 && numreg == get(RMV_NUMREG).as_int())
|
||||
{
|
||||
l = current_row();
|
||||
ok1 =TAS400_recordset:: move_next();
|
||||
}
|
||||
_first = f;
|
||||
_last = l;
|
||||
_numreg = numreg;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
const TVariant& TRMovCoop_recset::get(const char* column_name) const
|
||||
{
|
||||
const TFixed_string fname(column_name);
|
||||
|
||||
if (fname == RMV_IMPORTO)
|
||||
{
|
||||
TVariant& var = get_tmp_var();
|
||||
|
||||
var.set(TAS400_recordset::get(fname).as_real() / CENTO);
|
||||
return var;
|
||||
}
|
||||
return TAS400_recordset::get(fname);
|
||||
}
|
||||
|
||||
bool TRMovCoop_recset::move_to(TRecnotype pos)
|
||||
{
|
||||
if (_first < 0L)
|
||||
return TAS400_recordset::move_to(pos);
|
||||
if (pos == 0L)
|
||||
pos = _first;
|
||||
if (pos <= _last)
|
||||
return TAS400_recordset::move_to(pos);
|
||||
return false;
|
||||
}
|
||||
|
||||
TRMovCoop_recset::TRMovCoop_recset(TMovCoop_recset & mov)
|
||||
:TAS400_recordset("AS400(99)\n"),
|
||||
_first(-1L), _last(-1L), _numreg(-1L)
|
||||
|
||||
{
|
||||
const char a = 'a';
|
||||
const char n = 'n';
|
||||
TVariant var;
|
||||
int row = 1;
|
||||
TString4 fgr, fco, fso;
|
||||
TVariant sez, tipo;
|
||||
|
||||
add_field(RMV_NUMREG, 1, n, 7);
|
||||
add_field(RMV_NUMRIG, 8, n, 3);
|
||||
add_field(RMV_SEZIONE, 11, a, 1);
|
||||
add_field(RMV_TIPOC, 12, a, 1);
|
||||
add_field(RMV_GRUPPO, 13, n, 3);
|
||||
add_field(RMV_CONTO, 16, n, 3);
|
||||
add_field(RMV_SOTTOCONTO, 19, n, 6);
|
||||
add_field(RMV_DESCR, 25, a, 50);
|
||||
add_field(RMV_IMPORTO, 85, n, 15); // 18
|
||||
|
||||
for (bool ok = mov.move_first(); ok; ok = mov.move_next())
|
||||
{
|
||||
const int prog = mov.get("PROG").as_int();
|
||||
|
||||
if (prog == 1)
|
||||
{
|
||||
row = 1;
|
||||
|
||||
// 1o conto cliente/fornitore solo sul primo record
|
||||
new_rec();
|
||||
set(RMV_NUMREG, mov.get(MOV_NUMREG));
|
||||
|
||||
var.set(row++);
|
||||
set(RMV_NUMRIG, var);
|
||||
if (mov.vendite())
|
||||
{
|
||||
if (mov.fattura())
|
||||
{
|
||||
fgr = "G1"; fco = "C1"; fso = "S1";
|
||||
sez = "D";
|
||||
}
|
||||
else
|
||||
{
|
||||
fgr = "G2"; fco = "C2"; fso = "S2";
|
||||
sez = "A";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mov.fattura())
|
||||
{
|
||||
fgr = "G2"; fco = "C2"; fso = "S2";
|
||||
sez = "A";
|
||||
}
|
||||
else
|
||||
{
|
||||
fgr = "G1"; fco = "C1"; fso = "S1";
|
||||
sez = "D";
|
||||
}
|
||||
}
|
||||
set(RMV_SEZIONE, sez);
|
||||
tipo = mov.vendite() ? "C" : "F";
|
||||
set(RMV_TIPOC, tipo);
|
||||
set(RMV_GRUPPO, mov.get(fgr));
|
||||
set(RMV_CONTO, mov.get(fco));
|
||||
set(RMV_SOTTOCONTO,mov.get(fso));
|
||||
set(RMV_IMPORTO, mov.TAS400_recordset::get(MOV_TOTDOC));
|
||||
}
|
||||
else
|
||||
int i = 0;
|
||||
|
||||
// 2o conto costo/ricavo
|
||||
int ccaus = mov.get(MOV_CODCAUS).as_int();
|
||||
const bool indetraibile = mov.indetraibile();
|
||||
|
||||
new_rec();
|
||||
set(RMV_NUMREG, mov.get(MOV_NUMREG));
|
||||
var.set(row++);
|
||||
set(RMV_NUMRIG, var);
|
||||
if (mov.vendite())
|
||||
{
|
||||
sez = "A"; // trucco perchè non si può usare test_swap
|
||||
if (mov.fattura())
|
||||
{
|
||||
fgr = "G2"; fco = "C2"; fso = "S2";
|
||||
}
|
||||
else
|
||||
{
|
||||
fgr = "G1"; fco = "C1"; fso = "S1";
|
||||
sez = "D";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sez = "D"; // trucco perchè non si può usare test_swap
|
||||
if (mov.fattura())
|
||||
{
|
||||
fgr = "G1"; fco = "C1"; fso = "S1";
|
||||
}
|
||||
else
|
||||
{
|
||||
fgr = "G2"; fco = "C2"; fso = "S2";
|
||||
}
|
||||
}
|
||||
set(RMV_SEZIONE, sez);
|
||||
set(RMV_GRUPPO, mov.get(fgr));
|
||||
set(RMV_CONTO, mov.get(fco));
|
||||
set(RMV_SOTTOCONTO,mov.get(fso));
|
||||
|
||||
real importo = mov.TAS400_recordset::get(RMI_IMPONIBILE).as_real();
|
||||
|
||||
if (indetraibile)
|
||||
importo += mov.TAS400_recordset::get(RMI_IMPOSTA).as_real();
|
||||
|
||||
set(RMV_IMPORTO, importo);
|
||||
|
||||
// 3o conto IVA
|
||||
if (!indetraibile && !mov.TAS400_recordset::get(RMI_IMPOSTA).as_real().is_zero())
|
||||
{
|
||||
new_rec();
|
||||
set(RMV_NUMREG, mov.get(MOV_NUMREG));
|
||||
var.set(row++);
|
||||
set(RMV_NUMRIG, var);
|
||||
if (mov.vendite())
|
||||
sez = mov.fattura() ? "A" : "D";
|
||||
else
|
||||
sez = mov.fattura() ? "D" : "A";
|
||||
set(RMV_SEZIONE, sez);
|
||||
set(RMV_GRUPPO, mov.get("G3"));
|
||||
set(RMV_CONTO, mov.get("C3"));
|
||||
set(RMV_SOTTOCONTO,mov.get("S3"));
|
||||
set(RMV_IMPORTO, mov.TAS400_recordset::get(RMI_IMPOSTA));
|
||||
}
|
||||
else
|
||||
int i = 0;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TCoopSender_mask
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TCoopSender_mask : public TAutomask
|
||||
{
|
||||
private:
|
||||
void serialize(bool bSave);
|
||||
protected:
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
public:
|
||||
TCoopSender_mask();
|
||||
virtual ~TCoopSender_mask();
|
||||
};
|
||||
|
||||
TCoopSender_mask::TCoopSender_mask() : TAutomask("co1500a")
|
||||
{
|
||||
serialize(false);
|
||||
}
|
||||
|
||||
TCoopSender_mask::~TCoopSender_mask()
|
||||
{
|
||||
serialize(true);
|
||||
}
|
||||
|
||||
bool TCoopSender_mask::on_field_event(TOperable_field& f, TField_event e, long jolly)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
HIDDEN bool browse_file_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_F9)
|
||||
{
|
||||
FILE_SPEC fs; memset(&fs, 0, sizeof(FILE_SPEC));
|
||||
strcpy(fs.type, "");
|
||||
strcpy(fs.name, f.get());
|
||||
xvt_fsys_get_default_dir(&fs.dir);
|
||||
xvt_fsys_save_dir();
|
||||
if (xvt_dm_post_file_open(&fs, TR("Selezione file")) == FL_OK)
|
||||
{
|
||||
TFilename n;
|
||||
xvt_fsys_convert_dir_to_str(&fs.dir, n.get_buffer(n.size()), n.size());
|
||||
n.add(fs.name);
|
||||
f.set(n);
|
||||
}
|
||||
xvt_fsys_restore_dir();
|
||||
f.set_focus();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void TCoopSender_mask::serialize(bool bSave)
|
||||
{
|
||||
const char* defpar = "tc";
|
||||
TConfig ini(CONFIG_DITTA, defpar);
|
||||
for (int i = fields()-1; i >= 0; i--)
|
||||
{
|
||||
TMask_field& f = fld(i);
|
||||
const TFieldref* fr = f.field();
|
||||
if (fr != NULL)
|
||||
{
|
||||
if (bSave)
|
||||
fr->write(ini, defpar, f.get());
|
||||
else
|
||||
f.set(fr->read(ini, defpar));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TCoop_sender
|
||||
///////////////////////////////////////////////////////////
|
||||
class TCoop_sender : public TTS_sender
|
||||
{
|
||||
TCoopSender_mask * _mask;
|
||||
|
||||
protected:
|
||||
// virtual bool test_swap(const TRecordset& mov) { return ((TMovCoop_recset&)mov).nota_credito();}
|
||||
|
||||
protected:
|
||||
virtual TRecordset & movrecset();
|
||||
virtual TRecordset & rmovrecset(const TRecordset & mov);
|
||||
virtual TRecordset & rivarecset(const TRecordset & mov);
|
||||
virtual const TRecordset & clirecset(const char tipocf, const long codcf);
|
||||
virtual const char * decode_causale(const TRecordset& mov);
|
||||
virtual TMask & get_mask();
|
||||
virtual const char * extra_modules() const {return "ba";}
|
||||
|
||||
public:
|
||||
virtual void update_parameters(const TMask & m, TRecordset & mov) {}
|
||||
TCoop_sender() : _mask(NULL) {}
|
||||
};
|
||||
|
||||
TCoop_sender& app() { return (TCoop_sender&)main_app(); }
|
||||
|
||||
TMask & TCoop_sender::get_mask()
|
||||
{
|
||||
if (_mask == NULL)
|
||||
_mask = new TCoopSender_mask;
|
||||
|
||||
return * _mask;
|
||||
}
|
||||
|
||||
const char * TCoop_sender::decode_causale(const TRecordset& mov)
|
||||
{
|
||||
const int codcaus = mov.get(MOV_CODCAUS).as_int();
|
||||
|
||||
switch (codcaus)
|
||||
{
|
||||
case 1:
|
||||
return "Fattura di vendita";
|
||||
case 2:
|
||||
return "Nota di credito a cliente";
|
||||
case 11:
|
||||
return "Fattura di acquisto";
|
||||
case 12:
|
||||
return "Nota di credito da fornitore";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
TRecordset & TCoop_sender::movrecset()
|
||||
{
|
||||
|
||||
TRecordset * mov = get_recset(LF_MOV);
|
||||
|
||||
if (mov == NULL)
|
||||
{
|
||||
TString query("SELECT * FROM ");
|
||||
TMask & m = get_mask();
|
||||
TFilename name = m.get(F_INPATH);
|
||||
|
||||
name.add(m.get(F_INFILEM));
|
||||
query << name;
|
||||
|
||||
mov = set_recset(LF_MOV, new TMovCoop_recset(query, recsets()));
|
||||
}
|
||||
|
||||
return *mov;
|
||||
}
|
||||
|
||||
TRecordset & TCoop_sender::rmovrecset(const TRecordset & mov)
|
||||
{
|
||||
TRMovCoop_recset * rmov = (TRMovCoop_recset *) get_recset(LF_RMOV);
|
||||
CHECK(rmov != NULL, "Recordset righe contabili non inizializzato");
|
||||
long numreg = mov.get(MOV_NUMREG).as_int();
|
||||
|
||||
rmov->find(numreg);
|
||||
return *rmov;
|
||||
}
|
||||
|
||||
TRecordset & TCoop_sender::rivarecset(const TRecordset & mov)
|
||||
{
|
||||
TIVACoop_recset * rmoviva = (TIVACoop_recset *) get_recset(LF_RMOVIVA);
|
||||
CHECK(rmoviva != NULL, "Recordset righe IVA non inizializzato");
|
||||
long numreg = mov.get(MOV_NUMREG).as_int();
|
||||
|
||||
rmoviva->find(numreg);
|
||||
return *rmoviva;
|
||||
}
|
||||
|
||||
const TRecordset& TCoop_sender::clirecset(const char tipocf, const long codcf)
|
||||
{
|
||||
TClifoCoop_recset * clifo = (TClifoCoop_recset *) get_recset(LF_CLIFO);
|
||||
|
||||
if (clifo == NULL)
|
||||
{
|
||||
TString query("SELECT * FROM ");
|
||||
TMask & m = get_mask();
|
||||
TFilename name = m.get(F_INPATH);
|
||||
|
||||
name.add(m.get(F_INFILEA));
|
||||
query << name;
|
||||
|
||||
clifo = (TClifoCoop_recset *) set_recset(LF_CLIFO, new TClifoCoop_recset(query));
|
||||
}
|
||||
|
||||
if (!clifo->find(tipocf, codcf))
|
||||
{
|
||||
TString msg(tipocf == 'C' ? "Cliente " : "Fornitore ");
|
||||
|
||||
msg << codcf << " assente";
|
||||
app().log(2, msg);
|
||||
}
|
||||
|
||||
return *clifo;
|
||||
}
|
||||
|
||||
int co1500(int argc, char* argv[])
|
||||
{
|
||||
TCoop_sender app;
|
||||
app.run(argc, argv, "Invio a TeamSystem mov. coop.");
|
||||
return 0;
|
||||
}
|
9
co/co1500a.h
Executable file
9
co/co1500a.h
Executable file
@ -0,0 +1,9 @@
|
||||
// invio dati mov coop. da ebc ad teamsystem
|
||||
|
||||
#define F_CODDITTA 101
|
||||
#define F_RAGSOC 102
|
||||
#define F_INPATH 103
|
||||
#define F_INFILEA 104
|
||||
#define F_INFILEM 107
|
||||
#define F_PATH 105
|
||||
#define F_FILE 106
|
82
co/co1500a.uml
Executable file
82
co/co1500a.uml
Executable file
@ -0,0 +1,82 @@
|
||||
#include "co1500a.h"
|
||||
|
||||
PAGE "Invio mov. coop a TeamSystem" -1 -1 78 20
|
||||
|
||||
GROUPBOX DLG_NULL 76 3
|
||||
BEGIN
|
||||
PROMPT 2 1 "@bDitta corrente"
|
||||
END
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 3 2 "Codice "
|
||||
FLAGS "FD"
|
||||
USE LF_NDITTE
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 23 2 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 76 5
|
||||
BEGIN
|
||||
PROMPT 2 4 "Sorgenti"
|
||||
END
|
||||
|
||||
STRING F_INPATH 256 39
|
||||
BEGIN
|
||||
PROMPT 3 5 "Cartella "
|
||||
DSELECT
|
||||
CHECKTYPE REQUIRED
|
||||
FIELD TSMInPath
|
||||
END
|
||||
|
||||
STRING F_INFILEA 18
|
||||
BEGIN
|
||||
PROMPT 3 6 "File anagrafica "
|
||||
FIELD TSMInFileA
|
||||
END
|
||||
|
||||
STRING F_INFILEM 18
|
||||
BEGIN
|
||||
PROMPT 3 7 "File movimenti "
|
||||
FIELD TSMInFileM
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 76 4
|
||||
BEGIN
|
||||
PROMPT 2 9 "Destinazione"
|
||||
END
|
||||
|
||||
STRING F_PATH 256 39
|
||||
BEGIN
|
||||
PROMPT 3 10 "Cartella "
|
||||
DSELECT
|
||||
CHECKTYPE REQUIRED
|
||||
FIELD TSMDestPath
|
||||
END
|
||||
|
||||
STRING F_FILE 18
|
||||
BEGIN
|
||||
PROMPT 3 11 "File "
|
||||
FIELD TSMDestFile
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
17
co/coconf.h
Executable file
17
co/coconf.h
Executable file
@ -0,0 +1,17 @@
|
||||
#define F_CODDITTA 101
|
||||
#define F_RAGSOC 102
|
||||
|
||||
#define F_RITQTA 103
|
||||
#define F_RITPREZZO 104
|
||||
#define F_SPESARITACC 105
|
||||
#define F_D_SPESARITACC 106
|
||||
#define F_SPESADIRITTI1 107
|
||||
#define F_D_SPESADIRITTI1 108
|
||||
#define F_SPESADIRITTI2 109
|
||||
#define F_D_SPESADIRITTI2 110
|
||||
#define F_SPESAFACC 111
|
||||
#define F_D_SPESAFACC 112
|
||||
#define F_SPESACASSE 113
|
||||
#define F_D_SPESACASSE 114
|
||||
#define F_PROGQTA 115
|
||||
|
207
co/colib.cpp
Executable file
207
co/colib.cpp
Executable file
@ -0,0 +1,207 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "colib.h"
|
||||
#include "socicoop.h"
|
||||
#include "mercaticoop.h"
|
||||
|
||||
static bool add_socio(const TRelation& rel, void* pJolly)
|
||||
{
|
||||
TString_array& a = *(TString_array*)pJolly;
|
||||
TString16 key, last_key;
|
||||
|
||||
const TRectype& rec = rel.curr();
|
||||
key.format("%6d", rec.get_int(SC_CODCF));
|
||||
|
||||
const int last = a.items()-1;
|
||||
if (last >= 0)
|
||||
last_key = a.row(last);
|
||||
|
||||
if (key != last_key)
|
||||
a.add(key);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static real get_perc_socio(const long codsocio, const TString& codcomp)
|
||||
{
|
||||
real perc = ZERO;
|
||||
const TRectype& socio = cache().get(LF_SOCICOOP, codsocio);
|
||||
if (socio.get(SC_COMPAGNIA1) == codcomp)
|
||||
perc = socio.get_real(SC_QUOTA1);
|
||||
else
|
||||
if (socio.get(SC_COMPAGNIA2) == codcomp)
|
||||
perc = socio.get_real(SC_QUOTA2);
|
||||
else
|
||||
if (socio.get(SC_COMPAGNIA3) == codcomp)
|
||||
perc = socio.get_real(SC_QUOTA3);
|
||||
return perc;
|
||||
}
|
||||
|
||||
// funzione che restituisce il codice spesa data il nome della spesa in configurazione
|
||||
static const TString& cod_spesa(const char* spesa)
|
||||
{
|
||||
static TAssoc_array _spese;
|
||||
static long _ditta = 0;
|
||||
if (prefix().get_codditta() != _ditta)
|
||||
{
|
||||
TConfig d(CONFIG_DITTA, "co");
|
||||
_spese = d.list_variables();
|
||||
_ditta = prefix().get_codditta();
|
||||
}
|
||||
TString* cod = (TString*) _spese.objptr(spesa);
|
||||
if (cod != NULL)
|
||||
return *cod;
|
||||
return EMPTY_STRING;
|
||||
}
|
||||
|
||||
// aggiorna le spese sul documento
|
||||
void update_spese_doc(const long codmercato, TDocumento& doc)
|
||||
{
|
||||
TAssoc_array spese_doc;
|
||||
const TRectype& mercato = cache().get(LF_MERCATICOOP, codmercato);
|
||||
spese_doc.add(cod_spesa("SpesaRitAcc")); // spesa ritenuta accantonamento
|
||||
real perc = mercato.get_real(MC_DIRITTI1);
|
||||
if (!perc.is_zero())
|
||||
spese_doc.add(cod_spesa("SpesaDiritti1")); // spesa diritti di mercato 1
|
||||
perc = mercato.get_real(MC_DIRITTI2);
|
||||
if (!perc.is_zero())
|
||||
spese_doc.add(cod_spesa("SpesaDiritti2")); // spesa diritti di mercato 2
|
||||
real spesa = mercato.get_real(MC_SPESEFACC);
|
||||
if (!spesa.is_zero())
|
||||
spese_doc.add(cod_spesa("SpesaFacc")); // spesa facchinaggio
|
||||
spesa = mercato.get_real(MC_SPESECASSE);
|
||||
if (!spesa.is_zero())
|
||||
spese_doc.add(cod_spesa("SpesaCasse")); // spesa casse
|
||||
// chiamo la funzione che aggiunge in automatico le spese
|
||||
TString_array array_spese;
|
||||
spese_doc.get_keys(array_spese);
|
||||
doc.zero(DOC_SPESEUPD);
|
||||
doc.update_spese_aut(array_spese);
|
||||
|
||||
// devo ora sistemare le % e qta/prezzo sulle spese
|
||||
real totqta = ZERO;
|
||||
real totcasse = ZERO;
|
||||
for (int i = 1; i <= doc.rows(); i++)
|
||||
{
|
||||
const TRiga_documento& riga_doc = doc[i];
|
||||
if (riga_doc.is_merce())
|
||||
{
|
||||
totqta+=riga_doc.quantita();
|
||||
totcasse+=riga_doc.get_long(DOC_NCOLLI);
|
||||
}
|
||||
}
|
||||
for (i = 1; i <= doc.rows(); i++)
|
||||
{
|
||||
TRiga_documento& riga_doc = doc[i];
|
||||
if (riga_doc.is_spese())
|
||||
{
|
||||
const char* codspesa = riga_doc.get(RDOC_CODART);
|
||||
if (spese_doc.is_key(codspesa))
|
||||
{
|
||||
const TString& spesadiritti1 = cod_spesa("SpesaDiritti1");
|
||||
if (spesadiritti1 == codspesa) // sistemo la qta/valore/codice iva
|
||||
{
|
||||
real perc = mercato.get_real(MC_DIRITTI1);
|
||||
if (!perc.is_zero())
|
||||
{
|
||||
riga_doc.put(RDOC_QTA, perc);
|
||||
riga_doc.put(RDOC_CODIVA, mercato.get(MC_CODIVA1));
|
||||
}
|
||||
}
|
||||
const TString& spesadiritti2 = cod_spesa("SpesaDiritti2");
|
||||
if (spesadiritti2 == codspesa) // sistemo la qta/valore/codice iva
|
||||
{
|
||||
real perc = mercato.get_real(MC_DIRITTI2);
|
||||
if (!perc.is_zero())
|
||||
{
|
||||
riga_doc.put(RDOC_QTA, perc);
|
||||
riga_doc.put(RDOC_CODIVA, mercato.get(MC_CODIVA2));
|
||||
}
|
||||
}
|
||||
const TString& spesafacc = cod_spesa("SpesaFacc");
|
||||
if (spesafacc == codspesa) // sistemo la qta/valore/codice iva
|
||||
{
|
||||
riga_doc.put(RDOC_QTA, totqta);
|
||||
riga_doc.put(RDOC_PREZZO, mercato.get(MC_SPESEFACC));
|
||||
riga_doc.put(RDOC_CODIVA, mercato.get(MC_CODIVAFACC));
|
||||
}
|
||||
const TString& spesacasse = cod_spesa("SpesaCasse");
|
||||
if (spesacasse == codspesa) // sistemo la qta/valore/codice iva
|
||||
{
|
||||
riga_doc.put(RDOC_QTA, totcasse);
|
||||
riga_doc.put(RDOC_PREZZO, mercato.get(MC_SPESECASSE));
|
||||
riga_doc.put(RDOC_CODIVA, mercato.get(MC_CODIVACASS));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// crea una lista documenti a partire da un conferimento per compagnia
|
||||
int compagnia2soci(const TDocumento& doc_orig, const TString& codcomp, const long codmercato, TLista_documenti& listadoc)
|
||||
{
|
||||
TString_array listasoci;
|
||||
TRelation relsoci(LF_SOCICOOP);
|
||||
TString filtro = "(COMPAGNIA1=\"";
|
||||
filtro << codcomp;
|
||||
filtro << "\") || (COMPAGNIA2=\"";
|
||||
filtro << codcomp;
|
||||
filtro << "\") || (COMPAGNIA3=\"";
|
||||
filtro << codcomp;
|
||||
filtro << "\")";
|
||||
TCursor cursoci(&relsoci, filtro);
|
||||
cursoci.scan(add_socio, &listasoci);
|
||||
FOR_EACH_ARRAY_ROW(listasoci, r, row)
|
||||
{
|
||||
long codsocio = row->get_long();
|
||||
TDocumento docnew(doc_orig);
|
||||
docnew.put(DOC_CODCF, codsocio);
|
||||
docnew.put(DOC_TIPOCF, "F");
|
||||
listadoc.add(docnew);
|
||||
}
|
||||
for (int i = 1; i <= doc_orig.rows(); i++)
|
||||
{
|
||||
const TRiga_documento& riga_doc = doc_orig[i];
|
||||
if (riga_doc.is_merce())
|
||||
{
|
||||
const char avalore = riga_doc.get_char(RDOC_CODAGG1);
|
||||
if (avalore == 'X')
|
||||
{
|
||||
TGeneric_distrib prezzo_dist(riga_doc.prezzo(false, false));
|
||||
for (int j = 0; j < listadoc.items(); j++)
|
||||
{
|
||||
long codsocio = listadoc[j].codcf();
|
||||
real perc = get_perc_socio(codsocio, codcomp);
|
||||
prezzo_dist.add(perc);
|
||||
}
|
||||
for (int k = 0; k < listadoc.items(); k++)
|
||||
{
|
||||
real prezzosocio = prezzo_dist.get();
|
||||
listadoc[k][i].put(RDOC_PREZZO, prezzosocio);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TGeneric_distrib qta_dist(riga_doc.quantita());
|
||||
for (int j = 0; j < listadoc.items(); j++)
|
||||
{
|
||||
long codsocio = listadoc[j].codcf();
|
||||
real perc = get_perc_socio(codsocio, codcomp);
|
||||
qta_dist.add(perc);
|
||||
}
|
||||
for (int k = 0; k < listadoc.items(); k++)
|
||||
{
|
||||
real qtasocio = qta_dist.get();
|
||||
listadoc[k][i].put(RDOC_QTA, qtasocio);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; i < listadoc.items(); i++)
|
||||
{
|
||||
listadoc[i].put(DOC_RAGGR, true);
|
||||
update_spese_doc(codmercato, listadoc[i]);
|
||||
}
|
||||
return listadoc.items();
|
||||
}
|
||||
|
14
co/colib.h
Executable file
14
co/colib.h
Executable file
@ -0,0 +1,14 @@
|
||||
#ifndef __COLIB_H
|
||||
#define __COLIB_H
|
||||
|
||||
#ifndef __VELIB_H
|
||||
#include "../ve/velib.h"
|
||||
#endif
|
||||
|
||||
// crea la lista documenti per tutti i soci
|
||||
int compagnia2soci(const TDocumento& doc_compagnia, const TString& codcomp, const long codmercato, TLista_documenti& docs_soci);
|
||||
void update_spese_doc(const long codmercato, TDocumento& doc);
|
||||
|
||||
#endif
|
||||
|
||||
|
39
co/comenu.men
Executable file
39
co/comenu.men
Executable file
@ -0,0 +1,39 @@
|
||||
[COMENU_001]
|
||||
Caption = "Gestione cooperative"
|
||||
Picture = <ve00>
|
||||
Module = 29
|
||||
Flags = ""
|
||||
Item_01 = "Configurazione modulo", "co0 -2", "F"
|
||||
Item_02 = "Archivi e tabelle", [COMENU_011]
|
||||
Item_03 = "Conferimenti e prestazioni", [COMENU_012]
|
||||
Item_04 = "Stampe", [COMENU_013]
|
||||
|
||||
[COMENU_011]
|
||||
Caption = "Archivi e tabelle"
|
||||
Picture = <ve00>
|
||||
Module = 29
|
||||
Flags = ""
|
||||
Item_01 = "Tabella compagnie", "co0 -0 %CMP", "F"
|
||||
Item_02 = "Tabella correlazione articoli", "co0 -0 %COA", "F"
|
||||
Item_03 = "Anagrafica mercati", "co0 -4", "F"
|
||||
Item_04 = "Anagrafica soci", "co0 -5", "F"
|
||||
|
||||
[COMENU_012]
|
||||
Caption = "Conferimenti e prestazioni"
|
||||
Picture = <ve00>
|
||||
Module = 29
|
||||
Flags = ""
|
||||
Item_01 = "Gestione conferimenti/prestazioni", "co0 -6", "F"
|
||||
Item_02 = "Importazione conferimenti", "co0 -7", "F"
|
||||
Item_03 = "Aggiornamento prezzi", "co0 -8", "F"
|
||||
|
||||
[COMENU_013]
|
||||
Caption = "Stampe"
|
||||
Picture = <ve00>
|
||||
Module = 29
|
||||
Flags = ""
|
||||
Item_01 = "Stampa libro soci", "ba8 -4 co1100a", "F"
|
||||
Item_02 = "Stampa conferimenti", "ve1 -3 co1200a", "F"
|
||||
Item_02 = "Stampa estratto conto", "ve1 -3 co1300a", "F"
|
||||
|
||||
|
183
co/conferim.ini
Executable file
183
co/conferim.ini
Executable file
@ -0,0 +1,183 @@
|
||||
[MAIN]
|
||||
TYPE=Conferimento
|
||||
MSKFILE=conferim.msk
|
||||
FRMFILE=VEFAT.FRM
|
||||
CAMPICALC=TOTLORDI|TOTMER|TOTPRE|SPESE|SPESINC|SPESIMB|SPESTRA|SPESGEN|BOLLI|IMPONIBILI|IMPOSTE|TOTDOC|SCONTOD|SCONTOT|OMAGGI|PROVVD
|
||||
CALCOLI=*
|
||||
TOTPROVV =
|
||||
TIPOCF=F
|
||||
PREZZO=ULTCOS1
|
||||
[PROFILO]
|
||||
OCCASEDIT = 3
|
||||
OCFPI = 1
|
||||
COFI = 3
|
||||
STATOPAIV = 3
|
||||
PAIVA = 3
|
||||
GOLEM = 3
|
||||
GRRECAPITO = 3
|
||||
INDCF = 1
|
||||
CIVCF = 1
|
||||
LOCALITACF = 1
|
||||
CAPCF = 1
|
||||
PROVCOM = 1
|
||||
COMCF = 1
|
||||
DENCOM = 1
|
||||
STATOCF = 1
|
||||
DESSTATOCF = 1
|
||||
CODVAL1 = 3
|
||||
CODVAL2 = 3
|
||||
NOME_VAL1 = 3
|
||||
NOME_VAL2 = 3
|
||||
CONTROEURO = 3
|
||||
CAMBIO = 3
|
||||
DATA_CAMBIO1 = 3
|
||||
DATA_CAMBIO2 = 3
|
||||
CODLIN = 3
|
||||
DESLIN = 3
|
||||
CODPAG = 4
|
||||
DESCODPAG = 3
|
||||
GRSCADENZE = 3
|
||||
DATAINSC = 3
|
||||
DATASCAD1 = 1
|
||||
DATASCAD2 = 1
|
||||
DATASCAD3 = 1
|
||||
DATASCAD4 = 1
|
||||
DATASCAD5 = 1
|
||||
CODABIA = 4
|
||||
CODCABA = 4
|
||||
DESBANAPP = 3
|
||||
IBAN = 3
|
||||
IBAN_STATO = 3
|
||||
IBAN_CHECK = 3
|
||||
BBAN = 3
|
||||
BBAN_CIN = 3
|
||||
BBAN_ABI = 3
|
||||
BBAN_CAB = 3
|
||||
BBAN_CONTO = 3
|
||||
CODABIP = 3
|
||||
CODCABP = 3
|
||||
DESBANPRE = 3
|
||||
CATVEN = 3
|
||||
DESCATVEN = 1
|
||||
CODLIST1 = 3
|
||||
CODLIST2 = 3
|
||||
DESLIST = 1
|
||||
CODCONT1 = 3
|
||||
CODCONT2 = 3
|
||||
DESCONT = 1
|
||||
CODCAMP = 3
|
||||
DESCAMP = 1
|
||||
SCONTOPERC = 3
|
||||
DATADOCRIF = 3
|
||||
NUMDOCRIF = 2
|
||||
CODAG = 3
|
||||
DESAG = 3
|
||||
CODZON = 3
|
||||
DESZON = 3
|
||||
CODPORTO = 3
|
||||
DESPORTO = 3
|
||||
CAUSTRASP = 3
|
||||
DENCAUSTRASP = 3
|
||||
CODVETT1 = 3
|
||||
CODVETT2 = 0
|
||||
CODVETT3 = 0
|
||||
NOMEVETT1 = 3
|
||||
NOMEVETT2 = 0
|
||||
NOMEVETT3 = 0
|
||||
NCOPIE = 0
|
||||
IMPPAGATO = 3
|
||||
ACCSALDO = 3
|
||||
DOC1 = 0
|
||||
DOC2 = 0
|
||||
DOC3 = 0
|
||||
IMPNETTI = 0
|
||||
RAGGREFF = 3
|
||||
SPESEINC = 3
|
||||
ADDBOLLI = 3
|
||||
BLANK = 1
|
||||
CAUSMAG = 4
|
||||
CAUSMAGC = 1
|
||||
DESCRMAG = 3
|
||||
DESCRMAGC = 1
|
||||
CODCMS = 3
|
||||
DESCRCMS = 3
|
||||
FASCMS = 3
|
||||
DESCRFAS = 3
|
||||
[DEFAULT]
|
||||
NDEFAULTS=0
|
||||
[SHEET]
|
||||
NCOLS=24
|
||||
1=103
|
||||
2=104
|
||||
3=105
|
||||
4=106
|
||||
5=107
|
||||
6=108
|
||||
7=109
|
||||
8=110
|
||||
9=111
|
||||
10=133
|
||||
11=112
|
||||
12=113
|
||||
13=116
|
||||
14=118
|
||||
15=120
|
||||
16=121
|
||||
17=122
|
||||
18=123
|
||||
19=124
|
||||
20=125
|
||||
21=127
|
||||
22=128
|
||||
23=129
|
||||
24=142
|
||||
[RIGHE]
|
||||
NTIPIRIGA=5
|
||||
1=CO
|
||||
2=02
|
||||
3=03
|
||||
4=04
|
||||
5=05
|
||||
[HANDLERS]
|
||||
NHANDLER=0
|
||||
[PROFILOGRUPPO]
|
||||
101 = 0
|
||||
100 = 3
|
||||
200 = 3
|
||||
300 = 3
|
||||
400 = 3
|
||||
500 = 3
|
||||
600 = 3
|
||||
700 = 3
|
||||
800 = 3
|
||||
810 = 3
|
||||
820 = 3
|
||||
830 = 3
|
||||
1000 = 3
|
||||
1100 = 3
|
||||
1210 = 3
|
||||
1400 = 3
|
||||
1500 = 3
|
||||
1600 = 0
|
||||
1800 = 3
|
||||
1900 = 3
|
||||
2200 = 0
|
||||
2300 = 3
|
||||
2400 = 3
|
||||
2900 = 3
|
||||
3000 = 3
|
||||
4000 = 3
|
||||
[ORDINEGRUPPI]
|
||||
NGROUPS=12
|
||||
1=1000
|
||||
2=100
|
||||
3=200
|
||||
4=400
|
||||
5=500
|
||||
6=600
|
||||
7=700
|
||||
8=830
|
||||
9=1400
|
||||
10=1900
|
||||
11=2900
|
||||
12=3000
|
943
co/conferim.msk
Executable file
943
co/conferim.msk
Executable file
@ -0,0 +1,943 @@
|
||||
TOOLBAR "" 0 -2 0 2
|
||||
BU 18 10 2
|
||||
BE
|
||||
PR -15 -1 "~Registra"
|
||||
ME EXIT,20082
|
||||
PI 103
|
||||
PI 153
|
||||
EN
|
||||
BU 17 10 2
|
||||
BE
|
||||
PR -25 -1 "~Elimina"
|
||||
ME EXIT,127
|
||||
EN
|
||||
BU 27 10 2
|
||||
BE
|
||||
PR -35 -1 "E~labora"
|
||||
PI 120
|
||||
EN
|
||||
BU 24 10 2
|
||||
BE
|
||||
PR -45 -1 ""
|
||||
ME EXIT,20082
|
||||
EN
|
||||
BU 2 10 2
|
||||
BE
|
||||
PR -55 -1 ""
|
||||
ME EXIT,27
|
||||
EN
|
||||
EN
|
||||
PA "Pag. 1" 11 60 14
|
||||
GR -1 78 5
|
||||
BE
|
||||
PR 1 0 ""
|
||||
EN
|
||||
ST 101 4
|
||||
BE
|
||||
PR 2 1 "Cod. num. "
|
||||
FI CODNUM
|
||||
US %NUM KE 1
|
||||
IN CODTAB 101
|
||||
DI "Codice" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 173 S0
|
||||
CH NORMAL
|
||||
FLAG "GDU"
|
||||
ME CO,2@
|
||||
EN
|
||||
ST 173 50
|
||||
BE
|
||||
PR 24 1 ""
|
||||
FLAG "GD"
|
||||
ME CO,3@
|
||||
EN
|
||||
ST 172 4
|
||||
BE
|
||||
FI TIPODOC
|
||||
PR 2 2 "Tipo doc. "
|
||||
US %TIP KE 1
|
||||
IN CODTAB 172
|
||||
DI "Codice" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 176 S0
|
||||
CH NORMAL
|
||||
FLAG "GDU"
|
||||
ME CO,4@
|
||||
EN
|
||||
ST 176 50
|
||||
BE
|
||||
PR 24 2 ""
|
||||
FLAG "GD"
|
||||
ME CO,5@
|
||||
EN
|
||||
LISTBOX 107 9
|
||||
BE
|
||||
PR 100 100 ""
|
||||
FI TIPOCF
|
||||
IT "F|Fornitore"
|
||||
FLAG "D"
|
||||
EN
|
||||
ST 103 1
|
||||
BE
|
||||
PR 100 100 "<D><P> "
|
||||
FI PROVV
|
||||
FLAG "D"
|
||||
EN
|
||||
ST 102 4
|
||||
BE
|
||||
PR 2 3 "Esercizio "
|
||||
FI ANNO
|
||||
FLAG "GD"
|
||||
ME CO,9@
|
||||
EN
|
||||
NU 104 6
|
||||
BE
|
||||
PR 24 3 "Numero doc. "
|
||||
FI NDOC
|
||||
ME CO,6@
|
||||
FLAG "GDR"
|
||||
EN
|
||||
DA 106
|
||||
BE
|
||||
PR 46 3 "Data "
|
||||
FI DATADOC
|
||||
ME CO,7@
|
||||
EN
|
||||
ST 105 1
|
||||
BE
|
||||
PR 67 3 "Stato "
|
||||
FI STATO
|
||||
ME CO,8@
|
||||
FLAG "DG"
|
||||
EN
|
||||
GR -1 78 7
|
||||
BE
|
||||
PR 1 4 ""
|
||||
EN
|
||||
LISTBOX 401 10
|
||||
BE
|
||||
PR 2 5 "Conferimento da "
|
||||
IT "S|Socio"
|
||||
ME SHOW,108|SHOW,301|HIDE,344|HIDE,347
|
||||
IT "C|Compagnia"
|
||||
ME SHOW,344|SHOW,347|HIDE,108|HIDE,301
|
||||
EN
|
||||
ST 108 6
|
||||
BE
|
||||
PR 2 6 "Socio "
|
||||
WA "Socio assente"
|
||||
HE "Codice del socio del documento"
|
||||
FLAG "R"
|
||||
FI CODCF
|
||||
GR 1
|
||||
US 161 KE 1
|
||||
JO 20 INTO TIPOCF=='F' CODCF==CODCF
|
||||
IN CODCF 108
|
||||
DI "Codice" CODCF
|
||||
DI "Ragione Sociale@50" 20->RAGSOC
|
||||
DI "Partita IVA@12" 20->PAIV
|
||||
OU 108 CODCF
|
||||
OU 301 20->RAGSOC
|
||||
OU 328 20->COFI
|
||||
OU 340 20->PAIV
|
||||
CH REQUIRED
|
||||
ADD RU co0 -5
|
||||
ME CO,10@
|
||||
EN
|
||||
ST 301 50
|
||||
BE
|
||||
WA "Socio assente"
|
||||
HE "Ragione sociale del socio del documento"
|
||||
PR 24 6 ""
|
||||
GR 1
|
||||
US 20 KE 2
|
||||
IN TIPOCF "F"
|
||||
IN RAGSOC 301
|
||||
DI "Ragione Sociale@50" RAGSOC
|
||||
DI "Partita IVA@12" PAIV
|
||||
DI "Codice" CODCF
|
||||
OU 108 CODCF
|
||||
OU 301 RAGSOC
|
||||
CH REQUIRED
|
||||
ADD RU cg0 -1 F
|
||||
ME CO,11@
|
||||
EN
|
||||
ST 328 16
|
||||
BE
|
||||
PR 2 7 "Cod. fisc. "
|
||||
FLAG "D"
|
||||
EN
|
||||
ST 340 12
|
||||
BE
|
||||
PR 42 7 "Partita Iva "
|
||||
FLAG "D"
|
||||
EN
|
||||
ST 344 4
|
||||
BE
|
||||
PR 2 6 "Compagnia "
|
||||
FL "H"
|
||||
US %CMP
|
||||
IN CODTAB 344
|
||||
DI "Codice" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 344 CODTAB
|
||||
OU 347 S0
|
||||
FLAG "U"
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 347 50
|
||||
BE
|
||||
PR 24 6 ""
|
||||
FL "HD"
|
||||
EN
|
||||
NU 343 6
|
||||
BE
|
||||
PR 2 8 "Mercato "
|
||||
FI MERCATO
|
||||
US 160
|
||||
JO 20 INTO TIPOCF=='C' CODCF==CODCF
|
||||
IN CODCF 343
|
||||
DI "Codice" CODCF
|
||||
DI "Descrizione@50" 20->RAGSOC
|
||||
OU 343 CODCF
|
||||
OU 346 20->RAGSOC
|
||||
FLAG "UP"
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 346 50
|
||||
BE
|
||||
PR 25 8 ""
|
||||
FL "D"
|
||||
EN
|
||||
NU 345 6
|
||||
BE
|
||||
PR 2 9 "N.f.asta "
|
||||
FI NFASTA
|
||||
EN
|
||||
ST 111 3
|
||||
BE
|
||||
PR 2 11 "Valuta "
|
||||
FL "UH"
|
||||
FI CODVAL
|
||||
EN
|
||||
NU 185 15
|
||||
BE
|
||||
PR 2 11 "Riga corrente: Giacenza "
|
||||
FLAG "HD"
|
||||
PI ".5"
|
||||
EN
|
||||
NU 186 15
|
||||
BE
|
||||
PR 44 11 "Disponibilita' "
|
||||
FLAG "HD"
|
||||
PI ".5"
|
||||
EN
|
||||
LISTBOX 175 30
|
||||
BE
|
||||
PR 2 11 "Tipo riga da aggiungere "
|
||||
EN
|
||||
SPREADSHEET 500
|
||||
BE
|
||||
PR 2 13 ""
|
||||
IT "Lordo@5"
|
||||
IT "Tipo riga@2"
|
||||
IT "Mag. @3"
|
||||
IT "Dep.@2"
|
||||
IT "Codice Articolo@20"
|
||||
IT "Codice\nLivello 1@9"
|
||||
IT "Codice\nLivello 2@9"
|
||||
IT "Codice\nLivello 3@9"
|
||||
IT "Codice\nLivello 4@9"
|
||||
IT "Descrizione@50"
|
||||
IT "UM@2"
|
||||
IT "Quantita'@11"
|
||||
IT "Prezzo@18"
|
||||
IT "Quantita'\nEvasa@11"
|
||||
IT "Evasa@1"
|
||||
IT "Tara@15"
|
||||
IT "Peso Netto@15"
|
||||
IT "N.Casse@7"
|
||||
IT "Da evadere@1"
|
||||
IT "Ritenuta di mant.@25"
|
||||
IT "Perc.\nProvv.@5"
|
||||
IT "Imp.Fisso unitario@1"
|
||||
IT "Importo Fisso@18"
|
||||
IT "Codice\nIVA@4"
|
||||
IT "Addebito IVA@1"
|
||||
IT "Aspetto beni@3"
|
||||
IT "Causale\nMagazzino@12"
|
||||
IT "Magazzino\nCollegato@9"
|
||||
IT "Deposito\nCollegato@9"
|
||||
IT "Data\nconsegna@10"
|
||||
IT "Cod. Art. Mag.@20"
|
||||
IT "Controllato@11"
|
||||
IT "Quantita'\nlorda@13"
|
||||
IT "Quantita'\nagg. 2@13"
|
||||
IT "Quantita'\nagg. 3@13"
|
||||
IT "Quantita'\nagg. 4@13"
|
||||
IT "Quantita'\nagg. 5@13"
|
||||
IT "Impianto@8"
|
||||
IT "Linea@5"
|
||||
IT "Codice\ncommessa@20"
|
||||
IT "Fase\ncommessa@10"
|
||||
IT "Art.a valore"
|
||||
EN
|
||||
EN
|
||||
PA "Pag. 2" 11 60 14
|
||||
GR -1 78 6
|
||||
BE
|
||||
PR 1 0 ""
|
||||
EN
|
||||
ST -1 4
|
||||
BE
|
||||
PR 2 1 "Cod. num. "
|
||||
FLAG "D"
|
||||
GR 2
|
||||
EN
|
||||
ST -1 50
|
||||
BE
|
||||
PR 24 1 ""
|
||||
FLAG "D"
|
||||
GR 3
|
||||
EN
|
||||
ST -1 4
|
||||
BE
|
||||
PR 2 2 "Tipo doc. "
|
||||
FLAG "D"
|
||||
GR 4
|
||||
EN
|
||||
ST -1 50
|
||||
BE
|
||||
PR 24 2 ""
|
||||
FLAG "D"
|
||||
GR 5
|
||||
EN
|
||||
ST -1 4
|
||||
BE
|
||||
PR 2 3 "Esercizio "
|
||||
GR 9
|
||||
FLAG "D"
|
||||
EN
|
||||
NU -1 6
|
||||
BE
|
||||
PR 24 3 "Numero doc. "
|
||||
GR 6
|
||||
FLAG "D"
|
||||
EN
|
||||
DA -1
|
||||
BE
|
||||
PR 46 3 "Data "
|
||||
GR 7
|
||||
FLAG "D"
|
||||
EN
|
||||
ST -1 1
|
||||
BE
|
||||
PR 67 3 "Stato "
|
||||
GR 8
|
||||
FLAG "D"
|
||||
EN
|
||||
ST -1 6
|
||||
BE
|
||||
PR 2 4 "Socio "
|
||||
GR 10
|
||||
FLAG "D"
|
||||
EN
|
||||
ST -1 50
|
||||
BE
|
||||
PR 24 4 ""
|
||||
GR 11
|
||||
FLAG "D"
|
||||
EN
|
||||
CURRENCY 601 18
|
||||
BE
|
||||
PR 2 7 "Importi lordi "
|
||||
FI TOTLORDCON
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
CURRENCY 602 18
|
||||
BE
|
||||
PR 2 8 "Ritenute su prezzo "
|
||||
FI SCONTOD
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
CURENCY 603 18
|
||||
BE
|
||||
PR 2 9 "Importi netti "
|
||||
FI TOTMER
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
CURRENCY 604 18
|
||||
BE
|
||||
PR 2 10 "Spese su archivio mercati "
|
||||
FI SPESMER
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
CURRENCY 605 18
|
||||
BE
|
||||
PR 2 11 "Ritenute accantonamento su spese "
|
||||
FI TOTRITACC
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
CURRENCY 606 18
|
||||
BE
|
||||
PR 2 12 "Imponibile "
|
||||
FI IMPONIBILI
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
CURRENCY 607 18
|
||||
BE
|
||||
PR 2 13 "Imposte "
|
||||
FI IMPOSTE
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
CURRENCY 608 18
|
||||
BE
|
||||
PR 2 14 "Totale fattura "
|
||||
FI TOTDOC
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
EN
|
||||
ENDMASK
|
||||
PA "" -1 -1 76 21
|
||||
BO 101
|
||||
BE
|
||||
PR 2 1 "Lordo "
|
||||
EN
|
||||
ST 102 2
|
||||
BE
|
||||
PR 2 2 "Tipo riga "
|
||||
US %TRI
|
||||
IN CODTAB 102
|
||||
OU 254 S0
|
||||
CH REQUIRED
|
||||
FL "DG"
|
||||
FI TIPORIGA
|
||||
EN
|
||||
ST 254 25
|
||||
BE
|
||||
PR 22 2 ""
|
||||
FL "D"
|
||||
EN
|
||||
ST 103 3
|
||||
BE
|
||||
PR 2 3 "Magazzino "
|
||||
US MAG SE CODTAB[4,5]==""
|
||||
IN CODTAB 103
|
||||
DI "Codice" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 103 CODTAB
|
||||
OU 250 S0
|
||||
WA "Magazzino assente"
|
||||
FL "U"
|
||||
KE 1
|
||||
CH NORMAL
|
||||
FI CODMAG[1,3]
|
||||
EN
|
||||
ST 250 50
|
||||
BE
|
||||
PR 22 3 ""
|
||||
FL "D"
|
||||
EN
|
||||
ST 104 2
|
||||
BE
|
||||
PR 2 4 "Deposito "
|
||||
US MAG SE (CODTAB[1,3]==#103) && (CODTAB[4,5]!="")
|
||||
IN CODTAB[1,3] 103
|
||||
IN CODTAB[4,5] 104
|
||||
DI "Codice mag." CODTAB[1,3]
|
||||
DI "Codice dep." CODTAB[4,5]
|
||||
DI "Descrizione@50" S0
|
||||
OU 103 CODTAB[1,3]
|
||||
OU 104 CODTAB[4,5]
|
||||
OU 251 S0
|
||||
ME DIRTY,103|9,103
|
||||
CH NORMAL
|
||||
WA "Deposito assente"
|
||||
FL "U"
|
||||
KE 1
|
||||
FI CODMAG[4,5]
|
||||
EN
|
||||
ST 251 50
|
||||
BE
|
||||
PR 22 4 ""
|
||||
FL "D"
|
||||
EN
|
||||
ST 105 20
|
||||
BE
|
||||
PR 2 5 "Articolo "
|
||||
US 47 KE 1
|
||||
IN CODART 105
|
||||
DI "Codice@20" CODART
|
||||
DI "Descrizione@50" DESCR
|
||||
OU 105 CODART
|
||||
WA "Articolo assente"
|
||||
FL "U"
|
||||
FI CODART
|
||||
ADD RU ve2 -3
|
||||
EN
|
||||
ST 131 20
|
||||
BE
|
||||
PR 50 50 ""
|
||||
FI CODARTMAG
|
||||
FL "G"
|
||||
EN
|
||||
BO 132
|
||||
BE
|
||||
PR 51 50 ""
|
||||
FI CHECKED
|
||||
FL "D"
|
||||
EN
|
||||
ST 106 15
|
||||
BE
|
||||
PR 37 5 ""
|
||||
FL "U"
|
||||
US GCG
|
||||
JO FCG AL 500 INTO CODTAB==CODTAB[1,1]
|
||||
IN CODTAB[1,1] "1"
|
||||
IN CODTAB[2,] 106
|
||||
DI "Livello@20" 500@->S0
|
||||
DI "Gruppo@15" CODTAB[2,]
|
||||
DI "Descrizione@30" S0
|
||||
OU 106 CODTAB[2,]
|
||||
ME 0 RESET,107|RESET,108|RESET,109
|
||||
ME ENABLE,107
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 107 15
|
||||
BE
|
||||
PR 55 5 ""
|
||||
FL "U"
|
||||
US GCG
|
||||
JO FCG AL 500 INTO CODTAB==CODTAB[1,1]
|
||||
IN CODTAB[1,1] "2"
|
||||
IN CODTAB[2,] 107
|
||||
DI "Livello@20" 500@->S0
|
||||
DI "Gruppo@15" CODTAB[2,]
|
||||
DI "Descrizione@30" S0
|
||||
OU 107 CODTAB[2,]
|
||||
ME 0 RESET,108|RESET,109
|
||||
ME ENABLE,108
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 108 15
|
||||
BE
|
||||
PR 37 6 ""
|
||||
FL "U"
|
||||
US GCG
|
||||
JO FCG AL 500 INTO CODTAB==CODTAB[1,1]
|
||||
IN CODTAB[1,1] "3"
|
||||
IN CODTAB[2,] 108
|
||||
DI "Livello@20" 500@->S0
|
||||
DI "Gruppo@15" CODTAB[2,]
|
||||
DI "Descrizione@30" S0
|
||||
OU 108 CODTAB[2,]
|
||||
ME 0 RESET,109
|
||||
ME ENABLE,109
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 109 15
|
||||
BE
|
||||
PR 55 6 ""
|
||||
FL "U"
|
||||
US GCG
|
||||
JO FCG AL 500 INTO CODTAB==CODTAB[1,1]
|
||||
IN CODTAB[1,1] "4"
|
||||
IN CODTAB[2,] 109
|
||||
DI "Livello@20" 500@->S0
|
||||
DI "Gruppo@15" CODTAB[2,]
|
||||
DI "Descrizione@30" S0
|
||||
OU 109 CODTAB[2,]
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 262 8
|
||||
BE
|
||||
PR 2 5 "Codice "
|
||||
FL "U"
|
||||
US 55
|
||||
IN CODICE 262
|
||||
DI "Codice" CODICE
|
||||
DI "Descrizione@50" DESCR
|
||||
OU 110 DESCR
|
||||
OU 262 CODICE
|
||||
CH NORMAL
|
||||
ADD RU ve0 -5
|
||||
EN
|
||||
ZO 110 50
|
||||
BE
|
||||
PR 2 7 "Descrizione "
|
||||
CO ALL 262
|
||||
ADD RU ve0 -5
|
||||
FI DESCR
|
||||
EN
|
||||
ST 111 2
|
||||
BE
|
||||
PR 2 9 "U.M. "
|
||||
US 49 KE 2
|
||||
JO %UMS INTO CODTAB=UM
|
||||
IN CODART 131 SE
|
||||
IN UM 111
|
||||
DI "Codice@20" UM
|
||||
DI "Descrizione@50" %UMS->S0
|
||||
OU 111 UM
|
||||
FI UMQTA
|
||||
FLAG "U"
|
||||
CH REQUIRED
|
||||
EN
|
||||
ST 211 2
|
||||
BE
|
||||
PR 2 9 "U.M. "
|
||||
US %UMS
|
||||
IN CODTAB 211
|
||||
DI "Codice" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 211 CODTAB
|
||||
FI UMQTA
|
||||
FLAG "U"
|
||||
CH NORMAL
|
||||
EN
|
||||
NU 112 13 5
|
||||
BE
|
||||
PR 21 9 "Qta' "
|
||||
FI QTA
|
||||
EN
|
||||
NU 212 6 2
|
||||
BE
|
||||
PR 21 9 "Spesa % "
|
||||
FL "H"
|
||||
FI QTA
|
||||
EN
|
||||
CURRENCY 113 18
|
||||
BE
|
||||
PR 42 9 "Prezzo "
|
||||
FL "U"
|
||||
FI PREZZO
|
||||
EN
|
||||
NU 114 13 5
|
||||
BE
|
||||
PR 15 10 "Qta' evasa "
|
||||
FI QTAEVASA
|
||||
EN
|
||||
BO 115
|
||||
BE
|
||||
PR 42 10 "Saldata "
|
||||
FI RIGAEVASA
|
||||
EN
|
||||
DA 130
|
||||
BE
|
||||
PR 53 10 "Consegna "
|
||||
FI DATACONS
|
||||
EN
|
||||
NU 118 7
|
||||
BE
|
||||
PR 2 12 "N.Colli "
|
||||
FI NCOLLI
|
||||
EN
|
||||
NU 116 15 2
|
||||
BE
|
||||
PR 22 12 "Tara "
|
||||
FI TARA
|
||||
EN
|
||||
NU 117 15 2
|
||||
BE
|
||||
PR 46 12 "Peso netto "
|
||||
FI PNETTO
|
||||
EN
|
||||
BO 119
|
||||
BE
|
||||
PR 68 12 "Da evadere "
|
||||
FI DAEVADERE
|
||||
EN
|
||||
ST 120 25
|
||||
BE
|
||||
PR 2 13 "Sconto "
|
||||
FI SCONTO
|
||||
EN
|
||||
NU 121 5 2
|
||||
BE
|
||||
PR 42 13 "Perc.Provv. "
|
||||
FI PERCPROV
|
||||
EN
|
||||
BO 122
|
||||
BE
|
||||
PR 2 14 "Importo provv.unitario"
|
||||
FI IMPFISUN
|
||||
EN
|
||||
CURRENCY 123 18
|
||||
BE
|
||||
PR 42 14 "Imp.Provv. "
|
||||
FI IMPFISSO
|
||||
EN
|
||||
ST 124 4
|
||||
BE
|
||||
PR 2 15 "Cod. IVA "
|
||||
US %IVA
|
||||
IN CODTAB 124
|
||||
DI "Codice@20" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 124 CODTAB
|
||||
OU 252 S0
|
||||
FL "U"
|
||||
VA 19 1 2
|
||||
CH NORMAL
|
||||
FI CODIVA
|
||||
EN
|
||||
ST 252 50
|
||||
BE
|
||||
PR 22 15 ""
|
||||
US %IVA KE 2
|
||||
IN S0 252
|
||||
DI "Descrizione@50" S0
|
||||
DI "Codice@20" CODTAB
|
||||
OU 124 CODTAB
|
||||
OU 252 S0
|
||||
EN
|
||||
BO 125
|
||||
BE
|
||||
PR 2 16 "Addebito IVA"
|
||||
FI ADDIVA
|
||||
EN
|
||||
ST 126 2
|
||||
BE
|
||||
PR 2 17 "Asp. Beni "
|
||||
US %ABE
|
||||
IN CODTAB 126
|
||||
DI "Codice@20" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 126 CODTAB
|
||||
OU 253 S0
|
||||
FL "UZ"
|
||||
CH NORMAL
|
||||
FI ASPBENI
|
||||
EN
|
||||
ST 253 50
|
||||
BE
|
||||
PR 22 17 ""
|
||||
FL "D"
|
||||
EN
|
||||
ST 127 5
|
||||
BE
|
||||
PR 2 18 "Caus.mag. "
|
||||
US %CAU
|
||||
IN CODTAB 127
|
||||
DI "Codice@20" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 127 CODTAB
|
||||
OU 255 S0
|
||||
FL "U"
|
||||
CH NORMAL
|
||||
FI CAUSMAG
|
||||
EN
|
||||
ST 255 50
|
||||
BE
|
||||
PR 22 18 ""
|
||||
FL "D"
|
||||
EN
|
||||
BU 1 10 2
|
||||
BE
|
||||
PR -14 -1 ""
|
||||
EN
|
||||
BU 2 10 2
|
||||
BE
|
||||
PR -24 -1 ""
|
||||
EN
|
||||
BU 17 10 2
|
||||
BE
|
||||
PR -34 -1 "Elimina"
|
||||
ME EXIT,127
|
||||
EN
|
||||
BU 100 10 2
|
||||
BE
|
||||
PR -44 -1 "~Collega"
|
||||
PI 117
|
||||
EN
|
||||
EN
|
||||
PA "Pag.2" -1 -1 76 21
|
||||
ST 128 3
|
||||
BE
|
||||
PR 2 3 "Mag.colleg. "
|
||||
CO US 103
|
||||
IN CODTAB 128
|
||||
DI "Codice" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 128 CODTAB
|
||||
OU 256 S0
|
||||
WA "Magazzino assente"
|
||||
FL "U"
|
||||
KE 1
|
||||
CH NORMAL
|
||||
FI CODMAGC[1,3]
|
||||
EN
|
||||
ST 256 50
|
||||
BE
|
||||
PR 22 3 ""
|
||||
FL "D"
|
||||
EN
|
||||
ST 129 2
|
||||
BE
|
||||
PR 2 4 "Deposito "
|
||||
US MAG SE (CODTAB[1,3]==#128) && (CODTAB[4,5]!="")
|
||||
IN CODTAB[1,3] 128
|
||||
IN CODTAB[4,5] 129
|
||||
DI "Codice mag." CODTAB[1,3]
|
||||
DI "Codice dep." CODTAB[4,5]
|
||||
DI "Descrizione@50" S0
|
||||
OU 128 CODTAB[1,3]
|
||||
OU 129 CODTAB[4,5]
|
||||
OU 257 S0
|
||||
ME DIRTY,128|9,128
|
||||
CH NORMAL
|
||||
WA "Deposito assente"
|
||||
FL "U"
|
||||
KE 1
|
||||
FI CODMAGC[4,5]
|
||||
EN
|
||||
ST 257 50
|
||||
BE
|
||||
PR 22 4 ""
|
||||
FL "D"
|
||||
EN
|
||||
NU 133 13 5
|
||||
BE
|
||||
PR 2 6 "Qta' agg.1 "
|
||||
FI QTAGG1
|
||||
EN
|
||||
NU 134 13 5
|
||||
BE
|
||||
PR 28 6 "2 "
|
||||
FI QTAGG2
|
||||
EN
|
||||
NU 135 13 5
|
||||
BE
|
||||
PR 44 6 "3 "
|
||||
FI QTAGG3
|
||||
EN
|
||||
NU 136 13 5
|
||||
BE
|
||||
PR 12 7 "4 "
|
||||
FI QTAGG4
|
||||
EN
|
||||
NU 137 13 5
|
||||
BE
|
||||
PR 28 7 "5 "
|
||||
FI QTAGG5
|
||||
EN
|
||||
ST 138 5
|
||||
BE
|
||||
PR 2 9 "Impianto "
|
||||
US IMP
|
||||
IN CODTAB 138
|
||||
DI "Codice Impianto" CODTAB
|
||||
DI "Descrizione @50" S0
|
||||
OU 138 CODTAB
|
||||
OU 258 S0
|
||||
FI IMPIANTO
|
||||
FL "U"
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 258 50
|
||||
BE
|
||||
PR 22 9 ""
|
||||
US IMP KE 2
|
||||
IN S0 258
|
||||
DI "Descrizione @50" S0
|
||||
DI "Codice Impianto" CODTAB
|
||||
CO OU 138
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 139 5
|
||||
BE
|
||||
PR 2 10 "Linea "
|
||||
US LNP
|
||||
IN CODTAB 139
|
||||
DI "Codice Linea" CODTAB
|
||||
DI "Descrizione @50" S0
|
||||
OU 139 CODTAB
|
||||
OU 259 S0
|
||||
FI LINEA
|
||||
FL "U"
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 259 50
|
||||
BE
|
||||
PR 22 10 ""
|
||||
US LNP KE 2
|
||||
IN S0 259
|
||||
DI "Descrizione @50" S0
|
||||
DI "Codice Linea" CODTAB
|
||||
CO OU 139
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 140 20
|
||||
BE
|
||||
PR 2 11 "Commessa "
|
||||
US CMS
|
||||
IN CODTAB 140
|
||||
DI "Codice commessa@20" CODTAB
|
||||
DI "Descrizione @50" S0
|
||||
OU 140 CODTAB
|
||||
OU 260 S0
|
||||
FI CODCMS
|
||||
FL "UZ"
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 260 50
|
||||
BE
|
||||
PR 14 12 ""
|
||||
US CMS KE 2
|
||||
IN S0 260
|
||||
DI "Descrizione @50" S0
|
||||
DI "Codice commessa@20" CODTAB
|
||||
CO OU 140
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 141 10
|
||||
BE
|
||||
PR 2 13 "Fase "
|
||||
US FSC
|
||||
IN CODTAB 141
|
||||
DI "Codice Fase@10" CODTAB
|
||||
DI "Descrizione @50" S0
|
||||
OU 141 CODTAB
|
||||
OU 260 S0
|
||||
FI FASCMS
|
||||
FL "UZ"
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 261 50
|
||||
BE
|
||||
PR 14 14 ""
|
||||
US FAS KE 2
|
||||
IN S0 261
|
||||
DI "Descrizione @50" S0
|
||||
DI "Codice Fase@10" CODTAB
|
||||
CO OU 141
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 142 20
|
||||
BE
|
||||
PR 2 15 "Stringa 1 "
|
||||
FI CODAGG1
|
||||
EN
|
||||
NU 143 13 5
|
||||
BE
|
||||
PR 2 17 "Stringa 2 "
|
||||
FI CODAGG2
|
||||
EN
|
||||
BU 1 10 2
|
||||
BE
|
||||
PR -14 -1 ""
|
||||
EN
|
||||
BU 2 10 2
|
||||
BE
|
||||
PR -24 -1 ""
|
||||
EN
|
||||
EN
|
||||
ENDMASK
|
1186
co/conferit.txt
Executable file
1186
co/conferit.txt
Executable file
File diff suppressed because it is too large
Load Diff
4
co/costcmp.h
Executable file
4
co/costcmp.h
Executable file
@ -0,0 +1,4 @@
|
||||
#define F_INIZIO1 101
|
||||
#define F_INIZIO2 102
|
||||
#define F_FINE1 103
|
||||
#define F_FINE2 104
|
45
co/costcmp.rep
Executable file
45
co/costcmp.rep
Executable file
@ -0,0 +1,45 @@
|
||||
|
||||
<report name="costcmp" lpi="6">
|
||||
<font face="Courier New" size="10" />
|
||||
<section type="Head">
|
||||
<field type="Stringa" width="50">
|
||||
<font italic="1" face="Courier New" bold="1" size="10" />
|
||||
<source>#SYSTEM.RAGSOC</source>
|
||||
</field>
|
||||
<field y="1" type="Testo" valign="center" align="center" width="96" height="2" text="Tabella Compagnie">
|
||||
<font face="Courier New" bold="1" size="14" />
|
||||
</field>
|
||||
<field border="2" x="1" y="3.5" type="Linea" width="93" height="0" />
|
||||
<field x="2" y="4" type="Testo" width="6" text="Codice">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="11" y="4" type="Testo" width="12" text="Descrizione">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field border="2" x="1" y="7.5" type="Linea" width="93" height="0" />
|
||||
</section>
|
||||
<section type="Head" level="1" />
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1">
|
||||
<field x="2" type="Stringa" link="SPP.CODTAB[1,8]" width="8">
|
||||
<source>CODTAB</source>
|
||||
</field>
|
||||
<field x="11" type="Stringa" width="50">
|
||||
<source>S0</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" height="3">
|
||||
<field border="2" x="1" y="0.5" type="Linea" width="93" height="0" />
|
||||
<field x="2" y="1" type="Data" width="10">
|
||||
<source>#SYSTEM.DATE</source>
|
||||
</field>
|
||||
<field x="90" y="1" type="Numero" align="right" width="3">
|
||||
<source>#PAGE</source>
|
||||
</field>
|
||||
<field border="2" x="1" y="2.5" type="Linea" width="93" height="0" />
|
||||
</section>
|
||||
<section type="Foot" level="1" />
|
||||
<sql>USE %CMP
|
||||
FROM #F_INIZIO1
|
||||
TO #F_FINE1</sql>
|
||||
</report>
|
59
co/costcmp.uml
Executable file
59
co/costcmp.uml
Executable file
@ -0,0 +1,59 @@
|
||||
#include "costcmp.h"
|
||||
|
||||
PAGE "Stampa Compagnie" -1 -1 78 19
|
||||
|
||||
NUMBER F_INIZIO1 4
|
||||
BEGIN
|
||||
PROMPT 3 1 "Da Codice compagnia "
|
||||
FIELD CODTAB
|
||||
KEY 1
|
||||
USE %CMP
|
||||
FLAGS "Z"
|
||||
INPUT CODTAB F_INIZIO1
|
||||
DISPLAY "Cod. compagnia" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_INIZIO1 CODTAB
|
||||
OUTPUT F_INIZIO2 S0
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_INIZIO2 50
|
||||
BEGIN
|
||||
PROMPT 3 2 "Descrizione "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_FINE1 4
|
||||
BEGIN
|
||||
PROMPT 5 1 "A Codice compagnia "
|
||||
FIELD CODTAB
|
||||
KEY 1
|
||||
USE %CMP
|
||||
FLAGS "Z"
|
||||
INPUT CODTAB F_FINE1
|
||||
DISPLAY "Cod. compagnia" CODTAB
|
||||
DISPLAY "Descrizione@50" S1
|
||||
OUTPUT F_INIZIO1 CODTAB
|
||||
OUTPUT F_FINE2 S1
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_FINE2 50
|
||||
BEGIN
|
||||
PROMPT 5 2 "Descrizione "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
4
co/costcoa.h
Executable file
4
co/costcoa.h
Executable file
@ -0,0 +1,4 @@
|
||||
#define F_INIZIO1 101
|
||||
#define F_INIZIO2 102
|
||||
#define F_FINE1 103
|
||||
#define F_FINE2 104
|
66
co/costcoa.rep
Executable file
66
co/costcoa.rep
Executable file
@ -0,0 +1,66 @@
|
||||
|
||||
<report name="costcoa" lpi="6">
|
||||
<description>Stampa tabella correlazione articoli</description>
|
||||
<font face="Courier New" size="10" />
|
||||
<section type="Head">
|
||||
<field type="Stringa" width="50">
|
||||
<font italic="1" face="Courier New" bold="1" size="10" />
|
||||
<source>#SYSTEM.RAGSOC</source>
|
||||
</field>
|
||||
<field y="1" type="Testo" valign="center" align="center" width="96" height="2" text="Tabella correlazione articoli">
|
||||
<font face="Courier New" bold="1" size="14" />
|
||||
</field>
|
||||
<field border="2" x="1" y="3.5" type="Linea" width="93" height="0" />
|
||||
<field x="2" y="4" type="Testo" width="14" text="Codice Mercato">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="20" y="4" type="Testo" width="12" text="Descrizione">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="5" y="6" type="Testo" width="15" text="Codice Articolo">
|
||||
<font face="Courier New" size="9" />
|
||||
</field>
|
||||
<field x="23" y="6" type="Testo" width="12" text="Descrizione">
|
||||
<font face="Courier New" size="9" />
|
||||
</field>
|
||||
<field border="2" x="1" y="7.5" type="Linea" width="93" height="0" />
|
||||
</section>
|
||||
<section type="Head" level="1" />
|
||||
<section type="Head" level="2">
|
||||
<groupby>CODTAB[1,6]</groupby>
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<field border="3" y="0.5" type="Linea" width="80" height="0" pattern="1" />
|
||||
<field x="2" y="1" type="Stringa" width="10" pattern="1">
|
||||
<source>CODTAB[1,6]</source>
|
||||
</field>
|
||||
<field x="20" y="1" type="Stringa" width="50" pattern="1">
|
||||
<source>CLIFO.RAGSOC</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1">
|
||||
<field x="2" type="Stringa" align="right" link="ANAMAG.CODART" width="8">
|
||||
<source>CODTAB[7,16]</source>
|
||||
</field>
|
||||
<field x="23" type="Stringa" width="50">
|
||||
<source>S0</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" height="3">
|
||||
<field border="2" x="1" y="0.5" type="Linea" width="93" height="0" />
|
||||
<field x="2" y="1" type="Data" width="10">
|
||||
<source>#SYSTEM.DATE</source>
|
||||
</field>
|
||||
<field x="90" y="1" type="Numero" align="right" width="3">
|
||||
<source>#PAGE</source>
|
||||
</field>
|
||||
<field border="2" x="1" y="2.5" type="Linea" width="93" height="0" />
|
||||
</section>
|
||||
<section type="Foot" level="1" />
|
||||
<section type="Foot" level="2" />
|
||||
<sql>USE %COA
|
||||
JOIN CLIFO INTO TIPOCF='C' CODCF=CODTAB[1,6]
|
||||
JOIN 47 INTO CODART=CODTAB[7,16]
|
||||
FROM #F_INIZIO1
|
||||
TO #F_FINE1</sql>
|
||||
</report>
|
62
co/costcoa.uml
Executable file
62
co/costcoa.uml
Executable file
@ -0,0 +1,62 @@
|
||||
#include "costcoa.h"
|
||||
|
||||
PAGE "Stampa Correlazione articolo" -1 -1 78 19
|
||||
|
||||
NUMBER F_INIZIO1 6
|
||||
BEGIN
|
||||
PROMPT 2 2 "Mercato "
|
||||
KEY 1
|
||||
FIELD CODTAB[1,6]
|
||||
USE LF_MERCATICOOP
|
||||
JOIN LF_CLIFO INTO TIPOCF=='C' CODCF==CODCF
|
||||
INPUT CODCF F_INIZIO1
|
||||
DISPLAY "Mercato" CODCF
|
||||
DISPLAY "Ragione sociale@50" 20->RAGSOC
|
||||
OUTPUT F_INIZIO1 CODCF
|
||||
OUTPUT F_INIZIO2 20->RAGSOC
|
||||
FLAGS "Z"
|
||||
CHECKTYPE FORCED
|
||||
END
|
||||
|
||||
STRING F_INIZIO2 50
|
||||
BEGIN
|
||||
PROMPT 2 9 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_FINE1 6
|
||||
BEGIN
|
||||
PROMPT 4 2 "Mercato "
|
||||
KEY 1
|
||||
FIELD CODTAB[1,6]
|
||||
USE LF_MERCATICOOP
|
||||
JOIN LF_CLIFO INTO TIPOCF=='C' CODCF==CODCF
|
||||
INPUT CODCF F_FINE1
|
||||
DISPLAY "Mercato" CODCF
|
||||
DISPLAY "Ragione sociale@50" 20->RAGSOC
|
||||
OUTPUT F_FINE1 CODCF
|
||||
OUTPUT F_FINE2 20->RAGSOC
|
||||
FLAGS "Z"
|
||||
CHECKTYPE FORCED
|
||||
END
|
||||
|
||||
STRING F_FINE2 50
|
||||
BEGIN
|
||||
PROMPT 4 9 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
2
co/cotbcmp.h
Executable file
2
co/cotbcmp.h
Executable file
@ -0,0 +1,2 @@
|
||||
#define FLD_TABCMP_CODTAB 101
|
||||
#define FLD_TABCMP_DESCR 102
|
37
co/cotbcmp.uml
Executable file
37
co/cotbcmp.uml
Executable file
@ -0,0 +1,37 @@
|
||||
#include "cotbcmp.h"
|
||||
|
||||
TOOLBAR "" 0 20 0 2
|
||||
|
||||
#include <toolbar.h>
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Compagnie" -1 -1 78 19
|
||||
|
||||
NUMBER FLD_TABCMP_CODTAB 4
|
||||
BEGIN
|
||||
PROMPT 3 1 "Codice compagnia "
|
||||
FIELD CODTAB
|
||||
KEY 1
|
||||
USE %CMP
|
||||
FLAGS "Z"
|
||||
INPUT CODTAB FLD_TABCMP_CODTAB
|
||||
DISPLAY "Cod. compagnia" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT FLD_TABCMP_CODTAB CODTAB
|
||||
OUTPUT FLD_TABCMP_DESCR S0
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING FLD_TABCMP_DESCR 50
|
||||
BEGIN
|
||||
PROMPT 3 2 "Descrizione "
|
||||
USE %CMP
|
||||
KEY 2
|
||||
FIELD S0
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
11
co/cotbcoa.h
Executable file
11
co/cotbcoa.h
Executable file
@ -0,0 +1,11 @@
|
||||
// campi per la maschera co0900a
|
||||
|
||||
#define F_CODMER 101
|
||||
#define F_CODARTMER 102
|
||||
#define F_DESCR 103
|
||||
#define F_CODART 104
|
||||
#define F_DESART 105
|
||||
#define F_DESMER 106
|
||||
#define F_ICODMER 107
|
||||
#define F_IDESMER 108
|
||||
#define F_ICODARTMER 109
|
95
co/cotbcoa.uml
Executable file
95
co/cotbcoa.uml
Executable file
@ -0,0 +1,95 @@
|
||||
#include "cotbcoa.h"
|
||||
|
||||
TOOLBAR "" 0 20 0 2
|
||||
|
||||
#include <toolbar.h>
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Correlazione articolo" -1 -1 78 19
|
||||
|
||||
NUMBER F_CODMER 6
|
||||
BEGIN
|
||||
PROMPT 2 2 "Mercato "
|
||||
KEY 1
|
||||
FIELD CODTAB[1,6]
|
||||
USE LF_MERCATICOOP
|
||||
JOIN LF_CLIFO INTO TIPOCF=='C' CODCF==CODCF
|
||||
INPUT CODCF F_CODMER
|
||||
DISPLAY "Mercato" CODCF
|
||||
DISPLAY "Ragione sociale@50" 20->RAGSOC
|
||||
OUTPUT F_CODMER CODCF
|
||||
OUTPUT F_DESMER 20->RAGSOC
|
||||
FLAGS "Z"
|
||||
CHECKTYPE FORCED
|
||||
END
|
||||
|
||||
STRING F_DESMER 50
|
||||
BEGIN
|
||||
PROMPT 35 2 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CODARTMER 10
|
||||
BEGIN
|
||||
PROMPT 2 3 "Cod. art. mercato "
|
||||
KEY 1
|
||||
FIELD CODTAB[7,16]
|
||||
USE %COA
|
||||
INPUT CODTAB[1,6] F_CODMER
|
||||
INPUT CODTAB[7,16] F_CODARTMER
|
||||
DISPLAY "Mercato" CODTAB[1,6]
|
||||
DISPLAY "Articolo" CODTAB[7,16]
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Cod.corr" S1
|
||||
OUTPUT F_CODMER CODTAB[1,6]
|
||||
OUTPUT F_CODARTMER CODTAB[7,16]
|
||||
OUTPUT F_DESCR S0
|
||||
OUTPUT F_CODART S1
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_DESCR 50
|
||||
BEGIN
|
||||
PROMPT 2 4 "Descrizione "
|
||||
KEY 2
|
||||
FIELD S0
|
||||
USE %COA KEY 2
|
||||
INPUT S0 F_DESCR
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Mercato" CODTAB[1,6]
|
||||
DISPLAY "Articolo" CODTAB[7,16]
|
||||
DISPLAY "Cod.corr" S1
|
||||
COPY OUTPUT F_CODARTMER
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_CODART 20
|
||||
BEGIN
|
||||
PROMPT 2 6 "Articolo "
|
||||
FLAG "U"
|
||||
FIELD S1
|
||||
USE LF_ANAMAG
|
||||
INPUT CODART F_CODART
|
||||
DISPLAY "Codice@20" CODART
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_CODART CODART
|
||||
OUTPUT F_DESART DESCR
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_DESART 50
|
||||
BEGIN
|
||||
PROMPT 35 6 ""
|
||||
USE LF_ANAMAG KEY 2
|
||||
INPUT DESCR F_DESART
|
||||
DISPLAY "Codice@20" CODART
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_CODART CODART
|
||||
OUTPUT F_DESART DESCR
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
3
co/f160.dir
Executable file
3
co/f160.dir
Executable file
@ -0,0 +1,3 @@
|
||||
160
|
||||
0
|
||||
$mercaticoop|0|0|53|0|Anagrafica mercati cooperative|||
|
15
co/f160.trr
Executable file
15
co/f160.trr
Executable file
@ -0,0 +1,15 @@
|
||||
160
|
||||
11
|
||||
CODCF|3|6|0|Codice cliente a cui e' associato il mercato
|
||||
DIRITTI1|4|5|2|1^ % diritti di mercato
|
||||
ARROT1|1|1|0|1^ arrotondamento
|
||||
CODIVA1|1|4|0|1^ codice iva
|
||||
DIRITTI2|4|5|2|2^ % diritti di mercato
|
||||
ARROT2|1|1|0|2^ arrotondamento
|
||||
CODIVA2|1|4|0|2^ codice iva
|
||||
SPESEFACC|4|9|2|Spese di facchinaggio (Euro/kg)
|
||||
CODIVAFACC|1|4|0|Codice iva per spese facchinaggio
|
||||
SPESECASSE|4|9|2|Spese ricambio casse (Euro/cassa)
|
||||
CODIVACASS|1|4|0|Codice iva per spese ricambio casse
|
||||
1
|
||||
CODCF|
|
3
co/f161.dir
Executable file
3
co/f161.dir
Executable file
@ -0,0 +1,3 @@
|
||||
161
|
||||
0
|
||||
$socicoop|0|0|161|0|Anagrafica soci cooperative|||
|
27
co/f161.trr
Executable file
27
co/f161.trr
Executable file
@ -0,0 +1,27 @@
|
||||
161
|
||||
23
|
||||
CODCF|3|6|0|Codice cliente a cui e' associato il socio
|
||||
DATANASC|5|8|0|Data nascita
|
||||
COMNASC|1|4|0|Comune di nascita
|
||||
DATAASS|5|8|0|Data assunzione
|
||||
DATAREC|5|8|0|Data recessione
|
||||
NUMQUOTE|3|5|0|Numero quote o azioni
|
||||
VALQUOTE|4|10|3|Valore quote o azioni
|
||||
LIBLAVORO|1|10|0|Numero libretto di lavoro
|
||||
COMEMISS|2|5|0|Codice comune di emissione
|
||||
DATAEMISS|5|8|0|Data rilascio libretto
|
||||
COMPAGNIA1|1|4|0|Codice compagnia di appartenenza 1
|
||||
QUOTA1|4|5|2|Quota di appartenenza comp. 1
|
||||
COMPAGNIA2|1|4|0|Codice compagnia di appartenenza 2
|
||||
QUOTA2|4|5|2|Quota di appartenenza comp. 2
|
||||
COMPAGNIA3|1|4|0|Codice compagnia di appartenenza 3
|
||||
QUOTA3|4|5|2|Quota di appartenenza comp. 3
|
||||
NOMEBARCA|1|25|0|Nome barca
|
||||
TIPOPROP|1|1|0|Tipo propulsione (0/1)
|
||||
TIPOCOMAPP|1|1|0|Tipo comm. appartenenza (0/1)
|
||||
LICENZA|1|10|0|Numero licenza
|
||||
DATALIC|5|8|0|Data rilascio licenza
|
||||
DATADEL|5|8|0|Data delibera
|
||||
DATASCALIC|5|8|0|Data scadenza licenza
|
||||
1
|
||||
CODCF|
|
3
co/f162.dir
Executable file
3
co/f162.dir
Executable file
@ -0,0 +1,3 @@
|
||||
162
|
||||
0
|
||||
$imbarcazioni|0|0|204|0|Anagrafica imbarcazioni soci|||
|
26
co/f162.trr
Executable file
26
co/f162.trr
Executable file
@ -0,0 +1,26 @@
|
||||
162
|
||||
22
|
||||
CODCF|3|6|0|Codice socio (fornitore)
|
||||
PROGIMB|2|2|0|Progressivo imbarcazione
|
||||
TIPOCOMAPP|1|1|0|Tipo com. app
|
||||
TARGA|1|10|0|Targa (numero iscrizione)
|
||||
MOTOBARCA|1|30|0|Motobarca
|
||||
DATAISC|5|8|0|Data iscrizione
|
||||
LUNGHEZZA|4|6|2|Lunghezza
|
||||
LARGHEZZA|4|6|2|Larghezza
|
||||
ALTEZZA|4|6|2|Altezza
|
||||
STLORDA|4|7|2|Stazza lorda
|
||||
SCADCOLL|5|8|0|Data scadenza collaudo
|
||||
SCADSPEC|5|8|0|Data scadenza speciale
|
||||
STNETTA|4|7|2|Stazza netta
|
||||
GT|4|7|2|Gross Tonage
|
||||
HP|4|7|2|HP
|
||||
KW|4|7|2|KW
|
||||
RIP|1|30|0|R.I.P.
|
||||
SCADLICNAV|5|8|0|Data scadenza licenza navigazione
|
||||
SCADRUOLEQ|5|8|0|Data scadenza ruolino equipaggio
|
||||
NRRUOLEQUI|1|15|0|Numero ruolino equipaggio
|
||||
SCADLICPES|5|8|0|Data scadenza licenza di pesca
|
||||
SCADPAGLIC|5|8|0|Data scadenza pagamento licenza di pesca
|
||||
1
|
||||
CODCF+PROGIMB|
|
181
co/prestazi.ini
Executable file
181
co/prestazi.ini
Executable file
@ -0,0 +1,181 @@
|
||||
[MAIN]
|
||||
TYPE=Conferimento
|
||||
MSKFILE=prestazi.msk
|
||||
FRMFILE=VEFAT.FRM
|
||||
CAMPICALC=TOTMER|TOTPRE|SPESE|SPESINC|SPESIMB|SPESTRA|BOLLI|IMPONIBILI|IMPOSTE|TOTDOC|SCONTOD|SCONTOT|OMAGGI|PROVVD
|
||||
CALCOLI=*
|
||||
TOTPROVV =
|
||||
TIPOCF=F
|
||||
PREZZO=ULTCOS1
|
||||
[PROFILO]
|
||||
OCCASEDIT = 3
|
||||
OCFPI = 1
|
||||
COFI = 3
|
||||
STATOPAIV = 3
|
||||
PAIVA = 3
|
||||
GOLEM = 3
|
||||
GRRECAPITO = 3
|
||||
INDCF = 1
|
||||
CIVCF = 1
|
||||
LOCALITACF = 1
|
||||
CAPCF = 1
|
||||
PROVCOM = 1
|
||||
COMCF = 1
|
||||
DENCOM = 1
|
||||
STATOCF = 1
|
||||
DESSTATOCF = 1
|
||||
CODVAL1 = 3
|
||||
CODVAL2 = 3
|
||||
NOME_VAL1 = 3
|
||||
NOME_VAL2 = 3
|
||||
CONTROEURO = 3
|
||||
CAMBIO = 3
|
||||
DATA_CAMBIO1 = 3
|
||||
DATA_CAMBIO2 = 3
|
||||
CODLIN = 3
|
||||
DESLIN = 3
|
||||
CODPAG = 4
|
||||
DESCODPAG = 3
|
||||
GRSCADENZE = 3
|
||||
DATAINSC = 3
|
||||
DATASCAD1 = 1
|
||||
DATASCAD2 = 1
|
||||
DATASCAD3 = 1
|
||||
DATASCAD4 = 1
|
||||
DATASCAD5 = 1
|
||||
CODABIA = 4
|
||||
CODCABA = 4
|
||||
DESBANAPP = 3
|
||||
IBAN = 3
|
||||
IBAN_STATO = 3
|
||||
IBAN_CHECK = 3
|
||||
BBAN = 3
|
||||
BBAN_CIN = 3
|
||||
BBAN_ABI = 3
|
||||
BBAN_CAB = 3
|
||||
BBAN_CONTO = 3
|
||||
CODABIP = 3
|
||||
CODCABP = 3
|
||||
DESBANPRE = 3
|
||||
CATVEN = 3
|
||||
DESCATVEN = 1
|
||||
CODLIST1 = 3
|
||||
CODLIST2 = 3
|
||||
DESLIST = 1
|
||||
CODCONT1 = 3
|
||||
CODCONT2 = 3
|
||||
DESCONT = 1
|
||||
CODCAMP = 3
|
||||
DESCAMP = 1
|
||||
SCONTOPERC = 3
|
||||
DATADOCRIF = 3
|
||||
NUMDOCRIF = 2
|
||||
CODAG = 3
|
||||
DESAG = 3
|
||||
CODZON = 3
|
||||
DESZON = 3
|
||||
CODPORTO = 3
|
||||
DESPORTO = 3
|
||||
CAUSTRASP = 3
|
||||
DENCAUSTRASP = 3
|
||||
CODVETT1 = 3
|
||||
CODVETT2 = 0
|
||||
CODVETT3 = 0
|
||||
NOMEVETT1 = 3
|
||||
NOMEVETT2 = 0
|
||||
NOMEVETT3 = 0
|
||||
NCOPIE = 0
|
||||
IMPPAGATO = 3
|
||||
ACCSALDO = 3
|
||||
DOC1 = 0
|
||||
DOC2 = 0
|
||||
DOC3 = 0
|
||||
IMPNETTI = 0
|
||||
RAGGREFF = 3
|
||||
SPESEINC = 3
|
||||
ADDBOLLI = 3
|
||||
BLANK = 1
|
||||
CAUSMAG = 4
|
||||
CAUSMAGC = 1
|
||||
DESCRMAG = 3
|
||||
DESCRMAGC = 1
|
||||
CODCMS = 3
|
||||
DESCRCMS = 3
|
||||
FASCMS = 3
|
||||
DESCRFAS = 3
|
||||
[DEFAULT]
|
||||
NDEFAULTS=0
|
||||
[SHEET]
|
||||
NCOLS=21
|
||||
1=103
|
||||
2=104
|
||||
3=105
|
||||
4=106
|
||||
5=107
|
||||
6=108
|
||||
7=109
|
||||
8=110
|
||||
9=111
|
||||
10=133
|
||||
11=112
|
||||
12=113
|
||||
13=120
|
||||
14=121
|
||||
15=122
|
||||
16=123
|
||||
17=124
|
||||
18=125
|
||||
19=127
|
||||
20=128
|
||||
21=129
|
||||
[RIGHE]
|
||||
NTIPIRIGA=6
|
||||
1=02
|
||||
2=02
|
||||
3=03
|
||||
4=04
|
||||
5=05
|
||||
6=06
|
||||
[HANDLERS]
|
||||
NHANDLER=0
|
||||
[PROFILOGRUPPO]
|
||||
101 = 0
|
||||
100 = 3
|
||||
200 = 3
|
||||
300 = 3
|
||||
400 = 3
|
||||
500 = 3
|
||||
600 = 3
|
||||
700 = 3
|
||||
800 = 3
|
||||
810 = 3
|
||||
820 = 3
|
||||
830 = 3
|
||||
1000 = 3
|
||||
1100 = 3
|
||||
1210 = 3
|
||||
1400 = 3
|
||||
1500 = 3
|
||||
1600 = 0
|
||||
1800 = 3
|
||||
1900 = 3
|
||||
2200 = 0
|
||||
2300 = 3
|
||||
2400 = 3
|
||||
2900 = 3
|
||||
3000 = 3
|
||||
4000 = 3
|
||||
[ORDINEGRUPPI]
|
||||
NGROUPS=12
|
||||
1=1000
|
||||
2=100
|
||||
3=200
|
||||
4=400
|
||||
5=500
|
||||
6=600
|
||||
7=700
|
||||
8=830
|
||||
9=1400
|
||||
10=1900
|
||||
11=2900
|
||||
12=3000
|
878
co/prestazi.msk
Executable file
878
co/prestazi.msk
Executable file
@ -0,0 +1,878 @@
|
||||
TOOLBAR "" 0 -2 0 2
|
||||
BU 18 10 2
|
||||
BE
|
||||
PR -15 -1 "~Registra"
|
||||
ME EXIT,20082
|
||||
PI 103
|
||||
PI 153
|
||||
EN
|
||||
BU 17 10 2
|
||||
BE
|
||||
PR -25 -1 "~Elimina"
|
||||
ME EXIT,127
|
||||
EN
|
||||
BU 27 10 2
|
||||
BE
|
||||
PR -35 -1 "E~labora"
|
||||
PI 120
|
||||
EN
|
||||
BU 24 10 2
|
||||
BE
|
||||
PR -45 -1 ""
|
||||
ME EXIT,20082
|
||||
EN
|
||||
BU 2 10 2
|
||||
BE
|
||||
PR -55 -1 ""
|
||||
ME EXIT,27
|
||||
EN
|
||||
EN
|
||||
PA "Pag. 1" 11 60 14
|
||||
GR -1 78 5
|
||||
BE
|
||||
PR 1 0 ""
|
||||
EN
|
||||
ST 101 4
|
||||
BE
|
||||
PR 2 1 "Cod. num. "
|
||||
FI CODNUM
|
||||
US %NUM KE 1
|
||||
IN CODTAB 101
|
||||
DI "Codice" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 173 S0
|
||||
CH NORMAL
|
||||
FLAG "GDU"
|
||||
ME CO,2@
|
||||
EN
|
||||
ST 173 50
|
||||
BE
|
||||
PR 24 1 ""
|
||||
FLAG "GD"
|
||||
ME CO,3@
|
||||
EN
|
||||
ST 172 4
|
||||
BE
|
||||
FI TIPODOC
|
||||
PR 2 2 "Tipo doc. "
|
||||
US %TIP KE 1
|
||||
IN CODTAB 172
|
||||
DI "Codice" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 176 S0
|
||||
CH NORMAL
|
||||
FLAG "GDU"
|
||||
ME CO,4@
|
||||
EN
|
||||
ST 176 50
|
||||
BE
|
||||
PR 24 2 ""
|
||||
FLAG "GD"
|
||||
ME CO,5@
|
||||
EN
|
||||
LISTBOX 107 9
|
||||
BE
|
||||
PR 100 100 ""
|
||||
FI TIPOCF
|
||||
IT "F|Fornitore"
|
||||
FLAG "D"
|
||||
EN
|
||||
ST 103 1
|
||||
BE
|
||||
PR 100 100 "<D><P> "
|
||||
FI PROVV
|
||||
FLAG "D"
|
||||
EN
|
||||
ST 102 4
|
||||
BE
|
||||
PR 2 3 "Esercizio "
|
||||
FI ANNO
|
||||
FLAG "GD"
|
||||
ME CO,9@
|
||||
EN
|
||||
NU 104 6
|
||||
BE
|
||||
PR 24 3 "Numero doc. "
|
||||
FI NDOC
|
||||
ME CO,6@
|
||||
FLAG "GDR"
|
||||
EN
|
||||
DA 106
|
||||
BE
|
||||
PR 46 3 "Data "
|
||||
FI DATADOC
|
||||
ME CO,7@
|
||||
EN
|
||||
ST 105 1
|
||||
BE
|
||||
PR 67 3 "Stato "
|
||||
FI STATO
|
||||
ME CO,8@
|
||||
FLAG "DG"
|
||||
EN
|
||||
GR -1 78 7
|
||||
BE
|
||||
PR 1 4 ""
|
||||
EN
|
||||
ST 108 6
|
||||
BE
|
||||
PR 2 6 "Socio "
|
||||
WA "Socio assente"
|
||||
HE "Codice del socio del documento"
|
||||
FLAG "R"
|
||||
FI CODCF
|
||||
US 161 KE 1
|
||||
JO 20 INTO TIPOCF=='F' CODCF==CODCF
|
||||
IN CODCF 108
|
||||
DI "Codice" CODCF
|
||||
DI "Ragione Sociale@50" 20->RAGSOC
|
||||
DI "Partita IVA@12" 20->PAIV
|
||||
OU 108 CODCF
|
||||
OU 301 20->RAGSOC
|
||||
OU 328 20->COFI
|
||||
OU 340 20->PAIV
|
||||
CH REQUIRED
|
||||
ADD RU co0 -5
|
||||
ME CO,10@
|
||||
EN
|
||||
ST 301 50
|
||||
BE
|
||||
WA "Socio assente"
|
||||
HE "Ragione sociale del socio del documento"
|
||||
PR 24 6 ""
|
||||
US 20 KE 2
|
||||
IN TIPOCF "F"
|
||||
IN RAGSOC 301
|
||||
DI "Ragione Sociale@50" RAGSOC
|
||||
DI "Partita IVA@12" PAIV
|
||||
DI "Codice" CODCF
|
||||
OU 108 CODCF
|
||||
OU 301 RAGSOC
|
||||
CH REQUIRED
|
||||
ADD RU cg0 -1 F
|
||||
ME CO,11@
|
||||
EN
|
||||
ST 328 16
|
||||
BE
|
||||
PR 2 7 "Cod. fisc. "
|
||||
FLAG "D"
|
||||
EN
|
||||
ST 340 12
|
||||
BE
|
||||
PR 42 7 "Partita Iva "
|
||||
FLAG "D"
|
||||
EN
|
||||
ST 111 3
|
||||
BE
|
||||
PR 2 11 "Valuta "
|
||||
FL "UH"
|
||||
FI CODVAL
|
||||
EN
|
||||
NU 185 15
|
||||
BE
|
||||
PR 2 11 "Riga corrente: Giacenza "
|
||||
FLAG "HD"
|
||||
PI ".5"
|
||||
EN
|
||||
NU 186 15
|
||||
BE
|
||||
PR 44 11 "Disponibilita' "
|
||||
FLAG "HD"
|
||||
PI ".5"
|
||||
EN
|
||||
LISTBOX 175 30
|
||||
BE
|
||||
PR 2 11 "Tipo riga da aggiungere "
|
||||
EN
|
||||
SPREADSHEET 500
|
||||
BE
|
||||
PR 2 13 ""
|
||||
IT "Lordo@5"
|
||||
IT "Tipo riga@2"
|
||||
IT "Mag. @3"
|
||||
IT "Dep.@2"
|
||||
IT "Codice Articolo@20"
|
||||
IT "Codice\nLivello 1@9"
|
||||
IT "Codice\nLivello 2@9"
|
||||
IT "Codice\nLivello 3@9"
|
||||
IT "Codice\nLivello 4@9"
|
||||
IT "Descrizione@50"
|
||||
IT "UM@2"
|
||||
IT "Quantita'@11"
|
||||
IT "Prezzo@18"
|
||||
IT "Quantita'\nEvasa@11"
|
||||
IT "Evasa@1"
|
||||
IT "Tara@15"
|
||||
IT "Peso Netto@15"
|
||||
IT "N.Casse@7"
|
||||
IT "Da evadere@1"
|
||||
IT "Ritenuta di mant.@25"
|
||||
IT "Perc.\nProvv.@5"
|
||||
IT "Imp.Fisso unitario@1"
|
||||
IT "Importo Fisso@18"
|
||||
IT "Codice\nIVA@4"
|
||||
IT "Addebito IVA@1"
|
||||
IT "Aspetto beni@3"
|
||||
IT "Causale\nMagazzino@12"
|
||||
IT "Magazzino\nCollegato@9"
|
||||
IT "Deposito\nCollegato@9"
|
||||
IT "Data\nconsegna@10"
|
||||
IT "Cod. Art. Mag.@20"
|
||||
IT "Controllato@11"
|
||||
IT "Quantita'\nlorda@13"
|
||||
IT "Quantita'\nagg. 2@13"
|
||||
IT "Quantita'\nagg. 3@13"
|
||||
IT "Quantita'\nagg. 4@13"
|
||||
IT "Quantita'\nagg. 5@13"
|
||||
IT "Impianto@8"
|
||||
IT "Linea@5"
|
||||
IT "Codice\ncommessa@20"
|
||||
IT "Fase\ncommessa@10"
|
||||
EN
|
||||
EN
|
||||
PA "Pag. 2" 11 60 14
|
||||
GR -1 78 6
|
||||
BE
|
||||
PR 1 0 ""
|
||||
EN
|
||||
ST -1 4
|
||||
BE
|
||||
PR 2 1 "Cod. num. "
|
||||
FLAG "D"
|
||||
GR 2
|
||||
EN
|
||||
ST -1 50
|
||||
BE
|
||||
PR 24 1 ""
|
||||
FLAG "D"
|
||||
GR 3
|
||||
EN
|
||||
ST -1 4
|
||||
BE
|
||||
PR 2 2 "Tipo doc. "
|
||||
FLAG "D"
|
||||
GR 4
|
||||
EN
|
||||
ST -1 50
|
||||
BE
|
||||
PR 24 2 ""
|
||||
FLAG "D"
|
||||
GR 5
|
||||
EN
|
||||
ST -1 4
|
||||
BE
|
||||
PR 2 3 "Esercizio "
|
||||
GR 9
|
||||
FLAG "D"
|
||||
EN
|
||||
NU -1 6
|
||||
BE
|
||||
PR 24 3 "Numero doc. "
|
||||
GR 6
|
||||
FLAG "D"
|
||||
EN
|
||||
DA -1
|
||||
BE
|
||||
PR 46 3 "Data "
|
||||
GR 7
|
||||
FLAG "D"
|
||||
EN
|
||||
ST -1 1
|
||||
BE
|
||||
PR 67 3 "Stato "
|
||||
GR 8
|
||||
FLAG "D"
|
||||
EN
|
||||
ST -1 6
|
||||
BE
|
||||
PR 2 4 "Socio "
|
||||
GR 10
|
||||
FLAG "D"
|
||||
EN
|
||||
ST -1 50
|
||||
BE
|
||||
PR 24 4 ""
|
||||
GR 11
|
||||
FLAG "D"
|
||||
EN
|
||||
CURRENCY 601 18
|
||||
BE
|
||||
PR 2 7 "Importi lordi "
|
||||
FI IMPLORDI
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
CURRENCY 602 18
|
||||
BE
|
||||
PR 2 8 "Ritenute su prezzo "
|
||||
FI SCONTOD
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
CURENCY 603 18
|
||||
BE
|
||||
PR 2 9 "Importi netti "
|
||||
FI TOTMER
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
CURRENCY 604 18
|
||||
BE
|
||||
PR 2 10 "Spese su archivio mercati "
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
CURRENCY 605 18
|
||||
BE
|
||||
PR 2 11 "Ritenute accantonamento su spese "
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
CURRENCY 606 18
|
||||
BE
|
||||
PR 2 12 "Imponibile "
|
||||
FI IMPONIBILI
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
CURRENCY 607 18
|
||||
BE
|
||||
PR 2 13 "Imposte "
|
||||
FI IMPOSTE
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
CURRENCY 608 18
|
||||
BE
|
||||
PR 2 14 "Totale fattura "
|
||||
FI TOTDOC
|
||||
FLAG "D"
|
||||
DRIVENDBY 111
|
||||
EN
|
||||
EN
|
||||
ENDMASK
|
||||
PA "" -1 -1 76 21
|
||||
BO 101
|
||||
BE
|
||||
PR 2 1 "Lordo "
|
||||
EN
|
||||
ST 102 2
|
||||
BE
|
||||
PR 2 2 "Tipo riga "
|
||||
US %TRI
|
||||
IN CODTAB 102
|
||||
OU 254 S0
|
||||
CH REQUIRED
|
||||
FL "DG"
|
||||
FI TIPORIGA
|
||||
EN
|
||||
ST 254 25
|
||||
BE
|
||||
PR 22 2 ""
|
||||
FL "D"
|
||||
EN
|
||||
ST 103 3
|
||||
BE
|
||||
PR 2 3 "Magazzino "
|
||||
US MAG SE CODTAB[4,5]==""
|
||||
IN CODTAB 103
|
||||
DI "Codice" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 103 CODTAB
|
||||
OU 250 S0
|
||||
WA "Magazzino assente"
|
||||
FL "U"
|
||||
KE 1
|
||||
CH NORMAL
|
||||
FI CODMAG[1,3]
|
||||
EN
|
||||
ST 250 50
|
||||
BE
|
||||
PR 22 3 ""
|
||||
FL "D"
|
||||
EN
|
||||
ST 104 2
|
||||
BE
|
||||
PR 2 4 "Deposito "
|
||||
US MAG SE (CODTAB[1,3]==#103) && (CODTAB[4,5]!="")
|
||||
IN CODTAB[1,3] 103
|
||||
IN CODTAB[4,5] 104
|
||||
DI "Codice mag." CODTAB[1,3]
|
||||
DI "Codice dep." CODTAB[4,5]
|
||||
DI "Descrizione@50" S0
|
||||
OU 103 CODTAB[1,3]
|
||||
OU 104 CODTAB[4,5]
|
||||
OU 251 S0
|
||||
ME DIRTY,103|9,103
|
||||
CH NORMAL
|
||||
WA "Deposito assente"
|
||||
FL "U"
|
||||
KE 1
|
||||
FI CODMAG[4,5]
|
||||
EN
|
||||
ST 251 50
|
||||
BE
|
||||
PR 22 4 ""
|
||||
FL "D"
|
||||
EN
|
||||
ST 105 20
|
||||
BE
|
||||
PR 2 6 "Articolo "
|
||||
US 47 KE 1
|
||||
IN CODART 105
|
||||
DI "Codice@20" CODART
|
||||
DI "Descrizione@50" DESCR
|
||||
OU 105 CODART
|
||||
WA "Articolo assente"
|
||||
FL "U"
|
||||
FI CODART
|
||||
ADD RU ve2 -3
|
||||
EN
|
||||
ST 131 20
|
||||
BE
|
||||
PR 50 50 ""
|
||||
FI CODARTMAG
|
||||
FL "G"
|
||||
EN
|
||||
BO 132
|
||||
BE
|
||||
PR 51 50 ""
|
||||
FI CHECKED
|
||||
FL "D"
|
||||
EN
|
||||
ST 106 10
|
||||
BE
|
||||
PR 37 6 ""
|
||||
FL "U"
|
||||
US GCG
|
||||
JO FCG AL 500 INTO CODTAB==CODTAB[1,1]
|
||||
IN CODTAB[1,1] "1"
|
||||
IN CODTAB[2,] 106
|
||||
DI "Livello@20" 500@->S0
|
||||
DI "Gruppo@10" CODTAB[2,]
|
||||
DI "Descrizione@30" S0
|
||||
OU 106 CODTAB[2,]
|
||||
ME 0 RESET,107|RESET,108|RESET,109
|
||||
ME ENABLE,107
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 107 6
|
||||
BE
|
||||
PR 50 6 ""
|
||||
FL "U"
|
||||
US GCG
|
||||
JO FCG AL 500 INTO CODTAB==CODTAB[1,1]
|
||||
IN CODTAB[1,1] "2"
|
||||
IN CODTAB[2,] 107
|
||||
DI "Livello@20" 500@->S0
|
||||
DI "Gruppo@10" CODTAB[2,]
|
||||
DI "Descrizione@30" S0
|
||||
OU 107 CODTAB[2,]
|
||||
ME 0 RESET,108|RESET,109
|
||||
ME ENABLE,108
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 108 6
|
||||
BE
|
||||
PR 59 6 ""
|
||||
FL "U"
|
||||
US GCG
|
||||
JO FCG AL 500 INTO CODTAB==CODTAB[1,1]
|
||||
IN CODTAB[1,1] "3"
|
||||
IN CODTAB[2,] 108
|
||||
DI "Livello@20" 500@->S0
|
||||
DI "Gruppo@10" CODTAB[2,]
|
||||
DI "Descrizione@30" S0
|
||||
OU 108 CODTAB[2,]
|
||||
ME 0 RESET,109
|
||||
ME ENABLE,109
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 109 6
|
||||
BE
|
||||
PR 67 6 ""
|
||||
FL "U"
|
||||
US GCG
|
||||
JO FCG AL 500 INTO CODTAB==CODTAB[1,1]
|
||||
IN CODTAB[1,1] "4"
|
||||
IN CODTAB[2,] 109
|
||||
DI "Livello@20" 500@->S0
|
||||
DI "Gruppo@10" CODTAB[2,]
|
||||
DI "Descrizione@30" S0
|
||||
OU 109 CODTAB[2,]
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 262 8
|
||||
BE
|
||||
PR 2 6 "Codice "
|
||||
FL "U"
|
||||
US 55
|
||||
IN CODICE 262
|
||||
DI "Codice" CODICE
|
||||
DI "Descrizione@50" DESCR
|
||||
OU 110 DESCR
|
||||
OU 262 CODICE
|
||||
CH NORMAL
|
||||
ADD RU ve0 -5
|
||||
EN
|
||||
ZO 110 50
|
||||
BE
|
||||
PR 2 7 "Descrizione "
|
||||
CO ALL 262
|
||||
ADD RU ve0 -5
|
||||
FI DESCR
|
||||
EN
|
||||
ST 111 2
|
||||
BE
|
||||
PR 2 9 "U.M. "
|
||||
US 49 KE 2
|
||||
JO %UMS INTO CODTAB=UM
|
||||
IN CODART 131 SE
|
||||
IN UM 111
|
||||
DI "Codice@20" UM
|
||||
DI "Descrizione@50" %UMS->S0
|
||||
OU 111 UM
|
||||
FI UMQTA
|
||||
FLAG "U"
|
||||
CH REQUIRED
|
||||
EN
|
||||
ST 211 2
|
||||
BE
|
||||
PR 2 9 "U.M. "
|
||||
US %UMS
|
||||
IN CODTAB 211
|
||||
DI "Codice" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 211 CODTAB
|
||||
FI UMQTA
|
||||
FLAG "U"
|
||||
CH NORMAL
|
||||
EN
|
||||
NU 112 13 5
|
||||
BE
|
||||
PR 21 9 "Qta' "
|
||||
FI QTA
|
||||
EN
|
||||
NU 212 6 2
|
||||
BE
|
||||
PR 21 9 "Spesa % "
|
||||
FL "H"
|
||||
FI QTA
|
||||
EN
|
||||
CURRENCY 113 18
|
||||
BE
|
||||
PR 42 9 "Prezzo "
|
||||
FL "U"
|
||||
FI PREZZO
|
||||
EN
|
||||
NU 114 13 5
|
||||
BE
|
||||
PR 15 10 "Qta' evasa "
|
||||
FI QTAEVASA
|
||||
EN
|
||||
BO 115
|
||||
BE
|
||||
PR 42 10 "Saldata "
|
||||
FI RIGAEVASA
|
||||
EN
|
||||
DA 130
|
||||
BE
|
||||
PR 53 10 "Consegna "
|
||||
FI DATACONS
|
||||
EN
|
||||
NU 118 7
|
||||
BE
|
||||
PR 2 12 "N.Colli "
|
||||
FI NCOLLI
|
||||
EN
|
||||
NU 116 15 2
|
||||
BE
|
||||
PR 22 12 "Tara "
|
||||
FI TARA
|
||||
EN
|
||||
NU 117 15 2
|
||||
BE
|
||||
PR 46 12 "Peso netto "
|
||||
FI PNETTO
|
||||
EN
|
||||
BO 119
|
||||
BE
|
||||
PR 68 12 "Da evadere "
|
||||
FI DAEVADERE
|
||||
EN
|
||||
ST 120 25
|
||||
BE
|
||||
PR 2 13 "Sconto "
|
||||
FI SCONTO
|
||||
EN
|
||||
NU 121 5 2
|
||||
BE
|
||||
PR 42 13 "Perc.Provv. "
|
||||
FI PERCPROV
|
||||
EN
|
||||
BO 122
|
||||
BE
|
||||
PR 2 14 "Importo provv.unitario"
|
||||
FI IMPFISUN
|
||||
EN
|
||||
CURRENCY 123 18
|
||||
BE
|
||||
PR 42 14 "Imp.Provv. "
|
||||
FI IMPFISSO
|
||||
EN
|
||||
ST 124 4
|
||||
BE
|
||||
PR 2 15 "Cod. IVA "
|
||||
US %IVA
|
||||
IN CODTAB 124
|
||||
DI "Codice@20" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 124 CODTAB
|
||||
OU 252 S0
|
||||
FL "U"
|
||||
VA 19 1 2
|
||||
CH NORMAL
|
||||
FI CODIVA
|
||||
EN
|
||||
ST 252 50
|
||||
BE
|
||||
PR 22 15 ""
|
||||
US %IVA KE 2
|
||||
IN S0 252
|
||||
DI "Descrizione@50" S0
|
||||
DI "Codice@20" CODTAB
|
||||
OU 124 CODTAB
|
||||
OU 252 S0
|
||||
EN
|
||||
BO 125
|
||||
BE
|
||||
PR 2 16 "Addebito IVA"
|
||||
FI ADDIVA
|
||||
EN
|
||||
ST 126 2
|
||||
BE
|
||||
PR 2 17 "Asp. Beni "
|
||||
US %ABE
|
||||
IN CODTAB 126
|
||||
DI "Codice@20" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 126 CODTAB
|
||||
OU 253 S0
|
||||
FL "UZ"
|
||||
CH NORMAL
|
||||
FI ASPBENI
|
||||
EN
|
||||
ST 253 50
|
||||
BE
|
||||
PR 22 17 ""
|
||||
FL "D"
|
||||
EN
|
||||
ST 127 5
|
||||
BE
|
||||
PR 2 18 "Caus.mag. "
|
||||
US %CAU
|
||||
IN CODTAB 127
|
||||
DI "Codice@20" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 127 CODTAB
|
||||
OU 255 S0
|
||||
FL "U"
|
||||
CH NORMAL
|
||||
FI CAUSMAG
|
||||
EN
|
||||
ST 255 50
|
||||
BE
|
||||
PR 22 18 ""
|
||||
FL "D"
|
||||
EN
|
||||
BU 1 10 2
|
||||
BE
|
||||
PR -14 -1 ""
|
||||
EN
|
||||
BU 2 10 2
|
||||
BE
|
||||
PR -24 -1 ""
|
||||
EN
|
||||
BU 17 10 2
|
||||
BE
|
||||
PR -34 -1 "Elimina"
|
||||
ME EXIT,127
|
||||
EN
|
||||
BU 100 10 2
|
||||
BE
|
||||
PR -44 -1 "~Collega"
|
||||
PI 117
|
||||
EN
|
||||
EN
|
||||
PA "Pag.2" -1 -1 76 21
|
||||
ST 128 3
|
||||
BE
|
||||
PR 2 3 "Mag.colleg. "
|
||||
CO US 103
|
||||
IN CODTAB 128
|
||||
DI "Codice" CODTAB
|
||||
DI "Descrizione@50" S0
|
||||
OU 128 CODTAB
|
||||
OU 256 S0
|
||||
WA "Magazzino assente"
|
||||
FL "U"
|
||||
KE 1
|
||||
CH NORMAL
|
||||
FI CODMAGC[1,3]
|
||||
EN
|
||||
ST 256 50
|
||||
BE
|
||||
PR 22 3 ""
|
||||
FL "D"
|
||||
EN
|
||||
ST 129 2
|
||||
BE
|
||||
PR 2 4 "Deposito "
|
||||
US MAG SE (CODTAB[1,3]==#128) && (CODTAB[4,5]!="")
|
||||
IN CODTAB[1,3] 128
|
||||
IN CODTAB[4,5] 129
|
||||
DI "Codice mag." CODTAB[1,3]
|
||||
DI "Codice dep." CODTAB[4,5]
|
||||
DI "Descrizione@50" S0
|
||||
OU 128 CODTAB[1,3]
|
||||
OU 129 CODTAB[4,5]
|
||||
OU 257 S0
|
||||
ME DIRTY,128|9,128
|
||||
CH NORMAL
|
||||
WA "Deposito assente"
|
||||
FL "U"
|
||||
KE 1
|
||||
FI CODMAGC[4,5]
|
||||
EN
|
||||
ST 257 50
|
||||
BE
|
||||
PR 22 4 ""
|
||||
FL "D"
|
||||
EN
|
||||
NU 133 13 5
|
||||
BE
|
||||
PR 2 6 "Qta' agg.1 "
|
||||
FI QTAGG1
|
||||
EN
|
||||
NU 134 13 5
|
||||
BE
|
||||
PR 28 6 "2 "
|
||||
FI QTAGG2
|
||||
EN
|
||||
NU 135 13 5
|
||||
BE
|
||||
PR 44 6 "3 "
|
||||
FI QTAGG3
|
||||
EN
|
||||
NU 136 13 5
|
||||
BE
|
||||
PR 12 7 "4 "
|
||||
FI QTAGG4
|
||||
EN
|
||||
NU 137 13 5
|
||||
BE
|
||||
PR 28 7 "5 "
|
||||
FI QTAGG5
|
||||
EN
|
||||
ST 138 5
|
||||
BE
|
||||
PR 2 9 "Impianto "
|
||||
US IMP
|
||||
IN CODTAB 138
|
||||
DI "Codice Impianto" CODTAB
|
||||
DI "Descrizione @50" S0
|
||||
OU 138 CODTAB
|
||||
OU 258 S0
|
||||
FI IMPIANTO
|
||||
FL "U"
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 258 50
|
||||
BE
|
||||
PR 22 9 ""
|
||||
US IMP KE 2
|
||||
IN S0 258
|
||||
DI "Descrizione @50" S0
|
||||
DI "Codice Impianto" CODTAB
|
||||
CO OU 138
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 139 5
|
||||
BE
|
||||
PR 2 10 "Linea "
|
||||
US LNP
|
||||
IN CODTAB 139
|
||||
DI "Codice Linea" CODTAB
|
||||
DI "Descrizione @50" S0
|
||||
OU 139 CODTAB
|
||||
OU 259 S0
|
||||
FI LINEA
|
||||
FL "U"
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 259 50
|
||||
BE
|
||||
PR 22 10 ""
|
||||
US LNP KE 2
|
||||
IN S0 259
|
||||
DI "Descrizione @50" S0
|
||||
DI "Codice Linea" CODTAB
|
||||
CO OU 139
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 140 20
|
||||
BE
|
||||
PR 2 11 "Commessa "
|
||||
US CMS
|
||||
IN CODTAB 140
|
||||
DI "Codice commessa@20" CODTAB
|
||||
DI "Descrizione @50" S0
|
||||
OU 140 CODTAB
|
||||
OU 260 S0
|
||||
FI CODCMS
|
||||
FL "UZ"
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 260 50
|
||||
BE
|
||||
PR 14 12 ""
|
||||
US CMS KE 2
|
||||
IN S0 260
|
||||
DI "Descrizione @50" S0
|
||||
DI "Codice commessa@20" CODTAB
|
||||
CO OU 140
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 141 10
|
||||
BE
|
||||
PR 2 13 "Fase "
|
||||
US FSC
|
||||
IN CODTAB 141
|
||||
DI "Codice Fase@10" CODTAB
|
||||
DI "Descrizione @50" S0
|
||||
OU 141 CODTAB
|
||||
OU 260 S0
|
||||
FI FASCMS
|
||||
FL "UZ"
|
||||
CH NORMAL
|
||||
EN
|
||||
ST 261 50
|
||||
BE
|
||||
PR 14 14 ""
|
||||
US FAS KE 2
|
||||
IN S0 261
|
||||
DI "Descrizione @50" S0
|
||||
DI "Codice Fase@10" CODTAB
|
||||
CO OU 141
|
||||
CH NORMAL
|
||||
EN
|
||||
BU 1 10 2
|
||||
BE
|
||||
PR -14 -1 ""
|
||||
EN
|
||||
BU 2 10 2
|
||||
BE
|
||||
PR -24 -1 ""
|
||||
EN
|
||||
EN
|
||||
ENDMASK
|
BIN
co/promemoriabenetti.doc
Executable file
BIN
co/promemoriabenetti.doc
Executable file
Binary file not shown.
10
co/verigco.ini
Executable file
10
co/verigco.ini
Executable file
@ -0,0 +1,10 @@
|
||||
#Profilo di riga tipo merce
|
||||
[MAIN]
|
||||
CALCOLI=*
|
||||
CAMPICALC=
|
||||
IMPONIBILE=IMPCNS
|
||||
IMPORTO=IMPLNS
|
||||
|
||||
[HANDLERS]
|
||||
NHANDLER = 0
|
||||
|
43
co/verigco.uml
Executable file
43
co/verigco.uml
Executable file
@ -0,0 +1,43 @@
|
||||
#include "verigdef.h"
|
||||
|
||||
#define FULL_SCREEN
|
||||
// else
|
||||
// #define MASK_WIDTH 60
|
||||
// #define MASK_HEIGHT 14
|
||||
//
|
||||
#define MASK_TITLE1 "Merce conferimento"
|
||||
#define PAGE_2
|
||||
|
||||
DEFINE_FIELD(CODMAG)
|
||||
DEFINE_FIELD(DESMAG)
|
||||
DEFINE_FIELD(CODDEP)
|
||||
DEFINE_FIELD(DESDEP)
|
||||
DEFINE_FIELD(CODART)
|
||||
F_OUT(CODART, FR_CODAGG1, USER1)
|
||||
F_CHK(CODART, SEARCH)
|
||||
DEFINE_FIELD(DESCRART)
|
||||
DEFINE_FIELD(UMQTA)
|
||||
DEFINE_FIELD(QTA)
|
||||
F_FLG(QTA, "D")
|
||||
DEFINE_FIELD(PREZZO)
|
||||
DEFINE_FIELD(TARA)
|
||||
F_FLG(TARA, "D")
|
||||
DEFINE_FIELD(NCOLLI)
|
||||
F_POS(NCOLLI, 2, 12,"N. casse " )
|
||||
DEFINE_FIELD(SCONTO)
|
||||
F_POS(SCONTO, 2, 11,"Ritenuta " )
|
||||
DEFINE_FIELD(CODIVA)
|
||||
DEFINE_FIELD(DESIVA)
|
||||
DEFINE_FIELD(CAUS)
|
||||
DEFINE_FIELD(DESCRCAUS)
|
||||
DEFINE_FIELD(CODMAGC)
|
||||
DEFINE_FIELD(DESMAGC)
|
||||
DEFINE_FIELD(CODDEPC)
|
||||
DEFINE_FIELD(DESDEPC)
|
||||
DEFINE_FIELD(QTAGG1)
|
||||
F_POS(QTAGG1, 2, 13,"Qta lorda " )
|
||||
DEFINE_FIELD(CODAGG1)
|
||||
F_POS(CODAGG1, 2, 14,"Art. a valore " )
|
||||
|
||||
#include "verig.uml"
|
||||
|
Loading…
x
Reference in New Issue
Block a user