Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione 1.7 patch 054 aga sul main trunk git-svn-id: svn://10.65.10.50/trunk@9659 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			109 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			109 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
#include <utility.h>
 | 
						|
#include <strings.h>
 | 
						|
#include <tabutil.h>
 | 
						|
#include <recarray.h>
 | 
						|
#include <progind.h>
 | 
						|
#include <mask.h>
 | 
						|
 | 
						|
#define ANAGRAFICA_MORTI "iimdead"
 | 
						|
#define BPCS_ANAGRAFICA "iiml01"
 | 
						|
#define BPCS_IMPORTEX   "iimsl01"
 | 
						|
#define BPCS_DISTINTE   "mbml01"
 | 
						|
#define BPCS_DIVISORI   "cicl01"
 | 
						|
#define BPCS_MOVMAG     "ithl01"
 | 
						|
#define BPCS_ORDACQ     "ord_acq"
 | 
						|
#define BPCS_FIRMORD    "ord_cli"
 | 
						|
#define BPCS_SHOPORDS   "ord_prod"
 | 
						|
#define BPCS_STOCK   "mgfinale"
 | 
						|
 | 
						|
#define TICK 50
 | 
						|
 | 
						|
class TImport_file : public TObject
 | 
						|
{
 | 
						|
  TExternisamfile *_f;
 | 
						|
  real  _rbuffer;
 | 
						|
  TString _sbuffer;
 | 
						|
  TDate _dbuffer;
 | 
						|
public:
 | 
						|
  // record functs
 | 
						|
  void zero(const char filler=' ');
 | 
						|
  void put(const char *field, const char * val);
 | 
						|
  TString & get(const char *field);
 | 
						|
  const long get_long(const char *field);
 | 
						|
  const int get_int(const char *field) {return int(get_long(field));}
 | 
						|
  const real & get_real(const char *field);
 | 
						|
  const TDate & get_date(const char *field);
 | 
						|
  TString & get_codice(const char *field);
 | 
						|
  // movements
 | 
						|
  bool first();
 | 
						|
  bool next();
 | 
						|
  bool prev();
 | 
						|
  bool eof();
 | 
						|
  long items();
 | 
						|
  int write();
 | 
						|
  int read(int mode);
 | 
						|
  void zap(bool pack=FALSE);
 | 
						|
  const char *name() {return _f->name();}
 | 
						|
  TImport_file(const char *path, const char * name);
 | 
						|
};
 | 
						|
 | 
						|
class TSupport_file : public TObject
 | 
						|
{
 | 
						|
  TIsamtempfile * _f;
 | 
						|
  TRecord_cache *_cache;
 | 
						|
public:
 | 
						|
  void zap();
 | 
						|
  void put(const char * field, const char * value);
 | 
						|
  int read(TRectype & r);
 | 
						|
  int read()
 | 
						|
  {return read(_f->curr());}
 | 
						|
  int write();
 | 
						|
  TSupport_file (int logicnum,const char * radix);
 | 
						|
  virtual ~TSupport_file ();
 | 
						|
};
 | 
						|
 | 
						|
 | 
						|
bool  number_box(const char * prompt, real & v);
 | 
						|
const char * external_refnum(TImport_file &import);
 | 
						|
const char * external_refdate(TImport_file &import);
 | 
						|
 | 
						|
void delete_files(const char *wildcard);
 | 
						|
bool force_write(TLocalisamfile & f);
 | 
						|
// individua il metodo a partire dalla locazione di magazzino (codice dep)
 | 
						|
int location2method(long location) ;
 | 
						|
long method2location(int method) ;
 | 
						|
void coddep2location(const char * codmag, const char * coddep, TString & codlocation, int & nummag) ;
 | 
						|
// codifica il nome del terzista
 | 
						|
const char * descr_method(int method) ;
 | 
						|
// aggiunge le lavorazioni standard
 | 
						|
void add_stdlabors(const char * item, long wrkc, int bomm) ;
 | 
						|
 | 
						|
void set_workcenter_code(TString & stdwrkc, const char * codimp, long wrkc, int bomm) ;
 | 
						|
 | 
						|
bool check_mag_locations(const TString &path,const TFilename &source);
 | 
						|
void crea_mag3();
 | 
						|
void crea_linee3();
 | 
						|
bool rinumera_dist();
 | 
						|
bool rinumera_ums();
 | 
						|
bool rinumera_mags();
 | 
						|
bool sposta_lavs();
 | 
						|
bool build2levmsp();
 | 
						|
void setformulavar();
 | 
						|
bool evadi_orc(TMask &, const TString &codimp);
 | 
						|
bool unevadi_orc(TMask &, const TString & codimp);
 | 
						|
bool find_wrongcycle();
 | 
						|
 | 
						|
void round_date(TDate& date, const int bucket_size, bool up=FALSE) ;
 | 
						|
const char * check_clasdog(long stdo);
 | 
						|
void complete_gmc(TString & gmc,const char *iclas);
 | 
						|
void codimp2codmagdep(TString &codimp,int terzista, TString &codmag);
 | 
						|
void imploc2codmagdep(TString &codimp,TString &location, TString &codmag);
 | 
						|
void num_mag2cod_imp(int magno, TString & codimp);
 | 
						|
void num_mag2main_imp(int magno, TString & codimp);
 | 
						|
int cod_mag2num_mag(TString & codmag);
 | 
						|
const TString & converti_codval(const TString & codval);
 | 
						|
void cambio_fisso(const TString & codval, real & val);
 | 
						|
int inserisci_articolo(const char * codart, const char * um);
 | 
						|
long trascode_for(const long oldcod);
 | 
						|
 |