Riportata la versione 98.01.01pl000 sul main trunk
git-svn-id: svn://10.65.10.50/trunk@6153 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									ba17e909b2
								
							
						
					
					
						commit
						1c2ee5aafb
					
				@ -38,6 +38,12 @@ struct direct
 | 
				
			|||||||
#define Dir_file     "dir.gen"
 | 
					#define Dir_file     "dir.gen"
 | 
				
			||||||
#define Trc_file     "trc.gen"
 | 
					#define Trc_file     "trc.gen"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool movable_file(int file)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  return file == LF_PCON || file == LF_CLIFO || file == LF_CAUSALI ||
 | 
				
			||||||
 | 
					         file == LF_RCAUSALI || file == LF_CFVEN || file == LF_INDSP;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TManutenzione_app : public TApplication
 | 
					class TManutenzione_app : public TApplication
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  TDir_sheet* _browse;
 | 
					  TDir_sheet* _browse;
 | 
				
			||||||
@ -389,9 +395,11 @@ bool TManutenzione_app::create() // initvar e arrmask
 | 
				
			|||||||
      dump_trc(dir,des_too,modules);
 | 
					      dump_trc(dir,des_too,modules);
 | 
				
			||||||
      return FALSE;
 | 
					      return FALSE;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					#ifndef _DEMO_    
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      if (!set_firm())
 | 
					      if (!set_firm())
 | 
				
			||||||
        return FALSE;
 | 
					        return FALSE;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
   load_des();
 | 
					   load_des();
 | 
				
			||||||
   
 | 
					   
 | 
				
			||||||
   
 | 
					   
 | 
				
			||||||
@ -900,7 +908,7 @@ void TManutenzione_app::update_dir()
 | 
				
			|||||||
    d.get(i, _nolock, _nordir, _sysdirop);
 | 
					    d.get(i, _nolock, _nordir, _sysdirop);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    bool cmn_file = FALSE;
 | 
					    bool cmn_file = FALSE;
 | 
				
			||||||
    bool valid_file = i == LF_PCON || i == LF_CLIFO || i == LF_CAUSALI || i == LF_RCAUSALI;
 | 
					    bool valid_file = movable_file(i);
 | 
				
			||||||
    if (!is_com && valid_file  && d.is_com())
 | 
					    if (!is_com && valid_file  && d.is_com())
 | 
				
			||||||
         cmn_file = TRUE; // Salta in questo caso:
 | 
					         cmn_file = TRUE; // Salta in questo caso:
 | 
				
			||||||
                          // sto aggiornando le ditte, 
 | 
					                          // sto aggiornando le ditte, 
 | 
				
			||||||
@ -1011,6 +1019,13 @@ void TManutenzione_app::update_dir()
 | 
				
			|||||||
        else
 | 
					        else
 | 
				
			||||||
          strcpy((char *) d.des(), ds.des());
 | 
					          strcpy((char *) d.des(), ds.des());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    if (is_com && valid_file && d.name()[0] == '$') 
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      TString name(d.name());
 | 
				
			||||||
 | 
					      name[0] = '%';
 | 
				
			||||||
 | 
					      d.set_name(name);
 | 
				
			||||||
 | 
					      towrite = TRUE;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    if (towrite)
 | 
					    if (towrite)
 | 
				
			||||||
      d.put(i, _nordir, _sysdirop);
 | 
					      d.put(i, _nordir, _sysdirop);
 | 
				
			||||||
//    d.get(i);
 | 
					//    d.get(i);
 | 
				
			||||||
@ -1098,8 +1113,7 @@ void TManutenzione_app::convert_dir()
 | 
				
			|||||||
        // I files LF_PCON, LF_CAUS, LF_RCAUS, LF_CLIFO, LF_CFVEN, LF_INDSPED
 | 
					        // I files LF_PCON, LF_CAUS, LF_RCAUS, LF_CLIFO, LF_CFVEN, LF_INDSPED
 | 
				
			||||||
        // vanno creati comunque nel direttorio COM, vuoti, (se non esistono gia').     
 | 
					        // vanno creati comunque nel direttorio COM, vuoti, (se non esistono gia').     
 | 
				
			||||||
        if (is_com && !to_create)
 | 
					        if (is_com && !to_create)
 | 
				
			||||||
          if (i == LF_TAB || i == LF_INDSP || i == LF_CLIFO ||
 | 
					          if (movable_file(i))
 | 
				
			||||||
               i == LF_PCON || i == LF_CAUSALI || i == LF_RCAUSALI)
 | 
					 | 
				
			||||||
             to_create = TRUE;
 | 
					             to_create = TRUE;
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        if (to_create && has_module(module, CHK_DONGLE))
 | 
					        if (to_create && has_module(module, CHK_DONGLE))
 | 
				
			||||||
@ -1150,6 +1164,9 @@ void TManutenzione_app::convert_dir()
 | 
				
			|||||||
      TTrec r(rs);
 | 
					      TTrec r(rs);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      r.zero();
 | 
					      r.zero();
 | 
				
			||||||
 | 
					      d.get(i, _nolock, _nordir, _sysdirop);
 | 
				
			||||||
 | 
					      d.set_len(r.len());
 | 
				
			||||||
 | 
					      d.put(i, _nordir, _sysdirop);
 | 
				
			||||||
      r.put(i);
 | 
					      r.put(i);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
@ -338,6 +338,7 @@ void TRec_sheet::edit()
 | 
				
			|||||||
        TToken_string& s = f2.row(i);
 | 
					        TToken_string& s = f2.row(i);
 | 
				
			||||||
        _rec->update_keydef(i, s);
 | 
					        _rec->update_keydef(i, s);
 | 
				
			||||||
      }    
 | 
					      }    
 | 
				
			||||||
 | 
					      _dir->set_len(_rec->len());
 | 
				
			||||||
      save();
 | 
					      save();
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -173,7 +173,7 @@ bool TDongle::login(bool test_all_keys)
 | 
				
			|||||||
                if (BITTEST(parola, b))             
 | 
					                if (BITTEST(parola, b))             
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                  const word bit = i * 12 + j * 16 + b;
 | 
					                  const word bit = i * 12 + j * 16 + b;
 | 
				
			||||||
                  _module.set(bit);
 | 
					                  _module.set(bit + 1);
 | 
				
			||||||
                }  
 | 
					                }  
 | 
				
			||||||
              }  
 | 
					              }  
 | 
				
			||||||
            }  
 | 
					            }  
 | 
				
			||||||
@ -290,7 +290,7 @@ bool TDongle::burn()
 | 
				
			|||||||
  write_octect(60, data);
 | 
					  write_octect(60, data);
 | 
				
			||||||
  _last_update = today;
 | 
					  _last_update = today;
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  word module = 0;
 | 
					  word module = 1;
 | 
				
			||||||
  for (int octect = 0; octect < 3; octect++)  
 | 
					  for (int octect = 0; octect < 3; octect++)  
 | 
				
			||||||
  {                                       
 | 
					  {                                       
 | 
				
			||||||
    for(int parola = 0; parola < 3; parola++)  
 | 
					    for(int parola = 0; parola < 3; parola++)  
 | 
				
			||||||
 | 
				
			|||||||
@ -487,7 +487,7 @@ bool TModule_mask::file_handler(TMask_field& f, KEY k)
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
      else
 | 
					      else
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        return f.error_box("Il file deve trovarsi nel perrcorso %s", 
 | 
					        return f.error_box("Il file deve trovarsi nel percorso %s", 
 | 
				
			||||||
                           start.get_buffer());
 | 
					                           start.get_buffer());
 | 
				
			||||||
      }  
 | 
					      }  
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -693,6 +693,7 @@ class TFascicolator_mask : public TMask
 | 
				
			|||||||
{ 
 | 
					{ 
 | 
				
			||||||
protected:    
 | 
					protected:    
 | 
				
			||||||
  static bool sheet_notify(TSheet_field& f, int row, KEY k);
 | 
					  static bool sheet_notify(TSheet_field& f, int row, KEY k);
 | 
				
			||||||
 | 
					  static bool confirm_handler(TMask_field& f, KEY k);
 | 
				
			||||||
  static bool list_handler(TMask_field& f, KEY k);
 | 
					  static bool list_handler(TMask_field& f, KEY k);
 | 
				
			||||||
  static bool save_handler(TMask_field& f, KEY k);
 | 
					  static bool save_handler(TMask_field& f, KEY k);
 | 
				
			||||||
  static bool import_export_handler(TMask_field& f, KEY k);
 | 
					  static bool import_export_handler(TMask_field& f, KEY k);
 | 
				
			||||||
@ -741,7 +742,7 @@ bool TFascicolator_mask::list_handler(TMask_field& f, KEY k)
 | 
				
			|||||||
  return TRUE;
 | 
					  return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool TFascicolator_mask::save_handler(TMask_field& f, KEY k)
 | 
					bool TFascicolator_mask::confirm_handler(TMask_field& f, KEY k)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  if (k == K_SPACE)
 | 
					  if (k == K_SPACE)
 | 
				
			||||||
  {                       
 | 
					  {                       
 | 
				
			||||||
@ -756,7 +757,31 @@ bool TFascicolator_mask::save_handler(TMask_field& f, KEY k)
 | 
				
			|||||||
      ini.set("Moduli", m.get(S_EXTERN));
 | 
					      ini.set("Moduli", m.get(S_EXTERN));
 | 
				
			||||||
      ini.set("PreProcess", m.get(S_PREPROCESS));
 | 
					      ini.set("PreProcess", m.get(S_PREPROCESS));
 | 
				
			||||||
      ini.set("PostProcess", m.get(S_POSTPROCESS));
 | 
					      ini.set("PostProcess", m.get(S_POSTPROCESS));
 | 
				
			||||||
 | 
					      // sottomoduli
 | 
				
			||||||
 | 
					      TString16 submodule=module;
 | 
				
			||||||
 | 
					      submodule<<'0';
 | 
				
			||||||
 | 
					      for (int i=0; i <=9; i++)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        submodule[2]='0'+i;
 | 
				
			||||||
 | 
					        if (ini.set_paragraph(submodule))
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          ini.set("Versione", m.get(S_VERSION));
 | 
				
			||||||
 | 
					          ini.set("Patch", m.get(S_PATCHLEVEL));
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }  
 | 
				
			||||||
 | 
					  return TRUE;
 | 
				
			||||||
 | 
					}  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool TFascicolator_mask::save_handler(TMask_field& f, KEY k)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  if (k == K_SPACE)
 | 
				
			||||||
 | 
					  {                       
 | 
				
			||||||
 | 
					    confirm_handler(f, K_SPACE);
 | 
				
			||||||
 | 
					    TMask& m = f.mask();
 | 
				
			||||||
 | 
					    const TString& module = m.get(S_MODULE);
 | 
				
			||||||
    const bool agg = f.dlg() == S_SAVEAGG;
 | 
					    const bool agg = f.dlg() == S_SAVEAGG;
 | 
				
			||||||
    TFascicolator_mask& fm = (TFascicolator_mask&)m.get_sheet()->mask();
 | 
					    TFascicolator_mask& fm = (TFascicolator_mask&)m.get_sheet()->mask();
 | 
				
			||||||
    fm.zip_module(module, agg, m.get_int(S_PATCHLEVEL));
 | 
					    fm.zip_module(module, agg, m.get_int(S_PATCHLEVEL));
 | 
				
			||||||
@ -764,6 +789,7 @@ bool TFascicolator_mask::save_handler(TMask_field& f, KEY k)
 | 
				
			|||||||
  return TRUE;
 | 
					  return TRUE;
 | 
				
			||||||
}  
 | 
					}  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool TFascicolator_mask::import_export_handler(TMask_field& f, KEY k)
 | 
					bool TFascicolator_mask::import_export_handler(TMask_field& f, KEY k)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  if (k == K_SPACE)
 | 
					  if (k == K_SPACE)
 | 
				
			||||||
@ -1093,8 +1119,9 @@ long TFascicolator_mask::find_signature(const TFilename& filename, const char* s
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      compare = 0;
 | 
					      if (compare > 0)
 | 
				
			||||||
        infile.seekg(position+1, ios::beg);
 | 
					        infile.seekg(position+1, ios::beg);
 | 
				
			||||||
 | 
					      compare = 0;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }  
 | 
					  }  
 | 
				
			||||||
  return found ? position : -1;
 | 
					  return found ? position : -1;
 | 
				
			||||||
