Patch level : 12.0 598
Files correlati : cg, ve, ba, fp Commento : Prima release del modulo fp BA: - Aggiunto campo "Modalità di Pagamento" alla tabella "Ulteriore classificazione" - Aggiunto campo "Tipo di pagamento SDI" al programma di gestione dei tipi pagamento CG: Modifiche programma clienti/fornitori: - Rinominato gruppo da "Numeri telefonici" a "Contatti" - Spostati e modificati campi delle email per aggiungere la PEC Modifiche cgpagame: - Aggiunto _cond_pag e gestione del campo VE: Modifiche ai tipidoc - Aggiunto tipo documenti SDI - Aggiunto il regime fiscale FP: - prima implementazione del modulo Interne: - In applicat rimosso blocco in caso di programma non abilitato per rangers - Aggiunto in modaut il nuovo programma fp - Resa cid2index static con metodo in xvtility - Perfezionata libreria tsdb + xvtdb grazie ai test fatti da me medesimo per l'fp
This commit is contained in:
		
							parent
							
								
									faa0e2b6ec
								
							
						
					
					
						commit
						9520fe2efd
					
				@ -13,7 +13,7 @@
 | 
			
		||||
  <PropertyGroup Label="Globals">
 | 
			
		||||
    <ProjectGuid>{D53794B2-2BDD-4D8F-BEFF-A65DA01D5B03}</ProjectGuid>
 | 
			
		||||
    <RootNamespace>ba_masktab</RootNamespace>
 | 
			
		||||
    <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
 | 
			
		||||
    <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
 | 
			
		||||
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
 | 
			
		||||
@ -403,6 +403,36 @@
 | 
			
		||||
      <FileType>Document</FileType>
 | 
			
		||||
    </TrrCompiler>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbais.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbban.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbcig.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbclr.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbcrs.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbcup.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbdet.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbitl.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbiva.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batblis.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batblng.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbnoc.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbois.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbpri.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbrgi.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbsad.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbsce.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbsta.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbstt.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbtrb.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbucc.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbucs.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbues.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbuid.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbuiv.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbure.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbval.h" />
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbvid.h" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
 | 
			
		||||
  <ImportGroup Label="ExtensionTargets">
 | 
			
		||||
    <Import Project="CampoRules.targets" />
 | 
			
		||||
 | 
			
		||||
@ -19,6 +19,9 @@
 | 
			
		||||
    <Filter Include="Trr">
 | 
			
		||||
      <UniqueIdentifier>{d07d5cc7-7455-46b6-a38b-52bf67307d98}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="Headers">
 | 
			
		||||
      <UniqueIdentifier>{753adcac-715d-4825-b50c-58fdf0db114b}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <MskCompiler Include="..\src\ba\bastais.uml">
 | 
			
		||||
@ -159,6 +162,9 @@
 | 
			
		||||
    <MskCompiler Include="..\src\ba\batbcup.uml">
 | 
			
		||||
      <Filter>Mask</Filter>
 | 
			
		||||
    </MskCompiler>
 | 
			
		||||
    <MskCompiler Include="..\src\ba\batbpri.uml">
 | 
			
		||||
      <Filter>Mask</Filter>
 | 
			
		||||
    </MskCompiler>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <RepCompiler Include="..\src\ba\bastais.rep">
 | 
			
		||||
@ -384,4 +390,90 @@
 | 
			
		||||
      <Filter>Trr</Filter>
 | 
			
		||||
    </TrrCompiler>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbois.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbpri.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbrgi.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbsad.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbsce.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbsta.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbstt.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbtrb.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbucc.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbucs.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbues.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbuid.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbuiv.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbure.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbval.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbvid.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbais.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbban.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbcig.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbclr.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbcrs.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbcup.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbdet.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbitl.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbiva.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batblis.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batblng.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="..\src\ba\batbnoc.h">
 | 
			
		||||
      <Filter>Headers</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
</Project>
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								lib/sqlapi.lib
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lib/sqlapi.lib
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								lib/sqlapid.lib
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								lib/sqlapid.lib
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							@ -35,8 +35,16 @@
 | 
			
		||||
#endif
 | 
			
		||||
#include <time.h>
 | 
			
		||||
#include <stdarg.h>
 | 
			
		||||
#if (defined(_MSC_VER) &&  _MSC_VER >= 1600) || (defined(__BORLANDC__) && __BORLANDC__ >= 0x0630) || defined(__GNUC__) || defined(__SUNPRO_C)
 | 
			
		||||
#define SA_HAVE_STDINT_H
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
#endif
 | 
			
		||||
#include <limits.h>
 | 
			
		||||
 | 
			
		||||
#ifndef SIZE_MAX
 | 
			
		||||
#define SIZE_MAX ULONG_MAX
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef SQLAPI_WINDOWS
 | 
			
		||||
// 64-bit integer
 | 
			
		||||
typedef __int64 sa_int64_t;
 | 
			
		||||
@ -53,10 +61,7 @@ typedef unsigned long long int sa_uint64_t;
 | 
			
		||||
 | 
			
		||||
#ifdef SA_USE_STL
 | 
			
		||||
#include <string>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef SIZE_MAX
 | 
			
		||||
#define SIZE_MAX UINT_MAX
 | 
			
		||||
#include <hash_map>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
class ISAClient;
 | 
			
		||||
@ -115,6 +120,8 @@ typedef
 | 
			
		||||
	SA_SQLite_Client,
 | 
			
		||||
	//! SQL Anywere
 | 
			
		||||
	SA_SQLAnywhere_Client,
 | 
			
		||||
	//! CubeSQL
 | 
			
		||||
	SA_CubeSQL_Client,
 | 
			
		||||
	_SA_Client_Reserverd = (int)(((unsigned int)(-1))/2)
 | 
			
		||||
} SAClient_t;
 | 
			
		||||
 | 
			
		||||
@ -127,11 +134,31 @@ typedef
 | 
			
		||||
	SA_UserGenerated_Error,
 | 
			
		||||
	//! the Library-generated error
 | 
			
		||||
	SA_Library_Error,
 | 
			
		||||
	//! DBMS API error occured
 | 
			
		||||
	//! DBMS API error occurred
 | 
			
		||||
	SA_DBMS_API_Error,
 | 
			
		||||
	_SA_ErrorClass_Reserved = (int)(((unsigned int)(-1))/2)
 | 
			
		||||
} SAErrorClass_t;
 | 
			
		||||
 | 
			
		||||
typedef
 | 
			
		||||
enum eSALibraryErrorType
 | 
			
		||||
{
 | 
			
		||||
    SA_Library_Error_Nomem,
 | 
			
		||||
    SA_Library_Error_ClientNotSet,
 | 
			
		||||
    SA_Library_Error_ClientNotSupported,
 | 
			
		||||
    SA_Library_Error_LoadLibraryFails,
 | 
			
		||||
    SA_Library_Error_GetLibraryVersionFails,
 | 
			
		||||
    SA_Library_Error_ClienVersionOld,
 | 
			
		||||
    SA_Library_Error_ClientInitFails,
 | 
			
		||||
    SA_Library_Error_BindVarNotFound,
 | 
			
		||||
    SA_Library_Error_FieldNotFound,
 | 
			
		||||
    SA_Library_Error_UnknownDataType,
 | 
			
		||||
    SA_Library_Error_UnknownParameterType,
 | 
			
		||||
    SA_Library_Error_UnknownColumnType,
 | 
			
		||||
    SA_Library_Error_WrongConversion,
 | 
			
		||||
    SA_Library_Error_WrongDatetime,
 | 
			
		||||
    _SA_Library_Error_Reserved = (int)(((unsigned int)(-1)) / 2)
 | 
			
		||||
} SALibraryErrorType_t;
 | 
			
		||||
 | 
			
		||||
typedef
 | 
			
		||||
	enum eSAIsolationLevel
 | 
			
		||||
{
 | 
			
		||||
@ -319,7 +346,7 @@ public:
 | 
			
		||||
	SAString(const wchar_t *lpch, size_t nLength);
 | 
			
		||||
	//! Initializes SAString from unsigned characters (converts to SAChar)
 | 
			
		||||
	SAString(const unsigned char *psz);
 | 
			
		||||
	//! Special constructor for binary data (no converion to SAChar)
 | 
			
		||||
	//! Special constructor for binary data (no conversion to SAChar)
 | 
			
		||||
	SAString(const void *pBuffer, size_t nLengthInBytes);
 | 
			
		||||
 | 
			
		||||
	// Attributes & Operations
 | 
			
		||||
@ -413,12 +440,12 @@ public:
 | 
			
		||||
 | 
			
		||||
	//! Remove continuous occurrences of chTarget starting from right
 | 
			
		||||
	void TrimRight(SAChar chTarget);
 | 
			
		||||
	//! Remove continuous occcurrences of characters in passed string,
 | 
			
		||||
	//! Remove continuous occurrences of characters in passed string,
 | 
			
		||||
	// starting from right
 | 
			
		||||
	void TrimRight(const SAChar *lpszTargets);
 | 
			
		||||
	//! Remove continuous occurrences of chTarget starting from left
 | 
			
		||||
	void TrimLeft(SAChar chTarget);
 | 
			
		||||
	//! Remove continuous occcurrences of characters in
 | 
			
		||||
	//! Remove continuous occurrences of characters in
 | 
			
		||||
	// passed string, starting from left
 | 
			
		||||
	void TrimLeft(const SAChar *lpszTargets);
 | 
			
		||||
 | 
			
		||||
@ -498,14 +525,14 @@ public:
 | 
			
		||||
	const char *GetUTF8Chars() const;
 | 
			
		||||
	// get string length (in UTF8 characters)
 | 
			
		||||
	size_t GetUTF8CharsLength() const;
 | 
			
		||||
	// assing UTF8 data
 | 
			
		||||
	// assign UTF8 data
 | 
			
		||||
	void SetUTF8Chars(const char* szSrc, size_t nSrcLen = SIZE_MAX);
 | 
			
		||||
#endif	// SA_UNICODE
 | 
			
		||||
	// return pointer to const UTF16 string
 | 
			
		||||
	const void *GetUTF16Chars() const;
 | 
			
		||||
	// get string length (in UTF16 characters)
 | 
			
		||||
	size_t GetUTF16CharsLength() const;
 | 
			
		||||
	// assing UTF16 data
 | 
			
		||||
	// assign UTF16 data
 | 
			
		||||
	void SetUTF16Chars(const void* szSrc, size_t nSrcLen = SIZE_MAX);
 | 
			
		||||
 | 
			
		||||
	// Implementation
 | 
			
		||||
@ -539,10 +566,6 @@ protected:
 | 
			
		||||
public:
 | 
			
		||||
	SAString(const std::string &stringSrc);
 | 
			
		||||
	SAString(const std::wstring &stringSrc);
 | 
			
		||||
	const SAString &operator=(const std::string &stringSrc);
 | 
			
		||||
	const SAString &operator=(const std::wstring &stringSrc);
 | 
			
		||||
	const SAString &operator+=(const std::string &stringSrc);
 | 
			
		||||
	const SAString &operator+=(const std::wstring &stringSrc);
 | 
			
		||||
#endif
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@ -640,7 +663,6 @@ public:
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	double m_interval;
 | 
			
		||||
    unsigned int m_nFraction;	// 0..999999999
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
//! Provides support for manipulating date/time values
 | 
			
		||||
@ -739,8 +761,12 @@ public:
 | 
			
		||||
 | 
			
		||||
class SQLAPI_API saOptions
 | 
			
		||||
{
 | 
			
		||||
#ifdef SA_USE_STL
 | 
			
		||||
    std::hash_map<std::string, SAParam*> *m_pOptions;
 | 
			
		||||
#else
 | 
			
		||||
	int		m_nOptionCount;
 | 
			
		||||
	SAParam	**m_ppOptions;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	// disable copy constructor
 | 
			
		||||
@ -754,6 +780,8 @@ public:
 | 
			
		||||
 | 
			
		||||
	SAString &operator[](const SAString &sOptionName);
 | 
			
		||||
	SAString operator[](const SAString &sOptionName) const;
 | 
			
		||||
	int size() const;
 | 
			
		||||
	SAString operator[](int nIndex) const;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
//! Represents an unique session with a data source
 | 
			
		||||
@ -822,6 +850,8 @@ public:
 | 
			
		||||
 | 
			
		||||
	SAString &setOption(const SAString &sOptionName);
 | 
			
		||||
	SAString Option(const SAString &sOptionName) const;
 | 
			
		||||
	int TotalOptions() const;
 | 
			
		||||
	SAString Option(int nIndex) const;
 | 
			
		||||
 | 
			
		||||
	saAPI *NativeAPI() const SQLAPI_THROW(SAException);
 | 
			
		||||
	saConnectionHandles *NativeHandles() SQLAPI_THROW(SAException);
 | 
			
		||||
@ -910,7 +940,8 @@ private:
 | 
			
		||||
		size_t nFieldSize,
 | 
			
		||||
		int nFieldPrecision,
 | 
			
		||||
		int nFieldScale,
 | 
			
		||||
		bool bFieldRequired);
 | 
			
		||||
		bool bFieldRequired,
 | 
			
		||||
        int nTotalFieldCount);
 | 
			
		||||
	void DestroyFields();
 | 
			
		||||
 | 
			
		||||
	// parses sql statement and create bind parameters array if any (In)
 | 
			
		||||
@ -1006,6 +1037,8 @@ public:
 | 
			
		||||
 | 
			
		||||
	SAString &setOption(const SAString &sOptionName);
 | 
			
		||||
	SAString Option(const SAString &sOptionName) const;
 | 
			
		||||
	int TotalOptions() const;
 | 
			
		||||
	SAString Option(int nIndex) const;
 | 
			
		||||
 | 
			
		||||
	saCommandHandles *NativeHandles() SQLAPI_THROW(SAException);
 | 
			
		||||
	void setBatchExceptionPreHandler(PreHandleException_t fnHandler, void* pAddlData);
 | 
			
		||||
@ -1037,6 +1070,7 @@ class SQLAPI_API SAValueRead
 | 
			
		||||
	friend class Isl3Cursor;
 | 
			
		||||
	friend class IssNCliCursor;
 | 
			
		||||
	friend class IasaCursor;
 | 
			
		||||
	friend class IcubeSqlCursor;
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
	SALongOrLobReaderModes_t m_eReaderMode;
 | 
			
		||||
@ -1184,6 +1218,7 @@ class SQLAPI_API SAValue : public SAValueRead
 | 
			
		||||
	friend class Isl3Cursor;
 | 
			
		||||
	friend class IssNCliCursor;
 | 
			
		||||
	friend class IasaCursor;
 | 
			
		||||
	friend class IcubeSqlCursor;
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	bool m_bInternalUseDefault;
 | 
			
		||||
@ -1203,6 +1238,12 @@ protected:
 | 
			
		||||
		size_t nCallerMaxSize,
 | 
			
		||||
		void *&pBuf);
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	// disable copy constructor
 | 
			
		||||
	SAValue(const SAValue &);
 | 
			
		||||
	// disable assignment operator
 | 
			
		||||
	SAValue &operator = (const SAValue &);
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	SAValue(SADataType_t eDataType);
 | 
			
		||||
	virtual ~SAValue();
 | 
			
		||||
@ -1461,6 +1502,8 @@ public:
 | 
			
		||||
 | 
			
		||||
	SAString &setOption(const SAString &sOptionName);
 | 
			
		||||
	SAString Option(const SAString &sOptionName) const;
 | 
			
		||||
	int TotalOptions() const;
 | 
			
		||||
	SAString Option(int nIndex) const;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class SQLAPI_API SAException
 | 
			
		||||
@ -1515,6 +1558,9 @@ public:
 | 
			
		||||
	SQLAPI_EXCEPTION_HAS_CUSTOM_MEMBERS
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    SAException& operator=(const SAException &other);
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
	SAErrorClass_t	m_eErrorClass;
 | 
			
		||||
	int				m_nNativeError;
 | 
			
		||||
@ -1569,8 +1615,8 @@ public:
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define SQLAPI_VER_MAJOR	4
 | 
			
		||||
#define SQLAPI_VER_MINOR	1
 | 
			
		||||
#define SQLAPI_VER_BUILD	5
 | 
			
		||||
#define SQLAPI_VER_MINOR	2
 | 
			
		||||
#define SQLAPI_VER_BUILD	2
 | 
			
		||||
 | 
			
		||||
#endif // !defined(__SQLAPI_H__)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										124
									
								
								libraries/SQLAPI/include/cubeSqlAPI.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										124
									
								
								libraries/SQLAPI/include/cubeSqlAPI.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,124 @@
 | 
			
		||||
//////////////////////////////////////////////////////////////////////
 | 
			
		||||
// cubeSqlAPI.h
 | 
			
		||||
//////////////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
#if !defined(__CUBESQLAPI_H__)
 | 
			
		||||
#define __CUBESQLAPI_H__
 | 
			
		||||
 | 
			
		||||
#include <SQLAPI.h>
 | 
			
		||||
#include <cubesql.h>
 | 
			
		||||
 | 
			
		||||
extern void AddCubeSqlSupport(const SAConnection * pCon);
 | 
			
		||||
extern void ReleaseCubeSqlSupport();
 | 
			
		||||
 | 
			
		||||
typedef int (*cubesql_connect_t)(csqldb **db, const char *host, int port, const char *username, const char *password, int timeout, int encryption);
 | 
			
		||||
typedef int (*cubesql_connect_ssl_t)(csqldb **db, const char *host, int port, const char *username, const char *password, int timeout, char *ssl_certificate_path);
 | 
			
		||||
typedef void (*cubesql_disconnect_t)(csqldb *db, int gracefully);
 | 
			
		||||
typedef int (*cubesql_execute_t)(csqldb *db, const char *sql);
 | 
			
		||||
typedef csqlc* (*cubesql_select_t)(csqldb *db, const char *sql, int unused);
 | 
			
		||||
typedef int (*cubesql_commit_t)(csqldb *db);
 | 
			
		||||
typedef int (*cubesql_rollback_t)(csqldb *db);
 | 
			
		||||
typedef int (*cubesql_bind_t)(csqldb *db, const char *sql, char **colvalue, int *colsize, int *coltype, int ncols);
 | 
			
		||||
typedef int (*cubesql_ping_t)(csqldb *db);
 | 
			
		||||
typedef void (*cubesql_cancel_t)(csqldb *db);
 | 
			
		||||
typedef int (*cubesql_errcode_t)(csqldb *db);
 | 
			
		||||
typedef char* (*cubesql_errmsg_t)(csqldb *db);
 | 
			
		||||
typedef int64 (*cubesql_changes_t)(csqldb *db);
 | 
			
		||||
typedef void (*cubesql_trace_t)(csqldb *db, trace_function trace, void *arg);
 | 
			
		||||
 | 
			
		||||
typedef csqlvm* (*cubesql_vmprepare_t)(csqldb *db, const char *sql);
 | 
			
		||||
typedef int (*cubesql_vmbind_int_t)(csqlvm *vm, int index, int value);
 | 
			
		||||
typedef int (*cubesql_vmbind_double_t)(csqlvm *vm, int index, double value);
 | 
			
		||||
typedef int (*cubesql_vmbind_text_t)(csqlvm *vm, int index, char *value, int len);
 | 
			
		||||
typedef int (*cubesql_vmbind_blob_t)(csqlvm *vm, int index, void *value, int len);
 | 
			
		||||
typedef int (*cubesql_vmbind_null_t)(csqlvm *vm, int index);
 | 
			
		||||
typedef int (*cubesql_vmbind_int64_t)(csqlvm *vm, int index, int64 value);
 | 
			
		||||
