Patch level : 2.2 94
Files correlati : ci0.exe ve0.exe Ricompilazione Demo : [ ] Commento : Aggiunta possibilità di rimanere in modifica o in inserimento do Registra git-svn-id: svn://10.65.10.50/trunk@13066 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									22264e22d6
								
							
						
					
					
						commit
						d52d8167eb
					
				@ -161,6 +161,8 @@ void TConfigurazioneIndustriale_app::file_to_sheet()
 | 
			
		||||
    TToken_string t;
 | 
			
		||||
    t.add(configfile.get("Filter", NULL,item, "F01"));
 | 
			
		||||
    t.add(configfile.get("Descr", NULL,item, "Fatture"));
 | 
			
		||||
		t.add(configfile.get("InsertRemain", NULL,item, ""));
 | 
			
		||||
		t.add(configfile.get("ModifyRemain", NULL,item, ""));
 | 
			
		||||
    mask().add_element(t);
 | 
			
		||||
    item++;
 | 
			
		||||
  }
 | 
			
		||||
@ -187,6 +189,8 @@ void TConfigurazioneIndustriale_app::sheet_to_file()
 | 
			
		||||
    TString currdesc(mask().row(i).get(1));
 | 
			
		||||
    configfile.set("Filter", mask().row(i).get(0), NULL, true, i);
 | 
			
		||||
    configfile.set("Descr", currdesc, NULL, true, i);
 | 
			
		||||
    configfile.set("InsertRemain", mask().row(i).get(2), NULL, true, i);
 | 
			
		||||
    configfile.set("ModifyRemain", mask().row(i).get(3), NULL, true, i);
 | 
			
		||||
    totlen+=currdesc.len();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -18,11 +18,13 @@ ENDPAGE
 | 
			
		||||
 | 
			
		||||
PAGE "Configurazione" -1 -1 78 23
 | 
			
		||||
 | 
			
		||||
SPREADSHEET F_SHEET 50 16
 | 
			
		||||
SPREADSHEET F_SHEET 74 16
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 15 1 ""
 | 
			
		||||
  PROMPT 3 1 ""
 | 
			
		||||
  ITEM "Filtro@4"
 | 
			
		||||
  ITEM "Descrizione@30"
 | 
			
		||||
  ITEM "Rimani in\nInserimento@14"
 | 
			
		||||
  ITEM "Rimani in\nModifica@14"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BUTTON F_MOVEUP 2 2
 | 
			
		||||
@ -41,7 +43,7 @@ ENDPAGE
 | 
			
		||||
 | 
			
		||||
ENDMASK
 | 
			
		||||
 | 
			
		||||
PAGE "Tipologia Documento" -1 -1 50 6
 | 
			
		||||
PAGE "Tipologia Documento" -1 -1 50 8
 | 
			
		||||
 | 
			
		||||
STRING 101 4
 | 
			
		||||
BEGIN
 | 
			
		||||
@ -50,6 +52,7 @@ BEGIN
 | 
			
		||||
  INPUT CODTAB 101
 | 
			
		||||
  DISPLAY "Codice" CODTAB
 | 
			
		||||
  DISPLAY "Descrizione@50" S0
 | 
			
		||||
 | 
			
		||||
  OUTPUT 101 CODTAB
 | 
			
		||||
  OUTPUT 102 S0
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
@ -61,6 +64,16 @@ BEGIN
 | 
			
		||||
  PROMPT 1 2 "Descrizione "
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN 103
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 3 "Rimani in inserimento"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN 104
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 4 "Rimani in inserimento"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_CANCEL 10 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT -13 -1 ""
 | 
			
		||||
 | 
			
		||||
@ -35,7 +35,9 @@ void TImmissioneDocumenti_app::init_tabs()
 | 
			
		||||
  {
 | 
			
		||||
    pagenames.add(configfile.get("Descr", NULL,items, "Fatture"));
 | 
			
		||||
    m.filters().add(configfile.get("Filter", NULL,items, "F01"));
 | 
			
		||||
    m.activate_almanac(F_AL01 +	items, items, TDate(TODAY));
 | 
			
		||||
    m.insert().set(items, configfile.get_bool("InsertRemain", NULL, items));
 | 
			
		||||
    m.modify().set(items, configfile.get_bool("ModifyRemain", NULL, items));
 | 
			
		||||
     m.activate_almanac(F_AL01 +	items, items, TDate(TODAY));
 | 
			
		||||
    items++;
 | 
			
		||||
  }
 | 
			
		||||
  m.disable_page(items);
 | 
			
		||||