@ -1108,7 +1135,7 @@ bool TFascicolator_mask::set_version_info(const TFilename& filename,
 | 
				
			|||||||
  long position = find_signature(filename, str);
 | 
					  long position = find_signature(filename, str);
 | 
				
			||||||
  if (position > 0)
 | 
					  if (position > 0)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    ofstream outfile(filename, ios::out || ios::nocreate | ios::binary);
 | 
					    fstream outfile(filename, ios::in | ios::out | ios::nocreate | ios::binary);
 | 
				
			||||||
    position += str.len();
 | 
					    position += str.len();
 | 
				
			||||||
    outfile.seekp(position);
 | 
					    outfile.seekp(position);
 | 
				
			||||||
    if (outfile.good())
 | 
					    if (outfile.good())
 | 
				
			||||||
@ -1117,8 +1144,17 @@ bool TFascicolator_mask::set_version_info(const TFilename& filename,
 | 
				
			|||||||
      ini.version_info(module, year, release, tag, patch);
 | 
					      ini.version_info(module, year, release, tag, patch);
 | 
				
			||||||
      checksum = year + release + tag + patch;
 | 
					      checksum = year + release + tag + patch;
 | 
				
			||||||
      str.format("%04d.%02d.%02d.%03d.%04d", year, release, tag, patch, checksum);
 | 
					      str.format("%04d.%02d.%02d.%03d.%04d", year, release, tag, patch, checksum);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      TString oldfirm("XXXX.XX.XX.XXX.XXXX");
 | 
				
			||||||
 | 
					      outfile.read(oldfirm.get_buffer(),19);
 | 
				
			||||||
 | 
					      if (oldfirm!=str)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        outfile.seekp(position);
 | 
				
			||||||
        outfile.write(str, str.len());  
 | 
					        outfile.write(str, str.len());  
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
      ok = outfile.good();      
 | 
					      ok = outfile.good();      
 | 
				
			||||||
 | 
					      if (!ok)
 | 
				
			||||||
 | 
					        error_box("Error writing signature in %s error n. %d", (const char *) filename, errno);
 | 
				
			||||||
    }  
 | 
					    }  
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  return ok;
 | 
					  return ok;
 | 
				
			||||||
