Corretti errori segnalati in data 05/12/95
git-svn-id: svn://10.65.10.50/trunk@2381 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									8dd89755a5
								
							
						
					
					
						commit
						12e041c8b3
					
				@ -818,6 +818,7 @@ void TListaMov_application::set_page(int file, int count)
 | 
				
			|||||||
      set_row (_n, "@88gdel@92g@d", FLD(LF_MOV,MOV_DATADOC));
 | 
					      set_row (_n, "@88gdel@92g@d", FLD(LF_MOV,MOV_DATADOC));
 | 
				
			||||||
      int annoese   = current_cursor()->curr(LF_MOV).get_int(MOV_ANNOES);
 | 
					      int annoese   = current_cursor()->curr(LF_MOV).get_int(MOV_ANNOES);
 | 
				
			||||||
      TDate data    = current_cursor()->curr(LF_MOV).get_date(MOV_DATAREG);
 | 
					      TDate data    = current_cursor()->curr(LF_MOV).get_date(MOV_DATAREG);
 | 
				
			||||||
 | 
					      TDate dcomp   = current_cursor()->curr(LF_MOV).get_date(MOV_DATACOMP);
 | 
				
			||||||
      TString16 reg = current_cursor()->curr(LF_MOV).get(MOV_REG);
 | 
					      TString16 reg = current_cursor()->curr(LF_MOV).get(MOV_REG);
 | 
				
			||||||
      int      anno = current_cursor()->curr(LF_MOV).get_int(MOV_ANNOIVA);
 | 
					      int      anno = current_cursor()->curr(LF_MOV).get_int(MOV_ANNOIVA);
 | 
				
			||||||
      char     prov = current_cursor()->curr(LF_MOV).get_char(MOV_PROVVIS);
 | 
					      char     prov = current_cursor()->curr(LF_MOV).get_char(MOV_PROVVIS);
 | 
				
			||||||
@ -830,14 +831,15 @@ void TListaMov_application::set_page(int file, int count)
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
      else if (_provvis == 2 && (prov == 'P' || prov == 'N'))
 | 
					      else if (_provvis == 2 && (prov == 'P' || prov == 'N'))
 | 
				
			||||||
        set_row (_n, "@103gMov.Provvisorio");
 | 
					        set_row (_n, "@103gMov.Provvisorio");
 | 
				
			||||||
 | 
					      //15/12/1995
 | 
				
			||||||
 | 
					      /*
 | 
				
			||||||
      if (ae != annoese)
 | 
					      if (ae != annoese)
 | 
				
			||||||
        if (_annoes == 0) //se non indicato l'anno nella maschera
 | 
					        if (_annoes == 0) //se non indicato l'anno nella maschera
 | 
				
			||||||
          set_row (_n, "@120gcomp @4n", FLD(LF_MOV,MOV_ANNOES));
 | 
					          set_row (_n, "@120gcomp @4n", FLD(LF_MOV,MOV_ANNOES));
 | 
				
			||||||
      /*
 | 
					      */
 | 
				
			||||||
         if (_scelta_stampa == 0)
 | 
					      if (data != dcomp)           
 | 
				
			||||||
         if (_stampa_anno_comp)
 | 
					        set_row (_n, "@119gc.%s", (const char*)dcomp.string(brief, '-'));
 | 
				
			||||||
         set_row (_n, "@127g@4n", FLD(LF_MOV,MOV_ANNOES)); 
 | 
					      //fine
 | 
				
			||||||
         */
 | 
					 | 
				
			||||||
      set_row (_n, "@130g@f", FLD(LF_MOV,MOV_STAMPATO));
 | 
					      set_row (_n, "@130g@f", FLD(LF_MOV,MOV_STAMPATO));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    break;
 | 
					    break;
 | 
				
			||||||
 | 
				
			|||||||
@ -91,12 +91,14 @@ bool TLiquidazione_app::user_create()
 | 
				
			|||||||
    // s o l minuscoli = registro bollato (setta B1)
 | 
					    // s o l minuscoli = registro bollato (setta B1)
 | 
				
			||||||
    _isregis    = (rcl == 'l' || rcl == 'L' || 
 | 
					    _isregis    = (rcl == 'l' || rcl == 'L' || 
 | 
				
			||||||
                   rcl == 'S' || rcl == 's'); // stampa per registri    
 | 
					                   rcl == 'S' || rcl == 's'); // stampa per registri    
 | 
				
			||||||
    _isfinal    = rcl == 'l' || rcl == 's'; // se l minuscolo, definitivo 
 | 
					    _isfinal    = rcl == 'l' || rcl == 's';   // se l minuscolo, definitivo 
 | 
				
			||||||
    nocalc      = rcl == 'S' || rcl == 's';
 | 
					    nocalc      = rcl == 'S' || rcl == 's';
 | 
				
			||||||
    printdate   = subj.get(4);
 | 
					    printdate   = subj.get(4);
 | 
				
			||||||
    filename    = subj.get(5);
 | 
					    filename    = subj.get(5);
 | 
				
			||||||
    headerlen   = subj.get_int(6);
 | 
					    headerlen   = subj.get_int(6);
 | 
				
			||||||
    is_header   = subj.items() == 7;
 | 
					    char rliq   = *(subj.get(7)); 
 | 
				
			||||||
 | 
					    _riepilogo  = rliq == 'X';
 | 
				
			||||||
 | 
					    is_header   = subj.items() == 8;
 | 
				
			||||||
    //modifica del 5/07/1995
 | 
					    //modifica del 5/07/1995
 | 
				
			||||||
    int f = printer().formlen(); 
 | 
					    int f = printer().formlen(); 
 | 
				
			||||||
    printer().formlen(f - headerlen);  
 | 
					    printer().formlen(f - headerlen);  
 | 
				
			||||||