@ -175,7 +177,7 @@ void TImmissioneDocumenti_mask::open_day_mask(TDate date)
 | 
			
		||||
  switch(exitval)
 | 
			
		||||
  {
 | 
			
		||||
  case K_ENTER:
 | 
			
		||||
    call_ve0(exitval, relation, date, codnum);
 | 
			
		||||
    call_ve0(exitval, relation, date, codnum, EMPTY_STRING, currpage);
 | 
			
		||||
    break;
 | 
			
		||||
  case K_DEL:
 | 
			
		||||
    call_ve0(exitval, relation, date, codnum);
 | 
			
		||||
@ -184,7 +186,7 @@ void TImmissioneDocumenti_mask::open_day_mask(TDate date)
 | 
			
		||||
		{
 | 
			
		||||
			const TString16 tipo(sheet.get(101));
 | 
			
		||||
 | 
			
		||||
			call_ve0(exitval, relation, date, codnum, tipo);
 | 
			
		||||
			call_ve0(exitval, relation, date, codnum, tipo, currpage);
 | 
			
		||||
		}
 | 
			
		||||
    break;
 | 
			
		||||
  case K_ESC:
 | 
			
		||||
@ -192,26 +194,28 @@ void TImmissioneDocumenti_mask::open_day_mask(TDate date)
 | 
			
		||||
  default:
 | 
			
		||||
    break;
 | 
			
		||||
  }
 | 
			
		||||
	TDate caput_anni(1, 1, date.year());
 | 
			
		||||
	TBit_array & dayfl = (TBit_array&) flags()[currpage];
 | 
			
		||||
	dayfl.reset();
 | 
			
		||||
 | 
			
		||||
	filter.cut(0);
 | 
			
		||||
	filter << "(ANNO==\"" << date.year() << "\")" << "&&" << "(CODNUM==\"" << filters().row(currpage) << "\")";
 | 
			
		||||
 | 
			
		||||
	cursor.setfilter(filter);
 | 
			
		||||
	
 | 
			
		||||
	const int doc_items = cursor.items();
 | 
			
		||||
 | 
			
		||||
	for (cursor = 0; cursor.pos() < doc_items; ++cursor)
 | 
			
		||||
		dayfl.set(relation.lfile().get_date(DOC_DATADOC) - caput_anni, 1);
 | 
			
		||||
	if (ordered()[currpage])
 | 
			
		||||
	{
 | 
			
		||||
		TDate caput_anni(1, 1, date.year());
 | 
			
		||||
		TBit_array & fl = (TBit_array&) flags()[currpage];
 | 
			
		||||
 | 
			
		||||
		filter.cut(0);
 | 
			
		||||
		filter << "(ANNO==\"" << date.year() << "\")" << "&&" << "(CODNUM==\"" << filters().row(currpage) << "\")";
 | 
			
		||||
 | 
			
		||||
		cursor.setfilter(filter);
 | 
			
		||||
		
 | 
			
		||||
		const int items = cursor.items();
 | 
			
		||||
 | 
			
		||||
		for (cursor = 0; cursor.pos() < items; ++cursor)
 | 
			
		||||
			fl.set(relation.lfile().get_date(DOC_DATADOC) - caput_anni, 1);
 | 
			
		||||
		caput_anni += fl.last_one();
 | 
			
		||||
		caput_anni += dayfl.last_one();
 | 
			
		||||
		almanac(currpage).set_insert_date(caput_anni);
 | 
			
		||||
	}
 | 
			
		||||
	almanac().force_update();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TImmissioneDocumenti_mask::call_ve0(int exitval, TRelation& relation, TDate& date, const TString& codnum, const TString& doctype)
 | 
			
		||||
