label
This commit is contained in:
@@ -20,7 +20,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
|
|
||||||
CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyecto, "")
|
CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyectoBancos, "")
|
||||||
CargarCentrosDeCosto(Nothing, DdlsubProyectoVentas, Nothing, LblSubProyectoVentas, "")
|
CargarCentrosDeCosto(Nothing, DdlsubProyectoVentas, Nothing, LblSubProyectoVentas, "")
|
||||||
CargarCentrosDeCosto(Nothing, DdlSubProyectoCompras, Nothing, LblSubProyectoCompras, "")
|
CargarCentrosDeCosto(Nothing, DdlSubProyectoCompras, Nothing, LblSubProyectoCompras, "")
|
||||||
CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales, "")
|
CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales, "")
|
||||||
@@ -342,31 +342,31 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
Dim CveConconceptoCliente As Integer = 203
|
Dim CveConconceptoCliente As Integer = 203
|
||||||
|
|
||||||
'saco las cuentas de pérdida y ganancia
|
'saco las cuentas de pérdida y ganancia
|
||||||
For Each gvr As GridViewRow In GvVentas.Rows
|
For Each gvr As GridViewRow In GvVentas.Rows
|
||||||
Total = -gvr.DataKey("Fluctuacion").ToDecimal
|
Total = -gvr.DataKey("Fluctuacion").ToDecimal
|
||||||
|
|
||||||
If gvr.DataKey("CveIE").ToEntero > 0 AndAlso gvr.DataKey("CveVenta").ToEntero < 0 Then
|
|
||||||
CveConconceptoCliente = 226
|
|
||||||
Else
|
|
||||||
CveConconceptoCliente = 203
|
|
||||||
End If
|
|
||||||
|
|
||||||
'movimiento de complementaria
|
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), CveConconceptoCliente, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria, CveIE:=gvr.DataKey("CveIE").ToEntero) Then
|
|
||||||
ErrorRegistrar = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
If Not ErrorRegistrar Then
|
|
||||||
Conta.Commit()
|
|
||||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
|
||||||
|
|
||||||
|
If gvr.DataKey("CveIE").ToEntero > 0 AndAlso gvr.DataKey("CveVenta").ToEntero < 0 Then
|
||||||
|
CveConconceptoCliente = 226
|
||||||
Else
|
Else
|
||||||
Conta.RollBack()
|
CveConconceptoCliente = 203
|
||||||
End If
|
End If
|
||||||
Conta.Dispose()
|
|
||||||
|
'movimiento de complementaria
|
||||||
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), CveConconceptoCliente, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria, CveIE:=gvr.DataKey("CveIE").ToEntero) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If Not ErrorRegistrar Then
|
||||||
|
Conta.Commit()
|
||||||
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
|
Else
|
||||||
|
Conta.RollBack()
|
||||||
|
End If
|
||||||
|
Conta.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
Reference in New Issue
Block a user