typedef int (*cubesql_vmbind_zeroblob_t)(csqlvm *vm, int index, int len);
 | 
			
		||||
typedef int (*cubesql_vmexecute_t)(csqlvm *vm);
 | 
			
		||||
typedef csqlc* (*cubesql_vmselect_t)(csqlvm *vm);
 | 
			
		||||
typedef int (*cubesql_vmclose_t)(csqlvm *vm);
 | 
			
		||||
 | 
			
		||||
typedef int (*cubesql_cursor_numrows_t)(csqlc *c);
 | 
			
		||||
typedef int (*cubesql_cursor_numcolumns_t)(csqlc *c);
 | 
			
		||||
typedef int (*cubesql_cursor_currentrow_t)(csqlc *c);
 | 
			
		||||
typedef int (*cubesql_cursor_seek_t)(csqlc *c, int index);
 | 
			
		||||
typedef int (*cubesql_cursor_iseof_t)(csqlc *c);
 | 
			
		||||
typedef int (*cubesql_cursor_columntype_t)(csqlc *c, int index);
 | 
			
		||||
typedef char* (*cubesql_cursor_field_t)(csqlc *c, int row, int column, int *len);
 | 
			
		||||
typedef int64 (*cubesql_cursor_rowid_t)(csqlc *c, int row);
 | 
			
		||||
typedef int64 (*cubesql_cursor_int64_t)(csqlc *c, int row, int column, int64 default_value);
 | 
			
		||||
typedef int (*cubesql_cursor_int_t)(csqlc *c, int row, int column, int default_value);
 | 
			
		||||
typedef double (*cubesql_cursor_double_t)(csqlc *c, int row, int column, double default_value);
 | 
			
		||||
typedef char* (*cubesql_cursor_cstring_t)(csqlc *c, int row, int column);
 | 
			
		||||
typedef char* (*cubesql_cursor_cstring_static_t)(csqlc *c, int row, int column, char *static_buffer, int bufferlen);
 | 
			
		||||
typedef void (*cubesql_cursor_free_t)(csqlc *c);
 | 
			
		||||
 | 
			
		||||
// API declarations
 | 
			
		||||
class SQLAPI_API cubeSqlAPI : public saAPI
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
	cubeSqlAPI();
 | 
			
		||||
 | 
			
		||||
	cubesql_connect_t cubesql_connect;
 | 
			
		||||
	cubesql_connect_ssl_t cubesql_connect_ssl;
 | 
			
		||||
	cubesql_disconnect_t cubesql_disconnect;
 | 
			
		||||
	cubesql_execute_t cubesql_execute;
 | 
			
		||||
	cubesql_select_t cubesql_select;
 | 
			
		||||
	cubesql_commit_t cubesql_commit;
 | 
			
		||||
	cubesql_rollback_t cubesql_rollback;
 | 
			
		||||
	cubesql_bind_t cubesql_bind;
 | 
			
		||||
	cubesql_ping_t cubesql_ping;
 | 
			
		||||
	cubesql_cancel_t cubesql_cancel;
 | 
			
		||||
	cubesql_errcode_t cubesql_errcode;
 | 
			
		||||
	cubesql_errmsg_t cubesql_errmsg;
 | 
			
		||||
	cubesql_changes_t cubesql_changes;
 | 
			
		||||
	cubesql_trace_t cubesql_trace;
 | 
			
		||||
 | 
			
		||||
	cubesql_vmprepare_t cubesql_vmprepare;
 | 
			
		||||
	cubesql_vmbind_int_t cubesql_vmbind_int;
 | 
			
		||||
	cubesql_vmbind_double_t cubesql_vmbind_double;
 | 
			
		||||
	cubesql_vmbind_text_t cubesql_vmbind_text;
 | 
			
		||||
	cubesql_vmbind_blob_t cubesql_vmbind_blob;
 | 
			
		||||
	cubesql_vmbind_null_t cubesql_vmbind_null;
 | 
			
		||||
	cubesql_vmbind_int64_t cubesql_vmbind_int64;
 | 
			
		||||
	cubesql_vmbind_zeroblob_t cubesql_vmbind_zeroblob;
 | 
			
		||||
	cubesql_vmexecute_t cubesql_vmexecute;
 | 
			
		||||
	cubesql_vmselect_t cubesql_vmselect;
 | 
			
		||||
	cubesql_vmclose_t cubesql_vmclose;
 | 
			
		||||
 | 
			
		||||
	cubesql_cursor_numrows_t cubesql_cursor_numrows;
 | 
			
		||||
	cubesql_cursor_numcolumns_t cubesql_cursor_numcolumns;
 | 
			
		||||
	cubesql_cursor_currentrow_t cubesql_cursor_currentrow;
 | 
			
		||||
	cubesql_cursor_seek_t cubesql_cursor_seek;
 | 
			
		||||
	cubesql_cursor_iseof_t cubesql_cursor_iseof;
 | 
			
		||||
	cubesql_cursor_columntype_t cubesql_cursor_columntype;
 | 
			
		||||
	cubesql_cursor_field_t cubesql_cursor_field;
 | 
			
		||||
	cubesql_cursor_rowid_t cubesql_cursor_rowid;
 | 
			
		||||
	cubesql_cursor_int64_t cubesql_cursor_int64;
 | 
			
		||||
	cubesql_cursor_int_t cubesql_cursor_int;
 | 
			
		||||
	cubesql_cursor_double_t cubesql_cursor_double;
 | 
			
		||||
	cubesql_cursor_cstring_t cubesql_cursor_cstring;
 | 
			
		||||
	cubesql_cursor_cstring_static_t cubesql_cursor_cstring_static;
 | 
			
		||||
	cubesql_cursor_free_t cubesql_cursor_free;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class SQLAPI_API cubeSqlConnectionHandles : public saConnectionHandles
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
	cubeSqlConnectionHandles();
 | 
			
		||||
 | 
			
		||||
	csqldb *pDb;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class SQLAPI_API cubeSqlCommandHandles : public saCommandHandles
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
	cubeSqlCommandHandles();
 | 
			
		||||
 | 
			
		||||
	csqlvm *pVm;
 | 
			
		||||
	csqlc *pC;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern cubeSqlAPI g_cubeSqlAPI;
 | 
			
		||||
 | 
			
		||||
#endif //__CUBESQLAPI_H__
 | 
			
		||||
							
								
								
									
										177
									
								
								libraries/SQLAPI/include/cubesql/cubesql.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										177
									
								
								libraries/SQLAPI/include/cubesql/cubesql.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,177 @@
 | 
			
		||||
/*
 | 
			
		||||
 *  cubesql.h
 | 
			
		||||
 *
 | 
			
		||||
 *	This file is the public interface for the cubeSQL Server SDK.
 | 
			
		||||
 *	You just need to include this header file in your projects.
 | 
			
		||||
 *
 | 
			
		||||
 *  (c) 2006-2011 SQLabs s.r.l. -- All Rights Reserved
 | 
			
		||||
 *  Author: Marco Bambini (MB)
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef CUBESQLSDK_H
 | 
			
		||||
#define CUBESQLSDK_H
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
	
 | 
			
		||||
#ifdef CUBESQL_BUILD_DLL
 | 
			
		||||
#define CUBESQL_APIEXPORT		__declspec(dllexport)
 | 
			
		||||
#else
 | 
			
		||||
#define CUBESQL_APIEXPORT
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
// custom boolean values
 | 
			
		||||
#ifndef kTRUE
 | 
			
		||||
#define kTRUE				1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef kFALSE
 | 
			
		||||
#define kFALSE				0
 | 
			
		||||
#endif
 | 
			
		||||
	
 | 
			
		||||
// default values
 | 
			
		||||
#define	kDEFAULT_PORT		4430
 | 
			
		||||
#define kDEFAULT_TIMEOUT	12
 | 
			
		||||
#define kNOERR				0
 | 
			
		||||
#define kERR				-1
 | 
			
		||||
 | 
			
		||||
// client side errors
 | 
			
		||||
#define kMEMORY_ERROR		-2
 | 
			
		||||
#define kPARAMETER_ERROR	-3
 | 
			
		||||
#define kPROTOCOL_ERROR		-4
 | 
			
		||||
#define kZLIB_ERROR			-5
 | 
			
		||||
#define kSSL_ERROR			-6
 | 
			
		||||
#define kSSL_CERT_ERROR		-7
 | 
			
		||||
 | 
			
		||||
// encryption flags used in cubesql_connect
 | 
			
		||||
#define kAESNONE			0
 | 
			
		||||
#define kAES128				2
 | 
			
		||||
#define kAES192				3
 | 
			
		||||
#define kAES256				4
 | 
			
		||||
#define kSSL				8
 | 
			
		||||
#define kSSL_AES128			kSSL+kAES128
 | 
			
		||||
#define kSSL_AES192			kSSL+kAES192
 | 
			
		||||
#define kSSL_AES256			kSSL+kAES256
 | 
			
		||||
	
 | 
			
		||||
// flag used in cubesql_cursor_getfield
 | 
			
		||||
#define	kCUBESQL_COLNAME	0
 | 
			
		||||
#define kCUBESQL_CURROW		-1
 | 
			
		||||
#define	kCUBESQL_COLTABLE	-2
 | 
			
		||||
#define kCUBESQL_ROWID		-666
 | 
			
		||||
	
 | 
			
		||||
// flag used in cubesql_cursor_seek
 | 
			
		||||
#define kCUBESQL_SEEKNEXT	-2
 | 
			
		||||
#define kCUBESQL_SEEKFIRST	-3
 | 
			
		||||
#define kCUBESQL_SEEKLAST	-4
 | 
			
		||||
#define kCUBESQL_SEEKPREV	-5
 | 
			
		||||
 | 
			
		||||
// SSL
 | 
			
		||||
#define kSSL_LIBRARY_PATH		1
 | 
			
		||||
#define kCRYPTO_LIBRARY_PATH	2
 | 
			
		||||
	
 | 
			
		||||
#ifndef int64
 | 
			
		||||
#ifdef WIN32
 | 
			
		||||
typedef __int64 int64;
 | 
			
		||||
#else
 | 
			
		||||
typedef long long int int64;
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
	
 | 
			
		||||
// column types coming from the server
 | 
			
		||||
enum {
 | 
			
		||||
	TYPE_None		= 0,
 | 
			
		||||
	TYPE_Integer	= 1,
 | 
			
		||||
	TYPE_Float		= 2,
 | 
			
		||||
	TYPE_Text		= 3,
 | 
			
		||||
	TYPE_Blob		= 4,
 | 
			
		||||
	TYPE_Boolean	= 5,
 | 
			
		||||
	TYPE_Date		= 6,
 | 
			
		||||
	TYPE_Time		= 7,
 | 
			
		||||
	TYPE_Timestamp	= 8,
 | 
			
		||||
	TYPE_Currency	= 9
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// column types to specify in the cubesql_bind command (coltype)
 | 
			
		||||
#define kBIND_INTEGER	1
 | 
			
		||||
#define kBIND_DOUBLE	2
 | 
			
		||||
#define kBIND_TEXT		3
 | 
			
		||||
#define kBIND_BLOB		4
 | 
			
		||||
#define kBIND_NULL		5
 | 
			
		||||
#define kBIND_INT64		8
 | 
			
		||||
#define kBIND_ZEROBLOB	9
 | 
			
		||||
	
 | 
			
		||||
// define opaque datatypes
 | 
			
		||||
typedef struct csqldb csqldb;
 | 
			
		||||
typedef struct csqlc csqlc;
 | 
			
		||||
typedef struct csqlvm csqlvm;
 | 
			
		||||
typedef void (*trace_function) (const char*, void*);
 | 
			
		||||
	
 | 
			
		||||
// function prototypes
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_connect (csqldb **db, const char *host, int port, const char *username, const char *password, int timeout, int encryption);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_connect_ssl (csqldb **db, const char *host, int port, const char *username, const char *password, int timeout, char *ssl_certificate_path);
 | 
			
		||||
CUBESQL_APIEXPORT void		cubesql_disconnect (csqldb *db, int gracefully);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_execute (csqldb *db, const char *sql);
 | 
			
		||||
CUBESQL_APIEXPORT csqlc		*cubesql_select (csqldb *db, const char *sql, int unused);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_commit (csqldb *db);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_rollback (csqldb *db);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_bind (csqldb *db, const char *sql, char **colvalue, int *colsize, int *coltype, int ncols);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_ping (csqldb *db);
 | 
			
		||||
CUBESQL_APIEXPORT void		cubesql_cancel (csqldb *db);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_errcode (csqldb *db);
 | 
			
		||||
CUBESQL_APIEXPORT char		*cubesql_errmsg (csqldb *db);
 | 
			
		||||
CUBESQL_APIEXPORT int64		cubesql_changes (csqldb *db);
 | 
			
		||||
CUBESQL_APIEXPORT void		cubesql_trace (csqldb *db, trace_function trace, void *arg);
 | 
			
		||||
	
 | 
			
		||||
CUBESQL_APIEXPORT csqlvm	*cubesql_vmprepare (csqldb *db, const char *sql);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_vmbind_int (csqlvm *vm, int index, int value);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_vmbind_double (csqlvm *vm, int index, double value);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_vmbind_text (csqlvm *vm, int index, char *value, int len);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_vmbind_blob (csqlvm *vm, int index, void *value, int len);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_vmbind_null (csqlvm *vm, int index);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_vmbind_int64 (csqlvm *vm, int index, int64 value);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_vmbind_zeroblob (csqlvm *vm, int index, int len);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_vmexecute (csqlvm *vm);
 | 
			
		||||
CUBESQL_APIEXPORT csqlc		*cubesql_vmselect (csqlvm *vm);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_vmclose (csqlvm *vm);
 | 
			
		||||
	
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_cursor_numrows (csqlc *c);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_cursor_numcolumns (csqlc *c);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_cursor_currentrow (csqlc *c);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_cursor_seek (csqlc *c, int index);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_cursor_iseof (csqlc *c);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_cursor_columntype (csqlc *c, int index);
 | 
			
		||||
CUBESQL_APIEXPORT char		*cubesql_cursor_field (csqlc *c, int row, int column, int *len);
 | 
			
		||||
CUBESQL_APIEXPORT int64		cubesql_cursor_rowid (csqlc *c, int row);
 | 
			
		||||
CUBESQL_APIEXPORT int64		cubesql_cursor_int64 (csqlc *c, int row, int column, int64 default_value);
 | 
			
		||||
CUBESQL_APIEXPORT int		cubesql_cursor_int (csqlc *c, int row, int column, int default_value);
 | 
			
		||||
CUBESQL_APIEXPORT double	cubesql_cursor_double (csqlc *c, int row, int column, double default_value);
 | 
			
		||||
CUBESQL_APIEXPORT char		*cubesql_cursor_cstring (csqlc *c, int row, int column);
 | 
			
		||||
CUBESQL_APIEXPORT char		*cubesql_cursor_cstring_static (csqlc *c, int row, int column, char *static_buffer, int bufferlen);	
 | 
			
		||||
CUBESQL_APIEXPORT void		cubesql_cursor_free (csqlc *c);
 | 
			
		||||
 | 
			
		||||
// private functions
 | 
			
		||||
int		cubesql_connect_token (csqldb **db, const char *host, int port, const char *username, const char *password,
 | 
			
		||||
							   int timeout, int encryption, char *token, int useOldProtocol, const char *ssl_certificate,
 | 
			
		||||
							   const char *root_certificate, const char *ssl_certificate_password, const char *ssl_chiper_list);
 | 
			
		||||
int		cubesql_connect_old_protocol (csqldb **db, const char *host, int port, const char *username, const char *password, int timeout, int encryption);
 | 
			
		||||
void	cubesql_clear_errors (csqldb *db);
 | 
			
		||||
csqldb	*cubesql_cursor_db (csqlc *cursor);
 | 
			
		||||
csqlc	*cubesql_cursor_create (csqldb *db, int nrows, int ncolumns, int *types, char **names);
 | 
			
		||||
int		cubesql_cursor_addrow (csqlc *cursor, char **row, int *len);
 | 
			
		||||
int		cubesql_cursor_columntypebind (csqlc *c, int index);
 | 
			
		||||
void	cubesql_setuserptr (csqldb *db, void *userptr);
 | 
			
		||||
void	*cubesql_getuserptr (csqldb *db);
 | 
			
		||||
void	cubesql_settoken (csqldb *db, char *token);
 | 
			
		||||
void	cubesql_sethostverification (csqldb *db, char *hostverification);
 | 
			
		||||
char	*cubesql_gettoken (csqldb *db);
 | 
			
		||||
void	cubesql_setpath (int type, char *path);
 | 
			
		||||
void	cubesql_seterror (csqldb *db, int errcode, char *errmsg);
 | 
			
		||||
const char *cubesql_sslversion (void);
 | 
			
		||||
	
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}  /* End of the 'extern "C"' block */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
@ -3,35 +3,13 @@
 | 
			
		||||
 *	MODULE:		ib_util.h
 | 
			
		||||
 *	DESCRIPTION:	Prototype header file for ib_util.c
 | 
			
		||||
 *
 | 
			
		||||
 * The contents of this file are subject to the Interbase Public
 | 
			
		||||
 * License Version 1.0 (the "License"); you may not use this file
 | 
			
		||||
 * except in compliance with the License. You may obtain a copy
 | 
			
		||||
 * of the License at http://www.Inprise.com/IPL.html
 | 
			
		||||
 *
 | 
			
		||||
 * Software distributed under the License is distributed on an
 | 
			
		||||
 * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
 | 
			
		||||
 * or implied. See the License for the specific language governing
 | 
			
		||||
 * rights and limitations under the License.
 | 
			
		||||
 *
 | 
			
		||||
 * The Original Code was created by Inprise Corporation
 | 
			
		||||
 * and its predecessors. Portions created by Inprise Corporation are
 | 
			
		||||
 * Copyright (C) Inprise Corporation.
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1986-2010 Embarcadero Technologies Inc.
 | 
			
		||||
 * All Rights Reserved.
 | 
			
		||||
 * Contributor(s): ______________________________________.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef _IB_UTIL_H
 | 
			
		||||
#define _IB_UTIL_H
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
extern void *ib_util_malloc(long);
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}	/* extern "C" */
 | 
			
		||||
#endif
 | 
			
		||||
extern void * 	ib_util_malloc (int);
 | 
			
		||||
 | 
			
		||||
