Nuove implementazioni
git-svn-id: svn://10.65.10.50/branches/R_10_00@22934 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									e9f6cac415
								
							
						
					
					
						commit
						858ae87f12
					
				
							
								
								
									
										13
									
								
								ci/ci0300a.h
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								ci/ci0300a.h
									
									
									
									
									
								
							@ -26,6 +26,19 @@
 | 
			
		||||
#define F_CODIVANI		 169
 | 
			
		||||
#define F_DESIVANI		 170
 | 
			
		||||
 | 
			
		||||
#define F_CODARTLC		 181
 | 
			
		||||
#define F_DESARTLC		 182
 | 
			
		||||
#define F_CODARTGC		 183
 | 
			
		||||
#define F_DESARTGC		 184
 | 
			
		||||
#define F_CODARTAC		 185
 | 
			
		||||
#define F_DESARTAC		 186
 | 
			
		||||
#define F_CODARTLF		 187
 | 
			
		||||
#define F_DESARTLF		 188
 | 
			
		||||
#define F_CODARTGF		 189
 | 
			
		||||
#define F_DESARTGF		 190
 | 
			
		||||
#define F_CODARTAF		 191
 | 
			
		||||
#define F_DESARTAF		 192
 | 
			
		||||
 | 
			
		||||
#define FR_FILTRO			101
 | 
			
		||||
#define FR_DES				102
 | 
			
		||||
#define FR_INS				103
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										175
									
								
								ci/ci0300a.uml
									
									
									
									
									
								
							
							
						
						
									
										175
									
								
								ci/ci0300a.uml
									
									
									
									
									
								
							@ -132,13 +132,20 @@ STRING F_CODARTPR 20
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 8 "Articolo       "
 | 
			
		||||
  FIELD CODARTPR
 | 
			
		||||
  USE LF_ANAMAG
 | 
			
		||||
  USE LF_ANAMAG /*SELECT (SOTTOCV!=0)&&(SOTTOCA!=0)*/
 | 
			
		||||
  INPUT CODART F_CODARTPR
 | 
			
		||||
  DISPLAY "Codice@20" CODART
 | 
			
		||||
  DISPLAY "Descrizione@50" DESCR
 | 
			
		||||
  DISPLAY "Grp.V." GRUPPOV
 | 
			
		||||
  DISPLAY "Con.V." CONTOV
 | 
			
		||||
  DISPLAY "Sot.V." SOTTOCV
 | 
			
		||||
  DISPLAY "Grp.A." GRUPPOA
 | 
			
		||||
  DISPLAY "Con.A." CONTOA
 | 
			
		||||
  DISPLAY "Sot.A." SOTTOCA
 | 
			
		||||
  OUTPUT F_CODARTPR CODART
 | 
			
		||||
  OUTPUT F_DESARTPR DESCR
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
  ADD RUN ve2 -3
 | 
			
		||||
  FLAG "U"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
@ -146,12 +153,17 @@ STRING F_DESARTPR 50 30
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 45 8 ""
 | 
			
		||||
  USE LF_ANAMAG KEY 2
 | 
			
		||||
  INPUT DESCR F_DESARTPR
 | 
			
		||||
  INPUT DESCR F_DESARTPR /*SELECT (SOTTOCV!=0)&&(SOTTOCA!=0)*/
 | 
			
		||||
  DISPLAY "Descrizione@50" DESCR
 | 
			
		||||
  DISPLAY "Codice@20" CODART
 | 
			
		||||
  DISPLAY "Grp.V." GRUPPOV
 | 
			
		||||
  DISPLAY "Con.V." CONTOV
 | 
			
		||||
  DISPLAY "Sot.V." SOTTOCV
 | 
			
		||||
  DISPLAY "Grp.A." GRUPPOA
 | 
			
		||||
  DISPLAY "Con.A." CONTOA
 | 
			
		||||
  DISPLAY "Sot.A." SOTTOCA
 | 
			
		||||
  COPY OUTPUT F_CODARTPR
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
  FLAG "U"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
