commit 4ee7b0baffe21f473558f3802108d20c421903a6 Author: Marius Mutu Date: Wed Jul 8 20:19:12 2026 +0300 Initial commit — sursa ROAGEST diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9ab6d85 --- /dev/null +++ b/.gitignore @@ -0,0 +1,42 @@ +# Visual FoxPro - fisiere compilate +*.fxp +*.mpx + +# Visual FoxPro - backup-uri +*.bak +*.BAK +*.TBK + +# Visual FoxPro - meniuri generate (din .mnx) +*.mpr +*.MPR + +# Visual FoxPro - log-uri si erori +*.ERR +*.err +log.txt + +# Visual FoxPro - fisiere temporare +*.tmp +*.TMP +*.dct +*.DCT + +# Executabile compilate +*.exe +*.EXE + +# SVN (proiectul foloseste SVN, nu git, pentru COMUN) +.svn/ + +# COMUN este gestionat separat prin git propriu (vezi COMUN/.gitignore) +COMUN/ + +# Windows +*.lnk +Thumbs.db +Desktop.ini +bash.exe.stackdump + +# Setari locale Claude Code (specifice masinii, nu proiectului) +.claude/ diff --git a/Clase/ATENTIE.VCT b/Clase/ATENTIE.VCT new file mode 100644 index 0000000..daa8eea Binary files /dev/null and b/Clase/ATENTIE.VCT differ diff --git a/Clase/atentie.vcx b/Clase/atentie.vcx new file mode 100644 index 0000000..c0b3e7e Binary files /dev/null and b/Clase/atentie.vcx differ diff --git a/Clase/gestiuni.VCT b/Clase/gestiuni.VCT new file mode 100644 index 0000000..766a6dd Binary files /dev/null and b/Clase/gestiuni.VCT differ diff --git a/Clase/gestiuni.vcx b/Clase/gestiuni.vcx new file mode 100644 index 0000000..834693d Binary files /dev/null and b/Clase/gestiuni.vcx differ diff --git a/Clase/oavize.vct b/Clase/oavize.vct new file mode 100644 index 0000000..84c4528 Binary files /dev/null and b/Clase/oavize.vct differ diff --git a/Clase/oavize.vcx b/Clase/oavize.vcx new file mode 100644 index 0000000..88dd773 Binary files /dev/null and b/Clase/oavize.vcx differ diff --git a/Clase/oimportxml.VCT b/Clase/oimportxml.VCT new file mode 100644 index 0000000..7f121c3 Binary files /dev/null and b/Clase/oimportxml.VCT differ diff --git a/Clase/oimportxml.vcx b/Clase/oimportxml.vcx new file mode 100644 index 0000000..3c33f9c Binary files /dev/null and b/Clase/oimportxml.vcx differ diff --git a/Clase/orapoarte_gestiuni.VCT b/Clase/orapoarte_gestiuni.VCT new file mode 100644 index 0000000..6db5dc9 Binary files /dev/null and b/Clase/orapoarte_gestiuni.VCT differ diff --git a/Clase/orapoarte_gestiuni.vcx b/Clase/orapoarte_gestiuni.vcx new file mode 100644 index 0000000..cf4cc0d Binary files /dev/null and b/Clase/orapoarte_gestiuni.vcx differ diff --git a/Clase/ovizrul.VCT b/Clase/ovizrul.VCT new file mode 100644 index 0000000..79ed14b Binary files /dev/null and b/Clase/ovizrul.VCT differ diff --git a/Clase/ovizrul.vcx b/Clase/ovizrul.vcx new file mode 100644 index 0000000..959d4dc Binary files /dev/null and b/Clase/ovizrul.vcx differ diff --git a/Code39M.TTF b/Code39M.TTF new file mode 100644 index 0000000..995cf9e Binary files /dev/null and b/Code39M.TTF differ diff --git a/Ferestre/accesindivid.SCT b/Ferestre/accesindivid.SCT new file mode 100644 index 0000000..fb51688 Binary files /dev/null and b/Ferestre/accesindivid.SCT differ diff --git a/Ferestre/accesindivid.scx b/Ferestre/accesindivid.scx new file mode 100644 index 0000000..968c506 Binary files /dev/null and b/Ferestre/accesindivid.scx differ diff --git a/Ferestre/frm_conversii.SCT b/Ferestre/frm_conversii.SCT new file mode 100644 index 0000000..5fa8749 Binary files /dev/null and b/Ferestre/frm_conversii.SCT differ diff --git a/Ferestre/frm_conversii.scx b/Ferestre/frm_conversii.scx new file mode 100644 index 0000000..25a3de7 Binary files /dev/null and b/Ferestre/frm_conversii.scx differ diff --git a/Ferestre/frm_schimbare_pret_tva.SCT b/Ferestre/frm_schimbare_pret_tva.SCT new file mode 100644 index 0000000..f6bda3c Binary files /dev/null and b/Ferestre/frm_schimbare_pret_tva.SCT differ diff --git a/Ferestre/frm_schimbare_pret_tva.scx b/Ferestre/frm_schimbare_pret_tva.scx new file mode 100644 index 0000000..fe23395 Binary files /dev/null and b/Ferestre/frm_schimbare_pret_tva.scx differ diff --git a/Ferestre/fundal.SCT b/Ferestre/fundal.SCT new file mode 100644 index 0000000..94964c0 Binary files /dev/null and b/Ferestre/fundal.SCT differ diff --git a/Ferestre/fundal.scx b/Ferestre/fundal.scx new file mode 100644 index 0000000..95036fd Binary files /dev/null and b/Ferestre/fundal.scx differ diff --git a/Grafice/ARW01LT.ICO b/Grafice/ARW01LT.ICO new file mode 100644 index 0000000..066451f Binary files /dev/null and b/Grafice/ARW01LT.ICO differ diff --git a/Grafice/BINOCULR.ICO b/Grafice/BINOCULR.ICO new file mode 100644 index 0000000..bd8202e Binary files /dev/null and b/Grafice/BINOCULR.ICO differ diff --git a/Grafice/BLUE.BMP b/Grafice/BLUE.BMP new file mode 100644 index 0000000..4dbef7d Binary files /dev/null and b/Grafice/BLUE.BMP differ diff --git a/Grafice/BOOK.ICO b/Grafice/BOOK.ICO new file mode 100644 index 0000000..b4c6683 Binary files /dev/null and b/Grafice/BOOK.ICO differ diff --git a/Grafice/BOOK01A.ICO b/Grafice/BOOK01A.ICO new file mode 100644 index 0000000..ac45768 Binary files /dev/null and b/Grafice/BOOK01A.ICO differ diff --git a/Grafice/BOOK01B.ICO b/Grafice/BOOK01B.ICO new file mode 100644 index 0000000..53eb2c4 Binary files /dev/null and b/Grafice/BOOK01B.ICO differ diff --git a/Grafice/BOOK01C.ICO b/Grafice/BOOK01C.ICO new file mode 100644 index 0000000..b21898e Binary files /dev/null and b/Grafice/BOOK01C.ICO differ diff --git a/Grafice/BOOK04.ICO b/Grafice/BOOK04.ICO new file mode 100644 index 0000000..bf8dd39 Binary files /dev/null and b/Grafice/BOOK04.ICO differ diff --git a/Grafice/C.ico b/Grafice/C.ico new file mode 100644 index 0000000..ce97f71 Binary files /dev/null and b/Grafice/C.ico differ diff --git a/Grafice/CRDFLE01.ICO b/Grafice/CRDFLE01.ICO new file mode 100644 index 0000000..b96b91f Binary files /dev/null and b/Grafice/CRDFLE01.ICO differ diff --git a/Grafice/CRDFLE12.ICO b/Grafice/CRDFLE12.ICO new file mode 100644 index 0000000..703943b Binary files /dev/null and b/Grafice/CRDFLE12.ICO differ diff --git a/Grafice/EDIT1.BMP b/Grafice/EDIT1.BMP new file mode 100644 index 0000000..87c5211 Binary files /dev/null and b/Grafice/EDIT1.BMP differ diff --git a/Grafice/EYE.ICO b/Grafice/EYE.ICO new file mode 100644 index 0000000..b1c65e6 Binary files /dev/null and b/Grafice/EYE.ICO differ diff --git a/Grafice/FILES04.ICO b/Grafice/FILES04.ICO new file mode 100644 index 0000000..de26392 Binary files /dev/null and b/Grafice/FILES04.ICO differ diff --git a/Grafice/FIND.BMP b/Grafice/FIND.BMP new file mode 100644 index 0000000..c29fbce Binary files /dev/null and b/Grafice/FIND.BMP differ diff --git a/Grafice/HLP.BMP b/Grafice/HLP.BMP new file mode 100644 index 0000000..4fbb501 Binary files /dev/null and b/Grafice/HLP.BMP differ diff --git a/Grafice/LEAF.BMP b/Grafice/LEAF.BMP new file mode 100644 index 0000000..d6b95bc Binary files /dev/null and b/Grafice/LEAF.BMP differ diff --git a/Grafice/NEW.BMP b/Grafice/NEW.BMP new file mode 100644 index 0000000..025abea Binary files /dev/null and b/Grafice/NEW.BMP differ diff --git a/Grafice/NOTE14.ICO b/Grafice/NOTE14.ICO new file mode 100644 index 0000000..998dbd2 Binary files /dev/null and b/Grafice/NOTE14.ICO differ diff --git a/Grafice/NOTE16.ICO b/Grafice/NOTE16.ICO new file mode 100644 index 0000000..94b185c Binary files /dev/null and b/Grafice/NOTE16.ICO differ diff --git a/Grafice/PC02.ICO b/Grafice/PC02.ICO new file mode 100644 index 0000000..b3b8b65 Binary files /dev/null and b/Grafice/PC02.ICO differ diff --git a/Grafice/SECUR05.ICO b/Grafice/SECUR05.ICO new file mode 100644 index 0000000..6037ffd Binary files /dev/null and b/Grafice/SECUR05.ICO differ diff --git a/Grafice/Vechi/CUMP.bmp b/Grafice/Vechi/CUMP.bmp new file mode 100644 index 0000000..7fc19e4 Binary files /dev/null and b/Grafice/Vechi/CUMP.bmp differ diff --git a/Grafice/Vechi/Cont11.ico b/Grafice/Vechi/Cont11.ico new file mode 100644 index 0000000..933ee2c Binary files /dev/null and b/Grafice/Vechi/Cont11.ico differ diff --git a/Grafice/Vechi/EXCLAM1.ICO b/Grafice/Vechi/EXCLAM1.ICO new file mode 100644 index 0000000..42fcf59 Binary files /dev/null and b/Grafice/Vechi/EXCLAM1.ICO differ diff --git a/Grafice/Vechi/EXCLAM2.ICO b/Grafice/Vechi/EXCLAM2.ICO new file mode 100644 index 0000000..351aa72 Binary files /dev/null and b/Grafice/Vechi/EXCLAM2.ICO differ diff --git a/Grafice/Vechi/EXCLEM.ICO b/Grafice/Vechi/EXCLEM.ICO new file mode 100644 index 0000000..90fe0f2 Binary files /dev/null and b/Grafice/Vechi/EXCLEM.ICO differ diff --git a/Grafice/Vechi/HAND.BMP b/Grafice/Vechi/HAND.BMP new file mode 100644 index 0000000..2a72376 Binary files /dev/null and b/Grafice/Vechi/HAND.BMP differ diff --git a/Grafice/Vechi/H_POINT.CUR b/Grafice/Vechi/H_POINT.CUR new file mode 100644 index 0000000..6d1096b Binary files /dev/null and b/Grafice/Vechi/H_POINT.CUR differ diff --git a/Grafice/Vechi/Intreb.ico b/Grafice/Vechi/Intreb.ico new file mode 100644 index 0000000..a63d9c3 Binary files /dev/null and b/Grafice/Vechi/Intreb.ico differ diff --git a/Grafice/Vechi/NET13.ICO b/Grafice/Vechi/NET13.ICO new file mode 100644 index 0000000..184201c Binary files /dev/null and b/Grafice/Vechi/NET13.ICO differ diff --git a/Grafice/Vechi/POINT.CUR b/Grafice/Vechi/POINT.CUR new file mode 100644 index 0000000..e4feb3e Binary files /dev/null and b/Grafice/Vechi/POINT.CUR differ diff --git a/Grafice/Vechi/POINT04.ICO b/Grafice/Vechi/POINT04.ICO new file mode 100644 index 0000000..c18a12c Binary files /dev/null and b/Grafice/Vechi/POINT04.ICO differ diff --git a/Grafice/Vechi/pericol.ico b/Grafice/Vechi/pericol.ico new file mode 100644 index 0000000..36043c8 Binary files /dev/null and b/Grafice/Vechi/pericol.ico differ diff --git a/Grafice/WZSETUP.INI b/Grafice/WZSETUP.INI new file mode 100644 index 0000000..a95f994 --- /dev/null +++ b/Grafice/WZSETUP.INI @@ -0,0 +1,36 @@ +[Preferences] +DistributionDirectory=C:\VFP\DISTRIB\ +DistributionSourceDirectory=C:\VFP\DISTRIB.SRC\ +SourceDirectory=E:\CONT2000\CONTAB\GRAFICE\ +InstallFoxProRuntime=Y +InstallGraph=N +InstallODBCDrivers=N +AccessDriver=Y +FoxPro2xDriver=Y +dBASEDriver=Y +ParadoxDriver=Y +SQLServerDriver=Y +ExcelDriver=Y +TextDriver=Y +OracleDriver=Y +Oracle7Driver=Y +BtrieveDriver=Y +VFPDriver=Y +InstallWindows95=N +InstallWindowsNT=N +DestinationDirectory=E:\CONTSETUP\ +Make1.44MegDisks=N +Make1.2MegDisks=N +Make720KDisks=N +MakeNetsetup=Y +SetupBanner=gr +Copyright=gr +PostExecute= +UserDefaultDirectory=\GRAFICE\ +ProgManGroup=Visual FoxPro Applications +UserCanModify=1 +SplitSize=363520 +FileCustomizationDelimiter=~ +InstRemoteAuto=N +InstActiveX=N + diff --git a/Grafice/in1.bmp b/Grafice/in1.bmp new file mode 100644 index 0000000..71034d6 Binary files /dev/null and b/Grafice/in1.bmp differ diff --git a/Grafice/in1_b.bmp b/Grafice/in1_b.bmp new file mode 100644 index 0000000..54b8512 Binary files /dev/null and b/Grafice/in1_b.bmp differ diff --git a/Grafice/in2.bmp b/Grafice/in2.bmp new file mode 100644 index 0000000..9c33486 Binary files /dev/null and b/Grafice/in2.bmp differ diff --git a/Grafice/in2_b.bmp b/Grafice/in2_b.bmp new file mode 100644 index 0000000..fe12cb7 Binary files /dev/null and b/Grafice/in2_b.bmp differ diff --git a/Grafice/inBox.ico b/Grafice/inBox.ico new file mode 100644 index 0000000..9e9c57b Binary files /dev/null and b/Grafice/inBox.ico differ diff --git a/Grafice/original/in1.bmp b/Grafice/original/in1.bmp new file mode 100644 index 0000000..61a304b Binary files /dev/null and b/Grafice/original/in1.bmp differ diff --git a/Grafice/original/in2.bmp b/Grafice/original/in2.bmp new file mode 100644 index 0000000..1e9ffc0 Binary files /dev/null and b/Grafice/original/in2.bmp differ diff --git a/Grafice/original/out1.bmp b/Grafice/original/out1.bmp new file mode 100644 index 0000000..f917fd8 Binary files /dev/null and b/Grafice/original/out1.bmp differ diff --git a/Grafice/original/out2.bmp b/Grafice/original/out2.bmp new file mode 100644 index 0000000..abe4a14 Binary files /dev/null and b/Grafice/original/out2.bmp differ diff --git a/Grafice/original/rul1.bmp b/Grafice/original/rul1.bmp new file mode 100644 index 0000000..7a65971 Binary files /dev/null and b/Grafice/original/rul1.bmp differ diff --git a/Grafice/original/rul2.bmp b/Grafice/original/rul2.bmp new file mode 100644 index 0000000..677b279 Binary files /dev/null and b/Grafice/original/rul2.bmp differ diff --git a/Grafice/original/stoc1.bmp b/Grafice/original/stoc1.bmp new file mode 100644 index 0000000..aed56d4 Binary files /dev/null and b/Grafice/original/stoc1.bmp differ diff --git a/Grafice/original/stoc2.bmp b/Grafice/original/stoc2.bmp new file mode 100644 index 0000000..d175522 Binary files /dev/null and b/Grafice/original/stoc2.bmp differ diff --git a/Grafice/out1.bmp b/Grafice/out1.bmp new file mode 100644 index 0000000..80ac1b5 Binary files /dev/null and b/Grafice/out1.bmp differ diff --git a/Grafice/out1_b.bmp b/Grafice/out1_b.bmp new file mode 100644 index 0000000..536965e Binary files /dev/null and b/Grafice/out1_b.bmp differ diff --git a/Grafice/out2.bmp b/Grafice/out2.bmp new file mode 100644 index 0000000..75d1de7 Binary files /dev/null and b/Grafice/out2.bmp differ diff --git a/Grafice/out2_b.bmp b/Grafice/out2_b.bmp new file mode 100644 index 0000000..bef606d Binary files /dev/null and b/Grafice/out2_b.bmp differ diff --git a/Grafice/outBox.ico b/Grafice/outBox.ico new file mode 100644 index 0000000..188c1dc Binary files /dev/null and b/Grafice/outBox.ico differ diff --git a/Grafice/plus.BMP b/Grafice/plus.BMP new file mode 100644 index 0000000..b9d43d8 Binary files /dev/null and b/Grafice/plus.BMP differ diff --git a/Grafice/roagest.bmp b/Grafice/roagest.bmp new file mode 100644 index 0000000..74b87ae Binary files /dev/null and b/Grafice/roagest.bmp differ diff --git a/Grafice/rul1.bmp b/Grafice/rul1.bmp new file mode 100644 index 0000000..e4ea89d Binary files /dev/null and b/Grafice/rul1.bmp differ diff --git a/Grafice/rul2.bmp b/Grafice/rul2.bmp new file mode 100644 index 0000000..06cd679 Binary files /dev/null and b/Grafice/rul2.bmp differ diff --git a/Grafice/sa.ico b/Grafice/sa.ico new file mode 100644 index 0000000..63f8083 Binary files /dev/null and b/Grafice/sa.ico differ diff --git a/Grafice/stoc1.bmp b/Grafice/stoc1.bmp new file mode 100644 index 0000000..11074c9 Binary files /dev/null and b/Grafice/stoc1.bmp differ diff --git a/Grafice/stoc2.bmp b/Grafice/stoc2.bmp new file mode 100644 index 0000000..216ddf1 Binary files /dev/null and b/Grafice/stoc2.bmp differ diff --git a/Help/help_inventar.rtf b/Help/help_inventar.rtf new file mode 100644 index 0000000..a549e77 --- /dev/null +++ b/Help/help_inventar.rtf @@ -0,0 +1,86 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset238\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f38\froman\fcharset0\fprq2 Times New Roman;} +{\f37\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f39\froman\fcharset161\fprq2 Times New Roman Greek;}{\f40\froman\fcharset162\fprq2 Times New Roman Tur;}{\f41\froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f42\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f43\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f44\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; +\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; +\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden +Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\rsidtbl \rsid3818959\rsid4135784\rsid5337107\rsid5449589\rsid5917916 +\rsid7019328\rsid11479974\rsid12407844\rsid13656673\rsid14040140}{\*\generator Microsoft Word 10.0.6856;}{\info{\operator Marius Mutu}{\creatim\yr2010\mo6\dy2\hr14\min30}{\revtim\yr2010\mo6\dy4\hr13\min45}{\version11}{\edmins14}{\nofpages2}{\nofwords477} +{\nofchars2723}{\nofcharsws3194}{\vern16393}{\*\password 00000000}}{\*\xmlnstbl {\xmlns1 urn:schemas-microsoft-com:office:smarttags}}\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1417\gutter0 +\widowctrl\ftnbj\aenddoc\grfdocevents0\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind4\viewscale100\nolnhtadjtbl\rsidroot5449589 \fet0 +{\*\wgrffmtfilter 013f}\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (} +{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \qj \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 +\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\fs28\lang1048\langfe1033\langnp1048\insrsid11479974 ROMFAST}{\b\fs28\lang1048\langfe1033\langnp1048\insrsid11479974 }{\fs28\lang1048\langfe1033\langnp1048\insrsid11479974 SRL}{ +\fs20\lang1048\langfe1033\langnp1048\insrsid11479974 +\par }{\lang1048\langfe1033\langnp1048\insrsid11479974 Nr.Reg.Com. J13/626/1991 CUI: RO1879855 +\par Tel. 0241-541000, Fax. 0341-101578 +\par }\pard \ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\lang1048\langfe1033\langnp1048\insrsid11479974 +\par v 02.06.2010.1 +\par }{\b\lang1048\langfe1033\langnp1048\insrsid12407844 +\par }{\b\lang1048\langfe1033\langnp1048\insrsid5449589\charrsid5449589 Cuprins +\par }{\lang1048\langfe1033\langnp1048\insrsid5449589 A. Inventar magazin normal +\par B. Inventar magazin initial +\par +\par }{\b\lang1048\langfe1033\highlight16\langnp1048\insrsid11479974 +\par }{\b\highlight16\insrsid11479974 A. }{\b\lang1048\langfe1033\highlight16\langnp1048\insrsid11479974 INVENTAR }{\b\highlight16\insrsid11479974 MAGAZIN }{\b\lang1048\langfe1033\highlight16\langnp1048\insrsid11479974 {\*\xmlopen\xmlns1{\factoidname place}} +{\*\xmlopen\xmlns1{\factoidname City}}NORMAL}{\lang1048\langfe1033\langnp1048\insrsid11479974 {\*\xmlclose}{\*\xmlclose} (inventarierea tuturor articolelor) +\par +\par }{\b\lang1048\langfe1033\langnp1048\insrsid13656673\charrsid3818959 1. }{\lang1048\langfe1033\langnp1048\insrsid11479974 Gestiuni > Inventar magazin > Adaugare inventar >Alegere gestiuni > Se bifeaza }{\b\lang1048\langfe1033\langnp1048\insrsid11479974 +Articole din stoc}{\lang1048\langfe1033\langnp1048\insrsid11479974 si }{\b\lang1048\langfe1033\langnp1048\insrsid11479974 Stoc faptic 0 }{\lang1048\langfe1033\langnp1048\insrsid11479974 (stocul faptic va fi initializat cu 0) +\par }{\lang1048\langfe1033\langnp1048\insrsid5337107 +\par Alegeti aceasta varianta daca se scaneaza fiecare produs in calculator.}{\lang1048\langfe1033\langnp1048\insrsid13656673 +\par }{\lang1048\langfe1033\langnp1048\insrsid5337107 +\par }{\lang1048\langfe1033\langnp1048\insrsid13656673 sau +\par +\par }\pard \ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0\pararsid13656673 {\b\lang1048\langfe1033\langnp1048\insrsid13656673\charrsid3818959 2.}{\lang1048\langfe1033\langnp1048\insrsid13656673 +Gestiuni > Inventar magazin > Adaugare inventar >Alegere gestiuni > Se bifeaza }{\b\lang1048\langfe1033\langnp1048\insrsid13656673 Articole din stoc}{\lang1048\langfe1033\langnp1048\insrsid13656673 (stocul faptic va fi initializat cu stocul scriptic) + +\par }\pard \ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\lang1048\langfe1033\langnp1048\insrsid5337107 +\par Alegeti aceasta varianta daca se completeaza de mana inventarul si apoi se scaneaza in calculator doar articolele cu diferente. +\par +\par Se va lista un inventar necompletat pe rubrica faptic}{\lang1048\langfe1033\langnp1048\insrsid4135784 }{\lang1048\langfe1033\langnp1048\insrsid14040140 (Gestiuni > Inventar magazin > Modificare inventar > Listare > Inventar necompletat redus) }{ +\lang1048\langfe1033\langnp1048\insrsid4135784 si se vor completa in el de mana valorile faptice.}{\lang1048\langfe1033\langnp1048\insrsid11479974 +\par }{\lang1048\langfe1033\langnp1048\insrsid5917916 +\par Pentru articolele cu diferente de stoc, se va completa in calculator stocul faptic, la restul ramanand stoc faptic = stoc scriptic.}{\lang1048\langfe1033\langnp1048\insrsid7019328 +\par }{\lang1048\langfe1033\langnp1048\insrsid14040140 +\par }{\lang1048\langfe1033\langnp1048\insrsid5917916 La sfarsitul inventarului este posibil ca pe inventarul listat initial sa ramana articole care nu mai exista in stocul fizic. Se va completa 0 la stoc faptic si pe hartie si in calculator. +\par }{\lang1048\langfe1033\langnp1048\insrsid13656673 +\par }{\b\lang1048\langfe1033\langnp1048\insrsid11479974 Observatii +\par }{\lang1048\langfe1033\langnp1048\insrsid12407844 A}{\lang1048\langfe1033\langnp1048\insrsid11479974 1. Se ia in considerare la inventar toata marfa (existenta sau sosita in timpul inventarului) pentru care s-au inregistrat documentele scriptic +\par inainte de inceperea inventarului. +\par +\par }{\lang1048\langfe1033\langnp1048\insrsid12407844 A}{\lang1048\langfe1033\langnp1048\insrsid11479974 2. Marfa care soseste in timpul inventarului si pentru care s-au inregistrat documentele scriptic +\par dupa inceperea inventarului nu se inregistreaza. +\par +\par }{\lang1048\langfe1033\langnp1048\insrsid12407844 A}{\lang1048\langfe1033\langnp1048\insrsid11479974 3. Marfa care a plecat retur la depozit inainte de inceperea inventarului se inregistreaza daca +\par la inceperea inventarului nu s-a inregistrat scriptic documentul de retur. +\par +\par }{\b\highlight16\insrsid11479974 B. }{\b\lang1048\langfe1033\highlight16\langnp1048\insrsid11479974 INVENTAR }{\b\highlight16\insrsid11479974 MAGAZIN }{\b\lang1048\langfe1033\highlight16\langnp1048\insrsid11479974 INITIAL}{ +\lang1048\langfe1033\langnp1048\insrsid11479974 (golire de stoc existent si initializarea stocului) +\par +\par Gestiuni > Inventar magazin > Adaugare inventar >Alegere gestiuni > Se bifeaza }{\b\lang1048\langfe1033\langnp1048\insrsid11479974 Fara articole }{\lang1048\langfe1033\langnp1048\insrsid11479974 sau }{\b\lang1048\langfe1033\langnp1048\insrsid11479974 +Articolele intrate in ultimele luni}{\lang1048\langfe1033\langnp1048\insrsid11479974 (pentru a se crea o lista de articole cu stoc scriptic si stoc faptic = 0) +\par +\par }{\b\lang1048\langfe1033\langnp1048\insrsid11479974 Observatii +\par }{\lang1048\langfe1033\langnp1048\insrsid12407844 B}{\lang1048\langfe1033\langnp1048\insrsid11479974 1. }{\b\lang1048\langfe1033\langnp1048\insrsid11479974\charrsid5449589 Inventarul incepe si se termina in aceeasi zi}{ +\lang1048\langfe1033\langnp1048\insrsid11479974 +\par La sfarsitul inventarului se va goli stocul existent la momentul validarii inventarului si se va pune imaginea stocului din inventar +\par +\par }{\lang1048\langfe1033\langnp1048\insrsid12407844 B}{\lang1048\langfe1033\langnp1048\insrsid11479974 1.1. Se ia in considerare la inventar toata marfa (existenta sau sosita in timpul inventarului) pentru care s-au inregistrat documentele scriptic +\par pana la sfarsitul inventarului. +\par +\par }{\lang1048\langfe1033\langnp1048\insrsid12407844 B}{\lang1048\langfe1033\langnp1048\insrsid11479974 1.2. Marfa care a plecat retur la depozit inainte de inceperea inventarului se inregistreaza doar daca pana la sfarsitul inventarului +\par nu se inregistreaza scriptic documentul de retur. +\par +\par +\par }{\lang1048\langfe1033\langnp1048\insrsid12407844 B}{\lang1048\langfe1033\langnp1048\insrsid11479974 2. }{\b\lang1048\langfe1033\langnp1048\insrsid11479974\charrsid5449589 Inventarul dureaza mai mult de o zi}{ +\lang1048\langfe1033\langnp1048\insrsid11479974 +\par La sfarsitul inventarului se va goli stocul existent in ziua inceperii inventarului si se va pune imaginea stocului din inventar. +\par +\par }{\lang1048\langfe1033\langnp1048\insrsid12407844 B}{\lang1048\langfe1033\langnp1048\insrsid11479974 2.1. Se ia in considerare la inventar toata marfa (existenta sau sosita in timpul inventarului) pentru care s-au inregistrat documentele scriptic +\par pana la data inceperii inventarului (inclusiv). +\par +\par }{\lang1048\langfe1033\langnp1048\insrsid12407844 B}{\lang1048\langfe1033\langnp1048\insrsid11479974 2 +.2. Marfa care a plecat retur la depozit inainte de inceperea inventarului se inregistreaza doar daca se inregistreaza scriptic documentul de retur dupa cu data dupa inceperea inventarului. +\par }} \ No newline at end of file diff --git a/Include/COMCTL32.OCX b/Include/COMCTL32.OCX new file mode 100644 index 0000000..5ff81ed Binary files /dev/null and b/Include/COMCTL32.OCX differ diff --git a/Include/CONT2000.H b/Include/CONT2000.H new file mode 100644 index 0000000..47c5d6a --- /dev/null +++ b/Include/CONT2000.H @@ -0,0 +1,22 @@ +ARBORII DE DEFINITIE AI CLASELOR DIN PRG. CONT 2000 +___________________________________________________ + + + +ACTGEN -ACTGEN01 (ACTINTF) + -ACTGEN02 (ACTIND) -ACTGEN04 (ACTINTFU) + -ACTGEN05 (ACTSTORF) + -CHELTMAT + + -ACTGEN03 (ACTINTCL) -CASA + -BANCA + + -ACTGENINC + + +FACTGEST -FACTGEST_CLI (BVANZRUM) -BON + + -FACTGEST_FURN (FACTGEST) + + + diff --git a/Include/MSCAL.OCX b/Include/MSCAL.OCX new file mode 100644 index 0000000..287ea37 Binary files /dev/null and b/Include/MSCAL.OCX differ diff --git a/Include/foxpro.h b/Include/foxpro.h new file mode 100644 index 0000000..0dbb7c1 --- /dev/null +++ b/Include/foxpro.h @@ -0,0 +1,816 @@ +************************************************************************************ +************************************************************************************ +** ** +** ================ =========== ** +** == === == == ** +** == = == == ** +** == == == ** +** == === ===== ===== == == === ==== === ** +** ===== == == == == ========= == == == == == ** +** == == == == == == === == == ** +** == == == === == == == == ** +** == == == == == == == == == ** +** == == == == == == == == == ** +** ======= === ===== ==== ====== ====== === ** +** ** +************************************************************************************ +************************************************************************************ + +************************************************************************************ +************************************************************************************ +** ** +** Visual FoxPro Named Constant File ** +** This file contains named constants for most Visual FoxPro functions ** +** ** +************************************************************************************ +************************************************************************************ + +*-- General +*--ZOrder Method +#DEFINE ZORDER_BRINGTOFRONT 0 +#DEFINE ZORDER_SENDTOBACK 1 + +*-- TYPE() tags +#DEFINE T_CHARACTER "C" +#DEFINE T_NUMERIC "N" +#DEFINE T_DOUBLE "B" +#DEFINE T_DATE "D" +#DEFINE T_DATETIME "T" +#DEFINE T_MEMO "M" +#DEFINE T_GENERAL "G" +#DEFINE T_OBJECT "O" +#DEFINE T_SCREEN "S" +#DEFINE T_LOGICAL "L" +#DEFINE T_CURRENCY "Y" +#DEFINE T_UNDEFINED "U" + +*-- QueryUnload +#DEFINE FORM_CONTROLMENU 0 +#DEFINE FORM_CODE 1 +#DEFINE APP_WINDOWS 2 +#DEFINE APP_TASKMANAGER 3 +#DEFINE FORM_MDIFORM 4 + +*-- Columns in array returned by AVCXCLASSES() +#DEFINE AVCX_CLASS 1 && OBJNAME field +#DEFINE AVCX_BASECLASS 2 && BASECLASS field +#DEFINE AVCX_PARENTCLASS 3 && CLASS field +#DEFINE AVCX_PARENTCLASSLIB 4 && CLASSLOC field +#DEFINE AVCX_CLASSICON 5 && RESERVED4 field +#DEFINE AVCX_CONTAINERICON 6 && RESERVED5 field +#DEFINE AVCX_SCALEMODE 7 && RESERVED6 field +#DEFINE AVCX_CLASSDESCRIPTION 8 && RESERVED7 field +#DEFINE AVCX_INCLUDEFILE 9 && RESERVED8 field +#DEFINE AVCX_USERINFO 10 && USER field +#DEFINE AVCX_OLEPUBLIC 11 && RESERVED2 field + + +*-- Active Document +*-- CommandTargetQuery Command Options +#DEFINE CMDF_NOTSUPPORTED 0 && The command is not supported by this object +#DEFINE CMDF_SUPPORTED 1 && The command is supported by this object +#DEFINE CMDF_ENABLED 2 && The command is available and enabled +#DEFINE CMDF_LATCHED 4 && The command is an on-off toggle and is currently on +#DEFINE CMDF_NINCHED 8 && The command state is indeterminate + +*-- CommandTargetQuery CommandTextFlag values +#DEFINE CMDTEXTF_NONE 0 && No extra information is requested +#DEFINE CMDTEXTF_NAME 1 && Object should provide the localized name of the command +#DEFINE CMDTEXTF_STATUS 2 && Object should provide a localized status string for the command + +*-- CommandTarget Command IDs +#DEFINE CMDID_OPEN 1 && File menu, Open command +#DEFINE CMDID_NEW 2 && File menu, New command +#DEFINE CMDID_SAVE 3 && File menu, Save command +#DEFINE CMDID_SAVEAS 4 && File menu, Save As command +#DEFINE CMDID_SAVECOPYAS 5 && File menu, Save Copy As command +#DEFINE CMDID_PRINT 6 && File menu, Print command +#DEFINE CMDID_PRINTPREVIEW 7 && File menu, Print Preview command +#DEFINE CMDID_PAGESETUP 8 && File menu, Page Setup command +#DEFINE CMDID_SPELL 9 && Tools menu, Spelling command +#DEFINE CMDID_PROPERTIES 10 && File menu, Properties command +#DEFINE CMDID_CUT 11 && Edit menu, Cut command (from Host) +#DEFINE CMDID_COPY 12 && Edit menu, Copy command (from Host) +#DEFINE CMDID_PASTE 13 && Edit menu, Paste command (from Host) +#DEFINE CMDID_PASTESPECIAL 14 && Edit menu, Paste Special command (from Host) +#DEFINE CMDID_UNDO 15 && Edit menu, Undo command (from Host) +#DEFINE CMDID_REDO 16 && Edit menu, Redo command (from Host) +#DEFINE CMDID_SELECTALL 17 && Edit menu, Select All command (from Host) +#DEFINE CMDID_CLEARSELECTION 18 && Edit menu, Clear command (from Host) +#DEFINE CMDID_ZOOM 19 && View menu, Zoom command +#DEFINE CMDID_GETZOOMRANGE 20 && Retrieves zoom range applicable to View Zoom +#DEFINE CMDID_UPDATECOMMANDS 21 && Informs the Active Document of state changes +#DEFINE CMDID_REFRESH 22 && Asks the Active Document to refresh its display +#DEFINE CMDID_STOP 23 && Asks the Active Document to stop all current processing +#DEFINE CMDID_HIDETOOLBARS 24 && Asks the Active Document to hide its toolbars +#DEFINE CMDID_SETPROGRESSMAX 25 && Sets the maximum value of a progress indicator +#DEFINE CMDID_SETPROGRESSPOS 26 && Sets the current value of a progress indicator +#DEFINE CMDID_SETPROGRESSTEXT 27 && Sets the text contained in a progress indicator +#DEFINE CMDID_SETTITLE 28 && Sets the title bar text +#DEFINE CMDID_SETDOWNLOADSTATE 29 && Sent by host when its download state changes +#DEFINE CMDID_STOPDOWNLOAD 30 && Stops the download when executed +#DEFINE CMDID_ONTOOLBARACTIVATED 31 && One of the container's toolbars has received the focus +#DEFINE CMDID_ENABLE_INTERACTION 36 && Asks the Active Document to either pause or resume multimedia +#DEFINE CMDID_ONUNLOAD 37 && Sent by the Active Document host before navigation to another + && site is initiated or the host is closed + +*-- CommantTargetExec nExecOption parameter +#DEFINE CMDEXECOPT_DODEFAULT 0 && Use the default behavior +#DEFINE CMDEXECOPT_PROMPTUSER 1 && Execute the command after obtaining user input +#DEFINE CMDEXECOPT_DONTPROMPTUSER 2 && Execute the command without prompting the user +#DEFINE CMDEXECOPT_SHOWHELP 3 && Show help for the corresponding command + +*-- CommandTargetExec Return Values +#DEFINE CMD_OK 0 && Command handled okay by the Active Document +#DEFINE CMD_NOTSUPPORTED 1 && Command is not supported by the Active Document +#DEFINE CMD_DISABLED 2 && Command is disabled for the Active Document +#DEFINE CMD_NOHELP 3 && No help is available for the command from the Active Document +#DEFINE CMD_CANCELED 4 && The user canceled the execution of the command + + +*-- Project Hooks +*-- Build Actions +#DEFINE BUILDACTION_REBUILD 1 && Rebuild Project +#DEFINE BUILDACTION_BUILDAPP 2 && Build APP +#DEFINE BUILDACTION_BUILDEXE 3 && Build EXE +#DEFINE BUILDACTION_BUILDDLL 4 && Build DLL +#DEFINE BUILDACTION_BUILDMTDLL 5 && Build MTDLL + +*-- File Object SCCStatus Property +#DEFINE SCCFILE_NOTCONTROLLED 0 && File is not source controlled +#DEFINE SCCFILE_NOTCHECKEDOUT 1 && File is controlled but not checked out to anyone +#DEFINE SCCFILE_CHECKEDOUTCU 2 && File is checked out to the current user only +#DEFINE SCCFILE_CHECKEDOUTOU 3 && File is checked out to someone other than the current user +#DEFINE SCCFILE_MERGECONFLICT 4 && File has a merge conflict +#DEFINE SCCFILE_MERGE 5 && File has been merged without conflict +#DEFINE SCCFILE_CHECKEDOUTMU 6 && File is checked out to multiple users + +*-- File Object Type Property +#DEFINE FILETYPE_DATABASE "d" && Database (.DBC) +#DEFINE FILETYPE_FREETABLE "D" && Free table (.DBF) +#DEFINE FILETYPE_QUERY "Q" && Query (.QPR) +#DEFINE FILETYPE_FORM "K" && Form (.SCX) +#DEFINE FILETYPE_REPORT "R" && Report (.FRX) +#DEFINE FILETYPE_LABEL "B" && Label (.LBX) +#DEFINE FILETYPE_CLASSLIB "V" && Class Library (.VCX) +#DEFINE FILETYPE_PROGRAM "P" && Program (.PRG) +#DEFINE FILETYPE_APILIB "L" && API Library (.FLL) +#DEFINE FILETYPE_APPLICATION "Z" && Application (.APP) +#DEFINE FILETYPE_MENU "M" && Menu (.MNX) +#DEFINE FILETYPE_TEXT "T" && Text (.TXT, .H., etc.) +#DEFINE FILETYPE_OTHER "x" && Other file types not enumerated above + +*-- Server Object Instancing Property +#DEFINE SERVERINSTANCE_NOTCREATABLE 0 && Instances creatable only inside Visual FoxPro +#DEFINE SERVERINSTANCE_SINGLEUSE 1 && Single use server +#DEFINE SERVERINSTANCE_MULTIUSE 2 && Multi-use server + + +*-- Drag and Drop +*-- OLE Drag and Drop: Drop Effects +#DEFINE DROPEFFECT_NONE 0 +#DEFINE DROPEFFECT_COPY 1 +#DEFINE DROPEFFECT_MOVE 2 +#DEFINE DROPEFFECT_LINK 4 + +*-- OLE Drag and Drop: Drop Modes +#DEFINE DROP_DISABLED 0 +#DEFINE DROP_ENABLED 1 +#DEFINE DROP_PASSTOCONTAINER 2 + +*-- OLE Drag and Drop: OLEDropHasData settings +#DEFINE DROPHASDATA_VFPDETERMINE -1 +#DEFINE DROPHASDATA_NOTUSEFUL 0 +#DEFINE DROPHASDATA_USEFUL 1 + +*-- Clipboard formats (Global) +#DEFINE CF_TEXT 1 && Text +#DEFINE CF_BITMAP 2 && Bitmap +#DEFINE CF_METAFILEPICT 3 && Handle of a metafile picture format +#DEFINE CF_SYLK 4 && Microsoft Symbolic Link format +#DEFINE CF_DIF 5 && Software Arts' Data Interchange Format +#DEFINE CF_TIFF 6 && Tagged-image file format +#DEFINE CF_OEMTEXT 7 && Text format containing characters in the OEM character set +#DEFINE CF_DIB 8 && Device-independent bitmap +#DEFINE CF_PALETTE 9 && Handle of a color palette +#DEFINE CF_PENDATA 10 && Data for the pen extensions to the Microsoft Windows for Pen Computing +#DEFINE CF_RIFF 11 && Represents complex audio data +#DEFINE CF_WAVE 12 && Audio data in one of the standard wave formats +#DEFINE CF_UNICODETEXT 13 && Windows NT only: Unicode text format +#DEFINE CF_ENHMETAFILE 14 && A handle of an enhanced metafile +#DEFINE CF_FILES 15 && A list of files +#DEFINE CF_HDROP 15 && A list of files +#DEFINE CF_LOCALE 16 && A handle to the locale identifier +#DEFINE CF_MAX 17 + +*-- Other Miscellaneous Clipboard formats +#DEFINE CFSTR_HYPERLINK "Hyperlink" && A Hyperlink +#DEFINE CFSTR_BIFF "Biff" && Microsoft Excel version 2.x +#DEFINE CFSTR_BIFF3 "Biff3" && Microsoft Excel version 3.0 +#DEFINE CFSTR_BIFF4 "Biff4" && Microsoft Excel version 4.0 +#DEFINE CFSTR_BIFF5 "Biff5" && Microsoft Excel version 5.0 +#DEFINE CFSTR_BIFF7 "Biff7" && Microsoft Excel version 7.0 +#DEFINE CFSTR_BIFF8 "Biff8" && Microsoft Excel version 8.0 +#DEFINE CFSTR_XLTABLE "XlTable" && Microsoft Excel fast table format. +#DEFINE CFSTR_CSV "CSV" && Comma separated values +#DEFINE CFSTR_WK1 "Wk1" && Lotus 1-2-3 Release 2.01 and Release 2.2 format +#DEFINE CFSTR_URL "UniformResourceLocator" && URL + +#DEFINE CFSTR_RTF "Rich Text Format" +#DEFINE CFSTR_RTFNOOBJS "Rich Text Format Without Objects" +#DEFINE CFSTR_RETEXTOBJ "RichEdit Text and Objects" + +*-- Clipboard formats (Private to VFP) +#DEFINE CFSTR_OLEVARIANTARRAY "OLE Variant Array" && VFP array +#DEFINE CFSTR_OLEVARIANT "OLE Variant" && Data in variant form +#DEFINE CFSTR_VFPSOURCEOBJECT "VFP Source Object" && A reference to the VFP source object + +*-- DragMode +#DEFINE DRAG_MANUAL 0 && 0 - Manual +#DEFINE DRAG_AUTOMATIC 1 && 1 - Automatic + +*-- DragOver +#DEFINE DRAG_ENTER 0 +#DEFINE DRAG_LEAVE 1 +#DEFINE DRAG_OVER 2 + +*-- Drag (controls) +#DEFINE DRAG_CANCEL 0 +#DEFINE DRAG_BEGIN 1 +#DEFINE DRAG_END 2 + + +*-- Properties +*-- Colors +#DEFINE COLOR_WHITE 16777215 +#DEFINE COLOR_BLACK 0 +#DEFINE COLOR_GRAY 12632256 +#DEFINE COLOR_DARK_GRAY 8421504 +#DEFINE COLOR_RED 255 +#DEFINE COLOR_DARK_BLUE 8388608 +#DEFINE COLOR_CYAN 16776960 +#DEFINE COLOR_DARK_CYAN 8421376 +#DEFINE COLOR_GREEN 65280 +#DEFINE COLOR_DARK_GREEN 32768 +#DEFINE COLOR_YELLOW 65535 +#DEFINE COLOR_DARK_YELLOW 32896 +#DEFINE COLOR_BLUE 16711680 +#DEFINE COLOR_DARK_RED 128 +#DEFINE COLOR_MAGENTA 16711935 +#DEFINE COLOR_DARK_MAGENTA 8388736 + +*-- MousePointer +#DEFINE MOUSE_DEFAULT 0 && 0 - Default +#DEFINE MOUSE_ARROW 1 && 1 - Arrow +#DEFINE MOUSE_CROSSHAIR 2 && 2 - Cross +#DEFINE MOUSE_IBEAM 3 && 3 - I-Beam +#DEFINE MOUSE_ICON_POINTER 4 && 4 - Icon +#DEFINE MOUSE_SIZE_POINTER 5 && 5 - Size +#DEFINE MOUSE_SIZE_NE_SW 6 && 6 - Size NE SW +#DEFINE MOUSE_SIZE_N_S 7 && 7 - Size N S +#DEFINE MOUSE_SIZE_NW_SE 8 && 8 - Size NW SE +#DEFINE MOUSE_SIZE_W_E 9 && 9 - Size W E +#DEFINE MOUSE_UP_ARROW 10 && 10 - Up Arrow +#DEFINE MOUSE_HOURGLASS 11 && 11 - Hourglass +#DEFINE MOUSE_NO_DROP 12 && 12 - No drop +#DEFINE MOUSE_HIDE_POINTER 13 && 13 - Hide Pointer +#DEFINE MOUSE_ARROW2 14 && 14 - Arrow +#DEFINE MOUSE_CUSTOM 99 && 99 - Custom + +*-- ScrollBars +#DEFINE SCROLLBARS_NONE 0 && 0 - None (Default) +#DEFINE SCROLLBARS_HORIZONTAL 1 && 1 - Horizontal +#DEFINE SCROLLBARS_VERTICAL 2 && 2 - Vertical +#DEFINE SCROLLBARS_BOTH 3 && 3 - Both + +*-- DrawMode +#DEFINE DRAWMODE_BLACKNESS 1 && 1 - Blackness +#DEFINE DRAWMODE_NOT_MERGE_PEN 2 && 2 - Not Merge Pen +#DEFINE DRAWMODE_MASK_NOT_PEN 3 && 3 - Mask Not Pen +#DEFINE DRAWMODE_NOT_COPY_PEN 4 && 4 - Not Copy Pen +#DEFINE DRAWMODE_MASK_PEN_NOT 5 && 5 - Mask Pen Not +#DEFINE DRAWMODE_INVERT 6 && 6 - Invert +#DEFINE DRAWMODE_XOR_PEN 7 && 7 - Xor Pen +#DEFINE DRAWMODE_NOT_MASK_PEN 8 && 8 - Not Mask Pen +#DEFINE DRAWMODE_MASK_PEN 9 && 9 - Mask Pen +#DEFINE DRAWMODE_NOT_XOR_PEN 10 && 10 - Not Xor Pen +#DEFINE DRAWMODE_NOP 11 && 11 - Nop +#DEFINE DRAWMODE_MERGE_NOT_PEN 12 && 12 - Merge Not Pen +#DEFINE DRAWMODE_COPY_PEN 13 && 13 - Copy Pen +#DEFINE DRAWMODE_MERGE_PEN_NOT 14 && 14 - Merge Pen Not +#DEFINE DRAWMODE_MERGE_PEN 15 && 15 - Merge Pen +#DEFINE DRAWMODE_WHITENESS 16 && 16 - Whiteness + +*-- DrawStyle +#DEFINE DRAWSTYLE_SOLID 0 && 0 - Solid +#DEFINE DRAWSTYLE_DASH 1 && 1 - Dash +#DEFINE DRAWSTYLE_DOT 2 && 2 - Dot +#DEFINE DRAWSTYLE_DASH_DOT 3 && 3 - Dash-Dot +#DEFINE DRAWSTYLE_DASH_DOT_DOT 4 && 4 - Dash-Dot-Dot +#DEFINE DRAWSTYLE_INVISIBLE 5 && 5 - Invisible +#DEFINE DRAWSTYLE_INSIDE_SOLID 6 && 6 - Inside Solid + +*-- FillStyle +#DEFINE FILLSTYLE_SOLID 0 && 0 - Solid +#DEFINE FILLSTYLE_TRANSPARENT 1 && 1 - Transparent +#DEFINE FILLSTYLE_HORIZONTAL_LINE 2 && 2 - Horizontal Line +#DEFINE FILLSTYLE_VERTICAL_LINE 3 && 3 - Vertical Line +#DEFINE FILLSTYLE_UPWARD_DIAGONAL 4 && 4 - Upward Diagonal +#DEFINE FILLSTYLE_DOWNWARD_DIAGONAL 5 && 5 - Downward Diagonal +#DEFINE FILLSTYLE_CROSS 6 && 6 - Cross +#DEFINE FILLSTYLE_DIAGONAL_CROSS 7 && 7 - Diagonal Cross + +*-- ScaleMode +#DEFINE SCALEMODE_PIXELS 3 && 3 - Pixel +#DEFINE SCALEMODE_FOXELS 0 && 0 - Foxels + +*-- WindowState +#DEFINE WINDOWSTATE_NORMAL 0 && 0 - Normal +#DEFINE WINDOWSTATE_MINIMIZED 1 && 1 - Minimized +#DEFINE WINDOWSTATE_MAXIMIZED 2 && 2 - Maximized + +*-- Window Borders +#DEFINE BORDER_NONE 0 +#DEFINE BORDER_SINGLE 1 +#DEFINE BORDER_DOUBLE 2 +#DEFINE BORDER_SYSTEM 3 + +*-- Toolbar Positions +#DEFINE TOOL_NOTDOCKED -1 +#DEFINE TOOL_TOP 0 +#DEFINE TOOL_LEFT 1 +#DEFINE TOOL_RIGHT 2 +#DEFINE TOOL_BOTTOM 3 + +*-- Button parameter masks +#DEFINE BUTTON_LEFT 1 +#DEFINE BUTTON_RIGHT 2 +#DEFINE BUTTON_MIDDLE 4 + +*-- Function Parameters +*-- MessageBox parameters +#DEFINE MB_OK 0 && OK button only +#DEFINE MB_OKCANCEL 1 && OK and Cancel buttons +#DEFINE MB_ABORTRETRYIGNORE 2 && Abort, Retry, and Ignore buttons +#DEFINE MB_YESNOCANCEL 3 && Yes, No, and Cancel buttons +#DEFINE MB_YESNO 4 && Yes and No buttons +#DEFINE MB_RETRYCANCEL 5 && Retry and Cancel buttons + +#DEFINE MB_ICONSTOP 16 && Critical message +#DEFINE MB_ICONQUESTION 32 && Warning query +#DEFINE MB_ICONEXCLAMATION 48 && Warning message +#DEFINE MB_ICONINFORMATION 64 && Information message + +#DEFINE MB_APPLMODAL 0 && Application modal message box +#DEFINE MB_DEFBUTTON1 0 && First button is default +#DEFINE MB_DEFBUTTON2 256 && Second button is default +#DEFINE MB_DEFBUTTON3 512 && Third button is default +#DEFINE MB_SYSTEMMODAL 4096 && System Modal + +*-- MsgBox return values +#DEFINE IDOK 1 && OK button pressed +#DEFINE IDCANCEL 2 && Cancel button pressed +#DEFINE IDABORT 3 && Abort button pressed +#DEFINE IDRETRY 4 && Retry button pressed +#DEFINE IDIGNORE 5 && Ignore button pressed +#DEFINE IDYES 6 && Yes button pressed +#DEFINE IDNO 7 && No button pressed + + +*-- Low Level File Constants +#DEFINE F_READONLY 0 +#DEFINE F_WRITEONLY 1 +#DEFINE F_READWRITE 2 +#DEFINE F_READONLY_UNBUFF 10 +#DEFINE F_WRITEONLY_UNBUFF 11 +#DEFINE F_READWRITE_UNBUFF 12 + +*-- PRTINFO() Constants +*-- PRTINFO() Valid types to pass +#DEFINE PRT_ORIENTATION 1 +#DEFINE PRT_PAPERSIZE 2 +#DEFINE PRT_PAPERLENGTH 3 +#DEFINE PRT_PAPERWIDTH 4 +#DEFINE PRT_SCALE 5 +#DEFINE PRT_COPIES 6 +#DEFINE PRT_DEFASOURCE 7 +#DEFINE PRT_PRINTQUAL 8 +#DEFINE PRT_COLOR 9 +#DEFINE PRT_DUPLEX 10 +#DEFINE PRT_YRESOLUTION 11 +#DEFINE PRT_TTOPTION 12 +#DEFINE PRT_COLLATE 13 + +*--PRTINFO() Return types +*-- Paper sizes +#define PRTPAPER_LETTER 1 && Letter 8 1/2 x 11 in +#define PRTPAPER_LETTERSMALL 2 && Letter Small 8 1/2 x 11 in +#define PRTPAPER_TABLOID 3 && Tabloid 11 x 17 in +#define PRTPAPER_LEDGER 4 && Ledger 17 x 11 in +#define PRTPAPER_LEGAL 5 && Legal 8 1/2 x 14 in +#define PRTPAPER_STATEMENT 6 && Statement 5 1/2 x 8 1/2 in +#define PRTPAPER_EXECUTIVE 7 && Executive 7 1/4 x 10 1/2 in +#define PRTPAPER_A3 8 && A3 297 x 420 mm +#define PRTPAPER_A4 9 && A4 210 x 297 mm +#define PRTPAPER_A4SMALL 10 && A4 Small 210 x 297 mm +#define PRTPAPER_A5 11 && A5 148 x 210 mm +#define PRTPAPER_B4 12 && B4 250 x 354 +#define PRTPAPER_B5 13 && B5 182 x 257 mm +#define PRTPAPER_FOLIO 14 && Folio 8 1/2 x 13 in +#define PRTPAPER_QUARTO 15 && Quarto 215 x 275 mm +#define PRTPAPER_10X14 16 && 10x14 in +#define PRTPAPER_11X17 17 && 11x17 in +#define PRTPAPER_NOTE 18 && Note 8 1/2 x 11 in +#define PRTPAPER_ENV_9 19 && Envelope #9 3 7/8 x 8 7/8 +#define PRTPAPER_ENV_10 20 && Envelope #10 4 1/8 x 9 1/2 +#define PRTPAPER_ENV_11 21 && Envelope #11 4 1/2 x 10 3/8 +#define PRTPAPER_ENV_12 22 && Envelope #12 4 \276 x 11 +#define PRTPAPER_ENV_14 23 && Envelope #14 5 x 11 1/2 +#define PRTPAPER_CSHEET 24 && C size sheet +#define PRTPAPER_DSHEET 25 && D size sheet +#define PRTPAPER_ESHEET 26 && E size sheet +#define PRTPAPER_ENV_DL 27 && Envelope DL 110 x 220mm +#define PRTPAPER_ENV_C5 28 && Envelope C5 162 x 229 mm +#define PRTPAPER_ENV_C3 29 && Envelope C3 324 x 458 mm +#define PRTPAPER_ENV_C4 30 && Envelope C4 229 x 324 mm +#define PRTPAPER_ENV_C6 31 && Envelope C6 114 x 162 mm +#define PRTPAPER_ENV_C65 32 && Envelope C65 114 x 229 mm +#define PRTPAPER_ENV_B4 33 && Envelope B4 250 x 353 mm +#define PRTPAPER_ENV_B5 34 && Envelope B5 176 x 250 mm +#define PRTPAPER_ENV_B6 35 && Envelope B6 176 x 125 mm +#define PRTPAPER_ENV_ITALY 36 && Envelope 110 x 230 mm +#define PRTPAPER_ENV_MONARCH 37 && Envelope Monarch 3.875 x 7.5 in +#define PRTPAPER_ENV_PERSONAL 38 && 6 3/4 Envelope 3 5/8 x 6 1/2 in +#define PRTPAPER_FANFOLD_US 39 && US Std Fanfold 14 7/8 x 11 in +#define PRTPAPER_FANFOLD_STD_GERMAN 40 && German Std Fanfold 8 1/2 x 12 in +#define PRTPAPER_FANFOLD_LGL_GERMAN 41 && German Legal Fanfold 8 1/2 x 13 in + +*-- Paper bins +#define PRTBIN_UPPER 1 +#define PRTBIN_ONLYONE 1 +#define PRTBIN_LOWER 2 +#define PRTBIN_MIDDLE 3 +#define PRTBIN_MANUAL 4 +#define PRTBIN_ENVELOPE 5 +#define PRTBIN_ENVMANUAL 6 +#define PRTBIN_AUTO 7 +#define PRTBIN_TRACTOR 8 +#define PRTBIN_SMALLFMT 9 +#define PRTBIN_LARGEFMT 10 +#define PRTBIN_LARGECAPACITY 11 +#define PRTBIN_CASSETTE 14 +#define PRTBIN_AUTOSELECT 15 + +*-- Print qualities +#define PRTRES_DRAFT -1 +#define PRTRES_LOW -2 +#define PRTRES_MEDIUM -3 +#define PRTRES_HIGH -4 + +*-- Color printer +#define PRTCOLOR_MONOCHROME 1 +#define PRTCOLOR_COLOR 2 + +*-- Duplexing +#define PRTDUP_SIMPLEX 1 +#define PRTDUP_VERTICAL 2 +#define PRTDUP_HORIZONTAL 3 + +*-- True Type fonts +#define PRTTT_BITMAP 1 && Print True Type fonts as graphics +#define PRTTT_DOWNLOAD 2 && Download True Type fonts as soft fonts +#define PRTTT_SUBDEV 3 && Substitute device fonts for True Type + +*-- FontMetric() +#DEFINE TM_HEIGHT 1 +#DEFINE TM_ASCENT 2 +#DEFINE TM_DESCENT 3 +#DEFINE TM_INTERNALLEADING 4 +#DEFINE TM_EXTERNALLEADING 5 +#DEFINE TM_AVECHARWIDTH 6 +#DEFINE TM_MAXCHARWIDTH 7 +#DEFINE TM_WEIGHT 8 +#DEFINE TM_ITALIC 9 +#DEFINE TM_UNDERLINED 10 +#DEFINE TM_STRUCKOUT 11 +#DEFINE TM_FIRSTCHAR 12 +#DEFINE TM_LASTCHAR 13 +#DEFINE TM_DEFAULTCHAR 14 +#DEFINE TM_BREAKCHAR 15 +#DEFINE TM_PITCHANDFAMILY 16 +#DEFINE TM_CHARSET 17 +#DEFINE TM_OVERHANG 18 +#DEFINE TM_ASPECTX 19 +#DEFINE TM_ASPECTY 20 + +*-- Sysmetric() parameter values +#DEFINE SYSMETRIC_SCREENWIDTH 1 && Screen width +#DEFINE SYSMETRIC_SCREENHEIGHT 2 && Screen width +#DEFINE SYSMETRIC_SIZINGBORDERWIDTH 3 && Width of the sizing border around a resizable window +#DEFINE SYSMETRIC_SIZINGBORDERHEIGHT 4 && Height of the sizing border around a resizable window +#DEFINE SYSMETRIC_VSCROLLBARWIDTH 5 && Width of a vertical scroll bar +#DEFINE SYSMETRIC_VSCROLLBARHEIGHT 6 && Height of the arrow bitmap on a vertical scroll bar +#DEFINE SYSMETRIC_HSCROLLBARWIDTH 7 && Width of the arrow bitmap on a horizontal scroll bar +#DEFINE SYSMETRIC_HSCROLLBARHEIGHT 8 && Height of a horizontal scroll bar +#DEFINE SYSMETRIC_WINDOWTITLEHEIGHT 9 && Height of window title (caption) area +#DEFINE SYSMETRIC_WINDOWBORDERWIDTH 10 && Width of a window border +#DEFINE SYSMETRIC_WINDOWBORDERHEIGHT 11 && Height of a window border +#DEFINE SYSMETRIC_WINDOWFRAMEWIDTH 12 && Width of the frame around the perimeter of a window + && that has a caption but is not sizable +#DEFINE SYSMETRIC_WINDOWFRAMEHEIGHT 13 && Height of the frame around the perimeter of a window + && that has a caption but is not sizable +#DEFINE SYSMETRIC_THUMBBOXWIDTH 14 && Width of the thumb box in a horizontal scroll bar +#DEFINE SYSMETRIC_THUMBBOXHEIGHT 15 && Height of the thumb box in a vertical scroll bar +#DEFINE SYSMETRIC_ICONWIDTH 16 && Width of an icon +#DEFINE SYSMETRIC_ICONHEIGHT 17 && Height of an icon +#DEFINE SYSMETRIC_CURSORWIDTH 18 && Width of a cursor +#DEFINE SYSMETRIC_CURSORHEIGHT 19 && Height of a cursor +#DEFINE SYSMETRIC_MENUBAR 20 && Height of a single-line menu bar +#DEFINE SYSMETRIC_CLIENTWIDTH 21 && Width of the client area for a full-screen window +#DEFINE SYSMETRIC_CLIENTHEIGHT 22 && Height of the client area for a full-screen window +#DEFINE SYSMETRIC_KANJIWINHEIGHT 23 && Height of the Kanji window at the bottom of the screen in DBCS versions +#DEFINE SYSMETRIC_MINDRAGWIDTH 24 && Minimum tracking width of a window. (The user cannot drag the window frame to a size smaller than this) +#DEFINE SYSMETRIC_MINDRAGHEIGHT 25 && Minimum tracking height of a window. (The user cannot drag the window frame to a size smaller than this) +#DEFINE SYSMETRIC_MINWINDOWWIDTH 26 && Minimum width of a window +#DEFINE SYSMETRIC_MINWINDOWHEIGHT 27 && Minimum height of a window +#DEFINE SYSMETRIC_TITLEBARBUTTONWIDTH 28 && Width of a title bar button +#DEFINE SYSMETRIC_TITLEBARBUTTONHEIGHT 29 && Height of a title bar button +#DEFINE SYSMETRIC_MOUSEPRESENT 30 && Is mouse present? 1 => mouse is installed, 0 => no mouse is installed +#DEFINE SYSMETRIC_DEBUGVERSION 31 && Is this a debug version? 1 => debug version, 0 => retail version +#DEFINE SYSMETRIC_MOUSEBUTTONSWAP 32 && Are mouse buttons swapped? 1 => Yes, 0 => No +#DEFINE SYSMETRIC_HALFHEIGHTBUTTONWIDTH 33 && Width of a button in a half-height title bar +#DEFINE SYSMETRIC_HALFHEIGHTBUTTONHEIGHT 34 && Height of a button in a half-height title bar + +*-- Windows GetSysMetric() defines +#DEFINE SM_CXSCREEN 0 +#DEFINE SM_CYSCREEN 1 +#DEFINE SM_CXVSCROLL 2 +#DEFINE SM_CYHSCROLL 3 +#DEFINE SM_CYCAPTION 4 +#DEFINE SM_CXBORDER 5 +#DEFINE SM_CYBORDER 6 +#DEFINE SM_CXDLGFRAME 7 +#DEFINE SM_CYDLGFRAME 8 +#DEFINE SM_CYVTHUMB 9 +#DEFINE SM_CXHTHUMB 10 +#DEFINE SM_CXICON 11 +#DEFINE SM_CYICON 12 +#DEFINE SM_CXCURSOR 13 +#DEFINE SM_CYCURSOR 14 +#DEFINE SM_CYMENU 15 +#DEFINE SM_CXFULLSCREEN 16 +#DEFINE SM_CYFULLSCREEN 17 +#DEFINE SM_CYKANJIWINDOW 18 +#DEFINE SM_MOUSEPRESENT 19 +#DEFINE SM_CYVSCROLL 20 +#DEFINE SM_CXHSCROLL 21 +#DEFINE SM_DEBUG 22 +#DEFINE SM_SWAPBUTTON 23 +#DEFINE SM_RESERVED1 24 +#DEFINE SM_RESERVED2 25 +#DEFINE SM_RESERVED3 26 +#DEFINE SM_RESERVED4 27 +#DEFINE SM_CXMIN 28 +#DEFINE SM_CYMIN 29 +#DEFINE SM_CXSIZE 30 +#DEFINE SM_CYSIZE 31 +#DEFINE SM_CXFRAME 32 +#DEFINE SM_CYFRAME 33 +#DEFINE SM_CXMINTRACK 34 +#DEFINE SM_CYMINTRACK 35 +#DEFINE SM_CMETRICS 36 + +*-- Cursor buffering modes +#DEFINE DB_BUFOFF 1 +#DEFINE DB_BUFLOCKRECORD 2 +#DEFINE DB_BUFOPTRECORD 3 +#DEFINE DB_BUFLOCKTABLE 4 +#DEFINE DB_BUFOPTTABLE 5 + +*-- Update types for views/cursors +#DEFINE DB_UPDATE 1 +#DEFINE DB_DELETEINSERT 2 + +*-- WHERE clause types for views/cursors +#DEFINE DB_KEY 1 +#DEFINE DB_KEYANDUPDATABLE 2 +#DEFINE DB_KEYANDMODIFIED 3 +#DEFINE DB_KEYANDTIMESTAMP 4 + +*-- Remote connection login prompt options +#DEFINE DB_PROMPTCOMPLETE 1 +#DEFINE DB_PROMPTALWAYS 2 +#DEFINE DB_PROMPTNEVER 3 + +*-- Remote transaction modes +#DEFINE DB_TRANSAUTO 1 +#DEFINE DB_TRANSMANUAL 2 + +*-- Source Types for CursorGetProp() +#DEFINE DB_SRCLOCALVIEW 1 +#DEFINE DB_SRCREMOTEVIEW 2 +#DEFINE DB_SRCTABLE 3 + +*-- Language IDs. +* +* A language ID is a 16 bit value which is the combination of a +* primary language ID and a secondary language ID. The bits are +* allocated as follows: +* +* +-----------------------+-------------------------+ +* | Sublanguage ID | Primary Language ID | +* +-----------------------+-------------------------+ +* 15 10 9 0 bit +* +* +* The following three combinations of primary language ID and +* sublanguage ID have special semantics: +* +* Primary Language ID Sublanguage ID Result +* ------------------- --------------- ------------------------ +* LANG_NEUTRAL SUBLANG_NEUTRAL Language neutral +* LANG_NEUTRAL SUBLANG_DEFAULT User default language +* LANG_NEUTRAL SUBLANG_SYS_DEFAULT System default language +* + +* +* Primary language IDs. +* + +#DEFINE LANG_NEUTRAL 0x00 + +#DEFINE LANG_AFRIKAANS 0x36 +#DEFINE LANG_ALBANIAN 0x1c +#DEFINE LANG_ARABIC 0x01 +#DEFINE LANG_BASQUE 0x2d +#DEFINE LANG_BELARUSIAN 0x23 +#DEFINE LANG_BULGARIAN 0x02 +#DEFINE LANG_CATALAN 0x03 +#DEFINE LANG_CHINESE 0x04 +#DEFINE LANG_CROATIAN 0x1a +#DEFINE LANG_CZECH 0x05 +#DEFINE LANG_DANISH 0x06 +#DEFINE LANG_DUTCH 0x13 +#DEFINE LANG_ENGLISH 0x09 +#DEFINE LANG_ESTONIAN 0x25 +#DEFINE LANG_FAEROESE 0x38 +#DEFINE LANG_FARSI 0x29 +#DEFINE LANG_FINNISH 0x0b +#DEFINE LANG_FRENCH 0x0c +#DEFINE LANG_GERMAN 0x07 +#DEFINE LANG_GREEK 0x08 +#DEFINE LANG_HEBREW 0x0d +#DEFINE LANG_HUNGARIAN 0x0e +#DEFINE LANG_ICELANDIC 0x0f +#DEFINE LANG_INDONESIAN 0x21 +#DEFINE LANG_ITALIAN 0x10 +#DEFINE LANG_JAPANESE 0x11 +#DEFINE LANG_KOREAN 0x12 +#DEFINE LANG_LATVIAN 0x26 +#DEFINE LANG_LITHUANIAN 0x27 +#DEFINE LANG_NORWEGIAN 0x14 +#DEFINE LANG_POLISH 0x15 +#DEFINE LANG_PORTUGUESE 0x16 +#DEFINE LANG_ROMANIAN 0x18 +#DEFINE LANG_RUSSIAN 0x19 +#DEFINE LANG_SERBIAN 0x1a +#DEFINE LANG_SLOVAK 0x1b +#DEFINE LANG_SLOVENIAN 0x24 +#DEFINE LANG_SPANISH 0x0a +#DEFINE LANG_SWEDISH 0x1d +#DEFINE LANG_THAI 0x1e +#DEFINE LANG_TURKISH 0x1f +#DEFINE LANG_UKRAINIAN 0x22 +#DEFINE LANG_VIETNAMESE 0x2a + +* +* Sublanguage IDs. +* +* The name immediately following SUBLANG_ dictates which primary +* language ID that sublanguage ID can be combined with to form a +* valid language ID. +* + +#DEFINE SUBLANG_NEUTRAL 0x0000 && language neutral +#DEFINE SUBLANG_DEFAULT 0x0400 && user default +#DEFINE SUBLANG_SYS_DEFAULT 0x0800 && system default + +#DEFINE SUBLANG_ARABIC_SAUDI_ARABIA 0x0400 && Arabic (Saudi Arabia) +#DEFINE SUBLANG_ARABIC_IRAQ 0x0800 && Arabic (Iraq) +#DEFINE SUBLANG_ARABIC_EGYPT 0x0C00 && Arabic (Egypt) +#DEFINE SUBLANG_ARABIC_LIBYA 0x1000 && Arabic (Libya) +#DEFINE SUBLANG_ARABIC_ALGERIA 0x1400 && Arabic (Algeria) +#DEFINE SUBLANG_ARABIC_MOROCCO 0x1800 && Arabic (Morocco) +#DEFINE SUBLANG_ARABIC_TUNISIA 0x1C00 && Arabic (Tunisia) +#DEFINE SUBLANG_ARABIC_OMAN 0x2000 && Arabic (Oman) +#DEFINE SUBLANG_ARABIC_YEMEN 0x2400 && Arabic (Yemen) +#DEFINE SUBLANG_ARABIC_SYRIA 0x2800 && Arabic (Syria) +#DEFINE SUBLANG_ARABIC_JORDAN 0x2C00 && Arabic (Jordan) +#DEFINE SUBLANG_ARABIC_LEBANON 0x3000 && Arabic (Lebanon) +#DEFINE SUBLANG_ARABIC_KUWAIT 0x3400 && Arabic (Kuwait) +#DEFINE SUBLANG_ARABIC_UAE 0x3800 && Arabic (U.A.E) +#DEFINE SUBLANG_ARABIC_BAHRAIN 0x3C00 && Arabic (Bahrain) +#DEFINE SUBLANG_ARABIC_QATAR 0x4000 && Arabic (Qatar) +#DEFINE SUBLANG_CHINESE_TRADITIONAL 0x0400 && Chinese (Taiwan) +#DEFINE SUBLANG_CHINESE_SIMPLIFIED 0x0800 && Chinese (PR China) +#DEFINE SUBLANG_CHINESE_HONGKONG 0x0C00 && Chinese (Hong Kong S.A.R) +#DEFINE SUBLANG_CHINESE_SINGAPORE 0x1000 && Chinese (Singapore) +#DEFINE SUBLANG_DUTCH 0x0400 && Dutch +#DEFINE SUBLANG_DUTCH_BELGIAN 0x0800 && Dutch (Belgian) +#DEFINE SUBLANG_ENGLISH_US 0x0400 && English (USA) +#DEFINE SUBLANG_ENGLISH_UK 0x0800 && English (UK) +#DEFINE SUBLANG_ENGLISH_AUS 0x0C00 && English (Australian) +#DEFINE SUBLANG_ENGLISH_CAN 0x1000 && English (Canadian) +#DEFINE SUBLANG_ENGLISH_NZ 0x1400 && English (New Zealand) +#DEFINE SUBLANG_ENGLISH_EIRE 0x1800 && English (Irish) +#DEFINE SUBLANG_ENGLISH_SOUTH_AFRICA 0x1C00 && English (South Africa) +#DEFINE SUBLANG_ENGLISH_JAMAICA 0x2000 && English (Jamaica) +#DEFINE SUBLANG_ENGLISH_CARIBBEAN 0x2400 && English (Caribbean) +#DEFINE SUBLANG_ENGLISH_BELIZE 0x2800 && English (Belize) +#DEFINE SUBLANG_ENGLISH_TRINIDAD 0x2C00 && English (Trinidad) +#DEFINE SUBLANG_FRENCH 0x0400 && French +#DEFINE SUBLANG_FRENCH_BELGIAN 0x0800 && French (Belgian) +#DEFINE SUBLANG_FRENCH_CANADIAN 0x0C00 && French (Canadian) +#DEFINE SUBLANG_FRENCH_SWISS 0x1000 && French (Swiss) +#DEFINE SUBLANG_FRENCH_LUXEMBOURG 0x1400 && French (Luxembourg) +#DEFINE SUBLANG_GERMAN 0x0400 && German +#DEFINE SUBLANG_GERMAN_SWISS 0x0800 && German (Swiss) +#DEFINE SUBLANG_GERMAN_AUSTRIAN 0x0C00 && German (Austrian) +#DEFINE SUBLANG_GERMAN_LUXEMBOURG 0x1000 && German (Luxembourg) +#DEFINE SUBLANG_GERMAN_LIECHTENSTEIN 0x1400 && German (Liechtenstein) +#DEFINE SUBLANG_ITALIAN 0x0400 && Italian +#DEFINE SUBLANG_ITALIAN_SWISS 0x0800 && Italian (Swiss) +#DEFINE SUBLANG_KOREAN 0x0400 && Korean (Extended Wansung) +#DEFINE SUBLANG_KOREAN_JOHAB 0x0800 && Korean (Johab) +#DEFINE SUBLANG_NORWEGIAN_BOKMAL 0x0400 && Norwegian (Bokmal) +#DEFINE SUBLANG_NORWEGIAN_NYNORSK 0x0800 && Norwegian (Nynorsk) +#DEFINE SUBLANG_PORTUGUESE 0x0800 && Portuguese +#DEFINE SUBLANG_PORTUGUESE_BRAZILIAN 0x0400 && Portuguese (Brazilian) +#DEFINE SUBLANG_SERBIAN_LATIN 0x0800 && Serbian (Latin) +#DEFINE SUBLANG_SERBIAN_CYRILLIC 0x0C00 && Serbian (Cyrillic) +#DEFINE SUBLANG_SPANISH 0x0400 && Spanish (Castilian) +#DEFINE SUBLANG_SPANISH_MEXICAN 0x0800 && Spanish (Mexican) +#DEFINE SUBLANG_SPANISH_MODERN 0x0C00 && Spanish (Modern) +#DEFINE SUBLANG_SPANISH_GUATEMALA 0x1000 && Spanish (Guatemala) +#DEFINE SUBLANG_SPANISH_COSTA_RICA 0x1400 && Spanish (Costa Rica) +#DEFINE SUBLANG_SPANISH_PANAMA 0x1800 && Spanish (Panama) +#DEFINE SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x1C00 && Spanish (Dominican Republic) +#DEFINE SUBLANG_SPANISH_VENEZUELA 0x2000 && Spanish (Venezuela) +#DEFINE SUBLANG_SPANISH_COLOMBIA 0x2400 && Spanish (Colombia) +#DEFINE SUBLANG_SPANISH_PERU 0x2800 && Spanish (Peru) +#DEFINE SUBLANG_SPANISH_ARGENTINA 0x2C00 && Spanish (Argentina) +#DEFINE SUBLANG_SPANISH_ECUADOR 0x3000 && Spanish (Ecuador) +#DEFINE SUBLANG_SPANISH_CHILE 0x3400 && Spanish (Chile) +#DEFINE SUBLANG_SPANISH_URUGUAY 0x3800 && Spanish (Uruguay) +#DEFINE SUBLANG_SPANISH_PARAGUAY 0x3C00 && Spanish (Paraguay) +#DEFINE SUBLANG_SPANISH_BOLIVIA 0x4000 && Spanish (Bolivia) +#DEFINE SUBLANG_SPANISH_EL_SALVADOR 0x4400 && Spanish (El Salvador) +#DEFINE SUBLANG_SPANISH_HONDURAS 0x4800 && Spanish (Honduras) +#DEFINE SUBLANG_SPANISH_NICARAGUA 0x4C00 && Spanish (Nicaragua) +#DEFINE SUBLANG_SPANISH_PUERTO_RICO 0x5000 && Spanish (Puerto Rico) +#DEFINE SUBLANG_SWEDISH 0x0400 && Swedish +#DEFINE SUBLANG_SWEDISH_FINLAND 0x0800 && Swedish (Finland) + +*-- DBC Events constants +#DEFINE DBCEVENTS_NULLTYPE 0 +#DEFINE DBCEVENTS_DATABASE 1 +#DEFINE DBCEVENTS_TABLE 2 +#DEFINE DBCEVENTS_COLUMN 3 +#DEFINE DBCEVENTS_INDEX 4 +#DEFINE DBCEVENTS_TAG 4 +#DEFINE DBCEVENTS_RELATION 5 +#DEFINE DBCEVENTS_CONNECTION 6 +#DEFINE DBCEVENTS_VIEW 7 +#DEFINE DBCEVENTS_LASTTYPE 8 +#DEFINE DBCEVENTS_STPROCS 9 + +*-- AFields() Constants +#define AFIELDS_NAME 1 +#define AFIELDS_TYPE 2 +#define AFIELDS_WIDTH 3 +#define AFIELDS_PRECISION 4 +#define AFIELDS_NULL 5 +#define AFIELDS_CODEPAGE_XLATE 6 +#define AFIELDS_VALID_EXPRESSION 7 +#define AFIELDS_VALID_TEXT 8 +#define AFIELDS_DEFAULT 9 +#define AFIELDS_TABLE_VALID_EXPRESSION 10 +#define AFIELDS_TABLE_VALID_TEXT 11 +#define AFIELDS_TABLE_LONG_NAME 12 +#define AFIELDS_INSERT_TRIGGER 13 +#define AFIELDS_UPDATE_TRIGGER 14 +#define AFIELDS_DELETE_TRIGGER 15 +#define AFIELDS_TABLE_COMMENT 16 +#define AFIELDS_AUTOINC_NEXT_VALUE 17 +#define AFIELDS_AUTOINC_STEP 18 + +* UCS Transformation Format byte order marks. +#DEFINE ENCODE_UTF16 CHR(0xFF) + CHR(0xFE) +#DEFINE ENCODE_UTF8 "" + +* COM_Attrib flag settings for Type Library attributes support +#DEFINE COMATTRIB_RESTRICTED 0x1 && The property/method should not be accessible from macro languages. +#DEFINE COMATTRIB_HIDDEN 0x40 && The property/method should not be displayed to the user, although it exists and is bindable. +#DEFINE COMATTRIB_NONBROWSABLE 0x400 && The property/method appears in an object browser, but not in a properties browser. +#DEFINE COMATTRIB_READONLY 0x100000 && The property is read-only (applies only to Properties). +#DEFINE COMATTRIB_WRITEONLY 0x200000 && The property is write-only (applies only to Properties). diff --git a/Initializari/euro500t.txt b/Initializari/euro500t.txt new file mode 100644 index 0000000..ac80fb6 --- /dev/null +++ b/Initializari/euro500t.txt @@ -0,0 +1,5 @@ + /t /RO /com: /speed:38400 /ecr:10 /data_file: + + +[/com:n] [/speed:nnnn] [/ecr:nn] [/num:nn] [/o:nnn] [/start:nnn] [/len:nnn] [/cfg:ssssss] [/tel:ttttttt] +[/data_file:file] [/cfg_file:file] [/err_file:file] [/run_file :f ile] [/drm:drm] [/online_wait:time] diff --git a/Initializari/euro500t.txt.tmpl b/Initializari/euro500t.txt.tmpl new file mode 100644 index 0000000..ac80fb6 --- /dev/null +++ b/Initializari/euro500t.txt.tmpl @@ -0,0 +1,5 @@ + /t /RO /com: /speed:38400 /ecr:10 /data_file: + + +[/com:n] [/speed:nnnn] [/ecr:nn] [/num:nn] [/o:nnn] [/start:nnn] [/len:nnn] [/cfg:ssssss] [/tel:ttttttt] +[/data_file:file] [/cfg_file:file] [/err_file:file] [/run_file :f ile] [/drm:drm] [/online_wait:time] diff --git a/Initializari/euro500t_erori.xml b/Initializari/euro500t_erori.xml new file mode 100644 index 0000000..4af1109 --- /dev/null +++ b/Initializari/euro500t_erori.xml @@ -0,0 +1,134 @@ + + +1 +Communication error +Eroare de comunicare + + + +3 +Not finished sale in ECR, firstly finish the sale! +Vanzare neterminata in ECR!Terminati mai intai vanzarea! + + + +4 +Tax assignment out of range, or not active tax! +Cota de tva inexistenta sau inactiva! + + + +5 +DPT assignment out of range +Departament inexistent! + + + +6 +Sale unit out of range! + + + + +7 +Quantity out of range + + + + +8 +Price out of range + + + + +9 +Forbidden Online in particular mode! + + + + +10 +Command out of range or 2 times called command "3" or "4"! + + + + +11 +PLU number out of range + + + + +12 +Text out of character set + + + + +13 +Payment value out of range + + + + +14 +Payment type out of range + + + + +15 +Currency out of range! + + + + +16 +Sale command but sale no started! + + + + +30 +Number of serial port out of range! +Numarul portului serial nu este valid! + + + +31 +ECR number out of range +Numarul casei de marcat nu este valid! + + + +32 +Incorrect ECR type! +Tipul casei de marcat specificat in fisierul de configurare este incorect! + + + +33 +Incorrect communication speed in SETUP.DAT file +Viteza de comunicare specificata in fisierul de configurare este incorecta! + + + +34 +Error in ITEMS.TXT +Eroare in fisierul ITEMS.TXT! + + + +35 +Time-out error +Casa de marcat nu este deschisa sau nu este conectata la computer! + + + +36 +To open SETUP.DAT file impossible or do not exist +Eroare la deschiderea fisierului de configurare! + + + \ No newline at end of file diff --git a/Initializari/euro500t_erori.xml.tmpl b/Initializari/euro500t_erori.xml.tmpl new file mode 100644 index 0000000..4af1109 --- /dev/null +++ b/Initializari/euro500t_erori.xml.tmpl @@ -0,0 +1,134 @@ + + +1 +Communication error +Eroare de comunicare + + + +3 +Not finished sale in ECR, firstly finish the sale! +Vanzare neterminata in ECR!Terminati mai intai vanzarea! + + + +4 +Tax assignment out of range, or not active tax! +Cota de tva inexistenta sau inactiva! + + + +5 +DPT assignment out of range +Departament inexistent! + + + +6 +Sale unit out of range! + + + + +7 +Quantity out of range + + + + +8 +Price out of range + + + + +9 +Forbidden Online in particular mode! + + + + +10 +Command out of range or 2 times called command "3" or "4"! + + + + +11 +PLU number out of range + + + + +12 +Text out of character set + + + + +13 +Payment value out of range + + + + +14 +Payment type out of range + + + + +15 +Currency out of range! + + + + +16 +Sale command but sale no started! + + + + +30 +Number of serial port out of range! +Numarul portului serial nu este valid! + + + +31 +ECR number out of range +Numarul casei de marcat nu este valid! + + + +32 +Incorrect ECR type! +Tipul casei de marcat specificat in fisierul de configurare este incorect! + + + +33 +Incorrect communication speed in SETUP.DAT file +Viteza de comunicare specificata in fisierul de configurare este incorecta! + + + +34 +Error in ITEMS.TXT +Eroare in fisierul ITEMS.TXT! + + + +35 +Time-out error +Casa de marcat nu este deschisa sau nu este conectata la computer! + + + +36 +To open SETUP.DAT file impossible or do not exist +Eroare la deschiderea fisierului de configurare! + + + \ No newline at end of file diff --git a/Initializari/roagest_bon.xml b/Initializari/roagest_bon.xml new file mode 100644 index 0000000..28e815a --- /dev/null +++ b/Initializari/roagest_bon.xml @@ -0,0 +1,11 @@ + + + +\INITIALIZARI\ +1 +C:\EURO500\ +ONLINE.EXE +ITEMS.TXT +1 + + \ No newline at end of file diff --git a/Initializari/roagest_bon.xml.tmpl b/Initializari/roagest_bon.xml.tmpl new file mode 100644 index 0000000..28e815a --- /dev/null +++ b/Initializari/roagest_bon.xml.tmpl @@ -0,0 +1,11 @@ + + + +\INITIALIZARI\ +1 +C:\EURO500\ +ONLINE.EXE +ITEMS.TXT +1 + + \ No newline at end of file diff --git a/Initializari/roagest_mp500.xml b/Initializari/roagest_mp500.xml new file mode 100644 index 0000000..e17e957 --- /dev/null +++ b/Initializari/roagest_mp500.xml @@ -0,0 +1,11 @@ + + + +\INITIALIZARI\ +1 +C:\DATPRINT\ +DATPRINT.EXE +BON.INP +1 + + diff --git a/Initializari/roagest_mp500.xml.tmpl b/Initializari/roagest_mp500.xml.tmpl new file mode 100644 index 0000000..e17e957 --- /dev/null +++ b/Initializari/roagest_mp500.xml.tmpl @@ -0,0 +1,11 @@ + + + +\INITIALIZARI\ +1 +C:\DATPRINT\ +DATPRINT.EXE +BON.INP +1 + + diff --git a/Locale/Locale.DBF b/Locale/Locale.DBF new file mode 100644 index 0000000..87e60fb Binary files /dev/null and b/Locale/Locale.DBF differ diff --git a/Locale/Locale_back.CDX b/Locale/Locale_back.CDX new file mode 100644 index 0000000..f085856 Binary files /dev/null and b/Locale/Locale_back.CDX differ diff --git a/Locale/Locale_back.DBF b/Locale/Locale_back.DBF new file mode 100644 index 0000000..76289e1 Binary files /dev/null and b/Locale/Locale_back.DBF differ diff --git a/Locale/Locale_back.FPT b/Locale/Locale_back.FPT new file mode 100644 index 0000000..8effa46 Binary files /dev/null and b/Locale/Locale_back.FPT differ diff --git a/Locale/Locale_xref.CDX b/Locale/Locale_xref.CDX new file mode 100644 index 0000000..429cc6e Binary files /dev/null and b/Locale/Locale_xref.CDX differ diff --git a/Locale/locale.CDX b/Locale/locale.CDX new file mode 100644 index 0000000..094e1e1 Binary files /dev/null and b/Locale/locale.CDX differ diff --git a/Locale/locale.DCX b/Locale/locale.DCX new file mode 100644 index 0000000..74b10af Binary files /dev/null and b/Locale/locale.DCX differ diff --git a/Locale/locale.FPT b/Locale/locale.FPT new file mode 100644 index 0000000..6c4618b Binary files /dev/null and b/Locale/locale.FPT differ diff --git a/Locale/locale.dbc b/Locale/locale.dbc new file mode 100644 index 0000000..fc0f219 Binary files /dev/null and b/Locale/locale.dbc differ diff --git a/Locale/locale_lang.FPT b/Locale/locale_lang.FPT new file mode 100644 index 0000000..94aa1fd Binary files /dev/null and b/Locale/locale_lang.FPT differ diff --git a/Locale/locale_lang.cdx b/Locale/locale_lang.cdx new file mode 100644 index 0000000..1623f82 Binary files /dev/null and b/Locale/locale_lang.cdx differ diff --git a/Locale/locale_lang.dbf b/Locale/locale_lang.dbf new file mode 100644 index 0000000..2f4a179 Binary files /dev/null and b/Locale/locale_lang.dbf differ diff --git a/Locale/locale_source.CDX b/Locale/locale_source.CDX new file mode 100644 index 0000000..754b91f Binary files /dev/null and b/Locale/locale_source.CDX differ diff --git a/Locale/locale_source.DBF b/Locale/locale_source.DBF new file mode 100644 index 0000000..60ba760 Binary files /dev/null and b/Locale/locale_source.DBF differ diff --git a/Locale/locale_source.FPT b/Locale/locale_source.FPT new file mode 100644 index 0000000..697f721 Binary files /dev/null and b/Locale/locale_source.FPT differ diff --git a/Locale/locale_xref.DBF b/Locale/locale_xref.DBF new file mode 100644 index 0000000..16d75bc Binary files /dev/null and b/Locale/locale_xref.DBF differ diff --git a/Meniuri/achi3.MNT b/Meniuri/achi3.MNT new file mode 100644 index 0000000..260b447 Binary files /dev/null and b/Meniuri/achi3.MNT differ diff --git a/Meniuri/achi3.mnx b/Meniuri/achi3.mnx new file mode 100644 index 0000000..5488284 Binary files /dev/null and b/Meniuri/achi3.mnx differ diff --git a/Meniuri/achi4.MNT b/Meniuri/achi4.MNT new file mode 100644 index 0000000..9e308d1 Binary files /dev/null and b/Meniuri/achi4.MNT differ diff --git a/Meniuri/achi4.mnx b/Meniuri/achi4.mnx new file mode 100644 index 0000000..12fa13b Binary files /dev/null and b/Meniuri/achi4.mnx differ diff --git a/Meniuri/achi5.MNT b/Meniuri/achi5.MNT new file mode 100644 index 0000000..f4b0aaf Binary files /dev/null and b/Meniuri/achi5.MNT differ diff --git a/Meniuri/achi5.mnx b/Meniuri/achi5.mnx new file mode 100644 index 0000000..4ff2da6 Binary files /dev/null and b/Meniuri/achi5.mnx differ diff --git a/Meniuri/achi6.MNT b/Meniuri/achi6.MNT new file mode 100644 index 0000000..e864ee2 Binary files /dev/null and b/Meniuri/achi6.MNT differ diff --git a/Meniuri/achi6.mnx b/Meniuri/achi6.mnx new file mode 100644 index 0000000..68f8bf3 Binary files /dev/null and b/Meniuri/achi6.mnx differ diff --git a/Meniuri/achi_transfer.MNT b/Meniuri/achi_transfer.MNT new file mode 100644 index 0000000..4cc3729 Binary files /dev/null and b/Meniuri/achi_transfer.MNT differ diff --git a/Meniuri/achi_transfer.mnx b/Meniuri/achi_transfer.mnx new file mode 100644 index 0000000..ce8e09e Binary files /dev/null and b/Meniuri/achi_transfer.mnx differ diff --git a/Meniuri/calend.MNT b/Meniuri/calend.MNT new file mode 100644 index 0000000..40508a8 Binary files /dev/null and b/Meniuri/calend.MNT differ diff --git a/Meniuri/calend.mnx b/Meniuri/calend.mnx new file mode 100644 index 0000000..dd1974f Binary files /dev/null and b/Meniuri/calend.mnx differ diff --git a/Meniuri/casademarcat.MNT b/Meniuri/casademarcat.MNT new file mode 100644 index 0000000..edf9282 Binary files /dev/null and b/Meniuri/casademarcat.MNT differ diff --git a/Meniuri/casademarcat.mnx b/Meniuri/casademarcat.mnx new file mode 100644 index 0000000..ef0e122 Binary files /dev/null and b/Meniuri/casademarcat.mnx differ diff --git a/Meniuri/casamarcat.MNT b/Meniuri/casamarcat.MNT new file mode 100644 index 0000000..885f1b1 Binary files /dev/null and b/Meniuri/casamarcat.MNT differ diff --git a/Meniuri/casamarcat.mnx b/Meniuri/casamarcat.mnx new file mode 100644 index 0000000..f4f676b Binary files /dev/null and b/Meniuri/casamarcat.mnx differ diff --git a/Meniuri/config3.MNT b/Meniuri/config3.MNT new file mode 100644 index 0000000..c4d2560 Binary files /dev/null and b/Meniuri/config3.MNT differ diff --git a/Meniuri/config3.mnx b/Meniuri/config3.mnx new file mode 100644 index 0000000..aa2c771 Binary files /dev/null and b/Meniuri/config3.mnx differ diff --git a/Meniuri/config5.MNT b/Meniuri/config5.MNT new file mode 100644 index 0000000..20f4f96 Binary files /dev/null and b/Meniuri/config5.MNT differ diff --git a/Meniuri/config5.mnx b/Meniuri/config5.mnx new file mode 100644 index 0000000..82f25cf Binary files /dev/null and b/Meniuri/config5.mnx differ diff --git a/Meniuri/config6.MNT b/Meniuri/config6.MNT new file mode 100644 index 0000000..2b0ec4b Binary files /dev/null and b/Meniuri/config6.MNT differ diff --git a/Meniuri/config6.mnx b/Meniuri/config6.mnx new file mode 100644 index 0000000..bc3f2b2 Binary files /dev/null and b/Meniuri/config6.mnx differ diff --git a/Meniuri/consum1.MNT b/Meniuri/consum1.MNT new file mode 100644 index 0000000..a933f15 Binary files /dev/null and b/Meniuri/consum1.MNT differ diff --git a/Meniuri/consum1.mnx b/Meniuri/consum1.mnx new file mode 100644 index 0000000..caefebe Binary files /dev/null and b/Meniuri/consum1.mnx differ diff --git a/Meniuri/consum3.MNT b/Meniuri/consum3.MNT new file mode 100644 index 0000000..1b5bf6e Binary files /dev/null and b/Meniuri/consum3.MNT differ diff --git a/Meniuri/consum3.mnx b/Meniuri/consum3.mnx new file mode 100644 index 0000000..3cae168 Binary files /dev/null and b/Meniuri/consum3.mnx differ diff --git a/Meniuri/consum4.MNT b/Meniuri/consum4.MNT new file mode 100644 index 0000000..087c24f Binary files /dev/null and b/Meniuri/consum4.MNT differ diff --git a/Meniuri/consum4.mnx b/Meniuri/consum4.mnx new file mode 100644 index 0000000..86a731c Binary files /dev/null and b/Meniuri/consum4.mnx differ diff --git a/Meniuri/cont2000-1.MNT b/Meniuri/cont2000-1.MNT new file mode 100644 index 0000000..b5d42a5 Binary files /dev/null and b/Meniuri/cont2000-1.MNT differ diff --git a/Meniuri/cont2000-1.mnx b/Meniuri/cont2000-1.mnx new file mode 100644 index 0000000..e39e36f Binary files /dev/null and b/Meniuri/cont2000-1.mnx differ diff --git a/Meniuri/cont2000.MNT b/Meniuri/cont2000.MNT new file mode 100644 index 0000000..8697313 Binary files /dev/null and b/Meniuri/cont2000.MNT differ diff --git a/Meniuri/cont2000.mnx b/Meniuri/cont2000.mnx new file mode 100644 index 0000000..95f0a8b Binary files /dev/null and b/Meniuri/cont2000.mnx differ diff --git a/Meniuri/contorice.MNT b/Meniuri/contorice.MNT new file mode 100644 index 0000000..f06b757 Binary files /dev/null and b/Meniuri/contorice.MNT differ diff --git a/Meniuri/contorice.mnx b/Meniuri/contorice.mnx new file mode 100644 index 0000000..8d552a6 Binary files /dev/null and b/Meniuri/contorice.mnx differ diff --git a/Meniuri/editscurt.MNT b/Meniuri/editscurt.MNT new file mode 100644 index 0000000..e212d1b Binary files /dev/null and b/Meniuri/editscurt.MNT differ diff --git a/Meniuri/editscurt.mnx b/Meniuri/editscurt.mnx new file mode 100644 index 0000000..01eaafc Binary files /dev/null and b/Meniuri/editscurt.mnx differ diff --git a/Meniuri/furn.MNT b/Meniuri/furn.MNT new file mode 100644 index 0000000..25af47d Binary files /dev/null and b/Meniuri/furn.MNT differ diff --git a/Meniuri/furn.mnx b/Meniuri/furn.mnx new file mode 100644 index 0000000..3391119 Binary files /dev/null and b/Meniuri/furn.mnx differ diff --git a/Meniuri/list1.MNT b/Meniuri/list1.MNT new file mode 100644 index 0000000..5e870ba Binary files /dev/null and b/Meniuri/list1.MNT differ diff --git a/Meniuri/list1.mnx b/Meniuri/list1.mnx new file mode 100644 index 0000000..4758279 Binary files /dev/null and b/Meniuri/list1.mnx differ diff --git a/Meniuri/list3.MNT b/Meniuri/list3.MNT new file mode 100644 index 0000000..a8fcf09 Binary files /dev/null and b/Meniuri/list3.MNT differ diff --git a/Meniuri/list3.mnx b/Meniuri/list3.mnx new file mode 100644 index 0000000..d248054 Binary files /dev/null and b/Meniuri/list3.mnx differ diff --git a/Meniuri/list4.MNT b/Meniuri/list4.MNT new file mode 100644 index 0000000..1cfc775 Binary files /dev/null and b/Meniuri/list4.MNT differ diff --git a/Meniuri/list4.mnx b/Meniuri/list4.mnx new file mode 100644 index 0000000..ba4b466 Binary files /dev/null and b/Meniuri/list4.mnx differ diff --git a/Meniuri/list5.MNT b/Meniuri/list5.MNT new file mode 100644 index 0000000..c4c1855 Binary files /dev/null and b/Meniuri/list5.MNT differ diff --git a/Meniuri/list5.mnx b/Meniuri/list5.mnx new file mode 100644 index 0000000..bf7fbf1 Binary files /dev/null and b/Meniuri/list5.mnx differ diff --git a/Meniuri/list6.MNT b/Meniuri/list6.MNT new file mode 100644 index 0000000..87bb810 Binary files /dev/null and b/Meniuri/list6.MNT differ diff --git a/Meniuri/list6.mnx b/Meniuri/list6.mnx new file mode 100644 index 0000000..1e00ab2 Binary files /dev/null and b/Meniuri/list6.mnx differ diff --git a/Meniuri/listgen.MNT b/Meniuri/listgen.MNT new file mode 100644 index 0000000..eacc582 Binary files /dev/null and b/Meniuri/listgen.MNT differ diff --git a/Meniuri/listgen.mnx b/Meniuri/listgen.mnx new file mode 100644 index 0000000..777e7fc Binary files /dev/null and b/Meniuri/listgen.mnx differ diff --git a/Meniuri/marfaachi.MNT b/Meniuri/marfaachi.MNT new file mode 100644 index 0000000..ab0dfda Binary files /dev/null and b/Meniuri/marfaachi.MNT differ diff --git a/Meniuri/marfaachi.mnx b/Meniuri/marfaachi.mnx new file mode 100644 index 0000000..d5f9c96 Binary files /dev/null and b/Meniuri/marfaachi.mnx differ diff --git a/Meniuri/marfavanz.MNT b/Meniuri/marfavanz.MNT new file mode 100644 index 0000000..20a3ab2 Binary files /dev/null and b/Meniuri/marfavanz.MNT differ diff --git a/Meniuri/marfavanz.mnx b/Meniuri/marfavanz.mnx new file mode 100644 index 0000000..3b0ef58 Binary files /dev/null and b/Meniuri/marfavanz.mnx differ diff --git a/Meniuri/materiale.MNT b/Meniuri/materiale.MNT new file mode 100644 index 0000000..aecc6e0 Binary files /dev/null and b/Meniuri/materiale.MNT differ diff --git a/Meniuri/materiale.mnx b/Meniuri/materiale.mnx new file mode 100644 index 0000000..ae4bbce Binary files /dev/null and b/Meniuri/materiale.mnx differ diff --git a/Meniuri/obinvent.MNT b/Meniuri/obinvent.MNT new file mode 100644 index 0000000..7c5e7ef Binary files /dev/null and b/Meniuri/obinvent.MNT differ diff --git a/Meniuri/obinvent.mnx b/Meniuri/obinvent.mnx new file mode 100644 index 0000000..8424f34 Binary files /dev/null and b/Meniuri/obinvent.mnx differ diff --git a/Meniuri/produse.MNT b/Meniuri/produse.MNT new file mode 100644 index 0000000..5a180d5 Binary files /dev/null and b/Meniuri/produse.MNT differ diff --git a/Meniuri/produse.mnx b/Meniuri/produse.mnx new file mode 100644 index 0000000..76a81f7 Binary files /dev/null and b/Meniuri/produse.mnx differ diff --git a/Meniuri/rapoarte.MNT b/Meniuri/rapoarte.MNT new file mode 100644 index 0000000..4d87414 Binary files /dev/null and b/Meniuri/rapoarte.MNT differ diff --git a/Meniuri/rapoarte.mnx b/Meniuri/rapoarte.mnx new file mode 100644 index 0000000..9566d9e Binary files /dev/null and b/Meniuri/rapoarte.mnx differ diff --git a/Meniuri/roagest.mnt b/Meniuri/roagest.mnt new file mode 100644 index 0000000..d7d03d1 Binary files /dev/null and b/Meniuri/roagest.mnt differ diff --git a/Meniuri/roagest.mnx b/Meniuri/roagest.mnx new file mode 100644 index 0000000..dc4676a Binary files /dev/null and b/Meniuri/roagest.mnx differ diff --git a/Meniuri/rulaje.MNT b/Meniuri/rulaje.MNT new file mode 100644 index 0000000..dfdc335 Binary files /dev/null and b/Meniuri/rulaje.MNT differ diff --git a/Meniuri/rulaje.mnx b/Meniuri/rulaje.mnx new file mode 100644 index 0000000..9248530 Binary files /dev/null and b/Meniuri/rulaje.mnx differ diff --git a/Meniuri/stoc.MNT b/Meniuri/stoc.MNT new file mode 100644 index 0000000..1e161cc Binary files /dev/null and b/Meniuri/stoc.MNT differ diff --git a/Meniuri/stoc.mnx b/Meniuri/stoc.mnx new file mode 100644 index 0000000..2de8649 Binary files /dev/null and b/Meniuri/stoc.mnx differ diff --git a/Meniuri/transfer.MNT b/Meniuri/transfer.MNT new file mode 100644 index 0000000..ed5b0cc Binary files /dev/null and b/Meniuri/transfer.MNT differ diff --git a/Meniuri/transfer.mnx b/Meniuri/transfer.mnx new file mode 100644 index 0000000..278363d Binary files /dev/null and b/Meniuri/transfer.mnx differ diff --git a/Meniuri/transfer1.MNT b/Meniuri/transfer1.MNT new file mode 100644 index 0000000..7465a29 Binary files /dev/null and b/Meniuri/transfer1.MNT differ diff --git a/Meniuri/transfer1.mnx b/Meniuri/transfer1.mnx new file mode 100644 index 0000000..2b9ec1f Binary files /dev/null and b/Meniuri/transfer1.mnx differ diff --git a/Meniuri/transfer5.MNT b/Meniuri/transfer5.MNT new file mode 100644 index 0000000..44bc192 Binary files /dev/null and b/Meniuri/transfer5.MNT differ diff --git a/Meniuri/transfer5.mnx b/Meniuri/transfer5.mnx new file mode 100644 index 0000000..fd0730a Binary files /dev/null and b/Meniuri/transfer5.mnx differ diff --git a/Meniuri/transfer6.MNT b/Meniuri/transfer6.MNT new file mode 100644 index 0000000..903c84f Binary files /dev/null and b/Meniuri/transfer6.MNT differ diff --git a/Meniuri/transfer6.mnx b/Meniuri/transfer6.mnx new file mode 100644 index 0000000..0d83eea Binary files /dev/null and b/Meniuri/transfer6.mnx differ diff --git a/Meniuri/vanz2.MNT b/Meniuri/vanz2.MNT new file mode 100644 index 0000000..738dfea Binary files /dev/null and b/Meniuri/vanz2.MNT differ diff --git a/Meniuri/vanz2.mnx b/Meniuri/vanz2.mnx new file mode 100644 index 0000000..7d02ff9 Binary files /dev/null and b/Meniuri/vanz2.mnx differ diff --git a/Meniuri/vanz3.MNT b/Meniuri/vanz3.MNT new file mode 100644 index 0000000..4cfd85a Binary files /dev/null and b/Meniuri/vanz3.MNT differ diff --git a/Meniuri/vanz3.mnx b/Meniuri/vanz3.mnx new file mode 100644 index 0000000..e48cb48 Binary files /dev/null and b/Meniuri/vanz3.mnx differ diff --git a/Meniuri/vanz4.MNT b/Meniuri/vanz4.MNT new file mode 100644 index 0000000..e414cb6 Binary files /dev/null and b/Meniuri/vanz4.MNT differ diff --git a/Meniuri/vanz4.mnx b/Meniuri/vanz4.mnx new file mode 100644 index 0000000..c2ce8f6 Binary files /dev/null and b/Meniuri/vanz4.mnx differ diff --git a/Meniuri/vanz5.MNT b/Meniuri/vanz5.MNT new file mode 100644 index 0000000..aff054b Binary files /dev/null and b/Meniuri/vanz5.MNT differ diff --git a/Meniuri/vanz5.mnx b/Meniuri/vanz5.mnx new file mode 100644 index 0000000..c84c692 Binary files /dev/null and b/Meniuri/vanz5.mnx differ diff --git a/Meniuri/vanz6.MNT b/Meniuri/vanz6.MNT new file mode 100644 index 0000000..6995016 Binary files /dev/null and b/Meniuri/vanz6.MNT differ diff --git a/Meniuri/vanz6.mnx b/Meniuri/vanz6.mnx new file mode 100644 index 0000000..7d5d45d Binary files /dev/null and b/Meniuri/vanz6.mnx differ diff --git a/Meniuri/vizgen.MNT b/Meniuri/vizgen.MNT new file mode 100644 index 0000000..e78a424 Binary files /dev/null and b/Meniuri/vizgen.MNT differ diff --git a/Meniuri/vizgen.mnx b/Meniuri/vizgen.mnx new file mode 100644 index 0000000..1b8a30d Binary files /dev/null and b/Meniuri/vizgen.mnx differ diff --git a/Programe/actualizari.prg b/Programe/actualizari.prg new file mode 100644 index 0000000..d2002d5 --- /dev/null +++ b/Programe/actualizari.prg @@ -0,0 +1,21 @@ +*!* actualizari +PROCEDURE actualizare_stoc_072010 + LPARAMETERS tnPretvIdentic + + IF AMESSAGEBOX('Doriti sa actualizati stocul de marfa la pret de vanzare 19% la 24%?',4+32, _screen.Caption) <> 6 + RETURN + ENDIF + + LOCAL lnPretvIdentic + lnPretvIdentic = 0 + IF TYPE('tnPretvIdentic') = 'N' + lnPretvIdentic = IIF(INLIST(m.tnPretvIdentic,0,1), m.tnPretvIdentic, m.lnPretvIdentic) + ENDIF + lcSql = [begin actualizare_stoc_072010(] + ALLTRIM(STR(lnPretvIdentic)) + [); end;] + lnSucces = goExecutor.oExecute(lcSql) + IF lnSucces < 0 + AMESSAGEBOX(goExecutor.cEroare, 0+16, _screen.Caption) + ELSE + AMESSAGEBOX('Actualizarea s-a incheiat cu succes. Verificati notele contabile si stocul de marfa la pret de vanzare.',0+64, _screen.Caption) + ENDIF +ENDPROC \ No newline at end of file diff --git a/Programe/cont2000.prg b/Programe/cont2000.prg new file mode 100644 index 0000000..467f135 --- /dev/null +++ b/Programe/cont2000.prg @@ -0,0 +1,963 @@ +PARAMETERS tparam + +&&& cont2003 + +PUBLIC gcNumeProgram, gcAntet +LOCAL lchost, lcUserName, lcPassword, lnIdUtil, lnIdProgram, lcUserNameApp,lcPasswordApp +STORE '' TO lchost, lcUserName, lcPassword, lcUserNameApp,lcPasswordApp,gcAntet +STORE 0 TO lnIdUtil, lnIdProgram +gcNumeProgram = [ROAGEST] +_Screen.Icon=gcNumeProgram+[.ICO] +*_screen.Icon = 'D:\CONTAFIN_ORACLE\COMUN\GRAFICE\ICONITE\GESTIUNI.ICO' + + +IF !LIKE(gcNumeProgram + '*', UPPER(ALLTRIM(JUSTSTEM(SYS(16,0))))) + Messagebox("Nu puteti porni acest program!",0+16,"Atentie") + RETURN +ENDIF + +SET CENTURY ON +SET DELETED ON +SET DATE TO DMY +SET MARK TO '/' +SET EXCLUSIVE OFF +SET CPDIALOG OFF +SET TALK OFF +SET SAFETY OFF +SET ESCAPE OFF +SET EXACT ON +SET ANSI ON +SET CONSOLE OFF +SET NOTIFY OFF +SET SECONDS OFF +SET HOURS TO 24 +*SET NULLDISPLAY TO '*' +SET NULLDISPLAY TO '' +SET DECIMALS TO 4 +SET POINT TO '.' + +*!* SET REPORTBEHAVIOR 90 && sa se seteze inainte de raport + + +_SCREEN.WINDOWSTATE=2 +_SCREEN.VISIBLE=.T. + + + + +*VARIABILE_______ +LOCAL lcMainClassLib +LOCAL lcLastSetTalk,lcLastSetPath,lcLastSetClassLib,lcOnShutdown + +*VARIABILE__________________________________________________________________________ +DECLARE nror[65000] +DECLARE RTVA[22,2] +err1=.F. + +PUBLIC CRLF +STORE CHR(13) + CHR(10) TO CRLF +PUBLIC pcNl,pcAn +STORE "" TO pcNl,pcAn && se initializeaza in start00 + +PUBLIC pcTitlu ,pl_verificat +STORE "" TO pcTitlu +STORE .F. TO pl_verificat + +PUBLIC BUTON, 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,DIRGEN +PUBLIC pcapsocsub,pcapsocvar +pcapsocsub=0 +pcapsocvar=0 +m.nivel = 0 +PUBLIC a4 +a4=.T. +m.nrgrup=999 + +STORE .F. TO luna_inchisa,tlbr_INSTRum,tlbr_VIZ +STORE 1 TO BUTON,col_menu +STORE .T. TO PRIMADATA,luna_neplatita + +*-- Save and configure environment.*********************** + +lcLastSetTalk=SET("TALK") +SET TALK OFF +lcLastSetPath=SET("PATH") + +SET PATH TO ;DATE;INCLUDE;FERESTRE;GRAFICE;HELP;CLASE;MENIURI;PROGRAME;RAPOARTE;PROGS;LIBS; + PUSH MENU _MSYSMENU +lcLastSetClassLib=SET("CLASSLIB") +lcMainClassLib="clase\cont2000" + + + +*CLASE__________________________________________________________ +SET CLASSLIB TO (lcMainClassLib) ADDITIVE +SET CLASSLIB TO GESTIUNI ADDITIVE +SET CLASSLIB TO CAUT ADDITIVE +*SET CLASSLIB TO FERESTREBAZA ADDITIVE +*SET CLASSLIB TO CONT2000-1 ADDITIVE +*SET CLASSLIB TO CONT2000-2 ADDITIVE +*SET CLASSLIB TO CONT2000-3 ADDITIVE +SET CLASSLIB TO BAZA ADDITIVE +SET CLASSLIB TO comun ADDITIVE +*!* messagebox in romana - ar trebui bagat intr-o librarie de utilitati +*!* messagebox.vcx, functia amessagebox in oproceduri_comune, imagini mb_*.bmp, messagebox.h +SET CLASSLIB TO messagebox ADDITIVE +SET CLASSLIB TO registry ADDITIVE +SET CLASSLIB TO cauta_alfa_forms.vcx ADDITIVE + +&& CLASE ORACLE +SET CLASSLIB TO DECABAZA ADDITIVE +SET CLASSLIB TO onomenclatoare ADDITIVE +SET CLASSLIB TO stocuri.vcx ADDITIVE +SET CLASSLIB TO rulaje.vcx ADDITIVE +SET CLASSLIB TO ointroduceri ADDITIVE +SET CLASSLIB TO ointroduceri_web ADDITIVE +SET CLASSLIB TO ointroduceri_depozit ADDITIVE +SET CLASSLIB TO overificari ADDITIVE +SET CLASSLIB TO ferestre_oracle ADDITIVE +SET CLASSLIB TO ferestre_cere_date.vcx ADDITIVE +SET CLASSLIB TO configurare.vcx ADDITIVE +SET CLASSLIB TO serii_numere.vcx ADDITIVE +SET CLASSLIB TO omodificari.vcx ADDITIVE +SET CLASSLIB TO ocompensari.vcx ADDITIVE +SET CLASSLIB TO caut_ora ADDITIVE +SET CLASSLIB TO onote_contabile ADDITIVE +SET CLASSLIB TO otoolbar ADDITIVE +SET CLASSLIB TO bon_fisc ADDITIVE &&serii bonuri fiscale +SET CLASSLIB TO onom_articole ADDITIVE +SET CLASSLIB TO onom_retete ADDITIVE +Set Classlib To oinventar ADDITIVE + +SET CLASSLIB TO orapoarte ADDITIVE +SET CLASSLIB TO orapoarte_gestiuni ADDITIVE +SET CLASSLIB TO orapoarte_parametri ADDITIVE +SET CLASSLIB TO ONOM_CURS ADDITIVE + +SET CLASSLIB TO ctl32_statusbar_fals.vcx additive +SET CLASSLIB TO ctl32_common.vcx additive +SET CLASSLIB TO ctl32_structs.vcx additive +SET CLASSLIB TO ctl32_progressbar.vcx additive +SET CLASSLIB TO ctl32_balloontip.vcx additive +SET CLASSLIB TO ocriterii.vcx ADDITIVE +SET CLASSLIB TO oavize.vcx ADDITIVE + +*!* v 2.0.62 +Set Classlib To oschimbare_pret.vcx additive +&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& + +*PROCEDURI______________________________________________________ +SET PROCEDURE TO PROCEDURI +SET PROCEDURE TO acces_meniu additive +SET PROCEDURE TO cauta_alfa additive +*SET PROCEDURE TO totPROC ADDITIVE +*SET PROCEDURE TO refverif ADDITIVE +*SET PROCEDURE TO PROCMENIU ADDITIVE +*SET PROCEDURE TO TOTV ADDITIVE +SET PROCEDURE TO pmenu ADDITIVE +SET PROCEDURE TO proceduri_comune ADDITIVE +*SET PROCEDURE TO totv.prg ADDITIVE +SET PROCEDURE TO quitapp ADDITIVE +SET PROCEDURE TO init_program ADDITIVE +SET PROCEDURE TO oproceduri_listari.prg ADDITIVE +SET PROCEDURE TO oproceduri_configurare.prg ADDITIVE +SET PROCEDURE TO oproceduri_articole.prg ADDITIVE +SET PROCEDURE TO oproceduri_retete.prg ADDITIVE +SET PROCEDURE TO orapoarte.prg ADDITIVE +SET PROCEDURE TO mesaje ADDITIVE +SET PROCEDURE TO oserii_numere.prg ADDITIVE +SET PROCEDURE TO oexport.prg ADDITIVE +SET PROCEDURE TO wwConfig.prg ADDITIVE +SET PROCEDURE TO proceduri_rapoarte.prg additive +SET PROCEDURE TO OPROCEDURI_CURS.PRG ADDITIVE +Set procedure to orapoarte_dinamice.prg additive + +&& PROCEDURI ORACLE +SET PROCEDURE TO GENCURSOR.PRG ADDITIVE +SET PROCEDURE TO OPROCEDURI_COMUNE.PRG ADDITIVE +SET PROCEDURE TO OINIT_OPTIUNI.PRG ADDITIVE +SET PROCEDURE TO updateserver.prg ADDITIVE +SET PROCEDURE TO oinainte_de.prg ADDITIVE +SET PROCEDURE TO ooperatii_comune.prg ADDITIVE + +SET PROCEDURE TO Ocompensari.PRG ADDITIVE +SET PROCEDURE TO OPROCEDURI_aMS.PRG ADDITIVE +SET PROCEDURE TO oproceduri_rulaje additive +SET PROCEDURE TO oproceduri_stocuri additive +SET PROCEDURE TO OINTRODUCERI ADDITIVE +SET PROCEDURE TO oHeader.prg ADDITIVE +SET PROCEDURE TO proceduri_excel.PRG ADDITIVE +SET PROCEDURE TO onomenclatoare.PRG ADDITIVE +*!* SET PROCEDURE TO orapoarte.prg ADDITIVE +*!* SET PROCEDURE TO orap_trezorerie ADDITIVE +*!* SET PROCEDURE TO omeniu_initializari ADDITIVE +SET PROCEDURE TO osecurity ADDITIVE +SET PROCEDURE TO ocautare ADDITIVE +SET PROCEDURE TO orefaceri ADDITIVE +SET PROCEDURE TO ofacturare_comun.PRG ADDITIVE +SET PROCEDURE TO ofacturare_stoc.PRG ADDITIVE + +&& modificare 06.03 +&& casa de marcat +SET PROCEDURE TO oproceduri_casademarcat ADDITIVE +SET PROCEDURE TO oproceduri_casa_marcat_e500 ADDITIVE + +&& sfarsit modificare 06.03 +SET PROCEDURE TO oproceduri_casa_marcat_mp500 ADDITIVE +*!* 12.05.2006 +*!* marius mutu +SET PROCEDURE TO oproceduri_util.prg ADDITIVE +*!* + +*!* 16.06.2006 +*!* marius.mutu +SET PROCEDURE TO wwxmlhttp.prg ADDITIVE +SET PROCEDURE TO ini.prg ADDITIVE + +*!* 25.08.2006 +*!* marius.mutu +SET PROCEDURE TO odocumente.prg ADDITIVE + +*!* 28.05.2007 +*!* marius.mutu +SET PROCEDURE TO regex.prg ADDITIVE +SET PROCEDURE TO wwutils.prg ADDITIVE +SET PROCEDURE TO inchidere_k ADDITIVE + +*!* v 2.0.62 +Set procedure to oschimbare_pret.prg additive +&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& + +IF PCOUNT() = 1 AND TYPE('tparam') = 'C' + glParametri = .T. + PRIVATE laParametri + DECLARE LAPARAMETRI[1] + lcParam = ALLTRIM(tParam) + lnNr = lista2array(lcParam,@laParametri,";") + IF lnNr < 5 + aMESSAGEBOX('Numar incorect de parametri',0+16,'Eroare') + RETURN + ENDIF + lcHost = laParametri[1] + lcUserName = laParametri[2] + lcPassword = laParametri[3] + lnIdUtil = ROUND(VAL(laParametri[4]),0) + lnIdProgram = ROUND(VAL(laParametri[5]),0) +ELSE + glParametri = .F. + lcHost = 'JCSSERVER' + lcUserName = 'CONTAFIN_ORACLE' + lcPassword = '' + lnIdUtil = 0 + lnIdProgram = 0 + +ENDIF + +PUBLIC glVerificTabel && daca se verifica structura tabelelor in totv.prg +glVerificTabel=.T. + +PUBLIC glQuit +glQuit = .F. + +PUBLIC gnIdIstoric +gnIdIstoric = 0 + + +PUBLIC gcAppPath,gcAppName, gcTempPath, gcCaleServerDate, gcUserNameApp, gcPasswordApp +STORE '' TO gcUserNameApp, gcPasswordApp, gnNivelUtilizator, gnGrupUtilizator, gcAcces +PUBLIC gcSchemaPath +STORE '' TO gcSchemaPath +*!* 10.09.2007 +*!* marius.mutu +*!* folosesc shortpath ca sa pot instala in "c:\program files\..." +*!* gcAppPath = UPPER(ADDBS(JUSTPATH(SYS(16,0)))) && d:\contafin\cont2003\ +gcAppPath = ADDBS(ShortPath(GetAppStartPath())) && wwutils.prg +gcAppName = ALLT(UPPE(JUSTSTEM(SYS(16,0)))) && "cont2003" +Set Path To Addbs(Substr(gcAppPath,1,Rat([\],gcAppPath,2)))+[COMUNROA\] Additive && modificare v 2.0.80 + +gcAppPath = STRTRAN(gcAppPath, "\PROGRAME", "") + +gcUtilizatoriPath = gcAppPath + "UTILIZATORI\" + +_reportpreview = gcAppPath + "reportpreview.app" + +STORE "" TO gcTempPath, gcCaleServerDate + + + + + +*** DIRGEN +liat=RAT("\",gcAppPath,2) +DIRGEN=ADDBS(LEFT(gcAppPath,liat-1)) + +gcSecurityPath = DIRGEN + 'Security\' +gcSecurityFile = gcSecurityPath + 'ROA_SECURITY.TXT' + +CD &DIRGEN + +PRIVATE gcGeneralIniFile +gcGeneralIniFile = DIRGEN + "settings.ini" +IF !FILE(gcGeneralIniFile) + + TEXT TO lcSettings NOSHOW +[errors] +host= + ENDTEXT + + STRTOFILE(lcSettings, gcGeneralIniFile) +ENDIF + + +PRIVATE poLog,goLog && obiect pt logarea mesajelor sistemului +poLog = NEWOBJECT("Log_Mesaje","Log_Mesaje.prg") +goLog = poLog +*!* Locale +Set Classlib To locale Additive +Private gcLocalePath, goLocale, gcLocale +gcLocalePath = gcAppPath + "Locale\" +*!* lcLocaleDb = gcLocalePath + "locale.dbc" +*!* Open Database (m.lcLocaleDb) +*!* modificare ROAGEST v 2.0.107 +*!* goLocale=Newobject("Locale","Locale.vcx") +lcLanguage = getini(gcGeneralIniFile,"locale","lang") +llLocale= getini(gcGeneralIniFile,"locale","llocale") +*!* IF !EMPTY(m.llLocale) AND m.llLocale<>'0' +*!* goLocale.llocale=.T. +*!* ENDIF +*!* modificare ROAGEST v 2.0.107 ^ +If Empty(m.lcLanguage) + gcLocale = 'Romana' +Else + gcLocale = m.lcLanguage +Endif +*!* modificare ROAGEST v 2.0.107 +Local lcObjLocale +If gcLocale = 'Romana' + lcObjLocale = [Locale_dummy] +Else + lcObjLocale = [Locale] +Endif +goLocale=Newobject(lcObjLocale,"Locale.vcx") +If !Empty(m.llLocale) And m.llLocale<>'0' + goLocale.llocale=.T. +Endif +Release lcObjLocale +*!* modificare ROAGEST v 2.0.107 ^ +goLocale.locale = gcLocale +*!* Locale ^ + +IF verificari() + _SCREEN.VISIBLE=.T. + DO mesaj WITH "Se fac verificari programului","Va rugam reveniti" + glQuit= .T. + QUIT +ENDIF + +*!* IF !Debug_Start() +*!* lcParam=tparam +*!* WAIT WINDOW 'lcParam ' +lcParam +*!* IF EMPTY(tparam) OR (TYPE('tParam')='C' AND !verific_start(tparam,dirgen,gcAppName)) +*!* _SCREEN.VISIBLE=.T. +*!* DO mesaj WITH "Programul trebuie pornit doar din START","" +*!* QUIT +*!* ENDIF +*!* ENDIF + + + + + +PUBLIC tipar,SER_PERM,SER_PERI,VERSIUNE +STORE .F. TO SER_PERM,SER_PERI + + +***************************** VARIABILE ORACLE +PRIVATE goUtilizator +private gnHandle,gnidutil,GCCODFISCAL,GCADRESA,GCNUMEFIRMA,GCMONEDA,GNDIFZILE, gcUserNameApp, gcPasswordApp +PRIVATE gnButon && variabila pentru renunt si terminat +STORE 2 TO gnButon +STORE '' TO GCCODFISCAL,GCADRESA,GCNUMEFIRMA,GCMONEDA, gcUserNameApp, gcPasswordApp, gcNivelUtilizator, gcGrupUtilizator, gcAcces +gnHandle = -1 +gnidutil = 0 + +PRIVATE gcHost, gcUserName, gcPassword,gofundal, gnIdProgram, gnId_Prg_Owner +gnIdProgram = 0 +gnId_Prg_Owner = 0 +gofundal='' + +PRIVATE goFirma,gnIdFirma,gcFirma,gnAn,gnLuna && ,gnPA,gnPC +&& STORE 0 TO gnPA,gnPC && nr. de zecimale afisare, calcul +STORE null TO gofirma +STORE 0 TO gnIdFirma,gnAn,gnLuna +STORE '' TO gcFirma + +PRIVATE glUltimaLuna,glPrimaLuna, glLunaBuna,glLuna_neplatita,glLunaInchisa + +STORE .F. to glUltimaLuna,glPrimaLuna, glLunaBuna,glLuna_neplatita,glLunaInchisa + +***toolbar*** +PRIVATE otool,ohelp +STORE '' TO otool,ohelp +***toolbar*** + +PRIVATE gcS && schema firmei +STORE 'CONTAFIN' TO gcS + +IF TYPE('laparametri',1)="A" + IF ALEN(laParametri,1)=10 + gnAn = VAL(laParametri[7]) + gnLuna = VAL(laParametri[8]) &&lansare noua + gcS = laParametri[9] + gnIdFirma = VAL(laParametri[10]) + ENDIF +ENDIF + +PRIVATE gcCopyRight +gcCopyRight = '© ROA Romfast SRL' + +&& modificare 06.03 +&& casa de marcat +PRIVATE glListareBonFiscal +STORE .F. TO glListareBonFiscal +&& sfarsit modificare 06.03 + +&& obiect global wrap pt sqlexec cu text eroare si succes +PRIVATE goExecutor,goConn,goExport +goExecutor = CREATEOBJECT("oExecutor") +goConn = CREATEOBJECT("oConn") +goExport = Createobject("oExportConfig") + +PRIVATE goMyXMLHTTP +lcHostErrors = getini(gcGeneralIniFile,'errors','host') +goMyXMLHTTP = CREATEOBJECT("MyXMLHTTP", lcHostErrors) + +&& obiect global pt luna aleasa din calendar +PRIVATE goCalendar +STORE null TO goCalendar + + +gcHost = lcHost +gcUserName = lcUserName +gcPassword = lcPassword +gcUserNameApp = lcUserNameApp +gcPasswordApp = lcPasswordApp +gnIdUtil = lnIdUtil +gnIdProgram = lnIdProgram + + +IF !glParametri + lnValid = getcrsSecurity(gcSecurityFile) + IF lnValid > 0 + IF USED('crsHost') + SELECT crsHost + GO top + gcHost = ALLTRIM(host) + gcUserName = ALLTRIM(schema) + gcPassword = ALLTRIM(pwd) + USE IN crsHost + ENDIF + ENDIF +ENDIF +***************************** VARIABILE ORACLE + +&& DECLARARE VARIABILE GLOBALE SPECIFICE APLICATIEI CARE NU SE AFLA IN OPTIUNI_FIRMA +&& (SE AFLA IN DIRECTORUL PROIECTULUI, NU IN COMUN) +*DO OVARIABILE_GLOBALE.PRG + + +USE &gcAppPath\SERCONT IN 0 ALIAS SER SHARED +SELECT SER +GO TOP +tipar=TIP +SER_PERM=SER_PERMAN +SER_PERI=SER_PERIOD +VERSIUNE=VERcont +MODEL_PROGRAM=MODEL +USE IN SER +parolamea=SUBSTR(tipar,MONTH(DATE()),1) +parolamea=parolamea+ALLT(STR(DAY(DATE())))+ALLT(STR(MONTH(DATE()))) + +IF !_DEBUG() + IF SER_PERM AND !verif_ser_perm() + QUIT + ENDIF +ENDIF + +PUBLIC NUMEPROGRAM,MENIUPROGRAM,FUNDALPROGRAM + + + + +m.contab = 'GESIUNI' +NUMEPROGRAM = 'ROA - Gestiuni' +MENIUPROGRAM = gcAppPath + "meniuri\contGEST.mpr" +FUNDALPROGRAM = gcAppPath + "FERESTRE\FUNDAL.scx" +_program='gest' + +*-- Configure application object.***************************** + +Local laVersion +Dimension laVersion(12) +If Agetfileversion(laVersion, Sys(16,0)) > 0 + NUMEPROGRAM = laVersion(10) +Endif +Release laVersion + + +lcOnShutdown="ShutDown()" +ON SHUTDOWN &lcOnShutdown +ON ERROR ErrorHandler(ERROR(),PROGRAM(),LINENO()) +_SHELL="DO Cleanup IN progs\cont2003" + +*-- Instantiate application object.*************************** +RELEASE goApp +PUBLIC goApp +goApp=CREATEOBJECT("cApplication") + +goApp.SetCaption(NUMEPROGRAM) +goApp.cStartupMenu=MENIUPROGRAM +*goApp.cStartupForm=FUNDALPROGRAM +goApp.cStartupForm = DIRGEN + "COMUN\ferestre\frm_login.scx" + +*-- Show application. +goApp.SHOW + + + +*-- Release application. +RELEASE goApp + +*-- Restore default menu. +POP MENU _MSYSMENU + +*-- Restore environment. +ON ERROR +ON SHUTDOWN +IF NOT lcLastSetClassLib==SET("classlib") + RELEASE CLASSLIB (lcMainClassLib) +ENDIF +IF EMPTY(lcLastSetPath) + SET PATH TO +ELSE + SET PATH TO &lcLastSetPath +ENDIF +IF lcLastSetTalk=="ON" + SET TALK ON +ELSE + SET TALK OFF +ENDIF + +RETURN + + + + +* FUNCTII______________________________________________________________________ +FUNCTION ErrorHandler(nError,cMethod,nLine) + LOCAL lcErrorMsg,lcCodeLineMsg + + WAIT CLEAR + lcErrorMsg=MESSAGE()+CHR(13)+CHR(13) + lcErrorMsg=lcErrorMsg+"Method: "+cMethod + lcCodeLineMsg=MESSAGE(1) + IF BETWEEN(nLine,1,10000) AND NOT lcCodeLineMsg="..." + lcErrorMsg=lcErrorMsg+CHR(13)+"Line: "+ALLTRIM(STR(nLine)) + IF NOT EMPTY(lcCodeLineMsg) + lcErrorMsg=lcErrorMsg+CHR(13)+CHR(13)+lcCodeLineMsg + ENDIF + ENDIF + + IF TYPE('goMyXMLHTTP') = 'O' + lcLunaHTTP = IIF(TYPE('gnLuna') = 'N', TRANSFORM(gnLuna) + "/","") + IIF(TYPE('GNAN') = 'N', TRANSFORM(gnAn),"") + lcErrorMsgHTTP = SYS(0) + ":" + IIF(TYPE('GCS')='C'," " + GCS,"") + ": " + lcLunaHTTP + CHR(13) +CHR(10) + lcErrorMsg + ; + CHR(13) +CHR(10) + CHR(13) + CHR(10) + GETCALLSTACK() + lcUserName = gcUserNameApp + lcProgram = JUSTSTEM(SYS(16,0)) + goMyXMLHTTP.postError(lcErrorMsgHTTP, lcUserName, lcProgram) + ENDIF + + IF _vfp.StartMode = 0 + DEBUG + SUSPEND + ENDIF + IF AMESSAGEBOX(lcErrorMsg,17,_SCREEN.CAPTION)#1 + ON ERROR + RETURN .F. + ENDIF +ENDFUNC + + + +FUNCTION SHUTDOWN + IF start_nou() + =End_Istoric(gnIdIstoric, ADDBS(DIRGEN)+"DATERETEA\", "START_ISTORIC") + ENDIF + IF TYPE("goApp")=="O" AND NOT ISNULL(goApp) + RETURN goApp.OnShutDown() + ENDIF + Cleanup() + QUIT +ENDFUNC + + +FUNCTION Cleanup + + IF CNTBAR("_msysmenu")=7 + RETURN + ENDIF + ON ERROR + ON SHUTDOWN + SET CLASSLIB TO + SET PATH TO + CLEAR ALL + CLOSE ALL + POP MENU _MSYSMENU + RETURN + + + + + +*----------------------------------------------------- + +FUNCTION verif_ser_perm + CLEAR + + RETURN PORNIRE() +******** +*?pornire() + +FUNCTION PORNIRE + SET EXACT ON + PRIVATE calewin,calesys,checksum1,checksum2,serinreg,serdisk,file1,file2,valret,serdisktemp,ser1,ser2,key1,KEY2 + STORE '' TO calewin,serinreg,serdisk,calesys,serdisktemp,catehd,ser1,ser2,key1,KEY2 + STORE 0 TO checksum1,checksum2 + STORE .T. TO valret + DECLARE INTEGER SHGetFolderPath IN SHFOLDER.DLL ; + INTEGER hwndOwner, ; + INTEGER nFolder, ; + INTEGER hToken, ; + INTEGER dwFlags, ; + STRING @ pszPath + DECLARE INTEGER GetActiveWindow IN WIN32API + #DEFINE CSIDL_WINDOWS 36 + #DEFINE CSIDL_SYSTEM 37 + #DEFINE CSIDL_PROGRAMS 38 + lcPath = REPL(CHR(0),261) + =SHGetFolderPath(GetActiveWindow(),CSIDL_WINDOWS,0,0,@lcPath) + calewin=LEFT(lcPath,AT(CHR(0),lcPath)-1) + lcPath = REPL(CHR(0),261) + =SHGetFolderPath(GetActiveWindow(),CSIDL_SYSTEM,0,0,@lcPath) + calesys=LEFT(lcPath,AT(CHR(0),lcPath)-1) +&&se verifica existenta celor trei fisiere + IF (NOT FILE(calesys+'\diskserial.dll')) OR (NOT FILE(calesys+'\getmacip.dll')) OR (NOT FILE(calewin+'\comdir.snr')) + valret=.F. + ENDIF + IF valret + file1=FILETOSTR(calesys+'\diskserial.dll') + checksum1=SYS(2007,file1) + file2=FILETOSTR(calesys+'\getmacip.dll') + checksum2=SYS(2007,file2) +&&severifica daca dll-urile nu au fost modificate + IF (VAL(checksum1) != 58755) OR (VAL(checksum2) != 30476) + valret=.F. + ENDIF + ENDIF +&&se citesc seriile tutturor celor patru hard disk-uri posibile(pe IDE primary master,primary slave...) +&&se tine minte primul cu seria nenula-daca nu s-a putut citi seria de la nici unul se pune o serie default +&&seria default este "NUAREHAR" + IF valret + DECLARE INTEGER GetSerialNumber IN diskSerial.DLL INTEGER ,STRING + catehd=0 + FOR i=0 TO 3 + serdisktemp=SPACE(40) + GetSerialNumber(i,@serdisktemp) + IF (LEN(ALLTRIM(serdisktemp))!=0) AND (catehd=0) + serdisktemp=sircaracter(serdisktemp) + serdisk=serdisktemp + catehd=catehd+1 + ENDIF + ENDFOR + IF (LEN(ALLTRIM(serdisk))=0) + serdisk='NUAREHAR' + ELSE + IF ((LEN(ALLTRIM(serdisk))>0) AND (LEN(ALLTRIM(serdisk))<8)) + serdisk=serdisk+REPLICATE('1',8-LEN(ALLTRIM(serdisk))) + ENDIF + ENDIF + serdisk=SUBSTR(ALLTRIM(serdisk),LEN(ALLTRIM(serdisk))-7,8) + ENDIF +&&se citeste din comdir.snr seria de inregistrare si se verifica egalitatea cu seria obtinuta anterior + IF valret + gnFileHandle = FOPEN(calewin+'\comdir.snr') + nSize = FSEEK(gnFileHandle, 0, 2) && Move pointer to EOF + IF nSize!=9 + valret=.F. + ELSE + = FSEEK(gnFileHandle, 0, 0) && Move pointer to BOF + cString = FREAD(gnFileHandle,9) + ser1=SUBSTR(cString,1,4) + ser2=SUBSTR(cString,5,4) + key1=SUBSTR(cString,9,1) + KEY2=DECTOBIN(ALLTRIM(HEXDEC(key1))) + serinreg=decodare1(ALLTRIM(UPPER(ser1)),KEY2)+decodare1(ALLTRIM(UPPER(ser2)),KEY2) + IF serdisk!=serinreg + valret=.F. + ENDIF + ENDIF + = FCLOSE(gnFileHandle) + ENDIF + seriedisk1=serdisk + serieinreg1=serinreg + ON ERROR valret=.F. + RETURN valret +************* +FUNCTION decodare1 + PARAMETERS lstring,CHEIE + LOCAL lens,poz1,poz2,POZ3,lret,LRET2,lcstring,val1,lret1 + lret='' + lret1='' + LRET2='' + lcstring=ALLTRIM(UPPER(lstring)) + lens=LEN(lcstring) + FOR i=1 TO 4 + poz1=SUBSTR(lcstring,i,1) + val1=ASC(poz1) + POZ3=SUBSTR(CHEIE,i,1) + DO CASE + CASE val1>=48 AND val1<=57 + IF ((val1-47)+INT(VAL(POZ3)))<=10 + poz2=CHR(val1+INT(VAL(POZ3))) + ELSE + poz2=CHR(val1+INT(VAL(POZ3))-10) + ENDIF + CASE val1>=65 AND val1<=90 + IF ((val1-64)+2*INT(VAL(POZ3)))<=26 + poz2=CHR(val1+2*INT(VAL(POZ3))) + ELSE + poz2=CHR(val1+2*INT(VAL(POZ3))-26) + ENDIF + ENDCASE + LRET2=LRET2+poz2 + ENDFOR + FOR i=1 TO lens + poz1=SUBSTR(LRET2,i,1) + val1=ASC(poz1) + DO CASE + CASE val1>=48 AND val1<=57 + IF ((val1-47)+i)<=10 + poz2=CHR(val1+i) + ELSE + poz2=CHR(val1+i-10) + ENDIF + CASE val1>=65 AND val1<=90 + IF ((val1-64)+2*i)<=26 + poz2=CHR(val1+2*i) + ELSE + poz2=CHR(val1+2*i-26) + ENDIF + ENDCASE + lret=lret+poz2 + ENDFOR + lens=LEN(lret) + FOR i=1 TO lens + poz1=SUBSTR(lret,i,1) + val1=ASC(poz1) + DO CASE + CASE val1>=48 AND val1<=57 + poz2=CHR(val1+17)&& din 0-9 in A-J + CASE val1>=65 AND val1<=74 + poz2=CHR(val1-17)&& din A-J in 0-9 + CASE val1>=75 AND val1<=82 + poz2=CHR(val1+8)&&din K-R in S-Z + CASE val1>=83 AND val1<=90 + poz2=CHR(val1-8)&&din S-Z in K-R + ENDCASE + lret1=lret1+poz2 + ENDFOR + RETURN lret1 +*********** +&&transformarea in decimal a unui caracter hexa +FUNCTION HEXDEC + LPARAMETERS LC + LOCAL LV + DO CASE + CASE LC=='0' + LV='0' + CASE LC=='1' + LV='1' + CASE LC=='2' + LV='2' + CASE LC=='3' + LV='3' + CASE LC=='4' + LV='4' + CASE LC=='5' + LV='5' + CASE LC=='6' + LV='6' + CASE LC=='7' + LV='7' + CASE LC=='8' + LV='8' + CASE LC=='9' + LV='9' + CASE LC=='A' + LV='10' + CASE LC=='B' + LV='11' + CASE LC=='C' + LV='12' + CASE LC=='D' + LV='13' + CASE LC=='E' + LV='14' + CASE LC=='F' + LV='15' + ENDCASE + RETURN LV +**************** +&&codarea binara din hexa pe patru biti +FUNCTION DECTOBIN + PARAMETERS sc + LOCAL lretf + DO CASE + CASE sc=='0' + lretf='0000' + CASE sc=='1' + lretf='0001' + CASE sc=='2' + lretf='0010' + CASE sc=='3' + lretf='0011' + CASE sc=='4' + lretf='0100' + CASE sc=='5' + lretf='0101' + CASE sc=='6' + lretf='0110' + CASE sc=='7' + lretf='0111' + CASE sc=='8' + lretf='1000' + CASE sc=='9' + lretf='1001' + CASE sc=='10' + lretf='1010' + CASE sc=='11' + lretf='1011' + CASE sc=='12' + lretf='1100' + CASE sc=='13' + lretf='1101' + CASE sc=='14' + lretf='1110' + CASE sc=='15' + lretf='1111' + ENDCASE + RETURN lretf +*********** +FUNCTION ECARACTER + PARAMETERS strg1 + PRIVATE pz,ch,lcstring,vret,lg1 + STORE 0 TO pz,lg1 + STORE '' TO ch,lcstring + STORE .T. TO vret + lcstring=UPPER(strg1) + lg1=LEN(lcstring) + FOR ind1=1 TO lg1 + ch=SUBSTR(lcstring,ind1,1) + IF (NOT BETWEEN(ASC(ch),48,57)) AND (NOT BETWEEN(ASC(ch),65,90)) + vret=.F. + EXIT + ENDIF + ENDFOR + RETURN vret +************ +FUNCTION sircaracter + PARAMETERS strg1 + PRIVATE pz,ch,lcstring,vret,lg1,lciesire + STORE 0 TO pz,lg1 + STORE '' TO ch,lcstring,lciesire + STORE .T. TO vret + strg1=STRTRAN(strg1,ALLTRIM(CHR(39)),'')&&caracterul ' + strg1=STRTRAN(strg1,ALLTRIM(CHR(39)),'')&&caracterul " + lcstring=UPPER(ALLTRIM(strg1)) + lg1=LEN(lcstring) + FOR ind1=1 TO lg1 + ch=SUBSTR(lcstring,ind1,1) + IF BETWEEN(ASC(ch),48,57) OR BETWEEN(ASC(ch),65,90) + lciesire=lciesire+ch + ENDIF + ENDFOR + RETURN lciesire + + + +***------------------------------------- +PROCEDURE _DEBUG + + RETURN .T. + + PRIVATE lcret,lcfisier,lcPath,lccalewin + DECLARE INTEGER SHGetFolderPath IN SHFOLDER.DLL ; + INTEGER hwndOwner, ; + INTEGER nFolder, ; + INTEGER hToken, ; + INTEGER dwFlags, ; + STRING @ pszPath + DECLARE INTEGER GetActiveWindow IN WIN32API + #DEFINE CSIDL_WINDOWS 36 + + + lcPath = REPL(CHR(0),261) + =SHGetFolderPath(GetActiveWindow(),CSIDL_WINDOWS,0,0,@lcPath) + lccalewin=LEFT(lcPath,AT(CHR(0),lcPath)-1) + + lcret=.F. + lcfisier=ADDBS(lccalewin)+[DEBUG.TXT] + + IF FILE(lcfisier) + LCVAL=FILETOSTR(lcfisier) + + LNVAL1=MOD(VAL(RIGHT(LCVAL,1)),2) && restul 1 sau 0; daca e impar e 1 + lnval2=VAL(LEFT(LCVAL,LEN(LCVAL)-1)) + IF LNVAL1=1 OR YEAR(DATE())-MONTH(DATE())=lnval2 + lcret=.T. + ENDIF + ENDIF + RETURN lcret + +ENDPROC + + +FUNCTION Start_Nou + + RETURN Exista_Branch(,,dirgen) + +ENDFUNC && start_nou + +PROCEDURE Debug_Start + + lcFile = gcAppPath + "debug.txt" + + IF FILE(lcFile) &&OR !Start_Nou() + RETURN .T. + ENDIF + RETURN .F. + +ENDPROC && Debug_Start +************************************************************************ +PROCEDURE verificari +PARAMETERS tcFisierVerif + +lcverificari = ADDBS(gcAppPath)+gcAppName+".txt" + + +IF FILE(lcverificari) + RETURN .T. +ENDIF +RETURN .F. + +ENDPROC && verificari \ No newline at end of file diff --git a/Programe/cumplun-furn.prg b/Programe/cumplun-furn.prg new file mode 100644 index 0000000..a08b500 --- /dev/null +++ b/Programe/cumplun-furn.prg @@ -0,0 +1,26 @@ +set deleted on +sele cumplun +*dele all +set order to tag nume +sele furnizor +DELE ALL +set order to tag nume + + + + +SELE DISTINCT ALLT(NUME) AS NUME,COD_FISCAL FROM CUMPLUN INTO CURSOR TT +SELE FURNIZOR +APPE FROM DBF('TT') +USE IN TT + +sele furnizor +scan + scat memv + sele cumplun + sum achitat to m.platit for ALLT(nume)=ALLT(m.nume) + sum totctva to m.achizit for ALLT(nume)=ALLT(m.nume) + sele furnizor + gath memv +endscan + diff --git a/Programe/exportare.prg b/Programe/exportare.prg new file mode 100644 index 0000000..9326ca5 --- /dev/null +++ b/Programe/exportare.prg @@ -0,0 +1,127 @@ +LPARAMETERS tabel, initial, final +LOCAL nrc, i, c +STORE 0 TO nrc, i +STORE '' TO c + +A='C:\MY DOCUMENTS' +B='C:\DOCUMENTS AND SETTINGS' +DO CASE +CASE DIRECTORY('&A') + SET DEFAULT TO '&A' +CASE DIRECTORY('&B') + SET DEFAULT TO '&B' +OTHERWISE + MD &A + SET DEFAULT TO '&A' +ENDCASE + + +exista_excel=.F. + +initial = ','+initial+',' &&Pentru a recunoste coloanele' +final = ','+final+',' &&---||--- + +nrc = OCCURS(',', '&initial') +nrc=nrc-1 && scade vircula din fata + +LOCAL ARRAY c_initial(nrc) +LOCAL ARRAY c_final(nrc) + +FOR i = 1 TO nrc + n = AT(',', '&initial', i) + n2 =AT(',', '&initial', i+1) + c_Initial[i] = SUBSTR('&initial', n+1, n2-n-1) + *MESSAGEBOX(c_initial[i]) + n = AT(',', '&final', i) + n2 =AT(',', '&final', i+1) + c_final[i] = SUBSTR('&final', n+1, n2-n-1) + *MESSAGEBOX(c_final[i]) +ENDFOR + +FOR i=1 TO nrc + IF i=nrc + c=c+c_initial[i]+' as '+c_final[i] + ELSE + c=c+c_initial[i]+' as '+c_final[i]+',' + ENDIF +ENDFOR + +calea_fis = PUTFILE('Nume fisier:', 'Foaie_Excel', 'XLS') +IF EMPTY(calea_fis) && Esc pressed + RETURN +ENDIF + +SELECT &c FROM &tabel INTO CURSOR cur +SELECT cur +EXPORT TO (calea_fis) TYPE XL5 + +SET DEFAULT TO &DIRGEN +RETURN + + + + +PROCEDURE EXPORTARE2 +LPARAMETERS tabel +*, initial, final +LOCAL nrc, i, c +STORE 0 TO nrc, i +STORE '' TO c + +A='C:\MY DOCUMENTS' +B='C:\DOCUMENTS AND SETTINGS' +DO CASE +CASE DIRECTORY('&A') + SET DEFAULT TO '&A' +CASE DIRECTORY('&B') + SET DEFAULT TO '&B' +OTHERWISE + MD &A + SET DEFAULT TO '&A' +ENDCASE + + +*!* exista_excel=.F. + +*!* initial = ','+initial+',' &&Pentru a recunoste coloanele' +*!* final = ','+final+',' &&---||--- + +*!* nrc = OCCURS(',', '&initial') +*!* nrc=nrc-1 && scade vircula din fata + +*!* LOCAL ARRAY c_initial(nrc) +*!* LOCAL ARRAY c_final(nrc) +*!* +*!* FOR i = 1 TO nrc +*!* n = AT(',', '&initial', i) +*!* n2 =AT(',', '&initial', i+1) +*!* c_Initial[i] = SUBSTR('&initial', n+1, n2-n-1) +*!* *MESSAGEBOX(c_initial[i]) +*!* n = AT(',', '&final', i) +*!* n2 =AT(',', '&final', i+1) +*!* c_final[i] = SUBSTR('&final', n+1, n2-n-1) +*!* *MESSAGEBOX(c_final[i]) +*!* ENDFOR +*!* +*!* FOR i=1 TO nrc +*!* IF i=nrc +*!* c=c+c_initial[i]+' as '+c_final[i] +*!* ELSE +*!* c=c+c_initial[i]+' as '+c_final[i]+',' +*!* ENDIF +*!* ENDFOR +*!* +calea_fis = PUTFILE('Nume fisier:', 'Foaie_Excel', 'XLS') +IF EMPTY(calea_fis) && Esc pressed + RETURN +ENDIF +*!* +*!* SELECT &c FROM &tabel INTO CURSOR cur +SELECT &tabel +EXPORT TO (calea_fis) TYPE XL5 + +SET DEFAULT TO &DIRGEN +RETURN + + + diff --git a/Programe/fisa_ob_inventar.prg b/Programe/fisa_ob_inventar.prg new file mode 100644 index 0000000..749ec04 --- /dev/null +++ b/Programe/fisa_ob_inventar.prg @@ -0,0 +1,106 @@ +PROCEDURE fisa_ob_inventar +&& tlToate - se genereaza raportul pt. toate obiectele de inventar + + SET SAFETY OFF + + PRIVATE pcTitlu, pcPerioada, pcDataOra && pt. raport + + PRIVATE pcli, pcai, pclf, pcaf && pt. forma de alegere perioada + STORE m.nl TO pcli, pclf + STORE m.an TO pcai, pcaf + + LOCAL lnnrlunii, lnnrlunif, lcprimaluna, lcprimulan, lcultimaluna, lcultimulan + STORE 0 TO lnnrlunii, lnnrlunif + STORE "" TO lcprimaluna, lcprimulan, lcultimaluna, lcultimulan + + podif=CREATEOBJECT("frm_datai_dataf") + podif.SHOW(1) + IF buton = 2 + RETURN + ENDIF + + lnnrlunii = VAL(pcai)*12+VAL(pcli) + lnnrlunif = VAL(pcaf)*12+VAL(pclf) + SELECT nl, an FROM calendar ; + WHERE BETWEEN(VAL(an)*12+VAL(nl),lnnrlunii,lnnrlunif) ; + INTO CURSOR cCalendar + + SELECT cCalendar + IF _TALLY=0 + DO mesaj WITH "Nu exista nici o luna deschisa in perioada",pcli + ' ' + pcai + ' - ' + pclf + ' ' + pcaf + RETURN + ENDIF + + SELECT cCalendar + GO TOP + lcprimaluna = nl + lcprimulan = an + GO BOTTOM + lcultimaluna = nl + lcultimulan = an + + pcperioada = "Perioada de referinta " + "01/" + lcprimaluna + "/" + lcprimulan + " - " + DTOC(ultimazi(lcultimulan,lcultimaluna)) + + od=CREATEOBJECT('frm_toate') + od.label1.CAPTION='Sa se genereze situatia pentru:' + od.cmdrenunt1.CAPTION='\0 AND gest=m.gest; +*!* INTO TABLE &loc\&nfscurt\tempo\cfifo ORDER BY datain + +*!* SELECT CFIFO +*!* REPLACE ALL cante WITH 0,dataout WITH {} +*!* CALCULATE MIN(datain) TO mindata +*!* IF tdata>mindata +*!* DO mesaj WITH 'ATENTIE !','Nu se respecta metoda FIFO !' +*!* MARCA=.T. +*!* RETURN +*!* ENDIF +*!* +*!* SELECT fifo +*!* APPEND FROM &loc\&nfscurt\tempo\cfifo +*!* LOCATE FOR UPPER(ALLTRIM(denumire))=tmat AND UPPER(ALLTRIM(codmat))=tcod AND pret=tpret +*!* REPLACE dataout WITH DATE()&&,cante WITH tcant +*!* *!* IF cant-cante>0 +*!* *!* REPLACE incomplet WITH .t. +*!* *!* ENDIF +*!* ELSE +*!* SELECT fifo +*!* CALCULATE MIN(datain) TO mindata FOR UPPER(ALLTRIM(denumire))=tmat AND UPPER(ALLTRIM(codmat))=tcod AND (EMPTY(dataout) OR incomplet) +*!* GO TOP +*!* LOCATE FOR UPPER(ALLTRIM(denumire))=tmat AND UPPER(ALLTRIM(codmat))=tcod AND pret=tpret &&AND (EMPTY(dataout) OR incomplet) +*!* IF tdata>mindata +*!* DO mesaj WITH 'ATENTIE !','Nu se respecta metoda FIFO' +*!* MARCA=.T. +*!* RETURN +*!* ENDIF +*!* REPLACE dataout WITH DATE()&&,cante WITH tcant +*!* *!* IF cant-cante>0 +*!* *!* REPLACE incomplet WITH .t. +*!* *!* ELSE +*!* *!* REPLACE incomplet WITH .f. +*!* *!* ENDIF +*!* ENDIF + +*!* ENDPROC +*!* *------------------------------------------------------- + + +*!* PROCEDURE LIFO +*!* PARAMETERS TCOD,TMAT,TDATA,tpret +*!* tmat=UPPER(ALLTRIM(tmat)) +*!* tcod=UPPER(ALLTRIM(tcod)) + +*!* SELECT DISTINCT denumire,codmat,pret FROM fifo INTO CURSOR verif +*!* SELECT verif +*!* SCAN +*!* SCATTER NAME ver +*!* SELECT iesiri +*!* GO TOP +*!* LOCATE FOR UPPER(ALLTRIM(denumire))=UPPER(ALLTRIM(ver.denumire)) AND UPPER(ALLTRIM(codmat))=UPPER(ALLTRIM(ver.codmat)) AND pret=ver.pret +*!* IF !FOUND() +*!* SELECT fifo +*!* REPLACE ALL dataout WITH {},cante WITH 0,incomplet WITH .f.; +*!* FOR UPPER(ALLTRIM(denumire))=UPPER(ALLTRIM(ver.denumire)) AND UPPER(ALLTRIM(codmat))=UPPER(ALLTRIM(ver.codmat)) AND pret=ver.pret +*!* ENDIF +*!* SELECT verif +*!* ENDSCAN +*!* RELEASE ver +*!* USE IN verif + +*!* SELECT fifo +*!* LOCATE FOR UPPER(ALLTRIM(denumire))=tmat AND UPPER(ALLTRIM(codmat))=tcod +*!* IF !FOUND() +*!* IF USED('cfifo') +*!* USE IN cfifo +*!* ENDIF +*!* +*!* SELECT denumire,codmat,pret,cants+cant-cante as cant,cante,datain,dataout,curs as idf; +*!* FROM stoc; +*!* WHERE ALLTRIM(UPPER(denumire))==tmat AND ALLTRIM(UPPER(codmat))==tcod ; +*!* AND cants+cant-cante>0 AND gest=m.gest; +*!* INTO TABLE &loc\&nfscurt\tempo\cfifo ORDER BY datain + +*!* SELECT CFIFO +*!* REPLACE ALL cante WITH 0,dataout WITH {} +*!* CALCULATE Max(datain) TO maxdata +*!* IF tdata' +*!* SCATTER MEMVAR BLANK +*!* +*!* DO CAUT_ALFa_cursor WITH "tgrupa","dn_grupa",'Alegeti grupa:','' +*!* USE IN tgrupa +*!* +*!* IF buton = 2 +*!* RETURN +*!* ENDIF +*!* IF ALLTRIM(m.dn_grupa) # '' +*!* lcCond = lcCond + [ and id_grupa = m.id_grupa] +*!* ENDIF +*!* +*!* SELECT DISTINCT dn_sbgrupa, id_sbgrupa FROM art_sbgr WHERE id_grupa = m.id_grupa INTO CURSOR tgrupa READWRITE ORDER BY dn_sbgrupa + +*!* SELECT tgrupa +*!* APPEND blan +*!* REPLACE dn_sbgrupa WITH ' ' +*!* SCATTER MEMVAR BLANK +*!* +*!* DO CAUT_ALFa_cursor WITH "tgrupa","dn_sbgrupa",'Alegeti subgrupa:','' +*!* USE IN tgrupa +*!* +*!* IF buton = 2 +*!* RETURN +*!* ENDIF +*!* IF ALLTRIM(m.dn_sbgrupa) # '' +*!* lcCond = lcCond + [ and id_sbgrupa = m.id_sbgrupa] +*!* ENDIF +*!* +*!* SELECT DISTINCT id_articol, denumire, codmat, um, id_grupa, id_sbgrupa ; +*!* FROM listast WHERE &lccond INTO CURSOR tlist READWRITE ORDER BY id_grupa, id_sbgrupa, denumire, codmat +*!* +*!* SELECT t.*, g.dn_grupa, s.dn_sbgrupa ; +*!* FROM ((tlist t LEFT JOIN art_gr g ON t.id_grupa = g.id_grupa ) ; +*!* LEFT JOIN art_sbgr s ON t.id_sbgrupa = s.id_sbgrupa AND t.id_grupa = s.id_grupa ) ; +*!* INTO CURSOR tlista +*!* USE IN tlist +*!* +*!* SELECT t.*, sum(r.pret*r.cant) as valoare, sum(r.cant) as intrari FROM rul r JOIN tlista t ON r.id_articol = t.id_articol ; +*!* WHERE BETWEEN(r.dataact,pdData1, pdData2) AND r.cant#0 AND LEFT(ALLTRIM(r.scd),3) = '371' AND !INLIST(r.id_set, 74, 75, 76) ; +*!* INTO CURSOR trez ; +*!* GROUP BY r.id_articol ; +*!* ORDER BY t.dn_grupa, t.dn_sbgrupa, t.denumire, t.codmat +*!* +*!* titlu = 'Intrari de la ' + DTOC(pdData1) + ' la ' + DTOC(pdData2) +*!* +*!* SELECT trez +*!* REPORT FORM stoc_grupe TO PRINTER PROMPT PREVIEW +*!* +*!* USE IN tlista +*!* USE IN trez +*!* ENDPROC && list_articole_gr +*!* *__________________________________________________________________________________________________ +*!* +*!* PROCEDURE list_stoc_articol + +*!* SELECT s.denumire,s.codmat,s.um,s.gest,ALLTRIM(STR(s.id_articol))+ALLTRIM(STR(s.gest))+ALLTRIM(s.denumire)+ALLTRIM(s.codmat) as articol,sum(s.cants+s.cant-s.cante) as cantitate,g.numegest; +*!* from stoc s,numegest g ; +*!* WHERE s.gest=g.gest; +*!* GROUP BY articol INTO CURSOR tstoc ORDER BY denumire +*!* SELECT tstoc +*!* *BROWSE +*!* REPORT FORM stoc_articol TO PRINTER PROMPT PREVIEW +*!* USE IN tstoc + +*!* ENDPROC && list_stoc_articol + +*!* *__________________________________________________________________________________________________ + +*!* PROCEDURE fisa_magazie_simpla + +*!* LOCAL ln_stoci +*!* STORE 0 TO ln_stoci + +*!* SELECT rull +*!* SCATTER NAME oru + +*!* SELECT DISTINCT r.nnir,r.cante,r.cant,r.dataact,a.nract,r.cant AS STOCI,r.cant AS STOCF ; +*!* FROM rull r LEFT JOIN act a ON r.cod=a.cod ; +*!* WHERE (denumire=oru.denumire AND codmat=oru.codmat AND gest=oru.gest) AND id_articol=oru.id_articol ; +*!* INTO TABLE &loc\&nfscurt\tempo\fisa_stoc ORDER BY r.dataact +*!* SELECT FISA_STOC +*!* REPLACE ALL STOCI WITH 0,stocf WITH 0 + +*!* SELECT stoc +*!* LOCATE FOR (denumire=oru.denumire AND codmat=oru.codmat AND gest=oru.gest) AND id_articol=oru.id_articol +*!* IF FOUND() +*!* ln_stoci=cants +*!* ENDIF + +*!* SELECT fisa_stoc +*!* GO top +*!* REPLACE stoci WITH ln_stoci &&,stocf WITH ln_stoci+cant-cante +*!* SCAN +*!* REPLACE stocf WITH ln_stoci+cant-cante +*!* ln_stoci=stocf +*!* ENDSCAN + +*!* SELECT listast +*!* LOCATE FOR id_articol=oru.id_articol +*!* Lnid_grupa=id_grupa +*!* Lnid_sbgrupa=id_sbgrupa +*!* *WAIT WINDOW STR(oru.gest) + +*!* SELECT numegest.numegest,art_gr.dn_grupa,art_sbgr.dn_sbgrupa FROM numegest,art_gr ,art_sbgr; +*!* where numegest.gest=oru.gest AND art_gr.id_grupa=Lnid_grupa AND art_sbgr.id_sbgrupa=Lnid_sbgrupa ; +*!* INTO CURSOR tdate + +*!* *BROWSE +*!* SELECT fisa_stoc +*!* REPORT FORM fisa_magazie_simpla TO PRINTER PROMPT PREVIEW + +*!* RELEASE oru +*!* USE IN fisa_stoc +*!* USE IN tdate +*!* ENDPROC && fisa_magazie_simpla + +*!* *____________________________________________________________________________________________ + +*!* PROCEDURE list_stoc_art +*!* PARAMETERS tc_cond +*!* tc_cond=ALLTRIM(tc_cond) + +*!* IF USED('tstoc') +*!* USE IN tstoc +*!* ENDIF + +*!* SELECT *,sum(cants+cant-cante) as stocf,SUM((CANTs+cant-cante)*PRET) AS VALoare, ; +*!* ALLTRIM(denumire)+ALLTRIM(codmat)+ALLTRIM(STR(id_articol)) as indexul ; +*!* FROM stoc WHERE &tc_cond ; +*!* GROUP BY indexul ; +*!* INTO CURSOR tstoc + +*!* SELECT tstoc +*!* ENDPROC && list_stoc_art + +*!* *____________________________________________________________________________________________ + +*!* PROCEDURE raport_material_furnizor +*!* PRIVATE poConditie, lddata1, lddata2 + +*!* DO FORM frm_filtru_text WITH 'r.denumire','Denumirea materialului',1 TO pcConditie + +*!* *!* IF .filtru = "" +*!* *!* .Value = 0 +*!* *!* ENDIF +*!* +*!* loLuna=ret_luna("Selectati luna de inceput") +*!* lddata1=CTOD('01/'+loLuna.nl+'/'+loLuna.an) && 01/01/2003 + +*!* loLuna=ret_luna("Selectati luna de sfarsit") +*!* lddata2=CTOD('01/'+loLuna.nl+'/'+loLuna.an) && 01/01/2003 +*!* *lddata2=GOMONTH(CTOD('01/'+m.Nl+'/'+m.An),1)-1 && 31/07/2003 + +*!* CREATE TABLE &loc\&nfscurt\tempo\tfis (an c(4), luna c(2), denumire c(100), codmat c(50), cod n(10),cant n(12), pret n(14), nnir c(10), nume c(30)) + + +*!* SELECT calendar +*!* SCAN FOR BETWEEN(CTOD('01/'+nl+'/'+an), lddata1, lddata2) +*!* +*!* lcAn = an +*!* lcLuna = nl +*!* +*!* lcDate = ADDBS(calefirma)+'AN' + an + '\DATE' + nl+'\' +*!* lcFisRul = lcDate + "rull.dbf" +*!* lcFisAct = lcDate + "act.dbf" +*!* +*!* IF !FILE(lcFisRul) OR !FILE(lcFisAct) +*!* SELECT calendar +*!* LOOP +*!* ENDIF +*!* +*!* IF USED('rulaje') +*!* USE IN rulaje +*!* ENDIF +*!* +*!* IF USED('rj') +*!* USE IN rj +*!* ENDIF +*!* +*!* IF USED('tcrul') +*!* USE IN tcrul +*!* ENDIF +*!* +*!* USE &lcFisRul AGAIN IN 0 shared ALIAS rulaje ORDER TAG "denumire" +*!* USE &lcFisAct AGAIN IN 0 shared ALIAS rj ORDER TAG "nume" +*!* SELECT DISTINCT r.denumire, r.codmat, r.cod, r.cant, r.pret, r.nnir, a.nume,ALLTRIM(r.denumire)+ALLTRIM(r.codmat)+ALLTRIM(STR(ROUND(pret,0))) as numecod ; +*!* FROM rulaje r LEFT JOIN rj a ON r.cod = a.cod AND r.nnir = a.nnir ; +*!* WHERE &pcConditie AND r.cant # 0 AND LEFT(a.scc,3) = '401'; +*!* INTO CURSOR tcrul ; +*!* ORDER BY a.nume, numecod +*!* +*!* SELECT tcrul +*!* TOTAL TO &loc\&nfscurt\tempo\xtotal ON numecod FIELDS cant +*!* * GROUP BY r.denumire, r.codmat, r.pret, a.nume ; + +*!* SELECT tfis +*!* * APPEND FROM DBF('tcrul') +*!* APPEND FROM &loc\&nfscurt\tempo\xtotal +*!* REPLACE ALL luna WITH lcLuna FOR EMPTY(luna) +*!* REPLACE ALL an WITH lcAn FOR EMPTY(an) + +*!* SELECT calendar +*!* ENDSCAN + +*!* SELECT tfis +*!* INDEX ON AN + ALLTRIM(NUME)+ LUNA TAG nume OF &loc\&nfscurt\tempo\xULEI ASCENDING +*!* SELECT tfis +*!* REPORT FORM list_ulei TO PRINTER PROMPT PREVIEW + +*!* IF USED('rulaje') +*!* USE IN rulaje +*!* ENDIF + +*!* IF USED('rj') +*!* USE IN rj +*!* ENDIF + +*!* IF USED('tcrul') +*!* USE IN tcrul +*!* ENDIF +*!* USE IN tfis +*!* ENDPROC && raport_material_furnizor + +*!* *________________________________________ + +*!* PROCEDURE raport_productie_postcalcul + +*!* SELECT DISTINCT NRORD FROM RULL into TABLE &LOC\&NFSCURT\tempo\raA.DBF +*!* SELECT RAA +*!* *!* APPEND BLANK +*!* *!* REPLACE NRORD WITH " " +*!* Index ON NRORD TAG NRORD +*!* do caut_alfa with "RAA","Nrord","NUMELE COMENZII","M.nrord" + +*!* PRIVATE pnCant +*!* pnCant = 0 +*!* Ointre=CREATEOBJECT("CAUTintre") +*!* WITH Ointre +*!* .CAPTION="Dat in executie" +*!* .label1.caption="Cantitatea :" +*!* .label2.visible=.f. +*!* .text1.controlsource="pnCant" +*!* .text2.visible=.f. +*!* endwith +*!* ointre.show(1) +*!* +*!* SELECT denumire, um, sum(cante) as canttot, pret, gest, codmat, ; +*!* sum(round(pret*cante, 0)) as valtot, sum(ROUND(cante/pnCant,3)) as cant_unit, sum(round(pret*cante/pnCant, 3)) as val_unit; +*!* from rull ; +*!* where nrord = m.nrord And cante # 0 And cant = 0 ; +*!* into CURSOR rapostcalcul GROUP BY denumire, codmat, pret ORDER BY denumire + +*!* *!* SELECT RApostcalcul +*!* *!* *Index On NRORD+STR(VAL(ALLTRIM(nnir)))+DTOC(dataact) TAG nnir &&To &LOC\&NFSCURT\tempo\FFD +*!* *!* BROWSE + +*!* SELECT RApostcalcul +*!* *!* SET FILTER TO NRORD=M.NRORD +*!* REPORT FORM postcalcul TO PRINTER PROMPT PREVIEW + +*!* USE IN rapostcalcul + +*!* ENDPROC && raport_productie_postcalcul + + diff --git a/Programe/inchidere_k.prg b/Programe/inchidere_k.prg new file mode 100644 index 0000000..375e793 --- /dev/null +++ b/Programe/inchidere_k.prg @@ -0,0 +1,387 @@ +*!* 21.09.2010 +*!* marius.mutu +*!* #2722 Fruvimed +*!* inchidere_k am folosit lnCoeficientTva si GetProcTvaStandard() in loc de 19/119 + +*!* 11.10.2017 +*!* marius.mutu +*!* inchidere_k_custodie - tratare optiuni tip nou pentru analitice 371,378,4428 + +* inchidere cu K +Procedure inchidere_k + +Private pnK, pcAcont371, pcAcont378, pcAcont4111, pcAcont4428 +Store 0 To pnK +Store '' To pcAcont371, pcAcont378, pcAcont4111, pcAcont4428 + +Local lnK, lcCursor, llStergeNotaPrecedenta, lnId_Set, lnCod, llVerificAnalitic, llCompletareParteneri, lnRaspuns +Store 0 To lnK, lnCod, lnRaspuns +Store .T. To llVerificAnalitic, llCompletareParteneri + +Local lnAnalitice371, lnAnalitice378, lnAnalitice4111, lnAnalitice4428 +Store 0 To lnAnalitice371, lnAnalitice378, lnAnalitice4111, lnAnalitice4428 + +llStergeNotaPrecedenta = .T. +lnId_Set = 90017 +lnCod = 0 + +*!* 21.09.2010 +lnCoeficientTva = GetProcTvaStandard() / (100 + GetProcTvaStandard()) && 24/124 +*!* 21.09.2010 ^ + +***--------------------------------------------------- +*** 371 +lcSql=[select count(*) as cnt from balana where an = ?gnAn and luna = ?gnLuna and cont = '371' ] +lcCursor = 'crs_acont371' +lnSucces = goExecutor.oExecute(lcSql,lcCursor) +If lnSucces < 0 + AMESSAGEBOX(goExecutor.cEroare,0+16,"Eroare") +Endif + +Select crs_acont371 +lnAnalitice371 = Cnt + +If lnAnalitice371 > 0 + loCauta = caut_acont('371') + pcAcont371 = loCauta.acont +Endif + +If Used('crs_acont371') + Use In crs_acont371 +Endif + +*** 378 +lcSql=[select count(*) as cnt from balana where an = ?gnAn and luna = ?gnLuna and cont = '378' ] +lcCursor = 'crs_acont378' +lnSucces = goExecutor.oExecute(lcSql,lcCursor) +If lnSucces < 0 + AMESSAGEBOX(goExecutor.cEroare,0+16,"Eroare") +Endif + +Select crs_acont378 +lnAnalitice378 = Cnt + +If lnAnalitice378 > 0 + loCauta = caut_acont('378') + pcAcont378 = loCauta.acont +Endif + +If Used('crs_acont378') + Use In crs_acont378 +Endif + +*** 4111 +lcSql=[select count(*) as cnt from balana where an = ?gnAn and luna = ?gnLuna and cont = '4111' ] +lcCursor = 'crs_acont4111' +lnSucces = goExecutor.oExecute(lcSql,lcCursor) +If lnSucces < 0 + AMESSAGEBOX(goExecutor.cEroare,0+16,"Eroare") +Endif + +Select crs_acont4111 +lnAnalitice4111 = Cnt + +If lnAnalitice4111 > 0 + loCauta = caut_acont('4111') + pcAcont4111 = loCauta.acont +Endif + +If Used('crs_acont4111') + Use In crs_acont4111 +Endif + +*** 4428 +lcSql=[select count(*) as cnt from balana where an = ?gnAn and luna = ?gnLuna and cont = '4428' ] +lcCursor = 'crs_acont4428' +lnSucces = goExecutor.oExecute(lcSql,lcCursor) +If lnSucces < 0 + AMESSAGEBOX(goExecutor.cEroare,0+16,"Eroare") +Endif + +Select crs_acont4428 +lnAnalitice4428 = Cnt + +If lnAnalitice4428 > 0 + loCauta = caut_acont('4428') + pcAcont4428 = loCauta.acont +Endif + +If Used('crs_acont4428') + Use In crs_acont4428 +Endif +***--------------------------------------------------- + +If llStergeNotaPrecedenta + lnSucces = sterge_nota(lnCod, lnId_Set) + If lnSucces < 0 + Return + Endif +Endif + +* lcSel = [{call pack_inchideri.K_transferuri(?gnAn, ?gnLuna)}] +lcSel = [{call pack_inchideri.K_transferuri(]+Alltrim(Str(gnAn))+[,]+Alltrim(Str(gnLuna))+ [)}] +lcCursor = 'crsTransferuri' +lnSucces = goExecutor.oExecute(lcSel, lcCursor) +If lnSucces < 0 + AMESSAGEBOX(goExecutor.cEroare,0+16,"Eroare") + Return +Endif + +Select Count(*) As Cnt From crsTransferuri Into Cursor cNrTransf +Select cNrTransf +lnTransferuri = Cnt +If Used('cNrTransf') + Use In cNrTransf +Endif +If lnTransferuri > 0 + lnRaspuns = AMESSAGEBOX('Doriti sa faceti nota de reglare transferuri?',4, 'Reglare transferuri') + + If lnRaspuns = 6 +***--------------------------------------- +* lcSel = [{call pack_inchideri.K_general(?gnAn, ?gnLuna, ?pcAcont371, ?pcAcont378, ?pcAcont4428)}] + lcSel = [{call pack_inchideri.K_general(]+Alltrim(Str(gnAn))+[,]+Alltrim(Str(gnLuna))+[,]+; + IIF(!Empty(pcAcont371),['] + Alltrim(pcAcont371) + ['],'NULL')+[,]+ ; + IIF(!Empty(pcAcont378),['] + Alltrim(pcAcont378) + ['],'NULL')+[,]+; + IIF(!Empty(pcAcont4428),['] + Alltrim(pcAcont4428) + ['],'NULL')+[)}] + lcCursor = 'crsK' + lnSucces = goExecutor.oExecute(lcSel, lcCursor) + If lnSucces < 0 + AMESSAGEBOX(goExecutor.cEroare,0+16,"Eroare") + Return + Endif + + Select crsK + pnK = Round(Nvl(k, 0),gnPC) + +***--------------------------------------- + + Create Cursor crsCorecturi (id_partd N(10), partd C(70), id_partc N(10), partc C(70), scd C(4), scc C(4), suma N(20,4)) + + Select crsTransferuri + Scan + lnId_partd = id_partd + lcPartd = partd + lnId_partc = id_partc + lcPartc = partc + lnsuma = suma + + *!* 21.09.2010 + + Insert Into crsCorecturi (id_partd, partd, id_partc, partc, scd, scc, suma) ; + VALUES (lnId_partc, lcPartc, lnId_partd, lcPartd, '4428', '4428', Round(lnsuma * m.lnCoeficientTva,gnPC)) + lnTva = ROUND(lnsuma * m.lnCoeficientTva, gnPc) + *!* 21.09.2010 ^ +*!* Insert Into crsCorecturi (id_partd, partd, id_partc, partc, scd, scc, suma) ; +*!* VALUES (lnId_partc, lcPartc, lnId_partd, lcPartd, '378', '378', ROUND((lnsuma-lnTva)*pnK/100,gnPC)) + Insert Into crsCorecturi (id_partd, partd, id_partc, partc, scd, scc, suma) ; + VALUES (lnId_partc, lcPartc, lnId_partd, lcPartd, '378', '378', Round((lnsuma-lnTva)*pnK/(100+pnK),gnPC)) + Select crsTransferuri + Endscan + + If Used('crsTransferuri') + Use In crsTransferuri + Endif + +***--------------------------------------- + + llVerificAnalitic = .T. + llCompletareParteneri = .T. + lcCursor = 'crsCorecturi' + + If lnSucces > 0 + lnSucces = scrie_nota_import(lnId_Set, llVerificAnalitic, llCompletareParteneri, lcCursor) + Endif + Endif +Endif + +***--------------------------------------- +***---------------------------------- calcul K magazine + +***------------ + +* lcSel = [{call pack_inchideri.K_parteneri(?gnAn, ?gnLuna, ?pcAcont371, ?pcAcont378, ?pcAcont4111, ?pcAcont4428)}] +lcSel = [{call pack_inchideri.K_parteneri(]+Alltrim(Str(gnAn))+[,]+Alltrim(Str(gnLuna))+[,]+ ; + IIF(!Empty(pcAcont371),['] + Alltrim(pcAcont371) + ['],'NULL')+[,]+ ; + IIF(!Empty(pcAcont378),['] + Alltrim(pcAcont378) + ['],'NULL')+[,]+; + IIF(!Empty(pcAcont4111),['] + Alltrim(pcAcont4111) + ['],'NULL')+[,]+ ; + IIF(!Empty(pcAcont4428),['] + Alltrim(pcAcont4428) + ['],'NULL')+[)}] +lcCursor = 'crsK_mag' +lnSucces = goExecutor.oExecute(lcSel,lcCursor) +If lnSucces < 0 + AMESSAGEBOX(goExecutor.cEroare,0+16,"Eroare") + Return +Endif +***---------------------------------- calcul K magazine + +Create Cursor crsInchKmag (id_partd N(10), partd C(70), id_partc N(10), partc C(70), scd C(4), scc C(4), ascc C(4), suma N(20,4)) + +Select crsK_mag +Scan For rc4111 + rd4111 <> 0 + lnId_part = id_part + lcPartener = Alltrim(denumire) + lnK = Round(k/100,gnPC) + ln4111 = Round(rc4111+rd4111 ,gnPC) + + lnTva = Round(ln4111 * m.lnCoeficientTva,gnPC) + *lnAD = Round((ln4111-lnTva)*lnK,gnPC) + *!* 09.09.2008 + *!* MARIUS MUTU - TREBUIE SESIZARE DE LA FRUVIMED +*!* lnAD = Round((ln4111-lnTva)*k/(100+k),gnPC) + lnAD = Round((ln4111-lnTva)*k/100,gnPC) + *!* 09.09.2008 ^ + Insert Into crsInchKmag (id_partd, partd, id_partc, partc, scd, scc, suma) ; + VALUES (lnId_part, lcPartener,lnId_part, lcPartener,'4428', '371', lnTva) + Insert Into crsInchKmag (id_partd, partd, id_partc, partc, scd, scc, suma) ; + VALUES (lnId_part, lcPartener,lnId_part, lcPartener,'378', '371', lnAD) + Insert Into crsInchKmag (id_partd, partd, id_partc, partc, scd, scc, suma) ; + VALUES (0, '',lnId_part, lcPartener,'607', '371', ln4111-lnTva-lnAD) + + Select crsK_mag +Endscan + +***------------------------------- +llStergeNotaPrecedenta = .T. +lnId_Set = 90018 +lnCod = 0 +llVerificAnalitic = .T. +llCompletareParteneri = .T. +lcCursor = 'crsInchKmag' + +If llStergeNotaPrecedenta + lnSucces = sterge_nota(lnCod, lnId_Set) +Endif + +If lnSucces > 0 + Select crsInchKmag + Replace All ascc With pcAcont371 + lnSucces = scrie_nota_import(lnId_Set, llVerificAnalitic, llCompletareParteneri, lcCursor) +Endif + +If lnSucces > 0 + Private pcTitlu, pcDataOra + pcTitlu = "Inchidere folosind metoda cu k" + pcDataOra = get_ora(2) + + Select km.*, 1 As tip, ; + 0000000000 As id_partd, Space(70) As partd, ; + 0000000000 As id_partc, Space(70) As partc, ; + SPACE(4) As scd, ; + SPACE(4) As scc, ; + SPACE(4) As ascc, ; + 0000000000000000000000.00 As suma ; + From crsK_mag km Into Cursor crsList Readwrite + + + If Used('crsCorecturi') + Select C.*, 2 As tip From crsCorecturi C Into Cursor c2 + Select crsList + Append From Dbf('c2') + If Used('c2') + Use In c2 + Endif + + Use In crsCorecturi + Endif + + Select C.*, 3 As tip From crsInchKmag C Into Cursor c3 + + If Used('crsInchKmag') + Use In crsInchKmag + Endif + + Select crsList + Append From Dbf('c3') + If Used('c3') + Use In c3 + Endif + + Select crsList + Report Form rap_inchidere_k.frx To Printer Prompt Preview + +* Select * From crsList Into Table C:\List.Dbf + + If Used('crsList') + Use In crsList + Endif +Endif + +If Used('crsK_mag') + Use In crsK_mag +Endif + +Endproc && inchidere_k +************************************************************************************************************************ +*!* modificare v 2.2.35 +Procedure inchidere_k_custodie + Local lcCursor, lcCursorFinal, llStergeNotaPrecedenta, lnId_Set, lnCod, llVerificAnalitic, llCompletareParteneri + Store .T. To llVerificAnalitic, llCompletareParteneri, llStergeNotaPrecedenta + Store 0 To lnCod + lnId_Set = 90019 + lcCursorFinal = [crsK] + lcCursor = [crsK_custodie] + If llStergeNotaPrecedenta + lnSucces = sterge_nota(lnCod, lnId_Set) + Endif +SET STEP ON + ************************* + *** Analitice 371,378,4428 versiune noua + *** FactAnaliticCustK_5 / FactAnaliticCustK_9 / FactAnaliticCustK_19 + ************************* + lcSql = [SELECT procent FROM cote_tva WHERE an = ?gnAn AND luna = ?gnLuna and procent <> 0] + llSucces = goExecutor.oExecuta(m.lcSql, "cCoteTVATemp") + IF m.llSucces + SELECT cCoteTVATemp + SCAN + lcProcent = ALLTRIM(STR(INT(procent))) + lcVariabilaName = 'gcFactAnaliticCustK_' + m.lcProcent && gcFactAnaliticCustK_5 / gcFactAnaliticCustK_9 / gcFactAnaliticCustK_19 + + If TYPE(m.lcVariabilaName) <> "U" + lcAnaliticK = &lcVariabilaName + IF !EMPTY(m.lcAnaliticK) + lcSel = [{call pack_inchideri.K_custodie(]+Alltrim(Str(gnAn))+[,]+Alltrim(Str(gnLuna))+[,] + m.lcProcent + [)}] + llSucces = goExecutor.oExecuta(lcSel,lcCursor) + If m.llSucces + IF !USED(m.lcCursorFinal) + SELECT * FROM (lcCursor) WHERE .F. INTO CURSOR (m.lcCursorFinal) READWRITE + ENDIF && !USED(m.lcCursorFinal) + + Insert Into (m.lcCursorFinal) Select * From (m.lcCursor) + USE IN (SELECT(m.lcCursor)) + ENDIF && m.llSucces + ENDIF && !EMPTY(m.lcAnaliticK) + ENDIF + ENDSCAN + ENDIF && m.llSucces + + ************************* + *** Daca nu am gasit analiticele versiune noua, caut si analitice versiune veche + IF !USED(m.lcCursorFinal) + lcSel = [{call pack_inchideri.K_custodie(]+Alltrim(Str(gnAn))+[,]+Alltrim(Str(gnLuna))+[,1)}] + llSucces = goExecutor.oExecuta(lcSel,lcCursor) + If llSucces + copiaza_structura_cursor(lcCursor,lcCursorFinal) + If !Empty(NVL(IIF(TYPE("gcFactAnaliticCustK2")=="U",NULL,gcFactAnaliticCustK2),"")) + Insert Into (lcCursorFinal) Select * From (lcCursor) + If Used(lcCursor) + Use In (lcCursor) + Endif + lcSel = [{call pack_inchideri.K_custodie(]+Alltrim(Str(gnAn))+[,]+Alltrim(Str(gnLuna))+[,2)}] + llSucces = goExecutor.oExecuta(lcSel,lcCursor) + Endif + If llSucces + Insert Into (lcCursorFinal) Select * From (lcCursor) + lnSucces = scrie_nota_import(lnId_Set, llVerificAnalitic, llCompletareParteneri, lcCursorFinal) + Endif + + Endif + If Used(lcCursor) + Use In (lcCursor) + ENDIF + ELSE + lnSucces = scrie_nota_import(lnId_Set, llVerificAnalitic, llCompletareParteneri, lcCursorFinal) + ENDIF && !USED(m.lcCursorFinal) + + Use In (SELECT(lcCursorFinal)) +Endproc && inchidere_k_custodie +*!* modificare v 2.1.8 ^ +************************************************************************************************************************ diff --git a/Programe/ofactureaza.prg b/Programe/ofactureaza.prg new file mode 100644 index 0000000..dacf349 --- /dev/null +++ b/Programe/ofactureaza.prg @@ -0,0 +1,412 @@ +*** AVIZ TRANSFER (apelat din ointroduceri.prg dupa scrierea NIR-ului pret de lista id_set 231, 247, 266) + +*!* 30.03.2010 +*!* marius.mutu +*!* completare parametrii V_SERIE_ACT_INCASARE, V_DATAORA_EXP la apelul pack_facturare.scrie_factura2 + +*!* 19.05.2010 +*!* marius.mutu +*!* finalizeaza_scriere_verificare - apel parametru aditional + + +*!* 05.11.2010 +*!* marius.mutu +*!* adauga_articol_factura + parametru multiplicator_curs = 1 + +*!* 13.06.2017 +*!* marius.mutu +*!* scatter name poArt memo - nu exporta campul "explicatia" MEMO + +Private ptDataOra +Local lnIdSet,lnIdTipDoc,lcCursorVerificare,lcCursorFinal,pcSirDifAcont ,pcSirDifPart,lnSucces +lnSucces = 1 +lcCursorVerificare = [crsactverif] +lcCursorFinal = [tmpactactan] +pcSirDifAcont = [] +pcSirDifPart = [] + + + +lnIdSet = 25000 + 30 - 1 + gnScadereStoc * 10 +*!* lcObiect = [frm_date_aviz_lucrare] +lnIdTipDoc = 6 +If Type('poDate') <> 'O' + poDate=Createobject("oDateFactura",lnIdSet,30) + Private poGeneratorNumere + poGeneratorNumere = Createobject("oGeneratorNumere") +Else + If Type('poGeneratorNumere') <> 'U' + poGeneratorNumere.ResetNumere() + Endif +Endif + +poDate.rezultat_serii=poGeneratorNumere.creeaza_cursor_serii(lnIdTipDoc) + +If Type('poDateGestiuneDest') <> 'O' + poDateGestiuneDest = Createobject("oDateGestiune") +Endif +Select actactan +*!* SCATTER NAME poclient FIELDS nract +*!* ADDPROPERTY(poclient,'denumire','') +poDate.id_client = actactan.id_gestin +poDate.nume_client = actactan.GESTIN +poDate.DATAACT = actactan.DATAACT +poDate.tip = 30 +*!* poClient.denumire = poDate.descriere +pnButon=1 +ofrmceredate=Createobject('frm_date_aviz') +ofrmceredate.Show(1) +Release ofrmceredate +If pnButon=2 + poGeneratorNumere.dezaloca_numar(lnIdTipDoc) + Release poDate,poGeneratorNumere + Return +Else + poGeneratorNumere.verifica_numar(lnIdTipDoc,poDate.nract) +Endif + +*!* Select 0 As id_c,id_articol,serie,id_gestiune,id_valuta,discunitar As discount_unitar ,codmat,denumire,um,1 As gestionabil,; +*!* cant As cantitate,proc_tvav,0 As preturi_cu_tva,Curs,Pret As preta,pretv As Pret,tvav,0 As pret_val,nume_val,; +*!* 0 As discount_unitar_val,0 As tip_valuta,Cont,acont From rul_temp ; +*!* into Cursor crs_artTemp + +*!* modificare v 2.0.77 +*!* Create Cursor crsfactura(id_c N(20),id_temp N(20),id_articol N(20),id_pol N(20) Null,id_gestiune N(20),Cont c(4),um c(10), ; +*!* id_valuta N(10),gestionabil N(1),tip_valuta N(1),Curs N(20,4),id_jtva_coloana N(20) Null,codmat c(100),codbare c(50),codmatf c(100),; +*!* pret_achizitie N(20,4),denumire c(100),pretftva N(20,4),pretctva N(20,4),valftva N(20,4), valtva N(20,4),valctva N(20,4),; +*!* cantitate N(20,4),discountftva N(20,4), discountctva N(20,4), valdiscountftva N(20,4),valdiscounttva N(20,4),; +*!* valdiscountctva N(20,4),valdiminuatftva N(20,4),valdiminuattva N(20,4), valdiminuatctva N(20,4),proc_tvav N(20,4),cu_tva N(1),serie c(100),; +*!* vpretftva N(20,4),vpretctva N(20,4),vvalftva N(20,4),vvaltva N(20,4),vvalctva N(20,4),; +*!* vdiscountftva N(20,4),vdiscountctva N(20,4),vvaldiscountftva N(20,4),vvaldiscounttva N(20,4),; +*!* vvaldiscountctva N(20,4),vvaldiminuatftva N(20,4),vvaldiminuattva N(20,4),vvaldiminuatctva N(20,4),id_set_fact N(20) Null,explicatie c(100),; +*!* id_part_rez N(10) Null,id_lucrare_rez N(10) Null,pretv_orig N(20,4),pretd N(20,4),id_valuta_d N(20)) +*!* modificare v 2.0.142 +*!* creeaza_crsfactura() +creeaza_facturacrs([crsfactura]) +*!* modificare v 2.0.142 ^ +*!* modificare v 2.0.77 ^ + +*!* modificare roagest2.0.46 +*!* Local lcIdJtva +*!* Select crs_artTemp +*!* Local lni +*!* Store 0 To lni +*!* Scan +*!* Scatter Name loArticole +*!* lni = lni +1 +*!* Select crsfactura +*!* update_jtva_coloane([JV],'CrsCotaTva',0) +*!* Select CrsCotaTva +*!* Locate For cota_tva = (loArticole.proc_tvav*100-100) +*!* If Found() +*!* lcIdJtva = id_jtva_coloana +*!* Else +*!* lcIdJtva = Null +*!* Endif +*!* Use In CrsCotaTva +*!* Insert Into crsfactura ; +*!* (id_c,id_temp,id_articol,id_gestiune,Cont,um,; +*!* id_valuta,gestionabil ,tip_valuta ,Curs ,id_jtva_coloana ,codmat ,; +*!* pret_achizitie,denumire ,pretftva ,pretctva ,valftva , valtva ,valctva ,; +*!* cantitate ,discountftva , discountctva , valdiscountftva ,valdiscounttva ,; +*!* valdiscountctva ,valdiminuatftva ,valdiminuattva , valdiminuatctva ,proc_tvav ,cu_tva ,serie ,; +*!* id_set_fact ,explicatie,id_pol ) ; +*!* values (; +*!* lni,loArticole.id_c,loArticole.id_articol,loArticole.id_gestiune,loArticole.Cont,loArticole.um,; +*!* loArticole.id_valuta,loArticole.gestionabil,loArticole.tip_valuta,loArticole.Curs,lcIdJtva ,loArticole.codmat,; +*!* loArticole.preta,loArticole.denumire,loArticole.Pret,loArticole.Pret+loArticole.tvav,Round(loArticole.cantitate*loArticole.Pret,gnpa),Round(loArticole.cantitate*loArticole.tvav,gnpa),Round((loArticole.cantitate*loArticole.Pret)+(loArticole.cantitate*loArticole.tvav),gnpa),; +*!* loArticole.cantitate,0,0,0,0,; +*!* 0,Round(loArticole.cantitate*loArticole.Pret,gnpa),Round(loArticole.cantitate*loArticole.tvav,gnpa),Round((loArticole.cantitate*loArticole.Pret)+(loArticole.cantitate*loArticole.tvav),gnpa),loArticole.proc_tvav,loArticole.preturi_cu_tva,'',; +*!* null,'',Null) +*!* &&25039 + +*!* Select crs_artTemp +*!* Endscan + +*!* ar trebui comasat if-ul de mai jos cu completeaza_facturacrs din ofacturare_stoc.prg +Local lnPretCuTva +lnPretCuTva = Iif(INLIST(gnTipGest,6,7), 1, 0) +If !INLIST(gnTipGest,6,7) + Insert Into crsfactura (id_gestiune,id_articol,Cont,gestionabil,denumire,serie,cantitate,cu_tva,pretftva,pretctva,; + valftva,valtva,valctva,discountftva,discountctva,valdiscountftva,; + valdiscounttva, valdiscountctva, valdiminuatftva, valdiminuattva, valdiminuatctva, proc_tvav,um,codmat,codbare,codmatf,; + vpretftva,vvalftva,vvaltva,vdiscountftva,vvaldiscountftva,vvaldiscounttva,; + vvaldiminuatftva,vvaldiminuattva,vvaldiminuatctva,pretd,id_valuta_d,pret_achizitie) ; + Select id_gestiune,id_articol,Cont,; + 1 as gestionabil,denumire, Nvl(serie,' ') As serie, cant As cantitate,m.lnPretCuTva As cu_tva,; + Round(pretv,gnPPretV) As pretftva,; + Round(pretv,gnPPretV) + Round(Round(pretv,gnPPretV) * (proc_tvav-1),gnPPretV) As pretctva,; + Round(Round(pretv,gnPPretV)*cant,gnPc) As valftva,; + ROUND(Round(pretv*cant,gnPc)*(proc_tvav-1),gnPc) As valtva, ; + Round(Round(pretv,gnPPretV)*cant,gnPc) + Round(Round(pretv*cant,gnPc)*(proc_tvav-1),gnPc) As valctva, ; + ROUND(discunitar,gnPPretV) As discountftva,; + ROUND(discunitar,gnPPretV)+Round(Round(discunitar,gnPPretV)*(proc_tvav-1),gnPPretV) As discountctva,; + Round(Round(discunitar,gnPPretV)*cant,gnPc) As valdiscountftva, ; + ROUND(Round(discunitar*cant,gnPc)*(proc_tvav-1),gnPc) As valdiscounttva, ; + Round(Round(discunitar,gnPPretV)*cant,gnPc) + Round(Round(discunitar*cant,gnPc)*(proc_tvav-1),gnPc) As valdiscountctva,; + Round(Round(pretv-discunitar,gnPPretV)*cant,gnPc) As valdiminuatftva,; + ROUND(Round((pretv-discunitar)*cant,gnPc)*(proc_tvav-1),gnPc) As valdiminuattva,; + ROUND(Round(Round(pretv-discunitar,gnPPretV)*cant,gnPc)*proc_tvav,gnPc) As valdiminuatctva,; + proc_tvav, Nvl(um,Space(50)) As um, Nvl(codmat,Space(50)) As codmat, Nvl(codbare,Space(50)) As codbare,Nvl(codmatf,Space(50)) As codmatf,; + Round(pretvval,gnPVal) As vpretftva,; + ROUND(Round(pretvval,gnPVal)*cant,gnPVal) As vvalftva,; + ROUND(Round(Round(pretvval,gnPVal)*cant,gnPVal)*(proc_tvav-1),gnPVal) As vvaltva,; + 0 As vdiscountftva,0 As vvaldiscountftva,0 As vvaldiscounttva,; + Round(Round(pretvval-0,gnPVal)*cant,gnPVal) As vvaldiminuatftva,; + ROUND(Round((pretvval-0)*cant,gnPVal)*(proc_tvav-1),gnPVal) As vvaldiminuattva,; + ROUND(Round(Round(pretvval-0,gnPVal)*cant,gnPVal)*proc_tvav,gnPVal) As vvaldiminuatctva,; + pretd,id_valuta,pret From rul_temp + *!* modificare v 2.0.77 : am adaugat pretd,id_valuta + *!* modificare v 2.0.142 : am completat vvaldiminuatftva, vvaldiminuattva, vvaldiminuatctva +Else + Insert Into crsfactura (id_gestiune,id_articol,Cont,gestionabil,denumire,serie,cantitate,cu_tva,pretftva,pretctva,; + valftva,valtva,valctva,discountftva,discountctva,valdiscountftva,; + valdiscounttva, valdiscountctva, valdiminuatftva, valdiminuattva, valdiminuatctva, proc_tvav,um,codmat,codbare,codmatf,; + vpretftva,vvalftva,vvaltva,vdiscountftva,vvaldiscountftva,vvaldiscounttva,; + vvaldiminuatftva,vvaldiminuattva,vvaldiminuatctva,pretd,id_valuta_d,pret_achizitie) ; + Select id_gestiune,id_articol,Cont,; + 1 as gestionabil,denumire, Nvl(serie,' ') As serie, cant As cantitate,m.lnPretCuTva As cu_tva,Round(pretv,gnPPretV) As pretftva, ; + Round(pretv+tvav,gnPPretV) As pretctva,; + Round(Round((pretv+tvav),gnPPretV)*cant,gnPc) - Round(Round((pretv+tvav)*cant,gnPc)*(proc_tvav-1)/proc_tvav,gnPc) As valftva, ; + Round(Round((pretv+tvav)*cant,gnPc)*(proc_tvav-1)/proc_tvav,gnPc) As valtva, ; + Round(Round((pretv+tvav),gnPPretV)*cant,gnPc) As valctva, ; + ROUND(discunitar,gnPPretV) As discountftva, ; + ROUND(discunitar,gnPPretV)+Round(Round(discunitar,gnPPretV)*(proc_tvav-1),gnPPretV) As discountctva,; + Round(Round(discunitar,gnPPretV)*cant,gnPc) As valdiscountftva, ; + Round(Round(discunitar*cant,gnPc)*(proc_tvav-1),gnPc) As valdiscounttva, ; + Round(Round(discunitar,gnPPretV)*cant,gnPc) + Round(Round(discunitar*cant,gnPc)*(proc_tvav-1),gnPc) As valdiscountctva, ; + Round(Round(pretv-discunitar,gnPPretV)*cant,gnPc) As valdiminuatftva,; + ROUND(Round((pretv-discunitar)*cant,gnPc)*(proc_tvav-1),gnPc) As valdiminuattva,; + ROUND(Round(Round(pretv-discunitar,gnPPretV)*cant,gnPc)*proc_tvav,gnPc) As valdiminuatctva,; + proc_tvav, Nvl(um,Space(50)) As um,Nvl(codmat,Space(50)) As codmat, Nvl(codbare,Space(50)) As codbare,Nvl(codmatf,Space(50)) As codmatf,; + Round(pretvval,gnPVal) As vpretftva,; + ROUND(Round(pretvval,gnPVal)*cant,gnPVal) As vvalftva,; + ROUND(Round(Round(pretvval,gnPVal)*cant,gnPVal)*(proc_tvav-1),gnPVal) As vvaltva,; + 0 As vdiscountftva,0 As vvaldiscountftva,0 As vvaldiscounttva,; + Round(Round(pretvval-0,gnPVal)*cant,gnPVal) As vvaldiminuatftva,; + ROUND(Round((pretvval-0)*cant,gnPVal)*(proc_tvav-1),gnPVal) As vvaldiminuattva,; + ROUND(Round(Round(pretvval-0,gnPVal)*cant,gnPVal)*proc_tvav,gnPVal) As vvaldiminuatctva,; + pretd,id_valuta,pret From rul_temp + *!* modificare v 2.0.77 : am adaugat pretd,id_valuta + *!* modificare v 2.0.142 : am completat vvaldiminuatftva, vvaldiminuattva, vvaldiminuatctva +Endif + +update_jtva_coloane([JV],'CrsCotaTva',0) +Select crsFactura +Scan + Scatter Name loArticole + Select CrsCotaTva + Locate For cota_tva = (loArticole.proc_tvav*100-100) + If Found() + lcIdJtva = id_jtva_coloana + Else + lcIdJtva = Null + Endif + Select crsFactura + Replace id_jtva_coloana With lcIdJtva +Endscan + + +Use In CrsCotaTva +*!*\ modificare roagest2.0.46 +*!* DEBUG +*!* SUSPEND +lnSucces = SQLSetprop(gnHandle,"Transactions", 2) +If lnSucces < 0 + aMESSAGEBOX('Programul nu a reusit trecerea pe tranzactie manuala',0+16,'Eroare') +Else + + Select actactan + Locate For Alltrim(scd) = '371' And INLIST(Alltrim(scc), '401', '408') + Select actactan + ptDataOra = dataora + poDate.DATAACT = DATAACT + lcSql = [pack_facturare.initializeaza_date_factura(] + ; + [to_date('] + Dtoc(actactan.dataireg,2) + [','YYYYMMDD'),] + ; + Nvl(Alltrim(Str(poDate.id_fdoc)),[NULL]) + [,to_date('] + Dtoc(actactan.DATAACT,2) + [','YYYYMMDD'),] + ; + [to_date('] + Alltrim(Dtoc(actactan.datascad,2)) + [','YYYYMMDD'),'] + Nvl(poDate.serie_act,[]) + [',] + ; + Alltrim(Str(poDate.nract)) + [,] + ; + Iif(Isnull(actactan.id_gestin),[NULL],Alltrim(Str(actactan.id_gestin))) + [,] + ; + Iif(Isnull(actactan.id_lucrare),[NULL],Alltrim(Str(actactan.id_lucrare))) + [,] + ; + Iif(Isnull(actactan.id_sectie),[NULL],Alltrim(Str(actactan.id_sectie))) + [,] + ; + Iif(IsNull(poDate.id_venchelt),[NULL],Alltrim(Str(poDate.id_venchelt))) + [,] + ; + Iif(Isnull(actactan.id_responsabil),[NULL],Alltrim(Str(actactan.id_responsabil))) + [,] + ; + IIF(EMPTY(nvl(poDate.explicatia4,[])),[NULL],['] + STRTRAN(ALLTRIM(poDate.explicatia4),['],['']) + [']) + [,] + ; && modificare ROAGEST v 2.1.11 + Iif(Isnull(poDate.listaid),[NULL],['] + Alltrim(Iif(Type('podate.listaid')='C',poDate.listaid,Str(poDate.listaid))) + [']) + [,] + ; + ['] + Alltrim(Nvl('',[])) + [',] + ; + Alltrim(Str(30)) + [,] + Alltrim(Str(actactan.id_set)) + [,] + ; + [to_date('] + Dtoc(actactan.DATAACT,2) + [','YYYYMMDD'),] + Alltrim(Str(actactan.id_valuta)) + [,] + ; + Alltrim(Str(0)) + [,] + ; + alltrim(str(actactan.tva_incasare)) + [,] + ; && modificare ROAGEST v 2.2.0 + Iif(Isnull(gnIdSucursala),[NULL],Alltrim(Str(gnIdSucursala))) + [,] + ; + Alltrim(Str(gnIdUtil)) + [);] + + lcSql = lcSql + [ pack_facturare.initializeaza_date_gestiune(] + Alltrim(Str(poDateGestiuneDest.id_gestiune)) + [,] + ; + Alltrim(Str(poDateGestiuneDest.id_tipgest)) + [,'] + Alltrim(poDateGestiuneDest.Cont) +[',] + ; + ['] + Alltrim(Nvl(poDateGestiuneDest.acont,[])) + [');] + + lcSql = [begin ] + lcSql + [ end;] + + lnSucces = goExecutor.oExecute(lcSql) + If lnSucces < 0 + aMESSAGEBOX(goExecutor.oPrelucrareEroare(),0+16,"Eroare") + llReturn = .F. + Else + lcSql = [] + Private poArt + lcSql = [] + Select crsfactura + Scan + Scatter Name poArt MEMO + *!* modificare v 2.0.77 : am adaugat pretd,id_valuta_d + *!* modificare v 2.0.121 : am adaugat NULL pentru id_ctr ( in id_set_fact ) + *!* 05.11.2010 + lcSql = lcSql + [pack_facturare.adauga_articol_factura(] + Alltrim(Str(poArt.id_temp)) + [,] + ; + Alltrim(Str(poArt.id_articol)) + [,'] + Alltrim(Nvl(poArt.serie,[])) + [',] + ; + ['] + Alltrim(Nvl(poArt.explicatie,'')) + [',] + Nvl(Alltrim(Str(poact.id_pol)),[NULL]) + [,] + ; + Nvl(Alltrim(Str(poArt.id_gestiune)),[NULL]) + [,] + Alltrim(Str(poArt.pret_achizitie,18,gnPPret)) + [,] + ; + Alltrim(Str(poArt.pretd,18,gnPPretVal)) + [,] + ; + Iif(IsNull(poArt.id_valuta_d),[NULL],Alltrim(Str(poArt.id_valuta_d))) + [,] + ; + IIF(poArt.cu_tva=0,; + IIF(poArt.tip_valuta = 0,Alltrim(Str(poArt.pretftva,18,gnPPretV)),Alltrim(Str(poArt.vpretftva,18,gnPVal))),; + IIF(poArt.tip_valuta = 0,Alltrim(Str(poArt.pretctva,18,gnPPretV)),Alltrim(Str(poArt.vpretctva,18,gnPVal)))) + [,] + ; + Alltrim(Str(poArt.id_valuta)) + [,] + Alltrim(Str(poArt.cu_tva)) + [,] + Alltrim(Str(poArt.gestionabil)) + [,] + ; + Alltrim(Str(poArt.cantitate,18,gnPCant)) + [,] + ; + IIF(poArt.cu_tva = 0,; + Iif(poArt.tip_valuta = 0,Alltrim(Str(poArt.discountftva,18,gnPPretV)),Alltrim(Str(poArt.vdiscountftva,18,gnPVal))), ; + IIF(poArt.tip_valuta = 0,Alltrim(Str(poArt.discountctva,18,gnPPretV)),Alltrim(Str(poArt.vdiscountctva,18,gnPVal)))) + [,] + ; + ['] + Alltrim(Nvl(poArt.Cont,'')) + [',] + Alltrim(Str(poArt.Curs,18,4)) + [,1,] + Alltrim(Str(poArt.id_jtva_coloana)) + [,] + ; + Nvl(Alltrim(Str(poArt.id_part_rez)),[NULL]) + [,] + Nvl(Alltrim(Str(poArt.id_lucrare_rez)),[NULL]) + [,] + ; + Alltrim(Str(poArt.pretv_orig,18,gnPPretV)) + [,] + ; + Nvl(Alltrim(Str(poArt.id_set_fact)),[NULL]) + [,NULL,] + Alltrim(Str(gnIdUtil)) + [);] + *!* 05.11.2010 ^ + lcSql = [begin ] + lcSql + [ end;] + lnSucces = goExecutor.oExecute(lcSql) + If lnSucces < 0 + aMESSAGEBOX(goExecutor.oPrelucrareEroare(),0+16,"Eroare") + llReturn = .F. + Exit + Else + lcSql = [] + Endif + Endscan + Endif + + If lnSucces > 0 + *!* modificare v 2.0.79 : am adaugat poDate.nid_vanzare +*!* modificare v 2.0.142 +*!* lcSql = [{call pack_facturare.scrie_factura(0,0,] + ; +*!* ALLTRIM(Str(0,18,gnPc)) + [,0,] + ; +*!* [NULL,] + ; +*!* [0,] + ; +*!* [NULL,] + ; +*!* [NULL,] + ; +*!* [NULL,] + ; +*!* [null,0,0,?poDate.nid_vanzare)}] +*!* 30.03.2010 + lcSql = [{call pack_facturare.scrie_factura2(0,0,] + ; + ALLTRIM(Str(0,18,gnPc)) + [,'',0,] + ; + [NULL,] + ; + [NULL,] + ; + [NULL,] + ; + [NULL,] + ; + [0,] + ; + [SYSDATE,] + ; + [NULL,] + ; + [null,0,0,?poDate.nid_vanzare)}] +*!* 30.03.2010 ^ +*!* modificare v 2.0.142 ^ + lnSucces = goExecutor.oExecute(lcSql,lcCursorVerificare) + If lnSucces < 0 + aMESSAGEBOX(goExecutor.oPrelucrareEroare(),0+16,"Eroare") + llReturn = .F. + Endif + Endif + If lnSucces > 0 + If Reccount(lcCursorVerificare)>0 + gnButon = 1 + Select a.*,a.suma As totftva, a.suma As tottva, Ttod(a.dataactt) As DATAACT, ; + Ttod(a.datairegt) As dataireg, Ttod(a.datascadt) As datascad, ; + 0 As pozitie_1, 0 As pozitie_2 From (lcCursorVerificare) a Into Cursor (lcCursorFinal) Readwrite + Use In (lcCursorVerificare) + Select (lcCursorFinal) + Do Form verificare With .T.,.T. + If gnButon = 1 + Select (lcCursorFinal) + Scan For Nvl(ascd,'') <> Nvl(ascd1,'') Or Nvl(ascc,'') <> Nvl(ascc1,'') Or ; + NVL(id_partd,0) <> Nvl(id_partd1,0) Or Nvl(id_partc,0) <> Nvl(id_partc1,0) + If Nvl(ascd,'') <> Nvl(ascd1,'') Or Nvl(ascc,'') <> Nvl(ascc1,'') + pcSirDifAcont = pcSirDifAcont + Alltrim(Str(id_act)) + [|] + Alltrim(Nvl(ascd,'')) + [|] + Alltrim(Nvl(ascc,'')) + [;] + Endif + If Nvl(id_partd,0) <> Nvl(id_partd1,0) Or Nvl(id_partc,0) <> Nvl(id_partc1,0) + If (Like([41*],scd) And Nvl(id_partd,0) <> Nvl(id_partd1,0)) ; + Or (Like([41*],scc) And Nvl(id_partc,0) <> Nvl(id_partc1,0)) + aMESSAGEBOX("Nu puteti modifica clientul!",48,"Atentie") + Return .F. + Else + pcSirDifPart = pcSirDifPart + Alltrim(Str(id_act)) + [|] + Alltrim(Str(Nvl(id_partd,0))) + [|] + Alltrim(Str(Nvl(id_partc,0))) + [;] + Endif + Endif + Endscan + lnReturn = 1 + gnButon = 2 + llReturn = .F. + *!* modificare v 2.0.79 : am adaugat poDate.nid_vanzare + *!* 19.05.2010 + lcSql = [begin pack_facturare.finalizeaza_scriere_verificare(0,] + ; + [NULL]+ [,] + ; + [NULL]+ [,] + ; + [NULL]+ [,] + ; + [0]+ [,] + ; + [SYSDATE]+ [,] + ; + [NULL]+ [,] + ; + [null,'] + Alltrim(Nvl(pcSirDifAcont,[])) + [','] + ; + ALLTRIM(Nvl(pcSirDifPart,[])) + [',0,?poDate.nid_vanzare); end;] + lnSucces = goExecutor.oExecute(lcSql) + Endif + If lnSucces<0 + aMESSAGEBOX(goExecutor.oPrelucrareEroare(),16,"Eroare") + gnButon = 2 + llReturn = .F. + Endif + Use In (lcCursorFinal) + Endif + Endif + Use In (Select(lcCursorVerificare)) + + If lnSucces > 0 + Private PNTIPFACTURARE + Store 0 To PNTIPFACTURARE + listeaza_ofacturare_stoc() + Endif +Endif &&SQLSETPROP + +USE IN crsfactura + +IF lnSucces > 0 + lnSucces = goexecutor.oexecute('COMMIT') +ELSE + poGeneratorNumere.dezaloca_numar(lnIdTipDoc) + Release poDate,poGeneratorNumere + lnSucces = goexecutor.oexecute('ROLLBACK') +ENDIF +If lnSucces < 0 + aMESSAGEBOX(goexecutor.ceroare,0+16,'Eroare') +ENDIF + +lnSucces = SQLSetprop(gnHandle,"Transactions", 1) +If lnSucces < 0 + aMESSAGEBOX('Programul nu a reusit trecerea pe tranzactie automata',0+16,'Eroare') +ENDIF +*!* DEBUG +*!* SUSPEND +*!* prelucreaza_factura(0,0,0,; +*!* Iif(InList(poDate.tip,23,25,27,28,29,30,41) and Nvl(gnPretListSubunitati,2)=1,1,2)) && ofacturare_comun.prg + +*!* lcRaport = [AVIZ_TRANSFER] +*!* lnVizualizare = Iif(Type('gnVizualAviz')='N',gnVizualAviz,1) +*!* lcSetare = [AVIZ] +*!* Local loExport +*!* loExport = Createobject("oExportConfig") +*!* loExport.listareUserReport('crsfacturafinala','FRX',lcRaport,lnVizualizare,lcSetare) + diff --git a/Programe/oimportdinxml.prg b/Programe/oimportdinxml.prg new file mode 100644 index 0000000..57790a8 --- /dev/null +++ b/Programe/oimportdinxml.prg @@ -0,0 +1,476 @@ +*!* 22.12.2016 +*!* marius.mutu +*!* completez_date_xml - corectat eroare sql din versiunea 10/2015 + +PROCEDURE importbonconsumLE + LPARAMETERS tnIdSet + Local loXMLRequest as "Msxml2.xmlhttp" + Local lcExtract, lcImportXML, lcUserlogIMPPath, lcXML, llCreareGeneratorNumere,lcImportXMLSTR + Local lnNrmixuri, loEx, loMixMare,lnI + PRIVATE pcFisierImport,pnIdGestiune,pnI + STORE 0 TO pnIdGestiune + pcFisierImport = gcDirimportxml + [\pour.log] + lcUserlogIMPPath = gcDirMare + 'USERLOGS\' + m.GCS + '\' + m.gcNumeProgram + [\IMP_PROFITMANAGER] + lcImportXML = ADDBS(lcUserlogIMPPath) + [pour_] + ttoc(DATETIME(), 1) + [.xml] + If !Directory(m.lcUserlogIMPPath) + Md (m.lcUserlogIMPPath) + ENDIF +SET STEP ON + IF !FILE(m.pcFisierImport) + aMESSAGEBOX('Nu exista fisierul de import ' + m.pcFisierImport + '!', 0 + 16, _screen.Caption) + RETURN + ENDIF + lcImportXMLSTR = FILETOSTR(m.pcFisierImport) +*!* lcImportXMLSTR = STRTRAN(STRTRAN(STRTRAN(STRTRAN(STRTRAN(strtran(strtran(strtran(strtran(strtran(lcImportXMLSTR ,CHR(227),[a]),CHR(226),[a]),CHR(238),[i]),CHR(186),[s]),CHR(254),[t]),CHR(195),; +*!* [A]),CHR(194),[A]),CHR(206),'I'),CHR(170),'S'),CHR(222),'T') + lcImportXMLSTR = STRTRAN(strtran(strtran(strtran(strtran(strtran(lcImportXMLSTR ,CHR(227),[a]),CHR(226),[a]),CHR(238),[i]),CHR(186),[s]),CHR(254),[t]),CHR(39),[ ]) + lcImportXMLSTR = Strtran(Strtran(Strtran(Strtran(Strtran(lcImportXMLSTR,Chr(195),[A]),Chr(206),[I]),Chr(194),[A]),Chr(170),[S]),Chr(222),[T]) + TRY + STRTOFILE(m.lcImportXMLSTR, m.lcImportXML) +*!* Copy File (pcFisierImport) To (lcImportXML) + CATCH TO loEx + aMESSAGEBOX(loEx.Message, 0 + 16, _screen.Caption) + RETURN + ENDTRY + + If Type('poGeneratorNumere') = 'U' + Private poGeneratorNumere + poGeneratorNumere = Createobject('oGeneratorNumere') + llCreareGeneratorNumere = .T. + ENDIF + + XMLTOCURSOR(lcImportXML, 'crsXMLmare', 512) + + SELECT crsXmlMare + LOCATE FOR LEFT(ALLTRIM(TRANSFORM(date)),6)<> ALLTRIM(STR(gnAn))+PADL(ALLTRIM(STR(gnLuna)),2,'0') + IF FOUND() + aMESSAGEBOX('Fisierul de importat are documente cu data actului din alta luna decat cea in care se lucreaza!', 0 + 16, _screen.Caption) + USE IN crsXmlMare + RETURN + + ENDIF + SELECT crsXmlMare + loXMLRequest = CreateObject("Msxml2.xmlhttp") + loXMLRequest.open("GET", lcImportXML, .F.) + loXMLRequest.send(.null.) + lcXML = loXMLRequest.responseText + lnNrmixuri = OCCURS([], lcXML) + CREATE CURSOR crsExecutii (instr m, nrord c(50)) + CREATE CURSOR crsAtentionari (mesaj c(100), afara l, codmat c(50),rezolvat l, nrord c(50),pret n(16,4),id_lucrare n(10),time n(20)) + CREATE CURSOR crsBontot (id_articol n(20), denumire c(100), cant n(14, 3), pret n(16, 4), valoare n(16, 4), proc_tvav n(5, 2), id_lucrare n(10), codmat c(50),time n(20)) + CREATE CURSOR crsIesiritot (id_lucrare n(10), serie c(100), cant n(14, 3), nract n(14), id_fdoc n(5), dataact d, dataireg d, id_gestout n(5), id_responsabil n(10), id_venchelt n(5), id_sectie n(5), id_articol n(20),suma_imp n(16,4),suma n(16,4), nrord c(50),time n(20)) + + loTherm = Newobject("_thermometer","_therm","","Import bon de consum pe lucrare in curs de executie ...") + lcTask = "Import ..." + _Screen.MousePointer= 11 + With loTherm + .AlwaysOnTop=.T. + .Show() + + lnPercent = 5 + .Update(lnPercent, lcTask) + + pnI = 1 + FOR lnI = 1 TO lnNrmixuri + pnI = lnI + lcExtract = [] + STREXTRACT(lcXML, '', '', lnI) + [] + XMLTOCURSOR(lcExtract, 'crsingrediente') + + lnPercent = 50 / (lnNrmixuri - lnI) + .Update(lnPercent, lcTask) + + SELECT crsXmlMare + GOTO lnI + SCATTER NAME loMixMare + IF !completez_date_xml(loMixMare, tnIdSet) + USE IN crsingrediente + aMESSAGEBOX('Bonul de consum NU a fost importat!', 0 + 48, _screen.Caption) + EXIT + ENDIF + USE IN crsingrediente + + ENDFOR + .AlwaysOnTop=.F. + IF !afiseaza_mesaje() + lnPercent = 70 + .Update(lnPercent, lcTask) + DO executa_instr WITH tnIdSet + ENDIF + + lnPercent = 100 + .Update(lnPercent, lcTask) + + USE IN crsExecutii + USE IN crsAtentionari + USE IN crsBontot + USE IN crsIesiritot + USE IN crsXmlMare + .Complete() + .AlwaysOnTop=.F. + Endwith + Release loTherm + _Screen.MousePointer= 0 +ENDPROC +*--------------------------------- + + +PROCEDURE completez_date_xml + LPARAMETERS toMixMare, tnIdSet + PRIVATE poActActan, pcXMLDetaliiBon, pcXMLDetaliiIesiri, pnIdVanzare, pcMesaj + LOCAL lnRaspunReset + STORE 0 TO lnRaspunReset + + Dimension taValori[1,3] + taValori[1,1]="poAct.nract" + taValori[1,2]= [1] + taValori[1,3]= .T. +*!* lans(id_set_operatie,.F.,.T.,@taValori) + + Local lcActactanSave, lcCursor, lcSql, lnBut, lnCante, lnPret, lnSucces, lnnr, loLucrari, loart,lnValImport + Local loing + lnValImport = 0 + lcActactanSave = gcTempPath + 'oscrie_in_fisiere_actactan' + ALLTRIM(TRANSFORM(toMixMare.date)) + '.xml' + IF pnI = 1 + lnRaspunReset = aMESSAGEBOX('Resetati datele documentului deja introduse?',4+32,_screen.Caption) + ENDIF + IF !FILE(lcActactanSave) OR lnRaspunReset = 6 + + IF lans(tnIdSet,.F.,.T.,@taValori) = 2 + RETURN .f. + ENDIF + *----salvez xml-ul cu datele introduse + SELECT ACTACTAN + CURSORTOXML('actactan', lcActactanSave, 1, 2 + 512, 0, "1") + ELSE + XMLTOCURSOR(lcActactanSave, 'actactan', 512) + SELECT ACTACTAN + ENDIF + SET STEP ON + + *----------------------- + *!* generez numarul de bon urmator + LOCAL lCursorSerii, lcNumeCursor, lcSerieCursor + llCreareGeneratorNumere = .T. + lCursorSerii = poGeneratorNumere.creeaza_cursor_serii(22) + lcNumeCursor = poGeneratorNumere.getNumeCursor(22) + lcSerieCursor = poGeneratorNumere.getSerieCursor(22) + *!* If poGeneratorNumere.verifica_serie(2) + lnnr = poGeneratorNumere.aloca_numar(22, Null) + *!* ENDIF + SELECT ACTACTAN + REPLACE ALL nract WITH lnnr, nnir WITH lnnr + *----------------------- + *-------------------- + *!* caut id_lucrare in nom_lucrari unde nrord = jobnumber - daca nu exista lucrarea = atentionare = afara din bon + lcSql = [select id_lucrare,nrord from nom_lucrari where nrord = '] + ALLTRIM(toMixMare.jobnumber) + [' and sters = 0] + lcCursor = [v_lucrari] + + lnSucces = goExecutor.oExecute(lcSql, lcCursor) + goExecutor.oReset() + IF lnSucces < 0 + aMESSAGEBOX(goExecutor.cEroare, 0 + 16, "Eroare") + RETURN .f. + ENDIF + + SELECT v_Lucrari + SCATTER NAME loLucrari + IF EMPTY(NVL(id_lucrare, 0)) + INSERT INTO crsAtentionari (mesaj, afara,nrord) VALUES ('Nu exista lucrarea ' + ALLTRIM(toMixMare.jobnumber) + [!], .t.,ALLTRIM(toMixMare.jobnumber)) + ELSE + SELECT ACTACTAN + REPLACE ALL id_lucrare WITH loLucrari.id_lucrare, nrord WITH loLucrari.nrord + ENDIF + USE IN v_Lucrari + *-------------------- + *!* caut daca lucrarea a fost validata, daca este validat => atentionare => il scoate din bon + lcSql = [select validat from dev_ordl d left join nom_lucrari l on d.id_lucrare = l.id_lucrare where d.sters = 0 and l.sters = 0 and l.nrord = '] + ALLTRIM(toMixMare.jobnumber) + ['] + lcCursor = [v_validat] + + lnSucces = goExecutor.oExecute(lcSql, lcCursor) + goExecutor.oReset() + IF lnSucces < 0 + aMESSAGEBOX(goExecutor.cEroare, 0 + 16, "Eroare") + RETURN .f. + ENDIF + + SELECT v_validat + IF validat = 1 + INSERT INTO crsAtentionari (mesaj, afara,nrord) VALUES ('Lucrarea ' + ALLTRIM(toMixMare.jobnumber) + [ a fost validata si nu se mai pot face modificari asupra ei!!], .t.,ALLTRIM(toMixMare.jobnumber)) + ENDIF + USE IN v_validat +*------------------------------- + SELECT ACTACTAN + LOCATE FOR nr_nota = 1 + SCATTER NAME poActActan + pnIdGestiune = poActActan.id_gestout + USE IN ACTACTAN + + SELECT crsingrediente + SCAN + SCATTER NAME loing + lnCante = ROUND((VAL(STRTRAN(ALLTRIM(TRANSFORM(loing.amount)), ',', '.')) / VAL(STRTRAN(ALLTRIM(TRANSFORM(loing.density)), ',', '.'))) / 1000, gnpcant) && transform in litri din grame +*!* lnPret = VAL(STRTRAN(ALLTRIM(TRANSFORM(loing.price)), ',', '.')) + + lcSql = [select a.id_articol,a.denumire,a.codmat] + ; + [,SUM(a.cants+a.cant-a.cante) as stoc,a.pret from vstoc a where a.an = ?gnAn and a.luna = ?gnluna and a.codmat = '] + ALLTRIM(loing.code) + [' and id_gestiune = ]+ ALLTRIM(STR(poActActan.id_gestout)); + +[ group by a.id_articol,a.denumire,a.codmat,a.pret] + lcCursor = [v_articole] + + + lnSucces = goExecutor.oExecute(lcSql, lcCursor) + goExecutor.oReset() + IF lnSucces < 0 + aMESSAGEBOX(ALLTRIM(toMixMare.jobnumber)+ [ ] + goExecutor.cEroare, 0 + 16, "Eroare") + RETURN .f. + ENDIF + + SELECT v_articole + DELETE for stoc < lnCante + GO TOP + + SCATTER NAME loart + lnPret = loart.pret + *--------------------------- + *!* daca nu exista articolul respectiv in nom_articole/in stoc => atentionare => il scoate din bon + IF EMPTY(NVL(loart.id_articol, 0)) + INSERT INTO crsAtentionari (mesaj, afara, codmat,nrord) VALUES ('Nu exista articolul ' + ALLTRIM(loing.code) + [ in stocul gestiunii ]+ALLTRIM(poActActan.gestout)+[!], .t., ALLTRIM(loing.code),ALLTRIM(toMixMare.jobnumber)) + ENDIF + *---------------------------- + + *--------------------------- + *!* daca exista mai multe articole cu acelasi codmat, sa il pun sa aleaga (dar ii arat si stocul pe fiecare posibilitate de alegere) + SELECT v_articole + IF RECCOUNT() > 1 + INSERT INTO crsAtentionari (mesaj, afara, codmat,nrord,pret,id_lucrare,time) VALUES ('Exista mai multe articole cu codul material = ' + ALLTRIM(loart.codmat) + [!], .f., ALLTRIM(loart.codmat),ALLTRIM(toMixMare.jobnumber),loart.pret,loLucrari.id_lucrare,VAL(TRANSFORM(toMixMare.time))) + ENDIF + *---------------------------- + + INSERT INTO crsBontot (id_articol, denumire, cant, pret, valoare, proc_tvav, id_lucrare, codmat,time); + VALUES (loart.id_articol, ALLTRIM(loart.denumire), lnCante, lnPret, lnCante * lnPret, gnProcTvaImp, loLucrari.id_lucrare, ALLTRIM(loing.code),VAL(TRANSFORM(toMixMare.time))) + lnValImport = lnValImport + round(lnCante * lnPret,2) + SELECT crsingrediente + ENDSCAN + + + INSERT INTO crsIesiritot (id_lucrare, serie, cant, nract, id_fdoc, dataact, dataireg, id_gestout, id_responsabil, id_venchelt, id_sectie, id_articol,suma_imp,nrord,suma,time); + VALUES (loLucrari.id_lucrare, ALLTRIM(NVL(TRANSFORM(toMixMare.colorcode),[])) + [ - ] + ALLTRIM(toMixMare.colorname), VAL(strtran(ALLTRIM(TRANSFORM(toMixMare.mixsize)), [,], [.])), ; + poActActan.nract, poActActan.id_fdoc, poActActan.dataact, poActActan.dataireg, poActActan.id_gestout, poActActan.id_responsabil, poActActan.id_venchelt, poActActan.id_sectie, -100009,lnValImport,ALLTRIM(toMixMare.jobnumber),0,VAL(TRANSFORM(toMixMare.time))) + + + poGeneratorNumere.resetAll() + + + + + + RETURN .t. + *!* ----------------afiseaza mesaje---------------- +PROCEDURE afiseaza_mesaje + LOCAL llErori + Local loAfisMesaje as 'frm_atenterori' + Private pcselect, pcschema, pcfiltru, pcorder, postoc, llAfiseaza + Store '' To postoc + pcschema = ['stoc n(16,4),id_articol n(10),codmat c(50),denumire c(100),nume_gestiune c(50),cgest c(20),pret n(16,4), ales n(1)'] + pcselect = ['select a.cants+a.cant-a.cante as stoc,a.id_articol,a.codmat,a.denumire,a.nume_gestiune,a.cgest,a.pret, 0 as ales from vstoc a '+] + ; + ['where 1=2'] + pcfiltru = [ 1 = 2] + pcorder = [a.denumire] + llAfiseaza = .F. + gencursor('poStoc', 'v_stoc', pcselect, pcfiltru, pcschema, pcorder, llAfiseaza) + postoc.ca_baza1.afisare() + *!* SELECT v_stoc + *!* BROWSE + + SELECT crsAtentionari + LOCATE FOR afara = .t. + IF FOUND() + llErori = .t. + ENDIF + + SELECT crsAtentionari + IF RECCOUNT() > 0 + GO TOP + loAfisMesaje = CREATEOBJECT('frm_atenterori') + loAfisMesaje._grdrow2.ReadOnly = .f. + loAfisMesaje.nidgestiune = pnIdGestiune + loAfisMesaje.but_termin1.visible = !llErori + loAfisMesaje.show(1) + ENDIF + + IF gnButon = 2 + llErori = .t. + ENDIF + SELECT crsIesiritot + SCAN + SCATTER NAME loiesiri + SELECT round(SUM(cant * pret),2) as suma FROM crsBontot INTO CURSOR crsBonsume WHERE id_lucrare = loiesiri.id_lucrare AND time = loiesiri.time + SELECT crsIesiritot + REPLACE suma_imp WITH crsBonsume.suma + USE IN crsBonsume + SELECT crsIesiritot + ENDSCAN + RELEASE loiesiri + + SELECT crsBontot + RETURN llErori + *!* ----------------afiseaza mesaje---------------- + + *!* ----------------executa_instr---------------- + +PROCEDURE executa_instr + LPARAMETERS tnIdSet + PRIVATE pcXMLDetaliiIesiri, pcXMLDetaliiBon, pnIdVanzare + LOCAL lcCursorVerificare + Local lcCursorFinal, lcSql, llReturn, lnReturn, lnSucces, loexec, loiesiri,lnSume0 + STORE 0 TO lnSume0 + + PRIVATE pcSirDifAcont, pcSirDifPart + lcCursorVerificare = [crsactverif] + lcCursorFinal = [actactan] + pcSirDifAcont = [] + pcSirDifPart = [] + SELECT crsIesiritot + GO TOP + oModificSumaLuc = CREATEOBJECT('frm_lucrari_sume') + oModificSumaLuc._grdBase1.column3.readonly = .f. + oModificSumaLuc.show(1) + SELECT crsIesiritot + COUNT FOR suma_imp=0 TO lnSume0 + IF lnSume0 > 0 + aMESSAGEBOX('Atentie! Bonurile cu sume = 0 nu vor fi importate!',0+64,_screen.Caption) + SELECT crsIesiritot + DELETE ALL FOR suma_imp = 0 &&AND suma = 0 + ENDIF + IF gnButon = 2 + poGeneratorNumere.dezaloca_numar(22) + Release poDate, poGeneratorNumere + RETURN .f. + ENDIF + SELECT crsIesiritot + SCAN + SCATTER NAME loiesiri + SELECT id_lucrare, serie, cant, id_articol,suma FROM crsIesiritot INTO CURSOR crsIesiri WHERE id_lucrare = loiesiri.id_lucrare AND time = loiesiri.time + Cursortoxml("crsIesiri", "pcXMLDetaliiIesiri", 1, 1, 0, "") + SELECT crsIesiri + USE IN crsIesiri + SELECT * FROM crsBontot INTO CURSOR crsBon WHERE id_lucrare = loiesiri.id_lucrare AND time = loiesiri.time + Cursortoxml("crsBon", "pcXMLDetaliiBon", 1, 1, 0, "") + USE IN crsBon + + SELECT crsExecutii + SCATTER NAME loexec MEMO BLANK + loexec.instr = [{call pack_gest_import.import_BON(] + ALLTRIM(STR(loiesiri.nract)) + [,] + loexec.instr = loexec.instr + ALLTRIM(STR(loiesiri.id_fdoc)) + [,] + loexec.instr = loexec.instr + [ TO_DATE('] + NVL(DTOS(loiesiri.dataact), "") + [','YYYYMMDD'),] + loexec.instr = loexec.instr + [ TO_DATE('] + NVL(DTOS(loiesiri.dataireg), "") + [','YYYYMMDD'),] + loexec.instr = loexec.instr + ALLTRIM(STR(loiesiri.id_gestout)) + [,] + loexec.instr = loexec.instr + ALLTRIM(STR(loiesiri.id_responsabil)) + [,] + loexec.instr = loexec.instr + ALLTRIM(STR(loiesiri.id_venchelt)) + [,] + loexec.instr = loexec.instr + ALLTRIM(STR(loiesiri.id_sectie)) + [,] + loexec.instr = loexec.instr + [?gnIdutil,] + loexec.instr = loexec.instr + [?gnIdSucursala,] + loexec.instr = loexec.instr + ALLTRIM(STR(tnIdSet)) + [,'] + loexec.instr = loexec.instr + ALLTRIM(pcXMLDetaliiBon) + [','] + loexec.instr = loexec.instr + ALLTRIM(pcXMLDetaliiIesiri) + [')}] + + loexec.nrord = ALLTRIM(loIesiri.nrord) + + INSERT INTO crsExecutii (instr,nrord) VALUES (loexec.instr,loexec.nrord) + + SELECT crsIesiritot + ENDSCAN + + SELECT crsExecutii + lnSucces = SQLSetprop(gnHandle, "Transactions", 2) + If lnSucces < 0 + aMESSAGEBOX('Programul nu a reusit trecerea pe tranzactie manuala', 0 + 16, 'Eroare') + ELSE + + SELECT crsExecutii + SCAN + SCATTER NAME loexec memo + + lnSucces = goExecutor.oExecute(loexec.instr, lcCursorVerificare) + + If lnSucces < 0 + aMESSAGEBOX(ALLTRIM(loexec.nrord)+[ ]+goExecutor.oPrelucrareEroare(), 0 + 16, "Eroare") + llReturn = .F. + EXIT + else + If Reccount(lcCursorVerificare) > 0 + gnButon = 1 + Select a.*, a.suma As totftva, a.suma As tottva, Ttod(a.dataactt) As dataact, ; + Ttod(a.datairegt) As dataireg, Ttod(a.datascadt) As datascad, ; + 0 As pozitie_1, 0 As pozitie_2 From (lcCursorVerificare) a Into Cursor (lcCursorFinal) Readwrite + Use In (lcCursorVerificare) + Select (lcCursorFinal) + Do Form verificare With .T., .T. + If gnButon = 1 + Select (lcCursorFinal) + Scan For Nvl(ascd, '') <> Nvl(ascd1, '') Or Nvl(ascc, '') <> Nvl(ascc1, '') Or ; + NVL(id_partd, 0) <> Nvl(id_partd1, 0) Or Nvl(id_partc, 0) <> Nvl(id_partc1, 0) + If Nvl(ascd, '') <> Nvl(ascd1, '') Or Nvl(ascc, '') <> Nvl(ascc1, '') + pcSirDifAcont = pcSirDifAcont + Alltrim(Str(id_act)) + [|] + Alltrim(Nvl(ascd, '')) + [|] + Alltrim(Nvl(ascc, '')) + [;] + Endif + If Nvl(id_partd, 0) <> Nvl(id_partd1, 0) Or Nvl(id_partc, 0) <> Nvl(id_partc1, 0) + If (Like([41*], scd) And Nvl(id_partd, 0) <> Nvl(id_partd1, 0)) ; + Or (Like([41*], scc) And Nvl(id_partc, 0) <> Nvl(id_partc1, 0)) + aMESSAGEBOX("Nu puteti modifica clientul!", 48, "Atentie") + llReturn = .F. + Else + pcSirDifPart = pcSirDifPart + Alltrim(Str(id_act)) + [|] + Alltrim(Str(Nvl(id_partd, 0))) + [|] + Alltrim(Str(Nvl(id_partc, 0))) + [;] + Endif + Endif + Endscan + + + lcSql = [begin pack_gest_import.finalizeaza_scriere_verificare(?gnAn,?gnLuna,] + ; + ['] + Alltrim(Nvl(pcSirDifAcont, [])) + [','] + ; + ALLTRIM(Nvl(pcSirDifPart, [])) + ['); end;] + lnSucces = goExecutor.oExecute(lcSql) + Endif + If lnSucces < 0 + aMESSAGEBOX(goExecutor.oPrelucrareEroare(), 16, "Eroare") + Endif + Use In (lcCursorFinal) + Endif + Endif + Use In (Select(lcCursorVerificare)) + + + ENDSCAN + + ENDIF + IF lnSucces < 0 OR gnButon = 2 + poGeneratorNumere.dezaloca_numar(22) + Release poDate, poGeneratorNumere + lnSucces = goExecutor.oExecute('ROLLBACK') + aMESSAGEBOX(goExecutor.cEroare, 0 + 16, 'Eroare') + aMESSAGEBOX('Bonul de consum NU a fost importat!', 0 + 48, _screen.Caption) + llReturn = .F. + + ELSE + lnSucces = goExecutor.oExecute('COMMIT') + aMESSAGEBOX('Importul bonului de consum a luat sfarsit!', 0 + 64, _screen.Caption) + DELETE File (pcFisierImport) + llReturn = .T. + SELECT crsIesiritot + SCAN + SCATTER NAME loiesiri + lnTip = gnTipGest + DO listare_descarcare_productie WITH loiesiri.nract, lnTip + SELECT crsIesiritot + ENDSCAN + + ENDIF + + lnSucces = SQLSetprop(gnHandle, "Transactions", 1) + If lnSucces < 0 + aMESSAGEBOX('Programul nu a reusit trecerea pe tranzactie automata', 0 + 16, 'Eroare') + ENDIF + + RETURN llReturn +ENDPROC +*!* ----------------executa_instr---------------- + + diff --git a/Programe/ovariabile_globale.prg b/Programe/ovariabile_globale.prg new file mode 100644 index 0000000..7a7492e --- /dev/null +++ b/Programe/ovariabile_globale.prg @@ -0,0 +1,96 @@ +**OVARIABILE_GLOBALE.PRG + + +PUBLIC gcGestPermis, gcGrupePermis,gnTipGest,gcGestPermis_Nume,gcGrupePermis_Nume +STORE '' TO gcGestPermis,gcGrupePermis,gcGestPermis_Nume,gcGrupePermis_Nume +STORE 0 TO gnTipGest + +IF TYPE('gcContObInv') = 'U' + PUBLIC gcContObInv + gcContObInv = '8039' +ENDIF +SET TEXTMERGE ON TO MEMVAR lcSql NOSHOW +\select DISTINCT C.ID_GRUPE, C.NUME_GRUPA +\ from <>.VGEST_NOM_GRUPE C +\ JOIN (select id_grupe +\ from <>.gest_nom_grupe +\ where sters = 0 +\ start with ID_GRUPE IN (SELECT ID_GRUPE FROM <>.VGEST_CORESP_UTIL_GRUPE WHERE ID_UTIL = <>) +\ connect by prior id_grupe = parent_id) g on c.id_grupe = g.id_grupe +SET TEXTMERGE TO + +*!* lcSql = [select * from ] + gcs + [.VGEST_CORESP_UTIL_GRUPE where id_util =] + ALLTRIM(STR(gnIdUtil)) + +lcCursor = [GRUPE_permis] +lnSucces = goExecutor.oExecute(lcSql,lcCursor) +IF lnSucces < 0 + AMESSAGEBOX(goExecutor.cEroare,0+16,'Eroare') +ELSE + SELECT grupe_permis + SCAN + gcGrupePermis = gcGrupePermis + ',' + ALLTRIM(STR(id_grupe)) + gcGrupePermis_Nume = gcGrupePermis_Nume + ',' + ALLTRIM(nume_grupa) + ENDSCAN + gcGrupePermis = SUBSTR(gcGrupePermis,2) + gcGrupePermis_Nume = SUBSTR(gcGrupePermis_Nume,2) + USE IN grupe_permis +ENDIF +goExecutor.oReset() +*!* AMESSAGEBOX(gcGrupePermis_nume) + +IF '-1' $ gcGrupePermis + gcGestPermis = '-1' +ELSE +*!* lcSql = [SELECT * FROM ] + gcs + [.VGEST_CORESP_GRUPE_GESTIUNI A JOIN ] + gcs + [.VGEST_CORESP_UTIL_GRUPE B ]+ ; +*!* [ON A.ID_GRUPE = B.ID_GRUPE WHERE B.ID_UTIL = ] + ALLTRIM(STR(gnIdUtil)) + + SET TEXTMERGE ON TO MEMVAR lcSql NOSHOW + \select DISTINCT ID_GESTIUNE, NUME_GESTIUNE + \ from <>.vgest_coresp_grupe_gestiuni c + \ join (select id_grupe + \ from <>.gest_nom_grupe + \ where sters = 0 + \ start with ID_GRUPE IN (SELECT ID_GRUPE FROM <>.VGEST_CORESP_UTIL_GRUPE WHERE ID_UTIL = <>) + \ connect by prior id_grupe = parent_id) g on c.id_grupe = g.id_grupe + SET TEXTMERGE TO + + + lcCursor = [gest_permis] + lnSucces = goExecutor.oExecute(lcSql,lcCursor) + IF lnSucces < 0 + AMESSAGEBOX(goExecutor.cEroare,0+16,'Eroare') + ELSE + SELECT gest_permis + SCAN + gcGestPermis = gcGestPermis + ',' + ALLTRIM(STR(id_gestiune)) + gcGestPermis_Nume = gcGestPermis_Nume + ',' + ALLTRIM(nume_gestiune) + ENDSCAN + gcGestPermis = SUBSTR(gcGestPermis,2) + gcGestPermis_Nume = SUBSTR(gcGestPermis_Nume,2) + USE IN gest_permis + ENDIF + goExecutor.oReset() +ENDIF +*!* AMESSAGEBOX(gcGestPermis_nume) +*WAIT WINDOW gcGestPermis + ',' + gcGrupePermis + +***************************************************************************** +*** Citesc setarea pentru ReportBehaviour +IF TYPE('gnReportBehaviour') = 'U' + PUBLIC gnReportBehaviour + gnReportBehaviour = 90 +ENDIF + +LOCAL lcReportBehaviour +lcReportBehaviour = NVL(getini(m.gcGeneralIniFile,'report','reportbehaviour'), '') +IF EMPTY(m.lcReportBehaviour) + setini(m.gcGeneralIniFile,'report','reportbehaviour', '90') + gnReportBehaviour = 90 +ELSE + gnReportBehaviour = VAL(m.lcReportBehaviour) +ENDIF +IF !INLIST(gnReportBehaviour, 80, 90) + setini(m.gcGeneralIniFile,'report','reportbehaviour', '90') + gnReportBehaviour = 90 +ENDIF +***************************************************************************** \ No newline at end of file diff --git a/Programe/roagest.prg b/Programe/roagest.prg new file mode 100644 index 0000000..49ad3b8 --- /dev/null +++ b/Programe/roagest.prg @@ -0,0 +1,1093 @@ +*!* 22.02.2010 +*!* marius.mutu +*!* nu se mai face verificarea seriei hdd + +*!* 12.10.2016 +*!* marius.mutu +*!* excelxml.vcx + +PARAMETERS tparam + +&&& cont2003 + +PUBLIC gcNumeProgram, gcAntet +LOCAL lchost, lcUserName, lcPassword, lnIdUtil, lnIdProgram, lcUserNameApp,lcPasswordApp +STORE '' TO lchost, lcUserName, lcPassword, lcUserNameApp,lcPasswordApp,gcAntet +STORE 0 TO lnIdUtil, lnIdProgram +gcNumeProgram = [ROAGEST] +_Screen.Icon = gcNumeProgram+[.ICO] +*_screen.Icon = 'D:\CONTAFIN_ORACLE\COMUN\GRAFICE\ICONITE\GESTIUNI.ICO' + + +IF !LIKE(gcNumeProgram + '*', UPPER(ALLTRIM(JUSTSTEM(SYS(16,0))))) + Messagebox("Nu puteti porni acest program!",0+16,"Atentie") + RETURN +ENDIF + +SET CENTURY ON +SET DELETED ON +SET DATE TO DMY +SET MARK TO '/' +SET EXCLUSIVE OFF +SET CPDIALOG OFF +SET TALK OFF +SET SAFETY OFF +SET ESCAPE OFF +SET EXACT ON +SET ANSI ON +SET CONSOLE OFF +SET NOTIFY OFF +SET SECONDS OFF +SET HOURS TO 24 +*SET NULLDISPLAY TO '*' +SET NULLDISPLAY TO '' +SET DECIMALS TO 4 +SET POINT TO '.' + +*!* SET REPORTBEHAVIOR 90 && sa se seteze inainte de raport + + +_SCREEN.WINDOWSTATE=2 +_SCREEN.VISIBLE=.T. + + + + +*VARIABILE_______ +LOCAL lcMainClassLib +LOCAL lcLastSetTalk,lcLastSetPath,lcLastSetClassLib,lcOnShutdown + +*VARIABILE__________________________________________________________________________ +DECLARE nror[65000] +DECLARE RTVA[22,2] +err1=.F. + +PUBLIC CRLF +STORE CHR(13) + CHR(10) TO CRLF +PUBLIC pcNl,pcAn +STORE "" TO pcNl,pcAn && se initializeaza in start00 + +PUBLIC pcTitlu ,pl_verificat +STORE "" TO pcTitlu +STORE .F. TO pl_verificat + +PUBLIC BUTON, 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,DIRGEN,gcDirMare +PUBLIC pcapsocsub,pcapsocvar +pcapsocsub=0 +pcapsocvar=0 +m.nivel = 0 +PUBLIC a4 +a4=.T. +m.nrgrup=999 + +STORE .F. TO luna_inchisa,tlbr_INSTRum,tlbr_VIZ +STORE 1 TO BUTON,col_menu +STORE .T. TO PRIMADATA,luna_neplatita + +*-- Save and configure environment.*********************** + +lcLastSetTalk=SET("TALK") +SET TALK OFF +lcLastSetPath=SET("PATH") + +*!* gcAppPath=ADDBS(JUSTPATH(SYS(16,0))) && d:\contafin\cont2003\ +Set Procedure To "D:\ROA\ROAGEST\COMUN\UTILE\web\WWUTILS.PRG" Additive +Set Procedure To "D:\ROA\ROAGEST\COMUN\UTILE\web\WWAPI.PRG" Additive + +gcAppPath = Addbs(ShortPath(GetAppStartPath())) +If Right(gcAppPath ,9)="PROGRAME\" + gcAppPath = Substr(gcAppPath ,1,Len(gcAppPath )-9) +Endif +gcAppName=Allt(Uppe(Juststem(Sys(16,0)))) && "cont2003" +*!*Set Path To Addbs(Substr(gcAppPath,1,Rat([\],gcAppPath,2)))+[COMUNROA\] Additive && modificare v 2.0.59 + + +*gcAppDataPath=gcAppPath+"Date_"+gcAppName+"\" && D:\CONTAFIN\TRANS\DATE_TRANS && PT OPTIUNI , FISIERE SPECIFICE PROGRAMULUI SI +gcUtilizatoriPath = gcAppPath + "UTILIZATORI\" + +Set Default To (gcAppPath) +lcPath = gcAppPath + 'Date;' + ; + gcAppPath + 'Include;' + ; + gcAppPath + 'FERESTRE;' + ; + gcAppPath + 'GRAFICE;' + ; + gcAppPath + 'CLASE;' + ; + gcAppPath + 'MENIURI;' + ; + gcAppPath + 'PROGRAME;' + ; + gcAppPath + 'RAPOARTE;' + ; + gcAppPath + 'COMUN;' + ; + gcAppPath + 'COMUN\CLASE;' + ; + gcAppPath + 'COMUN\FERESTRE;' + ; + gcAppPath + 'COMUN\PROGRAME;' + ; + gcAppPath + 'COMUN\GRAFICE;' + ; + gcAppPath + 'COMUN\RAPOARTE;' + ; + gcAppPath + 'COMUN\MENIURI;' + ; + gcAppPath + 'COMUN\UTILE\GRIDEXTRAS;' + ; + gcAppPath + 'COMUN\UTILE\CTL32;' + ; + gcAppPath + 'COMUN\UTILE\HPDF;' + ; + gcAppPath + 'COMUN\UTILE\HPDF\REPORTOUTPUT;' + ; + gcAppPath + 'COMUN\UTILE\WEB;' + ; + gcAppPath + 'COMUN\UTILE\EXCEL;' + ; + Addbs(Substr(gcAppPath,1,Rat([\],gcAppPath,2)))+[COMUNROA\] + +*!*Set Path To Date;Include;FERESTRE;GRAFICE;Help;CLASE;MENIURI;PROGRAME;RAPOARTE;PROGS;LIBS + +SET PATH TO &lcPath ADDITIVE + + + PUSH MENU _MSYSMENU +lcLastSetClassLib=SET("CLASSLIB") +lcMainClassLib= gcAppPath + "comun\clase\appwiz" + + + +*CLASE__________________________________________________________ +SET CLASSLIB TO (lcMainClassLib) ADDITIVE +SET CLASSLIB TO GESTIUNI ADDITIVE +SET CLASSLIB TO CAUT ADDITIVE +*SET CLASSLIB TO FERESTREBAZA ADDITIVE +*SET CLASSLIB TO CONT2000-1 ADDITIVE +*SET CLASSLIB TO CONT2000-2 ADDITIVE +*SET CLASSLIB TO CONT2000-3 ADDITIVE +SET CLASSLIB TO BAZA ADDITIVE +SET CLASSLIB TO comun ADDITIVE +SET CLASSLIB TO accessibility.vcx ADDITIVE +*!* messagebox in romana - ar trebui bagat intr-o librarie de utilitati +*!* messagebox.vcx, functia amessagebox in oproceduri_comune, imagini mb_*.bmp, messagebox.h +SET CLASSLIB TO messagebox ADDITIVE +SET CLASSLIB TO registry ADDITIVE +SET CLASSLIB TO cauta_alfa_forms.vcx ADDITIVE + +&& CLASE ORACLE +SET CLASSLIB TO DECABAZA ADDITIVE +SET CLASSLIB TO onomenclatoare ADDITIVE +SET CLASSLIB TO stocuri.vcx ADDITIVE +SET CLASSLIB TO rulaje.vcx ADDITIVE +SET CLASSLIB TO ointroduceri ADDITIVE +SET CLASSLIB TO ointroduceri_web ADDITIVE +SET CLASSLIB TO ointroduceri_depozit ADDITIVE +SET CLASSLIB TO overificari ADDITIVE +SET CLASSLIB TO ferestre_oracle ADDITIVE +SET CLASSLIB TO ferestre_cere_date.vcx ADDITIVE +SET CLASSLIB TO configurare.vcx ADDITIVE +SET CLASSLIB TO serii_numere.vcx ADDITIVE +SET CLASSLIB TO omodificari.vcx ADDITIVE +SET CLASSLIB TO ocompensari.vcx ADDITIVE +SET CLASSLIB TO caut_ora ADDITIVE +SET CLASSLIB TO onote_contabile ADDITIVE +SET CLASSLIB TO otoolbar ADDITIVE +SET CLASSLIB TO bon_fisc ADDITIVE &&serii bonuri fiscale +SET CLASSLIB TO onom_articole ADDITIVE +SET CLASSLIB TO onom_retete ADDITIVE +Set Classlib To oinventar ADDITIVE + +SET CLASSLIB TO orapoarte ADDITIVE +SET CLASSLIB TO orapoarte_gestiuni ADDITIVE +SET CLASSLIB TO orapoarte_parametri ADDITIVE +SET CLASSLIB TO ONOM_CURS ADDITIVE + +SET CLASSLIB TO ctl32_statusbar_fals.vcx additive +SET CLASSLIB TO ctl32_common.vcx additive +SET CLASSLIB TO ctl32_structs.vcx additive +SET CLASSLIB TO ctl32_progressbar.vcx additive +SET CLASSLIB TO ctl32_balloontip.vcx additive +SET CLASSLIB TO ocriterii.vcx ADDITIVE +SET CLASSLIB TO oavize.vcx ADDITIVE +SET CLASSLIB TO onomenclatoare2 ADDITIVE +*!* v 2.0.62 +Set Classlib To oschimbare_pret.vcx additive +*!* modificare v 2.0.118 +SET CLASSLIB TO wwdialogs.vcx additive +SET CLASSLIB TO oimportxml.vcx additive +SET CLASSLIB TO excelxml.vcx ADDITIVE + +SET CLASSLIB TO orapoarte_obinv.vcx ADDITIVE + +*!* modificare v 2.0.118 ^ +&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& + +*PROCEDURI______________________________________________________ +SET PROCEDURE TO PROCEDURI +SET PROCEDURE TO acces_meniu additive +SET PROCEDURE TO cauta_alfa additive +*SET PROCEDURE TO totPROC ADDITIVE +*SET PROCEDURE TO refverif ADDITIVE +*SET PROCEDURE TO PROCMENIU ADDITIVE +*SET PROCEDURE TO TOTV ADDITIVE +SET PROCEDURE TO pmenu ADDITIVE +SET PROCEDURE TO proceduri_comune ADDITIVE +*SET PROCEDURE TO totv.prg ADDITIVE +SET PROCEDURE TO quitapp ADDITIVE +SET PROCEDURE TO init_program ADDITIVE +SET PROCEDURE TO oproceduri_listari.prg ADDITIVE +SET PROCEDURE TO oproceduri_configurare.prg ADDITIVE +SET PROCEDURE TO oproceduri_articole.prg ADDITIVE +SET PROCEDURE TO oproceduri_retete.prg ADDITIVE +SET PROCEDURE TO orapoarte.prg ADDITIVE +SET PROCEDURE TO mesaje ADDITIVE +SET PROCEDURE TO oserii_numere.prg ADDITIVE +SET PROCEDURE TO oexport.prg ADDITIVE +SET PROCEDURE TO wwConfig.prg ADDITIVE +SET PROCEDURE TO proceduri_rapoarte.prg additive +SET PROCEDURE TO OPROCEDURI_CURS.PRG ADDITIVE +Set procedure to orapoarte_dinamice.prg additive +SET PROCEDURE TO validare.prg additive + +&& PROCEDURI ORACLE +SET PROCEDURE TO GENCURSOR.PRG ADDITIVE +SET PROCEDURE TO OPROCEDURI_COMUNE.PRG ADDITIVE +SET PROCEDURE TO OINIT_OPTIUNI.PRG ADDITIVE +SET PROCEDURE TO updateserver.prg ADDITIVE +SET PROCEDURE TO oinainte_de.prg ADDITIVE +SET PROCEDURE TO ooperatii_comune.prg ADDITIVE + +SET PROCEDURE TO Ocompensari.PRG ADDITIVE +SET PROCEDURE TO OPROCEDURI_aMS.PRG ADDITIVE +SET PROCEDURE TO oproceduri_rulaje additive +SET PROCEDURE TO oproceduri_stocuri additive +SET PROCEDURE TO OINTRODUCERI ADDITIVE +SET PROCEDURE TO oHeader.prg ADDITIVE +SET PROCEDURE TO proceduri_excel.PRG ADDITIVE +SET PROCEDURE TO onomenclatoare.PRG ADDITIVE +*!* SET PROCEDURE TO orapoarte.prg ADDITIVE +*!* SET PROCEDURE TO orap_trezorerie ADDITIVE +*!* SET PROCEDURE TO omeniu_initializari ADDITIVE +SET PROCEDURE TO osecurity ADDITIVE +SET PROCEDURE TO ocautare ADDITIVE +SET PROCEDURE TO orefaceri ADDITIVE +SET PROCEDURE TO ofacturare_comun.PRG ADDITIVE +SET PROCEDURE TO ofacturare_stoc.PRG ADDITIVE + +&& modificare 06.03 +&& casa de marcat +SET PROCEDURE TO oproceduri_casademarcat ADDITIVE +SET PROCEDURE TO oproceduri_casa_marcat_e500 ADDITIVE + +&& sfarsit modificare 06.03 +SET PROCEDURE TO oproceduri_casa_marcat_mp500 ADDITIVE +*!* 12.05.2006 +*!* marius mutu +SET PROCEDURE TO oproceduri_util.prg ADDITIVE +*!* + +*!* 16.06.2006 +*!* marius.mutu +SET PROCEDURE TO wwxmlhttp.prg ADDITIVE +SET PROCEDURE TO ini.prg ADDITIVE + +*!* 25.08.2006 +*!* marius.mutu +SET PROCEDURE TO odocumente.prg ADDITIVE + +*!* 28.05.2007 +*!* marius.mutu +SET PROCEDURE TO regex.prg ADDITIVE +SET PROCEDURE TO wwutils.prg ADDITIVE +SET PROCEDURE TO inchidere_k ADDITIVE + +*!* v 2.0.62 +Set procedure to oschimbare_pret.prg additive + +*!* modificare v 2.0.118 +SET PROCEDURE TO iniacces.prg ADDITIVE +SET PROCEDURE TO oupdate.prg additive +SET PROCEDURE TO procese.prg additive +SET PROCEDURE TO version.prg additive +SET PROCEDURE TO xmlaccess.prg additive +SET PROCEDURE TO xmlparser.prg additive +SET PROCEDURE TO filebringer.prg additive +SET PROCEDURE TO wwcodeupdate.prg additive +SET PROCEDURE TO wwhttp.prg ADDITIVE +Set Procedure To wwApi.prg Additive +*!* modificare v 2.0.118 ^ +SET PROCEDURE TO xdate.prg Additive && modificare v 2.0.120 +SET PROCEDURE TO ofacturare.prg ADDITIVE && modificare v 2.0.142 +SET PROCEDURE TO oproceduri_obinv.prg ADDITIVE && 2.6.0 +SET PROCEDURE TO oproceduri_facturare.prg ADDITIVE +SET PROCEDURE TO email.prg ADDITIVE + +*!* modificare v 2.0.188 +Declare Integer GetPrivateProfileString In Kernel32 ; + string, String, String, String @, Integer, String +Declare Integer WritePrivateProfileString In Kernel32 ; + string, String, String, String +Declare Integer CopyFile In kernel32; + STRING lpExistingFileName,; + STRING lpNewFileName,; + INTEGER bFailIfExists +Declare Integer URLDownloadToFile In urlmon.Dll; + INTEGER pCaller, String szURL, String szFileName,; + INTEGER dwReserved, Integer lpfnCB +Declare Integer PathFileExists In shlwapi; + STRING pszPath +*!* modificare v 2.0.188 ^ +&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& + +IF PCOUNT() = 1 AND TYPE('tparam') = 'C' + glParametri = .T. + PRIVATE laParametri + DECLARE LAPARAMETRI[1] + lcParam = ALLTRIM(tParam) + lnNr = lista2array(lcParam,@laParametri,";") + IF lnNr < 5 + aMESSAGEBOX('Numar incorect de parametri',0+16,'Eroare') + RETURN + ENDIF + lcHost = laParametri[1] + lcUserName = laParametri[2] + lcPassword = laParametri[3] + lnIdUtil = ROUND(VAL(laParametri[4]),0) + lnIdProgram = ROUND(VAL(laParametri[5]),0) +ELSE + glParametri = .F. + lcHost = 'JCSSERVER' + lcUserName = 'CONTAFIN_ORACLE' + lcPassword = '' + lnIdUtil = 0 + lnIdProgram = 0 + +ENDIF + +PUBLIC glVerificTabel && daca se verifica structura tabelelor in totv.prg +glVerificTabel=.T. + +PUBLIC glQuit +glQuit = .F. + +PUBLIC gnIdIstoric +gnIdIstoric = 0 + + +*!* PUBLIC gcAppPath,gcAppName, gcTempPath, gcCaleServerDate, gcUserNameApp, gcPasswordApp +*!* STORE '' TO gcUserNameApp, gcPasswordApp, gnNivelUtilizator, gnGrupUtilizator, gcAcces +*!* PUBLIC gcSchemaPath +*!* STORE '' TO gcSchemaPath +*!* *!* 10.09.2007 +*!* *!* marius.mutu +*!* *!* folosesc shortpath ca sa pot instala in "c:\program files\..." +*!* *!* gcAppPath = UPPER(ADDBS(JUSTPATH(SYS(16,0)))) && d:\contafin\cont2003\ +*!* gcAppPath = ADDBS(ShortPath(GetAppStartPath())) && wwutils.prg +*!* gcAppName = ALLT(UPPE(JUSTSTEM(SYS(16,0)))) && "cont2003" +*!* Set Path To Addbs(Substr(gcAppPath,1,Rat([\],gcAppPath,2)))+[COMUNROA\] Additive && modificare v 2.0.80 + +*!* gcAppPath = STRTRAN(gcAppPath, "\PROGRAME", "") + +*!* gcUtilizatoriPath = gcAppPath + "UTILIZATORI\" + +_reportpreview = gcAppPath + "reportpreview.app" + +STORE "" TO gcTempPath, gcCaleServerDate + + + + + +*** DIRGEN +liat=RAT("\",gcAppPath,2) +*!* modificare v 2.0.141 : am adaugat gcDirMare +gcDirMare=ADDBS(LEFT(gcAppPath,liat-1)) +dirgen = gcDirMare +*!* modificare v 2.0.141 + +gcSecurityPath = DIRGEN + 'Security\' +gcSecurityFile = gcSecurityPath + 'ROA_SECURITY.TXT' + +CD &gcDirMare + +Private gcGeneralIniFile, gcSettingsFile +gcGeneralIniFile = m.gcDirMare + "settings.ini" +gcSettingsFile = m.gcGeneralIniFile + +IF !FILE(gcGeneralIniFile) + + TEXT TO lcSettings NOSHOW +[errors] +host= + ENDTEXT + + STRTOFILE(lcSettings, gcGeneralIniFile) +ENDIF + +*** Tin conexiunea deschisa. La wert??? apare eroarea odbc "timeout occured" daca se lasa peste 1 minut programul fara sa se lucreze +LOCAL lcKeepAlive, lnKeepAlive +PRIVATE goKeepAlive +lcKeepAlive = NVL(getini(m.gcGeneralIniFile,'update','keepalive_seconds'), '') +lnKeepAlive = 0 +IF EMPTY(m.lcKeepAlive) + setini(m.gcGeneralIniFile,'update','keepalive_seconds', '0') + lnKeepAlive = 0 +ELSE + lnKeepAlive = VAL(m.lcKeepAlive) +ENDIF +IF m.lnKeepAlive >= 5 && minim 5 secunde + goKeepAlive = NEWOBJECT("keepalive","utility.vcx") + goKeepAlive.interval = m.lnKeepAlive * 1000 + goKeepAlive.enabled = .T. +ENDIF + + +PRIVATE poLog,goLog && obiect pt logarea mesajelor sistemului +poLog = NEWOBJECT("Log_Mesaje","Log_Mesaje.prg") +goLog = poLog +*!* Locale +Set Classlib To locale Additive +Private gcLocalePath, goLocale, gcLocale,glTraducere +gcLocalePath = gcAppPath + "Locale\" +glTraducere = .F. +*!* lcLocaleDb = gcLocalePath + "locale.dbc" +*!* Open Database (m.lcLocaleDb) +*!* modificare ROAGEST v 2.0.107 +*!* goLocale=Newobject("Locale","Locale.vcx") +lcLanguage = getini(gcGeneralIniFile,"locale","lang") +llLocale= getini(gcGeneralIniFile,"locale","llocale") +*!* IF !EMPTY(m.llLocale) AND m.llLocale<>'0' +*!* goLocale.llocale=.T. +*!* ENDIF +*!* modificare ROAGEST v 2.0.107 ^ +If Empty(m.lcLanguage) + gcLocale = 'Romana' +Else + gcLocale = m.lcLanguage +Endif +*!* modificare ROAGEST v 2.0.107 +Local lcObjLocale +If gcLocale = 'Romana' + lcObjLocale = [Locale_dummy] +Else + lcObjLocale = [Locale] +Endif +goLocale=Newobject(lcObjLocale,"Locale.vcx") +If !Empty(m.llLocale) And m.llLocale<>'0' + goLocale.llocale=.T. +Endif +Release lcObjLocale +*!* modificare ROAGEST v 2.0.107 ^ +goLocale.locale = gcLocale +*!* Locale ^ + +*!* IF verificari() +*!* _SCREEN.VISIBLE=.T. +*!* DO mesaj WITH "Se fac verificari programului","Va rugam reveniti" +*!* glQuit= .T. +*!* QUIT +*!* ENDIF + +*!* IF !Debug_Start() +*!* lcParam=tparam +*!* WAIT WINDOW 'lcParam ' +lcParam +*!* IF EMPTY(tparam) OR (TYPE('tParam')='C' AND !verific_start(tparam,dirgen,gcAppName)) +*!* _SCREEN.VISIBLE=.T. +*!* DO mesaj WITH "Programul trebuie pornit doar din START","" +*!* QUIT +*!* ENDIF +*!* ENDIF + + + + +*!* modificare v 2.1.1 +*!* PUBLIC tipar,SER_PERM,SER_PERI,VERSIUNE +*!* STORE .F. TO SER_PERM,SER_PERI +*!* modificare v 2.1.1 ^ + +***************************** VARIABILE ORACLE +PRIVATE goUtilizator +private gnHandle,gnidutil,GCCODFISCAL,GCADRESA,GCNUMEFIRMA,GCMONEDA,GNDIFZILE, gcUserNameApp, gcPasswordApp +PRIVATE gnButon && variabila pentru renunt si terminat +STORE 2 TO gnButon +STORE '' TO GCCODFISCAL,GCADRESA,GCNUMEFIRMA,GCMONEDA, gcUserNameApp, gcPasswordApp, gcNivelUtilizator, gcGrupUtilizator, gcAcces +gnHandle = -1 +gnidutil = 0 + +PRIVATE gcHost, gcUserName, gcPassword,gofundal, gnIdProgram, gnId_Prg_Owner +gnIdProgram = 0 +gnId_Prg_Owner = 0 +gofundal='' + +PRIVATE goFirma,gnIdFirma,gcFirma,gnAn,gnLuna && ,gnPA,gnPC +&& STORE 0 TO gnPA,gnPC && nr. de zecimale afisare, calcul +STORE null TO gofirma +STORE 0 TO gnIdFirma,gnAn,gnLuna +STORE '' TO gcFirma + +PRIVATE glUltimaLuna,glPrimaLuna, glLunaBuna,glLuna_neplatita,glLunaInchisa + +STORE .F. to glUltimaLuna,glPrimaLuna, glLunaBuna,glLuna_neplatita,glLunaInchisa + +***toolbar*** +PRIVATE otool,ohelp +STORE '' TO otool,ohelp +***toolbar*** + +PRIVATE gcS && schema firmei +STORE 'CONTAFIN' TO gcS + +IF TYPE('laparametri',1)="A" + IF ALEN(laParametri,1)=10 + gnAn = VAL(laParametri[7]) + gnLuna = VAL(laParametri[8]) &&lansare noua + gcS = laParametri[9] + gnIdFirma = VAL(laParametri[10]) + ENDIF +ENDIF + +PRIVATE gcCopyRight +gcCopyRight = '© ROA Romfast SRL' + +&& modificare 06.03 +&& casa de marcat +PRIVATE glListareBonFiscal +STORE .F. TO glListareBonFiscal +&& sfarsit modificare 06.03 + +&& obiect global wrap pt sqlexec cu text eroare si succes +PRIVATE goExecutor,goConn,goExport +goExecutor = CREATEOBJECT("oExecutor") +goConn = CREATEOBJECT("oConn") +goExport = Createobject("oExportConfig") + +PRIVATE goMyXMLHTTP +lcHostErrors = getini(gcGeneralIniFile,'errors','host') +goMyXMLHTTP = CREATEOBJECT("MyXMLHTTP", lcHostErrors) + +&& obiect global pt luna aleasa din calendar +PRIVATE goCalendar +STORE null TO goCalendar + + +gcHost = lcHost +gcUserName = lcUserName +gcPassword = lcPassword +gcUserNameApp = lcUserNameApp +gcPasswordApp = lcPasswordApp +gnIdUtil = lnIdUtil +gnIdProgram = lnIdProgram + + +IF !glParametri + lnValid = getcrsSecurity(gcSecurityFile) + IF lnValid > 0 + IF USED('crsHost') + SELECT crsHost + GO top + gcHost = ALLTRIM(host) + gcUserName = ALLTRIM(schema) + gcPassword = ALLTRIM(pwd) + USE IN crsHost + ENDIF + ENDIF +ENDIF +***************************** VARIABILE ORACLE + +&& DECLARARE VARIABILE GLOBALE SPECIFICE APLICATIEI CARE NU SE AFLA IN OPTIUNI_FIRMA +&& (SE AFLA IN DIRECTORUL PROIECTULUI, NU IN COMUN) +*DO OVARIABILE_GLOBALE.PRG + +*!* modificare v 2.1.1 +*!* USE &gcAppPath\SERCONT IN 0 ALIAS SER SHARED +*!* SELECT SER +*!* GO TOP +*!* tipar=TIP +*!* SER_PERM=SER_PERMAN +*!* SER_PERI=SER_PERIOD +*!* VERSIUNE=VERcont +*!* MODEL_PROGRAM=MODEL +*!* USE IN SER +*!* parolamea=SUBSTR(tipar,MONTH(DATE()),1) +*!* parolamea=parolamea+ALLT(STR(DAY(DATE())))+ALLT(STR(MONTH(DATE()))) + +*!* *!* 22.02.2010 +*!* IF .F. +*!* IF !_DEBUG() +*!* IF SER_PERM AND !verif_ser_perm() +*!* QUIT +*!* ENDIF +*!* ENDIF +*!* ENDIF +*!* *!* 22.02.2010 ^ +*!* modificare v 2.1.1 ^ + +PUBLIC NUMEPROGRAM,FUNDALPROGRAM && MENIUPROGRAM + + + + +m.contab = 'GESIUNI' +NUMEPROGRAM = 'ROA - Gestiuni' +*!* MENIUPROGRAM = gcAppPath + "meniuri\contGEST.mpr" +FUNDALPROGRAM = gcAppPath + "FERESTRE\FUNDAL.scx" +_program='gest' + +*-- Configure application object.***************************** + +Local laVersion +Dimension laVersion(12) +If Agetfileversion(laVersion, Sys(16,0)) > 0 + NUMEPROGRAM = laVersion(10) +Endif +Release laVersion + + +*!* 20.04.2012 +PRIVATE gcReportPreviewer, gcReportPreviewerPath +gcReportPreviewer = "FoxyPreview" && oexport.prg +gcReportPreviewerPath = dirgen + "COMUNROA\" +*!* 20.04.2012 ^ + + +lcOnShutdown="ShutDown()" +ON SHUTDOWN &lcOnShutdown +ON ERROR ErrorHandler(ERROR(),PROGRAM(),LINENO()) +*!* _SHELL="DO Cleanup IN progs\cont2003" + +*-- Instantiate application object.*************************** +RELEASE goApp +PUBLIC goApp +goApp=CREATEOBJECT("wzApplication") + +goApp.SetCaption(NUMEPROGRAM) +goApp.cStartupMenu = m.gcAppPath + "\meniuri\roagest.mpr" +*goApp.cStartupForm=FUNDALPROGRAM +goApp.cStartupForm = gcAppPath + "COMUN\ferestre\frm_login.scx" + +*-- Show application. +goApp.SHOW + + + +*-- Release application. +RELEASE goApp +cleanup() + +*-- Restore default menu. +POP MENU _MSYSMENU + + +*-- Restore environment. +ON ERROR +ON SHUTDOWN +*!* IF NOT lcLastSetClassLib==SET("classlib") +*!* RELEASE CLASSLIB (lcMainClassLib) +*!* ENDIF +*!* IF EMPTY(lcLastSetPath) +*!* SET PATH TO +*!* ELSE +*!* SET PATH TO &lcLastSetPath +*!* ENDIF +*!* IF lcLastSetTalk=="ON" +*!* SET TALK ON +*!* ELSE +*!* SET TALK OFF +*!* ENDIF + +RETURN + + + + +* FUNCTII______________________________________________________________________ +FUNCTION ErrorHandler(nError,cMethod,nLine) + LOCAL lcErrorMsg,lcCodeLineMsg + + WAIT CLEAR + lcErrorMsg=MESSAGE()+CHR(13)+CHR(13) + lcErrorMsg=lcErrorMsg+"Method: "+cMethod + lcCodeLineMsg=MESSAGE(1) + IF BETWEEN(nLine,1,10000) AND NOT lcCodeLineMsg="..." + lcErrorMsg=lcErrorMsg+CHR(13)+"Line: "+ALLTRIM(STR(nLine)) + IF NOT EMPTY(lcCodeLineMsg) + lcErrorMsg=lcErrorMsg+CHR(13)+CHR(13)+lcCodeLineMsg + ENDIF + ENDIF + + IF TYPE('goMyXMLHTTP') = 'O' + lcLunaHTTP = IIF(TYPE('gnLuna') = 'N', TRANSFORM(gnLuna) + "/","") + IIF(TYPE('GNAN') = 'N', TRANSFORM(gnAn),"") + lcErrorMsgHTTP = SYS(0) + ":" + IIF(TYPE('GCS')='C'," " + GCS,"") + ": " + lcLunaHTTP + CHR(13) +CHR(10) + lcErrorMsg + ; + CHR(13) +CHR(10) + CHR(13) + CHR(10) + GETCALLSTACK() + lcUserName = IIF(TYPE('gcUserNameApp') = 'C', gcUserNameApp, '') + lcProgram = JUSTSTEM(SYS(16,0)) + goMyXMLHTTP.postError(lcErrorMsgHTTP, lcUserName, lcProgram) + ENDIF + + IF _vfp.StartMode = 0 + DEBUG + SUSPEND + ENDIF + IF AMESSAGEBOX(lcErrorMsg,17,_SCREEN.CAPTION)#1 + ON ERROR + RETURN .F. + ENDIF +ENDFUNC + + + +FUNCTION SHUTDOWN +*!* IF start_nou() +*!* =End_Istoric(gnIdIstoric, ADDBS(DIRGEN)+"DATERETEA\", "START_ISTORIC") +*!* ENDIF + IF TYPE("goApp")=="O" AND NOT ISNULL(goApp) + RETURN goApp.OnShutDown() + ENDIF + Cleanup() + QUIT +ENDFUNC + + +FUNCTION Cleanup + + IF CNTBAR("_msysmenu")=7 + RETURN + ENDIF + ON ERROR + ON SHUTDOWN + SET CLASSLIB TO + SET PATH TO + CLEAR ALL + *CLOSE ALL + POP MENU _MSYSMENU + RETURN + + + + + +*----------------------------------------------------- + +*!* FUNCTION verif_ser_perm +*!* CLEAR + +*!* RETURN PORNIRE() +*!* ******** +*!* *?pornire() + +*!* FUNCTION PORNIRE +*!* SET EXACT ON +*!* PRIVATE calewin,calesys,checksum1,checksum2,serinreg,serdisk,file1,file2,valret,serdisktemp,ser1,ser2,key1,KEY2 +*!* STORE '' TO calewin,serinreg,serdisk,calesys,serdisktemp,catehd,ser1,ser2,key1,KEY2 +*!* STORE 0 TO checksum1,checksum2 +*!* STORE .T. TO valret +*!* DECLARE INTEGER SHGetFolderPath IN SHFOLDER.DLL ; +*!* INTEGER hwndOwner, ; +*!* INTEGER nFolder, ; +*!* INTEGER hToken, ; +*!* INTEGER dwFlags, ; +*!* STRING @ pszPath +*!* DECLARE INTEGER GetActiveWindow IN WIN32API +*!* #DEFINE CSIDL_WINDOWS 36 +*!* #DEFINE CSIDL_SYSTEM 37 +*!* #DEFINE CSIDL_PROGRAMS 38 +*!* lcPath = REPL(CHR(0),261) +*!* =SHGetFolderPath(GetActiveWindow(),CSIDL_WINDOWS,0,0,@lcPath) +*!* calewin=LEFT(lcPath,AT(CHR(0),lcPath)-1) +*!* lcPath = REPL(CHR(0),261) +*!* =SHGetFolderPath(GetActiveWindow(),CSIDL_SYSTEM,0,0,@lcPath) +*!* calesys=LEFT(lcPath,AT(CHR(0),lcPath)-1) +*!* &&se verifica existenta celor trei fisiere +*!* IF (NOT FILE(calesys+'\diskserial.dll')) OR (NOT FILE(calesys+'\getmacip.dll')) OR (NOT FILE(calewin+'\comdir.snr')) +*!* valret=.F. +*!* ENDIF +*!* IF valret +*!* file1=FILETOSTR(calesys+'\diskserial.dll') +*!* checksum1=SYS(2007,file1) +*!* file2=FILETOSTR(calesys+'\getmacip.dll') +*!* checksum2=SYS(2007,file2) +*!* &&severifica daca dll-urile nu au fost modificate +*!* IF (VAL(checksum1) != 58755) OR (VAL(checksum2) != 30476) +*!* valret=.F. +*!* ENDIF +*!* ENDIF +*!* &&se citesc seriile tutturor celor patru hard disk-uri posibile(pe IDE primary master,primary slave...) +*!* &&se tine minte primul cu seria nenula-daca nu s-a putut citi seria de la nici unul se pune o serie default +*!* &&seria default este "NUAREHAR" +*!* IF valret +*!* DECLARE INTEGER GetSerialNumber IN diskSerial.DLL INTEGER ,STRING +*!* catehd=0 +*!* FOR i=0 TO 3 +*!* serdisktemp=SPACE(40) +*!* GetSerialNumber(i,@serdisktemp) +*!* IF (LEN(ALLTRIM(serdisktemp))!=0) AND (catehd=0) +*!* serdisktemp=sircaracter(serdisktemp) +*!* serdisk=serdisktemp +*!* catehd=catehd+1 +*!* ENDIF +*!* ENDFOR +*!* IF (LEN(ALLTRIM(serdisk))=0) +*!* serdisk='NUAREHAR' +*!* ELSE +*!* IF ((LEN(ALLTRIM(serdisk))>0) AND (LEN(ALLTRIM(serdisk))<8)) +*!* serdisk=serdisk+REPLICATE('1',8-LEN(ALLTRIM(serdisk))) +*!* ENDIF +*!* ENDIF +*!* serdisk=SUBSTR(ALLTRIM(serdisk),LEN(ALLTRIM(serdisk))-7,8) +*!* ENDIF +*!* &&se citeste din comdir.snr seria de inregistrare si se verifica egalitatea cu seria obtinuta anterior +*!* IF valret +*!* gnFileHandle = FOPEN(calewin+'\comdir.snr') +*!* nSize = FSEEK(gnFileHandle, 0, 2) && Move pointer to EOF +*!* IF nSize!=9 +*!* valret=.F. +*!* ELSE +*!* = FSEEK(gnFileHandle, 0, 0) && Move pointer to BOF +*!* cString = FREAD(gnFileHandle,9) +*!* ser1=SUBSTR(cString,1,4) +*!* ser2=SUBSTR(cString,5,4) +*!* key1=SUBSTR(cString,9,1) +*!* KEY2=DECTOBIN(ALLTRIM(HEXDEC(key1))) +*!* serinreg=decodare1(ALLTRIM(UPPER(ser1)),KEY2)+decodare1(ALLTRIM(UPPER(ser2)),KEY2) +*!* IF serdisk!=serinreg +*!* valret=.F. +*!* ENDIF +*!* ENDIF +*!* = FCLOSE(gnFileHandle) +*!* ENDIF +*!* seriedisk1=serdisk +*!* serieinreg1=serinreg +*!* ON ERROR valret=.F. +*!* RETURN valret +************* +FUNCTION decodare1 + PARAMETERS lstring,CHEIE + LOCAL lens,poz1,poz2,POZ3,lret,LRET2,lcstring,val1,lret1 + lret='' + lret1='' + LRET2='' + lcstring=ALLTRIM(UPPER(lstring)) + lens=LEN(lcstring) + FOR i=1 TO 4 + poz1=SUBSTR(lcstring,i,1) + val1=ASC(poz1) + POZ3=SUBSTR(CHEIE,i,1) + DO CASE + CASE val1>=48 AND val1<=57 + IF ((val1-47)+INT(VAL(POZ3)))<=10 + poz2=CHR(val1+INT(VAL(POZ3))) + ELSE + poz2=CHR(val1+INT(VAL(POZ3))-10) + ENDIF + CASE val1>=65 AND val1<=90 + IF ((val1-64)+2*INT(VAL(POZ3)))<=26 + poz2=CHR(val1+2*INT(VAL(POZ3))) + ELSE + poz2=CHR(val1+2*INT(VAL(POZ3))-26) + ENDIF + ENDCASE + LRET2=LRET2+poz2 + ENDFOR + FOR i=1 TO lens + poz1=SUBSTR(LRET2,i,1) + val1=ASC(poz1) + DO CASE + CASE val1>=48 AND val1<=57 + IF ((val1-47)+i)<=10 + poz2=CHR(val1+i) + ELSE + poz2=CHR(val1+i-10) + ENDIF + CASE val1>=65 AND val1<=90 + IF ((val1-64)+2*i)<=26 + poz2=CHR(val1+2*i) + ELSE + poz2=CHR(val1+2*i-26) + ENDIF + ENDCASE + lret=lret+poz2 + ENDFOR + lens=LEN(lret) + FOR i=1 TO lens + poz1=SUBSTR(lret,i,1) + val1=ASC(poz1) + DO CASE + CASE val1>=48 AND val1<=57 + poz2=CHR(val1+17)&& din 0-9 in A-J + CASE val1>=65 AND val1<=74 + poz2=CHR(val1-17)&& din A-J in 0-9 + CASE val1>=75 AND val1<=82 + poz2=CHR(val1+8)&&din K-R in S-Z + CASE val1>=83 AND val1<=90 + poz2=CHR(val1-8)&&din S-Z in K-R + ENDCASE + lret1=lret1+poz2 + ENDFOR + RETURN lret1 +*********** +&&transformarea in decimal a unui caracter hexa +FUNCTION HEXDEC + LPARAMETERS LC + LOCAL LV + DO CASE + CASE LC=='0' + LV='0' + CASE LC=='1' + LV='1' + CASE LC=='2' + LV='2' + CASE LC=='3' + LV='3' + CASE LC=='4' + LV='4' + CASE LC=='5' + LV='5' + CASE LC=='6' + LV='6' + CASE LC=='7' + LV='7' + CASE LC=='8' + LV='8' + CASE LC=='9' + LV='9' + CASE LC=='A' + LV='10' + CASE LC=='B' + LV='11' + CASE LC=='C' + LV='12' + CASE LC=='D' + LV='13' + CASE LC=='E' + LV='14' + CASE LC=='F' + LV='15' + ENDCASE + RETURN LV +**************** +&&codarea binara din hexa pe patru biti +FUNCTION DECTOBIN + PARAMETERS sc + LOCAL lretf + DO CASE + CASE sc=='0' + lretf='0000' + CASE sc=='1' + lretf='0001' + CASE sc=='2' + lretf='0010' + CASE sc=='3' + lretf='0011' + CASE sc=='4' + lretf='0100' + CASE sc=='5' + lretf='0101' + CASE sc=='6' + lretf='0110' + CASE sc=='7' + lretf='0111' + CASE sc=='8' + lretf='1000' + CASE sc=='9' + lretf='1001' + CASE sc=='10' + lretf='1010' + CASE sc=='11' + lretf='1011' + CASE sc=='12' + lretf='1100' + CASE sc=='13' + lretf='1101' + CASE sc=='14' + lretf='1110' + CASE sc=='15' + lretf='1111' + ENDCASE + RETURN lretf +*********** +FUNCTION ECARACTER + PARAMETERS strg1 + PRIVATE pz,ch,lcstring,vret,lg1 + STORE 0 TO pz,lg1 + STORE '' TO ch,lcstring + STORE .T. TO vret + lcstring=UPPER(strg1) + lg1=LEN(lcstring) + FOR ind1=1 TO lg1 + ch=SUBSTR(lcstring,ind1,1) + IF (NOT BETWEEN(ASC(ch),48,57)) AND (NOT BETWEEN(ASC(ch),65,90)) + vret=.F. + EXIT + ENDIF + ENDFOR + RETURN vret +************ +FUNCTION sircaracter + PARAMETERS strg1 + PRIVATE pz,ch,lcstring,vret,lg1,lciesire + STORE 0 TO pz,lg1 + STORE '' TO ch,lcstring,lciesire + STORE .T. TO vret + strg1=STRTRAN(strg1,ALLTRIM(CHR(39)),'')&&caracterul ' + strg1=STRTRAN(strg1,ALLTRIM(CHR(39)),'')&&caracterul " + lcstring=UPPER(ALLTRIM(strg1)) + lg1=LEN(lcstring) + FOR ind1=1 TO lg1 + ch=SUBSTR(lcstring,ind1,1) + IF BETWEEN(ASC(ch),48,57) OR BETWEEN(ASC(ch),65,90) + lciesire=lciesire+ch + ENDIF + ENDFOR + RETURN lciesire + + + +***------------------------------------- +PROCEDURE _DEBUG + + PRIVATE lcret,lcfisier,lcPath,lccalewin + DECLARE INTEGER SHGetFolderPath IN SHFOLDER.DLL ; + INTEGER hwndOwner, ; + INTEGER nFolder, ; + INTEGER hToken, ; + INTEGER dwFlags, ; + STRING @ pszPath + DECLARE INTEGER GetActiveWindow IN WIN32API + #DEFINE CSIDL_WINDOWS 36 + + + lcPath = REPL(CHR(0),261) + =SHGetFolderPath(GetActiveWindow(),CSIDL_WINDOWS,0,0,@lcPath) + lccalewin=LEFT(lcPath,AT(CHR(0),lcPath)-1) + + lcret=.F. + lcfisier=ADDBS(lccalewin)+[DEBUG.TXT] + + IF FILE(lcfisier) + LCVAL=FILETOSTR(lcfisier) + + LNVAL1=MOD(VAL(RIGHT(LCVAL,1)),2) && restul 1 sau 0; daca e impar e 1 + lnval2=VAL(LEFT(LCVAL,LEN(LCVAL)-1)) + IF LNVAL1=1 OR YEAR(DATE())-MONTH(DATE())=lnval2 + lcret=.T. + ENDIF + ENDIF + RETURN lcret + +ENDPROC + + +FUNCTION Start_Nou + + RETURN Exista_Branch(,,dirgen) + +ENDFUNC && start_nou + +PROCEDURE Debug_Start + + lcFile = gcAppPath + "debug.txt" + + IF FILE(lcFile) &&OR !Start_Nou() + RETURN .T. + ENDIF + RETURN .F. + +ENDPROC && Debug_Start +************************************************************************ +PROCEDURE verificari +PARAMETERS tcFisierVerif + +lcverificari = ADDBS(gcAppPath)+gcAppName+".txt" + + +IF FILE(lcverificari) + RETURN .T. +ENDIF +RETURN .F. + +ENDPROC && verificari \ No newline at end of file diff --git a/Programe/shutdown.prg b/Programe/shutdown.prg new file mode 100644 index 0000000..04ae62a --- /dev/null +++ b/Programe/shutdown.prg @@ -0,0 +1,3 @@ +IF TYPE("goApp")=="O" AND NOT ISNULL(goApp) + RETURN goApp.OnShutDown() +ENDIF diff --git a/Programe/suma_in_vorbe.prg b/Programe/suma_in_vorbe.prg new file mode 100644 index 0000000..18ba991 --- /dev/null +++ b/Programe/suma_in_vorbe.prg @@ -0,0 +1,157 @@ +*---------------------------------------------------------------------------------- +*FUNCTION SUMA_IN_VORBE +param suma +local i,lit,numar1 +store 0 to i +store '' to lit,numar1 + +copy file &dirgen\_ALFA\datean\mila1.* to &loc\&nfscurt\tempo\mila1.* +use &loc\&nfscurt\tempo\mila1 in 0 alias mila1 +numar1=space(12) + +numar1=str(suma,12) +dimension a(12) +a(1)=subs(numar1,12,1) +a(2)=subs(numar1,11,1) +a(3)=subs(numar1,10,1) +a(4)=subs(numar1,9,1) +a(5)=subs(numar1,8,1) +a(6)=subs(numar1,7,1) +a(7)=subs(numar1,6,1) +a(8)=subs(numar1,5,1) +a(9)=subs(numar1,4,1) +a(10)=subs(numar1,3,1) +a(11)=subs(numar1,2,1) +a(12)=subs(numar1,1,1) +sele mila1 +********************* + loca for nr=val(a(12)) + lit=lit+alltri(cr1) + + if val(a(11))=1 + if val(a(10))=0 + loca for nr=val(a(11)) + lit=lit+alltri(cr5) + else + loca for nr=val(a(10)) + lit=lit+alltri(cr4) + endif + else + if val(a(10))=0 + loca for nr=val(a(11)) + lit=lit+alltrim(cr5) + else + loca for nr=val(a(11)) + lit=lit+alltrim(cr2) + loca for nr=val(a(10)) + lit=lit+alltrim(cr3) + endif + endif + do case + case val(a(12)) # 0 + lit=lit+' miliarde' + case val(a(11)) # 0 + lit=lit+' miliarde' + case val(a(10)) # 0 + lit=lit+' miliarde' + endcase + *********************** + loca for nr=val(a(9)) + lit=lit+alltri(cr1) + + if val(a(8))=1 + if val(a(7))=0 + loca for nr=val(a(8)) + lit=lit+alltri(cr5) + else + loca for nr=val(a(7)) + lit=lit+alltri(cr4) + endif + else + if val(a(7))=0 + loca for nr=val(a(8)) + lit=lit+alltrim(cr5) + else + loca for nr=val(a(8)) + lit=lit+alltrim(cr2) + loca for nr=val(a(7)) + lit=lit+alltrim(cr3) + endif + endif + do case + case val(a(9)) # 0 + lit=lit+' milioane' + case val(a(8)) # 0 + lit=lit+' milioane' + case val(a(7)) # 0 + lit=lit+' milioane' + endcase +*********************** + loca for nr=val(a(6)) + lit=lit+alltri(cr1) + + if val(a(5))=1 + if val(a(4))=0 + loca for nr=val(a(5)) + lit=lit+alltri(cr5) + else + loca for nr=val(a(4)) + lit=lit+alltri(cr4) + endif + else + if val(a(4))=0 + loca for nr=val(a(5)) + lit=lit+alltrim(cr5) + else + loca for nr=val(a(5)) + lit=lit+alltrim(cr2) + loca for nr=val(a(4)) + lit=lit+alltrim(cr3) + endif + endif + do case + case val(a(6)) # 0 + lit=lit+' mii' + case val(a(5)) # 0 + lit=lit+' mii' + case val(a(4)) # 0 + lit=lit+' mii' + endcase + +********************* + loca for nr=val(a(3)) + lit=lit+alltri(cr1) + + if val(a(2))=1 + if val(a(1))=0 + loca for nr=val(a(2)) + lit=lit+alltri(cr5) + else + loca for nr=val(a(1)) + lit=lit+alltri(cr4) + endif + else + if val(a(1))=0 + loca for nr=val(a(2)) + lit=lit+alltrim(cr5) + else + loca for nr=val(a(2)) + lit=lit+alltrim(cr2) + loca for nr=val(a(1)) + lit=lit+alltrim(cr3) + endif + endif + do case + case val(a(3)) # 0 + lit=lit+' lei' + case val(a(2)) # 0 + lit=lit+' lei' + case val(a(1)) # 0 + lit=lit+' lei' + endcase + +sele mila1 +use + +lit=strtran(lit,' ','') +return lit \ No newline at end of file diff --git a/Programe/update_nomenclator.prg b/Programe/update_nomenclator.prg new file mode 100644 index 0000000..33897bc --- /dev/null +++ b/Programe/update_nomenclator.prg @@ -0,0 +1,69 @@ +********************************************************** +PROCEDURE update_nomenclator + + *!* DO update_coresp_tip_part + *!* DO update_coresp_tip_cont + DO update_lunilean + + *** tabele meniu deschise din proiect + LOCAL lcCaleDateMenu + + lcCaleDateMenu=gcAppPath+[\COMUN\DATEMENU\] + +*!* modificare v 2.0.120 + lnSucces = xdate() +*!* IF !USED('XREQUEST') +*!* USE &lcCaleDateMenu.XREQUEST IN 0 ALIAS XREQUEST +*!* ENDIF +*!* IF !USED('xitems') +*!* USE &lcCaleDateMenu.xitems IN 0 ALIAS xitems +*!* ENDIF +*!* *!* IF !USED('YACT') +*!* *!* USE &lcCaleDateMenu.YACT IN 0 ALIAS YACT +*!* *!* ENDIF +*!* IF !USED('XSETS') +*!* USE &lcCaleDateMenu.XSETS IN 0 ALIAS XSETS ORDER TAG ID_SET +*!* ENDIF +*!* IF !USED('xACT') +*!* USE &lcCaleDateMenu.xACT IN 0 ALIAS xACT +*!* ENDIF +*!* IF !USED('xnote') +*!* USE &lcCaleDateMenu.xnote IN 0 ALIAS xnote +*!* ENDIF +*!* modificare v 2.0.120 ^ + + 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 + + IF !USED('nom_meniu') + USE &lcCaleDateMenu.nom_meniu IN 0 ALIAS nom_meniu + ENDIF + + *!* modificare v 2.2.3 + If !Used('mila1') + Use &lcCaleDateMenu.mila1 In 0 Alias mila1 + endif + *!* modificare v 2.2.3 ^ + +*!* IF !USED('refaceri') +*!* USE &lcCaleDateMenu.refaceri IN 0 ALIAS refaceri +*!* ENDIF + +*!* IF !USED('tabela_fisa_cont') +*!* USE &lcCaleDateMenu.tabela_fisa_cont IN 0 ALIAS tabela_fisa_cont +*!* ENDIF + + *!* 03.09.2007 + *!* marius.mutu + CREATE CURSOR dual (dummy c(10)) + INSERT INTO dual (dummy) VALUES ("x") +ENDPROC && update_nomenclator \ No newline at end of file diff --git a/ROAGEST.ini.tmpl b/ROAGEST.ini.tmpl new file mode 100644 index 0000000..e0f2f55 --- /dev/null +++ b/ROAGEST.ini.tmpl @@ -0,0 +1,4 @@ +[Main] +UpdateFrequency=-1 +VersionUpdateUrl=http://SERVER/codeupdate/roagest/roagest.xml +DownloadPath=D:\ROA_RB\CODEUPDATE\ diff --git a/Rapoarte/Nefolosite/rap2_nir_marfuri.FRT b/Rapoarte/Nefolosite/rap2_nir_marfuri.FRT new file mode 100644 index 0000000..14100ae Binary files /dev/null and b/Rapoarte/Nefolosite/rap2_nir_marfuri.FRT differ diff --git a/Rapoarte/Nefolosite/rap2_nir_marfuri.frx b/Rapoarte/Nefolosite/rap2_nir_marfuri.frx new file mode 100644 index 0000000..c5f17fa Binary files /dev/null and b/Rapoarte/Nefolosite/rap2_nir_marfuri.frx differ diff --git a/Rapoarte/Nefolosite/rap2_nir_materiale.FRT b/Rapoarte/Nefolosite/rap2_nir_materiale.FRT new file mode 100644 index 0000000..a8d2bac Binary files /dev/null and b/Rapoarte/Nefolosite/rap2_nir_materiale.FRT differ diff --git a/Rapoarte/Nefolosite/rap2_nir_materiale.frx b/Rapoarte/Nefolosite/rap2_nir_materiale.frx new file mode 100644 index 0000000..0aeead5 Binary files /dev/null and b/Rapoarte/Nefolosite/rap2_nir_materiale.frx differ diff --git a/Rapoarte/Nefolosite/rap_bon_achi.frt b/Rapoarte/Nefolosite/rap_bon_achi.frt new file mode 100644 index 0000000..f677b61 Binary files /dev/null and b/Rapoarte/Nefolosite/rap_bon_achi.frt differ diff --git a/Rapoarte/Nefolosite/rap_bon_achi.frx b/Rapoarte/Nefolosite/rap_bon_achi.frx new file mode 100644 index 0000000..3eaf1dc Binary files /dev/null and b/Rapoarte/Nefolosite/rap_bon_achi.frx differ diff --git a/Rapoarte/Nefolosite/rap_nir_marfuri1.FRT b/Rapoarte/Nefolosite/rap_nir_marfuri1.FRT new file mode 100644 index 0000000..472d39f Binary files /dev/null and b/Rapoarte/Nefolosite/rap_nir_marfuri1.FRT differ diff --git a/Rapoarte/Nefolosite/rap_nir_marfuri1.frx b/Rapoarte/Nefolosite/rap_nir_marfuri1.frx new file mode 100644 index 0000000..ce64f41 Binary files /dev/null and b/Rapoarte/Nefolosite/rap_nir_marfuri1.frx differ diff --git a/Rapoarte/Nefolosite/rap_nir_materiale1.FRT b/Rapoarte/Nefolosite/rap_nir_materiale1.FRT new file mode 100644 index 0000000..586aec1 Binary files /dev/null and b/Rapoarte/Nefolosite/rap_nir_materiale1.FRT differ diff --git a/Rapoarte/Nefolosite/rap_nir_materiale1.frx b/Rapoarte/Nefolosite/rap_nir_materiale1.frx new file mode 100644 index 0000000..847befe Binary files /dev/null and b/Rapoarte/Nefolosite/rap_nir_materiale1.frx differ diff --git a/Rapoarte/Nefolosite/rap_nirtransfer_vanz2.FRT b/Rapoarte/Nefolosite/rap_nirtransfer_vanz2.FRT new file mode 100644 index 0000000..0153301 Binary files /dev/null and b/Rapoarte/Nefolosite/rap_nirtransfer_vanz2.FRT differ diff --git a/Rapoarte/Nefolosite/rap_nirtransfer_vanz2.frx b/Rapoarte/Nefolosite/rap_nirtransfer_vanz2.frx new file mode 100644 index 0000000..0290118 Binary files /dev/null and b/Rapoarte/Nefolosite/rap_nirtransfer_vanz2.frx differ diff --git a/Rapoarte/fisa.FRT b/Rapoarte/fisa.FRT new file mode 100644 index 0000000..476e4bd Binary files /dev/null and b/Rapoarte/fisa.FRT differ diff --git a/Rapoarte/fisa.frx b/Rapoarte/fisa.frx new file mode 100644 index 0000000..efa7d47 Binary files /dev/null and b/Rapoarte/fisa.frx differ diff --git a/Rapoarte/protocol.FRT b/Rapoarte/protocol.FRT new file mode 100644 index 0000000..1a13e2e Binary files /dev/null and b/Rapoarte/protocol.FRT differ diff --git a/Rapoarte/protocol.frx b/Rapoarte/protocol.frx new file mode 100644 index 0000000..2ce7146 Binary files /dev/null and b/Rapoarte/protocol.frx differ diff --git a/Rapoarte/pv_prod.FRT b/Rapoarte/pv_prod.FRT new file mode 100644 index 0000000..6ce1b4a Binary files /dev/null and b/Rapoarte/pv_prod.FRT differ diff --git a/Rapoarte/pv_prod.frx b/Rapoarte/pv_prod.frx new file mode 100644 index 0000000..5075814 Binary files /dev/null and b/Rapoarte/pv_prod.frx differ diff --git a/Rapoarte/rap_centralizator_iesiri.FRT b/Rapoarte/rap_centralizator_iesiri.FRT new file mode 100644 index 0000000..298e1ef Binary files /dev/null and b/Rapoarte/rap_centralizator_iesiri.FRT differ diff --git a/Rapoarte/rap_centralizator_iesiri.frx b/Rapoarte/rap_centralizator_iesiri.frx new file mode 100644 index 0000000..4549553 Binary files /dev/null and b/Rapoarte/rap_centralizator_iesiri.frx differ diff --git a/Rapoarte/rap_centralizator_iesiri2.FRT b/Rapoarte/rap_centralizator_iesiri2.FRT new file mode 100644 index 0000000..b7779c0 Binary files /dev/null and b/Rapoarte/rap_centralizator_iesiri2.FRT differ diff --git a/Rapoarte/rap_centralizator_iesiri2.frx b/Rapoarte/rap_centralizator_iesiri2.frx new file mode 100644 index 0000000..67043df Binary files /dev/null and b/Rapoarte/rap_centralizator_iesiri2.frx differ diff --git a/Rapoarte/rap_centralizator_intrari.FRT b/Rapoarte/rap_centralizator_intrari.FRT new file mode 100644 index 0000000..db6ff66 Binary files /dev/null and b/Rapoarte/rap_centralizator_intrari.FRT differ diff --git a/Rapoarte/rap_centralizator_intrari.frx b/Rapoarte/rap_centralizator_intrari.frx new file mode 100644 index 0000000..d81c4f8 Binary files /dev/null and b/Rapoarte/rap_centralizator_intrari.frx differ diff --git a/Rapoarte/rap_centralizator_intrari2.FRT b/Rapoarte/rap_centralizator_intrari2.FRT new file mode 100644 index 0000000..1cf71f0 Binary files /dev/null and b/Rapoarte/rap_centralizator_intrari2.FRT differ diff --git a/Rapoarte/rap_centralizator_intrari2.frx b/Rapoarte/rap_centralizator_intrari2.frx new file mode 100644 index 0000000..3944f9e Binary files /dev/null and b/Rapoarte/rap_centralizator_intrari2.frx differ diff --git a/Rapoarte/rap_descarcare.FRT b/Rapoarte/rap_descarcare.FRT new file mode 100644 index 0000000..8a2a57e Binary files /dev/null and b/Rapoarte/rap_descarcare.FRT differ diff --git a/Rapoarte/rap_descarcare.frx b/Rapoarte/rap_descarcare.frx new file mode 100644 index 0000000..5cf0da1 Binary files /dev/null and b/Rapoarte/rap_descarcare.frx differ diff --git a/Rapoarte/rap_fisa_magazie_fifo.FRT b/Rapoarte/rap_fisa_magazie_fifo.FRT new file mode 100644 index 0000000..79df22f Binary files /dev/null and b/Rapoarte/rap_fisa_magazie_fifo.FRT differ diff --git a/Rapoarte/rap_fisa_magazie_fifo.frx b/Rapoarte/rap_fisa_magazie_fifo.frx new file mode 100644 index 0000000..5384b49 Binary files /dev/null and b/Rapoarte/rap_fisa_magazie_fifo.frx differ diff --git a/Rapoarte/rap_gest_val_subgrupe.FRT b/Rapoarte/rap_gest_val_subgrupe.FRT new file mode 100644 index 0000000..c91aacc Binary files /dev/null and b/Rapoarte/rap_gest_val_subgrupe.FRT differ diff --git a/Rapoarte/rap_gest_val_subgrupe.frx b/Rapoarte/rap_gest_val_subgrupe.frx new file mode 100644 index 0000000..898d76b Binary files /dev/null and b/Rapoarte/rap_gest_val_subgrupe.frx differ diff --git a/Rapoarte/rap_gest_val_subgrupe_gestc.FRT b/Rapoarte/rap_gest_val_subgrupe_gestc.FRT new file mode 100644 index 0000000..1081846 Binary files /dev/null and b/Rapoarte/rap_gest_val_subgrupe_gestc.FRT differ diff --git a/Rapoarte/rap_gest_val_subgrupe_gestc.frx b/Rapoarte/rap_gest_val_subgrupe_gestc.frx new file mode 100644 index 0000000..c6d6f27 Binary files /dev/null and b/Rapoarte/rap_gest_val_subgrupe_gestc.frx differ diff --git a/Rapoarte/rap_inchidere_k.FRT b/Rapoarte/rap_inchidere_k.FRT new file mode 100644 index 0000000..3489081 Binary files /dev/null and b/Rapoarte/rap_inchidere_k.FRT differ diff --git a/Rapoarte/rap_inchidere_k.frx b/Rapoarte/rap_inchidere_k.frx new file mode 100644 index 0000000..ef4b409 Binary files /dev/null and b/Rapoarte/rap_inchidere_k.frx differ diff --git a/Rapoarte/rap_instiintaripret.FRT b/Rapoarte/rap_instiintaripret.FRT new file mode 100644 index 0000000..eae4724 Binary files /dev/null and b/Rapoarte/rap_instiintaripret.FRT differ diff --git a/Rapoarte/rap_instiintaripret.frx b/Rapoarte/rap_instiintaripret.frx new file mode 100644 index 0000000..14487e6 Binary files /dev/null and b/Rapoarte/rap_instiintaripret.frx differ diff --git a/Rapoarte/rap_marfuri_lista_centr.FRT b/Rapoarte/rap_marfuri_lista_centr.FRT new file mode 100644 index 0000000..147acfa Binary files /dev/null and b/Rapoarte/rap_marfuri_lista_centr.FRT differ diff --git a/Rapoarte/rap_marfuri_lista_centr.frx b/Rapoarte/rap_marfuri_lista_centr.frx new file mode 100644 index 0000000..00358b8 Binary files /dev/null and b/Rapoarte/rap_marfuri_lista_centr.frx differ diff --git a/Rapoarte/rap_marfuri_lista_desf.FRT b/Rapoarte/rap_marfuri_lista_desf.FRT new file mode 100644 index 0000000..a8a528c Binary files /dev/null and b/Rapoarte/rap_marfuri_lista_desf.FRT differ diff --git a/Rapoarte/rap_marfuri_lista_desf.frx b/Rapoarte/rap_marfuri_lista_desf.frx new file mode 100644 index 0000000..996dc0b Binary files /dev/null and b/Rapoarte/rap_marfuri_lista_desf.frx differ diff --git a/Rapoarte/rap_marfuri_lista_valoric.FRT b/Rapoarte/rap_marfuri_lista_valoric.FRT new file mode 100644 index 0000000..6a7c091 Binary files /dev/null and b/Rapoarte/rap_marfuri_lista_valoric.FRT differ diff --git a/Rapoarte/rap_marfuri_lista_valoric.frx b/Rapoarte/rap_marfuri_lista_valoric.frx new file mode 100644 index 0000000..5a9a4f3 Binary files /dev/null and b/Rapoarte/rap_marfuri_lista_valoric.frx differ diff --git a/Rapoarte/rap_nirtransfer_achi.FRT b/Rapoarte/rap_nirtransfer_achi.FRT new file mode 100644 index 0000000..da7d90a Binary files /dev/null and b/Rapoarte/rap_nirtransfer_achi.FRT differ diff --git a/Rapoarte/rap_nirtransfer_achi.frx b/Rapoarte/rap_nirtransfer_achi.frx new file mode 100644 index 0000000..02bc64a Binary files /dev/null and b/Rapoarte/rap_nirtransfer_achi.frx differ diff --git a/Rapoarte/rap_rul_centralizator_consum_lucrari.FRT b/Rapoarte/rap_rul_centralizator_consum_lucrari.FRT new file mode 100644 index 0000000..ee861bb Binary files /dev/null and b/Rapoarte/rap_rul_centralizator_consum_lucrari.FRT differ diff --git a/Rapoarte/rap_rul_centralizator_consum_lucrari.frx b/Rapoarte/rap_rul_centralizator_consum_lucrari.frx new file mode 100644 index 0000000..49920d7 Binary files /dev/null and b/Rapoarte/rap_rul_centralizator_consum_lucrari.frx differ diff --git a/Rapoarte/rap_rul_consum_lucrari_articole.FRT b/Rapoarte/rap_rul_consum_lucrari_articole.FRT new file mode 100644 index 0000000..5b838d9 Binary files /dev/null and b/Rapoarte/rap_rul_consum_lucrari_articole.FRT differ diff --git a/Rapoarte/rap_rul_consum_lucrari_articole.frx b/Rapoarte/rap_rul_consum_lucrari_articole.frx new file mode 100644 index 0000000..c90e37b Binary files /dev/null and b/Rapoarte/rap_rul_consum_lucrari_articole.frx differ diff --git a/Rapoarte/rap_stoc_obinv.FRT b/Rapoarte/rap_stoc_obinv.FRT new file mode 100644 index 0000000..759cb82 Binary files /dev/null and b/Rapoarte/rap_stoc_obinv.FRT differ diff --git a/Rapoarte/rap_stoc_obinv.frx b/Rapoarte/rap_stoc_obinv.frx new file mode 100644 index 0000000..45e4cbc Binary files /dev/null and b/Rapoarte/rap_stoc_obinv.frx differ diff --git a/Rapoarte/rap_vanzari_comp_cant.FRT b/Rapoarte/rap_vanzari_comp_cant.FRT new file mode 100644 index 0000000..5aa8564 Binary files /dev/null and b/Rapoarte/rap_vanzari_comp_cant.FRT differ diff --git a/Rapoarte/rap_vanzari_comp_cant.frx b/Rapoarte/rap_vanzari_comp_cant.frx new file mode 100644 index 0000000..17313c6 Binary files /dev/null and b/Rapoarte/rap_vanzari_comp_cant.frx differ diff --git a/Rapoarte/rap_vanzari_comp_val.FRT b/Rapoarte/rap_vanzari_comp_val.FRT new file mode 100644 index 0000000..7313278 Binary files /dev/null and b/Rapoarte/rap_vanzari_comp_val.FRT differ diff --git a/Rapoarte/rap_vanzari_comp_val.frx b/Rapoarte/rap_vanzari_comp_val.frx new file mode 100644 index 0000000..96b1335 Binary files /dev/null and b/Rapoarte/rap_vanzari_comp_val.frx differ diff --git a/Rapoarte/rap_vanzari_web.FRT b/Rapoarte/rap_vanzari_web.FRT new file mode 100644 index 0000000..7a5da32 Binary files /dev/null and b/Rapoarte/rap_vanzari_web.FRT differ diff --git a/Rapoarte/rap_vanzari_web.frx b/Rapoarte/rap_vanzari_web.frx new file mode 100644 index 0000000..a8270a5 Binary files /dev/null and b/Rapoarte/rap_vanzari_web.frx differ diff --git a/Rapoarte/rap_vechime_stocuri.FRT b/Rapoarte/rap_vechime_stocuri.FRT new file mode 100644 index 0000000..15b967a Binary files /dev/null and b/Rapoarte/rap_vechime_stocuri.FRT differ diff --git a/Rapoarte/rap_vechime_stocuri.frx b/Rapoarte/rap_vechime_stocuri.frx new file mode 100644 index 0000000..83b0cbb Binary files /dev/null and b/Rapoarte/rap_vechime_stocuri.frx differ diff --git a/Rapoarte/test_report_listener.prg b/Rapoarte/test_report_listener.prg new file mode 100644 index 0000000..de3f6ae --- /dev/null +++ b/Rapoarte/test_report_listener.prg @@ -0,0 +1,34 @@ +_reportpreview = "D:\ROA_RB\ROAGEST\reportpreview.app" + +SET PROCEDURE TO d:\roa_rb\roagest\comun\programe\oproceduri_comune.prg ADDITIVE +x = SQLCONNECT("roa_romfast2","wert","123") +lcSql = [SELECT GROUPING_ID(NRORD, DENUMIRE) AS GID, ] + ; +[ NRORD, ] + ; +[ DENUMIRE, ] + ; +[ SUM(cante) as Iesiri, ] + ; +[ SUM(cante * pret) as Valoare_iesiri_ach_ ] + ; +[ FROM vrul ] + ; +[ WHERE (AN * 12 + LUNA BETWEEN 24085 AND 24089) ] + ; +[ AND ((CANTE > 0 AND ID_TIP_RULAJ = 0)) ] + ; +[ GROUP BY ROLLUP(NRORD, DENUMIRE) ] + ; +[ ORDER BY NRORD, DENUMIRE, GID, NRORD, DENUMIRE ] +lnSucces = SQLEXEC(x, lcSql, "crsRul") +IF lnSucces < 0 + AERROR(ERR) + MESSAGEBOX(ERR(3)) +ENDIF +SQLDISCONNECT(x) +IF USED('CRSRUL') + SELECT IIF(GID > 0, "TOTAL", SPACE(5)) AS EXPLICATIE, * FROM CRSRUL INTO CURSOR CRSRAPORT +ENDIF +PCTITLU = "" +PCSUBTITLU = "" +GCANTET = "" +GCCOPYRIGHT = "" +GNPA = 2 +GNPCANT = 3 +PCDATAORA = TRANSFORM(DATETIME()) +loListener = NEWOBJECT('EffectsListener', 'd:\roa_rb\roagest\comun\programe\reports\dynamicformatting.prg') +loListener.OUTPUTTYPE = 1 +REPORT FORM "d:\roa_rb\roagest\rapoarte\rap_rul_consum_lucrari.frx" OBJECT loListener + diff --git a/ReportOutput.app b/ReportOutput.app new file mode 100644 index 0000000..0a38a48 Binary files /dev/null and b/ReportOutput.app differ diff --git a/ReportPreview.app b/ReportPreview.app new file mode 100644 index 0000000..d061d09 Binary files /dev/null and b/ReportPreview.app differ diff --git a/actualizare_tva_24.tst b/actualizare_tva_24.tst new file mode 100644 index 0000000..018756a --- /dev/null +++ b/actualizare_tva_24.tst @@ -0,0 +1,311 @@ +PL/SQL Developer Test script 3.0 +307 +create or replace procedure actualizare_stoc_072010 (V_PRET_CU_TVA_IDENTIC IN NUMBER DEFAULT 0) as +begin + -- 20.04.2010 ANUNT Z ORA 24 ^ + + lnAn := extract(year from sysdate); + lnLuna := extract(month from sysdate); + ldDataAct := trunc(sysdate); + ldDataIreg := trunc(sysdate); + ldDataScad := trunc(sysdate); + ldDataCurs := trunc(sysdate); + + + pack_sesiune.setAn(lnAn); + pack_sesiune.setLuna(lnLuna); + + select MAX(ID_FDOC) INTO lnIdFdoc + from nom_fdoc + where fel_document = 'NOTA' AND STERS = 0 AND INACTIV = 0; +lnNrAct = 201007010000; +lnNNir = 201007010000; + +lnIdMonedaNationala := pack_def.GetIdMonedaNationala(); + + for item in (select distinct s.id_gestiune, g.nr_pag, g.id_sucursala, id_sectie, acont_adaos) + from stoc s + join nom_gestiuni g + on s.id_Gestiune = g.id_gestiune + where s.an = lnAn + and s.luna = lnLuna + and g.nr_pag in (6, 7)) loop + +lnNrAct = lnNrAct + 1; +lnNNir = lnNNir + 1; +--1: 19% ---------------------------------------------------- +--2: 24% PRETUL CU TVA CRESTE (PRETUL FARA TVA RAMANE LA FEL, TVA-UL CRESTE) +--3: 24% PRETUL CU TVA RAMANE LA FEL (PRETUL FARA TVA SCADE, TVA-UL CRESTE) +for item_act in +(SELECT a.id_gestiune, g.nr_pag, a.cont, a.acont, apg.id_part, apg1.id_part as id_part378, + sum(pack_sesiune.calculeaza_total_fara_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,proc_tvav,2)) as valoare_fara_tva_1, + sum(pack_sesiune.calculeaza_total_fara_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,proc_tvav,2) - + pack_sesiune.calculeaza_total_fara_tva(pret,0,1,0,0,cants+cant-cante,0,proc_tvav,2)) as adaos_1, + sum(pack_sesiune.calculeaza_total_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,proc_tvav,2)) as tva_1, + sum(pack_sesiune.calculeaza_total_fara_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,proc_tvav,2)) as valoare_fara_tva_2, + sum(pack_sesiune.calculeaza_total_fara_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,proc_tvav,2) - + pack_sesiune.calculeaza_total_fara_tva(pret,0,1,0,0,cants+cant-cante,0,proc_tvav,2)) as adaos_2, + sum(pack_sesiune.calculeaza_total_tva(pretv,0,1,0,0,cants+cant-cante,0,1.24,2)) as tva_2, +sum(pack_sesiune.calculeaza_total_fara_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,1.24,2)) as valoare_fara_tva_3, + sum(pack_sesiune.calculeaza_total_fara_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,1.24,2) - + pack_sesiune.calculeaza_total_fara_tva(pret,0,1,0,0,cants+cant-cante,0,1.19,2)) as adaos_3, + sum(pack_sesiune.calculeaza_total_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,1.24,2)) as tva_3 + FROM stoc a join nom_gestiuni g on a.id_gestiune = g.id_gestiune + left join vasociere_parteneri_gestiuni apg on a.id_gestiune = apg.id_gestiune and a.cont = apg.cont + left join vasociere_parteneri_gestiuni apg1 on a.id_gestiune = apg1.id_gestiune and apg1.cont = '378' + where an = 2010 and luna = 6 and g.nr_pag in (6,7) and a.proc_tvav = 1.19 and a.cants+a.cant-a.cante <> 0 and id_gestiune = item.id_gestiune + GROUP BY a.id_gestiune, g.nr_pag, a.cont, a.acont +order by nr_pag, id_gestiune, a.cont, a.acont, apg.id_part, apg1.id_part) loop + +-- nr_pag = 7 -- nu sunt note contabile, suma = 0 +IF item.nr_pag = 7 then + -- 371 = 378 0 + insert into act_temp + (luna, an, dataireg, nract, dataact, explicatia, scd, ascd, scc, ascc, suma, nnir, id_util, dataora, id_set, id_partd, id_partc, id_sucursala, id_fdoc, id_gestin, id_gestout, id_valuta, proc_tva) + select lnLuna as luna, lnAn as an, ldDataIreg as dataireg, lnNrAct as nract, ldDataAct as dataact, + 'ADAOS 19' AS explicatia, item_act.cont AS scd, item_act.acont as ascd, '378' as scc, item.acont_adaos as ascc, + 0 as suma, lnNir as nnir, lnIdUtil as id_util, ldDataora as dataora, lnIdSet as id_set, + item_act.id_part as id_partd, item_act.id_part378 as id_partc, item.id_sucursala as id_sucursala, + lnIdFdoc as id_fdoc, item_act.id_gestiune as id_gestin, item_act.id_gestiune as id_gestout, + lnIdMonedaNationala as id_valuta, lnProcTVA19 as proc_tva; +else + lnAdaos19 := -item_act.adaos_1; + lnTVA19 := -item_act.tva_1; + if V_PRET_CU_TVA_IDENTIC = 1 THEN + lnAdaos24 := adaos_2; + lnTVA24 := tva_2; + ELSE + lnAdaos24 := adaos_3; + lnTVA24 := tva_3; + END IF; + -- 371 = 378 (adaos 19%) + insert into act_temp + (luna, an, dataireg, nract, dataact, explicatia, scd, ascd, scc, ascc, suma, nnir, id_util, dataora, id_set, id_partd, id_partc, id_sucursala, id_fdoc, id_gestin, id_gestout, id_valuta, proc_tva) + select lnLuna as luna, lnAn as an, ldDataIreg as dataireg, lnNrAct as nract, ldDataAct as dataact, + 'ADAOS 19%' AS explicatia, item_act.cont AS scd, item_act.acont as ascd, '378' as scc, item.acont_adaos as ascc, + lnAdaos19 as suma, lnNir as nnir, lnIdUtil as id_util, ldDataora as dataora, lnIdSet as id_set, + item_act.id_part as id_partd, item_act.id_part378 as id_partc, item.id_sucursala as id_sucursala, + lnIdFdoc as id_fdoc, item_act.id_gestiune as id_gestin, item_act.id_gestiune as id_gestout, + lnIdMonedaNationala as id_valuta, lnProcTVA19 as proc_tva; + + -- 371 = 4428 (tva 19%) + insert into act_temp + (luna, an, dataireg, nract, dataact, explicatia, scd, ascd, scc, ascc, suma, nnir, id_util, dataora, id_set, id_partd, id_partc, id_sucursala, id_fdoc, id_gestin, id_gestout, id_valuta, proc_tva) + select lnLuna as luna, lnAn as an, ldDataIreg as dataireg, lnNrAct as nract, ldDataAct as dataact, + 'TVA 19%' AS explicatia, item_act.cont AS scd, item_act.acont as ascd, '4428' as scc, '' as ascc, + lnTVA19 as suma, lnNir as nnir, lnIdUtil as id_util, ldDataora as dataora, lnIdSet as id_set, + item_act.id_part as id_partd, 0 as id_partc, item.id_sucursala as id_sucursala, + lnIdFdoc as id_fdoc, item_act.id_gestiune as id_gestin, item_act.id_gestiune as id_gestout, + lnIdMonedaNationala as id_valuta, lnProcTVA19 as proc_tva; + -- 371 = 378 adaos 24% + insert into act_temp + (luna, an, dataireg, nract, dataact, explicatia, scd, ascd, scc, ascc, suma, nnir, id_util, dataora, id_set, id_partd, id_partc, id_sucursala, id_fdoc, id_gestin, id_gestout, id_valuta, proc_tva) + select lnLuna as luna, lnAn as an, ldDataIreg as dataireg, lnNrAct as nract, ldDataAct as dataact, + 'ADAOS 24%' AS explicatia, item_act.cont AS scd, item_act.acont as ascd, '378' as scc, item.acont_adaos as ascc, + lnAdaos24 as suma, lnNir as nnir, lnIdUtil as id_util, ldDataora as dataora, lnIdSet as id_set, + item_act.id_part as id_partd, item_act.id_part378 as id_partc, item.id_sucursala as id_sucursala, + lnIdFdoc as id_fdoc, item_act.id_gestiune as id_gestin, item_act.id_gestiune as id_gestout, + lnIdMonedaNationala as id_valuta, lnProcTVA24 as proc_tva; + -- 371 = 4428 tva 24% + insert into act_temp + (luna, an, dataireg, nract, dataact, explicatia, scd, ascd, scc, ascc, suma, nnir, id_util, dataora, id_set, id_partd, id_partc, id_sucursala, id_fdoc, id_gestin, id_gestout, id_valuta, proc_tva) + select lnLuna as luna, lnAn as an, ldDataIreg as dataireg, lnNrAct as nract, ldDataAct as dataact, + 'TVA 24%' AS explicatia, item_act.cont AS scd, item_act.acont as ascd, '4428' as scc, '' as ascc, + lnTVA24 as suma, lnNir as nnir, lnIdUtil as id_util, ldDataora as dataora, lnIdSet as id_set, + item_act.id_part as id_partd, 0 as id_partc, item.id_sucursala as id_sucursala, + lnIdFdoc as id_fdoc, item_act.id_gestiune as id_gestin, item_act.id_gestiune as id_gestout, + lnIdMonedaNationala as id_valuta, lnProcTVA24 as proc_tva; +end if; +end loop; + + insert into rul_temp + (an, + luna, + cod, + nnir, + id_articol, + id_gestiune, + pret, + pretv, + tva, + tvav, + cant, + cante, + cont, + dataact, + pretd, + id_util, + dataora, + pretvtva, + acont, + datain, + dataout, + proc_tva, + proc_tvav, + id_tip_rulaj, + id_set, + id_sucursala, + id_rul_aux, + nract, + serie, + id_valuta, + serie_act, + lot, + adata_expirare, + id_part_rez, + id_lucrare_rez) + select an, + luna, + lnCod as cod, + lnNnir as nnir, + id_articol, + id_gestiune, + pret, + pretv, + tva, + tvav, + 0 as cant, + cants + cant - cante as cante, + cont, + to_date('01072010', 'ddmmyyyy') as dataact, + pretd, + lnIdUtil as id_util, + sysdate as dataora, + pretv + tvav as pretvtva, + acont, + datain, + dataout, + proc_tvav as proc_tva, + proc_tvav, + lnIdTipRulaj as id_tip_rulaj, + lnIdSet as id_set, + id_sucursala, + id_rul_aux, + lnNrAct as nract, + serie, + id_valuta, + null as serie_act, + lot, + adata_expirare, + id_part_rez, + id_lucrare_rez + from stoc + where an = lnAn + and luna = lnLuna + and proc_tvav = lnProcTva19 + and id_gestiune in + (select id_Gestiune from nom_gestiuni where nr_pag in (6, 7)); + + -- RULAJE 24% + insert into rul_temp + (an, + luna, + cod, + nnir, + id_articol, + id_gestiune, + pret, + pretv, + tva, + tvav, + cant, + cante, + cont, + dataact, + pretd, + id_util, + dataora, + pretvtva, + acont, + datain, + dataout, + proc_tva, + proc_tvav, + id_tip_rulaj, + id_set, + id_sucursala, + id_rul_aux, + nract, + serie, + id_valuta, + serie_act, + lot, + adata_expirare, + id_part_rez, + id_lucrare_rez) + select an, + luna, + lnCod as cod, + lnNnir as nnir, + id_articol, + id_gestiune, + pret, + CASE V_PRET_CU_TVA_IDENTIC + WHEN 1 THEN + pack_sesiune.calculeaza_pret_fara_tva(pretv + tvav, + 1, + null, + lnProcTVA24, + 1) + ELSE + PRETV + END AS PRETV tva, + CASE V_PRET_CU_TVA_IDENTIC + WHEN 1 THEN + pack_sesiune.calculeaza_pret_tva(pretv + tvav, + 1, + null, + lnProcTVA24, + 1) + ELSE + pack_sesiune.calculeaza_pret_tva(pretv, + 1, + null, + lnProcTVA24, + 0) + END as tvav, + cants + cant - cante as cant, + 0 as cante, + cont, + to_date('01072010', 'ddmmyyyy') as dataact, + pretd, + lnIdUtil as id_util, + sysdate as dataora, + pack_sesiune.calculeaza_pret_fara_tva(pretv + tvav, + 1, + null, + lnProcTVA24, + 1) + + pack_sesiune.calculeaza_pret_tva(pretv + tvav, + 1, + null, + lnProcTVA24, + 1) as pretvtva, + acont, + datain, + dataout, + proc_tvav as proc_tva, + lnProcTVA24 as proc_tvav, + lnIdTipRulaj as id_tip_rulaj, + lnIdSet as id_set, + id_sucursala, + id_rul_aux, + lnNrAct as nract, + serie, + id_valuta, + null as serie_act, + lot, + adata_expirare, + id_part_rez, + id_lucrare_rez + from stoc + where an = lnAn + and luna = lnLuna + and proc_tvav = lnProcTva19 + and id_gestiune in + (select id_Gestiune from nom_gestiuni where nr_pag in (6, 7)); + + end loop; +end; +0 +0 diff --git a/actualizare_tva_24.~tst b/actualizare_tva_24.~tst new file mode 100644 index 0000000..5ab1df6 --- /dev/null +++ b/actualizare_tva_24.~tst @@ -0,0 +1,258 @@ +PL/SQL Developer Test script 3.0 +254 +create or replace procedure actualizare_stoc_072010 (ID_FDOC act.id_fdoc%type) as +begin + -- 20.04.2010 ANUNT Z ORA 24 ^ + + lnAn := extract(year from sysdate); + lnLuna := extract(month from sysdate); + ldDataAct := trunc(sysdate); + ldDataIreg := trunc(sysdate); + ldDataScad := trunc(sysdate); + ldDataCurs := trunc(sysdate); + + + pack_sesiune.setAn(lnAn); + pack_sesiune.setLuna(lnLuna); + + lnIdFdoc := tnIdFdoc; + + for item in (select distinct s.id_gestiune, g.nr_pag, g.id_sucursala, id_sectie, acont_adaos) + from stoc s + join nom_gestiuni g + on s.id_Gestiune = g.id_gestiune + where s.an = lnAn + and s.luna = lnLuna + and g.nr_pag in (6, 7)) loop + +--1: 19% ---------------------------------------------------- +--2: 24% PRETUL CU TVA CRESTE (PRETUL FARA TVA RAMANE LA FEL, TVA-UL CRESTE) +--3: 24% PRETUL CU TVA RAMANE LA FEL (PRETUL FARA TVA SCADE, TVA-UL CRESTE) +for item_act in +(select id_gestiune, nr_pag, a.cont, a.acont, tip, +decode(tip, 1, '19 - original', 2, '24 - pret cu tva creste', 3, '24 - pret cu tva la fel') as explicatie, +decode (tip, 1, valoare_fara_tva_1, 2, valoare_fara_tva_2, valoare_fara_tva_3) as valoare_fara_tva, +decode (tip, 1, adaos_1, 2, adaos_2, adaos_3) as adaos, +decode (tip, 1, tva_1, 2, tva_2, tva_3) as tva +from +(SELECT a.id_gestiune, g.nr_pag, a.cont, a.acont, + sum(pack_sesiune.calculeaza_total_fara_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,proc_tvav,2)) as valoare_fara_tva_1, + sum(pack_sesiune.calculeaza_total_fara_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,proc_tvav,2) - + pack_sesiune.calculeaza_total_fara_tva(pret,0,1,0,0,cants+cant-cante,0,proc_tvav,2)) as adaos_1, + sum(pack_sesiune.calculeaza_total_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,proc_tvav,2)) as tva_1, + sum(pack_sesiune.calculeaza_total_fara_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,proc_tvav,2)) as valoare_fara_tva_2, + sum(pack_sesiune.calculeaza_total_fara_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,proc_tvav,2) - + pack_sesiune.calculeaza_total_fara_tva(pret,0,1,0,0,cants+cant-cante,0,proc_tvav,2)) as adaos_2, + sum(pack_sesiune.calculeaza_total_tva(pretv,0,1,0,0,cants+cant-cante,0,1.24,2)) as tva_2, +sum(pack_sesiune.calculeaza_total_fara_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,1.24,2)) as valoare_fara_tva_3, + sum(pack_sesiune.calculeaza_total_fara_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,1.24,2) - + pack_sesiune.calculeaza_total_fara_tva(pret,0,1,0,0,cants+cant-cante,0,1.19,2)) as adaos_3, + sum(pack_sesiune.calculeaza_total_tva(pretv+tvav,0,1,0,0,cants+cant-cante,1,1.24,2)) as tva_3 + FROM stoc a join nom_gestiuni g on a.id_gestiune = g.id_gestiune + where an = 2010 and luna = 6 and g.nr_pag in (6,7) and a.proc_tvav = 1.19 and a.cants+a.cant-a.cante <> 0 and id_gestiune = item.id_gestiune + GROUP BY a.id_gestiune, g.nr_pag, a.cont, a.acont) s1, + (SELECT ROWNUM tip +FROM ( SELECT 1 just_a_column + FROM dual + CONNECT BY LEVEL <= 3 + )) s2 +order by nr_pag, id_gestiune, a.cont, a.acont, tip) loop + + insert into act_temp + (luna, an, dataireg, nract, dataact, explicatia, scd, ascd, scc, ascc, suma, nnir, id_util, dataora, id_set, id_fact, id_partd, id_partc, id_sucursala, id_fdoc, sters, explicatia4, explicatia5, id_lucrare, id_gestin, id_gestout, id_valuta, proc_tva, id_ctr, id_jtva_coloana, serie_act) + + select lnLuna as luna, lnAn as an, ldDataIreg as dataireg, lnNrAct as nract, ldDataAct as dataact, + 'ADAOS 19' AS explicatia, '371' AS scd, ascd, scc, ascc, suma, nnir, id_util, dataora, id_set, id_fact, id_partd, id_partc, id_sucursala, id_fdoc, sters, explicatia4, explicatia5, id_lucrare, id_gestin, id_gestout, id_valuta, proc_tva, id_ctr, id_jtva_coloana, serie_act + +end loop; + insert into rul_temp + (an, + luna, + cod, + nnir, + id_articol, + id_gestiune, + pret, + pretv, + tva, + tvav, + cant, + cante, + cont, + dataact, + pretd, + id_util, + dataora, + pretvtva, + acont, + datain, + dataout, + proc_tva, + proc_tvav, + id_tip_rulaj, + id_set, + id_sucursala, + id_rul_aux, + nract, + serie, + id_valuta, + serie_act, + lot, + adata_expirare, + id_part_rez, + id_lucrare_rez) + select an, + luna, + lnCod as cod, + lnNnir as nnir, + id_articol, + id_gestiune, + pret, + pretv, + tva, + tvav, + 0 as cant, + cants + cant - cante as cante, + cont, + to_date('01072010', 'ddmmyyyy') as dataact, + pretd, + lnIdUtil as id_util, + sysdate as dataora, + pretv + tvav as pretvtva, + acont, + datain, + dataout, + proc_tvav as proc_tva, + proc_tvav, + lnIdTipRulaj as id_tip_rulaj, + lnIdSet as id_set, + id_sucursala, + id_rul_aux, + lnNrAct as nract, + serie, + id_valuta, + null as serie_act, + lot, + adata_expirare, + id_part_rez, + id_lucrare_rez + from stoc + where an = lnAn + and luna = lnLuna + and proc_tvav = lnProcTva19 + and id_gestiune in + (select id_Gestiune from nom_gestiuni where nr_pag in (6, 7)); + + -- RULAJE 24% + insert into rul_temp + (an, + luna, + cod, + nnir, + id_articol, + id_gestiune, + pret, + pretv, + tva, + tvav, + cant, + cante, + cont, + dataact, + pretd, + id_util, + dataora, + pretvtva, + acont, + datain, + dataout, + proc_tva, + proc_tvav, + id_tip_rulaj, + id_set, + id_sucursala, + id_rul_aux, + nract, + serie, + id_valuta, + serie_act, + lot, + adata_expirare, + id_part_rez, + id_lucrare_rez) + select an, + luna, + lnCod as cod, + lnNnir as nnir, + id_articol, + id_gestiune, + pret, + CASE V_PRET_CU_TVA_IDENTIC + WHEN 1 THEN + pack_sesiune.calculeaza_pret_fara_tva(pretv + tvav, + 1, + null, + lnProcTVA24, + 1) + ELSE + PRETV + END AS PRETV tva, + CASE V_PRET_CU_TVA_IDENTIC + WHEN 1 THEN + pack_sesiune.calculeaza_pret_tva(pretv + tvav, + 1, + null, + lnProcTVA24, + 1) + ELSE + pack_sesiune.calculeaza_pret_tva(pretv, + 1, + null, + lnProcTVA24, + 0) + END as tvav, + cants + cant - cante as cant, + 0 as cante, + cont, + to_date('01072010', 'ddmmyyyy') as dataact, + pretd, + lnIdUtil as id_util, + sysdate as dataora, + pack_sesiune.calculeaza_pret_fara_tva(pretv + tvav, + 1, + null, + lnProcTVA24, + 1) + + pack_sesiune.calculeaza_pret_tva(pretv + tvav, + 1, + null, + lnProcTVA24, + 1) as pretvtva, + acont, + datain, + dataout, + proc_tvav as proc_tva, + lnProcTVA24 as proc_tvav, + lnIdTipRulaj as id_tip_rulaj, + lnIdSet as id_set, + id_sucursala, + id_rul_aux, + lnNrAct as nract, + serie, + id_valuta, + null as serie_act, + lot, + adata_expirare, + id_part_rez, + id_lucrare_rez + from stoc + where an = lnAn + and luna = lnLuna + and proc_tvav = lnProcTva19 + and id_gestiune in + (select id_Gestiune from nom_gestiuni where nr_pag in (6, 7)); + + end loop; +end; +0 +0 diff --git a/changelog_roagest.txt b/changelog_roagest.txt new file mode 100644 index 0000000..3ed3c02 --- /dev/null +++ b/changelog_roagest.txt @@ -0,0 +1,6035 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config.fpw b/config.fpw new file mode 100644 index 0000000..d4b3745 --- /dev/null +++ b/config.fpw @@ -0,0 +1,40 @@ + + +SCREEN = OFF + + +_STARTUP = "" + +* to eliminate load time: +_BROWSER = "" +_SPELLCHK = "" +_GENMENU = "" +_GENGRAPH = "" +_GENXTAB = "" +_COVERAGE = "" +_SCCTEXT = "" +_CONVERTER = "" +_TRANSPORTER = "" +_BUILDER = "" +_WIZARD = "" + +* other special CONFIG.FPW settings you may wish to change: +* (these are the defaults) +MVCOUNT = 16384 && 1025 +OUTSHOW = ON + +* Set other global settings here if you like, for example: +RESOURCE = OFF +_THROTTLE = 0 + +* See the application object's SetDataSessionSets() method +* for some additional settings you +* may like to use in your config file. +* The following are not the default settings, +* (and ordinarily will be taken care of in the +* Load of private-session forms and formsets): +TALK = OFF +MULTILOCKS = ON +EXCLUSIVE = OFF +SAFETY = OFF +CODEPAGE = 1252 diff --git a/font.bat b/font.bat new file mode 100644 index 0000000..aff77dd --- /dev/null +++ b/font.bat @@ -0,0 +1,2 @@ +copy Code39M.TTF C:\WINDOWS\Fonts\Code39M.TTF +delete Code39M.TTF \ No newline at end of file diff --git a/program.ini.tmpl b/program.ini.tmpl new file mode 100644 index 0000000..ef049be --- /dev/null +++ b/program.ini.tmpl @@ -0,0 +1,4 @@ +[Main] +UpdateFrequency=-1 +VersionUpdateUrl=http://SERVER/codeupdate/roagest/roagest.xml +DownloadPath=D:\ROA_RB\CODEUPDATE\ \ No newline at end of file diff --git a/roagest.ARM b/roagest.ARM new file mode 100644 index 0000000..96c63e8 --- /dev/null +++ b/roagest.ARM @@ -0,0 +1,46 @@ + +[Project] +BackupKeyOptions=3 +BitmapSeconds=1 +CertificateCount=1 +Compression=0 +IniStyle=ArmadilloV3 +Language=English (US) +MessageLanguage1=English (US) +Name=faz +ShowLoading=0 +TargetFile=roagest.exe +Version=100 + +[Project#Certificate0] +BitmapSeconds=1 +Key=DEFAULT +KeyTypes=0x44 +Name=default + +[Project#Certificate0#ExpireType] +Revert=0 + +[Project#Certificate0#Nag] +ShowBefore=0 + +[Project#Certificate0#NagAfter] +ShowAfter=0 + +[Project#InterceptedLibs] +Lib0=+MSVBVM50.DLL +Lib1=+MSVBVM60.DLL +Lib2=+VFP5R.DLL +Lib3=+VFP6R.DLL +Lib4=+VFP7R.DLL +Lib5=+VFP8R.DLL +Lib6=+VFP9R.DLL +Lib7=+PBVM70.DLL +Lib8=+MSVCRT.DLL +Lib9=+PROJ.DLL +Lib10=+MSJAVA.DLL +Lib11=+OLE32.DLL +Lib12=+VDFVM8.DLL +Lib13=+MFC71.DLL +Lib14=-* +LibCount=15 diff --git a/roagest.PJT b/roagest.PJT new file mode 100644 index 0000000..84c458f Binary files /dev/null and b/roagest.PJT differ diff --git a/roagest.Stats b/roagest.Stats new file mode 100644 index 0000000..0a2fe36 --- /dev/null +++ b/roagest.Stats @@ -0,0 +1,11 @@ +[Sizes] +Compressed=9722831 +Certificates=287 +Bitmap=0 +CompressedResources=4608 +OriginalResources=4608 +Protected=10403840 +CompressedDataAfter=9714287 +UncompressedDataAfter=12378113 +PFSFiles=0 +ProtectedBy=4.40 (Public Build) diff --git a/roagest.pjx b/roagest.pjx new file mode 100644 index 0000000..4bdfdd2 Binary files /dev/null and b/roagest.pjx differ diff --git a/roagest_ref.CDX b/roagest_ref.CDX new file mode 100644 index 0000000..e2fe2cf Binary files /dev/null and b/roagest_ref.CDX differ diff --git a/roagest_ref.DBF b/roagest_ref.DBF new file mode 100644 index 0000000..e83fd8e Binary files /dev/null and b/roagest_ref.DBF differ diff --git a/roagest_ref.FPT b/roagest_ref.FPT new file mode 100644 index 0000000..c3ff4bd Binary files /dev/null and b/roagest_ref.FPT differ diff --git a/todo.txt b/todo.txt new file mode 100644 index 0000000..cbef254 --- /dev/null +++ b/todo.txt @@ -0,0 +1,29 @@ +OK inventar magazin - ultimul pret de achizitie este acum din luna precedenta din rulaj -> trebuie sa fie intrari in chiosc din stoc / iesiri din depozit +OK stoc - + coloana cod bare + +ok inventar magazin - inregistrari fara articole +ok inventar magazin - optiune initializare stoc faptic = 0/stoc scriptic +ok raport de gestiune - ordine inventar la data inventarului +ok inventar magazin - nu mai pun inregistrari cu golire stoc in act, doar in rul +NU inventar magazin - cate un cod pentru fiecare sucursala +ok configurare gestiuni - grupele de gestiuni sa fie ordonate alfabetic + +inventar magazin - inventar initial cu 19% in loc de 24%, preturile trebuie luate din liste de preturi in loc de ultimele preturi intrate cu 19% + +RAPORT DE GESTIUNI IN XLS (DISPECERI) +inventar partial - subgrupe de articole (cauta alfa - alege subgrupe) + +stoc - analitice gresite - golit stocul cu analitice gresite si pus cu analiticele bune - note de inventar +editare gestiuni - inainte_de_do_termin - sa poata sa iasa fara cont pe gestiune +* inventar - buton alegere documente de retur, diferente cantitative presa? neinregistrate la ora inceperii inventarului si care trebuie sa fie incluse in inventar. +* publicatiiserver_retur, publicatiiserver_diferente - trebuie sa importe o zi de mai multe ori, doar cu inregistrarile adaugate + +---------------------------------------------- +INVENTAR MAGAZIN NOU ++ TABEL GEST_INVENTAR_FAPTIC - SELECT ID_ARTICOL, SUM(CANTS+CANT-CANTE) AS STOC, PRETLISTA AS PRETVTVA FROM GEST_INVENTAR, CRM_POLITICI_PRET_ART +- fara pret de achizitie, stocuri negative +- o singura pozitie pe un articol +- la sfarsit se face verificare pentru articolele noi pentru care nu s-a gasit pretul de achizitie +- se face o diferenta inteligenta +------------------------------------------- +raport de gestiune - documentele importate intr-un inventar emise dupa inceperea inventarului sa apara inaintea inventarului \ No newline at end of file diff --git a/versiune_db.txt b/versiune_db.txt new file mode 100644 index 0000000..66cd2ea --- /dev/null +++ b/versiune_db.txt @@ -0,0 +1 @@ +2026_01_21_02 \ No newline at end of file