Patch level : nopatch
Files correlati : Commento : riaggiunto tmovimento_contabile
This commit is contained in:
		
							parent
							
								
									f086a6b3b4
								
							
						
					
					
						commit
						0ec93baccd
					
				
							
								
								
									
										108
									
								
								src/cg/cglib.h
									
									
									
									
									
								
							
							
						
						
									
										108
									
								
								src/cg/cglib.h
									
									
									
									
									
								
							@ -963,56 +963,6 @@ char frequenza_versamenti(int year, long firm = -1);   // Ritorna 'M'ensile o 'T
 | 
				
			|||||||
int date2liq(const TDate & data, long firm = -1);       // Estrae dalla data il mese di liquidazione
 | 
					int date2liq(const TDate & data, long firm = -1);       // Estrae dalla data il mese di liquidazione
 | 
				
			||||||
bool controlla_liquidazione(const TDate & data, const TRegistro & reg, bool reset = false);
 | 
					bool controlla_liquidazione(const TDate & data, const TRegistro & reg, bool reset = false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TMovimento_contabile : public TMultiple_rectype
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	TDate _olddataliq;
 | 
					 | 
				
			||||||
	TRecord_array _old_iva;
 | 
					 | 
				
			||||||
	TPagamento _pag;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
protected:
 | 
					 | 
				
			||||||
	int registra(bool re, bool force);
 | 
					 | 
				
			||||||
	int read_mov_rows();
 | 
					 | 
				
			||||||
	void update_rev_charge();
 | 
					 | 
				
			||||||
	void find_movcoll();
 | 
					 | 
				
			||||||
	virtual int write_rewrite(TBaseisamfile& f, bool re = false) const;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public:
 | 
					 | 
				
			||||||
	const TRecord_array& cg() const { return body(LF_RMOV); }
 | 
					 | 
				
			||||||
	TRecord_array& cg() { return body(LF_RMOV); }
 | 
					 | 
				
			||||||
	const TRecord_array& iva() const { return body(LF_RMOVIVA); }
 | 
					 | 
				
			||||||
	TRecord_array& iva() { return body(LF_RMOVIVA); }
 | 
					 | 
				
			||||||
	TRectype& cg(int i, bool create = true)	{	return cg().row(i, create); }
 | 
					 | 
				
			||||||
	TRectype& iva(int i, bool create = true) { return iva().row(i, create); }
 | 
					 | 
				
			||||||
	const TRectype& cg(int i, bool create = true) const { return (const TRectype &) ((TRecord_array &) cg()).row(i, create); }
 | 
					 | 
				
			||||||
	const TRectype& iva(int i, bool create = true) const { return (const TRectype &)((TRecord_array &) iva()).row(i, create); }
 | 
					 | 
				
			||||||
	int cg_rows() const { return cg().rows(); }
 | 
					 | 
				
			||||||
  int iva_rows() const { return iva().rows(); }
 | 
					 | 
				
			||||||
  bool solo_IVA() const { return iva_rows() > 0 && cg_rows() == 0; }
 | 
					 | 
				
			||||||
  bool is_IVA() const { return iva_rows() > 0; }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	virtual int readat(TRecnotype nrec, word lockop = _nolock);
 | 
					 | 
				
			||||||
	virtual int read(word op = _isequal, word lockop = _nolock);
 | 
					 | 
				
			||||||
	virtual int TMovimento_contabile::remove();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // Funzioni per costruttore di copia
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  virtual TMovimento_contabile & copy(const TMovimento_contabile & mov);
 | 
					 | 
				
			||||||
  virtual TObject* dup() const { return new TMovimento_contabile(*this); }
 | 
					 | 
				
			||||||
  virtual TMovimento_contabile& operator =(const TMovimento_contabile& mov) { return copy(mov); }
 | 
					 | 
				
			||||||
  virtual TRectype& operator =(const TRectype & mov);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	void adjust_rowtypes(); 
 | 
					 | 
				
			||||||
	real imponibile(const char * codiva = nullptr) const ;
 | 
					 | 
				
			||||||
	real imposta(const char * codiva = nullptr) const ;
 | 
					 | 
				
			||||||
	TPagamento& pagamento();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	TMovimento_contabile();
 | 
					 | 
				
			||||||
  TMovimento_contabile(const TMovimento_contabile& mov);
 | 
					 | 
				
			||||||
  TMovimento_contabile(long numreg);
 | 
					 | 
				
			||||||
  TMovimento_contabile(const TRectype& mov);
 | 
					 | 
				
			||||||
	virtual ~TMovimento_contabile() {}
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define TEMP_CAUS    "tcaus"
 | 
					#define TEMP_CAUS    "tcaus"
 | 
				
			||||||
#define TEMP_RCAUS   "trcaus"
 | 
					#define TEMP_RCAUS   "trcaus"
 | 
				
			||||||
#define TEMP_CLIFO   "tclifo"
 | 
					#define TEMP_CLIFO   "tclifo"
 | 
				
			||||||
@ -1543,4 +1493,62 @@ public:
 | 
				
			|||||||
const TCli_for & cached_clifor(const char tipo, const long codice);
 | 
					const TCli_for & cached_clifor(const char tipo, const long codice);
 | 
				
			||||||
const TCli_for & cached_clifor(int file, const TRectype & rec);
 | 
					const TCli_for & cached_clifor(int file, const TRectype & rec);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class TMovimento_contabile : public TMultiple_rectype
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						TDate _olddataliq;
 | 
				
			||||||
 | 
						TRecord_array _old_iva;
 | 
				
			||||||
 | 
						TPagamento _pag;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					protected:
 | 
				
			||||||
 | 
						int registra(bool re, bool force);
 | 
				
			||||||
 | 
						int read_mov_rows();
 | 
				
			||||||
 | 
						void update_rev_charge();
 | 
				
			||||||
 | 
						void find_movcoll();
 | 
				
			||||||
 | 
						virtual int write_rewrite(TBaseisamfile& f, bool re = false) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public:
 | 
				
			||||||
 | 
						const TRecord_array& cg() const { return body(LF_RMOV); }
 | 
				
			||||||
 | 
						TRecord_array& cg() { return body(LF_RMOV); }
 | 
				
			||||||
 | 
						const TRecord_array& iva() const { return body(LF_RMOVIVA); }
 | 
				
			||||||
 | 
						TRecord_array& iva() { return body(LF_RMOVIVA); }
 | 
				
			||||||
 | 
						TRectype& cg(int i, bool create = true) { return cg().row(i, create); }
 | 
				
			||||||
 | 
						TRectype& iva(int i, bool create = true) { return iva().row(i, create); }
 | 
				
			||||||
 | 
						const TRectype& cg(int i, bool create = true) const { return (const TRectype &)((TRecord_array &)cg()).row(i, create); }
 | 
				
			||||||
 | 
						const TRectype& iva(int i, bool create = true) const { return (const TRectype &)((TRecord_array &)iva()).row(i, create); }
 | 
				
			||||||
 | 
						int cg_rows() const { return cg().rows(); }
 | 
				
			||||||
 | 
						int iva_rows() const { return iva().rows(); }
 | 
				
			||||||
 | 
						bool solo_IVA() const { return iva_rows() > 0 && cg_rows() == 0; }
 | 
				
			||||||
 | 
						bool is_IVA() const { return iva_rows() > 0; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						virtual int readat(TRecnotype nrec, word lockop = _nolock);
 | 
				
			||||||
 | 
						virtual int read(word op = _isequal, word lockop = _nolock);
 | 
				
			||||||
 | 
						virtual int TMovimento_contabile::remove();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Funzioni per costruttore di copia
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						virtual TMovimento_contabile & copy(const TMovimento_contabile & mov);
 | 
				
			||||||
 | 
						virtual TObject* dup() const { return new TMovimento_contabile(*this); }
 | 
				
			||||||
 | 
						virtual TMovimento_contabile& operator =(const TMovimento_contabile& mov) { return copy(mov); }
 | 
				
			||||||
 | 
						virtual TRectype& operator =(const TRectype & mov);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						void adjust_rowtypes();
 | 
				
			||||||
 | 
						real imponibile(const char * codiva = nullptr) const;
 | 
				
			||||||
 | 
						real imposta(const char * codiva = nullptr) const;
 | 
				
			||||||
 | 
						TPagamento& pagamento();
 | 
				
			||||||
 | 
						const TCli_for & clifo() const { return  cached_clifor(get_char(MOV_TIPO), get_long(MOV_CODCF)); }
 | 
				
			||||||
 | 
						const TCausale & causale() const { return cached_causale(get(MOV_CODCAUS), get_int(MOV_ANNOES)); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						bool is_reverse_charge() const { return ::is_reverse_charge(*this); }
 | 
				
			||||||
 | 
						bool is_split_payment() const { return ::is_split_payment(*this); }
 | 
				
			||||||
 | 
						bool is_IVA_diff() const { return ::is_IVA_diff(*this); }
 | 
				
			||||||
 | 
						bool is_IVAxCassa() const { return ::is_IVAxCassa(*this); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						TMovimento_contabile();
 | 
				
			||||||
 | 
						TMovimento_contabile(const TMovimento_contabile& mov);
 | 
				
			||||||
 | 
						TMovimento_contabile(long numreg);
 | 
				
			||||||
 | 
						TMovimento_contabile(const TRectype& mov);
 | 
				
			||||||
 | 
						virtual ~TMovimento_contabile() {}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user