Patch level : 12.0 1048
Files correlati : bs0.EXE correzioni spaziature e riporti su velib04 Commento : Inserimento primi riporti su soluzione BS
This commit is contained in:
		
							parent
							
								
									33056952ae
								
							
						
					
					
						commit
						19f3713235
					
				
							
								
								
									
										21
									
								
								build/bs.sln
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								build/bs.sln
									
									
									
									
									
								
							@ -1,12 +1,18 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
Microsoft Visual Studio Solution File, Format Version 11.00
 | 
					Microsoft Visual Studio Solution File, Format Version 12.00
 | 
				
			||||||
# Visual Studio 2010
 | 
					# Visual Studio 15
 | 
				
			||||||
 | 
					VisualStudioVersion = 15.0.28307.1340
 | 
				
			||||||
 | 
					MinimumVisualStudioVersion = 10.0.40219.1
 | 
				
			||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bs0", "bs0.vcxproj", "{9C91BACF-9A70-4973-B8CC-FA3D2AF9867C}"
 | 
					Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bs0", "bs0.vcxproj", "{9C91BACF-9A70-4973-B8CC-FA3D2AF9867C}"
 | 
				
			||||||
EndProject
 | 
					EndProject
 | 
				
			||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AgaLib", "AgaLib.vcxproj", "{2D38A763-3D74-4338-9362-B891784EC90E}"
 | 
					Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AgaLib", "AgaLib.vcxproj", "{2D38A763-3D74-4338-9362-B891784EC90E}"
 | 
				
			||||||
EndProject
 | 
					EndProject
 | 
				
			||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vedoc", "vedoc.vcxproj", "{A1CE9743-A597-4F92-B55A-345A366C9E55}"
 | 
					Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vedoc", "vedoc.vcxproj", "{A1CE9743-A597-4F92-B55A-345A366C9E55}"
 | 
				
			||||||
EndProject
 | 
					EndProject
 | 
				
			||||||
 | 
					Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cglib", "cglib.vcxproj", "{7B80F974-CE2E-4BD9-855A-44FF139FF288}"
 | 
				
			||||||
 | 
					EndProject
 | 
				
			||||||
 | 
					Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vedocext", "vedocext.vcxproj", "{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}"
 | 
				
			||||||
 | 
					EndProject
 | 
				
			||||||
Global
 | 
					Global
 | 
				
			||||||
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 | 
						GlobalSection(SolutionConfigurationPlatforms) = preSolution
 | 
				
			||||||
		Debug|Win32 = Debug|Win32
 | 
							Debug|Win32 = Debug|Win32
 | 
				
			||||||
