Initial commit — sursa ROAACNPRO
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
49
Programe/importroris_main.prg
Normal file
49
Programe/importroris_main.prg
Normal file
@@ -0,0 +1,49 @@
|
||||
Lparameters tcOptiune, tnZile
|
||||
* tcOptiune: s (lanseaza import silentios)
|
||||
* tnZile: nnn (numarul de zile pentru import)
|
||||
|
||||
Set Century On
|
||||
Set Date Dmy
|
||||
Set Exact On
|
||||
Set Ansi On
|
||||
Set Deleted On
|
||||
Set Safety Off
|
||||
Set Deleted On
|
||||
Set NullDisplay To ''
|
||||
|
||||
PRIVATE gcMainPath, gcLogStamp
|
||||
gcMainPath = UPPER(ADDBS(JUSTPATH(SYS(16,0))))
|
||||
gcMainPath = STRTRAN(m.gcMainPath,'PROGRAME\', '')
|
||||
gcLogStamp = SYS(2015)
|
||||
lcPath = gcMainPath + 'ferestre\;'
|
||||
|
||||
SET DEFAULT TO (m.gcMainPath)
|
||||
SET PATH TO (m.lcPath) ADDITIVE
|
||||
|
||||
Local lcOptiune, lnOptiune, llSilentios, lnZile
|
||||
lcOptiune = Lower(Alltrim(Transform(m.tcOptiune)))
|
||||
llSilentios = (m.lcOptiune = 's')
|
||||
lnZile = Int(Val(Transform(m.tnZile)))
|
||||
lnZile = Iif(Empty(m.lnZile), 30, m.lnZile)
|
||||
|
||||
|
||||
WriteLog('Start import RORIS silentios: ' + TRANSFORM(m.llSilentios) + ', zile: ' + ALLTRIM(TRANSFORM(m.lnZile)))
|
||||
|
||||
If m.llSilentios
|
||||
lnOptiune = 1
|
||||
Do importroris_proceduri.prg With llSilentios, m.lnOptiune, m.lnZile
|
||||
Else
|
||||
Do Form importroris
|
||||
ENDIF
|
||||
|
||||
WriteLog('End import RORIS silentios: ' + TRANSFORM(m.llSilentios) + ', zile: ' + ALLTRIM(TRANSFORM(m.lnZile)))
|
||||
WriteLog('')
|
||||
|
||||
PROCEDURE WriteLog
|
||||
LPARAMETERS tcMesaj
|
||||
lcMesaj = m.gcLogStamp + ' ' + TRANSFORM(DATETIME()) + ' ' + TRANSFORM(m.tcMesaj) + CHR(13)
|
||||
lcFile = m.gcMainPath + 'log.txt'
|
||||
IF FILE(m.lcFile)
|
||||
STRTOFILE(m.lcMesaj, m.lcFile, .T.)
|
||||
ENDIF
|
||||
ENDPROC
|
||||
191
Programe/importroris_proceduri.prg
Normal file
191
Programe/importroris_proceduri.prg
Normal file
@@ -0,0 +1,191 @@
|
||||
Lparameters llSilentios, lnOptiune, lnZile
|
||||
|
||||
|
||||
If Empty(m.lnOptiune)
|
||||
lnOptiune = xmenu('Creeaza job import RORIS;Verifica log')
|
||||
Endif
|
||||
If Empty(m.lnOptiune)
|
||||
Return
|
||||
Endif
|
||||
|
||||
lnHandle = SQLConnect('ROA', 'ACN', 'ROMFASTSOFT')
|
||||
|
||||
If m.lnHandle <= 0
|
||||
Aerror(laEroare)
|
||||
WriteLog(laEroare(3))
|
||||
IF !m.llSilentios
|
||||
Messagebox(laEroare(3))
|
||||
ENDIF
|
||||
Return
|
||||
Endif
|
||||
|
||||
Do Case
|
||||
Case m.lnOptiune = 1
|
||||
IF EMPTY(m.lnZile)
|
||||
lcZile = Inputbox('Numar zile de tranzit pentru import (implicit 30)', 'Nr zile', '30')
|
||||
lnZile = Iif(!Empty(Val(m.lcZile)), Val(m.lcZile), 30)
|
||||
ENDIF
|
||||
|
||||
Private ptLastGenerationTime
|
||||
ptLastGenerationTime = Date() - m.lnZile
|
||||
|
||||
If m.llSilentios OR (Messagebox('Se lanseaza importul pentru tranzitele >= ' + Ttoc(m.ptLastGenerationTime) + '?',4+32,_Screen.Caption) = 6)
|
||||
lcSql = [begin pack_acn_import.import_roris_job(?ptLastGenerationTime); end;]
|
||||
lnSucces = SQLExec(m.lnHandle, m.lcSql)
|
||||
If m.lnSucces > 0
|
||||
WriteLog('S-a creat job-ul pentru import')
|
||||
|
||||
IF !m.llSilentios
|
||||
Messagebox('S-a creat job-ul pentru import',0+64,_Screen.Caption,10)
|
||||
ENDIF
|
||||
Else
|
||||
Aerror(laEroare)
|
||||
WriteLog(laEroare(3))
|
||||
IF !m.llSilentios
|
||||
Messagebox(laEroare(3))
|
||||
ENDIF
|
||||
Endif
|
||||
Endif
|
||||
Case m.lnOptiune = 2
|
||||
lcSql = [select to_char(substr(info,1,200)) as info, dataora from info where locatia = 'import_roris' and trunc(dataora) = trunc(sysdate) order by dataora desc]
|
||||
lnSucces = SQLExec(m.lnHandle, m.lcSql, 'crsImportTemp')
|
||||
If m.lnSucces > 0
|
||||
CREATE CURSOR crsImport (info c(200) null, dataora T)
|
||||
SELECT crsImport
|
||||
APPEND FROM DBF('crsImportTemp')
|
||||
|
||||
Select crsImport
|
||||
GO TOP
|
||||
BROWSE TITLE 'LOG IMPORT (ESC pentru iesire)' PREFERENCE IMPORT
|
||||
USE IN (SELECT('crsImportTemp'))
|
||||
USE IN (SELECT('crsImport'))
|
||||
Else
|
||||
Aerror(laEroare)
|
||||
Messagebox(laEroare(3))
|
||||
ENDIF
|
||||
|
||||
Case m.lnOptiune = 3
|
||||
TEXT TO lcsql NOSHOW
|
||||
SELECT LOG_ID,
|
||||
CAST(LOG_DATE AS DATE) as log_date,
|
||||
JOB_NAME,
|
||||
STATUS,
|
||||
CAST(actual_start_date AS DATE) as start_date,
|
||||
to_char(RUN_DURATION) AS duration,
|
||||
additional_info as errors
|
||||
FROM USER_SCHEDULER_JOB_RUN_DETAILS
|
||||
WHERE TRUNC(LOG_DATE) >= TRUNC(SYSDATE) - 7
|
||||
ORDER BY LOG_ID DESC
|
||||
ENDTEXT
|
||||
|
||||
lnSucces = SQLExec(m.lnHandle, m.lcSql, 'crsJobTemp')
|
||||
If m.lnSucces > 0
|
||||
CREATE CURSOR crsJob (log_id I, log_date T null, job_name C(200) null, status C(20) null, start_date T null, duration C(30) null, errors C(250) null)
|
||||
SELECT crsJob
|
||||
APPEND FROM DBF('crsJobTemp')
|
||||
|
||||
Select crsJob
|
||||
GO TOP
|
||||
BROWSE TITLE 'Stare joburi import (ESC pentru iesire)' PREFERENCE JOB
|
||||
USE IN (SELECT('crsJobTemp'))
|
||||
USE IN (SELECT('crsJob'))
|
||||
Else
|
||||
Aerror(laEroare)
|
||||
Messagebox(laEroare(3))
|
||||
ENDIF
|
||||
|
||||
|
||||
Endcase
|
||||
|
||||
SQLDisconnect(m.lnHandle)
|
||||
|
||||
|
||||
|
||||
*-------------------------------------------
|
||||
* Function...: Xmenu
|
||||
* Author.....: MARTIN
|
||||
* Date.......: 04/06/1997
|
||||
* Notes......: Based on an idea from Steve Zimmelman for FoxPro 2.x
|
||||
* Parameters.: tcItems = Semicolon-separated String with the various options
|
||||
* ...........: tnBar = Initially selected item (default=1)
|
||||
* Returns....: Selected item number
|
||||
* See Also...: PROMPT() [FoxPro Native]
|
||||
*
|
||||
Procedure xmenu
|
||||
Lparameters TCITEMS, TNBAR
|
||||
|
||||
Local NITEMCOUNT, AITEMS, X, NROW, NCOL, CTITLE, NLASTPOS, CCOLOR, AITEMS
|
||||
|
||||
Private CPOPMENU, NSELECT && They flow into the GetChoice internal procedure
|
||||
|
||||
If Pcount() < 2
|
||||
TNBAR = 1
|
||||
Endif
|
||||
|
||||
Activate Screen
|
||||
|
||||
* Parse every item
|
||||
*
|
||||
m.NITEMCOUNT = Occurs( ';', TCITEMS ) + 1
|
||||
Dimen AITEMS[ m.nItemCount ]
|
||||
m.NLASTPOS = 1
|
||||
|
||||
For m.X = 1 To m.NITEMCOUNT
|
||||
|
||||
If m.X < m.NITEMCOUNT
|
||||
|
||||
AITEMS[ m.x ] = Subs( m.TCITEMS, m.NLASTPOS, ;
|
||||
( At( ';', m.TCITEMS, m.X ) - 1 ) - m.NLASTPOS + 1 )
|
||||
Else
|
||||
AITEMS[ m.x ] = Subs( m.TCITEMS, m.NLASTPOS, ;
|
||||
( Len( m.TCITEMS ) - m.NLASTPOS ) + 1 )
|
||||
Endif
|
||||
|
||||
If AITEMS[ m.x ] # "\-"
|
||||
|
||||
AITEMS[ m.x ] = Allt( AITEMS[ m.x ] )
|
||||
Endif
|
||||
|
||||
m.NLASTPOS = At( ';', m.TCITEMS, m.X ) + 1
|
||||
Next
|
||||
|
||||
* Calculates the mouse pointer position
|
||||
*
|
||||
m.NROW = Iif( Mrow() + m.NITEMCOUNT < Srow(), Mrow() - 1, Srow() - m.NITEMCOUNT )
|
||||
m.NCOL = Iif( Mcol() + 10 < Scol(), Mcol() - 3, Mcol() - 13 )
|
||||
|
||||
* Gets an unique name for the pop-up
|
||||
*
|
||||
m.CPOPMENU = 'M' + Sys(3) + "_"
|
||||
|
||||
Define Popup ( m.CPOPMENU ) SHORTCUT Relative From NROW, NCOL
|
||||
|
||||
For m.X = 1 To m.NITEMCOUNT
|
||||
|
||||
Define Bar m.X Of ( m.CPOPMENU ) Prompt AITEMS[ m.x ]
|
||||
Next
|
||||
|
||||
m.CANS = ""
|
||||
m.NSELECT = 0
|
||||
Clear Type
|
||||
|
||||
On Selection Popup ( m.CPOPMENU ) Do GETCHOICE
|
||||
|
||||
Activate Popup ( m.CPOPMENU ) Bar TNBAR
|
||||
|
||||
Pop Key
|
||||
Release Popup ( m.CPOPMENU )
|
||||
|
||||
Return Iif( Lastkey() = 27, 0, m.NSELECT )
|
||||
|
||||
Endproc && XMENU
|
||||
|
||||
*--------------------
|
||||
Procedure GETCHOICE
|
||||
|
||||
m.NSELECT = Bar()
|
||||
|
||||
Deactivate Popup ( m.CPOPMENU )
|
||||
|
||||
Endproc && GETCHOICE
|
||||
|
||||
1
Programe/ovariabile_globale.prg
Normal file
1
Programe/ovariabile_globale.prg
Normal file
@@ -0,0 +1 @@
|
||||
**OVARIABILE_GLOBALE.PRG
|
||||
6091
Programe/proceduri_acnpro.prg
Normal file
6091
Programe/proceduri_acnpro.prg
Normal file
File diff suppressed because it is too large
Load Diff
1253
Programe/proceduri_acnpro_rapoarte.prg
Normal file
1253
Programe/proceduri_acnpro_rapoarte.prg
Normal file
File diff suppressed because it is too large
Load Diff
146
Programe/roaacnpro.prg
Normal file
146
Programe/roaacnpro.prg
Normal file
@@ -0,0 +1,146 @@
|
||||
Parameters tParametri
|
||||
*!* obiecte globale
|
||||
Private poLog, goLog, oTool, oHelp, goExecutor, goConn, goMyXMLHTTP, goCalendar, goExport, goUtilizator, goFundal, goFirma, goApp
|
||||
Store "" To poLog, goLog, oTool, oHelp, goExecutor, goConn, goMyXMLHTTP, goCalendar, goExport, goUtilizator, goFundal, goFirma
|
||||
|
||||
*!* Private gcLocalePath, goLocale
|
||||
*!* STORE "" TO gcLocalePath, goLocale
|
||||
|
||||
*!* variabile globale
|
||||
Public CRLF,CR,LF,Tab
|
||||
Public gcNumeProgram, NUMEPROGRAM, MENIUPROGRAM, FUNDALPROGRAM
|
||||
Public pcNl, pcAn, gcAcces, gcAppPath, gcAppName, gcUtilizatoriPath, gcDirMare, DIRGEN, gcTempPath, ;
|
||||
glParametri, gcHost, gcUsername, gcPassword, gcUserNameApp, gcPasswordApp, gnIdUtil, gnIdProgram, ;
|
||||
gnAn, gnLuna, gcS, gnIdFirma, gcGeneralIniFile, gcSecurityFile, gnHandle, gnButon, BUTON, gcFirma, gcBasePath, gcComunPath, ;
|
||||
gnTipGest, gcGestPermis, glFontCharSet, gcReportPreviewer, gcReportPreviewerPath, gcLocale, gcSettingsFile
|
||||
Public gcAntet,gcCopyRight, pcTitlu
|
||||
gcAntet = ''
|
||||
pcTitlu = ''
|
||||
gcCopyRight = '<27> ROA Romfast SRL'
|
||||
Public glUltimaLuna, glPrimaLuna, glLunaBuna, glLuna_neplatita, glLunaInchisa
|
||||
Public glQuit, pl_verificat
|
||||
Public gnewcryptfll, gnewcryptxml, gTransferTotal
|
||||
Private gnId_Prg_Owner
|
||||
gnId_Prg_Owner = 0
|
||||
*!* altele
|
||||
Declare nror[65000]
|
||||
Declare RTVA[22,2]
|
||||
Public luna_inchisa, luna_neplatita, PRIMADATA, m.ctva, m.ctvam, m.ctvai, antet, m.nivel
|
||||
Public OStart,OSETVIZ,OSETTULBAR,OSETINSTRUM,orm,OTEXT,OJUR,osetgest,tlbr_INSTR,tlbr_VIZ,oprinc
|
||||
Public pcapsocsub,pcapsocvar
|
||||
|
||||
_screen.Icon = 'D:\ROA\ROAACNPRO\GRAFICE\ROAACNPRO.ICO'
|
||||
|
||||
|
||||
gcAppPath = UPPER(Addbs(Justpath(Sys(16,0))))
|
||||
gcAppPath = STRTRAN(m.gcAppPath, 'PROGRAME\', '')
|
||||
gcComunPath = gcAppPath + 'COMUN\CLASE;' + ;
|
||||
gcAppPath + 'COMUN\FERESTRE;' + ;
|
||||
gcAppPath + 'COMUN\PROGRAME;' + ;
|
||||
gcAppPath + 'COMUN\GRAFICE;' + ;
|
||||
gcAppPath + 'COMUN\RAPOARTE;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\CALENDAR;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\CTL32;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\HPDF;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\HPDF\REPORTOUTPUT;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\WEB;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\NFJSON;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\NFXML;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\EXCEL;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\GridExtras ;' + ;
|
||||
Addbs(Substr(gcAppPath,1,Rat([\],gcAppPath,2)))+[COMUNROA\]
|
||||
|
||||
Set Default To (m.gcAppPath)
|
||||
|
||||
SET PATH to (m.gcComunPath) ADDITIVE
|
||||
Set Procedure To roa.prg Additive
|
||||
Private goApp
|
||||
|
||||
On Shutdown do onShutDown
|
||||
|
||||
goApp = Createobject("oApp")
|
||||
If goApp.initializeaza(tParametri,[ROAACNPRO])
|
||||
goApp.lanseazaAplicatie()
|
||||
|
||||
* STATUSBAR APLICATIE
|
||||
If Not Pemstatus(_Screen,"StatusBar", 5) Then
|
||||
_Screen.Newobject("StatusBar","ctl32_statusbar", "ctl32_statusbar.vcx", null, 3)
|
||||
* _Screen.Newobject("StatusBar","ctl32_statusbar", "ctl32_statusbar_fals.vcx", null, 3) && inlocuieste cu ctl_32_statusbar_fals.vcx daca sunt probleme
|
||||
ENDIF
|
||||
IF TYPE('goFundal') = 'O'
|
||||
IF NOT PEMSTATUS(goFundal, "oStatusBar", 5) then
|
||||
ADDPROPERTY(goFundal, "oStatusBar", Null)
|
||||
ENDIF
|
||||
goFundal.oStatusBar = _Screen.StatusBar
|
||||
goFundal.oStatusBar.ctlIcon="roastartmic.ico"
|
||||
goFundal.oStatusBar.ctlMessage = _Screen.Caption
|
||||
* formularul fundal.scx trebuie sa aiba o metoda StatusBarClick
|
||||
BindEvent(goFundal.oStatusBar, [ctlClick], goFundal, [StatusBarClick]) && Thisform.oStatusBar.newtooltip()
|
||||
ENDIF
|
||||
Endif
|
||||
|
||||
READ EVENTS
|
||||
|
||||
*Release goApp
|
||||
|
||||
|
||||
|
||||
Define Class oApp As RoaApp
|
||||
|
||||
Procedure initializeazaAlteCai
|
||||
Endproc
|
||||
|
||||
Procedure initializeazaAlteClassLib
|
||||
SET CLASSLIB TO ofacturare_comun.vcx ADDITIVE
|
||||
SET CLASSLIB TO onom_curs.vcx ADDITIVE
|
||||
SET CLASSLIB TO oacnpro.vcx ADDITIVE
|
||||
SET CLASSLIB TO comun.vcx ADDITIVE
|
||||
SET CLASSLIB TO serii_numere.vcx ADDITIVE
|
||||
SET CLASSLIB TO onom_articole.vcx ADDITIVE
|
||||
SET CLASSLIB TO overificari.vcx ADDITIVE
|
||||
Endproc
|
||||
|
||||
Procedure initializeazaAlteProceduri
|
||||
SET PROCEDURE TO proceduri_acnpro.prg ADDITIVE
|
||||
SET PROCEDURE TO proceduri_acnpro_rapoarte.prg ADDITIVE
|
||||
SET PROCEDURE TO ofacturare.prg ADDITIVE
|
||||
SET PROCEDURE TO ofacturare_comun ADDITIVE
|
||||
SET PROCEDURE TO oserii_numere ADDITIVE
|
||||
SET PROCEDURE TO oproceduri_curs ADDITIVE
|
||||
SET PROCEDURE TO odocumente.prg ADDITIVE
|
||||
SET PROCEDURE TO email.prg ADDITIVE
|
||||
SET PROCEDURE TO oproceduri_rapoarte_fact.prg ADDITIVE
|
||||
SET PROCEDURE TO matxtab.prg ADDITIVE
|
||||
SET PROCEDURE TO nfxmlread.prg ADDITIVE
|
||||
SET PROCEDURE TO nfjsonread.prg ADDITIVE
|
||||
SET PROCEDURE TO xmlefactura.prg ADDITIVE
|
||||
Endproc
|
||||
|
||||
Procedure initializeazaAlteVariabileGlobale
|
||||
Endproc
|
||||
|
||||
Procedure initializeazaAlteObiecteGlobale
|
||||
Endproc
|
||||
|
||||
ENDDEFINE
|
||||
|
||||
*!* Function Shutdown
|
||||
*!* If Type("goApp")=="O" And Not Isnull(goApp)
|
||||
*!* Return goApp.OnShutDown()
|
||||
*!* Endif
|
||||
*!* Cleanup()
|
||||
*!* Quit
|
||||
*!* Endfunc
|
||||
|
||||
|
||||
*-- Occurs when the user attempts to exit Visual FoxPro.
|
||||
Procedure onShutDown
|
||||
IF AMESSAGEBOX('Doriti sa iesiti din program?',4+32, goApp.cNumeProgram) = 6
|
||||
On Shutdown
|
||||
On Error
|
||||
Clear Events
|
||||
If _vfp.StartMode <> 0
|
||||
Quit
|
||||
Endif
|
||||
Endif
|
||||
ENDPROC && onShutDown
|
||||
30
Programe/update_nomenclator.prg
Normal file
30
Programe/update_nomenclator.prg
Normal file
@@ -0,0 +1,30 @@
|
||||
**********************************************************
|
||||
Procedure update_nomenclator
|
||||
|
||||
Do update_lunilean
|
||||
|
||||
*** tabele meniu deschise din proiect
|
||||
Local lcCaleDateMenu
|
||||
|
||||
lcCaleDateMenu=gcAppPath+[\COMUN\DATEMENU\]
|
||||
|
||||
lnSucces = xdate()
|
||||
|
||||
If !Used('menu1')
|
||||
Use &lcCaleDateMenu.menu1 In 0 Alias menu1 Excl
|
||||
Endif
|
||||
|
||||
If !Used('INFISIERE')
|
||||
Use &lcCaleDateMenu.INFISIERE In 0 Alias INFISIERE
|
||||
Endif
|
||||
|
||||
If !Used('selectii')
|
||||
Use &lcCaleDateMenu.gest_selectii In 0 Alias selectii
|
||||
Endif
|
||||
|
||||
*!* modificare v 2.1.1
|
||||
If !Used('mila1')
|
||||
Use &lcCaleDateMenu.mila1 In 0 Alias mila1
|
||||
endif
|
||||
|
||||
Endproc && update_nomenclator
|
||||
1352
Programe/verificare_roris_ecluze.prg
Normal file
1352
Programe/verificare_roris_ecluze.prg
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user