GROUPBOX DLG_NULL 78 5
 | 
			
		||||
@ -325,6 +337,163 @@ END
 | 
			
		||||
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
PAGE "Certificati" 0 2 0 0
 | 
			
		||||
 | 
			
		||||
GROUPBOX DLG_NULL 78 5
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 1 "Pagamenti clienti"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_CODARTLC 20
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 2 "Lavori         "
 | 
			
		||||
  COPY USE F_CODARTPR
 | 
			
		||||
  INPUT CODART F_CODARTLC
 | 
			
		||||
  COPY DISPLAY F_CODARTPR
 | 
			
		||||
  OUTPUT F_CODARTLC CODART
 | 
			
		||||
  OUTPUT F_DESARTLC DESCR
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
  ADD RUN ve2 -3
 | 
			
		||||
  FLAG "U"
 | 
			
		||||
  FIELD CODARTLC
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_DESARTLC 50 30
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 45 2 ""
 | 
			
		||||
  COPY USE F_DESARTPR
 | 
			
		||||
  INPUT DESCR F_DESARTLC
 | 
			
		||||
  COPY DISPLAY F_DESARTPR
 | 
			
		||||
  COPY OUTPUT F_CODARTLC
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_CODARTGC 20
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 3 "Garanzia       "
 | 
			
		||||
  COPY USE F_CODARTPR
 | 
			
		||||
  INPUT CODART F_CODARTGC
 | 
			
		||||
  COPY DISPLAY F_CODARTPR
 | 
			
		||||
  OUTPUT F_CODARTGC CODART
 | 
			
		||||
  OUTPUT F_DESARTGC DESCR
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
  ADD RUN ve2 -3
 | 
			
		||||
  FIELD CODARTGC
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_DESARTGC 50 30
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 45 3 ""
 | 
			
		||||
  COPY USE F_DESARTPR
 | 
			
		||||
  INPUT DESCR F_DESARTGC
 | 
			
		||||
  COPY DISPLAY F_DESARTPR
 | 
			
		||||
  COPY OUTPUT F_CODARTGC
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_CODARTAC 20
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 4 "Anticipi       "
 | 
			
		||||
  COPY USE F_CODARTPR
 | 
			
		||||
  INPUT CODART F_CODARTAC
 | 
			
		||||
  COPY DISPLAY F_CODARTPR
 | 
			
		||||
  OUTPUT F_CODARTAC CODART
 | 
			
		||||
  OUTPUT F_DESARTAC DESCR
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
  ADD RUN ve2 -3
 | 
			
		||||
  FLAG "U"
 | 
			
		||||
  FIELD CODARTAC
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_DESARTAC 50 30
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 45 4 ""
 | 
			
		||||
  COPY USE F_DESARTPR
 | 
			
		||||
  INPUT DESCR F_DESARTAC
 | 
			
		||||
  COPY DISPLAY F_DESARTPR
 | 
			
		||||
  COPY OUTPUT F_CODARTAC
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
GROUPBOX DLG_NULL 78 5
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 7 "Pagamenti fornitori"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_CODARTLF 20
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 8 "Lavori         "
 | 
			
		||||
  COPY USE F_CODARTPR
 | 
			
		||||
  INPUT CODART F_CODARTLF
 | 
			
		||||
  COPY DISPLAY F_CODARTPR
 | 
			
		||||
  OUTPUT F_CODARTLF CODART
 | 
			
		||||
  OUTPUT F_DESARTLF DESCR
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
  ADD RUN ve2 -3
 | 
			
		||||
  FLAG "U"
 | 
			
		||||
  FIELD CODARTLF
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_DESARTLF 50 30
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 45 8 ""
 | 
			
		||||
  COPY USE F_DESARTPR
 | 
			
		||||
  INPUT DESCR F_DESARTLF
 | 
			
		||||
  COPY DISPLAY F_DESARTPR
 | 
			
		||||
  COPY OUTPUT F_CODARTLF
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_CODARTGF 20
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 9 "Garanzia       "
 | 
			
		||||
  COPY USE F_CODARTPR
 | 
			
		||||
  INPUT CODART F_CODARTGF
 | 
			
		||||
  COPY DISPLAY F_CODARTPR
 | 
			
		||||
  OUTPUT F_CODARTGF CODART
 | 
			
		||||
  OUTPUT F_DESARTGF DESCR
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
  ADD RUN ve2 -3
 | 
			
		||||
  FLAG "U"
 | 
			
		||||
  FIELD CODARTGF
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_DESARTGF 50 30
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 45 9 ""
 | 
			
		||||
  COPY USE F_DESARTPR
 | 
			
		||||
  INPUT DESCR F_DESARTGF
 | 
			
		||||
  COPY DISPLAY F_DESARTPR
 | 
			
		||||
  COPY OUTPUT F_CODARTGF
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_CODARTAF 20
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 10 "Anticipi       "
 | 
			
		||||
  COPY USE F_CODARTPR
 | 
			
		||||
  INPUT CODART F_CODARTAF
 | 
			
		||||
  COPY DISPLAY F_CODARTPR
 | 
			
		||||
  OUTPUT F_CODARTAF CODART
 | 
			
		||||
  OUTPUT F_DESARTAF DESCR
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
  ADD RUN ve2 -3
 | 
			
		||||
  FLAG "U"
 | 
			
		||||
  FIELD CODARTAF
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_DESARTAF 50 30
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 45 10 ""
 | 
			
		||||
  COPY USE F_DESARTPR
 | 
			
		||||
  INPUT DESCR F_DESARTAF
 | 
			
		||||
  COPY DISPLAY F_DESARTPR
 | 
			
		||||
  COPY OUTPUT F_CODARTAF
 | 
			
		||||
  CHECKTYPE NORMAL
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
ENDMASK
 | 
			
		||||
 | 
			
		||||