@ -375,8 +377,12 @@ bool TLiquidazione_app::set_print(int)
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    break;
 | 
					    break;
 | 
				
			||||||
  case 2: // estrazione deleghe
 | 
					  case 2: // estrazione deleghe
 | 
				
			||||||
    _isprint = FALSE;     
 | 
					    _isprint = FALSE;
 | 
				
			||||||
    //build_ditte_sheet(all);
 | 
					    //12/12/1995
 | 
				
			||||||
 | 
					    _selected.reset();
 | 
				
			||||||
 | 
					    _ditte->check(-1, FALSE);
 | 
				
			||||||
 | 
					    //fine     
 | 
				
			||||||
 | 
					    build_ditte_sheet(all);
 | 
				
			||||||
    while (set_deleghe()) 
 | 
					    while (set_deleghe()) 
 | 
				
			||||||
    { 
 | 
					    { 
 | 
				
			||||||
      if (_calcall || _selected.ones() > 0l)
 | 
					      if (_calcall || _selected.ones() > 0l)
 | 
				
			||||||
@ -399,7 +405,11 @@ bool TLiquidazione_app::set_print(int)
 | 
				
			|||||||
  case 3: // calcolo acconto
 | 
					  case 3: // calcolo acconto
 | 
				
			||||||
    _isprint = TRUE;
 | 
					    _isprint = TRUE;
 | 
				
			||||||
    _month = 12; 
 | 
					    _month = 12; 
 | 
				
			||||||
    //build_ditte_sheet(all);    
 | 
					    //12/12/1995
 | 
				
			||||||
 | 
					    _selected.reset();
 | 
				
			||||||
 | 
					    _ditte->check(-1, FALSE);
 | 
				
			||||||
 | 
					    //fine
 | 
				
			||||||
 | 
					    build_ditte_sheet(all);    
 | 
				
			||||||
    real inf; real ina;  // cotale obbrobrio non fu da me cercato, ne' mai condiviso
 | 
					    real inf; real ina;  // cotale obbrobrio non fu da me cercato, ne' mai condiviso
 | 
				
			||||||
    while (set_acconto(inf, ina)) 
 | 
					    while (set_acconto(inf, ina)) 
 | 
				
			||||||
    { 
 | 
					    { 
 | 
				
			||||||
 | 
				
			|||||||
@ -215,6 +215,7 @@ class TLiquidazione_app : public TPrint_application
 | 
				
			|||||||
  bool       _isfinal;         // stampa definitiva (su registro bollato)
 | 
					  bool       _isfinal;         // stampa definitiva (su registro bollato)
 | 
				
			||||||
  bool       _isregis;         // stampa per registro       
 | 
					  bool       _isregis;         // stampa per registro       
 | 
				
			||||||
  bool       _isintr;          // calcola interessi per trimestrali
 | 
					  bool       _isintr;          // calcola interessi per trimestrali
 | 
				
			||||||
 | 
					  bool       _riepilogo;       // stampa riepilogo sul registro
 | 
				
			||||||
  tbc        _basecalc;        // tipo base di calcolo acconto
 | 
					  tbc        _basecalc;        // tipo base di calcolo acconto
 | 
				
			||||||
  TString    _freqviva;        // frequenza versamenti (M|T}
 | 
					  TString    _freqviva;        // frequenza versamenti (M|T}
 | 
				
			||||||
  long       _n_ditte;         // numero ditte
 | 
					  long       _n_ditte;         // numero ditte
 | 
				
			||||||
 | 
				
			|||||||
@ -148,7 +148,7 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
 | 
				
			|||||||
 
 | 
					 
 | 
				
			||||||
  look_lim(liq_month(month), TRUE);
 | 
					  look_lim(liq_month(month), TRUE);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  if (_isfinal && _lim->get_bool("B1") && _month != 13)  
 | 
					  if (_isfinal && _lim->get_bool("B1")) // && _month != 13)  
 | 
				
			||||||
    return TRUE;
 | 
					    return TRUE;
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  TConfig cnf(CONFIG_DITTA, "cg");
 | 
					  TConfig cnf(CONFIG_DITTA, "cg");
 | 
				
			||||||
@ -169,7 +169,7 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  // ricalcolo normale  
 | 
					  // ricalcolo normale  
 | 
				
			||||||
  // lim c'e' solo per i trimestri
 | 
					  // lim c'e' solo per i trimestri
 | 
				
			||||||
  bool ok   = _lim->get_bool("B0");
 | 
					  bool ok = _lim->get_bool("B0");
 | 
				
			||||||
  if (ok && !recalc) return TRUE; 
 | 
					  if (ok && !recalc) return TRUE; 
 | 
				
			||||||
  bool calc = (_recalc == ever || (_recalc == one && is_month_ok(month,_month)));
 | 
					  bool calc = (_recalc == ever || (_recalc == one && is_month_ok(month,_month)));
 | 
				
			||||||
  if (!calc && _recalc != never) calc = !ok;
 | 
					  if (!calc && _recalc != never) calc = !ok;
 | 
				
			||||||
@ -183,8 +183,10 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
 | 
				
			|||||||
  zero_firm(month);
 | 
					  zero_firm(month);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  // casini per stampa minchie in coda ai registri                           
 | 
					  // casini per stampa minchie in coda ai registri                           
 | 
				
			||||||
  bool riepliq = FALSE; 
 | 
					  //22/12/1995
 | 
				
			||||||
  bool stliq = FALSE;
 | 
					  bool riepliq = _isregis ? _riepilogo : FALSE; 
 | 
				
			||||||
 | 
					  bool stliq = TRUE;
 | 
				
			||||||
 | 
					  //fine
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  _nditte->save_status();  
 | 
					  _nditte->save_status();  
 | 
				
			||||||
  if (_nditte->is_first_match(LF_ATTIV))
 | 
					  if (_nditte->is_first_match(LF_ATTIV))
 | 
				
			||||||
@ -262,16 +264,18 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
 | 
				
			|||||||
          _pla->rewrite();
 | 
					          _pla->rewrite();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
                                          
 | 
					 | 
				
			||||||
        for (_reg->first(); _reg->good(); _reg->next())
 | 
					        for (_reg->first(); _reg->good(); _reg->next())
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          if (codatt == _reg->get("S8") || quater) 
 | 
					          //22/12/1995
 | 
				
			||||||
 | 
					          //if (codatt == _reg->get("S8") || quater) 
 | 
				
			||||||
 | 
					          if (codatt == _reg->get("S8"))          
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            if (!riepliq) riepliq = _reg->get_bool("B6");
 | 
					            //if (!riepliq) riepliq = _reg->get_bool("B6");
 | 
				
			||||||
            if (!stliq)   stliq   = _reg->get_bool("B7");
 | 
					            //if (!stliq)   stliq   = _reg->get_bool("B7");
 | 
				
			||||||
            if (_reg->get_int("I0") == 2) 
 | 
					            if (_reg->get_int("I0") == 2) 
 | 
				
			||||||
              if (!_isvent) _isvent = _reg->get_bool("B3"); 
 | 
					              if (!_isvent) _isvent = _reg->get_bool("B3"); 
 | 
				
			||||||
          }
 | 
					           //fine   
 | 
				
			||||||
 | 
					          }  
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        if (!_isregis)
 | 
					        if (!_isregis)
 | 
				
			||||||
@ -284,6 +288,10 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
 | 
				
			|||||||
          if (!update_att(month, cattiv) && stliq)
 | 
					          if (!update_att(month, cattiv) && stliq)
 | 
				
			||||||
            describe_error("Attivita' non ricalcolate: possibili errori",
 | 
					            describe_error("Attivita' non ricalcolate: possibili errori",
 | 
				
			||||||
                           codatt);        
 | 
					                           codatt);        
 | 
				
			||||||
 | 
					        //13/12/1995
 | 
				
			||||||
 | 
					        if (month == 13)
 | 
				
			||||||
 | 
					          recalc_annual(cattiv);
 | 
				
			||||||
 | 
					        //fine
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        // vediamo se c'e' qualcosa da raccontare
 | 
					        // vediamo se c'e' qualcosa da raccontare
 | 
				
			||||||
        gheravergot = _isannual || _isriepilogo;
 | 
					        gheravergot = _isannual || _isriepilogo;
 | 
				
			||||||
@ -316,9 +324,23 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
 | 
				
			|||||||
    _nditte->restore_status();
 | 
					    _nditte->restore_status();
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    // aggiorna le liquidazioni
 | 
					    // aggiorna le liquidazioni
 | 
				
			||||||
    if (calc || !recalc)
 | 
					    //13/12/1995. 
 | 
				
			||||||
 | 
					    //Concordato con Ferdinando che, visto che qualche
 | 
				
			||||||
 | 
					    //calcoluccio viene fatto anche in write_liq, essa
 | 
				
			||||||
 | 
					    //verra' sempre richiamata. 
 | 
				
			||||||
 | 
					    //if (calc || !recalc)
 | 
				
			||||||
 | 
					    //fine
 | 
				
			||||||
      if (is_month_ok_strict(month) || month == 13) 
 | 
					      if (is_month_ok_strict(month) || month == 13) 
 | 
				
			||||||
         write_liq(month, atts);
 | 
					         write_liq(month, atts);
 | 
				
			||||||
 | 
					         
 | 
				
			||||||
 | 
					    //5/12/1995
 | 
				
			||||||
 | 
					    //in ogni caso...
 | 
				
			||||||
 | 
					    if (_isfinal)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					     _lim->put("B1", "X");
 | 
				
			||||||
 | 
					     _lim->rewrite();
 | 
				
			||||||
 | 
					    }     
 | 
				
			||||||
 | 
					    //fine
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    // rimborso infraannuale
 | 
					    // rimborso infraannuale
 | 
				
			||||||
    _DescrItem* rimb_d = NULL;
 | 
					    _DescrItem* rimb_d = NULL;
 | 
				
			||||||
@ -360,7 +382,7 @@ bool TLiquidazione_app::update_att(int month, const char* codatt,
 | 
				
			|||||||
  // il ricalcolo e' FORZATO da _recalc messo a one
 | 
					  // il ricalcolo e' FORZATO da _recalc messo a one
 | 
				
			||||||
{ 
 | 
					{ 
 | 
				
			||||||
  look_plm(month, codatt, TRUE);
 | 
					  look_plm(month, codatt, TRUE);
 | 
				
			||||||
  bool ok   = _plm->get_bool("B0");
 | 
					  bool ok = _plm->get_bool("B0");
 | 
				
			||||||
  if (ok && !recalc) return TRUE; 
 | 
					  if (ok && !recalc) return TRUE; 
 | 
				
			||||||
  bool calc = _recalc == ever || (_recalc == one && is_month_ok(month,_month));
 | 
					  bool calc = _recalc == ever || (_recalc == one && is_month_ok(month,_month));
 | 
				
			||||||
  if (!calc && _recalc != never) calc = !ok; 
 | 
					  if (!calc && _recalc != never) calc = !ok; 
 | 
				
			||||||
@ -373,10 +395,13 @@ bool TLiquidazione_app::update_att(int month, const char* codatt,
 | 
				
			|||||||
    { 
 | 
					    { 
 | 
				
			||||||
      recalc_ventilation(month, codatt); 
 | 
					      recalc_ventilation(month, codatt); 
 | 
				
			||||||
      recalc_corrispettivi(month, codatt);  
 | 
					      recalc_corrispettivi(month, codatt);  
 | 
				
			||||||
    }
 | 
					    }  
 | 
				
			||||||
    if (month == 13)
 | 
					  //13/12/1995  
 | 
				
			||||||
     recalc_annual(codatt);
 | 
					  //  if (month == 13)
 | 
				
			||||||
 | 
					  //   recalc_annual(codatt);
 | 
				
			||||||
 | 
					  //fine
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
  return ok || calc;  
 | 
					  return ok || calc;  
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
     
 | 
					     
 | 
				
			||||||
@ -1156,7 +1181,9 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
 | 
				
			|||||||
  if (!_prorata.is_zero() && month != 13)
 | 
					  if (!_prorata.is_zero() && month != 13)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prorata = acquisti_iva * (_prorata / CENTO);
 | 
					    prorata = acquisti_iva * (_prorata / CENTO);
 | 
				
			||||||
    prorata.round(ROUND_MILLELIRE);  
 | 
					    //13/12/1995
 | 
				
			||||||
 | 
					    //prorata.round(ROUND_MILLELIRE);  
 | 
				
			||||||
 | 
					    //fine
 | 
				
			||||||
    acquisti_iva -= prorata;
 | 
					    acquisti_iva -= prorata;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  look_plm(month, codatt, TRUE);   
 | 
					  look_plm(month, codatt, TRUE);   
 | 
				
			||||||
@ -1284,7 +1311,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void TLiquidazione_app::write_liq(int month, const char* codatts)
 | 
					void TLiquidazione_app::write_liq(int month, const char* codatts)
 | 
				
			||||||
  // Calcolo liq. mensili e  liq. annuali
 | 
					  // Calcolo liq. mensili e  liq. annuali. Scrive le lim
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  TToken_string atts(codatts);
 | 
					  TToken_string atts(codatts);
 | 
				
			||||||
  const char* tmpatt;     
 | 
					  const char* tmpatt;     
 | 
				
			||||||
 | 
				
			|||||||
@ -19,10 +19,13 @@ void TLiquidazione_app::add_plafond(int month, const char* codatt, int type,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  if (intra) r1 += howmuch; 
 | 
					  if (intra) r1 += howmuch; 
 | 
				
			||||||
  else       r0 += howmuch;
 | 
					  else       r0 += howmuch;
 | 
				
			||||||
 | 
					  //06/12/1995
 | 
				
			||||||
 | 
					  /*
 | 
				
			||||||
  if (r2 < (r0+r1))
 | 
					  if (r2 < (r0+r1))
 | 
				
			||||||
    describe_error("Acquisti in eccesso rispetto al plafond disponibile",
 | 
					    describe_error("Acquisti in eccesso rispetto al plafond disponibile",
 | 
				
			||||||
                   att.cut(5));
 | 
					                   att.cut(5));
 | 
				
			||||||
 | 
					  */          
 | 
				
			||||||
 | 
					  //fine       
 | 
				
			||||||
  _ppa_r->put("R0",r0);
 | 
					  _ppa_r->put("R0",r0);
 | 
				
			||||||
  _ppa_r->put("R1",r1);
 | 
					  _ppa_r->put("R1",r1);
 | 
				
			||||||
  _ppa->rewrite();
 | 
					  _ppa->rewrite();
 | 
				
			||||||
 | 
				
			|||||||
@ -189,6 +189,7 @@ void TLiquidazione_app::describe_liqacc()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void TLiquidazione_app::describe_plafond(int month, const char* codatt)
 | 
					void TLiquidazione_app::describe_plafond(int month, const char* codatt)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					  TString att(codatt);
 | 
				
			||||||
  // prepara la descrizione del riepilogo da stampare e lo accoda
 | 
					  // prepara la descrizione del riepilogo da stampare e lo accoda
 | 
				
			||||||
  real t1, t2, t3;
 | 
					  real t1, t2, t3;
 | 
				
			||||||
  _DescrItem* d = new _DescrItem(PLAFOND);
 | 
					  _DescrItem* d = new _DescrItem(PLAFOND);
 | 
				
			||||||
@ -216,7 +217,13 @@ void TLiquidazione_app::describe_plafond(int month, const char* codatt)
 | 
				
			|||||||
    case 3: 
 | 
					    case 3: 
 | 
				
			||||||
      d->_r6 = t1; d->_r7 = t2; d->_r8 = t3; 
 | 
					      d->_r6 = t1; d->_r7 = t2; d->_r8 = t3; 
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
    }  
 | 
					    }
 | 
				
			||||||
 | 
					    //06/12/1995       
 | 
				
			||||||
 | 
					    if (t3.sign() < 0) t3 = ZERO;
 | 
				
			||||||
 | 
					    if (t3 < (t1+t2))
 | 
				
			||||||
 | 
					      describe_error("Acquisti in eccesso rispetto al plafond disponibile",
 | 
				
			||||||
 | 
					                      att.cut(5));
 | 
				
			||||||
 | 
					    //fine  
 | 
				
			||||||
  } // for tipo esenzione plafond 
 | 
					  } // for tipo esenzione plafond 
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  _descr_arr.add(d); 
 | 
					  _descr_arr.add(d); 
 | 
				
			||||||
@ -937,7 +944,10 @@ void TLiquidazione_app::describe_consistence(const char* codatt)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void TLiquidazione_app::describe_error(const char* err, const char* codatt)
 | 
					void TLiquidazione_app::describe_error(const char* err, const char* codatt)
 | 
				
			||||||
{                            
 | 
					{                            
 | 
				
			||||||
  if (!_isprint || !_canprint) return;
 | 
					  //if (!_isprint || !_canprint) return;
 | 
				
			||||||
 | 
					  //06/12/1995
 | 
				
			||||||
 | 
					  if (!_isprint || !_canprint || (_isregis && _isfinal)) return;
 | 
				
			||||||
 | 
					  //fine
 | 
				
			||||||
  _errors.add(new _ErrItem(err,codatt,_nditte->curr().get("CODDITTA")));
 | 
					  _errors.add(new _ErrItem(err,codatt,_nditte->curr().get("CODDITTA")));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1711,7 +1721,11 @@ bool TLiquidazione_app::set_annual(_DescrItem& d)
 | 
				
			|||||||
  // chiamata internamente a set_pims 
 | 
					  // chiamata internamente a set_pims 
 | 
				
			||||||
  bool ret = FALSE;
 | 
					  bool ret = FALSE;
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  int row = get_maxrow()+1; 
 | 
					  int row = get_maxrow()+1;   
 | 
				
			||||||
 | 
					  //14/12/1995. Correzione errore MI0952
 | 
				
			||||||
 | 
					  if (row == 1) row = 4;
 | 
				
			||||||
 | 
					  //fine
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
  if (d._f0 & IS_PRORATA)
 | 
					  if (d._f0 & IS_PRORATA)
 | 
				
			||||||
  {                                    
 | 
					  {                                    
 | 
				
			||||||
    // non lo ha stampato prima se annuale, perche' vladimiro il nefido
 | 
					    // non lo ha stampato prima se annuale, perche' vladimiro il nefido
 | 
				
			||||||
 | 
				
			|||||||
@ -1127,18 +1127,18 @@ bool CG4400_application::cerca_libro_gio(TString& datas, bool* good)
 | 
				
			|||||||
    if (tiporeg == 5) //libro giornale
 | 
					    if (tiporeg == 5) //libro giornale
 | 
				
			||||||
    {    
 | 
					    {    
 | 
				
			||||||
      const TDate& data = _tabreg->get_date("D3");
 | 
					      const TDate& data = _tabreg->get_date("D3");
 | 
				
			||||||
      if (data > _data_a)
 | 
					      if (data <= _data_a)
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
//        datas = format("%02/%02d/%4d", data.day(), data.month(), data.year());
 | 
					//        datas = format("%02/%02d/%4d", data.day(), data.month(), data.year());
 | 
				
			||||||
        datas = data;          // Meglio cosi'
 | 
					        datas = data;          // Meglio cosi'
 | 
				
			||||||
        *good = FALSE;
 | 
					        *good = FALSE;     
 | 
				
			||||||
        return FALSE;
 | 
					        return FALSE;
 | 
				
			||||||
      }
 | 
					      }                
 | 
				
			||||||
 | 
					      _tabreg->readat(rec);
 | 
				
			||||||
      return TRUE;
 | 
					      return TRUE;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  _tabreg->readat(rec);
 | 
					  _tabreg->readat(rec);
 | 
				
			||||||
  //return TRUE;
 | 
					 | 
				
			||||||
  return FALSE;
 | 
					  return FALSE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1689,6 +1689,7 @@ bool CG4400_application::compila_reg(const TMask& m)
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
      _tipo_reg = _tabreg->get_int("I0");
 | 
					      _tipo_reg = _tabreg->get_int("I0");
 | 
				
			||||||
      if (_tipo_reg == 1 || _tipo_reg == 2) //registro iva
 | 
					      if (_tipo_reg == 1 || _tipo_reg == 2) //registro iva
 | 
				
			||||||
 | 
					      //if (_tipo_reg == 1 || _tipo_reg == 2 || _tipo_reg == 3)
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        cod_lib_un = _tabreg->get("S6"); 
 | 
					        cod_lib_un = _tabreg->get("S6"); 
 | 
				
			||||||
        sca_vid    = _tabreg->get_date("D1");
 | 
					        sca_vid    = _tabreg->get_date("D1");
 | 
				
			||||||
@ -2419,7 +2420,8 @@ print_action CG4400_application::postprocess_page (int file, int counter)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  if (file == LF_MOV)
 | 
					  if (file == LF_MOV)
 | 
				
			||||||
  {   
 | 
					  {   
 | 
				
			||||||
    if (counter)  //dopo aver fatto un REPEAT_PAGE (cioe' dopo aver stampato le righe settate in set_page_tot_reg()), in pratica a rottura di mese o alla fine
 | 
					    if (counter)  //dopo aver fatto un REPEAT_PAGE (cioe' dopo aver stampato 
 | 
				
			||||||
 | 
					                  //le righe settate in set_page_tot_reg()), in pratica a rottura di mese o alla fine
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      reset_print(); 
 | 
					      reset_print(); 
 | 
				
			||||||
      if (_liquidazione) 
 | 
					      if (_liquidazione) 
 | 
				
			||||||
@ -2683,6 +2685,10 @@ bool CG4400_application::setta_mask(long i)
 | 
				
			|||||||
void CG4400_application::no_movimenti()
 | 
					void CG4400_application::no_movimenti()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  _mov_empty = TRUE;
 | 
					  _mov_empty = TRUE;
 | 
				
			||||||
 | 
					  /*
 | 
				
			||||||
 | 
					  if (_tipo_reg == 3) //registro riepilogativo
 | 
				
			||||||
 | 
					    stampa_riepilogativo(); //che lecca morale!!! 
 | 
				
			||||||
 | 
					  */
 | 
				
			||||||
  if (_liquidazione)
 | 
					  if (_liquidazione)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    int da, a;
 | 
					    int da, a;
 | 
				
			||||||
@ -2813,7 +2819,7 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        //non ci sono movimenti da stampare nel periodo richiesto!
 | 
					        //non ci sono movimenti da stampare nel periodo richiesto!
 | 
				
			||||||
        else no_movimenti(); 
 | 
					        else no_movimenti(); 
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        if (_tipo_stampa == 3 && _rif_vid)
 | 
					        if (_tipo_stampa == 3 && _rif_vid)
 | 
				
			||||||
        { 
 | 
					        { 
 | 
				
			||||||
          _intesta_vidi = TRUE;
 | 
					          _intesta_vidi = TRUE;
 | 
				
			||||||
@ -2980,11 +2986,27 @@ void CG4400_application::stampa_liq_mesi_succ()
 | 
				
			|||||||
      _datareg = TDate(1, m, _annoes);     // Meglio cosi'
 | 
					      _datareg = TDate(1, m, _annoes);     // Meglio cosi'
 | 
				
			||||||
      TFilename t;
 | 
					      TFilename t;
 | 
				
			||||||
      t.temp("iva");    
 | 
					      t.temp("iva");    
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
 | 
					      //06/12/1995                              
 | 
				
			||||||
 | 
					      /*
 | 
				
			||||||
      if (_tipo_stampa == 1)
 | 
					      if (_tipo_stampa == 1)
 | 
				
			||||||
        send_message('L',t, m);    //prima era S ma non andava bene!
 | 
					        send_message('L',t, m);    //prima era S ma non andava bene!
 | 
				
			||||||
      else send_message('l',t,m);  //prima era s
 | 
					      else send_message('l',t,m);  //prima era s
 | 
				
			||||||
      //TString80 nomef; nomef = t.path(); nomef << "\\" << t.name();
 | 
					      */
 | 
				
			||||||
      //if (fexist(nomef))
 | 
					      if (_scelta == B0_settato || _scelta == prosegui_stampa)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        if (_tipo_stampa == 1)
 | 
				
			||||||
 | 
					          send_message('S',t, m); 
 | 
				
			||||||
 | 
					        else send_message('s',t, m);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      else //_scelta == prosegui_cal_stampa
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        if (_tipo_stampa == 1)
 | 
				
			||||||
 | 
					           send_message('L', t, m);  
 | 
				
			||||||
 | 
					        else send_message('l', t, m);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      //fine
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
      if (fexist(t))
 | 
					      if (fexist(t))
 | 
				
			||||||
      {  
 | 
					      {  
 | 
				
			||||||
        _intesta_liq = TRUE;
 | 
					        _intesta_liq = TRUE;
 | 
				
			||||||
@ -3009,7 +3031,7 @@ void CG4400_application::send_message(char tipo, const TFilename& nome, int mese
 | 
				
			|||||||
    app = "cg4 -2 -C";
 | 
					    app = "cg4 -2 -C";
 | 
				
			||||||
  else app = "cg4 -2";
 | 
					  else app = "cg4 -2";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  TToken_string ss(10);
 | 
					  TToken_string ss(36);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  ss.add(_annoes);
 | 
					  ss.add(_annoes);
 | 
				
			||||||
  if (_tipo_riepilogativo == 'A' && mese == 12)
 | 
					  if (_tipo_riepilogativo == 'A' && mese == 12)
 | 
				
			||||||
@ -3019,8 +3041,10 @@ void CG4400_application::send_message(char tipo, const TFilename& nome, int mese
 | 
				
			|||||||
  ss.add(tipo);
 | 
					  ss.add(tipo);
 | 
				
			||||||
  ss.add(_data_stampa.string()); 
 | 
					  ss.add(_data_stampa.string()); 
 | 
				
			||||||
  ss.add(nome); 
 | 
					  ss.add(nome); 
 | 
				
			||||||
  ss.add(_size_header); 
 | 
					  ss.add(_size_header);
 | 
				
			||||||
  //ss.add("x");
 | 
					  if (_riep_liq)  
 | 
				
			||||||
 | 
					    ss.add('X');
 | 
				
			||||||
 | 
					  else ss.add(' ');  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  TMessage liq (app, "RCL", ss);
 | 
					  TMessage liq (app, "RCL", ss);
 | 
				
			||||||
  liq.send();
 | 
					  liq.send();
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										18
									
								
								cg/cg4400.h
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								cg/cg4400.h
									
									
									
									
									
								
							@ -52,10 +52,10 @@ class CG4400_application : public TPrintapp
 | 
				
			|||||||
  bool           _test;
 | 
					  bool           _test;
 | 
				
			||||||
  TRecnotype     _nrec;
 | 
					  TRecnotype     _nrec;
 | 
				
			||||||
  bool           _mov_empty, _stampa_ind_ditta, _stampa_tutti_i_registri, _auto_intraf, _stampa;
 | 
					  bool           _mov_empty, _stampa_ind_ditta, _stampa_tutti_i_registri, _auto_intraf, _stampa;
 | 
				
			||||||
  bool           _corrispettivi, _liquidazione, _riep_liq, _stampa_ind_comp, _esiste_riga_iva, _stampa_cred_pre; 
 | 
					  bool           _corrispettivi, _liquidazione, _stampa_ind_comp, _esiste_riga_iva, _stampa_cred_pre; 
 | 
				
			||||||
  bool           _rif_vid, _intesta_vidi, _intesta_liq, _stampa_data_reg, _ok_vidi;
 | 
					  bool           _rif_vid, _intesta_vidi, _intesta_liq, _stampa_data_reg, _ok_vidi;
 | 
				
			||||||
  bool           _sosp_imposta;
 | 
					  bool           _sosp_imposta, _riep_liq;
 | 
				
			||||||
  char           _frequiva, _tipo_riepilogativo;
 | 
					  char           _frequiva, _tipo_riepilogativo, _freq_riepilogo;
 | 
				
			||||||
  TDate          _data_da, _data_a, _data_stampa, _dataregp, _dataregs, _datareg;
 | 
					  TDate          _data_da, _data_a, _data_stampa, _dataregp, _dataregs, _datareg;
 | 
				
			||||||
  TDate          _u_data;
 | 
					  TDate          _u_data;
 | 
				
			||||||
  long           _n_ditte, _u_stampata, _primast, __firm, _uprotivap, _ditta;
 | 
					  long           _n_ditte, _u_stampata, _primast, __firm, _uprotivap, _ditta;
 | 
				
			||||||
@ -91,10 +91,11 @@ protected:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
 | 
					  //const char*   desc_attivita (const TString&);
 | 
				
			||||||
  const char*   desc_attivita ();
 | 
					  const char*   desc_attivita ();
 | 
				
			||||||
  const char*   tipo_attivita ();
 | 
					  const char*   tipo_attivita ();
 | 
				
			||||||
  const char*   descr_doc ();
 | 
					  const char*   descr_doc ();
 | 
				
			||||||
  const char*   descr_iva (const char *);     
 | 
					  const char*   descr_iva (const char*);     
 | 
				
			||||||
  TRectype&     ricerca_occ(const char*);
 | 
					  TRectype&     ricerca_occ(const char*);
 | 
				
			||||||
  TRectype&     ricerca_cf (char, long);
 | 
					  TRectype&     ricerca_cf (char, long);
 | 
				
			||||||
  TRectype&     look_comuni(const char*);
 | 
					  TRectype&     look_comuni(const char*);
 | 
				
			||||||
@ -106,7 +107,9 @@ public:
 | 
				
			|||||||
  bool          compila_reg(const TMask&);
 | 
					  bool          compila_reg(const TMask&);
 | 
				
			||||||
  bool          compila_lib();
 | 
					  bool          compila_lib();
 | 
				
			||||||
  messaggio     controlla_liquidazione();
 | 
					  messaggio     controlla_liquidazione();
 | 
				
			||||||
  messaggio     controlla_b0();
 | 
					  messaggio     controlla_b0(); 
 | 
				
			||||||
 | 
					  bool          is_mese_ok(int,int);
 | 
				
			||||||
 | 
					  bool          is_trim(int);
 | 
				
			||||||
  bool          controlla_mov();
 | 
					  bool          controlla_mov();
 | 
				
			||||||
  bool          stampo_liquidazione(int); 
 | 
					  bool          stampo_liquidazione(int); 
 | 
				
			||||||
  bool          ventilazione(const char*);
 | 
					  bool          ventilazione(const char*);
 | 
				
			||||||
@ -117,12 +120,13 @@ public:
 | 
				
			|||||||
  bool          stampa_datareg();
 | 
					  bool          stampa_datareg();
 | 
				
			||||||
  bool          stampa_registri_IVA(const TMask&);
 | 
					  bool          stampa_registri_IVA(const TMask&);
 | 
				
			||||||
  bool          look_lia(long ditta = 0l);
 | 
					  bool          look_lia(long ditta = 0l);
 | 
				
			||||||
  bool          ricerca_mese(TString&,TString&,int,int,TMask_field&); 
 | 
					  bool          stampa_riepilogo(int);
 | 
				
			||||||
 | 
					  void          stampa_pims(TPrintrow&, const TString&, int, int);
 | 
				
			||||||
  void          set_choice_limits(TMask&);
 | 
					  void          set_choice_limits(TMask&);
 | 
				
			||||||
  void          build_ditte_sheet(); 
 | 
					  void          build_ditte_sheet(); 
 | 
				
			||||||
  void          cerca_reg(const TString&, byte*);
 | 
					  void          cerca_reg(const TString&, byte*);
 | 
				
			||||||
  void          set_page_tot_reg();
 | 
					  void          set_page_tot_reg();
 | 
				
			||||||
  void          send_message(char, const TFilename&,int);
 | 
					  void          send_message(char,const TFilename&,int);
 | 
				
			||||||
  void          aggiorna_reg(const bool aggiorna_vidi);
 | 
					  void          aggiorna_reg(const bool aggiorna_vidi);
 | 
				
			||||||
  void          aggiorna_lib();
 | 
					  void          aggiorna_lib();
 | 
				
			||||||
  void          calcola_progressivi(); 
 | 
					  void          calcola_progressivi(); 
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user