Patch level : 12.0 310 316
Files correlati : cg0.exe cg4.exe cg4300a.msk Eliminate le richieste di ricalcolo della liquidazione. Aggiunto il flag di definitiva modificabile dalla liquidazione. Due campi nuovi in liquidazione Calcola e Definitiva impostati dai flags sul mese. Da verificare, visto che le richieste erano molte (potrebbero esserne sfuggite), progressivi IVA, Liquidazione, Stampa registri e Visualizzazione liquidazione. git-svn-id: svn://10.65.10.50/branches/R_10_00@23473 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									1f7649f488
								
							
						
					
					
						commit
						41dcdb0818
					
				@ -12,6 +12,7 @@
 | 
				
			|||||||
#include <mailbox.h>
 | 
					#include <mailbox.h>
 | 
				
			||||||
#include <progind.h>
 | 
					#include <progind.h>
 | 
				
			||||||
#include <sheet.h>
 | 
					#include <sheet.h>
 | 
				
			||||||
 | 
					#include <utility.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <mov.h>
 | 
					#include <mov.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -516,6 +517,7 @@ bool TLiquidazione_app::set_print(int)
 | 
				
			|||||||
  _errors.destroy(); 
 | 
					  _errors.destroy(); 
 | 
				
			||||||
  _reg_arr.destroy();
 | 
					  _reg_arr.destroy();
 | 
				
			||||||
  _codiva_arr.destroy();
 | 
					  _codiva_arr.destroy();
 | 
				
			||||||
 | 
						_lim_cleared = ini_get_bool(CONFIG_DITTA, "CG", "LimCleared");
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  switch(_menu)
 | 
					  switch(_menu)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
@ -622,8 +624,8 @@ bool TLiquidazione_app::ch_year_handler(TMask_field& f, KEY key)
 | 
				
			|||||||
		const bool def = lim.get_bool("B1");
 | 
							const bool def = lim.get_bool("B1");
 | 
				
			||||||
		const bool calc = !def && (lim.empty() || lim.get_bool("B0"));
 | 
							const bool calc = !def && (lim.empty() || lim.get_bool("B0"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		msk.set(CG43_CHK_CALCULATE, calc, 0x3); 
 | 
							msk.set(CG43_CHK_CALCULATE, app()._lim_cleared && calc, 0x3); 
 | 
				
			||||||
		msk.set(CG43_CHK_FINAL, def, 0x3); 
 | 
							msk.set(CG43_CHK_FINAL, app()._lim_cleared && def, 0x3); 
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  return true;
 | 
					  return true;
 | 
				
			||||||
} 
 | 
					} 
 | 
				
			||||||
