commit f0d5151c24fe8059ec41359d8ca7cf16ee663f1b Author: Marius Mutu Date: Wed Aug 26 12:49:21 2026 +0300 sync SVN r18058 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6b39516 --- /dev/null +++ b/.gitignore @@ -0,0 +1,81 @@ +# ============================================================================= +# Flux text FoxBin2Prg: git urmareste DOAR versiunile text .??2 (in arbore), +# nu binarele VFP. Binarele convertibile si indecsii regenerabili se ignora. +# SVN ramane sursa de adevar pentru binare (via global-ignores pe .??2). +# ============================================================================= + +# --- Binare VFP convertibile in text .??2 (ambele forme de caz) --- +*.vcx +*.VCX +*.vct +*.VCT +*.scx +*.SCX +*.sct +*.SCT +*.frx +*.FRX +*.frt +*.FRT +*.mnx +*.MNX +*.mnt +*.MNT +*.lbx +*.LBX +*.lbt +*.LBT +*.pjx +*.PJX +*.pjt +*.PJT +*.dbc +*.DBC +*.dct +*.DCT + +# --- Indecsi regenerabili (nu se transporta in .db2/.dc2) --- +*.cdx +*.CDX +*.dcx +*.DCX + +# --- Fisiere generate/compilate Visual FoxPro --- +*.fxp +*.FXP +*.mpr +*.MPR +*.mpx +*.MPX +*.vcr +*.VCR +*.src + +# --- Backup-uri si fisiere temporare create de editorul VFP --- +*.bak +*.BAK +*.tmp +*.TMP +*.err +*.ERR +*.Stats +*.stackdump + +# --- Stare locala / specifica masinii, nu proiectului --- +FOXUSER.DBF +FOXUSER.FPT +log.txt +roapreturi.ARM +roapreturi.ERR +roapreturi.exe +roapreturi.Stats + +# --- Subversion (working copy paralela) --- +.svn/ + +# --- COMUN este SVN external (romfast/comun.git gestioneaza separat) --- +COMUN/ + +docs/diff_*.patch +.gstack/ +docs/local/ diff --git a/Clase/ofundal_preturi.vc2 b/Clase/ofundal_preturi.vc2 new file mode 100644 index 0000000..2aea727 --- /dev/null +++ b/Clase/ofundal_preturi.vc2 @@ -0,0 +1,106 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.21" SourceFile="ofundal_preturi.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* +* +DEFINE CLASS pg_meniu_princ AS pg_meniu OF "..\comun\clase\ofundal.vcx" + *< CLASSDATA: Baseclass="pageframe" Timestamp="" Scale="Pixels" Uniqueid="" /> + + *-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder + *< OBJECTDATA: ObjPath="Page1.Pict_meniu1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Page1.Cw1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Page1.Cw6" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Page1.Cw7" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Page1.Pict_liniuta2" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Page2.Pict_meniu1" UniqueID="" Timestamp="" /> + + * + ErasePage = .T. + Height = 256 + Name = "pg_meniu_princ" + PageCount = 2 + Themes = .F. + Width = 799 + Page1.Caption = "Configurare" + Page1.Name = "Page1" + Page2.Caption = "" + Page2.Enabled = .F. + Page2.Name = "Page2" + * + + ADD OBJECT 'Page1.Cw1' AS cw WITH ; + Left = 3, ; + Name = "Cw1", ; + TabIndex = 3, ; + Top = 22, ; + Label_item1.Caption = "Catalog de articole", ; + Label_item1.Name = "Label_item1" + *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> + + ADD OBJECT 'Page1.Cw6' AS cw WITH ; + Height = 20, ; + Left = 3, ; + Name = "Cw6", ; + TabIndex = 4, ; + Top = 76, ; + Width = 117, ; + Label_item1.Caption = "Liste de preturi", ; + Label_item1.Name = "Label_item1" + *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> + + ADD OBJECT 'Page1.Cw7' AS cw WITH ; + Height = 20, ; + Left = 3, ; + Name = "Cw7", ; + nid_cw = 8, ; + ntip = 1, ; + TabIndex = 1, ; + Top = 49, ; + Width = 117, ; + Label_item1.Caption = "Note de vanzari", ; + Label_item1.Name = "Label_item1" + *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> + + ADD OBJECT 'Page1.Pict_liniuta2' AS pict_liniuta WITH ; + Left = 3, ; + Name = "Pict_liniuta2", ; + Picture = ..\comun\grafice\f3.jpg, ; + Top = 101 + *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="image" /> + + ADD OBJECT 'Page1.Pict_meniu1' AS pict_meniu WITH ; + Anchor = 7, ; + Height = 553, ; + Left = 0, ; + Name = "Pict_meniu1", ; + Picture = ..\grafice\f2.jpg, ; + Top = 8, ; + Width = 133 + *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="image" /> + + ADD OBJECT 'Page2.Pict_meniu1' AS pict_meniu WITH ; + Anchor = 7, ; + Left = 0, ; + Name = "Pict_meniu1", ; + Picture = ..\grafice\f2.jpg, ; + Top = 8 + *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="image" /> + + PROCEDURE Page1.Cw1.do_actiune + Do viz_catalog_articole In onom_preturi.prg + ENDPROC + + PROCEDURE Page1.Cw6.do_actiune + Do viz_politici In onom_preturi.prg + + ENDPROC + + PROCEDURE Page1.Cw7.do_actiune + * DO viz_note_vanzari IN onom_preturi.prg + LOCAL llCRM + llCRM = .T. + DO configurare_note WITH llCRM IN omeniu_initializari.prg + ENDPROC + +ENDDEFINE diff --git a/Clase/ofundal_roapreturi.vc2 b/Clase/ofundal_roapreturi.vc2 new file mode 100644 index 0000000..2c28873 --- /dev/null +++ b/Clase/ofundal_roapreturi.vc2 @@ -0,0 +1,339 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.21" SourceFile="ofundal_roapreturi.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* +* +DEFINE CLASS pagefr AS pg_meniu OF "..\comun\clase\ofundal.vcx" + *< CLASSDATA: Baseclass="pageframe" Timestamp="" Scale="Pixels" Uniqueid="" /> + + * + ErasePage = .T. + Height = 177 + Name = "pagefr" + PageCount = 2 + Themes = .F. + Width = 428 + Page1.Caption = "Configurare" + Page1.Name = "Page1" + Page2.Caption = "" + Page2.Name = "Page2" + * + +ENDDEFINE + +DEFINE CLASS princ AS ffergen OF "..\comun\clase\_frm_base.vcx" + *< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" /> + + *-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder + *< OBJECTDATA: ObjPath="Image2" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Pagefr1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Pagefr1.Page1.shape1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Pagefr1.Page1.Cw2" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Pagefr1.Page1.Cw1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Pagefr1.Page1.Cw3" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Pagefr1.Page2.Cw3" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Image1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="lb_utilizator" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Imagine01" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="lb_utilizator1" UniqueID="" Timestamp="" /> + + * + AlwaysOnTop = .F. + BackColor = 255,255,255 + BorderStyle = 0 + ControlBox = .F. + DoCreate = .T. + Left = 0 + Name = "princ" + ShowTips = .T. + Top = 0 + WindowState = 2 + * + + ADD OBJECT 'Image1' AS image WITH ; + Anchor = 12, ; + Height = 220, ; + Left = 182, ; + Name = "Image1", ; + Picture = ..\grafice\roapreturi.bmp, ; + Top = 195, ; + Width = 556, ; + ZOrderSet = 2 + *< END OBJECT: BaseClass="image" /> + + ADD OBJECT 'Image2' AS image WITH ; + Anchor = 11, ; + BackStyle = 1, ; + Height = 63, ; + Left = 0, ; + Name = "Image2", ; + Picture = ..\comun\grafice\f1.jpg, ; + Stretch = 2, ; + Top = 0, ; + Width = 804, ; + ZOrderSet = 0 + *< END OBJECT: BaseClass="image" /> + + ADD OBJECT 'Imagine01' AS imagine WITH ; + ccod = A03, ; + Height = 54, ; + Left = 9, ; + Name = "Imagine01", ; + nid_img = 1, ; + picturedown = lista2.bmp, ; + pictureup = lista1.bmp, ; + ToolTipText = "Drepturi de acces la listele de preturi", ; + Top = 1, ; + Width = 45 + *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="image" /> + + ADD OBJECT 'lb_utilizator' AS lb_simplu WITH ; + Anchor = 9, ; + Caption = "Operator:", ; + FontItalic = .T., ; + ForeColor = 255,255,255, ; + Left = 457, ; + Name = "lb_utilizator", ; + Top = 9, ; + ZOrderSet = 4 + *< END OBJECT: ClassLib="..\comun\clase\lb.vcx" BaseClass="label" /> + + ADD OBJECT 'lb_utilizator1' AS lb_simplu WITH ; + Anchor = 9, ; + Caption = "nume_utilizator", ; + FontBold = .T., ; + FontItalic = .T., ; + ForeColor = 255,255,255, ; + Left = 513, ; + Name = "lb_utilizator1", ; + Top = 9, ; + Visible = .F., ; + ZOrderSet = 5 + *< END OBJECT: ClassLib="..\comun\clase\lb.vcx" BaseClass="label" /> + + ADD OBJECT 'Pagefr1' AS pagefr WITH ; + ErasePage = .T., ; + Height = 475, ; + Left = -1, ; + Name = "Pagefr1", ; + Top = 59, ; + Width = 804, ; + Page1.Name = "Page1", ; + Page2.Caption = "Liste de prețuri", ; + Page2.Name = "Page2" + *< END OBJECT: ClassLib="ofundal_roapreturi.vcx" BaseClass="pageframe" /> + + ADD OBJECT 'Pagefr1.Page1.Cw1' AS cw WITH ; + Left = 4, ; + Name = "Cw1", ; + nid_cw = 1, ; + ntip = 1, ; + TabIndex = 3, ; + Top = 12, ; + ZOrderSet = 4, ; + LABEL_ITEM1.Caption = "Catalog de articole", ; + LABEL_ITEM1.Name = "LABEL_ITEM1" + *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> + + ADD OBJECT 'Pagefr1.Page1.Cw2' AS cw WITH ; + Height = 20, ; + Left = 4, ; + Name = "Cw2", ; + nid_cw = 2, ; + ntip = 1, ; + TabIndex = 1, ; + Top = 39, ; + Width = 117, ; + ZOrderSet = 2, ; + LABEL_ITEM1.Caption = "Note de vânzări", ; + LABEL_ITEM1.Name = "LABEL_ITEM1" + *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> + + ADD OBJECT 'Pagefr1.Page1.Cw3' AS cw WITH ; + Height = 31, ; + Left = 4, ; + Name = "Cw3", ; + nid_cw = 3, ; + ntip = 1, ; + TabIndex = 1, ; + Top = 67, ; + Width = 117, ; + ZOrderSet = 2, ; + Label_item1.Caption = "Drepturi de acces la listele de prețuri", ; + Label_item1.Height = 30, ; + Label_item1.Left = 5, ; + Label_item1.Name = "Label_item1", ; + Label_item1.Top = 1, ; + Label_item1.Width = 99, ; + Label_item1.WordWrap = .T. + *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> + + ADD OBJECT 'Pagefr1.Page1.shape1' AS pict_meniu WITH ; + Anchor = 7, ; + Height = 420, ; + Left = 0, ; + Name = "shape1", ; + Picture = ..\comun\grafice\f2.jpg, ; + Top = -4, ; + Width = 133 + *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="image" /> + + ADD OBJECT 'Pagefr1.Page2.Cw3' AS cw WITH ; + Height = 20, ; + Left = 12, ; + Name = "Cw3", ; + nid_cw = 1, ; + ntip = 4, ; + TabIndex = 4, ; + Top = 45, ; + Width = 117, ; + ZOrderSet = 3, ; + Label_item1.Caption = "Liste de preturi", ; + Label_item1.Name = "Label_item1" + *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> + + PROCEDURE RightClick + Thisform.image1.RightClick() + ENDPROC + + PROCEDURE Show + Lparameters nStyle + + *!* verifica_drepturi('oprinc','pagefr1') + + * comentat 15.09.2006 + *!* Local lnScrH,lnScrW + + *!* _SCREEN.HEIGHT = THISFORM.HEIGHT + *!* _SCREEN.WIDTH = THISFORM.WIDTH + + *!* _Screen.AutoCenter=.T. + *!* _Screen.Refresh + *!* Thisform.Left=0 + *!* Thisform.Top=0 + + + ***** + Local w,h + w=_Screen.Width + h=_Screen.Height + + This.Width = w + This.Height = h + + *!* This.image1.Left=w-This.image1.Width + *!* This.image1.Top=h-This.image1.Height + *!* This.lb_utilizator.Top=h-This.lb_utilizator.Height + *!* This.lb_utilizator1.Top=h-This.lb_utilizator1.Height + *!* This.image2.Width = w + 180 + + With This.pagefr1 + .Width = w + .Height = h + .page1.shape1.Height = h + ENDWITH + + + + ENDPROC + + PROCEDURE Image1.RightClick + Do start_firma In ostartfirma.prg + + ** Initializez gnRon corespunzator lunii in care am intrat + Local lcLunaRon, lcAnulRon, lnValue, lcExec, lnSucces, lcTextEroare + lcLunaRon = Substr(gcDataRon,1,2) + lcAnulRon = Substr(gcDataRon,4,4) + If gnAn * 12 + gnLuna < Val(lcAnulRon) * 12 + Val(lcLunaRon) + lnValue = 2 + Else + lnValue = 1 + Endif + + lcExec = [update optiuni set varvalue = ] + Alltrim(Str(lnValue)) + [ where varname = 'RON'] + + lnSucces = goExecutor.oExecute(lcExec) + If lnSucces < 0 + lcTextEroare = goExecutor.cEroare + aMessagebox(lcTextEroare,48,"Eroare") + Return + Endif + + Do oinit_optiuni.prg + ** + + verifica_drepturi('oprinc','pagefr1') + + + + ENDPROC + + PROCEDURE Imagine01.do_actiune + LOCAL llCRM + llCRM = .T. + DO acces_liste IN omeniu_initializari.prg + ENDPROC + + PROCEDURE Pagefr1.Page1.Cw1.do_actiune + Do viz_catalog_articole In oproceduri_articole.prg + ENDPROC + + PROCEDURE Pagefr1.Page1.Cw2.do_actiune + * DO viz_note_vanzari IN onom_preturi.prg + LOCAL llCRM + llCRM = .T. + DO configurare_note WITH llCRM IN omeniu_initializari.prg + ENDPROC + + PROCEDURE Pagefr1.Page1.Cw3.do_actiune + * DO viz_note_vanzari IN onom_preturi.prg + LOCAL llCRM + llCRM = .T. + DO acces_liste IN omeniu_initializari.prg + ENDPROC + + PROCEDURE Pagefr1.Page1.RightClick + Do start_firma In ostartfirma.prg + + ** Initializez gnRon corespunzator lunii in care am intrat + Local lcLunaRon, lcAnulRon, lnValue, lcExec, lnSucces, lcTextEroare + lcLunaRon = Substr(gcDataRon,1,2) + lcAnulRon = Substr(gcDataRon,4,4) + If gnAn * 12 + gnLuna < Val(lcAnulRon) * 12 + Val(lcLunaRon) + lnValue = 2 + Else + lnValue = 1 + Endif + + lcExec = [update optiuni set varvalue = ] + Alltrim(Str(lnValue)) + [ where varname = 'RON'] + + lnSucces = goExecutor.oExecute(lcExec) + If lnSucces < 0 + lcTextEroare = goExecutor.cEroare + aMessagebox(lcTextEroare,48,"Eroare") + Return + Endif + + Do oinit_optiuni.prg + ** + + verifica_drepturi('oprinc','pagefr1') + ENDPROC + + PROCEDURE Pagefr1.Page2.Click + Do viz_politici In onom_preturi.prg + thisform.pagefr1.page1.SetFocus + + ENDPROC + + PROCEDURE Pagefr1.Page2.Cw3.do_actiune + Do viz_politici In onom_preturi.prg + *!* thisform.pagefr1.page1.SetFocus + ENDPROC + + PROCEDURE Pagefr1.RightClick + Thisform.image1.RightClick() + ENDPROC + +ENDDEFINE diff --git a/Clase/onom_preturi.vc2 b/Clase/onom_preturi.vc2 new file mode 100644 index 0000000..9eec14c --- /dev/null +++ b/Clase/onom_preturi.vc2 @@ -0,0 +1,4542 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.21" SourceFile="onom_preturi.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* +* +DEFINE CLASS cus_odata_politici_pret AS _cusodatabase OF "..\comun\clase\_cus_odata_base.vcx" + *< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" /> + + * + Name = "cus_odata_politici_pret" + * + + PROCEDURE make_sql + Lparameters toRec,tnId + + lcActiune = Alltrim(This.cActiune) + lcId_util = Alltrim(Str(gnIdUtil)) + + If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O" + Return .F. + Endif + + If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N" + Return .F. + Endif + + If Inlist(lcActiune, "UPDATE",'DELETE') + lcId = Alltrim(Str(tnId)) + Endif + + If Inlist(lcActiune, "UPDATE",'INSERT') + lcNume = UPPER(ALLTRIM(toRec.nume_lista_preturi)) + lcDataI = ALLTRIM(DTOS(toRec.datai)) + lcDataS = ALLTRIM(DTOS(toRec.datas)) + lcIdValuta = ALLTRIM(STR(toRec.id_valuta)) + lcIdNota = ALLTRIM(STR(toRec.id_nota)) + lcIdSucursala = Iif(Empty(Nvl(torec.id_sucursala,[])),[NULL],ALLTRIM(STR(torec.id_sucursala))) + lcPreturi_cu_tva = ALLTRIM(STR(toRec.preturi_cu_tva)) + + *!* Select crspolitica_curenta + *!* lcSir=[] + *!* Scan + *!* lcSir = lcSir + NVL(ALLTRIM(STR(id_pol_art)),0) + [,] + Alltrim(Str(id_articol)) + [,] + Alltrim(NVL(um,[])) + ; + *!* [,] + Alltrim(Str(NVL(pret,0),20,gnPa)) + [,] +Alltrim(Str(NVL(proc_tvav,1),6,gnPa))+ ; + *!* [,] + ALLTRIM(STR(procent))+[;] + *!* ENDSCAN + *!* lnLen1 = INT(LEN(lcSir)/2) + *!* lcSir1 = LEFT(lcSir, lnLen1) + *!* lcSir2 = SUBSTR(lcSir, lnLen1+1) + ENDIF + + Do Case + Case lcActiune = "INSERT" + lcSql = [begin pack_preturi.adauga_politica(']+lcNume+[',]+; + [to_date(']+lcDataI+[','YYYYMMDD'),to_date(']+lcDataS+[','YYYYMMDD'),]+; + lcIdValuta+[,]+lcIdNota +[,]+lcPreturi_cu_tva +[,]+ ; + lcId_util+[,]+lcIdSucursala +[); end;] + + Case lcActiune = "UPDATE" + lcSql = [begin pack_preturi.modifica_politica(']+Alltrim(gcS)+[',]+lcId+[,']+lcNume+[',]+; + [to_date(']+lcDataI+[','YYYYMMDD'),to_date(']+lcDataS+[','YYYYMMDD'),]+; + lcIdValuta+[,]+lcIdNota +[,]+lcPreturi_cu_tva +[,] + ; + lcId_util+[); end;] + + Case lcActiune = "DELETE" + lcSql = [begin pack_preturi.sterge_politica(']+Alltrim(gcS)+[',]+lcId+[,]+lcId_util+[); end;] + + ENDCASE + + This.csql = lcSql + ENDPROC + +ENDDEFINE + +DEFINE CLASS cus_odata_politicigrupuri AS _cusodatabase OF "..\comun\clase\_cus_odata_base.vcx" + *< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" /> + + * + Name = "cus_odata_politicigrupuri" + * + + PROCEDURE make_sql + Lparameters toRec,tnId + + lcActiune = Alltrim(This.cActiune) + + If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O" + Return .F. + Endif + + If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N" + Return .F. + Endif + + If Inlist(lcActiune, "UPDATE",'DELETE') + lcId = Alltrim(Str(tnId)) + Endif + + If Inlist(lcActiune, "UPDATE",'INSERT') + lcid_grup = Nvl(ALLTRIM(STR(toRec.id_grup)),"null") + lcid_politica =Nvl(ALLTRIM(STR(toRec.id_politica)),"null") + lcinactiv = Nvl(ALLTRIM(STR(toRec.inactiv)),"0") + Endif + + + Do Case + Case lcActiune = "INSERT" + + lcSql = [INSERT INTO ] + gcS + [.POLITICI_GRUPURI (id_grup,id_politica,inactiv) VALUES (] + lcId_grup + [,] + lcid_politica +[,]+lcInactiv+ [)] + + Case lcActiune = "UPDATE" + + lcSql = [UPDATE ] + gcS + [.POLITICI_GRUPURI SET id_grup = ]+lcId_grup + [,inactiv = ] + lcinactiv + [,id_politica = ]+lcId_politica+[ where id_polgr = ] + lcId + + Case lcActiune = "DELETE" + + lcSql = [update POLITICI_GRUPURI set sters=1 where id_polgr=]+lcid + *!* lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;] + Endcase + This.csql = lcSql + + ENDPROC + +ENDDEFINE + +DEFINE CLASS frm_alege_articol AS _frmbase OF "..\comun\clase\_frm_base.vcx" + *< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" /> + + *-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder + *< OBJECTDATA: ObjPath="grid_pol_pret_art" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pol_pret_art.Column1.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pol_pret_art.Column1.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pol_pret_art.Column2.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pol_pret_art.Column2.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pol_pret_art.Column3.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pol_pret_art.Column3.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pol_pret_art.Column4.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pol_pret_art.Column4.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pol_pret_art.Column5.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pol_pret_art.Column5.Check1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="ck_nume_articol" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Cmd_reset1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Cmd_cauta1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="cboListe" UniqueID="" Timestamp="" /> + + * + cgridsortlist = grid_pol_pret_art + Desktop = .T. + DoCreate = .T. + Height = 545 + Name = "frm_alege_articol" + Width = 785 + _shape1.Height = 29 + _shape1.Left = 0 + _shape1.Name = "_shape1" + _shape1.Top = 0 + _shape1.Width = 792 + _shape2.Anchor = 9 + _shape2.Height = 29 + _shape2.Left = 721 + _shape2.Name = "_shape2" + _shape2.Top = 0 + _shape2.Width = 64 + Lb_titlu_alb_b121.Caption = "Articole - Liste - Preturi" + Lb_titlu_alb_b121.Left = 11 + Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121" + Lb_titlu_alb_b121.Top = 6 + BUT_TERMIN1.Anchor = 9 + BUT_TERMIN1.Left = 754 + BUT_TERMIN1.Name = "BUT_TERMIN1" + BUT_TERMIN1.Top = 1 + Gridsort1.Left = 180 + Gridsort1.Name = "Gridsort1" + Gridsort1.Top = 12 + * + + ADD OBJECT 'But_renunt1' AS but_renunt WITH ; + Anchor = 9, ; + Height = 27, ; + Left = 723, ; + Name = "But_renunt1", ; + TabIndex = 5, ; + Top = 1, ; + Width = 30 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'cboListe' AS combobox WITH ; + ColumnCount = 4, ; + ColumnLines = .F., ; + ColumnWidths = "200,65,60,0", ; + Height = 24, ; + Left = 11, ; + Name = "cboListe", ; + RowSource = "cListePret.nume_lista_preturi,datai,datas,id_pol", ; + RowSourceType = 2, ; + Style = 2, ; + Top = 36, ; + Width = 276 + *< END OBJECT: BaseClass="combobox" /> + + ADD OBJECT 'ck_nume_articol' AS ck_filtru_text WITH ; + Alignment = 0, ; + camp_nume = nume_articol, ; + Caption = "Articol", ; + FontCharSet = 238, ; + FontName = "Arial Narrow", ; + Left = 308, ; + Name = "ck_nume_articol", ; + TabIndex = 3, ; + Top = 37 + *< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" /> + + ADD OBJECT 'Cmd_cauta1' AS cmd_cauta WITH ; + Anchor = 8, ; + Left = 581, ; + Name = "Cmd_cauta1", ; + TabIndex = 6, ; + Top = 33 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'Cmd_reset1' AS cmd_reset WITH ; + Anchor = 8, ; + Left = 672, ; + Name = "Cmd_reset1", ; + TabIndex = 15, ; + Top = 33 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'grid_pol_pret_art' AS _grdrow WITH ; + Anchor = 15, ; + ColumnCount = 5, ; + DeleteMark = .F., ; + Height = 468, ; + Left = 11, ; + Name = "grid_pol_pret_art", ; + Panel = 1, ; + RecordSource = "crsArtAles", ; + Top = 66, ; + Width = 763, ; + Column1.ColumnOrder = 2, ; + Column1.ControlSource = "nume_articol", ; + Column1.Name = "Column1", ; + Column1.Width = 299, ; + Column2.ColumnOrder = 3, ; + Column2.ControlSource = "pret", ; + Column2.Format = "rk", ; + Column2.InputMask = (get_mask(20,MAX(gnPPretV,gnPVal))), ; + Column2.Name = "Column2", ; + Column2.Width = 74, ; + Column3.ColumnOrder = 1, ; + Column3.ControlSource = "nume_lista_preturi", ; + Column3.Name = "Column3", ; + Column3.Width = 279, ; + Column4.ColumnOrder = 4, ; + Column4.ControlSource = "nume_val", ; + Column4.Name = "Column4", ; + Column4.Width = 47, ; + Column5.ControlSource = "ales", ; + Column5.Name = "Column5", ; + Column5.Sparse = .F., ; + Column5.Width = 29 + *< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" /> + + ADD OBJECT 'grid_pol_pret_art.Column1.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Articol", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grid_pol_pret_art.Column1.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1" + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grid_pol_pret_art.Column2.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Pret", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grid_pol_pret_art.Column2.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1" + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grid_pol_pret_art.Column3.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Lista de preturi", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grid_pol_pret_art.Column3.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1" + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grid_pol_pret_art.Column4.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Valuta", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grid_pol_pret_art.Column4.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1" + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grid_pol_pret_art.Column5.Check1' AS checkbox WITH ; + Alignment = 0, ; + Caption = "", ; + Height = 17, ; + Left = 28, ; + Name = "Check1", ; + Top = 47, ; + Width = 60 + *< END OBJECT: BaseClass="checkbox" /> + + ADD OBJECT 'grid_pol_pret_art.Column5.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Ales", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + PROCEDURE actualizeaza_grid1 + Lparameters lcFiltru + If Empty(lcFiltru) + lcFiltru = poPol_pret_art.ca_baza1.cfiltru + Endif + Thisform.MousePointer= 11 + Thisform.LockScreen=.T. + save_grid_tag(Thisform.grid_pol_pret_art) + poPol_pret_art.ca_baza1.cfiltru=lcFiltru + poPol_pret_art.ca_baza1.afisare() + restore_grid_tag(Thisform.grid_pol_pret_art) + Thisform.LockScreen=.F. + Thisform.MousePointer= 0 + If Reccount('crsArtAles')>0 + Thisform.grid_pol_pret_art.SetFocus() + Endif + ENDPROC + + PROCEDURE do_cauta + Local lcFiltru + lcFiltru = [2=2] + + If Thisform.ck_nume_articol.Value=1 + lcFiltru = lcFiltru + Thisform.ck_nume_articol.filtru + ENDIF + + IF pnId_lista <> 0 + lcFiltru = lcFiltru + " and id_pol="+ALLTRIM(STR(pnId_lista)) + ENDIF + + Thisform.actualizeaza_grid1(lcFiltru) + + If Reccount('crsArtAles')=0 + aMessagebox('Cautarea nu a intors rezultate!',0+48,'Info cautare') + Thisform.ck_nume_articol.SetFocus() + Endif + ENDPROC + + PROCEDURE do_reset + pnId_lista = 0 + thisform.cboListe.Value = "" + thisform.cboListe.Refresh + + thisform.ck_nume_articol.Value = 0 + + ENDPROC + + PROCEDURE cboListe.Init + this.Value = "" + + ENDPROC + + PROCEDURE cboListe.Valid + pnId_lista = cListePret.id_pol + ENDPROC + +ENDDEFINE + +DEFINE CLASS frm_articol_politica AS _frmbase OF "..\comun\clase\_frm_base.vcx" + *< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" /> + + *-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder + *< OBJECTDATA: ObjPath="Clb_articol" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Clb_pret" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Clb_pret.optProcent" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Clb_um" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Clb_valuta" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="clb_pret2" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Cb_tx_coef_tva" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Cb_tx_coef_tva.Label1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Ct_clb_venchelt" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Clb_cant_bax" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Clb_um2" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" /> + + * + *m: actualizare_preturi + *m: do_cauta_venchelt + *p: nid + *p: nnivelmodificare && - 1 daca utilizatorul are voie sa modifice toate datele ; 0 daca are voie sa modifice doar nr. de telefon + *p: npreturicutva + *p: orec + * + + * + DoCreate = .T. + Height = 375 + Name = "frm_articol_politica" + nnivelmodificare = -1 + npreturicutva = 0 + Width = 356 + _shape1.Height = 29 + _shape1.Left = 0 + _shape1.Name = "_shape1" + _shape1.Top = 0 + _shape1.Width = 360 + _shape2.Height = 29 + _shape2.Left = 289 + _shape2.Name = "_shape2" + _shape2.Top = 0 + _shape2.Width = 69 + Lb_titlu_alb_b121.Caption = "ADĂUGARE ARTICOL" + Lb_titlu_alb_b121.FontBold = .T. + Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121" + Lb_titlu_alb_b121.TabIndex = 13 + BUT_TERMIN1.Height = 27 + BUT_TERMIN1.Left = 324 + BUT_TERMIN1.Name = "BUT_TERMIN1" + BUT_TERMIN1.TabIndex = 11 + BUT_TERMIN1.Top = 1 + BUT_TERMIN1.Width = 30 + Gridsort1.Name = "Gridsort1" + * + + ADD OBJECT '_checkbox1' AS _checkbox WITH ; + Alignment = 0, ; + Caption = "Compus", ; + ControlSource = "poarticol.compus", ; + Enabled = .F., ; + Left = 24, ; + Name = "_checkbox1", ; + ReadOnly = .T., ; + Top = 354 + *< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="checkbox" /> + + ADD OBJECT 'But_renunt1' AS but_renunt WITH ; + Height = 27, ; + Left = 292, ; + Name = "But_renunt1", ; + TabIndex = 12, ; + Top = 1, ; + Width = 30 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'Cb_tx_coef_tva' AS cb_tx_simplu WITH ; + Height = 29, ; + Left = 24, ; + Name = "Cb_tx_coef_tva", ; + TabIndex = 9, ; + Top = 292, ; + Width = 290, ; + ZOrderSet = 12, ; + _cbbase1.FontName = "Arial Narrow", ; + _cbbase1.Height = 23, ; + _cbbase1.Left = 101, ; + _cbbase1.Name = "_cbbase1", ; + _cbbase1.RowSource = "crs_cote_tva", ; + _cbbase1.RowSourceType = 2, ; + _cbbase1.Top = 3, ; + _cbbase1.Width = 163, ; + _lbbase1.Caption = "Coeficient TVA", ; + _lbbase1.FontName = "Arial Narrow", ; + _lbbase1.FontSize = 10, ; + _lbbase1.Left = 6, ; + _lbbase1.Name = "_lbbase1", ; + _lbbase1.Top = 6 + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'Cb_tx_coef_tva.Label1' AS label WITH ; + BackStyle = 0, ; + Caption = "%", ; + Height = 17, ; + Left = 270, ; + Name = "Label1", ; + Top = 7, ; + Width = 13 + *< END OBJECT: BaseClass="label" /> + + ADD OBJECT 'Clb_articol' AS clb_tx_simplu WITH ; + Left = 24, ; + Name = "Clb_articol", ; + TabIndex = 2, ; + TabStop = .F., ; + Top = 73, ; + Text_simplu1.ControlSource = "poArticol.nume_articol", ; + Text_simplu1.Name = "Text_simplu1", ; + Text_simplu1.ReadOnly = .T., ; + Lb_simplu1.Caption = "Articol", ; + Lb_simplu1.Name = "Lb_simplu1" + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'Clb_cant_bax' AS clb_tx_simplu WITH ; + Left = 24, ; + Name = "Clb_cant_bax", ; + TabIndex = 7, ; + TabStop = .F., ; + Top = 236, ; + Width = 290, ; + Text_simplu1.Alignment = 1, ; + Text_simplu1.ControlSource = "poArticol.cant_bax", ; + Text_simplu1.Name = "Text_simplu1", ; + Text_simplu1.ReadOnly = .T., ; + Lb_simplu1.Caption = "Cant. / împach.", ; + Lb_simplu1.Name = "Lb_simplu1" + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'Clb_pret' AS clb_tx_simplu WITH ; + Height = 52, ; + Left = 24, ; + Name = "Clb_pret", ; + TabIndex = 3, ; + Top = 101, ; + Width = 290, ; + TEXT_SIMPLU1.ControlSource = "poArticol.pret", ; + TEXT_SIMPLU1.InputMask = (get_mask(14,gnPPretV)), ; + TEXT_SIMPLU1.Left = 101, ; + TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ; + TEXT_SIMPLU1.TabIndex = 1, ; + TEXT_SIMPLU1.Top = 25, ; + LB_SIMPLU1.Caption = "", ; + LB_SIMPLU1.Left = 8, ; + LB_SIMPLU1.Name = "LB_SIMPLU1", ; + LB_SIMPLU1.TabIndex = 2, ; + LB_SIMPLU1.Top = 6 + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'Clb_pret.optProcent' AS _optiongrup WITH ; + AutoSize = .T., ; + BorderStyle = 0, ; + Height = 46, ; + Left = 5, ; + Name = "optProcent", ; + TabIndex = 3, ; + Top = 3, ; + Width = 71, ; + Option1.Caption = "Pret", ; + Option1.Left = 5, ; + Option1.Name = "Option1", ; + Option1.TabStop = .F., ; + Option1.Top = 5, ; + Option2.Caption = "Procent", ; + Option2.Left = 57, ; + Option2.Name = "Option2", ; + Option2.TabStop = .F., ; + Option2.Top = 5 + *< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="optiongroup" /> + + ADD OBJECT 'clb_pret2' AS clb_tx_simplu WITH ; + Left = 24, ; + Name = "clb_pret2", ; + TabIndex = 4, ; + TabStop = .F., ; + Top = 152, ; + Text_simplu1.Alignment = 1, ; + Text_simplu1.ControlSource = "poArticol.pretftva", ; + Text_simplu1.InputMask = (get_mask(14,gnPPretV)), ; + Text_simplu1.Name = "Text_simplu1", ; + Text_simplu1.ReadOnly = .T., ; + Lb_simplu1.Caption = "Preț fără TVA", ; + Lb_simplu1.Name = "Lb_simplu1" + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ; + Left = 24, ; + Name = "Clb_tx_simplu1", ; + TabIndex = 1, ; + TabStop = .F., ; + Top = 45, ; + TEXT_SIMPLU1.ControlSource = "poArticol.codmat", ; + TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ; + TEXT_SIMPLU1.ReadOnly = .T., ; + LB_SIMPLU1.Caption = "Cod material", ; + LB_SIMPLU1.Name = "LB_SIMPLU1" + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'Clb_um' AS clb_tx_simplu WITH ; + Left = 24, ; + Name = "Clb_um", ; + TabIndex = 6, ; + TabStop = .F., ; + Top = 208, ; + Width = 290, ; + TEXT_SIMPLU1.Alignment = 1, ; + TEXT_SIMPLU1.ControlSource = "poArticol.um", ; + TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ; + TEXT_SIMPLU1.ReadOnly = .T., ; + LB_SIMPLU1.Caption = "U.M.", ; + LB_SIMPLU1.Name = "LB_SIMPLU1" + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'Clb_um2' AS clb_tx_simplu WITH ; + Left = 24, ; + Name = "Clb_um2", ; + TabIndex = 8, ; + TabStop = .F., ; + Top = 264, ; + Width = 290, ; + Text_simplu1.Alignment = 1, ; + Text_simplu1.ControlSource = "poArticol.um2", ; + Text_simplu1.Name = "Text_simplu1", ; + Text_simplu1.ReadOnly = .T., ; + Lb_simplu1.Caption = "U.M. 2", ; + Lb_simplu1.Name = "Lb_simplu1" + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'Clb_valuta' AS clb_tx_simplu WITH ; + Left = 24, ; + Name = "Clb_valuta", ; + TabIndex = 5, ; + TabStop = .F., ; + Top = 180, ; + Text_simplu1.Alignment = 1, ; + Text_simplu1.ControlSource = "poArticol.nume_val", ; + Text_simplu1.Name = "Text_simplu1", ; + Text_simplu1.ReadOnly = .T., ; + Lb_simplu1.Caption = "Valuta", ; + Lb_simplu1.Name = "Lb_simplu1" + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'Ct_clb_venchelt' AS ct_clb_cautare_var WITH ; + cconditie = EMPTY(NVL(poArticol.id_venchelt,0)), ; + cprocedura = thisform.do_cauta_venchelt, ; + cvar_afisata = poArticol.explicatie_venchelt, ; + Height = 31, ; + Left = 23, ; + Name = "Ct_clb_venchelt", ; + TabIndex = 10, ; + Top = 319, ; + Width = 337, ; + shape_cautare.Height = 29, ; + shape_cautare.Left = 1, ; + shape_cautare.Name = "shape_cautare", ; + shape_cautare.Top = 1, ; + shape_cautare.Width = 290, ; + img_cautare.Left = 303, ; + img_cautare.Name = "img_cautare", ; + img_cautare.Top = 5, ; + lb_cautare.Caption = "Venit", ; + lb_cautare.Name = "lb_cautare", ; + tx_cautare.Left = 103, ; + tx_cautare.Name = "tx_cautare", ; + tx_cautare.Top = 4 + *< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="container" /> + + PROCEDURE actualizare_preturi + *!* modificare v 2.0.20 + local lnPrecizie + lnPrecizie = iif(poArticol.moneda_nationala=1,gnPPretV,gnPVal) + *!* modificare v 2.0.20 ^ + If This.clb_pret.optProcent.Value = 1 && pret + If This.nPreturiCuTva = 1 + poArticol.pretctva = poArticol.Pret + poArticol.pretftva = Iif(!Empty(Nvl(poArticol.proc_tvav,0)),Round(Round(poArticol.Pret,lnPrecizie) / poArticol.proc_tvav, lnPrecizie),poArticol.pretctva) + Else + poArticol.pretftva = poArticol.Pret + poArticol.pretctva = Iif(!Empty(Nvl(poArticol.proc_tvav,0)),Round(Round(poArticol.Pret,lnPrecizie) + Round(poArticol.Pret,lnPrecizie) *(poArticol.proc_tvav -1),lnPrecizie),poArticol.pretftva) + Endif + Endif + This.Refresh + ENDPROC + + PROCEDURE Destroy + IF USED('crs_cote_tva') + USE IN 'crs_cote_tva' + ENDIF + + ENDPROC + + PROCEDURE do_cauta_venchelt + Local loCauta + loCauta = caut_venchelt() + If !Empty(Nvl(loCauta.id_venchelt,0)) + poArticol.id_venchelt = loCauta.id_venchelt + poArticol.explicatie_venchelt = loCauta.explicatie + Else + poArticol.id_venchelt = Null + poArticol.explicatie_venchelt = [] + Endif + Thisform.but_termin1.SetFocus() + ENDPROC + + PROCEDURE inainte_de_do_termin + Local plReturn + lccontrol = Upper(This.ActiveControl.BaseClass ) + If Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX") + lcval=This.ActiveControl.ControlSource + &lcval=Thisform.ActiveControl.Value + Endif + + poArticol.procent = Thisform.clb_pret.optProcent.Value-1 + + *!* modificare 04.02.2008 + *!* Do Case + *!* *!* Case Empty(poArticol.Pret) + *!* *!* aMessagebox("Nu ati introdus pretul!",0+48,"Atentie") + *!* *!* Thisform.clb_pret.text_simplu1.SetFocus() + *!* *!* plReturn=.F. + *!* Case Empty(poArticol.proc_tvav) + *!* aMessagebox("Nu ati completat coeficietul de TVA!",0+48,"Atentie") + *!* Thisform.cb_tx_coef_tva.SetFocus() + *!* plReturn=.F. + *!* Otherwise + *!* plReturn=.T. + *!* Endcase + *!* modificare 04.02.2008 ^ + plReturn = .T. + + Return plReturn + + ENDPROC + + PROCEDURE Init + Lparameters tlEnabledOptPret, tnPreturiCuTva, tlModificare + DoDefault() + If Pcount()>=1 + Thisform.clb_pret.optProcent.Enabled=tlEnabledOptPret + Endif + Thisform.clb_pret.optProcent.Value=poArticol.procent+1 + IF poArticol.compus = 1 + Thisform.clb_pret.text_simplu1.ReadOnly= .T. + ELSE + Thisform.clb_pret.text_simplu1.ReadOnly= .f. + ENDIF + If Type('tnPreturiCuTva') = 'N' + This.nPreturiCuTva = tnPreturiCuTva + Else + This.nPreturiCuTva = 0 + Endif + + If This.nPreturiCuTva = 1 + This.clb_pret2.lb_SIMPLU1.Caption = 'Pret fara TVA' + This.clb_pret2.texT_SIMPLU1.ControlSource = "poArticol.pretftva" + Else + This.clb_pret2.lb_SIMPLU1.Caption = 'Pret cu TVA' + This.clb_pret2.texT_SIMPLU1.ControlSource = "poArticol.pretctva" + Endif + + If tlModificare + Select crs_cote_Tva + Locate For Nvl(proc_tva,0) = Nvl(poArticol.proc_tvav,0) + If !Found() + Go Top + *!* modificare v 2.0.10 + poArticol.proc_tvav = proc_tva + *!* modificare v 2.0.10 ^ + Endif + Else + Select crs_cote_Tva + Go Top + *!* modificare v 2.0.10 + poArticol.proc_tvav = proc_tva + *!* modificare v 2.0.10 ^ + Endif + Thisform.cb_tx_coef_tva._cbbase1.ListIndex = Recno('crs_cote_tva') + *!* modificare v 2.0.20 + Thisform.clb_pret.text_simplu1.InputMask = get_mask(14,iif(poArticol.moneda_nationala=1,gnPPretV,gnPVal)) + Thisform.clb_pret2.text_simplu1.InputMask = get_mask(14,iif(poArticol.moneda_nationala=1,gnPPretV,gnPVal)) + *!* modificare v 2.0.20 ^ + ENDPROC + + PROCEDURE Load + If Used('crs_cote_tva') + Use In 'crs_cote_tva' + Endif + If !Used('crs_cote_tva') + + *!* modificare v 2.0.10 : am adaugat order by + lcsel3 = [select procent,proc_tva from ] + gcS + [.vcote_tva where an = ?gnAn and luna = ?gnLuna order by proc_tva desc] + lccursor3 = [crs_cote_tva2] + lnsucces3 = goExecutor.oExecute(lcsel3,lccursor3) + If lnsucces3 < 0 + lcmesaj = goExecutor.cEroare + ofrm_er = Createobject('frm_mesaj','Eroare','exclam2.ico','Avertizare',lcmesaj) + ofrm_er.Show(1) + Release ofrm_er + Endif + + Create Cursor crs_cote_tva (procent C(100),proc_tva N(10,2) Null) + + Insert Into crs_cote_tva(procent,proc_tva) Select Alltrim(Str(procent,10,2)),proc_tva From crs_cote_Tva2 + + Select crs_cote_tva + Append Blank + Replace procent With [] + + Use In crs_cote_Tva2 + Endif + + ENDPROC + + PROCEDURE Cb_tx_coef_tva._cbbase1.InteractiveChange + Select crs_cote_tva + poArticol.proc_tvav = proc_tva + Thisform.actualizare_preturi() + + ENDPROC + + PROCEDURE Clb_pret.TEXT_SIMPLU1.Valid + thisform.actualizare_preturi() + ENDPROC + +ENDDEFINE + +DEFINE CLASS frm_pachet_articole AS _frmbase OF "..\comun\clase\_frm_base.vcx" + *< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" /> + + *-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder + *< OBJECTDATA: ObjPath="grid_pachet" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pachet.Column1.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pachet.Column1.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pachet.Column2.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pachet.Column2.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pachet.Column3.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pachet.Column3.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pachet.Column4.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grid_pachet.Column4.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="txtPretPachet" UniqueID="" Timestamp="" /> + + * + *m: afisactual + * + + * + cgridsortlist = grid_pachet + Desktop = .T. + DoCreate = .T. + Height = 304 + Name = "frm_pachet_articole" + Width = 784 + _shape1.Height = 29 + _shape1.Left = 0 + _shape1.Name = "_shape1" + _shape1.Top = 0 + _shape1.Width = 786 + _shape2.Anchor = 9 + _shape2.Height = 29 + _shape2.Left = 691 + _shape2.Name = "_shape2" + _shape2.Top = 0 + _shape2.Width = 93 + Lb_titlu_alb_b121.Caption = "Pachet articole" + Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121" + BUT_TERMIN1.Anchor = 9 + BUT_TERMIN1.Left = 753 + BUT_TERMIN1.Name = "BUT_TERMIN1" + BUT_TERMIN1.Top = 1 + Gridsort1.Left = 132 + Gridsort1.Name = "Gridsort1" + Gridsort1.Top = 10 + * + + ADD OBJECT 'But_nou1' AS but_nou WITH ; + Anchor = 9, ; + Left = 693, ; + Name = "But_nou1", ; + Top = 1 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'But_sterge1' AS but_sterge WITH ; + Anchor = 9, ; + Left = 723, ; + Name = "But_sterge1", ; + Top = 1 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'grid_pachet' AS _grdrow WITH ; + Anchor = 15, ; + ColumnCount = 4, ; + DeleteMark = .F., ; + Height = 228, ; + HighlightStyle = 2, ; + Left = 10, ; + Name = "grid_pachet", ; + Panel = 1, ; + RecordSource = "crsPachetArt", ; + Top = 38, ; + Width = 763, ; + Column1.ControlSource = "nume_articol", ; + Column1.Name = "Column1", ; + Column1.Width = 298, ; + Column2.ControlSource = "nume_lista_preturi", ; + Column2.Name = "Column2", ; + Column2.Width = 303, ; + Column3.ControlSource = "pret", ; + Column3.Format = "rk", ; + Column3.InputMask = (get_mask(20,MAX(gnPPretV,gnPVal))), ; + Column3.Name = "Column3", ; + Column3.Width = 75, ; + Column4.ControlSource = "nume_val", ; + Column4.Name = "Column4", ; + Column4.Width = 53 + *< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" /> + + ADD OBJECT 'grid_pachet.Column1.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Articol component", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grid_pachet.Column1.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1" + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grid_pachet.Column2.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Lista de preturi", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grid_pachet.Column2.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1" + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grid_pachet.Column3.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Pret", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grid_pachet.Column3.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1" + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grid_pachet.Column4.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Valuta", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grid_pachet.Column4.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1" + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'Label1' AS label WITH ; + Anchor = 12, ; + AutoSize = .T., ; + BackStyle = 0, ; + Caption = "Total", ; + FontBold = .T., ; + Height = 17, ; + Left = 540, ; + Name = "Label1", ; + Top = 276, ; + Width = 30 + *< END OBJECT: BaseClass="label" /> + + ADD OBJECT 'txtPretPachet' AS textbox WITH ; + Anchor = 12, ; + ControlSource = "pnPretPachet", ; + Format = "rk", ; + Height = 23, ; + InputMask = (get_mask(14,MAX(gnPVal,gnPPretV))), ; + Left = 577, ; + Name = "txtPretPachet", ; + Top = 272, ; + Width = 122 + *< END OBJECT: BaseClass="textbox" /> + + PROCEDURE actualizeaza_grid1 + Lparameters lcFiltru + If Empty(lcFiltru) + lcFiltru = poPachetArt.ca_baza1.cfiltru + Endif + Thisform.MousePointer= 11 + Thisform.LockScreen=.T. + save_grid_tag(Thisform.grid_pachet) + poPachetArt.ca_baza1.cfiltru=lcFiltru + poPachetArt.ca_baza1.afisare() + restore_grid_tag(Thisform.grid_pachet) + Thisform.LockScreen=.F. + Thisform.MousePointer= 0 + If Reccount('crsPachetArt')>0 + Thisform.grid_pachet.SetFocus() + Endif + ENDPROC + + PROCEDURE afisactual + LOCAL lcTabel + lcTabel = thisform.grid_pachet.RecordSource + + SELECT (lcTabel) + CALCULATE SUM(pret) TO pnPretPachet + + thisform.txtPretPachet.Refresh + + ENDPROC + + PROCEDURE do_adauga + LOCAL lcTabel + + ***--------- combo liste preturi + PRIVATE pnId_lista + STORE 0 TO pnId_lista + + CREATE CURSOR cListePret (id_pol N(5), nume_lista_preturi C(100), datai D, DATAS D) + SELECT cListePret + INSERT INTO cListePret VALUES (0, "",{//},{//}) + + PRIVATE poListe_pret + STORE '' TO poListe_pret + + LOCAL lcSchema1, lcSelect1, lcOrder1, lcFiltru1, llAfiseaza + lcSchema1 = [] + lcSelect1 = [select * from vcrm_politici_preturi] + lcOrder1 = [nume_lista_preturi] + lcgroup = [] + lcFiltru1 = [2=2] + lcFiltruOriginal = [] + llModParam = .T. + llAfiseaza = .F. + + gencursor('poListe_pret','crsListePret', lcSelect1, lcFiltru1, lcSchema1, lcOrder1, llAfiseaza, lcgroup, llModParam, lcFiltruOriginal) + poListe_pret.ca_baza1.afisare() + + SELECT cListePret + APPEND FROM DBF("crsListePret") + ***--------- combo liste preturi + + + PRIVATE poPol_pret_art + STORE '' TO poPol_pret_art + + LOCAL lcSchema1, lcSelect1, lcOrder1, lcFiltru1, llAfiseaza + lcSchema1 = [] + lcSelect1 = [select ppa.*, 0 as ales from vcrm_politici_pret_art ppa] + lcOrder1 = [nume_articol] + lcgroup = [] + lcFiltru1 = [1=2] + lcFiltruOriginal = [id_pol_art <> ]+ALLTRIM(STR(pnId_pachet)) + llModParam = .T. + llAfiseaza = .F. + + gencursor('poPol_pret_art','crsArtAles', lcSelect1, lcFiltru1, lcSchema1, lcOrder1, llAfiseaza, lcgroup, llModParam, lcFiltruOriginal) + poPol_pret_art.ca_baza1.afisare() + + SELECT crsArtAles + loaa = CREATEOBJECT("frm_alege_articol") + loaa.SHOW(1) + + IF buton = 2 + RELEASE poPol_pret_art, poListe_pret + + IF USED("crsArtAles") + USE IN crsArtAles + ENDIF + IF USED("cArtAles") + USE IN cArtAles + ENDIF + + IF USED("crsListePret") + USE IN crsListePret + ENDIF + + IF USED("cListePret") + USE IN cListePret + ENDIF + + RETURN + ENDIF + + SELECT * FROM crsArtAles WITH (BUFFERING = .T.) WHERE ales = 1 INTO CURSOR cArtAles + + lcTabel = THISFORM.grid_pachet.RECORDSOURCE + SELECT (lcTabel) + APPEND FROM DBF("cArtAles") + *** + RELEASE poPol_pret_art, poListe_pret + + IF USED("crsArtAles") + USE IN crsArtAles + ENDIF + IF USED("cArtAles") + USE IN cArtAles + ENDIF + + IF USED("crsListePret") + USE IN crsListePret + ENDIF + + IF USED("cListePret") + USE IN cListePret + ENDIF + + THISFORM.grid_pachet.SETFOCUS + thisform.afisactual + + + ENDPROC + + PROCEDURE inainte_de_do_sterge + LOCAL lcTabel, lnRaspuns + lcTabel = THISFORM.grid_pachet.RECORDSOURCE + SELECT (lcTabel) + IF RECCOUNT() > 0 + lnRaspuns = AMESSAGEBOX("Doriti sa stergeti articolul ?",4+32,_SCREEN.CAPTION) + IF lnRaspuns = 7 + RETURN + ENDIF + + SELECT (lcTabel) + DELETE + ENDIF + + thisform.grid_pachet.Refresh + THISFORM.grid_pachet.SETFOCUS + thisform.afisactual + + + ENDPROC + + PROCEDURE Init + DODEFAULT() + thisform.afisactual + + ENDPROC + +ENDDEFINE + +DEFINE CLASS frm_politici_pret AS _frmbase OF "..\comun\clase\_frm_base.vcx" + *< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" /> + + *-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder + *< OBJECTDATA: ObjPath="But_listare1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.cDataI.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.cDataI.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.cNume.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.cNume.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.cDataS.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.cDataS.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.cNume_val.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.cNume_val.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.cUtilizator.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.cUtilizator.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.cDataora.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.cDataora.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.Column7.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.Column7.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.cPreturi_cu_tva.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_pret.cPreturi_cu_tva.Check1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="_shape3" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="ck_nume_lista_preturi" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Ck_utilizator" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Cmd_reset1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Cmd_cauta1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Ck_nume_val" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_copie" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Ck_datai" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="lb_detalii_politica" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cArticol.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cArticol.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cPret.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cPret.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cUM.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cUM.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cNume_val.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cNume_val.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cUtilizator.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cUtilizator.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cDataora.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cDataora.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.Column7.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.Column7._checkbox1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.Column8.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.Column8.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cExplicatie_venchelt.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cExplicatie_venchelt.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cCodmat.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cCodmat.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cCant_bax.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cCant_bax.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cUM2.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politici_art.cUM2.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Ck_datas" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="cmdArtCompus" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="ck_active" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_excel1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_modiparam1" UniqueID="" Timestamp="" /> + + * + *m: do_modiparam + *p: cfiltru + * + + * + cfiltru = + cgridsortlist = grd_politici_pret,grd_politici_art + DoCreate = .T. + FontCharSet = 238 + Height = 582 + lactiv1 = .T. + lactiv2 = .T. + Name = "frm_politici_pret" + Width = 793 + _SHAPE1.Anchor = 10 + _SHAPE1.Height = 29 + _SHAPE1.Left = -1 + _SHAPE1.Name = "_SHAPE1" + _SHAPE1.Top = 0 + _SHAPE1.Width = 795 + _SHAPE2.Anchor = 8 + _SHAPE2.Height = 29 + _SHAPE2.Left = 546 + _SHAPE2.Name = "_SHAPE2" + _SHAPE2.Top = 0 + _SHAPE2.Width = 250 + LB_TITLU_ALB_B121.Caption = "LISTE DE PREȚURI" + LB_TITLU_ALB_B121.FontBold = .T. + LB_TITLU_ALB_B121.FontCharSet = 238 + LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121" + LB_TITLU_ALB_B121.TabIndex = 18 + BUT_TERMIN1.Anchor = 8 + BUT_TERMIN1.Left = 761 + BUT_TERMIN1.Name = "BUT_TERMIN1" + BUT_TERMIN1.TabIndex = 17 + BUT_TERMIN1.Top = 1 + Gridsort1.Name = "Gridsort1" + * + + ADD OBJECT '_shape3' AS _shape WITH ; + Anchor = 10, ; + BackStyle = 0, ; + Height = 60, ; + Left = 12, ; + Name = "_shape3", ; + Top = 36, ; + Width = 768 + *< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="shape" /> + + ADD OBJECT 'But_copie' AS but_grafic WITH ; + Anchor = 9, ; + caction = do_copie, ; + cpicturedown = copy_jos.bmp, ; + cpictureup = copy_sus.bmp, ; + Left = 731, ; + Name = "But_copie", ; + Picture = ..\comun\grafice\copy_sus.bmp, ; + TabIndex = 16, ; + ToolTipText = "Copiere politica preturi", ; + Top = 1, ; + ZOrderSet = 13 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'But_excel1' AS but_excel WITH ; + Anchor = 8, ; + Left = 671, ; + Name = "But_excel1", ; + TabIndex = 14, ; + Top = 1, ; + Visible = .T. + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'But_listare1' AS but_listare WITH ; + Anchor = 8, ; + Left = 701, ; + Name = "But_listare1", ; + Picture = ..\comun\grafice\listare_sus.bmp, ; + TabIndex = 15, ; + Top = 1, ; + Visible = .T. + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'But_modifica1' AS but_modifica WITH ; + Anchor = 8, ; + caction = do_modifica, ; + Left = 580, ; + Name = "But_modifica1", ; + TabIndex = 11, ; + Top = 1, ; + Visible = .T. + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'But_modiparam1' AS but_modiparam WITH ; + Anchor = 8, ; + Left = 610, ; + Name = "But_modiparam1", ; + TabIndex = 12, ; + ToolTipText = "Actualizare cu ultimul pret de achizitie din rulaje", ; + Top = 1 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'But_nou1' AS but_nou WITH ; + Anchor = 8, ; + Left = 550, ; + Name = "But_nou1", ; + TabIndex = 10, ; + Top = 1 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'But_sterge1' AS but_sterge WITH ; + Anchor = 8, ; + caction = do_sterge, ; + Left = 640, ; + Name = "But_sterge1", ; + TabIndex = 13, ; + Top = 1, ; + Visible = .T. + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'ck_active' AS _checkbox WITH ; + Alignment = 0, ; + Caption = "Doar politicile active în lună", ; + Left = 230, ; + Name = "ck_active", ; + TabIndex = 6, ; + Top = 69 + *< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="checkbox" /> + + ADD OBJECT 'Ck_datai' AS ck_filtru_numar WITH ; + Alignment = 0, ; + camp_nume = datai, ; + Caption = "Data început", ; + Left = 131, ; + Name = "Ck_datai", ; + TabIndex = 3, ; + tip = D, ; + Top = 44 + *< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" /> + + ADD OBJECT 'Ck_datas' AS ck_filtru_numar WITH ; + Alignment = 0, ; + camp_nume = datas, ; + Caption = "Data sfărșit", ; + Left = 131, ; + Name = "Ck_datas", ; + TabIndex = 4, ; + tip = D, ; + Top = 69 + *< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" /> + + ADD OBJECT 'ck_nume_lista_preturi' AS ck_filtru_text WITH ; + Alignment = 0, ; + camp_nume = nume_lista_preturi, ; + Caption = "Listă prețuri", ; + Left = 30, ; + Name = "ck_nume_lista_preturi", ; + TabIndex = 1, ; + Top = 44 + *< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" /> + + ADD OBJECT 'Ck_nume_val' AS ck_filtru_text WITH ; + Alignment = 0, ; + camp_nume = nume_val, ; + Caption = "Valuta", ; + FontCharSet = 238, ; + Left = 30, ; + Name = "Ck_nume_val", ; + TabIndex = 2, ; + Top = 69 + *< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" /> + + ADD OBJECT 'Ck_utilizator' AS ck_filtru_text WITH ; + Alignment = 0, ; + camp_nume = utilizator, ; + Caption = "Utilizator", ; + FontCharSet = 238, ; + Left = 230, ; + Name = "Ck_utilizator", ; + TabIndex = 5, ; + Top = 44 + *< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="checkbox" /> + + ADD OBJECT 'Cmd_cauta1' AS cmd_cauta WITH ; + Anchor = 8, ; + Left = 662, ; + Name = "Cmd_cauta1", ; + TabIndex = 7, ; + Top = 38 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'Cmd_reset1' AS cmd_reset WITH ; + Anchor = 8, ; + Left = 662, ; + Name = "Cmd_reset1", ; + TabIndex = 19, ; + Top = 66 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'cmdArtCompus' AS commandbutton WITH ; + Caption = "Articol compus", ; + FontBold = .T., ; + FontSize = 10, ; + ForeColor = 0,64,128, ; + Height = 25, ; + Left = 672, ; + Name = "cmdArtCompus", ; + TabIndex = 21, ; + Top = 305, ; + Visible = .F., ; + Width = 108, ; + WordWrap = .F. + *< END OBJECT: BaseClass="commandbutton" /> + + ADD OBJECT 'grd_politici_art' AS _grdbase WITH ; + Anchor = 15, ; + ColumnCount = 12, ; + DeleteMark = .F., ; + FontSize = 10, ; + Height = 240, ; + HighlightStyle = 2, ; + Left = 12, ; + Name = "grd_politici_art", ; + Panel = 1, ; + RecordSource = "crspoliticiart", ; + RowHeight = 19, ; + TabIndex = 9, ; + Top = 333, ; + Width = 768, ; + Column1.ColumnOrder = 2, ; + Column1.ControlSource = "nume_articol", ; + Column1.FontName = "Arial", ; + Column1.FontSize = 10, ; + Column1.Name = "cArticol", ; + Column1.Visible = .T., ; + Column1.Width = 281, ; + Column2.BackColor = 222,252,254, ; + Column2.ColumnOrder = 6, ; + Column2.ControlSource = "pret", ; + Column2.FontName = "Arial", ; + Column2.FontSize = 10, ; + Column2.InputMask = (get_mask(14,gnPPretV)), ; + Column2.Name = "cPret", ; + Column2.Visible = .T., ; + Column2.Width = 69, ; + Column3.ColumnOrder = 3, ; + Column3.ControlSource = "um", ; + Column3.FontName = "Arial", ; + Column3.FontSize = 10, ; + Column3.Name = "cUM", ; + Column3.Visible = .T., ; + Column3.Width = 37, ; + Column4.ColumnOrder = 7, ; + Column4.ControlSource = "nume_val", ; + Column4.FontName = "Arial", ; + Column4.FontSize = 10, ; + Column4.Name = "cNume_val", ; + Column4.Visible = .T., ; + Column4.Width = 38, ; + Column5.ColumnOrder = 11, ; + Column5.ControlSource = "utilizator", ; + Column5.FontName = "Arial", ; + Column5.FontSize = 10, ; + Column5.Name = "cUtilizator", ; + Column5.Visible = .T., ; + Column5.Width = 135, ; + Column6.ColumnOrder = 12, ; + Column6.ControlSource = "dataora", ; + Column6.FontName = "Arial", ; + Column6.FontSize = 10, ; + Column6.Name = "cDataora", ; + Column6.Visible = .T., ; + Column6.Width = 95, ; + Column7.ColumnOrder = 10, ; + Column7.ControlSource = "art_compus", ; + Column7.FontName = "Arial", ; + Column7.FontSize = 10, ; + Column7.Name = "Column7", ; + Column7.ReadOnly = .T., ; + Column7.Sparse = .F., ; + Column7.Width = 90, ; + Column8.ColumnOrder = 8, ; + Column8.ControlSource = "proc_tvav", ; + Column8.FontName = "Arial", ; + Column8.FontSize = 10, ; + Column8.Format = "rk", ; + Column8.InputMask = "99.99", ; + Column8.Name = "Column8", ; + Column8.Width = 56, ; + Column9.ColumnOrder = 9, ; + Column9.ControlSource = "explicatie_venchelt", ; + Column9.FontName = "Arial", ; + Column9.FontSize = 10, ; + Column9.Name = "cExplicatie_venchelt", ; + Column9.Width = 100, ; + Column10.ColumnOrder = 1, ; + Column10.ControlSource = "codmat", ; + Column10.FontName = "Arial", ; + Column10.FontSize = 10, ; + Column10.Name = "cCodmat", ; + Column11.ColumnOrder = 4, ; + Column11.ControlSource = "cant_bax", ; + Column11.FontName = "Arial", ; + Column11.FontSize = 10, ; + Column11.InputMask = (get_mask(14,gnPcant)), ; + Column11.Name = "cCant_bax", ; + Column11.Width = 80, ; + Column12.ColumnOrder = 5, ; + Column12.ControlSource = "um2", ; + Column12.FontName = "Arial", ; + Column12.FontSize = 10, ; + Column12.Name = "cUM2", ; + Column12.Width = 40 + *< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" /> + + ADD OBJECT 'grd_politici_art.cArticol.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Articol", ; + FontCharSet = 238, ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_art.cArticol.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255, ; + Visible = .T. + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_art.cCant_bax.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Cant./impach.", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_art.cCant_bax.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_art.cCodmat.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Cod material", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_art.cCodmat.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_art.cDataora.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Data operarii", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_art.cDataora.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255, ; + Visible = .T. + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_art.cExplicatie_venchelt.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Venit / cheltuiala", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_art.cExplicatie_venchelt.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_art.cNume_val.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Valuta", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_art.cNume_val.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255, ; + Visible = .T. + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_art.Column7._checkbox1' AS _checkbox WITH ; + Alignment = 2, ; + Caption = "", ; + Centered = .T., ; + FontName = "Arial", ; + FontSize = 10, ; + Left = 44, ; + Name = "_checkbox1", ; + ReadOnly = .T., ; + Top = 38 + *< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="checkbox" /> + + ADD OBJECT 'grd_politici_art.Column7.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Articol compus", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_art.Column8.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Proc. TVA", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_art.Column8.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_art.cPret.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Pret", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_art.cPret.Text1' AS textbox WITH ; + BackColor = 222,252,254, ; + BorderStyle = 0, ; + FontBold = .F., ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255, ; + Visible = .T. + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_art.cUM.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "U.M.", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_art.cUM.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255, ; + Visible = .T. + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_art.cUM2.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "U.M. 2", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_art.cUM2.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_art.cUtilizator.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Operator", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_art.cUtilizator.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255, ; + Visible = .T. + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_pret' AS _grdbase WITH ; + Anchor = 10, ; + ColumnCount = 8, ; + DeleteMark = .F., ; + FontSize = 10, ; + HeaderHeight = 19, ; + Height = 192, ; + HighlightStyle = 2, ; + Left = 12, ; + Name = "grd_politici_pret", ; + Panel = 1, ; + ReadOnly = .T., ; + RecordSource = "crspoliticipret", ; + RowHeight = 19, ; + TabIndex = 8, ; + Top = 108, ; + Width = 768, ; + Column1.ColumnOrder = 2, ; + Column1.ControlSource = "datai", ; + Column1.FontName = "Arial", ; + Column1.FontSize = 10, ; + Column1.Name = "cDataI", ; + Column1.ReadOnly = .T., ; + Column1.Width = 73, ; + Column2.ColumnOrder = 1, ; + Column2.ControlSource = "nume_lista_preturi", ; + Column2.FontName = "Arial", ; + Column2.FontSize = 10, ; + Column2.Name = "cNume", ; + Column2.ReadOnly = .T., ; + Column2.Width = 323, ; + Column3.ColumnOrder = 3, ; + Column3.ControlSource = "datas", ; + Column3.FontName = "Arial", ; + Column3.FontSize = 10, ; + Column3.Name = "cDataS", ; + Column3.ReadOnly = .T., ; + Column3.Width = 67, ; + Column4.ColumnOrder = 4, ; + Column4.ControlSource = "nume_val", ; + Column4.FontName = "Arial", ; + Column4.FontSize = 10, ; + Column4.Name = "cNume_val", ; + Column4.ReadOnly = .T., ; + Column4.Width = 43, ; + Column5.ColumnOrder = 7, ; + Column5.ControlSource = "utilizator", ; + Column5.FontName = "Arial", ; + Column5.FontSize = 10, ; + Column5.Name = "cUtilizator", ; + Column5.ReadOnly = .T., ; + Column5.Width = 143, ; + Column6.ColumnOrder = 8, ; + Column6.ControlSource = "dataora", ; + Column6.FontName = "Arial", ; + Column6.FontSize = 10, ; + Column6.Name = "cDataora", ; + Column6.ReadOnly = .T., ; + Column6.Width = 95, ; + Column7.ColumnOrder = 5, ; + Column7.ControlSource = "notaContab", ; + Column7.FontName = "Arial", ; + Column7.FontSize = 10, ; + Column7.Name = "Column7", ; + Column7.ReadOnly = .T., ; + Column7.Width = 142, ; + Column8.ColumnOrder = 6, ; + Column8.ControlSource = "preturi_cu_tva", ; + Column8.FontName = "Arial", ; + Column8.FontSize = 10, ; + Column8.Name = "cPreturi_cu_tva", ; + Column8.ReadOnly = .T., ; + Column8.Sparse = .F., ; + Column8.Width = 88 + *< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" /> + + ADD OBJECT 'grd_politici_pret.cDataI.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Data inceput", ; + FontCharSet = 238, ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_pret.cDataI.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_pret.cDataora.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Data operarii", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_pret.cDataora.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_pret.cDataS.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Data sfarsit", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_pret.cDataS.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_pret.cNume.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Denumire lista de preturi", ; + FontCharSet = 238, ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_pret.cNume.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_pret.cNume_val.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Valuta", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_pret.cNume_val.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_pret.Column7.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Nota contabila", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_pret.Column7.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politici_pret.cPreturi_cu_tva.Check1' AS checkbox WITH ; + Alignment = 2, ; + Caption = "", ; + Centered = .T., ; + FontName = "Arial", ; + FontSize = 10, ; + Height = 17, ; + Left = 26, ; + Name = "Check1", ; + ReadOnly = .T., ; + Top = 23, ; + Width = 60 + *< END OBJECT: BaseClass="checkbox" /> + + ADD OBJECT 'grd_politici_pret.cPreturi_cu_tva.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Preturi cu TVA", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_pret.cUtilizator.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Operator", ; + FontName = "Arial", ; + FontSize = 10, ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politici_pret.cUtilizator.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + FontSize = 10, ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'lb_detalii_politica' AS lb_simplu WITH ; + Anchor = 3, ; + Caption = "Detalii listă prețuri", ; + Left = 11, ; + Name = "lb_detalii_politica", ; + TabIndex = 20, ; + Top = 314 + *< END OBJECT: ClassLib="..\comun\clase\lb.vcx" BaseClass="label" /> + + PROCEDURE actualizeaza_grid1 + Lparameters lcFiltru + If Empty(lcFiltru) + lcFiltru = popolitici.ca_baza1.cfiltru + Endif + Thisform.MousePointer= 11 + Thisform.LockScreen=.T. + save_grid_tag(Thisform.grd_politici_pret) + popolitici.ca_baza1.cfiltru=lcFiltru + popolitici.ca_baza1.afisare() + restore_grid_tag(Thisform.grd_politici_pret) + Thisform.LockScreen=.F. + Thisform.MousePointer= 0 + If Reccount('crspoliticipret')>0 + Thisform.grd_politici_pret.SetFocus() + Endif + ENDPROC + + PROCEDURE actualizeaza_grid2 + Lparameters lcFiltru + If Empty(lcFiltru) + lcFiltru = popoliticiart.ca_baza1.cfiltru + Endif + Thisform.MousePointer= 11 + Thisform.LockScreen=.T. + Thisform.grd_politici_art.salveaza_grid() + popoliticiart.ca_baza1.cfiltru=lcFiltru + popoliticiart.ca_baza1.afisare() + Thisform.grd_politici_art.cpret.InputMask = get_mask(14,Iif(Reccount('crspoliticipret')>0,Iif(crspoliticipret.moneda_nationala=1,gnPPretV,gnPVal),gnPPretV)) + Thisform.grd_politici_art.incarca_grid() + Thisform.LockScreen=.F. + Thisform.MousePointer= 0 + ENDPROC + + PROCEDURE do_adauga + Private pniesire + pniesire=0 + If Used('crspolitica_curenta') + Use In crspolitica_curenta + Endif + update_articole() + Select a.* From crspoliticiart a Where 1=2 Into Cursor crspolitica_curenta Readwrite + Select crspoliticipret + + + Scatter Name loRec Blank + loRec.datai=Ttod(get_ora()) + loRec.Id_sucursala=gnIdSucursala + Do Adauga_Modifica_Inregistrare With "politici_pret",loRec,,"INSERT" + If pniesire=1 + This.actualizeaza_grid1() + Select crspoliticipret + Locate For datai=loRec.datai And nume_lista_preturi=loRec.nume_lista_preturi + Thisform.grd_politici_pret.SetFocus() + Endif + + ENDPROC + + PROCEDURE do_cauta + Local lcFiltru, lcFiltruList + lcFiltru = [2=2] + lcFiltruList = [2=2] + + If Thisform.ck_datai.Value=1 + lcFiltru = lcFiltru + Thisform.ck_datai.filtru + lcFiltruList = lcFiltruList + thisform.ck_datai.filtru_vfp + Endif + + If Thisform.ck_datas.Value=1 + lcFiltru = lcFiltru + Thisform.ck_datas.filtru + lcFiltruList = lcFiltruList + thisform.ck_datas.filtru_vfp + Endif + + If Thisform.ck_nume_lista_preturi.Value=1 + lcFiltru = lcFiltru + Thisform.ck_nume_lista_preturi.filtru + lcFiltruList = lcFiltruList + thisform.ck_nume_lista_preturi.filtru + Endif + + If Thisform.ck_nume_val.Value=1 + lcFiltru = lcFiltru + Thisform.ck_nume_val.filtru + lcFiltruList = lcFiltruList + thisform.ck_nume_val.filtru + Endif + + If Thisform.ck_utilizator.Value=1 + lcFiltru = lcFiltru + Thisform.ck_utilizator.filtru + lcFiltruList = lcFiltruList + thisform.ck_utilizator.filtru + Endif + + *!* modificare v 2.0.14 + If Thisform.ck_active.Value = 1 + lcFiltru = lcFiltru + [ and least(NVL(last_day(to_date('] + ALLTRIM(STR(m.gnAn)) + PADL(m.gnLuna,2,'0') + [','YYYYMM')),sysdate),sysdate) between datai and ] + ; + [NVL(datas, to_date('300012', 'YYYYMM'))] + lcFiltruList = lcFiltruList + [ and least(NVL(last_day(to_date('] + ALLTRIM(STR(m.gnAn)) + PADL(m.gnLuna,2,'0') + [','YYYYMM')),sysdate),sysdate) between datai and ] + ; + [NVL(datas, to_date('300012', 'YYYYMM'))] + Endif + *!* modificare v 2.0.14 ^ + + thisform.cFiltru = lcFiltruList + Thisform.actualizeaza_grid1(lcFiltru+gcCondSucursala) + + If Reccount('crspoliticipret')=0 + aMessagebox('Cautarea nu a intors rezultate!',0+48,'Info cautare') + Thisform.ck_datai.SetFocus() + Else + Thisform.grd_politici_pret.SetFocus() + Endif + ENDPROC + + PROCEDURE do_copie + PRIVATE pnId_pol + LOCAL lcAlias, lnRaspuns + lcAlias = thisform.grd_politici_pret.RecordSource + SELECT (lcAlias) + IF RECCOUNT()>0 + SCATTER NAME poPol_copy + pnId_pol = id_pol + + lnRaspuns = AMESSAGEBOX("Doriti sa copiati politica de preturi " + ALLTRIM(poPol_copy.nume_lista_preturi) + "?",4+32,"Copiere politica de preturi") + IF lnRaspuns = 7 && 7 = No ; 6 = Yes + RETURN + Else + *!* modificare 2.0.5 + lnRaspuns = amessagebox("Doriti sa schimbati valuta de pe aceasta politica de preturi?"+; + Chr(13)+Chr(10)+Chr(13)+Chr(10)+; + "ATENTIE! Se va modifica doar valuta de pe toate articolele din lista, dar nu se va face conversia in noua valuta.",4+32,"Schimbare valuta politica de preturi") + If lnRaspuns = 6 + loCauta = caut_valuta() + If gnButon = 1 + lcIdValuta = Alltrim(Str(loCauta.id_valuta)) + Else + lcIdValuta = [NULL] + endif + Else + lcIdValuta = [NULL] + EndIf + lcSql = [begin pack_preturi.copiaza_politica(]+ALLTRIM(STR(pnId_pol))+[,] + lcIdValuta + [,]+ALLTRIM(STR(gnIdUtil))+[); end;] + *!* lcSql = [begin pack_preturi.copie_politica(]+ALLTRIM(STR(pnId_pol))+[,]+ALLTRIM(STR(gnIdUtil))+[); end;] + *!* modificare 2.0.5 ^ + lnSucces = goExecutor.oExecute(lcSql) + + IF lnSucces < 0 + aMESSAGEBOX('pack_preturi.copie_politica'+goExecutor.cEroare,0+16,"Eroare") + RETURN + ELSE + WAIT WINDOW "S-a copiat politica de preturi..." NOWAIT + ENDIF + + SELECT (lcAlias) + THISFORM.actualizeaza_grid1() + + SELECT (lcAlias) + LOCATE FOR id_pol = pnId_pol + + THISFORM.grd_politici_pret.SETFOCUS + ENDIF + ENDIF + + ENDPROC + + PROCEDURE do_excel + If Reccount(Thisform.grd_politici_pret.RecordSource) > 0 + Local lcNumeFisier + Select (Thisform.grd_politici_pret.RecordSource) + lcNumeFisier = Strtran(Alltrim(nume_lista_preturi),[ ],[_]) + goExport.export2xls(Thisform.grd_politici_art.RecordSource, lcNumeFisier) + Else + amessagebox("Nu ati ales politica!",48,"Atentie") + Endif + + ENDPROC + + PROCEDURE do_listare + x= xmenu('\ 0 + Select crspoliticipret + lnIdPol = id_pol + lcSql = [select * from ] + gcS + [.CRM_VRAP_POLITICI where id_pol = ] + Alltrim(Str(lnIdPol)) + ; + [ order by id_pol,nume_lista_preturi, id_pol, nume_articol] + lcRaport = [rap_liste] + Else + amessagebox("Nu este selectata politica!",48,"Atentie") + Return + Endif + Case x = 2 + lcSql = [select * from ] + gcS + [.CRM_VRAP_POLITICI order by nume_lista_preturi,id_pol, nume_articol] + lcRaport = [rap_liste] + Case x = 3 + lcSql = [select * from ] + gcS + [.CRM_VRAP_POL_SUBGRUPE order by nume_lista_preturi,id_pol,subgrupa,id_subgrupa,nume_articol] + && modificare v 2.0.4 [nume_lista_preturi, subgrupa, nume_articol] + lcRaport = [rap_liste_subgrupe] + Case x = 4 + lcSql = [select * from ] + gcS + [.CRM_VRAP_POL_CURENTE_SUBGRUPE order by nume_lista_preturi,id_pol,subgrupa,id_subgrupa,nume_articol] + && modificare v 2.0.4 [nume_lista_preturi, subgrupa, nume_articol] + lcRaport = [rap_liste_subgrupe] + Endcase + + lcCursor = [crsListe] + *!* modificare v 2.0.18 + *!* pcDataOra = get_ora(2) + *!* modificare v 2.0.18 ^ + If Used(lcCursor) + Use In (lcCursor) + Endif + lnSucces = goExecutor.oExecute(lcSql,lcCursor) + If lnSucces < 0 + amessagebox(goExecutor.oPrelucrareEroare(),0+16,"Eroare") + Else + Thisform.AlwaysOnTop = .F. + *!* modificare v 2.0.18 + goExport.export2frx(lcCursor,lcRaport) + *!* Select (lcCursor) + *!* Keyboard "{CTRL+F10}" + *!* Report Form (lcRaport) To Printer Prompt Preview + *!* modificare v 2.0.18 ^ + Thisform.AlwaysOnTop=.T. + + If Used(lcCursor) + Use In (lcCursor) + Endif + Endif + Release pcDataOra, lnIdPol + Endif + + ENDPROC + + PROCEDURE do_modifica + If Reccount('crspoliticipret')>0 + Local loRec + Private pniesire + pniesire=0 + If Used('crspolitica_curenta') + Use In crspolitica_curenta + Endif + update_articole() + Select crspoliticipret + Scatter Name loRec + Select a.* From crspoliticiart a ; + INTO Cursor crspolitica_curenta Readwrite + Do Adauga_Modifica_Inregistrare With "politici_pret",loRec,loRec.id_pol,"UPDATE" + If pniesire=1 + This.actualizeaza_grid1() + Endif + Select crspoliticipret + Locate For id_pol=loRec.id_pol + Thisform.grd_politici_pret.SetFocus() + Endif + + ENDPROC + + PROCEDURE do_modiparam + If Reccount('crspoliticipret')>0 + Local loRec + Private pniesire + pniesire=0 + Select crspoliticipret + Scatter Name loRec + loFrm = createobject("frm_politici_pret_rul",loRec) + loFrm.Show(1) + If pniesire=1 + This.actualizeaza_grid2() + Endif + Thisform.grd_politici_pret.SetFocus() + Endif + ENDPROC + + PROCEDURE do_reset + With Thisform + For i=1 To .Objects.Count + If Upper(.Objects(i).BaseClass)='CHECKBOX' + .Objects(i).Value=0 + Endif + Endfor + Endwith + Thisform.ck_datai.SetFocus() + + ENDPROC + + PROCEDURE do_sterge + If Reccount('crspoliticipret')>0 + Local loRec + Select crspoliticipret + Scatter Name loRec + *!* modificare v 2.0.5 + *!* Do STERGE_INREGISTRARE With "politici_pret",loRec.id_pol + *!* If gnButon = 1 + *!* This.actualizeaza_grid1() + *!* Endif + lnRecNo = Recno() + If verifica_politica(loRec.id_pol,2) + Do STERGE_INREGISTRARE With "politici_pret",loRec.id_pol + If gnButon = 1 + This.actualizeaza_grid1() + lnRecCount = Reccount('crspoliticipret') + If lnRecCount > 0 + Select crspoliticipret + Go Min(lnRecNo,lnRecCount) + Endif + Thisform.grd_politici_pret.SetFocus() + Endif + Endif + *!* modificare v 2.0.5 ^ + Endif + ENDPROC + + PROCEDURE Init + DoDefault() + *!* modificare v 2.0.15 + If Nvl(gnAvertizareRetetaPrinc,0) = 1 + Thisform.grd_politici_art.SetAll("DynamicForeColor","IIF(reteta_principala=1,RGB(0,0,255),RGB(0,0,0))","Column") + Endif + *!* modificare v 2.0.15 + Thisform.actualizeaza_grid1() + Thisform.actualizeaza_grid2() + Thisform.WindowState = 2 + ENDPROC + + PROCEDURE cmdArtCompus.Click + PRIVATE pnPretPachet, pnId_pachet + STORE 0 TO pnPretPachet, pnId_pachet + + LOCAL lctabel, lnId_pol_art + lctabel = THISFORM.grd_politici_art.RECORDSOURCE && grid jos + STORE 0 TO lnId_pol_art + + SELECT (lctabel) + IF RECCOUNT()>0 + pnId_pachet = id_pol_art + lcNume_pachet = UPPER(ALLTRIM(nume_articol)) + + PRIVATE poPachetArt + STORE '' TO poPachetArt + + LOCAL lcSchema1, lcSelect1, lcOrder1, lcFiltru1, llAfiseaza + lcSchema1 = [] + lcSelect1 = [select * from vcrm_pachete_articole] + lcOrder1 = [denumire] + lcgroup = [] + lcFiltru1 = [2=2] + lcFiltruOriginal = [id_pachet=] + ALLTRIM(STR(pnId_pachet)) + llModParam = .T. + llAfiseaza = .F. + + gencursor('poPachetArt','crsPachetArt', lcSelect1, lcFiltru1, lcSchema1, lcOrder1, llAfiseaza, lcgroup, llModParam, lcFiltruOriginal) + poPachetArt.ca_baza1.afisare() + + SELECT crsPachetArt + lopa = CREATEOBJECT("frm_pachet_articole") + lopa.lb_titlu_alb_b121.caption = "Pachet de articole: " + lcNume_pachet + lopa.SHOW(1) + + lcSql = [begin pack_preturi.sterge_pachetArticole(]+ALLTRIM(STR(pnId_pachet))+[,]+ALLTRIM(STR(gnIdUtil))+[); end;] + lnSucces = goExecutor.oExecute(lcSql) + IF lnSucces < 0 + aMESSAGEBOX('pack_preturi.sterge_pachetArticole'+goExecutor.cEroare,0+16,"Eroare") + RETURN + ENDIF + + SELECT crsPachetArt + SCAN + lnId_pol_art = id_pol_art + lcSql = [begin pack_preturi.adauga_pachetArticol(]+ALLTRIM(STR(pnId_pachet))+[,]+ALLTRIM(STR(lnId_pol_art))+ [,] + ALLTRIM(STR(gnIdUtil))+[); end;] + lnSucces = goExecutor.oExecute(lcSql) + IF lnSucces < 0 + aMESSAGEBOX('pack_preturi.adauga_pachetArticol'+goExecutor.cEroare,0+16,"Eroare") + RETURN + ENDIF + + SELECT crsPachetArt + ENDSCAN + + + RELEASE poPachetArt + IF USED("crsPachetArt") + USE IN crsPachetArt + ENDIF + + lcSql = [begin pack_preturi.modifica_pret_pol_pret_art(]+ALLTRIM(STR(pnId_pachet))+[,]+ALLTRIM(STR(pnPretPachet))+[); end;] + lnSucces = goExecutor.oExecute(lcSql) + IF lnSucces < 0 + aMESSAGEBOX('pack_preturi.modifica_pret_pol_pret_art'+goExecutor.cEroare,0+16,"Eroare") + RETURN + ENDIF + + THISFORM.grd_politici_pret.AFTERROWCOLCHANGE + ENDIF + + + ENDPROC + + PROCEDURE grd_politici_pret.AfterRowColChange + Lparameters nColIndex + If This.RowColChange<>2 + Local lnIdPol + Select crspoliticipret + lnIdPol=id_pol + lcNume=nume_lista_preturi + lcPerioada=Iif(!Empty(Nvl(datai,{})),Dtoc(datai),[//])+[ - ]+Iif(!Empty(Nvl(DataS,{})),Dtoc(DataS),[//]) + lcFiltru=[id_pol=]+Alltrim(Str(lnIdPol)) + Thisform.actualizeaza_grid2(lcFiltru) + Thisform.lb_detalii_politica.Caption="Detalii lista de preturi "+Alltrim(lcNume)+" ( "+lcPerioada+" ) " + Endif + + ENDPROC + +ENDDEFINE + +DEFINE CLASS frm_politici_pret_nou AS _frmbase OF "..\comun\clase\_frm_base.vcx" + *< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" /> + + *-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder + *< OBJECTDATA: ObjPath="Clb_nume" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_articole" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_articole.cArticol.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_articole.cArticol.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_articole.cUM.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_articole.cUM.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_articole.cCodmat.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_articole.cCodmat.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_articole.cCant_bax.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_articole.cCant_bax.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_articole.cUM2.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_articole.cUM2.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cArticol.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cArticol.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cUM.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cUM.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cPret.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cPret.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cValuta.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cValuta.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cCodmat.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cCodmat.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.Column6.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.Column6.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cExplicatie_venchelt.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cExplicatie_venchelt.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cCant_bax.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cCant_bax.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cUM2.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_politica_curenta.cUM2.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_urmator1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_precedent1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Lb_simplu2" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Cus_odata_politici_pret1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="txtArticoleLista" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="ck_preturi_cu_tva" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Ct_clb_valuta" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Ct_clb_notaContab" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Lb_articole" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="txtArticole" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="lb_codmat" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="txtCodmat" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="ct_codmat" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="ct_articole" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_reset1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Clb_valabilitate" UniqueID="" Timestamp="" /> + + * + *m: do_alege_notacontab + *m: do_alege_valuta + *m: do_creeaza_filtru + *p: cnewvalue + *p: cnume_val && Numele valutei alese. + *p: coldvalue + *p: loperatiipermise + *p: nid + *p: nid_valuta && Id-ul valutei pentru politica de preturi. + *p: orec + * + + * + cgridsortlist = grd_articole,grd_politica_curenta + cnewvalue = + cnume_val = + coldvalue = + DoCreate = .T. + Height = 586 + lactiv3 = .T. + loperatiipermise = .T. + Name = "frm_politici_pret_nou" + nid_valuta = 0 + Width = 781 + WindowState = 2 + _shape1.Anchor = 10 + _shape1.Height = 29 + _shape1.Left = 0 + _shape1.Name = "_shape1" + _shape1.Top = 0 + _shape1.Width = 780 + _shape2.Height = 29 + _shape2.Left = 720 + _shape2.Name = "_shape2" + _shape2.Top = 0 + _shape2.Width = 61 + Lb_titlu_alb_b121.Caption = "LISTĂ DE PREȚURI" + Lb_titlu_alb_b121.FontBold = .T. + Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121" + Lb_titlu_alb_b121.TabIndex = 19 + BUT_TERMIN1.Anchor = 8 + BUT_TERMIN1.Height = 27 + BUT_TERMIN1.Left = 751 + BUT_TERMIN1.Name = "BUT_TERMIN1" + BUT_TERMIN1.TabIndex = 16 + BUT_TERMIN1.Top = 1 + BUT_TERMIN1.Width = 30 + Gridsort1.Name = "Gridsort1" + * + + ADD OBJECT 'But_modifica1' AS but_modifica WITH ; + Anchor = 8, ; + Left = 729, ; + Name = "But_modifica1", ; + TabIndex = 21, ; + Top = 191, ; + Visible = .T. + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'But_precedent1' AS but_precedent WITH ; + Left = 327, ; + Name = "But_precedent1", ; + TabIndex = 15, ; + Top = 318 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'But_renunt1' AS but_renunt WITH ; + Anchor = 8, ; + Height = 27, ; + Left = 721, ; + Name = "But_renunt1", ; + TabIndex = 17, ; + Top = 1, ; + Width = 30 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'But_reset1' AS but_reset WITH ; + Left = 312, ; + Name = "But_reset1", ; + TabIndex = 24, ; + Top = 164 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'But_urmator1' AS but_urmator WITH ; + Left = 327, ; + Name = "But_urmator1", ; + TabIndex = 13, ; + Top = 281 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'ck_preturi_cu_tva' AS checkbox WITH ; + Alignment = 0, ; + AutoSize = .T., ; + BackStyle = 0, ; + Caption = "Prețuri cu TVA", ; + ControlSource = "porec.preturi_cu_tva", ; + FontCharSet = 238, ; + FontSize = 10, ; + Height = 18, ; + Left = 401, ; + Name = "ck_preturi_cu_tva", ; + TabIndex = 5, ; + Top = 78, ; + Width = 104 + *< END OBJECT: BaseClass="checkbox" /> + + ADD OBJECT 'Clb_nume' AS clb_tx_simplu WITH ; + Height = 29, ; + Left = 23, ; + Name = "Clb_nume", ; + TabIndex = 1, ; + Top = 42, ; + Width = 579, ; + Text_simplu1.Alignment = 3, ; + Text_simplu1.ControlSource = "porec.nume_lista_preturi", ; + Text_simplu1.Height = 23, ; + Text_simplu1.Left = 101, ; + Text_simplu1.Name = "Text_simplu1", ; + Text_simplu1.Top = 3, ; + Text_simplu1.Width = 474, ; + Lb_simplu1.Caption = "Nume", ; + Lb_simplu1.Name = "Lb_simplu1" + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'Clb_valabilitate' AS clb_n1n2_simplu WITH ; + Height = 29, ; + Left = 23, ; + Name = "Clb_valabilitate", ; + TabIndex = 2, ; + Top = 70, ; + Width = 312, ; + tx_n1.ControlSource = "porec.datai", ; + tx_n1.Left = 152, ; + tx_n1.Name = "tx_n1", ; + tx_n1.Top = 2, ; + Lb_simplu1.Caption = "Valabilitate", ; + Lb_simplu1.Name = "Lb_simplu1", ; + tx_n2.ControlSource = "porec.datas", ; + tx_n2.Left = 232, ; + tx_n2.Name = "tx_n2", ; + tx_n2.Top = 2 + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'ct_articole' AS criteriu_text WITH ; + Height = 24, ; + Left = 95, ; + Name = "ct_articole", ; + RowSource = "incepe cu...,1,este...,2,nu este...,3,contine...,4,nu contine...,5,nu are valori,6,are valori,7,toate,8", ; + TabIndex = 10, ; + Top = 193, ; + Value = 1, ; + Width = 84 + *< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="combobox" /> + + ADD OBJECT 'Ct_clb_notaContab' AS ct_clb_cautare_var WITH ; + cconditie = Empty(NVL(poRec.id_nota,0)), ; + cprocedura = Thisform.do_alege_notacontab, ; + cvar_afisata = porec.notaContab, ; + Left = 22, ; + Name = "Ct_clb_notaContab", ; + TabIndex = 4, ; + Top = 125, ; + SHAPE_CAUTARE.Name = "SHAPE_CAUTARE", ; + IMG_CAUTARE.Name = "IMG_CAUTARE", ; + LB_CAUTARE.Caption = "Nota contabilă", ; + LB_CAUTARE.Left = 10, ; + LB_CAUTARE.Name = "LB_CAUTARE", ; + LB_CAUTARE.Top = 7, ; + TX_CAUTARE.Left = 125, ; + TX_CAUTARE.Name = "TX_CAUTARE", ; + TX_CAUTARE.Top = 4 + *< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="container" /> + + ADD OBJECT 'Ct_clb_valuta' AS ct_clb_cautare_var WITH ; + cconditie = Empty(NVL(poRec.id_valuta,0)), ; + cprocedura = Thisform.do_alege_valuta, ; + cvar_afisata = porec.nume_val, ; + Left = 22, ; + Name = "Ct_clb_valuta", ; + TabIndex = 3, ; + Top = 97, ; + SHAPE_CAUTARE.Name = "SHAPE_CAUTARE", ; + IMG_CAUTARE.Name = "IMG_CAUTARE", ; + LB_CAUTARE.Caption = "Valuta", ; + LB_CAUTARE.Left = 10, ; + LB_CAUTARE.Name = "LB_CAUTARE", ; + LB_CAUTARE.Top = 7, ; + TX_CAUTARE.Left = 125, ; + TX_CAUTARE.Name = "TX_CAUTARE", ; + TX_CAUTARE.Top = 4 + *< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="container" /> + + ADD OBJECT 'ct_codmat' AS criteriu_text WITH ; + Height = 24, ; + Left = 95, ; + Name = "ct_codmat", ; + RowSource = "incepe cu...,1,este...,2,nu este...,3,contine...,4,nu contine...,5,nu are valori,6,are valori,7,toate,8", ; + TabIndex = 8, ; + Top = 167, ; + Value = 2, ; + Width = 84 + *< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="combobox" /> + + ADD OBJECT 'Cus_odata_politici_pret1' AS cus_odata_politici_pret WITH ; + Left = 660, ; + Name = "Cus_odata_politici_pret1", ; + Top = 48 + *< END OBJECT: ClassLib="onom_preturi.vcx" BaseClass="custom" /> + + ADD OBJECT 'grd_articole' AS _grdrow WITH ; + Anchor = 7, ; + ColumnCount = 5, ; + DeleteMark = .F., ; + Height = 355, ; + HighlightStyle = 2, ; + Left = 18, ; + Name = "grd_articole", ; + Panel = 1, ; + RecordSource = "v_articole", ; + TabIndex = 12, ; + Top = 221, ; + Width = 300, ; + Column1.ColumnOrder = 2, ; + Column1.ControlSource = "nume_articol", ; + Column1.FontName = "Arial", ; + Column1.Name = "cArticol", ; + Column1.ReadOnly = .T., ; + Column1.Width = 162, ; + Column2.ColumnOrder = 3, ; + Column2.ControlSource = "um", ; + Column2.FontName = "Arial", ; + Column2.Name = "cUM", ; + Column2.ReadOnly = .T., ; + Column2.Width = 51, ; + Column3.ColumnOrder = 1, ; + Column3.ControlSource = "codmat", ; + Column3.FontName = "Arial", ; + Column3.Name = "cCodmat", ; + Column3.ReadOnly = .T., ; + Column3.Width = 75, ; + Column4.ControlSource = "cant_bax", ; + Column4.FontName = "Arial", ; + Column4.InputMask = (get_mask(14,gnPcant)), ; + Column4.Name = "cCant_bax", ; + Column4.Width = 60, ; + Column5.ControlSource = "um2", ; + Column5.FontName = "Arial", ; + Column5.Name = "cUM2", ; + Column5.Width = 40 + *< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" /> + + ADD OBJECT 'grd_articole.cArticol.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Articol", ; + FontName = "Arial", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_articole.cArticol.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_articole.cCant_bax.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Cant./impach.", ; + FontName = "Arial", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_articole.cCant_bax.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_articole.cCodmat.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Cod material", ; + FontName = "Arial", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_articole.cCodmat.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_articole.cUM.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "U.M.", ; + FontName = "Arial", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_articole.cUM.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_articole.cUM2.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "U.M. 2", ; + FontName = "Arial", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_articole.cUM2.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politica_curenta' AS _grdrow WITH ; + Anchor = 15, ; + ColumnCount = 9, ; + DeleteMark = .F., ; + Height = 355, ; + HighlightStyle = 2, ; + Left = 368, ; + Name = "grd_politica_curenta", ; + Panel = 1, ; + ReadOnly = .T., ; + RecordSource = "crspolitica_curenta", ; + TabIndex = 14, ; + Top = 221, ; + Width = 396, ; + Column1.ColumnOrder = 2, ; + Column1.ControlSource = "nume_articol", ; + Column1.FontName = "Arial", ; + Column1.Name = "cArticol", ; + Column1.ReadOnly = .T., ; + Column1.Width = 147, ; + Column2.ColumnOrder = 3, ; + Column2.ControlSource = "um", ; + Column2.FontName = "Arial", ; + Column2.Name = "cUM", ; + Column2.ReadOnly = .T., ; + Column2.Width = 46, ; + Column3.ColumnOrder = 6, ; + Column3.ControlSource = "pret", ; + Column3.FontName = "Arial", ; + Column3.InputMask = (get_mask(14,gnPPretV)), ; + Column3.Name = "cPret", ; + Column3.ReadOnly = .T., ; + Column3.Width = 62, ; + Column4.ColumnOrder = 7, ; + Column4.ControlSource = "explicatie", ; + Column4.FontName = "Arial", ; + Column4.Name = "cValuta", ; + Column4.ReadOnly = .T., ; + Column4.Width = 38, ; + Column5.ColumnOrder = 1, ; + Column5.ControlSource = "codmat", ; + Column5.FontName = "Arial", ; + Column5.Name = "cCodmat", ; + Column5.ReadOnly = .T., ; + Column5.Width = 75, ; + Column6.ColumnOrder = 8, ; + Column6.ControlSource = "proc_tvav", ; + Column6.FontName = "Arial", ; + Column6.Format = "rk", ; + Column6.InputMask = "99.99", ; + Column6.Name = "Column6", ; + Column6.ReadOnly = .T., ; + Column6.Width = 51, ; + Column7.ColumnOrder = 9, ; + Column7.ControlSource = "explicatie_venchelt", ; + Column7.FontName = "Arial", ; + Column7.Name = "cExplicatie_venchelt", ; + Column7.ReadOnly = .T., ; + Column7.Width = 91, ; + Column8.ColumnOrder = 4, ; + Column8.ControlSource = "cant_bax", ; + Column8.FontName = "Arial", ; + Column8.InputMask = (get_mask(14,gnPcant)), ; + Column8.Name = "cCant_bax", ; + Column8.ReadOnly = .T., ; + Column8.Width = 59, ; + Column9.ColumnOrder = 5, ; + Column9.ControlSource = "um2", ; + Column9.FontName = "Arial", ; + Column9.Name = "cUM2", ; + Column9.ReadOnly = .T., ; + Column9.Width = 39 + *< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" /> + + ADD OBJECT 'grd_politica_curenta.cArticol.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Articol", ; + FontName = "Arial", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politica_curenta.cArticol.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + Enabled = .T., ; + FontName = "Arial", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politica_curenta.cCant_bax.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Cant./impach.", ; + FontName = "Arial", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politica_curenta.cCant_bax.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politica_curenta.cCodmat.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Cod material", ; + FontName = "Arial", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politica_curenta.cCodmat.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politica_curenta.cExplicatie_venchelt.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Venit / cheltuiala", ; + FontName = "Arial", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politica_curenta.cExplicatie_venchelt.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politica_curenta.Column6.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Proc. TVA", ; + FontName = "Arial", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politica_curenta.Column6.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politica_curenta.cPret.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Pret", ; + FontName = "Arial", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politica_curenta.cPret.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politica_curenta.cUM.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "UM", ; + FontName = "Arial", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politica_curenta.cUM.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politica_curenta.cUM2.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "U.M. 2", ; + FontName = "Arial", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politica_curenta.cUM2.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_politica_curenta.cValuta.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Valuta", ; + FontName = "Arial", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_politica_curenta.cValuta.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T., ; + SelectedBackColor = 100,185,255 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'Lb_articole' AS lb_simplu WITH ; + Caption = "Articol", ; + Left = 20, ; + Name = "Lb_articole", ; + TabIndex = 22, ; + Top = 197 + *< END OBJECT: ClassLib="..\comun\clase\lb.vcx" BaseClass="label" /> + + ADD OBJECT 'lb_codmat' AS lb_simplu WITH ; + Caption = "Cod material", ; + Left = 20, ; + Name = "lb_codmat", ; + TabIndex = 23, ; + Top = 171 + *< END OBJECT: ClassLib="..\comun\clase\lb.vcx" BaseClass="label" /> + + ADD OBJECT 'Lb_simplu2' AS lb_simplu WITH ; + Caption = "Articol", ; + Left = 368, ; + Name = "Lb_simplu2", ; + TabIndex = 20, ; + Top = 198 + *< END OBJECT: ClassLib="..\comun\clase\lb.vcx" BaseClass="label" /> + + ADD OBJECT 'txtArticole' AS textbox WITH ; + Format = "!k", ; + Height = 23, ; + Left = 183, ; + Name = "txtArticole", ; + TabIndex = 11, ; + ToolTipText = "Tastati primele litere pentru cautare articole", ; + Top = 194, ; + Width = 144 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'txtArticoleLista' AS textbox WITH ; + FontSize = 10, ; + Format = "!k", ; + Height = 23, ; + Left = 415, ; + Name = "txtArticoleLista", ; + TabIndex = 18, ; + ToolTipText = "Tastati primele litere pentru cautare articole in lista de preturi", ; + Top = 195, ; + Width = 257 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'txtCodmat' AS textbox WITH ; + Format = "!k", ; + Height = 23, ; + Left = 183, ; + Name = "txtCodmat", ; + TabIndex = 9, ; + ToolTipText = "Tastati primele litere pentru cautare articole", ; + Top = 168, ; + Width = 111 + *< END OBJECT: BaseClass="textbox" /> + + PROCEDURE actualizeaza_grid2 + *!* modificare v 2.0.20 + Thisform.grd_POLITICA_CURENTA.cPret.InputMask = get_mask(14,Iif(poRec.moneda_nationala=1,gnPPretV,gnPVal)) + Thisform.grd_POLITICA_CURENTA.Refresh() + *!* modificare v 2.0.20 ^ + ENDPROC + + PROCEDURE Destroy + If Used('v_articole') + Use In v_articole + Endif + If Used('crspolitica_curenta') + Use In crspolitica_curenta + Endif + ENDPROC + + PROCEDURE do_adauga + Lparameters toArticol + Thisform.grd_politica_curenta.salveaza_grid() + Select crspolitica_curenta + Append Blank + toArticol.codmat=Nvl(toArticol.codmat,Space(1)) + toArticol.um2 = Nvl(toArticol.um2,Space(1)) + toArticol.explicatie=Iif(toArticol.procent=0,toArticol.nume_val,'%') + Gather Name toArticol + * Go Top + Thisform.grd_politica_curenta.incarca_grid() + + ENDPROC + + PROCEDURE do_alege_notacontab + Local lcselect, lcfiltru, lcschema, lcorder, lccoloane, lcTitlu, lcTitluColoane, lcFiltruOriginal, lcNumeProc + lcselect = [select v.id_nota, v.denumire FROM vcrm_note_vanzari v] + lcfiltru = [] + lcschema = [] + lcorder = [v.denumire] + lccoloane = [denumire] + lcTitlu = [Alegeti nota] + lcTitluColoane = [Denumire] + lcFiltruOriginal = [] + lcNumeProc = "" + lnPornire = 1 + llDesktop = .F. + locauta = cauta_alfa(lcselect, lcfiltru, lcschema, lcorder, lccoloane, lcTitlu, lcTitluColoane, lcNumeProc, .F., lcFiltruOriginal,,lnPornire,,,llDesktop) + + If buton=1 + porec.id_nota = locauta.id_nota + porec.notaContab = locauta.denumire + Thisform.ct_clb_notaContab.Refresh + Endif + Thisform.ck_preturi_cu_tva.SetFocus() + + ENDPROC + + PROCEDURE do_alege_valuta + Local loCauta, lnPornire, llDesktop + + lnPornire = 1 + llDesktop = .F. + loCauta = caut_valuta(lnPornire, llDesktop) + If gnButon = 1 + poRec.id_valuta = Iif(!Empty(loCauta.id_valuta), loCauta.id_valuta, 0) + poRec.nume_val = Iif(!Empty(loCauta.nume_val), loCauta.nume_val, "") + Thisform.ct_clb_valuta.Refresh() + *!* modificare v 2.0.20 + poRec.moneda_nationala = loCauta.moneda_nationala + *!* modificare v 2.0.21 + *!* Thisform.actualizeaza_grid2() + If This.cus_odata_politici_pret1.cactiune = [UPDATE] + Thisform.actualizeaza_grid2() + Endif + *!* modificare v 2.0.21 ^ + *!* modificare v 2.0.20 ^ + Endif + Thisform.ct_clb_notaContab.SetFocus() + + ENDPROC + + PROCEDURE do_creeaza_filtru + Lparameters toCriteriu,tcNumeCamp,tcValoare + Local lnCriteriu,lcFiltru + lnCriteriu = toCriteriu.Value + Do Case + Case lnCriteriu = 1 + lcFiltru = "LIKE('" + Upper(Strtran(tcValoare,['],[''])) + "*',UPPER(Nvl("+Alltrim(tcNumeCamp)+",'')))" + Case lnCriteriu = 2 + lcFiltru = "UPPER(Nvl("+Alltrim(tcNumeCamp)+",''))='" + Upper(Strtran(tcValoare,['],[''])) + "'" + Case lnCriteriu = 3 + lcFiltru = "UPPER(Nvl("+Alltrim(tcNumeCamp)+",''))<>'" + Upper(Strtran(tcValoare,['],[''])) + "'" + Case lnCriteriu = 4 + lcFiltru = "LIKE('*" + Upper(Strtran(tcValoare,['],[''])) + "*',UPPER(Nvl("+Alltrim(tcNumeCamp)+",'')))" + Case lnCriteriu = 5 + lcFiltru = "!LIKE('*" + Upper(Strtran(tcValoare,['],[''])) + "*',UPPER(Nvl("+Alltrim(tcNumeCamp)+",'')))" + Case lnCriteriu=6 + lcFiltru = "EMPTY(Nvl("+Alltrim(tcNumeCamp)+",''))" + Case lnCriteriu=7 + lcFiltru = "!EMPTY(Nvl("+Alltrim(tcNumeCamp)+",''))" + CASE lnCriteriu=8 + lcFiltru = "1=1" + Endcase + Return lcFiltru + ENDPROC + + PROCEDURE do_modifica + Lparameters toArticol + LOCAL lnPreturiCuTva + lnPreturiCuTva = poRec.preturi_cu_tva + SET STEP ON + *!* modificare v 2.0.5 + *!* If !Empty(This.nid) And !Isnull(This.nid) + If !Empty(This.nid) And !Isnull(This.nid) And Thisform.loperatiipermise + *!* modificare v 2.0.5 ^ + If Reccount('crspolitica_curenta')>0 + gnButon=2 + Private poArticol + Select crspolitica_curenta + Scatter Name poArticol + addproperty(poArticol,'moneda_nationala',poRec.moneda_nationala) && modificare v 2.0.20 + addproperty(poArticol,'compus',poArticol.art_compus) + poArticol.procent=Nvl(poArticol.procent,0) + ofrmadarticol=Createobject("frm_articol_politica",.F., lnPreturiCuTva,.T.) + ofrmadarticol.Show(1) + If gnButon = 1 + lcSql = [begin pack_preturi.modifica_pret_pol_pret_art(?poArticol.id_pol_art,?poArticol.Pret,] + ; + [?poArticol.Pretftva,?poArticol.Pretctva,?poArticol.id_venchelt,] + ; + IIF(empty(poArticol.proc_tvav),[NULL],[?poArticol.proc_tvav]) + [); end;] + lnSucces = goExecutor.oExecute(lcSql) + If lnSucces < 0 + aMessagebox('pack_preturi.modifica_pret_pol_pret_art'+goExecutor.cEroare,0+16,"Eroare") + Else + save_grid_tag(Thisform.grd_politica_curenta) + Select crspolitica_curenta + Replace Pret With poArticol.Pret, pretftva WITH poArticol.pretftva, pretctva WITH poArticol.pretctva,explicatie_venchelt WITH poArticol.explicatie_venchelt,id_venchelt WITH poArticol.id_venchelt,proc_tvav WITH poArticol.proc_tvav + restore_grid_tag(Thisform.grd_politica_curenta) + Endif + Endif + Release poArticol,ofrmadarticol + Endif + Endif + ENDPROC + + PROCEDURE do_precedent + *!* modificare v 2.0.5 + *!* IF !EMPTY(this.nId) AND !ISNULL(this.nId) && pe politica noua sa nu faca nimic + If !Empty(This.nId) And !Isnull(This.nId) And Thisform.loperatiipermise + *!* modificare v 2.0.5 ^ + Thisform.do_sterge() + Endif + + ENDPROC + + PROCEDURE do_reset + Thisform.ct_codmat.Value = 2 + Thisform.txtCodmat.Value = [] + Thisform.txtCodmat.ReadOnly = .F. + Thisform.ct_articole.Value = 1 + Thisform.txtArticole.Value = [] + Thisform.txtArticole.ReadOnly = .F. + Select v_articole + Set Filter To + Go Top + Thisform.grd_articole.SetFocus() + ENDPROC + + PROCEDURE do_sterge + IF !EMPTY(THIS.nid) AND !ISNULL(THIS.nid) + IF RECCOUNT('crspolitica_curenta')>0 + PRIVATE poArticol + SELECT crspolitica_curenta + SCATTER NAME poArticol + + + lcSql = [begin pack_preturi.sterge_politica_pret_art(] + ALLTRIM(STR(THIS.nid)) + [,] + ALLTRIM(STR(poArticol.id_articol)) + [); end;] + lnSucces = goExecutor.oExecute(lcSql) + + IF lnSucces < 0 + AMESSAGEBOX(goExecutor.oprelucrareEroare(),0+16,"Eroare") + RETURN + ENDIF + + + save_grid_tag(THISFORM.grd_politica_curenta) + SELECT * FROM crspolitica_curenta WHERE id_articol <> poArticol.id_articol ORDER BY nume_articol, dataora ; + INTO CURSOR crspolitica_curenta READWRITE + restore_grid_tag(THISFORM.grd_politica_curenta) + ENDIF + + RELEASE poArticol + ENDIF + + ENDPROC + + PROCEDURE do_urmator + Local lnPreturiCuTva + lnPreturiCuTva = poRec.preturi_cu_tva + + *!* modificare v 2.0.5 + *!* IF !EMPTY(THIS.nId) AND !ISNULL(THIS.nId) && pe politica noua sa nu faca nimic + If !Empty(This.nId) And !Isnull(This.nId) And Thisform.loperatiipermise + *!* modificare v 2.0.5 ^ + If Used('v_articole') And Reccount('v_articole')>0 + Private poArticol + Select v_articole + Scatter Name poArticol + + Select crspolitica_curenta + Locate For id_articol = poArticol.id_articol + If Found() + Thisform.grd_politica_curenta.SetFocus() + Else + gnButon=2 + AddProperty(poArticol,'Pret',0) + AddProperty(poArticol,'Pretftva',0) + AddProperty(poArticol,'Pretctva',0) + *!* modificare v 2.0.10 + *!* AddProperty(poArticol,'proc_tvav',1.19) + AddProperty(poArticol,'proc_tvav',0) + *!* modificare v 2.0.10 ^ + AddProperty(poArticol,'nume_val',poRec.nume_val) + AddProperty(poArticol,'procent',0) + AddProperty(poArticol,'explicatie',poRec.nume_val) + AddProperty(poArticol,'id_venchelt',0) + AddProperty(poArticol,'explicatie_venchelt',[]) + addproperty(poArticol,'moneda_nationala',poRec.moneda_nationala) && modificare v 2.0.20 + + ofrmadarticol=Createobject("frm_articol_politica",.F., lnPreturiCuTva,.F.) + ofrmadarticol.Show(1) + + If gnButon=1 And !Empty(This.nId) And !Isnull(This.nId) + lcSql = [begin pack_preturi.adauga_politica_pret_art(] + Alltrim(Str(This.nId)) + [,] + ; + ALLTRIM(Str(poArticol.id_articol)) + [,] + Alltrim(Str(poArticol.Pret,14,iif(poRec.moneda_nationala=1,gnPPretV,gnPVal))) + [,] + ; + ALLTRIM(Str(poArticol.PRETFTVA,14,iif(poRec.moneda_nationala=1,gnPPretV,gnPVal)))+ [,] + ; + ALLTRIM(Str(poArticol.PRETCTVA,14,iif(poRec.moneda_nationala=1,gnPPretV,gnPVal))) + [,] + Alltrim(Str(poRec.id_valuta)) + [,] + ; + IIF(Empty(poArticol.proc_tvav),[NULL],Alltrim(Str(poArticol.proc_tvav,10,2))) + [,] + ; + ALLTRIM(Str(poArticol.procent)) + [,] + Iif(!Empty(Nvl(poArticol.id_venchelt,0)),Alltrim(Str(poArticol.id_venchelt)),[NULL]) + [,] + ; + ALLTRIM(Str(gnIdUtil)) + [); end;] + lnSucces = goExecutor.oExecute(lcSql) + + If lnSucces < 0 + aMESSAGEBOX(goExecutor.cEroare,0+16,"Eroare") + Return + Endif + ***--- + + Thisform.do_adauga(poArticol) + Thisform.grd_politica_curenta.SetFocus() + Endif + Endif + + Release ofrmadarticol, poArticol + Endif + Endif + + ENDPROC + + PROCEDURE inainte_de_do_termin + Local plReturn + lccontrol = Upper(This.ActiveControl.BaseClass ) + If Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX") + lcval=This.ActiveControl.ControlSource + &lcval=Thisform.ActiveControl.Value + Endif + plReturn = .F. + Do Case + Case Empty(porec.nume_lista_preturi) + aMessagebox('Nu ati completat numele!',0+48,"Atentie") + This.clb_nume.text_simplu1.SetFocus() + Case Empty(porec.datai) + aMessagebox('Nu ati completat data de inceput a politicii!',0+48,"Atentie") + This.clb_valabilitate.tx_n1.SetFocus() + Case Empty(porec.DataS) + aMessagebox('Nu ati completat data de sfarsit a politicii!',0+48,"Atentie") + This.clb_valabilitate.tx_n2.SetFocus() + Case Empty(Nvl(porec.id_valuta,0)) And Empty(porec.nume_val) + aMessagebox('Nu ati ales valuta!',0+48,"Atentie") + This.ct_clb_valuta.tx_cautare.SetFocus() + Case Empty(Nvl(porec.id_nota,0)) + aMessagebox('Nu ati nota contabila!',0+48,"Atentie") + This.ct_clb_notaContab.tx_cautare.SetFocus() + Case Reccount('crspolitica_curenta')=0 And (!Empty(This.NID) And !Isnull(This.NID)) + aMessagebox('Nu ati ales articolele pentru aceasta oferta!',0+48,"Atentie") + This.grd_articole.SetFocus() + Otherwise + plReturn=This.cus_odata_politici_pret1.salvare(This.OREC,This.NID) + Endcase + + Return plReturn + + ENDPROC + + PROCEDURE Init + Lparameters toRec, tnId, tcActiune + DoDefault() + This.orec= toRec + This.nid = tnId + This.cus_odata_politici_pret1.cactiune = tcActiune + + If Empty(tnId) Or Isnull(tnId) + This.Height = 160 + Thisform.AutoCenter = .F. + For i = 1 To Thisform.Objects.Count + If Type('thisform.objects[i]')<>'U' + loObiect = Thisform.Objects[i] + If loObiect.Top >= This.Height + Thisform.RemoveObject(loObiect.Name) + i = i-1 + Endif + Endif + Endfor + Endif + + *!* modificare v 2.0.5 + If tcActiune = [UPDATE] + Thisform.loperatiipermise = verifica_politica(toRec.id_pol,1) + Thisform.but_modifica1.Visible = Thisform.loperatiipermise + Thisform.but_precedent1.Visible = Thisform.loperatiipermise + Thisform.but_urmator1.Visible = Thisform.loperatiipermise + Thisform.actualizeaza_grid2() && modificare v 2.0.21 + Endif + *!* modificare v 2.0.5 ^ + *!* modificare v 2.0.21 + *!* *!* modificare v 2.0.20 + *!* Thisform.actualizeaza_grid2() + *!* *!* modificare v 2.0.20 ^ + *!* modificare v 2.0.21 ^ + ENDPROC + + PROCEDURE KeyPress + LPARAMETERS nKeyCode, nShiftAltCtrl + lcControl = UPPER(ALLTRIM(THISFORM.ACTIVECONTROL.NAME)) + + * WAIT WINDOW lcControl + + DO CASE + CASE nKeyCode = 13 AND lcControl = 'GRD_ARTICOLE' + NODEFAULT + THISFORM.but_urmator1.SETFOCUS() + CASE nKeyCode = 13 AND lcControl = 'BUT_URMATOR1' + NODEFAULT + THISFORM.do_urmator() + THISFORM.grd_articole.SETFOCUS() + CASE nKeyCode = 13 AND lcControl = 'GRD_POLITICA_CURENTA' + NODEFAULT + THISFORM.TXTArticole.SetFocus() + *!* modificare v 2.0.16 + *!* CASE lcControl = 'TXTARTICOLE' AND nKeyCode = 13 + *!* * WAIT WINDOW 'INTRA AICI' + *!* lcArticolCautat = ALLTRIM(THISFORM.txtArticole.VALUE) + *!* SELECT v_articole + *!* LOCATE FOR SUBSTR(ALLTRIM(nume_articol),1,LEN(lcArticolCautat)) = lcArticolCautat + *!* THISFORM.grd_articole.SETFOCUS() + *!* *!* IF FOUND() + *!* *!* ENDIF + Case InList(lcControl,'TXTARTICOLE','TXTCODMAT') And nKeyCode = 13 + Nodefault + If Used('v_articole') + Select v_articole + lnRecno = Recno() + lcFiltru = Thisform.do_creeaza_filtru(Thisform.ct_articole,[nume_articol],Alltrim(Strtran(Thisform.txtArticole.Value,['],['']))) + lcFiltru = lcFiltru + [ AND ] + Thisform.do_creeaza_filtru(Thisform.ct_codmat,[codmat],Alltrim(Strtran(Thisform.txtcodmat.Value,['],['']))) + Set filter to &lcFiltru + Go top + Thisform.grd_articole.SetFocus() + Endif + *!* modificare v 2.0.16 ^ + CASE lcControl = 'TXTARTICOLELISTA' AND nKeyCode = 13 + lcArticolCautat = ALLTRIM(THISFORM.txtArticoleLista.VALUE) + SELECT crsPolitica_curenta + LOCATE FOR SUBSTR(ALLTRIM(nume_articol),1,LEN(lcArticolCautat)) = lcArticolCautat + thisform.grd_politica_curenta.SetFocus() + + *!* CASE (nKeyCode >=33 AND nKeyCode <=122) AND (lcControl <> 'TXTARTICOLE' AND lcControl <> 'TXTARTICOLELISTA') + *!* NODEFAULT + *!* THIS.TXTARTICOLE.Value = ALLTRIM(THIS.TXTARTICOLE.VALUE) + CHR(nKeyCode) + *!* THIS.TXTARTICOLE.SetFocus() + *!* KEYBOARD '{END}' + *!* + *!* CASE (nKeyCode = 127) AND (lcControl <> 'TXTARTICOLE' AND lcControl <> 'TXTARTICOLELISTA') + *!* NODEFAULT + *!* THIS.TXTARTICOLE.VALUE = LEFT(ALLTRIM(THIS.TXTARTICOLE.VALUE),LEN(ALLTRIM(THIS.TXTARTICOLE.VALUE))-1) + *!* THIS.TXTARTICOLE.SetFocus() + *!* KEYBOARD '{END}' + + CASE nKeyCode=27 AND nShiftAltCtrl=0 + NODEFAULT + IF aMESSAGEBOX("Sunteti sigur ca doriti sa inchideti fereastra?",4+32+256,"Confirmare")==6 + THIS.do_renunt() + ENDIF + CASE nKeyCode=6 AND nShiftAltCtrl=2 + NODEFAULT + THIS.do_termin() + ENDCASE + + ENDPROC + + PROCEDURE Clb_valabilitate.tx_n1.Valid + If Empty(Nvl(This.Parent.tx_n2.Value,{})) + This.Parent.tx_n2.Value=This.Value + This.Parent.tx_n2.Refresh + Endif + ENDPROC + + PROCEDURE ct_articole.InteractiveChange + With Thisform.txtArticole + If This.Value>5 + .Value="" + .ReadOnly=.T. + Else + .ReadOnly=.F. + .SetFocus() + Endif + Endwith + ENDPROC + + PROCEDURE ct_codmat.InteractiveChange + With Thisform.txtcodmat + If This.Value>5 + .Value="" + .ReadOnly=.T. + Else + .ReadOnly=.F. + .SetFocus() + Endif + Endwith + + ENDPROC + +ENDDEFINE + +DEFINE CLASS frm_politici_pret_rul AS _frmbase OF "..\comun\clase\_frm_base.vcx" + *< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" /> + + *-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder + *< OBJECTDATA: ObjPath="Clb_nume" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Clb_data_curs" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul.cDenumire.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul.cDenumire.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul.cPret_Nou.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul.cPret_Nou.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul.cPret_Vechi.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul.cPret_Vechi.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul.cCodmat.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul.cCodmat.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul.cProc_tvav.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul.cProc_tvav.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul.cAles.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul.cAles._checkbox1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul.cVariatie.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="grd_preturi_rul.cVariatie.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Cus_odata_politici_pret1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Clb_perioada_rulaj" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Cmd_cauta1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Lb_explicatie_preturi" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Cmd_select_adv1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Gridextra1" UniqueID="" Timestamp="" /> + + * + *p: npret_nou_mod + *p: npret_nou_orig + *p: orec + * + + * + cgridsortlist = grd_preturi_rul + DoCreate = .T. + Height = 586 + lactiv3 = .T. + Name = "frm_politici_pret_rul" + npret_nou_mod = + npret_nou_orig = + orec = + Width = 781 + WindowState = 2 + _shape1.Anchor = 11 + _shape1.Height = 29 + _shape1.Left = 0 + _shape1.Name = "_shape1" + _shape1.Top = 0 + _shape1.Width = 780 + _shape2.Anchor = 9 + _shape2.Height = 29 + _shape2.Left = 720 + _shape2.Name = "_shape2" + _shape2.Top = 0 + _shape2.Width = 61 + Lb_titlu_alb_b121.Caption = "ACTUALIZARE PE BAZA PRE_URILOR DE ACHIZI_IE" + Lb_titlu_alb_b121.FontBold = .T. + Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121" + Lb_titlu_alb_b121.TabIndex = 8 + BUT_TERMIN1.Anchor = 9 + BUT_TERMIN1.Height = 27 + BUT_TERMIN1.Left = 751 + BUT_TERMIN1.Name = "BUT_TERMIN1" + BUT_TERMIN1.TabIndex = 6 + BUT_TERMIN1.Top = 1 + BUT_TERMIN1.Width = 30 + Gridsort1.Name = "Gridsort1" + * + + ADD OBJECT 'But_renunt1' AS but_renunt WITH ; + Anchor = 9, ; + Height = 27, ; + Left = 721, ; + Name = "But_renunt1", ; + TabIndex = 7, ; + Top = 1, ; + Width = 30 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'Clb_data_curs' AS clb_tx_simplu WITH ; + Left = 334, ; + Name = "Clb_data_curs", ; + TabIndex = 3, ; + Top = 70, ; + Visible = .F., ; + Width = 312, ; + TEXT_SIMPLU1.Height = 23, ; + TEXT_SIMPLU1.Left = 210, ; + TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ; + TEXT_SIMPLU1.Top = 3, ; + TEXT_SIMPLU1.Width = 98, ; + LB_SIMPLU1.Caption = "Data curs actualizare", ; + LB_SIMPLU1.Name = "LB_SIMPLU1" + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'Clb_nume' AS clb_tx_simplu WITH ; + Height = 29, ; + Left = 23, ; + Name = "Clb_nume", ; + TabIndex = 1, ; + Top = 42, ; + Width = 623, ; + Text_simplu1.Alignment = 3, ; + Text_simplu1.Height = 23, ; + Text_simplu1.Left = 98, ; + Text_simplu1.Name = "Text_simplu1", ; + Text_simplu1.ReadOnly = .T., ; + Text_simplu1.Top = 3, ; + Text_simplu1.Width = 520, ; + Lb_simplu1.Caption = "Nume", ; + Lb_simplu1.Name = "Lb_simplu1" + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'Clb_perioada_rulaj' AS clb_n1n2_simplu WITH ; + Height = 29, ; + Left = 23, ; + Name = "Clb_perioada_rulaj", ; + TabIndex = 2, ; + Top = 70, ; + Width = 312, ; + tx_n1.Left = 152, ; + tx_n1.Name = "tx_n1", ; + tx_n1.Top = 2, ; + Lb_simplu1.Caption = "Perioada rulaj", ; + Lb_simplu1.Name = "Lb_simplu1", ; + tx_n2.Left = 232, ; + tx_n2.Name = "tx_n2", ; + tx_n2.Top = 2 + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'Cmd_cauta1' AS cmd_cauta WITH ; + Left = 664, ; + Name = "Cmd_cauta1", ; + TabIndex = 4, ; + Top = 71 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'Cmd_select_adv1' AS cmd_select_adv WITH ; + ccoloana = ales, ; + cgrid = Thisform.grd_preturi_rul, ; + Left = 12, ; + Name = "Cmd_select_adv1", ; + Top = 103 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'Cus_odata_politici_pret1' AS cus_odata_politici_pret WITH ; + Left = 660, ; + Name = "Cus_odata_politici_pret1", ; + Top = 48 + *< END OBJECT: ClassLib="onom_preturi.vcx" BaseClass="custom" /> + + ADD OBJECT 'grd_preturi_rul' AS _grdrow WITH ; + Anchor = 15, ; + ColumnCount = 7, ; + DeleteMark = .F., ; + FontName = "Arial Narrow", ; + Height = 444, ; + HighlightStyle = 2, ; + Left = 12, ; + Name = "grd_preturi_rul", ; + Panel = 1, ; + ReadOnly = .T., ; + RecordSource = "crspreturirul", ; + TabIndex = 5, ; + Top = 132, ; + Width = 752, ; + Column1.ColumnOrder = 3, ; + Column1.ControlSource = "denumire", ; + Column1.FontName = "Arial Narrow", ; + Column1.Name = "cDenumire", ; + Column1.ReadOnly = .T., ; + Column1.Width = 275, ; + Column2.BackColor = 253,252,223, ; + Column2.ColumnOrder = 5, ; + Column2.ControlSource = "pret_nou", ; + Column2.FontName = "Arial Narrow", ; + Column2.InputMask = (get_mask(14,gnPPretV)), ; + Column2.Name = "cPret_Nou", ; + Column2.ReadOnly = .F., ; + Column2.Width = 75, ; + Column3.ColumnOrder = 4, ; + Column3.ControlSource = "pret_vechi", ; + Column3.FontName = "Arial Narrow", ; + Column3.InputMask = (get_mask(14,gnPPretV)), ; + Column3.Name = "cPret_Vechi", ; + Column3.ReadOnly = .T., ; + Column3.Width = 74, ; + Column4.ColumnOrder = 2, ; + Column4.ControlSource = "codmat", ; + Column4.FontName = "Arial Narrow", ; + Column4.Name = "cCodmat", ; + Column4.ReadOnly = .T., ; + Column4.Width = 95, ; + Column5.ColumnOrder = 7, ; + Column5.ControlSource = "proc_tvav", ; + Column5.FontName = "Arial Narrow", ; + Column5.Format = "rk", ; + Column5.InputMask = "99.99", ; + Column5.Name = "cProc_tvav", ; + Column5.ReadOnly = .T., ; + Column5.Width = 50, ; + Column6.ColumnOrder = 1, ; + Column6.ControlSource = "ales", ; + Column6.FontName = "Arial Narrow", ; + Column6.Name = "cAles", ; + Column6.ReadOnly = .F., ; + Column6.Sparse = .F., ; + Column6.Width = 69, ; + Column7.ColumnOrder = 6, ; + Column7.ControlSource = "pret_nou-pret_vechi", ; + Column7.FontName = "Arial Narrow", ; + Column7.InputMask = (get_mask(14,gnPPretV)), ; + Column7.Name = "cVariatie", ; + Column7.ReadOnly = .T., ; + Column7.Width = 72 + *< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" /> + + ADD OBJECT 'grd_preturi_rul.cAles._checkbox1' AS _checkbox WITH ; + Alignment = 2, ; + Caption = "", ; + Centered = .T., ; + FontName = "Arial Narrow", ; + Left = 25, ; + Name = "_checkbox1", ; + ReadOnly = .F., ; + Top = 23 + *< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="checkbox" /> + + ADD OBJECT 'grd_preturi_rul.cAles.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Se actualizeaza", ; + FontName = "Arial Narrow", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_preturi_rul.cCodmat.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Cod material", ; + FontName = "Arial Narrow", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_preturi_rul.cCodmat.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial Narrow", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T. + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_preturi_rul.cDenumire.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Articol", ; + FontName = "Arial Narrow", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_preturi_rul.cDenumire.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + Enabled = .T., ; + FontName = "Arial Narrow", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T. + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_preturi_rul.cPret_Nou.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Pret nou", ; + FontName = "Arial Narrow", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_preturi_rul.cPret_Nou.Text1' AS textbox WITH ; + BackColor = 253,252,223, ; + BorderStyle = 0, ; + FontName = "Arial Narrow", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .F. + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_preturi_rul.cPret_Vechi.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Pret actual", ; + FontName = "Arial Narrow", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_preturi_rul.cPret_Vechi.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial Narrow", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T. + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_preturi_rul.cProc_tvav.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Proc. TVA", ; + FontName = "Arial Narrow", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_preturi_rul.cProc_tvav.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial Narrow", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1", ; + ReadOnly = .T. + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'grd_preturi_rul.cVariatie.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Variatie", ; + FontName = "Arial Narrow", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT 'grd_preturi_rul.cVariatie.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial Narrow", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1" + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'Gridextra1' AS gridextra WITH ; + gridexpression = Thisform.grd_preturi_rul, ; + Left = 288, ; + Name = "Gridextra1", ; + Top = 108 + *< END OBJECT: ClassLib="..\comun\utile\gridextras\gridextras.vcx" BaseClass="custom" /> + + ADD OBJECT 'Lb_explicatie_preturi' AS lb_simplu WITH ; + Caption = "Explica_ie pre_uri", ; + FontBold = .T., ; + Left = 540, ; + Name = "Lb_explicatie_preturi", ; + Top = 110 + *< END OBJECT: ClassLib="..\comun\clase\lb.vcx" BaseClass="label" /> + + PROCEDURE Destroy + Local lcCursor + lcCursor = Thisform.grd_preturi_rul.RecordSource + If Used(lcCursor) + Use In (lcCursor) + Endif + ENDPROC + + PROCEDURE do_cauta + Private pdDataI,pdDataF,pdDataCurs + pdDataI = Thisform.clb_perioada_rulaj.tx_n1.Value + pdDataF = Thisform.clb_perioada_rulaj.tx_n2.Value + pdDataCurs = Thisform.clb_data_curs.text_simplu1.Value + Do Case + Case Empty(Nvl(pdDataI,{})) + amessagebox("Nu ati completat data de inceput pentru cautarea in rulaje!",48,"Atentie") + Thisform.clb_perioada_rulaj.tx_n1.SetFocus() + Case Empty(Nvl(pdDataF,{})) + amessagebox("Nu ati completat data de sfarsit pentru cautarea in rulaje!",48,"Atentie") + Thisform.clb_perioada_rulaj.tx_n2.SetFocus() + Case Empty(Nvl(pdDataCurs,{})) And toRec.moneda_nationala = 0 + amessagebox("Nu ati completat data cursului folosit la conversie!",48,"Atentie") + Thisform.clb_data_curs.text_simplu1.SetFocus() + Otherwise + If Thisform.oRec.moneda_nationala = 1 + pdDataCurs = Null + Endif + lcCursor = Thisform.grd_preturi_rul.RecordSource + Thisform.grd_preturi_rul.salveaza_grid() + If Used(lcCursor) + Use In (lcCursor) + Endif + lcSql = [{call pack_preturi.citeste_preturi_rulaj(] + Alltrim(Str(Thisform.oRec.id_pol)) + [,] + ; + alltrim(Str(Thisform.oRec.id_valuta)) + [,] + Alltrim(Str(Thisform.oRec.preturi_cu_tva)) + [,] + ; + [?pdDataI,?pdDataF,?pdDataCurs)}] + If goExecutor.oExecuta(lcSql,lcCursor) + If Reccount(lcCursor) = 0 + amessagebox("Nu exista rezultate pentru datele specificate!",48,"Atentie") + Else + Select (lcCursor) + If Isnull(Curs) + amessagebox("Nu exista curs pentru data specificata!",48,"Atentie") + Thisform.clb_data_curs.text_simplu1.SetFocus() + Endif + Endif + Endif + Thisform.grd_preturi_rul.incarca_grid() + Endcase + + ENDPROC + + PROCEDURE inainte_de_do_termin + Local llReturn, lnNrInregistrari, lcCursor, lcCursorAct, lnZecimale, lcSir + llReturn = .T. + lcCursor = Thisform.grd_preturi_rul.RecordSource + lcCursorAct = [crsactualizare] + lnZecimale = Iif(Thisform.oRec.moneda_nationala = 1,gnPPretV, gnPVal) + lnNrInregistrari = 0 + lcSir = [] + + Select id_articol, pret_nou, proc_tvav From (lcCursor) With (Buffering=.T.) Where ales = 1 Into Cursor (lcCursorAct) + If Reccount(lcCursorAct) > 0 + If Thisform.do_deschide_tranzactie() + Select (lcCursorAct) + Scan + lnNrInregistrari = lnNrInregistrari + 1 + lcSir = lcSir + Alltrim(Str(id_articol))+[;]+Alltrim(Str(NVL(pret_nou, 0.00),20,lnZecimale))+[;] + Alltrim(Str(NVL(proc_tvav, 0.00),20,2)) + [|] + If Mod(lnNrInregistrari,100) = 0 + lcSql = [begin pack_preturi.actualizeaza_preturi(] + Alltrim(Str(Thisform.oRec.id_pol)) + [,] + ; + alltrim(Str(Thisform.oRec.preturi_cu_tva)) + [,] + ; + alltrim(Str(Thisform.oRec.id_valuta)) + [,] + ; + ['] + lcSir + [',?gnIdUtil); end;] + lcSir = [] + If !goExecutor.oExecuta(lcSql) + llReturn = .F. + Exit + Endif + Endif + Select (lcCursorAct) + Endscan + If !Empty(lcSir) And llReturn + lcSql = [begin pack_preturi.actualizeaza_preturi(] + Alltrim(Str(Thisform.oRec.id_pol)) + [,] + ; + alltrim(Str(Thisform.oRec.preturi_cu_tva)) + [,] + ; + alltrim(Str(Thisform.oRec.id_valuta)) + [,] + ; + ['] + lcSir + [',?gnIdUtil); end;] + lcSir = [] + llReturn = goExecutor.oExecuta(lcSql) + Endif + Endif + If llReturn + llReturn = Thisform.do_inchide_tranzactie(1) + If llReturn + amessagebox("Preturile articolelor selectate au fost actualizate in baza de date!",64,"Confirmare actualizare") + Endif + Else + Thisform.do_inchide_tranzactie(2) + Endif + Endif + Use In (Select(lcCursorAct)) + Return llReturn + + ENDPROC + + PROCEDURE Init + Lparameters toRec + Local ldDataS + DoDefault() + + Thisform.orec = toRec + Thisform.clb_nume.Text_simplu1.Value = toRec.nume_lista_preturi + Thisform.Lb_explicatie_preturi.Caption = [Prețurile sunt ] + Iif(toRec.preturi_cu_tva = 1,[cu],[fără]) + [ TVA.] + ldDataS = Min(Ttod(get_ora()),Gomonth(Date(gnAn,gnLuna,1),1)-1) + Thisform.clb_perioada_rulaj.tx_n1.Value = Date(gnAn,gnLuna,1) + Thisform.clb_perioada_rulaj.tx_n2.Value = ldDataS + Thisform.clb_data_curs.Text_simplu1.Value = ldDataS + With Thisform.grd_preturi_rul + If toRec.moneda_nationala = 0 + .cPret_nou.InputMask = get_mask(14,gnPVal) + .cPret_vechi.InputMask = get_mask(14,gnPVal) + .cVariatie.InputMask = get_mask(14,gnPVal) + Thisform.clb_data_curs.Visible = .T. + Else + .cPret_nou.InputMask = get_mask(14,gnPPretV) + .cPret_vechi.InputMask = get_mask(14,gnPPretV) + .cVariatie.InputMask = get_mask(14,gnPPretV) + Thisform.clb_data_curs.Visible = .F. + Endif + .cPret_nou.Header1.Caption = .cPret_nou.Header1.Caption + [ (] + Alltrim(Thisform.orec.nume_val) + [)] + .cPret_vechi.Header1.Caption = .cPret_vechi.Header1.Caption + [ (] + Alltrim(Thisform.orec.nume_val) + [)] + .cVariatie.Header1.Caption = .cVariatie.Header1.Caption + [ (] + Alltrim(Thisform.orec.nume_val) + [)] + .SetAll("DynamicBackColor","IIF(ales=1,rgb(210,240,247),rgb(255,255,255))","Column") + .cPret_nou.DynamicBackColor = "" + .cVariatie.DynamicForeColor = "iif(pret_nou-pret_vechi<0,rgb(255,0,0),rgb(0,0,0))" + .Refresh() + Endwith + Thisform.do_cauta() + Thisform.gridextra1.Setup() + + ENDPROC + + PROCEDURE Clb_perioada_rulaj.tx_n1.Valid + If Empty(Nvl(This.Parent.tx_n2.Value,{})) + This.Parent.tx_n2.Value=This.Value + This.Parent.tx_n2.Refresh + Endif + ENDPROC + + PROCEDURE grd_preturi_rul.cPret_Nou.Text1.Valid + Select (Thisform.grd_preturi_rul.RecordSource) + If Thisform.npret_nou_orig <> This.Value And pret_vechi < This.Value + Replace ales With 1 + Endif + ENDPROC + + PROCEDURE grd_preturi_rul.cPret_Nou.Text1.When + Thisform.npret_nou_orig = This.Value + ENDPROC + + PROCEDURE grd_preturi_rul.Init + *!* + ENDPROC + +ENDDEFINE + +DEFINE CLASS frm_politicigrupuri AS frm_termin OF "..\comun\clase\_frm_child.vcx" + *< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" /> + + *-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder + *< OBJECTDATA: ObjPath="clb_grup" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="CMD_CAUTA1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="_grdrow1.Column3.Check1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="_grdrow1.Column4.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="_grdrow1.Column4.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="_grdrow1.Column5.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="_grdrow1.Column5.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="ck_pol_expirate" UniqueID="" Timestamp="" /> + + * + DoCreate = .T. + Height = 401 + Name = "frm_politicigrupuri" + Width = 448 + _SHAPE1.Height = 29 + _SHAPE1.Left = 0 + _SHAPE1.Name = "_SHAPE1" + _SHAPE1.Top = 0 + _SHAPE1.Width = 456 + _SHAPE2.Height = 29 + _SHAPE2.Left = 316 + _SHAPE2.Name = "_SHAPE2" + _SHAPE2.Top = 0 + _SHAPE2.Width = 131 + LB_TITLU_ALB_B121.Caption = "Drepturi de acces la listele de prețuri" + LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121" + LB_TITLU_ALB_B121.TabIndex = 8 + BUT_TERMIN1.Left = 414 + BUT_TERMIN1.Name = "BUT_TERMIN1" + BUT_TERMIN1.TabIndex = 4 + BUT_TERMIN1.Top = 1 + GRIDSORT1.Name = "GRIDSORT1" + * + + ADD OBJECT '_grdrow1' AS _grdrow WITH ; + ColumnCount = 4, ; + DeleteMark = .F., ; + FontName = "Arial Narrow", ; + Height = 288, ; + Left = 9, ; + Name = "_grdrow1", ; + Panel = 1, ; + RecordSource = "crsPolGr", ; + TabIndex = 3, ; + Top = 96, ; + Width = 430, ; + Column1.ColumnOrder = 4, ; + Column1.ControlSource = "inactiv", ; + Column1.CurrentControl = "Check1", ; + Column1.FontName = "Arial Narrow", ; + Column1.Name = "Column3", ; + Column1.Sparse = .F., ; + Column1.Width = 33, ; + Column2.ColumnOrder = 1, ; + Column2.ControlSource = "nume_lista_preturi", ; + Column2.FontName = "Arial Narrow", ; + Column2.Name = "Column4", ; + Column2.Width = 188, ; + Column3.ColumnOrder = 3, ; + Column3.ControlSource = "denumire_grup", ; + Column3.FontName = "Arial Narrow", ; + Column3.Name = "Column5", ; + Column3.Width = 122, ; + Column4.ColumnOrder = 2, ; + Column4.ControlSource = "nume_val", ; + Column4.FontName = "Arial Narrow", ; + Column4.Name = "Column1", ; + Column4.Width = 48 + *< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" /> + + ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Valuta", ; + FontName = "Arial Narrow", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial Narrow", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1" + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT '_grdrow1.Column3.Check1' AS checkbox WITH ; + Alignment = 2, ; + Caption = "", ; + Centered = .T., ; + FontName = "Arial Narrow", ; + Height = 17, ; + Left = 17, ; + Name = "Check1", ; + Top = 51, ; + Width = 60 + *< END OBJECT: BaseClass="checkbox" /> + + ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Inactiv", ; + FontName = "Arial Narrow", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT '_grdrow1.Column4.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Lista preturi", ; + FontName = "Arial Narrow", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT '_grdrow1.Column4.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial Narrow", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1" + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT '_grdrow1.Column5.Header1' AS header WITH ; + Alignment = 2, ; + Caption = "Grup de utilizatori", ; + FontName = "Arial Narrow", ; + Name = "Header1" + *< END OBJECT: BaseClass="header" /> + + ADD OBJECT '_grdrow1.Column5.Text1' AS textbox WITH ; + BackColor = 255,255,255, ; + BorderStyle = 0, ; + FontName = "Arial Narrow", ; + ForeColor = 0,0,0, ; + Margin = 0, ; + Name = "Text1" + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'But_modifica1' AS but_modifica WITH ; + caction = do_modifica, ; + Left = 351, ; + Name = "But_modifica1", ; + TabIndex = 6, ; + Top = 1, ; + Visible = .T. + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'But_nou1' AS but_nou WITH ; + Left = 321, ; + Name = "But_nou1", ; + TabIndex = 7, ; + Top = 1 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'But_sterge1' AS but_sterge WITH ; + caction = do_sterge, ; + Left = 382, ; + Name = "But_sterge1", ; + TabIndex = 5, ; + Top = 1, ; + Visible = .T. + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + ADD OBJECT 'ck_pol_expirate' AS _checkbox WITH ; + Alignment = 0, ; + Caption = "Fără politicile expirate", ; + Left = 21, ; + Name = "ck_pol_expirate", ; + TabIndex = 2, ; + Top = 75 + *< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="checkbox" /> + + ADD OBJECT 'clb_grup' AS clb_tx_simplu WITH ; + Left = 21, ; + Name = "clb_grup", ; + TabIndex = 1, ; + Top = 42, ; + TEXT_SIMPLU1.Height = 23, ; + TEXT_SIMPLU1.Left = 108, ; + TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ; + TEXT_SIMPLU1.Top = 3, ; + TEXT_SIMPLU1.Width = 177, ; + LB_SIMPLU1.Caption = "Grup de utilizatori", ; + LB_SIMPLU1.Name = "LB_SIMPLU1" + *< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" /> + + ADD OBJECT 'CMD_CAUTA1' AS cmd_cauta WITH ; + Left = 321, ; + Name = "CMD_CAUTA1", ; + TabIndex = 9, ; + Top = 42 + *< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" /> + + PROCEDURE actualizeaza_grid1 + Lparameters pcFiltru + Local lcFiltru + lcFiltru=pcFiltru + If Empty(lcFiltru) + lcFiltru=poAccesListe.ca_baza1.cfiltru + Endif + save_grid_tag(Thisform._grdrow1) + poAccesListe.ca_baza1.cfiltru=lcFiltru + poAccesListe.ca_baza1.afisare() + restore_grid_tag(Thisform._grdrow1) + If Reccount('crsPolGr')>0 + Thisform._grdrow1.SetFocus() + Else + Thisform.clb_grup.SetFocus() + Endif + ENDPROC + + PROCEDURE do_adauga + SELECT crsPolGr + SCATTER NAME loRec blank + DO Adauga_Modifica_Inregistrare WITH "politiciGrupuri",loRec,,"INSERT" + this.actualizeaza_grid1() + ENDPROC + + PROCEDURE do_cauta + Local lcFiltru + lcFiltru=[] + lcNume = Strtran(Upper(Alltrim(This.clb_grup.text_simplu1.Value)),['],['']) + + If Thisform.ck_pol_expirate.Value = 1 + lcFiltru = lcFiltru + [ and politica_expirata = 0] + Endif + + If !Empty(lcNume) + lcFiltru= lcFiltru + [ and denumire_grup like ']+lcNume+[%'] + Endif + + If Empty(lcFiltru) + lcFiltru = [2=2] + Else + lcFiltru = Substr(lcFiltru,5) + Endif + + This.MousePointer= 11 + This.LockScreen=.T. + Thisform.actualizeaza_grid1(lcFiltru+gcCondSucursala) + If Reccount()=0 + amessagebox("Cautarea nu a intors rezultate!",0+64,"Info cautare") + Endif + This.LockScreen=.F. + This.MousePointer= 0 + + ENDPROC + + PROCEDURE do_modifica + If Reccount('crsPolGr') > 0 + Select crsPolGr + Scatter Name loRec + Do Adauga_Modifica_Inregistrare With "politiciGrupuri",loRec,loRec.id_polgr,"UPDATE" + Thisform.actualizeaza_grid1() + Else + amessagebox("Nu exista inregistrari pentru modificare!",0+48,"Atentie") + Endif + + ENDPROC + + PROCEDURE do_sterge + If Reccount('crsPolGr') > 0 + Select crsPolGr + Scatter Name lorec + Do STERGE_INREGISTRARE With "politiciGrupuri",lorec.id_polgr + This.actualizeaza_grid1() + Else + amessagebox("Nu exista inregistrari pentru stergere!",0+48,"Atentie") + Endif + + ENDPROC + + PROCEDURE _grdrow1.Init + DoDefault() + This.SetAll("ReadOnly",.T.,"Column") + This.SetAll("DynamicForeColor","IIF(politica_expirata = 1,RGB(128,128,128),RGB(0,0,0))","Column") + ENDPROC + +ENDDEFINE + +DEFINE CLASS frm_politicigrupuri_nou AS frm_termin_renunt OF "..\comun\clase\_frm_child.vcx" + *< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" /> + + *-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder + *< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Cus_odata_politicigrupuri1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Ct_clb_grup" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Ct_clb_lista_preturi" UniqueID="" Timestamp="" /> + + * + *m: do_alege_grup + *m: do_alege_politica + *p: nid + *p: orec + * + + * + DoCreate = .T. + Height = 145 + Name = "frm_politicigrupuri_nou" + nid = .F. + orec = .F. + Width = 375 + _SHAPE1.Name = "_SHAPE1" + _SHAPE2.Height = 29 + _SHAPE2.Left = 312 + _SHAPE2.Name = "_SHAPE2" + _SHAPE2.Top = 0 + _SHAPE2.Width = 63 + LB_TITLU_ALB_B121.Caption = "Drepturi de acces la listele de prețuri" + LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121" + LB_TITLU_ALB_B121.TabIndex = 6 + BUT_TERMIN1.Left = 343 + BUT_TERMIN1.Name = "BUT_TERMIN1" + BUT_TERMIN1.TabIndex = 4 + BUT_TERMIN1.Top = 1 + GRIDSORT1.Left = 348 + GRIDSORT1.Name = "GRIDSORT1" + GRIDSORT1.Top = 120 + BUT_RENUNT1.Left = 314 + BUT_RENUNT1.Name = "BUT_RENUNT1" + BUT_RENUNT1.TabIndex = 5 + BUT_RENUNT1.Top = 1 + * + + ADD OBJECT '_checkbox1' AS _checkbox WITH ; + Alignment = 0, ; + Caption = "Inactiv", ; + ControlSource = "porec.inactiv", ; + Left = 36, ; + Name = "_checkbox1", ; + TabIndex = 3, ; + TabStop = .F., ; + Top = 120 + *< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="checkbox" /> + + ADD OBJECT 'Ct_clb_grup' AS ct_clb_cautare_var WITH ; + cconditie = EMPTY(NVL(porec.denumire_grup,[])), ; + cprocedura = thisform.do_alege_grup, ; + cvar_afisata = porec.denumire_grup, ; + Left = 12, ; + Name = "Ct_clb_grup", ; + TabIndex = 1, ; + Top = 51, ; + SHAPE_CAUTARE.Name = "SHAPE_CAUTARE", ; + IMG_CAUTARE.Name = "IMG_CAUTARE", ; + LB_CAUTARE.Caption = "Grup", ; + LB_CAUTARE.Name = "LB_CAUTARE", ; + TX_CAUTARE.Name = "TX_CAUTARE" + *< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="container" /> + + ADD OBJECT 'Ct_clb_lista_preturi' AS ct_clb_cautare_var WITH ; + cconditie = EMPTY(NVL(porec.nume_lista_preturi,[])), ; + cprocedura = thisform.do_alege_politica, ; + cvar_afisata = porec.nume_lista_preturi, ; + Left = 12, ; + Name = "Ct_clb_lista_preturi", ; + TabIndex = 2, ; + Top = 79, ; + SHAPE_CAUTARE.Name = "SHAPE_CAUTARE", ; + IMG_CAUTARE.Name = "IMG_CAUTARE", ; + LB_CAUTARE.Caption = "Listă prețuri", ; + LB_CAUTARE.Name = "LB_CAUTARE", ; + TX_CAUTARE.Name = "TX_CAUTARE" + *< END OBJECT: ClassLib="..\comun\clase\caut_ora.vcx" BaseClass="container" /> + + ADD OBJECT 'Cus_odata_politicigrupuri1' AS cus_odata_politicigrupuri WITH ; + Left = 0, ; + Name = "Cus_odata_politicigrupuri1", ; + Top = 120 + *< END OBJECT: ClassLib="onom_preturi.vcx" BaseClass="custom" /> + + PROCEDURE do_alege_grup + Local lcselect, lcfiltru, lcschema, lcorder, lccoloane, lcTitlu, lcTitluColoane, lcFiltruOriginal, lcNumeProc + lcselect = [select * FROM vgrupuri_utilizatori] + lcfiltru = [] + lcschema = [] + lcorder = [denumire_grup] + lccoloane = [denumire_grup] + lcTitlu = [Alegeti grupul] + lcTitluColoane = [Grup] + lcFiltruOriginal = [] + lcNumeProc = "" + lnPornire = 1 + llDesktop = .F. + locauta = cauta_alfa(lcselect, lcfiltru, lcschema, lcorder, lccoloane, lcTitlu, lcTitluColoane, lcNumeProc, .F., lcFiltruOriginal,,lnPornire,,,llDesktop) + If buton=2 + Return + Endif + porec.id_grup = locauta.id_grup + porec.denumire_grup = locauta.denumire_grup + ENDPROC + + PROCEDURE do_alege_politica + Local lcselect, lcfiltru, lcschema, lcorder, lccoloane, lcTitlu, lcTitluColoane, lcFiltruOriginal, lcNumeProc + lcselect = [select * FROM vcrm_politici_preturi] + lcfiltru = [2=2] + lcschema = [] + lcorder = [nume_lista_preturi] + lccoloane = [nume_lista_preturi, nume_val, DTOC(datai), DTOC(datas)] + lcTitlu = [Alegeti lista de preturi] + lcTitluColoane = [Lista,Valuta,Data inceput,Data sfarsit] + *!* modificare v 2.0.14 + lcFiltruOriginal = [least(NVL(last_day(to_date('] + ALLTRIM(STR(m.gnAn)) + PADL(m.gnLuna,2,'0') + [','YYYYMM')),sysdate),sysdate) between datai and ] + ; + [NVL(datas, to_date('300012', 'YYYYMM'))]+gcCondSucursala + *!* lcFiltruOriginal = [2=2]+gcCondSucursala + *!* modificare v 2.0.14 ^ + lcNumeProc = "" + lnPornire = 1 + llDesktop = .F. + locauta = cauta_alfa(lcselect, lcfiltru, lcschema, lcorder, lccoloane, lcTitlu, lcTitluColoane, lcNumeProc, .F., lcFiltruOriginal,,lnPornire,,,llDesktop) + If buton=2 + Return + Endif + porec.ID_POLITICA = locauta.ID_POL + porec.nume_lista_preturi= locauta.nume_lista_preturi + ENDPROC + + PROCEDURE inainte_de_do_termin + Local PLRETURN + + lccontrol = Upper(This.ActiveControl.BaseClass ) + If Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX") + lcval=This.ActiveControl.ControlSource + &lcval=Thisform.ActiveControl.Value + Endif + + Do Case + Case Empty(Nvl(porec.denumire_grup,[])) + amessagebox("Nu ati completat grupul!",0+48,"Atentie") + Thisform.ct_clb_grup.SetFocus() + PLRETURN = .F. + Case Empty(Nvl(porec.nume_lista_preturi,[])) + amessagebox("Nu ati completat politica de preturi!",0+48,"Atentie") + Thisform.ct_clb_lista_preturi.SetFocus() + PLRETURN = .F. + Otherwise + PLRETURN=This.cus_odata_politicigrupuri1.salvare(This.OREC,This.NID) + Endcase + Return PLRETURN + + ENDPROC + + PROCEDURE Init + LPARAMETERS toRec, tnId, tcActiune + + DODEFAULT() + + this.orec= toRec + this.nid = tnId + this.cus_odata_politicigrupuri1.cactiune = tcActiune + + ENDPROC + +ENDDEFINE diff --git a/Clase/opreturi.vc2 b/Clase/opreturi.vc2 new file mode 100644 index 0000000..217d157 --- /dev/null +++ b/Clase/opreturi.vc2 @@ -0,0 +1,98 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.21" SourceFile="opreturi.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* +* +DEFINE CLASS capplication AS wzapplication OF "..\..\roacont\clase\appwiz.vcx" && Application class. + *< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" /> + + * + clastcaption = Microsoft Visual FoxPro + clasticon = + Name = "capplication" + nformcount = 0 + * + + PROCEDURE doform + LPARAMETERS tcFileName,tcClass,tlNoMultipleInstances,tlNoShow + LOCAL lcFileName,lcClass,oForm,oForm2,lcName,lnCount,lnTop,lnLeft + LOCAL lcFormName,lnFormCount + + _screen.visible=.t. + + lcFileName=UPPER(ALLTRIM(tcFileName)) + IF EMPTY(lcFileName) + RETURN .F. + ENDIF + lcClass=IIF(TYPE("tcClass")=="C",LOWER(ALLTRIM(tcClass)),"") + lcFileName=LOWER(FULLPATH(lcFileName)) + IF NOT "."$lcFileName + lcFileName=lcFileName+IIF(EMPTY(lcClass),".scx",".vcx") + ENDIF + IF NOT FILE(lcFileName) + this.FileNotFoundMsgBox(lcFileName) + RETURN .F. + ENDIF + lcFormName=IIF(EMPTY(lcClass),lcFileName,lcFileName+","+lcClass) + IF tlNoMultipleInstances + FOR lnCount = 1 TO this.nFormCount + IF this.aFormNames[lnCount]==lcFormName AND ; + TYPE("this.aForms[lnCount]")=="O" AND ; + NOT ISNULL(this.aForms[lnCount]) + this.aForms[lnCount].Show + RETURN .F. + ENDIF + ENDFOR + ENDIF + this.RefreshFormsCollection + this.nFormCount=this.nFormCount+1 + DIMENSION this.aForms[this.nFormCount],this.aFormNames[this.nFormCount] + this.aFormNames[this.nFormCount]=lcFormName + IF NOT EMPTY(lcClass) + SET CLASSLIB TO (lcFileName) ADDITIVE + this.aForms[this.nFormCount]=CREATEOBJECT(lcClass) + IF NOT tlNoShow AND TYPE("this.aForms[this.nFormCount]")=="O" AND ; + NOT ISNULL(this.aForms[this.nFormCount]) + this.aForms[this.nFormCount].Show + ENDIF + ELSE + DO FORM (lcFileName) NAME this.aForms[this.nFormCount] LINKED NOSHOW + ENDIF + lnFormCount=this.nFormCount + this.RefreshFormsCollection + IF this.lCascadeForms AND this.nFormCount>=lnFormCount + oForm=this.aForms[this.nFormCount] + lnTop=oForm.Top + lnLeft=oForm.Left + lcName=oForm.Name + IF WEXIST(lcName) AND oForm.WindowState#2 + FOR lnCount = 1 TO (this.nFormCount-1) + oForm2=this.aForms[lnCount] + IF TYPE("oForm2")#"O" OR ISNULL(oForm2) + LOOP + ENDIF + IF lcName==oForm2.Name AND WLROW(lcName)=WLROW(oForm2.Name) AND ; + WLCOL(lcName)=WLCOL(oForm2.Name) + lnTop=lnTop+this.nPixelOffset + lnLeft=lnLeft+this.nPixelOffset + ENDIF + ENDFOR + IF oForm.Top#lnTop + oForm.Top=lnTop + ENDIF + IF oForm.Left#lnLeft + oForm.Left=lnLeft + ENDIF + ENDIF + ENDIF + + *!* modificat 18.10.2004 + *!* Marius + IF !(tlNoShow OR ('LOGIN'$UPPER(lcFileName) and glParametri)) + this.aForms[this.nFormCount].Show + ENDIF + + ENDPROC + +ENDDEFINE diff --git a/Ferestre/Copy of fundal.sc2 b/Ferestre/Copy of fundal.sc2 new file mode 100644 index 0000000..d5d74db --- /dev/null +++ b/Ferestre/Copy of fundal.sc2 @@ -0,0 +1,251 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.21" SourceFile="copy of fundal.scx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* +* +DEFINE CLASS dataenvironment AS dataenvironment + *< CLASSDATA: Baseclass="dataenvironment" Timestamp="" Scale="" Uniqueid="" ClassIcon="1" /> + + * + DataSource = .NULL. + Height = 200 + Left = 1 + Name = "Dataenvironment" + Top = 220 + Width = 520 + * + +ENDDEFINE + +DEFINE CLASS form1 AS form + *< CLASSDATA: Baseclass="form" Timestamp="" Scale="" Uniqueid="" /> + + *-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder + *< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Text1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Text2" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Image2" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="_pgfrmbase1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Image1" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="lb_utilizator" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="lb_utilizator1" UniqueID="" Timestamp="" /> + + * + *m: jurnal + * + + * + AlwaysOnBottom = .T. + AutoCenter = .T. + BackColor = 255,255,255 + BorderStyle = 0 + Caption = "" + Closable = .F. + ControlBox = .F. + DoCreate = .T. + Enabled = .T. + FillColor = 0,0,0 + HalfHeightCaption = .F. + Height = 450 + MaxButton = .F. + MinButton = .F. + Movable = .F. + Name = "Form1" + Picture = ..\..\ + ShowTips = .T. + Width = 797 + * + + ADD OBJECT '_pgfrmbase1' AS pg_meniu_princ WITH ; + ErasePage = .T., ; + Height = 396, ; + Left = -2, ; + Name = "_pgfrmbase1", ; + Top = 60, ; + Width = 489, ; + Page1.Cw1.Label_item1.Name = "Label_item1", ; + Page1.Cw1.Name = "Cw1", ; + Page1.Cw6.Label_item1.Name = "Label_item1", ; + Page1.Cw6.Name = "Cw6", ; + Page1.Cw7.Label_item1.Name = "Label_item1", ; + Page1.Cw7.Name = "Cw7", ; + Page1.Cw9.Label_item1.Name = "Label_item1", ; + Page1.Cw9.Name = "Cw9", ; + Page1.Name = "Page1", ; + Page1.Pict_liniuta2.Name = "Pict_liniuta2", ; + Page1.Pict_meniu1.Name = "Pict_meniu1", ; + Page1.Pict_meniu1.Picture = ..\grafice\f2.jpg, ; + Page2.Name = "Page2", ; + Page2.Pict_meniu1.Name = "Pict_meniu1" + *< END OBJECT: ClassLib="..\clase\ofundal_preturi.vcx" BaseClass="pageframe" /> + + ADD OBJECT 'Image1' AS image WITH ; + Height = 220, ; + Left = 228, ; + Name = "Image1", ; + Picture = ..\grafice\roapreturi.bmp, ; + Stretch = 0, ; + Top = 205, ; + Width = 556 + *< END OBJECT: BaseClass="image" /> + + ADD OBJECT 'Image2' AS image WITH ; + Height = 63, ; + Left = -11, ; + Name = "Image2", ; + Picture = ..\grafice\f1.jpg, ; + Stretch = 2, ; + Top = -1, ; + Width = 851 + *< END OBJECT: BaseClass="image" /> + + ADD OBJECT 'Label1' AS label WITH ; + AutoSize = .T., ; + BackStyle = 0, ; + Caption = "Operator:", ; + FontItalic = .T., ; + ForeColor = 0,0,128, ; + Height = 17, ; + Left = 7, ; + Name = "Label1", ; + Top = 381, ; + Width = 53 + *< END OBJECT: BaseClass="label" /> + + ADD OBJECT 'Label2' AS label WITH ; + AutoSize = .T., ; + BackStyle = 0, ; + Caption = "Nivel de acces:", ; + FontItalic = .T., ; + ForeColor = 0,0,128, ; + Height = 17, ; + Left = 7, ; + Name = "Label2", ; + Top = 401, ; + Width = 85 + *< END OBJECT: BaseClass="label" /> + + ADD OBJECT 'lb_utilizator' AS lb_simplu WITH ; + Anchor = 4, ; + Caption = "Operator:", ; + FontItalic = .T., ; + ForeColor = 0,0,128, ; + Left = 149, ; + Name = "lb_utilizator", ; + Top = 379 + *< END OBJECT: ClassLib="..\..\comun\clase\lb.vcx" BaseClass="label" /> + + ADD OBJECT 'lb_utilizator1' AS lb_simplu WITH ; + Anchor = 4, ; + Caption = "nume_utilizator", ; + FontBold = .T., ; + FontItalic = .T., ; + ForeColor = 0,0,128, ; + Left = 203, ; + Name = "lb_utilizator1", ; + Top = 379, ; + Visible = .F. + *< END OBJECT: ClassLib="..\..\comun\clase\lb.vcx" BaseClass="label" /> + + ADD OBJECT 'Text1' AS textbox WITH ; + BackStyle = 0, ; + BorderStyle = 0, ; + ControlSource = "utilizator", ; + FontBold = .T., ; + FontItalic = .T., ; + ForeColor = 0,0,128, ; + Height = 23, ; + Left = 62, ; + Name = "Text1", ; + ReadOnly = .T., ; + TabStop = .F., ; + Top = 380, ; + Width = 147 + *< END OBJECT: BaseClass="textbox" /> + + ADD OBJECT 'Text2' AS textbox WITH ; + BackStyle = 0, ; + BorderStyle = 0, ; + ControlSource = "m.nivel", ; + FontBold = .T., ; + FontItalic = .T., ; + ForeColor = 0,0,128, ; + Height = 23, ; + Left = 93, ; + Name = "Text2", ; + ReadOnly = .T., ; + TabStop = .F., ; + Top = 400, ; + Width = 28 + *< END OBJECT: BaseClass="textbox" /> + + PROCEDURE Activate + Local lnScrH,lnScrW + lnScrW = _Screen.Width + lnScrH = _Screen.Height + + Thisform.image1.Top = lnScrH - Thisform.image1.Height - 50 + Thisform.image1.Left = lnScrW - Thisform.image1.Width - 30 + Thisform.image2.Width = lnScrW + 30 + Thisform._pgfrmbase1.Width = lnScrW + Thisform._pgfrmbase1.Height = Thisform.Height-Thisform.image2.Height + Thisform._pgfrmbase1.page1.Pict_meniu1.Height = Thisform._pgfrmbase1.Height + Thisform._pgfrmbase1.page2.Pict_meniu1.Height = Thisform._pgfrmbase1.Height + + If primadata + primadata = .F. + + Do start_firma In ostartfirma.prg + verifica_drepturi2('gofundal','_pgfrmbase1') + Thisform.lb_utilizator1.Caption=Alltrim(gcUserNameApp) + Thisform.lb_utilizator1.Visible=.T. + + Endif + + + ENDPROC + + PROCEDURE jurnal + ENDPROC + + PROCEDURE KeyPress + Lparameters nKeyCode, nShiftAltCtrl + If nKeyCode==-1 &&F2 + Quit + Endif + + + + ENDPROC + + PROCEDURE RightClick + Do start_firma In ostartfirma.prg + verifica_drepturi2('gofundal','_pgfrmbase1') + + ENDPROC + + PROCEDURE Image1.RightClick + thisform.rightclick + ENDPROC + + PROCEDURE lb_utilizator.RightClick + thisform.rightclick + ENDPROC + + PROCEDURE lb_utilizator1.RightClick + thisform.rightclick + ENDPROC + + PROCEDURE _pgfrmbase1.Page1.RightClick + Do start_firma In ostartfirma.prg + verifica_drepturi2('gofundal','_pgfrmbase1') + ENDPROC + + PROCEDURE _pgfrmbase1.Page2.RightClick + Do start_firma In ostartfirma.prg + verifica_drepturi2('gofundal','_pgfrmbase1') + ENDPROC + +ENDDEFINE diff --git a/Ferestre/fundal.sc2 b/Ferestre/fundal.sc2 new file mode 100644 index 0000000..6d7b5ed --- /dev/null +++ b/Ferestre/fundal.sc2 @@ -0,0 +1,116 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.21" SourceFile="fundal.scx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* +* +DEFINE CLASS dataenvironment AS dataenvironment + *< CLASSDATA: Baseclass="dataenvironment" Timestamp="" Scale="" Uniqueid="" ClassIcon="1" /> + + * + DataSource = .NULL. + Height = 200 + Left = 1 + Name = "Dataenvironment" + Top = 220 + Width = 520 + * + +ENDDEFINE + +DEFINE CLASS form1 AS form + *< CLASSDATA: Baseclass="form" Timestamp="" Scale="" Uniqueid="" /> + + * + *m: jurnal + *m: statusbarclick + *p: ostatusbar + *p: _memberdata + * + + * + AlwaysOnBottom = .T. + AutoCenter = .T. + BackColor = 255,255,255 + BorderStyle = 0 + Caption = "" + Closable = .F. + ControlBox = .F. + DoCreate = .T. + Enabled = .T. + FillColor = 0,0,0 + HalfHeightCaption = .F. + Height = 500 + MaxButton = .F. + MinButton = .F. + Movable = .F. + Name = "Form1" + ostatusbar = .NULL. + Picture = ..\..\ + ShowTips = .T. + Width = 750 + WindowState = 0 + _memberdata = + + + * + + PROCEDURE Activate + Local c + If primadata + If Not Pemstatus(_Screen,"StatusBar", 5) Then + _Screen.Newobject("StatusBar","ctl32_statusbar", "ctl32_statusbar_fals.vcx", Null, 2) + Endif + Thisform.oStatusBar = _Screen.StatusBar + Thisform.oStatusBar.ctlIcon="roastartmic.ico" + Thisform.oStatusBar.ctlMessage = _Screen.Caption + Bindevent(Thisform.oStatusBar, [ctlClick], This, [StatusBarClick]) + + Do start_firma In ostartfirma.prg + primadata = .F. + oprinc=Crea('princ') + verifica_drepturi('oprinc','pagefr1') + oprinc.lb_utilizator1.Caption=Alltrim(gcUserNameApp) + oprinc.lb_utilizator1.Visible=.T. + Endif + + + primadata=.F. + oprinc.Show() + + DO lansare_toolbar IN oproceduri_comune.prg + DO lansare_help IN oproceduri_comune.prg + + + ENDPROC + + PROCEDURE Init + + + ENDPROC + + PROCEDURE jurnal + ENDPROC + + PROCEDURE KeyPress + LPARAMETERS nKeyCode, nShiftAltCtrl + if nkeycode==-1 &&F2 + DO IESIRE + endif + + + + ENDPROC + + PROCEDURE RightClick + DO start_firma IN ostartfirma.prg + verifica_drepturi('oprinc','pagefr1') + + + ENDPROC + + PROCEDURE statusbarclick + Thisform.oStatusBar.newtooltip() + ENDPROC + +ENDDEFINE diff --git a/Grafice/f1.jpg b/Grafice/f1.jpg new file mode 100644 index 0000000..3bff03e Binary files /dev/null and b/Grafice/f1.jpg differ diff --git a/Grafice/f2.jpg b/Grafice/f2.jpg new file mode 100644 index 0000000..8e53539 Binary files /dev/null and b/Grafice/f2.jpg differ diff --git a/Grafice/f3.jpg b/Grafice/f3.jpg new file mode 100644 index 0000000..21fd7cd Binary files /dev/null and b/Grafice/f3.jpg differ diff --git a/Grafice/lista1.bmp b/Grafice/lista1.bmp new file mode 100644 index 0000000..98e8334 Binary files /dev/null and b/Grafice/lista1.bmp differ diff --git a/Grafice/lista2.bmp b/Grafice/lista2.bmp new file mode 100644 index 0000000..f24cd4c Binary files /dev/null and b/Grafice/lista2.bmp differ diff --git a/Grafice/roaoferta.bmp b/Grafice/roaoferta.bmp new file mode 100644 index 0000000..d6f2407 Binary files /dev/null and b/Grafice/roaoferta.bmp differ diff --git a/Grafice/roapreturi.bmp b/Grafice/roapreturi.bmp new file mode 100644 index 0000000..1da129a Binary files /dev/null and b/Grafice/roapreturi.bmp differ diff --git a/Meniuri/roapreturi.mn2 b/Meniuri/roapreturi.mn2 new file mode 100644 index 0000000..10518f9 --- /dev/null +++ b/Meniuri/roapreturi.mn2 @@ -0,0 +1,106 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.21" SourceFile="roapreturi.mnx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* +*1 +*REPLACE + +* +DEFINE MENU _msysmenu BAR +DEFINE PAD _000000001 OF _msysmenu PROMPT "\ + +* +PROCEDURE BAR_1_OF_Utile_FB2P + Do start_firma In ostartfirma.prg + verifica_drepturi('oprinc','pagefr1') +ENDPROC && BAR_1_OF_Utile_FB2P + +PROCEDURE BAR_3_OF_Utile_FB2P + Do Case + Case File('C:\WINDOWS\CALC.EXE') + Run /N C:\Windows\Calc.Exe + Case File('C:\WINDOWS\SYSTEM32\CALC.EXE') + Run /N C:\Windows\SYSTEM32\Calc.Exe + Case File('C:\WINnt\system32\CALC.EXE') + Run /N C:\WINnt\SYSTEM32\Calc.Exe + Otherwise + lcMesaj='Aplicatia "Calculator" nu este instalata pe acest sistem!' + aMessagebox(lcMesaj,0+48,"ROA PRETURI") + Endcase +ENDPROC && BAR_3_OF_Utile_FB2P + +PROCEDURE BAR_4_OF_Utile_FB2P + Do Case + Case File('C:\WINDOWS\NOTEPAD.EXE') + Run /N C:\Windows\NOTEPAD.Exe + Case File('C:\WINnt\system32\NOTEPAD.EXE') + Run /N C:\WINnt\system32\NOTEPAD.Exe + Otherwise + lcMesaj='Aplicatia "Notepad" nu este instalata pe acest sistem!' + aMessagebox(lcMesaj,0+48,"ROA PRETURI") + Endcase +ENDPROC && BAR_4_OF_Utile_FB2P + +PROCEDURE BAR_6_OF_Utile_FB2P + QUIT +ENDPROC && BAR_6_OF_Utile_FB2P + +PROCEDURE BAR_4_OF_Ajutor_FB2P + DO FORM frm_about +ENDPROC && BAR_4_OF_Ajutor_FB2P + +* diff --git a/Programe/onom_preturi.prg b/Programe/onom_preturi.prg new file mode 100644 index 0000000..e67760a --- /dev/null +++ b/Programe/onom_preturi.prg @@ -0,0 +1,130 @@ +Procedure viz_politici +Private popolitici,popoliticiart,pcschema1,pcselect1 +Local llAfiseaza +Store .F. To llAfiseaza +Store '' To popolitici,popoliticiart +If Used('crspoliticipret') + Use In crspoliticipret +Endif +If Used('crspoliticiart') + Use In crspoliticiart +Endif + + +pcschema1=['id_pol n(10), nume_lista_preturi c(100), datai d, datas d, id_valuta n(10), nume_val c(10), id_nota N(10), notaContab C(30), preturi_cu_tva N(1), utilizator c(100),dataora t, id_sucursala n(5), sucursala c(50), moneda_nationala n(1)'] +pcselect1=['select id_pol, nume_lista_preturi ,datai, datas, id_valuta, nume_val, id_nota, notaContab, preturi_cu_tva, utilizator, dataora,id_sucursala,sucursala,moneda_nationala from vcrm_politici_preturi where 1=2'] +pcorder1=[nume_lista_preturi ] +pcfiltru1 = [2 = 2] + gcCondSucursala +llAfiseaza = .F. +gencursor('popolitici','crspoliticipret',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfiseaza) +popolitici.ca_baza1.afisare() + +pcschema1=['id_articol n(10), id_pol_art n(10), nume_articol c(100), um c(16), pret n(20,4), pretftva n(20,4), pretctva n(20,4),proc_tvav n(6,2), nume_val c(16),utilizator c(50),'+]+; + ['dataora t,codmat c(30),art_compus N(1),procent n(1),explicatie c(50),id_venchelt n(10),explicatie_venchelt c(50),um2 c(16),cant_bax n(20,4),reteta_principala n(10)'] +pcselect1=['select id_articol, id_pol_art, nume_articol,um,pret,pretftva, pretctva, proc_tvav,nume_val,utilizator,dataora,codmat,art_compus,procent,'+]+; + ["(case procent when 1 then '%' else nume_val end) as explicatie,id_venchelt,explicatie_venchelt,um2,cant_bax,reteta_principala "+]+; + ['from vcrm_politici_pret_art where 2=2'] +pcorder1=[nume_articol] +pcfiltru1 = [1 = 2] +llAfiseaza = .F. +gencursor('popoliticiart','crspoliticiart',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfiseaza) +popoliticiart.ca_baza1.afisare() + +ofrmpolitici=Createobject('frm_politici_pret') +ofrmpolitici.Show(1) +Release ofrmpolitici,popolitici,popoliticiart +Endproc && viz_politici + +****************************************************************************************************************** +Procedure viz_note_vanzari +Private poNote, poNoteIreg, pcschema1, pcselect1, pcschema2, pcselect2 +Local llAfiseaza +Store .F. To llAfiseaza +Store '' To poNote, poNoteIreg +If Used('crsNote') + Use In crsNote +Endif +If Used('crsNoteIreg') + Use In crsNoteIreg +Endif + +pcschema1=[''] +pcselect1=['select * from vcrm_note_vanzari where 2=2'] +pcorder1=[denumire] +pcfiltru1 = [1 = 2] +llAfiseaza = .F. +gencursor('poNote','crsNote',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfiseaza) +poNote.ca_baza1.afisare() + +pcselect2 = ['select * from note_contabile where 2=2'] +pcorder2 = [ordine] +pcfiltru2 = [1 = 2] +llAfiseaza = .F. +gencursor('poNoteIreg','crsNoteIreg',pcselect2,pcfiltru2,pcschema1,pcorder2,llAfiseaza) +poNoteIreg.ca_baza1.afisare() + +Select crsNote +ofrmNote = Createobject('frm_note_vanzari') +ofrmNote.Show(1) +Release poNote +Release poNoteIreg +Endproc && viz_note_vanzari +***------------------------------------------------------------------------------------------------------------------------------ +Procedure viz_categ_articole + +Private poCateg, pcschema1, pcselect1 +Local llAfiseaza +Store .F. To llAfiseaza +Store '' To poCateg +If Used('crsCateg') + Use In crsCateg +Endif + +pcschema1=['id_categ N(5), denumire C(30), grup_sup C(100), id_tata N(5), tata C(100), id_nota N(10), den_nota C(30), scd C(4), ascd C(4), scc C(4), ascc C(4)'] +pcselect1=['select id_categ, denumire, TRIM(SUBSTR(tata,1,INSTR(tata,CHR(92),1,nivel)-1)) as grup_sup, id_tata, tata, id_nota, den_nota, scd, ascd, scc, ascc from ]+gcS+[.vcrm_categ_note where 2=2'] +pcorder1=[denumire] +pcfiltru1 = [1 = 2] +llAfiseaza = .F. +gencursor('poCateg','crsCateg',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfiseaza) +poCateg.ca_baza1.afisare() + +Select crsCateg +ofrmCatArt = Createobject('frm_categ_articole') +ofrmCatArt.Show(1) +Release poCateg + +Endproc && viz_categ_articole +***------------------------------------------------------------------------------------------------------------------------------ +Function verifica_politica +Lparameters tnIdPol,tnTipOperatie +** tnTipOperatie = 1 - modificare +** = 2 - stergere +Local llReturn +Store .T. To llReturn +lcCursor = [crstestpol] +lcSql = [select to_number(varvalue) as id_pol from optiuni where varname = 'ID_POL_PRET_STOC'] +lnSucces = goExecutor.oExecute(lcSql,lcCursor) +If lnSucces < 0 + amessagebox(goExecutor.cEroare,16,"Eroare") +Else + If Reccount(lcCursor)>0 + Select (lcCursor) + lnIdPol = id_pol + If lnIdPol = tnIdPol + llReturn = .F. + If tnTipOperatie = 1 + lcMesaj = Chr(9) + Chr(9) + Chr(9) + Chr(9) + [Nu puteti modifica articolele de pe aceasta politica,] + Chr(13) + Chr(10) + ; + [deoarece este setata ca fiind politica de preturi pentru facturarea din stoc ( in ROAFACTURARE ) !] + Else + lcMesaj = Chr(9) + Chr(9) + Chr(9) + Chr(9) + [Nu puteti sterge aceasta politica,] + Chr(13) + Chr(10) + ; + [deoarece este setata ca fiind politica de preturi pentru facturarea din stoc ( in ROAFACTURARE ) !] + Endif + amessagebox(lcMesaj,48,"Atentie") + Endif + Endif +Endif +If Used(lcCursor) + Use In (lcCursor) +Endif +Return llReturn +Endfunc && verifica_politica diff --git a/Programe/ovariabile_globale.prg b/Programe/ovariabile_globale.prg new file mode 100644 index 0000000..c318582 --- /dev/null +++ b/Programe/ovariabile_globale.prg @@ -0,0 +1,12 @@ +PUBLIC gcCondLuna +*!* gcCondLuna = [((((extract(month from datafact) =]+Alltrim(Str(gnLuna))+; +*!* [ and extract(year from datafact) =]+Alltrim(Str(gnAn))+[) or (datafact is null )); +*!* and ]+; +*!* [ (extract (month from datai)<=]+Alltrim(Str(gnLuna)) + [ and extract(year from datai)<= ]+Alltrim(Str(gnAn))+[))]+; +*!* [ or ((extract (month from dataoravalid)>= ]+Alltrim(Str(gnLuna))+[ and extract(year from dataoravalid)>=]+Alltrim(Str(gnAn)) +[)]+; +*!* [ and id_tip > 1)]+ [)] + +*!* lcDataFact= [ (a.facturat=1 and (extract(month from a.datafact) =]+Alltrim(Str(gnLuna))+[ and extract(year from a.datafact) =]+Alltrim(Str(gnAn))+[))] +*!* lcDataValid = [ (a.validat=1 and (extract (month from a.dataoravalid)>= ]+Alltrim(Str(gnLuna))+[ and extract(year from a.dataoravalid)>=]+Alltrim(Str(gnAn)) +[)) ] +*!* gcCondLuna = [ ((extract (month from a.datai)=]+Alltrim(Str(gnLuna)) + [ and extract(year from a.datai)= ]+Alltrim(Str(gnAn))+[) or ]+; +*!* [ (a.id_tip=1 and (a.facturat=0 or ] + lcDataFact + [) ) or (a.id_tip>1 and (a.validat=0 or ] + lcDataValid + [))) ] \ No newline at end of file diff --git a/Programe/roapreturi.prg b/Programe/roapreturi.prg new file mode 100644 index 0000000..df2ff47 --- /dev/null +++ b/Programe/roapreturi.prg @@ -0,0 +1,1040 @@ +Parameters tparam + + +Private gcParameters +If !Empty(tparam) And Type('tparam') = 'C' + gcParameters = tparam +Else + gcParameters = "" +Endif +&&& cont2003 + +Public gnewcryptfll +Public gnewcryptxml +gnewcryptfll=.F. +gnewcryptxml=.F. + +Local lchost, lcUserName, lcPassword, lnIdUtil, lnIdProgram, lcUserNameApp,lcPasswordApp +Store '' To lchost, lcUserName, lcPassword, lcUserNameApp,lcPasswordApp +Store 0 To lnIdUtil, lnIdProgram + +Public gcNumeProgram +gcNumeProgram = [ROAPRETURI] +_Screen.Icon=gcNumeProgram+[.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 Exclusive Off +Set Cpdialog Off +Set Talk Off +Set Safety Off +Set Escape Off +Set Exact On +Set Mark To '/' +Set Ansi On +Set Console Off +Set Notify Off +Set Seconds Off +Set NullDisplay To '' +Set Decimals To 4 +* _SCREEN.VISIBLE=.F. +_Screen.AutoCenter=.T. + + + +*VARIABILE_______ +Local lcMainClassLib +Local lcLastSetTalk,lcLastSetPath,lcLastSetClassLib,lcOnShutdown + + +*VARIABILE__________________________________________________________________________ +Declare nror[65000] +Declare RTVA[22,2] + + + +Public CRLF,CR,LF,Tab +Store Chr(13) + Chr(10) To CRLF +Public pcNl,pcAn +Store "" To pcNl,pcAn && se initializeaza in start00 +CR=Chr(13) +LF=Chr(10) +Tab=Chr(9) + +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 +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 + + +*** DECLARATII DE VARIABILE PUBLICE + +*-- 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\ROAPRETURI\COMUN\UTILE\web\WWUTILS.PRG" Additive +Set Procedure To "D:\ROA\ROAPRETURI\COMUN\UTILE\web\WWAPI.PRG" Additive + +Public gcAppPath,gcAppName, gcTempPath, gcCaleServerDate, gcUserNameApp, gcPasswordApp +Store '' To gcUserNameApp, gcPasswordApp, gnNivelUtilizator, gnGrupUtilizator, gcAcces + +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;' + ; + 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 ooptiuni Additive +Set Classlib To registry Additive +Set Classlib To decabaza Additive +Set Classlib To cauta_alfa_forms Additive +Set Classlib To ferestre_oracle Additive +Set Classlib To ofundal_roapreturi Additive +Set Classlib To onom_preturi Additive +Set Classlib To onote_contabile Additive +Set Classlib To otoolbar Additive +Set Classlib To onom_articole.vcx Additive + +Set Classlib To Messagebox Additive +*!* modificare v 2.0.10 +Set Classlib To wwdialogs.vcx Additive +*!* modificare v 2.0.10 ^ + +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 accessibility.vcx Additive + +*PROCEDURI______________________________________________________ +Set Procedure To quitapp Additive +Set Procedure To init_program Additive +Set Procedure To oproceduri_comune Additive +Set Procedure To gencursor.prg Additive +Set Procedure To updateserver.prg Additive +Set Procedure To update_nomenclator.prg Additive +Set Procedure To onomenclatoare Additive +Set Procedure To oproceduri_ams Additive +Set Procedure To ocautare Additive +Set Procedure To oinit_optiuni Additive +Set Procedure To osecurity Additive +Set Procedure To omeniu_initializari Additive +Set Procedure To acces_meniu Additive +Set Procedure To oheader Additive +Set Procedure To onom_preturi Additive +Set Procedure To proceduri_excel.prg Additive +Set Procedure To oproceduri_articole.prg Additive +Set Procedure To cauta_alfa.prg Additive + +Set Procedure To oserii_numere.prg Additive +*!* 19.06.2006 +*!* marius.mutu +Set Procedure To wwxmlhttp.prg Additive +Set Procedure To ini.prg Additive +Set Procedure To wwutils.prg Additive +Set Procedure To wwapi.prg Additive +*!* modificare v 2.0.10 +Set Procedure To filebringer.prg Additive +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 wwcodeupdate.prg Additive +Set Procedure To wwhttp.prg Additive +Set Procedure To xmlaccess.prg Additive +Set Procedure To xmlparser.prg Additive +*!* modificare v 2.0.10 ^ +*!* modificare v 2.0.18 +Set Procedure To wwconfig.prg Additive +Set Procedure To oexport.prg Additive +Set Procedure To _libpdf.prg Additive +Set Procedure To frxoutput.prg Additive + +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.18 ^ +Set Procedure To regex.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 + Messagebox('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 gcSchemaPath +*!* STORE '' TO gcSchemaPath + +*!* gcAppPath = ADDBS(ShortPath(GetAppStartPath())) && wwutils.prg +*!* gcAppName=ALLT(UPPE(JUSTSTEM(SYS(16,0)))) + +*!* gcAppDataPath=gcAppPath+"Date_"+gcAppName+"\" +gcUtilizatoriPath = gcAppPath + "UTILIZATORI\" + +Store "" To gcTempPath, gcCaleServerDate + +*!* IF !DIRECTORY(gcAppDataPath) +*!* MD (gcAppDataPath) +*!* ENDIF +*--------------------------------------- +*** DIRGEN +Public gcDirMare +liat=Rat("\",gcAppPath,2) +gcDirMare = Addbs(Left(gcAppPath,liat-1)) +DIRGEN = gcDirMare +Cd &DIRGEN +gcSecurityPath = DIRGEN + 'Security\' +gcSecurityFile = gcSecurityPath + 'ROA_SECURITY.TXT' + +Private gcGeneralIniFile, gcSettingsFile +gcGeneralIniFile = DIRGEN + "settings.ini" +gcSettingsFile = m.gcGeneralIniFile +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 + +*!* public poLog && obiect pt logarea mesajelor sistemului +*!* poLog = NEWOBJECT("Log_Mesaje","Log_Mesaje.prg") + + +Public glQuit +glQuit = .F. + +Public gnIdIstoric +gnIdIstoric = 0 + +If verificari() + _Screen.Visible=.T. +* DO mesaj WITH "Se fac verificari programului","Va rugam reveniti" + AMESSAGEBOX("Se fac verificari programului",0+48,"Va rugam reveniti") + glQuit= .T. + Quit +Endif + +If !Debug_Start() + lcParam=tparam + 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","" + AMESSAGEBOX("Programul trebuie pornit doar din START",0+48,"") + Quit + Endif +Endif + +*!* modificare v 2.0.18 +*!* *** verificare serie permanenta +*!* PUBLIC tipar,SER_PERM,SER_PERI,VERSIUNE +*!* STORE .F. TO SER_PERM,SER_PERI +*!* modificare v 2.0.18 ^ + +***************************** 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 +Store 0 To gnIdProgram, gnId_prg_owner +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 + +Private gcS && schema firmei +Store 'DEMO' To gcS + +Private gcCopyRight, gcAntet,goExport +gcCopyRight = '© ROA Romfast SRL' +gcAntet = [] +goExport = Createobject("oExportConfig") && modificare v 2.0.18 +***toolbar*** +Private otool,ohelp +Store '' To otool,ohelp +***toolbar*** + +Private gcS && schema firmei +Store 'DEMO' 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 + +&& obiect global wrap pt sqlexec cu text eroare si succes +Private goExecutor, goConn +goExecutor = Createobject("oExecutor") +goConn = Createobject("oConn") + +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 + +*!* IF glParametri +*!* gcHost = lcHost +*!* gcUserName = lcUserName +*!* gcPassword = lcPassword +*!* gcUserNameApp = lcUserNameApp +*!* gcPasswordApp = lcPasswordApp +*!* gnIdUtil = lnIdUtil +*!* gnIdProgram = lnIdProgram +*!* ELSE +*!* gcHost = "jcsserver" +*!* gcUserName = "contafin_ORACLE" +*!* gcPassword = "123" +*!* gcUserNameApp = '' +*!* gcPasswordApp = '' +*!* gnIdUtil = 1 +*!* gnIdProgram = 8 +*!* ENDIF +***************************** VARIABILE ORACLE + + + +*!* USE &gcAppPath\SER 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()))) +*!* modificare v 2.0.18 +*!* IF !_DEBUG() +*!* IF SER_PERM AND !verif_ser_perm() +*!* QUIT +*!* ENDIF +*!* ENDIF +*!* PUBLIC cales,eserver,loc,numestatie +*!* eserver=.F. +*!* STORE '' TO cales,loc,numestatie +*!* modificare v 2.0.18 ^ +Public NUMEPROGRAM,MENIUPROGRAM,FUNDALPROGRAM + +NUMEPROGRAM='ROAPRETURI' +*!* MENIUPROGRAM=gcAppPath+"meniuri\cont2000.mpr" +*!* FUNDALPROGRAM=gcAppPath+"FERESTRE\FUNDAL.scx" +_program='roapreturi' + +*** INITIALIZEZ CAI DATE +If .F. + If !Start_Nou() + _Screen.WindowState=2 + Cd \ + If !Directory('c:\contafin') + Md contafin + Endif + Cd c:\contafin\ + If !Directory('temp') + Md temp + Endif + + + Sele 0 + Use c:\contafin\temp\ceprogram Alias ceprogram + Scat Memv +*wait wind m.util + Sele ceprogram + Use + utilizator=m.UTIL + GRUPUL=M.nrgrup + If M.nrgrup=0 + E_UN_SUPERVIZOR=.T. + Else + E_UN_SUPERVIZOR=.F. + Endif + + If File('&DIRGEN\START2000\DATA\RETEA.DBF') + If !File('c:\contafin\temp\RETEA.dbf') + Copy File &DIRGEN\START2000\Data\RETEA.* To c:\contafin\temp\RETEA.* + Endif + Sele 0 + Use c:\contafin\temp\RETEA + eserver=Server + cales=Allt(CALESERVER) + Use In RETEA + Endif + Else + + gcTempPath = Init_Cale_Temp(DIRGEN) + If !Directory(gcTempPath) + Md (gcTempPath) + Endif + + cales = Init_Cale_Server_Date(DIRGEN) + eserver = .T. + numestatie = Init_Nume_Statie(DIRGEN) + utilizator = Init_Nume_Utilizator(DIRGEN) + m.nivel = Round(Val(Init_Nivel_Utilizator(DIRGEN)),0) + m.CONTAB = Upper(Alltrim(Init_NumeAlternativ(DIRGEN))) + + lcQuitData = Alltrim(DIRGEN)+"\dateretea" + lcQuitName = "start_quitapp" + Private goQuitApp && I'm making it private so it will die with the application. + goQuitApp = quitapp(lcQuitData,lcQuitName) + + gnIdIstoric = Start_Istoric(m.utilizator, gcAppName, numestatie, Addbs(DIRGEN)+"DATERETEA\", "START_ISTORIC","start_ids") + + + Endif +Endif + +lcOnShutdown="ShutDown()" +On Shutdown &lcOnShutdown +On Error ErrorHandler(Error(),Program(),Lineno()) +_Shell="DO Cleanup IN progs\ROAPRETURI" + +*-- Instantiate application object.*************************** +Release goApp +Public goApp +goApp=Createobject("wzapplication") + +*-- Configure application object.***************************** +*!* goApp.SetCaption("DEVIZE") +Local laVersion +Dimension laVersion(12) +If Agetfileversion(laVersion, Sys(16,0)) > 0 + NUMEPROGRAM = laVersion(10) +Endif +Release laVersion + +goApp.SetCaption(NUMEPROGRAM) +goApp.cStartupMenu= m.gcAppPath + "meniuri\RoaPreturi" +*!* goApp.cStartupForm=DIRGEN+"\devize\FERESTRE\FUNDAL" + +goApp.cStartupForm = gcAppPath + 'comun\ferestre\frm_login.scx' + +_Screen.WindowState = 2 +*!* _SCREEN.MaxButton = .F. +*!* _SCREEN.BorderStyle = 1 + +*-- 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 Messagebox(lcErrorMsg,17,_Screen.Caption)#1 + On Error + Return .F. + Endif +Endfunc + + + +Function Shutdown + + =End_Istoric(gnIdIstoric, Addbs(DIRGEN)+"DATERETEA\", "START_ISTORIC") + 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] + + lcLog = '1 ' + lcfisier + poLog.Log(lcLog,Program()) + + 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)) + + lcLog = Transform(LNVAL1) + ' ' + Transform(lnval2) + poLog.Log(lcLog,Program()) + + If LNVAL1=1 Or Year(Date())-Month(Date())=lnval2 + lcret=.T. + Endif + Endif + + lcLog = Transform(lcret) + poLog.Log(lcLog,Program()) + + Return lcret + +Endproc + + +Function Start_Nou +*!* llExista_Branch = Exista_Branch(,,dirgen) + +*!* lcLog = TRANSFORM(llExista_Branch) +*!* poLog.log(lcLog,PROGRAM()) + Return Exista_Branch(,,DIRGEN) + Return llExista_Branch + +Endfunc && start_nou + +Procedure Debug_Start + + lcFile = gcAppPath + "debug.txt" + If File(lcFile) + lcLog = 'debug_start' + poLog.Log(lcLog,Program()) + Else + lcLog = '!debug_start' + poLog.Log(lcLog,Program()) + Endif + + 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*************** + +Procedure myinstance + Parameters myApp + =Ddesetoption("SAFETY",.F.) + ichannel = Ddeinitiate(myApp,"ZOOM") + If ichannel =>0 + =Ddeterminate(ichannel) + Quit + Endif + =Ddesetservice(myApp,"define") + =Ddesetservice(myApp,"execute") + =Ddesettopic(myApp,"","ddezoom") + Return +****************************************** +Procedure ddezoom + Parameter ichannel,saction,sitem,sdata,sformat,istatus + Zoom Window Screen Norm + Return +********************************************************** +** EOF +********************************************************** diff --git a/Programe/roapreturi_.prg b/Programe/roapreturi_.prg new file mode 100644 index 0000000..22e56cc --- /dev/null +++ b/Programe/roapreturi_.prg @@ -0,0 +1,569 @@ +Parameters tparam +&&& roapreturi +Local lchost, lcUserName, lcPassword, lnIdUtil, lnIdProgram, lcUserNameApp,lcPasswordApp +Store '' To lchost, lcUserName, lcPassword, lcUserNameApp,lcPasswordApp +Store 0 To lnIdUtil, lnIdProgram +_Screen.Icon = '' + +Private gcNumeProgram +Local lcStem +lcStem = Upper(Juststem(Sys(16,0))) +gcNumeProgram=[ROAPRETURI] +If gcNumeProgram != lcStem + 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 NullDisplay To '' +Set Decimals To 4 + +_Screen.Visible=.F. + + +*VARIABILE_______ +Local lcMainClassLib +Local lcLastSetTalk,lcLastSetPath,lcLastSetClassLib,lcOnShutdown + +*VARIABILE__________________________________________________________________________ +Public CRLF +Store Chr(13) + Chr(10) To CRLF + +Public pcTitlu,pl_verificat +Store "" To pcTitlu +Store .F. To pl_verificat + +Public buton,primadata,dirgen,col_menu +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\opreturi" +*CLASE__________________________________________________________ +Set Classlib To (lcMainClassLib) Additive +Set Classlib To registry Additive +Set Classlib To cauta_alfa_forms Additive + +*PROCEDURI______________________________________________________ +Set Procedure To proceduri_comune Additive +Set Procedure To quitapp Additive +Set Procedure To init_program Additive + +&& CLASE ORACLE +Set Classlib To DECABAZA Additive +Set Classlib To ferestre_oracle Additive +Set Classlib To ofundal_preturi Additive +Set Classlib To onom_preturi ADDITIVE +SET CLASSLIB TO onote_contabile ADDITIVE + +************************************************************************************************ +&& PROCEDURI ORACLE +Set Procedure To GENCURSOR.PRG Additive +Set Procedure To OPROCEDURI_COMUNE.PRG Additive +Set Procedure To OPROCEDURI_aMS.PRG Additive +Set Procedure To osecurity Additive +Set Procedure To acces_meniu2 Additive +Set Procedure To onom_preturi Additive +* Set Procedure To update_preturi Additive +Set Procedure To ocautare Additive +Set Procedure To updateserver Additive +Set Procedure To oheader Additive +SET PROCEDURE TO omeniu_initializari 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 + Messagebox('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,gcAppDataPath, gcTempPath, gcCaleServerDate, gcUserNameApp, gcPasswordApp, gnId_Prg_Owner +Store '' To gcUserNameApp, gcPasswordApp, gnNivelUtilizator, gnGrupUtilizator, gcAcces +Public gcSchemaPath +Store '' To gcSchemaPath +Store 0 To gnId_Prg_Owner + +gcAppPath=Addbs(Justpath(Sys(16,0))) && d:\roa\roapreturi\ +gcAppName=Allt(Uppe(Juststem(Sys(16,0)))) && "roapreturi" + +gcAppDataPath=gcAppPath+"Date_"+gcAppName+"\" +gcUtilizatoriPath = gcAppPath + "UTILIZATORI\" + +Store "" To gcTempPath, gcCaleServerDate +If !Directory(gcAppDataPath) + Md (gcAppDataPath) +Endif + +*** DIRGEN +liat = Rat("\",gcAppPath,2) +dirgen = Addbs(Left(gcAppPath,liat-1)) + +gcSecurityPath = dirgen + 'Security\' +gcSecurityFile = gcSecurityPath + 'ROA_SECURITY.TXT' + +Cd &dirgen + +Private poLog,goLog && obiect pt logarea mesajelor sistemului +poLog = Newobject("Log_Mesaje","Log_Mesaje.prg") +goLog = poLog + +If verificari() + _Screen.Visible=.T. + Messagebox("Se fac verificari programului!"+CRLF+"Va rugam reveniti!",64,"ROA Preturi") + glQuit= .T. + Quit +Endif + +If !Debug_Start() + lcParam=tparam + If Empty(tparam) Or (Type('tParam')='C' And !verific_start(tparam,dirgen,gcAppName)) + _Screen.Visible=.T. + Messagebox("Programul trebuie pornit doar din START!",64,"ROA Preturi") + Quit + Endif +Endif + +***************************** VARIABILE ORACLE +Private gnHandle,gnidutil,GCCODFISCAL,GCADRESA,GCNUMEFIRMA,GNDIFZILE, gcUserNameApp, gcPasswordApp +Private gnButon && variabila pentru renunt si terminat +Store 2 To gnButon +Store '' To GCCODFISCAL,GCADRESA,GCNUMEFIRMA,GCMONEDA, gcUserNameApp, gcPasswordApp, gcAcces +gnHandle = -1 +gnidutil = 0 + +Private gcHost, gcUserName, gcPassword, gofundal, gnIdProgram +gnIdProgram = 0 +gofundal='' + +Private goFirma,gnId_Firma,gnIdFirma,gcFirma,gnAn,gnLuna && ,gnPA,gnPC +Store Null To goFirma +Store 0 To gnId_Firma, gnIdFirma, gnAn, gnLuna +Store '' To gcFirma + +Private glUltimaLuna,glPrimaLuna, glLunaBuna,glLuna_neplatita,glLunaInchisa +Store .F. To glUltimaLuna,glPrimaLuna, glLunaBuna,glLuna_neplatita,glLunaInchisa + +Private gcS && schema firmei +Store 'CONTAFIN' To gcS + +&& obiect global wrap pt sqlexec cu text eroare si succes +Private goExecutor, goConn +goExecutor = Createobject("oExecutor") +goConn = Createobject("oConn") + +&& 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 +Public NUMEPROGRAM,FUNDALPROGRAM, antet +NUMEPROGRAM='ROA Politici de preturi' +MENIUPROGRAM="MENIU\roapreturi.mpr" + +PRIVATE gcCopyRight +gcCopyRight = '© ROA Romfast SRL' + +*!* FUNDALPROGRAM=gcAppPath+"FERESTRE\FUNDAL.scx" + +*-- Configure application object.***************************** +* _Screen.WindowState=2 +_Screen.AutoCenter=.T. + +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") + +Local laVersion +Dimension laVersion(12) +If Agetfileversion(laVersion, Sys(16,0)) > 0 + NUMEPROGRAM = laVersion(10) +Endif +Release laVersion + +goApp.SetCaption(NUMEPROGRAM) +goApp.cStartupMenu=MENIUPROGRAM +goApp.cStartupForm = gcAppPath + 'ferestre\frm_login.scx' + +* _Screen.WindowState=2 + + +*-- 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 Messagebox(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 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/update_nomenclator.prg b/Programe/update_nomenclator.prg new file mode 100644 index 0000000..00b7625 --- /dev/null +++ b/Programe/update_nomenclator.prg @@ -0,0 +1,4 @@ +********************************************************** +PROCEDURE update_nomenclator + +ENDPROC && update_nomenclator \ No newline at end of file diff --git a/Programe/update_preturi.prg b/Programe/update_preturi.prg new file mode 100644 index 0000000..0ea65de --- /dev/null +++ b/Programe/update_preturi.prg @@ -0,0 +1,224 @@ +***************************************************************************** +Procedure update_elemente_doc +Lparameters tnTipModelDoc,tnIdModelDoc +If Used('v_elemente_doc') + Use In v_elemente_doc +Endif +lcFiltru=[where a.id_tip_model_doc=]+Alltrim(Str(tnTipModelDoc))+[ and ]+; + [(b.id_model_doc=]+ALLTRIM(STR(tnIdModelDoc))+[ or b.id_model_doc is null)] +lcSql=[select a.id_coloana_doc,a.descriere,NVL(b.id_tip_tag_doc,0) as id_tip_tag_doc,]+; + [b.tip_tag,b.pozitie ]+; + [from ]+gcS+[.crm_vcoloane_documente a ]+; + [left join ]+gcS+[.crm_velemente_document b ]+; + [on a.id_coloana_doc = b.id_coloana_doc ] + ; + lcFiltru +lnSucces=goExecutor.oExecute(lcSql,'v_elemente_doc') +If lnSucces < 0 + Messagebox(goExecutor.cEroare,0+16,'Eroare') +Else + If Used('crselementedoc') + Use In crselementedoc + Endif + Create Cursor crselementedoc(id_coloana_doc N(10),descriere C(100),id_tip_tag_doc N(10),; + tip_tag C(100),pozitie C(100)) + Insert Into crselementedoc (id_coloana_doc,descriere,id_tip_tag_doc,tip_tag,pozitie) ; + SELECT id_coloana_doc,descriere,id_tip_tag_doc,NVL(tip_tag,[]) as tip_tag,; + NVL(pozitie,[]) as pozitie From v_elemente_doc + GO top + Use In v_elemente_doc +Endif +goExecutor.oReset() +Return lnSucces +Endproc && update_elemente_doc +***************************************************************************** +Procedure update_coloane_doc +Lparameters tnTipModelDoc +If Used('v_coloane_doc') + Use In v_coloane_doc +Endif +If !Empty(tnTipModelDoc) + lcFiltru=[where id_tip_model_doc=]+Alltrim(Str(tnTipModelDoc)) +Else + lcFiltru=[] +Endif +lcSql=[select id_coloana_doc,descriere from ] + gcS + [.crm_vcoloane_documente ]+; + lcFiltru +lnSucces=goExecutor.oExecute(lcSql,'v_coloane_doc') +If lnSucces < 0 + Messagebox(goExecutor.cEroare,0+16,'Eroare') +Else + If Used('crselementedoc') + Use In crselementedoc + Endif + Create Cursor crselementedoc(id_coloana_doc N(10),descriere C(100),id_tip_tag_doc N(10),; + tip_tag C(100),pozitie C(100)) + Insert Into crselementedoc (id_coloana_doc,descriere,id_tip_tag_doc) ; + SELECT id_coloana_doc,descriere,0 As id_tip_tag_doc From v_coloane_doc + GO top + Use In v_coloane_doc +Endif +goExecutor.oReset() +Return lnSucces +Endproc && update_coloane_doc +***************************************************************************** +Procedure update_tip_tag_document +If Used('v_tip_tag') + Use In v_tip_tag +Endif +lcSql=[select id_tip_tag_doc,tip_tag from ] + gcS + [.crm_vtip_tag_document where inactiv=0] +lnSucces=goExecutor.oExecute(lcSql,'v_tip_tag') +If lnSucces < 0 + Messagebox(goExecutor.cEroare,0+16,'Eroare') +Endif +goExecutor.oReset() +Return lnSucces +Endproc && update_tip_tag_document +***************************************************************************** +Procedure update_articole +If Used('v_articole') + Use In v_articole +Endif +lcSql=[select id_articol, codmat, denumire as nume_articol, um from ] + gcS + [.vnom_articole_crm order by denumire ] +lnSucces=goExecutor.oExecute(lcSql,'v_articole') +If lnSucces < 0 + Messagebox(goExecutor.cEroare,0+16,'Eroare') +Endif +goExecutor.oReset() +Return lnSucces + +Endproc && update_articole +***************************************************************************** +Procedure update_zone +If Used('v_zone') + Use In v_zone +Endif +lcSql=[select id_zona,zona from ] + gcS + [.crm_vzone where inactiv=0] +lnSucces=goExecutor.oExecute(lcSql,'v_zone') +If lnSucces < 0 + Messagebox(goExecutor.cEroare,0+16,'Eroare') +Endif +goExecutor.oReset() +Return lnSucces + +Endproc && update_zone +***************************************************************************** +Procedure update_agenti +If Used('v_agenti') + Use In v_agenti +Endif +lcSql=[select id_responsabil,nume_agent from ] + gcS + [.vnom_agenti ]+; + [order by 2] +lnSucces=goExecutor.oExecute(lcSql,'v_agenti') +If lnSucces < 0 + Messagebox(goExecutor.cEroare,0+16,'Eroare') +Endif +goExecutor.oReset() +Return lnSucces + +Endproc && update_agenti +***************************************************************************** +Procedure update_articole_politica_pret +Lparameters tnIdPol +If Used('crsarticole') + Use In crsarticole +Endif +lcSql=[select id_art as id_articol,nume_art as nume_articol,um,pret,nume_val,id_valuta from ] + gcS + [.vcrm_politici_pret_art ]+; + [where id_pol=]+Alltrim(Str(tnIdPol))+[ order by 2] +lnSucces=goExecutor.oExecute(lcSql,'crsarticole') +If lnSucces < 0 + Messagebox(goExecutor.cEroare,0+16,'Eroare') +Endif +goExecutor.oReset() +Return lnSucces + +Endproc && update_articole_politica_pret +***************************************************************************** +** Functii cautare +***************************************************************************** +Function cauta_agent +Lparameters tcIdAgent,tcNumeAgent +Local locauta,llReturn +Store "" To locauta +Store .F. To llReturn +pcselect = ["select id_responsabil,nume_agent,functie from ] + gcS + [.vnom_agenti "] +pcfiltru = [1=2] +pcschema = [''] +pcorder = [2] +pccoloane = [nume_agent,functie] +pcTitlu = [Agent] +pcTitluColoane = [Nume,Functie] +locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,"") +If !Empty(locauta.id_responsabil) + tcIdAgent=locauta.id_responsabil + tcNumeAgent=Alltrim(locauta.nume_agent) + llReturn=.T. +Endif +Return llReturn +Endfunc && cauta_agent +***************************************************************************** +Function cauta_valuta +Lparameters tnIdValuta,tcNumeValuta +Local locauta,llReturn +Store "" To locauta +Store .F. To llReturn +pcselect = ["select id_valuta,nume_val from ] + gcS + [.vnom_valute "] +pcfiltru = [1=2] +pcschema = [''] +pcorder = [2] +pccoloane = [Nume_val] +pcTitlu = [Valuta] +pcTitluColoane = [Valuta] +locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,"") + +If !Empty(locauta.id_valuta) + tnIdValuta=locauta.id_valuta + tcNumeValuta=Alltrim(locauta.nume_val) + llReturn=.T. +Endif +Return llReturn +Endfunc && cauta_valuta +***************************************************************************** +Function cauta_zona +Lparameters tnIdZona,tcNumeZona +Local locauta,llReturn +Store "" To locauta +Store .F. To llReturn +pcselect = ["select id_zona,zona from ] + gcS + [.crm_vzone where inactiv=0"] +pcfiltru = [1=2] +pcschema = [''] +pcorder = [2] +pccoloane = [Zona] +pcTitlu = [Zona] +pcTitluColoane = [Zona] +locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,"") +If !Empty(locauta.id_zona) + tnIdZona=locauta.id_zona + tcNumeZona=Alltrim(locauta.zona) + llReturn=.T. +Endif +Return llReturn +Endfunc && cauta_zona +***************************************************************************** +Function cauta_politica_preturi +Lparameters tnIdPol,tcNumePolitica,tnIdValuta,tcNumeValuta +Local locauta,llReturn +Store "" To locauta +Store .F. To llReturn +pcselect = ["select id_pol,nume,datai,datas,id_valuta,nume_val from ] + gcS + [.crm_vpolitici_pret_curente"] +pcfiltru = [1=2] +pcschema = [''] +pcorder = [2] +pccoloane = [nume,datai,datas,nume_val] +pcTitlu = [Politici de preturi actuale] +pcTitluColoane = [Nume,Data inceput,Data sfarsit,Valuta] +locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,"") +If !Empty(locauta.id_pol) + tnIdPol=locauta.id_pol + tcNumePolitica=Alltrim(locauta.nume) + tnIdValuta=locauta.id_valuta + tcNumeValuta=Alltrim(locauta.nume_val) + llReturn=.T. +Endif +Return llReturn +Endfunc && cauta_politica_preturi +***************************************************************************** \ No newline at end of file diff --git a/Rapoarte/rap_liste.fr2 b/Rapoarte/rap_liste.fr2 new file mode 100644 index 0000000..86cd738 --- /dev/null +++ b/Rapoarte/rap_liste.fr2 @@ -0,0 +1,650 @@ +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!! +*-------------------------------------------------------------------------------------------------------------------------------------------------------- +*< FOXBIN2PRG: Version="1.21" SourceFile="rap_liste.frx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries) +* + + + + +