*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="baza.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS actbaza AS setbaza OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="formset" Timestamp="" Scale="" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="ITEMS" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item20" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item19" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item18" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item17" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item16" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item15" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item14" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item13" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item12" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item11" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item10" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Item4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.CotaTVA" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ITEMS.Label4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Command1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column2.Header2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column3.Header3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column4.Header4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column5.Header5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column6.Header6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column7.Header7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column8.Header8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column8.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column9.Header9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column9.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column10.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column10.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column11.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column11.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column13.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column13.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column14.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column14.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column15.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column15.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column16.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column16.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column17.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column17.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column18.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column18.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column19.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column19.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column20.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column20.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column25.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column25.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column26.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column26.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column27.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column27.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column28.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column28.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column29.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column29.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column31.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column31.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column32.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column32.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column33.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column33.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column34.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column34.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column35.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column35.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column36.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column36.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column12.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Grid1.Column12.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIF.Precedent1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Form1.Terminat1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Formtermin12.Image1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Formtermin12.Image2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Formtermin12.Image3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Formtermin12.Image4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Formtermin12.Image5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Formtermin12.Image6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Formtermin12.Image7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Formtermin12.Image8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Formtermin12.Image9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Formtermin12.Image10" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Formtermin12.Shape2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Formtermin12.Urmator1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Formtermin12.Renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Formtermin12.Verif1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: aduc_set
		*m: adunadate
		*m: adunadatenir
		*m: setvariabile
		*m: tabele
		*m: verific_analitic
		*m: verif_complet
		*p: acont
		*p: formgest
		*p: id_set
		*p: lverificaacont		&& Specifica daca se mai face verificarea existentei analiticului in actactan.
		*p: nou_intrat
		*p: pcobj
		*p: pctva
		*p: pntva
		*p: prima_blocare_bon
		*p: prima_blocare_nir
		*a: variabile[30,4]
	*</DefinedPropArrayMethod>

	*<PropValue>
		acont = 
		AutoRelease = .T.
		formgest = 
		id_set = 0
		lverificaacont = .T.
		Name = "actbaza"
		nou_intrat = .T.
		pcobj = ''
		pctva = ''
		pntva = 0
		prima_blocare_bon = .T.
		prima_blocare_nir = .T.
		Form1.AlwaysOnBottom = .T.
		Form1.AlwaysOnTop = .F.
		Form1.AutoCenter = .F.
		Form1.BackColor = 255,255,255
		Form1.BorderStyle = 3
		Form1.Caption = ""
		Form1.Closable = .F.
		Form1.ControlBox = .F.
		Form1.DoCreate = .T.
		Form1.Height = 51
		Form1.MaxButton = .F.
		Form1.MinButton = .F.
		Form1.Movable = .F.
		Form1.Name = "Form1"
		Form1.ScrollBars = 2
		Form1.TabIndex = 3
		Form1.Visible = .F.
		Form1.Width = 118
		Formtermin12.AlwaysOnBottom = .F.
		Formtermin12.AlwaysOnTop = .F.
		Formtermin12.AutoCenter = .T.
		Formtermin12.BorderStyle = 1
		Formtermin12.DoCreate = .T.
		Formtermin12.Height = 425
		Formtermin12.Name = "Formtermin12"
		Formtermin12.Shape1.Height = 33
		Formtermin12.Shape1.Left = 0
		Formtermin12.Shape1.Name = "Shape1"
		Formtermin12.Shape1.Top = -1
		Formtermin12.Shape1.Width = 564
		Formtermin12.Shape1.ZOrderSet = 0
		Formtermin12.ShowTips = .T.
		Formtermin12.Terminat1.Command1.Name = "Command1"
		Formtermin12.Terminat1.Height = 27
		Formtermin12.Terminat1.Imbuton1.Height = 26
		Formtermin12.Terminat1.Imbuton1.Name = "Imbuton1"
		Formtermin12.Terminat1.Imbuton1.Width = 26
		Formtermin12.Terminat1.Left = 527
		Formtermin12.Terminat1.Name = "Terminat1"
		Formtermin12.Terminat1.TabIndex = 2
		Formtermin12.Terminat1.TabStop = .T.
		Formtermin12.Terminat1.Top = 2
		Formtermin12.Terminat1.ZOrderSet = 11
		Formtermin12.Titlufrumos1.FontName = "Arial"
		Formtermin12.Titlufrumos1.FontSize = 11
		Formtermin12.Titlufrumos1.Height = 27
		Formtermin12.Titlufrumos1.Left = 7
		Formtermin12.Titlufrumos1.Name = "Titlufrumos1"
		Formtermin12.Titlufrumos1.TabIndex = 5
		Formtermin12.Titlufrumos1.Top = 4
		Formtermin12.Titlufrumos1.Width = 437
		Formtermin12.Titlufrumos1.ZOrderSet = 12
		Formtermin12.Width = 564
		Formtermin12.WindowType = 1
	*</PropValue>

	ADD OBJECT 'Form1.Terminat1' AS terminat WITH ;
		Left = 12, ;
		Name = "Terminat1", ;
		Top = 12, ;
		Imbuton1.Height = 26, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 26, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Formtermin12.Image1' AS image WITH ;
		Height = 27, ;
		Left = 12, ;
		Name = "Image1", ;
		Picture = ..\grafice\verificare2.bmp, ;
		Top = 384, ;
		Visible = .F., ;
		Width = 30, ;
		ZOrderSet = 1
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Formtermin12.Image10' AS image WITH ;
		Height = 27, ;
		Left = 336, ;
		Name = "Image10", ;
		Picture = ..\grafice\excel_jos.bmp, ;
		Top = 384, ;
		Visible = .F., ;
		Width = 30, ;
		ZOrderSet = 10
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Formtermin12.Image2' AS image WITH ;
		Height = 27, ;
		Left = 48, ;
		Name = "Image2", ;
		Picture = ..\grafice\precedent2.bmp, ;
		Top = 384, ;
		Visible = .F., ;
		Width = 30, ;
		ZOrderSet = 2
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Formtermin12.Image3' AS image WITH ;
		Height = 27, ;
		Left = 84, ;
		Name = "Image3", ;
		Picture = ..\grafice\urmator2.bmp, ;
		Top = 384, ;
		Visible = .F., ;
		Width = 30, ;
		ZOrderSet = 3
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Formtermin12.Image4' AS image WITH ;
		Height = 27, ;
		Left = 120, ;
		Name = "Image4", ;
		Picture = ..\grafice\renunt2.bmp, ;
		Top = 384, ;
		Visible = .F., ;
		Width = 30, ;
		ZOrderSet = 4
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Formtermin12.Image5' AS image WITH ;
		Height = 27, ;
		Left = 156, ;
		Name = "Image5", ;
		Picture = ..\grafice\terminat_jos_verde.bmp, ;
		Top = 384, ;
		Visible = .F., ;
		Width = 30, ;
		ZOrderSet = 5
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Formtermin12.Image6' AS image WITH ;
		Height = 27, ;
		Left = 192, ;
		Name = "Image6", ;
		Picture = ..\grafice\nou2.bmp, ;
		Top = 384, ;
		Visible = .F., ;
		Width = 30, ;
		ZOrderSet = 6
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Formtermin12.Image7' AS image WITH ;
		Height = 27, ;
		Left = 228, ;
		Name = "Image7", ;
		Picture = ..\grafice\sterge2.bmp, ;
		Top = 384, ;
		Visible = .F., ;
		Width = 30, ;
		ZOrderSet = 7
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Formtermin12.Image8' AS image WITH ;
		Height = 27, ;
		Left = 264, ;
		Name = "Image8", ;
		Picture = ..\grafice\modifica2.bmp, ;
		Top = 384, ;
		Visible = .F., ;
		Width = 30, ;
		ZOrderSet = 8
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Formtermin12.Image9' AS image WITH ;
		Height = 27, ;
		Left = 300, ;
		Name = "Image9", ;
		Picture = ..\grafice\listare_jos.bmp, ;
		Top = 384, ;
		Visible = .F., ;
		Width = 30, ;
		ZOrderSet = 9
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Formtermin12.Renunt1' AS renunt WITH ;
		Height = 27, ;
		Left = 495, ;
		Name = "Renunt1", ;
		TabIndex = 4, ;
		TabStop = .T., ;
		Top = 2, ;
		ZOrderSet = 15, ;
		Imbuton1.Height = 26, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 26, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Formtermin12.Shape2' AS shape WITH ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		Height = 35, ;
		Left = 456, ;
		Name = "Shape2", ;
		Top = -3, ;
		Width = 108, ;
		ZOrderSet = 13
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Formtermin12.Urmator1' AS urmator WITH ;
		Height = 27, ;
		Left = 530, ;
		Name = "Urmator1", ;
		TabIndex = 3, ;
		Top = 2, ;
		Visible = .F., ;
		ZOrderSet = 14, ;
		IMBUTON1.Height = 27, ;
		IMBUTON1.Name = "IMBUTON1", ;
		IMBUTON1.Width = 30, ;
		COMMAND1.Name = "COMMAND1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Formtermin12.Verif1' AS verif WITH ;
		Height = 27, ;
		Left = 462, ;
		Name = "Verif1", ;
		TabIndex = 1, ;
		Top = 2, ;
		ZOrderSet = 16, ;
		Imbuton1.Height = 26, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 26, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS' AS formbaza WITH ;
		AlwaysOnTop = .T., ;
		AutoCenter = .F., ;
		BackColor = 247,245,238, ;
		BorderStyle = 0, ;
		DoCreate = .T., ;
		Height = 400, ;
		Left = 0, ;
		Movable = .F., ;
		Name = "ITEMS", ;
		ScrollBars = 2, ;
		TabIndex = 1, ;
		Top = 0, ;
		Width = 542, ;
		WindowType = 1
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="form" />

	ADD OBJECT 'ITEMS.CotaTVA' AS combobox WITH ;
		BorderColor = 128,128,128, ;
		BorderStyle = 1, ;
		ColumnCount = 1, ;
		ColumnLines = .F., ;
		ControlSource = "", ;
		FontName = "Arial Narrow", ;
		Height = 20, ;
		InputMask = "", ;
		Left = 487, ;
		Name = "CotaTVA", ;
		RowSource = "cote_tva.procent", ;
		RowSourceType = 6, ;
		SpecialEffect = 1, ;
		Style = 2, ;
		TabIndex = 25, ;
		TabStop = .F., ;
		Top = 124, ;
		Visible = .F., ;
		Width = 47
		*< END OBJECT: BaseClass="combobox" />

	ADD OBJECT 'ITEMS.Item1' AS item WITH ;
		Left = 25, ;
		Name = "Item1", ;
		TabIndex = 1, ;
		Top = 16, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Label_item1.TabIndex = 2, ;
		Text_item1.Format = "k", ;
		Text_item1.Name = "Text_item1", ;
		Text_item1.TabIndex = 1, ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item10' AS item WITH ;
		Left = 25, ;
		Name = "Item10", ;
		TabIndex = 10, ;
		Top = 187, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item11' AS item WITH ;
		Left = 25, ;
		Name = "Item11", ;
		TabIndex = 11, ;
		Top = 206, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item12' AS item WITH ;
		Left = 25, ;
		Name = "Item12", ;
		TabIndex = 12, ;
		Top = 225, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item13' AS item WITH ;
		Left = 25, ;
		Name = "Item13", ;
		TabIndex = 13, ;
		Top = 244, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Label_item1.ZOrderSet = 0, ;
		Text_item1.Name = "Text_item1", ;
		Text_item1.ZOrderSet = 1, ;
		Lineo1.Name = "Lineo1", ;
		Lineo1.ZOrderSet = 2, ;
		Lineo3.Name = "Lineo3", ;
		Lineo3.ZOrderSet = 3, ;
		Lineo4.Name = "Lineo4", ;
		Lineo4.ZOrderSet = 6, ;
		Lineo5.Name = "Lineo5", ;
		Lineo5.ZOrderSet = 4, ;
		Lineo2.Name = "Lineo2", ;
		Lineo2.ZOrderSet = 5
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item14' AS item WITH ;
		Left = 25, ;
		Name = "Item14", ;
		TabIndex = 14, ;
		Top = 263, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item15' AS item WITH ;
		Left = 25, ;
		Name = "Item15", ;
		TabIndex = 15, ;
		Top = 282, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item16' AS item WITH ;
		Left = 25, ;
		Name = "Item16", ;
		TabIndex = 16, ;
		Top = 301, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item17' AS item WITH ;
		Left = 25, ;
		Name = "Item17", ;
		TabIndex = 17, ;
		Top = 320, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item18' AS item WITH ;
		Left = 25, ;
		Name = "Item18", ;
		TabIndex = 18, ;
		Top = 339, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item19' AS item WITH ;
		Left = 25, ;
		Name = "Item19", ;
		TabIndex = 19, ;
		Top = 358, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item2' AS item WITH ;
		Left = 25, ;
		Name = "Item2", ;
		TabIndex = 2, ;
		Top = 35, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item20' AS item WITH ;
		Left = 25, ;
		Name = "Item20", ;
		TabIndex = 20, ;
		Top = 377, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item3' AS item WITH ;
		Left = 25, ;
		Name = "Item3", ;
		TabIndex = 3, ;
		Top = 54, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item4' AS item WITH ;
		Left = 25, ;
		Name = "Item4", ;
		TabIndex = 4, ;
		Top = 73, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item5' AS item WITH ;
		Left = 25, ;
		Name = "Item5", ;
		TabIndex = 5, ;
		Top = 92, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item6' AS item WITH ;
		Left = 25, ;
		Name = "Item6", ;
		TabIndex = 6, ;
		Top = 111, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item7' AS item WITH ;
		Left = 25, ;
		Name = "Item7", ;
		TabIndex = 7, ;
		Top = 130, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item8' AS item WITH ;
		Left = 25, ;
		Name = "Item8", ;
		TabIndex = 8, ;
		Top = 149, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Item9' AS item WITH ;
		Left = 25, ;
		Name = "Item9", ;
		TabIndex = 9, ;
		Top = 168, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'ITEMS.Label1' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "%", ;
		Height = 17, ;
		Left = 526, ;
		Name = "Label1", ;
		TabIndex = 22, ;
		Top = 17, ;
		Visible = .F., ;
		Width = 13
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'ITEMS.Label4' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "TVA %", ;
		FontName = "Comic Sans MS", ;
		Height = 19, ;
		Left = 492, ;
		Name = "Label4", ;
		TabIndex = 23, ;
		Top = 107, ;
		Visible = .F., ;
		Width = 40
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'ITEMS.Text1' AS textbox WITH ;
		BorderColor = 192,192,192, ;
		BorderStyle = 1, ;
		ControlSource = "Thisformset.pctva", ;
		Format = "k", ;
		Height = 20, ;
		Left = 489, ;
		Name = "Text1", ;
		SpecialEffect = 2, ;
		TabIndex = 21, ;
		TabStop = .F., ;
		Top = 17, ;
		Visible = .F., ;
		Width = 34
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'VERIF' AS formtermin WITH ;
		DoCreate = .T., ;
		Height = 330, ;
		Name = "VERIF", ;
		ShowTips = .T., ;
		Visible = .F., ;
		Width = 650, ;
		Shape1.Height = 36, ;
		Shape1.Left = 0, ;
		Shape1.Name = "Shape1", ;
		Shape1.Top = 0, ;
		Shape1.Width = 545, ;
		Shape1.ZOrderSet = 1, ;
		Terminat1.Command1.Name = "Command1", ;
		Terminat1.Command1.TabIndex = 1, ;
		Terminat1.Imbuton1.Height = 26, ;
		Terminat1.Imbuton1.Name = "Imbuton1", ;
		Terminat1.Imbuton1.Width = 26, ;
		Terminat1.Left = 615, ;
		Terminat1.Name = "Terminat1", ;
		Terminat1.TabIndex = 1, ;
		Terminat1.Top = 3, ;
		Terminat1.ZOrderSet = 2, ;
		Titlufrumos1.Caption = "VERIFICAREA SETULUI DE NOTE CONTABILE", ;
		Titlufrumos1.FontBold = .T., ;
		Titlufrumos1.FontName = "Arial", ;
		Titlufrumos1.FontSize = 11, ;
		Titlufrumos1.Height = 30, ;
		Titlufrumos1.Left = 6, ;
		Titlufrumos1.Name = "Titlufrumos1", ;
		Titlufrumos1.TabIndex = 6, ;
		Titlufrumos1.Top = 5, ;
		Titlufrumos1.Width = 364, ;
		Titlufrumos1.ZOrderSet = 3
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="form" />

	ADD OBJECT 'VERIF.Command1' AS commandbutton WITH ;
		Caption = "INAPOI", ;
		Height = 27, ;
		Left = 456, ;
		Name = "Command1", ;
		TabIndex = 4, ;
		Top = 0, ;
		Visible = .F., ;
		Width = 36, ;
		ZOrderSet = 4
		*< END OBJECT: BaseClass="commandbutton" />

	ADD OBJECT 'VERIF.Grid1' AS grid WITH ;
		BackColor = 255,255,255, ;
		ColumnCount = 31, ;
		DeleteMark = .F., ;
		FontName = "Arial Narrow", ;
		GridLineColor = 192,192,192, ;
		GridLines = 3, ;
		Height = 294, ;
		Left = 0, ;
		Name = "Grid1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "ACTACTAN", ;
		RowHeight = 25, ;
		TabIndex = 5, ;
		Top = 36, ;
		Width = 650, ;
		ZOrderSet = 5, ;
		Column1.Alignment = 1, ;
		Column1.BackColor = 255,255,255, ;
		Column1.ControlSource = "NRCRT()", ;
		Column1.FontName = "Arial Narrow", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 27, ;
		Column2.Alignment = 1, ;
		Column2.BackColor = 255,255,255, ;
		Column2.ColumnOrder = 3, ;
		Column2.ControlSource = "DATAIREG", ;
		Column2.FontName = "Arial Narrow", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 54, ;
		Column3.Alignment = 0, ;
		Column3.BackColor = 255,255,255, ;
		Column3.ColumnOrder = 2, ;
		Column3.ControlSource = "FDOC", ;
		Column3.FontName = "Arial Narrow", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 46, ;
		Column4.Alignment = 1, ;
		Column4.BackColor = 255,255,255, ;
		Column4.ColumnOrder = 4, ;
		Column4.ControlSource = "DATAACT", ;
		Column4.FontName = "Arial Narrow", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 58, ;
		Column5.Alignment = 1, ;
		Column5.BackColor = 255,255,255, ;
		Column5.ColumnOrder = 5, ;
		Column5.ControlSource = "NRACT", ;
		Column5.FontName = "Arial Narrow", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 53, ;
		Column6.Alignment = 0, ;
		Column6.BackColor = 255,255,255, ;
		Column6.ColumnOrder = 11, ;
		Column6.ControlSource = "partd", ;
		Column6.FontName = "Arial Narrow", ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .T., ;
		Column6.Width = 77, ;
		Column7.Alignment = 1, ;
		Column7.BackColor = 255,255,255, ;
		Column7.ColumnOrder = 7, ;
		Column7.ControlSource = "SCD", ;
		Column7.DynamicForeColor = "rgb(0,0,128)", ;
		Column7.FontBold = .F., ;
		Column7.FontName = "Arial Narrow", ;
		Column7.ForeColor = 0,0,128, ;
		Column7.Name = "Column7", ;
		Column7.ReadOnly = .T., ;
		Column7.Width = 46, ;
		Column8.Alignment = 1, ;
		Column8.BackColor = 255,255,255, ;
		Column8.ColumnOrder = 9, ;
		Column8.ControlSource = "SCC", ;
		Column8.DynamicForeColor = "rgb(0,0,128)", ;
		Column8.FontBold = .F., ;
		Column8.FontName = "Arial Narrow", ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .T., ;
		Column8.Width = 47, ;
		Column9.Alignment = 1, ;
		Column9.BackColor = 255,255,255, ;
		Column9.ColumnOrder = 6, ;
		Column9.ControlSource = "SUMA", ;
		Column9.DynamicForeColor = "IIF(SUMA>=0, RGB(0,0,0), RGB(255,0,0))", ;
		Column9.FontBold = .F., ;
		Column9.FontName = "Arial Narrow", ;
		Column9.FontSize = 9, ;
		Column9.Format = "r", ;
		Column9.InputMask = (get_mask(12,gnPa)), ;
		Column9.Name = "Column9", ;
		Column9.ReadOnly = .T., ;
		Column9.Width = 93, ;
		Column10.Alignment = 0, ;
		Column10.BackColor = 255,255,255, ;
		Column10.ColumnOrder = 12, ;
		Column10.ControlSource = "partc", ;
		Column10.FontName = "Arial Narrow", ;
		Column10.Name = "Column10", ;
		Column10.ReadOnly = .T., ;
		Column10.Width = 76, ;
		Column11.Alignment = 0, ;
		Column11.BackColor = 255,255,255, ;
		Column11.ColumnOrder = 13, ;
		Column11.ControlSource = "EXPLICATIA", ;
		Column11.FontName = "Arial Narrow", ;
		Column11.Name = "Column11", ;
		Column11.ReadOnly = .T., ;
		Column11.Width = 74, ;
		Column12.BackColor = 255,255,255, ;
		Column12.ColumnOrder = 17, ;
		Column12.ControlSource = "perecheD", ;
		Column12.FontName = "Arial Narrow", ;
		Column12.Name = "Column13", ;
		Column12.ReadOnly = .T., ;
		Column12.Width = 65, ;
		Column13.BackColor = 255,255,255, ;
		Column13.ColumnOrder = 26, ;
		Column13.ControlSource = "nume_3", ;
		Column13.FontName = "Arial Narrow", ;
		Column13.Name = "Column14", ;
		Column13.ReadOnly = .T., ;
		Column14.BackColor = 255,255,255, ;
		Column14.ColumnOrder = 27, ;
		Column14.ControlSource = "nume_5", ;
		Column14.FontName = "Arial Narrow", ;
		Column14.Name = "Column15", ;
		Column14.ReadOnly = .T., ;
		Column15.BackColor = 255,255,255, ;
		Column15.ColumnOrder = 20, ;
		Column15.ControlSource = "suma_val", ;
		Column15.FontName = "Arial Narrow", ;
		Column15.Format = "r", ;
		Column15.InputMask = (get_mask(12,gnPval)), ;
		Column15.Name = "Column16", ;
		Column15.ReadOnly = .T., ;
		Column15.Width = 66, ;
		Column16.BackColor = 255,255,255, ;
		Column16.ColumnOrder = 21, ;
		Column16.ControlSource = "curs", ;
		Column16.FontName = "Arial Narrow", ;
		Column16.Format = "r", ;
		Column16.InputMask = (get_mask(12,gnPcurs)), ;
		Column16.Name = "Column17", ;
		Column16.ReadOnly = .T., ;
		Column16.Width = 65, ;
		Column17.BackColor = 255,255,255, ;
		Column17.ColumnOrder = 29, ;
		Column17.ControlSource = "id_factd", ;
		Column17.FontName = "Arial Narrow", ;
		Column17.Name = "Column18", ;
		Column17.ReadOnly = .T., ;
		Column18.BackColor = 255,255,255, ;
		Column18.ColumnOrder = 19, ;
		Column18.ControlSource = "datascad", ;
		Column18.FontName = "Arial Narrow", ;
		Column18.Name = "Column19", ;
		Column18.ReadOnly = .T., ;
		Column18.Visible = .T., ;
		Column18.Width = 61, ;
		Column19.BackColor = 255,255,255, ;
		Column19.ColumnOrder = 22, ;
		Column19.ControlSource = "nume_val", ;
		Column19.FontName = "Arial Narrow", ;
		Column19.Name = "Column20", ;
		Column19.ReadOnly = .T., ;
		Column19.Width = 60, ;
		Column20.BackColor = 255,255,255, ;
		Column20.ColumnOrder = 23, ;
		Column20.ControlSource = "nresp", ;
		Column20.FontName = "Arial Narrow", ;
		Column20.Name = "Column25", ;
		Column20.ReadOnly = .T., ;
		Column21.BackColor = 255,255,255, ;
		Column21.ColumnOrder = 24, ;
		Column21.ControlSource = "dst_chlt", ;
		Column21.FontName = "Arial Narrow", ;
		Column21.Name = "Column26", ;
		Column21.ReadOnly = .T., ;
		Column22.BackColor = 255,255,255, ;
		Column22.ColumnOrder = 14, ;
		Column22.ControlSource = "nrord", ;
		Column22.FontName = "Arial Narrow", ;
		Column22.Name = "Column27", ;
		Column22.ReadOnly = .T., ;
		Column22.Width = 87, ;
		Column23.BackColor = 255,255,255, ;
		Column23.ColumnOrder = 16, ;
		Column23.ControlSource = "nnir", ;
		Column23.FontName = "Arial Narrow", ;
		Column23.Name = "Column28", ;
		Column23.ReadOnly = .T., ;
		Column23.Width = 55, ;
		Column24.BackColor = 255,255,255, ;
		Column24.ColumnOrder = 25, ;
		Column24.ControlSource = "sectie", ;
		Column24.FontName = "Arial Narrow", ;
		Column24.Name = "Column29", ;
		Column24.ReadOnly = .T., ;
		Column25.BackColor = 242,255,255, ;
		Column25.ColumnOrder = 8, ;
		Column25.ControlSource = "ascd", ;
		Column25.DynamicBackColor = "rgb(242,255,255)", ;
		Column25.FontName = "Arial Narrow", ;
		Column25.Format = "r", ;
		Column25.InputMask = "xxxx", ;
		Column25.Name = "Column31", ;
		Column25.ReadOnly = .F., ;
		Column25.Width = 39, ;
		Column26.BackColor = 242,255,255, ;
		Column26.ColumnOrder = 10, ;
		Column26.ControlSource = "ascc", ;
		Column26.DynamicBackColor = "rgb(242,255,255)", ;
		Column26.FontName = "Arial Narrow", ;
		Column26.Format = "r", ;
		Column26.InputMask = "xxxx", ;
		Column26.Name = "Column32", ;
		Column26.ReadOnly = .F., ;
		Column26.Width = 40, ;
		Column27.BackColor = 255,255,255, ;
		Column27.ColumnOrder = 31, ;
		Column27.ControlSource = "proc_tva", ;
		Column27.FontName = "Arial Narrow", ;
		Column27.Name = "Column33", ;
		Column27.ReadOnly = .T., ;
		Column27.Width = 48, ;
		Column28.BackColor = 255,255,255, ;
		Column28.ColumnOrder = 18, ;
		Column28.ControlSource = "perecheC", ;
		Column28.FontName = "Arial Narrow", ;
		Column28.Name = "Column34", ;
		Column28.ReadOnly = .T., ;
		Column28.Width = 68, ;
		Column29.BackColor = 255,255,255, ;
		Column29.ColumnOrder = 30, ;
		Column29.ControlSource = "id_factc", ;
		Column29.FontName = "Arial Narrow", ;
		Column29.Name = "Column35", ;
		Column29.ReadOnly = .T., ;
		Column30.BackColor = 255,255,255, ;
		Column30.ColumnOrder = 28, ;
		Column30.ControlSource = "sucursala", ;
		Column30.FontName = "Arial Narrow", ;
		Column30.Name = "Column36", ;
		Column30.ReadOnly = .T., ;
		Column30.Width = 95, ;
		Column31.BackColor = 255,255,255, ;
		Column31.ColumnOrder = 15, ;
		Column31.ControlSource = "contract", ;
		Column31.FontName = "Arial Narrow", ;
		Column31.Name = "Column12", ;
		Column31.ReadOnly = .T., ;
		Column31.Width = 65
		*< END OBJECT: BaseClass="grid" />

	ADD OBJECT 'VERIF.Grid1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "NrCrt", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column1.Text1' AS textbox WITH ;
		Alignment = 1, ;
		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 'VERIF.Grid1.Column10.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Partener Credit", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column10.Text1' AS textbox WITH ;
		Alignment = 0, ;
		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 'VERIF.Grid1.Column11.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatia", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column11.Text1' AS textbox WITH ;
		Alignment = 0, ;
		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 'VERIF.Grid1.Column12.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Contract", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column12.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'VERIF.Grid1.Column13.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.doc.platit", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column13.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 'VERIF.Grid1.Column14.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatia 4", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column14.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 'VERIF.Grid1.Column15.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatia 6", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column15.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 'VERIF.Grid1.Column16.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Suma Valuta", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column16.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 'VERIF.Grid1.Column17.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Curs valutar", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column17.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 'VERIF.Grid1.Column18.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id factD", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column18.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 'VERIF.Grid1.Column19.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data scadenta", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column19.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'VERIF.Grid1.Column2.Header2' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data Inreg.", ;
		FontName = "Arial Narrow", ;
		Name = "Header2"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column2.Text1' AS textbox WITH ;
		Alignment = 1, ;
		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 'VERIF.Grid1.Column20.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nume Valuta", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column20.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 'VERIF.Grid1.Column25.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Responsabili", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column25.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 'VERIF.Grid1.Column26.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cheltuieli/Venituri", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column26.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 'VERIF.Grid1.Column27.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Lucrare/Comanda", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column27.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 'VERIF.Grid1.Column28.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.NIR/Bon", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column28.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 'VERIF.Grid1.Column29.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sectie", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column29.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 'VERIF.Grid1.Column3.Header3' AS header WITH ;
		Alignment = 2, ;
		Caption = "Fel Doc.", ;
		FontName = "Arial Narrow", ;
		Name = "Header3"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column3.Text1' AS textbox WITH ;
		Alignment = 0, ;
		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 'VERIF.Grid1.Column31.Header1' AS header WITH ;
		Caption = "Analit.", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column31.Text1' AS textbox WITH ;
		BackColor = 242,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'VERIF.Grid1.Column32.Header1' AS header WITH ;
		Caption = "Analit.", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column32.Text1' AS textbox WITH ;
		BackColor = 242,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'VERIF.Grid1.Column33.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cota TVA", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column33.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 'VERIF.Grid1.Column34.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.doc.incasat", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column34.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 'VERIF.Grid1.Column35.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id factC", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column35.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 'VERIF.Grid1.Column36.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sucursala", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column36.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 'VERIF.Grid1.Column4.Header4' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data Act", ;
		FontName = "Arial Narrow", ;
		Name = "Header4"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column4.Text1' AS textbox WITH ;
		Alignment = 1, ;
		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 'VERIF.Grid1.Column5.Header5' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.Doc.", ;
		FontName = "Arial Narrow", ;
		Name = "Header5"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column5.Text1' AS textbox WITH ;
		Alignment = 1, ;
		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 'VERIF.Grid1.Column6.Header6' AS header WITH ;
		Alignment = 2, ;
		Caption = "Partener Debit", ;
		FontName = "Arial Narrow", ;
		Name = "Header6"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column6.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'VERIF.Grid1.Column7.Header7' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont Deb.", ;
		FontName = "Arial Narrow", ;
		Name = "Header7"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column7.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontBold = .F., ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,128, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'VERIF.Grid1.Column8.Header8' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont Cred.", ;
		FontName = "Arial Narrow", ;
		Name = "Header8"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column8.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontBold = .F., ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'VERIF.Grid1.Column9.Header9' AS header WITH ;
		Alignment = 2, ;
		Caption = "Suma", ;
		FontName = "Arial Narrow", ;
		Name = "Header9"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'VERIF.Grid1.Column9.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontBold = .F., ;
		FontName = "Arial Narrow", ;
		FontSize = 9, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'VERIF.Precedent1' AS precedent WITH ;
		Left = 550, ;
		Name = "Precedent1", ;
		TabIndex = 2, ;
		Top = 3, ;
		ZOrderSet = 6, ;
		Imbuton1.Height = 27, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 27, ;
		Command1.Name = "Command1", ;
		Command1.TabIndex = 1
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'VERIF.Renunt1' AS renunt WITH ;
		Left = 582, ;
		Name = "Renunt1", ;
		TabIndex = 3, ;
		Top = 3, ;
		ZOrderSet = 7, ;
		Imbuton1.Height = 26, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 26, ;
		Command1.Name = "Command1", ;
		Command1.TabIndex = 1
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />
	
	PROCEDURE Activate
		*!*	This.items.Activate
		*!*	*THIS.ITEMS.ZOrder(0)
		*!*	This.items.item1.text_item1.SetFocus
		*
		IF this.iteMS.Visible = .t.
			this.itemS.Activate 
			IF this.nou_intrat 
				this.iteMS.item1.SetFocus 
			ENDIF 
		ENDIF 
	ENDPROC

	PROCEDURE aduc_set
		Local i, loItem, lcexplicatie
		Private lcLista
		Store '' To lcLista
		
		m.an = Alltrim(Str(gnAn))
		m.nl = Padl(Alltrim(Str(gnLuna)),2,'0')
		
		*!*	SELECT XSETS
		*!*	LOCATE FOR ID_SET=thisformset.id_set
		*!*	THISFORMSET.FORMGEST=FORMGEST
		
		m.NU_STERG=oxset.NU_STERG
		If !Empty(This.FORMGEST) Or XSETS.MODEL=-1
			This.FORMTERMIN12.TERMINAT1.Visible=.F.
			This.FORMTERMIN12.URMATOR1.Visible=.T.
		Endif
		
		*!*	SELECT a.NR_ITEM, b.*, D.NUME_SET FROM ;
		*!*		XREQUEST a, xitems b, XSETS D ;
		*!*		WHERE a.id_item=b.id_item AND a.ID_SET=D.ID_SET AND a.ID_SET=THISFORMSET.ID_SET ;
		*!*		INTO CURSOR cerere READWRITE ORDER BY b.prioritate, a.NR_ITEM
		
		Select a.NR_ITEM, b.*, D.NUME_SET, 0 As cu_proc_tva ;
			FROM XREQUEST a ;
			INNER Join xitems b On a.id_item = b.id_item ;
			LEFT Join XSETS D On a.ID_SET = D.ID_SET ;
			WHERE a.ID_SET = Thisformset.ID_SET And Evaluate(Iif(Empty(a.conditie),'.t.',Alltrim(a.conditie))) ;
			INTO Cursor cerere Readwrite ;
			ORDER By b.prioritate, a.NR_ITEM
		
		&&
		Select cerere
		
		*** COMPLETEZ CEREREA DE DATE CU LUCRAREA, SECTIA, SUCURSALA
		&& LUCRARE
		
		If gnCampLucrare = 1
			Select cerere
			lcexplicatie = NUME_SET
			Locate For id_item = 15
			If !Found()
				Select xitems
				Locate For id_item = 15
				Scatter Name loItem
				Select cerere
				Append Blank
				Gather Name loItem
				Replace NUME_SET With lcexplicatie
			Endif
		Endif
		
		&& SECTIE
		If gnCampSectie = 1
			Select cerere
			lcexplicatie = NUME_SET
			Locate For id_item = 16
			If !Found()
				Select xitems
				Locate For id_item = 16
				Scatter Name loItem
				Select cerere
				Append Blank
				Gather Name loItem
				Replace NUME_SET With lcexplicatie
			Endif
		Endif
		&& SUCURSALA
		If gnCampSucursala = 1
			Select cerere
			lcexplicatie = NUME_SET
			Locate For id_item = 68
			If !Found()
				Select xitems
				Locate For id_item = 68
				Scatter Name loItem
				Select cerere
				Append Blank
				Gather Name loItem
				Replace NUME_SET With lcexplicatie
			Endif
		Endif
		
		Locate
		lcCaption = Alltrim(NUME_SET)
		lleste = .F.
		************************************************************************************************
		
		Select Distinct Left(xscd,5) As contpart, 0 As pozitie, xscc As cont_coresp From xnote Where ID_SET = Thisformset.ID_SET And !Empty(xscd) ;
			UNION ;
			SELECT Distinct Left(xscc,5) As contpart, 1 As pozitie, xscd As cont_coresp From xnote Where ID_SET = Thisformset.ID_SET And !Empty(xscc) ;
			INTO Cursor tcont Readwrite
		
		Select tcont
		Scan
			lcCont = Alltrim(contpart)
			If Val(lcCont) = 0  Or 'X' $ Upper(lcCont)
				If Type('CN') # 'U' And !Empty(CN)
					lcCont = Alltrim(CN)
					Replace contpart With lcCont
				Else
					Loop
				Endif
			Endif
			If Empty(lcLista)
				lcLista = lcCont
			Else
				lcLista = lcLista + ',' + lcCont
			Endif
		Endscan
		
		If !Empty(lcLista)
			lcSql = [select distinct c.cont as cont_part, c.explicatie as explic_cont,c.fel_cont,c.id_tip_part as tip,c.cu_inregistrari, c.cu_proc_tva, e.cont_c as exceptie, e.debit as poz_in_caz_exceptie, e.invers ] + ;
				[from ] + gcs + [.vcoresp_tip_cont c left join ] + gcs + [.exceptii_ireg e on c.cont = e.cont and e.invers = 1 ] + ;
				[where c.cont in (] + lcLista + [) ]
		*[where instr('] + lcLista + [',c.cont)> 0 ]
		Else
			lcSql = [select distinct c.cont as cont_part, c.explicatie as explic_cont,c.fel_cont,c.id_tip_part as tip,c.cu_inregistrari, c.cu_proc_tva, e.cont_c as exceptie, e.debit as poz_in_caz_exceptie, e.invers ] + ;
				[from ] + gcs + [.vcoresp_tip_cont c left join ] + gcs + [.exceptii_ireg e on c.cont = e.cont and e.invers = 1 ] + ;
				[where 1 = 2]
		Endif
		lcCursor = 'verif_part'
		
		lnSucces = goExecutor.oExecute(lcSql,lcCursor)
		If lnSucces < 0
			aMessagebox('Eroare de conectare!',0+48, 'Atentie!')
			This.Release
			Return
		Endif
		
		
		Select v.*, T.*,Space(50) As tipuri_part,Space(50) As conturi_exc,Space(50) As numepart, 000000000000 As idpart ;
			FROM verif_part v Left Join tcont T On v.cont_part = T.contpart Into Cursor xcont Readwrite
		
		
		Select xcont
		Replace All pozitie With 1 For pozitie = 0 And cont_coresp = exceptie And pozitie = poz_in_caz_exceptie And invers = 1
		Select xcont
		Replace All pozitie With 0 For pozitie = 1 And cont_coresp = exceptie And pozitie = poz_in_caz_exceptie And invers = 1
		
		
		Select xcont
		Replace All tipuri_part With Alltrim(Str(tip)), conturi_exc With Nvl(Alltrim(exceptie),'')
		Replace All explic_cont With Alltrim(explic_cont) + [ INCASARI],contpart With Alltrim(contpart)+[0] For Inlist(Left(cont_part,2),'51','53') And pozitie = 0
		Replace All explic_cont With Alltrim(explic_cont) + [ PLATI],contpart With Alltrim(contpart)+[1] For Inlist(Left(cont_part,2),'51','53') And pozitie = 1
		
		Scan For !Deleted()
			Scatter Name oxcont
			i = Recno()
			Locate For Alltrim(contpart) = Alltrim(oxcont.contpart) And (pozitie # oxcont.pozitie Or tip # oxcont.tip Or (pozitie = oxcont.pozitie And (cont_coresp # oxcont.cont_coresp Or exceptie # oxcont.exceptie)))
			If Found()
				lcTip = Alltrim(tipuri_part)
				lcExc = Nvl(Alltrim(conturi_exc),'')
				If pozitie # oxcont.pozitie
					lnFel = fel_cont
				Else
					lnFel = pozitie
				Endif
				Delete
				Goto i
				Replace pozitie With lnFel
				Replace tipuri_part With Alltrim(tipuri_part) + ',' + lcTip
				If !Empty(conturi_exc)
					Replace conturi_exc With Alltrim(conturi_exc) + ',' + lcExc
				Else
					Replace conturi_exc With lcExc
				Endif
			Else
				Goto i
			Endif
		Endscan
		Release oxcont
		
		
		
		Select xcont
		Scan
			lcContExtins = contpart
			lcCont = cont_part
			lcExplic = Lower(Alltrim(explic_cont))
			lnPozitie = pozitie
			lnFelCont = fel_cont
			lnCuIreg = cu_inregistrari
			lnCuProcTva = cu_proc_tva
			Select xitems
			Locate For id_item = 66
			Scatter Name opart
			opart.label_item = Alltrim(opart.label_item) + ' ' + lcExplic + '(' + Alltrim(lcCont) + ')'
			opart.var_item = 'V' + Alltrim(lcContExtins)
			Select cerere
			lcexplicatie = NUME_SET
			Append Blank
			Replace NUME_SET With lcexplicatie
			Gather Name opart
			Release opart
			If lnPozitie # lnFelCont And lnCuIreg = 1 AND Thisformset.ID_SET <> 45	&&	modificare 22.11.2006
				Select xitems
				Locate For id_item = 67
				Scatter Name opart
				opart.label_item = Alltrim(opart.label_item) + ' ' + lcExplic + '(' + Alltrim(lcCont) + ')'
				opart.var_item = 'P' + Alltrim(lcContExtins)
				Select cerere
				lcexplicatie = NUME_SET
				Append Blank
				Replace NUME_SET With lcexplicatie, cu_proc_tva With lnCuProcTva
				Gather Name opart
				Release opart
			Endif
		*!*		IF gnResponsabLaIncasare = 1 AND lcCont = '5311' AND lnPozitie = 0
		*!*
		*!*		ENDIF
			Select xcont
		Endscan
		
		If Used('verif_part')
			Use In verif_part
		Endif
		
		If Used('tcont')
			Use In tcont
		Endif
		
		
		Select cerere
		Replace All NR_ITEM With Recno()
		Select cerere
		Index On Str(prioritate,3) + Str(NR_ITEM,10) Tag ordine Of &gcTempPath\apriori.Cdx
		
		****************************************************
		Local MAXITEMS,OX,OC
		OC = This.FORMTERMIN12
		OX = This.ITEMS
		
		Select cerere
		Calculate Cnt() To MAXITEMS
		MM = Iif(MAXITEMS>14,14,MAXITEMS)
		OX.Height = MM*(OX.ITEM1.Height-1)+2*OX.ITEM1.Top
		OC.TItlufrumos1.Caption = Proper(lcCaption)
		OC.Height = OX.Height+80
		OX.Top = OC.Top+60
		OX.Left = OC.Left + OC.Width/2-OX.Width/2
		lcobj = This.pcobj
		
		lnNrIt = 0
		lnNrRecalc = 0
		i = 0
		Select cerere
		Scan
		*	I=NR_ITEM
			i = i+1
			If Lower(Alltrim(var_item)) = 'tottva'
				lnNrIt = i
			Endif
			If Lower(Alltrim(var_item)) = 'totftva'
				lnNrRecalc = i
			Endif
		
			N=Alltrim(Str(i))
			Z='OX.ITEM'+N+'.VISIBLE=.T.'
			&Z
			Z='OX.ITEM'+N+'.LABEL_ITEM1.CAPTION="'+Upper(Alltrim(label_item))+'"'
			&Z
			lcVar = lcobj + '.' + Alltrim(var_item)
			If Type('&lcVar') = 'U'
				lEValInit = Evaluate(Alltrim(x_init_val))
				x = AddProperty(&lcobj,Alltrim(var_item),lEValInit)
			Endif
			Z='OX.ITEM'+N+'.TEXT_ITEM1.CONTROLSOURCE="'+ lcobj + '.' +Alltrim(var_item)+'"'
			&Z
			Z='OX.ITEM'+N+'.pcobj = "' + lcobj + '"'
			&Z
			Z='OX.ITEM'+N+'.TEXT_ITEM1.format="'+Alltrim(xformat)+'"'
			&Z
		*	Z='OX.ITEM'+N+'.TEXT_ITEM1.inputmask="'+ALLTRIM(xinputmask)+'"'
			If !Empty(Alltrim(xinputmask))
				Z=[OX.ITEM] + N + [.TEXT_ITEM1.inputmask = '] + Evaluate(Alltrim(xinputmask)) + [']
				&Z
			Endif
			Z='OX.ITEM'+N+'.FIS_LISTA="'+Alltrim(FIS_LISTA)+'"'
			&Z
			Z='OX.ITEM'+N+'.CAMP_LISTA="'+Alltrim(CAMP_LISTA)+'"'
			&Z
			Z='OX.ITEM'+N+'.LABEL_ITEM="'+Upper(Alltrim(label_item))+'"'
			&Z
			Z='OX.ITEM'+N+'.TEXT_ITEM1.readonly=xreadonly'
			&Z
			Z='OX.ITEM'+N+'.id_fisier="'+Alltrim(id_fisier)+'"'
			&Z
			Z='OX.ITEM'+N+'.id_item='+Alltrim(Str(id_item))
			&Z
			Z='OX.ITEM'+N+'.nProc_tva='+Alltrim(Str(cu_proc_tva))
			&Z
			&&	modificare 06.03
			&&	casa de marcat
			If !Empty(Thisformset.variabile)
				lcProprObiect=lcobj + [.] +Alltrim(var_item)
				lcProprFisier=Lower(Alltrim(FIS_LISTA))
				lnindex=Ascan(Thisformset.variabile,lcProprObiect,1,Alen(Thisformset.variabile,1),1,15)
				If lnindex>0
					If Thisformset.variabile[lnindex,3]
						Z='OX.ITEM'+N+'.TEXT_ITEM1.tabstop=.F.'
						&Z
						If Inlist(lcProprFisier,'vnom_parteneri')
							lcContul = Strextract(lcProprObiect,'.V')
							Select xcont
							Locate For Val(contpart) = Val(lcContul)
							lcContul = cont_part
							lcTip = Alltrim(tipuri_part)
							lnindexId=Ascan(Thisformset.variabile,'POACT.ID_V'+Substr(lcProprObiect,7),1,Alen(Thisformset.variabile,1),1,15)
							Replace idpart With Val(Thisformset.variabile[lnindexId,2])
							Replace numepart With Thisformset.variabile[lnindex,2]
							&lcProprObiect = Thisformset.variabile[lnindex,2]
						Endif
					Else
						Z='OX.ITEM'+N+'.TEXT_ITEM1.tabstop=.T.'
						&Z
					Endif
					*!*	modificare 31.10.2006
					If Thisformset.variabile[lnIndex,4]
						Z='OX.ITEM'+N+'.TEXT_ITEM1.enabled=.F.'
						&Z
					Else
						Z='OX.ITEM'+N+'.TEXT_ITEM1.enabled=.T.'
						&Z
					Endif
					*!*	modificare 31.10.2006	^
				Endif
			ENDIF
			&&	sfarsit modificare 06.03
			Select cerere
		Endscan
		
		If lnNrIt <> 0
			Z = [ox.cotaTva.top = ox.item] + Alltrim(Str(lnNrIt)) + [.top]
			&Z
			This.ITEMS.cotaTVA.Visible = .T.
			If lnNrRecalc <> 0
				This.ITEMS.cotaTVA.Tag = Alltrim(Str(lnNrRecalc))
			Else
				This.ITEMS.cotaTVA.Tag = Alltrim(Str(lnNrIt))
			Endif
			This.ITEMS.label4.Top = This.ITEMS.cotaTVA.Top - This.ITEMS.label4.Height
			This.ITEMS.label4.Visible = .T.
		
			Select cote_tva
			Go Top
			m.ctva = proc_tva
			lnproc = procent
			This.ITEMS.cotaTVA.Value = Alltrim(Str(lnproc))
			This.pctva = Alltrim(Str(lnproc))
			This.pntva = m.ctva
		Endif
		OX.Paint
		Set Index To
		
	ENDPROC

	PROCEDURE adunadate
		LOCAL NRNOTE,SIRDEVAR
		NRNOTE=0
		STORE '' TO SIRDEVAR
		lcobj = THIS.pcobj
		
		m.proc_tva = this.pntva 
		ADDPROPERTY(&lcobj,'proc_tva',m.proc_Tva)
		
		SELECT ACTACTAN
		ZAP
		SCATTER NAME mact BLANK
		
		mact.proc_Tva=this.pntva 
		
		SELECT * FROM XNOTE;
			WHERE ID_SET=THISFORMSET.ID_SET;
			INTO CURSOR XXNOTE ORDER BY NR_NOTA
		
		
		IF _TALLY=0
			IF XSETS.MODEL#-1  && pentru rate-leasing, plati impozite, achizitii furnizori
				* DO MESAJ WITH 'SETUL DE NOTE NU ESTE COMPLETAT',''
				AMESSAGEBOX('SETUL DE NOTE NU ESTE COMPLETAT')
			ENDIF
		*Thisformset.Release
			RETURN
		ENDIF
		
		&& ADAUG IN ACTACTAN
		SELECT XXNOTE
		GO BOTT
		NRNOTE=NR_NOTA
		lnNrcampuri = FCOUNT('xact')-1
		SELECT XXNOTE
		SCAN
			R=RECNO()
			SIRDEVAR='UTIL,DATAORA'
		
			FOR i =lnNrcampuri TO 1 STEP -1
				IF INLIST(I,1,7,8,10,12,17,18,19,20)
					LOOP
				ENDIF
				SELECT XXNOTE
				Z='VAR_XNOTE=ALLTRIM(X' + ALLTRIM(STR(I)) + ')'
				&Z
				SELECT XACT
				LOCATE
				T='VAR_XACT=ALLTRIM(X' + ALLTRIM(STR(I)) + ')'
				&T
				IF !EMPTY(VAR_XNOTE)
					IF TYPE('MACT.'+ VAR_XNOTE) # 'U' AND !(INLIST(I,25,28) AND VAR_XNOTE = 'nract') AND I <> 21
						Z='MACT.'+ VAR_XNOTE + '=' + THIS.pcobj + '.' +VAR_XNOTE
						&Z
						IF !EMPTY(VAR_XACT)
							Z='MACT.'+ VAR_XACT + '=' + THIS.pcobj + '.' +VAR_XACT
							&Z
						ENDIF
					ELSE
						IF TYPE(THIS.pcobj + '.' +VAR_XNOTE) # 'U'
							Z='MACT.'+ VAR_XACT + '=' + THIS.pcobj + '.' +VAR_XNOTE
							&Z
						ENDIF
					ENDIF
		
				ENDIF
				SELECT XXNOTE
			NEXT
		
			SELECT XXNOTE
			mact.SCD=XSCD
			mact.SCC=XSCC
			mact.ascd=xascd
			mact.ascc=xascc
			mact.ID_SET=ID_SET
			mact.NR_NOTA=NR_NOTA
			mact.proc_Tva=this.pntva 
		
			SELECT ACTACTAN
			APPEND BLANK
			GATH NAME mact
			IF !EMPTY(mact.neimpozab)
				REPLACE proc_Tva WITH 1
				REPLACE SUMA WITH neimpozab
			ENDIF
		
			SCATTER NAME mact BLANK
			SELECT XXNOTE
			GOTO R
		ENDSCAN
		
		SELECT ACTACTAN
		LOCATE FOR INLIST('U',UPPER(SUBSTR(SCD,4,1)),UPPER(SUBSTR(SCC,4,1)))
		IF FOUND()
			ulit=SUBSTR(m.contg,4,1)
			REPLACE ALL SCD WITH LEFT(SCD,3) + ulit FOR INLIST('U',UPPER(SUBSTR(SCD,4,1)))
			REPLACE ALL SCC WITH LEFT(SCC,3) + ulit FOR INLIST('U',UPPER(SUBSTR(SCC,4,1)))
		ENDIF
		
		*----------------------------------------------------------------------------
		IF USED('XCONT')
		*	IF TYPE('XSETS.COMPENS')#'U' and (!EMPTY(XSETS.FRM_PLATA) OR !EMPTY(XSETS.COMPENS))
			
			SELECT xcont 
			LOCATE FOR Pozitie # Fel_Cont AND Cu_Inregistrari = 1
			IF FOUND()
				IF TYPE('XSETS.valuta')#'U' AND xsets.valuta
					llVal = .t.
				ELSE 
					llVal = .f.
				ENDIF 
				
				IF llVal
					lcProcedura = 'calculcompens_valuta'
					ll_cond=.T.
				ELSE
					lcProcedura = 'calculcompens'
					ll_cond=.F.
				ENDIF
		
				SELECT xcont
				CALCULATE CNT() TO lnCount FOR cu_inregistrari = 1 AND pozitie # fel_cont
				IF lnCount = 1
					SELECT xcont
					LOCATE FOR cu_inregistrari = 1 AND pozitie # fel_cont
					lcCont = ALLTRIM(cont_part)
					lcFis = 'actcv' + lcCont
				ELSE
					LOCATE FOR cu_inregistrari = 1 AND pozitie = 0 AND fel_cont = 1
					lcFisD = 'actcv' + ALLTRIM(cont_part)
					LOCATE FOR cu_inregistrari = 1 AND pozitie = 1 AND fel_cont = 0
					lcFisC = 'actcv' + ALLTRIM(cont_part)
					IF USED(lcFisD) AND USED(lcFisC)
						DO &lcProcedura WITH lcFisD, lcFisC IN ocompensari.prg
						lcFis = 'CalculCompensare'
					ELSE 
						lcFis = 'EroareCompletare'
					ENDIF 
				ENDIF
		
				SET DELETED ON
				PRIVATE oact,osalv
				SELECT ACTACTAN
				GO BOTTOM
				SCATTER NAME osalv
		
				DELETE
				IF USED(lcFis)
				
					SELECT (lcFis)
					SCAN FOR ales
						SCATTER NAME oact
		
						IF TYPE(lcFis+'.ascd')!="U"
							osalv.ascd=oact.ascd
							IF TYPE('oact.nract') # 'U'
								osalv.perecheD = oact.nract
							ELSE
								osalv.perecheD = oact.nr_doc_d
							ENDIF
							IF TYPE('oact.id_fact') # 'U'
								osalv.id_factD = oact.id_fact
							ELSE
								osalv.id_factD = oact.id_factd
							ENDIF
							
							IF EMPTY(osalv.ascc) AND !EMPTY(THIS.ACONT)
								osalv.ascc=THIS.ACONT
							ENDIF
						ENDIF
		
						IF TYPE(lcFis+'.ascc')!="U"
							osalv.ascc=oact.ascc
							IF TYPE('oact.nract') # 'U'
								osalv.perecheC=oact.nract
							ELSE
								osalv.perecheC = oact.nr_doc_c
							ENDIF
							
							IF TYPE('oact.id_fact') # 'U'
								osalv.id_factC = oact.id_fact
							ELSE
								osalv.id_factC = oact.id_factC
							ENDIF
		
							IF EMPTY(osalv.ascd) AND !EMPTY(THIS.ACONT)
								osalv.ascd=THIS.ACONT
							ENDIF
						ENDIF
		
						IF TYPE(lcFis+'.proc_tva')!="U"
							osalv.proc_Tva=oact.proc_Tva
						ENDIF
						SELECT ACTACTAN
						APPEND BLANK
						GATHER NAME osalv
						IF TYPE('oact.sumaachi') # 'U'
							REPLACE SUMA WITH oact.sumaachi
						ENDIF
						
						IF TYPE(lcFis+'.id_lucrare')!="U" AND !ISNULL(oact.id_lucrare)
							SELECT ACTACTAN
							REPLACE id_lucrare WITH oact.id_lucrare
							REPLACE nrord WITH oact.nrord
						ELSE
							SELECT ACTACTAN
							REPLACE id_lucrare WITH osalv.id_lucrare
							REPLACE nrord WITH osalv.nrord
						ENDIF
						
						IF TYPE(lcFis+'.id_ctr')!="U" AND !ISNULL(oact.id_ctr)
							SELECT ACTACTAN
							REPLACE id_ctr WITH oact.id_ctr
							REPLACE contract WITH oact.contract
						ELSE
							SELECT ACTACTAN
							REPLACE id_ctr WITH osalv.id_ctr
							REPLACE contract WITH osalv.contract
						ENDIF
						
						IF gnRESP_LA_INCASARE = 0 AND TYPE(lcFis+'.id_responsabil')!="U" AND !ISNULL(oact.id_responsabil)
							SELECT ACTACTAN
							REPLACE id_responsabil WITH oact.id_responsabil
							REPLACE nresp WITH oact.nresp
						ELSE
							SELECT ACTACTAN
							REPLACE id_responsabil WITH osalv.id_responsabil
							REPLACE nresp WITH osalv.nresp
						ENDIF
						
						IF ll_cond
							SELECT actactan 
							REPLACE SUMA WITH oact.achilei
							REPLACE suma_val WITH oact.sumaachi2
							REPLACE CURS WITH oact.CURSval
							DO CASE
							CASE oact.difplus>0
								APPEND BLANK
								GATHER NAME osalv
		*!*							19.01.2015: 765-> 7651						
		*!*							REPLACE SCC WITH '765 ', ascc WITH '', SUMA WITH oact.difplus,explicatia WITH 'DIFERENTE FAVORABILE'
								REPLACE SCC WITH '7651', ascc WITH '', SUMA WITH oact.difplus,explicatia WITH 'DIFERENTE FAVORABILE'
		
		*!*							19.01.2015: 765-> 7651	^						
								REPLACE suma_val WITH 0,CURS WITH oact.cursdif,perecheC WITH 0, id_factC WITH 0
							CASE oact.difminus>0
								APPEND BLANK
								GATHER NAME osalv
		*!*							19.01.2015: 665-> 6651
		*!*							REPLACE SCD WITH '665 ', ascd WITH '', SUMA WITH oact.difminus,explicatia WITH 'DIFERENTE NEFAVORABILE'
								REPLACE SCD WITH '6651', ascd WITH '', SUMA WITH oact.difminus,explicatia WITH 'DIFERENTE NEFAVORABILE'
		*!*							19.01.2015: 665-> 6651 ^
								REPLACE suma_val WITH 0,CURS WITH oact.cursdif ,perecheD WITH 0, id_factD WITH 0
							ENDCASE
						ENDIF
						SELECT (lcFis)
					ENDSCAN
				ENDIF 
				RELEASE oact
				RELEASE osalv
				
			ENDIF
		ENDIF
		
		*!*	modificare 22.11.2006
		IF gcNumeProgram='ROACONT'
			IF TYPE("poact.cursdeb")<>"U" AND TYPE("poact.curscred")<>"U" AND ;
				!EMPTY(poact.CURSDEB) AND !EMPTY(poact.CURSCRED) && pt alte programe tb sa introduc variabile globale(M.CURSDEB,m.CURSCRED)
				SELECT ACTACTAN
				REPLACE ALL SUMA WITH ROUND(poact.SUMA_2*MIN(poact.CURSDEB,poact.CURSCRED),gnPc)
				DO CASE
				CASE poact.CURSDEB>poact.CURSCRED
					SELECT ACTACTAN
					LOCATE FOR INLIST(SCD,'5124','5314') && si lista poate continua (vezi Planul de Conturi)
					SCATTER NAME mact
					REPLACE curs WITH poact.CURSCRED
					APPEND BLANK
					GATHER NAME mact
		*!*							19.01.2015: 765-> 7651						
		*!*				REPLACE SCC WITH '765 ',SUMA WITH ROUND(mact.SUMA_val*(poact.CURSDEB-poact.CURSCRED),gnPc),explicatia WITH 'DIFERENTE FAVORABILE'
					REPLACE SCC WITH '7651',SUMA WITH ROUND(mact.SUMA_val*(poact.CURSDEB-poact.CURSCRED),gnPc),explicatia WITH 'DIFERENTE FAVORABILE'
		*!*							19.01.2015: 765-> 7651	^					
					
					REPLACE suma_val WITH 0,curs WITH poact.CURSDEB
				CASE poact.CURSDEB<poact.CURSCRED
					SELECT ACTACTAN
					LOCATE FOR INLIST(SCC,'5124','542')  && si lista poate continua (vezi Planul de Conturi)
					SCATTER NAME mact
					REPLACE curs WITH poact.CURSDEB
					APPEND BLANK
					GATHER NAME mact
		*!*			19.01.2015: 665-> 6651
		*!*				REPLACE SCD WITH '665 ',SUMA WITH ROUND(mact.SUMA_val*(-poact.CURSDEB+poact.CURSCRED),gnPc),explicatia WITH 'DIFERENTE NEFAVORABILE'
					REPLACE SCD WITH '6651',SUMA WITH ROUND(mact.SUMA_val*(-poact.CURSDEB+poact.CURSCRED),gnPc),explicatia WITH 'DIFERENTE NEFAVORABILE'
		*!*			19.01.2015: 665-> 6651 ^
					
					REPLACE SUMA_val WITH 0,curs WITH poact.CURSCRED
				ENDCASE
			ENDIF
		
			SELECT ACTACTAN
			LOCATE FOR INLIST(SCD,'667')
			IF FOUND()
				SCATTER NAME mact
				IF mact.proc_Tva # 1
					APPEND BLANK
					GATHER NAME mact
					REPLACE SCD WITH SCC,SCC WITH '4427' ,SUMA WITH ROUND(-(m.ctva-1)*mact.SUMA,gnPc)
				ELSE
					REPLACE neimpozab WITH mact.SUMA
				ENDIF
			ENDIF
			LOCATE FOR SCC='767'
			IF FOUND()
				SCATTER NAME mact
				IF mact.proc_Tva # 1
					APPEND BLANK
					GATHER NAME mact
					REPLACE SCC WITH SCD,SCD WITH '4426' ,SUMA WITH ROUND(-(m.ctva-1)*mact.SUMA,gnPc)
				ELSE 
					REPLACE neimpozab WITH mact.SUMA
				ENDIF
			ENDIF
		ENDIF
		*!*	modificare 22.11.2006	^
		
		****** am ramas aici !!!
		*!*	IF _program='cont'
		*!*		IF !EMPTY(M.CURSDEB) AND !EMPTY(m.CURSCRED) && pt alte programe tb sa introduc variabile globale(M.CURSDEB,m.CURSCRED)
		*!*			SELECT ACTACTAN
		*!*			REPLACE ALL SUMA WITH M.SUMA_2*MIN(M.CURSDEB,m.CURSCRED)
		*!*			DO CASE
		*!*			CASE m.CURSDEB>m.CURSCRED
		*!*				SELECT ACTACTAN
		*!*				LOCATE FOR INLIST(SCD,'5124','5314') && si lista poate continua (vezi Planul de Conturi)
		*!*				SCATTER NAME mact
		*!*				REPLACE suma_3 WITH m.CURSCRED
		*!*				APPEND BLANK
		*!*				GATHER NAME mact
		*!*				REPLACE SCC WITH '765 ',SUMA WITH mact.SUMA_2*(m.CURSDEB-m.CURSCRED),explicatia WITH 'DIFERENTE FAVORABILE'
		*!*				REPLACE SUMA_2 WITH 0,suma_3 WITH m.CURSDEB
		*!*			CASE m.CURSDEB<m.CURSCRED
		*!*				SELECT ACTACTAN
		*!*				LOCATE FOR INLIST(SCC,'5124','542')  && si lista poate continua (vezi Planul de Conturi)
		*!*				SCATTER NAME mact
		*!*				REPLACE suma_3 WITH m.CURSDEB
		*!*				APPEND BLANK
		*!*				GATHER NAME mact
		*!*				REPLACE SCD WITH '665 ',SUMA WITH mact.SUMA_2*(-m.CURSDEB+m.CURSCRED),explicatia WITH 'DIFERENTE NEFAVORABILE'
		*!*				REPLACE SUMA_2 WITH 0,suma_3 WITH m.CURSCRED
		*!*			ENDCASE
		*!*		ENDIF
		
		*!*		SELECT ACTACTAN
		*!*		LOCATE FOR INLIST(SCD,'667')
		*!*		IF FOUND()
		*!*			SCATTER NAME mact
		*!*			IF mact.proc_Tva # 1
		*!*				APPEND BLANK
		*!*				GATHER NAME mact
		*!*				REPLACE SCD WITH SCC,SCC WITH '4427' ,SUMA WITH -(m.ctva-1)*mact.SUMA
		*!*			ELSE
		*!*				REPLACE neimpozab WITH mact.SUMA
		*!*			ENDIF
		*!*		ENDIF
		*!*		LOCATE FOR SCC='767'
		*!*		IF FOUND()
		*!*			SCATTER NAME mact
		*!*			IF mact.proc_Tva # 1
		*!*				APPEND BLANK
		*!*				GATHER NAME mact
		*!*				REPLACE SCC WITH SCD,SCD WITH '4426' ,SUMA WITH -(m.ctva-1)*mact.SUMA
		*!*			ELSE 
		*!*				REPLACE neimpozab WITH mact.SUMA
		*!*			ENDIF
		*!*		ENDIF
		*!*	ENDIF
		
		IF this.pntva <> 0
			lcSql = [select distinct (case when debit = 0 then cont else cont_c end) as scd, ] + ;
					[(case when debit = 1 then cont else cont_c end) as scc ] + ;
					[from ] + gcs + [.exceptii_ireg where invers = 1]
			lcCursor = [Tva_exceptii]
			
			lnSucces = goExecutor.oExecute(lcSql,lcCursor)
			IF lnSucces > 0
				SELECT tva_exceptii
				SCAN 
					SCATTER NAME otva
					SELECT actactan
					LOCATE FOR ALLTRIM(scd) = ALLTRIM(otva.scd) AND ALLTRIM(scc) = ALLTRIM(otva.scc)
					IF FOUND()
						LOCATE FOR (scd = '4426' AND scc = otva.scd) OR (scc = '4427' AND scd = otva.scc)
						IF FOUND()
							REPLACE suma WITH -suma
						ENDIF 
					ENDIF 
					SELECT tva_exceptii
				ENDSCAN 
			ENDIF 
			IF USED('tva_exceptii')
				USE IN Tva_exceptii
			ENDIF 
		ENDIF 
		
		
		IF TYPE('XSETS.EXPL_FIXA')#'U'
			SELECT XSETS
			SCATTER FIELDS EXPL_FIXA,aleg_cont NAME opar
		
			SELECT ACTACTAN
			IF !EMPTY(opar.EXPL_FIXA)
				REPLACE ALL explicatia WITH opar.EXPL_FIXA FOR EMPTY(explicatia)
			ENDIF
			IF opar.aleg_cont
				IF TYPE('pcAcn')#'U'
					REPLACE ALL ascd WITH pcAcn FOR UPPER(ALLTRIM(SCD))='X'
					REPLACE ALL ascc WITH pcAcn FOR UPPER(ALLTRIM(SCC))='X'
				ENDIF
				REPLACE ALL SCD WITH CN FOR UPPER(ALLTRIM(SCD))='X'
				REPLACE ALL SCC WITH CN FOR UPPER(ALLTRIM(SCC))='X'
			ENDIF
		
			RELEASE opar
		ENDIF
		
		IF USED('xcont')
		
		
			SELECT xcont
			SCAN
				lcContPart = ALLTRIM(cont_part)
				lcContPartExtins = ALLTRIM(contpart) && cont+[0] sau [1] in functie de pozitie cont(folosit pt diferentiere banca incasari/plati)
				IF ALLTRIM(lcContPartExtins) = ALLTRIM(lcContPart)
					lcExtensieD = []
					lcExtensieC = []
				ELSE 
					lcExtensieD = [0]
					lcExtensieC = [1]
				ENDIF 
					
				lcExceptii = ALLTRIM(conturi_exc)
				lcExceptii = IIF(EMPTY(lcExceptii),'-1',lcExceptii)
				lnIdPart = idpart
				lcNumePart = UPPER(ALLTRIM(numePart))
				lnFelCont = fel_cont
				lnPoz = pozitie
				lnInvers = invers
		*		llCuIreg = IIF(cu_inregistrari = 0, .F., .T.)
				llFactura = IIF(cu_inregistrari = 1 and pozitie = fel_cont, .t., .f.)
				SELECT ACTACTAN
				SCAN FOR INLIST(lcContPartExtins,ALLTRIM(SCD) + lcExtensieD, ALLTRIM(SCC) + lcExtensieC)
					IF SCD = lcContPart
						REPLACE id_partd WITH lnIdPart
						REPLACE partd WITH lcNumePart
						
						IF llFactura AND (lnFelCont = 0 OR (INLIST(VAL(scc),&lcExceptii) AND lnInvers = 1))
							REPLACE id_fact WITH -1
						ENDIF
						*!* 05.10.2006
						*!* MARIUS.MUTU
						*!* SA NU PUNA ID_FACTD = -1 DECAT DACA NU E CONT EXCEPTIE
						IF llFactura AND lnFelCont = 1 AND EMPTY(id_factd) AND !(INLIST(VAL(scc),&lcExceptii) AND lnInvers = 1)
							REPLACE id_factd WITH -1
						ENDIF 
					ENDIF
					IF SCC = lcContPart
						REPLACE id_partc WITH lnIdPart
						REPLACE partc WITH lcNumePart
						
						IF llFactura AND (lnFelCont = 1 OR (INLIST(VAL(scd),&lcExceptii) AND lnInvers = 1))
							REPLACE id_fact WITH -1
						ENDIF
						*!* 05.10.2006
						*!* MARIUS.MUTU
						*!* SA NU PUNA ID_FACTC = -1 DECAT DACA NU E CONT EXCEPTIE
						IF llFactura AND lnFelCont = 0 AND EMPTY(id_factc) AND !(INLIST(VAL(scd),&lcExceptii) AND lnInvers = 1)
							REPLACE id_factc WITH -1
						ENDIF 
					ENDIF
				ENDSCAN
				SELECT xcont
			ENDSCAN
		ENDIF
		
		&& FURNIZORI - REFACTURARE NU TREBUIE SA AIBA TVA - NU AM VRUT SA SCHIMB M.CTVA INAINTE DE LANS(10539)
		IF THIS.ID_SET = 10539
			SELECT ACTACTAN
			REPLACE ALL neimpozab WITH SUMA,proc_Tva WITH 1
		ENDIF
		
		SELECT ACTACTAN
		REPLACE ALL AN WITH gnAn,luna WITH gnLuna, ID_UTIL WITH gnidutil
		
		DO nrord WITH ('actactan')
		RELEASE mact
		
		SELECT ACTACTAN
		GO TOP
		
		
		
		
		
		
		
		
		
		
	ENDPROC

	PROCEDURE adunadatenir
		Local NRNOTE,SIRDEVAR
		NRNOTE=0
		Store '' To SIRDEVAR
		Set Safety Off
		
		Select ACTACTAN
		Zap
		
		
		Select * From XNOTE;
			WHERE ID_SET=Thisformset.ID_SET;
			INTO Cursor XXNOTE Order By NR_NOTA
		
		
		If _Tally=0
			* Do MESAJ With 'SETUL DE NOTE NU ESTE COMPLETAT',''
			AMESSAGEBOX("Setul de note nu este completat!",48,"Atentie")
			Thisformset.Release
		Endif
		
		
		&&ADAUG IN ACTACTAN
		
		Select XXNOTE
		Go Bott
		NRNOTE=NR_NOTA
		
		Select XXNOTE
		SCAN
		nn=nr_nota*10
			R=Recno()
			SIRDEVAR='UTIL,DATAORA'
			For I=1 To 27
				If Inlist(I,17,18)
					Loop
				Endif
				N=Alltrim(Str(I))
				ZZ='(Y'+N+'=.T.)'
		*If &ZZ
				Select XXNOTE
				U='X'+N
				Z='VARDEMEM=ALLTRIM('+U+')'
				&Z
		
				Select XACT
				Go Top
				Z='t=ALLTRIM(xact.'+U+')'
				&Z
				If !Empty(vardemem)
					Z='M.'+T+'=M.'+vardemem
					&Z
					SIRDEVAR=SIRDEVAR+','+T
				Endif
		
				Select XXNOTE
		*Endif
			Next
			Select XXNOTE
			m.SCD=XSCD
			m.SCC=XSCC
			m.ascd=xascd
			m.ascc=xascc
			Select ACTACTAN
			Append Blank
			Z='GATH FIEL '+SIRDEVAR+' MEMV'
			&Z
			Gather Fields SCD,SCC,ascd,ascc Memv
			REPLACE nr_nota WITH nn
			Select XXNOTE
			Goto R
		Endscan
		
		Select ACTACTAN
		Do nrord With ('actactan')
		
	ENDPROC

	PROCEDURE Init
		SET ESCAPE ON
		IF _program='cont' AND XSETS.MODEL#-1
		LOCAL lnProcTva
			this.formTERMIN12.verif1.Visible=.t.
		*!*		lnProcTva=m.ctva*100-100
		*!*		thisformset.pctva=ALLTRIM(STR(lnProcTva))
		ELSE 
			this.formTERMIN12.verif1.Visible=.f.
		endif
	ENDPROC

	PROCEDURE Load
		pl_verificat=.f.
		THIS.TABELE
	ENDPROC

	PROCEDURE Release
		SET ESCAPE OFF
		
		IF buton = 2 AND thisformset.iteMS.numar_plaja1.id_numar # 0
			thisformset.iteMS.numar_plaja1.dezalocare_numar()
		ENDIF 
		
		IF buton = 1 AND OXSET.MODEL = 1 && CONTABILIZARE
			DELETE FROM ACTACTAN WHERE SUMA = 0
			DO oscrie_in_fisiere.prg
		ENDIF 		
		
		IF USED('actactan') AND XSETS.MODEL#-1
			USE IN actactan
		ENDIF
		
		IF USED('xcont') AND XSETS.MODEL#-1
			SELECT xcont
			CALCULATE CNT() TO lnCount FOR cu_inregistrari = 1 AND pozitie # fel_cont
			DO CASE 
				CASE  lnCount = 1
					LOCATE FOR cu_inregistrari = 1 AND pozitie # fel_cont
					lcCont = ALLTRIM(contpart)
					lcFis = 'actcv' + lcCont
					IF USED(lcFis)
						USE IN (lcFis)
					ENDIF 
				CASE lnCount >1
					LOCATE FOR cu_inregistrari = 1 AND pozitie = 0 AND fel_cont = 1
					lcFisD = 'actcv' + ALLTRIM(contpart)
					LOCATE FOR cu_inregistrari = 1 AND pozitie = 1 AND fel_cont = 0
					lcFisC = 'actcv' + ALLTRIM(contpart)
					lcFis = 'CalculCompensare'
					IF USED(lcFis)
						USE IN (lcFis)
					ENDIF 
					IF USED(lcFisD)
						USE IN (lcFisD)
					ENDIF 
					IF USED(lcFisC)
						USE IN (lcFisC)
					ENDIF 
				OTHERWISE 
					*
			ENDCASE 
			
		
			USE IN xcont
		ENDIF 
		
		IF USED('tpart')
			USE IN tpart
		ENDIF 
		IF USED('cerere')
			USE IN cerere
		ENDIF 
		
	ENDPROC

	PROCEDURE setvariabile
		lnnrvar=Alen(This.variabile,1)
		
		For i=1 To lnnrvar
			If Empty(This.variabile[i,1])
				Exit
			Endif
		
			lcVarName=Alltrim(This.variabile[i,1])
			If Type(lcVarName) = "U"
				lcObiect = Substr(lcVarName,1,At(".",lcVarName,1)-1)
				lcCamp = Substr(lcVarName,At(".",lcVarName,1)+1)
				AddProperty(&lcObiect,lcCamp)
			Endif
			lcvartype=Type(lcVarName)
			VarValue=This.variabile[i,2]
			Do Case
			Case lcvartype = "C"
				luvarvalue = Alltrim(VarValue)
				&lcVarName. = luvarvalue
			Case lcvartype = "Y"
				luvarvalue = Ntom(Val(VarValue))
				&lcVarName. = luvarvalue
			Case lcvartype = "N"
				luvarvalue = Val(VarValue)
				&lcVarName. = luvarvalue
			Case lcvartype = "T"
				luvarvalue = Ctot(VarValue)
				&lcVarName. = luvarvalue
			Case lcvartype = "D"
				luvarvalue = Ctod(VarValue)
				&lcVarName. = luvarvalue
			Case lcvartype = "L"
				luvarvalue = Iif(Inlist(Upper(Left(VarValue, 1)), "T", "Y"), .T., .F.)
				&lcVarName. = luvarvalue
			Endcase
		
		Endfor
	ENDPROC

	PROCEDURE Show
		Lparameters nStyle
		This.aduc_set
		This.SetVariabile
		
		*!*	With Thisformset.formtermin12
		*!*		If .verif1.Visible=.F.
		*!*			.seip1.Left=.seip1.Left+.verif1.Width
		*!*		Endif
		*!*	ENDWITH
		
		*This.items.Activate
		*!*	THIS.ITEMS.ZOrder(0)
		*!*	This.items.item1.text_item1.SetFocus
		Thisformset.Refresh
	ENDPROC

	PROCEDURE tabele
		*!*	SET SAFETY OFF
		*!*	IF USED('ACTACTAN')
		*!*		USE IN ACTACTAN
		*!*	ENDIF
		
		*!*	DO case
		*!*	case _program='cont'
		*!*		IF USED('ACTc')
		*!*			USE IN ACTc
		*!*		ENDIF
		*!*		USE &gcTempPath\ACTc AGAIN IN 0 ALIAS ACTACTAN EXCLUSIVE ORDER TAG nr_nota
		*!*	case _program='prod'
		*!*		IF USED('ACTp')
		*!*			USE IN ACTp
		*!*		ENDIF
		*!*		USE &gcTempPath\ACTp AGAIN IN 0 ALIAS ACTACTAN EXCLUSIVE ORDER TAG nr_nota
		*!*	otherwise
		*!*		IF USED('ACTg')
		*!*			USE IN ACTg
		*!*		ENDIF
		*!*		USE &gcTempPath\ACTg AGAIN IN 0 ALIAS ACTACTAN EXCLUSIVE ORDER TAG nr_nota
		*!*	ENDcase
		
		*!*	SELECT ACTACTAN
		*!*	ZAP
		
	ENDPROC

	PROCEDURE verific_analitic
		PARAMETERS tlClick, tccont, tcacont, tcColoana
		
		m.den=''
		ll_l=.f.
		
		IF EMPTY(tccont)
			RETURN ll_l
		ENDIF 
		
		IF USED('TCEVA')
			USE IN Tceva
		ENDIF
		
		lcSql=[select acont || ' - ' || explicatie as den, CONT, ACONT FROM ] + gcS + [.vplcont_ANALITIC where to_number(cont) = ] + tcCont + [ and inactiv = 0 and an = ] + pcAn + [ order by acont ]
		lcCursor = 'tceva'
		lnSucces = goExecutor.oExecute(lcSql,lcCursor)
		
		SELECT tceva
		LOCATE 
		IF EOF()
			IF !EMPTY(tcAcont)
				* DO mesaj WITH 'Nu au fost definite simboluri analitice','pentru contul ' + tcCont
				AMESSAGEBOX('Nu au fost definite simboluri analitice','pentru contul ' + tcCont)
				ll_l=.t.
			ENDIF 
			
			IF USED('TCEVA')
				USE IN Tceva 
			ENDIF 
			SELECT actactan 
			THISFORMset.veRIF.grid1.SetFocus 
			RETURN ll_l
		ELSE 
			IF !tlClick
				IF empty(tcAcont)
		*!*				SELECT actactan
		*!*				IF FLOCK()
		*!*					REPLACE &tcColoana WITH '0000'
		*!*				ENDIF 
					
					IF USED('TCEVA')
						USE IN Tceva 
					ENDIF 
					SELECT actactan 
					THISFORMset.veRIF.grid1.SetFocus 
					RETURN ll_l
				ENDIF 
			ENDIF 
		ENDIF
		
		SELECT tceva
		IF tlClick
			DO caut_alfa_cursor WITH 'tceva','den','Alegeti simbolul analitic','m.den'
			SELECT tceva
			LOCATE FOR ALLTRIM(den) = ALLTRIM(m.den)
			lcAcont = acont
		
			SELECT actactan
			REPLACE &tcColoana WITH lcAcont
		ELSE 
			LOCATE FOR ALLTRIM(cont)=ALLTRIM(tccont) AND ALLTRIM(acont)=ALLTRIM(tcacont)
			IF !FOUND()
				DO caut_alfa_cursor WITH 'tceva','den','Alegeti simbolul analitic','m.den'
				SELECT tceva
				LOCATE FOR ALLTRIM(den) = ALLTRIM(m.den)
				lcAcont = acont
		
				SELECT actactan
				REPLACE &tcColoana WITH lcAcont
			ENDIF 
		ENDIF 
		
		IF USED('TCEVA')
			USE IN Tceva 
		ENDIF  
		
		SELECT actactan 
		THISFORMset.veRIF.grid1.SetFocus 
		RETURN ll_l
	ENDPROC

	PROCEDURE verif_complet
		LOCAL COMPL,TE
		TE=''
		COMPL=.T.
		
		SELECT cerere
		SCAN
			lcVar = THIS.pcobj + '.' + ALLTRIM(var_item)
			IF TYPE(lcVar) # 'U'
				z='empty(' + THIS.pcobj + '.' +ALLTRIM(var_item)+')'
			ELSE
				z = '.t.'
			ENDIF
			IF &z AND !INLIST(ALLTRIM(UPPER(var_item)),'NEIMPOZAB','SUMA_2TVA')
				COMPL=.F.
				TE=TE+','+ALLTRIM(LABEL_ITEM)
			ENDIF
		ENDSCAN
		
		IF !COMPL
			TE=IIF(AT(',',TE,1)=1,SUBSTR(TE,2),TE)
			* DO mesaj WITH 'Nu ati completat campurile:',LEFT(TE,60)+'...'
			AMESSAGEBOX('Nu ati completat campurile:'+ LEFT(TE,60) + '...')
		ENDIF
		
		
		IF 'data'$TE OR 'numarul doc'$TE OR 'numele gest'$TE &&	modificare 05.02.07
			RETURN .F.
		ELSE
			RETURN .T.
		ENDIF
		
	ENDPROC

	PROCEDURE Formtermin12.Click
		pl_verificat=.T.
	ENDPROC

	PROCEDURE Formtermin12.Moved
		thisformset.iteMS.Move
	ENDPROC

	PROCEDURE Formtermin12.Renunt1.Command1.Click
		BUTON=2
		
		*!*	IF thisformset.prima_blocare_nir=.f.
		*!*		elib_nir(m.nnir)
		*!*	endif
		*!*	IF thisformset.prima_blocare_bon=.f.
		*!*		elib_bon(m.nnir)
		*!*	ENDIF
		
		THISFORMSET.RELEASE
	ENDPROC

	PROCEDURE Formtermin12.Shape1.Click
		pl_verificat=.T.
	ENDPROC

	PROCEDURE Formtermin12.Shape1.MouseDown
		Lparameters nButton, nShift, nXCoord, nYCoord
		If nButton = 1
			thisform.MouseIcon='HMOVE.CUR'
			thisform.MousePointer= 99
			ReleaseCapture()
			SendMessage(Thisform.nHWND, 0x112, 0xF012, 0x0)
			thisform.MousePointer= 0
			SendMessage(Thisform.nHWND, 0x202, 0x0, 0x0)	
		Endif
	ENDPROC

	PROCEDURE Formtermin12.Terminat1.Command1.Click
		Thisform.VERIF1.command1.Click
		*!*thisformset.verif.terminat1.command1.Click 
		
	ENDPROC

	PROCEDURE Formtermin12.Titlufrumos1.Click
		pl_verificat=.T.
	ENDPROC

	PROCEDURE Formtermin12.Titlufrumos1.MouseDown
		Lparameters nButton, nShift, nXCoord, nYCoord
		If nButton = 1
			thisform.MouseIcon='HMOVE.CUR'
			thisform.MousePointer= 99
			ReleaseCapture()
			SendMessage(Thisform.nHWND, 0x112, 0xF012, 0x0)
			thisform.MousePointer= 0
			SendMessage(Thisform.nHWND, 0x202, 0x0, 0x0)	
		Endif
	ENDPROC

	PROCEDURE Formtermin12.Urmator1.COMMAND1.Click
		If Thisformset.verif_complet()
			IF !EMPTY(Thisformset.FORMGEST)	
				lcObj = thisformset.pcobj 
				Thisformset.hide   
			
				SELECT actactan
				lcFormGest = UPPER(ALLTRIM(Thisformset.FORMGEST))
				IF INLIST(LEFT(lcFormGest,6),"WEBNIR","VALOAR","SCHIMB","INVENT")
					lcObj = lcFormGest && "WEBNIR"/ webnir_retetar
				ENDIF
			
				lnTermin = lans_nir_bon(oxset.id_set, lcObj)  && IN ointroduceri.prg
				buton = lnTermin
				Thisformset.release 
			ELSE 
				Thisform.VERIF1.command1.Click
				Thisformset.release 
			ENDIF 
		Endif
	ENDPROC

	PROCEDURE Formtermin12.Verif1.Click
		If Thisformset.verif_complet()
			pl_verificat=.t.
			Thisformset.ADUNADATE
			Select ACTACTAN
			Thisform.Parent.verif.Visible=.T.
			Thisform.Parent.verif.GRID1.Refresh
			Thisform.Parent.items.alwaysontop=.f.
			Thisform.Parent.items.zorder(1)
			Thisform.Hide
		Endif
		
	ENDPROC

	PROCEDURE ITEMS.CotaTVA.Valid
		thisformset.pctva = this.Value 
		thisformset.pntva = cote_tva.proc_tva
		x='thisformset.items.item'+ALLTRIM(this.Tag)+'.text_item1.valid'
		&x
	ENDPROC

	PROCEDURE ITEMS.Item1.LostFocus
		thisformset.nou_intrat = .f.
	ENDPROC

	PROCEDURE ITEMS.Move
		LPARAMETERS nLeft, nTop, nWidth, nHeight
		
		*!*	THIS.Left = nLEFT + nWIDTH/2 - THIS.WIDTH/2
		*!*	THIS.TOP = nTOP + 60
		
		THIS.Left=THISFORM.Parent.FORMTERMIN12.LEFT+THISFORM.Parent.FORMTERMIN12.WIDTH/2-THIS.WIDTH/2
		THIS.TOP=THISFORM.Parent.FORMTERMIN12.TOP + 60
	ENDPROC

	PROCEDURE ITEMS.Text1.LostFocus
		x='this.parent.item'+ALLTRIM(this.Tag)+'.setfocus'
		&x
		this.TabStop= .F.
		
	ENDPROC

	PROCEDURE VERIF.Command1.Click
		THISFORM.HIDE
		THISFORM.Parent.FORMTermin12.Visible=.T.
		THISFORM.Parent.ITEMS.Visible=.T.
	ENDPROC

	PROCEDURE VERIF.Grid1.Column1.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE VERIF.Grid1.Column1.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE VERIF.Grid1.Column10.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE VERIF.Grid1.Column10.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE VERIF.Grid1.Column11.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE VERIF.Grid1.Column11.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE VERIF.Grid1.Column2.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE VERIF.Grid1.Column2.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE VERIF.Grid1.Column3.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE VERIF.Grid1.Column3.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE VERIF.Grid1.Column31.Text1.Click
		this.LostFocus(.t.)
	ENDPROC

	PROCEDURE VERIF.Grid1.Column31.Text1.LostFocus
		Parameters PlClick
		Select actactan
		lcCont = scd
		lcAcont = ascd
		*ll_l=Thisformset.verific_analitic(PlClick, lcCont, lcAcont,'ascd')
		llReturn = verific_analitic(plClick, lcCont, lcAcont,'ascd','actactan')
		
		If !llReturn
			Replace actactan.ascd With ''
			Return 0
		Endif
		This.Parent.Parent.Refresh
		
	ENDPROC

	PROCEDURE VERIF.Grid1.Column31.Text1.Valid
		*!*	IF !EMPTY(ascd)
		*!*		ll_l=THISFORMset.verif_ASCD()
		*!*		IF ll_l
		*!*			REPLACE ACTACTAN.ASCD WITH ''
		*!*			RETURN 0
		*!*		ENDIF 
		*!*		THIS.Parent.Parent.Refresh 
		*!*	ENDIF 
	ENDPROC

	PROCEDURE VERIF.Grid1.Column32.Text1.Click
		this.LostFocus(.t.)
		
	ENDPROC

	PROCEDURE VERIF.Grid1.Column32.Text1.LostFocus
		PARAMETERS PlClick
		SELECT actactan
		lcCont = scc
		lcAcont = ascc
		*ll_l=THISFORMset.verific_analitic(plClick, lcCont, lcAcont,'ascc')
		llReturn = verific_analitic(plClick, lcCont, lcAcont,'ascc','actactan')
		IF !llReturn
			REPLACE ACTACTAN.ASCC WITH ''
			RETURN 0
		ENDIF 
		THIS.Parent.Parent.Refresh 
	ENDPROC

	PROCEDURE VERIF.Grid1.Column32.Text1.Valid
		*!*	IF !EMPTY(ascc)
		*!*		ll_l=THISFORMset.verif_ASCC()
		*!*		IF ll_l
		*!*			REPLACE ACTACTAN.ASCC WITH ''
		*!*			RETURN 0
		*!*		ENDIF 
		*!*		THIS.Parent.Parent.Refresh 
		*!*	ENDIF 
	ENDPROC

	PROCEDURE VERIF.Grid1.Column4.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE VERIF.Grid1.Column4.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE VERIF.Grid1.Column5.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE VERIF.Grid1.Column5.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE VERIF.Grid1.Column6.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE VERIF.Grid1.Column6.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE VERIF.Grid1.Column7.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE VERIF.Grid1.Column7.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE VERIF.Grid1.Column8.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE VERIF.Grid1.Column8.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE VERIF.Grid1.Column9.Text1.DblClick
		*thisform.butdrept
	ENDPROC

	PROCEDURE VERIF.Grid1.Column9.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE VERIF.Precedent1.Command1.Click
		THISFORM.HIDE
		THISFORM.Parent.FORMTermin12.Visible=.T.
		Thisform.Parent.items.Visible = .t.
		Thisform.Parent.items.alwaysontop=.t.
		Thisform.Parent.items.zorder(0)
		
	ENDPROC

	PROCEDURE VERIF.Terminat1.Command1.Click
		lCompletezPartener = .F.
		llRet = verificare_note_contabile('actactan', Thisformset.lverificaacont,lCompletezPartener)
		
		If !llRet
			Select actactan
			This.Parent.Parent.gRID1.SetFocus
			Return
		Else
			If Type('glListareBonFiscalCont')<>'U' And glListareBonFiscalCont
				creare_bon_fiscal()						&&	IN oproceduri_casademarcat.prg
			Endif
			If Type('glListareChitanta')<>'U' And glListareChitanta
				listeaza_chitanta()						&&	IN oproceduri_incasari.prg
			Endif
			DoDefault()
		Endif
		
		*!*	Local lcInMesaj,lcInMesajP,lcInMesajIreg
		*!*	Store '' To lcInMesaj,lcInMesajP, lcInMesajIreg
		
		*!*	Select Distinct scd As Cont From actactan ;
		*!*		WHERE suma # 0 ;
		*!*		UNION ;
		*!*		select Distinct scc As Cont From actactan ;
		*!*		WHERE suma # 0 ;
		*!*		INTO Cursor tcont
		
		*!*	i = 0
		*!*	lclista  = []
		*!*	Select tcont
		*!*	Scan
		*!*		i = i + 1
		*!*		If i = 1
		*!*			lcLista = Alltrim(Cont)
		*!*		Else
		*!*			lcLista = lcLista + ',' + Alltrim(Cont)
		*!*		Endif
		*!*	Endscan
		
		*!*	IF EMPTY(lclista)
		*!*		DODEFAULT()
		*!*		return
		*!*	ENDIF	
		
		*!*	lcSql = 'select distinct c.cont as contpart, c.fel_cont, c.cu_inregistrari, c.explicatie as explic_cont,e.cont_c as exceptie, e.debit as pozitie, e.invers, 0 as gasit ' + ;
		*!*		'from ' + gcs + '.vcoresp_tip_cont c left join ' + gcs + '.exceptii_ireg e on c.cont = e.cont and e.invers = 1 ' + ;
		*!*		'where to_number(c.cont) in (' + lcLista + ')'
		*!*	lcCursor = 'verif_part'
		
		*!*	lnSucces = goExecutor.oExecute(lcSql,lcCursor)
		*!*	If lnSucces < 0
		*!*		Messagebox('Eroare de conectare',0, 'Atentie!')
		*!*		Return
		*!*	Endif
		
		*!*	If _Tally > 0
		*!*		Select actactan
		*!*		Scan For !Empty(suma)
		*!*			Scatter Name loCont
		*!*			Select verif_part
		*!*			Locate For contpart=loCont.scd
		*!*			If Found()
		*!*				If Empty(loCont.Id_partd) And !(loCont.scd$lcInMesajP)
		*!*					lcInMesajP=lcInMesajP+','+loCont.scd
		*!*					Replace gasit With 1
		*!*				Endif
		
		*!*				If Empty(loCont.pereched) And cu_inregistrari = 1 And fel_cont = 1 And !(loCont.scd$lcInMesajIreg)
		*!*					Locate For contpart=loCont.scd And exceptie = loCont.scc And fel_cont = 1 And pozitie = 0 And invers = 1
		*!*					If !Found()
		*!*						lcInMesajIreg = lcInMesajIreg + ',' + loCont.scd
		*!*					Endif
		*!*				Endif
		*!*			Endif
		
		*!*			Select verif_part
		*!*			Locate For contpart=loCont.scc
		*!*			If Found()
		*!*				If Empty(loCont.Id_partc) And !(loCont.scc$lcInMesajP)
		*!*					lcInMesajP=lcInMesajP+','+loCont.scc
		*!*					Replace gasit With 1
		*!*				Endif
		*!*				If cu_inregistrari = 1 And fel_cont = 0 And Empty(loCont.perechec) And !(loCont.scc$lcInMesajIreg)
		*!*					Locate For contpart=loCont.scc And exceptie = loCont.scd And fel_cont = 0 And pozitie = 1 And invers = 1
		*!*					If !Found()
		*!*						lcInMesajIreg = lcInMesajIreg + ',' + loCont.scc
		*!*					Endif
		*!*				Endif
		*!*			Endif
		*!*			Select actactan
		*!*		Endscan
		*!*	Endif
		*!*	Use In verif_part
		
		*!*	If !Empty(lcInMesajP)
		*!*		lcInMesajP=Iif(At(',',lcInMesajP,1)=1,Substr(lcInMesajP,2),lcInMesajP)
		*!*		Do mesaj With 'Nu ati completat partenerii pentru conturile:', lcInMesajP
		*!*		Return
		*!*	Endif
		
		*!*	If !Empty(lcInMesajIreg)
		*!*		lcInMesajIreg=Iif(At(',',lcInMesajIreg,1)=1,Substr(lcInMesajIreg,2),lcInMesajIreg)
		*!*		Do mesaj With 'Nu ati completat doc. pereche pentru conturile:', lcInMesajIreg
		*!*		Return
		*!*	Endif
		
		*!*	If thisformset.lverificaacont
		*!*		lcSql=[select CONT, ACONT FROM ] + gcs + [.vplcont_ANALITIC where inactiv = 0 and an = ] + pcAn + [ order by cont ]
		*!*		lcCursor = 'plcontana'
		*!*		lnSucces = goExecutor.oExecute(lcSql,lcCursor)
		*!*		If lnSucces < 0
		*!*			Return
		*!*		Endif
		
		*!*		Select actactan
		*!*		Scan For !Empty(suma)
		*!*			Scatter Name loCont
		*!*			If Empty(loCont.ascd)
		*!*				Select plcontana
		*!*				Locate For Cont=loCont.scd
		*!*				If Found()
		*!*					If !(loCont.scd$lcInMesaj)
		*!*						lcInMesaj=lcInMesaj+','+loCont.scd
		*!*					Endif
		*!*				Endif
		*!*			Endif
		*!*			If Empty(loCont.ascc)
		*!*				Select plcontana
		*!*				Locate For Cont=loCont.scc
		*!*				If Found()
		*!*					If !(loCont.scc$lcInMesaj)
		*!*						lcInMesaj=lcInMesaj+','+loCont.scc
		*!*					Endif
		*!*				Endif
		*!*			Endif
		*!*			Select actactan
		*!*		Endscan
		*!*		Release loCont
		*!*		Use In plcontana
		
		*!*		If !Empty(lcInMesaj)
		*!*			lcInMesaj=Iif(At(',',lcInMesaj,1)=1,Substr(lcInMesaj,2),lcInMesaj)
		*!*			Do mesaj With 'Nu ati completat simbolurile analitice pentru conturile:',lcInMesaj
		*!*			Return
		*!*		Endif
		
		*!*	Endif
		*!*	Select actactan
		*!*	DoDefault()
		
		
		
	ENDPROC

ENDDEFINE

DEFINE CLASS actbaza2007 AS _frmbase OF "_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="Lb_shortcuts1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_urmator1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_precedent1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_verifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="verif" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="verif.Gridextra1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="items" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: actualizeaza_explicatie_saft
		*m: actualizeaza_explicatie_tva
		*m: actualizeaza_plata_saft
		*m: aduc_set
		*m: adunadate
		*m: adunadatenir
		*m: cpaymentcode_assign
		*m: creeaza_note_tva_incasare
		*m: do_arata_butoane
		*m: incarca_butoane
		*m: ntaxcode_assign
		*m: salveaza_butoane
		*m: setvariabile
		*m: updateexplicatiesaft
		*m: updatepaymentsaft
		*m: verif_analitic
		*m: verif_complet
		*p: acont
		*p: cdenumire_set
		*p: cnetaxabil
		*p: cnumefisindex
		*p: cpaymentcode		&& Cod mecanism plata SAFT
		*p: ctaxabil
		*p: ctaxcode		&& Denumire TaxCode
		*p: formgest
		*p: id_jnetax
		*p: id_jtax
		*p: id_jtva
		*p: id_set
		*p: lcorectie		&& Daca se face corectie de document gestiune
		*p: lverificaacont
		*p: ncod
		*p: nou_intrat
		*p: ntaxcode		&& cod taxa SAFT
		*p: ntaxcoden		&& TaxCode pentru suma netaxabila
		*p: ntvanetax
		*p: ntvatax
		*p: pcobj
		*p: prima_blocare_bon
		*p: prima_blocare_nir
		*a: butoane[5,0]
		*a: variabile[30,4]
	*</DefinedPropArrayMethod>

	*<PropValue>
		acont = 
		Caption = "Form"
		cdenumire_set = 
		cnetaxabil = 
		cnumefisindex = 
		cpaymentcode = 
		ctaxabil = 
		ctaxcode = 
		DoCreate = .T.
		FontCharSet = 238
		formgest = 
		Height = 550
		id_jnetax = NULL
		id_jtax = NULL
		id_jtva = NULL
		id_set = 0
		lcorectie = .F.
		lverificaacont = .T.
		Name = "actbaza2007"
		ncod = 0
		nou_intrat = .T.
		ntaxcode = NULL
		ntaxcoden = NULL
		ntvanetax = 0
		ntvatax = 0
		pcobj = 
		prima_blocare_bon = .T.
		prima_blocare_nir = .T.
		TabIndex = 3
		Width = 744
		_memberdata = <VFPData>
			<memberdata name="lcorectie" display="lCorectie"/>
			<memberdata name="ntaxcode" display="nTaxCode"/>
			<memberdata name="ctaxcode" display="cTaxCode"/>
			<memberdata name="updateexplicatiesaft" display="UpdateExplicatieSAFT"/>
			<memberdata name="ntaxcode_assign" display="nTaxCode_Assign"/>
			<memberdata name="ntaxcodenetax" display="nTaxCodeNetax"/>
			<memberdata name="cpaymentcode" display="cPaymentCode"/>
			<memberdata name="updatepaymentsaft" display="UpdatePaymentSAFT"/>
			<memberdata name="cpaymentcode_assign" display="cPaymentCode_Assign"/>
		</VFPData>
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 745
		_shape1.ZOrderSet = 0
		_shape2.Anchor = 8
		_shape2.Height = 29
		_shape2.Left = 584
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Visible = .T.
		_shape2.Width = 169
		_shape2.ZOrderSet = 1
		Lb_titlu_alb_b121.FontSize = 11
		Lb_titlu_alb_b121.Left = 4
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 8
		Lb_titlu_alb_b121.Top = 1
		Lb_titlu_alb_b121.ZOrderSet = 2
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 714
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 2
		BUT_TERMIN1.Top = 1
		BUT_TERMIN1.Visible = .F.
		BUT_TERMIN1.ZOrderSet = 3
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT 'But_precedent1' AS but_precedent WITH ;
		Anchor = 8, ;
		Left = 618, ;
		Name = "But_precedent1", ;
		TabIndex = 5, ;
		Top = 1, ;
		Visible = .F., ;
		ZOrderSet = 7
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_renunt1' AS but_renunt WITH ;
		Anchor = 8, ;
		Left = 682, ;
		Name = "But_renunt1", ;
		TabIndex = 6, ;
		Top = 1, ;
		ZOrderSet = 8
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_urmator1' AS but_urmator WITH ;
		Anchor = 8, ;
		Left = 650, ;
		Name = "But_urmator1", ;
		TabIndex = 3, ;
		ToolTipText = "Continuare/Inainte (CTRL+F)", ;
		Top = 1, ;
		Visible = .F., ;
		ZOrderSet = 6
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_verifica1' AS but_verifica WITH ;
		Anchor = 8, ;
		Left = 586, ;
		Name = "But_verifica1", ;
		TabIndex = 4, ;
		ToolTipText = "Verificare (CTRL+L)", ;
		Top = 1, ;
		Visible = .F., ;
		ZOrderSet = 9
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'items' AS ct_items WITH ;
		Height = 550, ;
		Left = 4, ;
		Name = "items", ;
		TabIndex = 1, ;
		Top = 29, ;
		Width = 716, ;
		ZOrderSet = 11, ;
		Gridsort1.Name = "Gridsort1", ;
		_ct_controller_keypress1.Name = "_ct_controller_keypress1", ;
		Item1.Label_item1.Name = "Label_item1", ;
		Item1.Lineo1.Name = "Lineo1", ;
		Item1.Lineo2.Name = "Lineo2", ;
		Item1.Lineo3.Name = "Lineo3", ;
		Item1.Lineo4.Name = "Lineo4", ;
		Item1.Lineo5.Name = "Lineo5", ;
		Item1.Name = "Item1", ;
		Item1.Text_item1.Name = "Text_item1", ;
		Item4.Label_item1.Name = "Label_item1", ;
		Item4.Lineo1.Name = "Lineo1", ;
		Item4.Lineo2.Name = "Lineo2", ;
		Item4.Lineo3.Name = "Lineo3", ;
		Item4.Lineo4.Name = "Lineo4", ;
		Item4.Lineo5.Name = "Lineo5", ;
		Item4.Name = "Item4", ;
		Item4.Text_item1.Name = "Text_item1", ;
		Item5.Label_item1.Name = "Label_item1", ;
		Item5.Lineo1.Name = "Lineo1", ;
		Item5.Lineo2.Name = "Lineo2", ;
		Item5.Lineo3.Name = "Lineo3", ;
		Item5.Lineo4.Name = "Lineo4", ;
		Item5.Lineo5.Name = "Lineo5", ;
		Item5.Name = "Item5", ;
		Item5.Text_item1.Name = "Text_item1", ;
		Item6.Label_item1.Name = "Label_item1", ;
		Item6.Lineo1.Name = "Lineo1", ;
		Item6.Lineo2.Name = "Lineo2", ;
		Item6.Lineo3.Name = "Lineo3", ;
		Item6.Lineo4.Name = "Lineo4", ;
		Item6.Lineo5.Name = "Lineo5", ;
		Item6.Name = "Item6", ;
		Item6.Text_item1.Name = "Text_item1", ;
		Item7.Label_item1.Name = "Label_item1", ;
		Item7.Lineo1.Name = "Lineo1", ;
		Item7.Lineo2.Name = "Lineo2", ;
		Item7.Lineo3.Name = "Lineo3", ;
		Item7.Lineo4.Name = "Lineo4", ;
		Item7.Lineo5.Name = "Lineo5", ;
		Item7.Name = "Item7", ;
		Item7.Text_item1.Name = "Text_item1", ;
		Item8.Label_item1.Name = "Label_item1", ;
		Item8.Lineo1.Name = "Lineo1", ;
		Item8.Lineo2.Name = "Lineo2", ;
		Item8.Lineo3.Name = "Lineo3", ;
		Item8.Lineo4.Name = "Lineo4", ;
		Item8.Lineo5.Name = "Lineo5", ;
		Item8.Name = "Item8", ;
		Item8.Text_item1.Name = "Text_item1", ;
		Item9.Label_item1.Name = "Label_item1", ;
		Item9.Lineo1.Name = "Lineo1", ;
		Item9.Lineo2.Name = "Lineo2", ;
		Item9.Lineo3.Name = "Lineo3", ;
		Item9.Lineo4.Name = "Lineo4", ;
		Item9.Lineo5.Name = "Lineo5", ;
		Item9.Name = "Item9", ;
		Item9.Text_item1.Name = "Text_item1", ;
		Item10.Label_item1.Name = "Label_item1", ;
		Item10.Lineo1.Name = "Lineo1", ;
		Item10.Lineo2.Name = "Lineo2", ;
		Item10.Lineo3.Name = "Lineo3", ;
		Item10.Lineo4.Name = "Lineo4", ;
		Item10.Lineo5.Name = "Lineo5", ;
		Item10.Name = "Item10", ;
		Item10.Text_item1.Name = "Text_item1", ;
		Item11.Label_item1.Name = "Label_item1", ;
		Item11.Lineo1.Name = "Lineo1", ;
		Item11.Lineo2.Name = "Lineo2", ;
		Item11.Lineo3.Name = "Lineo3", ;
		Item11.Lineo4.Name = "Lineo4", ;
		Item11.Lineo5.Name = "Lineo5", ;
		Item11.Name = "Item11", ;
		Item11.Text_item1.Name = "Text_item1", ;
		Item12.Label_item1.Name = "Label_item1", ;
		Item12.Lineo1.Name = "Lineo1", ;
		Item12.Lineo2.Name = "Lineo2", ;
		Item12.Lineo3.Name = "Lineo3", ;
		Item12.Lineo4.Name = "Lineo4", ;
		Item12.Lineo5.Name = "Lineo5", ;
		Item12.Name = "Item12", ;
		Item12.Text_item1.Name = "Text_item1", ;
		Item13.Label_item1.Name = "Label_item1", ;
		Item13.Lineo1.Name = "Lineo1", ;
		Item13.Lineo2.Name = "Lineo2", ;
		Item13.Lineo3.Name = "Lineo3", ;
		Item13.Lineo4.Name = "Lineo4", ;
		Item13.Lineo5.Name = "Lineo5", ;
		Item13.Name = "Item13", ;
		Item13.Text_item1.Name = "Text_item1", ;
		Item14.Label_item1.Name = "Label_item1", ;
		Item14.Lineo1.Name = "Lineo1", ;
		Item14.Lineo2.Name = "Lineo2", ;
		Item14.Lineo3.Name = "Lineo3", ;
		Item14.Lineo4.Name = "Lineo4", ;
		Item14.Lineo5.Name = "Lineo5", ;
		Item14.Name = "Item14", ;
		Item14.Text_item1.Name = "Text_item1", ;
		Item15.Label_item1.Name = "Label_item1", ;
		Item15.Lineo1.Name = "Lineo1", ;
		Item15.Lineo2.Name = "Lineo2", ;
		Item15.Lineo3.Name = "Lineo3", ;
		Item15.Lineo4.Name = "Lineo4", ;
		Item15.Lineo5.Name = "Lineo5", ;
		Item15.Name = "Item15", ;
		Item15.Text_item1.Name = "Text_item1", ;
		Item16.Label_item1.Name = "Label_item1", ;
		Item16.Lineo1.Name = "Lineo1", ;
		Item16.Lineo2.Name = "Lineo2", ;
		Item16.Lineo3.Name = "Lineo3", ;
		Item16.Lineo4.Name = "Lineo4", ;
		Item16.Lineo5.Name = "Lineo5", ;
		Item16.Name = "Item16", ;
		Item16.Text_item1.Name = "Text_item1", ;
		Item17.Label_item1.Name = "Label_item1", ;
		Item17.Lineo1.Name = "Lineo1", ;
		Item17.Lineo2.Name = "Lineo2", ;
		Item17.Lineo3.Name = "Lineo3", ;
		Item17.Lineo4.Name = "Lineo4", ;
		Item17.Lineo5.Name = "Lineo5", ;
		Item17.Name = "Item17", ;
		Item17.Text_item1.Name = "Text_item1", ;
		Item18.Label_item1.Name = "Label_item1", ;
		Item18.Lineo1.Name = "Lineo1", ;
		Item18.Lineo2.Name = "Lineo2", ;
		Item18.Lineo3.Name = "Lineo3", ;
		Item18.Lineo4.Name = "Lineo4", ;
		Item18.Lineo5.Name = "Lineo5", ;
		Item18.Name = "Item18", ;
		Item18.Text_item1.Name = "Text_item1", ;
		Item19.Label_item1.Name = "Label_item1", ;
		Item19.Lineo1.Name = "Lineo1", ;
		Item19.Lineo2.Name = "Lineo2", ;
		Item19.Lineo3.Name = "Lineo3", ;
		Item19.Lineo4.Name = "Lineo4", ;
		Item19.Lineo5.Name = "Lineo5", ;
		Item19.Name = "Item19", ;
		Item19.Text_item1.Name = "Text_item1", ;
		Item20.Label_item1.Name = "Label_item1", ;
		Item20.Lineo1.Name = "Lineo1", ;
		Item20.Lineo2.Name = "Lineo2", ;
		Item20.Lineo3.Name = "Lineo3", ;
		Item20.Lineo4.Name = "Lineo4", ;
		Item20.Lineo5.Name = "Lineo5", ;
		Item20.Name = "Item20", ;
		Item20.Text_item1.Name = "Text_item1", ;
		Item21.Label_item1.Name = "Label_item1", ;
		Item21.Lineo1.Name = "Lineo1", ;
		Item21.Lineo2.Name = "Lineo2", ;
		Item21.Lineo3.Name = "Lineo3", ;
		Item21.Lineo4.Name = "Lineo4", ;
		Item21.Lineo5.Name = "Lineo5", ;
		Item21.Name = "Item21", ;
		Item21.Text_item1.Name = "Text_item1", ;
		Item22.Label_item1.Name = "Label_item1", ;
		Item22.Lineo1.Name = "Lineo1", ;
		Item22.Lineo2.Name = "Lineo2", ;
		Item22.Lineo3.Name = "Lineo3", ;
		Item22.Lineo4.Name = "Lineo4", ;
		Item22.Lineo5.Name = "Lineo5", ;
		Item22.Name = "Item22", ;
		Item22.Text_item1.Name = "Text_item1", ;
		Item3.Label_item1.Name = "Label_item1", ;
		Item3.Lineo1.Name = "Lineo1", ;
		Item3.Lineo2.Name = "Lineo2", ;
		Item3.Lineo3.Name = "Lineo3", ;
		Item3.Lineo4.Name = "Lineo4", ;
		Item3.Lineo5.Name = "Lineo5", ;
		Item3.Name = "Item3", ;
		Item3.Text_item1.Name = "Text_item1", ;
		Item2.Label_item1.Name = "Label_item1", ;
		Item2.Lineo1.Name = "Lineo1", ;
		Item2.Lineo2.Name = "Lineo2", ;
		Item2.Lineo3.Name = "Lineo3", ;
		Item2.Lineo4.Name = "Lineo4", ;
		Item2.Lineo5.Name = "Lineo5", ;
		Item2.Name = "Item2", ;
		Item2.Text_item1.Name = "Text_item1", ;
		Item23.Label_item1.Name = "Label_item1", ;
		Item23.Lineo1.Name = "Lineo1", ;
		Item23.Lineo2.Name = "Lineo2", ;
		Item23.Lineo3.Name = "Lineo3", ;
		Item23.Lineo4.Name = "Lineo4", ;
		Item23.Lineo5.Name = "Lineo5", ;
		Item23.Name = "Item23", ;
		Item23.Text_item1.Name = "Text_item1", ;
		Item24.Label_item1.Name = "Label_item1", ;
		Item24.Lineo1.Name = "Lineo1", ;
		Item24.Lineo2.Name = "Lineo2", ;
		Item24.Lineo3.Name = "Lineo3", ;
		Item24.Lineo4.Name = "Lineo4", ;
		Item24.Lineo5.Name = "Lineo5", ;
		Item24.Name = "Item24", ;
		Item24.Text_item1.Name = "Text_item1", ;
		Item25.Label_item1.Name = "Label_item1", ;
		Item25.Lineo1.Name = "Lineo1", ;
		Item25.Lineo2.Name = "Lineo2", ;
		Item25.Lineo3.Name = "Lineo3", ;
		Item25.Lineo4.Name = "Lineo4", ;
		Item25.Lineo5.Name = "Lineo5", ;
		Item25.Name = "Item25", ;
		Item25.Text_item1.Name = "Text_item1", ;
		cbo_Netaxabil.Height = 20, ;
		cbo_Netaxabil.Left = 486, ;
		cbo_Netaxabil.Name = "cbo_Netaxabil", ;
		cbo_Netaxabil.Top = 124, ;
		cbo_Netaxabil.Width = 219, ;
		lb_netaxabil.Name = "lb_netaxabil", ;
		cbo_Taxabil.Height = 20, ;
		cbo_Taxabil.Left = 486, ;
		cbo_Taxabil.Name = "cbo_Taxabil", ;
		cbo_Taxabil.Top = 168, ;
		cbo_Taxabil.Width = 219, ;
		lb_taxabil.Name = "lb_taxabil", ;
		ck_deducere.Alignment = 0, ;
		ck_deducere.Height = 18, ;
		ck_deducere.Left = 486, ;
		ck_deducere.Name = "ck_deducere", ;
		ck_deducere.Top = 60, ;
		ck_deducere.Width = 151, ;
		ck_tva_la_incasare.Alignment = 0, ;
		ck_tva_la_incasare.Name = "ck_tva_la_incasare", ;
		cbo_saft.Height = 20, ;
		cbo_saft.Left = 486, ;
		cbo_saft.Name = "cbo_saft", ;
		cbo_saft.Top = 214, ;
		cbo_saft.Width = 219, ;
		lb_saft.Name = "lb_saft", ;
		cbo_plata_saft.Height = 20, ;
		cbo_plata_saft.Left = 546, ;
		cbo_plata_saft.Name = "cbo_plata_saft", ;
		cbo_plata_saft.Top = 35, ;
		cbo_plata_saft.Width = 159, ;
		lb_plata_saft.Name = "lb_plata_saft"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Lb_shortcuts1' AS lb_shortcuts WITH ;
		Caption = "CTRL+F = Continuare; ESC = Renun_are; CTRL+L = Verificare", ;
		Left = 4, ;
		Name = "Lb_shortcuts1", ;
		TabIndex = 9, ;
		Top = 16, ;
		ZOrderSet = 5
		*< END OBJECT: ClassLib="lb.vcx" BaseClass="label" />

	ADD OBJECT 'verif' AS ct_verif WITH ;
		Anchor = 15, ;
		Height = 499, ;
		Left = 1, ;
		Name = "verif", ;
		TabIndex = 7, ;
		Top = 32, ;
		Visible = .F., ;
		Width = 739, ;
		ZOrderSet = 10, ;
		Gridsort1.Name = "Gridsort1", ;
		_ct_controller_keypress1.Name = "_ct_controller_keypress1", ;
		Grid1.Anchor = 15, ;
		Grid1.Column1.FontCharSet = 238, ;
		Grid1.Column1.FontName = "Segoe UI", ;
		Grid1.Column1.FontSize = 10, ;
		Grid1.Column1.Header1.FontCharSet = 238, ;
		Grid1.Column1.Header1.FontName = "Segoe UI", ;
		Grid1.Column1.Header1.FontSize = 10, ;
		Grid1.Column1.Header1.Name = "Header1", ;
		Grid1.Column1.Name = "Column1", ;
		Grid1.Column1.Text1.FontCharSet = 238, ;
		Grid1.Column1.Text1.FontName = "Segoe UI", ;
		Grid1.Column1.Text1.FontSize = 10, ;
		Grid1.Column1.Text1.Name = "Text1", ;
		Grid1.Column1.Width = 47, ;
		Grid1.Column10.FontCharSet = 238, ;
		Grid1.Column10.FontName = "Segoe UI", ;
		Grid1.Column10.FontSize = 10, ;
		Grid1.Column10.Header1.FontCharSet = 238, ;
		Grid1.Column10.Header1.FontName = "Segoe UI", ;
		Grid1.Column10.Header1.FontSize = 10, ;
		Grid1.Column10.Header1.Name = "Header1", ;
		Grid1.Column10.Name = "Column10", ;
		Grid1.Column10.Text1.FontCharSet = 238, ;
		Grid1.Column10.Text1.FontName = "Segoe UI", ;
		Grid1.Column10.Text1.FontSize = 10, ;
		Grid1.Column10.Text1.Name = "Text1", ;
		Grid1.Column10.Width = 131, ;
		Grid1.Column11.FontCharSet = 238, ;
		Grid1.Column11.FontName = "Segoe UI", ;
		Grid1.Column11.FontSize = 10, ;
		Grid1.Column11.Header1.FontCharSet = 238, ;
		Grid1.Column11.Header1.FontName = "Segoe UI", ;
		Grid1.Column11.Header1.FontSize = 10, ;
		Grid1.Column11.Header1.Name = "Header1", ;
		Grid1.Column11.Name = "Column11", ;
		Grid1.Column11.Text1.FontCharSet = 238, ;
		Grid1.Column11.Text1.FontName = "Segoe UI", ;
		Grid1.Column11.Text1.FontSize = 10, ;
		Grid1.Column11.Text1.Name = "Text1", ;
		Grid1.Column11.Width = 139, ;
		Grid1.Column12.FontCharSet = 238, ;
		Grid1.Column12.FontName = "Segoe UI", ;
		Grid1.Column12.FontSize = 10, ;
		Grid1.Column12.Header1.FontCharSet = 238, ;
		Grid1.Column12.Header1.FontName = "Segoe UI", ;
		Grid1.Column12.Header1.FontSize = 10, ;
		Grid1.Column12.Header1.Name = "Header1", ;
		Grid1.Column12.Name = "Column12", ;
		Grid1.Column12.Text1.FontCharSet = 238, ;
		Grid1.Column12.Text1.FontName = "Segoe UI", ;
		Grid1.Column12.Text1.FontSize = 10, ;
		Grid1.Column12.Text1.Name = "Text1", ;
		Grid1.Column12.Width = 98, ;
		Grid1.Column13.FontCharSet = 238, ;
		Grid1.Column13.FontName = "Segoe UI", ;
		Grid1.Column13.FontSize = 10, ;
		Grid1.Column13.Header1.FontCharSet = 238, ;
		Grid1.Column13.Header1.FontName = "Segoe UI", ;
		Grid1.Column13.Header1.FontSize = 10, ;
		Grid1.Column13.Header1.Name = "Header1", ;
		Grid1.Column13.Name = "Column13", ;
		Grid1.Column13.Text1.FontCharSet = 238, ;
		Grid1.Column13.Text1.FontName = "Segoe UI", ;
		Grid1.Column13.Text1.FontSize = 10, ;
		Grid1.Column13.Text1.Name = "Text1", ;
		Grid1.Column13.Width = 92, ;
		Grid1.Column14.FontCharSet = 238, ;
		Grid1.Column14.FontName = "Segoe UI", ;
		Grid1.Column14.FontSize = 10, ;
		Grid1.Column14.Header1.FontCharSet = 238, ;
		Grid1.Column14.Header1.FontName = "Segoe UI", ;
		Grid1.Column14.Header1.FontSize = 10, ;
		Grid1.Column14.Header1.Name = "Header1", ;
		Grid1.Column14.Name = "Column14", ;
		Grid1.Column14.Text1.FontCharSet = 238, ;
		Grid1.Column14.Text1.FontName = "Segoe UI", ;
		Grid1.Column14.Text1.FontSize = 10, ;
		Grid1.Column14.Text1.Name = "Text1", ;
		Grid1.Column14.Width = 126, ;
		Grid1.Column15.FontCharSet = 238, ;
		Grid1.Column15.FontName = "Segoe UI", ;
		Grid1.Column15.FontSize = 10, ;
		Grid1.Column15.Header1.FontCharSet = 238, ;
		Grid1.Column15.Header1.FontName = "Segoe UI", ;
		Grid1.Column15.Header1.FontSize = 10, ;
		Grid1.Column15.Header1.Name = "Header1", ;
		Grid1.Column15.Name = "Column15", ;
		Grid1.Column15.Text1.FontCharSet = 238, ;
		Grid1.Column15.Text1.FontName = "Segoe UI", ;
		Grid1.Column15.Text1.FontSize = 10, ;
		Grid1.Column15.Text1.Name = "Text1", ;
		Grid1.Column15.Width = 125, ;
		Grid1.Column16.FontCharSet = 238, ;
		Grid1.Column16.FontName = "Segoe UI", ;
		Grid1.Column16.FontSize = 10, ;
		Grid1.Column16.Header1.FontCharSet = 238, ;
		Grid1.Column16.Header1.FontName = "Segoe UI", ;
		Grid1.Column16.Header1.FontSize = 10, ;
		Grid1.Column16.Header1.Name = "Header1", ;
		Grid1.Column16.Name = "Column16", ;
		Grid1.Column16.Text1.FontCharSet = 238, ;
		Grid1.Column16.Text1.FontName = "Segoe UI", ;
		Grid1.Column16.Text1.FontSize = 10, ;
		Grid1.Column16.Text1.Name = "Text1", ;
		Grid1.Column16.Width = 89, ;
		Grid1.Column17.FontCharSet = 238, ;
		Grid1.Column17.FontName = "Segoe UI", ;
		Grid1.Column17.FontSize = 10, ;
		Grid1.Column17.Header1.FontCharSet = 238, ;
		Grid1.Column17.Header1.FontName = "Segoe UI", ;
		Grid1.Column17.Header1.FontSize = 10, ;
		Grid1.Column17.Header1.Name = "Header1", ;
		Grid1.Column17.Name = "Column17", ;
		Grid1.Column17.Text1.FontCharSet = 238, ;
		Grid1.Column17.Text1.FontName = "Segoe UI", ;
		Grid1.Column17.Text1.FontSize = 10, ;
		Grid1.Column17.Text1.Name = "Text1", ;
		Grid1.Column18.FontCharSet = 238, ;
		Grid1.Column18.FontName = "Segoe UI", ;
		Grid1.Column18.FontSize = 10, ;
		Grid1.Column18.Header1.FontCharSet = 238, ;
		Grid1.Column18.Header1.FontName = "Segoe UI", ;
		Grid1.Column18.Header1.FontSize = 10, ;
		Grid1.Column18.Header1.Name = "Header1", ;
		Grid1.Column18.Name = "Column18", ;
		Grid1.Column18.Text1.FontCharSet = 238, ;
		Grid1.Column18.Text1.FontName = "Segoe UI", ;
		Grid1.Column18.Text1.FontSize = 10, ;
		Grid1.Column18.Text1.Name = "Text1", ;
		Grid1.Column19.FontCharSet = 238, ;
		Grid1.Column19.FontName = "Segoe UI", ;
		Grid1.Column19.FontSize = 10, ;
		Grid1.Column19.Header1.FontCharSet = 238, ;
		Grid1.Column19.Header1.FontName = "Segoe UI", ;
		Grid1.Column19.Header1.FontSize = 10, ;
		Grid1.Column19.Header1.Name = "Header1", ;
		Grid1.Column19.Name = "Column19", ;
		Grid1.Column19.Text1.FontCharSet = 238, ;
		Grid1.Column19.Text1.FontName = "Segoe UI", ;
		Grid1.Column19.Text1.FontSize = 10, ;
		Grid1.Column19.Text1.Name = "Text1", ;
		Grid1.Column19.Width = 99, ;
		Grid1.Column2.FontCharSet = 238, ;
		Grid1.Column2.FontName = "Segoe UI", ;
		Grid1.Column2.FontSize = 10, ;
		Grid1.Column2.Header2.FontCharSet = 238, ;
		Grid1.Column2.Header2.FontName = "Segoe UI", ;
		Grid1.Column2.Header2.FontSize = 10, ;
		Grid1.Column2.Header2.Name = "Header2", ;
		Grid1.Column2.Name = "Column2", ;
		Grid1.Column2.Text1.FontCharSet = 238, ;
		Grid1.Column2.Text1.FontName = "Segoe UI", ;
		Grid1.Column2.Text1.FontSize = 10, ;
		Grid1.Column2.Text1.Name = "Text1", ;
		Grid1.Column2.Width = 100, ;
		Grid1.Column20.FontCharSet = 238, ;
		Grid1.Column20.FontName = "Segoe UI", ;
		Grid1.Column20.FontSize = 10, ;
		Grid1.Column20.Header1.FontCharSet = 238, ;
		Grid1.Column20.Header1.FontName = "Segoe UI", ;
		Grid1.Column20.Header1.FontSize = 10, ;
		Grid1.Column20.Header1.Name = "Header1", ;
		Grid1.Column20.Name = "Column20", ;
		Grid1.Column20.Text1.FontCharSet = 238, ;
		Grid1.Column20.Text1.FontName = "Segoe UI", ;
		Grid1.Column20.Text1.FontSize = 10, ;
		Grid1.Column20.Text1.Name = "Text1", ;
		Grid1.Column20.Width = 79, ;
		Grid1.Column21.FontCharSet = 238, ;
		Grid1.Column21.FontName = "Segoe UI", ;
		Grid1.Column21.FontSize = 10, ;
		Grid1.Column21.Header1.FontCharSet = 238, ;
		Grid1.Column21.Header1.FontName = "Segoe UI", ;
		Grid1.Column21.Header1.FontSize = 10, ;
		Grid1.Column21.Header1.Name = "Header1", ;
		Grid1.Column21.Name = "Column21", ;
		Grid1.Column21.Text1.FontCharSet = 238, ;
		Grid1.Column21.Text1.FontName = "Segoe UI", ;
		Grid1.Column21.Text1.FontSize = 10, ;
		Grid1.Column21.Text1.Name = "Text1", ;
		Grid1.Column21.Width = 59, ;
		Grid1.Column22.FontCharSet = 238, ;
		Grid1.Column22.FontName = "Segoe UI", ;
		Grid1.Column22.FontSize = 10, ;
		Grid1.Column22.HEADER1.FontCharSet = 238, ;
		Grid1.Column22.HEADER1.FontName = "Segoe UI", ;
		Grid1.Column22.HEADER1.FontSize = 10, ;
		Grid1.Column22.HEADER1.Name = "HEADER1", ;
		Grid1.Column22.Name = "Column22", ;
		Grid1.Column22.Text1.FontCharSet = 238, ;
		Grid1.Column22.Text1.FontName = "Segoe UI", ;
		Grid1.Column22.Text1.FontSize = 10, ;
		Grid1.Column22.Text1.Name = "Text1", ;
		Grid1.Column23.FontCharSet = 238, ;
		Grid1.Column23.FontName = "Segoe UI", ;
		Grid1.Column23.FontSize = 10, ;
		Grid1.Column23.HEADER1.FontCharSet = 238, ;
		Grid1.Column23.HEADER1.FontName = "Segoe UI", ;
		Grid1.Column23.HEADER1.FontSize = 10, ;
		Grid1.Column23.HEADER1.Name = "HEADER1", ;
		Grid1.Column23.Name = "Column23", ;
		Grid1.Column23.Text1.FontCharSet = 238, ;
		Grid1.Column23.Text1.FontName = "Segoe UI", ;
		Grid1.Column23.Text1.FontSize = 10, ;
		Grid1.Column23.Text1.Name = "Text1", ;
		Grid1.Column24.FontCharSet = 238, ;
		Grid1.Column24.FontName = "Segoe UI", ;
		Grid1.Column24.FontSize = 10, ;
		Grid1.Column24.HEADER1.FontCharSet = 238, ;
		Grid1.Column24.HEADER1.FontName = "Segoe UI", ;
		Grid1.Column24.HEADER1.FontSize = 10, ;
		Grid1.Column24.HEADER1.Name = "HEADER1", ;
		Grid1.Column24.Name = "Column24", ;
		Grid1.Column24.Text1.FontCharSet = 238, ;
		Grid1.Column24.Text1.FontName = "Segoe UI", ;
		Grid1.Column24.Text1.FontSize = 10, ;
		Grid1.Column24.Text1.Name = "Text1", ;
		Grid1.Column25.FontCharSet = 238, ;
		Grid1.Column25.FontName = "Segoe UI", ;
		Grid1.Column25.FontSize = 10, ;
		Grid1.Column25.Header1.FontCharSet = 238, ;
		Grid1.Column25.Header1.FontName = "Segoe UI", ;
		Grid1.Column25.Header1.FontSize = 10, ;
		Grid1.Column25.Header1.Name = "Header1", ;
		Grid1.Column25.Name = "Column25", ;
		Grid1.Column25.Text1.FontCharSet = 238, ;
		Grid1.Column25.Text1.FontName = "Segoe UI", ;
		Grid1.Column25.Text1.FontSize = 10, ;
		Grid1.Column25.Text1.Name = "Text1", ;
		Grid1.Column25.Width = 105, ;
		Grid1.Column26.FontCharSet = 238, ;
		Grid1.Column26.FontName = "Segoe UI", ;
		Grid1.Column26.FontSize = 10, ;
		Grid1.Column26.Header1.FontCharSet = 238, ;
		Grid1.Column26.Header1.FontName = "Segoe UI", ;
		Grid1.Column26.Header1.FontSize = 10, ;
		Grid1.Column26.Header1.Name = "Header1", ;
		Grid1.Column26.Name = "Column26", ;
		Grid1.Column26.Text1.FontCharSet = 238, ;
		Grid1.Column26.Text1.FontName = "Segoe UI", ;
		Grid1.Column26.Text1.FontSize = 10, ;
		Grid1.Column26.Text1.Name = "Text1", ;
		Grid1.Column26.Width = 106, ;
		Grid1.Column27.FontCharSet = 238, ;
		Grid1.Column27.FontName = "Segoe UI", ;
		Grid1.Column27.FontSize = 10, ;
		Grid1.Column27.Header1.FontCharSet = 238, ;
		Grid1.Column27.Header1.FontName = "Segoe UI", ;
		Grid1.Column27.Header1.FontSize = 10, ;
		Grid1.Column27.Header1.Name = "Header1", ;
		Grid1.Column27.Name = "Column27", ;
		Grid1.Column27.Text1.FontCharSet = 238, ;
		Grid1.Column27.Text1.FontName = "Segoe UI", ;
		Grid1.Column27.Text1.FontSize = 10, ;
		Grid1.Column27.Text1.Name = "Text1", ;
		Grid1.Column27.Width = 136, ;
		Grid1.Column28.FontCharSet = 238, ;
		Grid1.Column28.FontName = "Segoe UI", ;
		Grid1.Column28.FontSize = 10, ;
		Grid1.Column28.Header1.FontCharSet = 238, ;
		Grid1.Column28.Header1.FontName = "Segoe UI", ;
		Grid1.Column28.Header1.FontSize = 10, ;
		Grid1.Column28.Header1.Name = "Header1", ;
		Grid1.Column28.Name = "Column28", ;
		Grid1.Column28.Text1.FontCharSet = 238, ;
		Grid1.Column28.Text1.FontName = "Segoe UI", ;
		Grid1.Column28.Text1.FontSize = 10, ;
		Grid1.Column28.Text1.Name = "Text1", ;
		Grid1.Column28.Width = 83, ;
		Grid1.Column29.FontCharSet = 238, ;
		Grid1.Column29.FontName = "Segoe UI", ;
		Grid1.Column29.FontSize = 10, ;
		Grid1.Column29.Header1.FontCharSet = 238, ;
		Grid1.Column29.Header1.FontName = "Segoe UI", ;
		Grid1.Column29.Header1.FontSize = 10, ;
		Grid1.Column29.Header1.Name = "Header1", ;
		Grid1.Column29.Name = "Column29", ;
		Grid1.Column29.Text1.FontCharSet = 238, ;
		Grid1.Column29.Text1.FontName = "Segoe UI", ;
		Grid1.Column29.Text1.FontSize = 10, ;
		Grid1.Column29.Text1.Name = "Text1", ;
		Grid1.Column29.Width = 118, ;
		Grid1.Column3.FontCharSet = 238, ;
		Grid1.Column3.FontName = "Segoe UI", ;
		Grid1.Column3.FontSize = 10, ;
		Grid1.Column3.Header3.FontCharSet = 238, ;
		Grid1.Column3.Header3.FontName = "Segoe UI", ;
		Grid1.Column3.Header3.FontSize = 10, ;
		Grid1.Column3.Header3.Name = "Header3", ;
		Grid1.Column3.Name = "Column3", ;
		Grid1.Column3.Text1.FontCharSet = 238, ;
		Grid1.Column3.Text1.FontName = "Segoe UI", ;
		Grid1.Column3.Text1.FontSize = 10, ;
		Grid1.Column3.Text1.Name = "Text1", ;
		Grid1.Column3.Width = 99, ;
		Grid1.Column31.FontCharSet = 238, ;
		Grid1.Column31.FontName = "Segoe UI", ;
		Grid1.Column31.FontSize = 10, ;
		Grid1.Column31.Header1.FontCharSet = 238, ;
		Grid1.Column31.Header1.FontName = "Segoe UI", ;
		Grid1.Column31.Header1.FontSize = 10, ;
		Grid1.Column31.Header1.Name = "Header1", ;
		Grid1.Column31.Name = "Column31", ;
		Grid1.Column31.Text1.FontCharSet = 238, ;
		Grid1.Column31.Text1.FontName = "Segoe UI", ;
		Grid1.Column31.Text1.FontSize = 10, ;
		Grid1.Column31.Text1.Name = "Text1", ;
		Grid1.Column31.Width = 51, ;
		Grid1.Column32.FontCharSet = 238, ;
		Grid1.Column32.FontName = "Segoe UI", ;
		Grid1.Column32.FontSize = 10, ;
		Grid1.Column32.Header1.FontCharSet = 238, ;
		Grid1.Column32.Header1.FontName = "Segoe UI", ;
		Grid1.Column32.Header1.FontSize = 10, ;
		Grid1.Column32.Header1.Name = "Header1", ;
		Grid1.Column32.Name = "Column32", ;
		Grid1.Column32.Text1.FontCharSet = 238, ;
		Grid1.Column32.Text1.FontName = "Segoe UI", ;
		Grid1.Column32.Text1.FontSize = 10, ;
		Grid1.Column32.Text1.Name = "Text1", ;
		Grid1.Column32.Width = 57, ;
		Grid1.Column33.FontCharSet = 238, ;
		Grid1.Column33.FontName = "Segoe UI", ;
		Grid1.Column33.FontSize = 10, ;
		Grid1.Column33.Header1.FontCharSet = 238, ;
		Grid1.Column33.Header1.FontName = "Segoe UI", ;
		Grid1.Column33.Header1.FontSize = 10, ;
		Grid1.Column33.Header1.Name = "Header1", ;
		Grid1.Column33.Name = "Column33", ;
		Grid1.Column33.Text1.FontCharSet = 238, ;
		Grid1.Column33.Text1.FontName = "Segoe UI", ;
		Grid1.Column33.Text1.FontSize = 10, ;
		Grid1.Column33.Text1.Name = "Text1", ;
		Grid1.Column33.Width = 71, ;
		Grid1.Column34.FontCharSet = 238, ;
		Grid1.Column34.FontName = "Segoe UI", ;
		Grid1.Column34.FontSize = 10, ;
		Grid1.Column34.Header1.FontCharSet = 238, ;
		Grid1.Column34.Header1.FontName = "Segoe UI", ;
		Grid1.Column34.Header1.FontSize = 10, ;
		Grid1.Column34.Header1.Name = "Header1", ;
		Grid1.Column34.Name = "Column34", ;
		Grid1.Column34.Text1.FontCharSet = 238, ;
		Grid1.Column34.Text1.FontName = "Segoe UI", ;
		Grid1.Column34.Text1.FontSize = 10, ;
		Grid1.Column34.Text1.Name = "Text1", ;
		Grid1.Column34.Width = 101, ;
		Grid1.Column35.FontCharSet = 238, ;
		Grid1.Column35.FontName = "Segoe UI", ;
		Grid1.Column35.FontSize = 10, ;
		Grid1.Column35.Header1.FontCharSet = 238, ;
		Grid1.Column35.Header1.FontName = "Segoe UI", ;
		Grid1.Column35.Header1.FontSize = 10, ;
		Grid1.Column35.Header1.Name = "Header1", ;
		Grid1.Column35.Name = "Column35", ;
		Grid1.Column35.Text1.FontCharSet = 238, ;
		Grid1.Column35.Text1.FontName = "Segoe UI", ;
		Grid1.Column35.Text1.FontSize = 10, ;
		Grid1.Column35.Text1.Name = "Text1", ;
		Grid1.Column36.FontCharSet = 238, ;
		Grid1.Column36.FontName = "Segoe UI", ;
		Grid1.Column36.FontSize = 10, ;
		Grid1.Column36.Header1.FontCharSet = 238, ;
		Grid1.Column36.Header1.FontName = "Segoe UI", ;
		Grid1.Column36.Header1.FontSize = 10, ;
		Grid1.Column36.Header1.Name = "Header1", ;
		Grid1.Column36.Name = "Column36", ;
		Grid1.Column36.Text1.FontCharSet = 238, ;
		Grid1.Column36.Text1.FontName = "Segoe UI", ;
		Grid1.Column36.Text1.FontSize = 10, ;
		Grid1.Column36.Text1.Name = "Text1", ;
		Grid1.Column36.Width = 167, ;
		Grid1.Column4.FontCharSet = 238, ;
		Grid1.Column4.FontName = "Segoe UI", ;
		Grid1.Column4.FontSize = 10, ;
		Grid1.Column4.Header4.FontCharSet = 238, ;
		Grid1.Column4.Header4.FontName = "Segoe UI", ;
		Grid1.Column4.Header4.FontSize = 10, ;
		Grid1.Column4.Header4.Name = "Header4", ;
		Grid1.Column4.Name = "Column4", ;
		Grid1.Column4.Text1.FontCharSet = 238, ;
		Grid1.Column4.Text1.FontName = "Segoe UI", ;
		Grid1.Column4.Text1.FontSize = 10, ;
		Grid1.Column4.Text1.Name = "Text1", ;
		Grid1.Column4.Width = 95, ;
		Grid1.Column5.FontCharSet = 238, ;
		Grid1.Column5.FontName = "Segoe UI", ;
		Grid1.Column5.FontSize = 10, ;
		Grid1.Column5.Header5.FontCharSet = 238, ;
		Grid1.Column5.Header5.FontName = "Segoe UI", ;
		Grid1.Column5.Header5.FontSize = 10, ;
		Grid1.Column5.Header5.Name = "Header5", ;
		Grid1.Column5.Name = "Column5", ;
		Grid1.Column5.Text1.FontCharSet = 238, ;
		Grid1.Column5.Text1.FontName = "Segoe UI", ;
		Grid1.Column5.Text1.FontSize = 10, ;
		Grid1.Column5.Text1.Name = "Text1", ;
		Grid1.Column5.Width = 105, ;
		Grid1.Column6.FontCharSet = 238, ;
		Grid1.Column6.FontName = "Segoe UI", ;
		Grid1.Column6.FontSize = 10, ;
		Grid1.Column6.Header6.FontCharSet = 238, ;
		Grid1.Column6.Header6.FontName = "Segoe UI", ;
		Grid1.Column6.Header6.FontSize = 10, ;
		Grid1.Column6.Header6.Name = "Header6", ;
		Grid1.Column6.Name = "Column6", ;
		Grid1.Column6.Text1.FontCharSet = 238, ;
		Grid1.Column6.Text1.FontName = "Segoe UI", ;
		Grid1.Column6.Text1.FontSize = 10, ;
		Grid1.Column6.Text1.Name = "Text1", ;
		Grid1.Column6.Width = 129, ;
		Grid1.Column7.FontCharSet = 238, ;
		Grid1.Column7.FontName = "Segoe UI", ;
		Grid1.Column7.FontSize = 10, ;
		Grid1.Column7.Header7.FontCharSet = 238, ;
		Grid1.Column7.Header7.FontName = "Segoe UI", ;
		Grid1.Column7.Header7.FontSize = 10, ;
		Grid1.Column7.Header7.Name = "Header7", ;
		Grid1.Column7.Name = "Column7", ;
		Grid1.Column7.Text1.FontCharSet = 238, ;
		Grid1.Column7.Text1.FontName = "Segoe UI", ;
		Grid1.Column7.Text1.FontSize = 10, ;
		Grid1.Column7.Text1.Name = "Text1", ;
		Grid1.Column7.Width = 59, ;
		Grid1.Column8.FontCharSet = 238, ;
		Grid1.Column8.FontName = "Segoe UI", ;
		Grid1.Column8.FontSize = 10, ;
		Grid1.Column8.Header8.FontCharSet = 238, ;
		Grid1.Column8.Header8.FontName = "Segoe UI", ;
		Grid1.Column8.Header8.FontSize = 10, ;
		Grid1.Column8.Header8.Name = "Header8", ;
		Grid1.Column8.Name = "Column8", ;
		Grid1.Column8.Text1.FontCharSet = 238, ;
		Grid1.Column8.Text1.FontName = "Segoe UI", ;
		Grid1.Column8.Text1.FontSize = 10, ;
		Grid1.Column8.Text1.Name = "Text1", ;
		Grid1.Column8.Width = 63, ;
		Grid1.Column9.FontCharSet = 238, ;
		Grid1.Column9.FontName = "Segoe UI", ;
		Grid1.Column9.FontSize = 10, ;
		Grid1.Column9.Header9.FontCharSet = 238, ;
		Grid1.Column9.Header9.FontName = "Segoe UI", ;
		Grid1.Column9.Header9.FontSize = 10, ;
		Grid1.Column9.Header9.Name = "Header9", ;
		Grid1.Column9.Name = "Column9", ;
		Grid1.Column9.Text1.FontCharSet = 238, ;
		Grid1.Column9.Text1.FontName = "Segoe UI", ;
		Grid1.Column9.Text1.FontSize = 10, ;
		Grid1.Column9.Text1.Name = "Text1", ;
		Grid1.Column9.Width = 113, ;
		Grid1.FontCharSet = 238, ;
		Grid1.FontName = "Segoe UI", ;
		Grid1.FontSize = 10, ;
		Grid1.Height = 486, ;
		Grid1.Left = 1, ;
		Grid1.Name = "Grid1", ;
		Grid1.Panel = 1, ;
		Grid1.RowHeight = 20, ;
		Grid1.Top = 1, ;
		Grid1.Width = 734
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'verif.Gridextra1' AS gridextra WITH ;
		gridexpression = thisform.verif.grid1, ;
		Left = 450, ;
		Name = "Gridextra1", ;
		Top = 345
		*< END OBJECT: ClassLib="..\utile\gridextras\gridextras.vcx" BaseClass="custom" />
	
	PROCEDURE Activate
		If This.iteMS.Visible = .T.
			If This.nou_intrat
				This.iteMS.item1.SetFocus()
			Endif
		Endif
	ENDPROC

	PROCEDURE actualizeaza_explicatie_saft
		IF !m.gl406
			RETURN 
		ENDIF 
		
		Local llFurnizorRTVAI
		With This.itemS
		* Cod taxa SAFT
			If !Used('crsTaxTable')
				.cbo_saft.RowSource = []
				Use In (Select('crsTaxTable'))
		
				If !Used('saft_taxtable')
					update_saft_taxtable()
				ENDIF 	
		
				.cbo_saft.RowSourceType = 3 && sql
				.cbo_saft.RowSource = [Select descriere, taxcode, tip, CAST(procent_taxa as N(6,2) null) as procent_taxa From saft_taxtable where (tva = 1 and procent_taxa = (Thisform.ntvatax*100-100)) or wht = 1 Order By tva, tva_livrari, tva_achizitii, wht, taxcode Into Cursor crsTaxTable]
				.cbo_saft.ControlSource = [Thisform.nTaxCode]
				.cbo_saft.BoundColumn = 2
				.cbo_saft.BoundTo = .T.
				.cbo_saft.ColumnCount = 4
				.cbo_saft.ColumnWidths = "450,50,150,40"
			Endif
			This.UpdateExplicatieSAFT()
		Endwith
		
	ENDPROC

	PROCEDURE actualizeaza_explicatie_tva
		Lparameters tnTvaIncasare
		
		Local lnIdJtax
		With This.itemS
			If Used('crsjtax')
				Select crsjtax
				If Empty(tnTvaIncasare)
					lnIdJtax = Nvl(id_jtva_ex,id_jtva_coloana)
				Else
					lnIdJtax = Nvl(id_jtva_neex,id_jtva_coloana)
				Endif
				.cbo_Taxabil.RowSource = []
				Use In crsjtax
			Else
		*!*	modificare	ROACONT v 2.4.15 :
		*!*		xsets.id_jtax era folosit mai departe cu valoarea veche si cand imi facea locate in cursor, nu mi-l gasea ( in cazul in care
		*!*		firma era cu tva la incasare )
		*!*			lnIdJtax = getIdJtvaColoana(xsets.id_jtax,tnTvaIncasare)
				lnIdJtax = getIdJtvaColoana(OXSET.id_jtax,tnTvaIncasare)
				OXSET.id_jtax = lnIdJtax
		*!*	modificare	ROACONT v 2.4.15	^
			Endif
			If Empty(tnTvaIncasare)
				Select * From jtva_coloane Where afisat >= 1 And Isnull(id_jtva_ex) Order By ordine Into Cursor crsjtax &&	Where afisat = 1
			Else
				Select * From jtva_coloane Where afisat >= 1 And Isnull(id_jtva_neex) Order By ordine Into Cursor crsjtax &&	Where afisat = 1
			Endif
			.cbo_Taxabil.RowSource = [crsjtax.denumire]
			Select crsjtax
			Locate For id_jtva_coloana = lnIdJtax
			If Found()
				This.ctaxabil = denumire
				This.ntvatax = (100 + cota_tva) / 100
				This.id_jtax = id_jtva_coloana
				This.id_jtva = id_tva
				.cbo_Taxabil.Value = This.ctaxabil
			Endif
		Endwith
		
		
	ENDPROC

	PROCEDURE actualizeaza_plata_saft
		* Nu actualizez paymentcode dupa fel document, daca deja apelez aceasta procedura la schimbarea documentului
		* Nu actualizez daca nu este optiunea D406 activa si nu este set plata
		Local llVisible
		If !m.gl406
			Return
		Endif
		llVisible = This.items.cbo_plATA_SAFT.Visible
		
		With This.items
		* Cod mecanism plata SAFT
			If !Used('saft_mecanisme_plati')
				update_saft_mecanisme_plati()
			Endif
		
			If Empty(.cbo_plATA_SAFT.RowSource)
				.cbo_plATA_SAFT.RowSourceType = 3 && sql
				.cbo_plATA_SAFT.RowSource = [Select paymentname, methodname, mechanismcode From saft_mecanisme_plati where afisat=1 Order By ordine Into Cursor crsMecanismePlati]
				.cbo_plATA_SAFT.ControlSource = [Thisform.cPaymentCode]
				.cbo_plATA_SAFT.BoundColumn = 3
				.cbo_plATA_SAFT.BoundTo = .T.
				.cbo_plATA_SAFT.ColumnCount = 2
				.cbo_plATA_SAFT.ColumnWidths = "250,150"
			Endif
			.cbo_plata_saft.visible = m.llVisible && se pune Visible = .T. cand se face BoundTo = .T.
		ENDWITH
		This.UpdatePaymentSAFT()
		
		
		 
	ENDPROC

	PROCEDURE aduc_set
		*!* 07.09.2009
		*!*	marius.mutu
		*!*	la nota de inventar din roagest nu era vizibila intotdeauna fereastra cu item-uri?
		*!*	modificare	16.09.2009
		*!*	ox.visible = .T. face ca focusul sa fie pus pe butonul ">" si nu pe primul textbox din formular
		
		*!* 15.04.2009
		*!*	alex.lepadatu
		*!* se cer partenerii pt conturile care au xnote.scd/scc_fara_partener = 1
		
		*!* 15.07.2011
		*!*	marius.mutu
		*!*	se afiseaza maxim 20 itemuri in loc de 14
		
		*!* 13.01.2015
		*!* marius.mutu
		*!* adaugare proprietate poAct.id_vCONT (pentru utilizarea la o operatie ulterioara)
		
		*!* 05.03.2026
		*!* NU CER DOCUMENT PERECHE PENTRU COMPENSARI AUTOMATE +/- 401/409/411/419 (106XX) SAU PENTRU ACH. PLATITA DIN 542 (45)
		
		Local i, loItem, lcexplicatie
		Local lEValInit, lcCont, lcContExtins, lcContul, lcCursor, lcDenumire, lcExc, lcExplic, lcItem
		Local lcItemNou, lcProprFisier, lcProprObiect, lcProprObiectId, lcSql, lcTip, lcTipItem, lcVar
		Local lcVarItem, lcobj, lleste, lnCuIreg, lnCuProcTva, lnFel, lnFelCont, lnIdTipDoc, lnLeft, lnNrIt
		Local lnNrIt2, lnNrItem, lnNrRecalc, lnNrRecalc2, lnPozitie, lnPrioritate, lnRecno, lnRezultat
		Local lnSucces, lnTabIndex, lnTop, lncbTop, lnindex, lnindexId, lnlbTop
		*:Global MM, N, NU_STERG, Z, an, nl, opart, oxcont, x
		Private lcLista
		Store '' To lcLista
		
		m.an = Alltrim(Str(gnAn))
		m.nl = Padl(Alltrim(Str(gnLuna)), 2, '0')
		
		m.NU_STERG = oxset.NU_STERG
		*!*	modificare	ROAAUTO v 2.0.35
		*!*	If !Empty(This.FORMGEST) Or XSETS.MODEL=-1
		*!*		Thisform.do_arata_butoane(2,.F.)
		*!*		Thisform.do_arata_butoane(3,.T.)
		*!*	Endif
		*!*	modificare	ROAAUTO v 2.0.35	^
		Select a.NR_ITEM, a.id_tipdoc, b.*, D.NUME_SET, 0 As cu_proc_tva, 'X' As tip_item ;
			From XREQUEST a ;
			INNER Join xitems b On a.id_item = b.id_item ;
			Left Join XSETS D On a.ID_SET = D.ID_SET ;
			Where a.ID_SET = Thisform.ID_SET And Evaluate(Iif(Empty(Nvl(a.conditie, '')), '.t.', Alltrim(a.conditie))) ;
			Into Cursor cerere Readwrite ;
			Order By b.prioritate, a.NR_ITEM
		*!*	modificare serii numere	- 10.2007
		lnRezultat = 0
		Select cerere
		Scan For !Isnull(id_tipdoc)
			lcexplicatie = NUME_SET
			lnPrioritate = prioritate
			lnNrItem = NR_ITEM
			lnRecno = Recno()
			lnIdTipDoc = id_tipdoc
			lcVarItem = var_item
			If lnIdTipDoc = -1
				lnRezultat = 1
			Else
				lnRezultat = poGeneratorNumere.creeaza_cursor_serii(lnIdTipDoc)
			Endif
			Select cerere
			Do Case
				Case lnRezultat = 0
					Replace id_tipdoc With Null
				Case Inlist(lnRezultat, 1, 3)
					If lnRezultat = 1
						Replace id_tipdoc With Null
						lcTipItem = 'T'
					Else
						lcTipItem = 'L'
					Endif
					Select xitems
					Locate For id_item = 77
					Scatter Name loItem
					Select cerere
					Append Blank
					Gather Name loItem
					Replace NUME_SET With lcexplicatie, tip_item With lcTipItem, NR_ITEM With lnNrItem, ;
						prioritate With lnPrioritate, id_tipdoc With Null
					If lcTipItem = 'L'
						Replace x_init_val With Alltrim(Str(lnIdTipDoc)), camp_lista With lcVarItem
					Endif
					Go lnRecno
			Endcase
		Endscan
		Select * From cerere Into Cursor cerere Readwrite Order By prioritate, NR_ITEM, tip_item
		*!*	modificare serii numere	- 10.2007	^
		&&
		Select cerere
		*** COMPLETEZ CEREREA DE DATE CU LUCRAREA, SECTIA, SUCURSALA
		&& LUCRARE
		
		If gnCampLucrare = 1
			Select cerere
			lcexplicatie = NUME_SET
			Locate For id_item = 15
			If !Found()
				Select xitems
				Locate For id_item = 15
				Scatter Name loItem
				Select cerere
				Append Blank
				Gather Name loItem
				Replace NUME_SET With lcexplicatie, id_tipdoc With Null
			Endif
		Endif
		
		&& SECTIE
		If gnCampSectie = 1
			Select cerere
			lcexplicatie = NUME_SET
			Locate For id_item = 16
			If !Found()
				Select xitems
				Locate For id_item = 16
				Scatter Name loItem
				Select cerere
				Append Blank
				Gather Name loItem
				Replace NUME_SET With lcexplicatie, id_tipdoc With Null
			Endif
		Endif
		&& SUCURSALA
		If gnCampSucursala = 1
			Select cerere
			lcexplicatie = NUME_SET
			Locate For id_item = 68
			If !Found()
				Select xitems
				Locate For id_item = 68
				Scatter Name loItem
				Select cerere
				Append Blank
				Gather Name loItem
				Replace NUME_SET With lcexplicatie, id_tipdoc With Null
			Endif
		Endif
		
		Locate
		Thisform.cdenumire_set = Alltrim(NUME_SET)
		lleste = .F.
		************************************************************************************************
		*!* 15.04.2009
		*!*	Select Distinct Left(xscd,5) As contpart, 0 As pozitie, xscc As cont_coresp From xnote Where ID_SET = Thisform.ID_SET And !Empty(xscd) ;
		*!*		UNION ;
		*!*		SELECT Distinct Left(xscc,5) As contpart, 1 As pozitie, xscd As cont_coresp From xnote Where ID_SET = Thisform.ID_SET And !Empty(xscc) ;
		*!*		INTO Cursor tcont Readwrite
		
		Select Distinct Left(xscd, 5) As contpart, 0 As pozitie, xscc As cont_coresp, Nvl(scd_fara_part, 0) As cont_fara_part;
			From xnote ;
			Where ID_SET = Thisform.ID_SET And !Empty(xscd) ;
			Union ;
			Select Distinct Left(xscc, 5) As contpart, 1 As pozitie, xscd As cont_coresp, Nvl(scc_fara_part, 0) As cont_fara_part;
			From xnote ;
			Where ID_SET = Thisform.ID_SET And !Empty(xscc) ;
			Into Cursor tcont Readwrite
		*!* 15.04.2009 ^
		
		Select tcont
		Scan
			lcCont = Alltrim(contpart)
			If Val(lcCont) = 0  Or 'X' $ Upper(lcCont)
				If Type('CN') # 'U' And !Empty(CN)
					lcCont = Alltrim(CN)
					Replace contpart With lcCont
				Else
					Loop
				Endif
			Endif
			If Empty(lcLista)
				lcLista = lcCont
			Else
				lcLista = lcLista + ',' + lcCont
			Endif
		Endscan
		
		*!* 30.03.2007
		*!* exceptii_ireg.in_ireg = 1
		If !Empty(lcLista)
			lcSql = [select distinct c.cont as cont_part, c.explicatie as explic_cont,c.fel_cont,c.id_tip_part as tip,c.cu_inregistrari, c.cu_proc_tva, e.cont_c as exceptie, e.debit as poz_in_caz_exceptie, e.invers ] + ;
				[from ] + gcs + [.vcoresp_tip_cont c ] + ;
				[left join ] + gcs + [.exceptii_ireg e on c.cont = e.cont and e.invers = 1 and e.in_ireg = 1 ] + ;
				[and e.cont_c in (] + lcLista + [)] + ; &&	modificare	10.09.2013
				[where c.cont in (] + lcLista + [)]
		*[where instr('] + lcLista + [',c.cont)> 0 ]
		Else
			lcSql = [select distinct c.cont as cont_part, c.explicatie as explic_cont,c.fel_cont,c.id_tip_part as tip,c.cu_inregistrari, c.cu_proc_tva, e.cont_c as exceptie, e.debit as poz_in_caz_exceptie, e.invers ] + ;
				[from ] + gcs + [.vcoresp_tip_cont c left join ] + gcs + [.exceptii_ireg e on c.cont = e.cont and e.invers = 1 and e.in_ireg = 1 ] + ;
				[where 1 = 2]
		Endif
		lcCursor = 'verif_part'
		
		lnSucces = goExecutor.oExecute(lcSql, lcCursor)
		If lnSucces < 0
			aMessagebox('Eroare de conectare!', 0 + 48, 'Atentie!')
			This.Release()
			Return
		Endif
		
		*!*		modificare ROASITOP
		*!*	Select v.*, T.*,Space(50) As tipuri_part,Space(50) As conturi_exc,Space(50) As numepart, 000000000000 As idpart ;
		*!*		FROM verif_part v Left Join tcont T On v.cont_part = T.contpart Into Cursor xcont Readwrite
		If Thisform.ID_SET = 50505
			Select v.*, T.*, Space(50) As tipuri_part, Space(50) As conturi_exc, Space(50) As numepart, 000000000000 As idpart ;
				From verif_part v Left Join tcont T On v.cont_part = T.contpart Where v.cont_part <> '4111' ;
				Into Cursor xcont Readwrite
		Else
		*!* 15.04.2009
		*!*		Select v.*, T.*,Space(50) As tipuri_part,Space(50) As conturi_exc,Space(50) As numepart, 000000000000 As idpart ;
		*!*			FROM verif_part v Left Join tcont T On v.cont_part = T.contpart Into Cursor xcont Readwrite
		
			Select v.*, T.*, Space(50) As tipuri_part, Space(50) As conturi_exc, Space(50) As numepart, 000000000000 As idpart ;
				From verif_part v Left Join tcont T On v.cont_part = T.contpart ;
				Where T.cont_fara_part = 0 ;
				Into Cursor xcont Readwrite
		*!* 15.04.2009 ^
		Endif
		*!*		modificare ROASITOP	^
		
		Select xcont
		Replace All pozitie With 1 For pozitie = 0 And cont_coresp = exceptie And pozitie = poz_in_caz_exceptie And invers = 1
		Select xcont
		Replace All pozitie With 0 For pozitie = 1 And cont_coresp = exceptie And pozitie = poz_in_caz_exceptie And invers = 1
		
		*** FEL_CONT = 2 BIFUNCTIONALE
		*** sa nu ceara document pereche pentru constituire de documente (fara plati/incasari pe cont corespondent)
		Select xcont
		Replace All fel_cont With 0 For fel_cont = 2 And pozitie = 0 And !Inlist(Left(cont_coresp, 2), '51', '53')
		Replace All fel_cont With 1 For fel_cont = 2 And pozitie = 1 And !Inlist(Left(cont_coresp, 2), '51', '53')
		
		Select xcont
		Replace All tipuri_part With Alltrim(Str(tip)), conturi_exc With Nvl(Alltrim(exceptie), '')
		Replace All explic_cont With Alltrim(explic_cont) + [ INCASARI], contpart With Alltrim(contpart) + [0] For Inlist(Left(cont_part, 2), '51', '53') And pozitie = 0
		Replace All explic_cont With Alltrim(explic_cont) + [ PLATI], contpart With Alltrim(contpart) + [1] For Inlist(Left(cont_part, 2), '51', '53') And pozitie = 1
		
		Scan For !Deleted()
			Scatter Name oxcont
			i = Recno()
			Locate For Alltrim(contpart) = Alltrim(oxcont.contpart) And (pozitie # oxcont.pozitie Or tip # oxcont.tip Or (pozitie = oxcont.pozitie And (cont_coresp # oxcont.cont_coresp Or exceptie # oxcont.exceptie)))
			If Found()
				lcTip = Alltrim(tipuri_part)
				lcExc = Nvl(Alltrim(conturi_exc), '')
		*!*	modificare	10.09.2013	:	la diminuarea creantelor clientilor incerti ( 4118-4427 si 654-4118 ) nu
		*!*			se cerea documentul pereche pentru 4118, deoarece fel_cont ( lnFel ) era egal cu pozitia si nu mai intra
		*!*			pe ramura cu "If lnPozitie # lnFelCont And lnCuIreg = 1 And Thisform.ID_SET <> 45" de mai jos
				If pozitie # oxcont.pozitie
					lnFel = fel_cont
				Else
					lnFel = pozitie
				Endif
		
		*!*			If pozitie # oxcont.pozitie
		*!*				llSchimbaPozitie = .T.
		*!*			Else
		*!*				llSchimbaPozitie = .F.
		*!*			Endif
		*!*	modificare	10.09.2013	^
				Delete
				Goto i
		*!*	modificare	10.09.2013
				Replace pozitie With lnFel
		*!*			If llSchimbaPozitie
		*!*				Replace pozitie With Iif(pozitie=fel_cont,Mod(fel_cont+1,2),pozitie)
		*!*			Endif
		*!*	modificare	10.09.2013	^
				Replace tipuri_part With Alltrim(tipuri_part) + ',' + lcTip
				If !Empty(conturi_exc)
					Replace conturi_exc With Alltrim(conturi_exc) + ',' + lcExc
				Else
					Replace conturi_exc With lcExc
				Endif
			Else
				Goto i
			Endif
		Endscan
		Release oxcont
		
		*!* caut conturile cu asociere de parteneri dupa gestiuni - nu mai cer partenerul daca au asociere definita
		If oxset.model > 1 && ROAGEST, ROAOBINV
			lcSql = [select distinct cont from asociere_parteneri_gestiuni]
			lnSucces = goExecutor.oExecute(lcSql, "crsConturiParteneriGestiuni")
			If lnSucces < 0
				aMessagebox(goExecutor.cEroare, 0 + 16, "Eroare")
				Create Cursor crsConturiParteneriGestiuni (Cont c(4))
			Endif
		Else
			Create Cursor crsConturiParteneriGestiuni (Cont c(4))
		Endif
		
		Select xcont
		Scan
			lcContExtins = contpart
			lcCont = cont_part
			lcExplic = Lower(Alltrim(explic_cont))
			lnPozitie = pozitie
			lnFelCont = fel_cont
			lnCuIreg = cu_inregistrari
			lnCuProcTva = cu_proc_tva
		
		*!* daca contul are asociere gestiune - partener in gestiune nu mai cer partenerul - se va completa automat in nir.inainte_de_do_termin
			Select crsConturiParteneriGestiuni
			Locate For Alltrim(Cont) = Alltrim(lcCont)
			If Found()
				Loop
			Endif
		
			Select xitems
			Locate For id_item = 66
			Scatter Name opart
			opart.label_item = Alltrim(opart.label_item) + ' ' + lcExplic + '(' + Alltrim(lcCont) + ')'
			opart.var_item = 'V' + Alltrim(lcContExtins)
			Select cerere
			lcexplicatie = NUME_SET
			Append Blank
			Replace NUME_SET With lcexplicatie
			Gather Name opart
			Release opart
		
			* NU CER DOCUMENT PERECHE PENTRU COMPENSARI AUTOMATE +/- 401/409/411/419 (106XX) SAU PENTRU ACH. PLATITA DIN 542 (45)
			If lnPozitie # lnFelCont And lnCuIreg = 1 And !oxset.NU_DOC_PERECHE AND !Inlist(Thisform.ID_SET, 45, 10613, 10614, 10621, 10622, 10623, 10624) 	&&	modificare 22.11.2006 && 10613/10614/10621/10622/10623/10624 = comenpensare facturi clienti/furnizori/avans clienti/avans furnizori
		*And Thisform.id_set < 1000000	
		*	daca e nota definita de utilizator, atunci nu cer doc. pereche
		*	deoarece nu am campul cu "suma" si nici nu multiplica notele care trebuie
		
				Select xitems
				Locate For id_item = 67
				Scatter Name opart
				opart.label_item = Alltrim(opart.label_item) + ' ' + lcExplic + '(' + Alltrim(lcCont) + ')'
				opart.var_item = 'P' + Alltrim(lcContExtins)
				Select cerere
				lcexplicatie = NUME_SET
				Append Blank
				Replace NUME_SET With lcexplicatie, cu_proc_tva With lnCuProcTva
				Gather Name opart
				Release opart
			Endif
		*!*		IF gnResponsabLaIncasare = 1 AND lcCont = '5311' AND lnPozitie = 0
		*!*
		*!*		ENDIF
			Select xcont
		Endscan
		
		If Used('verif_part')
			Use In verif_part
		Endif
		
		If Used('tcont')
			Use In tcont
		Endif
		
		
		Select cerere
		Replace All NR_ITEM With Recno()
		Replace id_tipdoc With Null For id_tipdoc = 0
		Replace tip_item With 'X' For Empty(tip_item)
		Local lcNumeFisIndex
		lcNumeFisIndex = gcTempPath + [\] + Sys(2015) + [.cdx]
		Thisform.cnumefisindex = lcNumeFisIndex
		Select cerere
		Index On Str(prioritate, 3) + Str(NR_ITEM, 10) Tag ordine Of &lcNumeFisIndex
		*!*	modificare migrare v 1.0	>	v 2.0
		lcobj = This.pcobj
		If Thisform.ID_SET = 229
			Select cerere
			Locate For id_item = 66	&&	partener rezervare
			If Found()
				Replace label_item With 'Client rezervare', var_item With 'vpart_rez'
				AddProperty(&lcobj, 'VID_PART_REZ', 0)
			Endif
		Endif
		*!*	modificare migrare v 1.0	>	v 2.0	^
		****************************************************
		Local MAXITEMS, OX, OC
		OC = Thisform
		OX = This.ITEMS
		
		Select cerere
		Calculate Cnt() To MAXITEMS
		*!* 15.07.2011
		*!*	MM = Iif(MAXITEMS>14,14,MAXITEMS)
		MM = Iif(MAXITEMS > 25, 25, MAXITEMS)
		*!* 15.07.2011 ^
		OX.Height = MM * (OX.ITEM1.Height - 1) + 2 * OX.ITEM1.Top
		OC.lb_titlu_alb_b121.Caption = Proper(Thisform.cdenumire_set)
		*!*	modificare	ROAAUTO v 2.0.35
		OC.Height = OX.Height + Thisform._shape1.Height
		*!*	OC.Height = OX.Height+80
		*!*	OX.Top = OC.Top+60
		*!*	OX.Left = OC.Left + OC.Width/2-OX.Width/2
		*!*	modificare	ROAAUTO v 2.0.35	Y
		lcobj = This.pcobj
		
		lnNrIt = 0
		lnNrIt2 = 0
		lnNrRecalc = 0
		lnNrRecalc2 = 0
		i = 0
		
		Select cerere
		Scan
		*	I=NR_ITEM
			i = i + 1
			N = Alltrim(Str(i))
		*!*		modificare serii numere	- 10.2007
			If tip_item = 'L'
				With OX
					lcItem = 'ITEM' + N
					lcItemNou = 'ITEM00' + N
					lnTop = .&lcItem..Top
					lnLeft = .&lcItem..Left
					lnTabIndex = .&lcItem..TabIndex	&&	modificare	ROAGEST v 2.2.6
					.RemoveObject(lcItem)
					.AddObject(lcItemNou, [ITEM_SERII], lcobj, Alltrim(x_init_val), Alltrim(var_item), Alltrim(camp_lista))
					With .&lcItemNou.
						.Top = lnTop
						.Left = lnLeft
						.TabIndex = lnTabIndex		&&	modificare	ROAGEST v 2.2.6	: am pus lnTabIndex in loc de i
						.Visible = .T.
					Endwith
				Endwith
			Else
		*!*		modificare serii numere	- 10.2007	^
				If Lower(Alltrim(var_item)) = 'tottva'
					lnNrIt = i
				Endif
				If Lower(Alltrim(var_item)) = 'neimpozab'
					lnNrIt2 = i
				Endif
				If Lower(Alltrim(var_item)) = 'totftva'
					lnNrRecalc = i
				Endif
				If Lower(Alltrim(var_item)) = 'suma'
					lnNrRecalc2 = i
				Endif
		
				Z = 'OX.ITEM' + N + '.VISIBLE=.T.'
				&Z
		*!*		modificare serii numere	- 10.2007
				Z = 'OX.ITEM' + N + '.ID_TIPDOC=' + Alltrim(Str(Nvl(id_tipdoc, -99)))
				&Z
		*!*		modificare serii numere	- 10.2007	^
				Z = 'OX.ITEM' + N + '.LABEL_ITEM1.CAPTION="' + Upper(Alltrim(label_item)) + '"'
				&Z
				lcVar = lcobj + '.' + Alltrim(var_item)
				If Type('&lcVar') = 'U'
					lEValInit = Evaluate(Alltrim(x_init_val))
					x = AddProperty(&lcobj, Alltrim(var_item), lEValInit)
				Endif
				If id_item = 66 && adaugare poAct.id_vv401
					lEValInit = 0
					x = AddProperty(&lcobj, 'id_v' + Alltrim(var_item), lEValInit)
				Endif
				Z = 'OX.ITEM' + N + '.TEXT_ITEM1.CONTROLSOURCE="' + lcobj + '.' + Alltrim(var_item) + '"'
				&Z
				Z = 'OX.ITEM' + N + '.pcobj = "' + lcobj + '"'
				&Z
				Z = 'OX.ITEM' + N + '.TEXT_ITEM1.format="' + Alltrim(xformat) + '"'
				&Z
		*	Z='OX.ITEM'+N+'.TEXT_ITEM1.inputmask="'+ALLTRIM(xinputmask)+'"'
				If !Empty(Alltrim(xinputmask))
					Z = [OX.ITEM] + N + [.TEXT_ITEM1.inputmask = '] + Evaluate(Alltrim(xinputmask)) + [']
					&Z
				Endif
				Z = 'OX.ITEM' + N + '.FIS_LISTA="' + Alltrim(FIS_LISTA) + '"'
				&Z
				Z = 'OX.ITEM' + N + '.CAMP_LISTA="' + Alltrim(camp_lista) + '"'
				&Z
				Z = 'OX.ITEM' + N + '.LABEL_ITEM="' + Upper(Alltrim(label_item)) + '"'
				&Z
				Z = 'OX.ITEM' + N + '.TEXT_ITEM1.readonly=xreadonly'
				&Z
				Z = 'OX.ITEM' + N + '.id_fisier="' + Alltrim(id_fisier) + '"'
				&Z
				Z = 'OX.ITEM' + N + '.id_item=' + Alltrim(Str(id_item))
				&Z
		*!*	modificare 20.09.2007
				Z = 'OX.ITEM' + N + '.filtru="' + Alltrim(filtru) + '"'
				&Z
		*!*	modificare 20.09.2007	^
				Z = 'OX.ITEM' + N + '.nProc_tva=' + Alltrim(Str(cu_proc_tva))
				&Z
		*!*	modificare	21.08.2013	:	dezactivez campul data_scadenta daca e scadenta automata
				If Inlist(gcNumeProgram, [ROAFACTURARE], [ROADEVIZE]) And gnScadentaAutomata = 1 And id_item = 5
					Z = 'OX.ITEM' + N + '.TEXT_ITEM1.enabled = .T.'
					&Z
				Endif
		*!*	modificare	21.08.2013	^
		&&	modificare 06.03
		&&	casa de marcat
				If !Empty(Thisform.variabile)
					lcProprObiect = Upper(lcobj + [.] + Alltrim(var_item))			&&	modificare	14.10.2013 : upper
					lcProprFisier = Lower(Alltrim(FIS_LISTA))
					lnindex = Ascan(Thisform.variabile, lcProprObiect, 1, Alen(Thisform.variabile, 1), 1, 15)
					If lnindex > 0
						If Thisform.variabile[lnindex, 3]
							Z = 'OX.ITEM' + N + '.TEXT_ITEM1.tabstop=.F.'
							&Z
							If Inlist(lcProprFisier, 'vnom_parteneri')
								lcContul = Strextract(lcProprObiect, '.V')
								Select xcont
								Locate For Val(contpart) = Val(lcContul)
								lcContul = cont_part
								lcTip = Alltrim(tipuri_part)
								lcProprObiectId = 'POACT.ID_V' + Substr(lcProprObiect, 7) && poact.id_v4111
								lnindexId = Ascan(Thisform.variabile, m.lcProprObiectId, 1, Alen(Thisform.variabile, 1), 1, 15)
								Replace idpart With Val(Thisform.variabile[lnindexId, 2])
								Replace numepart With Thisform.variabile[lnindex, 2]
								&lcProprObiect = Thisform.variabile[lnindex, 2]
								&lcProprObiectId = Thisform.variabile[lnindexId, 2]
							Endif
						Else
							Z = 'OX.ITEM' + N + '.TEXT_ITEM1.tabstop=.T.'
							&Z
						Endif
		*!*	modificare 31.10.2006
						If Thisform.variabile[lnIndex, 4]
							Z = 'OX.ITEM' + N + '.TEXT_ITEM1.enabled=.F.'
							&Z
						Else
							Z = 'OX.ITEM' + N + '.TEXT_ITEM1.enabled=.T.'
							&Z
						Endif
		*!*	modificare 31.10.2006	^
					Endif
				Endif
		&&	sfarsit modificare 06.03
		*!*		modificare serii numere	- 10.2007
			Endif
		*!*		modificare serii numere	- 10.2007	^
			Select cerere
		Endscan
		
		*!*	modificare 05.02
		*!*	If lnNrIt <> 0
		*!*		Z = [ox.cotaTva.top = ox.item] + Alltrim(Str(lnNrIt)) + [.top]
		*!*		&Z
		*!*		This.ITEMS.cotaTVA.Visible = .T.
		*!*		If lnNrRecalc <> 0
		*!*			This.ITEMS.cotaTVA.Tag = Alltrim(Str(lnNrRecalc))
		*!*		Else
		*!*			This.ITEMS.cotaTVA.Tag = Alltrim(Str(lnNrIt))
		*!*		Endif
		*!*		This.ITEMS.label4.Top = This.ITEMS.cotaTVA.Top - This.ITEMS.label4.Height
		*!*		This.ITEMS.label4.Visible = .T.
		
		*!*		Select cote_tva
		*!*		Go Top
		*!*		m.ctva = proc_tva
		*!*		lnproc = procent
		*!*		This.ITEMS.cotaTVA.Value = Alltrim(Str(lnproc))
		*!*		This.pctva = Alltrim(Str(lnproc))
		*!*		This.pntva = m.ctva
		*!*	Endif
		If lnNrIt <> 0
		
			Z = [ox.cbo_taxabil.top = ox.item] + Alltrim(Str(lnNrIt)) + [.top]
			&Z
			This.ITEMS.cbo_Taxabil.Visible = .T.
			If lnNrRecalc <> 0
				This.ITEMS.cbo_Taxabil.Tag = Alltrim(Str(lnNrRecalc))
			Else
				This.ITEMS.cbo_Taxabil.Tag = Alltrim(Str(lnNrIt))
			Endif
			This.ITEMS.lb_taxabil.Top = This.ITEMS.cbo_Taxabil.Top - This.ITEMS.lb_taxabil.Height
			This.ITEMS.lb_taxabil.Visible = .T.
		
			Select crsjtax
			Locate For id_jtva_coloana = oxset.id_jtax
			If !Found()
				Go Top
			Endif
			lcDenumire = Alltrim(denumire)
			This.id_jtax = id_jtva_coloana
			This.ntvatax = (cota_Tva + 100 ) / 100
			This.id_jtva = id_tva
			This.ITEMS.cbo_Taxabil.Value = lcDenumire
		
			* COD TAXA SAFT pentru TVA
			If m.gl406
				OX.lb_saft.Top = OX.cbo_Taxabil.Top + OX.cbo_Taxabil.Height + 5
				OX.cbo_saft.Top = OX.lb_saft.Top + OX.lb_saft.Height
				OX.lb_saft.Visible = .T.
				OX.cbo_saft.Visible = .T.
			Endif
		ELSE
			* ar trebui sa fie vizibil doar daca este o operatie taxabila (vezi mai sus) sau Taxa cu retinere la sursa (WHT)
			* trebuie verificat in xsets daca setul are nevoie de WHT
			If m.lnNrRecalc2<> 0 AND m.gl406 AND oxset.wht
				* COD TAXA SAFT
				Z = [ox.cbo_saft.top = ox.item] + Alltrim(Str(m.lnNrRecalc2)) + [.top]
				&Z
				OX.lb_saft.Top = ox.cbo_saft.top && ox.cbo_saft.top - ox.cbo_saft.height
				OX.lb_saft.Visible = .T.
				OX.cbo_saft.Visible = .T.
			ENDIF 
		Endif
		
		* COD MECANISM PLATA SAFT
		* daca xsets.plata setul are o plata si trebuie sa apara combo mecanism plata
		If m.gl406 AND oxset.plata
			OX.lb_plata_saft.Visible = .T.
			OX.cbo_plata_saft.Visible = .T.
		Endif
		
		
		If lnNrIt2 <> 0
			Z = [ox.cbo_netaxabil.top = ox.item] + Alltrim(Str(lnNrIt2)) + [.top]
			&Z
			This.ITEMS.cbo_netaxabil.Visible = .T.
			This.ITEMS.cbo_netaxabil.Tag = Alltrim(Str(lnNrIt2))
			This.ITEMS.lb_netaxabil.Top = This.ITEMS.cbo_netaxabil.Top - This.ITEMS.lb_netaxabil.Height
			This.ITEMS.lb_netaxabil.Visible = .T.
		
			Select crsjnetax
			Locate For id_jtva_coloana = oxset.id_jnetax
			If !Found()
				Go Top
			Endif
			lcDenumire = Alltrim(denumire)
			This.id_jnetax = id_jtva_coloana
			This.ntvanetax = (cota_Tva + 100 ) / 100
			This.ITEMS.cbo_netaxabil.Value = lcDenumire
			This.nTaxCodeN = taxcode
		Endif
		*!*	modificare 05.02	^
		
		*!*	OX.Paint
		*!*	modificare	16.09.2009
		*!* 07.09.2009
		*!*	ox.visible = .T.
		*!* 07.09.2009 ^
		*!*	modificare	16.09.2009	^
		Set Index To
		*!*	modificare	v 2.2.20
		If Inlist(oxset.ID_SET, 10457, 10424) OR ALLTRIM(NVL(oxset.tipjurnal,'')) = 'JC'
			Thisform.ITEMS.ck_deducere.Visible = .T.
		ENDIF
		IF INLIST(oxset.id_set, 10609) && limitare deducere 50% cu frm_introd_compact2007
			Thisform.ITEMS.ck_deducere.Value = 1
		ENDIF 
		*!*	modificare	v 2.2.20	^
		Release lcNumeFisIndex
	ENDPROC

	PROCEDURE adunadate
		*!*	28.05.2009
		*!*	alex.lepadatu
		*!*	anulez efectele conversiei dintre valuta de incasare si valuta facturii
		*!*	mact.id_valuta = poact.id_valuta2 (daca var_xnote = nume_val2)
		*!* 03.06.2009
		*!* marius.mutu
		*!* cursul si valuta pentru diferenta de curs din tabelul cu facturile alese in loc de variabile
		*!* pentru incasari/plati in alta valuta decat a facturii
		*!*	i=11=> nume_val, mact.nume_val = poAct.nume_val2
		
		*!* 28.02.2012
		*!* marius.mutu
		*!*	4426=4427 completare id_set-uri noi pt. notele TVA CE,TI - au TVA taxare inversa
		
		*!*	20.06.2012
		*!*	marius.atanasiu	- #3325
		*!*	am completat id_valuta si numeval cu valuta aleasa in formular
		
		*!* 30.09.2015
		*!* marius.mutu
		*!* calculcompens_part primeste tnProcTva = 0/1 daca contul este defalcat dupa cota TVA in ireg_parteneri (409,419)
		*!* la compensare nu se punea cota de TVA din facturi pt. conturile 409,419
		
		*!* 16.12.2015
		*!* marius.mutu
		*!* se modifica nota 4426 = 401 in 4426 = 4427 pentru achizitii taxare inversa, CE 20%
		
		*!* 04.02.2016
		*!* marius.mutu
		*!* completare analitice pe baza de grupuri utilizatori si pe baza de explicatii TVA
		
		*!* 17.08.2016
		*!* marius.mutu
		*!* creeaza_note_tva_incasare. exceptie pentru set 10411: repunere cheltuieli in avans 6xx = 471 (471 are acelasi id ca factura 401 si o gaseste in Reg. Cump)
		
		*!* 30.09.2016
		*!* marius.mutu
		*!* in ROAGEST nu completez analitice dupa explicatiile de tva aici, pentru ca nu sunt generate explicatiile de TVA de la articole inca
		*!* se completeaza in NIR.inainte_de_do_termin
		
		*!* 25.01.2017
		*!* marius.mutu
		*!* se modifica nota 4426 = 401 in 4426 = 4427 pentru achizitii servicii CE 19% id_jtva = 191
		
		
		*!* 02.01.2018
		*!* marius.mutu
		*!* modificare cont Split TVA banca lei/valuta din 5121/5124 in 5126/5127
		
		*!* 22.01.2018
		*!* marius.mutu
		*!* Exigibilizare TVA Incasare pentru Bilete la Ordin 403/413 la inregistrarea BO sau la incasarea BO, in functie de optiunea gnRC_BO_EXIGIBILIZARE
		
		*!* 31.01.2018
		*!* marius.mutu
		*!* exigibilizare tva incasare la girare efecte comerciale id_set 10628 403 = 413 
		
		*!* 15.02.2018
		*!* marius.mutu
		*!* contul Y nu era completat
		
		*!* 12.06.2018
		*!* poAct.nume_val3 -> poAct.nume_val, poAct.id_valuta3 -> poAct.id_valuta (id_set 10633 schimb valutar intre conturi)
		
		*!* 06.04.2020
		*!* marius.mutu
		*!* completez actactan.suma, suma_val din xxnote, daca este completat in xxnote (din note definite de utilizator)
		
		*!* 13.07.2020
		*!* marius.mutu
		*!* completeza actactan.id_sectie, sectie, id_lucrare, nrord, id_responsabil, nresp, id_venchelt, dst_chlt din xnote (note definite de utilizator)
		
		*!*	18.05.2023
		*!*	Regularizare 408 = 401, 418 = 4111 sa puna corect TAXCODE SAFT 
		
		*!*	09.11.2023
		*!*	Regularizare 408 = 401, 418 = 4111 sa puna corect TAXCODE SAFT pentru furnizori TVA Incasare 301301 in loc de 301101
		
		*!*	05.03.2026
		*!*	Completare proc_tva, id_jtva_coloana din xnote pentru notele definite de utilizatori id_set >= 1000000
		
		Local lcCont, lcContPart, lcContPartExtins, lcCursor, lcCursorDefTVA, lcDateFactura, lcExceptii
		Local lcExtensieC, lcExtensieD, lcFis, lcFisC, lcFisD, lcNumePart, lcProcedura, lcSCTrez, lcSql
		Local lcobj, llFactura, llVal, ll_cond, lnCount, lnFelCont, lnIdFact, lnIdPart, lnInvers, lnNrAct, lcExplicatia4118
		Local lnNrcampuri, lnPoz, lnSucces
		Local NRNOTE, SIRDEVAR
		LOCAL llExigibilizareBOInregistrare, llExigibilizareBOIncasare
		Local llFurnizorRTVAI, llN100, llN50, llTVAIncasare, lnIdJtvaNeex
		Private pnReturnValue, pcContPart
		pnReturnValue = 0
		pcContPart = ""
		
		lcExplicatia4118 = []
		*:Global R, T, Z, i, mact, opar, otva, pcSirFacturi, ulit
		NRNOTE=0
		Store '' To SIRDEVAR
		lcobj = This.pcobj
		AddProperty(&lcobj,'proc_tva',This.ntvatax)
		AddProperty(&lcobj,'id_jnetax',This.id_jnetax)
		AddProperty(&lcobj,'id_jtax',This.id_jtax)
		AddProperty(&lcobj,'id_jtva',This.id_jtva)
		AddProperty(&lcobj,'tva_incasare',Thisform.items.ck_tva_la_incasare.Value)	&&	modificare	ROACONT v 2.4.0
		AddProperty(&lcobj,'staxcode',This.nTaxCode)
		AddProperty(&lcobj,'staxcoden',This.nTaxCodeN)
		AddProperty(&lcobj,'spaymentcode',This.cPaymentCode)
		
		llTVAIncasare = This.items.ck_tva_la_incasare.Visible And (This.items.ck_tva_la_incasare.Value = 1) And Empty(Nvl(This.FORMGEST,'')) && doar pentru seturile simple (fara gestiune, frm_introd_compact); altfel se afecteaza cod bazat pe conturi din gestiune
		Select ACTACTAN
		Zap
		Scatter Name mact Blank
		
		Select * From XNOTE;
			WHERE ID_SET=Thisform.ID_SET;
			INTO Cursor XXNOTE Order By NR_NOTA
		
		If _Tally=0
			If XSETS.MODEL#-1  && pentru rate-leasing, plati impozite, achizitii furnizori
				* DO MESAJ WITH 'SETUL DE NOTE NU ESTE COMPLETAT',''
				AMESSAGEBOX("Setul de note nu este completat!",0+48,"Atentie")
			Endif
			*Thisform.Release
			Return
		ENDIF
		&& ADAUG IN ACTACTAN
		*SET STEP ON 
		Select XXNOTE
		Go Bott
		NRNOTE=NR_NOTA
		lnNrcampuri = Fcount('xact')-1
		Select XXNOTE
		Scan
			R=Recno()
			SIRDEVAR='UTIL,DATAORA'
		
			For i =lnNrcampuri To 1 Step -1
				If Inlist(i,1,7,8,10,17,18,19,20)
					Loop
				Endif
				Select XXNOTE
				Z='VAR_XNOTE=ALLTRIM(X' + Alltrim(Str(i)) + ')'
				&Z
				Select XACT
				Locate
				T='VAR_XACT=ALLTRIM(X' + Alltrim(Str(i)) + ')'
				&T
				If !Empty(VAR_XNOTE)
					If (Type('MACT.'+ VAR_XNOTE) # 'U' And !(Inlist(i,25,28) And VAR_XNOTE = 'nract') And i <> 21) Or INLIST(i,2,11) && fel document, valuta
						*!* 03.06.2009
						*!* marius.mutu
						*!*	i=11=> nume_val, mact.nume_val = poAct.nume_val2
						*!*					Z='MACT.'+ VAR_XNOTE + '=' + This.pcobj + '.' +VAR_XNOTE
						Z='MACT.'+ Iif(i=2, 'fdoc', Iif(i=11, 'nume_val', VAR_XNOTE)) + '=' + This.pcobj + '.' +VAR_XNOTE
						&Z
						If !Empty(VAR_XACT)
							*!*					28.05.2009
							*!*					alex.lepadatu
							*!*					mact.id_valuta = poact.id_valuta2 (daca var_xnote = nume_val2)
							Z='MACT.'+ VAR_XACT + '=' + This.pcobj + '.' + Iif(Lower(VAR_XNOTE) = 'nume_val2','id_valuta2',Iif(Lower(VAR_XNOTE) = 'nume_val3','id_valuta3',Iif(Lower(VAR_XNOTE) = 'fdocpl','id_fdoc2',VAR_XACT)))
							&Z
						Endif
					Else
						If Type(This.pcobj + '.' +VAR_XNOTE) # 'U'
							Z='MACT.'+ VAR_XACT + '=' + This.pcobj + '.' +VAR_XNOTE
							&Z
						Endif
					Endif
		
				Endif
				Select XXNOTE
			Next
		
			Select XXNOTE
			mact.SCD=XSCD
			mact.SCC=XSCC
			mact.ascd=xascd
			mact.ascc=xascc
			mact.ID_SET=ID_SET
			mact.NR_NOTA=NR_NOTA
			mact.proc_Tva = This.ntvatax
			If Empty(Nvl(mact.explicatia, ''))
				mact.explicatia = explicatia
			Endif
			If Empty(Nvl(mact.explicatia4, ''))
				mact.explicatia4 = explicatia4
			Endif
			If Empty(Nvl(mact.explicatia5, ''))
				mact.explicatia5 = explicatia5
			ENDIF
			IF !EMPTY(xxnote.suma) AND EMPTY(mact.suma)
				mact.suma = xxnote.suma
			ENDIF 
			IF !EMPTY(xxnote.suma_val) AND EMPTY(mact.suma_val)
				mact.suma_val = xxnote.suma_val
			ENDIF 	
		
			IF !EMPTY(xxnote.sectie) AND EMPTY(mact.sectie)
				mact.sectie = xxnote.sectie
			ENDIF 
			IF !EMPTY(xxnote.id_sectie) AND EMPTY(mact.id_sectie)
				mact.id_sectie = xxnote.id_sectie
			ENDIF 
			IF !EMPTY(xxnote.nrord) AND EMPTY(mact.nrord)
				mact.nrord = xxnote.nrord
			ENDIF 
			IF !EMPTY(xxnote.id_lucrare) AND EMPTY(mact.id_lucrare)
				mact.id_lucrare = xxnote.id_lucrare
			ENDIF 
			IF !EMPTY(xxnote.nresp) AND EMPTY(mact.nresp)
				mact.nresp = xxnote.nresp
			ENDIF 
			IF !EMPTY(xxnote.id_responsabil) AND EMPTY(mact.id_responsabil)
				mact.id_responsabil = xxnote.id_responsabil
			ENDIF 
			IF !EMPTY(xxnote.dst_chlt) AND EMPTY(mact.dst_chlt)
				mact.dst_chlt = xxnote.dst_chlt
			ENDIF 
			IF !EMPTY(xxnote.id_venchelt) AND EMPTY(mact.id_venchelt)
				mact.id_venchelt = xxnote.id_venchelt
			ENDIF 
			IF !EMPTY(xxnote.contract) AND EMPTY(mact.contract)
				mact.contract = xxnote.contract
			ENDIF 
			IF !EMPTY(xxnote.id_ctr) AND EMPTY(mact.id_ctr)
				mact.id_ctr = xxnote.id_ctr
			ENDIF 
			IF !EMPTY(xxnote.taxcode) AND EMPTY(NVL(mact.taxcode,0))
				mact.taxcode = xxnote.taxcode
			ENDIF 					
			IF !EMPTY(xxnote.paymentcode) AND EMPTY(NVL(mact.paymentcode,''))
				mact.paymentcode = xxnote.paymentcode
			ENDIF 	
					
		*	********************
		*	Suprascriere id_jtva_coloana si proc_tva pentru note definite de utilizator
		*	*********************
			If !EMPTY(NVL(xxnote.proc_tva,0)) AND mact.id_set >= 1000000
				mact.proc_tva = xxnote.proc_tva
			ENDIF 	
			If !EMPTY(NVL(xxnote.id_jtva_coloana,0)) AND mact.id_set >= 1000000	
				mact.id_jtva_coloana = xxnote.id_jtva_coloana
			Endif
			
			Select ACTACTAN
			Append Blank
			Gath Name mact
			If !Empty(mact.neimpozab)
				Replace proc_Tva With This.ntvanetax,SUMA With neimpozab
			Endif
		
			*!* 04.06.2009
			*!* marius.mutu
			If Nvl(XXNOTE.suma_negativ,0) = 1
				Replace SUMA With -SUMA, suma_val With -suma_val In ACTACTAN
			Endif
		
			Scatter Name mact Blank
			Select XXNOTE
			Goto R
		Endscan
		
		Select ACTACTAN
		Locate For Inlist('U',Upper(Substr(SCD,4,1)),Upper(Substr(SCC,4,1)))
		If Found()
			ulit=Substr(m.contg,4,1)
			Replace All SCD With Left(SCD,3) + ulit For Inlist('U',Upper(Substr(SCD,4,1)))
			Replace All SCC With Left(SCC,3) + ulit For Inlist('U',Upper(Substr(SCC,4,1)))
		Endif
		
		*----------------------------------------------------------------------------
		*!*	28.05.2009
		*!*	alex.lepadatu
		*!*	anulez efectele conversiei dintre valuta de incasare si valuta facturii
		*!*	IF [ocompensari_val_2] $ LOWER(XSETS.FRM_PLATA)
		*!*		LOCATE FOR(SCD = '5124' AND SCC = '5124') OR (SCD = '5121' AND SCC = '5121')
		*!*		IF FOUND()
		*!*			REPLACE SUMA WITH -SUMA, suma_val WITH -suma_val
		*!*			&&, suma_2 With -suma_2
		*!*		ENDIF
		*!*	ENDIF
		
		*!*	modificare	ROACONT v 2.5.40
		*!*	IF USED('XCONT')
		If Used('XCONT') && AND THISFORM.ID_SET < 1000000
			*!*	modificare	ROACONT v 2.5.40	^
			*	IF TYPE('XSETS.COMPENS')#'U' and (!EMPTY(XSETS.FRM_PLATA) OR !EMPTY(XSETS.COMPENS))
			Select xcont
			Locate For Pozitie # Fel_Cont And Cu_Inregistrari = 1
			If Found()
				If Type('XSETS.valuta')#'U' And XSETS.valuta
					llVal = .T.
				Else
					llVal = .F.
				Endif
		
				*!*	modificare	v 2.5.27
				If Empty(XSETS.frm_plata)	&&	Thisform.id_set = 10613
					* conturile 409 si 419 sunt defalcate dupa TVA in inregistrari parteneri
					pnReturnValue = 0
					pcContPart = Alltrim(xcont.cont_part)
					lnSucces = goExecutor.oSelect2Value("select max(cu_proc_tva) as cu_proc_tva from vconfig_cont_ireg where cont = ?pcContPart", @pnReturnValue)
					If lnSucces < 0
						AMESSAGEBOX(goExecutor.cEroare,0+16,"Eroare")
					Else
						poAct.proc_Tva = m.pnReturnValue
					Endif
		
					If calculcompens_part(xcont.cont_part, poAct.proc_Tva, llVal, poAct.id_valuta, poAct.id_valuta2, poAct.nume_val2)
						lcFis = 'CalculCompensare'
					Else
						Return
					Endif
				Else
					*!*	modificare	v 2.5.27	^
					If llVal
						lcProcedura = 'calculcompens_valuta'
						ll_cond=.T.
					Else
						lcProcedura = 'calculcompens'
						ll_cond=.F.
					Endif
		
					Select xcont
					Calculate Cnt() To lnCount For Cu_Inregistrari = 1 And Pozitie # Fel_Cont
					If lnCount = 1
						Select xcont
						Locate For Cu_Inregistrari = 1 And Pozitie # Fel_Cont
						lcCont = Alltrim(cont_part)
						lcFis = 'actcv' + lcCont
					Else
						Locate For Cu_Inregistrari = 1 And Pozitie = 0 And Fel_Cont = 1
						lcFisD = 'actcv' + Alltrim(cont_part)
						Locate For Cu_Inregistrari = 1 And Pozitie = 1 And Fel_Cont = 0
						lcFisC = 'actcv' + Alltrim(cont_part)
						If Used(lcFisD) And Used(lcFisC)
							Do &lcProcedura With lcFisD, lcFisC In ocompensari.prg
							lcFis = 'CalculCompensare'
						Else
							lcFis = 'EroareCompletare'
						Endif
					Endif
					*!*	modificare	v 2.5.27
				Endif
				*!*	modificare	v 2.5.27	^
		
				Set Deleted On
				Private oact,osalv
				Select ACTACTAN
				Go Bottom
				Scatter Name osalv
		
				Delete
				If Used(lcFis)
					*!*	modificare	v 2.5.26
					Local lcCursorTVAIncTemp
					lcCursorTVAIncTemp = Sys(2015)
					copiaza_structura_cursor([actactan],lcCursorTVAIncTemp)
					*!*	modificare	v 2.5.26 ^
		
					Select (lcFis)
					Scan For ales
						Scatter Name oact
		
						If Type(lcFis+'.ascd')!="U"
							osalv.ascd=oact.ascd
							If Type('oact.nract') # 'U'
								osalv.perecheD = oact.nract
							Else
								osalv.perecheD = oact.nr_doc_d
							Endif
							If Type('oact.id_fact') # 'U'
								osalv.id_factD = oact.id_fact
							Else
								osalv.id_factD = oact.id_factD
							Endif
		
							If Empty(osalv.ascc) And !Empty(This.ACONT)
								osalv.ascc=This.ACONT
							Endif
						Endif
		
						If Type(lcFis+'.ascc')!="U"
							osalv.ascc=oact.ascc
							If Type('oact.nract') # 'U'
								osalv.perecheC=oact.nract
								If Type('glListareChitanta')<>'U' And glListareChitanta
									*!*	modificare	v 2.5.37 : am adaugat si oact.serie_act
									lcDateFactura = Iif(!Isnull(oact.serie_act),Alltrim(oact.serie_act)+' ','')+;
										TRANSFORM(oact.nract) + [ din ] + Dtoc(oact.dataact) + [, ]
									If !(lcDateFactura$pcSirFacturi)
										pcSirFacturi = pcSirFacturi + lcDateFactura
									Endif
								Endif
							Else
								osalv.perecheC = oact.nr_doc_c
							Endif
		
							If Type('oact.id_fact') # 'U'
								osalv.id_factC = oact.id_fact
							Else
								osalv.id_factC = oact.id_factC
							Endif
		
							If Empty(osalv.ascd) And !Empty(This.ACONT)
								osalv.ascd=This.ACONT
							Endif
						Endif
		
						*!*					If Type(lcFis+'.proc_tva')!="U"
						*!*						osalv.proc_Tva=oact.proc_Tva
						*!*					Endif
						If Type(lcFis+'.id_jtvacol')!="U"
							osalv.id_jtva_coloana=oact.id_jtvacol
							If Type(lcFis+'.proc_tva')!="U"
								Select jtva_coloane
								Locate For id_jtva_coloana = osalv.id_jtva_coloana
								If Found()
									osalv.proc_Tva=(cota_tva+100)/100
								Else
									osalv.proc_Tva = 0
								Endif
								If Empty(Nvl(oact.id_jtvacol,0)) And !Empty(oact.proc_Tva)
									Do Case
										Case ((Alltrim(osalv.SCD)$'408' And Alltrim(osalv.SCC)$'401,404,462') Or ;
												(Alltrim(osalv.SCC)$'409' And Alltrim(osalv.SCD)$'401,404,462'))
											Do Case
												Case osalv.proc_Tva = 1.24
													osalv.id_jtva_coloana = 156
												Case osalv.proc_Tva = 1.20
													osalv.id_jtva_coloana = 176
												Case osalv.proc_Tva = 1.19
													osalv.id_jtva_coloana = 106
												Case osalv.proc_Tva = 1.09
													osalv.id_jtva_coloana = 111
												Case osalv.proc_Tva = 1.05
													osalv.id_jtva_coloana = 154
												Case osalv.proc_Tva = 1
													osalv.id_jtva_coloana = 113
											Endcase
										Case ((Alltrim(osalv.SCC)$'418' And Alltrim(osalv.SCD)$'4111,4118,461') Or ;
												(Alltrim(osalv.SCD)$'419' And Alltrim(osalv.SCC)$'4111,4118,461'))
											Do Case
												Case osalv.proc_Tva = 1.24
													osalv.id_jtva_coloana = 15
												Case osalv.proc_Tva = 1.20
													osalv.id_jtva_coloana = 27
												Case osalv.proc_Tva = 1.19
													osalv.id_jtva_coloana = 1
												Case osalv.proc_Tva = 1.09
													osalv.id_jtva_coloana = 3
												Case osalv.proc_Tva = 1.05
													osalv.id_jtva_coloana = 13											
												Case osalv.proc_Tva = 1
													osalv.id_jtva_coloana = 8
											Endcase
									Endcase
								Endif
							Endif
						Endif
		
		
						*** SCHIMB ID_JTVA NEEX PENTRU REGULARIZARE FACTURA NESOSITA/NEINTOCMITA
						*** ID_JTVA SE IA DIN 408, 418, DAR TREBUIE SA FIE CONFORM BIFEI CK_TVA_LA_INCASARE
						*** 408 = 401 / 411 = 418
						*!*	modificare	v 2.4.25 : am scos conditia (Alltrim(osalv.SCD)$'419' And Alltrim(osalv.SCC)$'4111,4118,461')
						**!		pentru ca imi punea expl. de baza / TVA neexigibil la imperechere facturi - avans ( 419 - 4111 )
						If m.llTVAIncasare And (((Alltrim(osalv.SCD)$'408' And Alltrim(osalv.SCC)$'401,404,462') Or ;
								(Alltrim(osalv.SCC)$'409' And Alltrim(osalv.SCD)$'401,404,462')) Or ;
								((Alltrim(osalv.SCC)$'418' And Alltrim(osalv.SCD)$'4111,4118,461')))
							lnIdJtvaNeex = getIdJtvaColoana(osalv.id_jtva_coloana, 1)
							If m.lnIdJtvaNeex <> 0
								osalv.id_jtva_coloana = m.lnIdJtvaNeex
							Endif
		
						Endif
		
						* 18.05.2023
						* Regularizare 408 = 401, 4111 = 418 sa puna corect TAXCODE SAFT 
						If (((Alltrim(osalv.SCD)$'408' And Alltrim(osalv.SCC)$'401,404,462') Or ;
								(Alltrim(osalv.SCC)$'409' And Alltrim(osalv.SCD)$'401,404,462')) Or ;
								((Alltrim(osalv.SCC)$'418' And Alltrim(osalv.SCD)$'4111,4118,461')))
							osalv.taxcode = GetTaxCode(m.gnAn, m.gnLuna, osalv.dataact, osalv.id_jtva_coloana, m.llTVAIncasare, .F., .F.)
						Endif
		
						*!*	modificare	v 2.5.41
						*** CLIENTI INCERTI - CRESTEREA CREANTELOR 4118 = 411
						*** fiecare document pastreaza nract, dataact, datascad originale, in scop de evaluare penalitati
						If osalv.SCD = '4118'
							If Empty(m.lcExplicatia4118)
								*** se suprascria explicatia cu numerele facturilor
								lcExplicatia4118 = Alltrim(osalv.fdoc) + ' ' + Alltrim(Transform(osalv.nract)) + ' ' + Alltrim(Transform(osalv.dataact))
							Endif
							osalv.explicatia = m.lcExplicatia4118
							osalv.explicatia5 = 'CLIENTI INCERTI'
							osalv.id_fdoc = Evl(Nvl(oact.id_fdoc,0),osalv.id_fdoc)
							osalv.fdoc = Evl(Nvl(oact.fdoc,[]),osalv.fdoc)
							osalv.serie_act = oact.serie_act
							osalv.nract = oact.nract
							osalv.dataact = Evl(Nvl(oact.dataact,{}),osalv.dataact)
							osalv.datascad = oact.datascad
							osalv.id_lucrare = oact.id_lucrare
							osalv.id_venchelt = oact.id_venchelt
						Endif
						*!*	modificare	v 2.5.41	^
		
						Select ACTACTAN
						Append Blank
						Gather Name osalv
						If Type('oact.sumaachi') # 'U'
							Replace SUMA With oact.sumaachi
						Endif
		
						*!*	ROACONT v 2.5.36 : am modificat conditia !ISNULL(oact.id_lucrare) in !EMPTY(NVL(oact.id_lucrare,0))
						If Type(lcFis+'.id_lucrare')!="U" And !Empty(Nvl(oact.id_lucrare,0))
							Select ACTACTAN
							Replace id_lucrare With oact.id_lucrare
							Replace nrord With oact.nrord
						Else
							Select ACTACTAN
							Replace id_lucrare With osalv.id_lucrare
							Replace nrord With osalv.nrord
						Endif
		
						*!*	ROACONT v 2.5.36 : am modificat conditia !ISNULL(oact.id_ctr) in !EMPTY(NVL(oact.id_ctr,0))
						If Type(lcFis+'.id_ctr')!="U" And !Empty(Nvl(oact.id_ctr,0))
							Select ACTACTAN
							Replace id_ctr With oact.id_ctr
							Replace contract With oact.contract
						Else
							Select ACTACTAN
							Replace id_ctr With osalv.id_ctr
							Replace contract With osalv.contract
						Endif
		
						*!*	ROACONT v 2.5.36 : am modificat conditia !ISNULL(oact.id_responsabil) in !EMPTY(NVL(oact.id_responsabil,0))
						If gnRESP_LA_INCASARE = 0 And Type(lcFis+'.id_responsabil')!="U" And !Empty(Nvl(oact.id_responsabil,0))
							Select ACTACTAN
							Replace id_responsabil With oact.id_responsabil
							Replace nresp With oact.nresp
						Else
							Select ACTACTAN
							Replace id_responsabil With osalv.id_responsabil
							Replace nresp With osalv.nresp
						Endif
		
						If ll_cond
							*!* 03.06.2009
							*!* marius.mutu
							*!* cursul si valuta pentru diferenta de curs din tabelul cu facturile alese in loc de variabile
							*!* pentru incasari/plati in alta valuta decat a facturii
							Select ACTACTAN
							*!*					modificare 20.06.2012 ( vezi la inceput )
							*!*						REPLACE SUMA WITH oact.achilei, suma_val WITH oact.sumaachi2, CURS WITH oact.cursval, id_valuta WITH oact.id_valuta, nume_val WITH oact.numeval
							Replace SUMA With oact.achilei, suma_val With oact.sumaachi2, Curs With oact.cursval, id_valuta With &lcobj..id_valuta, nume_val With &lcobj..nume_val
							Do Case
								Case oact.difplus>0
									Append Blank
									Gather Name osalv
									*!*							19.01.2015: 765-> 7651
									*!*								REPLACE SCC WITH '765 ', ascc WITH '', SUMA WITH oact.difplus,explicatia WITH 'DIFERENTE FAVORABILE'
									Replace SCC With '7651', ascc With '', SUMA With oact.difplus,explicatia With 'DIFERENTE FAVORABILE'
									*!*							19.01.2015: 765-> 7651		^
		
									*!*					modificare 20.06.2012 ( vezi la inceput )
									*!*							REPLACE suma_val WITH 0,CURS WITH oact.cursdif,perecheC WITH 0, id_factC WITH 0, id_valuta WITH oact.id_valuta, nume_val WITH oact.numeval
									Replace suma_val With 0,Curs With oact.cursdif,perecheC With 0, id_factC With 0, id_valuta With &lcobj..id_valuta, nume_val With &lcobj..nume_val
								Case oact.difminus>0
									Append Blank
									Gather Name osalv
									*!*					modificare 20.06.2012 ( vezi la inceput )
									*!*							REPLACE SCD WITH '665 ', ascd WITH '', SUMA WITH oact.difminus,explicatia WITH 'DIFERENTE NEFAVORABILE', id_valuta WITH oact.id_valuta, nume_val WITH oact.numeval
									*!*			19.01.2015: 665-> 6651
									*!*								REPLACE SCD WITH '665 ', ascd WITH '', SUMA WITH oact.difminus,explicatia WITH 'DIFERENTE NEFAVORABILE', id_valuta WITH &lcobj..id_valuta, nume_val WITH &lcobj..nume_val
									Replace SCD With '6651', ascd With '', SUMA With oact.difminus,explicatia With 'DIFERENTE NEFAVORABILE', id_valuta With &lcobj..id_valuta, nume_val With &lcobj..nume_val
									*!*			19.01.2015: 665-> 6651 ^
									Replace suma_val With 0,Curs With oact.cursdif ,perecheD With 0, id_factD With 0
							Endcase
						Endif
						
		
						* TVA la incasare pentru efecte comerciale devine exigibil la data incasarii prin banca sau la data girarii
						* Bilete la ordin - TVA la incasare devine exigibil in functie de optiune, la inregistrare BO sau la incasarea BO
						* Editura Eduard a inregistrat (gresit) operatia de girare ca si operatiile de acceptare BO si dorea sa se exigibilizeze la acceptare
						llExigibilizareBOInregistrare = IIF(TYPE('gnRC_BO_EXIGIBILIZARE') = 'N', IIF(NVL(m.gnRC_BO_EXIGIBILIZARE,0) = 1, .T., .F.), .F.) && 413 = 4111 sau 401 = 403
						llExigibilizareBOIncasare = IIF(TYPE('gnRC_BO_EXIGIBILIZARE') = 'N', IIF(NVL(m.gnRC_BO_EXIGIBILIZARE,0) = 0, .T., .F.), .T.) && 5311/5121 = 413
						
						*!*	modificare	ROACONT	v 2.4.0
						If Type('oact.tva_incasare_a') <> 'U' 
							IF Inlist(Thisform.ID_SET,10302,10414) AND !m.llExigibilizareBOInregistrare
								*
							ELSE 	
								If oact.tva_incasare_a = 1 OR (Inlist(Thisform.ID_SET, 10305, 10307, 10316, 10628) AND m.llExigibilizareBOIncasare) && 5xx-413 / 403-5xx / 405-5xx / 403-413
		
									Select (lcCursorTVAIncTemp)
									*!*	nu mai am nevoie de nract ca la insert, pentru ca perechec si pereched vin completate de pe Oracle
									If Type('oact.tva_incasare_d') = 'N'							
										If oact.tva_incasare_dtip = 'D' OR Thisform.ID_SET = 10628
											Locate For id_fact = oact.id_factD
											If !Found()
												Append Blank
												Gather Name osalv
												Replace id_fact With oact.id_factD, SUMA With oact.sumaachi
											Else
												Replace SUMA With SUMA + oact.sumaachi
											Endif
										Endif
										If oact.tva_incasare_ctip = 'C' OR Thisform.ID_SET = 10628
											Locate For id_fact = oact.id_factC
											If !Found()
												Append Blank
												Gather Name osalv
												Replace id_fact With oact.id_factC, SUMA With oact.sumaachi
											Else
												Replace SUMA With SUMA + oact.sumaachi
											ENDIF
										ENDIF																
									ELSE							
										*** Incasare/Plata efecte comerciale
										Locate For id_fact = oact.id_fact
										If !Found()
											Append Blank
											Gather Name osalv
											Replace id_fact With oact.id_fact, SUMA With oact.sumaachi
										Else
											Replace SUMA With SUMA + oact.sumaachi
										ENDIF
									Endif
								Endif && oact.tva_incasare_a
							ENDIF && Inlist(Thisform.ID_SET,10302,10414) AND !m.llExigibilizareBOInregistrare	
						Endif && Type('oact')
						*!*	modificare	ROACONT	v 2.4.0	^
						Select (lcFis)
					Endscan && lcFis
					*!*	modificare	v 2.5.26
		
					IF thisform.id_set <> 10411 && 10411: repunere cheltuieli in avans 6xx = 471 (471 are acelasi id ca factura 401 si o gaseste in Reg. Cump)
						Thisform.creeaza_note_tva_incasare(lcCursorTVAIncTemp)
					ENDIF 	
					Use In (lcCursorTVAIncTemp)
					*!*	modificare	v 2.5.26	^
				Endif && USED(lcFis)
				Release oact
				Release osalv
		
			Endif
		ENDIF
		
		*!*	modificare 22.11.2006
		If gcNumeProgram='ROACONT'
			* "Trezorerie > Banca > Banca in valuta > Incasari > Transferuri intre conturi aceeasi valuta"
			If Type("poact.cursdeb")<>"U" And Type("poact.curscred")<>"U" And ;
					!Empty(poAct.CURSDEB) And !Empty(poAct.CURSCRED) && pt alte programe tb sa introduc variabile globale(M.CURSDEB,m.CURSCRED)
				Select ACTACTAN
				Replace All SUMA With Round(poAct.suma_2*Min(poAct.CURSDEB,poAct.CURSCRED),gnPC)
				Do Case
					Case poAct.CURSDEB>poAct.CURSCRED
						Select ACTACTAN
						Locate For Inlist(SCD,'5124','5314') && si lista poate continua (vezi Planul de Conturi)
						Scatter Name mact
						Replace Curs With poAct.CURSCRED
						Append Blank
						Gather Name mact
						*!*							19.01.2015: 765-> 7651
						*!*					REPLACE SCC WITH '765 ',SUMA WITH ROUND(mact.suma_val*(poact.CURSDEB-poact.CURSCRED),gnPC),explicatia WITH 'DIFERENTE FAVORABILE'
		
						Replace SCC With '7651',SUMA With Round(mact.suma_val*(poAct.CURSDEB-poAct.CURSCRED),gnPC),explicatia With 'DIFERENTE FAVORABILE'
						*!*							19.01.2015: 765-> 7651 ^
		
						Replace suma_val With 0,Curs With poAct.CURSDEB
					Case poAct.CURSDEB<poAct.CURSCRED
						Select ACTACTAN
						Locate For Inlist(SCC,'5124','542')  && si lista poate continua (vezi Planul de Conturi)
						Scatter Name mact
						Replace Curs With poAct.CURSDEB
						Append Blank
						Gather Name mact
						*!*			19.01.2015: 665-> 6651
						*!*					REPLACE SCD WITH '665 ',SUMA WITH ROUND(mact.suma_val*(-poact.CURSDEB+poact.CURSCRED),gnPC),explicatia WITH 'DIFERENTE NEFAVORABILE'
						Replace SCD With '6651',SUMA With Round(mact.suma_val*(-poAct.CURSDEB+poAct.CURSCRED),gnPC),explicatia With 'DIFERENTE NEFAVORABILE'
						*!*			19.01.2015: 665-> 6651 ^
						Replace suma_val With 0,Curs With poAct.CURSCRED
				Endcase
			Endif
		
			*!* 04.06.2009
			*!* marius.mutu
			If .F.
				Select ACTACTAN
				Locate For Inlist(SCD,'667')
				If Found()
					Scatter Name mact
					If mact.proc_Tva # 1
						Select jtva_coloane
						Locate For id_jtva_coloana = mact.id_jtva_coloana
						If Found()
							mact.id_jtva_coloana = id_tva
						Endif
						Select ACTACTAN
						Append Blank
						Gather Name mact
						Replace SCD With SCC,SCC With '4427' ,SUMA With Round((mact.proc_Tva-1)*-mact.SUMA,gnPC)
					Else
						Replace neimpozab With mact.SUMA
					Endif
				Endif
				Locate For SCC='767'
				If Found()
					Scatter Name mact
					If mact.proc_Tva # 1
						Select jtva_coloane
						Locate For id_jtva_coloana = mact.id_jtva_coloana
						If Found()
							mact.id_jtva_coloana = id_tva
						Endif
						Select ACTACTAN
						Append Blank
						Gather Name mact
						Replace SCC With SCD,SCD With '4426' ,SUMA With Round((mact.proc_Tva-1)*-mact.SUMA,gnPC)
					Else
						Replace neimpozab With mact.SUMA
					Endif
				Endif
			Endif
		Endif
		*!*	modificare 22.11.2006	^
		
		
		*!* 04.06.2009
		*!* marius.mutu
		If .F.
			If This.ntvatax <> 0
				lcSql = [select distinct (case when debit = 0 then cont else cont_c end) as scd, ] + ;
					[(case when debit = 1 then cont else cont_c end) as scc ] + ;
					[from ] + gcs + [.exceptii_ireg where invers = 1]
				lcCursor = [Tva_exceptii]
		
				lnSucces = goExecutor.oExecute(lcSql,lcCursor)
				If lnSucces > 0
					Select tva_exceptii
					Scan
						Scatter Name otva
						Select ACTACTAN
						Locate For Alltrim(SCD) = Alltrim(otva.SCD) And Alltrim(SCC) = Alltrim(otva.SCC)
						If Found()
							Locate For (SCD = '4426' And SCC = otva.SCD) Or (SCC = '4427' And SCD = otva.SCC)
							If Found()
								Replace SUMA With -SUMA
							Endif
						Endif
						Select tva_exceptii
					Endscan
				Endif
				If Used('tva_exceptii')
					Use In tva_exceptii
				Endif
			Endif
		Endif
		If Type('XSETS.EXPL_FIXA')#'U'
			Select XSETS
			Scatter Fields EXPL_FIXA,aleg_cont Name opar
		
			Select ACTACTAN
			If !Empty(opar.EXPL_FIXA)
				Replace All explicatia With opar.EXPL_FIXA For Empty(explicatia)
			Endif
			If opar.aleg_cont
				Replace All SCD With CN For Upper(Alltrim(SCD))='X'
				Replace All SCC With CN For Upper(Alltrim(SCC))='X'
				
				If Type('pcAcn')#'U'
					Replace All ascd With pcAcn For Upper(Alltrim(SCD))='X'
					Replace All ascc With pcAcn For Upper(Alltrim(SCC))='X'
				Endif
		
				If Type('CNY')#'U'
					Replace All scd With m.CNY For Upper(Alltrim(SCD))='Y'
					Replace All scc With m.CNY For Upper(Alltrim(SCC))='Y'
				Endif
		
				If Type('pcACNY')#'U'
					Replace All ascd With m.pcACNY For Upper(Alltrim(SCD))='Y'
					Replace All ascc With m.pcACNY For Upper(Alltrim(SCC))='Y'
				Endif
			Endif
		
			Release opar
		Endif
		
		If Used('xcont')
		
		
			Select xcont
			Scan
				lcContPart = Alltrim(cont_part)
				lcContPartExtins = Alltrim(contpart) && cont+[0] sau [1] in functie de pozitie cont(folosit pt diferentiere banca incasari/plati)
				If Alltrim(lcContPartExtins) = Alltrim(lcContPart)
					lcExtensieD = []
					lcExtensieC = []
				Else
					lcExtensieD = [0]
					lcExtensieC = [1]
				Endif
		
				lcExceptii = Alltrim(conturi_exc)
				lcExceptii = Iif(Empty(lcExceptii),'-1',lcExceptii)
				lcExceptii=Strtran(lcExceptii, 'X','0',1,100,1)
		
				lnIdPart = idpart
				lcNumePart = Upper(Alltrim(numePart))
				lnFelCont = Fel_Cont
				lnPoz = Pozitie
				lnInvers = invers
				*		llCuIreg = IIF(cu_inregistrari = 0, .F., .T.)
				llFactura = Iif(Cu_Inregistrari = 1 And Pozitie = Fel_Cont, .T., .F.)
				Select ACTACTAN
				Scan For Inlist(lcContPartExtins,Alltrim(SCD) + lcExtensieD, Alltrim(SCC) + lcExtensieC)
					If SCD = lcContPart
						Replace id_partd With lnIdPart
						Replace partd With lcNumePart
		
						If llFactura And (lnFelCont = 0 Or (Inlist(Val(SCC),&lcExceptii) And lnInvers = 1))
							Replace id_fact With -1
						Endif
						*!* 05.10.2006
						*!* MARIUS.MUTU
						*!* SA NU PUNA ID_FACTD = -1 DECAT DACA NU E CONT EXCEPTIE
						If llFactura And lnFelCont = 1 And Empty(id_factD) And !(Inlist(Val(SCC),&lcExceptii) And lnInvers = 1)
							Replace id_factD With -1
						Endif
					Endif
					If SCC = lcContPart
						Replace id_partc With lnIdPart
						Replace partc With lcNumePart
		
						If llFactura And (lnFelCont = 1 Or (Inlist(Val(SCD),&lcExceptii) And lnInvers = 1))
							Replace id_fact With -1
						Endif
						*!* 05.10.2006
						*!* MARIUS.MUTU
						*!* SA NU PUNA ID_FACTC = -1 DECAT DACA NU E CONT EXCEPTIE
						If llFactura And lnFelCont = 0 And Empty(id_factC) And !(Inlist(Val(SCD),&lcExceptii) And lnInvers = 1)
							Replace id_factC With -1
						Endif
					Endif
				Endscan
				Select xcont
			Endscan
		Endif
		
		*!*	&& FURNIZORI - REFACTURARE NU TREBUIE SA AIBA TVA - NU AM VRUT SA SCHIMB M.CTVA INAINTE DE LANS(10539)
		If This.ID_SET = 10539
			Select ACTACTAN
			Replace All neimpozab With SUMA,proc_Tva With 1,id_jtva_coloana With This.id_jnetax
		Endif
		
		Select ACTACTAN
		Replace All an With gnAn,luna With gnLuna, id_util With gnidutil
		
		*!* 28.02.2012
		*** TAXARE INVERSA RO/NON-UE
		*** select * from jtva_coloane t where DENUMIRE LIKE '%TI%' AND (COLOANA_JC IS NOT NULL OR COLOANA_JC IS NOT NULL) AND ID_TVA IS NULL AND COTA_TVA <> 0 ORDER BY ID_JTVA_COLOANA
		Replace All SCC With '4427' , ascc With '' For Inlist(id_jtva_coloana,138,140,142,144,146,163,187,193,207,217,219,225)
		*** COMUNITATEA EUROPEANA
		*** select * from jtva_coloane t where DENUMIRE LIKE '%CE%' AND (COLOANA_JC IS NOT NULL OR COLOANA_JC IS NOT NULL) AND ID_TVA IS NULL AND COTA_TVA <> 0 ORDER BY ID_JTVA_COLOANA
		*!*	modificare ROACONT  v 2.2.25 : erau 164,166,168 in loc de 165,167,169
		Replace All SCC With '4427' , ascc With '' For Inlist(id_jtva_coloana,128,130,134,149,151,153,161,165,167,169,183,185,191,223,227,233)
		*!* 28.02.2012 ^
		*!*	modificare	ROACONT	v 2.4.0
		Replace All SCC With '4428' For Inlist(id_jtva_coloana,22,24,26,30,32,38,42) And SCC = '4427' && TVA LIVR.INTERN NEEX.
		Replace All SCD With '4428' For Inlist(id_jtva_coloana,171,173,175,179,189,211,215) And SCD = '4426' && TVA ACH.INTERN NEEX.
		*!*	modificare	ROACONT	v 2.4.0	^
		Do nrord With ('actactan')
		Release mact
		
		Select ACTACTAN
		Go Top
		*!*	modificare	v 2.4.2
		If Upper(Alltrim(Nvl(XSETS.tipJurnal, ''))) = 'JC' && FURNIZORI / PASIV
			lcSCTrez = 'scc'
		Else
			lcSCTrez = 'scd'
		Endif
		 
		*** TVA INCASARE
		*** caut linia cu PLATA 401 = 5XX / INCASAREA 5XX = 411
		Locate For Inlist(Alltrim(&lcSCTrez),'5121','5124','5311','5314', '542')
		If Found() And &lcobj..tva_incasare = 1
			Insert Into ACTACTAN(NR_NOTA,luna,an,serie_act,nract,SCD,ascc,SCC,;
				SUMA,suma_val,perecheD,perecheC,explicatia4,explicatia5,Curs,id_util,;
				id_responsabil,nresp,id_venchelt,dst_chlt,id_lucrare,nrord,;
				id_ctr,contract,id_sectie,sectie,proc_Tva,ID_SET,id_fact,;
				id_factD,id_factC,id_partd,partd,id_partc,partc,;
				id_sucursala,sucursala,id_fdoc,fdoc,id_gestin,id_jtva_coloana, taxcode,;
				gestin,id_gestout,gestout,id_valuta,nume_val,dataact,dataireg);
				SELECT a.NR_NOTA, a.luna, a.an,;
				IIF(Type(lcobj+[.nrchitanta])<>'U',[],Evaluate(lcobj+[.serie_act])) As serie_act,;
				IIF(Type(lcobj+[.nrchitanta])<>'U',Evaluate(lcobj+[.nrchitanta]),Evaluate(lcobj+[.nract])) As nract,;
				'4426' As  SCD,a.ascd As ascc,'4428' As SCC,;
				a.SUMA, a.suma_val,a.nract As perecheD,a.perecheC,a.explicatia4,a.explicatia5,a.Curs,a.id_util,;
				a.id_responsabil,a.nresp,a.id_venchelt,a.dst_chlt,a.id_lucrare,a.nrord,;
				a.id_ctr,a.contract,a.id_sectie,a.sectie,a.proc_Tva,a.ID_SET,-5 As id_fact,;
				0 As id_factD,0 As id_factC,0 As id_partd,'' As partd, 0 As id_partc, '' As partc,;
				a.id_sucursala,a.sucursala,;
				IIF(Type(lcobj+[.id_fdoc2])<>'U',Evaluate(lcobj+[.id_fdoc2]),Evaluate(lcobj+[.id_fdoc])) As id_fdoc,;
				IIF(Type(lcobj+[.fdocpl])<>'U',Evaluate(lcobj+[.fdocpl]),Evaluate(lcobj+[.fdoc])) As fdoc,;
				0 As id_gestin,;
				c.id_tva As id_jtva_coloana,;
				CAST(GetTaxCode(m.gnAn, m.gnLuna, a.dataact, c.id_tva) as N(6) NULL) as taxcode,;
				'' As gestin,0 As id_gestout,'' As gestout,a.id_valuta,a.nume_val,a.dataact,a.dataireg ;
				FROM ACTACTAN a ;
				LEFT Join jtva_coloane b On a.id_jtva_coloana = b.id_tva ;
				LEFT Join jtva_coloane c On b.id_jtva_ex = c.id_jtva_coloana ;
				WHERE a.SCD = '4428' And Like('4*',a.SCC) And !Isnull(b.id_jtva_ex)
		
			Insert Into ACTACTAN(NR_NOTA,luna,an,serie_act,nract,SCC,ascd,SCD,;
				SUMA,suma_val,perecheD,perecheC,explicatia4,explicatia5,Curs,id_util,;
				id_responsabil,nresp,id_venchelt,dst_chlt,id_lucrare,nrord,;
				id_ctr,contract,id_sectie,sectie,proc_Tva,ID_SET,id_fact,;
				id_factD,id_factC,id_partd,partd,id_partc,partc,;
				id_sucursala,sucursala,id_fdoc,fdoc,id_gestin,id_jtva_coloana,taxcode,;
				gestin,id_gestout,gestout,id_valuta,nume_val,dataact,dataireg);
				SELECT a.NR_NOTA, a.luna, a.an,;
				IIF(Type(lcobj+[.nrchitanta])<>'U',[],Evaluate(lcobj+[.serie_act])) As serie_act,;
				IIF(Type(lcobj+[.nrchitanta])<>'U',Evaluate(lcobj+[.nrchitanta]),Evaluate(lcobj+[.nract])) As nract,;
				'4427' As  SCC,a.ascc As ascd,'4428' As SCD,;
				a.SUMA, a.suma_val, a.perecheD,a.nract As perecheC,a.explicatia4,a.explicatia5,a.Curs,a.id_util,;
				a.id_responsabil,a.nresp,a.id_venchelt,a.dst_chlt,a.id_lucrare,a.nrord,;
				a.id_ctr,a.contract,a.id_sectie,a.sectie,a.proc_Tva,a.ID_SET,-5 As id_fact,;
				0 As id_factD,0 As id_factC,0 As id_partd,'' As partd, 0 As id_partc, '' As partc,;
				a.id_sucursala,a.sucursala,;
				IIF(Type(lcobj+[.id_fdoc2])<>'U',Evaluate(lcobj+[.id_fdoc2]),Evaluate(lcobj+[.id_fdoc])) As id_fdoc,;
				IIF(Type(lcobj+[.fdocpl])<>'U',Evaluate(lcobj+[.fdocpl]),Evaluate(lcobj+[.fdoc])) As fdoc,;
				0 As id_gestin,;
				c.id_tva As id_jtva_coloana,;
				CAST(GetTaxCode(m.gnAn, m.gnLuna, a.dataact, c.id_tva) as N(6) NULL) as taxcode,;		
				'' As gestin,0 As id_gestout,'' As gestout,a.id_valuta,a.nume_val,a.dataact,a.dataireg ;
				FROM ACTACTAN a ;
				LEFT Join jtva_coloane b On a.id_jtva_coloana = b.id_tva ;
				LEFT Join jtva_coloane c On b.id_jtva_ex = c.id_jtva_coloana ;
				WHERE a.SCC = '4428' And Like('4*',a.SCD) And !Isnull(b.id_jtva_ex)
		Endif
		Go Top
		*!*	modificare	v 2.4.2	^
		
		*!*	modificare	v 2.0.20
		* limitare deducere 50% ID_JTVA = 1004
		&lcobj..deducere = Thisform.items.ck_deducere.Value
		If &lcobj..deducere = 1
			llN50 = (oxset.ID_SET = 10609) or (Thisform.items.ck_deducere.Value = 1) 
			llN100 = .F.
			llFurnizorRTVAI = Iif(Type('thisform.items.oPartenerRTVAI.leinRtvai') = 'L', This.itemS.oPartenerRTVAI.leinRtvai, .F.)
			
			Insert Into ACTACTAN(NR_NOTA,serie_act,luna,an,nract,ascd,SCD,SCC,;
				SUMA,suma_val,perecheD,perecheC,explicatia4,explicatia5,Curs,id_util,;
				id_responsabil,nresp,id_venchelt,dst_chlt,id_lucrare,nrord,;
				id_ctr,contract,id_sectie,sectie,proc_Tva,ID_SET,id_fact,;
				id_factD,id_factC,id_partd,partd,id_partc,partc,;
				id_sucursala,sucursala,id_fdoc,fdoc,id_gestin,id_jtva_coloana,taxcode,;
				gestin,id_gestout,gestout,id_valuta,nume_val,dataact,dataireg) ;
				SELECT a.NR_NOTA, a.serie_act, a.luna, a.an, a.nract, a.ascd, a.SCD, '4426' As SCC,;
				ROUND(Round(a.SUMA*(a.proc_Tva-1), gnPC) * 0.5,gnPC) As SUMA, ;
				ROUND(Round(a.suma_val*(a.proc_Tva-1),gnPC) * 0.5,gnPC) As suma_val,;
				a.perecheD,a.perecheC,a.explicatia4,a.explicatia5,a.Curs,a.id_util,;
				a.id_responsabil,a.nresp,a.id_venchelt,a.dst_chlt,a.id_lucrare,a.nrord,;
				a.id_ctr,a.contract,a.id_sectie,a.sectie,0 As proc_Tva,ID_SET,id_fact,;
				0 As id_factD,0 As id_factC,0 As id_partd,'' As partd, 0 As id_partc, '' As partc,;
				a.id_sucursala,a.sucursala,a.id_fdoc,a.fdoc,0 As id_gestin,1004 As id_jtva_coloana,;
				CAST(GetTaxCode(m.gnAn, m.gnLuna, a.dataact, a.id_jtva_coloana, m.llFurnizorRTVAI, m.llN50, m.llN100) as N(6) NULL) as taxcode,;	
				'' As gestin,0 As id_gestout,'' As gestout,a.id_valuta,a.nume_val,a.dataact,a.dataireg ;
				FROM ACTACTAN a ;
				LEFT Join jtva_coloane b On a.id_jtva_coloana = b.id_jtva_coloana ;
				WHERE (Nvl(a.id_jtva_coloana,0) = 0 Or (a.id_jtva_coloana <> 0 And b.afisat > 0)) ;
				AND !Isnull(b.id_tva) ; &&	modificare	v 2.4.5
			And Inlist(SCC,'401','404')
		Endif
		*!*	modificare	v 2.0.20	^
		*!*	modificare	v 2.4.2
		Update ACTACTAN Set tva_incasare = &lcobj..tva_incasare
		*!*	modificare	v 2.4.2	^
		
		Do completare_gruputil_analitice In oproceduri_comune.prg
		* in ROAGEST nu completez analitice dupa explicatiile de tva aici, pentru ca nu sunt generate explicatiile de TVA de la articole inca
		* se completeaza in NIR.inainte_de_do_termin
		If oxset.model <= 1 && NU ROAGEST, ROAOBINV
			Do completare_tva_analitice In oproceduri_comune.prg
		
			DO completare_taxname IN oproceduri_comune.prg
			DO completare_paymentname IN oproceduri_comune.prg
			DO completare_explicatie_tva IN oproceduri_comune.prg	
		ENDIF 	
		
		*!* 02.01.2018
		*!* modificare cont Split TVA banca lei/valuta din 5121/5124 in 5126/5127
		SELECT actactan
		REPLACE ALL scd WITH '5126' FOR scd = '5121' AND 'TVA'$UPPER(ALLTRIM(partd))
		REPLACE ALL scc WITH '5126' FOR scc = '5121' AND 'TVA'$UPPER(ALLTRIM(partc))
		
		REPLACE ALL scd WITH '5127' FOR scd = '5124' AND 'TVA'$UPPER(ALLTRIM(partd))
		REPLACE ALL scc WITH '5127' FOR scc = '5124' AND 'TVA'$UPPER(ALLTRIM(partc))
		GO TOP  
	ENDPROC

	PROCEDURE adunadatenir
		Local NRNOTE,SIRDEVAR
		NRNOTE=0
		Store '' To SIRDEVAR
		Set Safety Off
		
		Select ACTACTAN
		Zap
		
		
		Select * From XNOTE;
			WHERE ID_SET=Thisform.ID_SET;
			INTO Cursor XXNOTE Order By NR_NOTA
		
		
		If _Tally=0
			* Do MESAJ With 'SETUL DE NOTE NU ESTE COMPLETAT',''
			AMESSAGEBOX("Setul de note nu este completat!",0+48,"Atentie")
			Thisform.Release()
		Endif
		
		
		&&ADAUG IN ACTACTAN
		
		Select XXNOTE
		Go Bott
		NRNOTE=NR_NOTA
		
		Select XXNOTE
		SCAN
		nn=nr_nota*10
			R=Recno()
			SIRDEVAR='UTIL,DATAORA'
			For I=1 To 27
				If Inlist(I,17,18)
					Loop
				Endif
				N=Alltrim(Str(I))
				ZZ='(Y'+N+'=.T.)'
		*If &ZZ
				Select XXNOTE
				U='X'+N
				Z='VARDEMEM=ALLTRIM('+U+')'
				&Z
		
				Select XACT
				Go Top
				Z='t=ALLTRIM(xact.'+U+')'
				&Z
				If !Empty(vardemem)
					Z='M.'+T+'=M.'+vardemem
					&Z
					SIRDEVAR=SIRDEVAR+','+T
				Endif
		
				Select XXNOTE
		*Endif
			Next
			Select XXNOTE
			m.SCD=XSCD
			m.SCC=XSCC
			m.ascd=xascd
			m.ascc=xascc
			Select ACTACTAN
			Append Blank
			Z='GATH FIEL '+SIRDEVAR+' MEMV'
			&Z
			Gather Fields SCD,SCC,ascd,ascc Memv
			REPLACE nr_nota WITH nn
			Select XXNOTE
			Goto R
		Endscan
		
		Select ACTACTAN
		Do nrord With ('actactan')
		
	ENDPROC

	PROCEDURE Click
		*!*	*!*	formtermin12
		*!*	pl_verificat=.T.
	ENDPROC

	PROCEDURE cpaymentcode_assign
		Lparameters tcPaymentCode
		Local lcPaymentCode
		If !m.gl406
			Return
		Endif
		lcPaymentCode = IIF(TYPE('tcPaymentCode') = 'C', ALLTRIM(NVL(m.tcPaymentCode,'')), '')
		This.cPaymentCode = m.lcPaymentCode
		
		* Fac vizibile cbo_plata_saft in caz ca xsets.plata era diferit de 1 si totusi fel document are asociat cod plata SAFT
		IF !EMPTY(m.lcPaymentCode)
			This.items.lb_plata_saft.Visible = .T.
			This.items.cbo_plata_saft.Visible = .T.
		ENDIF 
	ENDPROC

	PROCEDURE creeaza_note_tva_incasare
		LPARAMETERS tcCursorTVAIncasare
		LOCAL loDateTVAInc
		LOCAL lcCursorDefTVA, lcSql, llExigibilizareBOIncasare, llExigibilizareBOInregistrare
		
		* Bilete la ordin - TVA la incasare devine exigibil in functie de optiune, la inregistrare BO sau la incasarea BO
		llExigibilizareBOInregistrare = IIF(TYPE('gnRC_BO_EXIGIBILIZARE') = 'N', IIF(NVL(m.gnRC_BO_EXIGIBILIZARE, 0) = 1, .T., .F.), .F.) && 413 = 4111 sau 401 = 403
		llExigibilizareBOIncasare = IIF(TYPE('gnRC_BO_EXIGIBILIZARE') = 'N', IIF(NVL(m.gnRC_BO_EXIGIBILIZARE, 0) = 0, .T., .F.), .T.) && 5311/5121 = 413
		IF USED(tcCursorTVAIncasare)
			SELECT (tcCursorTVAIncasare)
			SCAN
				SCATTER NAME loDateTVAInc
				DO CASE
					CASE INLIST(THISFORM.id_set, 10305, 10307, 10316) AND m.llExigibilizareBOIncasare	&&	5xx - 403 / 413 - 5xx
						* Incasare/Plata efecte comerciale
						lcSql = [{call pack_contab.defalca_tva_incasare_docp(] + ALLTRIM(STR(loDateTVAInc.id_fact)) + [,] + ;
							['] + IIF(INLIST(THISFORM.id_set, 10305, 10307), [C], [D]) + [',] + ;
							ALLTRIM(STR(loDateTVAInc.suma, 16, m.gnPC)) + [,] + ;
							ALLTRIM(STR(loDateTVAInc.proc_tva, 16, 4)) + [,] + ;
							[1,] + ;
							[?gnLuna,?gnAn)}]
					CASE THISFORM.id_set = 10628 AND m.llExigibilizareBOIncasare	&& 413 = 403
						* Girare efecte comerciale
						IF MOD(RECNO(),2) = 1
							lcSql = [{call pack_contab.defalca_tva_incasare_docp(] + ALLTRIM(STR(loDateTVAInc.id_factd)) + [,] + ;
								['D',] + ;
								ALLTRIM(STR(loDateTVAInc.suma, 16, m.gnPC)) + [,] + ;
								ALLTRIM(STR(loDateTVAInc.proc_tva, 16, 4)) + [,] + ;
								[1,] + ;
								[?gnLuna,?gnAn)}]
						ELSE 		
							lcSql = [{call pack_contab.defalca_tva_incasare_docp(] + ALLTRIM(STR(loDateTVAInc.id_factc)) + [,] + ;
								['C',] + ;
								ALLTRIM(STR(loDateTVAInc.suma, 16, m.gnPC)) + [,] + ;
								ALLTRIM(STR(loDateTVAInc.proc_tva, 16, 4)) + [,] + ;
								[1,] + ;
								[?gnLuna,?gnAn)}]
						ENDIF 		
					OTHERWISE
						lcSql = [{call pack_contab.defalca_tva_incasare(] + ALLTRIM(STR(loDateTVAInc.id_fact)) + [,] + ;
							ALLTRIM(STR(loDateTVAInc.suma, 16, m.gnPC)) + [,] + ;
							ALLTRIM(STR(loDateTVAInc.proc_tva, 16, 4)) + [,] + ;
							IIF(!EMPTY(NVL(loDateTVAInc.id_jtva_coloana, 0)) AND !(loDateTVAInc.SCD = '408' AND loDateTVAInc.SCC = '401'), [0], [1]) + [,] + ;
							[?gnLuna,?gnAn)}]
				ENDCASE
				lcCursorDefTVA = SYS(2015)
				IF goExecutor.oExecuta(lcSql, lcCursorDefTVA)
					INSERT INTO ACTACTAN(NR_NOTA, serie_act, luna, an, nract, ascd, SCD, ascc, SCC, ;
						suma, explicatia4, explicatia5, CURS, id_util, ;
						id_responsabil, nresp, id_venchelt, dst_chlt, id_lucrare, nrord, ;
						id_ctr, contract, id_sectie, sectie, proc_tva, id_set, id_fact, ;
						perecheC, perecheD, id_factD, id_factC, id_partd, partd, id_partc, partc, ;
						id_sucursala, sucursala, id_fdoc, fdoc, ;
						id_gestin, gestin, id_gestout, gestout, ;
						id_jtva_coloana, id_valuta, nume_val, dataact, dataireg, taxcode) ;
						SELECT RECCOUNT('actactan') + RECNO() AS NR_NOTA, loDateTVAInc.serie_act, ;
						loDateTVAInc.luna, loDateTVAInc.an, loDateTVAInc.nract, a.ascd, a.SCD, a.ascc, a.SCC, ;
						a.suma, loDateTVAInc.explicatia4, loDateTVAInc.explicatia5, loDateTVAInc.CURS, loDateTVAInc.id_util, ;
						loDateTVAInc.id_responsabil, loDateTVAInc.nresp, loDateTVAInc.id_venchelt, loDateTVAInc.dst_chlt, ;
						loDateTVAInc.id_lucrare, loDateTVAInc.nrord, loDateTVAInc.id_ctr, loDateTVAInc.contract, ;
						loDateTVAInc.id_sectie, loDateTVAInc.sectie, a.proc_tva, loDateTVAInc.id_set, a.id_fact, ;
						a.perecheC, a.perecheD, ;
						0 AS id_factD, 0 AS id_factC, 0 AS id_partd, '' AS partd, 0 AS id_partc, '' AS partc, ;
						loDateTVAInc.id_sucursala, loDateTVAInc.sucursala, loDateTVAInc.id_fdoc, loDateTVAInc.fdoc, ;
						loDateTVAInc.id_gestin, loDateTVAInc.gestin, loDateTVAInc.id_gestout, loDateTVAInc.gestout, ;
						a.id_jtva_coloana, loDateTVAInc.id_valuta, loDateTVAInc.nume_val, loDateTVAInc.dataact, loDateTVAInc.dataireg, ;
						CAST(GetTaxCode(loDateTVAInc.an, loDateTVAInc.luna, loDateTVAInc.dataact, a.id_jtva_coloana) as N(6) NULL) as taxcode ;
						FROM (lcCursorDefTVA) a
		
					USE IN (lcCursorDefTVA)
				ENDIF
			ENDSCAN
		ENDIF
		
	ENDPROC

	PROCEDURE do_arata_butoane
		Lparameters tnTip, tlArata
		*!*	tnTip	=	1	- renunt
		*!*				2	- terminat
		*!*				3	- inainte
		*!*				4	- inapoi
		*!*				5	- verificare
		Local lcCaption, lnLeft, lnSpatiere
		lcCaption = []
		lnSpatiere = 2
		lnLeft = Thisform.Width - lnSpatiere - Thisform.but_terMIN1.Width
		*!*	ordine butoane	:
		*!*		precedent, renunt, verifica, urmator, termina
		Do Case
			Case tnTip = 5
				Thisform.but_verifica1.Visible = tlArata
			Case tnTip = 4
				Thisform.but_precedent1.Visible = tlArata
			Case tnTip = 3
				Thisform.but_urmator1.Visible = tlArata
			Case tnTip = 2
				Thisform.but_terMIN1.Visible = tlArata
			Otherwise
				Thisform.but_renunt1.Visible = tlArata
		Endcase
		If Thisform.but_terMIN1.Visible
			lcCaption = lcCaption + [; CTRL+F = Continuare]
			With Thisform.but_terMIN1
				.Anchor = 0
				.Left = lnLeft
				.Anchor = 8
			Endwith
			lnLeft = lnLeft - lnSpatiere - Thisform.but_terMIN1.Width
		Endif
		If Thisform.but_verifica1.Visible
			lcCaption = lcCaption + [; CTRL+F = Verificare]
			With Thisform.but_verifica1
				.Anchor = 0
				.Left = lnLeft
				.Anchor = 8
			Endwith
			lnLeft = lnLeft - lnSpatiere - Thisform.but_verifica1.Width
		Endif
		If Thisform.but_urmator1.Visible
			lcCaption = lcCaption + [; CTRL+F = Continuare]
			With Thisform.but_urmator1
				.Anchor = 0
				.Left = lnLeft
				.Anchor = 8
			Endwith
			lnLeft = lnLeft - lnSpatiere - Thisform.but_urmator1.Width
		Endif
		If Thisform.but_renunt1.Visible
			lcCaption = lcCaption + [; ESC = Renunþare]
			With Thisform.but_renunt1
				.Anchor = 0
				.Left = lnLeft
				.Anchor = 8
			Endwith
			lnLeft = lnLeft - lnSpatiere - Thisform.but_renunt1.Width
		Endif
		If Thisform.but_precedent1.Visible
			lcCaption = lcCaption + [; ESC = Înapoi]
			With Thisform.but_precedent1
				.Anchor = 0
				.Left = lnLeft
				.Anchor = 8
			Endwith
			lnLeft = lnLeft - lnSpatiere - Thisform.but_precedent1.Width
		Endif
		With Thisform._shape2
			.Anchor = 0
			.Left = lnLeft + Thisform.but_terMIN1.Width
			.Anchor = 8
		Endwith
		Thisform.lb_shortcuts1.Caption = Substr(lcCaption,3)
		Thisform.Refresh()
	ENDPROC

	PROCEDURE do_precedent
		Thisform.AutoCenter = .F.
		Thisform.lb_titlu_alb_b121.Caption = Proper(Thisform.cdenumire_set)
		Thisform.incarca_butoane()
		Thisform.items.Visible = .T.
		Thisform.Width = Thisform.items.Width
		Thisform.verif.Visible = .F.
		Thisform.Height = Thisform._shape1.Height + Thisform.items.Height
		Thisform.Width =  Thisform.items.Width
		Thisform.AutoCenter = .T.
		Thisform.Refresh()
		
	ENDPROC

	PROCEDURE do_urmator
		If Thisform.verif_complet()
			If !Empty(Thisform.FORMGEST)
				lcObj = Thisform.pcobj
				Thisform.Hide
		
				Select actactan
				lcFormGest = Upper(Alltrim(Thisform.FORMGEST))
				If Inlist(Left(lcFormGest,6),"WEBNIR","VALOAR","SCHIMB","INVENT","RESTNI")
					lcObj = lcFormGest && "WEBNIR"/ webnir_retetar
				Endif
		
				*!*	modificare facturare in valuta
				If oxset.cursval
					If citeste_cursuri_stoc(poAct.v8,poAct.id_valuta_vanz)
						Select crscursuri
						Locate For id_valuta = poAct.id_valuta_vanz
						If Found()
							poAct.Curs = Curs / multiplicator
						Endif
						Select actactan
					Else
						gnButon = 2
					Endif
				Endif
				*!*	modificare facturare in valuta ^
		
				If gnButon <> 2
					*!*	modificare	ROAGEST v 2.2.0
					If Type(m.lcObj) = 'O'
						If Type(lcObj+".tva_incasare") = 'U'
							AddProperty(&lcObj,'tva_incasare',Thisform.items.ck_tva_la_incasare.Value)
						Else
							lcValoare = lcObj+".tva_incasare="+Alltrim(Str(Thisform.items.ck_tva_la_incasare.Value))
							&lcValoare
						ENDIF
		
						* Se foloseste la introdnir.UpdateExplicatieSAFT
						If Type(lcObj+".oPartenerRTVAI") = 'U'
							AddProperty(&lcObj,'oPartenerRTVAI',NULL)
						ENDIF 
						* oPartenerRTVAI exista doar daca este factura de achizitie/furnizor
						IF TYPE('Thisform.items.oPartenerRTVAI') = 'O'
							&lcObj..oPartenerRTVAI = Thisform.items.oPartenerRTVAI
						ENDIF 
					ENDIF
		
					* La factura de vanzare en-gros se alege explicatia TVA inainte de articolele din factura
					IF TYPE(m.lcObj + ".id_jtva_coloana") <> 'U'
						&lcObj..id_jtva_coloana = This.id_jtax
					ENDIF 
					IF TYPE(m.lcObj + ".taxcode") <> 'U'
						&lcObj..taxcode = This.nTaxCode
					ENDIF 
		
					lcCorectie = IIF(this.lCorectie, 'corectie,' + ALLTRIM(TRANSFORM(this.nCod)), '')
					*!*	modificare	ROAGEST v 2.2.0	^
					lnTermin = lans_nir_bon(oxset.id_set, lcObj, m.lcCorectie)  && IN ointroduceri.prg
					gnButon = lnTermin
				Endif
			Else
				pl_verificat=.T.
				Thisform.ADUNADATE()
				buton = 1
				gnButon = 1
			Endif
			Thisform.Release()
		Endif
		
	ENDPROC

	PROCEDURE do_verifica
		*!* 21.10.2011
		*!* marius.mutu
		*!* verif.but_termin1.setfocus - era focus pe butonul precedent si se intorcea inapoi in items, pe butonul renunt
		If Thisform.verif_complet()
			pl_verificat=.T.
			Thisform.ADUNADATE()
			Select ACTACTAN
			GO TOP 							&&	modificare	v 2.5.27
			Thisform.AutoCenter = .F.
			thisform.lb_titlu_alb_b121.Caption = [VERIFICAREA SETULUI DE NOTE CONTABILE]
			Thisform.salveaza_butoane()
			Thisform.verif.Visible=.T.
			*!* 21.10.2011
			Thisform.but_termin1.setfocus()
			*!* 21.10.2011 ^	
			Thisform.verif.GRID1.Refresh()
			Thisform.items.Visible = .F.
			*thisform.WindowState = 2 
			thisform.verif.Height = MAX(500, INT(_screen.Height*0.7))
			thisform.Width = INT(_screen.Width*0.7)
		
			Thisform.Height = Thisform._shape1.Height + Thisform.verif.Height
			Thisform.Width = Thisform.verif.Width + 200
			Thisform.AutoCenter = .T.
			Thisform.Refresh()
			Thisform.verif.Anchor = 15		&&	modificare	v 2.5.27
			buton = 1
			gnButon = 1
		Endif
	ENDPROC

	PROCEDURE inainte_de_do_termin
		Local lCompletezPartener,llRet,llReturn
		llReturn = .F.
		lCompletezPartener = .T.
		llRet = verificare_note_contabile('actactan', Thisform.lverificaacont,lCompletezPartener)
		Select ACTACTAN
		Go Top
		If Thisform.verif.Visible
			Thisform.verif.GRID1.SetFocus()
		Endif
		If !llRet
			Thisform.verif.GRID1.column7.Text1.SetFocus() && cont
		Else
		*!*	modificare	v 2.5.26
		*!*		If Type('glListareBonFiscalCont')<>'U' And glListareBonFiscalCont
		*!*			creare_bon_fiscal()						&&	IN oproceduri_casademarcat.prg
		*!*		Endif
		*!*		If Type('glListareChitanta')<>'U' And glListareChitanta
		*!*			Thisform.AlwaysOnTop = .F.
		*!*			listeaza_chitanta(pcSirFacturi)						&&	IN oproceduri_incasari.prg
		*!*			Thisform.AlwaysOnTop = .T.
		*!*		Endif
		*!*	modificare	v 2.5.26	^
			llReturn = .T.
		Endif
		Return llReturn
	ENDPROC

	PROCEDURE incarca_butoane
		*!*	tnTip	=	1	- renunt
		*!*				2	- terminat
		*!*				3	- inainte
		*!*				4	- inapoi
		*!*				5	- verificare
		For i = 1 To 5
			Thisform.do_arata_butoane(i,Thisform.butoane[i])
		Endfor
	ENDPROC

	PROCEDURE Init
		Set Escape On
		DODEFAULT()
		*!*	modificare	ROAAUTO v 2.0.35
		*!*	*!*	modificare ROASITOP
		*!*	*!*	If _program='cont' And XSETS.MODEL#-1
		*!*	If InList(_program,'cont','sitop') And XSETS.MODEL#-1
		*!*	*!*	modificare ROASITOP	^
		*!*		Local lnProcTva
		*!*		Thisform.do_arata_butoane(5,.T.)
		*!*	Else
		*!*		Thisform.do_arata_butoane(5,.F.)
		*!*	Endif
		Thisform.do_arata_butoane(2,.F.)
		Do Case
			Case Inlist(gcNumeProgram,[ROACONT],[ROASITOP]) And xsets.model#-1
				Local lnProcTva
				Thisform.do_arata_butoane(5,.T.)
			Case !Empty(xsets.FORMGEST) Or xsets.model=-1
				Thisform.do_arata_butoane(3,.T.)
			Otherwise
				Thisform.do_arata_butoane(5,.T.)
		Endcase
		*!*	modificare	ROAAUTO v 2.0.35	^
		If Used('crsjnetax')
			Use In crsjnetax
		Endif
		If Used('crsjtax')
			Use In crsjtax
		Endif
		
		this.cnetaxabil = ''
		This.ntvanetax = 1
		This.id_jtax = NULL
		This.id_jtva = NULL
		This.id_jnetax = NULL
		This.nTaxCodeN = NULL
		
		Select * From jtva_coloane Where afisat = 2 Order By ordine Into Cursor crsjnetax
		With This.itemS
			.cbo_Netaxabil.RowSource = [crsjnetax.denumire]
			Select crsjnetax
			Locate For id_jtva_coloana = XSETS.id_jnetax
			If Found()
				This.cnetaxabil = denumire
				This.ntvanetax = (100 + cota_tva) / 100
				This.id_jnetax = id_jtva_coloana
				.cbo_Netaxabil.Value = This.cnetaxabil
				This.nTaxCodeN = taxcode
			Endif
		endwith
		*!*	modificare	ROACONT v 2.4.0
		With Thisform.items.ck_tva_la_incasare
			.Value = goCalendar.tva_incasare
			If gnAn >= 2013 And !Isnull(xsets.tipjurnal)
				.Visible = .T.
			Else
				.Visible = .F.
			Endif
		Endwith
		*!*	Select * From jtva_coloane WHERE afisat >= 1  Order By ordine Into Cursor crsjtax &&	Where afisat = 1  
		*!*	With This.itemS
		*!*		.cbo_Taxabil.RowSource = [crsjtax.denumire]
		*!*		Select crsjtax
		*!*		Locate For id_jtva_coloana = XSETS.id_jtax
		*!*		If Found()
		*!*			This.ctaxabil = denumire
		*!*			This.ntvatax = (100 + cota_tva) / 100
		*!*			This.id_jtax = id_jtva_coloana
		*!*			This.id_jtva = id_tva
		*!*			.cbo_Taxabil.Value = This.ctaxabil
		*!*		Endif
		*!*	ENDWITH
		*!*	modificare	ROACONT	v 2.4.0	^
		
		this.verif.gridextra1.setup()
	ENDPROC

	PROCEDURE KeyPress
		Lparameters nKeyCode, nShiftAltCtrl
		Local llRenunt, llUrmator, llVerific
		llRenunt = Thisform.but_renunt1.Visible
		llVerific = Thisform.but_verifica1.Visible
		llUrmator = Thisform.but_urmator1.Visible
		llPrecedent = Thisform.but_precedent1.Visible
		llTerminat = Thisform.but_termin1.Visible
		Do Case
			Case nKeyCode=27 And nShiftAltCtrl=0 && ESC && RENUNT
				Nodefault
				Do Case
					Case llPrecedent
						Thisform.do_precedent()
					Case llRenunt
						If aMessagebox("Sunteti sigur ca doriti sa inchideti fereastra?",4+32+256,"Confirmare")==6
							Thisform.do_renunt()
						Endif
				Endcase
			Case nKeyCode=6 And nShiftAltCtrl=2 && CTRL + F && TERMINAT / VERIFIC / URMATOR
				Nodefault
				Do Case
					Case llVerific
						Thisform.do_verifica()
					Case llUrmator
						Thisform.do_urmator()
					Otherwise
						Thisform.do_termin()
				Endcase
			Otherwise
				DoDefault(nKeyCode, nShiftAltCtrl)
		Endcase
		
	ENDPROC

	PROCEDURE Load
		pl_verificat=.f.
	ENDPROC

	PROCEDURE ntaxcode_assign
		Lparameters tnTaxCode
		
		IF !m.gl406
			RETURN 
		ENDIF 
		This.nTaxCode = tnTaxCode
		
		Local lcProcentTaxa
		lcProcentTaxa = ''
		
		IF SEEK(m.tnTaxCode, 'saft_taxtable', 'taxcode') 
			lcProcentTaxa = Alltrim(Transform(saft_taxtable.procent_taxa)) + '%'
		ENDIF 
		
		This.items.lb_saft.Caption = 'Taxa SAFT' + Iif(!Empty(NVL(This.nTaxCode,0)), ' (' + Alltrim(Transform(This.nTaxCode)) + ' ' + m.lcProcentTaxa + ')', '')
		* Schimb in culoarea rosie pentru a atentiona utilizatorul ca valoarea a fost schimbata
		This.items.lb_saft.ForeColor = Rgb(255, 0, 0)
		
		This.items.lb_saft.Refresh()
		This.items.cbo_saft.Refresh()
		
	ENDPROC

	PROCEDURE Release
		*!* 17.08.2016
		*!* marius.mutu
		*!* id_set <> 99996 && factura anulata are valoare 0
		
		*!* 10.08.2017
		*!* marius.mutu
		*!* pentru corectie document gestiune se sterge documentul anterior si apoi se face scrierea
		
		Local lcCont, lcFis, lcFisC, lcFisD, llModificare, llSucces, lnCount, lnScrieSterge
		Set Escape Off
		Local lcNumeFisIndex
		*!*	modificare serie numere -	10.2007
		If buton = 2
			poGeneratorNumere.dezaloca_numere()
		Else
			&&14oct2008 ~ v2.0.78
			&&pastrez numarul alocat initial pentru a-l putea dezloca la release chiar daca se apasa terminat, doar daca numarul nirului este # de numarul alocat
			*!*	modificare	ROAAUTO v 2.0.35 : daca se parcurgea Thisform.items.controls nu-mi mai facea Release
			Select cerere
			Scan For !Isnull(id_tipdoc)
				poGeneratorNumere.verifica_numar(id_tipdoc, Evaluate(This.pcobj + '.' + Alltrim(var_item)))
			Endscan
			*!*		For Each oitem In Thisform.iteMS.Controls
			*!*			If Type('oitem.id_tipdoc') = 'N'
			*!*				If !Inlist(oitem.id_tipdoc ,-1,-99)
			*!*					poGeneratorNumere.verifica_numar(oitem.id_tipdoc ,Evaluate(oitem.text_item1.ControlSource))
			*!*				Endif
			*!*			Endif
			*!*		Next
			*!*	modificare	ROAAUTO v 2.0.35	^
			&&14oct2008 ~ v2.0.78 ^
		Endif
		
		*!*	For i = 1 To 20
		*!*		If poGeneratorNumere.paPlaje(i,1)<>0
		*!*			poGeneratorNumere.verifica_numar(i,.nract)
		*!*		ENDIF
		*!*	ENDFOR
		*!*	If buton = 2 And Thisform.iteMS.numar_plaja1.id_numar # 0
		*!*		Thisform.iteMS.numar_plaja1.dezalocare_numar()
		*!*	Endif
		*!*	modificare serie numere	-	10.2007		^
		
		If buton = 1 And OXSET.MODEL = 1 && CONTABILIZARE
			Delete From ACTACTAN Where SUMA = 0 AND id_set <> 99996 && factura anulata are valoare 0
			*!*	modificare	 v 2.5.26
		
			llSucces = .T.
		
			IF m.llSucces
				If oscrie_in_fisiere() > 0
					If Type('glListareBonFiscalCont') <> 'U' And glListareBonFiscalCont
						creare_bon_fiscal()						&&	IN oproceduri_casademarcat.prg
					Endif
					If Type('glListareChitanta') <> 'U' And glListareChitanta
						Thisform.AlwaysOnTop = .F.
						listeaza_chitanta(pcSirFacturi)						&&	IN oproceduri_incasari.prg
						Thisform.AlwaysOnTop = .T.
					Endif
				Endif
				*!*	modificare	 v 2.5.26	^
			ENDIF && llSucces
			*!* 10.08.2017 ^
		Endif
		
		If Used('actactan') And XSETS.MODEL # -1
			Use In ACTACTAN
		Endif
		
		If Used('xcont') And XSETS.MODEL # -1
			Select xcont
			Calculate Cnt() To lnCount For cu_inregistrari = 1 And pozitie # fel_cont
			Do Case
				Case  lnCount = 1
					Locate For cu_inregistrari = 1 And pozitie # fel_cont
					lcCont = Alltrim(contpart)
					lcFis = 'actcv' + lcCont
					If Used(lcFis)
						Use In (lcFis)
					Endif
				Case lnCount > 1
					Locate For cu_inregistrari = 1 And pozitie = 0 And fel_cont = 1
					lcFisD = 'actcv' + Alltrim(contpart)
					Locate For cu_inregistrari = 1 And pozitie = 1 And fel_cont = 0
					lcFisC = 'actcv' + Alltrim(contpart)
					lcFis = 'CalculCompensare'
					If Used(lcFis)
						Use In (lcFis)
					Endif
					If Used(lcFisD)
						Use In (lcFisD)
					Endif
					If Used(lcFisC)
						Use In (lcFisC)
					Endif
				Otherwise
					*
			Endcase
			Use In xcont
		Endif
		
		If Used('tpart')
			Use In tpart
		Endif
		If Used('cerere')
			Use In cerere
		Endif
		With This.iteMS
			.cbo_Netaxabil.RowSource = []
			.cbo_taxabil.RowSource = []
			.cbo_saft.RowSource = []
		Endwith
		
		Use In (SELECT('crsjnetax'))
		Use In (SELECT('crsjtax'))
		USE IN (SELECT('crsTaxTable'))
		
		lcNumeFisIndex = Thisform.cnumefisindex
		If !Empty(lcNumeFisIndex) And File(lcNumeFisIndex)
			Delete File &lcNumeFisIndex
		Endif
		Release lcNumeFisIndex
	ENDPROC

	PROCEDURE salveaza_butoane
		*!*	tnTip	=	1	- renunt
		*!*				2	- terminat
		*!*				3	- inainte
		*!*				4	- inapoi
		*!*				5	- verificare
		Thisform.butoane[1] = Thisform.but_renunt1.Visible
		Thisform.butoane[2] = Thisform.but_terMIN1.Visible
		Thisform.butoane[3] = Thisform.but_urmator1.Visible
		Thisform.butoane[4] = Thisform.but_precedent1.Visible
		Thisform.butoane[5] = Thisform.but_verifica1.Visible
		Thisform.do_arata_butoane(1,.F.)
		Thisform.do_arata_butoane(3,.F.)
		Thisform.do_arata_butoane(5,.F.)
		Thisform.do_arata_butoane(4,.T.)
		Thisform.do_arata_butoane(2,.T.)
	ENDPROC

	PROCEDURE setvariabile
		lnnrvar=Alen(This.variabile,1)
		
		For i=1 To lnnrvar
			If Empty(This.variabile[i,1])
				Exit
			Endif
		
			lcVarName=Alltrim(This.variabile[i,1])
			If Type(lcVarName) = "U"
				lcObiect = Substr(lcVarName,1,At(".",lcVarName,1)-1)
				lcCamp = Substr(lcVarName,At(".",lcVarName,1)+1)
				AddProperty(&lcObiect,lcCamp)
			Endif
			lcvartype=Type(lcVarName)
			VarValue=This.variabile[i,2]
			Do Case
			Case lcvartype = "C"
				luvarvalue = Alltrim(VarValue)
				&lcVarName. = luvarvalue
			Case lcvartype = "Y"
				luvarvalue = Ntom(Val(VarValue))
				&lcVarName. = luvarvalue
			Case lcvartype = "N"
				luvarvalue = Val(VarValue)
				&lcVarName. = luvarvalue
			Case lcvartype = "T"
				luvarvalue = Ctot(VarValue)
				&lcVarName. = luvarvalue
			Case lcvartype = "D"
				luvarvalue = Ctod(VarValue)
				&lcVarName. = luvarvalue
			Case lcvartype = "L"
				luvarvalue = Iif(Inlist(Upper(Left(VarValue, 1)), "T", "Y"), .T., .F.)
				&lcVarName. = luvarvalue
			Endcase
		
		Endfor
	ENDPROC

	PROCEDURE Show
		*!* 11.09.2017
		*!* marius.mutu
		*!* corectie NIR/BON - verific partenerul in RTVAI
		Lparameters nStyle
		This.aduc_set
		This.SetVariabile
		Thisform.Refresh()
		*!* 09.08.2011
		this.AutoCenter = .T.
		*!* 09.08.2011 ^
		
		
		IF oitem.lCorectie AND goCalendar.tva_incasare = 0 and xsets.tipjurnal = 'JC' AND TYPE('this.ck_tva_la_incasare') = 'O'
			IF this.ck_tva_la_incasare.visible AND !INLIST(XSETS.ID_SET, 101, 10565, 10575, 208, 209)
				LOCAL loPartenerRTVAIX,loPartenerRTVAI
				loPartenerRTVAIX = Createobject("empty")
				loPartenerRTVAI = Createobject("empty")
				AddProperty(loPartenerRTVAIX, "cod_fiscal",poAct.cod_fiscal)
				AddProperty(loPartenerRTVAIX, "denumire", poAct.nume)
				AddProperty(loPartenerRTVAIX, "dataact", poAct.dataact)
				VERIFICA_RTVAI(loPartenerRTVAIX, @loPartenerRTVAI)	
				
				this.ck_tva_la_incasare.value = IIF(loPartenerRtvai.leinRtvai,1,0)
				
				This.itemS.oPartenerRTVAI = loPartenerRtvai		
			ENDIF 	
		ENDIF 
		
		Thisform.verif.Width = INT(_Screen.Width*0.7)
		Thisform.verif.Height = INT(_Screen.Height*0.7)
		
		
		IF m.gl406
			This.actualizeaza_explicatie_saft()
			This.actualizeaza_plata_saft()
		ENDIF 
	ENDPROC

	PROCEDURE updateexplicatiesaft
		IF !m.gl406
			RETURN 
		ENDIF 
		Local ldDataAct, llFurnizorRTVAI, lnIdJtva, lnIdJtvaN, llN50, llN100, llNeexigibil, lcSelect
		lcSelect = SELECT()
		
		ldDataAct = poAct.dataact
		llFurnizorRTVAI = Iif(Type('thisform.items.oPartenerRTVAI.leinRtvai') = 'L', This.itemS.oPartenerRTVAI.leinRtvai, .F.)
		lnIdJtva = IIF(TYPE('This.id_jtax') = 'N', This.id_jtax, null)
		lnIdJtvaN = IIF(TYPE('This.id_jnetax') = 'N', This.id_jnetax, null)
		
		* Nu mai transmit llN50, llN100 la GetTaxCode, pentru ca la factura pun cod taxa deductibil 100%, iar pe Explicatia Limitare deducere pun cod Nedeductibil 50/100
		llN50 = .F. && (oxset.ID_SET = 10609) or (Thisform.items.ck_deducere.Value = 1) 
		llN100 = .F. && (oxset.ID_SET = 10647)
		
		SELECT XNOTE
		LOCATE FOR ID_SET = Thisform.ID_SET AND (LEFT(xscd,3) = '418' OR LEFT(xscc,3) = '408')
		llNeexigibil = FOUND() && factura neintocmita/nesosita
			
		* Actualizez lista taxe SAFT in functie de cota TVA Taxabil
		This.items.cbo_saft.Requery()
		
		IF !EMPTY(NVL(m.lnIdJtva,0))
			This.nTaxCode = GetTaxCode(m.gnAn, m.gnLuna, m.ldDataAct, m.lnIdJtva, m.llFurnizorRTVAI, m.llN50, m.llN100, m.llNeexigibil)
		ELSE 
			This.nTaxCode = NULL
		ENDIF 
		IF !EMPTY(NVL(m.lnIdJtvaN,0))
			This.nTaxCodeN = GetTaxCode(m.gnAn, m.gnLuna, m.ldDataAct, m.lnIdJtvaN, m.llFurnizorRTVAI, m.llN50, m.llN100, m.llNeexigibil)
		ELSE
			This.nTaxCodeN = NULL
		ENDIF 
		This.items.cbo_saft.Refresh()
		
		SELECT (m.lcSelect)
	ENDPROC

	PROCEDURE updatepaymentsaft
		LOCAL lnIdFdoc
		If !m.gl406
			Return
		Endif
		
		lnIdFdoc = 0
		
		* Fel document plata (achizitii platite din casa/achizitori)
		IF TYPE('poAct.id_fdoc2') = 'N'
			lnIdFdoc = NVL(poAct.id_fdoc2,0)
		ENDIF  
		IF EMPTY(m.lnIdFdoc)
			lnIdFdoc = Nvl(poAct.id_fdoc,0)
		ENDIF 	
			
		If !Empty(m.lnIdFdoc)
			This.cPaymentCode = GetPaymentCode(m.lnIdFdoc)
		Else
			This.cPaymentCode = ''
		Endif
		This.items.cbo_plata_saft.Refresh()
		
	ENDPROC

	PROCEDURE verif_analitic
		PARAMETERS tlClick, tccont, tcacont, tcColoana
		
		m.den=''
		ll_l=.f.
		
		IF EMPTY(tccont)
			RETURN ll_l
		ENDIF 
		
		IF USED('TCEVA')
			USE IN Tceva
		ENDIF
		
		lcSql=[select acont || ' - ' || explicatie as den, CONT, ACONT FROM ] + gcS + [.vplcont_ANALITIC where to_number(cont) = ] + tcCont + [ and inactiv = 0 and an = ] + pcAn + [ order by acont ]
		lcCursor = 'tceva'
		lnSucces = goExecutor.oExecute(lcSql,lcCursor)
		
		SELECT tceva
		LOCATE 
		IF EOF()
			IF !EMPTY(tcAcont)
				* DO mesaj WITH 'Nu au fost definite simboluri analitice','pentru contul ' + tcCont
				AMESSAGEBOX("Nu au fost definite simboluri analitice pentru contul " + tcCont + " !",0+48,"Atentie")
				ll_l=.t.
			ENDIF 
			
			IF USED('TCEVA')
				USE IN Tceva 
			ENDIF 
			SELECT actactan 
			Thisform.veRIF.grid1.SetFocus 
			RETURN ll_l
		ELSE 
			IF !tlClick
				IF empty(tcAcont)
		*!*				SELECT actactan
		*!*				IF FLOCK()
		*!*					REPLACE &tcColoana WITH '0000'
		*!*				ENDIF 
					
					IF USED('TCEVA')
						USE IN Tceva 
					ENDIF 
					SELECT actactan 
					Thisform.veRIF.grid1.SetFocus 
					RETURN ll_l
				ENDIF 
			ENDIF 
		ENDIF
		
		SELECT tceva
		IF tlClick
			DO caut_alfa_cursor WITH 'tceva','den','Alegeti simbolul analitic','m.den'
			SELECT tceva
			LOCATE FOR ALLTRIM(den) = ALLTRIM(m.den)
			lcAcont = acont
		
			SELECT actactan
			REPLACE &tcColoana WITH lcAcont
		ELSE 
			LOCATE FOR ALLTRIM(cont)=ALLTRIM(tccont) AND ALLTRIM(acont)=ALLTRIM(tcacont)
			IF !FOUND()
				DO caut_alfa_cursor WITH 'tceva','den','Alegeti simbolul analitic','m.den'
				SELECT tceva
				LOCATE FOR ALLTRIM(den) = ALLTRIM(m.den)
				lcAcont = acont
		
				SELECT actactan
				REPLACE &tcColoana WITH lcAcont
			ENDIF 
		ENDIF 
		
		IF USED('TCEVA')
			USE IN Tceva 
		ENDIF  
		
		SELECT actactan 
		Thisform.veRIF.grid1.SetFocus 
		RETURN ll_l
	ENDPROC

	PROCEDURE verif_complet
		LOCAL COMPL,TE
		TE=''
		COMPL=.T.
		
		*!*	modificare ROAPRODUCTIE v 2.0.0 : daca nu am nr.doc. in cererea de date, il completez cu ce am pe nnir
		Select cerere
		Go Top
		Locate For Upper(var_item) = [NRACT]
		If !Found()
			Go Top
			Locate For Upper(var_item) = [NNIR]
			If Found()
				poact.nract = poact.nnir
			Endif
		Endif
		*!*	modificare ROAPRODUCTIE v 2.0.0	^
		
		&& verifica daca mai exista factura cu acest nr. pt. acelasi partener (411, 401, 404)
		* IF (!EMPTY(poact.v4111) OR !EMPTY(poact.v401)) AND !EMPTY(poact.nract)
		IF !EMPTY(poact.nract)
			LOCAL lcFacturi_dublate, lcMesajFact_dubl
			STORE '' TO lcFacturi_dublate, lcMesajFact_dubl
			
		*** xnote
			SELECT xnote
			LOCATE FOR id_set = oxset.id_set AND ALLTRIM(xscc) = '401'
			IF FOUND()
				SELECT idpart FROM xcont WHERE cont_part = '401' INTO CURSOR crsIdPart
				SELECT crsIdPart
				GO TOP 
				lnIdPart = idpart
				IF USED('crsIdPart')
					USE IN crsIdPart
				ENDIF 
				lcFacturi_dublate = facturi_duplicate('401', lnIdPart, poact.serie_act, poact.nract, lcMesajFact_dubl)
			ENDIF
		
			SELECT xnote
			LOCATE FOR id_set = oxset.id_set AND ALLTRIM(xscc) = '404'
			IF FOUND()
				*!*	modificare	31.10.2012 : am pus 404 in loc de 401
				SELECT idpart FROM xcont WHERE cont_part = '404' INTO CURSOR crsIdPart
				SELECT crsIdPart
				GO TOP 
				lnIdPart = idpart
				IF USED('crsIdPart')
					USE IN crsIdPart
				ENDIF 
				lcFacturi_dublate = facturi_duplicate('404', lnIdPart, poact.serie_act, poact.nract, lcMesajFact_dubl)
			ENDIF
		
			SELECT xnote
			LOCATE FOR id_set = oxset.id_set AND ALLTRIM(xscd) = '4111'
			IF FOUND()
				*!*	modificare	31.10.2012 : am pus 4111 in loc de 401
				SELECT idpart FROM xcont WHERE cont_part = '4111' INTO CURSOR crsIdPart
				SELECT crsIdPart
				GO TOP 
				lnIdPart = idpart
				IF USED('crsIdPart')
					USE IN crsIdPart
				ENDIF 
				lcFacturi_dublate = facturi_duplicate('4111', lnIdPart, poact.serie_act, poact.nract, lcMesajFact_dubl)
			ENDIF
		
		*!*	*** achi_mat
		*!*		IF USED('achi_mat') && in congest nu e folosit achi_mat
		*!*			SELECT achi_mat
		*!*			LOCATE FOR id_set = oxset.id_set AND ALLTRIM(scc) = '401'
		*!*			IF FOUND()
		*!*				lcFacturi_dublate = facturi_duplicate('401', m.nume, m.nract, lcMesajFact_dubl)
		*!*			ENDIF
		
		*!*			SELECT achi_mat
		*!*			LOCATE FOR id_set = oxset.id_set AND ALLTRIM(scc) = '404'
		*!*			IF FOUND()
		*!*				lcFacturi_dublate = facturi_duplicate('404', m.nume, m.nract, lcMesajFact_dubl)
		*!*			ENDIF
		
		*!*			SELECT achi_mat
		*!*			LOCATE FOR id_set = oxset.id_set AND ALLTRIM(scd) = '411'
		*!*			IF FOUND()
		*!*				lcFacturi_dublate = facturi_duplicate('411', m.nume, m.nract, lcMesajFact_dubl)
		*!*			ENDIF
		*!*		ENDIF
		*!*	***
			lcMesajFact_dubl = lcMesajFact_dubl + IIF(!EMPTY(lcFacturi_dublate),IIF(!EMPTY(lcMesajFact_dubl),', ' + lcFacturi_dublate,lcFacturi_dublate),'')
		
			IF !EMPTY(lcMesajFact_dubl)
				lnRaspuns = aMESSAGEBOX(lcMesajFact_dubl + CHR(13)+"Doriti sa continuati?",4+32,"Facturi dublate")
				IF lnRaspuns = 7
					RETURN .F.
				ENDIF
			ENDIF
		ENDIF
		
		SELECT cerere
		SCAN
			lcVar = THIS.pcobj + '.' + ALLTRIM(var_item)
			IF TYPE(lcVar) # 'U'
				z='empty(' + THIS.pcobj + '.' +ALLTRIM(var_item)+')'
			ELSE
				z = '.t.'
			ENDIF
			IF &z AND !INLIST(ALLTRIM(UPPER(var_item)),'NEIMPOZAB','SUMA_2TVA')
				COMPL=.F.
				TE=TE+','+ALLTRIM(LABEL_ITEM)
			ENDIF
		ENDSCAN
		
		IF !COMPL
			TE=IIF(AT(',',TE,1)=1,SUBSTR(TE,2),TE)
			* DO mesaj WITH 'Nu ati completat campurile:',LEFT(TE,60)+'...'
		ENDIF
		
		
		If 'data'$TE Or 'numarul doc'$TE Or 'numele gest'$TE ;	&&	modificare 05.02.07
			Or 'numarul nir'$TE	or 'numarul bon'$TE				&&	modificare 20.09.13
			AMESSAGEBOX("Nu ati completat campurile:"+ Left(TE,60) + "...",0+48,"Atentie")
			Return .F.
		Else
			*!*	modificare	13.06.2013	ROADEVIZE v 0.9.8
			*!*	Return .T.
			If oxset.id_set = 32000
				If poAct.data_in_lucru > poAct.dataact
					AMESSAGEBOX("Data documentului nu poate fi mai mica decat data intrarii in productie ("+Dtoc(poAct.data_in_lucru)+") !",48,"Atentie")
					Return .F.
				Else
					Return .T.
				Endif
			Else
				Return .T.
			Endif
			*!*	modificare	13.06.2013	^
		Endif
	ENDPROC

	PROCEDURE items.actualizeaza_explicatie_tva
		Lparameters tnTvaIncasare
		Thisform.actualizeaza_explicatie_tva(tnTvaIncasare)
		
	ENDPROC

	PROCEDURE items.cbo_saft.LostFocus
		* Schimb in culoarea neagra daca utilizatorul a trecut prin combobox
		*this.ForeColor = RGB(0,0,0)
		this.Parent.lb_Saft.ForeColor =  RGB(0,0,0)
		 
		
	ENDPROC

	PROCEDURE items.cbo_Taxabil.InteractiveChange
		DODEFAULT()
		Thisform.UpdateExplicatieSAFT()
	ENDPROC

	PROCEDURE items.ck_deducere.InteractiveChange
		DODEFAULT()
		Thisform.UpdateExplicatieSAFT()
	ENDPROC

	PROCEDURE verif.Grid1.Column9.Text1.DblClick
		*!* 08.06.2017
		*!* marius.mutu
		*!* am pus readonly = .F. pe campul suma pentru a putea fi modificata suma de la nota TVA calculata si adaugata automat de program la anumite operatii
		*!* Atentie!!! Efect secundar se poate modifica orice suma!!!
		IF TYPE('gnEditareSumaVerificare') = 'N' AND m.gnEditareSumaVerificare = 1
			This.ReadOnly = .F. 
			this.parent.BackColor = RGB(242,255,255)
		ENDIF 	
	ENDPROC

ENDDEFINE

DEFINE CLASS banda2 AS shape 
 	*< CLASSDATA: Baseclass="shape" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		BackColor = 0,64,128
		Height = 30
		Name = "banda2"
		Width = 454
	*</PropValue>

ENDDEFINE

DEFINE CLASS bandabloc AS container 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Banda21" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Blocbuton1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: asezare
	*</DefinedPropArrayMethod>

	*<PropValue>
		BackColor = 255,255,255
		Height = 32
		Name = "bandabloc"
		Width = 385
	*</PropValue>

	ADD OBJECT 'Banda21' AS banda2 WITH ;
		Height = 32, ;
		Left = 1, ;
		Name = "Banda21", ;
		Top = 0, ;
		Width = 707
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="shape" />

	ADD OBJECT 'Blocbuton1' AS blocbuton WITH ;
		Height = 32, ;
		Left = 264, ;
		Name = "Blocbuton1", ;
		Top = 0
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />
	
	PROCEDURE asezare
		LOCAL w
		w=this.Parent.Width
		this.Width=w
		this.banda21.Width=w
		this.blocbuton1.Left=w-this.blocbuton1.width
	ENDPROC

ENDDEFINE

DEFINE CLASS blocbuton AS container 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		BackColor = 255,255,255
		Height = 30
		Name = "blocbuton"
		Width = 120
	*</PropValue>

ENDDEFINE

DEFINE CLASS butoninv AS container 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Imbuton1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Command1" UniqueID="" Timestamp="" />

	*<PropValue>
		BackStyle = 0
		BorderWidth = 0
		Height = 30
		Name = "butoninv"
		Width = 30
	*</PropValue>

	ADD OBJECT 'Command1' AS commandbutton WITH ;
		Caption = "Command1", ;
		Height = 30, ;
		Left = 0, ;
		Name = "Command1", ;
		Style = 1, ;
		Top = 0, ;
		Width = 30
		*< END OBJECT: BaseClass="commandbutton" />

	ADD OBJECT 'Imbuton1' AS imbuton WITH ;
		Height = 30, ;
		Left = 0, ;
		Name = "Imbuton1", ;
		Picture = , ;
		Stretch = 0, ;
		Top = 0, ;
		Width = 30
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="image" />
	
	PROCEDURE Command1.Click
		this.Parent.click
	ENDPROC

	PROCEDURE Command1.MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.Parent.mouseenter
	ENDPROC

	PROCEDURE Command1.MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.Parent.mouseleave
	ENDPROC

	PROCEDURE Imbuton1.Click
		this.Parent.click
	ENDPROC

	PROCEDURE Imbuton1.MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.Parent.mouseenter
	ENDPROC

	PROCEDURE Imbuton1.MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.Parent.mouseleave
	ENDPROC

ENDDEFINE

DEFINE CLASS combogrid AS combobox 
 	*< CLASSDATA: Baseclass="combobox" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		BorderStyle = 0
		FontName = "Arial Narrow"
		Height = 24
		Left = 60
		Name = "Combo1"
		RowSourceType = 0
		Style = 2
		Top = 360
		Width = 100
	*</PropValue>

ENDDEFINE

DEFINE CLASS cote_tva AS _container OF "_baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Lb_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_cbbase1" UniqueID="" Timestamp="" />

	*<PropValue>
		Height = 45
		Name = "cote_tva"
		Width = 60
	*</PropValue>

	ADD OBJECT '_cbbase1' AS _cbbase WITH ;
		BorderColor = 128,128,128, ;
		ColumnCount = 1, ;
		ColumnLines = .F., ;
		FontName = "Arial Narrow", ;
		Height = 20, ;
		Left = 6, ;
		Name = "_cbbase1", ;
		RowSource = "cote_tva.procent", ;
		RowSourceType = 2, ;
		SpecialEffect = 1, ;
		Top = 21, ;
		Width = 47
		*< END OBJECT: ClassLib="_cb_base.vcx" BaseClass="combobox" />

	ADD OBJECT 'Lb_simplu1' AS lb_simplu WITH ;
		Caption = "TVA %", ;
		Left = 11, ;
		Name = "Lb_simplu1", ;
		Top = 5
		*< END OBJECT: ClassLib="lb.vcx" BaseClass="label" />

ENDDEFINE

DEFINE CLASS ct_items AS _ctfrmbase OF "_ct_base.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Item1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item25" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item24" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item23" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item22" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item21" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item20" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item19" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item18" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item17" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item16" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item15" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item14" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item13" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item12" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item11" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item10" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Item4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cbo_Netaxabil" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lb_netaxabil" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cbo_Taxabil" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lb_taxabil" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_deducere" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_tva_la_incasare" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cbo_saft" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lb_saft" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cbo_plata_saft" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lb_plata_saft" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: actualizeaza_explicatie_tva
		*p: opartenerrtvai		&& Informatii RTVAI pentru partenerul verificat
	*</DefinedPropArrayMethod>

	*<PropValue>
		BackStyle = 0
		Height = 550
		Name = "ct_items"
		opartenerrtvai = .NULL.
		Width = 678
		_memberdata = <VFPData>
			<memberdata name="opartenerrtvai" display="oPartenerRTVAI"/>
		</VFPData>
		Gridsort1.Name = "Gridsort1"
		_ct_controller_keypress1.Left = 126
		_ct_controller_keypress1.Name = "_ct_controller_keypress1"
		_ct_controller_keypress1.Top = 118
	*</PropValue>

	ADD OBJECT 'cbo_Netaxabil' AS combobox WITH ;
		BorderColor = 128,128,128, ;
		BorderStyle = 1, ;
		ColumnCount = 1, ;
		ColumnLines = .F., ;
		ControlSource = "", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Height = 20, ;
		InputMask = "", ;
		Left = 486, ;
		Name = "cbo_Netaxabil", ;
		RowSourceType = 6, ;
		SpecialEffect = 1, ;
		Style = 2, ;
		TabIndex = 28, ;
		TabStop = .F., ;
		Top = 124, ;
		Visible = .F., ;
		Width = 159
		*< END OBJECT: BaseClass="combobox" />

	ADD OBJECT 'cbo_plata_saft' AS combobox WITH ;
		BorderColor = 128,128,128, ;
		BorderStyle = 1, ;
		ColumnCount = 1, ;
		ColumnLines = .F., ;
		ControlSource = "", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Height = 20, ;
		InputMask = "", ;
		Left = 545, ;
		Name = "cbo_plata_saft", ;
		RowSourceType = 6, ;
		SpecialEffect = 1, ;
		Style = 2, ;
		TabIndex = 27, ;
		TabStop = .F., ;
		Top = 35, ;
		Visible = .F., ;
		Width = 127
		*< END OBJECT: BaseClass="combobox" />

	ADD OBJECT 'cbo_saft' AS combobox WITH ;
		BorderColor = 128,128,128, ;
		BorderStyle = 1, ;
		ColumnCount = 1, ;
		ColumnLines = .F., ;
		ControlSource = "", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Height = 20, ;
		InputMask = "", ;
		Left = 541, ;
		Name = "cbo_saft", ;
		RowSourceType = 6, ;
		SpecialEffect = 1, ;
		Style = 2, ;
		TabIndex = 27, ;
		TabStop = .F., ;
		Top = 199, ;
		Visible = .F., ;
		Width = 134
		*< END OBJECT: BaseClass="combobox" />

	ADD OBJECT 'cbo_Taxabil' AS combobox WITH ;
		BorderColor = 128,128,128, ;
		BorderStyle = 1, ;
		ColumnCount = 1, ;
		ColumnLines = .F., ;
		ControlSource = "", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Height = 20, ;
		InputMask = "", ;
		Left = 486, ;
		Name = "cbo_Taxabil", ;
		RowSourceType = 6, ;
		SpecialEffect = 1, ;
		Style = 2, ;
		TabIndex = 27, ;
		TabStop = .F., ;
		Top = 168, ;
		Visible = .F., ;
		Width = 159
		*< END OBJECT: BaseClass="combobox" />

	ADD OBJECT 'ck_deducere' AS _checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		Caption = "Limitare ded. TVA 50%", ;
		FontName = "Arial", ;
		Height = 18, ;
		Left = 486, ;
		Name = "ck_deducere", ;
		TabIndex = 1, ;
		TabStop = .F., ;
		Top = 56, ;
		Visible = .F., ;
		Width = 151, ;
		WordWrap = .T.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'ck_tva_la_incasare' AS _checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .F., ;
		Caption = "TVA la încasare", ;
		FontName = "Arial", ;
		Height = 18, ;
		Left = 486, ;
		Name = "ck_tva_la_incasare", ;
		TabIndex = 2, ;
		TabStop = .F., ;
		Top = 76, ;
		Visible = .F., ;
		Width = 109, ;
		WordWrap = .T.
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Item1' AS item WITH ;
		Left = 25, ;
		Name = "Item1", ;
		TabIndex = 3, ;
		Top = 16, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Label_item1.TabIndex = 2, ;
		Text_item1.Format = "k", ;
		Text_item1.Name = "Text_item1", ;
		Text_item1.TabIndex = 1, ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item10' AS item WITH ;
		Left = 25, ;
		Name = "Item10", ;
		TabIndex = 12, ;
		Top = 187, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item11' AS item WITH ;
		Left = 25, ;
		Name = "Item11", ;
		TabIndex = 13, ;
		Top = 206, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item12' AS item WITH ;
		Left = 25, ;
		Name = "Item12", ;
		TabIndex = 14, ;
		Top = 225, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item13' AS item WITH ;
		Left = 25, ;
		Name = "Item13", ;
		TabIndex = 15, ;
		Top = 244, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Label_item1.ZOrderSet = 0, ;
		Text_item1.Name = "Text_item1", ;
		Text_item1.ZOrderSet = 1, ;
		Lineo1.Name = "Lineo1", ;
		Lineo1.ZOrderSet = 2, ;
		Lineo3.Name = "Lineo3", ;
		Lineo3.ZOrderSet = 3, ;
		Lineo4.Name = "Lineo4", ;
		Lineo4.ZOrderSet = 6, ;
		Lineo5.Name = "Lineo5", ;
		Lineo5.ZOrderSet = 4, ;
		Lineo2.Name = "Lineo2", ;
		Lineo2.ZOrderSet = 5
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item14' AS item WITH ;
		Left = 25, ;
		Name = "Item14", ;
		TabIndex = 16, ;
		Top = 263, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item15' AS item WITH ;
		Left = 25, ;
		Name = "Item15", ;
		TabIndex = 17, ;
		Top = 282, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item16' AS item WITH ;
		Left = 25, ;
		Name = "Item16", ;
		TabIndex = 18, ;
		Top = 301, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item17' AS item WITH ;
		Left = 25, ;
		Name = "Item17", ;
		TabIndex = 19, ;
		Top = 320, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item18' AS item WITH ;
		Left = 25, ;
		Name = "Item18", ;
		TabIndex = 20, ;
		Top = 339, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item19' AS item WITH ;
		Left = 25, ;
		Name = "Item19", ;
		TabIndex = 21, ;
		Top = 358, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item2' AS item WITH ;
		Left = 25, ;
		Name = "Item2", ;
		TabIndex = 4, ;
		Top = 35, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item20' AS item WITH ;
		Left = 25, ;
		Name = "Item20", ;
		TabIndex = 22, ;
		Top = 377, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item21' AS item WITH ;
		Left = 25, ;
		Name = "Item21", ;
		TabIndex = 23, ;
		Top = 396, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item22' AS item WITH ;
		Left = 25, ;
		Name = "Item22", ;
		TabIndex = 24, ;
		Top = 415, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item23' AS item WITH ;
		Left = 26, ;
		Name = "Item23", ;
		TabIndex = 24, ;
		Top = 434, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item24' AS item WITH ;
		Left = 25, ;
		Name = "Item24", ;
		TabIndex = 24, ;
		Top = 453, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item25' AS item WITH ;
		Left = 25, ;
		Name = "Item25", ;
		TabIndex = 24, ;
		Top = 472, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item3' AS item WITH ;
		Left = 25, ;
		Name = "Item3", ;
		TabIndex = 5, ;
		Top = 54, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item4' AS item WITH ;
		Left = 25, ;
		Name = "Item4", ;
		TabIndex = 6, ;
		Top = 73, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item5' AS item WITH ;
		Left = 25, ;
		Name = "Item5", ;
		TabIndex = 7, ;
		Top = 92, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item6' AS item WITH ;
		Left = 25, ;
		Name = "Item6", ;
		TabIndex = 8, ;
		Top = 111, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item7' AS item WITH ;
		Left = 25, ;
		Name = "Item7", ;
		TabIndex = 9, ;
		Top = 130, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item8' AS item WITH ;
		Left = 25, ;
		Name = "Item8", ;
		TabIndex = 10, ;
		Top = 149, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Item9' AS item WITH ;
		Left = 25, ;
		Name = "Item9", ;
		TabIndex = 11, ;
		Top = 168, ;
		Visible = .F., ;
		ZOrderSet = 3, ;
		Label_item1.Caption = "LABEL", ;
		Label_item1.Name = "Label_item1", ;
		Text_item1.Name = "Text_item1", ;
		Lineo1.Name = "Lineo1", ;
		Lineo3.Name = "Lineo3", ;
		Lineo4.Name = "Lineo4", ;
		Lineo5.Name = "Lineo5", ;
		Lineo2.Name = "Lineo2"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'lb_netaxabil' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Netaxabil", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Height = 18, ;
		Left = 486, ;
		Name = "lb_netaxabil", ;
		TabIndex = 26, ;
		Top = 107, ;
		Visible = .F., ;
		Width = 56
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'lb_plata_saft' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Cod plata", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Height = 18, ;
		Left = 486, ;
		Name = "lb_plata_saft", ;
		TabIndex = 25, ;
		Top = 36, ;
		Visible = .F., ;
		Width = 57
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'lb_saft' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Cod taxa", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Height = 18, ;
		Left = 486, ;
		Name = "lb_saft", ;
		TabIndex = 25, ;
		Top = 199, ;
		Visible = .F., ;
		Width = 54
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'lb_taxabil' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Taxabil", ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Height = 18, ;
		Left = 486, ;
		Name = "lb_taxabil", ;
		TabIndex = 25, ;
		Top = 151, ;
		Visible = .F., ;
		Width = 43
		*< END OBJECT: BaseClass="label" />
	
	PROCEDURE cbo_Netaxabil.InteractiveChange
		*!*	modificare ROACONT v 2.0.76
		With This.Parent.Parent
			.cnetaxabil = crsjnetax.denumire
			.ntvanetax = (100 + crsjnetax.cota_tva) / 100
			.id_jnetax = crsjnetax.id_jtva_coloana
			.nTaxCodeN = crsjnetax.taxcode
		Endwith
		*!*	modificare ROACONT v 2.0.76	^
	ENDPROC

	PROCEDURE cbo_Netaxabil.Valid
		*!*	modificare ROACONT v 2.0.76
		Local lcComanda
		*!*	Thisformset.cnetaxabil = crsjnetax.denumire
		*!*	Thisformset.ntvanetax = (100 + crsjnetax.cota_tva) / 100
		*!*	Thisformset.id_jnetax = crsjnetax.id_jtva_coloana
		lcComanda='this.parent.item'+Alltrim(This.Tag)+'.text_item1.valid'
		&lcComanda
		Release lcComanda
		*!*	modificare ROACONT v 2.0.76	^
	ENDPROC

	PROCEDURE cbo_plata_saft.InteractiveChange
		Thisform.cTaxCode = Alltrim(Nvl(crsTaxTable.descriere,''))
		
	ENDPROC

	PROCEDURE cbo_Taxabil.InteractiveChange
		*!*	modificare ROACONT v 2.0.76
		With This.Parent.Parent
			.ctaxabil = crsjtax.denumire
			.ntvatax = (100 + crsjtax.cota_tva) / 100
			.id_jtax = crsjtax.id_jtva_coloana
			.id_jtva = crsjtax.id_tva
			.nTaxCode = crsjtax.taxcode
		Endwith
		*!*	modificare ROACONT v 2.0.76	^
	ENDPROC

	PROCEDURE cbo_Taxabil.Valid
		*!*	modificare ROACONT v 2.0.76
		Local lcComanda
		*!*	Thisformset.ctaxabil = crsjtax.denumire
		*!*	Thisformset.ntvatax = (100 + crsjtax.cota_tva) / 100
		*!*	Thisformset.id_jtax = crsjtax.id_jtva_coloana
		*!*	thisformset.id_jtva = crsjtax.id_tva
		lcComanda='this.Parent.item'+ALLTRIM(this.Tag)+'.text_item1.valid'
		&lcComanda
		Release lcComanda
		*!*	modificare ROACONT v 2.0.76	^
	ENDPROC

	PROCEDURE ck_tva_la_incasare.InteractiveChange
		This.Parent.actualizeaza_explicatie_tva(This.Value)
	ENDPROC

	PROCEDURE ck_tva_la_incasare.ProgrammaticChange
		This.Parent.actualizeaza_explicatie_tva(This.Value)
	ENDPROC

	PROCEDURE Item1.LostFocus
		this.Parent.Parent.nou_intrat = .f.
	ENDPROC

ENDDEFINE

DEFINE CLASS ct_verif AS _ctfrmbase OF "_ct_base.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Grid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column2.Header2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column3.Header3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column4.Header4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column5.Header5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column6.Header6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column7.Header7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column8.Header8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column8.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column9.Header9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column9.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column10.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column10.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column11.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column11.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column13.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column13.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column14.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column14.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column15.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column15.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column16.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column16.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column17.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column17.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column18.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column18.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column19.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column19.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column20.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column20.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column25.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column25.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column26.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column26.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column27.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column27.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column28.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column28.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column29.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column29.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column31.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column31.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column32.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column32.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column33.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column33.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column34.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column34.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column35.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column35.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column36.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column36.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column12.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column12.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column21.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column21.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column22.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column22.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column23.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column23.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column24.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column24.Text1" UniqueID="" Timestamp="" />

	*<PropValue>
		Height = 295
		Name = "ct_verif"
		Width = 650
		Gridsort1.Name = "Gridsort1"
		_ct_controller_keypress1.Name = "_ct_controller_keypress1"
	*</PropValue>

	ADD OBJECT 'Grid1' AS grid WITH ;
		Anchor = 15, ;
		BackColor = 255,255,255, ;
		ColumnCount = 35, ;
		DeleteMark = .F., ;
		FontCharSet = 238, ;
		FontSize = 10, ;
		GridLineColor = 192,192,192, ;
		GridLines = 3, ;
		Height = 294, ;
		Left = 1, ;
		Name = "Grid1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "ACTACTAN", ;
		RowHeight = 19, ;
		TabIndex = 5, ;
		Top = 1, ;
		Width = 650, ;
		ZOrderSet = 4, ;
		Column1.Alignment = 1, ;
		Column1.BackColor = 255,255,255, ;
		Column1.ControlSource = "NRCRT()", ;
		Column1.FontCharSet = 238, ;
		Column1.FontName = "Arial", ;
		Column1.FontSize = 10, ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 34, ;
		Column2.Alignment = 1, ;
		Column2.BackColor = 255,255,255, ;
		Column2.ColumnOrder = 3, ;
		Column2.ControlSource = "DATAIREG", ;
		Column2.FontCharSet = 238, ;
		Column2.FontName = "Arial", ;
		Column2.FontSize = 10, ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 67, ;
		Column3.Alignment = 0, ;
		Column3.BackColor = 255,255,255, ;
		Column3.ColumnOrder = 2, ;
		Column3.ControlSource = "FDOC", ;
		Column3.FontCharSet = 238, ;
		Column3.FontName = "Arial", ;
		Column3.FontSize = 10, ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 53, ;
		Column4.Alignment = 1, ;
		Column4.BackColor = 255,255,255, ;
		Column4.ColumnOrder = 4, ;
		Column4.ControlSource = "DATAACT", ;
		Column4.FontCharSet = 238, ;
		Column4.FontName = "Arial", ;
		Column4.FontSize = 10, ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 58, ;
		Column5.Alignment = 1, ;
		Column5.BackColor = 255,255,255, ;
		Column5.ColumnOrder = 6, ;
		Column5.ControlSource = "NRACT", ;
		Column5.FontCharSet = 238, ;
		Column5.FontName = "Arial", ;
		Column5.FontSize = 10, ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 82, ;
		Column6.Alignment = 0, ;
		Column6.BackColor = 255,255,255, ;
		Column6.ColumnOrder = 12, ;
		Column6.ControlSource = "partd", ;
		Column6.FontCharSet = 238, ;
		Column6.FontName = "Arial", ;
		Column6.FontSize = 10, ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .T., ;
		Column6.Width = 87, ;
		Column7.Alignment = 1, ;
		Column7.BackColor = 255,255,255, ;
		Column7.ColumnOrder = 8, ;
		Column7.ControlSource = "SCD", ;
		Column7.DynamicForeColor = "rgb(0,0,128)", ;
		Column7.FontBold = .F., ;
		Column7.FontCharSet = 238, ;
		Column7.FontName = "Arial", ;
		Column7.FontSize = 10, ;
		Column7.ForeColor = 0,0,128, ;
		Column7.Name = "Column7", ;
		Column7.ReadOnly = .T., ;
		Column7.Width = 62, ;
		Column8.Alignment = 1, ;
		Column8.BackColor = 255,255,255, ;
		Column8.ColumnOrder = 10, ;
		Column8.ControlSource = "SCC", ;
		Column8.DynamicForeColor = "rgb(0,0,128)", ;
		Column8.FontBold = .F., ;
		Column8.FontCharSet = 238, ;
		Column8.FontName = "Arial", ;
		Column8.FontSize = 10, ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .T., ;
		Column8.Width = 66, ;
		Column9.Alignment = 1, ;
		Column9.BackColor = 255,255,255, ;
		Column9.ColumnOrder = 7, ;
		Column9.ControlSource = "SUMA", ;
		Column9.DynamicForeColor = "IIF(SUMA>=0, RGB(0,0,0), RGB(255,0,0))", ;
		Column9.FontBold = .F., ;
		Column9.FontCharSet = 238, ;
		Column9.FontName = "Arial", ;
		Column9.FontSize = 10, ;
		Column9.Format = "r", ;
		Column9.InputMask = (get_mask(12,gnPa)), ;
		Column9.Name = "Column9", ;
		Column9.ReadOnly = .T., ;
		Column9.Width = 93, ;
		Column10.Alignment = 0, ;
		Column10.BackColor = 255,255,255, ;
		Column10.ColumnOrder = 13, ;
		Column10.ControlSource = "partc", ;
		Column10.FontCharSet = 238, ;
		Column10.FontName = "Arial", ;
		Column10.FontSize = 10, ;
		Column10.Name = "Column10", ;
		Column10.ReadOnly = .T., ;
		Column10.Width = 91, ;
		Column11.Alignment = 0, ;
		Column11.BackColor = 255,255,255, ;
		Column11.ColumnOrder = 17, ;
		Column11.ControlSource = "EXPLICATIA", ;
		Column11.FontCharSet = 238, ;
		Column11.FontName = "Arial", ;
		Column11.FontSize = 10, ;
		Column11.Name = "Column11", ;
		Column11.ReadOnly = .T., ;
		Column11.Width = 74, ;
		Column12.BackColor = 255,255,255, ;
		Column12.ColumnOrder = 21, ;
		Column12.ControlSource = "perecheD", ;
		Column12.FontCharSet = 238, ;
		Column12.FontName = "Arial", ;
		Column12.FontSize = 10, ;
		Column12.Name = "Column13", ;
		Column12.ReadOnly = .T., ;
		Column12.Width = 65, ;
		Column13.BackColor = 255,255,255, ;
		Column13.ColumnOrder = 30, ;
		Column13.ControlSource = "nume_3", ;
		Column13.FontCharSet = 238, ;
		Column13.FontName = "Arial", ;
		Column13.FontSize = 10, ;
		Column13.Name = "Column14", ;
		Column13.ReadOnly = .T., ;
		Column14.BackColor = 255,255,255, ;
		Column14.ColumnOrder = 31, ;
		Column14.ControlSource = "nume_5", ;
		Column14.FontCharSet = 238, ;
		Column14.FontName = "Arial", ;
		Column14.FontSize = 10, ;
		Column14.Name = "Column15", ;
		Column14.ReadOnly = .T., ;
		Column15.BackColor = 255,255,255, ;
		Column15.ColumnOrder = 24, ;
		Column15.ControlSource = "suma_val", ;
		Column15.FontCharSet = 238, ;
		Column15.FontName = "Arial", ;
		Column15.FontSize = 10, ;
		Column15.Format = "r", ;
		Column15.InputMask = (get_mask(12,gnPval)), ;
		Column15.Name = "Column16", ;
		Column15.ReadOnly = .T., ;
		Column15.Width = 66, ;
		Column16.BackColor = 255,255,255, ;
		Column16.ColumnOrder = 25, ;
		Column16.ControlSource = "curs", ;
		Column16.FontCharSet = 238, ;
		Column16.FontName = "Arial", ;
		Column16.FontSize = 10, ;
		Column16.Format = "r", ;
		Column16.InputMask = (get_mask(12,gnPcurs)), ;
		Column16.Name = "Column17", ;
		Column16.ReadOnly = .T., ;
		Column16.Width = 65, ;
		Column17.BackColor = 255,255,255, ;
		Column17.ColumnOrder = 33, ;
		Column17.ControlSource = "id_factd", ;
		Column17.FontCharSet = 238, ;
		Column17.FontName = "Arial", ;
		Column17.FontSize = 10, ;
		Column17.Name = "Column18", ;
		Column17.ReadOnly = .T., ;
		Column18.BackColor = 255,255,255, ;
		Column18.ColumnOrder = 23, ;
		Column18.ControlSource = "datascad", ;
		Column18.FontCharSet = 238, ;
		Column18.FontName = "Arial", ;
		Column18.FontSize = 10, ;
		Column18.Name = "Column19", ;
		Column18.ReadOnly = .T., ;
		Column18.Visible = .T., ;
		Column18.Width = 61, ;
		Column19.BackColor = 255,255,255, ;
		Column19.ColumnOrder = 26, ;
		Column19.ControlSource = "nume_val", ;
		Column19.FontCharSet = 238, ;
		Column19.FontName = "Arial", ;
		Column19.FontSize = 10, ;
		Column19.Name = "Column20", ;
		Column19.ReadOnly = .T., ;
		Column19.Width = 60, ;
		Column20.BackColor = 255,255,255, ;
		Column20.ColumnOrder = 27, ;
		Column20.ControlSource = "nresp", ;
		Column20.FontCharSet = 238, ;
		Column20.FontName = "Arial", ;
		Column20.FontSize = 10, ;
		Column20.Name = "Column25", ;
		Column20.ReadOnly = .T., ;
		Column21.BackColor = 255,255,255, ;
		Column21.ColumnOrder = 28, ;
		Column21.ControlSource = "dst_chlt", ;
		Column21.FontCharSet = 238, ;
		Column21.FontName = "Arial", ;
		Column21.FontSize = 10, ;
		Column21.Name = "Column26", ;
		Column21.ReadOnly = .T., ;
		Column22.BackColor = 255,255,255, ;
		Column22.ColumnOrder = 18, ;
		Column22.ControlSource = "nrord", ;
		Column22.FontCharSet = 238, ;
		Column22.FontName = "Arial", ;
		Column22.FontSize = 10, ;
		Column22.Name = "Column27", ;
		Column22.ReadOnly = .T., ;
		Column22.Width = 87, ;
		Column23.BackColor = 255,255,255, ;
		Column23.ColumnOrder = 20, ;
		Column23.ControlSource = "nnir", ;
		Column23.FontCharSet = 238, ;
		Column23.FontName = "Arial", ;
		Column23.FontSize = 10, ;
		Column23.Name = "Column28", ;
		Column23.ReadOnly = .T., ;
		Column23.Width = 55, ;
		Column24.BackColor = 255,255,255, ;
		Column24.ColumnOrder = 29, ;
		Column24.ControlSource = "sectie", ;
		Column24.FontCharSet = 238, ;
		Column24.FontName = "Arial", ;
		Column24.FontSize = 10, ;
		Column24.Name = "Column29", ;
		Column24.ReadOnly = .T., ;
		Column25.BackColor = 242,255,255, ;
		Column25.ColumnOrder = 9, ;
		Column25.ControlSource = "ascd", ;
		Column25.DynamicBackColor = "rgb(242,255,255)", ;
		Column25.FontCharSet = 238, ;
		Column25.FontName = "Arial", ;
		Column25.FontSize = 10, ;
		Column25.Format = "r", ;
		Column25.InputMask = "xxxx", ;
		Column25.Name = "Column31", ;
		Column25.ReadOnly = .F., ;
		Column25.Width = 39, ;
		Column26.BackColor = 242,255,255, ;
		Column26.ColumnOrder = 11, ;
		Column26.ControlSource = "ascc", ;
		Column26.DynamicBackColor = "rgb(242,255,255)", ;
		Column26.FontCharSet = 238, ;
		Column26.FontName = "Arial", ;
		Column26.FontSize = 10, ;
		Column26.Format = "r", ;
		Column26.InputMask = "xxxx", ;
		Column26.Name = "Column32", ;
		Column26.ReadOnly = .F., ;
		Column26.Width = 40, ;
		Column27.BackColor = 255,255,255, ;
		Column27.ColumnOrder = 35, ;
		Column27.ControlSource = "proc_tva", ;
		Column27.FontCharSet = 238, ;
		Column27.FontName = "Arial", ;
		Column27.FontSize = 10, ;
		Column27.Name = "Column33", ;
		Column27.ReadOnly = .T., ;
		Column27.Width = 60, ;
		Column28.BackColor = 255,255,255, ;
		Column28.ColumnOrder = 22, ;
		Column28.ControlSource = "perecheC", ;
		Column28.FontCharSet = 238, ;
		Column28.FontName = "Arial", ;
		Column28.FontSize = 10, ;
		Column28.Name = "Column34", ;
		Column28.ReadOnly = .T., ;
		Column28.Width = 68, ;
		Column29.BackColor = 255,255,255, ;
		Column29.ColumnOrder = 34, ;
		Column29.ControlSource = "id_factc", ;
		Column29.FontCharSet = 238, ;
		Column29.FontName = "Arial", ;
		Column29.FontSize = 10, ;
		Column29.Name = "Column35", ;
		Column29.ReadOnly = .T., ;
		Column30.BackColor = 255,255,255, ;
		Column30.ColumnOrder = 32, ;
		Column30.ControlSource = "sucursala", ;
		Column30.FontCharSet = 238, ;
		Column30.FontName = "Arial", ;
		Column30.FontSize = 10, ;
		Column30.Name = "Column36", ;
		Column30.ReadOnly = .T., ;
		Column30.Width = 95, ;
		Column31.BackColor = 255,255,255, ;
		Column31.ColumnOrder = 19, ;
		Column31.ControlSource = "contract", ;
		Column31.FontCharSet = 238, ;
		Column31.FontName = "Arial", ;
		Column31.FontSize = 10, ;
		Column31.Name = "Column12", ;
		Column31.ReadOnly = .T., ;
		Column31.Width = 65, ;
		Column32.BackColor = 255,255,255, ;
		Column32.ColumnOrder = 5, ;
		Column32.ControlSource = "serie_act", ;
		Column32.FontCharSet = 238, ;
		Column32.FontName = "Arial", ;
		Column32.FontSize = 10, ;
		Column32.Name = "Column21", ;
		Column32.ReadOnly = .T., ;
		Column32.Width = 65, ;
		Column33.ColumnOrder = 14, ;
		Column33.ControlSource = "explicatie_tva", ;
		Column33.FontCharSet = 238, ;
		Column33.Name = "Column22", ;
		Column33.Width = 132, ;
		Column34.ColumnOrder = 15, ;
		Column34.ControlSource = "taxname", ;
		Column34.FontCharSet = 238, ;
		Column34.Name = "Column23", ;
		Column34.Width = 84, ;
		Column35.ColumnOrder = 16, ;
		Column35.ControlSource = "paymentname", ;
		Column35.FontCharSet = 238, ;
		Column35.Name = "Column24", ;
		Column35.Width = 89
		*< END OBJECT: BaseClass="grid" />

	ADD OBJECT 'Grid1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "NrCrt", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column1.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column10.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Partener Credit", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column10.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column11.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatia", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column11.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column12.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Contract", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column12.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column13.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.doc.platit", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column13.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column14.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatia 4", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column14.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column15.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatia 6", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column15.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column16.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Suma Valuta", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column16.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column17.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Curs valutar", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column17.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column18.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id factD", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column18.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column19.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data scadenta", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column19.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		Visible = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column2.Header2' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data Inreg.", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header2"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column2.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column20.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nume Valuta", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column20.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column21.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Serie Doc.", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column21.Text1' AS textbox WITH ;
		Alignment = 3, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column22.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatie TVA", ;
		FontCharSet = 238, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column22.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column23.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod taxa SAFT", ;
		FontCharSet = 238, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column23.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column24.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod plata SAFT", ;
		FontCharSet = 238, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column24.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column25.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Responsabili", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column25.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column26.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cheltuieli/Venituri", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column26.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column27.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Lucrare/Comanda", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column27.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column28.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.NIR/Bon", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column28.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column29.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sectie", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column29.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column3.Header3' AS header WITH ;
		Alignment = 2, ;
		Caption = "Fel Doc.", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header3"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column3.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column31.Header1' AS header WITH ;
		Caption = "Analit.", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column31.Text1' AS textbox WITH ;
		BackColor = 242,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column32.Header1' AS header WITH ;
		Caption = "Analit.", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column32.Text1' AS textbox WITH ;
		BackColor = 242,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column33.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cota TVA", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column33.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column34.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.doc.incasat", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column34.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column35.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id factC", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column35.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column36.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sucursala", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column36.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column4.Header4' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data Act", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header4"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column4.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column5.Header5' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr.Doc.", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header5"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column5.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column6.Header6' AS header WITH ;
		Alignment = 2, ;
		Caption = "Partener Debit", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header6"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column6.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 255,255,255, ;
		BorderColor = 0,0,0, ;
		BorderStyle = 0, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column7.Header7' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont Deb.", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header7"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column7.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontBold = .F., ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,128, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column8.Header8' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont Cred.", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header8"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column8.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontBold = .F., ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Grid1.Column9.Header9' AS header WITH ;
		Alignment = 2, ;
		Caption = "Suma", ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Name = "Header9"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.Column9.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontBold = .F., ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE Init
		DODEFAULT()
		this.grid1.column23.Visible = m.gl406 && taxcode
		this.grid1.column24.Visible = m.gl406 && paymentcode
	ENDPROC

	PROCEDURE Grid1.Column1.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column10.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column11.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column2.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column3.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column31.Text1.Click
		this.LostFocus(.t.)
	ENDPROC

	PROCEDURE Grid1.Column31.Text1.LostFocus
		*!* 05.06.2009
		*!* marius.mutu
		*!* completez analiticul pentru toate aparitiile contului
		
		Parameters PlClick
		LOCAL lcCont, lcAcont, lnRecno, llReturn
		
		Select actactan
		lcCont = scd
		lcAcont = ascd
		lnRecno = RECNO()
		*ll_l=Thisformset.verific_analitic(PlClick, lcCont, lcAcont,'ascd')
		llReturn = verific_analitic(plClick, lcCont, lcAcont,'ascd','actactan')
		
		If !llReturn
			Replace actactan.ascd With ''
			Return 0
		ELSE 
			*!* 05.06.2009
			*!* marius.mutu
			SELECT actactan
			REPLACE ALL ascd WITH lcAcont FOR ALLTRIM(scd) == ALLTRIM(lcCont) AND EMPTY(ascd)
			REPLACE ALL ascc WITH lcAcont FOR ALLTRIM(scc) == ALLTRIM(lcCont) AND EMPTY(ascc)
			GOTO lnRecno 	
		Endif
		This.Parent.Parent.Refresh
		
	ENDPROC

	PROCEDURE Grid1.Column31.Text1.Valid
		*!*	IF !EMPTY(ascd)
		*!*		ll_l=THISFORMset.verif_ASCD()
		*!*		IF ll_l
		*!*			REPLACE ACTACTAN.ASCD WITH ''
		*!*			RETURN 0
		*!*		ENDIF 
		*!*		THIS.Parent.Parent.Refresh 
		*!*	ENDIF 
	ENDPROC

	PROCEDURE Grid1.Column32.Text1.Click
		this.LostFocus(.t.)
		
	ENDPROC

	PROCEDURE Grid1.Column32.Text1.LostFocus
		PARAMETERS PlClick
		SELECT actactan
		lcCont = scc
		lcAcont = ascc
		*ll_l=THISFORMset.verific_analitic(plClick, lcCont, lcAcont,'ascc')
		llReturn = verific_analitic(plClick, lcCont, lcAcont,'ascc','actactan')
		IF !llReturn
			REPLACE ACTACTAN.ASCC WITH ''
			RETURN 0
		ENDIF 
		THIS.Parent.Parent.Refresh 
	ENDPROC

	PROCEDURE Grid1.Column32.Text1.Valid
		*!*	IF !EMPTY(ascc)
		*!*		ll_l=THISFORMset.verif_ASCC()
		*!*		IF ll_l
		*!*			REPLACE ACTACTAN.ASCC WITH ''
		*!*			RETURN 0
		*!*		ENDIF 
		*!*		THIS.Parent.Parent.Refresh 
		*!*	ENDIF 
	ENDPROC

	PROCEDURE Grid1.Column4.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column5.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column6.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column7.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column8.Text1.RightClick
		do editscurt.mpr
	ENDPROC

	PROCEDURE Grid1.Column9.Text1.RightClick
		do editscurt.mpr
	ENDPROC

ENDDEFINE

DEFINE CLASS da AS terminat OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Height = 30
		Name = "da"
		Width = 50
		Imbuton1.Height = 30
		Imbuton1.Name = "Imbuton1"
		Imbuton1.Picture = ..\grafice\da_sus.bmp
		Imbuton1.Width = 50
		Command1.Height = 30
		Command1.Left = 0
		Command1.Name = "Command1"
		Command1.Top = 0
		Command1.Width = 50
	*</PropValue>
	
	PROCEDURE MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='da_jos.BMP'
	ENDPROC

	PROCEDURE MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='da_sus.BMP'
	ENDPROC

ENDDEFINE

DEFINE CLASS excel AS butoninv OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "excel"
		Imbuton1.Height = 27
		Imbuton1.Name = "Imbuton1"
		Imbuton1.Picture = ..\grafice\excel_sus.bmp
		Imbuton1.ToolTipText = "Excel"
		Imbuton1.Width = 30
		Command1.Name = "Command1"
		Command1.Picture = ..\grafice\excel_sus.bmp
		Command1.ToolTipText = "Excel"
	*</PropValue>
	
	PROCEDURE MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='excel_JOs.BMP'
	ENDPROC

	PROCEDURE MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='excel_sus.BMP'
	ENDPROC

ENDDEFINE

DEFINE CLASS f_xitem AS formtermin OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Grid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Name = "f_xitem"
		SHAPE1.Height = 36
		SHAPE1.Left = 0
		SHAPE1.Name = "SHAPE1"
		SHAPE1.Top = 0
		SHAPE1.Width = 484
		TERMINAT1.COMMAND1.Name = "COMMAND1"
		TERMINAT1.IMBUTON1.Height = 29
		TERMINAT1.IMBUTON1.Name = "IMBUTON1"
		TERMINAT1.IMBUTON1.Width = 27
		TERMINAT1.Left = 500
		TERMINAT1.Name = "TERMINAT1"
		TITLUFRUMOS1.Caption = "Cererea de date"
		TITLUFRUMOS1.Name = "TITLUFRUMOS1"
	*</PropValue>

	ADD OBJECT 'Grid1' AS grid WITH ;
		Height = 278, ;
		Left = 8, ;
		Name = "Grid1", ;
		ReadOnly = .T., ;
		Top = 44, ;
		Width = 474
		*< END OBJECT: BaseClass="grid" />

	ADD OBJECT 'Nou1' AS nou WITH ;
		Left = 501, ;
		Name = "Nou1", ;
		Top = 48, ;
		Visible = .F., ;
		IMBUTON1.Height = 29, ;
		IMBUTON1.Name = "IMBUTON1", ;
		IMBUTON1.Width = 27, ;
		COMMAND1.Name = "COMMAND1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Sterge1' AS sterge WITH ;
		Left = 501, ;
		Name = "Sterge1", ;
		Top = 84, ;
		Visible = .F., ;
		IMBUTON1.Height = 26, ;
		IMBUTON1.Name = "IMBUTON1", ;
		IMBUTON1.Width = 26, ;
		COMMAND1.Name = "COMMAND1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />
	
	PROCEDURE Nou1.COMMAND1.Click
		SELECT xitems
		IF FLOCK()
		APPEND blan
		ENDIF
		UNLOCK
		thisform.grid1.refresh
		
	ENDPROC

	PROCEDURE TITLUFRUMOS1.DblClick
		thisform.grid1.ReadOnly=.f.
		thisform.nou1.Visible=.t.
	ENDPROC

ENDDEFINE

DEFINE CLASS formbaza AS form 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		AlwaysOnTop = .T.
		AutoCenter = .T.
		BackColor = 255,255,255
		BorderStyle = 3
		Caption = ""
		Closable = .F.
		ControlBox = .F.
		DoCreate = .T.
		Height = 250
		MaxButton = .F.
		MinButton = .F.
		Movable = .F.
		Name = "formbaza"
		ScrollBars = 3
		Width = 375
	*</PropValue>

ENDDEFINE

DEFINE CLASS formbloc AS formbaza OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Bandabloc1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Bandabloc1.Blocbuton1.Terminat1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Titlufrumos1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 292
		Name = "formbloc"
		ScrollBars = 0
		Width = 385
		WindowType = 1
	*</PropValue>

	ADD OBJECT 'Bandabloc1' AS bandabloc WITH ;
		Left = 0, ;
		Name = "Bandabloc1", ;
		Top = 0, ;
		Banda21.Name = "Banda21", ;
		Blocbuton1.Height = 32, ;
		Blocbuton1.Left = 336, ;
		Blocbuton1.Name = "Blocbuton1", ;
		Blocbuton1.Top = 0, ;
		Blocbuton1.Width = 48
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Bandabloc1.Blocbuton1.Terminat1' AS terminat WITH ;
		Left = 11, ;
		Name = "Terminat1", ;
		Top = 1, ;
		Imbuton1.Height = 27, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 30, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Titlufrumos1' AS titlufrumos WITH ;
		Height = 37, ;
		Left = 5, ;
		Name = "Titlufrumos1", ;
		Top = 2, ;
		Width = 319
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="label" />

ENDDEFINE

DEFINE CLASS formtermin AS formbaza OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Terminat1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Titlufrumos1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nhwnd
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 330
		Name = "formtermin"
		nhwnd = 0
		ScrollBars = 2
		ShowTips = .T.
		Width = 550
		WindowType = 1
	*</PropValue>

	ADD OBJECT 'Shape1' AS shape WITH ;
		BackColor = 0,64,128, ;
		BorderStyle = 0, ;
		BorderWidth = 0, ;
		Height = 36, ;
		Left = 0, ;
		Name = "Shape1", ;
		Top = 0, ;
		Width = 552, ;
		ZOrderSet = 0
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Terminat1' AS terminat WITH ;
		Left = 500, ;
		Name = "Terminat1", ;
		Picture = ..\grafice\orb.bmp, ;
		ToolTipText = "Terminare (CTRL+F)", ;
		Top = 3, ;
		ZOrderSet = 1, ;
		Imbuton1.Height = 29, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 27, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Titlufrumos1' AS titlufrumos WITH ;
		Left = 7, ;
		Name = "Titlufrumos1", ;
		Top = -1, ;
		ZOrderSet = 2
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="label" />
	
	PROCEDURE KeyPress
		Lparameters nKeyCode, nShiftAltCtrl
		Local llRenunt, llTerminat, llUrmator, llVerific
		llTerminat = .F.
		If Pemstatus(This, "terminat1", 5)
			llTerminat = This.terminat1.Visible
		Endif
		
		llRenunt = .F.
		If Pemstatus(This, "renunt1", 5)
			llRenunt = This.renunt1.Visible
		Endif
		
		llVerific = .F.
		If Pemstatus(This, "verif1", 5)
			llVerific = This.verif1.Visible
		Endif
		
		llUrmator = .F.
		If Pemstatus(This, "urmator1", 5)
			llUrmator = This.urmator1.Visible
		Endif
		
		llPrecedent = .F.
		If Pemstatus(This, "precedent1", 5)
			llPrecedent = This.precedent1.Visible
		Endif
		
		Do Case
			Case nKeyCode=27 And nShiftAltCtrl=0 && ESC && PRECEDENT/RENUNT
				Nodefault
				If llPrecedent
					This.precedent1.command1.setfocus()
					This.precedent1.command1.Click()
				Else
					If aMessagebox("Sunteti sigur ca doriti sa inchideti fereastra?",4+32+256,"Confirmare")==6
						If llRenunt
							this.renunt1.command1.setfocus()
							This.renunt1.command1.Click()
						Endif
					Endif
				Endif
			Case nKeyCode=6 And nShiftAltCtrl=2 && CTRL + F && TERMINAT / VERIFIC / URMATOR
				Nodefault
				If llTerminat
					This.terminat1.command1.setfocus()
					This.terminat1.command1.Click()
				Else
					If llVerific
						This.verif1.command1.setfocus()
						This.verif1.command1.Click()
					Else
						If llUrmator
							This.urmator1.command1.setfocus()
							This.urmator1.command1.Click()
						Endif
					Endif
				Endif
			Otherwise
				DoDefault(nKeyCode, nShiftAltCtrl)
		Endcase
		
		
	ENDPROC

	PROCEDURE Shape1.Init
		nHwnd = 0
		TitleBar = 0
		 DECLARE ReleaseCapture IN "user32"
		  DECLARE LONG SendMessage IN "user32";
		   LONG HWND, LONG wMsg, LONG wParam, LONG LPARAM
		  IF VERSION(5) < 700
		    *-- Need to get the forms window handle
		  ELSE
		    THISform.nHwnd = THISform.HWnd
		  ENDIF
	ENDPROC

	PROCEDURE Shape1.MouseDown
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		  IF nButton = 1
		    ReleaseCapture()
		    SendMessage(THISform.nHWND, 0x112, 0xF012, 0x0)
		    SendMessage(THISform.nHWND, 0x202, 0x0, 0x0)
		  ENDIF
	ENDPROC

	PROCEDURE Titlufrumos1.Init
		nHwnd = 0
		TitleBar = 0
		 DECLARE ReleaseCapture IN "user32"
		  DECLARE LONG SendMessage IN "user32";
		   LONG HWND, LONG wMsg, LONG wParam, LONG LPARAM
		  IF VERSION(5) < 700
		    *-- Need to get the forms window handle
		  ELSE
		    THISform.nHwnd = THISform.HWnd
		  ENDIF
	ENDPROC

	PROCEDURE Titlufrumos1.MouseDown
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		  IF nButton = 1
		    ReleaseCapture()
		    SendMessage(THISform.nHWND, 0x112, 0xF012, 0x0)
		    SendMessage(THISform.nHWND, 0x202, 0x0, 0x0)
		  ENDIF
		  
	ENDPROC

ENDDEFINE

DEFINE CLASS gridb AS grid 
 	*< CLASSDATA: Baseclass="grid" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Column1.Text1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: gasestecol
		*m: headerclick
		*m: iesire
		*m: treaba
		*p: listaord
		*p: ordine
	*</DefinedPropArrayMethod>

	*<PropValue>
		BackColor = 255,255,255
		ColumnCount = 1
		DeleteMark = .F.
		GridLineColor = 0,0,0
		GridLineWidth = 1
		Height = 200
		listaord = 0,0
		Name = "gridb"
		ordine = 0
		Panel = 1
		ReadOnly = .T.
		RecordMark = .T.
		Width = 125
		Column1.BackColor = 255,255,255
		Column1.Name = "Column1"
		Column1.ReadOnly = .T.
		Column1.Width = 105
	*</PropValue>

	ADD OBJECT 'Column1.Header1' AS header WITH ;
		BackColor = 255,255,255, ;
		Caption = "Header1", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BackStyle = 0, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE gasestecol
		Parameters ii
		
		For j=1 To This.ColumnCount
			Nn=Alltrim(Str(j))
			z='this.column'+Nn+'.columnorder=ii'
			If &z
				Return nn
			Endif
		Next j
		RETURN '0'
		
	ENDPROC

	PROCEDURE headerclick
		PARAMETERS co
		l=this.listaord
		
		IF INLIST(co,&l)
		this.ordine=co
		this.treaba
		endif
		
	ENDPROC

	PROCEDURE iesire
		PARAMETERS Y
	ENDPROC

	PROCEDURE Init
		Local z,l,n
		l=This.listaord
		
		
		For i=1 To This.ColumnCount
			If Inlist(i,&l)
			n=this.gasestecol(i) &&gaseste coloana cu ordinea i
					zz='this.column'+N+'.header1.forecolor=RGB(0,0,255)'
					&zz
			Endif
		Next i
		This.treaba
		
	ENDPROC

	PROCEDURE treaba
		
		
		If This.ordine<>0
			This.SetAll('fontunderline',.F.,'header')
			n=this.gasestecol(this.ordine)
			z='this.column'+N+'.header1.fontunderline=.t.'
			&z
		
			d=UPPER(This.RecordSource)
			z='c=ALLTRIM(this.column'+N+'.controlsource)'
			&z
			c=UPPER(STRTRAN(c,'.',''))
			c=STRTRAN(c,d,'')
			Select &d
			Set Order To Tag &c
			GO top
			This.Refresh
		Endif
		
	ENDPROC

	PROCEDURE Column1.Header1.Click
		this.Parent.Parent.headerclick(this.Parent.ColumnOrder)
		
	ENDPROC

	PROCEDURE Column1.Text1.KeyPress
		LPARAMETERS nKeyCode, nShiftAltCtrl
		do case
			case nkeycode=13 
				THIS.PARENT.Parent.IESIRE(1)
			case nkeycode=9
				THIS.PARENT.Parent.IESIRE(-1)
		endcase
	ENDPROC

ENDDEFINE

DEFINE CLASS gridbicolor AS grid 
 	*< CLASSDATA: Baseclass="grid" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Column2.Text1" UniqueID="" Timestamp="" />

	*<PropValue>
		ColumnCount = 2
		DeleteMark = .F.
		FontName = "Comic Sans MS"
		GridLineColor = 192,192,192
		GridLines = 1
		HeaderHeight = 0
		Height = 261
		Left = 60
		Name = "Grid1"
		Panel = 1
		ReadOnly = .T.
		RecordMark = .F.
		RecordSource = "XITEMS"
		RowHeight = 26
		ScrollBars = 2
		Top = 50
		Width = 408
		Column1.BackColor = 247,245,238
		Column1.ControlSource = "LABEL_ITEM"
		Column1.FontName = "Comic Sans MS"
		Column1.Name = "Column1"
		Column1.ReadOnly = .T.
		Column1.Width = 190
		Column2.ControlSource = ""
		Column2.FontName = "Comic Sans MS"
		Column2.Name = "Column2"
		Column2.ReadOnly = .T.
		Column2.Width = 189
	*</PropValue>

	ADD OBJECT 'Column1.Header1' AS header WITH ;
		Caption = "Header1", ;
		FontName = "Comic Sans MS", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Column1.Text1' AS textbox WITH ;
		BackColor = 247,245,238, ;
		BorderStyle = 0, ;
		FontName = "Comic Sans MS", ;
		ForeColor = 0,0,0, ;
		Format = "K!", ;
		InputMask = "", ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Column2.Header1' AS header WITH ;
		Caption = "Header1", ;
		FontName = "Comic Sans MS", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Comic Sans MS", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

ENDDEFINE

DEFINE CLASS help AS butoninv OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "help"
		Imbuton1.Height = 27
		Imbuton1.Name = "Imbuton1"
		Imbuton1.Picture = ..\grafice\help_sus.bmp
		Imbuton1.Stretch = 2
		Imbuton1.Width = 30
		Command1.Name = "Command1"
	*</PropValue>
	
	PROCEDURE MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='help_jos.BMP'
	ENDPROC

	PROCEDURE MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='help_sus.BMP'
	ENDPROC

ENDDEFINE

DEFINE CLASS imbuton AS image 
 	*< CLASSDATA: Baseclass="image" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Height = 23
		Name = "imbuton"
		Picture = 
		Stretch = 2
		Width = 31
	*</PropValue>

ENDDEFINE

DEFINE CLASS item AS container 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Label_item1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text_item1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lineo1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lineo3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lineo4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lineo5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lineo2" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: camp_lista
		*p: filtru
		*p: fis_lista
		*p: id_fisier
		*p: id_item
		*p: id_tipdoc
		*p: label_item
		*p: nproc_tva
		*p: nvalinit
		*p: pcobj
		*p: tip
	*</DefinedPropArrayMethod>

	*<PropValue>
		BackColor = 247,245,238
		BackStyle = 1
		BorderColor = 0,0,128
		BorderWidth = 0
		camp_lista =  
		filtru = 
		fis_lista =  
		Height = 21
		id_fisier = ''
		id_item = 0
		id_tipdoc = 
		label_item =  
		Name = "item"
		nproc_tva = 0
		nvalinit = 0
		pcobj = ''
		SpecialEffect = 1
		Width = 454
	*</PropValue>

	ADD OBJECT 'Label_item1' AS label_item WITH ;
		AutoSize = .F., ;
		BackColor = 255,255,255, ;
		BackStyle = 1, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Height = 18, ;
		Left = 3, ;
		Name = "Label_item1", ;
		TabIndex = 2, ;
		Top = 2, ;
		Width = 234
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="label" />

	ADD OBJECT 'Lineo1' AS lineo WITH ;
		Height = 0, ;
		Left = 0, ;
		Name = "Lineo1", ;
		Top = 0, ;
		Width = 452
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'Lineo2' AS lineo WITH ;
		Height = 21, ;
		Left = 239, ;
		Name = "Lineo2", ;
		Top = 0, ;
		Width = 0
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'Lineo3' AS lineo WITH ;
		Height = 0, ;
		Left = 0, ;
		Name = "Lineo3", ;
		Top = 19, ;
		Width = 452
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'Lineo4' AS lineo WITH ;
		Height = 21, ;
		Left = 452, ;
		Name = "Lineo4", ;
		Top = 0, ;
		Width = 0
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'Lineo5' AS lineo WITH ;
		Height = 21, ;
		Left = 0, ;
		Name = "Lineo5", ;
		Top = 0, ;
		Width = 0
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'Text_item1' AS text_item WITH ;
		BackColor = 255,255,255, ;
		BorderColor = 226,226,226, ;
		BorderStyle = 1, ;
		FontCharSet = 238, ;
		FontName = "Arial", ;
		FontSize = 10, ;
		Format = "k", ;
		Left = 241, ;
		Margin = 0, ;
		Name = "Text_item1", ;
		TabIndex = 1, ;
		Top = 1, ;
		Width = 211
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="textbox" />
	
	PROCEDURE MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		*!*	THIS.LABEL_ITEM1.ForeColor=16777215
		*!*	THIS.TEXT_ITEM1.ForeColor=16777215
		*!*	THIS.LABEL_ITEM1.BACKColor=10485760
		*!*	THIS.TEXT_ITEM1.BACKColor=10485760
	ENDPROC

	PROCEDURE MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		*!*	THIS.LABEL_ITEM1.ForeColor=10485760
		*!*	THIS.TEXT_ITEM1.ForeColor=10485760
		*!*	THIS.LABEL_ITEM1.BACKColor=RGB(247,245,238)
		*!*	THIS.TEXT_ITEM1.BACKColor=16777215
	ENDPROC

	PROCEDURE Label_item1.Click
		this.parent.text_item1.gotfocus
	ENDPROC

	PROCEDURE Text_item1.GotFocus
		*!*	28.05.2009
		*!*	alex.lepadatu
		*!*	s-a completat in xsets ocompensari/ocompensari_val
		*!*	lcfrm_plata se citeste din tabela
		*!*	s-a modificat lcCond, pentru a pune conditia valuta_2
		
		*!* 07.09.2009
		*!*	marius.mutu
		*!*	alegere gestiune pentru id_set 90103 - inventar magazin
		
		*!* 06.07.2011
		*!* marius.mutu
		*!* cautare in vcrm_politici_preturi dupa drepturi utilizator
		
		*!* 28.02.2013
		*!* marius.mutu
		*!* tratare alegere document pereche pentru fel_cont = 2 (bifunctional)
		
		*!* 01.03.2013
		*!* marius.mutu
		*!* NU MAI EXECUT NIMIC DACA ITEM-UL ESTE COMPLETAT IN VARIABILE SI ESTE DISABLED
		*!* inainte nu se executa daca era tabstop = .F.
		
		*!* 08.08.2014
		*!* marius.mutu
		*!* plati facturi in lei cu alta valuta -  nu se mai verifica soldul in valuta al facturilor (nu au)
		
		*!* 13.01.2015
		*!* marius.mutu
		*!* completare poAct.id_vCONT (pentru utilizarea la o operatie ulterioara)
		
		*!* 16.01.2015
		*!* marius.mutu
		*!* DATAIREG daca deja e completata dataireg (copiat de la operatia anterioara) sa nu se suprascrie
		
		*!* 07.07.2016
		*!* marius.mutu
		*!* se cere numarul de bonuri fiscale cand se ajunge pe campul EXPLICATIA, daca la document s-a ales un document cu tipul B (bonuri fiscale fara CUI, ex: MONETAR)
		
		Local lcSql, lnSucces, lcTipPart,lcProcDeApelat, loObj, lcpoActIdPart, loCauta
		Local M,LcFrm_plata, loMonedaNationala
		Store '' To lcProcDeApelat
		M=Upper(This.ControlSource)
		F=Lower(Alltrim(This.Parent.FIS_LISTA))
		C=Alltrim(This.Parent.CAMP_LISTA)
		T=This.Parent.LABEL_ITEM
		V=Upper(This.ControlSource)
		lcIdFis = Alltrim(This.Parent.id_fisier)
		lcObj = Upper(This.Parent.pcobj)
		loObj = &lcObj
		lcpoActIdPart = 'POACT.ID_V'+Substr(M,7)
		
		If F=[vnom_valute] 
		*	SET STEP ON 
		ENDIF 
		
		If Type('this.Parent.Parent.Parent')='O' And Pemstatus(This.Parent.Parent.Parent,'VARIABILE',5)
			With This.Parent.Parent.Parent
				If !Empty(.variabile)
					lnindex=Ascan(.variabile,M,1,Alen(.variabile,1),1,15)
					If lnindex>0 And .variabile[lnindex,4] && DISABLED
						If Inlist(F,'vnom_parteneri')
							lcContul = Strextract(V,'.V')
							Select xcont
							Locate For Val(contpart) = Val(lcContul)
							lcContul = cont_part
							lcTip = Alltrim(tipuri_part)
		
							lnindexId=Ascan(.variabile, m.lcpoActIdPart,1, Alen(.variabile,1),1,15)
							Replace idpart With Val(.variabile[lnindexId,2])
							Replace numepart With .variabile[lnindex,2]
							&V = .variabile[lnindex,2] && poAct.v4111
							If Type(lcpoActIdPart) <> 'U'
								&lcpoActIdPart = Val(.variabile[lnindexId,2]) && poAct.id_vv4111
							Endif
						Endif
						Return && NU MAI EXECUT NIMIC DACA ITEM-UL ESTE COMPLETAT IN VARIABILE SI ESTE DISABLED
					Endif
				Endif
			Endwith
		Endif
		
		If !(Empty(F) Or Empty(C) Or Empty(T) Or Inlist(F,'vnom_parteneri','vnom_gestiuni','vlucrari_validat','vcontracte','vnom_responsabili','vcrm_politici_preturi'))
			pcselect = ['select ] + C + [,] + lcIdFis + [ from ] + F + [ where 2=2']
			pcfiltru = [1=2]
			pcschema = ['']
			pcorder = C
			pccoloane = C
			pcTitlu = T
			pcTitluColoane = T
		*!*	modificare facturare in valuta 20.09.2007
			pcFiltruOriginal = Iif(!Empty(This.Parent.filtru),This.Parent.filtru+[ and ],[])+[inactiv = 0]
		*!*	pcFiltruOriginal = [inactiv = 0]
		*!*	modificare facturare in valuta 20.09.2007	^
		*!*	modificare	14.06.2013	ROADEVIZE v 0.9.8
			If poAct.id_set = 32000 And This.Parent.id_item = 85
				pcTitluColoane = [Gestiune,Indicativ,Sectie]
			ENDIF
		*!*	modificare	14.06.2013	ROADEVIZE v 0.9.8
		
			Do Case
				Case F = 'vnom_fdoc'
					pcNumeProc = "vnom_fdoc"
					pcselect = ['select fel_document,tip_doc, descriere,id_fdoc, id_fdoc2, paymentcode from vnom_fdoc where 2=2']			
					pcColoane = [fel_document, tip_doc, descriere]
					pcTitluColoane = [Fel Document, Tip, Descriere]
				Case F = 'vnom_venchel'
					pcNumeProc = "vnom_venchel"
				Case F = 'vnom_sectii'
					pcNumeProc = "vnom_sectii"
		*!* 18.03.2008
					pcFiltruOriginal = pcFiltruOriginal + gcCondSucursala
		*!* 18.03.2008 ^
				Otherwise
					pcNumeProc = ""
			Endcase
			locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,pcNumeProc,.F.,pcFiltruOriginal)
		
			* Verific daca tipul de document ales este de tip B = bonuri fiscale fara CUI
			* Pe campul explicatie voi cere numarul de bonuri fiscale
			IF F = 'vnom_fdoc'
				IF !PEMSTATUS(this.parent.parent,'lBonFiscalFaraCUI',5)
					this.parent.Parent.AddProperty('lBonFiscalFaraCUI', .F.)
				ENDIF 
				this.parent.Parent.lBonFiscalFaraCUI = (UPPER(ALLTRIM(loCauta.tip_doc)) = 'B')
				IF UPPER(ALLTRIM(oxset.tipjurnal)) = 'JV' AND this.Parent.Parent.lBonFiscalFaraCUI
					IF ![*BON]$poAct.explicatia
						poact.EXPLICATIA = [*BON=x*] + ALLTRIM(NVL(poact.EXPLICATIA, ''))
					ENDIF 	
					this.Parent.Parent.Refresh()
				ENDIF		 
			ENDIF 
		
			lcLista = C + [,] + lcIdFis
			Create Cursor clista (nume_var C(20))
		
			ln = lista2cursor(lcLista,'clista','nume_var',",")
		
			Select clista
			Scan
				lEValInit = Evaluate('locauta.' + Alltrim(nume_var))
				x = AddProperty(&lcObj,Alltrim(nume_var),lEValInit)
			Endscan
			Use In clista
		
			If ',' $ C
		*!*	modificare	13.06.2013	ROADEVIZE v 0.9.8
		*!*	lcPrimVal = Left(lcLista,At(C,','))
				lcPrimVal = Left(C,At(',',C)-1)
		*!*	modificare	^
			Else
				lcPrimVal = Alltrim(C)
			Endif
		
			z = [&v = locauta.] + lcPrimVal
			&z
		
		*!*	modificare facturare in valuta 20.09.2007
		*!*	in nir suprascrie id_valuta pe care o ia din stoc
			If F=[vnom_valute] And oxset.cursval
				If Type(lcObj+[.nume_val_vanz])='U'
					AddProperty(&lcObj,[nume_val_vanz],&lcObj..nume_val)
					AddProperty(&lcObj,[id_valuta_vanz],&lcObj..id_valuta)
				Else
					&lcObj..nume_val_vanz = &lcObj..nume_val
					&lcObj..id_valuta_vanz = &lcObj..id_valuta
				Endif
				&lcObj..nume_val = []
				&lcObj..id_valuta = 0
			Endif
		*!*	modificare facturare in valuta 20.09.2007	^
		*!*	modificare	14.06.2013	ROADEVIZE v 0.9.8
			If This.Parent.id_item = 85
				lcIdGest = Iif('gestin'$Lower(V),Strtran(Lower(V),'gestin','id_gestin'),Iif('gestout'$Lower(V),Strtran(Lower(V),'gestout','id_gestout'),[]))
				&lcIdGest = locauta.id_gestiune
			Endif
			If &lcObj..id_set = 32000 And This.Parent.id_item = 86	&&	daca schimba lucrarea, ii sterg gestiunea si sectia
				&lcObj..id_gestout = 0
				&lcObj..gestout = []
				&lcObj..id_sectie = 0
				This.Parent.Parent.Refresh()
			Endif
		*!*	modificare	14.06.2013	ROADEVIZE v 0.9.8
		Endif
		
		If Inlist(F,'vlucrari_validat')
			pcselect = ['select ] + C + [,] + lcIdFis + [ from ] + gcs + [.] + F + [ where 2=2']
			pcfiltru = [1=2]
			pcschema = ['']
			pcorder = C
			pccoloane = C
			pcTitlu = T
			pcFiltruOriginal = [validat = 0 and inactiv = 0]
		
			locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitlu,[vnom_lucrari],.F.,pcFiltruOriginal)
			lcLista = C + [,] + lcIdFis
			Create Cursor clista (nume_var C(20))
		
			ln = lista2cursor(lcLista,'clista','nume_var',",")
		
			Select clista
			Scan
				lEValInit = Evaluate('locauta.' + Alltrim(nume_var))
				x = AddProperty(&lcObj,Alltrim(nume_var),lEValInit)
			Endscan
			Use In clista
		
			If ',' $ C
				lcPrimVal = Left(lcLista,At(C,','))
			Else
				lcPrimVal = Alltrim(C)
			Endif
		
			z = [&v = locauta.] + lcPrimVal
			&z
		Endif
		
		If Inlist(F,'vnom_gestiuni')
		*!*	03.10.2007
		*!*	*!* 05.07.2006
		*!*	*!* MARIUS.MUTU
		*!*		Do Case
		*!*		Case Inlist(poAct.id_set, 91,92,95,96,97) && descarcare de gestiune pret de lista -- pentru HANUL PIRATILOR -- vreau sa pot alege gestiune de marfa si de materii prime
		*!*			lcListaTipGestiune = [2,5,6]
		*!*		Case Inlist(poAct.id_set, 90101) && nota de inventariere sa poata alege orice gestiune
		*!*			lcListaTipGestiune = [1,2,3,4,5,6]
		*!*	*!*	modificare facturare in valuta 20.09.2007
		*!*		Case Inlist(poAct.id_set,73,79,83,206,62,102,61,103,63,64,65,222,223,224,225,226,227)
		*!*			lcListaTipGestiune = Alltrim(Str(gnTipGest))
		*!*	*!*	modificare facturare in valuta 20.09.2007	^
		*!*		Case Alltrim(Str(gnTipGest)) = '6'
		*!*			lcListaTipGestiune = Alltrim(Str(gnTipGest))
		*!*		Otherwise
		*!*			lcListaTipGestiune = [2,3,4,5]
		*!*		Endcase
			Do Case
				Case Inlist(poAct.id_set,91,92,95,96,97,106)	&&	modificare ROAGRESTAURANT 1.0.0
					lcListaTipGestiune = [2,5,6,7]
		*!* 07.09.2009
		*!*		Case Inlist(poAct.id_set,90101,30009)					&&	modificare 28.01.2008	:	am adaugat si 30009
				Case Inlist(poAct.id_set,90101, 90103, 30009)					&&	modificare 28.01.2008	:	am adaugat si 30009
		*!* 07.09.2009 ^
					lcListaTipGestiune = [1,2,3,4,5,6,7]
		*!*	modificare ROAGEST v 2.0.132
		*!*		Case INLIST(gnTipGest, 6, 7)
		*!*			lcListaTipGestiune = Alltrim(Str(gnTipGest))
		*!*	modificare ROAGEST v 2.0.132	^
				Case poAct.id_set = 215 And This.Parent.id_item = 10		&&	modificare v 2.0.6
					lcListaTipGestiune = [1,2,3,4,5]
				Case Inlist(poAct.id_set, 216, 241, 242,255,256,257) And This.Parent.id_item = 10		&&	mf ach - retur de la marfa pv - trebuie sa aleg o gestiune pv
					lcListaTipGestiune = [6,7]
		*!*	modificare ROAGEST v 2.0.132
		*!*		Case INLIST(gnTipGest, 7)
		*!*			lcListaTipGestiune = Alltrim(Str(gnTipGest))
				Case Inlist(gnTipGest, 6, 7)
					lcListaTipGestiune = Alltrim(Str(gnTipGest))
		*!*	modificare ROAGEST v 2.0.132	^
				Otherwise
					lcListaTipGestiune = [2,3,4,5]
			Endcase
		*!*	modificare 03.10.2007	^
		*!*	modificare	ROAGEST	v 2.0.6
		*!*		Do Case
		*!*		Case "-1" $ gcGestPermis
		*!*			pcselect = ['select * from ] + gcs + [.vnom_GESTIUNI where inactiv = 0 and nr_pag IN (] + lcListaTipGestiune +[)']
		*!*		Otherwise
			pcselect = ['select * from ] + gcs + [.vnom_GESTIUNI '+] +;
				['where inactiv = 0 and nr_pag IN (] + lcListaTipGestiune + [) and id_gestiune in (select g.id_gestiune from ] + gcs + [.vgest_coresp_grupe_gestiuni g join ] + gcs + [.vgest_coresp_util_grupe u on g.id_grupe = u.id_grupe and u.id_util = ] + Alltrim(Str(gnIdUtil)) + [)']
		*!*		Endcase
		*!*	modificare	ROAGEST	v 2.0.6	^
			pcfiltru = [1=2]
			pcschema = ['']
			pcorder = [NUME_gestiune]
			pccoloane = C
			pcTitlu = T
			pcTitluColoane = [Gestiune,Indicativ]
			locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane,'')
		
			lcLista = C + [,] + lcIdFis
			Create Cursor clista (nume_var C(20))
			ln = lista2cursor(lcLista,'clista','nume_var',",")
			Select clista
			Scan
				lEValInit = Evaluate('locauta.' + Alltrim(nume_var))
				x = AddProperty(&lcObj,Alltrim(nume_var),lEValInit)
			Endscan
			Use In clista
		
			&V = locauta.nume_gestiune
			lcIdGest = Iif('gestin'$Lower(V),Strtran(Lower(V),'gestin','id_gestin'),Iif('gestout'$Lower(V),Strtran(Lower(V),'gestout','id_gestout'),[]))
			&lcIdGest = locauta.id_gestiune
		Endif
		
		If Inlist(F,'vnom_responsabili')
		*!*		locauta = CautPartenerContabilitate(GetHash([cTitlu=>Responsabili??cTipuriParteneri=>]+Alltrim(Str(gnIdTipResponsabili))+[??lAdaugCorespondente=>1??cNumeProc=>]+;
		*!*			[nom_parteneri;]+Alltrim(Str(gnIdTipResponsabili))+[,'RESPONSABIL',1,2]))
		*!*		&V = Alltrim(locauta.denumire)
		*!*		&lcObj..id_responsabil = locauta.id_part
			loCauta = caut_responsabil()
			&V = Alltrim(locauta.nume)
			&lcObj..id_responsabil = locauta.id_responsabil
		Endif
		
		*** partener
		If Inlist(F,'vnom_parteneri')
		
			lcContul = Strextract(V,'.V')
		*!*	modificare migrare v 1.0	>	v 2.0
			If poAct.id_set = 229
				lcTip = [16]		&&	client
			Else
		*!*	modificare migrare v 1.0	>	v 2.0	^
				Select xcont
				Locate For Val(contpart) = Val(lcContul)
				lcContul = cont_part
		*	lntip = tip_part
				lcTip = Alltrim(tipuri_part)
		*!*	modificare migrare v 1.0	>	v 2.0
			Endif
		*!*	modificare migrare v 1.0	>	v 2.0	^
		
		*!*		locauta = cauta_alfa(lcSelect,lcfiltru,lcschema,lcorder,lccoloane,lcTitlu,lcTitluColoane,lcNumeProc,llAllInlist,lcFiltruOriginal, lcPrimaColoana)
		
		*!* 03.10.2006
		*!* MARIUS.MUTU
		*!* 26.07.2026 claude - verificare ANAF la alegerea partenerului pe formularele de documente
			locauta = CautPartenerContabilitate(GetHash([cTitlu=>] + T + [??lAdaugCorespondente=>1??cTipuriParteneri=>] + lcTip + [??lVerificaANAF=>1]))
		*!*	modificare migrare v 1.0	>	v 2.0
			If poAct.id_set = 229
				poAct.vid_part_rez = locauta.id_part
				&V = locauta.nume
			Else
		*!*	modificare migrare v 1.0	>	v 2.0
				Select xcont
				Replace idpart With locauta.id_part
				Replace numepart With locauta.nume
				&V = locauta.nume
				If Type(lcpoActIdPart) <> 'U'
					&lcpoActIdPart = locauta.id_part
				Endif
		*!*	modificare migrare v 1.0	>	v 2.0
			Endif
		*!*	modificare migrare v 1.0	>	v 2.0
		
		
		
			* 14.04.2015 Cautare in RTVAI
			*  nu cauta in RTVAI daca id_set = 101, 10565, 10575 (taxare inversa) sau 208,209 (achizitie din import), cod fiscal completat, doar partenerii din clasa 4xx (Terti)
			IF xsets.tipjurnal = 'JC' AND TYPE('this.parent.parent.ck_tva_la_incasare') = 'O' AND !EMPTY(locauta.cod_fiscal) AND Substr(M,8,1) = '4'
				IF  this.parent.parent.ck_tva_la_incasare.visible AND !INLIST(XSETS.ID_SET, 101, 10565, 10575, 208, 209)
					LOCAL loPartenerRTVAIX,loPartenerRTVAI
					loPartenerRTVAIX = Createobject("empty")
					loPartenerRTVAI = Createobject("empty")
					AddProperty(loPartenerRTVAIX, "cod_fiscal",locauta.cod_fiscal)
					AddProperty(loPartenerRTVAIX, "denumire", locauta.nume)
					AddProperty(loPartenerRTVAIX, "dataact", &lcObj..dataact)
					VERIFICA_RTVAI(loPartenerRTVAIX, @loPartenerRTVAI)	
					
		
					IF goCalendar.tva_incasare = 0 && Daca firma nu este cu tva la incasare, modific bifa TVAI in functie de furnizor
						This.parent.parent.ck_tva_la_incasare.value = IIF(loPartenerRtvai.leinRtvai,1,0)
					ENDIF 
		
					IF TYPE('this.parent.parent.oPartenerRTVAI') = 'U'
						ADDPROPERTY(this.parent.parent, "oPartenerRTVAI", NULL)
					ENDIF
					this.parent.parent.oPartenerRTVAI = loPartenerRtvai
					IF PEMSTATUS(thisform,'UpdateExplicatieSAFT',5)
						Thisform.UpdateExplicatieSAFT()		
					ENDIF 			
				ENDIF 	
			ENDIF 
		
		Endif
		*** \partener
		
		
		*** contract
		If Inlist(F,'vcontracte')
			lcSelect = [select id_ctr, denumire, contract FROM vcontracte c left join vtipuri_contracte tc on c.id_tip_ctr = tc.ID_TIP_CTR ]
			lcfiltru = [1=2]
			lcschema = [id_ctr N(5), denumire c(30), contract C(30)]
			lcorder = [denumire]
			lccoloane = "denumire, contract"
			lcTitlu = T
			lcTitluColoane = [Partener,Contract]
			If !Empty(oxset.tip_ctr)
				lcIdCtr = Upper(oxset.tip_ctr)
				If Type('lcIdCtr')<>'U'
					* lcFiltruOriginal = [id_tip_ctr=] + ALLTRIM(STR(&lcIdCtr))
					lcFiltruOriginal = [1=1]
					Do Case
						Case lcIdCtr = 'GNIDCTRCLIENTI'
							lcFiltruOriginal = [substr(tc.tata,2,6)='CLIENT']
						Case lcIdCtr = 'GNIDCTRFURNIZORI'
							lcFiltruOriginal = [substr(tc.tata,2,6)='FURNIZ']
					Endcase
		
					Private pnId_tip_ctr
					pnId_tip_ctr = &lcIdCtr
				Else
					lcFiltruOriginal = []
				Endif
			Else
				lcFiltruOriginal = []
			Endif
		
			Private pnId_tip_part
			Store 0 To pnId_tip_part
			lcIdTipPart = Alltrim(Nvl(oxset.tip_doc, ''))
			If Type('lcIdTipPart')<>'U' And !Empty(m.lcIdTipPart)
				pnId_tip_part = &lcIdTipPart
			Endif
		
			llAllInlist = .F.
			lcPrimaColoana = [denumire]
			lcNumeProc = [contracte] +  ';0,' + ALLTRIM(STR(m.pnId_tip_part))
			locauta = cauta_alfa(lcSelect,lcfiltru,lcschema,lcorder,lccoloane,lcTitlu,lcTitluColoane,lcNumeProc,llAllInlist,lcFiltruOriginal, lcPrimaColoana)
		
			&V = Alltrim(locauta.contract)
			&lcObj..id_ctr = locauta.id_ctr
		
		Endif
		*** \contract
		
		*!* 06.07.2011
		*!* lista preturi
		If Inlist(F,'vcrm_politici_preturi')
		
			pcselect = [select nume_lista_preturi, id_pol from crm_vpolpretcurutil]
			pcfiltru = [1=2]
			pcschema = []
			pcorder = [nume_lista_preturi]
			pccoloane = C
			pcTitlu = T
			pcFiltruOriginal = [id_util = ?gnIdUtil] + m.gcCondSucursala
		
			locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitlu,[vcrm_politici_preturi],.F.,pcFiltruOriginal)
			lcLista = C + [,] + lcIdFis
			Create Cursor clista (nume_var C(20))
		
			ln = lista2cursor(lcLista,'clista','nume_var',",")
		
			Select clista
			Scan
				lEValInit = Evaluate('locauta.' + Alltrim(nume_var))
				x = AddProperty(&lcObj,Alltrim(nume_var),lEValInit)
			Endscan
			Use In clista
		
			If ',' $ C
				lcPrimVal = Left(lcLista,At(C,','))
			Else
				lcPrimVal = Alltrim(C)
			Endif
		
			z = [&v = locauta.] + lcPrimVal
			&z
		Endif
		*!* lista preturi ^
		*!* 06.07.2011 ^
		
		*---------------------------------------------------------------------------------------------
		
		If Type('XSETS.compens')#'U' && solutie temporara pentru Gestiuni (achizitie cu 542)
		*	IF (!EMPTY(XSETS.FRM_PLATA) OR !EMPTY(xsets.compens)) AND F = 'vireg_parteneri'
		
			If This.Parent.id_item = 67 And F = 'vireg_parteneri'
		
				Local LcFrm_plata,lcTabela,LcIde
				lcContul = Alltrim(Strextract(V,'.P'))
				lcCond = [ an = ] + Alltrim(Str(gnAn)) + [ and luna = ] + Alltrim(Str(gnluna))+ Iif(glEMama,' and NVL(id_sucursala,0) = 0 ',gcCondSucursala)
		
				Select xsets
				llval = xsets.valuta
				loMonedaNationala = GetMonedaNationala()
				If llval
					lcCond= lcCond + [ and i.id_valuta ] + Iif(Pemstatus(loObj,"id_valuta2",5), [in ( ] + Alltrim(Str(&lcObj..id_valuta)) + [,] + Alltrim(Str(Nvl(&lcObj..id_valuta2,0))) + [)], [ = ]+Alltrim(Str(&lcObj..id_valuta)))
		
		* Pot sa platesc facturi in LEI cu EUR
		* Verific soldul in valuta <> 0 doar pentru facturile care NU sunt in Moneda nationala
					If &lcObj..id_valuta <> loMonedaNationala.id_valuta
						lcCond = lcCond + [ and ABS(i.precvaldeb + i.valdebit - i.precvalcred - i.valcredit)>0 ]
					Endif
		
				Else
					lcCond= lcCond + [ and (i.precvaldeb + i.valdebit - i.precvalcred - i.valcredit = 0) ]
				Endif
		
				Private lcNume
		
				Select xcont
				Locate For Val(contpart) = Val(lcContul)
				lcContul = cont_part
				lnIdPart = idpart
				lcNume = numepart
				lnFelCont = fel_cont
				lnPozitie = pozitie
				lcDenumire = Alltrim(explic_cont)
		
				pcselect = ['select i.* FROM ] + gcs + [.Vireg_parteneri i where 2=2 ']
				pcfiltru = [ i.id_part = ] + Alltrim(Str(lnIdPart)) + [ AND ABS(i.precdeb + i.debit - i.preccred - i.credit)<>0 AND i.cont =]+ lcContul + [ and ] + lcCond
				pcschema = ['']
				pcorder = ['']
		
				Private podateintrod
				Store '' To podateintrod
		
				gencursor('podateintrod','crs_actcv',pcselect,pcfiltru,[''],'')
		
				lcFis = 'actcv' + Alltrim(lcContul)
		
				If Used(lcFis)
					Use In &lcFis
				Endif
		
				Do Case
					Case m.lnFelCont = 0 Or (m.lnFelCont = 2 And m.lnPozitie = 1)
						lcsel = [SELECT *, ACONT AS ASCC, nume_val as numeval, curs as cursschimb, precdeb + debit as totctva, preccred+credit as achitat, credit as achitatl, ] +;
							[precvaldeb + valdebit AS sumaval, precVALcred+VALcredit as achitatval, ] + Iif(This.Parent.nproc_tva = 1, [1], [0]) + [ as cu_tva, ] +;
							[.f. as ales, 00000000000000.0000 as sumaachi, 000000000000.0000 as sumaachi2, 00000000000000.0000 as achilei, 00000000000000.0000 as difplus, ]+;
							[ 00000000000000.0000 as difminus, 000000.000000 as cursval, 000000.000000 as cursdif, id_jtva_coloana as id_jtvacol, ] +;
							[CAST(0 as n(10)) as id_valuta2, CAST('' as c(30)) as nume_val2, CAST(0 as n(15,2)) as sumaachi22,tva_incasare ] + ;
							[FROM crs_actcv INTO CURSOR ] + lcFis + [ order by dataact,nract READWRITE ]
					Otherwise
						lcsel = [SELECT *, ACONT AS ASCD, nume_val as numeval, curs as cursschimb, preccred + credit as totctva, precdeb+debit as achitat, debit as achitatl,] + ;
							[precvalcred + valcredit as sumaval, precVALdeb+VALdebit as achitatval, ] + Iif(This.Parent.nproc_tva = 1, [1], [0]) + [ as cu_tva, ] +;
							[.f. as ales, 00000000000000.0000 as sumaachi, 00000000000000.0000 as sumaachi2, 00000000000000.0000 as achilei, 00000000000000.0000 as difplus, ]+;
							[ 00000000000000.0000 as difminus, 000000.000000 as cursval, 000000.000000 as cursdif, id_jtva_coloana as id_jtvacol, ] + ;
							[CAST(0 as n(10)) as id_valuta2, CAST('' as c(30)) as nume_val2, CAST(0 as n(15,2)) as sumaachi22,tva_incasare ] + ;
							[FROM crs_actcv INTO CURSOR ] + lcFis + [ order by dataact,nract READWRITE ]
				Endcase
				&lcsel
		
				Select (lcFis)
		
		*** actualizez cursul de schimb al facturilor in lei (in cazul platilor cu valuta)
				If  m.llval And &lcObj..id_valuta = loMonedaNationala.id_valuta
					Update (lcFis) Set cursschimb = 1
				Endif
		
		*!*			26.05.2009
		*!*			alex.lepadatu
		*!*			s-a completat in xsets ocompensari/ocompensari_val
		*!*			lcfrm_plata se citeste din tabela
				If Type('poAct.nume_val2') <> 'U'
					If !Empty(Nvl(poAct.id_valuta2,0))
						Update (lcFis) Set id_valuta2 = poAct.id_valuta2, nume_Val2 = poAct.nume_Val2
					Endif
				Endif
				LcFrm_plata = Alltrim(xsets.FRM_PLATA)
				LcFrm_plata = Left(LcFrm_plata,At(',',LcFrm_plata) - 1)
		*!*			26.05.2009 ^^
		
		
		
				If !llval
		*			LcFrm_plata = 'ocompensari'
					If poAct.id_set = 90011
						lcProcDeApelat = [aleg_salnerid_de_achit with ']+lcFis+[' in ocont2003.prg]
					Endif
					If poAct.id_set = 90013
						lcProcDeApelat = [aleg_salnerid_de_achit with ']+lcFis+[' in ocont2003.prg]
					Endif
					If Type(lcObj+'.totctva') # 'U'
						atr = [lnSuma =] + lcObj+'.totctva'
					Else
						If Type(lcObj+'.suma') # 'U'
							atr = [lnSuma =] + lcObj+'.suma'
						Else
							atr = [lnSuma = 0]
						Endif
					Endif
					&atr
				Else
		*			LcFrm_plata = 'ocompensari_val'
					If Type(lcObj+'.suma_2') # 'U'
						atr = [lnSuma =] + lcObj+'.suma_2'
					Else
						atr = [lnSuma = 0]
					Endif
					&atr
					If Type(lcObj+'.suma_3') # 'U'
						atr = [lnCurs =] + lcObj+'.suma_3'
					Else
						atr = [lnCurs = 0]
					Endif
					&atr
				Endif
		
				OPLATA=Createobject(LcFrm_plata)
		*		oplata.txtNume.value =lcNume
				OPLATA.titlufrumos1.Caption = lcDenumire + [: ] + lcNume
				If Type('oplata.cproclabifa') # 'U'
					OPLATA.cproclabifa= lcProcDeApelat
				Endif
				OPLATA.pcFis = lcFis
				OPLATA.SUMA = lnSuma
				If Type('oplata.curs_val') # 'U'
					OPLATA.curs_val = lnCurs
				Endif
				OPLATA.pnFelCont = lnFelCont
				OPLATA.nCu_TVA = This.Parent.nproc_tva
				OPLATA.Show(1)
		
				Select (lcFis)
				Calculate Cnt() For ales To LnBife
				If LnBife=1
					Locate For ales
					&M=nract
				Else
					&M=0
				Endif
			Endif
		Endif
		*** \inregistrari partener
		With &lcObj
			Do Case
				Case '.DATAIREG'$V
					If !pl_verificat && cand nu intra prin verif_complet()
						If Empty(.dataireg) && daca deja e completata dataireg (copiat de la operatia anterioara) sa nu se suprascrie
							.dataireg=Ttod(get_ora())
						Endif
						If Month(.dataireg)<>gnluna Or Year(.dataireg)<>gnAn
							.dataireg=ultimazi()
						Endif
					Endif
		*!*	CASE ALLTRIM(M)='M.CASAVALDEB'
		*!*		M.CASAVALDEB=M.NUME_5
		*!*	CASE ALLTRIM(M)='M.CASAVALCRE'
		*!*		M.CASAVALCRE=M.NUME_5
		*!*	CASE ALLTRIM(M)='M.BANVALDEB'
		*!*		M.BANVALDEB=M.NUME_3
		*!*	CASE ALLTRIM(M)='M.BANVALCRED'
		*!*		M.BANVALCRED=M.NUME_3
		*!*	CASE ALLTRIM(M)='M.CASADEB'
		*!*		M.CASADEB=M.CASA
		*!*	CASE ALLTRIM(M)='M.CASACRED'
		*!*		M.CASACRED=M.CASA
		*!*	CASE ALLTRIM(M)='M.BANCADEB'
		*!*		M.BANCADEB=M.NUME_2
		*!*	CASE ALLTRIM(M)='M.BANCACRED'
		*!*		M.BANCACRED=M.NUME_2
		*!*	CASE ALLTRIM(M)='M.NUME_4'
		*!*		M.NUME_4=M.NUMEVAL
			Endcase
		Endwith
		
		*!*	modificare	ROACONT	v 2.0.76
		If '.SUMA_2TVA'$V Or '.SUMA_2'$V Or '.TOTFTVA'$V Or '.TOTTVA'$V Or '.TOTCTVA'$V Or '.SUMA_4'$V Or '.V10'$V
			This.Parent.nvalinit = &V
		Endif
		*!*	modificare	ROACONT	v 2.0.76	^
		
		* Daca este un Monetar/Bon fiscal fara CUI, cer numarul de bonuri fiscale / doar pentru vanzari, nu si pentru achizitii!!!
		IF '.EXPLICATIA'$V && POACT.EXPLICATIA
			IF UPPER(ALLTRIM(oxset.tipjurnal)) = 'JV' AND PEMSTATUS(this.parent.Parent, "lBonFiscalFaraCUI", 5)
				IF this.parent.Parent.lBonFiscalFaraCUI
					lcBonuri = INPUTBOX("Numar bonuri", "Numar bonuri fiscale (bonuri fara CUI sau factura)", "")
					IF !EMPTY(m.lcBonuri) AND ISDIGIT(m.lcBonuri)
						&V = [*BON=] + m.lcBonuri + [*] + STRTRAN(poAct.explicatia, STREXTRACT(poAct.explicatia,'*','*',1,1+4),[],1,1,1)
					ENDIF 	
				ENDIF 
			ENDIF 
		ENDIF 
		
		
		*!* 17.10.2006
		*!* marius.mutu
		*!* daca se dadea renunt la alegerea contractului, responsabilului etc - nu se mai afisa fereastra urmatoare
		gnButon = 1
		Buton = 1
		pnIesire = 1
		This.Refresh
		
	ENDPROC

	PROCEDURE Text_item1.KeyPress
		Lparameters nKeyCode, nShiftAltCtrl
		*!*	modificare	ROACONT	v 2.0.76
		V=Upper(This.ControlSource)
		If ('.SUMA_2TVA'$V Or '.SUMA_2'$V Or '.TOTFTVA'$V Or '.TOTTVA'$V Or '.TOTCTVA'$V Or '.SUMA_4'$V Or '.V10'$V) And nKeyCode <> 13 And This.Parent.nvalinit <> 0
			This.Parent.nvalinit = 0
		Endif
		DoDefault(nKeyCode)
		*!*	modificare	ROACONT	v 2.0.76	^
		
	ENDPROC

	PROCEDURE Text_item1.Valid
		*!* 13.11.2013
		*!* marius.mutu
		*!* am corectat '.V10'$M dadea eroare pentru partenerii contului 1011 (poact.V1011). se astepta sa fie numeric
		
		*!* 11.06.2018
		*!* MARIUS.MUTU
		*!* 10570 TRANSFER INTRE VALUTE - la introducerea curs incasare debit se calculeaza suma in valuta 2 (poAct.suma_22)
		
		Local M,lnTva, lcpoActIdPart
		M=Upper(This.ControlSource)
		F=Lower(Alltrim(This.Parent.FIS_LISTA))
		lcObj = Upper(This.Parent.pcobj)
		lcpoActIdPart = 'POACT.ID_V'+Substr(M,7)
		
		If Inlist(F,'vnom_parteneri')
		*!*	SET STEP ON
		ENDIF 
		
		IF TRANSFORM(m) = "POACT.SUMA_22"
		*	SET STEP ON
		endif
		
		*!*	modificare	ROACONT	v 2.0.76
		If ('.SUMA_2TVA'$M Or '.SUMA_2'$M Or '.TOTFTVA'$M Or '.TOTTVA'$M Or '.TOTCTVA'$M Or '.SUMA_4'$M Or '.V10'$M) and TYPE('this.Parent.nvalinit') = 'N' AND this.Parent.nvalinit <> 0
			&M = This.Parent.nvalinit
		Endif
		*!*	modificare	ROACONT	v 2.0.76	^
		
		If Type('this.Parent.Parent.Parent')='O'
		*!*	modificare JC/JV 2007
			If Pemstatus(This.Parent.Parent.Parent,'ntvatax',5)
				lnTva = This.Parent.Parent.Parent.ntvatax
			Else
		*!*	modificare JC/JV 2007	^
				If Pemstatus(This.Parent.Parent.Parent,'pntva',5)
					lnTva = This.Parent.Parent.Parent.pntva
				Else
					lnTva = m.ctva
				Endif
			Endif
		Endif
		
		With &lcObj
			Do Case
			Case '.NUME_4'$M
		*.NUME_4 = .NUME_VALUTA
			Case '.SUMA_2TVA'$M
		*!*	modificare ROACONT v 2.0.76
		*!*			If !Empty(.SUMA_2TVA)
		*!*				.TOTTVA = Round(.SUMA_2TVA * .suma_3, gnPC)
		*!*				.NEIMPOZAB = 0
		*!*			Else
		*!*				.NEIMPOZAB = Round(.SUMA_2 * .suma_3, gnPC)
		*!*				.TOTTVA = 0
		*!*	*!* 20.04.2007
		*!*	*!* nu mai trebuie neimpozab
		*!*				.NEIMPOZAB = 0
		*!*	*!* 20.04.2007 ^
		*!*			Endif
				.TOTTVA = Round(.SUMA_2TVA * .SUMA_3,gnPc)
				.NEIMPOZAB = 0
		*!*	modificare ROACONT v 2.0.76	^		
			Case '.SUMA_22' $ M
		*!* nu calculez aici .totftva,  ci in ocompensari_val_2 (doar suma care se converteste din valuta de incasare in valuta facturii)
		*!*			.TOTFTVA = Round(.SUMA_22 * .SUMA_32,gnPc)
			Case '.SUMA_2'$M
		*!* 20.04.2007
		*!* nu se completa tva in valuta
				If Type(".SUMA_2TVA") <> "U"
		*!*	modificare ROACONT v 2.0.76
		*!*				.SUMA_2TVA = Round(.SUMA_2*(lnTva-1), gnPval)
					.SUMA_2TVA = Round((.SUMA_2-Iif(Type(".SUMA_4")<>"U",.SUMA_4,0))*(lnTva-1), gnPval)
		*!*	modificare ROACONT v 2.0.76	^
				Endif
		*!* 20.04.2007 ^
				If Type('.suma_3') # 'U'
					.TOTFTVA = Round(IIF(TYPE(".SUMA_2") <> "U",.suma_2,.suma_32) * .suma_3, gnPC)
				Endif
				If Type('.SUMA_2TVA') # 'U'
					If !Empty(.SUMA_2TVA)
						.TOTTVA = Round(.SUMA_2TVA * .suma_3, gnPC)
		*!*	modificare ROACONT v 2.0.76
		*!*				Else
		*!*	*!*					.NEIMPOZAB = Round(.SUMA_2 * .suma_3, gnPC)
		*!*					.NEIMPOZAB = Round((.SUMA_2-Iif(Type(".SUMA_4")<>"U",.SUMA_4,0)) * .suma_3, gnPC)
		*!*	modificare ROACONT v 2.0.76	^
					Endif
				EndIf
		
		*!* 11.06.2018
			Case '.SUMA_32'$M && CURS VALUTAR INCASARE DEBIT
				*** CALCULEZ SUMA IN VALUTA 2 poAct.suma_22 (10633 TRANSFER INTRE VALUTE)
				IF EMPTY(.suma_22) AND .suma_32 <> 0
					IF !EMPTY(.totftva)
						.suma_22 = ROUND(.totftva/.suma_32, m.gnPC) && SUMA LEI / CURS VALUTA INCASARE DEBIT
					ELSE 
						IF !EMPTY(.suma_2) AND !EMPTY(.suma_3) AND !EMPTY(.suma_32)
							.suma_22 = ROUND(ROUND(.suma_2 * .suma_3, m.gnPC)/.suma_32, m.gnPC) && (SUMA IN VALUTA PLATA * CURS VALUTA PLATA CREDIT) / CURS VALUTA INCASARE DEBIT
						ENDIF 	
					ENDIF 	
				ENDIF 
		*!* 11.06.2018 ^
		
		*!*	adaugare facturare in valuta 13.09.2007
			Case '.v8'$M
				If .v8 > .dataact
					amessagebox("Data cursului nu trebuie sa fie mai mare decat data actului!",48,"Atentie")
					Return 0
				ENDIF
		*!*	adaugare facturare in valuta 13.09.2007	^
			Case '.DATAIREG'$M
				If !(Month(.dataireg)=gnluna And Year(.dataireg)=gnan)
					amessagebox("Data trebuie sa fie din luna "+Alltrim(pcnl)+"/"+Alltrim(pcan)+" !",48,"Atentie")
					Return 0
				Endif
				If !pl_verificat
					.dataact = .dataireg
		
		*!*	modificare	31.10.2006
					If INLIST(gcNumeProgram,[ROAFACTURARE],[ROADEVIZE])
		*!*	modificare	ROAFACTURARE	v 2.2.4
		*!*					.datascad = Iif(gnScadentaAutomata=0,Gomonth(.dataact,1),.dataact+gnZileScadentaFact)
						.datascad = Iif(gnZileScadentaFact=-1,Gomonth(.dataact,1),.dataact+gnZileScadentaFact)
		*!*	modificare	ROAFACTURARE	v 2.2.4	^
						This.Parent.Parent.Parent.Refresh()
					Endif
		*!*	modificare	31.10.2006	^
		*!*	modificare facturare in valuta 19.09.2007
					If Type(lcObj+'.V8')<>'U'
						.v8 = .dataact
					Endif
		*!*	modificare facturare in valuta 19.09.2007	^
				Endif
			Case'.DATAACT'$M
				If !((Month(.dataact)<=gnluna And Year(.dataact)=gnan) Or Year(.dataact)<gnan)
					amessagebox("Data trebuie sa fie inainte sau in luna "+Alltrim(pcnl)+"/"+Alltrim(pcan)+" !",48,"Atentie")
					Return 0
				Endif
		*!*	modificare facturare in valuta 13.09.2007
				If !pl_verificat And Type(lcObj+'.V8')<>'U'
					.v8 = .dataact
				ENDIF
				
				IF PEMSTATUS(thisform,'UpdateExplicatieSAFT',5)
					Thisform.UpdateExplicatieSAFT()		
				ENDIF 	
		*!*	modificare facturare in valuta 13.09.2007	^
			Case '.NRACT'$M
				If .nract = 0
					If !Inlist(This.Parent.id_tipdoc,-99,-1)
						.nract = poGeneratorNumere.aloca_numar(This.Parent.id_tipdoc,Null)
					Endif
					If .nract = 0
						amessagebox("Introduceti numarul documentului (diferit de zero) !",48,"Atentie")
						Return 0
					Endif
				ELSE
				&& 20oct2008  -- verificarea se face pe release v2.0.78
		*!*	*!*	modificare serii numere - 10.2007
		*!*				If !Inlist(This.Parent.id_tipdoc,-99,-1)
		*!*					poGeneratorNumere.verifica_numar(This.Parent.id_tipdoc,.nract)
		*!*				Endif
			&& 20oct2008  -- verificarea se face pe release v2.0.78 ^
		*!*	modificare serii numere - 10.2007	^
				Endif
			Case '.DATASCAD'$M
				If !(.dataact<=.datascad)
					amessagebox("Data scadenta trebuie sa fie mai mare decat data actului!",48,"Atentie")
					Return 0
				Endif
			Case '.TOTFTVA'$M
		*m.tottva=Round(m.totftva*(m.ctva-1),0)
		*!*	modificare ROACONT v 2.0.76
		*!*			.TOTTVA=Round(.TOTFTVA*(lnTva-1),gnPC)
		*!*			.TOTCTVA=.TOTFTVA+.TOTTVA+.NEIMPOZAB
				.TOTTVA=Round((.TOTFTVA-Iif(Type('.V10')<>"U",.V10,0))*(lnTva-1),gnPC)
				.TOTCTVA=.TOTFTVA+.TOTTVA+.NEIMPOZAB-Iif(Type('.V10')<>"U",.V10,0)
		*!*	modificare ROACONT v 2.0.76	^
		*!* 20.04.2007
		*!* trebuie sa se completeze si tva in valuta la schimbarea explicatie tva
				If Type('.SUMA_2') # 'U' And Type('.SUMA_2TVA') # 'U'
		*!*	modificare ROACONT v 2.0.76
		*!*				.SUMA_2TVA = Round(.SUMA_2*(lnTva-1), gnPval)
					.SUMA_2TVA = Round((.SUMA_2-Iif(Type('.SUMA_4')<>"U",.SUMA_4,0))*(lnTva-1), gnPval)
		*!*	modificare ROACONT v 2.0.76	^
				Endif
		*!* 20.04.2007 ^
			Case '.TOTTVA'$M
		*	m.totftva=Round(M.tottva/(M.ctva-1),0)
				If Type('.TOTCTVA') # 'U'
		*!*	modificare ROACONT v 2.0.76
		*!*				.TOTCTVA=.TOTFTVA+.TOTTVA+.NEIMPOZAB
					.TOTCTVA=.TOTFTVA+.TOTTVA+.NEIMPOZAB-Iif(Type('.V10')<>"U",.V10,0)
		*!*	modificare ROACONT v 2.0.76	^
				Endif
			Case '.TOTCTVA'$M
				If lnTva=0
					lnTva=1
				Endif
				If .TOTCTVA#0 Then
		*!*	modificare ROACONT v 2.0.76
		*!*				If .TOTFTVA=0
		*!*					.TOTFTVA=Round((.TOTCTVA-.NEIMPOZAB)/lnTva,gnPC)
		*!*					.TOTTVA=.TOTCTVA-.TOTFTVA-.NEIMPOZAB
		*!*				Else
		*!*					.TOTFTVA=.TOTCTVA-.TOTTVA-.NEIMPOZAB
		*!*				Endif
					If .TOTFTVA=0
						.TOTFTVA=Round((.TOTCTVA-.NEIMPOZAB)/lnTva,gnPC)+Iif(Type('.V10')<>"U",.V10,0)
						.TOTTVA=.TOTCTVA-.TOTFTVA-.NEIMPOZAB+Iif(Type('.V10')<>"U",.V10,0)
					Else
						.TOTFTVA=.TOTCTVA-.TOTTVA-.NEIMPOZAB+Iif(Type('.V10')<>"U",.V10,0)
					Endif
		*!*	modificare ROACONT v 2.0.76	^
				Endif
		*!*	modificare ROACONT v 2.0.76
			Case '.SUMA_4'$M
				.SUMA_2TVA = Round((.SUMA_2-.SUMA_4)*(lnTva-1), gnPval)
				.V10 = Round(.SUMA_4  * .suma_3, gnPC)
				.TOTTVA = Round(.SUMA_2TVA * .suma_3, gnPC)
			Case GETWORDNUM(M, 2, '.') = 'V10' && '.V10'$M
				.TOTTVA = Round((.TOTFTVA - .V10)*(lnTva-1),gnPc)
				.TOTCTVA = .TOTFTVA + .TOTTVA + .NEIMPOZAB - .V10
		*!*	modificare ROACONT v 2.0.76	^
		
		*!*	modificare serii numere - 10.2007
		*!*		Case M='M.NNIR' And Type('THIS.Parent.Parent.Parent')=='O'
		*!*			If 'BON'$This.Parent.Parent.Parent.FORMGEST
		*!*				Locate For nnir = m.nnir And cante # 0
		*!*			Else
		*!*				Locate For nnir = m.nnir And cant # 0
		*!*			Endif
		*!*			If Found()
		*!*				amessagebox("Numar " + Left(This.Parent.Parent.Parent.FORMGEST,3) + " duplicat !",48,"Atentie")
		*!*			Endif
			Case '.NNIR'$M
				If .nnir = 0
					If !Inlist(This.Parent.id_tipdoc,-99,-1)
						.nnir = poGeneratorNumere.aloca_numar(This.Parent.id_tipdoc,IIF(Type(lcObj+'.id_gestiune') <> 'U',.id_gestiune,null))
					Endif
					If .nnir = 0
						amessagebox("Introduceti numarul nir-ului / bonului (diferit de zero) !",48,"Atentie")
						Return 0
					Endif
		*!*			ELSE
		
		*!*	 in momentul cand modifica numarul, chiar daca ulterior a fost repus numarul initial, se dadea peste cap alocarea seriilor 14oct2008 - v2.0.78
		*!*				If !Inlist(This.Parent.id_tipdoc,-99,-1)
		*!*					poGeneratorNumere.verifica_numar(This.Parent.id_tipdoc,.nnir)
		*!*				ENDIF
		*!*	 in momentul cand modifica numarul, chiar daca ulterior a fost repus numarul initial, se dadea peste cap alocarea seriilor 14oct2008 - v2.0.78 ^
		*!*	modificare	ROAPRODUCTIE v 2.0.0 : daca nu am numarul de nir generat, atunci nract = 0 si am unele formulare in care nu apare nract ca sa-l pot modifica
				Else
					If !Inlist(This.Parent.id_tipdoc,-99,-1) And Type('oxset.factura') # 'U'
						If Empty(.nract) And !oxset.factura
							.nract = .nnir
						Endif
					Endif
		*!*	modificare	ROAPRODUCTIE v 2.0.0	^
				Endif
		*!*	modificare serii numere - 10.2007	^
		*	-------------------------------------------------------------------gest
		
		*!*		CASE '.NNIR'$M
		*!*			this.Parent.parent.numar_plaja1.alocare_numar(this.Value)
		*!*			.nnir = this.Parent.Parent.numar_plaja1.numar_curent
		
		*   -----------------------------------------------------------------------
		
		
			Case M='M.PRET'
				m.TVA=Round(M.PRET*(M.CTVAA-1),gnPC)
				m.PRETTVA=M.PRET+M.TVA
		*	m.procent=ROUND(m.procent,5)
				m.pretv=Round(m.PRET*(1+m.procent),gnPC)
		*M.PRETVTVA=ROUND(M.PRETV*M.CTVAV,3)
		*M.TVAV=M.PRETVTVA-M.PRETV
				m.TVAV=Round(M.pretv*(M.CTVAV-1),gnPC)
				m.PRETVTVA=M.pretv+M.TVAV
			Case M='M.PRETV'
				m.TVAV=Round(M.pretv*(M.CTVAV-1),gnPC)
				m.PRETVTVA=M.pretv+M.TVAV
				If !Empty(m.PRET) And !Empty(m.pretv)
					m.procent=Round(m.pretv/m.PRET-1,5)
				Endif
			Case M='M.PRETVTVA'
				m.TVAV=Round(M.PRETVTVA*(M.CTVAV-1)/M.CTVAV,gnPC)
				m.pretv=M.PRETVTVA-M.TVAV
				If !Empty(m.PRET) And !Empty(m.pretv)
					m.procent=Round(m.pretv/m.PRET-1,5)
				ENDIF
			CASE F = 'vnom_fdoc'
				* Actualizez mecanismul de plata SAFT
				IF PEMSTATUS(thisform,'UpdatePaymentSAFT',5)
					Thisform.UpdatePaymentSAFT()		
				ENDIF 		
			Endcase
		Endwith
		
		Thisform.Refresh
		
	ENDPROC

	PROCEDURE Text_item1.When
		*!* 16.01.2014
		*!* datascad nu se mai suprascrie daca este deja completata (de la o operatie anterioara)
		Local M,P
		M=Upper(This.ControlSource)
		P=Upper(This.Parent.LAbel_item1.Caption)
		lcObj = Upper(This.Parent.pcobj)
		
		With &lcObj
			Do Case
			Case '.DATAACT'$M
				.DATAACT = .dataireg
		*!*	modificare	31.10.2006
				If INLIST(gcNumeProgram,[ROAFACTURARE],[ROADEVIZE])
		*!*	modificare	ROAFACTURARE	v 2.2.4
		*!*				.datascad = Iif(gnScadentaAutomata=0,Gomonth(.DATAACT,1),.DATAACT+gnZileScadentaFact)
					.datascad = Iif(gnZileScadentaFact=-1,Gomonth(.dataact,1),.dataact+gnZileScadentaFact)
		*!*	modificare	ROAFACTURARE	v 2.2.4	^
					This.Parent.Parent.Parent.Refresh()
				Endif
		*!*	modificare	31.10.2006	^
		*!*	modificare facturare in valuta 19.09.2007
				If !pl_verificat And Type(lcObj+'.V8')<>'U'
					.v8 = .DATAACT
				Endif
		*!*	modificare facturare in valuta 19.09.2007	^
			Case '.DATASCAD'$M
		*!*	modificare	31.10.2006
				If INLIST(gcNumeProgram,[ROAFACTURARE],[ROADEVIZE])
		*!*	modificare	ROAFACTURARE	v 2.2.4
		*!*				.datascad = Iif(gnScadentaAutomata=0,Gomonth(.DATAACT,1),.DATAACT+gnZileScadentaFact)
					.datascad = Iif(gnZileScadentaFact=-1,Gomonth(.dataact,1),.dataact+gnZileScadentaFact)
		*!*	modificare	ROAFACTURARE	v 2.2.4	^
					This.Parent.Parent.Parent.Refresh()
				Else
		*!*	modificare	31.10.2006	^
					IF EMPTY(.datascad) OR (!EMPTY(.datascad) AND .datascad < .dataact)
						.datascad = Gomonth(.DATAACT,1)
					ENDIF 	
		*!*	modificare	31.10.2006
				Endif
		*!*	modificare	31.10.2006	^
		*!*	modificare serii numere	- 10.2007
			Case '.NNIR'$M And .nnir = 0
				If !Inlist(This.Parent.id_tipdoc,-99,-1)
					.nnir = poGeneratorNumere.aloca_numar(This.Parent.id_tipdoc,IIF(Type(lcObj+'.id_gestiune') <> 'U',.id_gestiune,null))
					AddProperty(_Screen,[nid_tipdoc],This.Parent.id_tipdoc)
					If Type('oxset.factura') # 'U'
						If Empty(.nract) And !oxset.factura
							.nract = .nnir
						ENDIF
					ENDIF
		
		*!*			Else
		*!*					If Used('cerere')
		*!*						lcAliasSN = Alias()
		*!*						Select cerere
		*!*						Locate For id_item = 9
		*!*						If Found()
		*!*							amessagebox("Nu ati ales gestiunea!",48,"Atentie")
		*!*						Else
		*!*							.nnir = poGeneratorNumere.aloca_numar(This.Parent.id_tipdoc,Null)
		*!*						Endif
		*!*						IF !empty(lcAliasSN)
		*!*							Select (lcAliasSN)
		*!*						ENDIF
		*!*					Endif
		*!*				Endif
				Endif
			Case '.NRACT'$M And .nract = 0
				If !Inlist(This.Parent.id_tipdoc,-99,-1)
					.nract = poGeneratorNumere.aloca_numar(This.Parent.id_tipdoc,Null)
		
				Endif
		*!*		CASE '.NNIR'$M AND TYPE('this.Parent.Parent.numar_plaja1')='O' AND TYPE('this.Parent.Parent.numar_plaja1.oplaja')<>'O' && sa intre o singura data
		*!*			DO CASE
		*!*				CASE gnSerie = 1  && serii pe gestiuni
		*!*					IF TYPE('.id_gestiune')#'U'
		*!*						lnIdEnt = .id_gestiune
		*!*					ELSE
		*!*	*!*						lcMesaj = 'Nu ati completat numele Gestiunii!'
		*!*	*!*						lcTitlu = [Atentie]
		*!*	*!*						lcTip = [Avertizare]
		*!*	*!*						lcImagine = [exclam.ico]
		*!*	*!*						ofrm_eroare = CREATEOBJECT('frm_mesaj',lctitlu,lcimagine,lctip,lcmesaj)
		*!*	*!*						ofrm_eroare.show(1)
		*!*	*!*						RELEASE ofrm_eroare
		*!*						amessagebox("Nu ati completat numele gestiunii!",48,"Atentie")
		*!*						RETURN
		*!*					ENDIF
		*!*				CASE gnSerie = 2  && o singura serie
		*!*					lnIdEnt = 0
		*!*				CASE gnSerie = 3  && serii pe utilizatori
		*!*					lnIdEnt = gnIdUtil
		*!*				OTHERWISE
		*!*					lnIdEnt = -1
		*!*			ENDCASE
		*!*			this.Parent.Parent.numar_plaja1.id_entitate = lnIdEnt
		*!*			*this.Parent.parent.numar_plaja1.tip = IIF('NIR'$ P,1,IIF('BON'$ P,2,0)) && P = Upper(This.Parent.LAbel_item1.Caption)
		*!*			this.Parent.parent.numar_plaja1.tip = IIF('NIR'$ P,1,IIF('LIVRARE'$ P,9,IIF('BON'$ P,2,IIF('PV_PROD'$ P,8,0)))) && P = Upper(This.Parent.LAbel_item1.Caption)
		*!*			this.Parent.Parent.numar_plaja1.serie = gnSerie
		*!*			this.Parent.Parent.numar_plaja1.alocare_numar()
		*!*			.nnir = this.Parent.Parent.numar_plaja1.numar_curent
		*!*			_screen.addproperty('nIdSerie',this.Parent.Parent.numar_plaja1.id_numar) && il folosesc in inventar_stoc
		*!*			IF TYPE('oxset.factura') # 'U'
		*!*				IF EMPTY(.nract) AND !oxset.factura
		*!*					.nract = .nnir
		*!*				ENDIF
		*!*			ENDIF
		*!*	modificare serii numere	- 10.2007	^
			Case '.TOTCTVA'$M
		*!*	modificare ROACONT v 2.0.76
		*!*			.TOTCTVA=.totftva+.tottva+.neimpozab
				.TOTCTVA=.TOTFTVA+.TOTTVA+.NEIMPOZAB-Iif(Type('.V10')<>"U",.V10,0)
		*!*	modificare ROACONT v 2.0.76	^
			Endcase
		Endwith
		
		This.Refresh
		
	ENDPROC

ENDDEFINE

DEFINE CLASS label_item AS _label OF "_baza.vcx" 
 	*< CLASSDATA: Baseclass="label" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		AutoSize = .T.
		BackStyle = 0
		Caption = "Label1"
		FontBold = .F.
		FontCharSet = 238
		FontName = "Courier New"
		ForeColor = 0,0,128
		Height = 17
		Name = "label_item"
		Width = 44
	*</PropValue>

ENDDEFINE

DEFINE CLASS lineo AS line 
 	*< CLASSDATA: Baseclass="line" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		BorderColor = 192,192,192
		BorderStyle = 3
		Height = 0
		Name = "lineo"
		Width = 111
	*</PropValue>

ENDDEFINE

DEFINE CLASS linie3d AS container 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		BackColor = 192,192,192
		Height = 4
		Name = "linie3d"
		SpecialEffect = 0
		Width = 342
	*</PropValue>

ENDDEFINE

DEFINE CLASS linie3do AS linie3d OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "linie3do"
	*</PropValue>
	
	PROCEDURE Init
		THIS.Width=THIS.Parent.Width
		THIS.LEFT=0
		
	ENDPROC

ENDDEFINE

DEFINE CLASS linie3dv AS linie3d OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Height = 110
		Name = "linie3dv"
		Width = 4
	*</PropValue>
	
	PROCEDURE Init
		THIS.Height=THIS.Parent.Height
		THIS.TOP=0
	ENDPROC

ENDDEFINE

DEFINE CLASS list AS butoninv OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "list"
		Imbuton1.Height = 27
		Imbuton1.Name = "Imbuton1"
		Imbuton1.Picture = ..\grafice\listare_sus.bmp
		Imbuton1.ToolTipText = "Listare la imprimanta"
		Imbuton1.Width = 30
		Command1.Name = "Command1"
		Command1.Picture = ..\grafice\listare_sus.bmp
		Command1.ToolTipText = "Listare la imprimanta"
	*</PropValue>
	
	PROCEDURE MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='LISTARE_JOS.BMP'
	ENDPROC

	PROCEDURE MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='LISTARE_sus.BMP'
	ENDPROC

ENDDEFINE

DEFINE CLASS modifica AS butoninv OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "modifica"
		Imbuton1.Height = 29
		Imbuton1.Name = "Imbuton1"
		Imbuton1.Picture = ..\grafice\modifica1.bmp
		Imbuton1.ToolTipText = "Modificare"
		Imbuton1.Width = 27
		Command1.Name = "Command1"
		Command1.ToolTipText = "Modificare"
	*</PropValue>
	
	PROCEDURE MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='MODIFICA2.BMP'
	ENDPROC

	PROCEDURE MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='MODIFICA1.BMP'
	ENDPROC

ENDDEFINE

DEFINE CLASS modiset AS setbaza OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="formset" Timestamp="" Scale="" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="CERERE" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Titlufrumos2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Precedent1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Urmator1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.LINEO1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Gridb1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Gridb1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Gridb1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Gridb1.Column2.Combo1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Gridb1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Gridb1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Gridb1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Gridb1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Gridb1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Gridb1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CERERE.Nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Titlufrumos2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Precedent1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Urmator1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Lineo2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page1.Gridb1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page1.Gridb1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page1.Gridb1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page1.Gridb1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page1.Gridb1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page1.Gridb1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page1.Gridb1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page1.Gridb1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page1.Gridb1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page1.Nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page1.Sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column2.Combo1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column3.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column4.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column5.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column6.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column6.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column7.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column7.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column8.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column8.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column8.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column9.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column9.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page2.Gridb1.Column9.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column2.Combo1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column3.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column4.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column5.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column6.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column6.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column7.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column7.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column8.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column8.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column8.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column9.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column9.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column9.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column10.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column10.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column10.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column11.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column11.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page3.Gridb1.Column11.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column2.Combo1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column3.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column4.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column5.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column6.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="REPARTIZARE.Pageframe1.Page4.Gridb1.Column6.Combogrid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIFICARE" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIFICARE.Titlufrumos2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIFICARE.Renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIFICARE.Precedent1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIFICARE.Lineo2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="VERIFICARE.Edit1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Model" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Model.Titlufrumos2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Model.Renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Model.Precedent1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Model.Urmator1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Model.Lineo2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Model.Optiongroup1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Model.Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Model.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Model.combo1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Titlufrumos2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Urmator1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.LABEL_ITEM1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Label_item2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.TEXT_ITEM1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Text_item2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Label_item3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Text_item3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Label_item4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Text_item4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.LINEO1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Lineo2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Lineo3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Lineo4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Lineo5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Lineo6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Lineo7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Lineo8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Lineo9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FORMTERMIN12.Precedent1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: cerere_urmatorul
		*m: model_urmatorul
		*m: terminatok
		*m: terminat_oricum
		*m: verificare_totala
		*p: e_nou
		*p: id_setmodel
		*p: verifok
	*</DefinedPropArrayMethod>

	*<PropValue>
		id_setmodel = 0
		Name = "modiset"
		WindowType = 1
		Form1.DoCreate = .T.
		Form1.Name = "Form1"
		Form1.Visible = .F.
		FORMTERMIN12.BorderStyle = 1
		FORMTERMIN12.DoCreate = .T.
		FORMTERMIN12.Height = 450
		FORMTERMIN12.Name = "FORMTERMIN12"
		FORMTERMIN12.Shape1.Height = 36
		FORMTERMIN12.Shape1.Left = 0
		FORMTERMIN12.Shape1.Name = "Shape1"
		FORMTERMIN12.Shape1.Top = 0
		FORMTERMIN12.Shape1.Width = 648
		FORMTERMIN12.ShowTips = .T.
		FORMTERMIN12.Terminat1.Command1.Name = "Command1"
		FORMTERMIN12.Terminat1.Imbuton1.Height = 27
		FORMTERMIN12.Terminat1.Imbuton1.Name = "Imbuton1"
		FORMTERMIN12.Terminat1.Imbuton1.Width = 26
		FORMTERMIN12.Terminat1.Left = 408
		FORMTERMIN12.Terminat1.Name = "Terminat1"
		FORMTERMIN12.Terminat1.TabIndex = 5
		FORMTERMIN12.Terminat1.Top = 414
		FORMTERMIN12.Terminat1.Visible = .F.
		FORMTERMIN12.TITLUFRUMOS1.Caption = "EDITAREA SETULUI DE NOTE CONTABILE"
		FORMTERMIN12.TITLUFRUMOS1.Height = 16
		FORMTERMIN12.TITLUFRUMOS1.Left = 7
		FORMTERMIN12.TITLUFRUMOS1.Name = "TITLUFRUMOS1"
		FORMTERMIN12.TITLUFRUMOS1.TabIndex = 6
		FORMTERMIN12.TITLUFRUMOS1.Top = -1
		FORMTERMIN12.TITLUFRUMOS1.Width = 364
		FORMTERMIN12.Visible = .F.
		FORMTERMIN12.Width = 600
	*</PropValue>

	ADD OBJECT 'CERERE' AS formtermin WITH ;
		DoCreate = .T., ;
		Height = 450, ;
		Name = "CERERE", ;
		ShowTips = .T., ;
		Visible = .F., ;
		Width = 600, ;
		Shape1.Height = 36, ;
		Shape1.Left = 0, ;
		Shape1.Name = "Shape1", ;
		Shape1.Top = 0, ;
		Shape1.Width = 636, ;
		Terminat1.Command1.Name = "Command1", ;
		Terminat1.Imbuton1.Height = 27, ;
		Terminat1.Imbuton1.Name = "Imbuton1", ;
		Terminat1.Imbuton1.Width = 26, ;
		Terminat1.Left = 452, ;
		Terminat1.Name = "Terminat1", ;
		Terminat1.Top = 414, ;
		Terminat1.Visible = .F., ;
		TITLUFRUMOS1.Caption = "EDITAREA SETULUI DE NOTE CONTABILE", ;
		TITLUFRUMOS1.Height = 17, ;
		TITLUFRUMOS1.Left = 7, ;
		TITLUFRUMOS1.Name = "TITLUFRUMOS1", ;
		TITLUFRUMOS1.Top = -1, ;
		TITLUFRUMOS1.Width = 364
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="form" />

	ADD OBJECT 'CERERE.Gridb1' AS gridb WITH ;
		ColumnCount = 5, ;
		Height = 346, ;
		Left = 13, ;
		Name = "Gridb1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordMark = .T., ;
		RecordSource = "treq", ;
		Top = 43, ;
		Width = 467, ;
		COLUMN1.ControlSource = "nr_item", ;
		COLUMN1.HEADER1.Alignment = 2, ;
		COLUMN1.HEADER1.Caption = "Nr.", ;
		COLUMN1.HEADER1.Name = "HEADER1", ;
		COLUMN1.Name = "COLUMN1", ;
		COLUMN1.ReadOnly = .F., ;
		COLUMN1.TEXT1.Name = "TEXT1", ;
		COLUMN1.TEXT1.ReadOnly = .F., ;
		COLUMN1.Width = 53, ;
		Column2.ControlSource = "label_item", ;
		Column2.CurrentControl = "Combo1", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Sparse = .F., ;
		Column2.Width = 384, ;
		Column3.ControlSource = "id_item", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column4.ControlSource = "x_item", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column5.ControlSource = "var_item", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T.
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="grid" />

	ADD OBJECT 'CERERE.Gridb1.Column2.Combo1' AS combobox WITH ;
		BorderStyle = 0, ;
		Height = 24, ;
		Left = 83, ;
		Name = "Combo1", ;
		ReadOnly = .F., ;
		RowSource = "xitems.label_item", ;
		RowSourceType = 6, ;
		SpecialEffect = 1, ;
		Style = 2, ;
		Top = 30, ;
		Width = 100
		*< END OBJECT: BaseClass="combobox" />

	ADD OBJECT 'CERERE.Gridb1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Element", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'CERERE.Gridb1.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 'CERERE.Gridb1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Id_item", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'CERERE.Gridb1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'CERERE.Gridb1.Column4.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "X_item", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'CERERE.Gridb1.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'CERERE.Gridb1.Column5.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Var_item", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'CERERE.Gridb1.Column5.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'CERERE.LINEO1' AS lineo WITH ;
		Height = 0, ;
		Left = 5, ;
		Name = "LINEO1", ;
		Top = 407, ;
		Width = 585
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'CERERE.Nou1' AS nou WITH ;
		Left = 492, ;
		Name = "Nou1", ;
		Top = 45, ;
		Imbuton1.Height = 29, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 27, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'CERERE.Precedent1' AS precedent WITH ;
		Left = 487, ;
		Name = "Precedent1", ;
		Top = 414, ;
		Imbuton1.Height = 27, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 27, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'CERERE.Renunt1' AS renunt WITH ;
		Left = 522, ;
		Name = "Renunt1", ;
		Top = 414, ;
		Imbuton1.Height = 30, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 30, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'CERERE.Sterge1' AS sterge WITH ;
		Left = 492, ;
		Name = "Sterge1", ;
		Top = 78, ;
		Imbuton1.Height = 26, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 26, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'CERERE.Titlufrumos2' AS titlufrumos WITH ;
		Caption = "Pasul 3 - Cererea de date de la operator", ;
		Height = 21, ;
		Left = 7, ;
		Name = "Titlufrumos2", ;
		Top = 18, ;
		Width = 364
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="label" />

	ADD OBJECT 'CERERE.Urmator1' AS urmator WITH ;
		Left = 559, ;
		Name = "Urmator1", ;
		Top = 414, ;
		Imbuton1.Height = 26, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 26, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'FORMTERMIN12.LABEL_ITEM1' AS label_item WITH ;
		Caption = "Nr. set.", ;
		Left = 12, ;
		Name = "LABEL_ITEM1", ;
		TabIndex = 10, ;
		Top = 67
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="label" />

	ADD OBJECT 'FORMTERMIN12.Label_item2' AS label_item WITH ;
		Caption = "Denumire", ;
		Left = 12, ;
		Name = "Label_item2", ;
		TabIndex = 11, ;
		Top = 120
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="label" />

	ADD OBJECT 'FORMTERMIN12.Label_item3' AS label_item WITH ;
		Caption = "Lista notelor:", ;
		Left = 12, ;
		Name = "Label_item3", ;
		TabIndex = 12, ;
		Top = 144
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="label" />

	ADD OBJECT 'FORMTERMIN12.Label_item4' AS label_item WITH ;
		Caption = "Identificator:", ;
		Left = 12, ;
		Name = "Label_item4", ;
		TabIndex = 13, ;
		Top = 96
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="label" />

	ADD OBJECT 'FORMTERMIN12.LINEO1' AS lineo WITH ;
		Height = 0, ;
		Left = 12, ;
		Name = "LINEO1", ;
		Top = 141, ;
		Width = 573
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'FORMTERMIN12.Lineo2' AS lineo WITH ;
		Height = 0, ;
		Left = 11, ;
		Name = "Lineo2", ;
		Top = 168, ;
		Width = 573
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'FORMTERMIN12.Lineo3' AS lineo WITH ;
		Height = 0, ;
		Left = 12, ;
		Name = "Lineo3", ;
		Top = 63, ;
		Width = 573
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'FORMTERMIN12.Lineo4' AS lineo WITH ;
		Height = 0, ;
		Left = 12, ;
		Name = "Lineo4", ;
		Top = 91, ;
		Width = 573
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'FORMTERMIN12.Lineo5' AS lineo WITH ;
		Height = 0, ;
		Left = 12, ;
		Name = "Lineo5", ;
		Top = 115, ;
		Width = 573
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'FORMTERMIN12.Lineo6' AS lineo WITH ;
		Height = 107, ;
		Left = 118, ;
		Name = "Lineo6", ;
		Top = 63, ;
		Width = 0
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'FORMTERMIN12.Lineo7' AS lineo WITH ;
		Height = 107, ;
		Left = 584, ;
		Name = "Lineo7", ;
		Top = 63, ;
		Width = 0
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'FORMTERMIN12.Lineo8' AS lineo WITH ;
		Height = 107, ;
		Left = 9, ;
		Name = "Lineo8", ;
		Top = 63, ;
		Width = 0
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'FORMTERMIN12.Lineo9' AS lineo WITH ;
		Height = 0, ;
		Left = 12, ;
		Name = "Lineo9", ;
		Top = 407, ;
		Width = 581
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'FORMTERMIN12.Precedent1' AS precedent WITH ;
		Left = 488, ;
		Name = "Precedent1", ;
		TabIndex = 14, ;
		Top = 415, ;
		IMBUTON1.Height = 27, ;
		IMBUTON1.Name = "IMBUTON1", ;
		IMBUTON1.Width = 27, ;
		COMMAND1.Name = "COMMAND1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'FORMTERMIN12.Renunt1' AS renunt WITH ;
		Left = 524, ;
		Name = "Renunt1", ;
		TabIndex = 9, ;
		Top = 414, ;
		Imbuton1.Height = 30, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 30, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'FORMTERMIN12.TEXT_ITEM1' AS text_item WITH ;
		ControlSource = "M.NR_SET", ;
		FontBold = .T., ;
		Height = 20, ;
		Left = 123, ;
		Name = "TEXT_ITEM1", ;
		TabIndex = 1, ;
		Top = 67, ;
		Width = 81
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'FORMTERMIN12.Text_item2' AS text_item WITH ;
		ControlSource = "M.NUME_SET", ;
		FontBold = .T., ;
		Height = 20, ;
		Left = 123, ;
		Name = "Text_item2", ;
		TabIndex = 3, ;
		Top = 120, ;
		Width = 409
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'FORMTERMIN12.Text_item3' AS text_item WITH ;
		ControlSource = "M.LISTA_NOTE", ;
		FontBold = .T., ;
		Height = 20, ;
		Left = 123, ;
		Name = "Text_item3", ;
		TabIndex = 4, ;
		Top = 144, ;
		Width = 409
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'FORMTERMIN12.Text_item4' AS text_item WITH ;
		ControlSource = "M.id_set", ;
		FontBold = .T., ;
		Height = 20, ;
		Left = 123, ;
		Name = "Text_item4", ;
		TabIndex = 2, ;
		Top = 94, ;
		Width = 409
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="textbox" />

	ADD OBJECT 'FORMTERMIN12.Titlufrumos2' AS titlufrumos WITH ;
		Caption = "Pasul 2 - Denumire, specificatii", ;
		Height = 18, ;
		Left = 6, ;
		Name = "Titlufrumos2", ;
		TabIndex = 7, ;
		Top = 17, ;
		Width = 364
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="label" />

	ADD OBJECT 'FORMTERMIN12.Urmator1' AS urmator WITH ;
		Left = 560, ;
		Name = "Urmator1", ;
		TabIndex = 8, ;
		Top = 414, ;
		Imbuton1.Height = 26, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 26, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Model' AS formtermin WITH ;
		BorderStyle = 1, ;
		DoCreate = .T., ;
		Height = 450, ;
		Name = "Model", ;
		ShowTips = .T., ;
		Visible = .T., ;
		Width = 600, ;
		Shape1.Height = 36, ;
		Shape1.Left = 0, ;
		Shape1.Name = "Shape1", ;
		Shape1.Top = 0, ;
		Shape1.Width = 612, ;
		Terminat1.Command1.Name = "Command1", ;
		Terminat1.Imbuton1.Height = 27, ;
		Terminat1.Imbuton1.Name = "Imbuton1", ;
		Terminat1.Imbuton1.Width = 26, ;
		Terminat1.Name = "Terminat1", ;
		Terminat1.Visible = .F., ;
		Titlufrumos1.Caption = "EDITAREA SETULUI DE NOTE CONTABILE", ;
		Titlufrumos1.Height = 15, ;
		Titlufrumos1.Left = 7, ;
		Titlufrumos1.Name = "Titlufrumos1", ;
		Titlufrumos1.Top = -1, ;
		Titlufrumos1.Width = 364
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="form" />

	ADD OBJECT 'Model.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Asemanator cu...", ;
		Height = 17, ;
		Left = 36, ;
		Name = "Check1", ;
		SpecialEffect = 0, ;
		Top = 279, ;
		Width = 110
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'Model.combo1' AS listbox WITH ;
		BoundColumn = 2, ;
		BoundTo = .T., ;
		ControlSource = "thisformset.id_setmodel", ;
		Height = 96, ;
		Left = 60, ;
		Name = "combo1", ;
		RowSource = "select nume_set,id_set,model,lista_note from xsets where id_set<>m.id_set into cursor cmodel order by nume_set", ;
		RowSourceType = 3, ;
		SpecialEffect = 2, ;
		Top = 303, ;
		Visible = .F., ;
		Width = 480
		*< END OBJECT: BaseClass="listbox" />

	ADD OBJECT 'Model.Label1' AS label WITH ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Cu inregistrare in gestiuni:", ;
		Height = 17, ;
		Left = 31, ;
		Name = "Label1", ;
		Top = 115, ;
		Width = 147
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Model.Lineo2' AS lineo WITH ;
		Height = 0, ;
		Left = 11, ;
		Name = "Lineo2", ;
		Top = 407, ;
		Width = 581
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'Model.Optiongroup1' AS optiongroup WITH ;
		BackStyle = 0, ;
		BorderStyle = 0, ;
		ButtonCount = 9, ;
		ControlSource = "M.MODEL", ;
		Height = 204, ;
		Left = 24, ;
		Name = "Optiongroup1", ;
		SpecialEffect = 0, ;
		Top = 60, ;
		Value = 1, ;
		Width = 348, ;
		Option1.BackStyle = 0, ;
		Option1.Caption = "Set de note simple cu contabilizare", ;
		Option1.Height = 17, ;
		Option1.Left = 5, ;
		Option1.Name = "Option1", ;
		Option1.Top = 5, ;
		Option1.Value = 1, ;
		Option1.Width = 232, ;
		Option2.BackStyle = 0, ;
		Option2.Caption = "NIR materiale / marfa la pret de achizitie", ;
		Option2.Height = 17, ;
		Option2.Left = 36, ;
		Option2.Name = "Option2", ;
		Option2.Top = 71, ;
		Option2.Width = 232, ;
		Option3.BackStyle = 0, ;
		Option3.Caption = "NIR marfa la pret de vanzare", ;
		Option3.Height = 17, ;
		Option3.Left = 36, ;
		Option3.Name = "Option3", ;
		Option3.Top = 90, ;
		Option3.Width = 232, ;
		Option4.AutoSize = .T., ;
		Option4.BackStyle = 0, ;
		Option4.Caption = "Bon de consum materiale", ;
		Option4.Height = 17, ;
		Option4.Left = 36, ;
		Option4.Name = "Option4", ;
		Option4.Top = 109, ;
		Option4.Width = 160, ;
		Option5.AutoSize = .T., ;
		Option5.BackStyle = 0, ;
		Option5.Caption = "Bon de consum marfa pe lucrari in curs de executie", ;
		Option5.Height = 17, ;
		Option5.Left = 36, ;
		Option5.Name = "Option5", ;
		Option5.Top = 128, ;
		Option5.Width = 299, ;
		Option6.AutoSize = .T., ;
		Option6.BackStyle = 0, ;
		Option6.Caption = "Vanzare marfa en-gros", ;
		Option6.Height = 17, ;
		Option6.Left = 36, ;
		Option6.Name = "Option6", ;
		Option6.Top = 147, ;
		Option6.Width = 143, ;
		Option7.AutoSize = .T., ;
		Option7.BackStyle = 0, ;
		Option7.Caption = "Vanzare en-detail marfa la pret de achizitie", ;
		Option7.Height = 17, ;
		Option7.Left = 36, ;
		Option7.Name = "Option7", ;
		Option7.Top = 166, ;
		Option7.Width = 249, ;
		Option8.AutoSize = .T., ;
		Option8.BackStyle = 0, ;
		Option8.Caption = "Vanzare en-detail marfa la pret de vanzare", ;
		Option8.Height = 17, ;
		Option8.Left = 36, ;
		Option8.Name = "Option8", ;
		Option8.Top = 185, ;
		Option8.Width = 247, ;
		Option9.AutoSize = .T., ;
		Option9.BackStyle = 0, ;
		Option9.Caption = "Cerere de date fara contabilizare", ;
		Option9.Height = 17, ;
		Option9.Left = 5, ;
		Option9.Name = "Option9", ;
		Option9.Top = 25, ;
		Option9.Width = 196
		*< END OBJECT: BaseClass="optiongroup" />

	ADD OBJECT 'Model.Precedent1' AS precedent WITH ;
		Left = 487, ;
		Name = "Precedent1", ;
		Top = 413, ;
		Visible = .F., ;
		Imbuton1.Height = 27, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 27, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Model.Renunt1' AS renunt WITH ;
		Left = 523, ;
		Name = "Renunt1", ;
		Top = 413, ;
		Imbuton1.Height = 30, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 30, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'Model.Titlufrumos2' AS titlufrumos WITH ;
		Caption = "Pasul 1 - Modelul setului de note", ;
		Height = 19, ;
		Left = 9, ;
		Name = "Titlufrumos2", ;
		Top = 15, ;
		Width = 364
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="label" />

	ADD OBJECT 'Model.Urmator1' AS urmator WITH ;
		Left = 559, ;
		Name = "Urmator1", ;
		Top = 413, ;
		Imbuton1.Height = 26, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 26, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'REPARTIZARE' AS formtermin WITH ;
		BorderStyle = 1, ;
		DoCreate = .T., ;
		Height = 450, ;
		Name = "REPARTIZARE", ;
		ShowTips = .T., ;
		Visible = .F., ;
		Width = 600, ;
		Shape1.Height = 36, ;
		Shape1.Left = 0, ;
		Shape1.Name = "Shape1", ;
		Shape1.Top = 0, ;
		Shape1.Width = 612, ;
		Terminat1.Command1.Name = "Command1", ;
		Terminat1.Imbuton1.Height = 27, ;
		Terminat1.Imbuton1.Name = "Imbuton1", ;
		Terminat1.Imbuton1.Width = 26, ;
		Terminat1.Left = 348, ;
		Terminat1.Name = "Terminat1", ;
		Terminat1.Top = 0, ;
		Terminat1.Visible = .F., ;
		TITLUFRUMOS1.Caption = "EDITAREA SETULUI DE NOTE CONTABILE", ;
		TITLUFRUMOS1.Height = 16, ;
		TITLUFRUMOS1.Left = 7, ;
		TITLUFRUMOS1.Name = "TITLUFRUMOS1", ;
		TITLUFRUMOS1.Top = -1, ;
		TITLUFRUMOS1.Width = 364
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="form" />

	ADD OBJECT 'REPARTIZARE.Lineo2' AS lineo WITH ;
		Height = 0, ;
		Left = 8, ;
		Name = "Lineo2", ;
		Top = 407, ;
		Width = 581
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'REPARTIZARE.Pageframe1' AS pageframe WITH ;
		ErasePage = .T., ;
		Height = 350, ;
		Left = 6, ;
		Name = "Pageframe1", ;
		PageCount = 4, ;
		TabStyle = 1, ;
		Top = 50, ;
		Width = 579, ;
		Page1.BackColor = 255,255,255, ;
		Page1.Caption = "Note", ;
		Page1.Name = "Page1", ;
		Page2.BackColor = 240,240,240, ;
		Page2.Caption = "Date", ;
		Page2.Name = "Page2", ;
		Page3.BackColor = 228,228,228, ;
		Page3.Caption = "Explicatii", ;
		Page3.Name = "Page3", ;
		Page4.BackColor = 214,214,214, ;
		Page4.Caption = "Sume", ;
		Page4.Name = "Page4"
		*< END OBJECT: BaseClass="pageframe" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page1.Gridb1' AS gridb WITH ;
		ColumnCount = 5, ;
		FontName = "Arial Narrow", ;
		GridLineColor = 255,255,255, ;
		GridLines = 3, ;
		Height = 260, ;
		Left = 10, ;
		Name = "Gridb1", ;
		Panel = 1, ;
		ReadOnly = .F., ;
		RecordMark = .T., ;
		RecordSource = "tnote", ;
		Top = 10, ;
		Width = 553, ;
		COLUMN1.Alignment = 2, ;
		COLUMN1.BackColor = 245,245,245, ;
		COLUMN1.ControlSource = "nr_nota", ;
		COLUMN1.DynamicBackColor = "RGB(245,245,245)", ;
		COLUMN1.FontName = "Arial Narrow", ;
		COLUMN1.HEADER1.Caption = "Nr.", ;
		COLUMN1.HEADER1.FontName = "Arial Narrow", ;
		COLUMN1.HEADER1.Name = "HEADER1", ;
		COLUMN1.Name = "COLUMN1", ;
		COLUMN1.ReadOnly = .F., ;
		COLUMN1.TEXT1.Alignment = 2, ;
		COLUMN1.TEXT1.BackColor = 245,245,245, ;
		COLUMN1.TEXT1.FontName = "Arial Narrow", ;
		COLUMN1.TEXT1.Name = "TEXT1", ;
		COLUMN1.TEXT1.ReadOnly = .F., ;
		COLUMN1.Width = 27, ;
		Column2.Alignment = 1, ;
		Column2.BackColor = 247,245,238, ;
		Column2.ControlSource = "xscd", ;
		Column2.DynamicBackColor = "RGB(247,245,238)", ;
		Column2.FontName = "Arial Narrow", ;
		Column2.Format = "XXXX.", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .F., ;
		Column2.Width = 98, ;
		Column3.Alignment = 0, ;
		Column3.BackColor = 247,245,238, ;
		Column3.ControlSource = "xASCD", ;
		Column3.DynamicBackColor = "RGB(247,245,238)", ;
		Column3.FontName = "Arial Narrow", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .F., ;
		Column3.Width = 62, ;
		Column4.Alignment = 1, ;
		Column4.BackColor = 226,226,226, ;
		Column4.ControlSource = "xscc", ;
		Column4.DynamicBackColor = "RGB(226,226,226)", ;
		Column4.FontName = "Arial Narrow", ;
		Column4.Format = "XXXX.", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .F., ;
		Column4.Width = 103, ;
		Column5.Alignment = 0, ;
		Column5.BackColor = 226,226,226, ;
		Column5.ControlSource = "xASCC", ;
		Column5.DynamicBackColor = "RGB(226,226,226)", ;
		Column5.FontName = "Arial Narrow", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .F., ;
		Column5.Width = 61
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="grid" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page1.Gridb1.Column2.Header1' AS header WITH ;
		Caption = "Simbol cont debitor", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page1.Gridb1.Column2.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 247,245,238, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page1.Gridb1.Column3.Header1' AS header WITH ;
		Caption = "Simbol analitic", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page1.Gridb1.Column3.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 247,245,238, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page1.Gridb1.Column4.Header1' AS header WITH ;
		Caption = "Simbol cont creditor ", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page1.Gridb1.Column4.Text1' AS textbox WITH ;
		Alignment = 1, ;
		BackColor = 226,226,226, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page1.Gridb1.Column5.Header1' AS header WITH ;
		Caption = "Simbol analitic", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page1.Gridb1.Column5.Text1' AS textbox WITH ;
		Alignment = 0, ;
		BackColor = 226,226,226, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page1.Nou1' AS nou WITH ;
		Left = 13, ;
		Name = "Nou1", ;
		Top = 279, ;
		Imbuton1.Height = 29, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 27, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page1.Sterge1' AS sterge WITH ;
		Left = 49, ;
		Name = "Sterge1", ;
		Top = 279, ;
		Imbuton1.Height = 26, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 26, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1' AS gridb WITH ;
		BackColor = 240,240,240, ;
		ColumnCount = 9, ;
		FontName = "Arial Narrow", ;
		GridLineColor = 255,255,255, ;
		Height = 298, ;
		Left = 11, ;
		Name = "Gridb1", ;
		Panel = 1, ;
		ReadOnly = .F., ;
		RecordMark = .T., ;
		RecordSource = "tnote", ;
		Top = 11, ;
		Width = 553, ;
		COLUMN1.BackColor = 240,240,240, ;
		COLUMN1.ControlSource = "NR_NOTA", ;
		COLUMN1.FontName = "Arial Narrow", ;
		COLUMN1.Header1.Caption = "Nr.", ;
		COLUMN1.Header1.FontName = "Arial Narrow", ;
		COLUMN1.Header1.Name = "Header1", ;
		COLUMN1.Name = "COLUMN1", ;
		COLUMN1.ReadOnly = .T., ;
		COLUMN1.Text1.BackColor = 240,240,240, ;
		COLUMN1.Text1.FontName = "Arial Narrow", ;
		COLUMN1.Text1.Name = "Text1", ;
		COLUMN1.Text1.ReadOnly = .T., ;
		COLUMN1.Width = 24, ;
		Column2.BackColor = 240,240,240, ;
		Column2.ControlSource = "x2", ;
		Column2.CurrentControl = "Combo1", ;
		Column2.FontName = "Arial Narrow", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .F., ;
		Column2.Sparse = .F., ;
		Column3.BackColor = 240,240,240, ;
		Column3.ControlSource = "x3", ;
		Column3.CurrentControl = "Combogrid1", ;
		Column3.FontName = "Arial Narrow", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .F., ;
		Column3.Sparse = .F., ;
		Column4.BackColor = 240,240,240, ;
		Column4.ControlSource = "x4", ;
		Column4.CurrentControl = "Combogrid1", ;
		Column4.FontName = "Arial Narrow", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .F., ;
		Column4.Sparse = .F., ;
		Column5.BackColor = 240,240,240, ;
		Column5.ControlSource = "x5", ;
		Column5.CurrentControl = "Combogrid1", ;
		Column5.DynamicBackColor = "iif(y5,rgb(255,255,255),rgb(240,240,240))", ;
		Column5.FontName = "Arial Narrow", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .F., ;
		Column5.Sparse = .F., ;
		Column6.BackColor = 240,240,240, ;
		Column6.ControlSource = "x6", ;
		Column6.CurrentControl = "Combogrid1", ;
		Column6.FontName = "Arial Narrow", ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .F., ;
		Column6.Sparse = .F., ;
		Column7.BackColor = 240,240,240, ;
		Column7.ControlSource = "x25", ;
		Column7.CurrentControl = "Combogrid1", ;
		Column7.DynamicBackColor = "iif(y25,rgb(255,255,255),rgb(240,240,240))", ;
		Column7.FontName = "Arial Narrow", ;
		Column7.Name = "Column7", ;
		Column7.ReadOnly = .F., ;
		Column7.Sparse = .F., ;
		Column8.BackColor = 240,240,240, ;
		Column8.ColumnOrder = 9, ;
		Column8.ControlSource = "x26", ;
		Column8.CurrentControl = "Combogrid1", ;
		Column8.DynamicBackColor = "iif(y26,rgb(255,255,255),rgb(240,240,240))", ;
		Column8.FontName = "Arial Narrow", ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .F., ;
		Column8.Sparse = .F., ;
		Column9.BackColor = 240,240,240, ;
		Column9.ColumnOrder = 8, ;
		Column9.ControlSource = "x28", ;
		Column9.CurrentControl = "Combogrid1", ;
		Column9.DynamicBackColor = "iif(y28,rgb(255,255,255),rgb(240,240,240))", ;
		Column9.FontName = "Arial Narrow", ;
		Column9.Name = "Column9", ;
		Column9.ReadOnly = .F., ;
		Column9.Sparse = .F., ;
		Column9.Width = 75
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="grid" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column2.Combo1' AS combobox WITH ;
		BorderStyle = 0, ;
		BoundColumn = 2, ;
		FontName = "Arial Narrow", ;
		Height = 24, ;
		Left = 24, ;
		Name = "Combo1", ;
		ReadOnly = .F., ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,2,-1) order by id_item into cursor c2", ;
		RowSourceType = 3, ;
		Style = 2, ;
		Top = 23, ;
		Width = 100
		*< END OBJECT: BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column2.Header1' AS header WITH ;
		Caption = "Fel document", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column2.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column3.Combogrid1' AS combogrid WITH ;
		BoundColumn = 2, ;
		Left = 44, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,3,-1) order by id_item into cursor c3", ;
		RowSourceType = 3, ;
		Top = 35
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column3.Header1' AS header WITH ;
		Caption = "Data inregistrarii", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column3.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column4.Combogrid1' AS combogrid WITH ;
		BoundColumn = 2, ;
		Left = 40, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,4,-1) order by id_item into cursor c4", ;
		RowSourceType = 3, ;
		Top = 23
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column4.Header1' AS header WITH ;
		Caption = "Data document", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column4.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column5.Combogrid1' AS combogrid WITH ;
		BoundColumn = 2, ;
		ControlSource = "x5", ;
		Left = 48, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,5,-1)  order by id_item into cursor c5", ;
		RowSourceType = 3, ;
		Top = 35
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column5.Header1' AS header WITH ;
		Caption = "Data scadenta", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column5.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column6.Combogrid1' AS combogrid WITH ;
		BoundColumn = 2, ;
		Left = 32, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,6,31,-1) order by id_item into cursor c6", ;
		RowSourceType = 3, ;
		Top = 35
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column6.Header1' AS header WITH ;
		Caption = "Nr. document", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column6.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column7.Combogrid1' AS combogrid WITH ;
		BoundColumn = 2, ;
		Left = 28, ;
		Name = "Combogrid1", ;
		ReadOnly = .F., ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,6,31,52,61,-1) order by id_item into cursor c25", ;
		RowSourceType = 3, ;
		Top = 23
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column7.Header1' AS header WITH ;
		Caption = "Nr. doc. platit", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column7.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column8.Combogrid1' AS combogrid WITH ;
		BoundColumn = 2, ;
		Left = 36, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,6,26,43,-1) order by id_item into cursor c26", ;
		RowSourceType = 3, ;
		Top = 23
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column8.Header1' AS header WITH ;
		Caption = "Nr. NIR/BON", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column8.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column9.Combogrid1' AS combobox WITH ;
		BorderStyle = 0, ;
		BoundColumn = 2, ;
		FontName = "Arial Narrow", ;
		Height = 24, ;
		Left = 43, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,6,61,60,62,-1) order by id_item into cursor c28", ;
		RowSourceType = 3, ;
		Style = 2, ;
		Top = 30, ;
		Width = 100
		*< END OBJECT: BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column9.Header1' AS header WITH ;
		Caption = "Nr. doc. incasat", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page2.Gridb1.Column9.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1' AS gridb WITH ;
		BackColor = 214,214,214, ;
		ColumnCount = 11, ;
		FontName = "Arial Narrow", ;
		GridLineColor = 255,255,255, ;
		Height = 298, ;
		Left = 10, ;
		Name = "Gridb1", ;
		Panel = 1, ;
		ReadOnly = .F., ;
		RecordMark = .T., ;
		RecordSource = "tnote", ;
		Top = 10, ;
		Width = 553, ;
		COLUMN1.BackColor = 214,214,214, ;
		COLUMN1.ControlSource = "NR_NOTA", ;
		COLUMN1.FontName = "Arial Narrow", ;
		COLUMN1.HEADER1.Caption = "Nr.", ;
		COLUMN1.HEADER1.FontName = "Arial Narrow", ;
		COLUMN1.HEADER1.Name = "HEADER1", ;
		COLUMN1.Name = "COLUMN1", ;
		COLUMN1.ReadOnly = .T., ;
		COLUMN1.TEXT1.BackColor = 214,214,214, ;
		COLUMN1.TEXT1.FontName = "Arial Narrow", ;
		COLUMN1.TEXT1.Name = "TEXT1", ;
		COLUMN1.TEXT1.ReadOnly = .T., ;
		COLUMN1.Width = 24, ;
		Column2.BackColor = 214,214,214, ;
		Column2.ControlSource = "x7", ;
		Column2.CurrentControl = "Combo1", ;
		Column2.FontName = "Arial Narrow", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .F., ;
		Column2.Sparse = .F., ;
		Column3.BackColor = 214,214,214, ;
		Column3.ControlSource = "x8", ;
		Column3.CurrentControl = "Combogrid1", ;
		Column3.FontName = "Arial Narrow", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .F., ;
		Column3.Sparse = .F., ;
		Column4.BackColor = 214,214,214, ;
		Column4.ControlSource = "x9", ;
		Column4.CurrentControl = "Combogrid1", ;
		Column4.FontName = "Arial Narrow", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .F., ;
		Column4.Sparse = .F., ;
		Column5.BackColor = 214,214,214, ;
		Column5.ControlSource = "x10", ;
		Column5.CurrentControl = "Combogrid1", ;
		Column5.DynamicBackColor = "", ;
		Column5.FontName = "Arial Narrow", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .F., ;
		Column5.Sparse = .F., ;
		Column6.BackColor = 214,214,214, ;
		Column6.ColumnOrder = 9, ;
		Column6.ControlSource = "x12", ;
		Column6.CurrentControl = "Combogrid1", ;
		Column6.FontName = "Arial Narrow", ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .F., ;
		Column6.Sparse = .F., ;
		Column7.BackColor = 214,214,214, ;
		Column7.ColumnOrder = 6, ;
		Column7.ControlSource = "x15", ;
		Column7.CurrentControl = "Combogrid1", ;
		Column7.DynamicBackColor = "", ;
		Column7.FontName = "Arial Narrow", ;
		Column7.Name = "Column7", ;
		Column7.ReadOnly = .F., ;
		Column7.Sparse = .F., ;
		Column8.BackColor = 214,214,214, ;
		Column8.ColumnOrder = 7, ;
		Column8.ControlSource = "x13", ;
		Column8.CurrentControl = "Combogrid1", ;
		Column8.DynamicBackColor = "", ;
		Column8.FontName = "Arial Narrow", ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .F., ;
		Column8.Sparse = .F., ;
		Column9.BackColor = 214,214,214, ;
		Column9.ColumnOrder = 8, ;
		Column9.ControlSource = "x14", ;
		Column9.CurrentControl = "Combogrid1", ;
		Column9.FontName = "Arial Narrow", ;
		Column9.Name = "Column9", ;
		Column9.ReadOnly = .F., ;
		Column9.Sparse = .F., ;
		Column10.BackColor = 214,214,214, ;
		Column10.ControlSource = "x16", ;
		Column10.CurrentControl = "Combogrid1", ;
		Column10.FontName = "Arial Narrow", ;
		Column10.Name = "Column10", ;
		Column10.ReadOnly = .F., ;
		Column10.Sparse = .F., ;
		Column11.BackColor = 214,214,214, ;
		Column11.ControlSource = "x27", ;
		Column11.CurrentControl = "Combogrid1", ;
		Column11.FontName = "Arial Narrow", ;
		Column11.Name = "Column11", ;
		Column11.ReadOnly = .F., ;
		Column11.Sparse = .F.
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="grid" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column10.Combogrid1' AS combogrid WITH ;
		BackColor = 214,214,214, ;
		BoundColumn = 2, ;
		Left = 24, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,16,-1) order by id_item into cursor c16", ;
		RowSourceType = 3, ;
		Top = 31
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column10.Header1' AS header WITH ;
		Caption = "Sectia", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column10.Text1' AS textbox WITH ;
		BackColor = 214,214,214, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column11.Combogrid1' AS combogrid WITH ;
		BackColor = 214,214,214, ;
		BoundColumn = 2, ;
		Left = 32, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,27,-1) order by id_item into cursor c27", ;
		RowSourceType = 3, ;
		Top = 31
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column11.Header1' AS header WITH ;
		Caption = "Cod fiscal", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column11.Text1' AS textbox WITH ;
		BackColor = 214,214,214, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column2.Combo1' AS combobox WITH ;
		BackColor = 214,214,214, ;
		BorderStyle = 0, ;
		BoundColumn = 2, ;
		FontName = "Arial Narrow", ;
		Height = 24, ;
		Left = 24, ;
		Name = "Combo1", ;
		ReadOnly = .F., ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,7,35,36,37,38,41,42,45,46,59,65,-1) order by id_item into cursor c7", ;
		RowSourceType = 3, ;
		Style = 2, ;
		Top = 23, ;
		Width = 100
		*< END OBJECT: BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column2.Header1' AS header WITH ;
		Caption = "Explicatia 1", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column2.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column3.Combogrid1' AS combogrid WITH ;
		BackColor = 214,214,214, ;
		BoundColumn = 2, ;
		FontName = "Arial Narrow", ;
		Left = 44, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,8,40,53,-1) order by id_item into cursor c8", ;
		RowSourceType = 3, ;
		Top = 35
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column3.Header1' AS header WITH ;
		Caption = "Explicatia 2", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column3.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column4.Combogrid1' AS combogrid WITH ;
		BackColor = 214,214,214, ;
		BoundColumn = 2, ;
		FontName = "Arial Narrow", ;
		Left = 40, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,9,44,47,-1) order by id_item into cursor c9", ;
		RowSourceType = 3, ;
		Top = 23
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column4.Header1' AS header WITH ;
		Caption = "Explicatia 3", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column4.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column5.Combogrid1' AS combogrid WITH ;
		BackColor = 214,214,214, ;
		BoundColumn = 2, ;
		ControlSource = "x5", ;
		FontName = "Arial Narrow", ;
		Left = 48, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,10,39,51,54,-1)  order by id_item into cursor c10", ;
		RowSourceType = 3, ;
		Top = 35
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column5.Header1' AS header WITH ;
		Caption = "Explicatia 4", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column5.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column6.Combogrid1' AS combogrid WITH ;
		BackColor = 214,214,214, ;
		BoundColumn = 2, ;
		FontName = "Arial Narrow", ;
		Left = 32, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,12,49,50,-1) order by id_item into cursor c12", ;
		RowSourceType = 3, ;
		Top = 35
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column6.Header1' AS header WITH ;
		Caption = "Explicatia 6", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column6.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column7.Combogrid1' AS combogrid WITH ;
		BackColor = 214,214,214, ;
		BoundColumn = 2, ;
		FontName = "Arial Narrow", ;
		Left = 28, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,15,-1) order by id_item into cursor c15", ;
		RowSourceType = 3, ;
		Top = 23
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column7.Header1' AS header WITH ;
		Caption = "Contract/Lucrare", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column7.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column8.Combogrid1' AS combogrid WITH ;
		BackColor = 214,214,214, ;
		BoundColumn = 2, ;
		FontName = "Arial Narrow", ;
		Left = 36, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,13,-1) order by id_item into cursor c13", ;
		RowSourceType = 3, ;
		Top = 23
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column8.Header1' AS header WITH ;
		Caption = "Responsabil", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column8.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column9.Combogrid1' AS combogrid WITH ;
		BackColor = 214,214,214, ;
		BoundColumn = 2, ;
		Left = 40, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,14,63,-1) order by id_item into cursor c14", ;
		RowSourceType = 3, ;
		Top = 31
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column9.Header1' AS header WITH ;
		Caption = "Cheltuiala", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page3.Gridb1.Column9.Text1' AS textbox WITH ;
		BackColor = 214,214,214, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1' AS gridb WITH ;
		BackColor = 192,192,192, ;
		ColumnCount = 6, ;
		FontName = "Arial Narrow", ;
		GridLineColor = 255,255,255, ;
		Height = 298, ;
		Left = 5, ;
		Name = "Gridb1", ;
		Panel = 1, ;
		ReadOnly = .F., ;
		RecordMark = .T., ;
		RecordSource = "tnote", ;
		Top = 6, ;
		Width = 553, ;
		COLUMN1.BackColor = 192,192,192, ;
		COLUMN1.ControlSource = "NR_NOTA", ;
		COLUMN1.FontName = "Arial Narrow", ;
		COLUMN1.HEADER1.Caption = "Nr.", ;
		COLUMN1.HEADER1.FontName = "Arial Narrow", ;
		COLUMN1.HEADER1.Name = "HEADER1", ;
		COLUMN1.Name = "COLUMN1", ;
		COLUMN1.ReadOnly = .T., ;
		COLUMN1.TEXT1.BackColor = 192,192,192, ;
		COLUMN1.TEXT1.FontName = "Arial Narrow", ;
		COLUMN1.TEXT1.Name = "TEXT1", ;
		COLUMN1.TEXT1.ReadOnly = .T., ;
		COLUMN1.Width = 24, ;
		Column2.BackColor = 192,192,192, ;
		Column2.ControlSource = "x21", ;
		Column2.CurrentControl = "Combo1", ;
		Column2.FontName = "Arial Narrow", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .F., ;
		Column2.Sparse = .F., ;
		Column2.Width = 94, ;
		Column3.BackColor = 192,192,192, ;
		Column3.ColumnOrder = 4, ;
		Column3.ControlSource = "x22", ;
		Column3.CurrentControl = "Combogrid1", ;
		Column3.FontName = "Arial Narrow", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .F., ;
		Column3.Sparse = .F., ;
		Column3.Width = 83, ;
		Column4.BackColor = 192,192,192, ;
		Column4.ColumnOrder = 5, ;
		Column4.ControlSource = "x23", ;
		Column4.CurrentControl = "Combogrid1", ;
		Column4.FontName = "Arial Narrow", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .F., ;
		Column4.Sparse = .F., ;
		Column5.BackColor = 192,192,192, ;
		Column5.ColumnOrder = 6, ;
		Column5.ControlSource = "x11", ;
		Column5.CurrentControl = "Combogrid1", ;
		Column5.DynamicBackColor = "", ;
		Column5.FontName = "Arial Narrow", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .F., ;
		Column5.Sparse = .F., ;
		Column5.Width = 103, ;
		Column6.BackColor = 192,192,192, ;
		Column6.ColumnOrder = 3, ;
		Column6.ControlSource = "x24", ;
		Column6.CurrentControl = "Combogrid1", ;
		Column6.FontName = "Arial Narrow", ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .F., ;
		Column6.Sparse = .F., ;
		Column6.Width = 95
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="grid" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column2.Combo1' AS combobox WITH ;
		BackColor = 192,192,192, ;
		BorderStyle = 0, ;
		BoundColumn = 2, ;
		FontName = "Arial Narrow", ;
		Height = 24, ;
		Left = 24, ;
		Name = "Combo1", ;
		ReadOnly = .F., ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,21,24,28,29,30,32,33,34,57,58,-1) order by id_item into cursor c21", ;
		RowSourceType = 3, ;
		Style = 2, ;
		Top = 23, ;
		Width = 100
		*< END OBJECT: BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column2.Header1' AS header WITH ;
		Caption = "Suma ", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column2.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column3.Combogrid1' AS combogrid WITH ;
		BackColor = 192,192,192, ;
		BoundColumn = 2, ;
		Left = 44, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,22,48,-1) order by id_item into cursor c22", ;
		RowSourceType = 3, ;
		Top = 35
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column3.Header1' AS header WITH ;
		Caption = "Suma in valuta", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column3.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column4.Combogrid1' AS combogrid WITH ;
		BackColor = 192,192,192, ;
		BoundColumn = 2, ;
		Left = 40, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,23,55,56,-1) order by id_item into cursor c23", ;
		RowSourceType = 3, ;
		Top = 23
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column4.Header1' AS header WITH ;
		Caption = "Curs valutar", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column4.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column5.Combogrid1' AS combogrid WITH ;
		BackColor = 192,192,192, ;
		BoundColumn = 2, ;
		ControlSource = "x5", ;
		Left = 48, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,11,-1)  order by id_item into cursor c11", ;
		RowSourceType = 3, ;
		Top = 35
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column5.Header1' AS header WITH ;
		Caption = "Numele valutei (Expl.5)", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column5.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column6.Combogrid1' AS combogrid WITH ;
		BackColor = 192,192,192, ;
		BoundColumn = 2, ;
		Left = 32, ;
		Name = "Combogrid1", ;
		RowSource = "select label_item,var_item from xitems where inlist(id_item,24,-1) order by id_item into cursor c24", ;
		RowSourceType = 3, ;
		Top = 35
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="combobox" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column6.Header1' AS header WITH ;
		Caption = "Suma neimpozabila", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'REPARTIZARE.Pageframe1.Page4.Gridb1.Column6.Text1' AS textbox WITH ;
		BackColor = 240,240,240, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .F.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'REPARTIZARE.Precedent1' AS precedent WITH ;
		Left = 488, ;
		Name = "Precedent1", ;
		Top = 414, ;
		Imbuton1.Height = 27, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 27, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'REPARTIZARE.Renunt1' AS renunt WITH ;
		Left = 522, ;
		Name = "Renunt1", ;
		Top = 414, ;
		Imbuton1.Height = 30, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 30, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'REPARTIZARE.Titlufrumos2' AS titlufrumos WITH ;
		Caption = "Pasul 4 - Notele contabile si repartizarea explicatiilor", ;
		Height = 19, ;
		Left = 6, ;
		Name = "Titlufrumos2", ;
		Top = 18, ;
		Width = 364
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="label" />

	ADD OBJECT 'REPARTIZARE.Urmator1' AS urmator WITH ;
		Left = 556, ;
		Name = "Urmator1", ;
		Top = 414, ;
		Imbuton1.Height = 26, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 26, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'VERIFICARE' AS formtermin WITH ;
		DoCreate = .T., ;
		Height = 450, ;
		Name = "VERIFICARE", ;
		Visible = .F., ;
		Width = 600, ;
		Shape1.Height = 36, ;
		Shape1.Left = 0, ;
		Shape1.Name = "Shape1", ;
		Shape1.Top = 0, ;
		Shape1.Width = 612, ;
		Terminat1.Command1.Name = "Command1", ;
		Terminat1.Imbuton1.Height = 27, ;
		Terminat1.Imbuton1.Name = "Imbuton1", ;
		Terminat1.Imbuton1.Width = 26, ;
		Terminat1.Left = 552, ;
		Terminat1.Name = "Terminat1", ;
		Terminat1.Top = 414, ;
		TITLUFRUMOS1.Caption = "EDITAREA SETULUI DE NOTE CONTABILE", ;
		TITLUFRUMOS1.Height = 16, ;
		TITLUFRUMOS1.Left = 7, ;
		TITLUFRUMOS1.Name = "TITLUFRUMOS1", ;
		TITLUFRUMOS1.Top = -1, ;
		TITLUFRUMOS1.Width = 364
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="form" />

	ADD OBJECT 'VERIFICARE.Edit1' AS editbox WITH ;
		ControlSource = "TVERIF.ERORI", ;
		FontName = "Comic Sans MS", ;
		Height = 348, ;
		Left = 12, ;
		Name = "Edit1", ;
		SpecialEffect = 2, ;
		Top = 48, ;
		Width = 576
		*< END OBJECT: BaseClass="editbox" />

	ADD OBJECT 'VERIFICARE.Lineo2' AS lineo WITH ;
		Height = 0, ;
		Left = 12, ;
		Name = "Lineo2", ;
		Top = 407, ;
		Width = 576
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="line" />

	ADD OBJECT 'VERIFICARE.Precedent1' AS precedent WITH ;
		Left = 481, ;
		Name = "Precedent1", ;
		Top = 414, ;
		Imbuton1.Height = 27, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 27, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'VERIFICARE.Renunt1' AS renunt WITH ;
		Left = 516, ;
		Name = "Renunt1", ;
		Top = 414, ;
		Imbuton1.Height = 30, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 30, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="container" />

	ADD OBJECT 'VERIFICARE.Titlufrumos2' AS titlufrumos WITH ;
		Caption = "Pasul 5 - Verificare", ;
		Height = 20, ;
		Left = 6, ;
		Name = "Titlufrumos2", ;
		Top = 18, ;
		Width = 364
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="label" />
	
	PROCEDURE cerere_urmatorul
		SELECT treq
		LOCATE FOR id_item=-1 OR id_item=0
		IF FOUND()
			AMESSAGEBOX('Completati elementul nou adaugat',0+48)
			RETURN
		ENDIF
		
		
		LOCAL lnRaspuns 
		lnRaspuns = AMESSAGEBOX('Se recalculeaza distribuirea explicatiilor?',4+48)
		IF THISFORMSET.e_nou
			SELECT TNOTE
			FOR I=1 TO 27
				N=ALLTRIM(STR(I))
				ZZ='REPL ALL y'+N+' WITH .F.'
				&ZZ
				* IF buton=1
				IF lnRaspuns = 6
					ZZ='REPL ALL X'+N+' WITH ""'
					&ZZ
				ENDIF
			NEXT
		
		
			SELECT treq
			SCAN FOR 'x'$LOWER(x_item)
				X=ALLTRIM(STRTRAN(x_item,'x',''))
				Vv=VAR_ITEM
				IF VAL(X)<=27
					SELECT TNOTE
					ZZ='REPLACE all y'+X+' WITH .T.'
					&ZZ
					* IF buton=1
					IF lnRaspuns = 6
						ZZ='REPLACE all X'+X+' WITH "'+Vv+'"'
						&ZZ
					ENDIF
				ENDIF
				SELECT treq
			ENDSCAN
		ENDIF
		
		&&&pregatire griduri
		SELECT TNOTE
		GO TOP
		g1=THISFORMSET.REPARTIZARE.pageframe1.page2.gridb1
		WITH g1
			.column2.READONLY=TNOTE.y2
			.column3.READONLY=TNOTE.y3
			.column4.READONLY=TNOTE.y4
			.column5.READONLY=TNOTE.y5
			.column6.READONLY=TNOTE.y6
			.column7.READONLY=TNOTE.y25
			.column8.READONLY=TNOTE.y26
		ENDWITH
		
		
		
		THISFORMSET.CERERE.VISIBLE=.F.
		THISFORMSET.REPARTIZARE.VISIBLE=.T.
		
	ENDPROC

	PROCEDURE Load
		SELECT a.nr_item,a.id_item,b.label_item,b.x_item,B.VAR_ITEM from xrequest a,xitems b ;
		WHERE a.id_item=b.id_item AND a.id_set=m.id_set;
		INTO TABLE &loc\&nfscurt\tempo\treq ORDER BY nr_item
		
		IF _tally=0
		SELECT id_item, id_item as nr_item,label_item,x_item,VAR_ITEM from xitems;
		where INLIST(id_item,2,3,4,6);
		 INTO TABLE &loc\&nfscurt\tempo\treq ORDER BY nr_item
		 SELECT treq
		 REPLACE ALL nr_item WITH RECNO()
		endif
		
		SELECT treq
		INDEX ON nr_item TAG nr_item OF &loc\&nfscurt\tempo\treq
		SET ORDER TO tag nr_item
		
		SELECT * from xnote ;
		WHERE id_set=m.id_set;
		into TABLE &loc\&nfscurt\tempo\tnote ORDER BY nr_nota
		INDEX ON nr_nota TAG nr_nota OF &loc\&nfscurt\tempo\tnote 
		SET ORDER TO tag nr_nota
		
		select nume_set,id_set,model from xsets order by nume_set into cursor cmodel
		
		CREATE TABLE &LOC\&NFSCURT\TEMPO\TVERIF (ERORI M)
		SELECT TVERIF
		APPEND BLANK
		
		
		
		STORE DATE() TO m.dataireg
	ENDPROC

	PROCEDURE model_urmatorul
		
		PARAMETERS model_ales,ids
		
		
		SET SAFETY off
		&& daca nu e model ales 
		IF ids=0
		RETURN
		ENDIF
		
		&& daca e model ales 
		
		
		&&inlocuiesc treq...cerere noua
		
		SELECT a.nr_item,a.id_item,b.label_item,b.x_item,B.VAR_ITEM from xrequest a,xitems b ;
		WHERE a.id_item=b.id_item AND a.id_set=ids;
		INTO CURSOR ttreq ORDER BY nr_item
		
		IF _tally=0
		SELECT id_item, id_item as nr_item,label_item,x_item,VAR_ITEM from xitems;
		where INLIST(id_item,2,3,4,6);
		 INTO CURSOR ttreq ORDER BY nr_item
		endif
		
		SELECT treq
		zap
		APPEND FROM DBF('ttreq')
		*REPLACE ALL id_item WITH m.id_set
		REPLACE ALL nr_item WITH RECNO()
		
		*USE IN ttreq
		
		SELECT * from xnote ;
		WHERE id_set=ids;
		into CURSOR ttnote ORDER BY nr_nota
		
		IF _tally<>0
		SELECT tnote
		zap
		APPEND FROM DBF('ttnote')
		SELECT tnote
		REPLACE ALL id_set WITH m.id_set
		endif
		
		*USE IN ttnote
		
		
	ENDPROC

	PROCEDURE terminatok
		
		&&  -> XSETS
		Select XSETS
		If Flock()
			Gather Memv
		Endif
		Unlock
		
		
		
		
		&& TNOTE -> XNOTE--------------------------------------------------------------------------------
		Select XNOTE
		Set Order To Tag IDNR
		Select TNOTE
		Scan
			Scatter FIELDS EXCEPT id_set Memv
			Select XNOTE
			If Flock()
				Seek Str(M.ID_SET)+Str(M.NR_NOTA)
				If !Found()
					Append Blank
				ENDIF
				
				Gather Memv
			Endif
			Unlock
			Select TNOTE
		Endscan
		&& CE E IN XNOTE SI NU MAI E IN TNOTE... SI TREBUIE STERS?
		Select NR_NOTA From XNOTE ;
			WHERE ID_SET=M.ID_SET And;
			NR_NOTA Not In (Select NR_NOTA From TNOTE);
			INTO Cursor STERS
		Delete From XNOTE Where ID_SET=M.ID_SET And NR_NOTA In (Select NR_NOTA From STERS)
		
		
		
		
		&& TREQ -> XREQUEST------------------------------------
		Select XREQUEST
		Set Order To Tag IDNR
		Select TREQ
		Scan
			Scatter Memv
			Select XREQUEST
			If Flock()
				Seek Str(M.ID_SET)+Str(M.NR_ITEM)
				If !Found()
					Append Blank
				Endif
				Gather Memv
			Endif
			Unlock
			Select TREQ
		Endscan
		
		&& CE E IN XREQUEST SI NU MAI E IN TREQ ... SI TREBUIE STERS?
		Select NR_ITEM From XREQUEST ;
			WHERE ID_SET=M.ID_SET And;
			NR_ITEM Not In (Select NR_ITEM From TREQ);
			INTO Cursor STERS
		Delete From XREQUEST Where ID_SET=M.ID_SET And NR_ITEM In (Select NR_ITEM From STERS)
		
		
		
		thisformset.terminat_oricum
	ENDPROC

	PROCEDURE terminat_oricum
		USE IN TREQ
		USE IN TVERIF
		USE IN TNOTE
		
		thisformset.release
	ENDPROC

	PROCEDURE verificare_totala
		
		E=CHR(13)+CHR(9)+'VERIFICARI EFECTUATE:'+CHR(13)+CHR(13)
		E=E+'1) CORESPONDENTA CONTURILOR:'+CHR(9)+'OK'+CHR(13)
		E=E+'2) REPARTIZAREA EXPLICATIILOR:'+CHR(9)+'OK'+CHR(13)
		E=E+'3) REPARTIZAREA SUMELOR:'+CHR(9)+'OK'+CHR(13)
		E=E+CHR(13)
		E=E+'FELICITARI! SETUL DE INREGISTRARI ESTE FUNCTIONAL.'
		
		
		SELECT TVERIF
		GO TOP
		REPLACE ERORI WITH E
		*brow
		
		thisformset.verifok=.T.
	ENDPROC

	PROCEDURE CERERE.Activate
		SELECT treq
		GO bott
		thisform.gridb1.Refresh
		
	ENDPROC

	PROCEDURE CERERE.Gridb1.Column2.Combo1.Valid
		SELECT xitems
		*SELECT lit
		a=id_item
		b=x_item
		c=var_item
		SELECT treq
		REPLACE id_item WITH a,x_item WITH b,var_item WITH c
	ENDPROC

	PROCEDURE CERERE.Load
		SELECT xitems
		SET ORDER TO tag label_item
	ENDPROC

	PROCEDURE CERERE.Nou1.Command1.Click
		
		
		SELECT treq
		
		*CALCULATE MAX(nr_item) TO _ii
		_ii=nr_item
		REPLACE ALL nr_item WITH nr_item+1 FOR nr_item>_ii 
		
		APPEND BLANK
		REPLACE nr_item WITH _ii+1
		
		thisform.gridb1.refresh
		thisformset.e_nou=.t.
	ENDPROC

	PROCEDURE CERERE.Precedent1.Command1.Click
		thisform.Visible=.f.
		thisformset.MODEL.Visible=.t.
		thisformset.e_nou=.f.
	ENDPROC

	PROCEDURE CERERE.Show
		LPARAMETERS nStyle
		thisform.activate
	ENDPROC

	PROCEDURE CERERE.Sterge1.Command1.Click
		SELECT treq
		DELETE
		LOCAL i
		i=1
		SELECT treq
		SCAN
		REPLACE nr_item WITH i
		i=i+1
		endscan
		thisform.gridb1.refresh
		thisformset.e_nou=.t.
	ENDPROC

	PROCEDURE CERERE.Urmator1.Command1.Click
		thisformset.CERERE_urmatorul
		
	ENDPROC

	PROCEDURE FORMTERMIN12.Init
		SELECT XSETS
		SCATTER MEMV
		
	ENDPROC

	PROCEDURE FORMTERMIN12.Precedent1.COMMAND1.Click
		thisform.Visible=.f.
		thisformset.MODEL.Visible=.t.
	ENDPROC

	PROCEDURE FORMTERMIN12.Terminat1.Command1.Click
		thisform.Visible=.f.
		thisformset.MODEL.Visible=.t.
	ENDPROC

	PROCEDURE FORMTERMIN12.Urmator1.Command1.Click
		thisform.Visible=.f.
		*thisformset.MODEL.Visible=.t.
		thisformset.cerere.Visible=.t.
	ENDPROC

	PROCEDURE Model.Activate
		thisform.Refresh
		
	ENDPROC

	PROCEDURE Model.Check1.Valid
		IF this.Value=1
			thisform.combo1.Visible=.t.
		ELSE
			thisform.combo1.Visible=.f.
		endif
	ENDPROC

	PROCEDURE Model.combo1.LostFocus
		SELECT cmodel
		SCATTER FIELDS lista_note memv
		*WAIT WINDOW m.lista_note
	ENDPROC

	PROCEDURE Model.Optiongroup1.Init
		this.Value=m.model
		
	ENDPROC

	PROCEDURE Model.Optiongroup1.Valid
		
		m.model=this.Value
		thisform.Refresh
		
		
		*SELECT cmodel
		*SET FILTER TO model=m.model
		
	ENDPROC

	PROCEDURE Model.Precedent1.Command1.Click
		thisform.Visible=.f.
		thisformset.FORMTERMIN12.Visible=.t.
		
		
	ENDPROC

	PROCEDURE Model.Refresh
		*
	ENDPROC

	PROCEDURE Model.Urmator1.Command1.Click
		
		thisformset.model_urmatorul(thisform.check1.Value,thisformset.id_setmodel)
		thisform.Visible=.f.
		
		*thisformset.CERERE.Visible=.t.
		thisformset.forMTERMIN12.Visible=.t.
		thisformset.forMTERMIN12.text_item3.Refresh
		*WAIT WINDOW m.lista_note
	ENDPROC

	PROCEDURE REPARTIZARE.Pageframe1.Page1.Activate
		this.gridb1.Refresh
		
	ENDPROC

	PROCEDURE REPARTIZARE.Pageframe1.Page1.Nou1.Command1.Click
		LOCAL mm,_ii
		
		SELECT TNOTE
		*CALCULATE MAX(nr_nota) TO mm
		_ii=nr_nota
		REPLACE ALL nr_nota WITH nr_nota+1 FOR nr_nota>_ii 
		
		APPEND BLANK
		REPLACE nr_nota WITH _ii+1
		REPLACE id_set WITH m.id_set
		THIS.PARENT.parent.GRIDB1.REFRESH
	ENDPROC

	PROCEDURE REPARTIZARE.Pageframe1.Page1.Sterge1.Command1.Click
		SELECT TNOTE
		DELETE
		
		LOCAL i
		SELECT tnote
		i=1
		SCAN
		REPLACE nr_nota WITH i
		i=i+1
		endscan
		THIS.PARENT.parent.GRIDB1.REFRESH
	ENDPROC

	PROCEDURE REPARTIZARE.Pageframe1.Page2.Activate
		this.gridb1.Refresh
		
	ENDPROC

	PROCEDURE REPARTIZARE.Pageframe1.Page3.Activate
		this.gridb1.Refresh
		
	ENDPROC

	PROCEDURE REPARTIZARE.Pageframe1.Page4.Activate
		this.gridb1.Refresh
		
	ENDPROC

	PROCEDURE REPARTIZARE.Precedent1.Command1.Click
		thisform.Visible=.f.
		thisformset.CERERE.Visible=.t.
		
		thisformset.e_nou=.f.
		
	ENDPROC

	PROCEDURE REPARTIZARE.Urmator1.Command1.Click
		thisform.Visible=.f.
		thisformset.VERIFICARE_totala
		thisformset.VERIFICARE.TERMINAT1.VISIBLE=THISFORMSET.VERIFok
		thisformset.VERIFICARE.Visible=.t.
		thisformset.VERIFICARE.edit1.refresh
	ENDPROC

	PROCEDURE VERIFICARE.Precedent1.Command1.Click
		thisform.Visible=.f.
		thisformset.REPARTIZARE.Visible=.t.
	ENDPROC

	PROCEDURE VERIFICARE.Terminat1.Command1.Click
		
		
		
		THISFORMSET.TERMINATOK
		
		
	ENDPROC

ENDDEFINE

DEFINE CLASS nou AS butoninv OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "nou"
		Imbuton1.Height = 29
		Imbuton1.Name = "Imbuton1"
		Imbuton1.Picture = ..\grafice\nou1.bmp
		Imbuton1.ToolTipText = "Adaugare"
		Imbuton1.Width = 27
		Command1.Name = "Command1"
		Command1.ToolTipText = "Adaugare"
	*</PropValue>
	
	PROCEDURE MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='NOU2.BMP'
	ENDPROC

	PROCEDURE MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='NOU1.BMP'
	ENDPROC

ENDDEFINE

DEFINE CLASS nu AS renunt OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "nu"
		Width = 50
		Imbuton1.Height = 27
		Imbuton1.Name = "Imbuton1"
		Imbuton1.Picture = ..\grafice\nu_sus.bmp
		Imbuton1.Width = 51
		Command1.Name = "Command1"
		Command1.Width = 50
	*</PropValue>
	
	PROCEDURE MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='nu_jos.BMP'
	ENDPROC

	PROCEDURE MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='nu_sus.BMP'
	ENDPROC

ENDDEFINE

DEFINE CLASS pict AS form 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Image1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Image2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Image3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Image4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Image5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Image6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Image7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Image8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Image9" UniqueID="" Timestamp="" />

	*<PropValue>
		BackColor = 255,255,255
		Caption = "Form"
		DoCreate = .T.
		Height = 66
		Left = 0
		Name = "pict"
		Top = 0
		Width = 460
	*</PropValue>

	ADD OBJECT 'Image1' AS image WITH ;
		Height = 27, ;
		Left = 24, ;
		Name = "Image1", ;
		Picture = ..\grafice\modifica2.bmp, ;
		Top = 24, ;
		Width = 30
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Image2' AS image WITH ;
		Height = 27, ;
		Left = 60, ;
		Name = "Image2", ;
		Picture = ..\grafice\nou2.bmp, ;
		Top = 24, ;
		Width = 30
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Image3' AS image WITH ;
		Height = 27, ;
		Left = 96, ;
		Name = "Image3", ;
		Picture = ..\grafice\precedent2.bmp, ;
		Top = 24, ;
		Width = 30
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Image4' AS image WITH ;
		Height = 27, ;
		Left = 132, ;
		Name = "Image4", ;
		Picture = ..\grafice\renunt2.bmp, ;
		Top = 24, ;
		Width = 30
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Image5' AS image WITH ;
		Height = 27, ;
		Left = 168, ;
		Name = "Image5", ;
		Picture = ..\grafice\sterge2.bmp, ;
		Top = 24, ;
		Width = 30
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Image6' AS image WITH ;
		Height = 27, ;
		Left = 204, ;
		Name = "Image6", ;
		Picture = ..\grafice\terminat2.bmp, ;
		Top = 24, ;
		Width = 30
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Image7' AS image WITH ;
		Height = 27, ;
		Left = 240, ;
		Name = "Image7", ;
		Picture = ..\grafice\urmator2.bmp, ;
		Top = 24, ;
		Width = 30
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Image8' AS image WITH ;
		Height = 27, ;
		Left = 276, ;
		Name = "Image8", ;
		Picture = ..\grafice\verificare2.bmp, ;
		Top = 24, ;
		Width = 30
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Image9' AS image WITH ;
		Height = 27, ;
		Left = 312, ;
		Name = "Image9", ;
		Picture = ..\grafice\modifica2.bmp, ;
		Top = 24, ;
		Width = 30
		*< END OBJECT: BaseClass="image" />

ENDDEFINE

DEFINE CLASS precedent AS butoninv OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "precedent"
		Imbuton1.Height = 27
		Imbuton1.Name = "Imbuton1"
		Imbuton1.Picture = ..\grafice\precedent1.bmp
		Imbuton1.ToolTipText = "Inapoi"
		Imbuton1.Width = 30
		Command1.Name = "Command1"
		Command1.ToolTipText = "Inapoi (ESC)"
	*</PropValue>
	
	PROCEDURE MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='precedent2.BMP'
	ENDPROC

	PROCEDURE MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='precedent1.BMP'
	ENDPROC

ENDDEFINE

DEFINE CLASS renunt AS butoninv OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "renunt"
		Imbuton1.Height = 26
		Imbuton1.Left = 0
		Imbuton1.Name = "Imbuton1"
		Imbuton1.Picture = ..\grafice\renunt1.bmp
		Imbuton1.ToolTipText = "Renuntare"
		Imbuton1.Top = 0
		Imbuton1.Width = 26
		Command1.Name = "Command1"
		Command1.ToolTipText = "Renuntare (ESC)"
	*</PropValue>
	
	PROCEDURE MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='renunt2.BMP'
	ENDPROC

	PROCEDURE MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='renunt1.BMP'
	ENDPROC

	PROCEDURE Command1.Click
		buton=2
		IF TYPE('thisformset')='O'
		thisformset.release
		ENDIF
		thisform.release
	ENDPROC

ENDDEFINE

DEFINE CLASS setbaza AS formset 
 	*< CLASSDATA: Baseclass="formset" Timestamp="" Scale="" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Form1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="FormTERMIN12" UniqueID="" Timestamp="" />

	*<PropValue>
		Name = "setbaza"
	*</PropValue>

	ADD OBJECT 'Form1' AS form WITH ;
		Caption = "Form1", ;
		DoCreate = .T., ;
		Name = "Form1"
		*< END OBJECT: BaseClass="form" />

	ADD OBJECT 'FormTERMIN12' AS formtermin WITH ;
		DoCreate = .T., ;
		Name = "FormTERMIN12", ;
		Shape1.Name = "Shape1", ;
		Terminat1.Command1.Name = "Command1", ;
		Terminat1.Imbuton1.Height = 27, ;
		Terminat1.Imbuton1.Name = "Imbuton1", ;
		Terminat1.Imbuton1.Width = 26, ;
		Terminat1.Name = "Terminat1", ;
		Titlufrumos1.Name = "Titlufrumos1"
		*< END OBJECT: ClassLib="baza.vcx" BaseClass="form" />

ENDDEFINE

DEFINE CLASS sterge AS butoninv OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "sterge"
		Imbuton1.Height = 30
		Imbuton1.Name = "Imbuton1"
		Imbuton1.Picture = ..\grafice\sterge1.bmp
		Imbuton1.ToolTipText = "Stergere"
		Imbuton1.Width = 30
		Command1.Name = "Command1"
		Command1.ToolTipText = "Stergere"
	*</PropValue>
	
	PROCEDURE MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='STERGE2.BMP'
	ENDPROC

	PROCEDURE MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='STERGE1.BMP'
	ENDPROC

ENDDEFINE

DEFINE CLASS terminat AS butoninv OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Height = 30
		Name = "terminat"
		Width = 30
		Imbuton1.BackStyle = 0
		Imbuton1.Height = 27
		Imbuton1.Name = "Imbuton1"
		Imbuton1.Picture = ..\grafice\terminat_sus_verde.bmp
		Imbuton1.Stretch = 0
		Imbuton1.ToolTipText = "Terminat"
		Imbuton1.Width = 30
		Command1.Name = "Command1"
		Command1.ToolTipText = "Terminat (CTRL+F)"
	*</PropValue>
	
	PROCEDURE MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='terminat_jos_verde.bmp'
	ENDPROC

	PROCEDURE MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='terminat_SUs_verde.bmp'
	ENDPROC

	PROCEDURE Command1.Click
		BUTON=1
		IF TYPE('thisformset')='O'
		thisformset.release
		ENDIF
		THISFORM.Release
		
	ENDPROC

	PROCEDURE Command1.MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.Parent.mouseenter
	ENDPROC

	PROCEDURE Command1.MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.Parent.mouseleave
	ENDPROC

	PROCEDURE Imbuton1.MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.Parent.mouseenter
	ENDPROC

	PROCEDURE Imbuton1.MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.Parent.mouseleave
	ENDPROC

ENDDEFINE

DEFINE CLASS text AS _frmbase OF "_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="Image1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />

	*<PropValue>
		BorderStyle = 3
		DoCreate = .T.
		Height = 91
		Name = "text"
		Width = 372
		_shape1.Name = "_shape1"
		_shape2.Height = 29
		_shape2.Left = 342
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 31
		Lb_titlu_alb_b121.Caption = ""
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT 'Image1' AS image WITH ;
		Height = 32, ;
		Left = 12, ;
		Name = "Image1", ;
		Picture = ..\grafice\exclam.ico, ;
		Top = 40, ;
		Width = 32
		*< END OBJECT: BaseClass="image" />

	ADD OBJECT 'Label2' AS label WITH ;
		Alignment = 2, ;
		BackStyle = 0, ;
		Caption = "Label2", ;
		Height = 17, ;
		Left = 60, ;
		Name = "Label2", ;
		Top = 40, ;
		Width = 299
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label3' AS label WITH ;
		Alignment = 2, ;
		BackStyle = 0, ;
		Caption = "Label3", ;
		Height = 17, ;
		Left = 60, ;
		Name = "Label3", ;
		Top = 65, ;
		Width = 299
		*< END OBJECT: BaseClass="label" />

ENDDEFINE

DEFINE CLASS text_item AS _textbox OF "_baza.vcx" 
 	*< CLASSDATA: Baseclass="textbox" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		BorderStyle = 0
		FontName = "Comic Sans MS"
		Height = 20
		Margin = 0
		Name = "text_item"
		SpecialEffect = 1
		Width = 130
	*</PropValue>

ENDDEFINE

DEFINE CLASS titlufrumos AS label 
 	*< CLASSDATA: Baseclass="label" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Alignment = 0
		AutoSize = .F.
		BackColor = 255,255,255
		BackStyle = 0
		Caption = "TITLU FRUMOS"
		FontBold = .F.
		FontName = "Comic Sans MS"
		FontSize = 10
		ForeColor = 255,255,255
		Height = 37
		Name = "titlufrumos"
		Width = 364
		WordWrap = .T.
	*</PropValue>

ENDDEFINE

DEFINE CLASS urmator AS butoninv OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "urmator"
		Imbuton1.Height = 27
		Imbuton1.Name = "Imbuton1"
		Imbuton1.Picture = ..\grafice\urmator1.bmp
		Imbuton1.ToolTipText = "Continuare/Inainte"
		Imbuton1.Width = 30
		Command1.Name = "Command1"
		Command1.ToolTipText = "Continuare/Inainte (CTRL+F)"
	*</PropValue>
	
	PROCEDURE MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='urmator2.BMP'
	ENDPROC

	PROCEDURE MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='urmator1.BMP'
	ENDPROC

ENDDEFINE

DEFINE CLASS verif AS butoninv OF "baza.vcx" 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "verif"
		Imbuton1.Height = 27
		Imbuton1.Name = "Imbuton1"
		Imbuton1.Picture = ..\grafice\verificare1.bmp
		Imbuton1.ToolTipText = "Verificare"
		Imbuton1.Width = 30
		Command1.Name = "Command1"
		Command1.ToolTipText = "Verificare (CTRL+F)"
	*</PropValue>
	
	PROCEDURE MouseEnter
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='verificare2.BMP'
	ENDPROC

	PROCEDURE MouseLeave
		LPARAMETERS nButton, nShift, nXCoord, nYCoord
		this.imbuton1.picture='verificare1.BMP'
	ENDPROC

ENDDEFINE