@ -757,8 +759,8 @@ bool TLiquidazione_app::lst_tm_handler(TMask_field& f, KEY key)
 | 
				
			|||||||
				const bool def = lim.get_bool("B1");
 | 
									const bool def = lim.get_bool("B1");
 | 
				
			||||||
				const bool calc = !def && (lim.empty() || lim.get_bool("B0"));
 | 
									const bool calc = !def && (lim.empty() || lim.get_bool("B0"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				msk.set(CG43_CHK_CALCULATE, calc, 0x3); 
 | 
										msk.set(CG43_CHK_CALCULATE, app()._lim_cleared && calc, 0x3); 
 | 
				
			||||||
				msk.set(CG43_CHK_FINAL, def, 0x3); 
 | 
									msk.set(CG43_CHK_FINAL, app()._lim_cleared && def, 0x3); 
 | 
				
			||||||
     // Abilita il ricalcolo solo se non e' richiesta esplicitamente la sola stampa
 | 
					     // Abilita il ricalcolo solo se non e' richiesta esplicitamente la sola stampa
 | 
				
			||||||
				if (msk.get_bool(CG43_CHK_CALCULATE))
 | 
									if (msk.get_bool(CG43_CHK_CALCULATE))
 | 
				
			||||||
					msk.field(CG43_LST_CALC).enable();
 | 
										msk.field(CG43_LST_CALC).enable();
 | 
				
			||||||
@ -896,7 +898,7 @@ void TLiquidazione_app::build_ditte_sheet(wht what)
 | 
				
			|||||||
bool TLiquidazione_app::set_liquidazione()
 | 
					bool TLiquidazione_app::set_liquidazione()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  TMask m("cg4300a");
 | 
					  TMask m("cg4300a");
 | 
				
			||||||
	TRectype & lim = (TRectype &) get_lim(_month);
 | 
						const TRectype & lim = get_lim(_month);
 | 
				
			||||||
	const bool def = lim.get_bool("B1");
 | 
						const bool def = lim.get_bool("B1");
 | 
				
			||||||
	const bool calc = !def && (lim.empty() || lim.get_bool("B0"));
 | 
						const bool calc = !def && (lim.empty() || lim.get_bool("B0"));
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
@ -913,8 +915,8 @@ bool TLiquidazione_app::set_liquidazione()
 | 
				
			|||||||
	m.set(CG43_FLD_ANNO, _year);
 | 
						m.set(CG43_FLD_ANNO, _year);
 | 
				
			||||||
  m.set(CG43_LST_MESE, _month);  
 | 
					  m.set(CG43_LST_MESE, _month);  
 | 
				
			||||||
  m.set(CG43_CHK_STAMPA,"X");    // stampa abilitata per default
 | 
					  m.set(CG43_CHK_STAMPA,"X");    // stampa abilitata per default
 | 
				
			||||||
  m.set(CG43_CHK_CALCULATE, calc, 0x3);
 | 
					  m.set(CG43_CHK_CALCULATE, _lim_cleared && calc, 0x3);
 | 
				
			||||||
  m.set(CG43_CHK_FINAL, def, 0x3);
 | 
					  m.set(CG43_CHK_FINAL, _lim_cleared && def, 0x3);
 | 
				
			||||||
  m.set(CG43_RDB_VERS, _what);
 | 
					  m.set(CG43_RDB_VERS, _what);
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	const KEY k = m.run();
 | 
						const KEY k = m.run();
 | 
				
			||||||
@ -930,11 +932,9 @@ bool TLiquidazione_app::set_liquidazione()
 | 
				
			|||||||
    _isprint    = m.get_bool(CG43_CHK_STAMPA);
 | 
					    _isprint    = m.get_bool(CG43_CHK_STAMPA);
 | 
				
			||||||
    _recalc     = m.get_bool(CG43_CHK_CALCULATE) ? one : never;
 | 
					    _recalc     = m.get_bool(CG43_CHK_CALCULATE) ? one : never;
 | 
				
			||||||
    _printonly  = !m.get_bool(CG43_CHK_CALCULATE);
 | 
					    _printonly  = !m.get_bool(CG43_CHK_CALCULATE);
 | 
				
			||||||
 | 
							_definitiva = m.get_bool(CG43_CHK_FINAL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (_isprint) printer().setdate(_date);
 | 
							if (_isprint) printer().setdate(_date);
 | 
				
			||||||
		lim.zero("B0");
 | 
					 | 
				
			||||||
		lim.put("B1", m.get_bool(CG43_CHK_FINAL));
 | 
					 | 
				
			||||||
		put_lim(lim);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  return k == K_ENTER;
 | 
					  return k == K_ENTER;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -301,6 +301,8 @@ class TLiquidazione_app : public TPrint_application
 | 
				
			|||||||
  bool       _is_interactive;  // lanciata da menu o da altro prog
 | 
					  bool       _is_interactive;  // lanciata da menu o da altro prog
 | 
				
			||||||
  bool       _is_visliq;       // lanciata da visualizzazione liquidazione
 | 
					  bool       _is_visliq;       // lanciata da visualizzazione liquidazione
 | 
				
			||||||
  int        _monthinatt;      // mese inizio attivita' (serve per differita)
 | 
					  int        _monthinatt;      // mese inizio attivita' (serve per differita)
 | 
				
			||||||
 | 
						bool			_lim_cleared;
 | 
				
			||||||
 | 
						bool			_definitiva;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	real _diff_ven_ap, _diff_ven_ap_iva, _diff_acq_ap, _diff_acq_ap_iva;
 | 
						real _diff_ven_ap, _diff_ven_ap_iva, _diff_acq_ap, _diff_acq_ap_iva;
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
 | 
				
			|||||||
@ -87,6 +87,28 @@ bool TLiquidazione_app::recalc_all()
 | 
				
			|||||||
      
 | 
					      
 | 
				
			||||||
      TApplication::set_firm(codditta);
 | 
					      TApplication::set_firm(codditta);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (!_lim_cleared)
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									TCursor  c(new TRelation("LIM"));
 | 
				
			||||||
 | 
									const int items = c.items();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									for (c = 0L; c.pos() < items; ++c)
 | 
				
			||||||
 | 
									{
 | 
				
			||||||
 | 
										TRectype & rec = c.curr();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										rec.zero("B0");
 | 
				
			||||||
 | 
										rec.zero("B1");
 | 
				
			||||||
 | 
										rec.rewrite(c.file());
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									ini_set_bool(CONFIG_DITTA, "CG", "LimCleared", true);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								TRectype & lim = (TRectype &) get_lim(_month);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								lim.zero("B0");
 | 
				
			||||||
 | 
								lim.put("B1", _definitiva);
 | 
				
			||||||
 | 
								put_lim(lim);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			// Imposta metodo arrotondamento imposte 
 | 
								// Imposta metodo arrotondamento imposte 
 | 
				
			||||||
      TIva_round ir; 
 | 
					      TIva_round ir; 
 | 
				
			||||||
      ir.set_default_iva_mode(atoi(_year), _isannual, codditta);
 | 
					      ir.set_default_iva_mode(atoi(_year), _isannual, codditta);
 | 
				
			||||||
 | 
				
			|||||||
@ -483,10 +483,9 @@ const TRectype & TLiquidazione_app::get_lim(int month, bool create)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (lim.empty() && create)
 | 
					  if (lim.empty() && create)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
		TRectype l(lim);
 | 
							lim.zero();
 | 
				
			||||||
 | 
							lim.put("CODTAB", key);
 | 
				
			||||||
    l.put("CODTAB", key);
 | 
							put_lim(lim, false);
 | 
				
			||||||
    put_lim(l, false); 
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // crea o posiziona la tabella gemella LAM
 | 
					  // crea o posiziona la tabella gemella LAM
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user