Tolto clifor
git-svn-id: svn://10.65.10.50/trunk@4638 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									a1a4d6f19b
								
							
						
					
					
						commit
						0c393f206c
					
				
							
								
								
									
										129
									
								
								mg/mglib.h
									
									
									
									
									
								
							
							
						
						
									
										129
									
								
								mg/mglib.h
									
									
									
									
									
								
							| @ -113,9 +113,9 @@ public: | ||||
|   int read(TBaseisamfile & f, word op = _isequal, word lockop = _nolock) { return read(f.curr(), op, lockop); } | ||||
|    | ||||
|   virtual int write(TBaseisamfile& f) const | ||||
|   	{ return write_rewrite(f);} | ||||
|     { return write_rewrite(f);} | ||||
|   virtual int rewrite(TBaseisamfile& f) const | ||||
|   	{ return write_rewrite(f,TRUE);} | ||||
|     { return write_rewrite(f,TRUE);} | ||||
|   virtual int remove(TBaseisamfile& f) const; | ||||
| 
 | ||||
|   int write() const { TBaseisamfile f(num()); return write(f);} | ||||
| @ -169,9 +169,9 @@ public: | ||||
|   const TString codice() const { return (const char *) *_codice;}   | ||||
|   const TString& descrizione(const char * lingua = NULL) const; | ||||
| 
 | ||||
| 	bool unlock() ; | ||||
| 	bool lock_and_prompt() ; | ||||
| 	void update_ultcosti(real costo,TDate data) ; | ||||
|   bool unlock() ; | ||||
|   bool lock_and_prompt() ; | ||||
|   void update_ultcosti(real costo,TDate data) ; | ||||
| 
 | ||||