PAGE "Tipologia Documento" -1 -1 78 13
 | 
			
		||||
 | 
			
		||||
@ -9,8 +9,6 @@
 | 
			
		||||
#include "../ca/rmovana.h"
 | 
			
		||||
#include "../ve/velib07.h"
 | 
			
		||||
 | 
			
		||||
//#include "../include/doc.h"
 | 
			
		||||
//#include "../include/rdoc.h"
 | 
			
		||||
#include "../ca/commesse.h"
 | 
			
		||||
 | 
			
		||||
///////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
@ -13,8 +13,7 @@
 | 
			
		||||
// Recordset
 | 
			
		||||
///////////////////////////////////////////////////////////
 | 
			
		||||
//recordset per stampe mensili (dettagliate per giorno)
 | 
			
		||||
TRil_ore_recordset::TRil_ore_recordset()
 | 
			
		||||
: TAS400_recordset("AS400(512)")
 | 
			
		||||
TRil_ore_recordset::TRil_ore_recordset() : TAS400_recordset("AS400(512)")
 | 
			
		||||
{
 | 
			
		||||
  //const char* name, int pos, int len, TFieldtypes t = _alfafld, bool required = false, const TVariant& def = NULL_VARIANT
 | 
			
		||||
  create_field("Key1",   -1, 20, _alfafld, true);
 | 
			
		||||
 | 
			
		||||
@ -404,6 +404,7 @@ protected:
 | 
			
		||||
  void get_row_anal_fields(TToken_string & row, TString & cdc, TString & cms, TString & fase) const;
 | 
			
		||||
  void put_row_anal_fields(TToken_string & row, const TString & cdc, const TString & cms, const TString & fase);
 | 
			
		||||
  long save_docs(TAssoc_array& docs, TAssoc_array& movs, TLog_report& log) const;
 | 
			
		||||
  const TString& good_umart(const TString& codart, const TString& um) const;
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
  bool save_sheet();
 | 
			
		||||
@ -638,10 +639,13 @@ bool TConsuntivazione_msk::load_sheet()
 | 
			
		||||
  TSheet_field& sheet = sfield(F_SHEET);
 | 
			
		||||
  sheet.destroy();
 | 
			
		||||
  _locked = true;
 | 
			
		||||
  TProgress_monitor mon(def.items(), TR("Caricamento ore..."), true);
 | 
			
		||||
  int r = 0;
 | 
			
		||||
  for (bool ok = def.move_first(); ok; ok = def.move_next())
 | 
			
		||||
  {
 | 
			
		||||
    sheet.autoload_line(++r, rec);
 | 
			
		||||
    if (!mon.add_status())
 | 
			
		||||
      break;
 | 
			
		||||
    if (rec.get_long(RILORE_NDOC) > 0)
 | 
			
		||||
    {
 | 
			
		||||
      TToken_string& row = sheet.row(r-1);
 | 
			
		||||
@ -749,6 +753,26 @@ void TConsuntivazione_msk::riempi_nuova_riga(int r)
 | 
			
		||||
  sheet.force_update(r);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const TString& TConsuntivazione_msk::good_umart(const TString& codart, const TString& um) const
 | 
			
		||||
{
 | 
			
		||||
  // Reperisce unità di misura standard per codart
 | 
			
		||||
  TString80 key; key << codart << "|1";
 | 
			
		||||
  const TString& defum = cache().get(LF_UMART, key, UMART_UM);
 | 
			
		||||
 | 
			
		||||
  // Controlla unità di misura fuori standard
 | 
			
		||||
  if (um.full() && um != defum) 
 | 
			
		||||
  {
 | 
			
		||||
    TLocalisamfile umart(LF_UMART);
 | 
			
		||||
    umart.setkey(2);
 | 
			
		||||
    umart.put(UMART_CODART, codart);
 | 
			
		||||
    umart.put(UMART_UM,     um);
 | 
			
		||||
    if (umart.read() == NOERR)
 | 
			
		||||
      return um;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return defum;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool TConsuntivazione_msk::add_ril_to_doc(TRectype& rilore, TDocumento& doc, TLog_report& log) const
 | 
			
		||||
{
 | 
			
		||||
  const char tipo_roa = rilore.get_char(RILORE_TIPORA); // 'R'isorsa o 'A'ttrezzatura
 | 
			
		||||
@ -777,6 +801,7 @@ bool TConsuntivazione_msk::add_ril_to_doc(TRectype& rilore, TDocumento& doc, TLo
 | 
			
		||||
  const real ore      = rilore.get(RILORE_QTAORE);
 | 
			
		||||
  const real prezzo   = rilore.get(RILORE_COSTO);
 | 
			
		||||
  const TString80 cms = rilore.get(RILORE_CODCMS);
 | 
			
		||||
  const TString16 fas = rilore.get(RILORE_CODFASE);
 | 
			
		||||
  
 | 
			
		||||
  int found = 0;
 | 
			
		||||
  if (!ore.is_zero() && !prezzo.is_zero())
 | 
			
		||||
@ -785,7 +810,8 @@ bool TConsuntivazione_msk::add_ril_to_doc(TRectype& rilore, TDocumento& doc, TLo
 | 
			
		||||
    {
 | 
			
		||||
      if (rdoc->get(RDOC_CODARTMAG) == codart && 
 | 
			
		||||
          rdoc->get_real(RDOC_PREZZO) == prezzo && 
 | 
			
		||||
          rdoc->get(RDOC_CODCMS) == cms)
 | 
			
		||||
          rdoc->get(RDOC_CODCMS) == cms &&
 | 
			
		||||
          rdoc->get(RDOC_FASCMS) == fas)
 | 
			
		||||
      {
 | 
			
		||||
        found = r;
 | 
			
		||||
        break;
 | 
			
		||||
@ -798,6 +824,7 @@ bool TConsuntivazione_msk::add_ril_to_doc(TRectype& rilore, TDocumento& doc, TLo
 | 
			
		||||
      riga.put(RDOC_CODART, codart);
 | 
			
		||||
      riga.put(RDOC_CODARTMAG, codart);
 | 
			
		||||
      riga.put(RDOC_CODCMS, cms);
 | 
			
		||||
      riga.put(RDOC_FASCMS, fas);
 | 
			
		||||
      riga.put(RDOC_CHECKED, "X");
 | 
			
		||||
      riga.put(RDOC_DESCR, anamag.get(ANAMAG_DESCR));
 | 
			
		||||
      riga.put(RDOC_PREZZO, prezzo);
 | 
			
		||||
@ -808,14 +835,13 @@ bool TConsuntivazione_msk::add_ril_to_doc(TRectype& rilore, TDocumento& doc, TLo
 | 
			
		||||
        codiva = anamag.get(ANAMAG_CODIVA);
 | 
			
		||||
      riga.put(RDOC_CODIVA, codiva);
 | 
			
		||||
 | 
			
		||||
      // Controllo unità di misura
 | 
			
		||||
      TString4 um = roa.get("S7");
 | 
			
		||||
      if (um.blank())
 | 
			
		||||
      {
 | 
			
		||||
        TString80 key; key << codart << "|1";
 | 
			
		||||
        um = cache().get(LF_UMART, key, UMART_UM);
 | 
			
		||||
      }
 | 
			
		||||
      if (disponibilita)
 | 
			
		||||
        um = good_umart(codart, EMPTY_STRING);
 | 
			
		||||
      else
 | 
			
		||||
        um = good_umart(codart, um);
 | 
			
		||||
      riga.put(RDOC_UMQTA, um);
 | 
			
		||||
 | 
			
		||||
      found = riga.get_int(RDOC_NRIGA);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
@ -849,26 +875,31 @@ bool TConsuntivazione_msk::add_ril_to_mov(TRectype& rilore, TAnal_mov& mov, TLog
 | 
			
		||||
  const real ore      = rilore.get(RILORE_QTAORE);
 | 
			
		||||
  const real prezzo   = rilore.get(RILORE_COSTO);
 | 
			
		||||
  const TString80 cms = rilore.get(RILORE_CODCMS);
 | 
			
		||||
  const TString16 fas = rilore.get(RILORE_CODFASE);
 | 
			
		||||
 | 
			
		||||
  bool done = !ore.is_zero() && !prezzo.is_zero();
 | 
			
		||||
  if (done)
 | 
			
		||||
  {
 | 
			
		||||
    // Cerca eventuale riga compatibile 
 | 
			
		||||
    int i = 0;
 | 
			
		||||
    for (i = mov.rows(); i > 0; i--)
 | 
			
		||||
    {
 | 
			
		||||
      TRectype& row = mov.body()[i];
 | 
			
		||||
      if (row.get(RMOVANA_CODCONTO) == conto && row.get(RMOVANA_CODCMS) == cms)
 | 
			
		||||
      const TRectype& row = mov.body()[i];
 | 
			
		||||
      if (row.get(RMOVANA_CODCONTO) == conto && row.get(RMOVANA_CODCMS) == cms && row.get(RMOVANA_CODFASE) == fas)
 | 
			
		||||
        break;
 | 
			
		||||
    }
 | 
			
		||||
    // Crea nuova riga se necessario
 | 
			
		||||
    if (i <= 0)
 | 
			
		||||
    {
 | 
			
		||||
      TRectype& row = mov.new_row();
 | 
			
		||||
      row.put(RMOVANA_CODCONTO, conto);
 | 
			
		||||
      row.put(RMOVANA_CODCMS,   cms);
 | 
			
		||||
      row.put(RMOVANA_CODFASE,  fas);
 | 
			
		||||
      i = row.get_int(RMOVANA_NUMRIG);
 | 
			
		||||
    }
 | 
			
		||||
    // Incrementa importo
 | 
			
		||||
    TRectype& row = mov.body()[i];
 | 
			
		||||
    row.put(RMOVANA_SEZIONE, "D");
 | 
			
		||||
    row.put(RMOVANA_SEZIONE, 'D');
 | 
			
		||||
    row.add(RMOVANA_IMPORTO, ore*prezzo);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -981,15 +1012,16 @@ bool TConsuntivazione_msk::contabilizza()
 | 
			
		||||
    break;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  TMask m(TR("Parametri contabilizzazione"), 1, 28, 5);
 | 
			
		||||
  TMask m(TR("Parametri contabilizzazione"), 1, 28, 7);
 | 
			
		||||
  m.add_button_tool(DLG_OK,     "", TOOL_OK);
 | 
			
		||||
  m.add_button_tool(DLG_CANCEL, "", TOOL_CANCEL);
 | 
			
		||||
  m.add_button_tool(DLG_INFO,   "", TOOL_INFO);
 | 
			
		||||
  m.add_date(101, 0, PR("Dal giorno "), 1, 1, daily ? "" : "D").check_type(CHECK_REQUIRED);
 | 
			
		||||
  m.add_date(102, 0, PR("Al giorno  "), 1, 2, daily ? "" : "D").check_type(CHECK_REQUIRED);
 | 
			
		||||
  m.add_boolean(103, 0, TR("Generazione analitica"), 1, 3, "D");
 | 
			
		||||
  m.set(101, dal);
 | 
			
		||||
  m.set(102, al);
 | 
			
		||||
  if (main_app().has_module(CAAUT))
 | 
			
		||||
  if (ca_config().get_int("Authorizations") > 1)
 | 
			
		||||
  {
 | 
			
		||||
    m.enable(103);
 | 
			
		||||
    m.set(103, "X");
 | 
			
		||||
@ -1074,7 +1106,7 @@ bool TConsuntivazione_msk::contabilizza()
 | 
			
		||||
          << "\nFROM TIPO=C DADATA=" << dal
 | 
			
		||||
          << "\nTO TIPO=C DADATA=" << al;
 | 
			
		||||
    TISAM_recordset recset(query);
 | 
			
		||||
    TProgind pi(recset.items(), msg);
 | 
			
		||||
    TProgress_monitor pi(recset.items(), msg);
 | 
			
		||||
    TRectype& rilore = recset.cursor()->curr();
 | 
			
		||||
    for (bool ok = recset.move_first(); ok; ok = recset.move_next())
 | 
			
		||||
    {
 | 
			
		||||
@ -1177,7 +1209,7 @@ bool TConsuntivazione_msk::cerca_disponibilita(int riga) const
 | 
			
		||||
  const TToken_string& r = s.row(riga);
 | 
			
		||||
  TString80 cod_att; r.get(col_att, cod_att);  cod_att.trim();
 | 
			
		||||
  TString4 tipo_ora; r.get(col_ora, tipo_ora); tipo_ora.trim();
 | 
			
		||||
  TString80 cod_cms; r.get(col_cms, cod_att); cod_cms.trim();
 | 
			
		||||
  TString80 cod_cms; r.get(col_cms, cod_cms);  cod_cms.trim();
 | 
			
		||||
  for (int i = riga-1; i <= riga+1; i+=2)
 | 
			
		||||
  {
 | 
			
		||||
    if (i >= 0 && i < s.items())
 | 
			
		||||
@ -1329,7 +1361,8 @@ bool TConsuntivazione_msk::on_field_event(TOperable_field& o, TField_event e, lo
 | 
			
		||||
              TToken_string& rowd = sheet.row(nr);
 | 
			
		||||
              rowd = row;
 | 
			
		||||
              rowd.add(orad, 4);
 | 
			
		||||
              rowd.add(1, 5);
 | 
			
		||||
              if (atr.get_int("I13") != 2) // Se non è un'attrezzatura forza le ore a 1
 | 
			
		||||
                rowd.add(1, 5);            // altrimenti lascia la stessa quantità della riga collegata
 | 
			
		||||
              rowd.add(atr.get("R11"), 6);
 | 
			
		||||
              sheet.force_update(nr);
 | 
			
		||||
            }
 | 
			
		||||
@ -1454,6 +1487,7 @@ TConsuntivazione_msk::TConsuntivazione_msk() : _locked(false)
 | 
			
		||||
		{
 | 
			
		||||
		  if (fasinfo.parent() == LF_COMMESSE)
 | 
			
		||||
			{
 | 
			
		||||
        // Commessa in testata per filtro / proposta
 | 
			
		||||
				int h = ca_multilevel_code_info(LF_COMMESSE).levels();
 | 
			
		||||
        const int h1 = ca_create_fields_compact(*this, 0, LF_FASI, 2, y, dlg, dlg + 100); 
 | 
			
		||||
				y += 2;
 | 
			
		||||
@ -1462,6 +1496,8 @@ TConsuntivazione_msk::TConsuntivazione_msk() : _locked(false)
 | 
			
		||||
				_fase_sid = _cms_lid + 1;
 | 
			
		||||
				_fase_lid = dlg + h1 - 1;
 | 
			
		||||
				dlg += h1;
 | 
			
		||||
 | 
			
		||||
        // Commessa nelle righe
 | 
			
		||||
        const int sh = ca_create_fields_compact(sm, 0, LF_FASI, 1, sy, sdlg, sdlg + 50);
 | 
			
		||||
				sy += 2;
 | 
			
		||||
				_scms_sid = sdlg;
 | 
			
		||||
@ -1495,6 +1531,16 @@ TConsuntivazione_msk::TConsuntivazione_msk() : _locked(false)
 | 
			
		||||
		sdlg += h;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
  // Sistema nome del campo CODCMS
 | 
			
		||||
  for (short id = _scms_lid; id >= _scms_sid; id--)
 | 
			
		||||
  {
 | 
			
		||||
    TEdit_field& ef = sm.efield(id);
 | 
			
		||||
    TFieldref* fr = (TFieldref*)ef.field(); 
 | 
			
		||||
    if (fr != NULL)
 | 
			
		||||
      fr->set_name(RILORE_CODCMS);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  for (short id = S_CDC12 + 100; id >= S_CDC1 + 100; id--)
 | 
			
		||||
  {
 | 
			
		||||
    const int pos = sm.id2pos(id);
 | 
			
		||||
 | 
			
		||||
@ -14,6 +14,14 @@ Picture = <cg01>
 | 
			
		||||
Module  = 8
 | 
			
		||||
Flags   = "F"
 | 
			
		||||
Item_01 = "Parametri di configurazione", "ci0 -2", "F"
 | 
			
		||||
Item_02 = "Parametri Contabilità Analitica", "ca0 -2", "F"
 | 
			
		||||
Item_03 = "Tabelle di ripartizione", "ca0 -7", "F"
 | 
			
		||||
Item_04 = "Piano dei conti", "ca0 -3", "SF"
 | 
			
		||||
Item_05 = "Centri di costo", "ca0 -4", "SF"
 | 
			
		||||
Item_06 = "Commesse", "ca0 -5", "SF"
 | 
			
		||||
Item_07 = "Fasi", "ca0 -6", "SF"
 | 
			
		||||
Item_08 = "Responsabili commessa", "ca0 -0 RSP", "F"
 | 
			
		||||
Item_09 = "Tipi Lavoro", "ca0 -0 TPL", "F"
 | 
			
		||||
 | 
			
		||||
[CIMENU_003]
 | 
			
		||||
Caption = "Rilevazione Ore"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user