#endif /* _IB_UTIL_H */
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -467,6 +467,22 @@ public:
 | 
			
		||||
	SQLHSTMT m_hstmt;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class SQLAPI_API odbcExternalConnection
 | 
			
		||||
{
 | 
			
		||||
	bool m_bAttached;
 | 
			
		||||
	SAConnection *m_pCon;
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	SQLHENV	m_henv;
 | 
			
		||||
	SQLHDBC	m_hdbc;
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	odbcExternalConnection(SAConnection *pCon, SQLHENV henv, SQLHDBC hdbc);
 | 
			
		||||
	void Attach();
 | 
			
		||||
	void Detach();
 | 
			
		||||
	~odbcExternalConnection();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern odbcAPI g_odbcAPI;
 | 
			
		||||
 | 
			
		||||
#endif // !defined(__ODBCAPI_H__)
 | 
			
		||||
 | 
			
		||||
@ -380,6 +380,59 @@ typedef sword (*OCIDateTimeGetTimeZoneOffset_t)(void  *hndl, OCIError *err,
 | 
			
		||||
 | 
			
		||||
typedef sword (*OCINlsNumericInfoGet_t)(dvoid *envhp, OCIError *errhp, sb4 *val, ub2 item);
 | 
			
		||||
 | 
			
		||||
/*----------------- Connection Pooling prototypes ---------------------------*/
 | 
			
		||||
typedef sword (*OCIConnectionPoolCreate_t)(OCIEnv *envhp, OCIError *errhp, OCICPool *poolhp,
 | 
			
		||||
    OraText **poolName, sb4 *poolNameLen,
 | 
			
		||||
    const OraText *dblink, sb4 dblinkLen,
 | 
			
		||||
    ub4 connMin, ub4 connMax, ub4 connIncr,
 | 
			
		||||
    const OraText *poolUserName, sb4 poolUserLen,
 | 
			
		||||
    const OraText *poolPassword, sb4 poolPassLen,
 | 
			
		||||
    ub4 mode);
 | 
			
		||||
 | 
			
		||||
typedef sword (*OCIConnectionPoolDestroy_t)(OCICPool *poolhp,
 | 
			
		||||
    OCIError *errhp, ub4 mode);
 | 
			
		||||
 | 
			
		||||
/*----------------- OCILobGetLength2 prototypes ---------------------------*/
 | 
			
		||||
typedef sword (*OCILobGetLength2_t)(OCISvcCtx *svchp, OCIError *errhp,
 | 
			
		||||
    OCILobLocator *locp, oraub8 *lenp);
 | 
			
		||||
 | 
			
		||||
class ora8API;
 | 
			
		||||
 | 
			
		||||
class SQLAPI_API ora8ConnectionPool
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    ora8ConnectionPool();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    // disable copy constructor
 | 
			
		||||
    ora8ConnectionPool(const ora8ConnectionPool&);
 | 
			
		||||
    // disable assignment operator
 | 
			
		||||
    ora8ConnectionPool &operator = (const ora8ConnectionPool &);
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    OCICPool *poolhp;
 | 
			
		||||
    OraText *poolName;
 | 
			
		||||
    sb4 poolNameLen;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class SQLAPI_API ora8ConnectionPools
 | 
			
		||||
{
 | 
			
		||||
    int		m_nCount;
 | 
			
		||||
    ora8ConnectionPool	**m_pPools;
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    // disable copy constructor
 | 
			
		||||
    ora8ConnectionPools(const ora8ConnectionPools &);
 | 
			
		||||
    // disable assignment operator
 | 
			
		||||
    ora8ConnectionPools &operator = (const ora8ConnectionPools &);
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    ora8ConnectionPools();
 | 
			
		||||
 | 
			
		||||
    ora8ConnectionPool& operator[](int poolIndex);
 | 
			
		||||
    void Close(ora8API& api);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// API declarations
 | 
			
		||||
class SQLAPI_API ora8API : public saAPI
 | 
			
		||||
{
 | 
			
		||||
@ -442,6 +495,7 @@ public:
 | 
			
		||||
	OCILobFileSetName_t	OCILobFileSetName;
 | 
			
		||||
	OCILobFlushBuffer_t	OCILobFlushBuffer;
 | 
			
		||||
	OCILobGetLength_t	OCILobGetLength;
 | 
			
		||||
    OCILobGetLength2_t OCILobGetLength2;
 | 
			
		||||
	OCILobIsEqual_t	OCILobIsEqual;
 | 
			
		||||
	OCILobLoadFromFile_t	OCILobLoadFromFile;
 | 
			
		||||
	OCILobLocatorIsInit_t	OCILobLocatorIsInit;
 | 
			
		||||
@ -485,6 +539,13 @@ public:
 | 
			
		||||
	OCINlsNumericInfoGet_t OCINlsNumericInfoGet;
 | 
			
		||||
 | 
			
		||||
	OCIStmtFetch2_t	OCIStmtFetch2;
 | 
			
		||||
 | 
			
		||||
    // Conection pooling
 | 
			
		||||
    OCIConnectionPoolCreate_t OCIConnectionPoolCreate;
 | 
			
		||||
    OCIConnectionPoolDestroy_t OCIConnectionPoolDestroy;
 | 
			
		||||
    
 | 
			
		||||
    ora8ConnectionPools connecionPools;
 | 
			
		||||
    OCIEnv *envhp;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class SQLAPI_API ora8ConnectionHandles : public saConnectionHandles
 | 
			
		||||
 | 
			
		||||
@ -111,14 +111,14 @@ typedef void (*PQprintTuples_t)(const PGresult *res,
 | 
			
		||||
typedef int (*lo_open_t)(PGconn *conn, Oid lobjId, int mode);
 | 
			
		||||
typedef int (*lo_close_t)(PGconn *conn, int fd);
 | 
			
		||||
typedef int (*lo_read_t)(PGconn *conn, int fd, char *buf, size_t len);
 | 
			
		||||
typedef int (*lo_write_t)(PGconn *conn, int fd, char *buf, size_t len);
 | 
			
		||||
typedef int (*lo_write_t)(PGconn *conn, int fd, const char *buf, size_t len);
 | 
			
		||||
typedef int (*lo_lseek_t)(PGconn *conn, int fd, int offset, int whence);
 | 
			
		||||
typedef Oid (*lo_creat_t)(PGconn *conn, int mode);
 | 
			
		||||
typedef int (*lo_tell_t)(PGconn *conn, int fd);
 | 
			
		||||
typedef int (*lo_unlink_t)(PGconn *conn, Oid lobjId);
 | 
			
		||||
typedef Oid (*lo_import_t)(PGconn *conn, const char *filename);
 | 
			
		||||
typedef int (*lo_export_t)(PGconn *conn, Oid lobjId, const char *filename);
 | 
			
		||||
typedef int (*PQmblen_t)(const unsigned char *s, int encoding);
 | 
			
		||||
typedef int (*PQmblen_t)(const char *s, int encoding);
 | 
			
		||||
typedef int (*PQenv2encoding_t)(void);
 | 
			
		||||
 | 
			
		||||
// new
 | 
			
		||||
@ -137,7 +137,7 @@ typedef unsigned char* (*PQunescapeBytea_t)(const unsigned char *strtext,
 | 
			
		||||
 | 
			
		||||
/* These forms are deprecated! */
 | 
			
		||||
typedef size_t (*PQescapeString_t)(char *to, const char *from, size_t length);
 | 
			
		||||
typedef char* (*PQescapeBytea_t)(const unsigned char *from, size_t from_length,
 | 
			
		||||
typedef unsigned char* (*PQescapeBytea_t)(const unsigned char *from, size_t from_length,
 | 
			
		||||
			  size_t *to_length);
 | 
			
		||||
 | 
			
		||||
typedef void (*PQfreemem_t)(void *ptr);
 | 
			
		||||
@ -147,8 +147,8 @@ typedef int	(*PQputCopyEnd_t)(PGconn *conn, const char *errormsg);
 | 
			
		||||
typedef int (*PQgetCopyData_t)(PGconn *conn, char **buffer, int async);
 | 
			
		||||
 | 
			
		||||
typedef PGPing (*PQping_t)(const char *conninfo);
 | 
			
		||||
typedef PGPing (*PQpingParams_t)(const char **keywords,
 | 
			
		||||
			 const char **values, int expand_dbname);
 | 
			
		||||
typedef PGPing (*PQpingParams_t)(const char *const * keywords,
 | 
			
		||||
			 const char *const * values, int expand_dbname);
 | 
			
		||||
 | 
			
		||||
typedef const char* (*pg_encoding_to_char_t)(int encoding);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -8,8 +8,7 @@
 | 
			
		||||
#include "SQLAPI.h"
 | 
			
		||||
 | 
			
		||||
// API header(s)
 | 
			
		||||
#define SQL_32BITTARG 1
 | 
			
		||||
#include <sql.h>
 | 
			
		||||
#include <sqlbase.h>
 | 
			
		||||
 | 
			
		||||
extern long g_nSBDLLVersionLoaded;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -115,6 +115,12 @@ typedef void *(*sqlite3_rollback_hook_t)(sqlite3*, void(*)(void *), void*);
 | 
			
		||||
typedef int (*sqlite3_enable_shared_cache_t)(int);
 | 
			
		||||
typedef int (*sqlite3_release_memory_t)(int);
 | 
			
		||||
typedef void (*sqlite3_soft_heap_limit_t)(int);
 | 
			
		||||
typedef int(*sqlite3_load_extension_t)(
 | 
			
		||||
	sqlite3 *db,          /* Load the extension into this database connection */
 | 
			
		||||
	const char *zFile,    /* Name of the shared library containing extension */
 | 
			
		||||
	const char *zProc,    /* Entry point.  Derived from zFile if 0 */
 | 
			
		||||
	char **pzErrMsg       /* Put error message here if not 0 */
 | 
			
		||||
	);
 | 
			
		||||
typedef int (*sqlite3_enable_load_extension_t)(sqlite3 *db, int onoff);
 | 
			
		||||
typedef int (*sqlite3_auto_extension_t)(void *xEntryPoint);
 | 
			
		||||
typedef void (*sqlite3_reset_auto_extension_t)(void);
 | 
			
		||||
@ -181,6 +187,9 @@ typedef void *(*sqlite3_update_hook_t)(
 | 
			
		||||
  void*
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
typedef int(*sqlite3_key_t)(sqlite3 *db, const void *pKey, int nKey);
 | 
			
		||||
typedef int(*sqlite3_rekey_t)(sqlite3 *db, const void *pKey, int nKey);
 | 
			
		||||
 | 
			
		||||
// API declarations
 | 
			
		||||
class SQLAPI_API sl3API : public saAPI
 | 
			
		||||
{
 | 
			
		||||
@ -240,7 +249,16 @@ public:
 | 
			
		||||
 | 
			
		||||
	sqlite3_update_hook_t sqlite3_update_hook;
 | 
			
		||||
 | 
			
		||||
	sqlite3_load_extension_t sqlite3_load_extension;
 | 
			
		||||
    sqlite3_enable_load_extension_t sqlite3_enable_load_extension;
 | 
			
		||||
 | 
			
		||||
    sqlite3_key_t sqlite3_key;
 | 
			
		||||
    sqlite3_rekey_t sqlite3_rekey;
 | 
			
		||||
 | 
			
		||||
	sqlite3_free_t sqlite3_free;
 | 
			
		||||
 | 
			
		||||
	sqlite3_memory_used_t sqlite3_memory_used;
 | 
			
		||||
	sqlite3_memory_highwater_t sqlite3_memory_highwater;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class SQLAPI_API sl3ConnectionHandles : public saConnectionHandles
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1774
									
								
								libraries/SQLAPI/include/sqlbase/sqlbase.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1774
									
								
								libraries/SQLAPI/include/sqlbase/sqlbase.h
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -470,6 +470,8 @@ class SQLAPI_API ssNCliAPI : public saAPI
 | 
			
		||||
public:
 | 
			
		||||
	ssNCliAPI();
 | 
			
		||||
 | 
			
		||||
	bool osDriver;
 | 
			
		||||
 | 
			
		||||
	SQLAllocHandle_t		SQLAllocHandle;		// 3.0
 | 
			
		||||
	SQLBindCol_t			SQLBindCol;			// 1.0
 | 
			
		||||
	SQLBindParameter_t		SQLBindParameter;	// 2.0
 | 
			
		||||
 | 
			
		||||
@ -18,6 +18,8 @@ class ssOleDbAPI : public saAPI
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
	ssOleDbAPI();
 | 
			
		||||
 | 
			
		||||
	static bool& ssOleDbAPI::ProcessSQLServerErrorInfo();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class SQLAPI_API ssOleDbConnectionHandles : public saConnectionHandles
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,7 @@ class SQLAPI_API SASybErrInfo : public SAMutex
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
	SASybErrInfo();
 | 
			
		||||
    virtual ~SASybErrInfo();
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	CS_MSGNUM	msgnumber;
 | 
			
		||||
 | 
			
		||||
@ -53,6 +53,7 @@ protected:
 | 
			
		||||
  static bool fixed_scad          (TMask_field& f, KEY k);                  
 | 
			
		||||
  static bool tipo_rata           (TMask_field& f, KEY k);                  
 | 
			
		||||
  static bool ult_class           (TMask_field& f, KEY k);
 | 
			
		||||
	static bool cond_pagamento      (TMask_field& f, KEY k);
 | 
			
		||||
  
 | 
			
		||||
  void*  _app_data;  
 | 
			
		||||
  
 | 
			
		||||
@ -94,6 +95,7 @@ bool TCond_pag_app::user_create()
 | 
			
		||||
  _msk->set_handler (F_FIXSCAD_3       , fixed_scad);        
 | 
			
		||||
  _msk->set_handler (F_TIPO_RATA       , tipo_rata);        
 | 
			
		||||
  _msk->set_handler (F_ULT_CLASS       , ult_class);
 | 
			
		||||
	_msk->set_handler(F_CONDPAGSDI       , cond_pagamento);
 | 
			
		||||
  
 | 
			
		||||
  shuttle._msk = _msk;
 | 
			
		||||
  shuttle._sht = _cs;
 | 
			
		||||
@ -264,7 +266,10 @@ bool TCond_pag_app::numero_rate(TMask_field& f, KEY k)
 | 
			
		||||
  }                              
 | 
			
		||||
  
 | 
			
		||||
  msk->set(F_NUM_RATE,pag->n_rate());
 | 
			
		||||
  return TRUE;
 | 
			
		||||
 | 
			
		||||
	// Finito tutto chiamo il controllo sul tipo pagamento!
 | 
			
		||||
 | 
			
		||||
	return cond_pagamento(f.mask().field(F_CONDPAGSDI), K_TAB);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool TCond_pag_app::mese_commerciale(TMask_field& f, KEY k)                  
 | 
			
		||||
@ -375,6 +380,44 @@ bool TCond_pag_app::ult_class(TMask_field& f, KEY k)
 | 
			
		||||
  return TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool TCond_pag_app::cond_pagamento(TMask_field& f, KEY k)
 | 
			
		||||
{
 | 
			
		||||
		if (!f.to_check(k) || f.mask().query_mode() || !f.mask().get(F_NUM_RATE).full())
 | 
			
		||||
				return true;
 | 
			
		||||
		// Controllo se il tipo è coerente con quello segnato prima
 | 
			
		||||
		int nrate = f.mask().get_int(F_NUM_RATE);
 | 
			
		||||
		bool err = false;
 | 
			
		||||
		switch (atoi(f.get().right(1)))
 | 
			
		||||
		{
 | 
			
		||||
		// Pagamento a rate
 | 
			
		||||
		case 1:
 | 
			
		||||
				if (nrate <= 1)
 | 
			
		||||
				{
 | 
			
		||||
						err = true;
 | 
			
		||||
				f.set("TP02");
 | 
			
		||||
				}
 | 
			
		||||
				break;
 | 
			
		||||
		// Pagamento completo
 | 
			
		||||
		case 2:
 | 
			
		||||
				if (nrate > 1)
 | 
			
		||||
				{
 | 
			
		||||
						err = true;
 | 
			
		||||
						f.set("TP01");
 | 
			
		||||
				}
 | 
			
		||||
				break;
 | 
			
		||||
		// Pagamento anticipo
 | 
			
		||||
		case 3:
 | 
			
		||||
		// Non so che fare!
 | 
			
		||||
				break;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if(err)
 | 
			
		||||
		{
 | 
			
		||||
				warning_box("Impossibile impostare questo tipo di pagamento con %d rate!", nrate);
 | 
			
		||||
		}
 | 
			
		||||
		return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// qui viene il belloccio                  
 | 
			
		||||
bool TCond_pag_app::sheet_action(TSheet_field&, int r, KEY k)                                                                                
 | 
			
		||||
{                                              
 | 
			
		||||
 | 
			
		||||
@ -4,11 +4,12 @@
 | 
			
		||||
#define TAB_RPG "%RPG"
 | 
			
		||||
 | 
			
		||||
#define F_CODICE								201
 | 
			
		||||
#define F_DESC 202
 | 
			
		||||
#define F_SHEET_RPG 203
 | 
			
		||||
#define F_INIZIOSCAD 204
 | 
			
		||||
#define F_MESECOMM 205
 | 
			
		||||
#define F_TIPO_PRIMA_RATA 206
 | 
			
		||||
#define F_CONDPAGSDI						202
 | 
			
		||||
#define F_DESC									203
 | 
			
		||||
#define F_SHEET_RPG							204
 | 
			
		||||
#define F_INIZIOSCAD						205
 | 
			
		||||
#define F_MESECOMM							206
 | 
			
		||||
#define F_TIPO_PRIMA_RATA				207
 | 
			
		||||
#define F_RATE_DIFF							208
 | 
			
		||||
#define F_INT_RATE							209
 | 
			
		||||
#define F_NUM_RATE							210
 | 
			
		||||
 | 
			
		||||
@ -36,6 +36,15 @@ BEGIN
 | 
			
		||||
  KEY 1
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
LIST F_CONDPAGSDI 4 20
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 20 1 "Tipo di pagamento "
 | 
			
		||||
  FIELD S12
 | 
			
		||||
  ITEM "TP01|TP01 A rate"
 | 
			
		||||
  ITEM "TP02|TP02 Completo"
 | 
			
		||||
  ITEM "TP03|TP03 Anticipo"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_DESC 50
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 2 "Descrizione    "
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,4 @@
 | 
			
		||||
#define F_CODICERATA		101
 | 
			
		||||
#define F_CODICEALFA		102
 | 
			
		||||
#define F_DESCR 103
 | 
			
		||||
#define F_MODPAG				103
 | 
			
		||||
#define F_DESCR					104
 | 
			
		||||
 | 
			
		||||
@ -50,6 +50,38 @@ BEGIN
 | 
			
		||||
  CHECKTYPE REQUIRED
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_MODPAG 4
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 20 4 "Tipo pagamento  "
 | 
			
		||||
  SHEET "Codice|Tipo pagamento@32"
 | 
			
		||||
  INPUT S_MODPAG
 | 
			
		||||
  OUTPUT S_MODPAG
 | 
			
		||||
  CHECKTYPE REQUIRED
 | 
			
		||||
  FIELD S12
 | 
			
		||||
  ITEM "MP01|contanti"
 | 
			
		||||
  ITEM "MP02|assegno"
 | 
			
		||||
  ITEM "MP03|assegno circolare"
 | 
			
		||||
  ITEM "MP04|contanti presso Tesoreria"
 | 
			
		||||
  ITEM "MP05|bonifico"
 | 
			
		||||
  ITEM "MP06|vaglia cambiario"
 | 
			
		||||
  ITEM "MP07|bollettino bancario"
 | 
			
		||||
  ITEM "MP08|carta di pagamento"
 | 
			
		||||
  ITEM "MP09|RID"
 | 
			
		||||
  ITEM "MP10|RID utenze"
 | 
			
		||||
  ITEM "MP11|RID veloce"
 | 
			
		||||
  ITEM "MP12|RIBA"
 | 
			
		||||
  ITEM "MP13|MAV"
 | 
			
		||||
  ITEM "MP14|quietanza erario"
 | 
			
		||||
  ITEM "MP15|giroconto su conti di contabilità speciale"
 | 
			
		||||
  ITEM "MP16|domiciliazione bancaria"
 | 
			
		||||
  ITEM "MP17|domiciliazione postale"
 | 
			
		||||
  ITEM "MP18|bollettino di c/c postale"
 | 
			
		||||
  ITEM "MP19|SEPA Direct Debit"
 | 
			
		||||
  ITEM "MP20|SEPA Direct Debit CORE"
 | 
			
		||||
  ITEM "MP21|SEPA Direct Debit B2B"
 | 
			
		||||
  ITEM "MP22|Trattenuta su somme già riscosse"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_DESCR 50
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 6 "Descrizione     "
 | 
			
		||||
 | 
			
		||||
@ -85,6 +85,8 @@ protected:
 | 
			
		||||
	static bool rfso_handler(TMask_field& f, KEY k);
 | 
			
		||||
	// Handler Stato
 | 
			
		||||
	static bool stato_handler(TMask_field& f, KEY k);
 | 
			
		||||
	// Handler codice destinatario per Fatturazione PA/FP
 | 
			
		||||
	static bool coddest_handler(TMask_field& f, KEY k);
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
  virtual bool get_next_key(TToken_string& key);
 | 
			
		||||
@ -575,6 +577,18 @@ bool TClifo_application::stato_handler(TMask_field& f, KEY k)
 | 
			
		||||
	return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool TClifo_application::coddest_handler(TMask_field& f, KEY k)
 | 
			
		||||
{
 | 
			
		||||
	// Controllo che il codice immesso sia di 6/7 cifre in base al clifo
 | 
			
		||||
	if(f.focusdirty() && !f.empty() &&
 | 
			
		||||
		((f.mask().get_int(F_ALLEG) == 7 && f.get().size() != 6) || // P.A.
 | 
			
		||||
		(f.mask().get_int(F_ALLEG) != 7 && f.get().size() != 7)))    // Privato
 | 
			
		||||
	{
 | 
			
		||||
		warning_box("Lunghezza codice destinatario incoerente");
 | 
			
		||||
	}
 | 
			
		||||
	return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
HIDDEN bool alleg_handler(TMask_field& f, KEY key)
 | 
			
		||||
{ 
 | 
			
		||||
  if (f.to_check(key, true))
 | 
			
		||||
@ -1561,6 +1575,7 @@ bool TClifo_application::user_create() // initvar e arrmask
 | 
			
		||||
  _msk->set_handler(DLG_CONTRLAV, contrlav_handler);
 | 
			
		||||
	_msk->set_handler(LST_TIPO_RFSO, rfso_handler);
 | 
			
		||||
	_msk->set_handler(F_STATOCF, stato_handler);
 | 
			
		||||
	_msk->set_handler(F_PADESTIN, coddest_handler);
 | 
			
		||||
	  
 | 
			
		||||
  TSheet_field& ind = _msk->sfield(F_SHEET_G_VEN);
 | 
			
		||||
  ind.set_notify(indsp_notify);
 | 
			
		||||
 | 
			
		||||
@ -176,6 +176,7 @@
 | 
			
		||||
#define DLG_OGGETTI                   304
 | 
			
		||||
#define F_BYMAIL                      306
 | 
			
		||||
#define F_DOCMAIL                     307
 | 
			
		||||
#define F_PEC                         324
 | 
			
		||||
#define DLG_ANAG                      308
 | 
			
		||||
#define DLG_CONTRLAV									309
 | 
			
		||||
#define F_BANA												310
 | 
			
		||||
 | 
			
		||||
@ -519,7 +519,7 @@ END
 | 
			
		||||
 | 
			
		||||
GROUPBOX DLG_NULL 76 10
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 4 "Numeri telefonici"
 | 
			
		||||
  PROMPT 1 4 "Contatti"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_PTEL 5
 | 
			
		||||
@ -590,33 +590,39 @@ BEGIN
 | 
			
		||||
  HELP "Numero telefonico del fax"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_MAIL 50 48
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 8 "E-mail   "
 | 
			
		||||
  FIELD MAIL
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_EMAIL 10 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 62 8 "~Posta"
 | 
			
		||||
  PICTURE BMP_EMAIL
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN F_BYMAIL
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 9 "Consenso spedizione documenti per posta elettronica"
 | 
			
		||||
  PROMPT 40 7 "Consenso spedizione doc tramite email"
 | 
			
		||||
  FIELD BYMAIL
 | 
			
		||||
	MESSAGE FALSE CLEAR,F_DOCMAIL
 | 
			
		||||
	MESSAGE TRUE ENABLE,F_DOCMAIL
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_DOCMAIL 50
 | 
			
		||||
STRING F_MAIL 50 23
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 10 "Indirizzo doc."
 | 
			
		||||
  PROMPT 2 8  "E-Mail   "
 | 
			
		||||
  FIELD MAIL
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_DOCMAIL 50 20
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 40 8 "E-Mail doc"
 | 
			
		||||
  FIELD DOCMAIL
 | 
			
		||||
	CHECKTYPE REQUIRED
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_PEC 50 23
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 9 "Pec      "
 | 
			
		||||
  FIELD PEC
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_EMAIL 10 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 62 9 "~Posta"
 | 
			
		||||
  PICTURE BMP_EMAIL
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN F_SPEDPRI
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 11 "Informativa Privacy spedita"
 | 
			
		||||
 | 
			
		||||
@ -1495,6 +1495,7 @@ bool TPagamento::read(TTable* t, TTable* r)
 | 
			
		||||
  _fixd[1]  = t->get_int("I1");
 | 
			
		||||
  _fixd[2]  = t->get_int("I2");
 | 
			
		||||
  _int_rate = t->get_int("I3");
 | 
			
		||||
	_cond_pag = t->get("S12");
 | 
			
		||||
 | 
			
		||||
  // aggiusta _inizio secondo INSCAD; vedi mese commerciale etc.                         
 | 
			
		||||
  if (_inscad == 'M')
 | 
			
		||||
 | 
			
		||||
@ -66,6 +66,7 @@ class TPagamento : public TObject
 | 
			
		||||
  int       _roundlit;   // decimali arrotondamento importo in lire (sempre 0 per ora)
 | 
			
		||||
  int       _roundval;   // decimali arrotondamento importo in valuta
 | 
			
		||||
  int       _int_rate;
 | 
			
		||||
	TString   _cond_pag;   // Condizione di pagamento per SDI, valori ammessi: TP01/02/03
 | 
			
		||||
  
 | 
			
		||||
  int       _rata_ifield(int n, int f) const;
 | 
			
		||||
  long      _rata_lfield(int n, int f) const;
 | 
			
		||||
@ -148,6 +149,7 @@ public:
 | 
			
		||||
  const TString& code()       const { return _code;     }                                    
 | 
			
		||||
  const char* desc_tpr()      const;
 | 
			
		||||
  const char* desc_tipo(int tipo, char ulc, bool* ok = NULL)  const;
 | 
			
		||||
	const TString& cond_pag_sdi() const { return _cond_pag; }
 | 
			
		||||
  
 | 
			
		||||
  // giorni scadenza fissi, aggiunti poi  
 | 
			
		||||
  void  set_fixed_scad(int a, int ind) { _fixd[ind] = a;  }
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,3 @@
 | 
			
		||||
17
 | 
			
		||||
0
 | 
			
		||||
$cfven|4604|4604|510|0|Clienti/Fornitori per vendite|||
 | 
			
		||||
$cfven|4612|4613|511|0|Clienti/Fornitori per vendite|||
 | 
			
		||||
 | 
			
		||||
@ -79,7 +79,7 @@ CODCAUSNC|1|3|0|Causale Contabile per le Note di Credito
 | 
			
		||||
CODCAUSINC|1|3|0|Causale Contabile per gli Incassi
 | 
			
		||||
RIFDOC|8|1|0|Riferimenti sui documenti
 | 
			
		||||
IMPMINFAT|4|18|3|Importo minimo Fatture
 | 
			
		||||
PADESTIN|1|6|0|Codice ufficio amministrazione
 | 
			
		||||
PADESTIN|1|7|0|Codice ufficio amministrazione
 | 
			
		||||
PARIFAMM|1|20|0|Codice riferimento amministrativo
 | 
			
		||||
PRODCONAI|1|6|0|Produttore CONAI[6]: acc,all,car,pla,leg,vet
 | 
			
		||||
1
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,3 @@
 | 
			
		||||
20
 | 
			
		||||
0
 | 
			
		||||
$clifo|0|0|825|0|Clienti/Fornitori|||
 | 
			
		||||
$clifo|774|774|875|0|Clienti/Fornitori|||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
20
 | 
			
		||||
67
 | 
			
		||||
68
 | 
			
		||||
TIPOCF|1|1|0|Tipo <C>liente <F>ornitore
 | 
			
		||||
CODCF|3|6|0|Codice
 | 
			
		||||
RAGSOC|1|50|0|Ragione sociale
 | 
			
		||||
@ -34,6 +34,7 @@ PTELEX|1|10|0|Prefisso del numero di TELEX
 | 
			
		||||
TELEX|1|30|0|Prefisso del numero di TELEX
 | 
			
		||||
MAIL|1|50|0|Indirizzo di posta elettronica generico
 | 
			
		||||
BYMAIL|8|1|0|Consenso all' invio dei documenti per posta elettronica
 | 
			
		||||
PEC|1|50|0|Indirizzo di posta elettronica certificato
 | 
			
		||||
DOCMAIL|1|50|0|Indirizzo di posta elettronica per i documenti
 | 
			
		||||
DATANASC|5|8|0|Data di nascita
 | 
			
		||||
STATONASC|2|3|0|Codice stato di nascita
 | 
			
		||||
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										17
									
								
								src/fp/fp0.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								src/fp/fp0.cpp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,17 @@
 | 
			
		||||
#include <xvt.h>
 | 
			
		||||
#include "fp0.h"
 | 
			
		||||
 | 
			
		||||
int main(int argc, char** argv)
 | 
			
		||||
{
 | 
			
		||||
  int rt = -1;
 | 
			
		||||
  const int r = (argc > 1) ? atoi( &argv[1][1] ) : 1;
 | 
			
		||||
 | 
			
		||||
  switch (r)
 | 
			
		||||
  {
 | 
			
		||||
	case 2: rt = fp0300(argc, argv); break;   // Gestione fatture attive (PAA, Ex Fattura PA)
 | 
			
		||||
	//case 1: rt = fp0200(argc, argv); break;	  // Gestione fatture passive (PAF)
 | 
			
		||||
	default: rt = fp0100(argc, argv); break;	// Configurazione
 | 
			
		||||
  }
 | 
			
		||||
  return rt;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										8
									
								
								src/fp/fp0.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								src/fp/fp0.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,8 @@
 | 
			
		||||
#ifndef __TF0_H
 | 
			
		||||
#define __TF0_H
 | 
			
		||||
 | 
			
		||||
int fp0100(int argc, char* argv[]);
 | 
			
		||||
int fp0200(int argc, char* argv[]);
 | 
			
		||||
int fp0300(int argc, char* argv[]);
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										126
									
								
								src/fp/fp0100.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										126
									
								
								src/fp/fp0100.cpp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,126 @@
 | 
			
		||||
#include <confapp.h>
 | 
			
		||||
#include <automask.h>
 | 
			
		||||
#include <sheet.h>
 | 
			
		||||
#include <utility.h>
 | 
			
		||||
 | 
			
		||||
#include "fp0.h"
 | 
			
		||||
#include "fp0100a.h"
 | 
			
		||||
#include <tsdb.h>
 | 
			
		||||
#include "recset.h"
 | 
			
		||||
#include "progind.h"
 | 
			
		||||
#include "../ve/velib.h"
 | 
			
		||||
 | 
			
		||||
class TParametri_mask : public TAutomask
 | 
			
		||||
{
 | 
			
		||||
protected:
 | 
			
		||||
	void tipi_import();
 | 
			
		||||
	virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	TParametri_mask(const char* n);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
TParametri_mask::TParametri_mask(const char * n) : TAutomask(n)
 | 
			
		||||
{
 | 
			
		||||
	set(F_INDIRIZZO, ini_get_string(CONFIG_DITTA, "fp", "ip"));
 | 
			
		||||
	set(F_DATABASE, ini_get_string(CONFIG_DITTA, "fp", "db"));
 | 
			
		||||
	set(F_USER, ini_get_string(CONFIG_DITTA, "fp", "usr"));
 | 
			
		||||
	set(F_PASSWORD, decode(ini_get_string(CONFIG_DITTA, "fp", "psw") ));
 | 
			
		||||
	set(F_FLDDEST, ini_get_string(CONFIG_DITTA, "fp", "flddest"));
 | 
			
		||||
	set(F_FLDUSRDEST, ini_get_string(CONFIG_DITTA, "fp", "fldusrdest"));
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TParametri_mask::tipi_import()
 | 
			
		||||
{
 | 
			
		||||
	if(yesno_box("Attenzione! Questa procedura riporterà su tutti i documenti il tipo documento SDI della configurazione!\nEventuali modifiche già fatte verranno sovrascritte, continuare?"))
 | 
			
		||||
	{
 | 
			
		||||
		TISAM_recordset tipi("USE %TIP SELECT S12!=''");
 | 
			
		||||
		TProgress_monitor p(tipi.items(), "Elaborazione tipi doc");
 | 
			
		||||
		for(bool ok = tipi.move_first(); ok; ok = tipi.move_next())
 | 
			
		||||
		{
 | 
			
		||||
			if (!p.add_status())
 | 
			
		||||
				break;
 | 
			
		||||
 | 
			
		||||
			TISAM_recordset docs("USE DOC SELECT TIPODOC==#TIPODOC");
 | 
			
		||||
			docs.set_var("#TIPODOC", tipi.get("CODTAB"));
 | 
			
		||||
 | 
			
		||||
			TString msg = "Elaborazione documenti "; msg << tipi.get("CODTAB");
 | 
			
		||||
			TProgress_monitor d(docs.items(), msg);
 | 
			
		||||
			for (bool ok = docs.move_first(); ok; ok = docs.move_next())
 | 
			
		||||
			{
 | 
			
		||||
				if (!d.add_status())
 | 
			
		||||
					break;
 | 
			
		||||
				TDocumento doc(docs.cursor()->curr());
 | 
			
		||||
				doc.put("TIPODOCSDI", tipi.get("S12").as_string());
 | 
			
		||||
				if (doc.rewrite() != NOERR)
 | 
			
		||||
					fatal_box("ERRORE aggiornamento documenti");
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool TParametri_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
 | 
			
		||||
{
 | 
			
		||||
	switch (o.dlg())
 | 
			
		||||
	{
 | 
			
		||||
	case DLG_ELABORA:
 | 
			
		||||
		if (e == fe_button)
 | 
			
		||||
			tipi_import();
 | 
			
		||||
	default:
 | 
			
		||||
		break;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
class TParametri_ditta : public TSkeleton_application
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
	virtual bool create();
 | 
			
		||||
	virtual void main_loop();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
bool TParametri_ditta::create()
 | 
			
		||||
{
 | 
			
		||||
	open_files(LF_DOC, LF_RIGHEDOC, -1);
 | 
			
		||||
	return TSkeleton_application::create();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void TParametri_ditta::main_loop()
 | 
			
		||||
{
 | 
			
		||||
	TParametri_mask pm("fp0100a");
 | 
			
		||||
	while (pm.run() == K_ENTER)
 | 
			
		||||
	{
 | 
			
		||||
		// Testo prima la connessione
 | 
			
		||||
		TString 
 | 
			
		||||
			ip = pm.get(F_INDIRIZZO),
 | 
			
		||||
			db = pm.get(F_DATABASE),
 | 
			
		||||
			ad,
 | 
			
		||||
			usr = pm.get(F_USER),
 | 
			
		||||
			psw = pm.get(F_PASSWORD);
 | 
			
		||||
		ad << ip << "@" << db;
 | 
			
		||||
 | 
			
		||||
		SSimple_query s(ad, usr, psw, TSDB_MSSQL);
 | 
			
		||||
		if (s.sq_is_connect())
 | 
			
		||||
		{
 | 
			
		||||
			
 | 
			
		||||
			ini_set_string(CONFIG_DITTA, "fp", "ip", ip);
 | 
			
		||||
			ini_set_string(CONFIG_DITTA, "fp", "db", db);
 | 
			
		||||
			ini_set_string(CONFIG_DITTA, "fp", "usr", usr);
 | 
			
		||||
			ini_set_string(CONFIG_DITTA, "fp", "psw", encode(psw));
 | 
			
		||||
			ini_set_string(CONFIG_DITTA, "fp", "flddest", pm.get(F_FLDDEST));
 | 
			
		||||
			ini_set_string(CONFIG_DITTA, "fp", "fldusrdest", pm.get(F_FLDUSRDEST));
 | 
			
		||||
			message_box("Dati salvati correttamente!");
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
			error_box("Connessione a database non riuscita!");
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int fp0100(int argc, char* argv[])
 | 
			
		||||
{
 | 
			
		||||
	TParametri_ditta appc;
 | 
			
		||||
	appc.run(argc, argv, TR("Configurazione FP"));
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										6
									
								
								src/fp/fp0100a.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								src/fp/fp0100a.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,6 @@
 | 
			
		||||
#define F_INDIRIZZO			104
 | 
			
		||||
#define F_DATABASE      101
 | 
			
		||||
#define F_USER		      102
 | 
			
		||||
#define F_PASSWORD		  103
 | 
			
		||||
#define F_FLDDEST				104
 | 
			
		||||
#define F_FLDUSRDEST		105
 | 
			
		||||
							
								
								
									
										64
									
								
								src/fp/fp0100a.uml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								src/fp/fp0100a.uml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,64 @@
 | 
			
		||||
#include "fp0100a.h"
 | 
			
		||||
 | 
			
		||||
TOOLBAR "topbar" 0 0 0 2
 | 
			
		||||
#include <stdbar.h>
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_ELABORA 2 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 1 "Imp. Tipi Doc"
 | 
			
		||||
  PICTURE TOOL_ELABORA
 | 
			
		||||
END
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
PAGE "Configurazione FP" 0 2 0 0
 | 
			
		||||
 | 
			
		||||
GROUPBOX DLG_NULL 78 6
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 1 "@BDatabase"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_INDIRIZZO 50
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 2 "Indirizzo "
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
  CHECKTYPE REQUIRED
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
STRING F_DATABASE 15
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 3 "Nome      "
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
  CHECKTYPE REQUIRED
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_USER 15
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 4 "Utente    "
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
  CHECKTYPE REQUIRED
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_PASSWORD 15
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 5 "Password  "
 | 
			
		||||
  FLAGS "*"
 | 
			
		||||
  CHECKTYPE REQUIRED
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_FLDDEST 50
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 6 "Destinazione Server  "
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
  CHECKTYPE REQUIRED
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_FLDUSRDEST 50
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 7 "Destinazione User    "
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
ENDMASK
 | 
			
		||||
							
								
								
									
										1757
									
								
								src/fp/fp0200.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1757
									
								
								src/fp/fp0200.cpp
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										1757
									
								
								src/fp/fp0200.cpp~RF1e8fd00e.TMP
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1757
									
								
								src/fp/fp0200.cpp~RF1e8fd00e.TMP
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										0
									
								
								src/fp/fp0200a.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/fp/fp0200a.h
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										467
									
								
								src/fp/fp0200a.uml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										467
									
								
								src/fp/fp0200a.uml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,467 @@
 | 
			
		||||
#include "fp0200a.h"
 | 
			
		||||
 | 
			
		||||
TOOLBAR "topbar" 0 0 0 2
 | 
			
		||||
BUTTON DLG_RECALC 2 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 1 "Carica"
 | 
			
		||||
  PICTURE TOOL_CONVERT 
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_ARCHIVE 2 2
 | 
			
		||||
BEGIN 
 | 
			
		||||
  PROMPT 2 1 "Controlla"
 | 
			
		||||
  PICTURE TOOL_SMILE
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_SAVEREC 2 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 3 1 "Salva"
 | 
			
		||||
  PICTURE TOOL_SAVEREC
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_EDIT 10 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 3 1 "E~xcel"
 | 
			
		||||
  PICTURE TOOL_EXCEL
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_OK 2 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 1 "Esporta"
 | 
			
		||||
  PICTURE TOOL_ELABORA
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_EMAIL 2 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 1 "Crea XML"
 | 
			
		||||
  PICTURE TOOL_EMAIL 
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
#include <helpbar.h>
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
PAGE "Impostazioni" 0 2 0 0
 | 
			
		||||
 | 
			
		||||
DATE F_DATAINI
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 1 "Data iniziale:"
 | 
			
		||||
  CHECKTYPE REQUIRED
 | 
			
		||||
  VALIDATE DATE_CMP_FUNC <= F_DATAFIN
 | 
			
		||||
  WARNING "La data iniziale non può essere maggiore della data finale"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
DATE F_DATAFIN
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 40 1 "Data Finale:  "
 | 
			
		||||
  CHECKTYPE REQUIRED
 | 
			
		||||
  VALIDATE DATE_CMP_FUNC >= F_DATAINI
 | 
			
		||||
  WARNING "La data finale non può essere minore della data iniziale"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
RADIOBUTTON F_TIPOCF 15
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 2 "Tipo C/F"
 | 
			
		||||
  ITEM "C|Cliente"
 | 
			
		||||
  ITEM "F|Fornitore"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
NUMBER F_CODCF 6
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 18 3 "Codice:"
 | 
			
		||||
  USE LF_CLIFO
 | 
			
		||||
  INPUT TIPOCF F_TIPOCF SELECT
 | 
			
		||||
  INPUT CODCF F_CODCF
 | 
			
		||||
  DISPLAY "Codice" CODCF
 | 
			
		||||
  DISPLAY "Ragione Sociale@50" RAGSOC
 | 
			
		||||
  DISPLAY "Occasionale@C" OCCAS
 | 
			
		||||
  DISPLAY "Codice Fiscale@16" COFI
 | 
			
		||||
  DISPLAY "Partita IVA@15" PAIV
 | 
			
		||||
  OUTPUT F_CODCF CODCF
 | 
			
		||||
  OUTPUT F_RAGSOC RAGSOC
 | 
			
		||||
  CHEKTYPE NORMAL
 | 
			
		||||
  GROUP 1
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_RAGSOC 50 49
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 18 4 "R.Soc: "
 | 
			
		||||
  USE LF_CLIFO KEY 2
 | 
			
		||||
  INPUT TIPOCF F_TIPOCF SELECT
 | 
			
		||||
  INPUT RAGSOC F_RAGSOC
 | 
			
		||||
  DISPLAY "Ragione Sociale@50" RAGSOC
 | 
			
		||||
  DISPLAY "Codice" CODCF
 | 
			
		||||
  DISPLAY "Codice Fiscale@16" COFI
 | 
			
		||||
  DISPLAY "Partita IVA@15" PAIV
 | 
			
		||||
  COPY OUTPUT F_CODCF
 | 
			
		||||
  ADD RUN CG0 -1
 | 
			
		||||
  GROUP 1
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
RADIOBUTTON F_FATTSEL 25
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 6 "Fatture da visualizzare"
 | 
			
		||||
  ITEM "0|Da inviare"
 | 
			
		||||
  ITEM "1|Inviate"
 | 
			
		||||
  ITEM "2|Mai elaborati"
 | 
			
		||||
  ITEM "3|Forzate"
 | 
			
		||||
  ITEM "4|Errate"
 | 
			
		||||
  ITEM "5|Disabilitate"
 | 
			
		||||
  ITEM "6|Tutti"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
GROUPBOX DLG_NULL 65 5
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 30 6 "Tipi documento selezionati" 
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN B_TIPO_AUTOFATT
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 31 7 "Autofattura"
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
END
 | 
			
		||||
BOOLEAN B_TIPO_FATTACQ
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 45 7 "Fatt d'Acq"
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
END
 | 
			
		||||
BOOLEAN B_TIPO_FATTFISC
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 60 7 "Fatt Fisc"
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
END
 | 
			
		||||
BOOLEAN B_TIPO_FATTVEN
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 75 7 "Fatt Ven"
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN B_TIPO_FATTSCO
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 31 8 "Fatt Scontr"
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN B_TIPO_NOTC
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 45 8 "Nota Cred"
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
END
 | 
			
		||||
BOOLEAN B_TIPO_NOTD
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 60 8 "Nota Deb"
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
END
 | 
			
		||||
BOOLEAN B_TIPO_BOLLADOG
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 75 8 "Bolla Dog"
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
END
 | 
			
		||||
BOOLEAN B_TIPO_STORDOC
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 31 9 "Storno Doc"
 | 
			
		||||
  FLAGS ""
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
PAGE "Trasferimento Fatture" 0 2 0 0
 | 
			
		||||
 | 
			
		||||
SPREADSHEET F_RIGHE
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 0 0 "Righe movimenti"
 | 
			
		||||
  ITEM "Data\n Reg.@8F"
 | 
			
		||||
  ITEM "Tipo\nDocum.@2F"
 | 
			
		||||
  ITEM "Tipo\nDoc. AE.@5F"
 | 
			
		||||
  ITEM "Numero\nDocum.@5F"
 | 
			
		||||
  ITEM "Data\nDocum.@10"
 | 
			
		||||
  ITEM "Aliquota@4"
 | 
			
		||||
  ITEM "Imponibile@10"
 | 
			
		||||
  ITEM "Imposta@10"
 | 
			
		||||
  ITEM "Natura\nIVA@4"
 | 
			
		||||
  ITEM "% Detr.@6"
 | 
			
		||||
  ITEM "C/F@2"
 | 
			
		||||
  ITEM "Codice@6"
 | 
			
		||||
  ITEM "Occas.@16"
 | 
			
		||||
  ITEM "Ragione Sociale@35"
 | 
			
		||||
  ITEM "RF/SO@16"
 | 
			
		||||
  ITEM "Rag. Soc. RF/SO@35"
 | 
			
		||||
  ITEM "Partita IVA@11"
 | 
			
		||||
  ITEM "Codice Fiscale@15"
 | 
			
		||||
  ITEM "Rev.\nCharge@4"
 | 
			
		||||
  ITEM "Auto\nfatt.@3"
 | 
			
		||||
  ITEM "Spedita@5"
 | 
			
		||||
  ITEM "Inviare@5"
 | 
			
		||||
  ITEM "Modificata@10"
 | 
			
		||||
  ITEM "N.\nRegistraz.@10"
 | 
			
		||||
  ITEM "Codici Errori@10"
 | 
			
		||||
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
ENDMASK
 | 
			
		||||
 | 
			
		||||
PAGE "Riga" -1 -1 69 14
 | 
			
		||||
 | 
			
		||||
BOOLEAN A_SPEDITA
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 52 10 "Gia' spedita"
 | 
			
		||||
  FIELD SPEDITA
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
LIST A_INVIO 1 15
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 10 "Da inviare"
 | 
			
		||||
  ITEM "X|X, Da Inviare"
 | 
			
		||||
  ITEM "I|I, Inviato"
 | 
			
		||||
  ITEM "N|N, Disabilitato"
 | 
			
		||||
  ITEM "F|F, Forzato"
 | 
			
		||||
  ITEM "E|E, Errato"
 | 
			
		||||
  FIELD INVIO
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN A_FORZATA
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 30 10 "Forzatura manuale"
 | 
			
		||||
  FIELD FORZATURA
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
NUMBER A_NUMERO 10
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 0 "N.Movimento"
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
  FIELD PROGR
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
DATE A_DATAREG
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 26 0 "Data reg."
 | 
			
		||||
  FIELD DATAREG
 | 
			
		||||
  CHEKTYPE REQUIRED
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
LIST A_TIPOCF 1 10
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 1 "Tipo C/F   "
 | 
			
		||||
  ITEM "C|Cliente"
 | 
			
		||||
  ITEM "F|Fornitore"
 | 
			
		||||
  FIELD TIPOCF
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
NUMBER A_CODCF 6
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 26 1 "Cod. C/F"
 | 
			
		||||
  USE LF_CLIFO
 | 
			
		||||
  INPUT TIPOCF A_TIPOCF SELECT
 | 
			
		||||
  INPUT CODCF A_CODCF
 | 
			
		||||
  DISPLAY "Codice" CODCF
 | 
			
		||||
  DISPLAY "Ragione Sociale@50" RAGSOC
 | 
			
		||||
  DISPLAY "Occasionale@C" OCCAS
 | 
			
		||||
  DISPLAY "Partita IVA" PAIV
 | 
			
		||||
  DISPLAY "Codice fiscale@16" COFI
 | 
			
		||||
  OUTPUT A_CODCF	CODCF
 | 
			
		||||
  OUTPUT A_RAGSOC	RAGSOC
 | 
			
		||||
  OUTPUT A_PAIV		PAIV
 | 
			
		||||
  OUTPUT A_COFI		COFI
 | 
			
		||||
  ADD RUN cg0 -1
 | 
			
		||||
  FIELD CODCF
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING A_OCFPI 16
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 44 1 "Occas."
 | 
			
		||||
  USE LF_OCCAS
 | 
			
		||||
  INPUT CFPI A_OCFPI
 | 
			
		||||
  DISPLAY "Codice@16" CFPI
 | 
			
		||||
  DISPLAY "Ragione Sociale@50" RAGSOC
 | 
			
		||||
  DISPLAY "Partita IVA" PAIV
 | 
			
		||||
  DISPLAY "Codice fiscale@16" COFI
 | 
			
		||||
  OUTPUT A_OCFPI CFPI
 | 
			
		||||
  OUTPUT A_RAGSOC	RAGSOC
 | 
			
		||||
  OUTPUT A_PAIV		PAIV
 | 
			
		||||
  OUTPUT A_COFI		COFI
 | 
			
		||||
  CHEKTYPE NORMAL
 | 
			
		||||
  GROUP 3
 | 
			
		||||
  ADD RUN cg0 -6
 | 
			
		||||
  FIELD OCFPI
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING A_RAGSOC 50 47
 | 
			
		||||
BEGIN
 | 
			
		||||
  FIELD RAGSOC
 | 
			
		||||
  PROMPT 1 2 "Ragione Sociale"
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING A_RFSO 6
 | 
			
		||||
BEGIN
 | 
			
		||||
  FIELD RFSO
 | 
			
		||||
  PROMPT 1 4 "Codice RF/SO:  "
 | 
			
		||||
  HELP "Codice Rappresentante Fiscale o Stabile Organizzazione"
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING A_RAGSOCRFSO 50 47
 | 
			
		||||
BEGIN
 | 
			
		||||
  FIELD RAGSOCRFSO
 | 
			
		||||
  PROMPT 1 5 "Rag. Soc. RF/SO"
 | 
			
		||||
  HELP "Ragione Sociale RF/SO"
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING A_TIPODOC 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 23 6 "Tipo doc. "
 | 
			
		||||
  FIELD TIPODOC
 | 
			
		||||
  USE %TPD
 | 
			
		||||
  INPUT CODTAB A_TIPODOC
 | 
			
		||||
  DISPLAY "Tipo " CODTAB
 | 
			
		||||
  DISPLAY "Descrizione @50" S0
 | 
			
		||||
  OUTPUT A_TIPODOC CODTAB
 | 
			
		||||
  WARNING "Tipo documento errato"
 | 
			
		||||
  CHECKTYPE REQUIRED
 | 
			
		||||
  FLAGS "HUD"
 | 
			
		||||
  ADD NONE
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
LIST A_TIPODOCAE 6
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 23 6 "Tipo doc. "
 | 
			
		||||
  ITEM "TD01|TD01"
 | 
			
		||||
  ITEM "TD04|TD04"
 | 
			
		||||
  ITEM "TD05|TD05"
 | 
			
		||||
  ITEM "TD07|TD07"
 | 
			
		||||
  ITEM "TD08|TD08"
 | 
			
		||||
  ITEM "TD10|TD10"
 | 
			
		||||
  ITEM "TD11|TD11"
 | 
			
		||||
  ITEM "ERR0|Errore"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING A_NUMDOC 7
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 42 6 "Num. doc. "
 | 
			
		||||
  FLAGS "U"
 | 
			
		||||
  FIELD NUMDOC
 | 
			
		||||
  CHEKTYPE REQUIRED
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
DATE A_DATADOC
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 6 "Data doc."
 | 
			
		||||
  FIELD DATADOC
 | 
			
		||||
  CHEKTYPE REQUIRED
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
LIST A_NATURA 1 35
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 20 7 "Natura IVA"
 | 
			
		||||
  ITEM "|IVA ordinaria"
 | 
			
		||||
  ITEM "N1|N1 - IVA esclusa ex art 15"
 | 
			
		||||
  ITEM "N2|N2 - IVA non soggetta"
 | 
			
		||||
  ITEM "N3|N3 - IVA non imponibile"
 | 
			
		||||
  ITEM "N4|N4 - IVA esente"
 | 
			
		||||
  ITEM "N5|N5 - IVA in regime del margine"
 | 
			
		||||
  ITEM "N6|N6 - IVA in reverse charge"
 | 
			
		||||
  ITEM "N7|N7 - IVA assolta in altro stato U3"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING A_ALIQUOTA 4
 | 
			
		||||
BEGIN
 | 
			
		||||
 PROMPT 1 7 "Aliquota "
 | 
			
		||||
  HELP "Codice aliquota"
 | 
			
		||||
  FIELD CODTAB
 | 
			
		||||
  KEY 1
 | 
			
		||||
  USE %IVA
 | 
			
		||||
  FLAGS "U"
 | 
			
		||||
  INPUT CODTAB A_ALIQUOTA
 | 
			
		||||
  DISPLAY "Codice" CODTAB
 | 
			
		||||
  DISPLAY "Descrizione@50" S0
 | 
			
		||||
  DISPLAY "Tipo" S1
 | 
			
		||||
  DISPLAY "%@5" R0
 | 
			
		||||
  DISPLAY "Vent." S6
 | 
			
		||||
  DISPLAY "Sospeso" B2
 | 
			
		||||
  OUTPUT A_ALIQUOTA CODTAB
 | 
			
		||||
  CHECKTYPE REQUIRED
 | 
			
		||||
  VALIDATE ZEROFILL_FUNC 2
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING A_DETRAIB 6
 | 
			
		||||
BEGIN
 | 
			
		||||
 PROMPT 1 8 "% Detraibilita'"
 | 
			
		||||
  HELP "Percentuale di detraibilita'"
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
NUMBER A_IMPONIBILE 12 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 42 8 "Imponibile"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
NUMBER A_IMPOSTA 12 2
 | 
			
		||||
BEGIN
 | 
			
		||||
 PROMPT 42 9 "Imposta   "
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN A_REVERSE
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 9 "Reverse charge"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN A_AUTOFATT
 | 
			
		||||
BEGIN
 | 
			
		||||
 PROMPT 25 9 "Autofattura"
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING A_PAIV 12
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 3 "Partita IVA    "
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING A_COFI 16
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 33 3 "Codice Fiscale"
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING A_CODERR 10
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 0 13 "Codici errori"
 | 
			
		||||
  //FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
TOOLBAR "topbar" 0 0 0 2
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_OK 2 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 1 ""
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_USER 2 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 1 "Collega"
 | 
			
		||||
  PICTURE TOOL_LINK
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_DELREC 2 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 1 "Elimina"
 | 
			
		||||
  PICTURE TOOL_DELREC
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_CANCEL 2 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 4 1 ""
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
ENDMASK
 | 
			
		||||
							
								
								
									
										308
									
								
								src/fp/fp0200b.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										308
									
								
								src/fp/fp0200b.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,308 @@
 | 
			
		||||
#include <applicat.h>
 | 
			
		||||
#include <automask.h>
 | 
			
		||||
#include <config.h>
 | 
			
		||||
#include <execp.h>
 | 
			
		||||
#include <golem.h>
 | 
			
		||||
#include <progind.h>
 | 
			
		||||
#include <reputils.h>
 | 
			
		||||
#include <tabutil.h>
 | 
			
		||||
#include <utility.h>
 | 
			
		||||
#include <agasys.h>
 | 
			
		||||
#include <printer.h>
 | 
			
		||||
#include <dongle.h>		// dongle()
 | 
			
		||||
#include <odbcrset.h>	// Oracle Recset
 | 
			
		||||
#include <tsdb.h>
 | 
			
		||||
#include <xvtdb.h>
 | 
			
		||||
#include <map>	// std::map
 | 
			
		||||
 | 
			
		||||
#include "../ve/velib05.h"
 | 
			
		||||
#include "../cg/cglib03.h"
 | 
			
		||||
#include "../fe/felib.h"
 | 
			
		||||
 | 
			
		||||
#include "fp0200a.h"
 | 
			
		||||
#include "../tf/tfutility.h"
 | 
			
		||||
#include <memory>
 | 
			
		||||
 | 
			
		||||
#ifdef DISABLED
 | 
			
		||||
/////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
// Globals
 | 
			
		||||
/////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
enum return_code 
 | 
			
		||||
{
 | 
			
		||||
	found,			// Trovato
 | 
			
		||||
	foundcust,	// Trovato in trasfatt
 | 
			
		||||
	foundidcust,// Trovato ma con id customizzato
 | 
			
		||||
	nextmov,		// Trovato ma cambiato movimento
 | 
			
		||||
	eof,				// EOF rmoviva
 | 
			
		||||
	eofcust,		// EOF trasfatt
 | 
			
		||||
	after				// File mov su un movimento dopo rispetto a rmoviva
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// Su DB: X o ''->Da inviare, F->Forzato, I->Inviato, N->Non inviare
 | 
			
		||||
enum filter_fatt
 | 
			
		||||
{
 | 
			
		||||
	toSend,			// "", "X", "F", "E"
 | 
			
		||||
	sent,				// "I"
 | 
			
		||||
	untouched,  // "", "X"
 | 
			
		||||
	forced,			// "F"
 | 
			
		||||
	disabled,		// "N"
 | 
			
		||||
	err,				// "E"
 | 
			
		||||
	all					// Nessun controllo
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define SHEET_GAP 101
 | 
			
		||||
#define DTE_PROVV "DTE0000001"
 | 
			
		||||
#define DTR_PROVV "DTR0000001"
 | 
			
		||||
#define TOLLARANZA 0.05
 | 
			
		||||
// Flag invio
 | 
			
		||||
#define FLAG_INVIO		"X"
 | 
			
		||||
#define FLAG_ERRORE		"E"
 | 
			
		||||
#define FLAG_NINVIO		"N"
 | 
			
		||||
#define FLAG_FORZATO	"F"
 | 
			
		||||
#define FLAG_INVIATO  "I"
 | 
			
		||||
#define SPESOMETROBASE "ModuliSirio"
 | 
			
		||||
#define REG_ATT 1
 | 
			
		||||
#define REG_PAS 2
 | 
			
		||||
#define CARATTERI_SPECIALI "àèéìòù°"
 | 
			
		||||
 | 
			
		||||
/* Così facendo basta modificare la maschera (e le dichiarazioni di conseguenza) 
 | 
			
		||||
 * per avere l'inserimento nello sheet corretto */
 | 
			
		||||
enum spesometroFields{ 
 | 
			
		||||
	_spedita		= A_SPEDITA			- SHEET_GAP,
 | 
			
		||||
	_invio			= A_INVIO				- SHEET_GAP,
 | 
			
		||||
	_forzata		= A_FORZATA			- SHEET_GAP,
 | 
			
		||||
	_numero			= A_NUMERO			- SHEET_GAP,
 | 
			
		||||
	_datareg		= A_DATAREG			- SHEET_GAP,
 | 
			
		||||
	_tipocf			= A_TIPOCF			- SHEET_GAP,
 | 
			
		||||
	_codcf			= A_CODCF				- SHEET_GAP,
 | 
			
		||||
	_occas			= A_OCFPI				- SHEET_GAP,
 | 
			
		||||
	_ragsoc			= A_RAGSOC			- SHEET_GAP,
 | 
			
		||||
	_rfso				= A_RFSO				- SHEET_GAP,
 | 
			
		||||
	_ragsocrfso = A_RAGSOCRFSO	- SHEET_GAP,
 | 
			
		||||
	_codnum			= A_TIPODOC			- SHEET_GAP,
 | 
			
		||||
	_codnumAE		= A_TIPODOCAE		- SHEET_GAP,
 | 
			
		||||
	_numdoc			= A_NUMDOC			- SHEET_GAP,
 | 
			
		||||
	_datadoc		= A_DATADOC			- SHEET_GAP,
 | 
			
		||||
	_natura			= A_NATURA			- SHEET_GAP,
 | 
			
		||||
	_aliquota		= A_ALIQUOTA		- SHEET_GAP,
 | 
			
		||||
	_detraibile = A_DETRAIB			- SHEET_GAP,
 | 
			
		||||
	_imponibile = A_IMPONIBILE	- SHEET_GAP,
 | 
			
		||||
	_importoIVA = A_IMPOSTA			- SHEET_GAP, // Imposta è già preso
 | 
			
		||||
	_reverse		= A_REVERSE			- SHEET_GAP,
 | 
			
		||||
	_autofatt		= A_AUTOFATT		- SHEET_GAP,
 | 
			
		||||
	_paiv				= A_PAIV				- SHEET_GAP,
 | 
			
		||||
	_codfis			= A_COFI				- SHEET_GAP,
 | 
			
		||||
	_coderr			= A_CODERR			- SHEET_GAP
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
// Utilities
 | 
			
		||||
/////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
// Da un id ritorna il tipo doc corrispondente
 | 
			
		||||
TString getTipoDoc(int id);
 | 
			
		||||
int			getTipoDoc(TString id);
 | 
			
		||||
 | 
			
		||||
// Cerca una stringa all'interno di una SLIST (Potrebbe diventare una funzione di XVT.h)
 | 
			
		||||
static SLIST_ELT xvt_slist_find_str(SLIST list, const char* str);
 | 
			
		||||
// Aggiorna il file dst se più vecchio di src (Potrebbe diventare una funzione di XVT.h)
 | 
			
		||||
bool xvt_fsys_fupdate(const char* src, const char* dst);
 | 
			
		||||
// Decodifica il tipo di documento per il trasferimento fatture
 | 
			
		||||
const char * decodTipo(TToken_string* strarr);
 | 
			
		||||
// Salvo un singolo record
 | 
			
		||||
//bool saveRec(TToken_string row, bool esportato = false);
 | 
			
		||||
// Ritorno una data in formato ANSI
 | 
			
		||||
inline TDate toDate(const char * date) { return TDate(date).string(); }
 | 
			
		||||
// Salto se la riga non è abilitata
 | 
			
		||||
#define IF_IS_ENABLED(strarr) if(strcmp(strarr->get(_invio), FLAG_INVIO) != 0 && strcmp(strarr->get(_invio), FLAG_FORZATO) != 0 && strcmp(strarr->get(_invio), FLAG_INVIATO) != 0) continue;
 | 
			
		||||
// Ritorno il carattere senza accento maiuscolo
 | 
			
		||||
inline const char * noSpecial(char a);
 | 
			
		||||
// Ritorno se è ancora valida la bolla doganale senza informazioni fornitore
 | 
			
		||||
bool bd2017();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
// TFp_record
 | 
			
		||||
/////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
// Connessione a db
 | 
			
		||||
SSimple_query& db()
 | 
			
		||||
{
 | 
			
		||||
	SSimple_query * _db = nullptr;
 | 
			
		||||
	if (_db == nullptr)
 | 
			
		||||
		_db = new SSimple_query();
 | 
			
		||||
	return *_db;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Contenitore di campi di un record di database MSSQL
 | 
			
		||||
class TFp_record : public TObject
 | 
			
		||||
{
 | 
			
		||||
  TString8 _table;
 | 
			
		||||
  TToken_string _key;
 | 
			
		||||
  TAssoc_array _fields;
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
  void copy(const TFp_record& rec) { _table = rec._table; _key = rec._key; _fields = rec._fields; }
 | 
			
		||||
  const TString& var2str(const TString& fld, const TVariant& var) const;
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
  void reset() { _fields.destroy(); }
 | 
			
		||||
  void set(const char* fld, const TVariant& var);
 | 
			
		||||
  void set(const char* fld, long var);
 | 
			
		||||
  void set(const char* fld, const char* var);
 | 
			
		||||
  void set(const char* fld, const real& var);
 | 
			
		||||
  void set(const char* fld, const TString& var);
 | 
			
		||||
  void set(const char* fld, const TDate& var);
 | 
			
		||||
  void set(const char* fld, bool var);
 | 
			
		||||
  const TVariant& get(const char* fld) const;
 | 
			
		||||
 | 
			
		||||
  bool insert();
 | 
			
		||||
  bool remove();
 | 
			
		||||
  bool search();
 | 
			
		||||
  bool search(const char* k1, const char* k2 = NULL, const char* k3 = NULL);
 | 
			
		||||
 | 
			
		||||
  virtual TObject* dup() const { return new TFp_record(*this); }
 | 
			
		||||
  virtual bool ok() const { return _table.not_empty(); }
 | 
			
		||||
  
 | 
			
		||||
  TFp_record& operator=(const TFp_record& rec) { copy(rec); return *this; }
 | 
			
		||||
  TFp_record(const TFp_record& rec) { copy(rec); }
 | 
			
		||||
  TFp_record(const char* table);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
// TFp_cursors
 | 
			
		||||
/////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Classe per la gestione di RMOVIVA, MOV, TFCUST
 | 
			
		||||
 */
 | 
			
		||||
class TFp_cursors : TObject
 | 
			
		||||
{
 | 
			
		||||
	friend class TCursor;
 | 
			
		||||
	TISAM_recordset* c_rmoviva;
 | 
			
		||||
	TISAM_recordset* c_trasfatt;
 | 
			
		||||
	bool _newMov;
 | 
			
		||||
	bool _newCust;
 | 
			
		||||
	// Se trovo un record custom devo saltare tutti quelli che trovo successivamente, per fare ciò utilizzo una TToken_string
 | 
			
		||||
	TToken_string _alqCust;
 | 
			
		||||
 | 
			
		||||
	TRectype _next(return_code& code, TString& tipocf, TString& codcf, TString& ocfpi);		// Si sposta avanti di un elemento
 | 
			
		||||
	TRectype _nextCust(return_code& code, TString& tipocf, TString& codcf, TString& ocfpi);		// Si sposta avanti di un elemento tra quelli custom
 | 
			
		||||
	bool		 checkEnabled(TISAM_recordset* origCur);
 | 
			
		||||
public:
 | 
			
		||||
	//TFp_cursors();
 | 
			
		||||
	~TFp_cursors();
 | 
			
		||||
	long int getIvaItems()	{ return c_rmoviva->items(); }
 | 
			
		||||
	long int getIvaPos()		{ return c_rmoviva->cursor()->pos(); }
 | 
			
		||||
	TRectype getIva()				{ return c_rmoviva->cursor()->curr(); }
 | 
			
		||||
	int next(TAssoc_array& recimposte, bool& ok, TString& tipocf, TString& codcf, TString& ocfpi);		// Legge tutto il prossimo movimento, in importi mette per ogni codiva la somma
 | 
			
		||||
	
 | 
			
		||||
	int updateFilters(const char tipocf, const long codcf, TDate dal, TDate al, int cod = toSend);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
// TFp_mask
 | 
			
		||||
/////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
class TFp_mask : public TAutomask
 | 
			
		||||
{
 | 
			
		||||
	friend class TFp_cursors;
 | 
			
		||||
 | 
			
		||||
	TMaskmode _mode;
 | 
			
		||||
	bool _sheet_dirty;
 | 
			
		||||
	bool _filter_changed;
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
	virtual void next_page(int p);
 | 
			
		||||
	TRecnotype nuovo_progr() const;
 | 
			
		||||
	void changeInvio(TString tipocf, TString codcf, TString numdoc, TString invio) const;
 | 
			
		||||
  virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
 | 
			
		||||
	void openJava();
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	void setFilterChanged() { _filter_changed = true; }
 | 
			
		||||
	void load_sheet();
 | 
			
		||||
	TFp_mask(TString msk);
 | 
			
		||||
	~TFp_mask();
 | 
			
		||||
	// Carico i tipi documento all'inizio
 | 
			
		||||
	void loadConfig();
 | 
			
		||||
	// Salvo i tipi documento
 | 
			
		||||
	void saveConfig();
 | 
			
		||||
	// Salvo tutti i records
 | 
			
		||||
	bool saveAll();
 | 
			
		||||
	// Controllo tutti i records
 | 
			
		||||
	bool checkAll();
 | 
			
		||||
	// Testo validità record
 | 
			
		||||
	bool checkRec(TPrinter* stampa, TToken_string* rec);
 | 
			
		||||
	// Controllo che siano presenti records
 | 
			
		||||
	bool checkNotEmpty();
 | 
			
		||||
	// Controllo finale prima di inviare il tutto, se ci sono fatture 
 | 
			
		||||
	// con più volte lo stesso codice aliquota disabilito il precedente
 | 
			
		||||
	void theFinalCheckDown();
 | 
			
		||||
	// Mette il flag di invio = [flag] per la riga numero [nrow]
 | 
			
		||||
	void flagRow(int nrow, TString flag);
 | 
			
		||||
	// Salto se la riga ha un tipo invio non del filtro
 | 
			
		||||
	bool checkInvio(const TString& invio);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// Funzione inline di stampa
 | 
			
		||||
inline void printError(TPrinter* stampa, TString movimento, TString documento, TString msgerr);
 | 
			
		||||
TFp_mask& msk();
 | 
			
		||||
 | 
			
		||||
/////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
// TFp_app
 | 
			
		||||
/////////////////////////////////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
struct clifoDoc
 | 
			
		||||
{
 | 
			
		||||
	long contCliFo;
 | 
			
		||||
	long countDoc;
 | 
			
		||||
	std::map<TString, long> docID;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class TFp_app : public TSkeleton_application
 | 
			
		||||
{
 | 
			
		||||
  TAnagrafica _ditta;
 | 
			
		||||
  TString16 _cofi;
 | 
			
		||||
  TFilename _dbname;
 | 
			
		||||
  TLog_report* _log;
 | 
			
		||||
  TString _logTFF;
 | 
			
		||||
	bool _append;
 | 
			
		||||
	TString myrfso;
 | 
			
		||||
	static long header;
 | 
			
		||||
	// Solitamente nei programmi di campo cerco di sfruttare le classi interne ma per mancanza di tempo sono costretto a usare l'std::vector
 | 
			
		||||
	std::map<TString, clifoDoc> mCliDoc;
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
  int parse_line(const TString& line, TString& var, TString& val) const;
 | 
			
		||||
  bool create_table(TScanner& TFF, const TString& table);
 | 
			
		||||
	TString getKey(TToken_string* strarr);
 | 
			
		||||
	TString getHeader(TToken_string* strarr);
 | 
			
		||||
	TString getBody(TToken_string* strarr, bool add = true);
 | 
			
		||||
	bool tff0100(TSheet_field& sheet);										// Header esportazione
 | 
			
		||||
	bool tff0200(TString key);														// Anagrafica ditta
 | 
			
		||||
	bool tff0300(TString key, TRectype r_ana);						// Rappresentante fiscale ditta
 | 
			
		||||
	bool tff0400(TSheet_field& sheet);										// Anagrafica clifo
 | 
			
		||||
	bool tff0700(TSheet_field& sheet);										// Testata documento
 | 
			
		||||
	bool tff2200(TToken_string* strarr, int nriga);				// Riepilogo aliquote
 | 
			
		||||
	bool tff3100(TToken_string* strarr, TRectype r_ana);	// Rappresentante fiscale clifo
 | 
			
		||||
	bool setEsportato(TSheet_field& sheet);
 | 
			
		||||
	bool emptyTables(TString key);												// Cancella da tutte le tabelle i record con chiave key
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
  void log(int severity, const char* msg);
 | 
			
		||||
  bool show_log();
 | 
			
		||||
	bool syncronizeDB();
 | 
			
		||||
	bool verifyDB(const bool create);
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
  virtual bool create();
 | 
			
		||||
  virtual bool destroy();
 | 
			
		||||
  virtual void main_loop();
 | 
			
		||||
	bool send(TFp_mask* msk);
 | 
			
		||||
 | 
			
		||||
  TFp_app() : _log(NULL) {}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										1849
									
								
								src/fp/fp0300.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1849
									
								
								src/fp/fp0300.cpp
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										1652
									
								
								src/fp/fp0300.cpp~RF5235131.TMP
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1652
									
								
								src/fp/fp0300.cpp~RF5235131.TMP
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										26
									
								
								src/fp/fp0300a.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								src/fp/fp0300a.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,26 @@
 | 
			
		||||
#define START_MASK  301
 | 
			
		||||
#define F_DATAINI   301
 | 
			
		||||
#define F_DATAEND   302
 | 
			
		||||
#define F_FATTSEL   303
 | 
			
		||||
#define F_COFI      304
 | 
			
		||||
#define F_DATIPODOC 305
 | 
			
		||||
#define F_ATIPODOC  306
 | 
			
		||||
#define END_MASK    399
 | 
			
		||||
 | 
			
		||||
#define F_DOCS     201
 | 
			
		||||
 | 
			
		||||
#define S_SELECTED 101
 | 
			
		||||
#define S_ANNO     102
 | 
			
		||||
#define S_CODNUM   103
 | 
			
		||||
#define S_TIPODOC  104
 | 
			
		||||
#define S_CODSDI   105
 | 
			
		||||
#define S_NDOC     106
 | 
			
		||||
#define S_DATADOC  107
 | 
			
		||||
#define S_CLIENTE  108
 | 
			
		||||
#define S_RAGSOC   109
 | 
			
		||||
#define S_UFFICIO  110
 | 
			
		||||
#define S_RIFAMM   111
 | 
			
		||||
#define S_COFI     112
 | 
			
		||||
#define S_SPLITPAY 113
 | 
			
		||||
#define S_ATTACH   114
 | 
			
		||||
#define S_ONLYGEN  115
 | 
			
		||||
							
								
								
									
										223
									
								
								src/fp/fp0300a.uml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										223
									
								
								src/fp/fp0300a.uml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,223 @@
 | 
			
		||||
#include "fp0300a.h"
 | 
			
		||||
 | 
			
		||||
TOOLBAR "topbar" 0 0 0 2
 | 
			
		||||
 | 
			
		||||
#include <allbar.h>
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
PAGE "Fatture Pubblica Amministrazione" 0 2 0 0
 | 
			
		||||
 | 
			
		||||
DATE F_DATAINI
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 0 "Data iniziale"
 | 
			
		||||
  CHECKTYPE REQUIRED
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
DATE F_DATAEND
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 30 0 "Data finale"
 | 
			
		||||
  VALIDATE DATE_CMP_FUNC >= F_DATAINI
 | 
			
		||||
  WARNING "La data finale non può essere minore della data iniziale"
 | 
			
		||||
  CHECKTYPE REQUIRED
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
RADIOBUTTON F_FATTSEL 25
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 1 "Fatture da visualizzare"
 | 
			
		||||
  ITEM "|Da inviare"
 | 
			
		||||
  ITEM "P|Pronte"
 | 
			
		||||
  ITEM "X|XML Generato"
 | 
			
		||||
  ITEM "E|In errore"
 | 
			
		||||
  ITEM "N|Accettate"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_COFI 16
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 30 1 "Codice fiscale trasmittente "
 | 
			
		||||
  CHECKTYPE REQUIRED
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_DATIPODOC 4
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 30 2 "Da tipo doc   "
 | 
			
		||||
  FIELD TIPODOC
 | 
			
		||||
  HELP "Codice tipo documento"
 | 
			
		||||
  USE %TIP
 | 
			
		||||
  SELECT S12!=""
 | 
			
		||||
  INPUT CODTAB F_DATIPODOC
 | 
			
		||||
  DISPLAY "Codice" CODTAB
 | 
			
		||||
  DISPLAY "Descrizione@50" S0
 | 
			
		||||
  DISPLAY "Tipo SDI@10" S12
 | 
			
		||||
  OUTPUT F_DATIPODOC CODTAB
 | 
			
		||||
  CHECKTYPE FORCED
 | 
			
		||||
  FLAG "UP"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING F_ATIPODOC 4
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 30 3  "A tipo doc    "
 | 
			
		||||
  FIELD TIPODOC
 | 
			
		||||
  HELP "Codice tipo documento"
 | 
			
		||||
  USE %TIP
 | 
			
		||||
  SELECT S12!=""
 | 
			
		||||
  INPUT CODTAB F_ATIPODOC
 | 
			
		||||
  DISPLAY "Codice" CODTAB
 | 
			
		||||
  DISPLAY "Descrizione@50" S0
 | 
			
		||||
  DISPLAY "Tipo SDI@10" S12
 | 
			
		||||
  OUTPUT F_ATIPODOC CODTAB
 | 
			
		||||
  CHECKTYPE FORCED
 | 
			
		||||
  FLAG "UP"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING DLG_PROFILE 256
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 -1 "Profilo "
 | 
			
		||||
  PSELECT
 | 
			
		||||
  FLAGS "H"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
PAGE "Elenco Fatture" 0 2 0 0
 | 
			
		||||
 | 
			
		||||
SPREADSHEET F_DOCS
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 0 2 ""
 | 
			
		||||
  ITEM "@1"
 | 
			
		||||
  ITEM "Anno"
 | 
			
		||||
  ITEM "Cod.\nNum.@4"
 | 
			
		||||
  ITEM "Tipo\nDoc@4"
 | 
			
		||||
  ITEM "Tipo SDI@4"
 | 
			
		||||
  ITEM "Num.\nDoc.@7"
 | 
			
		||||
  ITEM "Data\nDoc.@10"
 | 
			
		||||
  ITEM "Cliente"
 | 
			
		||||
  ITEM "Ragione Sociale@50"
 | 
			
		||||
  ITEM "Codice destinatario"
 | 
			
		||||
  ITEM "Riferimento\nAmministrazione@20"
 | 
			
		||||
  ITEM "Codice Fiscale@16"
 | 
			
		||||
  ITEM "Scissione\nPagamenti@9"
 | 
			
		||||
  ITEM "Allegati"
 | 
			
		||||
  ITEM "Solo generazione"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
ENDMASK
 | 
			
		||||
 | 
			
		||||
PAGE "Documento" -1 -1 78 9
 | 
			
		||||
 | 
			
		||||
BOOLEAN S_SELECTED
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 1 "Da elaborare"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
NUMBER S_ANNO 4
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 2 "Anno "
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING S_CODNUM 4
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 21 2 "Numerazione "
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING S_TIPODOC 4
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 21 2 "Tipo Documento "
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING S_CODSDI 4
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 41 2 "Tipo SDI "
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
NUMBER S_NDOC 7
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 3 "Numero "
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
DATE S_DATADOC
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 21 3 "Data "
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
NUMBER S_CLIENTE 6
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 4 "Cliente "
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING S_RAGSOC 50
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 21 4 ""
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING S_UFFICIO 6
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 5 ""
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING S_RIFAMM 20
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 21 5 ""
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
STRING S_COFI 20
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 6 ""
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN S_SPLITPAY
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 7 "Assogettato scissione pagamenti art.17 ter DPR 633/72"
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN S_ATTACH
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 8 "Documenti in allegato"
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN S_ONLYGEN
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 20 8 "Solo generazione"
 | 
			
		||||
  FLAGS "D"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
TOOLBAR "Documento" 0 0 0 2
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_OK 2 2 
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 1 ""
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_USER 2 2 
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 1 "Collega"
 | 
			
		||||
  PICTURE TOOL_LINK
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
BUTTON DLG_CANCEL 2 2 
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 1 1 ""
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ENDPAGE
 | 
			
		||||
 | 
			
		||||
ENDMASK
 | 
			
		||||
							
								
								
									
										102
									
								
								src/fp/fplib01.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										102
									
								
								src/fp/fplib01.cpp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,102 @@
 | 
			
		||||
#include "fplib01.h"
 | 
			
		||||
#include <prefix.h>
 | 
			
		||||
#include <config.h>
 | 
			
		||||
#include <utility.h>
 | 
			
		||||
#include <scanner.h>
 | 
			
		||||
#include <xvt.h>
 | 
			
		||||
#include <diction.h>
 | 
			
		||||
#include "text.h"
 | 
			
		||||
#include <isam.h>
 | 
			
		||||
 | 
			
		||||
void set_connection(SSimple_query& s)
 | 
			
		||||
{
 | 
			
		||||
	if (s.sq_connect(
 | 
			
		||||
		TString() << ini_get_string(CONFIG_DITTA, "fp", "ip") << "@" << ini_get_string(CONFIG_DITTA, "fp", "db"),
 | 
			
		||||
		ini_get_string(CONFIG_DITTA, "fp", "usr"),
 | 
			
		||||
		decode(ini_get_string(CONFIG_DITTA, "fp", "psw")),
 | 
			
		||||
		TSDB_MSSQL) != NOERR)
 | 
			
		||||
		fatal_box("Impossibile connettersi al DB esterno");
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
SSimple_query& db()
 | 
			
		||||
{
 | 
			
		||||
	static SSimple_query* db = nullptr;
 | 
			
		||||
 | 
			
		||||
	if (db == nullptr)
 | 
			
		||||
	{
 | 
			
		||||
		db = new SSimple_query();
 | 
			
		||||
		set_connection(*db);
 | 
			
		||||
		// Non utilizzo l'autocommit, viene gestito manualmente
 | 
			
		||||
		db->sq_set_autocommit(false);
 | 
			
		||||
	}
 | 
			
		||||
	return *db;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string getline(ifstream& f);
 | 
			
		||||
 | 
			
		||||
bool check_tables()
 | 
			
		||||
{
 | 
			
		||||
	/* 
 | 
			
		||||
	 * Da questo programma in poi verrà utilizzato un sistema diverso per la creazione e aggiornamento delle tabelle
 | 
			
		||||
	 * Verranno utilizzati dei file.sql aggiornati con il numero di patch, leggermente scomodo durante la creazione ma facile per i controlli successivamente
 | 
			
		||||
	 */
 | 
			
		||||
	SLIST files = xvt_fsys_list_files(".sql", "sql/fp0/", false);
 | 
			
		||||
	TLocalisamfile tabmod(LF_TABMOD);
 | 
			
		||||
	tabmod.put("MOD", "FP");
 | 
			
		||||
	tabmod.put("COD", "SQL");
 | 
			
		||||
	tabmod.put("CODTAB", "VERSION");
 | 
			
		||||
	TString version;
 | 
			
		||||
	if (tabmod.read() == NOERR)
 | 
			
		||||
		version = tabmod.get("S0");
 | 
			
		||||
	for(SLIST_ELT file = xvt_slist_get_first(files); file; file = xvt_slist_get_next(files, file))
 | 
			
		||||
	{
 | 
			
		||||
		TString file_version = TFilename(file->str).name_only();
 | 
			
		||||
		file_version = file_version.mid(2, 4);
 | 
			
		||||
		if (file_version <= version)
 | 
			
		||||
			continue;
 | 
			
		||||
		ifstream f(file->str);
 | 
			
		||||
		if(f.is_open())
 | 
			
		||||
		{
 | 
			
		||||
			string s;
 | 
			
		||||
			while(!f.eof())
 | 
			
		||||
			{ 
 | 
			
		||||
				s += getline(f);
 | 
			
		||||
				// Cerco un ;
 | 
			
		||||
				const int limiter = s.find(';') + 1;
 | 
			
		||||
				if(limiter > 0)
 | 
			
		||||
				{
 | 
			
		||||
					string query = s.substr(0, limiter);
 | 
			
		||||
					s.erase(0, limiter);
 | 
			
		||||
					if(!db().sq_set_exec(query) || !db().sq_commit())
 | 
			
		||||
					{
 | 
			
		||||
						fatal_box("Impossibile eseguire/salvare la query:\n%s\n%s", query.c_str(), db().sq_get_string_error());
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			cantread_box(file->str);
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
		// Salvo su tabmod
 | 
			
		||||
		tabmod.zero();
 | 
			
		||||
		tabmod.put("MOD", "FP");
 | 
			
		||||
		tabmod.put("COD", "SQL");
 | 
			
		||||
		tabmod.put("CODTAB", "VERSION");
 | 
			
		||||
		tabmod.put("S0", file_version);
 | 
			
		||||
		if(tabmod.rewrite_write() != NOERR && !yesno_box("Attenzione! Errore di aggiornamento versione di Database in Campo, continuare? %s", file_version))
 | 
			
		||||
		{
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string getline(ifstream& f)
 | 
			
		||||
{
 | 
			
		||||
	string app;
 | 
			
		||||
	getline(f, app);
 | 
			
		||||
	return app;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										13
									
								
								src/fp/fplib01.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								src/fp/fplib01.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
			
		||||
#ifndef __FPLIB01_H
 | 
			
		||||
#define __FPLIB01_H
 | 
			
		||||
 | 
			
		||||
#include <tsdb.h>
 | 
			
		||||
#include <utility.h>
 | 
			
		||||
#include <config.h>
 | 
			
		||||
 | 
			
		||||
#define SQL_FLD "sql/"
 | 
			
		||||
 | 
			
		||||
SSimple_query& db();
 | 
			
		||||
bool check_tables();
 | 
			
		||||
 | 
			
		||||
#endif // __FPLIB01_H
 | 
			
		||||
							
								
								
									
										1656
									
								
								src/fp/sql/fp0100.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1656
									
								
								src/fp/sql/fp0100.sql
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -405,12 +405,19 @@ const char* TApplication::get_module_name() const
 | 
			
		||||
        }
 | 
			
		||||
      }    
 | 
			
		||||
      if (!ok)
 | 
			
		||||
      {
 | 
			
		||||
				if(is_power_station())
 | 
			
		||||
				{
 | 
			
		||||
					warning_box("Attenzione! Non sei abilitato per l'utilizzo del modulo %s", static_cast<const char*>(module));
 | 
			
		||||
				}
 | 
			
		||||
				else
 | 
			
		||||
				{
 | 
			
		||||
					cantaccess_box(module);
 | 
			
		||||
					module.cut(0);
 | 
			
		||||
				}
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }  
 | 
			
		||||
  return module;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -19,7 +19,7 @@ at AVIS Provinciale
 | 
			
		||||
in Elenchi Intracomunitari
 | 
			
		||||
po Penna Ottica
 | 
			
		||||
ab Analisi di bilancio
 | 
			
		||||
pa Fatturazione elettronica pubblica amministrazione
 | 
			
		||||
pa Fattura PA
 | 
			
		||||
ca Contabilità Analitica 
 | 
			
		||||
sl Stato Avanzamento Lavori
 | 
			
		||||
ic IVA per cassa
 | 
			
		||||
@ -35,7 +35,7 @@ or Ordini
 | 
			
		||||
ef Effetti
 | 
			
		||||
db Distinta Base
 | 
			
		||||
pr Provvigioni Agenti
 | 
			
		||||
?? Modulo vario ex-cu Codice Unico Progetto
 | 
			
		||||
fp Fatturazione tra Privati + PA
 | 
			
		||||
sv Statistiche di Vendita
 | 
			
		||||
mr Manufacturing Resource Planning
 | 
			
		||||
?? Modulo vario ex-ec Collegamento E-commerce
 | 
			
		||||
@ -46,6 +46,5 @@ l2 Lavanderie 02
 | 
			
		||||
bs Bee Store
 | 
			
		||||
ha Hardy Caffè
 | 
			
		||||
ri Riclassificazioni
 | 
			
		||||
vd Vendita al dettaglio
 | 
			
		||||
gv Gestione versamenti F24
 | 
			
		||||
tf Trasferimento fatture
 | 
			
		||||
gv Gestione versamenti
 | 
			
		||||
tf Trasferimento Fatture
 | 
			
		||||
@ -37,7 +37,7 @@
 | 
			
		||||
#define EFAUT 34
 | 
			
		||||
#define DBAUT 35
 | 
			
		||||
#define PRAUT 36
 | 
			
		||||
//#define CUAUT 37   Obsoleta CUP implicita in CT (1)
 | 
			
		||||
#define FPAUT 37
 | 
			
		||||
#define SVAUT 38
 | 
			
		||||
#define MRAUT 39
 | 
			
		||||
#define ECAUT 40
 | 
			
		||||
 | 
			
		||||
@ -278,7 +278,7 @@ protected:
 | 
			
		||||
  // @cmember Ritorna la posizione della colonna con identificatore <p cid>
 | 
			
		||||
  int cid2col(short cid) const;
 | 
			
		||||
  // @cmember Ritorna la colonna logica con identificatore <p cid>
 | 
			
		||||
  int cid2index(short cid) const;
 | 
			
		||||
  static int cid2index(short cid);
 | 
			
		||||
  // @cmember Ritorna la colonna corrispondente al campo <p f> della maschera
 | 
			
		||||
  int field2col(const TOperable_field* f) const;
 | 
			
		||||
 | 
			
		||||
@ -804,10 +804,9 @@ int TSpreadsheet::cid2col(short cid) const
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int TSpreadsheet::cid2index(short cid) const
 | 
			
		||||
int TSpreadsheet::cid2index(short cid)
 | 
			
		||||
{                                                 
 | 
			
		||||
  CHECKD(cid >= FIRST_FIELD, "Bad column id ", cid);
 | 
			
		||||
  return (cid % 100) - 1;
 | 
			
		||||
	return xvtil_cid2index(cid);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int TSpreadsheet::field2col(const TOperable_field* f) const
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,7 @@
 | 
			
		||||
 * Classe per esecuzioni di query temporanee (wrapper semplice per SACommand)	*
 | 
			
		||||
 ******************************************************************************/
 | 
			
		||||
 | 
			
		||||
const TDate SSimpleQuery::sqGetDate(const char * field)
 | 
			
		||||
const TDate SSimple_query::sq_get_date(const char * field)
 | 
			
		||||
{
 | 
			
		||||
	const TDate app(_rec.get_date(field));
 | 
			
		||||
	return  app;
 | 
			
		||||
 | 
			
		||||
@ -63,7 +63,7 @@
 | 
			
		||||
 * Preferisco scrivere un po' di codice ridondante adesso che andare a fare			*
 | 
			
		||||
 * salti mortali dopo																														*
 | 
			
		||||
 ********************************************************************************/
 | 
			
		||||
class SSimpleQuery
 | 
			
		||||
class SSimple_query
 | 
			
		||||
{
 | 
			
		||||
protected:
 | 
			
		||||
	TXvt_recordset _rec;
 | 
			
		||||
@ -72,114 +72,115 @@ protected:
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	/**< Costruttore, non inizializza nulla, da caricare successivamente */
 | 
			
		||||
	SSimpleQuery() {}
 | 
			
		||||
	SSimple_query() = default;
 | 
			
		||||
	/**< Costruttore, Accetta in ingresso dei parametri per la connessione, volendo è anche possibile impostare una query ed eseguirla. Attenzione! Non risponde se la query ha avuto un esito positivo o negativo! */
 | 
			
		||||
	SSimpleQuery(const char* db, const char* user, const char* pass, TT_driver tipoDb, const char * query = "", const bool ex = false, const bool freezed = false) : _rec(db, user, pass, tipoDb, query, ex, freezed) {}
 | 
			
		||||
	SSimple_query(const char* db, const char* user, const char* pass, TT_driver tipoDb, const char * query = "", const bool ex = false, const bool freezed = false) : _rec(db, user, pass, tipoDb, query, ex, freezed) {}
 | 
			
		||||
	//SSimpleQuery(const TString& db, const TString& user, const TString& pass, TT_driver tipoDb, const char * query = "", const bool ex = false, const bool freezed = false) : _rec(db, user, pass, tipoDb, query, ex, freezed) {}
 | 
			
		||||
	/**< Distruttore */
 | 
			
		||||
	virtual ~SSimpleQuery() {}
 | 
			
		||||
	virtual ~SSimple_query() = default;
 | 
			
		||||
 | 
			
		||||
	// Connection functions
 | 
			
		||||
	/**< Eseguo la connessione */
 | 
			
		||||
	int sqConnect(const char* db, const char* user, const char* pass, TT_driver tipoDb) { return _rec.connect(db, user, pass, tipoDb); }
 | 
			
		||||
	int sq_connect(const char* db, const char* user, const char* pass, TT_driver tipoDb) { return _rec.connect(db, user, pass, tipoDb); }
 | 
			
		||||
	/* Mi scollego */
 | 
			
		||||
	void sqDisconnect() { _rec.disconnect(); }
 | 
			
		||||
	void sq_disconnect() { _rec.disconnect(); }
 | 
			
		||||
	/**< Esegue la commit, di default in caso di errore viene chiamato il metodo rollback() */
 | 
			
		||||
	const bool sqCommit(bool autoRoll = true) { return _rec.commit(); }
 | 
			
		||||
	const bool sq_commit(bool autoRoll = true) { return _rec.commit(); }
 | 
			
		||||
	/**< Esegue il rollback all'ultimo commit */
 | 
			
		||||
	const bool sqRollback() { _rec.rollback(); }
 | 
			
		||||
	const bool sq_rollback() { return _rec.rollback(); }
 | 
			
		||||
	/**< Imposto il tipo di client che utilizzo */
 | 
			
		||||
	void sqSetClient(int client) { _rec.setClient((TT_driver)client); }
 | 
			
		||||
	void sqSetClient(TT_driver client) { _rec.setClient(client); }
 | 
			
		||||
	void sq_set_client(int client) { _rec.setClient((TT_driver)client); }
 | 
			
		||||
	void sq_set_client(TT_driver client) { _rec.setClient(client); }
 | 
			
		||||
	// Imposto una opzione generica dellla connessione
 | 
			
		||||
	void sqSetConOption(const char* opt) { _rec.setConOption(opt); }
 | 
			
		||||
	void sq_set_con_option(const char* opt) { _rec.setConOption(opt); }
 | 
			
		||||
	/**< Abilito/Disabilito l'autocommit, (disabilitato di default) */
 | 
			
		||||
	void sqSetAutocommit(bool ac) { _rec.setAutocommit(ac); }
 | 
			
		||||
	void sq_set_autocommit(bool ac) { _rec.setAutocommit(ac); }
 | 
			
		||||
	/** Imposta la visibilità delle transazioni (vedi Funzione) */
 | 
			
		||||
	void sqSetVisibility(isoLvl vis = committed) { _rec.setVisibility(vis); }
 | 
			
		||||
	void sq_set_visibility(isoLvl vis = committed) { _rec.setVisibility(vis); }
 | 
			
		||||
	// Getters
 | 
			
		||||
	/** Ritorna se la conessione è connessa */
 | 
			
		||||
	const bool sqIsConnect() const { return _rec.isConnect(); }
 | 
			
		||||
	const bool sq_is_connect() const { return _rec.isConnect(); }
 | 
			
		||||
	/**< Ritorna se la connessione è attiva */
 | 
			
		||||
	const bool sqIsAlive() const { return _rec.isAlive(); }
 | 
			
		||||
	const bool sq_is_alive() const { return _rec.isAlive(); }
 | 
			
		||||
	/** Ritorna la visibilità impostata */
 | 
			
		||||
	const int  sqGetVisibility() { return _rec.getVisibility(); }
 | 
			
		||||
	const int  sq_get_visibility() { return _rec.getVisibility(); }
 | 
			
		||||
	/**< Ritorna se è attivo l'autocommit, true -> attivo, false -> disattivo o sconosciuto */
 | 
			
		||||
	const bool sqGetAutocommit() { return _rec.getAutocommit(); }
 | 
			
		||||
	const bool sq_get_autocommit() { return _rec.getAutocommit(); }
 | 
			
		||||
	/**< Ritorna il valore dell'opzione specificata */
 | 
			
		||||
	const char* sqGetOption(const char* opt) { return _rec.getOption(opt); }
 | 
			
		||||
	const char* sq_get_option(const char* opt) { return _rec.getOption(opt); }
 | 
			
		||||
	/**< Ritorno la versione del Client che sto utilizzando */
 | 
			
		||||
	const long sqGetClientV() { return _rec.getClientV(); }
 | 
			
		||||
	const long sq_get_client_v() { return _rec.getClientV(); }
 | 
			
		||||
	/**< Ritorno la versione del Server che sto utilizzando */
 | 
			
		||||
	const char* sqGetServerV() { return _rec.getServerV(); }
 | 
			
		||||
	const char* sq_get_server_v() { return _rec.getServerV(); }
 | 
			
		||||
	/**< Ritorno la versione del Server che sto utilizzando in formato numerico */
 | 
			
		||||
	const long sqGetServerVN() { return _rec.getServerVN(); }
 | 
			
		||||
	const long sq_get_server_vn() { return _rec.getServerVN(); }
 | 
			
		||||
	/**< Ritorno se il recordset è carico */
 | 
			
		||||
	const bool sqIsLoaded() const { return _rec.isLoaded(); }
 | 
			
		||||
	const bool sq_is_loaded() const { return _rec.isLoaded(); }
 | 
			
		||||
	/** Ritorno il numero di elementi nella query */
 | 
			
		||||
	const long sqItems() { _rec.items(); }
 | 
			
		||||
	const long sq_items() { return _rec.items(); }
 | 
			
		||||
 | 
			
		||||
	// Conguration
 | 
			
		||||
	/**< Imposta la query ricevuta come (const char *) nel recordset */
 | 
			
		||||
	const bool sqSet(const char* query) { return _rec.set(query); }
 | 
			
		||||
	const bool sq_set(const char* query) { return _rec.set(query); }
 | 
			
		||||
	/**< Imposta la query ricevuta come (string) nel recordset */
 | 
			
		||||
	const bool sqSet(string query) { return _rec.set(query.c_str()); }
 | 
			
		||||
	const bool sq_set(string query) { return _rec.set(query.c_str()); }
 | 
			
		||||
	/**< Imposta la query ricevuta come (TString) nel recordset */
 | 
			
		||||
	const bool sqSet(TString& query) { return _rec.set(static_cast<const char *>(query)); }
 | 
			
		||||
	const bool sq_set(TString& query) { return _rec.set(static_cast<const char *>(query)); }
 | 
			
		||||
	/**< Esegue la query impostata nel recordset, se viene passato autoF == true esegue anche un comando sqNext() */
 | 
			
		||||
	const bool sqExec(bool autoF = true) { return _rec.exec(autoF); }
 | 
			
		||||
	const bool sq_exec(bool autoF = true) { return _rec.exec(autoF); }
 | 
			
		||||
	/**< Unisce le funzioni sqSet e sqExec, riceve la query come (const char *) */
 | 
			
		||||
	const bool sqSetExec(const char* query, bool autoF = true) { _rec.set(query); return _rec.exec(autoF); }
 | 
			
		||||
	const bool sq_set_exec(const char* query, bool autoF = true) { _rec.set(query); return _rec.exec(autoF); }
 | 
			
		||||
	/**< Unisce le funzioni sqSet e sqExec, riceve la query come (string) */
 | 
			
		||||
	const bool sqSetExec(string query, bool autoF = true) { _rec.set(query.c_str()); return _rec.exec(autoF); }
 | 
			
		||||
	const bool sq_set_exec(string query, bool autoF = true) { _rec.set(query.c_str()); return _rec.exec(autoF); }
 | 
			
		||||
	/**< Unisce le funzioni sqSet e sqExec, riceve la query come (TString) */
 | 
			
		||||
	const bool sqSetExec(TString& query, bool autoF = true);
 | 
			
		||||
	const bool sq_set_exec(TString& query, bool autoF = true) { return sq_set_exec(static_cast<const char*>(query), autoF); }
 | 
			
		||||
	/**< Si sposta avanti di un record, in caso di esito negativo valorizza _stringError e _codeError */
 | 
			
		||||
	const bool sqNext() { return _rec.next(); }
 | 
			
		||||
	const bool sq_next() { return _rec.next(); }
 | 
			
		||||
	/**< Si sposta indietro di un record, in caso di esito negativo valorizza _stringError e _codeError */
 | 
			
		||||
	const bool sqPrev() { return _rec.prev(); }
 | 
			
		||||
	const bool sq_prev() { return _rec.prev(); }
 | 
			
		||||
	/**< Si sposta avanti di un record, in caso di esito negativo valorizza _stringError e _codeError */
 | 
			
		||||
	const bool sqFirst() { return _rec.first(); }
 | 
			
		||||
	const bool sq_first() { return _rec.first(); }
 | 
			
		||||
	/**< Si sposta al primo record, in caso di esito negativo valorizza _stringError e _codeError */
 | 
			
		||||
	const bool sqLast() { return _rec.last(); }
 | 
			
		||||
	const bool sq_last() { return _rec.last(); }
 | 
			
		||||
	/**< Si sposta alla posizione n, in caso di esito negativo valorizza _stringError e _codeError */
 | 
			
		||||
	const bool sqGo(int newPos) { return _rec.go(newPos); }
 | 
			
		||||
	const bool sq_go(int newPos) { return _rec.go(newPos); }
 | 
			
		||||
	/**< Ritorna il numero di righe affette dall'ultima query */
 | 
			
		||||
	const int sqRowsAffected() { return _rec.rowsAffected(); }
 | 
			
		||||
	const int sq_rows_affected() { return _rec.rowsAffected(); }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	// Getters
 | 
			
		||||
	/**< Ritorna il valore nel campo (field) in formato (int) */
 | 
			
		||||
	const int			sqGetInt(const char* field) { return _rec.get_int(field); }
 | 
			
		||||
	const int			sq_get_int(const char* field) { return _rec.get_int(field); }
 | 
			
		||||
	/**< Ritorna il valore nel campo (field) in formato (short) */
 | 
			
		||||
	const short		sqGetShort(const char* field) { return _rec.get_short(field); }
 | 
			
		||||
	const short		sq_get_short(const char* field) { return _rec.get_short(field); }
 | 
			
		||||
	/**< Ritorna il valore nel campo (field) in formato (long) */
 | 
			
		||||
	const long		sqGetLong(const char* field) { return _rec.get_long(field); }
 | 
			
		||||
	const long		sq_get_long(const char* field) { return _rec.get_long(field); }
 | 
			
		||||
	/**< Ritorna il valore nel campo (field) in formato (double) */
 | 
			
		||||
	const double	sqGetDouble(const char* field) { return _rec.get_double(field); }
 | 
			
		||||
	const double	sq_get_double(const char* field) { return _rec.get_double(field); }
 | 
			
		||||
	/**< Ritorna il valore nel campo (field) in formato (bool) */
 | 
			
		||||
	const bool		sqGetBool(const char* field) { return _rec.get_bool(field); }
 | 
			
		||||
	const bool		sq_get_bool(const char* field) { return _rec.get_bool(field); }
 | 
			
		||||
	/**< Ritorna il valore nel campo (field) in formato (TDate) */
 | 
			
		||||
	const TDate		sqGetDate(const char* field);
 | 
			
		||||
	const TDate		sq_get_date(const char* field);
 | 
			
		||||
	/**< Ritorna il valore nel campo (field) in formato (real) */
 | 
			
		||||
	const real		sqGetReal(const char* field);
 | 
			
		||||
	const real		sq_get_real(const char* field);
 | 
			
		||||
	/**< Ritorna il valore nel campo (field) in formato (SADateTime), Campo non gestisce le ore */
 | 
			
		||||
	//SADateTime		sqGetDateTime(const char* field) { get_short(field); }
 | 
			
		||||
	/**< Ritorna il valore nel campo (field) passato come (const char *) in formato (const char *) */
 | 
			
		||||
	const char*		sqGet(const char* field) { return _rec.get(field); }
 | 
			
		||||
	const char*		sq_get(const char* field) { return _rec.get(field); }
 | 
			
		||||
	/**< Ritorna il valore nel campo (field) passato come (string) in formato (const char *) */
 | 
			
		||||
	const char*		sqGet(string field) { return  _rec.get(field.c_str()); }
 | 
			
		||||
	const char*		sq_get(string field) { return  _rec.get(field.c_str()); }
 | 
			
		||||
	/**< Ritorna il valore nel campo (field) passato come (TString) in formato (const char *)  */
 | 
			
		||||
	const char*		sqGet(TString& field) { return  _rec.get(static_cast<const char*>(field)); }
 | 
			
		||||
	const char*		sq_get(TString& field) { return  _rec.get(static_cast<const char*>(field)); }
 | 
			
		||||
	/**< Ritorna il valore nel campo (field) in formato (char) */
 | 
			
		||||
	const char		sqGetChar(const char* field) { return _rec.get_char(field); }
 | 
			
		||||
	const char		sq_get_char(const char* field) { return _rec.get_char(field); }
 | 
			
		||||
	/**< Ritorna la posizione attuale */
 | 
			
		||||
	const long		sqPos() const { return _rec.pos(); }
 | 
			
		||||
	const long		sq_pos() const { return _rec.pos(); }
 | 
			
		||||
 | 
			
		||||
	// Error Getters
 | 
			
		||||
	/**< Ritorno l'ultimo codice errore segnalato in formato /int) */
 | 
			
		||||
	const long					sqGetCodeError(bool erase = true) { return _rec.get_code_error(erase); }
 | 
			
		||||
	const long		sq_get_code_error(bool erase = true) { return _rec.get_code_error(erase); }
 | 
			
		||||
	/**< Ritorno l'ultima stringa di errore segnalato in formato (const char *) */
 | 
			
		||||
	const char*		sqGetStringError(bool erase = true) { return _rec.get_string_error(erase); }
 | 
			
		||||
	const char*		sq_get_string_error(bool erase = true) { return _rec.get_string_error(erase); }
 | 
			
		||||
	//char *				getCharPointer(const char * field)	{ return const_cast<char*>(static_cast<const char*>(recset.Field(field).asString())); }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -707,3 +707,13 @@ void quoted_string(TString& query, const char* val)
 | 
			
		||||
  }
 | 
			
		||||
  query << '\'';
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TString& to_tstring(long n)
 | 
			
		||||
{
 | 
			
		||||
	return get_tmp_string().cut(0) << n;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
TString& to_tstring(int n)
 | 
			
		||||
{
 | 
			
		||||
	return to_tstring(static_cast<long>(n));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -73,4 +73,7 @@ void quoted_string(TString& query, const char* val);
 | 
			
		||||
inline const char* get_iva_sirio()	// Ritorna la partita IVA della Sirio
 | 
			
		||||
{ return "04879210963"; }
 | 
			
		||||
 | 
			
		||||
TString& to_tstring(long n);
 | 
			
		||||
TString& to_tstring(int n);
 | 
			
		||||
 | 
			
		||||
#endif /* __UTILITY_H */
 | 
			
		||||
 | 
			
		||||
@ -10,6 +10,7 @@
 | 
			
		||||
#include <utility.h>     
 | 
			
		||||
 
 | 
			
		||||
#include <nditte.h>
 | 
			
		||||
#include <msksheet.h>
 | 
			
		||||
 | 
			
		||||
short CHARX = 8;
 | 
			
		||||
short CHARY = 14;
 | 
			
		||||
@ -842,3 +843,8 @@ PEN_STYLE trans_pen(
 | 
			
		||||
  return ps;
 | 
			
		||||
}                          
 | 
			
		||||
 | 
			
		||||
int xvtil_cid2index(const int cid)
 | 
			
		||||
{
 | 
			
		||||
		CHECKD(cid >= FIRST_FIELD, "Bad column id ", cid);
 | 
			
		||||
		return (cid % 100) - 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -45,6 +45,8 @@ bool xvtil_popup_warning(const char* msg);
 | 
			
		||||
bool xvtil_popup_error(const char* msg);
 | 
			
		||||
bool xvtil_system_error(unsigned long lasterror, ...);
 | 
			
		||||
 | 
			
		||||
int xvtil_cid2index(const int cid);
 | 
			
		||||
 | 
			
		||||
void beep(int severity = 0);
 | 
			
		||||
void do_events();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -319,7 +319,9 @@ public:
 | 
			
		||||
	const TString & caus_anticipo() const {return get("S10"); } 
 | 
			
		||||
	const TString & tipi_iva_validi() const {return get("S11"); }
 | 
			
		||||
	// Ritorna il ripo documento in formato SDI (TD01, TD02 ..)
 | 
			
		||||
	const TString & tipo_doc_sdi() const { return get("S12"); }
 | 
			
		||||
	const TString & tipo_doc_sdi() const { return get("S3").mid(37,4); }
 | 
			
		||||
	// Ritorna il regime fiscale
 | 
			
		||||
	const TString & reg_fisc() const { return get("S3").mid(41, 4); }
 | 
			
		||||
	const char stato_finale_inserimento() const {return get("S2")[0]; } 
 | 
			
		||||
	const char stato_finale_stampa() const {return get("S2")[1]; } 
 | 
			
		||||
	const char stato_bloccato() const {return get("S2")[2]; } 
 | 
			
		||||
@ -351,7 +353,7 @@ public:
 | 
			
		||||
	bool fattura_commerciale() const { return get_bool("B9"); }
 | 
			
		||||
  bool allega_documenti() const { return get_bool("B10"); }
 | 
			
		||||
  bool auto_add() const { return get_bool("B11"); }
 | 
			
		||||
	bool invio_xml() const { return get_bool("B12"); }
 | 
			
		||||
	bool invio_xml() const { return get_bool("B13"); }
 | 
			
		||||
 | 
			
		||||
	const TString& stringa_descrizione_documento() const { return _str_desc_doc; }
 | 
			
		||||
	const TString& stringa_descrizione_riga() const { return _str_desc_rdoc; }
 | 
			
		||||
 | 
			
		||||
@ -26,7 +26,8 @@
 | 
			
		||||
#define F_NATURA      124
 | 
			
		||||
#define F_NOTACREDDEB 125
 | 
			
		||||
#define F_LORDO       126
 | 
			
		||||
#define F_FATCOM      127
 | 
			
		||||
#define F_REG_FISC    127
 | 
			
		||||
#define F_FATCOM      128
 | 
			
		||||
#define F_PMAIL       129
 | 
			
		||||
#define F_PSTAMPA2    130
 | 
			
		||||
#define F_NCOPIE2     131
 | 
			
		||||
 | 
			
		||||
@ -85,7 +85,7 @@ END
 | 
			
		||||
LIST F_TIPO_SDI 35
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 5 "Tipo documento SDI "
 | 
			
		||||
  FIELD S12
 | 
			
		||||
  FIELD S3[37,40]
 | 
			
		||||
  ITEM "|"
 | 
			
		||||
  ITEM "TD01|TD01 Fattura" MESSAGE ENABLE,F_NOTACREDDEB|""
 | 
			
		||||
  ITEM "TD02|TD02 Acconto/Anticipo su fattura" MESSAGE ENABLE,F_NOTACREDDEB|""
 | 
			
		||||
@ -98,7 +98,7 @@ END
 | 
			
		||||
BOOLEAN F_ESPORTA_FP
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 65 5 "Invio XML"
 | 
			
		||||
  FIELD B12
 | 
			
		||||
  FIELD B13
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
GROUPBOX DLG_NULL 78 5
 | 
			
		||||
@ -202,30 +202,55 @@ END
 | 
			
		||||
 | 
			
		||||
BOOLEAN F_NOTACREDDEB
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 13 "Nota di credito/debito"
 | 
			
		||||
  PROMPT 2 13 "Nota di cred/deb"
 | 
			
		||||
  FIELD B7
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN F_LORDO
 | 
			
		||||
LIST F_REG_FISC 40
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 40 13 "Calcolo importi al lordo"
 | 
			
		||||
  FIELD B8
 | 
			
		||||
  MESSAGE TRUE CLEAR,F_FATCOM
 | 
			
		||||
  MESSAGE FALSE ENABLE,F_FATCOM
 | 
			
		||||
  PROMPT 23 13 "Regime Fisc. "
 | 
			
		||||
  FIELD S3[41,44]
 | 
			
		||||
  ITEM "|"
 | 
			
		||||
  ITEM "RF01|RF01 Ordinario"
 | 
			
		||||
  ITEM "RF02|RF02 Contribuenti minimi"
 | 
			
		||||
  ITEM "RF04|RF04 Agricoltura, connesse e pesca"
 | 
			
		||||
  ITEM "RF05|RF05 Vendita sali e tabacchi"
 | 
			
		||||
  ITEM "RF06|RF06 Commercio fiammiferi"
 | 
			
		||||
  ITEM "RF07|RF07 Editoria"
 | 
			
		||||
  ITEM "RF08|RF08 Gestione servizi tel. pubblica"
 | 
			
		||||
  ITEM "RF09|RF09 Rivendita DdT pubblico e di sosta"
 | 
			
		||||
  ITEM "RF10|RF10 Intr., giochi e altre attività"
 | 
			
		||||
  ITEM "RF11|RF11 Agenzie viaggi e turismo"
 | 
			
		||||
  ITEM "RF12|RF12 Agriturismo"
 | 
			
		||||
  ITEM "RF13|RF13 Vendite a domicilio"
 | 
			
		||||
  ITEM "RF14|RF14 Rivendita usato, arte, ant. o col."
 | 
			
		||||
  ITEM "RF15|RF15 Asta d’arte, ant. o da col."
 | 
			
		||||
  ITEM "RF16|RF16 IVA per cassa P.A."
 | 
			
		||||
  ITEM "RF17|RF17 IVA per cassa"
 | 
			
		||||
  ITEM "RF18|RF18 Altro"
 | 
			
		||||
  ITEM "RF19|RF19 Regime forfettario"
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN F_SPESEAUT
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 14 "Addebito automatico spese cliente"
 | 
			
		||||
  PROMPT 2 14 "Addebito auto spese cliente"
 | 
			
		||||
  FIELD B0
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN F_FATCOM
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 40 14 "Calcolo fattura commerciale"
 | 
			
		||||
  PROMPT 30 14 "Calcolo fattura commerciale"
 | 
			
		||||
  FIELD B9
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN F_LORDO
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 55 14 "Calcolo importi al lordo"
 | 
			
		||||
  FIELD B8
 | 
			
		||||
  MESSAGE TRUE CLEAR,F_FATCOM
 | 
			
		||||
  MESSAGE FALSE ENABLE,F_FATCOM
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BOOLEAN F_MOVMAG
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 2 15 "Mov. magazzino"
 | 
			
		||||
 | 
			
		||||
@ -11,7 +11,7 @@
 | 
			
		||||
 * Classe per esecuzioni di query temporanee (wrapper semplice per SACommand)	*
 | 
			
		||||
 ******************************************************************************/
 | 
			
		||||
 | 
			
		||||
TXvt_recordset::TXvt_recordset()
 | 
			
		||||
TXvt_recordset::TXvt_recordset() : _freezed(false)
 | 
			
		||||
{
 | 
			
		||||
	_con = new SAConnection;
 | 
			
		||||
	_recset = new SACommand;
 | 
			
		||||
@ -28,7 +28,7 @@ TXvt_recordset::TXvt_recordset()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
TXvt_recordset::TXvt_recordset(const char* db, const char* user, const char* pass, TT_driver tipoDb, const char * query, const bool ex, const bool freezed)
 | 
			
		||||
	: _db(db), _usr(user), _psw(pass), _drv(tipoDb)
 | 
			
		||||
	: _db(db), _usr(user), _psw(pass), _drv(tipoDb), _freezed(false)
 | 
			
		||||
{
 | 
			
		||||
	_con = new SAConnection;
 | 
			
		||||
	if(connect(db, user, pass, tipoDb) == NOERR)
 | 
			
		||||
@ -62,14 +62,14 @@ TXvt_recordset::~TXvt_recordset()
 | 
			
		||||
{
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		// Se non è connesso viene lanciata l'eccezione
 | 
			
		||||
		if(_CON(_con)->isConnected())
 | 
			
		||||
			_CON(_con)->Disconnect();
 | 
			
		||||
		if(_con != NULL)
 | 
			
		||||
			delete _con;
 | 
			
		||||
		if(_recset != NULL)
 | 
			
		||||
			delete _recset;
 | 
			
		||||
	}
 | 
			
		||||
	catch (...) {}
 | 
			
		||||
	// Prima cancellare il recordset POI la connessione
 | 
			
		||||
	delete _recset;
 | 
			
		||||
	delete _con;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* PRIVATE FUNCTIONS **************************************************************************************************/
 | 
			
		||||
@ -301,22 +301,22 @@ bool TXvt_recordset::set(const char* query)
 | 
			
		||||
bool TXvt_recordset::exec(bool autoF)
 | 
			
		||||
{
 | 
			
		||||
	CHECK_FREEZED
 | 
			
		||||
	bool ok = false;
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		_RCS(_recset)->Execute();
 | 
			
		||||
		_recno = -1;
 | 
			
		||||
		if (autoF)
 | 
			
		||||
		{
 | 
			
		||||
			next();
 | 
			
		||||
		}
 | 
			
		||||
		// Se trovo almeno un "select" faccio l'autofetch
 | 
			
		||||
		SAString s = _RCS(_recset)->CommandText(); s.MakeUpper();
 | 
			
		||||
		ok = s.Find("SELECT") != SIZE_MAX && autoF ? next() : true;
 | 
			
		||||
	}
 | 
			
		||||
	catch (SAException &x)
 | 
			
		||||
	{
 | 
			
		||||
		_codeError =		x.ErrNativeCode();
 | 
			
		||||
		_stringError =	x.ErrMessage();
 | 
			
		||||
		return false;
 | 
			
		||||
		ok = false;
 | 
			
		||||
	}
 | 
			
		||||
	return true;
 | 
			
		||||
	return ok;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool TXvt_recordset::setExec(const char* query, bool autoF)	
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user