@ -1160,6 +1196,8 @@ bool TFascicolator_mask::zip_module(const TString& main_module, bool agg, int pa
 | 
				
			|||||||
  
 | 
					  
 | 
				
			||||||
  TProgind pi(arr.items(), msg, TRUE, TRUE); 
 | 
					  TProgind pi(arr.items(), msg, TRUE, TRUE); 
 | 
				
			||||||
  TFilename cmd;
 | 
					  TFilename cmd;
 | 
				
			||||||
 | 
					  struct _stat info;
 | 
				
			||||||
 | 
					  unsigned long lasttime=0;
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  FOR_EACH_ARRAY_ROW_BACK(arr, i, row)
 | 
					  FOR_EACH_ARRAY_ROW_BACK(arr, i, row)
 | 
				
			||||||
  {                    
 | 
					  {                    
 | 
				
			||||||
@ -1172,12 +1210,16 @@ bool TFascicolator_mask::zip_module(const TString& main_module, bool agg, int pa
 | 
				
			|||||||
    cmd = row->get(0);
 | 
					    cmd = row->get(0);
 | 
				
			||||||
    if (cmd.exist())
 | 
					    if (cmd.exist())
 | 
				
			||||||
    {                   
 | 
					    {                   
 | 
				
			||||||
 | 
					      // Aggiungo il nome corrente alla lista dei files da compattare
 | 
				
			||||||
 | 
					      fileh << cmd << '\n';      
 | 
				
			||||||
      if (stricmp(cmd.ext(), "exe") == 0)
 | 
					      if (stricmp(cmd.ext(), "exe") == 0)
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        TString16 submod = row->get(2);
 | 
					        TString16 submod = row->get(2);
 | 
				
			||||||
        submod.cut(2);
 | 
					        submod.cut(2);
 | 
				
			||||||
        set_version_info(cmd, ini, submod);  
 | 
					        set_version_info(cmd, ini, submod);  
 | 
				
			||||||
      }  
 | 
					      }  
 | 
				
			||||||
 | 
					      _stat((const char *)cmd,&info);
 | 
				
			||||||
 | 
					      lasttime = max(lasttime,info.st_mtime);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@ -1190,11 +1232,25 @@ bool TFascicolator_mask::zip_module(const TString& main_module, bool agg, int pa
 | 
				
			|||||||
        break;
 | 
					        break;
 | 
				
			||||||
      } 
 | 
					      } 
 | 
				
			||||||
    } 
 | 
					    } 
 | 
				
			||||||
    // Aggiungo il nome corrente alla lista dei files da compattare
 | 
					 | 
				
			||||||
    fileh << cmd << '\n';
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  fileh.close();
 | 
					  fileh.close();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Se non specifico un path ho gia' finito
 | 
				
			||||||
 | 
					  const TFilename path = get(F_DISKPATH);
 | 
				
			||||||
 | 
					  if (path.blank())
 | 
				
			||||||
 | 
					    return TRUE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  TFilename zipfile = path;
 | 
				
			||||||
 | 
					  zipfile.add(archivio.name());
 | 
				
			||||||
 | 
					  zipfile.ext("");
 | 
				
			||||||
 | 
					  zipfile << '1';
 | 
				
			||||||
 | 
					  zipfile.ext("zip");
 | 
				
			||||||
 | 
					  if (zipfile.exist())
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    _stat((const char *)zipfile,&info);
 | 
				
			||||||
 | 
					    if (lasttime   <= info.st_mtime)
 | 
				
			||||||
 | 
					      aborted = !yesno_box("Il file %s risulta già essere aggiornato. Vuoi rigenerarlo comunque?",(const char *)zipfile);
 | 
				
			||||||
 | 
					  } 
 | 
				
			||||||
  if (!aborted)
 | 
					  if (!aborted)
 | 
				
			||||||
    zip_file(archivio, filelist);    // Compatto gli eventuali ultimi rimasti
 | 
					    zip_file(archivio, filelist);    // Compatto gli eventuali ultimi rimasti
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1211,11 +1267,6 @@ bool TFascicolator_mask::zip_module(const TString& main_module, bool agg, int pa
 | 
				
			|||||||
  ini.set("Dischi", disks, main_module);     // Aggiorna install.ini
 | 
					  ini.set("Dischi", disks, main_module);     // Aggiorna install.ini
 | 
				
			||||||
  ini.export_paragraph(main_module, sommario); // Aggiorna sommario
 | 
					  ini.export_paragraph(main_module, sommario); // Aggiorna sommario
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
  // Se non specifico un path ho gia' finito
 | 
					 | 
				
			||||||
  const TFilename path = get(F_DISKPATH);
 | 
					 | 
				
			||||||
  if (path.blank())
 | 
					 | 
				
			||||||
    return TRUE;
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
  const char drive = toupper(path[0]);  
 | 
					  const char drive = toupper(path[0]);  
 | 
				
			||||||
  const bool floppy = (GetDriveType(drive - 'A') == DRIVE_REMOVABLE) && (path[1] == ':');
 | 
					  const bool floppy = (GetDriveType(drive - 'A') == DRIVE_REMOVABLE) && (path[1] == ':');
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@ -1253,6 +1304,7 @@ TFascicolator_mask::TFascicolator_mask()
 | 
				
			|||||||
  s.set_notify(sheet_notify);
 | 
					  s.set_notify(sheet_notify);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  TMask& m = s.sheet_mask();
 | 
					  TMask& m = s.sheet_mask();
 | 
				
			||||||
 | 
					  m.set_handler(DLG_OK, confirm_handler);
 | 
				
			||||||
  m.set_handler(S_LIST, list_handler);
 | 
					  m.set_handler(S_LIST, list_handler);
 | 
				
			||||||
  m.set_handler(S_SAVE, save_handler);
 | 
					  m.set_handler(S_SAVE, save_handler);
 | 
				
			||||||
  m.set_handler(S_SAVEAGG, save_handler);
 | 
					  m.set_handler(S_SAVEAGG, save_handler);
 | 
				
			||||||
 | 
				
			|||||||
@ -7,6 +7,7 @@
 | 
				
			|||||||
#include <progind.h>
 | 
					#include <progind.h>
 | 
				
			||||||
#include <sheet.h>
 | 
					#include <sheet.h>
 | 
				
			||||||
#include <utility.h>
 | 
					#include <utility.h>
 | 
				
			||||||
 | 
					#include <defmask.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "ba1.h"
 | 
					#include "ba1.h"
 | 
				
			||||||
#include "ba1500.h"
 | 
					#include "ba1500.h"
 | 
				
			||||||
@ -60,6 +61,7 @@ class TInstaller_mask : public TArray_sheet
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
protected: // TSheet
 | 
					protected: // TSheet
 | 
				
			||||||
  virtual bool on_key(KEY key);
 | 
					  virtual bool on_key(KEY key);
 | 
				
			||||||
 | 
					  static bool tutti_handler(TMask_field& f, KEY k);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
protected:
 | 
					protected:
 | 
				
			||||||
  static bool path_handler(TMask_field& fld, KEY key);
 | 
					  static bool path_handler(TMask_field& fld, KEY key);
 | 
				
			||||||
@ -67,6 +69,7 @@ protected:
 | 
				
			|||||||
  static bool install_handler(TMask_field& fld, KEY key);
 | 
					  static bool install_handler(TMask_field& fld, KEY key);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  bool add_module(TConfig& ini, const TString& module, bool patch);
 | 
					  bool add_module(TConfig& ini, const TString& module, bool patch);
 | 
				
			||||||
 | 
					  bool add_header(TConfig& ini, const TString& module, bool patch);
 | 
				
			||||||
  int sort_modules();
 | 
					  int sort_modules();
 | 
				
			||||||
  void update_version();
 | 
					  void update_version();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -111,6 +114,22 @@ bool TInstaller_mask::add_module(TConfig& ini, const TString& module, bool patch
 | 
				
			|||||||
  return ok;
 | 
					  return ok;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Copia nello sheet i dati di un modulo prendendoli da un .ini
 | 
				
			||||||
 | 
					bool TInstaller_mask::add_header(TConfig& ini, const TString& module, bool patch)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  ini.write_protect();
 | 
				
			||||||
 | 
					  bool ok = ini.set_paragraph(module);
 | 
				
			||||||
 | 
					  if (ok)
 | 
				
			||||||
 | 
					  {   
 | 
				
			||||||
 | 
					    TToken_string row;
 | 
				
			||||||
 | 
					    row = " ";   // Not selected
 | 
				
			||||||
 | 
					    row.add(ini.get("Descrizione"));
 | 
				
			||||||
 | 
					    row.add(ini.get("  "));
 | 
				
			||||||
 | 
					    enable_row(add(row),FALSE);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  return ok;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int compare_modules(const TObject** o1, const TObject** o2)
 | 
					static int compare_modules(const TObject** o1, const TObject** o2)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  TToken_string& ts1 = *(TToken_string*)(*o1);
 | 
					  TToken_string& ts1 = *(TToken_string*)(*o1);
 | 
				
			||||||
@ -128,7 +147,7 @@ static int compare_modules(const TObject** o1, const TObject** o2)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
int TInstaller_mask::sort_modules()
 | 
					int TInstaller_mask::sort_modules()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  rows_array().TArray::sort(compare_modules);
 | 
					  //rows_array().TArray::sort(compare_modules);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  TString16 dis;
 | 
					  TString16 dis;
 | 
				
			||||||
  const int tot = int(items());
 | 
					  const int tot = int(items());
 | 
				
			||||||
@ -136,6 +155,8 @@ int TInstaller_mask::sort_modules()
 | 
				
			|||||||
  {                                  
 | 
					  {                                  
 | 
				
			||||||
    const bool patch = row(r).get_char(9) > ' ';
 | 
					    const bool patch = row(r).get_char(9) > ' ';
 | 
				
			||||||
    const char* mod = row(r).get(2);
 | 
					    const char* mod = row(r).get(2);
 | 
				
			||||||
 | 
					    if (*mod != ' ') // is not an header...
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
      if (patch)
 | 
					      if (patch)
 | 
				
			||||||
      {   
 | 
					      {   
 | 
				
			||||||
        if (dis == mod)
 | 
					        if (dis == mod)
 | 
				
			||||||
@ -144,6 +165,7 @@ int TInstaller_mask::sort_modules()
 | 
				
			|||||||
      else             
 | 
					      else             
 | 
				
			||||||
        dis = mod;      
 | 
					        dis = mod;      
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  return tot;
 | 
					  return tot;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -153,6 +175,8 @@ void TInstaller_mask::update_version()
 | 
				
			|||||||
  
 | 
					  
 | 
				
			||||||
  TString_array& array = rows_array();
 | 
					  TString_array& array = rows_array();
 | 
				
			||||||
  FOR_EACH_ARRAY_ROW_BACK(array, m, row)
 | 
					  FOR_EACH_ARRAY_ROW_BACK(array, m, row)
 | 
				
			||||||
 | 
					  {                               
 | 
				
			||||||
 | 
					    if (*row->get(2) != ' ')
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      const TString16 module = row->get(2);
 | 
					      const TString16 module = row->get(2);
 | 
				
			||||||
      ini.set_paragraph(module);
 | 
					      ini.set_paragraph(module);
 | 
				
			||||||
@ -163,6 +187,7 @@ void TInstaller_mask::update_version()
 | 
				
			|||||||
      row->add(ini.get("Patch"), 7);
 | 
					      row->add(ini.get("Patch"), 7);
 | 
				
			||||||
      row->add(ini.get("Data"), 8);
 | 
					      row->add(ini.get("Data"), 8);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  force_update();
 | 
					  force_update();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -191,10 +216,16 @@ bool TInstaller_mask::autoload()
 | 
				
			|||||||
    FOR_EACH_ARRAY_ROW(modules, i, row)
 | 
					    FOR_EACH_ARRAY_ROW(modules, i, row)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      const TString& module = *row;
 | 
					      const TString& module = *row;
 | 
				
			||||||
      if (module.len() == 2)
 | 
					      if (module[0] == '_' || module.len() == 2)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (module[0] == '_')
 | 
				
			||||||
 | 
					          add_header(ini, module, FALSE);
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
          add_module(ini, module, FALSE);
 | 
					          add_module(ini, module, FALSE);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    ininame = path;  
 | 
					    ininame = path;  
 | 
				
			||||||
@ -285,10 +316,12 @@ bool TInstaller_mask::can_install(const char* module, TInstall_ini& ini)
 | 
				
			|||||||
  if (year < 1997)
 | 
					  if (year < 1997)
 | 
				
			||||||
    return error_box("Il modulo '%s' non ha una versione valida.", module);
 | 
					    return error_box("Il modulo '%s' non ha una versione valida.", module);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					#ifndef _DEMO_
 | 
				
			||||||
  if (year > _year_assist)
 | 
					  if (year > _year_assist)
 | 
				
			||||||
    return error_box("Per installare la versione %s del modulo '%s'\n"
 | 
					    return error_box("Per installare la versione %s del modulo '%s'\n"
 | 
				
			||||||
                     "occorre il contratto di assistenza per l'anno %d.",
 | 
					                     "occorre il contratto di assistenza per l'anno %d.",
 | 
				
			||||||
                     (const char*)version, module, year);
 | 
					                     (const char*)version, module, year);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
                     
 | 
					                     
 | 
				
			||||||
  TAuto_token_string altri(ini.get("Moduli", module));
 | 
					  TAuto_token_string altri(ini.get("Moduli", module));
 | 
				
			||||||
  if (stricmp(module, "ba") != 0 && altri.get_pos("ba") < 0)
 | 
					  if (stricmp(module, "ba") != 0 && altri.get_pos("ba") < 0)
 | 
				
			||||||
@ -514,12 +547,9 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
 | 
				
			|||||||
            const int curpatch = curini.patch(submod);
 | 
					            const int curpatch = curini.patch(submod);
 | 
				
			||||||
            const TString16 reqver = ini.version(submod);
 | 
					            const TString16 reqver = ini.version(submod);
 | 
				
			||||||
            const int reqpatch = ini.patch(submod);
 | 
					            const int reqpatch = ini.patch(submod);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            int distance = compare_version(reqver, reqpatch, curver, curpatch);
 | 
					            int distance = compare_version(reqver, reqpatch, curver, curpatch);
 | 
				
			||||||
            upd = distance> 0;
 | 
					            upd = distance > 0;
 | 
				
			||||||
            if (distance!=0)
 | 
					 | 
				
			||||||
              warning_box("Il sottomodulo '%s' necessario a '%s' e' gia' aggiornato alla versione %s:\n"
 | 
					 | 
				
			||||||
                          "l'installazione della versione %s non verra' effettuata.", 
 | 
					 | 
				
			||||||
                          (const char*)submod, (const char*)module, (const char*)curver, (const char*)reqver);
 | 
					 | 
				
			||||||
          }  
 | 
					          }  
 | 
				
			||||||
          ok &= move_module(submod, ini, upd);
 | 
					          ok &= move_module(submod, ini, upd);
 | 
				
			||||||
        }  
 | 
					        }  
 | 
				
			||||||
@ -609,8 +639,15 @@ void TInstaller_mask::install_selection()
 | 
				
			|||||||
  TString_array& arr = rows_array();
 | 
					  TString_array& arr = rows_array();
 | 
				
			||||||
  FOR_EACH_ARRAY_ROW(arr, r, row) if (checked(r))
 | 
					  FOR_EACH_ARRAY_ROW(arr, r, row) if (checked(r))
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    const TString modulo = row->get(2);
 | 
					 | 
				
			||||||
    const TString newver = row->get(3);
 | 
					    const TString newver = row->get(3);
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    if (newver.blank())
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      check(r, FALSE);
 | 
				
			||||||
 | 
					      continue;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    const TString modulo = row->get(2);
 | 
				
			||||||
    const int newpatch = row->get_int(4);
 | 
					    const int newpatch = row->get_int(4);
 | 
				
			||||||
    const TString oldver = row->get(6);
 | 
					    const TString oldver = row->get(6);
 | 
				
			||||||
    const int oldpatch = row->get_int(7);
 | 
					    const int oldpatch = row->get_int(7);
 | 
				
			||||||
@ -653,7 +690,11 @@ void TInstaller_mask::install_selection()
 | 
				
			|||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					      if (ok)
 | 
				
			||||||
 | 
					        check(r, FALSE);       
 | 
				
			||||||
    }  
 | 
					    }  
 | 
				
			||||||
 | 
					    if (ok)
 | 
				
			||||||
 | 
					      check(r,FALSE); // uncheck 
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -671,11 +712,51 @@ bool TInstaller_mask::install_handler(TMask_field& fld, KEY key)
 | 
				
			|||||||
  return TRUE;
 | 
					  return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool TInstaller_mask::tutti_handler(TMask_field& f, KEY k)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  if (k == K_SPACE)
 | 
				
			||||||
 | 
					  {       
 | 
				
			||||||
 | 
					    TSheet& s = (TSheet&)f.mask();
 | 
				
			||||||
 | 
					    if (s.check_enabled())
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      if (s.one_checked())
 | 
				
			||||||
 | 
					        s.uncheck(-1);
 | 
				
			||||||
 | 
					      else
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        for (long i = s.items()-1; i >=0; i--)
 | 
				
			||||||
 | 
					        {                 
 | 
				
			||||||
 | 
					          TToken_string r = s.row(i);
 | 
				
			||||||
 | 
					          const TString16 newver = r.get(3);
 | 
				
			||||||
 | 
					          const int newpatch = r.get_int(4);
 | 
				
			||||||
 | 
					          const TString16 curver = r.get(6);
 | 
				
			||||||
 | 
					          const int curpatch = r.get_int(7);
 | 
				
			||||||
 | 
					          s.check(i, compare_version(newver, newpatch, curver, curpatch) > 0);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  return TRUE;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool TInstaller_mask::on_key(KEY key)
 | 
					bool TInstaller_mask::on_key(KEY key)
 | 
				
			||||||
{     
 | 
					{     
 | 
				
			||||||
  bool ok = TRUE;
 | 
					  bool ok = TRUE;
 | 
				
			||||||
  if (key == K_CTRL+'N')
 | 
					  if (key == K_CTRL+'N')
 | 
				
			||||||
    autoload();  
 | 
					    autoload();  
 | 
				
			||||||
 | 
					  else  
 | 
				
			||||||
 | 
					    if (key == K_F8)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      for (long i = items()-1; i >=0; i--)
 | 
				
			||||||
 | 
					      {                 
 | 
				
			||||||
 | 
					        TToken_string r = row(i);
 | 
				
			||||||
 | 
					        const TString16 newver = r.get(3);
 | 
				
			||||||
 | 
					        const int newpatch = r.get_int(4);
 | 
				
			||||||
 | 
					        const TString16 curver = r.get(6);
 | 
				
			||||||
 | 
					        const int curpatch = r.get_int(7);
 | 
				
			||||||
 | 
					        check(i, compare_version(newver, newpatch, curver, curpatch > 0));
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    else  
 | 
					    else  
 | 
				
			||||||
      ok = TArray_sheet::on_key(key);
 | 
					      ok = TArray_sheet::on_key(key);
 | 
				
			||||||
  return ok;  
 | 
					  return ok;  
 | 
				
			||||||
@ -695,6 +776,7 @@ TInstaller_mask::TInstaller_mask()
 | 
				
			|||||||
  
 | 
					  
 | 
				
			||||||
  set_handler(F_PATH, path_handler);
 | 
					  set_handler(F_PATH, path_handler);
 | 
				
			||||||
  set_handler(F_INSTALL, install_handler);
 | 
					  set_handler(F_INSTALL, install_handler);
 | 
				
			||||||
 | 
					  set_handler(DLG_USER, tutti_handler);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  TDongle dongle; dongle.login(); dongle.logout();
 | 
					  TDongle dongle; dongle.login(); dongle.logout();
 | 
				
			||||||
  _year_assist = dongle.year_assist();
 | 
					  _year_assist = dongle.year_assist();
 | 
				
			||||||
 | 
				
			|||||||
@ -28,7 +28,7 @@ class TArchive_app : public TApplication
 | 
				
			|||||||
protected:
 | 
					protected:
 | 
				
			||||||
  virtual bool create();
 | 
					  virtual bool create();
 | 
				
			||||||
  virtual bool menu(MENU_TAG);
 | 
					  virtual bool menu(MENU_TAG);
 | 
				
			||||||
 | 
					  static bool test_firm(TMask_field& f, KEY k);
 | 
				
			||||||
  KEY query(long& firm, char& floppy, TString& desc, bool& tmp) const;
 | 
					  KEY query(long& firm, char& floppy, TString& desc, bool& tmp) const;
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
public:      
 | 
					public:      
 | 
				
			||||||
@ -63,10 +63,24 @@ bool TArchive_app::create()
 | 
				
			|||||||
  return ok;
 | 
					  return ok;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool TArchive_app::test_firm(TMask_field& f, KEY k)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  if (k == K_SPACE)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    const char* d = f.mask().get(F_CODDITTA);
 | 
				
			||||||
 | 
					    const long firm = atol(d);
 | 
				
			||||||
 | 
					    if (firm > 0 && !prefix().exist(firm))
 | 
				
			||||||
 | 
					      return f.error_box("La ditta %s non esiste.",d);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  return TRUE;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
KEY TArchive_app::query(long& firm, char& floppy, TString& desc, bool& temp) const
 | 
					KEY TArchive_app::query(long& firm, char& floppy, TString& desc, bool& temp) const
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  TMask m("ba2200");
 | 
					  TMask m("ba2200");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  m.set_handler(F_SALVA,test_firm);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const KEY k = m.run();
 | 
					  const KEY k = m.run();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (k != K_QUIT)
 | 
					  if (k != K_QUIT)
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2110
									
								
								ba/install.ini
									
									
									
									
									
								
							
							
						
						
									
										2110
									
								
								ba/install.ini
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -1,7 +1,7 @@
 | 
				
			|||||||
[PRASSICG_004]
 | 
					[PRASSICG_004]
 | 
				
			||||||
Caption = "Contabilita'"
 | 
					Caption = "Contabilita'"
 | 
				
			||||||
Picture = <cg01.bmp>
 | 
					Picture = <cg01.bmp>
 | 
				
			||||||
Module  = 0
 | 
					Module  = 7
 | 
				
			||||||
Flags   = ""
 | 
					Flags   = ""
 | 
				
			||||||
Item_01 = "Persone fisiche", "ba4 -1 F", ""
 | 
					Item_01 = "Persone fisiche", "ba4 -1 F", ""
 | 
				
			||||||
Item_02 = "Persone giuridiche", "ba4 -1 G", ""
 | 
					Item_02 = "Persone giuridiche", "ba4 -1 G", ""
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
103
 | 
					103
 | 
				
			||||||
1
 | 
					1
 | 
				
			||||||
%tab1100a|0|0|1466|7|File trasferimento IVA11|||
 | 
					%tab1100a|0|0|1466|0|File trasferimento IVA11|||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
104
 | 
					104
 | 
				
			||||||
1
 | 
					1
 | 
				
			||||||
%tab1100b|0|0|701|7|File trasferimento IVA11 (bis)|||
 | 
					%tab1100b|0|0|701|0|File trasferimento IVA11 (bis)|||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
16
 | 
					16
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$indsped|0|0|234|7|Indirizzi di spedizione|NCF||
 | 
					$indsped|0|0|234|0|Indirizzi di spedizione|NCF||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
17
 | 
					17
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$cfven|0|0|303|7|Clienti/Fornitori per vendite|NCF||
 | 
					$cfven|0|0|303|0|Clienti/Fornitori per vendite|NCF||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
19
 | 
					19
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$pcon|0|0|110|7|Piano dei conti|NCON||
 | 
					$pcon|0|0|110|0|Piano dei conti|NCON||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
20
 | 
					20
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$clifo|0|0|566|7|Clienti/Fornitori|NCF||
 | 
					$clifo|0|0|566|0|Clienti/Fornitori|NCF||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
21
 | 
					21
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$saldi|0|0|143|7|Saldi|NCF+NCON||
 | 
					$saldi|0|0|143|0|Saldi|NCF+NCON||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
23
 | 
					23
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$mov|0|0|339|7|Movimenti di prima nota|NMOV||
 | 
					$mov|0|0|339|0|Movimenti di prima nota|NMOV||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
24
 | 
					24
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$rmov|0|0|129|7|Righe di movimento contabile|NMOV*3||
 | 
					$rmov|0|0|129|0|Righe di movimento contabile|NMOV*3||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
25
 | 
					25
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$rmoviva|0|0|78|7|Righe movimento IVA|NMOV*2||
 | 
					$rmoviva|0|0|78|0|Righe movimento IVA|NMOV*2||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
26
 | 
					26
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$caus|0|0|77|7|Causali contabili|60||
 | 
					$caus|0|0|77|0|Causali contabili|60||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
27
 | 
					27
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$rcaus|0|0|81|7|Righe causali contabili|#26*5||
 | 
					$rcaus|0|0|81|0|Righe causali contabili|#26*5||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
28
 | 
					28
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$part|0|0|334|7|Partite aperte|NPART||
 | 
					$part|0|0|334|0|Partite aperte|NPART||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
29
 | 
					29
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$scad|0|0|200|7|Scadenze|NPART*2||
 | 
					$scad|0|0|200|0|Scadenze|NPART*2||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
30
 | 
					30
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$pagsca|0|0|167|7|Pagamenti scadenze|||
 | 
					$pagsca|0|0|167|0|Pagamenti scadenze|||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
[PRASSIEF_001]
 | 
					[PRASSIEF_001]
 | 
				
			||||||
Caption = "Gestione effetti"
 | 
					Caption = "Gestione effetti"
 | 
				
			||||||
Picture = <ef01.bmp>
 | 
					Picture = <ef01.bmp>
 | 
				
			||||||
Module  = 0
 | 
					Module  = 34
 | 
				
			||||||
Flags   = ""
 | 
					Flags   = ""
 | 
				
			||||||
Item_01 = "Aggiornamento effetti", "ef0 -0", ""
 | 
					Item_01 = "Aggiornamento effetti", "ef0 -0", ""
 | 
				
			||||||
Item_02 = "Generazione effetti da E/C", "disabled", ""
 | 
					Item_02 = "Generazione effetti da E/C", "disabled", ""
 | 
				
			||||||
 | 
				
			|||||||
@ -51,13 +51,13 @@ BEGIN
 | 
				
			|||||||
  PROMPT 1 1 "Ditta             "
 | 
					  PROMPT 1 1 "Ditta             "
 | 
				
			||||||
  FLAGS "RDG"
 | 
					  FLAGS "RDG"
 | 
				
			||||||
  USE LF_NDITTE KEY 1
 | 
					  USE LF_NDITTE KEY 1
 | 
				
			||||||
  CHECKTYPE REQUIRED
 | 
					 | 
				
			||||||
  INPUT CODDITTA F_CODDITTA
 | 
					 | 
				
			||||||
  JOIN LF_ANAG TO LF_NDITTE INTO TIPOA=TIPOA CODANAGR=CODANAGR  
 | 
					  JOIN LF_ANAG TO LF_NDITTE INTO TIPOA=TIPOA CODANAGR=CODANAGR  
 | 
				
			||||||
  JOIN LF_ANAGFIS TO LF_ANAG INTO CODANAGR=CODANAGR 
 | 
					  JOIN LF_ANAGFIS TO LF_ANAG INTO CODANAGR=CODANAGR 
 | 
				
			||||||
  JOIN LF_COMUNI TO LF_ANAGFIS INTO COM==COMNASC
 | 
					  JOIN LF_COMUNI TO LF_ANAGFIS INTO COM==COMNASC
 | 
				
			||||||
  JOIN LF_COMUNI TO LF_ANAG ALIAS 1 INTO COM==COMRES 
 | 
					  JOIN LF_COMUNI TO LF_ANAG ALIAS 1 INTO COM==COMRES 
 | 
				
			||||||
  JOIN LF_COMUNI TO LF_ANAG ALIAS 2 INTO COM==COMRF 
 | 
					  JOIN LF_COMUNI TO LF_ANAG ALIAS 2 INTO COM==COMRF 
 | 
				
			||||||
 | 
					  CHECKTYPE REQUIRED
 | 
				
			||||||
 | 
					  INPUT CODDITTA F_CODDITTA
 | 
				
			||||||
  OUTPUT APF_RAGSOC LF_NDITTE->RAGSOC
 | 
					  OUTPUT APF_RAGSOC LF_NDITTE->RAGSOC
 | 
				
			||||||
  OUTPUT F_ATTIV LF_NDITTE->CODATTPREV
 | 
					  OUTPUT F_ATTIV LF_NDITTE->CODATTPREV
 | 
				
			||||||
  OUTPUT F_ANAGR LF_ANAG->CODANAGR 
 | 
					  OUTPUT F_ANAGR LF_ANAG->CODANAGR 
 | 
				
			||||||
 | 
				
			|||||||
@ -48,12 +48,12 @@ BEGIN
 | 
				
			|||||||
  PROMPT 1 1 "Ditta             "
 | 
					  PROMPT 1 1 "Ditta             "
 | 
				
			||||||
  FLAGS "GRD"
 | 
					  FLAGS "GRD"
 | 
				
			||||||
  USE LF_NDITTE KEY 1
 | 
					  USE LF_NDITTE KEY 1
 | 
				
			||||||
  CHECKTYPE REQUIRED
 | 
					 | 
				
			||||||
  INPUT CODDITTA F_CODDITTA
 | 
					 | 
				
			||||||
  JOIN LF_ANAG TO LF_NDITTE INTO TIPOA=TIPOA CODANAGR=CODANAGR   
 | 
					  JOIN LF_ANAG TO LF_NDITTE INTO TIPOA=TIPOA CODANAGR=CODANAGR   
 | 
				
			||||||
  JOIN LF_ANAGGIU TO LF_ANAG INTO CODANAGR=CODANAGR
 | 
					  JOIN LF_ANAGGIU TO LF_ANAG INTO CODANAGR=CODANAGR
 | 
				
			||||||
  JOIN LF_COMUNI TO LF_ANAG ALIAS 1 INTO COM==COMRES
 | 
					  JOIN LF_COMUNI TO LF_ANAG ALIAS 1 INTO COM==COMRES
 | 
				
			||||||
  JOIN LF_COMUNI TO LF_ANAG ALIAS 2 INTO COM==COMRF
 | 
					  JOIN LF_COMUNI TO LF_ANAG ALIAS 2 INTO COM==COMRF
 | 
				
			||||||
 | 
					  CHECKTYPE REQUIRED
 | 
				
			||||||
 | 
					  INPUT CODDITTA F_CODDITTA
 | 
				
			||||||
  OUTPUT F_RAGSOC     LF_NDITTE->RAGSOC 
 | 
					  OUTPUT F_RAGSOC     LF_NDITTE->RAGSOC 
 | 
				
			||||||
  OUTPUT F_ATTIV    LF_NDITTE->CODATTPREV
 | 
					  OUTPUT F_ATTIV    LF_NDITTE->CODATTPREV
 | 
				
			||||||
  OUTPUT F_ANAGR    LF_ANAG->CODANAGR
 | 
					  OUTPUT F_ANAGR    LF_ANAG->CODANAGR
 | 
				
			||||||
 | 
				
			|||||||
@ -60,14 +60,14 @@ BEGIN
 | 
				
			|||||||
  PROMPT 1 4 "Codice rappresentante   "
 | 
					  PROMPT 1 4 "Codice rappresentante   "
 | 
				
			||||||
  FLAGS "D"
 | 
					  FLAGS "D"
 | 
				
			||||||
  USE LF_NDITTE 
 | 
					  USE LF_NDITTE 
 | 
				
			||||||
  INPUT CODDITTA F_CODDITTA 
 | 
					 | 
				
			||||||
  FIELD LF_NDITTE->RAPPR   
 | 
					 | 
				
			||||||
  CHECKTYPE NORMAL
 | 
					 | 
				
			||||||
  JOIN LF_ANAG INTO CODANAGR==RAPPR TIPOA=="F"
 | 
					  JOIN LF_ANAG INTO CODANAGR==RAPPR TIPOA=="F"
 | 
				
			||||||
  JOIN LF_ANAGFIS TO LF_ANAG INTO CODANAGR=CODANAGR   
 | 
					  JOIN LF_ANAGFIS TO LF_ANAG INTO CODANAGR=CODANAGR   
 | 
				
			||||||
  JOIN LF_COMUNI TO LF_ANAGFIS INTO COM==COMNASC
 | 
					  JOIN LF_COMUNI TO LF_ANAGFIS INTO COM==COMNASC
 | 
				
			||||||
  JOIN LF_COMUNI TO LF_ANAG ALIAS 1 INTO COM==COMRES
 | 
					  JOIN LF_COMUNI TO LF_ANAG ALIAS 1 INTO COM==COMRES
 | 
				
			||||||
  JOIN LF_COMUNI TO LF_ANAG ALIAS 2 INTO COM==COMRF
 | 
					  JOIN LF_COMUNI TO LF_ANAG ALIAS 2 INTO COM==COMRF
 | 
				
			||||||
 | 
					  INPUT CODDITTA F_CODDITTA 
 | 
				
			||||||
 | 
					  FIELD LF_NDITTE->RAPPR   
 | 
				
			||||||
 | 
					  CHECKTYPE NORMAL
 | 
				
			||||||
  OUTPUT F_COFI     LF_ANAG->COFI
 | 
					  OUTPUT F_COFI     LF_ANAG->COFI
 | 
				
			||||||
  OUTPUT F_COGNOME  LF_ANAG->RAGSOC[1,30]
 | 
					  OUTPUT F_COGNOME  LF_ANAG->RAGSOC[1,30]
 | 
				
			||||||
  OUTPUT F_NOME     LF_ANAG->RAGSOC[31,50]
 | 
					  OUTPUT F_NOME     LF_ANAG->RAGSOC[31,50]
 | 
				
			||||||
 | 
				
			|||||||
@ -52,10 +52,10 @@ BEGIN
 | 
				
			|||||||
  PROMPT 1 1 "Ditta             "
 | 
					  PROMPT 1 1 "Ditta             "
 | 
				
			||||||
  FLAGS "GRD"
 | 
					  FLAGS "GRD"
 | 
				
			||||||
  USE LF_NDITTE KEY 1
 | 
					  USE LF_NDITTE KEY 1
 | 
				
			||||||
  CHECKTYPE REQUIRED
 | 
					 | 
				
			||||||
  INPUT CODDITTA F_CODDITTA 
 | 
					 | 
				
			||||||
  JOIN LF_ATTIV TO LF_NDITTE INTO CODDITTA=CODDITTA CODATT=CODATTPREV
 | 
					  JOIN LF_ATTIV TO LF_NDITTE INTO CODDITTA=CODDITTA CODATT=CODATTPREV
 | 
				
			||||||
  JOIN LF_COMUNI TO LF_ATTIV INTO COM==COMCS
 | 
					  JOIN LF_COMUNI TO LF_ATTIV INTO COM==COMCS
 | 
				
			||||||
 | 
					  CHECKTYPE REQUIRED
 | 
				
			||||||
 | 
					  INPUT CODDITTA F_CODDITTA 
 | 
				
			||||||
  OUTPUT F_RAGSOC   LF_NDITTE->RAGSOC  
 | 
					  OUTPUT F_RAGSOC   LF_NDITTE->RAGSOC  
 | 
				
			||||||
  OUTPUT F_ATTIV    LF_ATTIV->CODATT
 | 
					  OUTPUT F_ATTIV    LF_ATTIV->CODATT
 | 
				
			||||||
  OUTPUT ASCF_TIPOA LF_ATTIV->TIPOADS
 | 
					  OUTPUT ASCF_TIPOA LF_ATTIV->TIPOADS
 | 
				
			||||||
 | 
				
			|||||||
@ -47,8 +47,8 @@ BEGIN
 | 
				
			|||||||
  PROMPT 1 1 "Ditta             "
 | 
					  PROMPT 1 1 "Ditta             "
 | 
				
			||||||
  FLAGS "GRD"
 | 
					  FLAGS "GRD"
 | 
				
			||||||
  USE LF_NDITTE KEY 1
 | 
					  USE LF_NDITTE KEY 1
 | 
				
			||||||
  INPUT CODDITTA F_CODDITTA
 | 
					 | 
				
			||||||
  JOIN LF_BASE TO LF_NDITTE INTO CODDITTA=CODDITTA
 | 
					  JOIN LF_BASE TO LF_NDITTE INTO CODDITTA=CODDITTA
 | 
				
			||||||
 | 
					  INPUT CODDITTA F_CODDITTA
 | 
				
			||||||
  OUTPUT F_RAGSOC LF_NDITTE->RAGSOC               
 | 
					  OUTPUT F_RAGSOC LF_NDITTE->RAGSOC               
 | 
				
			||||||
  OUTPUT F_ANAGR LF_BASE->CODCAAF
 | 
					  OUTPUT F_ANAGR LF_BASE->CODCAAF
 | 
				
			||||||
  CHECKTYPE REQUIRED 
 | 
					  CHECKTYPE REQUIRED 
 | 
				
			||||||
@ -70,10 +70,10 @@ NUMBER F_ANAGR 5
 | 
				
			|||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 1 5 "Codice                  "
 | 
					  PROMPT 1 5 "Codice                  "
 | 
				
			||||||
  USE LF_ANAGGIU KEY 1
 | 
					  USE LF_ANAGGIU KEY 1
 | 
				
			||||||
  INPUT CODANAGR F_ANAGR             
 | 
					 | 
				
			||||||
  JOIN LF_ANAG TO LF_ANAGGIU INTO CODANAGR=CODANAGR TIPOA="G"   
 | 
					  JOIN LF_ANAG TO LF_ANAGGIU INTO CODANAGR=CODANAGR TIPOA="G"   
 | 
				
			||||||
  JOIN LF_COMUNI TO LF_ANAG ALIAS 1 INTO COM==COMRES
 | 
					  JOIN LF_COMUNI TO LF_ANAG ALIAS 1 INTO COM==COMRES
 | 
				
			||||||
  JOIN LF_COMUNI TO LF_ANAG ALIAS 2 INTO COM==COMRF
 | 
					  JOIN LF_COMUNI TO LF_ANAG ALIAS 2 INTO COM==COMRF
 | 
				
			||||||
 | 
					  INPUT CODANAGR F_ANAGR             
 | 
				
			||||||
  DISPLAY "Codice" CODANAGR
 | 
					  DISPLAY "Codice" CODANAGR
 | 
				
			||||||
  DISPLAY "Ragione Sociale@50" LF_ANAG->RAGSOC
 | 
					  DISPLAY "Ragione Sociale@50" LF_ANAG->RAGSOC
 | 
				
			||||||
  OUTPUT F_COFI LF_ANAG->COFI
 | 
					  OUTPUT F_COFI LF_ANAG->COFI
 | 
				
			||||||
 | 
				
			|||||||
@ -63,10 +63,10 @@ NUMBER F_ANAGR 5
 | 
				
			|||||||
BEGIN                        
 | 
					BEGIN                        
 | 
				
			||||||
  PROMPT 1 6 "Codice         "
 | 
					  PROMPT 1 6 "Codice         "
 | 
				
			||||||
  USE LF_ANAGFIS KEY 1
 | 
					  USE LF_ANAGFIS KEY 1
 | 
				
			||||||
  CHECKTYPE NORMAL
 | 
					 | 
				
			||||||
  INPUT CODANAGR F_ANAGR
 | 
					 | 
				
			||||||
  JOIN LF_ANAG TO LF_ANAGFIS INTO TIPOA="F" CODANAGR=CODANAGR 
 | 
					  JOIN LF_ANAG TO LF_ANAGFIS INTO TIPOA="F" CODANAGR=CODANAGR 
 | 
				
			||||||
  JOIN LF_COMUNI TO LF_ANAGFIS INTO COM==COMNASC
 | 
					  JOIN LF_COMUNI TO LF_ANAGFIS INTO COM==COMNASC
 | 
				
			||||||
 | 
					  CHECKTYPE NORMAL
 | 
				
			||||||
 | 
					  INPUT CODANAGR F_ANAGR
 | 
				
			||||||
  DISPLAY "Codice" CODANAGR
 | 
					  DISPLAY "Codice" CODANAGR
 | 
				
			||||||
  DISPLAY "Ragione Sociale@50" LF_ANAG->RAGSOC
 | 
					  DISPLAY "Ragione Sociale@50" LF_ANAG->RAGSOC
 | 
				
			||||||
  OUTPUT F_COFI LF_ANAG->COFI
 | 
					  OUTPUT F_COFI LF_ANAG->COFI
 | 
				
			||||||
 | 
				
			|||||||
@ -11,7 +11,7 @@ ENDPAGE
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
PAGE "Quadro D1" -1 -1 78 18
 | 
					PAGE "Quadro D1" -1 -1 78 18
 | 
				
			||||||
 | 
					
 | 
				
			||||||
GROUPBOX DLG_NULL 78 4
 | 
					GROUPBOX DLG_NULL 78 5
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 1 1 "Percipiente"
 | 
					  PROMPT 1 1 "Percipiente"
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
				
			|||||||
@ -133,7 +133,7 @@ void TQuadroF::init_sheet(TSheet_field& s)
 | 
				
			|||||||
     TBrowse* browse = e.browse();
 | 
					     TBrowse* browse = e.browse();
 | 
				
			||||||
     CHECKD(browse, "Manca la ricerca sul file delle causali nel campo ", id);
 | 
					     CHECKD(browse, "Manca la ricerca sul file delle causali nel campo ", id);
 | 
				
			||||||
     TCursor* cur = browse->cursor();
 | 
					     TCursor* cur = browse->cursor();
 | 
				
			||||||
     TString16 filter; filter << "S1=" << _quadro;
 | 
					     TString16 filter; filter << "S1=" << "\"" << _quadro << "\"";
 | 
				
			||||||
     cur->setfilter(filter);
 | 
					     cur->setfilter(filter);
 | 
				
			||||||
   }                    
 | 
					   }                    
 | 
				
			||||||
   
 | 
					   
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
109
 | 
					109
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$mag|0|0|675|32|Giacenze di magazzino|||
 | 
					$mag|0|0|675|0|Giacenze di magazzino|||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
110
 | 
					110
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$movmag|0|0|128|32|Movimenti di magazzino (?)|||
 | 
					$movmag|0|0|128|0|Movimenti di magazzino (?)|||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
111
 | 
					111
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$rmovmag|0|0|94|32|Righe movimenti di magazzino|||
 | 
					$rmovmag|0|0|94|0|Righe movimenti di magazzino|||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
114
 | 
					114
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$stomag|0|0|152|32|Storico di magazzino|||
 | 
					$stomag|0|0|152|0|Storico di magazzino|||
 | 
				
			||||||
 | 
				
			|||||||
@ -211,7 +211,7 @@ SECTION BODY ODD 1
 | 
				
			|||||||
      BEGIN
 | 
					      BEGIN
 | 
				
			||||||
        KEY " datadoc"
 | 
					        KEY " datadoc"
 | 
				
			||||||
        PROMPT  30 1 "del "
 | 
					        PROMPT  30 1 "del "
 | 
				
			||||||
        FIELD EX_DATADOC
 | 
					        FIELD LF_MOVMAG->EX_DATADOC
 | 
				
			||||||
      END
 | 
					      END
 | 
				
			||||||
    END
 | 
					    END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
[PRASSIMG_060]
 | 
					[PRASSIMG_060]
 | 
				
			||||||
Caption = "Gestione magazzino"
 | 
					Caption = "Gestione magazzino"
 | 
				
			||||||
Picture = <mg01.bmp>
 | 
					Picture = <mg01.bmp>
 | 
				
			||||||
Module  = 0
 | 
					Module  = 32
 | 
				
			||||||
Flags   = ""
 | 
					Flags   = ""
 | 
				
			||||||
Item_01 = "Tabelle", [PRASSIMG_061]
 | 
					Item_01 = "Tabelle", [PRASSIMG_061]
 | 
				
			||||||
Item_05 = "Movimenti", [PRASSIMG_063]
 | 
					Item_05 = "Movimenti", [PRASSIMG_063]
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
122
 | 
					122
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$agenti|0|0|118|36|Archivio agenti|||
 | 
					$agenti|0|0|118|0|Archivio agenti|||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
123
 | 
					123
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$percprov|0|0|67|36|Archivio percentuali di provvigione|||
 | 
					$percprov|0|0|67|0|Archivio percentuali di provvigione|||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
[PRASSIPR_001]
 | 
					[PRASSIPR_001]
 | 
				
			||||||
Caption = "Gestione agenti"
 | 
					Caption = "Gestione agenti"
 | 
				
			||||||
Picture = <pr01.bmp>
 | 
					Picture = <pr01.bmp>
 | 
				
			||||||
Module  = 0
 | 
					Module  = 36
 | 
				
			||||||
Flags   = ""
 | 
					Flags   = ""
 | 
				
			||||||
Item_01 = "Archivi e tabelle", [PRASSIPR_002]
 | 
					Item_01 = "Archivi e tabelle", [PRASSIPR_002]
 | 
				
			||||||
Item_02 = "Stampa archivi e tabelle", [PRASSIPR_003]
 | 
					Item_02 = "Stampa archivi e tabelle", [PRASSIPR_003]
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
86
 | 
					86
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$svriep|0|0|104|38|Riepilogo statistiche di vendita|||
 | 
					$svriep|0|0|104|0|Riepilogo statistiche di vendita|||
 | 
				
			||||||
 | 
				
			|||||||
@ -388,7 +388,7 @@ class TStampa_stat : public TPrint_application
 | 
				
			|||||||
  static TString s_park; // stringa di lavoro
 | 
					  static TString s_park; // stringa di lavoro
 | 
				
			||||||
  // ******************
 | 
					  // ******************
 | 
				
			||||||
  // stampa file di Output
 | 
					  // stampa file di Output
 | 
				
			||||||
  TString wrk_row;       // stringa di lavoro per le righe di stampa
 | 
					  TString _wrk_row;       // stringa di lavoro per le righe di stampa
 | 
				
			||||||
  TRelation * _rel;     // relazione per la stampa
 | 
					  TRelation * _rel;     // relazione per la stampa
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -436,6 +436,7 @@ protected:
 | 
				
			|||||||
  int handle_levchange(int row,const int level);
 | 
					  int handle_levchange(int row,const int level);
 | 
				
			||||||
  int set_rows_colonne(int row, TRectype &strec);
 | 
					  int set_rows_colonne(int row, TRectype &strec);
 | 
				
			||||||
  void set_row_atpos(char section,int row,const char * f,int pos);
 | 
					  void set_row_atpos(char section,int row,const char * f,int pos);
 | 
				
			||||||
 | 
					  void set_filled_row(char section,int row,char c,int pos, int len);
 | 
				
			||||||
  void reset_grplevels();
 | 
					  void reset_grplevels();
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  bool test_field(const TString& cod, TMask_field& f) const;
 | 
					  bool test_field(const TString& cod, TMask_field& f) const;
 | 
				
			||||||
@ -525,10 +526,9 @@ void TStampa_stat::postclose_print()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void TStampa_stat::preprocess_footer()
 | 
					void TStampa_stat::preprocess_footer()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  wrk_row.fill('_',_pagewidth);
 | 
					  set_filled_row('F',1,'_',0,_pagewidth);
 | 
				
			||||||
  set_row_atpos('F',1,wrk_row,0);
 | 
					  _wrk_row.format("Pagina @#",get_page_number()-_last_page*(_colpage-1));
 | 
				
			||||||
  wrk_row.format("Pagina @#",get_page_number()-_last_page*(_colpage-1));
 | 
					  set_row_atpos('F',2,_wrk_row,(_colpage-1)*_pagewidth+(_pagewidth-9)/2);
 | 
				
			||||||
  set_row_atpos('F',2,wrk_row,(_colpage-1)*_pagewidth+(_pagewidth-9)/2);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void TStampa_stat::preprocess_header()
 | 
					void TStampa_stat::preprocess_header()
 | 
				
			||||||
@ -542,10 +542,10 @@ void TStampa_stat::preprocess_header()
 | 
				
			|||||||
    set_row_atpos('H',++row,"@bStampa statistiche ",0);
 | 
					    set_row_atpos('H',++row,"@bStampa statistiche ",0);
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    wrk_row.format("@bStampa statistica '%s'",(const char *)selmask().get(F_DESCR));
 | 
					    _wrk_row.format("@bStampa statistica '%s'",(const char *)selmask().get(F_DESCR));
 | 
				
			||||||
    set_row_atpos('H',++row,(const char *)wrk_row,0);
 | 
					    set_row_atpos('H',++row,(const char *)_wrk_row,0);
 | 
				
			||||||
    wrk_row.format("dal %s al %s ",(const char *)selmask().get(F_DATAINI),(const char *)selmask().get(F_DATAFIN));
 | 
					    _wrk_row.format("dal %s al %s ",(const char *)selmask().get(F_DATAINI),(const char *)selmask().get(F_DATAFIN));
 | 
				
			||||||
    set_row_atpos('H',row,(const char *)wrk_row,40);
 | 
					    set_row_atpos('H',row,(const char *)_wrk_row,40);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  set_header(++row,"");
 | 
					  set_header(++row,"");
 | 
				
			||||||
  set_row_atpos('H',++row,"  Codice     Descrizione",0);
 | 
					  set_row_atpos('H',++row,"  Codice     Descrizione",0);
 | 
				
			||||||
@ -556,13 +556,13 @@ void TStampa_stat::preprocess_header()
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
      set_row_atpos('H',row,nome_totale(1+int((c-1)/_col_anno) ),POS_PRIMACOL+c*_largcol+_largcol/2 );
 | 
					      set_row_atpos('H',row,nome_totale(1+int((c-1)/_col_anno) ),POS_PRIMACOL+c*_largcol+_largcol/2 );
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      wrk_row=nome_colonna1(col);
 | 
					      _wrk_row=nome_colonna1(col);
 | 
				
			||||||
      set_row_atpos('H',row,wrk_row,POS_PRIMACOL+c*_largcol );
 | 
					      set_row_atpos('H',row,_wrk_row,POS_PRIMACOL+c*_largcol );
 | 
				
			||||||
      wrk_row=nome_colonna2(col);
 | 
					      _wrk_row=nome_colonna2(col);
 | 
				
			||||||
      if (wrk_row.not_empty()) 
 | 
					      if (_wrk_row.not_empty()) 
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        lastrow=row+1;
 | 
					        lastrow=row+1;
 | 
				
			||||||
        set_row_atpos('H',row+1,wrk_row,POS_PRIMACOL+c*_largcol);
 | 
					        set_row_atpos('H',row+1,_wrk_row,POS_PRIMACOL+c*_largcol);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      col++;
 | 
					      col++;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -576,15 +576,15 @@ void TStampa_stat::preprocess_header()
 | 
				
			|||||||
  set_header(++row,"");
 | 
					  set_header(++row,"");
 | 
				
			||||||
  // *****************
 | 
					  // *****************
 | 
				
			||||||
  // background
 | 
					  // background
 | 
				
			||||||
  wrk_row.format("P0W1l(1,1,%d,1)l(1,3,%d,3)l(1,%d,%d,%d)",_pagewidth,_pagewidth,row,_pagewidth,row);
 | 
					  _wrk_row.format("P0W1l(1,1,%d,1)l(1,3,%d,3)l(1,%d,%d,%d)",_pagewidth,_pagewidth,row,_pagewidth,row);
 | 
				
			||||||
  row++;
 | 
					  row++;
 | 
				
			||||||
  for (c=0; c < _numcol; c++) // colonne 
 | 
					  for (c=0; c < _numcol; c++) // colonne 
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    // background
 | 
					    // background
 | 
				
			||||||
    //wrk_row << "l(" << POS_PRIMACOL+c*_largcol << ",4," ;
 | 
					    //_wrk_row << "l(" << POS_PRIMACOL+c*_largcol << ",4," ;
 | 
				
			||||||
    //wrk_row << POS_PRIMACOL+c*_largcol << ',' << (int)printer().rows() << ')';
 | 
					    //_wrk_row << POS_PRIMACOL+c*_largcol << ',' << (int)printer().rows() << ')';
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  set_background(wrk_row);
 | 
					  set_background(_wrk_row);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const TString& TStampa_stat::nome_colonna1(int c)
 | 
					const TString& TStampa_stat::nome_colonna1(int c)
 | 
				
			||||||
@ -801,8 +801,25 @@ int TStampa_stat::set_rows_colonne(int row,TRectype &strec)
 | 
				
			|||||||
  return row;
 | 
					  return row;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// fa le set row per la "riga" contenente i valori delle colonne di statistica
 | 
					
 | 
				
			||||||
void TStampa_stat::set_row_atpos(char section,int row,const char * f,int pos)
 | 
					void TStampa_stat::set_filled_row(char section,int row,char c,int pos,int len)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  const int MAX=100; // limite massimo per una singola set_row; 5 char per costruire la goto
 | 
				
			||||||
 | 
					  while (len> MAX ) 
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    _wrk_row.fill(c,MAX);
 | 
				
			||||||
 | 
					    set_row_atpos(section,row,(const char *)_wrk_row,pos);
 | 
				
			||||||
 | 
					    len-=MAX;
 | 
				
			||||||
 | 
					    pos+=MAX;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  _wrk_row.fill(c,len);
 | 
				
			||||||
 | 
					  set_row_atpos(section,row,(const char *)_wrk_row,pos);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// fa le set_row per la "riga" contenente i valori delle colonne di statistica
 | 
				
			||||||
 | 
					void TStampa_stat::set_row_atpos(char section,int nrow,const char * f,int pos)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  static TString256 ss;
 | 
					  static TString256 ss;
 | 
				
			||||||
  int l=strlen(f);
 | 
					  int l=strlen(f);
 | 
				
			||||||
@ -832,9 +849,9 @@ void TStampa_stat::set_row_atpos(char section,int row,const char * f,int pos)
 | 
				
			|||||||
    repeat_print();
 | 
					    repeat_print();
 | 
				
			||||||
    switch (section)
 | 
					    switch (section)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
    case 'R': set_row(row,ss); break;
 | 
					      case 'R': set_row(nrow,ss); break;
 | 
				
			||||||
    case 'H': set_header(row,ss); break;
 | 
					      case 'H': set_header(nrow,ss); break;
 | 
				
			||||||
    case 'F': set_footer(row,ss); break;
 | 
					      case 'F': set_footer(nrow,ss); break;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -856,14 +873,14 @@ int TStampa_stat::handle_levchange(int row,const int level)
 | 
				
			|||||||
        lencode=rec_grp2.get(SVS_CODICE).len();
 | 
					        lencode=rec_grp2.get(SVS_CODICE).len();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      adjust_record(rec_grp1,lencode);
 | 
					      adjust_record(rec_grp1,lencode);
 | 
				
			||||||
      wrk_row.fill('-',_pagewidth-POS_PRIMACOL);
 | 
					
 | 
				
			||||||
      set_row_atpos('R',++row,(const char *)wrk_row,POS_PRIMACOL);
 | 
					      set_filled_row('R',++row,'-',POS_PRIMACOL,_pagewidth-POS_PRIMACOL);
 | 
				
			||||||
      wrk_row ="Totale ";
 | 
					      _wrk_row ="Totale ";
 | 
				
			||||||
      wrk_row << partkey_name(rec_grp1.get(SVS_LEVCODE));
 | 
					      _wrk_row << partkey_name(rec_grp1.get(SVS_LEVCODE));
 | 
				
			||||||
      wrk_row << ' ' << rec_grp1.get(SVS_CODICE).mid(lencode);
 | 
					      _wrk_row << ' ' << rec_grp1.get(SVS_CODICE).mid(lencode);
 | 
				
			||||||
      wrk_row << ' ' << rec_grp1.get(SVS_DESCR);
 | 
					      _wrk_row << ' ' << rec_grp1.get(SVS_DESCR);
 | 
				
			||||||
      //wrk_row.cut(LARG_COLCODICE); there are also @ chars!
 | 
					      //_wrk_row.cut(LARG_COLCODICE); there are also @ chars!
 | 
				
			||||||
      set_row_atpos('R',++row,(const char *)wrk_row,_indent[_last_lev_grp]);
 | 
					      set_row_atpos('R',++row,(const char *)_wrk_row,_indent[_last_lev_grp]);
 | 
				
			||||||
      row = set_rows_colonne(row, rec_grp1);
 | 
					      row = set_rows_colonne(row, rec_grp1);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
[PRASSISV_000]
 | 
					[PRASSISV_000]
 | 
				
			||||||
Caption = "Statistiche di vendita"
 | 
					Caption = "Statistiche di vendita"
 | 
				
			||||||
Picture = <sv01.bmp>
 | 
					Picture = <sv01.bmp>
 | 
				
			||||||
Module  = 0
 | 
					Module  = 38
 | 
				
			||||||
Flags   = ""
 | 
					Flags   = ""
 | 
				
			||||||
Item_01 = "Tabelle", [PRASSISV_020]
 | 
					Item_01 = "Tabelle", [PRASSISV_020]
 | 
				
			||||||
//Item_02 = "Stampa Tabelle", [PRASSISV_030]
 | 
					//Item_02 = "Stampa Tabelle", [PRASSISV_030]
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
35
 | 
					35
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$sconti|0|0|118|31|Sconti|#33||
 | 
					$sconti|0|0|118|0|Sconti|#33||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
47
 | 
					47
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$anamag|0|0|374|31|Anagrafica di magazzino|NART||
 | 
					$anamag|0|0|374|0|Anagrafica di magazzino|NART||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
48
 | 
					48
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$codcorr|0|0|45|31|Codici corrispondenti|#47||
 | 
					$codcorr|0|0|45|0|Codici corrispondenti|#47||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
49
 | 
					49
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$umart|0|0|59|31|unita'di misura articoli|#47||
 | 
					$umart|0|0|59|0|unita'di misura articoli|#47||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
51
 | 
					51
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$deslin|0|0|75|31|Descrizioni in lingua|#47||
 | 
					$deslin|0|0|75|0|Descrizioni in lingua|#47||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
52
 | 
					52
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$condv|0|0|119|31|Cond.di vendita(listini,contratti,offerte)|||
 | 
					$condv|0|0|119|0|Cond.di vendita(listini,contratti,offerte)|||
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,3 @@
 | 
				
			|||||||
53
 | 
					53
 | 
				
			||||||
0
 | 
					0
 | 
				
			||||||
$rcondv|0|0|183|31|Righe condizioni di vendita|||
 | 
					$rcondv|0|0|183|0|Righe condizioni di vendita|||
 | 
				
			||||||
 | 
				
			|||||||
@ -1439,8 +1439,10 @@ void TDocumento::update_tabella_iva()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
real TDocumento::imposta(bool spese, int ndec) const
 | 
					real TDocumento::imposta(bool spese, int ndec) const
 | 
				
			||||||
{                       
 | 
					{                       
 | 
				
			||||||
 | 
					  real val = ZERO;     
 | 
				
			||||||
 | 
					  if (physical_rows() > 0)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
    TAssoc_array & table = ((TDocumento *)this)->tabella_iva();
 | 
					    TAssoc_array & table = ((TDocumento *)this)->tabella_iva();
 | 
				
			||||||
  real val;     
 | 
					 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
    if (ndec == AUTO_DECIMALS)
 | 
					    if (ndec == AUTO_DECIMALS)
 | 
				
			||||||
      ndec = in_valuta() ? 3 : 0;
 | 
					      ndec = in_valuta() ? 3 : 0;
 | 
				
			||||||
@ -1455,6 +1457,7 @@ real TDocumento::imposta(bool spese, int ndec) const
 | 
				
			|||||||
        iva.ceil(ndec);
 | 
					        iva.ceil(ndec);
 | 
				
			||||||
      val += iva;
 | 
					      val += iva;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  return val;
 | 
					  return val;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
[PRASSIVE_032]
 | 
					[PRASSIVE_032]
 | 
				
			||||||
Caption = "Gestione documenti"
 | 
					Caption = "Gestione documenti"
 | 
				
			||||||
Picture = <ve01.bmp>
 | 
					Picture = <ve01.bmp>
 | 
				
			||||||
Module  = 0
 | 
					Module  = 31
 | 
				
			||||||
Flags   = ""
 | 
					Flags   = ""
 | 
				
			||||||
Item_06 = "Documenti interattivi", "ve0 -1", ""
 | 
					Item_06 = "Documenti interattivi", "ve0 -1", ""
 | 
				
			||||||
Item_07 = "Stampe documenti", "ve1 -0", ""
 | 
					Item_07 = "Stampe documenti", "ve1 -0", ""
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user