void TImmissioneDocumenti_mask::call_ve0(int exitval, TRelation& relation, TDate& date, const TString& codnum, const TString& doctype, byte currpage)
 | 
			
		||||
{
 | 
			
		||||
  TFilename tempfile;
 | 
			
		||||
  tempfile.tempdir();
 | 
			
		||||
@ -224,6 +228,8 @@ void TImmissioneDocumenti_mask::call_ve0(int exitval, TRelation& relation, TDate
 | 
			
		||||
    {
 | 
			
		||||
    case K_ENTER:
 | 
			
		||||
    configfile.set("Action", "Modify", "Transaction");
 | 
			
		||||
		if (_modify[currpage])
 | 
			
		||||
	    configfile.set("Mode", "R", "Transaction");
 | 
			
		||||
    configfile.set("NDOC", relation.lfile().get(DOC_NDOC), "33");
 | 
			
		||||
      break;
 | 
			
		||||
    case K_DEL:
 | 
			
		||||
@ -232,6 +238,8 @@ void TImmissioneDocumenti_mask::call_ve0(int exitval, TRelation& relation, TDate
 | 
			
		||||
      break;
 | 
			
		||||
    case K_INS:
 | 
			
		||||
    configfile.set("Action", "Insert", "Transaction");
 | 
			
		||||
		if (_insert[currpage])
 | 
			
		||||
	    configfile.set("Mode", "R", "Transaction");
 | 
			
		||||
    configfile.set("DATADOC", date.string(), "33");
 | 
			
		||||
      break;
 | 
			
		||||
    default:
 | 
			
		||||
 | 
			
		||||
@ -10,6 +10,9 @@ class TImmissioneDocumenti_mask : public TAlmanac_mask
 | 
			
		||||
  TString_array _filters; // filtri tipodoc per ogni tab
 | 
			
		||||
  TArray _flags; // array di TBit_array. Ognuno di essi è lungo 366 e rappresenta i flag di presenza documenti per ogni giorno dell'anno. Ogni page della maschera ha bisogno di un bitarray diverso
 | 
			
		||||
	TBit_array _ordered;
 | 
			
		||||
	TBit_array _insert;
 | 
			
		||||
	TBit_array _modify;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
     
 | 
			
		||||
@ -26,6 +29,8 @@ public:
 | 
			
		||||
	TString_array & filters() { return _filters;}
 | 
			
		||||
	TArray & flags() { return _flags;}
 | 
			
		||||
	TBit_array & ordered() { return _ordered;}
 | 
			
		||||
	TBit_array & insert() { return _insert;}
 | 
			
		||||
	TBit_array & modify() { return _modify;}
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
// apertura del foglio interno di gestione dei documenti
 | 
			
		||||
@ -33,7 +38,7 @@ public:
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
// chiamata del programma ve0
 | 
			
		||||
  void call_ve0(int exitval, TRelation& relation, TDate& date, const TString& codnum, const TString& doctype = EMPTY_STRING);
 | 
			
		||||
  void call_ve0(int exitval, TRelation& relation, TDate& date, const TString& codnum, const TString& doctype = EMPTY_STRING, byte currpage = 0);
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
// Costruttore
 | 
			
		||||
 | 
			
		||||
@ -65,7 +65,6 @@ class TAlmanac_field : public TWindowed_field
 | 
			
		||||
protected: 
 | 
			
		||||
  // override da TWindowed_field
 | 
			
		||||
  virtual TField_window* create_window(int x, int y, int dx, int dy, WINDOW parent);
 | 
			
		||||
	void force_update(bool update_image = false);
 | 
			
		||||
 | 
			
		||||
  // @access Public Member
 | 
			
		||||
public:
 | 
			
		||||
@ -91,6 +90,7 @@ public:
 | 
			
		||||
  void set_selected_year(int nyear); 
 | 
			
		||||
  // @cmember Gestione del giorno correntemente selezionato: setta il giorno selezionato
 | 
			
		||||
  void set_selected_date(TDate& sdate) { _selecteddate = sdate; } 
 | 
			
		||||
	void force_update(bool update_image = false);
 | 
			
		||||
 | 
			
		||||
  // @access Public Member
 | 
			
		||||
public:
 | 
			
		||||
 | 
			
		||||
@ -1335,7 +1335,7 @@ void TRelation_application::main_loop()
 | 
			
		||||
      case K_SAVE:
 | 
			
		||||
        if (save(FALSE))
 | 
			
		||||
        {
 | 
			
		||||
          if (_autoins_caller.not_empty() || is_transaction())
 | 
			
		||||
          if ((_autoins_caller.not_empty() || is_transaction()) && _curr_trans_mode != TM_REMAIN)
 | 
			
		||||
          {
 | 
			
		||||
            k = K_QUIT;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
@ -24,6 +24,7 @@
 | 
			
		||||
#define TRANSACTION_LINK "LINK"     // Load an existing record and interactively edit it
 | 
			
		||||
#define TM_INTERACTIVE 'I'
 | 
			
		||||
#define TM_AUTOMATIC 'A'
 | 
			
		||||
#define TM_REMAIN 'R'
 | 
			
		||||
// @doc EXTERNAL
 | 
			
		||||
 | 
			
		||||
// @class TRelation_application | Classe per la gestione di una applicazione di manutenzione di uno
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user