*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="oconversii.vcx" CPID="1250" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS frm_conversie_conturi AS _frmbase OF "..\comun\clase\_frm_base.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="grdConturi" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdConturi.cExplicatie.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdConturi.cExplicatie.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdConturi.cContVechi.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdConturi.cContVechi.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdConturi.cAcontVechi.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdConturi.cAcontVechi.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdConturi.cContNou.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdConturi.cContNou.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdConturi.cAcontNou.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdConturi.cAcontNou.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdConturi.cSeAplica.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdConturi.cSeAplica.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="grdConturi.cSeAplica.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="BUT_RENUNT1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: adaugare
		*m: log
		*m: modificare
		*m: modificare_cont_balanta
		*m: modificare_cont_plan
		*m: stergere
		*p: cacontnou
		*p: cacontvechi
		*p: ccontnou
		*p: ccontvechi
		*p: cconversie
		*p: csubiectconversie
		*p: lseaplica
		*p: nid
		*p: nseaplica
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		cacontnou = 
		cacontvechi = 
		ccontnou = 
		ccontvechi = 
		cconversie = 
		csubiectconversie = 
		DoCreate = .T.
		Height = 521
		lseaplica = .F.
		Name = "frm_conversie_conturi"
		nid = 0
		nseaplica = 0
		Width = 599
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 600
		_shape2.Height = 29
		_shape2.Left = 606
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 24
		Lb_titlu_alb_b121.Caption = "Configurare conturi"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 7
		BUT_TERMIN1.Left = 568
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 2
		BUT_TERMIN1.Top = 1
		Gridsort1.Left = 9
		Gridsort1.Name = "Gridsort1"
		Gridsort1.Top = 27
	*</PropValue>

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Left = 477, ;
		Name = "But_modifica1", ;
		TabIndex = 5, ;
		Top = 1
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Left = 447, ;
		Name = "But_nou1", ;
		TabIndex = 6, ;
		Top = 2
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'BUT_RENUNT1' AS but_renunt WITH ;
		Left = 537, ;
		Name = "BUT_RENUNT1", ;
		TabIndex = 3, ;
		Top = 1
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Left = 507, ;
		Name = "But_sterge1", ;
		TabIndex = 4, ;
		Top = 1
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'grdConturi' AS _grdbase WITH ;
		ColumnCount = 6, ;
		DeleteMark = .F., ;
		Height = 477, ;
		HighlightStyle = 2, ;
		Left = 8, ;
		Name = "grdConturi", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "crsConversieConturi", ;
		TabIndex = 1, ;
		Top = 37, ;
		Width = 581, ;
		Column1.ControlSource = "explicatie", ;
		Column1.Name = "cExplicatie", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 233, ;
		Column2.ControlSource = "cont_vechi", ;
		Column2.Name = "cContVechi", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 61, ;
		Column3.ControlSource = "acont_vechi", ;
		Column3.Name = "cAcontVechi", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 74, ;
		Column4.ControlSource = "cont_nou", ;
		Column4.Name = "cContNou", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 58, ;
		Column5.ControlSource = "acont_nou", ;
		Column5.Name = "cAcontNou", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 67, ;
		Column6.ControlSource = "se_aplica", ;
		Column6.CurrentControl = "Check1", ;
		Column6.Name = "cSeAplica", ;
		Column6.ReadOnly = .T., ;
		Column6.Sparse = .F., ;
		Column6.Width = 52
		*< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT 'grdConturi.cAcontNou.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Analitic nou", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grdConturi.cAcontNou.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 'grdConturi.cAcontVechi.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Analitic vechi", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grdConturi.cAcontVechi.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 'grdConturi.cContNou.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont nou", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grdConturi.cContNou.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 'grdConturi.cContVechi.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cont vechi", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grdConturi.cContVechi.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 'grdConturi.cExplicatie.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Explicatie", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grdConturi.cExplicatie.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 'grdConturi.cSeAplica.Check1' AS checkbox WITH ;
		Alignment = 2, ;
		BackColor = 255,255,255, ;
		Caption = "", ;
		Height = 17, ;
		Left = 29, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 35, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'grdConturi.cSeAplica.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Se aplica", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'grdConturi.cSeAplica.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE adaugare
		LPARAMETERS toRec
		
		INSERT INTO crsConversieConturi FROM NAME toRec
		
		this.grdConturi.SetFocus()
			
	ENDPROC

	PROCEDURE do_adauga
		PRIVATE pnId
		pnId = 0
		
		PRIVATE poRec
		SELECT crsConversieConturi
		SCATTER NAME poRec BLANK
		poRec.tip_sold = "A"
		poRec.conversie = this.cConversie
		poRec.se_aplica = 1
		loFrmModifica= CREATEOBJECT("frm_conversie_conturi_nou")
		loFrmModifica.show(1)
		IF gnButon = 1
			lcSql = [BEGIN pack_conversie.adauga_cont(?@poRec.id, ?ALLTRIM(poRec.cont_vechi), ?ALLTRIM(poRec.acont_vechi), ?ALLTRIM(poRec.cont_nou), ?ALLTRIM(poRec.acont_nou), ?ALLTRIM(poRec.tip_sold), ?ALLTRIM(porec.explicatie), ?poRec.se_aplica, ?poRec.conversie); END;]
			lnSucces = goExecutor.oExecute(lcSql)
			IF lnSucces < 0
				AMESSAGEBOX(goExecutor.cEroare,0+16, 'Eroare')
			ELSE
				this.adaugare(poRec)
			ENDIF 	
		ENDIF 	
	ENDPROC

	PROCEDURE do_modifica
		IF RECCOUNT('crsConversieConturi') = 0
			RETURN 
		ENDIF 
		
		PRIVATE poRec
		SELECT crsConversieConturi
		SCATTER NAME poRec
		loFrmModifica= CREATEOBJECT("frm_conversie_conturi_nou")
		loFrmModifica.show(1)
		
		IF gnButon = 1
			lcSql = [BEGIN pack_conversie.modifica_cont(?poRec.id, ?ALLTRIM(poRec.cont_vechi), ?ALLTRIM(poRec.acont_vechi), ?ALLTRIM(poRec.cont_nou), ?ALLTRIM(poRec.acont_nou), ?ALLTRIM(poRec.tip_sold), ?ALLTRIM(porec.explicatie), ?poRec.se_aplica, ] + [?ALLTRIM(UPPER(poRec.conversie))); END;]
			lnSucces = goExecutor.oExecute(lcSql)
			IF lnSucces < 0
				AMESSAGEBOX(goExecutor.cEroare,0+16, 'Eroare')
			ELSE
				this.modificare(poRec)
			ENDIF 	
		ENDIF 	
	ENDPROC

	PROCEDURE do_sterge
		PRIVATE poRec
		SELECT crsConversieConturi
		SCATTER NAME poRec
		
		IF AMESSAGEBOX('Doriti sa stergeti conversia ' + NVL(poRec.cont_vechi,'') + '.' + NVL(poRec.acont_vechi,'') + ' in ' + NVL(poRec.cont_nou,'') + '.' + NVL(poRec.acont_nou,'') + '?',4+32,'Sterge') = 6
			lcSql = [BEGIN pack_conversie.sterge_cont(?poRec.id); END;]
			lnSucces = goExecutor.oExecute(lcSql)
			IF lnSucces < 0
				AMESSAGEBOX(goExecutor.cEroare,0+16, 'Eroare')
			ELSE
				this.stergere(poRec)
			ENDIF 	
		ENDIF 	
		
		this.grdConturi.SetFocus()
	ENDPROC

	PROCEDURE log
		LPARAMETERS tctabela,tnId
		
		IF EMPTY(tnId)
			tnId = 0
		ENDIF 	
		lcId = ALLTRIM(STR(tnId))
		lctabela = UPPER(ALLTRIM(NVL(tctabela,'')))
		PRIVATE polog,pcschema1,pcselect1
		STORE '' TO polog
		pcschema1 = ['']
		pcselect1=['select * from ] + gcS + [.vlog where ']
		pcorder1=['dataora']
		pcfiltru1 = [tabel = '] + lctabela + ['] + IIF(!EMPTY(tnId), [ and id_tabel = ] + lcId , '')
		gencursor('polog','v_log',pcselect1,pcfiltru1,pcschema1,pcorder1)
		polog.ca_baza1.afisare()
		ofrmlog=CREATEOBJECT('frm_log')
		ofrmlog.show(1)
		RELEASE polog
	ENDPROC

	PROCEDURE modificare
		LPARAMETERS toRec
		
		SELECT crsConversieConturi
		GATHER NAME toRec
		
		this.grdConturi.SetFocus()
		
			
		
	ENDPROC

	PROCEDURE modificare_cont_balanta
	ENDPROC

	PROCEDURE modificare_cont_plan
	ENDPROC

	PROCEDURE stergere
		LPARAMETERS toRec
		SELECT crsConversieConturi
		DELETE &&FOR ID  = toRec.id
		LOCATE 
		this.grdConturi.SetFocus()
	ENDPROC

	PROCEDURE grdConturi.cContNou.Text1.Valid
		LOCAL lnSucces, lcContNou
		lnSucces = 1
		lcContNou = ALLTRIM(crsConversieConturi.cont_Nou)
		IF  lcContNou <> thisform.cContNou
			IF AMESSAGEBOX('Doriti sa salvati?',4+32,'Modificare') = 6
				lnSucces = thisform.modificare("cont_Nou",thisform.nId, lcContNou)	
			ELSE
				lnSucces = -1
			ENDIF 	
		ENDIF 	
		
		IF lnSucces = -1
			REPLACE cont_Nou WITH thisform.cContNou IN crsConversieConturi	
		ENDIF 	
	ENDPROC

	PROCEDURE grdConturi.cContNou.Text1.When
		thisform.nId = crsConversieConturi.id
		thisform.cContNou = crsConversieConturi.cont_nou
	ENDPROC

	PROCEDURE grdConturi.cContVechi.Text1.Valid
		LOCAL lnSucces, lcContNou
		lnSucces = 1
		lcContNou = ALLTRIM(crsConversieConturi.cont_Nou)
		IF  lcContNou <> thisform.cContNou
			IF AMESSAGEBOX('Doriti sa salvati?',4+32,'Modificare') = 6
				lnSucces = thisform.modificare("cont_Nou",thisform.nId, lcContNou)	
			ELSE
				lnSucces = -1
			ENDIF 	
		ENDIF 	
		
		IF lnSucces = -1
			REPLACE cont_Nou WITH thisform.cContNou IN crsConversieConturi	
		ENDIF 	
	ENDPROC

	PROCEDURE grdConturi.cContVechi.Text1.When
		thisform.nId = crsConversieConturi.id
		thisform.cContNou = crsConversieConturi.cont_Nou
	ENDPROC

	PROCEDURE grdConturi.cExplicatie.Text1.DblClick
		thisform.log("CONVERSIE_CONTURI",crsConversieConturi.id)
	ENDPROC

	PROCEDURE grdConturi.cSeAplica.Check1.When
		thisform.nId = crsConversieConturi.id
		thisform.nSeAplica = crsConversieConturi.se_aplica
	ENDPROC

	PROCEDURE grdConturi.DblClick
		thisform.log("CONVERSIE_CONTURI")
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_conversie_conturi_nou AS _frmbase OF "..\comun\clase\_frm_base.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="clb_explicatie" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_contvechi" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_contnou" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_acontvechi" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_acontnou" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="chk_seaplica" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="clb_tipcont" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="BUT_RENUNT1" UniqueID="" Timestamp="" />

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 176
		Name = "frm_conversie_conturi_nou"
		Width = 375
		_shape1.Name = "_shape1"
		_shape2.Height = 29
		_shape2.Left = 372
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 2
		Lb_titlu_alb_b121.Caption = "Conversie conturi"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 10
		BUT_TERMIN1.Left = 345
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 8
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT 'BUT_RENUNT1' AS but_renunt WITH ;
		Left = 315, ;
		Name = "BUT_RENUNT1", ;
		TabIndex = 9, ;
		Top = 1
		*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'chk_seaplica' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Se aplica", ;
		ControlSource = "poRec.se_aplica", ;
		Left = 9, ;
		Name = "chk_seaplica", ;
		TabIndex = 7, ;
		Top = 154
		*< END OBJECT: ClassLib="..\comun\clase\_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'clb_acontnou' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 135, ;
		Name = "clb_acontnou", ;
		TabIndex = 4, ;
		Top = 64, ;
		Width = 142, ;
		TEXT_SIMPLU1.ControlSource = "poRec.acont_nou", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 83, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 55, ;
		LB_SIMPLU1.Caption = "Analitic nou", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_acontvechi' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 135, ;
		Name = "clb_acontvechi", ;
		TabIndex = 2, ;
		Top = 36, ;
		Width = 142, ;
		TEXT_SIMPLU1.ControlSource = "poRec.acont_vechi", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 83, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 55, ;
		LB_SIMPLU1.Caption = "Analitic vechi", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_contnou' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 6, ;
		Name = "clb_contnou", ;
		TabIndex = 3, ;
		Top = 64, ;
		Width = 130, ;
		TEXT_SIMPLU1.ControlSource = "poRec.cont_nou", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 71, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 55, ;
		LB_SIMPLU1.Caption = "Cont nou", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_contvechi' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 6, ;
		Name = "clb_contvechi", ;
		TabIndex = 1, ;
		Top = 36, ;
		Width = 130, ;
		TEXT_SIMPLU1.ControlSource = "poRec.cont_vechi", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 71, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 55, ;
		LB_SIMPLU1.Caption = "Cont vechi", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_explicatie' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 6, ;
		Name = "clb_explicatie", ;
		TabIndex = 5, ;
		Top = 92, ;
		Width = 360, ;
		TEXT_SIMPLU1.ControlSource = "poRec.explicatie", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 70, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 286, ;
		LB_SIMPLU1.Caption = "Explicatie", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'clb_tipcont' AS cb_tx_simplu WITH ;
		Height = 29, ;
		Left = 6, ;
		Name = "clb_tipcont", ;
		TabIndex = 6, ;
		Top = 120, ;
		Width = 271, ;
		_CBBASE1.ControlSource = "poRec.tip_sold", ;
		_CBBASE1.Height = 23, ;
		_CBBASE1.Left = 170, ;
		_CBBASE1.Name = "_CBBASE1", ;
		_CBBASE1.RowSource = "A,P,B", ;
		_CBBASE1.RowSourceType = 1, ;
		_CBBASE1.Top = 3, ;
		_CBBASE1.Width = 99, ;
		_LBBASE1.Caption = "Tip cont nou", ;
		_LBBASE1.Name = "_LBBASE1"
		*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />
	
	PROCEDURE inainte_de_do_termin
		DO CASE 
			CASE (EMPTY(poRec.cont_vechi) OR ISNULL(poRec.cont_vechi)) AND (EMPTY(poRec.cont_nou) OR ISNULL(poRec.cont_nou))
				AMESSAGEBOX('Completati contul nou',0+48,'Atentie')
				THIS.clb_contnou.teXT_SIMPLU1.SetFocus()
				RETURN .F.
			CASE EMPTY(poRec.cont_nou) OR ISNULL(poRec.cont_nou)
				AMESSAGEBOX('Completati contul nou',0+48,'Atentie')
				THIS.clb_contnou.teXT_SIMPLU1.SetFocus()
				RETURN .F.	
			CASE EMPTY(poRec.explicatie) OR ISNULL(poRec.explicatie)
				AMESSAGEBOX('Completati explicatia',0+48,'Atentie')
				THIS.clb_explicatie.teXT_SIMPLU1.SetFocus()
				RETURN .F.			
		ENDCASE  
	ENDPROC

	PROCEDURE clb_tipcont._CBBASE1.Init
		DO CASE 
			CASE porec.tip_sold = "A"
				this.Value = "A"
			CASE porec.tip_sold = "P"
				this.Value = "P"
			CASE porec.tip_sold = "B"
				this.Value = "B"
			OTHERWISE 
				**nada..
		ENDCASE 
	ENDPROC

	PROCEDURE clb_tipcont._CBBASE1.LostFocus
		DO CASE 
			CASE this.Value = "Activ"
				porec.tip_sold = "A"
			CASE this.Value = "Pasiv"
				porec.tip_sold = "P"
			CASE this.Value = "Bifunctional"
				porec.tip_sold = "B"
		ENDCASE 
	ENDPROC

	PROCEDURE clb_tipcont._CBBASE1.Valid
		DO CASE 
			CASE this.Value = "A"
				porec.tip_sold = "A"
			CASE this.Value = "P"
				porec.tip_sold = "P"
			CASE this.Value = "B"
				porec.tip_sold = "B"
		ENDCASE 
	ENDPROC

ENDDEFINE