|   int find_um(const char * um, int from = 0) const { return find(LF_UMART, UMART_UM, um, from); } | ||||
|   int find_deslin(const char * deslin, int from = 0) const { return find(LF_DESLIN, DESLIN_CODLIN, deslin, from); } | ||||
| @ -299,7 +299,7 @@ public: | ||||
|   void reset_fields(TAuto_variable_rectype & rec) { rec.remove_field(); } | ||||
|   virtual void set_fields(TAuto_variable_rectype & rec); | ||||
|      | ||||
| 	virtual int readat(TBaseisamfile& f, TRecnotype nrec, word lockop= _nolock); | ||||
|   virtual int readat(TBaseisamfile& f, TRecnotype nrec, word lockop= _nolock); | ||||
|   virtual int read(TBaseisamfile& f, word op = _isequal, word lockop = _nolock); | ||||
|    | ||||
|   virtual int write(TBaseisamfile& f) const ; | ||||
| @ -340,16 +340,16 @@ class TMag_livelli { | ||||
|   int _last_level; | ||||
|      | ||||
| public: | ||||
| 	int last_level() const {return _last_level;}; // Ritorna il numero di livelli abilitati
 | ||||
| 	const bool enabled(int levnum=1); // Ritorna se il livello è abilitato
 | ||||
| 	const	TString & name(int levnum);   // Ritorna il nome (descrizione) di quel livello
 | ||||
| 	const	TString & picture(int levnum);// Ritorna la stringa di picture per i codici gruppo di quel livello
 | ||||
| 	const int code_lenght(int levnum);  		// Ritorna la lunghezza dei codici gruppo di quel livello
 | ||||
| 	const int packed_lenght(int levnum);		// Ritorna la lunghezza del codice compatto fino a quel livello
 | ||||
|   int last_level() const {return _last_level;}; // Ritorna il numero di livelli abilitati
 | ||||
|   const bool enabled(int levnum=1); // Ritorna se il livello è abilitato
 | ||||
|   const TString & name(int levnum);   // Ritorna il nome (descrizione) di quel livello
 | ||||
|   const TString & picture(int levnum);// Ritorna la stringa di picture per i codici gruppo di quel livello
 | ||||
|   const int code_lenght(int levnum);      // Ritorna la lunghezza dei codici gruppo di quel livello
 | ||||
|   const int packed_lenght(int levnum);    // Ritorna la lunghezza del codice compatto fino a quel livello
 | ||||
|    | ||||
| 	void pack_grpcode(TString & pc, const TString &codlev, const int levnum);  		// Inserisce il codice del gruppo del livello levnum in pc
 | ||||
|   TString unpack_grpcode(const TString & pc, const int levnum);  		// Estrae il codice del gruppo del livello levnum da pc
 | ||||
| 	TString build_tabcode(const TString & pc, const int levnum); | ||||
|   void pack_grpcode(TString & pc, const TString &codlev, const int levnum);     // Inserisce il codice del gruppo del livello levnum in pc
 | ||||
|   TString unpack_grpcode(const TString & pc, const int levnum);     // Estrae il codice del gruppo del livello levnum da pc
 | ||||
|   TString build_tabcode(const TString & pc, const int levnum); | ||||
| 
 | ||||
|   TMag_livelli(const char *tabname);  // costruttore
 | ||||
|   ~TMag_livelli() {}; // distruttore
 | ||||
| @ -400,15 +400,15 @@ typedef enum  { | ||||
| 
 | ||||
| class TCausale_magazzino : public TRectype { | ||||
| public: | ||||
| 	const char * get_codice() {return get("CODTAB");} | ||||
| 	const char * get_descr() {return get("S0");} | ||||
| 	const char get_tipoprz() {return get_char("S6");} | ||||
| 	const char get_tipomov() {return get_char("S7");} | ||||
| 	const char * get_raggfisc() {return get("S8");} | ||||
| 	const char * get_collegata() {return get("S9");} | ||||
| 	int sgn(TTipo_saldomag fieldname) ; | ||||
| 	TCausale_magazzino(const char * codice); | ||||
| 	~TCausale_magazzino(); | ||||
|   const char * get_codice() {return get("CODTAB");} | ||||
|   const char * get_descr() {return get("S0");} | ||||
|   const char get_tipoprz() {return get_char("S6");} | ||||
|   const char get_tipomov() {return get_char("S7");} | ||||
|   const char * get_raggfisc() {return get("S8");} | ||||
|   const char * get_collegata() {return get("S9");} | ||||
|   int sgn(TTipo_saldomag fieldname) ; | ||||
|   TCausale_magazzino(const char * codice); | ||||
|   ~TCausale_magazzino(); | ||||
| }; | ||||
| 
 | ||||
| class TLine_movmag ; // convenience...
 | ||||
| @ -465,7 +465,7 @@ protected: | ||||
|   // @member: effettua l'aggiornamento di un saldo di una giacenza
 | ||||
|   void update_balance(TRectype & magrec, const char * fieldname, real diff) const; | ||||
| 
 | ||||
| 	static void giac_putkey(TLocalisamfile & mag,TString16 annoes,TToken_string curr_key); | ||||
|   static void giac_putkey(TLocalisamfile & mag,TString16 annoes,TToken_string curr_key); | ||||
|   static bool lock_anamag(const char *codart); | ||||
|   static bool unlock_anamag(const char *codart) ; | ||||
| 
 | ||||
| @ -473,16 +473,16 @@ public: | ||||
| // IO ad alto livello
 | ||||
|   const char *get_next_key() ; | ||||
|   virtual int read(TBaseisamfile& f, word op = _isequal, word lockop = _nolock); | ||||
| 	virtual int remove(TBaseisamfile& f) const ; | ||||
|   virtual int remove(TBaseisamfile& f) const ; | ||||
|   virtual int write(TBaseisamfile& f) const ; | ||||
|   virtual int rewrite(TBaseisamfile& f) const ; | ||||
| 	int force_update_bal(); | ||||
|   int force_update_bal(); | ||||
|    | ||||
| 	//
 | ||||
| 	int codice_esercizio(TDate &d); | ||||
| 	// costruttori e distruttori
 | ||||
| 	TMov_mag(); | ||||
| 	virtual ~TMov_mag(); | ||||
|   //
 | ||||
|   int codice_esercizio(TDate &d); | ||||
|   // costruttori e distruttori
 | ||||
|   TMov_mag(); | ||||
|   virtual ~TMov_mag(); | ||||
|    | ||||
| }; | ||||
| 
 | ||||
| @ -494,23 +494,23 @@ bool rebuild_balances(TString16 annoes, bool reset_giac=FALSE); | ||||
| 
 | ||||
| class TForm_stampemg : public TForm  | ||||
| { | ||||
| 	bool _permag; | ||||
| 	int _fromlivgiac,_tolivgiac,_fromlivart,_tolivart; | ||||
| 	bool _sottocatmer; | ||||
| 	TMag_livelli * _giaclev,*_artlev; | ||||
| 	TDecoder *_giacgrp,*_artgrp; | ||||
| 	bool setdettaglio(bool show, int fromlivart,int livart,int fromlivgiac,int livgiac,bool dettgiac); | ||||
| 	void add_giaclev(TString &levname); | ||||
|   bool _permag; | ||||
|   int _fromlivgiac,_tolivgiac,_fromlivart,_tolivart; | ||||
|   bool _sottocatmer; | ||||
|   TMag_livelli * _giaclev,*_artlev; | ||||
|   TDecoder *_giacgrp,*_artgrp; | ||||
|   bool setdettaglio(bool show, int fromlivart,int livart,int fromlivgiac,int livgiac,bool dettgiac); | ||||
|   void add_giaclev(TString &levname); | ||||
| 
 | ||||
| public: | ||||
| 	void gruppogiac(TForm_item &cf, TToken_string &s); | ||||
| 	void gruppoart(TForm_item &cf, TToken_string &s); | ||||
| 	bool validate(TForm_item &cf, TToken_string &s); | ||||
| 	void setcatmer(bool catmer,bool sottoc=FALSE); | ||||
| 	bool setdett_perart(int fromlivart,int livart,int fromlivgiac,int livgiac,bool showmag, bool showdep); | ||||
| 	bool setdett_permag(int fromlivart,int livart,int fromlivgiac,int livgiac,bool showmag, bool showdep,bool showdett); | ||||
| 	TForm_stampemg(const char *name,const char *code) ; | ||||
| 	~TForm_stampemg(); | ||||
|   void gruppogiac(TForm_item &cf, TToken_string &s); | ||||
|   void gruppoart(TForm_item &cf, TToken_string &s); | ||||
|   bool validate(TForm_item &cf, TToken_string &s); | ||||
|   void setcatmer(bool catmer,bool sottoc=FALSE); | ||||
|   bool setdett_perart(int fromlivart,int livart,int fromlivgiac,int livgiac,bool showmag, bool showdep); | ||||
|   bool setdett_permag(int fromlivart,int livart,int fromlivgiac,int livgiac,bool showmag, bool showdep,bool showdett); | ||||
|   TForm_stampemg(const char *name,const char *code) ; | ||||
|   ~TForm_stampemg(); | ||||
| }; | ||||
| 
 | ||||
| 
 | ||||
| @ -524,12 +524,11 @@ class TCondizione_vendita : public TObject | ||||
|   real _prezzo; | ||||
|   real _provv; | ||||
|   real _molt_sconto; | ||||
|   TCliFor * _clifo; | ||||
|   TLocalisamfile _condv; | ||||
|   TLocalisamfile _rcondv; | ||||
|   TLocalisamfile _sconti; | ||||
|   TLocalisamfile * _anamag; // file passato e posizionato esternamente
 | ||||
|   TLocalisamfile * _umart;	// file passato e posizionato esternamente
 | ||||
|   TLocalisamfile * _umart;  // file passato e posizionato esternamente
 | ||||
|   TConfig * _config_ditta; | ||||
|   bool _load_mask; | ||||
| 
 | ||||
| @ -552,13 +551,13 @@ public: | ||||
| 
 | ||||
|   bool gestum() const { return _condv.get_bool("GESTUM"); } | ||||
|    | ||||
| 	// prepara la ricerca 
 | ||||
| 	void put_condv(const char *tipocv,const char * codcv,const char *catven,const char *tipocf,const char *codcf); | ||||
| 	void put_listino(const char * codlist,const char *catven); | ||||
| 	void put_contratto(const char * codcontr,const char *tipocf,const char *codcf); | ||||
| 	void put_offerta(const char * codoff); | ||||
| 	// ricerca il codice 
 | ||||
| 	bool ricerca(const char * cod,const real & qta=0) ; | ||||
|   // prepara la ricerca 
 | ||||
|   void put_condv(const char *tipocv,const char * codcv,const char *catven,const char *tipocf,const char *codcf); | ||||
|   void put_listino(const char * codlist,const char *catven); | ||||
|   void put_contratto(const char * codcontr,const char *tipocf,const char *codcf); | ||||
|   void put_offerta(const char * codoff); | ||||
|   // ricerca il codice 
 | ||||
|   bool ricerca(const char * cod,const real & qta=0) ; | ||||
| 
 | ||||
|   TCondizione_vendita(TConfig * _ditta = NULL, TLocalisamfile * anamag = NULL, TLocalisamfile * umart = NULL);     | ||||
|   ~TCondizione_vendita() {} | ||||
| @ -577,10 +576,10 @@ public: | ||||
| 
 | ||||
| class TRegistro_std : public TRectype | ||||
| {            | ||||
| 	TString80 _intest; | ||||
|   TString80 _intest; | ||||
| 
 | ||||
| protected: | ||||
| 	bool read(const char* cod, int year); | ||||
|   bool read(const char* cod, int year); | ||||
| 
 | ||||
| public: | ||||
|   int year() const; | ||||
| @ -592,18 +591,18 @@ public: | ||||
|   const TString & cod_intest() const { return get("S7"); } | ||||
|   const TString intest() const; | ||||
|   const TString & luogo_conserv() const { return get("S1"); } | ||||
| 	int pag_stampate() const{ return get_int("I1"); } | ||||
| 	int pag_numerate() const{ return get_int("I2"); } | ||||
| 	TDate vidimazione() const { return get_date("D0"); } | ||||
|   int pag_stampate() const{ return get_int("I1"); } | ||||
|   int pag_numerate() const{ return get_int("I2"); } | ||||
|   TDate vidimazione() const { return get_date("D0"); } | ||||
|   TDate scadenza() const { return get_date("D1"); } | ||||
|   TDate last_print() const { return get_date("D3"); } | ||||
| 	bool stampa_intditta() const { return get_bool("B9"); } | ||||
|   bool stampa_intditta() const { return get_bool("B9"); } | ||||
|    | ||||
| 	void set_pag_stampate(int p) { put("I1",p); } | ||||
|   void set_pag_stampate(int p) { put("I1",p); } | ||||
|   void set_last_print(TDate &d) { put("D3",d); } | ||||
| 
 | ||||
| 	bool write(bool re) const ; | ||||
| 	bool rewrite() const {return write(TRUE);} | ||||
|   bool write(bool re) const ; | ||||
|   bool rewrite() const {return write(TRUE);} | ||||
| 
 | ||||
|   TRegistro_std(const char* code = "", int year = 0);   | ||||
|   virtual ~TRegistro_std() {} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user