@ -25,8 +31,19 @@ Global
 | 
				
			|||||||
		{A1CE9743-A597-4F92-B55A-345A366C9E55}.Debug|Win32.Build.0 = Debug|Win32
 | 
							{A1CE9743-A597-4F92-B55A-345A366C9E55}.Debug|Win32.Build.0 = Debug|Win32
 | 
				
			||||||
		{A1CE9743-A597-4F92-B55A-345A366C9E55}.Release|Win32.ActiveCfg = Release|Win32
 | 
							{A1CE9743-A597-4F92-B55A-345A366C9E55}.Release|Win32.ActiveCfg = Release|Win32
 | 
				
			||||||
		{A1CE9743-A597-4F92-B55A-345A366C9E55}.Release|Win32.Build.0 = Release|Win32
 | 
							{A1CE9743-A597-4F92-B55A-345A366C9E55}.Release|Win32.Build.0 = Release|Win32
 | 
				
			||||||
 | 
							{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Debug|Win32.ActiveCfg = Debug|Win32
 | 
				
			||||||
 | 
							{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Debug|Win32.Build.0 = Debug|Win32
 | 
				
			||||||
 | 
							{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Release|Win32.ActiveCfg = Release|Win32
 | 
				
			||||||
 | 
							{7B80F974-CE2E-4BD9-855A-44FF139FF288}.Release|Win32.Build.0 = Release|Win32
 | 
				
			||||||
 | 
							{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Debug|Win32.ActiveCfg = Debug|Win32
 | 
				
			||||||
 | 
							{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Debug|Win32.Build.0 = Debug|Win32
 | 
				
			||||||
 | 
							{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Release|Win32.ActiveCfg = Release|Win32
 | 
				
			||||||
 | 
							{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Release|Win32.Build.0 = Release|Win32
 | 
				
			||||||
	EndGlobalSection
 | 
						EndGlobalSection
 | 
				
			||||||
	GlobalSection(SolutionProperties) = preSolution
 | 
						GlobalSection(SolutionProperties) = preSolution
 | 
				
			||||||
		HideSolutionNode = FALSE
 | 
							HideSolutionNode = FALSE
 | 
				
			||||||
	EndGlobalSection
 | 
						EndGlobalSection
 | 
				
			||||||
 | 
						GlobalSection(ExtensibilityGlobals) = postSolution
 | 
				
			||||||
 | 
							SolutionGuid = {9378D194-8834-42B8-AF00-8CFF5D4B42E8}
 | 
				
			||||||
 | 
						EndGlobalSection
 | 
				
			||||||
EndGlobal
 | 
					EndGlobal
 | 
				
			||||||
 | 
				
			|||||||
@ -212,9 +212,15 @@
 | 
				
			|||||||
    <ProjectReference Include="AgaLib.vcxproj">
 | 
					    <ProjectReference Include="AgaLib.vcxproj">
 | 
				
			||||||
      <Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
 | 
					      <Project>{2d38a763-3d74-4338-9362-b891784ec90e}</Project>
 | 
				
			||||||
    </ProjectReference>
 | 
					    </ProjectReference>
 | 
				
			||||||
 | 
					    <ProjectReference Include="cglib.vcxproj">
 | 
				
			||||||
 | 
					      <Project>{7b80f974-ce2e-4bd9-855a-44ff139ff288}</Project>
 | 
				
			||||||
 | 
					    </ProjectReference>
 | 
				
			||||||
    <ProjectReference Include="vedoc.vcxproj">
 | 
					    <ProjectReference Include="vedoc.vcxproj">
 | 
				
			||||||
      <Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
 | 
					      <Project>{a1ce9743-a597-4f92-b55a-345a366c9e55}</Project>
 | 
				
			||||||
    </ProjectReference>
 | 
					    </ProjectReference>
 | 
				
			||||||
 | 
					    <ProjectReference Include="vedocext.vcxproj">
 | 
				
			||||||
 | 
					      <Project>{0042619a-6b7c-4d3d-9cd9-9bdd8d200c15}</Project>
 | 
				
			||||||
 | 
					    </ProjectReference>
 | 
				
			||||||
  </ItemGroup>
 | 
					  </ItemGroup>
 | 
				
			||||||
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
 | 
					  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
 | 
				
			||||||
  <ImportGroup Label="ExtensionTargets">
 | 
					  <ImportGroup Label="ExtensionTargets">
 | 
				
			||||||
 | 
				
			|||||||
@ -229,55 +229,45 @@
 | 
				
			|||||||
  <ItemGroup>
 | 
					  <ItemGroup>
 | 
				
			||||||
    <SqlCompiler Include="..\src\fp\sql\fp0100.sql">
 | 
					    <SqlCompiler Include="..\src\fp\sql\fp0100.sql">
 | 
				
			||||||
      <FileType>Document</FileType>
 | 
					      <FileType>Document</FileType>
 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
      </ExcludedFromBuild>
 | 
					 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
    </SqlCompiler>
 | 
					    </SqlCompiler>
 | 
				
			||||||
    <SqlCompiler Include="..\src\fp\sql\fp0104.sql">
 | 
					    <SqlCompiler Include="..\src\fp\sql\fp0104.sql">
 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
      </ExcludedFromBuild>
 | 
					 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
    </SqlCompiler>
 | 
					    </SqlCompiler>
 | 
				
			||||||
    <SqlCompiler Include="..\src\fp\sql\fp0106.sql">
 | 
					    <SqlCompiler Include="..\src\fp\sql\fp0106.sql">
 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
      </ExcludedFromBuild>
 | 
					 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
    </SqlCompiler>
 | 
					    </SqlCompiler>
 | 
				
			||||||
    <SqlCompiler Include="..\src\fp\sql\fp0108.sql">
 | 
					    <SqlCompiler Include="..\src\fp\sql\fp0108.sql">
 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
      </ExcludedFromBuild>
 | 
					 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
    </SqlCompiler>
 | 
					    </SqlCompiler>
 | 
				
			||||||
    <SqlCompiler Include="..\src\fp\sql\fp0110.sql">
 | 
					    <SqlCompiler Include="..\src\fp\sql\fp0110.sql">
 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
      </ExcludedFromBuild>
 | 
					 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
    </SqlCompiler>
 | 
					    </SqlCompiler>
 | 
				
			||||||
    <SqlCompiler Include="..\src\fp\sql\fp0112.sql">
 | 
					    <SqlCompiler Include="..\src\fp\sql\fp0112.sql">
 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
      </ExcludedFromBuild>
 | 
					 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
    </SqlCompiler>
 | 
					    </SqlCompiler>
 | 
				
			||||||
    <SqlCompiler Include="..\src\fp\sql\fp0114.sql">
 | 
					    <SqlCompiler Include="..\src\fp\sql\fp0114.sql">
 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
      </ExcludedFromBuild>
 | 
					 | 
				
			||||||
    </SqlCompiler>
 | 
					    </SqlCompiler>
 | 
				
			||||||
    <SqlCompiler Include="..\src\fp\sql\fp0116.sql">
 | 
					    <SqlCompiler Include="..\src\fp\sql\fp0116.sql">
 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
      </ExcludedFromBuild>
 | 
					 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
    </SqlCompiler>
 | 
					    </SqlCompiler>
 | 
				
			||||||
    <SqlCompiler Include="..\src\fp\sql\fp0118.sql">
 | 
					    <SqlCompiler Include="..\src\fp\sql\fp0118.sql">
 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
      </ExcludedFromBuild>
 | 
					 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
    </SqlCompiler>
 | 
					    </SqlCompiler>
 | 
				
			||||||
  </ItemGroup>
 | 
					  </ItemGroup>
 | 
				
			||||||
  <ItemGroup>
 | 
					  <ItemGroup>
 | 
				
			||||||
    <SqlCompiler Include="..\src\fp\sql\fp0102.sql">
 | 
					    <SqlCompiler Include="..\src\fp\sql\fp0102.sql">
 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
      </ExcludedFromBuild>
 | 
					 | 
				
			||||||
      <FileType>Document</FileType>
 | 
					      <FileType>Document</FileType>
 | 
				
			||||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
					      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
				
			||||||
    </SqlCompiler>
 | 
					    </SqlCompiler>
 | 
				
			||||||
 | 
				
			|||||||
@ -6,10 +6,10 @@ int main(int argc, char** argv)
 | 
				
			|||||||
  const int p = argc > 1 ? argv[1][1]-'0' : 0;
 | 
					  const int p = argc > 1 ? argv[1][1]-'0' : 0;
 | 
				
			||||||
  switch(p)
 | 
					  switch(p)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
		case  1:	bs0200(argc, argv); break;	// Impostazioni Beestore
 | 
							case  1:	bs0200(argc, argv); break;	// Importazioni Beestore
 | 
				
			||||||
		case  2:	bs0300(argc, argv); break;	// Importazione da SKNET
 | 
							case  2:	bs0300(argc, argv); break;	// Importazione da SKNET
 | 
				
			||||||
		case	3:	bs0400(argc, argv); break;	// Tabelle di transazione 
 | 
							case  3:	bs0400(argc, argv); break;	// Tabelle di transazione 
 | 
				
			||||||
		default:	bs0100(argc, argv); break; // Beestore Synchronizer
 | 
							default:	bs0100(argc, argv); break;  // Trasferimento Beestore Impostazione
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  return 0;
 | 
					  return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
#define F_DATASOURCE	101
 | 
					#define F_DATASOURCE	         101
 | 
				
			||||||
#define F_USER				102
 | 
					#define F_USER				     102
 | 
				
			||||||
#define F_PASSWORD		103
 | 
					#define F_PASSWORD		         103
 | 
				
			||||||
#define F_ORIGINE			104
 | 
					#define F_ORIGINE			     104
 | 
				
			||||||
#define F_LOG					105
 | 
					#define F_LOG					 105
 | 
				
			||||||
 | 
				
			|||||||
@ -150,8 +150,8 @@ typedef bool TFieldEvaluator(const TISAM_recordset& rec, const char* fldname, co
 | 
				
			|||||||
class TBeeStore_sync : public TSkeleton_application
 | 
					class TBeeStore_sync : public TSkeleton_application
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  TString		_dsn;
 | 
					  TString		_dsn;
 | 
				
			||||||
	TString		_usr;
 | 
					  TString		_usr;
 | 
				
			||||||
	TString		_psw;
 | 
					  TString		_psw;
 | 
				
			||||||
  TFilename _sqlog;
 | 
					  TFilename _sqlog;
 | 
				
			||||||
  TLog_report* _log;
 | 
					  TLog_report* _log;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -184,11 +184,11 @@ protected:
 | 
				
			|||||||
  void sync_anamag   (const TDate& dal, const TDate& al);
 | 
					  void sync_anamag   (const TDate& dal, const TDate& al);
 | 
				
			||||||
  void sync_barcode  (const TDate& dal, const TDate& al);
 | 
					  void sync_barcode  (const TDate& dal, const TDate& al);
 | 
				
			||||||
  void sync_corrisp  (const TDate& dal, const TDate& al);
 | 
					  void sync_corrisp  (const TDate& dal, const TDate& al);
 | 
				
			||||||
	void sync_mov(int tipotestata, const TDate& dal, const TDate& al);
 | 
					  void sync_mov(int tipotestata, const TDate& dal, const TDate& al);
 | 
				
			||||||
	void sync_scontrini(const TDate& dal, const TDate& al) { sync_mov(3, dal, al);}
 | 
					  void sync_scontrini(const TDate& dal, const TDate& al) { sync_mov(3, dal, al);}
 | 
				
			||||||
	void sync_doc      (const TDate& dal , const TDate& al);
 | 
					  void sync_doc      (const TDate& dal , const TDate& al);
 | 
				
			||||||
	void sync_carscar  (const TDate& dal, const TDate& al) { sync_mov(1, dal, al);}
 | 
					  void sync_carscar  (const TDate& dal, const TDate& al) { sync_mov(1, dal, al);}
 | 
				
			||||||
	void sync_generici (const TDate& dal , const TDate& al) { sync_mov(4, dal, al);}
 | 
					  void sync_generici (const TDate& dal , const TDate& al) { sync_mov(4, dal, al);}
 | 
				
			||||||
  void sync_clifo    (int cfmask, const TDate& dal, const TDate& al);
 | 
					  void sync_clifo    (int cfmask, const TDate& dal, const TDate& al);
 | 
				
			||||||
  void sync_listino  (const TString& listino);
 | 
					  void sync_listino  (const TString& listino);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
@ -208,7 +208,7 @@ void TBeeStore_sync::load_origine_1(TISAM_recordset& out_set, const char* in_tab
 | 
				
			|||||||
  str << "\nFROM " << in_table << " WHERE (Origine=1);";
 | 
					  str << "\nFROM " << in_table << " WHERE (Origine=1);";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  TODBC_recordset odbc(str);
 | 
					  TODBC_recordset odbc(str);
 | 
				
			||||||
	odbc.connect(_dsn, _usr, _psw);
 | 
					  odbc.connect(_dsn, _usr, _psw);
 | 
				
			||||||
  const TRecnotype n = odbc.items();
 | 
					  const TRecnotype n = odbc.items();
 | 
				
			||||||
  if (n > 0)
 | 
					  if (n > 0)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
@ -340,7 +340,7 @@ void TBeeStore_sync::save_origine_2(TISAM_recordset& in_set, const char* out_tab
 | 
				
			|||||||
  const TRecnotype n = in_set.items();
 | 
					  const TRecnotype n = in_set.items();
 | 
				
			||||||
  TString str(255); 
 | 
					  TString str(255); 
 | 
				
			||||||
  TODBC_recordset odbc(str);
 | 
					  TODBC_recordset odbc(str);
 | 
				
			||||||
	odbc.connect(_dsn, _usr, _psw);
 | 
					  odbc.connect(_dsn, _usr, _psw);
 | 
				
			||||||
  str.cut(0) << "DELETE FROM " << out_table << " WHERE Origine=2;";
 | 
					  str.cut(0) << "DELETE FROM " << out_table << " WHERE Origine=2;";
 | 
				
			||||||
  odbc.exec(str);
 | 
					  odbc.exec(str);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
@ -448,7 +448,7 @@ static TString& build_query(const char* table, const TDate& dal, const TDate& al
 | 
				
			|||||||
  TString& q = get_tmp_string();
 | 
					  TString& q = get_tmp_string();
 | 
				
			||||||
  q << "USE " << table;
 | 
					  q << "USE " << table;
 | 
				
			||||||
  if (dal.ok() || al.ok())
 | 
					  if (dal.ok() || al.ok())
 | 
				
			||||||
    q << "SELECT BETWEEN(DATAAGG," << dal.date2ansi() << ',' << al.date2ansi() << ")";
 | 
					    q << " SELECT BETWEEN(DATAAGG," << dal.date2ansi() << ',' << al.date2ansi() << ")";
 | 
				
			||||||
  return q;
 | 
					  return q;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -515,7 +515,7 @@ void TBeeStore_sync::sync_lines(const TDate& dal, const TDate& al)
 | 
				
			|||||||
  fields.add("DSLinea|S0");
 | 
					  fields.add("DSLinea|S0");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  TString query = build_query("GMC", dal, al);
 | 
					  TString query = build_query("GMC", dal, al);
 | 
				
			||||||
  if (query.find("SELECT") < 0)
 | 
					  if (query.find(" SELECT") < 0)
 | 
				
			||||||
    query << " SELECT ";
 | 
					    query << " SELECT ";
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
    query << "&&";
 | 
					    query << "&&";
 | 
				
			||||||
@ -930,7 +930,7 @@ void TBeeStore_sync::sync_clifo(int cfmask, const TDate& dal, const TDate& al)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  TString str(255); 
 | 
					  TString str(255); 
 | 
				
			||||||
  TODBC_recordset clifo(str);
 | 
					  TODBC_recordset clifo(str);
 | 
				
			||||||
	clifo.connect(_dsn, _usr, _psw);
 | 
					  clifo.connect(_dsn, _usr, _psw);
 | 
				
			||||||
  str << "DELETE FROM tieAnagCFP WHERE Origine=1;";
 | 
					  str << "DELETE FROM tieAnagCFP WHERE Origine=1;";
 | 
				
			||||||
  clifo.exec(str); // Elimina tutte le anagrafiche importate da BeeStore
 | 
					  clifo.exec(str); // Elimina tutte le anagrafiche importate da BeeStore
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -966,7 +966,7 @@ bool TBeeStore_sync::save_and_delete_movmag(TMov_mag*& doc) const
 | 
				
			|||||||
bool TBeeStore_sync::save_and_delete_doc(TDocumento*& doc) const
 | 
					bool TBeeStore_sync::save_and_delete_doc(TDocumento*& doc) const
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  int err = 0;
 | 
					  int err = 0;
 | 
				
			||||||
  if (doc != NULL)
 | 
					  if (doc != nullptr)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    if (doc->rows() > 0)
 | 
					    if (doc->rows() > 0)
 | 
				
			||||||
    { 
 | 
					    { 
 | 
				
			||||||
@ -983,8 +983,7 @@ bool TBeeStore_sync::save_and_delete_doc(TDocumento*& doc) const
 | 
				
			|||||||
          err = 0;
 | 
					          err = 0;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    delete doc;
 | 
					    safe_delete(doc);
 | 
				
			||||||
    doc = NULL;
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  return err == 0;
 | 
					  return err == 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -1002,7 +1001,7 @@ void TBeeStore_sync::sync_listino(const TString& listino)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  TString str(255); 
 | 
					  TString str(255); 
 | 
				
			||||||
  TODBC_recordset prz(str);
 | 
					  TODBC_recordset prz(str);
 | 
				
			||||||
	prz.connect(_dsn, _usr, _psw);
 | 
					  prz.connect(_dsn, _usr, _psw);
 | 
				
			||||||
  str = "DELETE FROM tiePrzVendita WHERE Origine=1";
 | 
					  str = "DELETE FROM tiePrzVendita WHERE Origine=1";
 | 
				
			||||||
  prz.exec(str); // Ignora tutti i listini di BeeStore
 | 
					  prz.exec(str); // Ignora tutti i listini di BeeStore
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -17,6 +17,10 @@
 | 
				
			|||||||
#define F_FORNITORI       116
 | 
					#define F_FORNITORI       116
 | 
				
			||||||
#define F_BARCODE         117
 | 
					#define F_BARCODE         117
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define F_BBDAL           121
 | 
				
			||||||
 | 
					#define F_BBAL            122
 | 
				
			||||||
 | 
					#define F_FATBOL          123
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define F_C_CARSCAR       201
 | 
					#define F_C_CARSCAR       201
 | 
				
			||||||
#define F_D_CARSCAR       202
 | 
					#define F_D_CARSCAR       202
 | 
				
			||||||
#define F_C_DOCUMENTI     203
 | 
					#define F_C_DOCUMENTI     203
 | 
				
			||||||
 | 
				
			|||||||
@ -132,6 +132,43 @@ END
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
ENDPAGE
 | 
					ENDPAGE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					PAGE "newpage_Boll_Fatt_Scontrini" 0 2 0 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					GROUPBOX DLG_NULL 78 5
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 1 "@bBolle"
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DATE F_BBDAL
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 2 4 "Dalla data di modifica "
 | 
				
			||||||
 | 
					  FIELD SyncDateFrom
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DATE F_BBAL
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 42 4 " al "
 | 
				
			||||||
 | 
					  FIELD SyncDateTo
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BOOLEAN F_FATBOL
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 2 9 "FATT/BOLL"
 | 
				
			||||||
 | 
					  FIELD SyncFatBol
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					GROUPBOX DLG_NULL 78 5
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 6 "@bFatture"
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					GROUPBOX DLG_NULL 78 5
 | 
				
			||||||
 | 
					BEGIN
 | 
				
			||||||
 | 
					  PROMPT 1 11 "@bOrdini"
 | 
				
			||||||
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ENDPAGE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PAGE "Parametri" 0 2 0 0
 | 
					PAGE "Parametri" 0 2 0 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
GROUPBOX DLG_NULL 78 7
 | 
					GROUPBOX DLG_NULL 78 7
 | 
				
			||||||
 | 
				
			|||||||
@ -37,12 +37,6 @@
 | 
				
			|||||||
// Utility
 | 
					// Utility
 | 
				
			||||||
///////////////////////////////////////////////////////////
 | 
					///////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const TString my_origin()
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  static const TString my_orig = ini_get_string(CONFIG_DITTA, "BS", "Origine", "2");
 | 
					 | 
				
			||||||
  return my_orig;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const TString their_origin()
 | 
					const TString their_origin()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  static const TString their_orig(1, (ini_get_int(CONFIG_DITTA, "BS", "Origine", 1) == 1 ? 2 : 1) + '0');
 | 
					  static const TString their_orig(1, (ini_get_int(CONFIG_DITTA, "BS", "Origine", 1) == 1 ? 2 : 1) + '0');
 | 
				
			||||||
 | 
				
			|||||||
@ -1,13 +1,13 @@
 | 
				
			|||||||
#define F_DAL             101
 | 
					#define F_DAL                   101
 | 
				
			||||||
#define F_AL              102
 | 
					#define F_AL                    102
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define F_UMS             103
 | 
					#define F_UMS                   103
 | 
				
			||||||
#define F_IVA             104
 | 
					#define F_IVA                   104
 | 
				
			||||||
#define F_ART             105
 | 
					#define F_ART                   105
 | 
				
			||||||
#define F_DOCUMENTI       106
 | 
					#define F_DOCUMENTI             106
 | 
				
			||||||
#define F_VALUTE          107
 | 
					#define F_VALUTE                107
 | 
				
			||||||
#define F_CLIENTI         108
 | 
					#define F_CLIENTI               108
 | 
				
			||||||
#define F_FORNITORI       109
 | 
					#define F_FORNITORI             109
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define F_CODNUMBOL				201
 | 
					#define F_CODNUMBOL				201
 | 
				
			||||||
#define F_TIPODOCBOL			202
 | 
					#define F_TIPODOCBOL			202
 | 
				
			||||||
@ -19,7 +19,7 @@
 | 
				
			|||||||
#define F_TIPODOCTAM			208
 | 
					#define F_TIPODOCTAM			208
 | 
				
			||||||
#define F_CODNUMORC				209
 | 
					#define F_CODNUMORC				209
 | 
				
			||||||
#define F_TIPODOCORC			210
 | 
					#define F_TIPODOCORC			210
 | 
				
			||||||
#define F_OVERRIG					211
 | 
					#define F_OVERRIG			    211
 | 
				
			||||||
#define F_NUMCUSTRIG			212
 | 
					#define F_NUMCUSTRIG			212
 | 
				
			||||||
#define F_IMPORTUSER			213
 | 
					#define F_IMPORTUSER			213
 | 
				
			||||||
#define F_EMPTYONIMP			214
 | 
					#define F_EMPTYONIMP			214
 | 
				
			||||||
@ -27,5 +27,5 @@
 | 
				
			|||||||
#define F_CODIVADEF				216
 | 
					#define F_CODIVADEF				216
 | 
				
			||||||
#define F_CODUMSDEF				217
 | 
					#define F_CODUMSDEF				217
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define F_C_CORRISPETTIVI 301
 | 
					#define F_C_CORRISPETTIVI       301
 | 
				
			||||||
#define F_D_CORRISPETTIVI 302
 | 
					#define F_D_CORRISPETTIVI       302
 | 
				
			||||||
 | 
				
			|||||||
@ -58,155 +58,155 @@ BEGIN
 | 
				
			|||||||
  PROMPT 1 6 "@bImpostazioni documenti"
 | 
					  PROMPT 1 6 "@bImpostazioni documenti"
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
STRING F_CODNUMBOL 4
 | 
					STRING F_CODNUMBOL 4
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 2 7 "Numerazione bolle   "
 | 
					  PROMPT 2 7 "Numerazione bolle   "
 | 
				
			||||||
  FIELD SKCODNUMBOL
 | 
					  FIELD SKCODNUMBOL
 | 
				
			||||||
  HELP "Codice numerazione"
 | 
					  HELP "Codice numerazione"
 | 
				
			||||||
  USE %NUM
 | 
					  USE %NUM
 | 
				
			||||||
  INPUT CODTAB F_CODNUMBOL
 | 
					  INPUT CODTAB F_CODNUMBOL
 | 
				
			||||||
  DISPLAY "Codice" CODTAB
 | 
					  DISPLAY "Codice" CODTAB
 | 
				
			||||||
  DISPLAY "Descrizione@50" S0
 | 
					  DISPLAY "Descrizione@50" S0
 | 
				
			||||||
  OUTPUT F_CODNUMBOL CODTAB
 | 
					  OUTPUT F_CODNUMBOL CODTAB
 | 
				
			||||||
  FLAG "UPA"
 | 
					  FLAG "UPA"
 | 
				
			||||||
  WARNING "Numerazione assente"
 | 
					  WARNING "Numerazione assente"
 | 
				
			||||||
  KEY 1 2
 | 
					  KEY 1 2
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
STRING F_TIPODOCBOL 4
 | 
					STRING F_TIPODOCBOL 4
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 40 7 "Tipo bolle     "
 | 
					  PROMPT 40 7 "Tipo bolle     "
 | 
				
			||||||
  FIELD SKTIPODOCBOL
 | 
					  FIELD SKTIPODOCBOL
 | 
				
			||||||
  HELP "Codice tipo documento"
 | 
					  HELP "Codice tipo documento"
 | 
				
			||||||
  USE %TIP
 | 
					  USE %TIP
 | 
				
			||||||
  INPUT CODTAB F_TIPODOCBOL
 | 
					  INPUT CODTAB F_TIPODOCBOL
 | 
				
			||||||
  DISPLAY "Codice" CODTAB
 | 
					  DISPLAY "Codice" CODTAB
 | 
				
			||||||
  DISPLAY "Descrizione@50" S0
 | 
					  DISPLAY "Descrizione@50" S0
 | 
				
			||||||
  OUTPUT F_TIPODOCBOL CODTAB
 | 
					  OUTPUT F_TIPODOCBOL CODTAB
 | 
				
			||||||
  FLAG "UP"
 | 
					  FLAG "UP"
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
STRING F_CODNUMFAT 4
 | 
					STRING F_CODNUMFAT 4
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 2 8 "Numerazione fatture "
 | 
					  PROMPT 2 8 "Numerazione fatture "
 | 
				
			||||||
  FIELD SKCODNUMFAT
 | 
					  FIELD SKCODNUMFAT
 | 
				
			||||||
  HELP "Codice numerazione"
 | 
					  HELP "Codice numerazione"
 | 
				
			||||||
  USE %NUM
 | 
					  USE %NUM
 | 
				
			||||||
  INPUT CODTAB F_CODNUMFAT
 | 
					  INPUT CODTAB F_CODNUMFAT
 | 
				
			||||||
  DISPLAY "Codice" CODTAB
 | 
					  DISPLAY "Codice" CODTAB
 | 
				
			||||||
  DISPLAY "Descrizione@50" S0
 | 
					  DISPLAY "Descrizione@50" S0
 | 
				
			||||||
  OUTPUT F_CODNUMFAT CODTAB
 | 
					  OUTPUT F_CODNUMFAT CODTAB
 | 
				
			||||||
  FLAG "UPA"
 | 
					  FLAG "UPA"
 | 
				
			||||||
  WARNING "Numerazione assente"
 | 
					  WARNING "Numerazione assente"
 | 
				
			||||||
  KEY 1 2
 | 
					  KEY 1 2
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
STRING F_TIPODOCFAT 4
 | 
					STRING F_TIPODOCFAT 4
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 40 8 "Tipo fatture   "
 | 
					  PROMPT 40 8 "Tipo fatture   "
 | 
				
			||||||
  FIELD SKTIPODOCFAT
 | 
					  FIELD SKTIPODOCFAT
 | 
				
			||||||
  HELP "Codice tipo documento"
 | 
					  HELP "Codice tipo documento"
 | 
				
			||||||
  USE %TIP
 | 
					  USE %TIP
 | 
				
			||||||
  INPUT CODTAB F_TIPODOCFAT
 | 
					  INPUT CODTAB F_TIPODOCFAT
 | 
				
			||||||
  DISPLAY "Codice" CODTAB
 | 
					  DISPLAY "Codice" CODTAB
 | 
				
			||||||
  DISPLAY "Descrizione@50" S0
 | 
					  DISPLAY "Descrizione@50" S0
 | 
				
			||||||
  OUTPUT F_TIPODOCFAT CODTAB
 | 
					  OUTPUT F_TIPODOCFAT CODTAB
 | 
				
			||||||
  FLAG "UP"
 | 
					  FLAG "UP"
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
STRING F_CODNUMNC 4
 | 
					STRING F_CODNUMNC 4
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 2 9 "Numerazione NC      "
 | 
					  PROMPT 2 9 "Numerazione NC      "
 | 
				
			||||||
  FIELD SKCODNUMNC
 | 
					  FIELD SKCODNUMNC
 | 
				
			||||||
  HELP "Codice numerazione"
 | 
					  HELP "Codice numerazione"
 | 
				
			||||||
  USE %NUM
 | 
					  USE %NUM
 | 
				
			||||||
  INPUT CODTAB F_CODNUMNC
 | 
					  INPUT CODTAB F_CODNUMNC
 | 
				
			||||||
  DISPLAY "Codice" CODTAB
 | 
					  DISPLAY "Codice" CODTAB
 | 
				
			||||||
  DISPLAY "Descrizione@50" S0
 | 
					  DISPLAY "Descrizione@50" S0
 | 
				
			||||||
  OUTPUT F_CODNUMNC CODTAB
 | 
					  OUTPUT F_CODNUMNC CODTAB
 | 
				
			||||||
  FLAG "UPA"
 | 
					  FLAG "UPA"
 | 
				
			||||||
  WARNING "Numerazione assente"
 | 
					  WARNING "Numerazione assente"
 | 
				
			||||||
  KEY 1 2
 | 
					  KEY 1 2
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
STRING F_TIPODOCNC 4
 | 
					STRING F_TIPODOCNC 4
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 40 9 "Tipo NC        "
 | 
					  PROMPT 40 9 "Tipo NC        "
 | 
				
			||||||
  FIELD SKTIPODOCNC
 | 
					  FIELD SKTIPODOCNC
 | 
				
			||||||
  HELP "Codice tipo documento"
 | 
					  HELP "Codice tipo documento"
 | 
				
			||||||
  USE %TIP
 | 
					  USE %TIP
 | 
				
			||||||
  INPUT CODTAB F_TIPODOCNC
 | 
					  INPUT CODTAB F_TIPODOCNC
 | 
				
			||||||
  DISPLAY "Codice" CODTAB
 | 
					  DISPLAY "Codice" CODTAB
 | 
				
			||||||
  DISPLAY "Descrizione@50" S0
 | 
					  DISPLAY "Descrizione@50" S0
 | 
				
			||||||
  OUTPUT F_TIPODOCNC CODTAB
 | 
					  OUTPUT F_TIPODOCNC CODTAB
 | 
				
			||||||
  FLAG "UP"
 | 
					  FLAG "UP"
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
STRING F_CODNUMTAM 4
 | 
					STRING F_CODNUMTAM 4
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 2 10 "Numerazione TAM     "
 | 
					  PROMPT 2 10 "Numerazione TAM     "
 | 
				
			||||||
  FIELD SKCODNUMTAM
 | 
					  FIELD SKCODNUMTAM
 | 
				
			||||||
  HELP "Codice numerazione"
 | 
					  HELP "Codice numerazione"
 | 
				
			||||||
  USE %NUM
 | 
					  USE %NUM
 | 
				
			||||||
  INPUT CODTAB F_CODNUMTAM
 | 
					  INPUT CODTAB F_CODNUMTAM
 | 
				
			||||||
  DISPLAY "Codice" CODTAB
 | 
					  DISPLAY "Codice" CODTAB
 | 
				
			||||||
  DISPLAY "Descrizione@50" S0
 | 
					  DISPLAY "Descrizione@50" S0
 | 
				
			||||||
  OUTPUT F_CODNUMTAM CODTAB
 | 
					  OUTPUT F_CODNUMTAM CODTAB
 | 
				
			||||||
  FLAG "UPA"
 | 
					  FLAG "UPA"
 | 
				
			||||||
  WARNING "Numerazione assente"
 | 
					  WARNING "Numerazione assente"
 | 
				
			||||||
  KEY 1 2
 | 
					  KEY 1 2
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
STRING F_TIPODOCTAM 4
 | 
					STRING F_TIPODOCTAM 4
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 40 10 "Tipo TAM       "
 | 
					  PROMPT 40 10 "Tipo TAM       "
 | 
				
			||||||
  FIELD SKTIPODOCTAM
 | 
					  FIELD SKTIPODOCTAM
 | 
				
			||||||
  HELP "Codice tipo documento"
 | 
					  HELP "Codice tipo documento"
 | 
				
			||||||
  USE %TIP
 | 
					  USE %TIP
 | 
				
			||||||
  INPUT CODTAB F_TIPODOCTAM
 | 
					  INPUT CODTAB F_TIPODOCTAM
 | 
				
			||||||
  DISPLAY "Codice" CODTAB
 | 
					  DISPLAY "Codice" CODTAB
 | 
				
			||||||
  DISPLAY "Descrizione@50" S0
 | 
					  DISPLAY "Descrizione@50" S0
 | 
				
			||||||
  OUTPUT F_TIPODOCTAM CODTAB
 | 
					  OUTPUT F_TIPODOCTAM CODTAB
 | 
				
			||||||
  FLAG "UP"
 | 
					  FLAG "UP"
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
STRING F_CODNUMORC 4
 | 
					STRING F_CODNUMORC 4
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 2 11 "Numerazione ORC     "
 | 
					  PROMPT 2 11 "Numerazione ORC     "
 | 
				
			||||||
  FIELD SKCODNUMORC
 | 
					  FIELD SKCODNUMORC
 | 
				
			||||||
  HELP "Codice numerazione"
 | 
					  HELP "Codice numerazione"
 | 
				
			||||||
  USE %NUM
 | 
					  USE %NUM
 | 
				
			||||||
  INPUT CODTAB F_CODNUMORC
 | 
					  INPUT CODTAB F_CODNUMORC
 | 
				
			||||||
  DISPLAY "Codice" CODTAB
 | 
					  DISPLAY "Codice" CODTAB
 | 
				
			||||||
  DISPLAY "Descrizione@50" S0
 | 
					  DISPLAY "Descrizione@50" S0
 | 
				
			||||||
  OUTPUT F_CODNUMORC CODTAB
 | 
					  OUTPUT F_CODNUMORC CODTAB
 | 
				
			||||||
  FLAG "UPA"
 | 
					  FLAG "UPA"
 | 
				
			||||||
  WARNING "Numerazione assente"
 | 
					  WARNING "Numerazione assente"
 | 
				
			||||||
  KEY 1 2
 | 
					  KEY 1 2
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
STRING F_TIPODOCORC 4
 | 
					STRING F_TIPODOCORC 4
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 40 11 "Tipo ORC       "
 | 
					  PROMPT 40 11 "Tipo ORC       "
 | 
				
			||||||
  FIELD SKTIPODOCORC
 | 
					  FIELD SKTIPODOCORC
 | 
				
			||||||
  HELP "Codice tipo documento"
 | 
					  HELP "Codice tipo documento"
 | 
				
			||||||
  USE %TIP
 | 
					  USE %TIP
 | 
				
			||||||
  INPUT CODTAB F_TIPODOCORC
 | 
					  INPUT CODTAB F_TIPODOCORC
 | 
				
			||||||
  DISPLAY "Codice" CODTAB
 | 
					  DISPLAY "Codice" CODTAB
 | 
				
			||||||
  DISPLAY "Descrizione@50" S0
 | 
					  DISPLAY "Descrizione@50" S0
 | 
				
			||||||
  OUTPUT F_TIPODOCORC CODTAB
 | 
					  OUTPUT F_TIPODOCORC CODTAB
 | 
				
			||||||
  FLAG "UP"
 | 
					  FLAG "UP"
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
STRING F_CODIVADEF 4
 | 
					STRING F_CODIVADEF 4
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 2 13 "Utilizza cod.IVA default              "
 | 
					  PROMPT 2 13 "Utilizza cod.IVA default              "
 | 
				
			||||||
  USE %IVA
 | 
					  USE %IVA
 | 
				
			||||||
  INPUT CODTAB F_CODIVADEF
 | 
					  INPUT CODTAB F_CODIVADEF
 | 
				
			||||||
  DISPLAY "Codice" CODTAB
 | 
					  DISPLAY "Codice" CODTAB
 | 
				
			||||||
  DISPLAY "Descrizione@50" S0
 | 
					  DISPLAY "Descrizione@50" S0
 | 
				
			||||||
  DISPLAY "%@6" R0
 | 
					  DISPLAY "%@6" R0
 | 
				
			||||||
  DISPLAY "Tipo" S1
 | 
					  DISPLAY "Tipo" S1
 | 
				
			||||||
  OUTPUT F_CODIVADEF CODTAB
 | 
					  OUTPUT F_CODIVADEF CODTAB
 | 
				
			||||||
  HELP "Codice IVA per righe con valore nullo"
 | 
					  HELP "Codice IVA per righe con valore nullo"
 | 
				
			||||||
  FIELD SKCodIvaDef
 | 
					  FIELD SKCodIvaDef
 | 
				
			||||||
@ -216,10 +216,10 @@ END
 | 
				
			|||||||
STRING F_CODUMSDEF 4
 | 
					STRING F_CODUMSDEF 4
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 2 14 "Utilizza UMS default                  "
 | 
					  PROMPT 2 14 "Utilizza UMS default                  "
 | 
				
			||||||
  USE %UMS
 | 
					  USE %UMS
 | 
				
			||||||
  INPUT CODTAB F_CODUMSDEF
 | 
					  INPUT CODTAB F_CODUMSDEF
 | 
				
			||||||
  DISPLAY "Codice" CODTAB
 | 
					  DISPLAY "Codice" CODTAB
 | 
				
			||||||
  DISPLAY "Descrizione@50" S0
 | 
					  DISPLAY "Descrizione@50" S0
 | 
				
			||||||
  OUTPUT F_CODUMSDEF CODTAB
 | 
					  OUTPUT F_CODUMSDEF CODTAB
 | 
				
			||||||
  HELP "Codice UmS per righe con valore nullo"
 | 
					  HELP "Codice UmS per righe con valore nullo"
 | 
				
			||||||
  FIELD SKCodUmsDef
 | 
					  FIELD SKCodUmsDef
 | 
				
			||||||
@ -230,7 +230,7 @@ BOOLEAN F_OVERRIG
 | 
				
			|||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 2 15 "Riga merce custom"
 | 
					  PROMPT 2 15 "Riga merce custom"
 | 
				
			||||||
  FIELD SKUseCustomRiga
 | 
					  FIELD SKUseCustomRiga
 | 
				
			||||||
  MESSAGE FALSE DISABLE,F_NUMCUSTRIG
 | 
					  MESSAGE FALSE DISABLE,F_NUMCUSTRIG
 | 
				
			||||||
  MESSAGE TRUE ENABLE,F_NUMCUSTRIG
 | 
					  MESSAGE TRUE ENABLE,F_NUMCUSTRIG
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -15,7 +15,6 @@
 | 
				
			|||||||
// Utility
 | 
					// Utility
 | 
				
			||||||
///////////////////////////////////////////////////////////
 | 
					///////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const TString my_origin();
 | 
					 | 
				
			||||||
const TString their_origin();
 | 
					const TString their_origin();
 | 
				
			||||||
const TString clifo_add_note(TLocalisamfile& cfv, TString& note);
 | 
					const TString clifo_add_note(TLocalisamfile& cfv, TString& note);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,14 +1,15 @@
 | 
				
			|||||||
[BSMENU_001]
 | 
					[BSMENU_001]
 | 
				
			||||||
Caption = "Bee Store"
 | 
					Caption = "Bee Store"
 | 
				
			||||||
Picture = <ve01>
 | 
					Picture = <ve01>
 | 
				
			||||||
Module  = bs
 | 
					Module  = bs
 | 
				
			||||||
Flags   = "F"
 | 
					Flags   = "F"
 | 
				
			||||||
Item_01 = "Configurazione",   "bs0 -0", "F", 9015
 | 
					Item_01 = "Configurazione",   "bs0 -0", "F", 9015
 | 
				
			||||||
Item_02 = "Sincronizzazione", "bs0 -1", "F", 9015
 | 
					Item_02 = "Sincronizzazione", "bs0 -1", "F", 9015
 | 
				
			||||||
Item_02 = "SKNET Importer", "bs0 -2", "F", 9015
 | 
					Item_02 = "newpage", "bs0 -1", "F", 9015
 | 
				
			||||||
Item_03 = "Tabelle di conversione", [BSMENU_002]
 | 
					Item_02 = "SKNET Importer", "bs0 -2", "F", 9015
 | 
				
			||||||
 | 
					Item_03 = "Tabelle di conversione", [BSMENU_002]
 | 
				
			||||||
[BSMENU_002]
 | 
					
 | 
				
			||||||
 | 
					[BSMENU_002]
 | 
				
			||||||
Caption = "Tabelle di conversione"
 | 
					Caption = "Tabelle di conversione"
 | 
				
			||||||
Picture = <ve01>
 | 
					Picture = <ve01>
 | 
				
			||||||
Module  = bs
 | 
					Module  = bs
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,6 @@
 | 
				
			|||||||
#ifndef __DOC_H
 | 
					#ifndef __DOC_H
 | 
				
			||||||
#define __DOC_H
 | 
					#define __DOC_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
#define DOC_CODNUM        "CODNUM"
 | 
					#define DOC_CODNUM        "CODNUM"
 | 
				
			||||||
#define DOC_ANNO          "ANNO"
 | 
					#define DOC_ANNO          "ANNO"
 | 
				
			||||||
#define DOC_PROVV         "PROVV"
 | 
					#define DOC_PROVV         "PROVV"
 | 
				
			||||||
@ -26,7 +25,7 @@
 | 
				
			|||||||
#define DOC_IBAN          "IBAN" 
 | 
					#define DOC_IBAN          "IBAN" 
 | 
				
			||||||
#define DOC_CODABIP       "CODABIP" 
 | 
					#define DOC_CODABIP       "CODABIP" 
 | 
				
			||||||
#define DOC_CODCABP       "CODCABP" 
 | 
					#define DOC_CODCABP       "CODCABP" 
 | 
				
			||||||
#define DOC_PROGBNP				"PROGBNP"
 | 
					#define DOC_PROGBNP		  "PROGBNP"
 | 
				
			||||||
#define DOC_CATVEN        "CATVEN" 
 | 
					#define DOC_CATVEN        "CATVEN" 
 | 
				
			||||||
#define DOC_CODLIST       "CODLIST" 
 | 
					#define DOC_CODLIST       "CODLIST" 
 | 
				
			||||||
#define DOC_CODCONT       "CODCONT" 
 | 
					#define DOC_CODCONT       "CODCONT" 
 | 
				
			||||||
@ -75,7 +74,7 @@
 | 
				
			|||||||
#define DOC_G1            "G1"
 | 
					#define DOC_G1            "G1"
 | 
				
			||||||
#define DOC_DATAAGG       "DATAAGG" 
 | 
					#define DOC_DATAAGG       "DATAAGG" 
 | 
				
			||||||
#define DOC_UTENTE        "UTENTE"
 | 
					#define DOC_UTENTE        "UTENTE"
 | 
				
			||||||
#define DOC_COLL_GOLEM        "COLL_GOLEM"
 | 
					#define DOC_COLL_GOLEM    "COLL_GOLEM"
 | 
				
			||||||
#define DOC_DOCEVASO      "DOCEVASO"
 | 
					#define DOC_DOCEVASO      "DOCEVASO"
 | 
				
			||||||
#define DOC_CONTROEURO    "CONTROEURO"
 | 
					#define DOC_CONTROEURO    "CONTROEURO"
 | 
				
			||||||
#define DOC_CODCMS        "CODCMS"
 | 
					#define DOC_CODCMS        "CODCMS"
 | 
				
			||||||
@ -86,13 +85,13 @@
 | 
				
			|||||||
#define DOC_NUMREGCA      "NUMREGCA"
 | 
					#define DOC_NUMREGCA      "NUMREGCA"
 | 
				
			||||||
#define DOC_TIPOCFFATT    "TIPOCFFATT"
 | 
					#define DOC_TIPOCFFATT    "TIPOCFFATT"
 | 
				
			||||||
#define DOC_CODCFFATT     "CODCFFATT"
 | 
					#define DOC_CODCFFATT     "CODCFFATT"
 | 
				
			||||||
#define DOC_LIQDIFF		    "LIQDIFF"
 | 
					#define DOC_LIQDIFF		  "LIQDIFF"
 | 
				
			||||||
#define DOC_IVAXCASSA	    "IVAXCASSA"
 | 
					#define DOC_IVAXCASSA	  "IVAXCASSA"
 | 
				
			||||||
#define DOC_DATACOMP      "DATACOMP"
 | 
					#define DOC_DATACOMP      "DATACOMP"
 | 
				
			||||||
#define DOC_DATAFCOMP     "DATAFCOMP"
 | 
					#define DOC_DATAFCOMP     "DATAFCOMP"
 | 
				
			||||||
#define DOC_DATASCIMP     "DATASCIMP"
 | 
					#define DOC_DATASCIMP     "DATASCIMP"
 | 
				
			||||||
#define DOC_CUP				    "CUP"
 | 
					#define DOC_CUP			  "CUP"
 | 
				
			||||||
#define DOC_CIG				    "CIG"
 | 
					#define DOC_CIG			  "CIG"
 | 
				
			||||||
#define DOC_CONTSEP       "CONTSEP"
 | 
					#define DOC_CONTSEP       "CONTSEP"
 | 
				
			||||||
#define DOC_NOLEGGIO      "NOLEGGIO"
 | 
					#define DOC_NOLEGGIO      "NOLEGGIO"
 | 
				
			||||||
#define DOC_MODPAG        "MODPAG"
 | 
					#define DOC_MODPAG        "MODPAG"
 | 
				
			||||||
@ -105,13 +104,13 @@
 | 
				
			|||||||
#define DOC_NOINVIOSDI	  "NOINVIOSDI"
 | 
					#define DOC_NOINVIOSDI	  "NOINVIOSDI"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Virtuali
 | 
					// Virtuali
 | 
				
			||||||
#define DOC_PLAFOND				"PLAFOND"
 | 
					#define DOC_PLAFOND		  "PLAFOND"
 | 
				
			||||||
#define DOC_FATID					"FATID"
 | 
					#define DOC_FATID		  "FATID"
 | 
				
			||||||
#define DOC_BOLLI               "BOLLI" 
 | 
					#define DOC_BOLLI         "BOLLI" 
 | 
				
			||||||
// modulo pe
 | 
					// modulo pe
 | 
				
			||||||
#define DOC_SPESEUPD			"SPESEUPD"
 | 
					#define DOC_SPESEUPD	  "SPESEUPD"
 | 
				
			||||||
#define DOC_USEK					"USEK"
 | 
					#define DOC_USEK		  "USEK"
 | 
				
			||||||
#define DOC_K							"K"
 | 
					#define DOC_K			  "K"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1559,7 +1559,7 @@ void TRelation_application::main_loop()
 | 
				
			|||||||
              {
 | 
					              {
 | 
				
			||||||
                for (TEdit_field* e = (TEdit_field *) _mask->get_key_field(1, TRUE); e; e = (TEdit_field *) _mask->get_key_field(1, FALSE))
 | 
					                for (TEdit_field* e = (TEdit_field *) _mask->get_key_field(1, TRUE); e; e = (TEdit_field *) _mask->get_key_field(1, FALSE))
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
									if (e->is_kind_of(CLASS_EDIT_FIELD) && e->shown() && e->browse() != NULL)                        // Ignora campi invisibili o senza check
 | 
									  if (e->is_kind_of(CLASS_EDIT_FIELD) && e->shown() && e->browse() != NULL)                        // Ignora campi invisibili o senza check
 | 
				
			||||||
                  {
 | 
					                  {
 | 
				
			||||||
                    TCursor* b = e->browse()->cursor();
 | 
					                    TCursor* b = e->browse()->cursor();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1611,28 +1611,28 @@ void TRelation_application::main_loop()
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							TCursor* cur = c ;
 | 
								  TCursor* cur = c ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
              if (c == NULL)
 | 
					              if (c == NULL)
 | 
				
			||||||
								cur = new TCursor(get_relation());
 | 
									  cur = new TCursor(get_relation());
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
      			  file().reread();
 | 
					      		  file().reread();
 | 
				
			||||||
              cur->curr() = file().curr();
 | 
					              cur->curr() = file().curr();
 | 
				
			||||||
              cur->read();
 | 
					              cur->read();
 | 
				
			||||||
              --(*cur);
 | 
					              --(*cur);
 | 
				
			||||||
	      		  while (cur->pos() > 0 && !can_I_read(cur->relation()))
 | 
						      	  while (cur->pos() > 0 && !can_I_read(cur->relation()))
 | 
				
			||||||
	              --(*cur);
 | 
						              --(*cur);
 | 
				
			||||||
              file().curr() = cur->curr();
 | 
					              file().curr() = cur->curr();
 | 
				
			||||||
			        if (can_I_read(cur->relation()))
 | 
								        if (can_I_read(cur->relation()))
 | 
				
			||||||
                err = get_relation()->read(_isequal, _testandlock);
 | 
											err = get_relation()->read(_isequal, _testandlock);
 | 
				
			||||||
							if (c == NULL)
 | 
												if (c == NULL)
 | 
				
			||||||
								delete cur;
 | 
													delete cur;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
          case K_END:
 | 
					            case K_END:
 | 
				
			||||||
            err = file().readat(_last, _testandlock);
 | 
					            err = file().readat(_last, _testandlock);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
          default:
 | 
					            default:
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          if (err == NOERR || err == _islocked) 
 | 
					          if (err == NOERR || err == _islocked) 
 | 
				
			||||||
@ -1649,7 +1649,7 @@ void TRelation_application::main_loop()
 | 
				
			|||||||
    } while (k != K_QUIT);
 | 
					    } while (k != K_QUIT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (_mask->is_open())
 | 
					    if (_mask->is_open())
 | 
				
			||||||
      _mask->close_modal();
 | 
							_mask->close_modal();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    _mask->set_mode(NO_MODE);
 | 
					    _mask->set_mode(NO_MODE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,342 +1,342 @@
 | 
				
			|||||||
#include <automask.h>
 | 
					#include <automask.h>
 | 
				
			||||||
#include <diction.h>
 | 
					#include <diction.h>
 | 
				
			||||||
#include <reprint.h>
 | 
					#include <reprint.h>
 | 
				
			||||||
#include <reputils.h>
 | 
					#include <reputils.h>
 | 
				
			||||||
#include <utility.h>
 | 
					#include <utility.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "velib04.h"
 | 
					#include "velib04.h"
 | 
				
			||||||
#include "velib04e.h"
 | 
					#include "velib04e.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <doc.h>
 | 
					#include <doc.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TConsuntivazione_mask : public TAutomask
 | 
					class TConsuntivazione_mask : public TAutomask
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
protected:
 | 
					protected:
 | 
				
			||||||
	void reload_sheet();
 | 
						void reload_sheet();
 | 
				
			||||||
  void load_sheet();
 | 
					  void load_sheet();
 | 
				
			||||||
  virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
 | 
					  virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
	TConsuntivazione_mask() : TAutomask("velib04e") {}
 | 
						TConsuntivazione_mask() : TAutomask("velib04e") {}
 | 
				
			||||||
  virtual ~TConsuntivazione_mask() { }
 | 
					  virtual ~TConsuntivazione_mask() { }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TConsuntivazione_mask& msk()
 | 
					TConsuntivazione_mask& msk()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  static TConsuntivazione_mask* msk = NULL;
 | 
					  static TConsuntivazione_mask* msk = NULL;
 | 
				
			||||||
  if (msk == NULL)
 | 
					  if (msk == NULL)
 | 
				
			||||||
    msk = new TConsuntivazione_mask();
 | 
					    msk = new TConsuntivazione_mask();
 | 
				
			||||||
  return *msk;
 | 
					  return *msk;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static bool scan_rilprod(const TRelation& rel, void* pJolly)
 | 
					static bool scan_rilprod(const TRelation& rel, void* pJolly)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  const TRectype& rec = rel.curr();
 | 
					  const TRectype& rec = rel.curr();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Prima di fare qualsiasi cosa controllo che la riga vada messa
 | 
						// Prima di fare qualsiasi cosa controllo che la riga vada messa
 | 
				
			||||||
	// Abilito le righe aperte
 | 
						// Abilito le righe aperte
 | 
				
			||||||
	if(!msk().get_bool(B_RIGHE_APERTE) && !rec.get_bool("CHIUSO"))
 | 
						if(!msk().get_bool(B_RIGHE_APERTE) && !rec.get_bool("CHIUSO"))
 | 
				
			||||||
		return true;
 | 
							return true;
 | 
				
			||||||
	// Abilito le righe chiuse con QTA <= 0
 | 
						// Abilito le righe chiuse con QTA <= 0
 | 
				
			||||||
	if(!msk().get_bool(B_RIGHE_CHIU_QTA) && rec.get_bool("CHIUSO") && rec.get_real(RDOC_QTA) <= ZERO)
 | 
						if(!msk().get_bool(B_RIGHE_CHIU_QTA) && rec.get_bool("CHIUSO") && rec.get_real(RDOC_QTA) <= ZERO)
 | 
				
			||||||
		return true;
 | 
							return true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  TSheet_field& sheet = *(TSheet_field*)pJolly;
 | 
					  TSheet_field& sheet = *(TSheet_field*)pJolly;
 | 
				
			||||||
  TToken_string& row = sheet.row(-1);
 | 
					  TToken_string& row = sheet.row(-1);
 | 
				
			||||||
	TLocalisamfile righe(LF_RRILPROD);
 | 
						TLocalisamfile righe(LF_RRILPROD);
 | 
				
			||||||
	const TString codart(rec.get(RDOC_CODART));
 | 
						const TString codart(rec.get(RDOC_CODART));
 | 
				
			||||||
	const int prog = rec.get_int("PROG");
 | 
						const int prog = rec.get_int("PROG");
 | 
				
			||||||
	const TDate data(rec.get("DATA"));
 | 
						const TDate data(rec.get("DATA"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	righe.put("CODART",   codart);
 | 
						righe.put("CODART",   codart);
 | 
				
			||||||
  righe.put("DATA",     data);
 | 
					  righe.put("DATA",     data);
 | 
				
			||||||
  righe.put("PROG",     prog);
 | 
					  righe.put("PROG",     prog);
 | 
				
			||||||
	righe.put("NRIGA",   999);
 | 
						righe.put("NRIGA",   999);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  int err = righe.read(_isequal, _testandlock);
 | 
					  int err = righe.read(_isequal, _testandlock);
 | 
				
			||||||
	if (err == _iskeynotfound)
 | 
						if (err == _iskeynotfound)
 | 
				
			||||||
		righe.prev();
 | 
							righe.prev();
 | 
				
			||||||
  row.add(codart,   sheet.cid2index(S_CODART));
 | 
					  row.add(codart,   sheet.cid2index(S_CODART));
 | 
				
			||||||
  row.add(format("%d", prog),     sheet.cid2index(S_PROG));
 | 
					  row.add(format("%d", prog),     sheet.cid2index(S_PROG));
 | 
				
			||||||
  row.add(data.string(),          sheet.cid2index(S_DATA));
 | 
					  row.add(data.string(),          sheet.cid2index(S_DATA));
 | 
				
			||||||
  row.add(rec.get(RDOC_IMPIANTO), sheet.cid2index(S_IMPIANTO));
 | 
					  row.add(rec.get(RDOC_IMPIANTO), sheet.cid2index(S_IMPIANTO));
 | 
				
			||||||
  row.add(rec.get(RDOC_LINEA),    sheet.cid2index(S_LINEA));
 | 
					  row.add(rec.get(RDOC_LINEA),    sheet.cid2index(S_LINEA));
 | 
				
			||||||
	if (codart == righe.get("CODART"))
 | 
						if (codart == righe.get("CODART"))
 | 
				
			||||||
		row.add(righe.get("DATAFINE"), sheet.cid2index(S_DATAPROD));
 | 
							row.add(righe.get("DATAFINE"), sheet.cid2index(S_DATAPROD));
 | 
				
			||||||
	row.add(rec.get(RDOC_QTA),      sheet.cid2index(S_QTA));
 | 
						row.add(rec.get(RDOC_QTA),      sheet.cid2index(S_QTA));
 | 
				
			||||||
  row.add(rec.get("CHIUSO"),      sheet.cid2index(S_CHIUSO));
 | 
					  row.add(rec.get("CHIUSO"),      sheet.cid2index(S_CHIUSO));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  row.add(rec.get(RDOC_PROVV),    sheet.cid2index(S_PROVV));
 | 
					  row.add(rec.get(RDOC_PROVV),    sheet.cid2index(S_PROVV));
 | 
				
			||||||
  row.add(rec.get(RDOC_ANNO),     sheet.cid2index(S_ANNO));
 | 
					  row.add(rec.get(RDOC_ANNO),     sheet.cid2index(S_ANNO));
 | 
				
			||||||
  row.add(rec.get(RDOC_CODNUM),   sheet.cid2index(S_CODNUM));
 | 
					  row.add(rec.get(RDOC_CODNUM),   sheet.cid2index(S_CODNUM));
 | 
				
			||||||
  row.add(rec.get(RDOC_NDOC),     sheet.cid2index(S_NDOC));
 | 
					  row.add(rec.get(RDOC_NDOC),     sheet.cid2index(S_NDOC));
 | 
				
			||||||
  row.add(rec.get(RDOC_NRIGA),    sheet.cid2index(S_NRIGA));
 | 
					  row.add(rec.get(RDOC_NRIGA),    sheet.cid2index(S_NRIGA));
 | 
				
			||||||
  return true;
 | 
					  return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void TConsuntivazione_mask::reload_sheet()
 | 
					void TConsuntivazione_mask::reload_sheet()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	load_sheet();
 | 
						load_sheet();
 | 
				
			||||||
  TSheet_field& s = sfield(F_SHEET);
 | 
					  TSheet_field& s = sfield(F_SHEET);
 | 
				
			||||||
  FOR_EACH_SHEET_ROW(s, n, row)
 | 
					  FOR_EACH_SHEET_ROW(s, n, row)
 | 
				
			||||||
  {        
 | 
					  {        
 | 
				
			||||||
    const real  r(row->get(s.cid2index(S_QTA)));
 | 
					    const real  r(row->get(s.cid2index(S_QTA)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (r <= ZERO)
 | 
					    if (r <= ZERO)
 | 
				
			||||||
			s.disable_row(n);
 | 
								s.disable_row(n);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  s.force_update();
 | 
					  s.force_update();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void TConsuntivazione_mask::load_sheet()
 | 
					void TConsuntivazione_mask::load_sheet()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  TRelation rel(LF_RILPROD);
 | 
					  TRelation rel(LF_RILPROD);
 | 
				
			||||||
  TCursor cur(&rel, "CODNUMP==\"\"");
 | 
					  TCursor cur(&rel, "CODNUMP==\"\"");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  TSheet_field& sheet = sfield(F_SHEET);
 | 
					  TSheet_field& sheet = sfield(F_SHEET);
 | 
				
			||||||
  sheet.destroy();
 | 
					  sheet.destroy();
 | 
				
			||||||
  cur.scan(scan_rilprod, &sheet);
 | 
					  cur.scan(scan_rilprod, &sheet);
 | 
				
			||||||
  sheet.force_update();
 | 
					  sheet.force_update();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool TConsuntivazione_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
 | 
					bool TConsuntivazione_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  switch (o.dlg())
 | 
					  switch (o.dlg())
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
	case DLG_RECALC:
 | 
						case DLG_RECALC:
 | 
				
			||||||
		if(e == fe_button)
 | 
							if(e == fe_button)
 | 
				
			||||||
			reload_sheet();
 | 
								reload_sheet();
 | 
				
			||||||
  case F_SHEET:
 | 
					  case F_SHEET:
 | 
				
			||||||
    if (e == fe_init)
 | 
					    if (e == fe_init)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
      reload_sheet();
 | 
					      reload_sheet();
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
    break;
 | 
					    break;
 | 
				
			||||||
  case DLG_TUTTE:
 | 
					  case DLG_TUTTE:
 | 
				
			||||||
    if (e == fe_button)
 | 
					    if (e == fe_button)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      TSheet_field& s = sfield(F_SHEET);
 | 
					      TSheet_field& s = sfield(F_SHEET);
 | 
				
			||||||
      FOR_EACH_SHEET_ROW(s, n, row)
 | 
					      FOR_EACH_SHEET_ROW(s, n, row)
 | 
				
			||||||
      {        
 | 
					      {        
 | 
				
			||||||
				const int pos = s.cid2index(S_SELECTED);
 | 
									const int pos = s.cid2index(S_SELECTED);
 | 
				
			||||||
        const TString16  v(row->get(pos));
 | 
					        const TString16  v(row->get(pos));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (s.row_enabled(n))
 | 
					        if (s.row_enabled(n))
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					if (v.blank())
 | 
										if (v.blank())
 | 
				
			||||||
	          row->add("X", pos);
 | 
						          row->add("X", pos);
 | 
				
			||||||
					else
 | 
										else
 | 
				
			||||||
			      row->add(" ", pos);
 | 
								      row->add(" ", pos);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      s.force_update();
 | 
					      s.force_update();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    break;
 | 
					    break;
 | 
				
			||||||
  default:
 | 
					  default:
 | 
				
			||||||
    break;
 | 
					    break;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  return true;
 | 
					  return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool TConsuntivazione_produzione::ref2doc(char & provv, int & anno, TString8 & codnum, long & ndoc, int & nriga, const TString & codart)
 | 
					bool TConsuntivazione_produzione::ref2doc(char & provv, int & anno, TString8 & codnum, long & ndoc, int & nriga, const TString & codart)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	const TString8 ordprod(tipo_iniziale(0));
 | 
						const TString8 ordprod(tipo_iniziale(0));
 | 
				
			||||||
	bool ok = true;
 | 
						bool ok = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (codnum != ordprod)
 | 
						if (codnum != ordprod)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		char p = provv;
 | 
							char p = provv;
 | 
				
			||||||
		int a = anno;
 | 
							int a = anno;
 | 
				
			||||||
		TString8 c(codnum);
 | 
							TString8 c(codnum);
 | 
				
			||||||
		long nd = ndoc;
 | 
							long nd = ndoc;
 | 
				
			||||||
		int nr = nriga;
 | 
							int nr = nriga;
 | 
				
			||||||
		TLocalisamfile f(LF_RIGHEDOC);
 | 
							TLocalisamfile f(LF_RIGHEDOC);
 | 
				
			||||||
		TRectype & rec = f.curr();
 | 
							TRectype & rec = f.curr();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		rec.put(RDOC_DAPROVV, p);
 | 
							rec.put(RDOC_DAPROVV, p);
 | 
				
			||||||
		rec.put(RDOC_DAANNO, a);
 | 
							rec.put(RDOC_DAANNO, a);
 | 
				
			||||||
		rec.put(RDOC_DACODNUM, c);
 | 
							rec.put(RDOC_DACODNUM, c);
 | 
				
			||||||
		rec.put(RDOC_DANDOC, nd);
 | 
							rec.put(RDOC_DANDOC, nd);
 | 
				
			||||||
		rec.put(RDOC_DAIDRIGA, nr);
 | 
							rec.put(RDOC_DAIDRIGA, nr);
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		TRectype cmp(rec);
 | 
							TRectype cmp(rec);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		f.setkey(4);
 | 
							f.setkey(4);
 | 
				
			||||||
		ok = false;
 | 
							ok = false;
 | 
				
			||||||
		for (int err = f.read(_isequal); !ok && rec == cmp && err == NOERR; err = f.next())
 | 
							for (int err = f.read(_isequal); !ok && rec == cmp && err == NOERR; err = f.next())
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			if (rec.get(RDOC_CODNUM) == ordprod)
 | 
								if (rec.get(RDOC_CODNUM) == ordprod)
 | 
				
			||||||
				if(rec.get(RDOC_CODARTMAG) == codart)
 | 
									if(rec.get(RDOC_CODARTMAG) == codart)
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					provv = rec.get_char(RDOC_PROVV);
 | 
										provv = rec.get_char(RDOC_PROVV);
 | 
				
			||||||
					anno = rec.get_int(RDOC_ANNO);
 | 
										anno = rec.get_int(RDOC_ANNO);
 | 
				
			||||||
					codnum = rec.get(RDOC_CODNUM);
 | 
										codnum = rec.get(RDOC_CODNUM);
 | 
				
			||||||
					ndoc = rec.get_long(RDOC_NDOC);
 | 
										ndoc = rec.get_long(RDOC_NDOC);
 | 
				
			||||||
					nriga = rec.get_int(RDOC_NRIGA);
 | 
										nriga = rec.get_int(RDOC_NRIGA);
 | 
				
			||||||
					ok = true;
 | 
										ok = true;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return ok;
 | 
						return ok;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool TConsuntivazione_produzione::elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
 | 
					bool TConsuntivazione_produzione::elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
 | 
				
			||||||
                                          const TDate& data_elab, bool interattivo)
 | 
					                                          const TDate& data_elab, bool interattivo)
 | 
				
			||||||
{ 
 | 
					{ 
 | 
				
			||||||
  //TConsuntivazione_mask msk;
 | 
					  //TConsuntivazione_mask msk;
 | 
				
			||||||
	TLog_report log("Consuntivazione produzione");
 | 
						TLog_report log("Consuntivazione produzione");
 | 
				
			||||||
  bool done = false;
 | 
					  bool done = false;
 | 
				
			||||||
  if (msk().run() == K_ENTER)
 | 
					  if (msk().run() == K_ENTER)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    TSheet_field& sheet = msk().sfield(F_SHEET);
 | 
					    TSheet_field& sheet = msk().sfield(F_SHEET);
 | 
				
			||||||
    TLocalisamfile rilevazioni(LF_RILPROD);
 | 
					    TLocalisamfile rilevazioni(LF_RILPROD);
 | 
				
			||||||
    TRectype& ril = rilevazioni.curr();
 | 
					    TRectype& ril = rilevazioni.curr();
 | 
				
			||||||
		const TString8 codnum = codice_numerazione_finale();
 | 
							const TString8 codnum = codice_numerazione_finale();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (codnum.blank())
 | 
							if (codnum.blank())
 | 
				
			||||||
			return error_box("Manca il codice numerazione finale per l'elaborazione %s", (const char *) codice());
 | 
								return error_box("Manca il codice numerazione finale per l'elaborazione %s", (const char *) codice());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		const TString8 tipodoc = tipo_finale();
 | 
							const TString8 tipodoc = tipo_finale();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (tipodoc.blank())
 | 
							if (tipodoc.blank())
 | 
				
			||||||
			return error_box("Manca il tipo documento finale per l'elaborazione %s", (const char *) codice());
 | 
								return error_box("Manca il tipo documento finale per l'elaborazione %s", (const char *) codice());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		pre_process_input(doc_in);
 | 
							pre_process_input(doc_in);
 | 
				
			||||||
		if (doc_out.items() == 0)
 | 
							if (doc_out.items() == 0)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			TDocumento d('D', data_elab.year(), codnum, 0L);
 | 
								TDocumento d('D', data_elab.year(), codnum, 0L);
 | 
				
			||||||
			d.set_tipo(tipodoc);
 | 
								d.set_tipo(tipodoc);
 | 
				
			||||||
			d.stato(stato_finale()[0]);
 | 
								d.stato(stato_finale()[0]);
 | 
				
			||||||
			d.put(DOC_DATADOC, data_elab);
 | 
								d.put(DOC_DATADOC, data_elab);
 | 
				
			||||||
			d.write();
 | 
								d.write();
 | 
				
			||||||
			TDocumento * d1 = new TDocumento(d.head());
 | 
								TDocumento * d1 = new TDocumento(d.head());
 | 
				
			||||||
			doc_out.add(d1);
 | 
								doc_out.add(d1);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    TDocumento& outdoc = doc_out[0];
 | 
					    TDocumento& outdoc = doc_out[0];
 | 
				
			||||||
	  TDocumento ordine;
 | 
						  TDocumento ordine;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    FOR_EACH_SHEET_ROW(sheet, i, row) if (*row->get(0)=='X')  // Per ogni riga selezionata
 | 
					    FOR_EACH_SHEET_ROW(sheet, i, row) if (*row->get(0)=='X')  // Per ogni riga selezionata
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      const TString codart  = row->get(sheet.cid2index(S_CODART));
 | 
					      const TString codart  = row->get(sheet.cid2index(S_CODART));
 | 
				
			||||||
      const TDate data      = row->get(sheet.cid2index(S_DATA));
 | 
					      const TDate data      = row->get(sheet.cid2index(S_DATA));
 | 
				
			||||||
      const int prog        = row->get_int(sheet.cid2index(S_PROG));
 | 
					      const int prog        = row->get_int(sheet.cid2index(S_PROG));
 | 
				
			||||||
      const real qta        = row->get(sheet.cid2index(S_QTA));
 | 
					      const real qta        = row->get(sheet.cid2index(S_QTA));
 | 
				
			||||||
      bool chiuso           = row->get(sheet.cid2index(S_CHIUSO))[0] > ' ';
 | 
					      bool chiuso           = row->get(sheet.cid2index(S_CHIUSO))[0] > ' ';
 | 
				
			||||||
      char provv      = row->get(sheet.cid2index(S_PROVV))[0];
 | 
					      char provv      = row->get(sheet.cid2index(S_PROVV))[0];
 | 
				
			||||||
      int anno        = row->get_int(sheet.cid2index(S_ANNO));
 | 
					      int anno        = row->get_int(sheet.cid2index(S_ANNO));
 | 
				
			||||||
      TString8 codnum = row->get(sheet.cid2index(S_CODNUM));
 | 
					      TString8 codnum = row->get(sheet.cid2index(S_CODNUM));
 | 
				
			||||||
      long ndoc       = row->get_long(sheet.cid2index(S_NDOC));
 | 
					      long ndoc       = row->get_long(sheet.cid2index(S_NDOC));
 | 
				
			||||||
      int nriga       = row->get_int(sheet.cid2index(S_NRIGA));
 | 
					      int nriga       = row->get_int(sheet.cid2index(S_NRIGA));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (ref2doc(provv, anno, codnum, ndoc, nriga, codart))
 | 
								if (ref2doc(provv, anno, codnum, ndoc, nriga, codart))
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				int err = ordine.read(provv, anno, codnum, ndoc, _isequal, _testandlock);
 | 
									int err = ordine.read(provv, anno, codnum, ndoc, _isequal, _testandlock);
 | 
				
			||||||
				if (err == NOERR)
 | 
									if (err == NOERR)
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					if (nriga > 0 && nriga <= ordine.rows())
 | 
										if (nriga > 0 && nriga <= ordine.rows())
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						TRiga_documento& riga_ordine = ordine[nriga];
 | 
											TRiga_documento& riga_ordine = ordine[nriga];
 | 
				
			||||||
						const TString& qta_fld = riga_ordine.field_qta();
 | 
											const TString& qta_fld = riga_ordine.field_qta();
 | 
				
			||||||
						const TString& qte_fld = riga_ordine.field_qtaevasa();
 | 
											const TString& qte_fld = riga_ordine.field_qtaevasa();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						const real qta_evasa = riga_ordine.qtaevasa() + qta;      
 | 
											const real qta_evasa = riga_ordine.qtaevasa() + qta;      
 | 
				
			||||||
						riga_ordine.put(qte_fld, qta_evasa);
 | 
											riga_ordine.put(qte_fld, qta_evasa);
 | 
				
			||||||
						if (chiuso || riga_ordine.qtaresidua().is_zero())
 | 
											if (chiuso || riga_ordine.qtaresidua().is_zero())
 | 
				
			||||||
						{
 | 
											{
 | 
				
			||||||
							riga_ordine.put(RDOC_RIGAEVASA, 'X');
 | 
												riga_ordine.put(RDOC_RIGAEVASA, 'X');
 | 
				
			||||||
							chiuso = true;
 | 
												chiuso = true;
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						const TString4 tiporiga = riga_ordine.get(RDOC_TIPORIGA);
 | 
											const TString4 tiporiga = riga_ordine.get(RDOC_TIPORIGA);
 | 
				
			||||||
						TRiga_documento& outrec = outdoc.new_row(tiporiga);
 | 
											TRiga_documento& outrec = outdoc.new_row(tiporiga);
 | 
				
			||||||
						TDocumento::copy_data(outrec, riga_ordine);
 | 
											TDocumento::copy_data(outrec, riga_ordine);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						outrec.put(qta_fld, qta);
 | 
											outrec.put(qta_fld, qta);
 | 
				
			||||||
						if (qta_fld != RDOC_QTA) 
 | 
											if (qta_fld != RDOC_QTA) 
 | 
				
			||||||
						{
 | 
											{
 | 
				
			||||||
							const real q = riga_ordine.get_real(RDOC_QTA);
 | 
												const real q = riga_ordine.get_real(RDOC_QTA);
 | 
				
			||||||
							if (q.is_zero()) 
 | 
												if (q.is_zero()) 
 | 
				
			||||||
								outrec.put(RDOC_QTA, UNO);             // Pezza temporanea
 | 
													outrec.put(RDOC_QTA, UNO);             // Pezza temporanea
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
						if (kill_descrizione_estesa())             // Cancello eventualmente la descrizione estesa
 | 
											if (kill_descrizione_estesa())             // Cancello eventualmente la descrizione estesa
 | 
				
			||||||
						{
 | 
											{
 | 
				
			||||||
							outrec.zero(RDOC_DESCLUNGA);
 | 
												outrec.zero(RDOC_DESCLUNGA);
 | 
				
			||||||
							outrec.zero(RDOC_DESCEST);
 | 
												outrec.zero(RDOC_DESCEST);
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
						outrec.dirty_fields();                     // Forza ricalcolo peso etc. 
 | 
											outrec.dirty_fields();                     // Forza ricalcolo peso etc. 
 | 
				
			||||||
						outrec.put(RDOC_DATACONS, data);           // Setta la data di consegna con la data di produzione
 | 
											outrec.put(RDOC_DATACONS, data);           // Setta la data di consegna con la data di produzione
 | 
				
			||||||
						outrec.zero(qte_fld);                      // Azzera quantita' evasa erroneamente copiata dall'ordine
 | 
											outrec.zero(qte_fld);                      // Azzera quantita' evasa erroneamente copiata dall'ordine
 | 
				
			||||||
						outrec.zero(RDOC_RIGAEVASA);               // Azzera flag di evasa erroneamente copiata dall'ordine
 | 
											outrec.zero(RDOC_RIGAEVASA);               // Azzera flag di evasa erroneamente copiata dall'ordine
 | 
				
			||||||
						outrec.set_original_rdoc_key(riga_ordine);
 | 
											outrec.set_original_rdoc_key(riga_ordine);
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					else
 | 
										else
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
		        const char* msg = TR("Impossibile aggiornare il documento");
 | 
							        const char* msg = TR("Impossibile aggiornare il documento");
 | 
				
			||||||
				    log.log(1, format("%s %d %s %ld", msg, anno, (const char*)codnum, ndoc));
 | 
									    log.log(1, format("%s %d %s %ld", msg, anno, (const char*)codnum, ndoc));
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					if (ordine.is_evaso())
 | 
										if (ordine.is_evaso())
 | 
				
			||||||
						ordine.stato(stato_finale_doc_iniziale()[0]);
 | 
											ordine.stato(stato_finale_doc_iniziale()[0]);
 | 
				
			||||||
					err = ordine.rewrite();  // Unlocca
 | 
										err = ordine.rewrite();  // Unlocca
 | 
				
			||||||
		      if (err != NOERR)
 | 
							      if (err != NOERR)
 | 
				
			||||||
				  {
 | 
									  {
 | 
				
			||||||
		        const char* msg = TR("Impossibile aggiornare il documento");
 | 
							        const char* msg = TR("Impossibile aggiornare il documento");
 | 
				
			||||||
				    log.log(1, format("%s %d %s %ld", msg, anno, (const char*)codnum, ndoc));
 | 
									    log.log(1, format("%s %d %s %ld", msg, anno, (const char*)codnum, ndoc));
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					done = true;
 | 
										done = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					ril.put("CODART",   codart);
 | 
										ril.put("CODART",   codart);
 | 
				
			||||||
					ril.put("DATA",     data);
 | 
										ril.put("DATA",     data);
 | 
				
			||||||
					ril.put("PROG",     prog);
 | 
										ril.put("PROG",     prog);
 | 
				
			||||||
					err = rilevazioni.read(_isequal, _testandlock);
 | 
										err = rilevazioni.read(_isequal, _testandlock);
 | 
				
			||||||
					if (err == NOERR)
 | 
										if (err == NOERR)
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						if (chiuso)
 | 
											if (chiuso)
 | 
				
			||||||
							ril.put("CHIUSO", chiuso);
 | 
												ril.put("CHIUSO", chiuso);
 | 
				
			||||||
						ril.put("PROVVP",   outdoc.get(DOC_PROVV));
 | 
											ril.put("PROVVP",   outdoc.get(DOC_PROVV));
 | 
				
			||||||
						ril.put("ANNOP",    outdoc.get(DOC_ANNO));
 | 
											ril.put("ANNOP",    outdoc.get(DOC_ANNO));
 | 
				
			||||||
						ril.put("CODNUMP",  outdoc.get(DOC_CODNUM));
 | 
											ril.put("CODNUMP",  outdoc.get(DOC_CODNUM));
 | 
				
			||||||
						ril.put("NDOCP",    outdoc.get(DOC_NDOC));
 | 
											ril.put("NDOCP",    outdoc.get(DOC_NDOC));
 | 
				
			||||||
						ril.put("NRIGAP",   outdoc.rows());
 | 
											ril.put("NRIGAP",   outdoc.rows());
 | 
				
			||||||
						err = rilevazioni.rewrite();
 | 
											err = rilevazioni.rewrite();
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					if (err != NOERR)
 | 
										if (err != NOERR)
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						const char* msg = TR("Impossibile aggiornare la riga di rilevazione");
 | 
											const char* msg = TR("Impossibile aggiornare la riga di rilevazione");
 | 
				
			||||||
						log.log(1, format("%s %s %s %d", msg, (const char*)codart, (const char*)data.string(), prog));
 | 
											log.log(1, format("%s %s %s %d", msg, (const char*)codart, (const char*)data.string(), prog));
 | 
				
			||||||
						break;
 | 
											break;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				else
 | 
									else
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					const char* msg = TR("Impossibile leggere l'ordine di produzione");
 | 
										const char* msg = TR("Impossibile leggere l'ordine di produzione");
 | 
				
			||||||
					log.log(1, format("%s %d %s %ld", msg, anno, (const char*)codnum, ndoc));
 | 
										log.log(1, format("%s %d %s %ld", msg, anno, (const char*)codnum, ndoc));
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
		    const char* msg = TR("Impossibile trovare l'ordine di produzione relativo all'ordine cliente");
 | 
							    const char* msg = TR("Impossibile trovare l'ordine di produzione relativo all'ordine cliente");
 | 
				
			||||||
				log.log(1, format("%s %d %s %ld", msg, anno, (const char*)codnum, ndoc));
 | 
									log.log(1, format("%s %d %s %ld", msg, anno, (const char*)codnum, ndoc));
 | 
				
			||||||
				ril.put("CODART",   codart);
 | 
									ril.put("CODART",   codart);
 | 
				
			||||||
				ril.put("DATA",     data);
 | 
									ril.put("DATA",     data);
 | 
				
			||||||
				ril.put("PROG",     prog);
 | 
									ril.put("PROG",     prog);
 | 
				
			||||||
				if (rilevazioni.read(_isequal, _testandlock) == NOERR)
 | 
									if (rilevazioni.read(_isequal, _testandlock) == NOERR)
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					ril.put("CHIUSO", chiuso);
 | 
										ril.put("CHIUSO", chiuso);
 | 
				
			||||||
					ril.put("CODNUMP",  outdoc.get(DOC_CODNUM));
 | 
										ril.put("CODNUMP",  outdoc.get(DOC_CODNUM));
 | 
				
			||||||
					rilevazioni.rewrite();
 | 
										rilevazioni.rewrite();
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
	TReport_book book;
 | 
						TReport_book book;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	book.add(log);
 | 
						book.add(log);
 | 
				
			||||||
	book.preview();
 | 
						book.preview();
 | 
				
			||||||
	post_process_input(doc_in);
 | 
						post_process_input(doc_in);
 | 
				
			||||||
  post_process(doc_out, doc_in);
 | 
					  post_process(doc_out, doc_in);
 | 
				
			||||||
	return done;
 | 
						return done;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user