/*****************************************************************                            
  TDate d(TODAY);                
  TString16 dat, v15;               
  bool sposta_pag = FALSE;
  if (d == TDate("14-09-1995") || d == TDate("15-09-1995"))
  {
    for (_rver->first(); !_rver->eof(); _rver->next())
    {
      dat = _rver->get("DATAVERS");
      v15 = _rver->get("VERS1015");
      dat.trim();
      v15.trim();
      if (dat.empty() && v15.empty()) 
      {
        sposta_pag = TRUE;
        _rver->remove();
      }
    }                      
    if (sposta_pag)       
    {
    for (_rpag->first(); !_rpag->eof(); _rpag->next())
    {
      const long nvers = _rpag->get_long("NUMVERS");
      if (nvers <= 0L) continue;
      TSchedaP sch(_rpag->curr());
      _rver->zero();
      _rver->put(VER_CODDITTA, sch.codditta());  
      _rver->put(VER_TIPOA,    sch.tipoa());
      _rver->put(VER_CODANAGR, sch.codanagr());
      _rver->put(VER_NPROG,    sch.nprog());
      _rver->put(VER_NRIGA,  (long)nvers);
      const int rt = _rver->read();
      if (rt == NOERR)
        continue;  // vuol dire che c'e' il versamento
      else 
      {
        _rver->zero();
        _rver->put(VER_CODDITTA, sch.codditta());  
        _rver->put(VER_TIPOA,    sch.tipoa());
        _rver->put(VER_CODANAGR, sch.codanagr());
        _rver->put(VER_NPROG,    sch.nprog());
        
        _rver->read();
        
        TSchedaP sch2 (_rver->curr());
        if (sch2 == sch)  // Se sono ancora nella stessa scheda
        {
          int nriga = _rver->get_int("NRIGA");
          if (nriga == nvers)
            continue;   //  e' il versamento giusto
          if (nriga > 10)  // sicuramente errata
          {
            nriga  = 1;
            _rver->remove();
            _rver->put("NRIGA", (long)nriga);
            _rver->put("NUMVERS", (long)nriga);
            const int rc1 = _rver->write();
            _rpag->put("NUMVERS", (long)nriga);
            const int rc2 = _rpag->rewrite();
          }
        }
      }
    }
    }
  }
***************************************************************/
  
