-- option strict on

This commit is contained in:
2023-08-23 00:03:55 -07:00
parent 7ee978059d
commit 3bc4f72658
23 changed files with 212 additions and 257 deletions

View File

@@ -36,7 +36,7 @@ Partial Class Compras_CatEstatusFactura
Alert("El Nuevo Estatus de Factura se guardó correctamente.", TipoMensaje.MsgInformacion) Alert("El Nuevo Estatus de Factura se guardó correctamente.", TipoMensaje.MsgInformacion)
End If End If
ElseIf HdnModalidad.Value = "U" Then ElseIf HdnModalidad.Value = "U" Then
If ObjEstatusFactura.UpdateEstatusFactura(TxtEstatus.Text, ChkEstatus.Checked, HdnID.Value) Then If ObjEstatusFactura.UpdateEstatusFactura(TxtEstatus.Text, ChkEstatus.Checked, HdnID.Value.ToEntero) Then
GlobalDTCompEstatusFactura = ObjEstatusFactura.DtResultados GlobalDTCompEstatusFactura = ObjEstatusFactura.DtResultados
Alert("El Nuevo Estatus de Factura se Actualizó correctamente.", TipoMensaje.MsgInformacion) Alert("El Nuevo Estatus de Factura se Actualizó correctamente.", TipoMensaje.MsgInformacion)
TxtClave.Text = "" TxtClave.Text = ""

View File

@@ -63,7 +63,7 @@ Partial Class Comp_CatPaqueteriasGuiasTipo
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
TxtPaqueteria.Text = GvRow.DataKey("PaqueteriaGuiaTipo") TxtPaqueteria.Text = GvRow.DataKey("PaqueteriaGuiaTipo")
CvePaqueteriaGuiaTipo = GvRow.DataKey("CvePaqueteriaGuiaTipo") CvePaqueteriaGuiaTipo = GvRow.DataKey("CvePaqueteriaGuiaTipo").toentero
UpModalTiposD.Update() UpModalTiposD.Update()
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD")) RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"))

View File

@@ -14959,10 +14959,8 @@ Partial Class Compras_Compras
GVServicios.Visible = False GVServicios.Visible = False
End If End If
If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.CvePlataforma <> 2 Then If UsuarioActual.Empresa.Funcionalidad(155) <> "" Then LnkFletesImportaciones.Visible = True ' FNC Importaciones
'liServicios.Visible = True If UsuarioActual.Empresa.Funcionalidad(158) <> "" Then LnkFletesImportaciones.Visible = True ' FNC Indirectos
liFletesImportaciones.Visible = True
End If
End Sub End Sub
@@ -15877,22 +15875,22 @@ Partial Class Compras_Compras
Private Sub CargaFletes() Private Sub CargaFletes()
If UsuarioActual.CveEmpresa <> 125 Or CveCompra > 0 Then 'If UsuarioActual.CveEmpresa <> 125 Or CveCompra > 0 Then
Exit Sub ' Exit Sub
End If 'End If
HLModalFletes.Visible = True 'HLModalFletes.Visible = True
Dim ObjVentas As New ClsVentas 'Dim ObjVentas As New ClsVentas
If ObjVentas.GetFletes(UsuarioActual.CveEmpresa) Then 'If ObjVentas.GetFletes(UsuarioActual.CveEmpresa) Then
GVFletes.DataSource = ObjVentas.DtResultados ' GVFletes.DataSource = ObjVentas.DtResultados
GVFletes.DataBind() ' GVFletes.DataBind()
End If 'End If
UpFletes.Update() 'UpFletes.Update()
ObjVentas.Dispose() 'ObjVentas.Dispose()
End Sub End Sub

View File

@@ -83,7 +83,7 @@ Partial Class Compras_RepCxP
End Set End Set
End Property End Property
Private Property TCEspecifico As Double Private Property TCEspecifico As Decimal
#End Region #End Region
@@ -197,8 +197,8 @@ Partial Class Compras_RepCxP
End Sub End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
If RblTipoCambio.SelectedValue = 3 And TxtEspecifico.Text <> "" Then If RblTipoCambio.SelectedValue = "3" And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text TCEspecifico = TxtEspecifico.Text.ToDecimal
Else Else
TCEspecifico = -1 TCEspecifico = -1
End If End If
@@ -214,7 +214,7 @@ Partial Class Compras_RepCxP
If txtFechaF.Text = "" Then FechaF = "-1" If txtFechaF.Text = "" Then FechaF = "-1"
If txtFechaVI.Text = "" Then FechaVI = "-1" If txtFechaVI.Text = "" Then FechaVI = "-1"
If txtFechaVF.Text = "" Then FechaVF = "-1" If txtFechaVF.Text = "" Then FechaVF = "-1"
Dim TipoAgrupacion As Integer = IIf(chkAgruparMes.Checked, 1, -1) Dim TipoAgrupacion As Integer = If(chkAgruparMes.Checked, 1, -1)
Dim CveProyecto As Integer = -1 Dim CveProyecto As Integer = -1
If DdlProyecto.Visible Then If DdlProyecto.Visible Then
@@ -223,7 +223,7 @@ Partial Class Compras_RepCxP
Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM) Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
If Mov.GetCxP(FechaI, FechaF, DdlProveedor.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero(), DdlUsuarioResponsable.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlEstatusCompra.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, If Mov.GetCxP(FechaI, FechaF, DdlProveedor.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero(), DdlUsuarioResponsable.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlEstatusCompra.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero,
DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=IIf(DdlTipoProveedor.SelectedValue.ToEntero = 3, -1, DdlTipoProveedor.SelectedValue.ToEntero), Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=If(DdlTipoProveedor.SelectedValue.ToEntero = 3, -1, DdlTipoProveedor.SelectedValue.ToEntero), Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero,
TipoDocto:=TipoDocto, TipoAgrupacion:=TipoAgrupacion, CveProyecto:=CveProyecto) Then TipoDocto:=TipoDocto, TipoAgrupacion:=TipoAgrupacion, CveProyecto:=CveProyecto) Then
GvCxP.DataSource = Mov.DtResultados GvCxP.DataSource = Mov.DtResultados
DtDatos = Mov.DtResultados DtDatos = Mov.DtResultados
@@ -1082,10 +1082,10 @@ Partial Class Compras_RepCxP
If txtFechaF.Text = "" Then FechaF = "-1" If txtFechaF.Text = "" Then FechaF = "-1"
If txtFechaVI.Text = "" Then FechaVI = "-1" If txtFechaVI.Text = "" Then FechaVI = "-1"
If txtFechaVF.Text = "" Then FechaVF = "-1" If txtFechaVF.Text = "" Then FechaVF = "-1"
Dim TipoAgrupacion As Integer = IIf(chkAgruparMes.Checked, 1, -1) Dim TipoAgrupacion As Integer = If(chkAgruparMes.Checked, 1, -1)
Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM) Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM)
If Mov.GetCxP(FechaI, FechaF, DdlProveedor.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, -1, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlEstatusCompra.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, If Mov.GetCxP(FechaI, FechaF, DdlProveedor.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, -1, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlEstatusCompra.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero,
DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=IIf(DdlTipoProveedor.SelectedValue.ToEntero = 3, -1, DdlTipoProveedor.SelectedValue.ToEntero), Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=If(DdlTipoProveedor.SelectedValue.ToEntero = 3, -1, DdlTipoProveedor.SelectedValue.ToEntero), Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero,
TipoDocto:=TipoDocto, TipoAgrupacion:=TipoAgrupacion) Then TipoDocto:=TipoDocto, TipoAgrupacion:=TipoAgrupacion) Then
End If End If
@@ -1109,16 +1109,15 @@ Partial Class Compras_RepCxP
Mes(10) = monthNames(Dr("NomMes11").ToString.ToDate.Month) Mes(10) = monthNames(Dr("NomMes11").ToString.ToDate.Month)
Mes(11) = monthNames(Dr("NomMes12").ToString.ToDate.Month) Mes(11) = monthNames(Dr("NomMes12").ToString.ToDate.Month)
Mes(12) = "12+" Mes(12) = "12+"
If RblTipoCambio.SelectedValue = 3 And TxtEspecifico.Text <> "" Then If RblTipoCambio.SelectedValue = "3" And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text TCEspecifico = TxtEspecifico.Text.ToDecimal
Else Else
TCEspecifico = -1 TCEspecifico = -1
End If End If
Dim DtExcel As DataTable Dim DtExcel As DataTable
If chkAgruparMes.Checked Then If chkAgruparMes.Checked Then
DtExcel = (From row As DataRow In Mov.DtResultados.Rows DtExcel = (From row As DataRow In Mov.DtResultados.AsEnumerable
Select New With Select New With
{ {
.GPO = row.Item("GPO"), .GPO = row.Item("GPO"),
@@ -1440,8 +1439,8 @@ Partial Class Compras_RepCxP
If txtFechaVI.Text = "" Then FechaVencimientoI = "-1" If txtFechaVI.Text = "" Then FechaVencimientoI = "-1"
If txtFechaVF.Text = "" Then FechaVencimientoF = "-1" If txtFechaVF.Text = "" Then FechaVencimientoF = "-1"
If RblTipoCambio.SelectedValue = 3 And TxtEspecifico.Text <> "" Then If RblTipoCambio.SelectedValue = "3" And TxtEspecifico.Text <> "" Then
TCEspecifico = TxtEspecifico.Text TCEspecifico = TxtEspecifico.Text.ToDecimal
Else Else
TCEspecifico = -1 TCEspecifico = -1
End If End If
@@ -1503,7 +1502,7 @@ Partial Class Compras_RepCxP
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("Grupo", DdlGrupo.SelectedItem.Text)) params.Add(New ReportParameter("Grupo", DdlGrupo.SelectedItem.Text))
params.Add(New ReportParameter("AgrupadoPor", $"{Grupo}{Proveedor}{Clasificacion}{FechaIn}{FechaFn}{Registro}{Responsable}{Proyecto}{Sucursal}{TipoMoneda}{FVI}{FVF}")) params.Add(New ReportParameter("AgrupadoPor", $"{Grupo}{Proveedor}{Clasificacion}{FechaIn}{FechaFn}{Registro}{Responsable}{Proyecto}{Sucursal}{TipoMoneda}{FVI}{FVF}"))
params.Add(New ReportParameter("CantColumnas", CantidadColumnas)) params.Add(New ReportParameter("CantColumnas", CantidadColumnas.ToString))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
ImprimirPDF("Empresas/Grales/Formatos/RepCxP.rdlc", DtDatos, params, "ReporteCxP", Formato) ImprimirPDF("Empresas/Grales/Formatos/RepCxP.rdlc", DtDatos, params, "ReporteCxP", Formato)
@@ -1517,11 +1516,11 @@ Partial Class Compras_RepCxP
#Region "TIPO DE CAMBIO" #Region "TIPO DE CAMBIO"
Private Sub DdlTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged Private Sub DdlTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
If RblTipoCambio.SelectedValue = 3 Then If RblTipoCambio.SelectedValue = "3" Then
Dim TipoCambio As Double Dim TipoCambio As Double
LiEspecifico.Visible = True LiEspecifico.Visible = True
TipoCambio = GlobalTipoCambio(Now) TipoCambio = GlobalTipoCambio(Now)
TxtEspecifico.Text = TipoCambio TxtEspecifico.Text = TipoCambio.ToString
Else Else
LiEspecifico.Visible = False LiEspecifico.Visible = False
End If End If

View File

@@ -226,7 +226,7 @@ Partial Class RepCxPDetalle
CargaProveedores() CargaProveedores()
Dim CveProveedor As Integer = IfNull(Request("CveProveedor"), -1).ToString.ToEntero Dim CveProveedor As Integer = IfNull(Request("CveProveedor"), -1).ToString.ToEntero
DdlProveedores.SelectedValue = CveProveedor DdlProveedores.SelectedValue = CveProveedor.ToString
Me.CveProveedor = CveProveedor Me.CveProveedor = CveProveedor
If DdlProveedores.SelectedValue.ToEntero > 0 Then If DdlProveedores.SelectedValue.ToEntero > 0 Then
@@ -367,8 +367,8 @@ Partial Class RepCxPDetalle
If ObjMovtos.GetCxPDetalle(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, CveProveedorSucursal, CveUsuario, If ObjMovtos.GetCxPDetalle(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, CveProveedorSucursal, CveUsuario,
DdlUsuarioResponsable.SelectedValue.ToEntero, Anio, Mes, AnioMes, Ddlmoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero(), DdlEstatusCompra.SelectedValue.ToEntero, DdlUsuarioResponsable.SelectedValue.ToEntero, Anio, Mes, AnioMes, Ddlmoneda.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero(), DdlEstatusCompra.SelectedValue.ToEntero,
Fecha, DdlGrupo.SelectedValue.ToEntero, Opcion, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, Fecha, DdlGrupo.SelectedValue.ToEntero, Opcion, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero,
TCEspecifico, FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=IIf(CveTipoProveedor = 3, TCEspecifico, FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=If(CveTipoProveedor = 3, -1, CveTipoProveedor),
-1, CveTipoProveedor), Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero, AplicaNC:=DdlAplicaNC.SelectedValue.ToEntero(), TipoDocto:=TipoDocto, CveProyecto:=DdlProyecto.SelectedValue.ToEntero()) Then Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero, AplicaNC:=DdlAplicaNC.SelectedValue.ToEntero(), TipoDocto:=TipoDocto, CveProyecto:=DdlProyecto.SelectedValue.ToEntero()) Then
Dim TMP_DTDatos As New DataTable Dim TMP_DTDatos As New DataTable

View File

@@ -40,7 +40,7 @@ Partial Class RepEvaluacionProveedor
Dim fFin As Date = Date.Parse(TxtFechaF.Text) Dim fFin As Date = Date.Parse(TxtFechaF.Text)
Dim objCompras As New ClsCompras Dim objCompras As New ClsCompras
objCompras.GetRepEvaluacionProveedores(UsuarioActual.Empresa.CveEmpresa, DdlProveedor.SelectedValue, DdlCveClasificacionProveedor.SelectedValue.ToEntero, fInicio, fFin) objCompras.GetRepEvaluacionProveedores(UsuarioActual.Empresa.CveEmpresa, DdlProveedor.SelectedValue.ToEntero, DdlCveClasificacionProveedor.SelectedValue.ToEntero, fInicio, fFin)
GV.DataSource = objCompras.DtResultados GV.DataSource = objCompras.DtResultados
LtlTotalRegistros.Text = objCompras.DtResultados.Rows.Count.ToString LtlTotalRegistros.Text = objCompras.DtResultados.Rows.Count.ToString
@@ -59,7 +59,6 @@ Partial Class RepEvaluacionProveedor
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
Dim Liga As String = String.Empty Dim Liga As String = String.Empty
If (e.Row.DBCampo("ReqCve").ToString <> "") Then If (e.Row.DBCampo("ReqCve").ToString <> "") Then
Liga = String.Format("<a class='Texto' href='javascript:IrO(""{0}"");'>", e.Row.DBCampo("ReqCve")) Liga = String.Format("<a class='Texto' href='javascript:IrO(""{0}"");'>", e.Row.DBCampo("ReqCve"))
e.Row.FCLabel("lblReqFolio").Text = String.Format("<div >{0}{1}</a></div>", Liga, e.Row.DBCampo("ReqFolio")) e.Row.FCLabel("lblReqFolio").Text = String.Format("<div >{0}{1}</a></div>", Liga, e.Row.DBCampo("ReqFolio"))
@@ -68,27 +67,17 @@ Partial Class RepEvaluacionProveedor
If e.Row.DBCampo("OcCve").ToString <> "" Then If e.Row.DBCampo("OcCve").ToString <> "" Then
Liga = String.Format("<a class='Texto' href='javascript:IrO(""{0}"");'>", e.Row.DBCampo("OcCve")) Liga = String.Format("<a class='Texto' href='javascript:IrO(""{0}"");'>", e.Row.DBCampo("OcCve"))
e.Row.FCLabel("lblOcFolio").Text = String.Format("<div >{0}{1}</a></div>", Liga, e.Row.DBCampo("OcFolio")) e.Row.FCLabel("lblOcFolio").Text = String.Format("<div >{0}{1}</a></div>", Liga, e.Row.DBCampo("OcFolio"))
End If End If
Liga = String.Format("<a class='Texto' href='javascript:IrP(""{0}"");'>", e.Row.DBCampo("CveProveedor")) Liga = String.Format("<a class='Texto' href='javascript:IrP(""{0}"");'>", e.Row.DBCampo("CveProveedor"))
e.Row.FCLabel("lblProveedor").Text = String.Format("<div >{0}{1}</a></div>", Liga, e.Row.DBCampo("NombreComercial")) e.Row.FCLabel("lblProveedor").Text = String.Format("<div >{0}{1}</a></div>", Liga, e.Row.DBCampo("NombreComercial"))
'Liga = String.Format("<a class='Texto' href='javascript:IrC(""{0}"");'>", e.Row.DBCampo("CveCompra")) 'Liga = String.Format("<a class='Texto' href='javascript:IrC(""{0}"");'>", e.Row.DBCampo("CveCompra"))
'e.Row.FCLabel("lblReqFolio").Text = String.Format("<div >{0}{1}</a></div>", Liga, e.Row.DBCampo("ReqFolio")) 'e.Row.FCLabel("lblReqFolio").Text = String.Format("<div >{0}{1}</a></div>", Liga, e.Row.DBCampo("ReqFolio"))
Dim atraso As Integer = e.Row.DBCampo("Atraso").Trim.ToEntero Dim atraso As Integer = e.Row.DBCampo("Atraso").Trim.ToEntero
e.Row.FCLabel("lblAtraso").Font.Bold = True e.Row.FCLabel("lblAtraso").Font.Bold = True
e.Row.FCLabel("lblAtraso").Text = atraso.ToString
e.Row.FCLabel("lblAtraso").Text = atraso
e.Row.FCLabel("lblAtraso").Width = 70 e.Row.FCLabel("lblAtraso").Width = 70
If atraso > 0 Then If atraso > 0 Then
@@ -96,7 +85,6 @@ Partial Class RepEvaluacionProveedor
Else Else
e.Row.FCLabel("lblAtraso").CssClass = "label label-success" e.Row.FCLabel("lblAtraso").CssClass = "label label-success"
End If End If
End If End If
End If End If

View File

@@ -35,7 +35,7 @@ Partial Class RepEvaluacionesProveedores
Private Sub CargarDatos() Private Sub CargarDatos()
Dim ObjCompras As New ClsCompras Dim ObjCompras As New ClsCompras
If ObjCompras.GetRepEvaluacionesProveedores(UsuarioActual.CveEmpresa, DdlProveedor.SelectedValue.ToEntero, TxtFechaI.Text, TxtFechaF.Text, DdlEvaluado.SelectedValue.ToEntero) Then If ObjCompras.GetRepEvaluacionesProveedores(UsuarioActual.CveEmpresa, DdlProveedor.SelectedValue.ToEntero, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, DdlEvaluado.SelectedValue.ToEntero) Then
GV.DataSource = ObjCompras.DtResultados GV.DataSource = ObjCompras.DtResultados
DtDatos = ObjCompras.DtResultados DtDatos = ObjCompras.DtResultados
End If End If
@@ -58,7 +58,7 @@ Partial Class RepEvaluacionesProveedores
params.Add(New ReportParameter("FechaInicial", TxtFechaI.Text)) params.Add(New ReportParameter("FechaInicial", TxtFechaI.Text))
params.Add(New ReportParameter("FechaFinal", TxtFechaF.Text)) params.Add(New ReportParameter("FechaFinal", TxtFechaF.Text))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Today)) params.Add(New ReportParameter("FechaImpresion", Today.ToShortDateString))
params.Add(New ReportParameter("Proveedor", DdlProveedor.SelectedItem.ToString)) params.Add(New ReportParameter("Proveedor", DdlProveedor.SelectedItem.ToString))
ImprimirPDF("Empresas/Grales/Formatos/RepEvaluacionesProveedores.rdlc", DtDatos, params, "RepEvaluacionesProveedores", "PDF", RDSName:="DataSet1") ImprimirPDF("Empresas/Grales/Formatos/RepEvaluacionesProveedores.rdlc", DtDatos, params, "RepEvaluacionesProveedores", "PDF", RDSName:="DataSet1")

View File

@@ -14,7 +14,7 @@ Partial Class RepGastos
#Region "Propiedades" #Region "Propiedades"
Private Property RfechaInicio() As DateTime Private Property RfechaInicio() As DateTime
Get Get
Return If(IsNothing(ViewState("RfechaInicio")), DateTime.MinValue, (ViewState("RfechaInicio"))) Return If(IsNothing(ViewState("RfechaInicio")), DateTime.MinValue, ViewState("RfechaInicio").ToString.ToDateTime)
End Get End Get
Set Set
ViewState("RfechaInicio") = Value ViewState("RfechaInicio") = Value
@@ -22,7 +22,7 @@ Partial Class RepGastos
End Property End Property
Private Property RfechaFin() As DateTime Private Property RfechaFin() As DateTime
Get Get
Return If(IsNothing(ViewState("RfechaFin")), DateTime.MinValue, (ViewState("RfechaFin"))) Return If(IsNothing(ViewState("RfechaFin")), DateTime.MinValue, ViewState("RfechaFin").ToString.ToDateTime)
End Get End Get
Set Set
ViewState("RfechaFin") = Value ViewState("RfechaFin") = Value

View File

@@ -15,7 +15,7 @@ Partial Class Compras_ValidaCFDi
LtlFechaExp.Text = ObjCFDi.FechaEmision LtlFechaExp.Text = ObjCFDi.FechaEmision
LtlFechaCert.Text = ObjCFDi.FechaCertificacion LtlFechaCert.Text = ObjCFDi.FechaCertificacion
LtlPACCert.Text = ObjCFDi.RFCPAC LtlPACCert.Text = ObjCFDi.RFCPAC
LtlTotal.Text = ObjCFDi.Monto LtlTotal.Text = ObjCFDi.Monto.ToString
LtlEfecto.Text = ObjCFDi.Efecto LtlEfecto.Text = ObjCFDi.Efecto
LtlEstado.Text = ObjCFDi.Estado LtlEstado.Text = ObjCFDi.Estado
LtlRespuestaHTML.Text = ObjCFDi.ResponseHTML LtlRespuestaHTML.Text = ObjCFDi.ResponseHTML

View File

@@ -135,7 +135,7 @@ Partial Class Contabilidad_CatCuentas
DdlMoneda.SelectedValueExist(dr("IdMoneda").ToString) DdlMoneda.SelectedValueExist(dr("IdMoneda").ToString)
If dr("IdAgrupadorSAT").ToString.ToEntero = 0 Then If dr("IdAgrupadorSAT").ToString.ToEntero = 0 Then
DdlAgrupadorSAT.SelectedValue = -1 DdlAgrupadorSAT.SelectedValue = "-1"
Else Else
DdlAgrupadorSAT.SelectedValue = dr("IdAgrupadorSAT").ToString DdlAgrupadorSAT.SelectedValue = dr("IdAgrupadorSAT").ToString
End If End If
@@ -236,7 +236,7 @@ Partial Class Contabilidad_CatCuentas
ArbolCuentas.DataSource = DtDatos ArbolCuentas.DataSource = DtDatos
'.Attributes.Add("data-hijos","0"); '.Attributes.Add("data-hijos","0");
Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem) Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem)
item.Attributes.Item("data-hijos") = item.Attributes.Item("data-hijos").ToEntero + 1 item.Attributes.Item("data-hijos") = (item.Attributes.Item("data-hijos").ToEntero + 1).ToString
Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL) Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL)
If (IsNothing(objul)) Then If (IsNothing(objul)) Then
objul = New ADServerControl.DragableUL objul = New ADServerControl.DragableUL
@@ -285,7 +285,7 @@ Partial Class Contabilidad_CatCuentas
ArbolCuentas.DataSource = DtDatos ArbolCuentas.DataSource = DtDatos
Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem) Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem)
Dim padre As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", item.CvePadre)), ADServerControl.DragableItem) Dim padre As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", item.CvePadre)), ADServerControl.DragableItem)
padre.Attributes.Item("data-hijos") = padre.Attributes.Item("data-hijos").ToEntero - 1 padre.Attributes.Item("data-hijos") = (padre.Attributes.Item("data-hijos").ToEntero - 1).ToString
ArbolCuentas.Controls.Remove(item) ArbolCuentas.Controls.Remove(item)
RegistraScript(String.Format("$('#{0}').click();", editar.ClientID)) RegistraScript(String.Format("$('#{0}').click();", editar.ClientID))

View File

@@ -116,7 +116,8 @@ Partial Class Contabilidad_CatPeriodosBloqueo
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
If Not Actualizar Then If Not Actualizar Then
If ObjConta.AddPeriodosBloqueo(UsuarioActual.CveEmpresa, TxtEjercicio.Text, ChkM1.Checked, ChkM2.Checked, ChkM3.Checked, ChkM4.Checked, ChkM5.Checked, ChkM6.Checked, ChkM7.Checked, ChkM8.Checked, ChkM9.Checked, ChkM10.Checked, ChkM11.Checked, ChkM12.Checked) Then If ObjConta.AddPeriodosBloqueo(UsuarioActual.CveEmpresa, TxtEjercicio.Text.ToEntero, If(ChkM1.Checked, 1, 0), If(ChkM2.Checked, 1, 0), If(ChkM3.Checked, 1, 0), If(ChkM4.Checked, 1, 0), If(ChkM5.Checked, 1, 0), If(ChkM6.Checked, 1, 0),
If(ChkM7.Checked, 1, 0), If(ChkM8.Checked, 1, 0), If(ChkM9.Checked, 1, 0), If(ChkM10.Checked, 1, 0), If(ChkM11.Checked, 1, 0), If(ChkM12.Checked, 1, 0)) Then
CargadatosGvPeriodosBloqueo() CargadatosGvPeriodosBloqueo()
@@ -128,7 +129,7 @@ Partial Class Contabilidad_CatPeriodosBloqueo
Alert("Ocurrió un error al guardar el Periodo de Bloqueo", TipoMensaje.MsgError) Alert("Ocurrió un error al guardar el Periodo de Bloqueo", TipoMensaje.MsgError)
End If End If
Else Else
Dim AplicarBloqueso As String = ObjConta.UpdatePeriodosBloqueo(UsuarioActual.CveEmpresa, TxtEjercicio.Text, ChkM1.Checked, ChkM2.Checked, ChkM3.Checked, ChkM4.Checked, ChkM5.Checked, ChkM6.Checked, ChkM7.Checked, ChkM8.Checked, ChkM9.Checked, ChkM10.Checked, ChkM11.Checked, ChkM12.Checked, UsuarioActual.CveUsuario) Dim AplicarBloqueso As String = ObjConta.UpdatePeriodosBloqueo(UsuarioActual.CveEmpresa, TxtEjercicio.Text.ToEntero, ChkM1.Checked, ChkM2.Checked, ChkM3.Checked, ChkM4.Checked, ChkM5.Checked, ChkM6.Checked, ChkM7.Checked, ChkM8.Checked, ChkM9.Checked, ChkM10.Checked, ChkM11.Checked, ChkM12.Checked, UsuarioActual.CveUsuario)
If AplicarBloqueso.Length = 0 Then If AplicarBloqueso.Length = 0 Then
CargadatosGvPeriodosBloqueo() CargadatosGvPeriodosBloqueo()
@@ -154,9 +155,8 @@ Partial Class Contabilidad_CatPeriodosBloqueo
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = 0 Ejercicio = GvRow.DataKey("Ejercicio").ToEntero
Ejercicio = GvRow.DataKey("Ejercicio") CveEmpresa = GvRow.DataKey("CveEmpresa").ToEntero
CveEmpresa = GvRow.DataKey("CveEmpresa")
If ObjConta.RemovePeriodosBloqueo(CveEmpresa, Ejercicio) Then If ObjConta.RemovePeriodosBloqueo(CveEmpresa, Ejercicio) Then
CargadatosGvPeriodosBloqueo() CargadatosGvPeriodosBloqueo()
@@ -177,15 +177,13 @@ Partial Class Contabilidad_CatPeriodosBloqueo
Public Sub Edit_ClickPeriodosBloqueo(sender As Object, e As EventArgs) Public Sub Edit_ClickPeriodosBloqueo(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim activo As Boolean = 0
LtlTituloModalPeriodosBloqueo.Text = "Editar Bloqueo" LtlTituloModalPeriodosBloqueo.Text = "Editar Bloqueo"
Actualizar = True Actualizar = True
Ejercicio = GvRow.DataKey("Ejercicio") Ejercicio = GvRow.DataKey("Ejercicio").ToEntero
CveEmpresa = GvRow.DataKey("CveEmpresa") CveEmpresa = GvRow.DataKey("CveEmpresa").ToEntero
TxtEjercicio.Text = Ejercicio TxtEjercicio.Text = GvRow.DataKey("Ejercicio")
'DdlTareaProgra.SelectedValueExist(CveTareaProgramada) 'DdlTareaProgra.SelectedValueExist(CveTareaProgramada)
LimpiarChecked() LimpiarChecked()

View File

@@ -579,7 +579,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
'si es otra diferente al peso 'si es otra diferente al peso
If gvr.DataKey("CveMoneda") <> "1" Then If gvr.DataKey("CveMoneda") <> "1" Then
TipoCambio = TxtTC.Text.ToDouble TipoCambio = TxtTC.Text.ToDouble
If RBLOpcion.SelectedValue = "1" Then TipoCambioPago = TxtTC.Text.ToDouble Else TipoCambioPago = gvr.FCTextBox("TxtTC").Text.ToDouble If RBLOpcion.SelectedValue = "1" Then TipoCambioPago = TxtTC.Text.ToDecimal Else TipoCambioPago = gvr.FCTextBox("TxtTC").Text.ToDecimal
MonExt = True MonExt = True
Concepto = String.Format("{0} TC:{1} ${2}", ConceptoMov, TxtTC.Text, gvr.DataKey("Importe").ToDouble.FormatoNumero) Concepto = String.Format("{0} TC:{1} ${2}", ConceptoMov, TxtTC.Text, gvr.DataKey("Importe").ToDouble.FormatoNumero)
Else Else
@@ -666,7 +666,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
IdCuentaProveedor = gvrc.FCHiddenField("HdnIdCtaContProveedores").Value.ToEntero IdCuentaProveedor = gvrc.FCHiddenField("HdnIdCtaContProveedores").Value.ToEntero
Case 20 Case 20
'contabilizo la prepoliza 'contabilizo la prepoliza
If Not Bancos.UpdateCompraPrePoliza(Fecha, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, 20) Then MsgError = "Error al actualizar compra" : Exit For If Not Bancos.UpdateCompraPrePoliza(Fecha, NumPoliza.ToString, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, 20) Then MsgError = "Error al actualizar compra" : Exit For
Case 8, 9 'FyE Case 8, 9 'FyE
IdCuentaFuncionario = gvr.DataKey("IdCtaContPersonal").ToEntero IdCuentaFuncionario = gvr.DataKey("IdCtaContPersonal").ToEntero
AbonoFuncionario = CompraPagadoTotal AbonoFuncionario = CompraPagadoTotal
@@ -685,7 +685,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
AbonoAnticipo = CompraPagadoTotal AbonoAnticipo = CompraPagadoTotal
CargoProveedor = CompraPagadoTotal CargoProveedor = CompraPagadoTotal
AbonoProveedor = 0 AbonoProveedor = 0
If Not Bancos.UpdateCompraPrePoliza(Fecha, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, 10) Then MsgError = "Error al actualizar compra" : Exit For If Not Bancos.UpdateCompraPrePoliza(Fecha, NumPoliza.ToString, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, 10) Then MsgError = "Error al actualizar compra" : Exit For
Case 2 Case 2
CargoProveedor = CompraPagadoTotal CargoProveedor = CompraPagadoTotal
AbonoProveedor = 0 AbonoProveedor = 0
@@ -693,7 +693,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
CargoProveedor = CompraPagadoTotal CargoProveedor = CompraPagadoTotal
AbonoProveedor = 0 AbonoProveedor = 0
'contabilizo la prepoliza 'contabilizo la prepoliza
If Not Bancos.UpdateCompraPrePoliza(Fecha, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, 20) Then MsgError = "Error al actualizar compra" : Exit For If Not Bancos.UpdateCompraPrePoliza(Fecha, NumPoliza.ToString, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, 20) Then MsgError = "Error al actualizar compra" : Exit For
Case 8 Case 8
AbonoFuncionario = 0 AbonoFuncionario = 0
TotalFuncionarios = 0 TotalFuncionarios = 0
@@ -704,7 +704,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
'ya viene el tipo de cambio entre la fecha de compra y la ultima fluctuacion 'ya viene el tipo de cambio entre la fecha de compra y la ultima fluctuacion
If CveMoneda = 2 Then TipoCambioCompra = gvrc.FCHiddenField("HdnTC").Value.ToDouble Else TipoCambioCompra = 1 If CveMoneda = 2 Then TipoCambioCompra = gvrc.FCHiddenField("HdnTC").Value.ToDecimal Else TipoCambioCompra = 1
''S I M P L I F I C A R ''S I M P L I F I C A R
SimplificaIVAxAcreditar = False SimplificaIVAxAcreditar = False
@@ -725,7 +725,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
Next Next
'debe de actualizar 'debe de actualizar
If Not Bancos.UpdateCompraPrePoliza(Fecha, NumPoliza.ToEntero, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero) Then If Not Bancos.UpdateCompraPrePoliza(Fecha, NumPoliza.ToString, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero) Then
MsgError = "Error al actualizar compra" : Exit For MsgError = "Error al actualizar compra" : Exit For
End If End If
@@ -788,7 +788,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
IVAAcreditable * TipoCambioPago, IVAAcreditable * TipoCambioPago,
CompraPagadoRetIVA * TipoCambioPago, CompraPagadoRetIVA * TipoCambioPago,
CompraPagadoRetISR * TipoCambioPago, CompraPagadoRetISR * TipoCambioPago,
Fecha, NumPoliza, gvrc.FCHiddenField("HdnSerie").Value, gvrc.FCHiddenField("HdnFolio").Value.StrToNum, "", UsuarioActual.CveEmpresa) Then Fecha, NumPoliza.ToString, gvrc.FCHiddenField("HdnSerie").Value, gvrc.FCHiddenField("HdnFolio").Value.StrToNum, "", UsuarioActual.CveEmpresa) Then
MsgError = "No se pudo insertar movimientos de devoluciones de IVA" : Exit For MsgError = "No se pudo insertar movimientos de devoluciones de IVA" : Exit For
End If End If
@@ -905,7 +905,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
If MsgError = "" Then If MsgError = "" Then
Conta.AjustaPoliza(IDPoliza) Conta.AjustaPoliza(IDPoliza)
PrePolizas.UpdatePoliza(Fecha, NumPoliza, IDPoliza, gvr.DataKey("CvePrePoliza").ToEntero, gvr.DataKey("CveEmpresa").ToEntero) 'PrePolizas.UpdatePoliza(Fecha, NumPoliza, IDPoliza, gvr.DataKey("CvePrePoliza").ToEntero, gvr.DataKey("CveEmpresa").ToEntero)
Conta.Commit() Conta.Commit()
PrePolizas.Commit() PrePolizas.Commit()
@@ -1048,7 +1048,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
'si es otra diferente al peso 'si es otra diferente al peso
If gvr.DataKey("CveMonedaCompra") <> "1" Then If gvr.DataKey("CveMonedaCompra") <> "1" Then
TipoCambio = TxtTC.Text.ToDouble TipoCambio = TxtTC.Text.ToDouble
If RBLOpcion.SelectedValue = "1" Then TipoCambioPago = TxtTC.Text.ToDouble Else TipoCambioPago = gvr.FCTextBox("TxtTC").Text.ToDouble If RBLOpcion.SelectedValue = "1" Then TipoCambioPago = TxtTC.Text.ToDecimal Else TipoCambioPago = gvr.FCTextBox("TxtTC").Text.ToDecimal
MonExt = True MonExt = True
Concepto = String.Format("{0} TC:{1} ${2}", ConceptoMov, TxtTC.Text, gvr.DataKey("Total").ToDouble.FormatoNumero) Concepto = String.Format("{0} TC:{1} ${2}", ConceptoMov, TxtTC.Text, gvr.DataKey("Total").ToDouble.FormatoNumero)
Else Else
@@ -1117,7 +1117,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
IdCuentaProveedor = gvrc.FCHiddenField("HdnIdCtaContProveedores").Value.ToEntero IdCuentaProveedor = gvrc.FCHiddenField("HdnIdCtaContProveedores").Value.ToEntero
'ya viene el tipo de cambio entre la fecha de compra y la ultima fluctuacion 'ya viene el tipo de cambio entre la fecha de compra y la ultima fluctuacion
If CveMoneda = 2 Then TipoCambioCompra = gvrc.FCHiddenField("HdnTC").Value.ToDouble Else TipoCambioCompra = 1 If CveMoneda = 2 Then TipoCambioCompra = gvrc.FCHiddenField("HdnTC").Value.ToDecimal Else TipoCambioCompra = 1
If gvrc.FCHiddenField("HdnTipoDocto").Value = "NC" Then If gvrc.FCHiddenField("HdnTipoDocto").Value = "NC" Then
IVAxAcreditar = IVAAcreditable IVAxAcreditar = IVAAcreditable
@@ -1163,9 +1163,9 @@ Partial Class Contabilidad_DiarioAmortizaciones
'End Select 'End Select
If Not Bancos.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, 8) Then MsgError = "Error al actualizar compra" : Exit For If Not Bancos.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza.ToString, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, 8) Then MsgError = "Error al actualizar compra" : Exit For
If Not Bancos.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, 9) Then MsgError = "Error al actualizar compra" : Exit For If Not Bancos.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza.ToString, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, 9) Then MsgError = "Error al actualizar compra" : Exit For
@@ -1246,7 +1246,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
IVAAcreditable * TipoCambioPago, IVAAcreditable * TipoCambioPago,
CompraPagadoRetIVA * TipoCambioPago, CompraPagadoRetIVA * TipoCambioPago,
CompraPagadoRetISR * TipoCambioPago, CompraPagadoRetISR * TipoCambioPago,
Fecha, NumPoliza, gvrc.FCHiddenField("HdnSerie").Value, gvrc.FCHiddenField("HdnFolio").Value.StrToNum, "", UsuarioActual.CveEmpresa) Then Fecha, NumPoliza.ToString, gvrc.FCHiddenField("HdnSerie").Value, gvrc.FCHiddenField("HdnFolio").Value.StrToNum, "", UsuarioActual.CveEmpresa) Then
MsgError = "No se pudo insertar movimientos de devoluciones de IVA" : Exit For MsgError = "No se pudo insertar movimientos de devoluciones de IVA" : Exit For
End If End If
@@ -1395,7 +1395,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
If MsgError = "" Then If MsgError = "" Then
Conta.AjustaPoliza(IDPoliza) Conta.AjustaPoliza(IDPoliza)
PrePolizas.UpdatePoliza(Fecha, NumPoliza, IDPoliza, gvr.DataKey("CvePrePoliza").ToEntero, gvr.DataKey("CveEmpresa").ToEntero) ' PrePolizas.UpdatePoliza(Fecha, NumPoliza, IDPoliza, gvr.DataKey("CvePrePoliza").ToEntero, gvr.DataKey("CveEmpresa").ToEntero)
Conta.Commit() Conta.Commit()
PrePolizas.Commit() PrePolizas.Commit()
@@ -1529,7 +1529,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
'si es otra diferente al peso 'si es otra diferente al peso
If gvr.DataKey("CveMonedaCompra") <> "1" Then If gvr.DataKey("CveMonedaCompra") <> "1" Then
TipoCambio = TxtTC.Text.ToDouble TipoCambio = TxtTC.Text.ToDouble
If RBLOpcion.SelectedValue = "1" Then TipoCambioPago = TxtTC.Text.ToDouble Else TipoCambioPago = gvr.FCTextBox("TxtTC").Text.ToDouble If RBLOpcion.SelectedValue = "1" Then TipoCambioPago = TxtTC.Text.ToDecimal Else TipoCambioPago = gvr.FCTextBox("TxtTC").Text.ToDecimal
MonExt = True MonExt = True
Concepto = String.Format("{0} TC:{1} ${2}", ConceptoMov, TxtTC.Text, gvr.DataKey("Total").ToDouble.FormatoNumero) Concepto = String.Format("{0} TC:{1} ${2}", ConceptoMov, TxtTC.Text, gvr.DataKey("Total").ToDouble.FormatoNumero)
Else Else
@@ -1593,12 +1593,12 @@ Partial Class Contabilidad_DiarioAmortizaciones
If Not Bancos.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, 8) Then MsgError = "Error al actualizar compra" : Exit For If Not Bancos.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza.ToString, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, 8) Then MsgError = "Error al actualizar compra" : Exit For
'If Not Bancos.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, 9) Then MsgError = "Error al actualizar compra" : Exit For 'If Not Bancos.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, NumPoliza, IDPoliza, gvrc.FCHiddenField("HdnCveCompra").Value.ToEntero, 9) Then MsgError = "Error al actualizar compra" : Exit For
'ya viene el tipo de cambio entre la fecha de compra y la ultima fluctuacion 'ya viene el tipo de cambio entre la fecha de compra y la ultima fluctuacion
If CveMoneda = 2 Then TipoCambioCompra = gvrc.FCHiddenField("HdnTC").Value.ToDouble Else TipoCambioCompra = 1 If CveMoneda = 2 Then TipoCambioCompra = gvrc.FCHiddenField("HdnTC").Value.ToDecimal Else TipoCambioCompra = 1
''S I M P L I F I C A R ''S I M P L I F I C A R
SimplificaIVAxAcreditar = False SimplificaIVAxAcreditar = False
@@ -1671,7 +1671,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
IVAAcreditable * TipoCambioPago, IVAAcreditable * TipoCambioPago,
CompraPagadoRetIVA * TipoCambioPago, CompraPagadoRetIVA * TipoCambioPago,
CompraPagadoRetISR * TipoCambioPago, CompraPagadoRetISR * TipoCambioPago,
Fecha, NumPoliza, gvrc.FCHiddenField("HdnSerie").Value, gvrc.FCHiddenField("HdnFolio").Value.StrToNum, "", UsuarioActual.CveEmpresa) Then Fecha, NumPoliza.ToString, gvrc.FCHiddenField("HdnSerie").Value, gvrc.FCHiddenField("HdnFolio").Value.StrToNum, "", UsuarioActual.CveEmpresa) Then
MsgError = "No se pudo insertar movimientos de devoluciones de IVA" : Exit For MsgError = "No se pudo insertar movimientos de devoluciones de IVA" : Exit For
End If End If
@@ -1694,7 +1694,7 @@ Partial Class Contabilidad_DiarioAmortizaciones
If MsgError = "" Then If MsgError = "" Then
Conta.AjustaPoliza(IDPoliza) Conta.AjustaPoliza(IDPoliza)
PrePolizas.UpdatePoliza(Fecha, NumPoliza, IDPoliza, gvr.DataKey("CvePrePoliza").ToEntero, gvr.DataKey("CveEmpresa").ToEntero) 'PrePolizas.UpdatePoliza(Fecha, NumPoliza, IDPoliza, gvr.DataKey("CvePrePoliza").ToEntero, gvr.DataKey("CveEmpresa").ToEntero)
Conta.Commit() Conta.Commit()
PrePolizas.Commit() PrePolizas.Commit()

View File

@@ -280,11 +280,11 @@ Partial Class Contabilidad_DiarioCompras
If gvr.FCCheckBox("Chk").Checked Then If gvr.FCCheckBox("Chk").Checked Then
Contador += 1 Contador += 1
If gvr.DataKey("CveMoneda") <> "1" AndAlso gvr.DataKey("IdCtaContComplementaria").ToEntero > 0 Then If gvr.DataKey("CveMoneda") <> "1" AndAlso gvr.DataKey("IdCtaContComplementaria").ToEntero > 0 Then
TipoCambio = TxtTC.Text.ToDouble : ContadorME += 1 TipoCambio = TxtTC.Text.ToDecimal : ContadorME += 1
Else : TipoCambio = 1 Else : TipoCambio = 1
End If End If
If gvr.DataKey("TipoDocto") = "NC" Then MultNC = -1 Else MultNC = 1 If gvr.DataKey("TipoDocto") = "NC" Then MultNC = -1 Else MultNC = 1
Total += (gvr.DataKey("Total").ToDouble + gvr.DataKey("RetIVA").ToDecimal + gvr.DataKey("RetISR").ToDecimal) * TipoCambio * MultNC Total += (gvr.DataKey("Total").ToDecimal + gvr.DataKey("RetIVA").ToDecimal + gvr.DataKey("RetISR").ToDecimal) * TipoCambio * MultNC
End If End If
Next Next
@@ -472,7 +472,7 @@ Partial Class Contabilidad_DiarioCompras
'hago el movimiento de fluctuacion cambiaria 'hago el movimiento de fluctuacion cambiaria
If gvr.DataKey("CveMoneda") = "2" AndAlso gvr.DataKey("IdCtaContComplementaria").ToEntero > 0 Then If gvr.DataKey("CveMoneda") = "2" AndAlso gvr.DataKey("IdCtaContComplementaria").ToEntero > 0 Then
Dim Dif As Decimal = Math.Round(gvr.DataKey("TC") * gvr.DataKey("Total").ToDecimal, 2) Dim Dif As Decimal = Math.Round(gvr.DataKey("TC").ToDecimal * gvr.DataKey("Total").ToDecimal, 2)
Concepto = String.Format("{0} TC:{1} ${2}", gvr.DataKey("SerieFolio"), TipoCambio, gvr.DataKey("Total").ToDouble.FormatoNumero) Concepto = String.Format("{0} TC:{1} ${2}", gvr.DataKey("SerieFolio"), TipoCambio, gvr.DataKey("Total").ToDouble.FormatoNumero)
''si hay un tipo de cambio, va a requerir un ajuste en la conversion ''si hay un tipo de cambio, va a requerir un ajuste en la conversion
If Math.Abs(Math.Abs(Cargos) - Dif) > 0 AndAlso Math.Abs(Math.Abs(Cargos) - Dif) <= 0.02 Then If Math.Abs(Math.Abs(Cargos) - Dif) > 0 AndAlso Math.Abs(Math.Abs(Cargos) - Dif) <= 0.02 Then

View File

@@ -287,7 +287,7 @@ Partial Class Contabilidad_DiarioPagos
'sino tiene cuenta 'sino tiene cuenta
'si la compra es mayor o igual al anticipo, se simplifica el movimiento a anticipos 'si la compra es mayor o igual al anticipo, se simplifica el movimiento a anticipos
If e.Row.DBCampo("CvePlantillaPoliza").ToEntero.Contiene(10, 52, 1) AndAlso e.Row.DBCampo("IdCtaContBancos").ToEntero > 0 AndAlso tDtCompras IsNot Nothing AndAlso tDtCompras.Rows.Count > 0 AndAlso tDtCompras.SUM("Total") >= e.Row.DBCampo("Importe") AndAlso (e.Row.DBCampo("CveMoneda") = "1" OrElse (e.Row.DBCampo("CveMoneda") = "2" AndAlso e.Row.DBCampo("IdCtaContExtranjera").ToEntero > 0)) Then If e.Row.DBCampo("CvePlantillaPoliza").ToEntero.Contiene(10, 52, 1) AndAlso e.Row.DBCampo("IdCtaContBancos").ToEntero > 0 AndAlso tDtCompras IsNot Nothing AndAlso tDtCompras.Rows.Count > 0 AndAlso tDtCompras.SUM("Total") >= e.Row.DBCampo("Importe").ToDecimal AndAlso (e.Row.DBCampo("CveMoneda") = "1" OrElse (e.Row.DBCampo("CveMoneda") = "2" AndAlso e.Row.DBCampo("IdCtaContExtranjera").ToEntero > 0)) Then
Simplificar = True Simplificar = True
e.Row.FCCheckBox("Chk").Visible = True e.Row.FCCheckBox("Chk").Visible = True
End If End If
@@ -321,11 +321,10 @@ Partial Class Contabilidad_DiarioPagos
'End If 'End If
'cuando es anticipo 'cuando es anticipo
If e.Row.DBCampo("CveMoneda").ToEntero = 1 AndAlso e.Row.DBCampo("IdCtaContAnticipos").ToEntero = 0 AndAlso e.Row.DBCampo("CvePlantillaPoliza").Contiene(10, 52) And Simplificar = False Then If e.Row.DBCampo("CveMoneda").ToEntero = 1 AndAlso e.Row.DBCampo("IdCtaContAnticipos").ToEntero = 0 AndAlso e.Row.DBCampo("CvePlantillaPoliza").Contiene("10", "52") And Simplificar = False Then
'falta vicularse la cuenta 'falta vicularse la cuenta
e.Row.FCTextBox("TxtDescripcion").ForeColor = Drawing.Color.OrangeRed e.Row.FCTextBox("TxtDescripcion").ForeColor = Drawing.Color.OrangeRed
e.Row.FCTextBox("TxtDescripcion").ToolTip = "Falta vincular la cuenta contable de anticipos" e.Row.FCTextBox("TxtDescripcion").ToolTip = "Falta vincular la cuenta contable de anticipos"
End If End If
If e.Row.DBCampo("IdCuentaIVAAcreditable").ToEntero = 0 Then If e.Row.DBCampo("IdCuentaIVAAcreditable").ToEntero = 0 Then
@@ -334,7 +333,6 @@ Partial Class Contabilidad_DiarioPagos
e.Row.FCLabel("LblIVA").ToolTip = "Falta vincular la cuenta contable" e.Row.FCLabel("LblIVA").ToolTip = "Falta vincular la cuenta contable"
End If End If
If e.Row.DBCampo("IdCtaContBancos").ToEntero = 0 Then If e.Row.DBCampo("IdCtaContBancos").ToEntero = 0 Then
'falta vicularse el proveedor 'falta vicularse el proveedor
e.Row.FCHyperLink("HplCuenta").ForeColor = Drawing.Color.OrangeRed e.Row.FCHyperLink("HplCuenta").ForeColor = Drawing.Color.OrangeRed
@@ -490,20 +488,16 @@ Partial Class Contabilidad_DiarioPagos
GvTmp = GvC GvTmp = GvC
End Select End Select
For Each gvr As GridViewRow In GvTmp.Rows For Each gvr As GridViewRow In GvTmp.Rows
If gvr.FCCheckBox("Chk").Checked Then If gvr.FCCheckBox("Chk").Checked Then
Contador += 1 Contador += 1
If gvr.DataKey("CveMoneda") <> "1" Then If gvr.DataKey("CveMoneda") <> "1" Then
TipoCambioPago = TxtTC.Text.ToDouble : ContadorME += 1 TipoCambioPago = TxtTC.Text.ToDecimal : ContadorME += 1
Else : TipoCambioPago = 1 Else : TipoCambioPago = 1
End If End If
End If End If
Next Next
If ContadorME > 0 AndAlso TxtTC.Text.ToDouble <= 0 AndAlso RBLOpcion.SelectedValue = "1" Then If ContadorME > 0 AndAlso TxtTC.Text.ToDouble <= 0 AndAlso RBLOpcion.SelectedValue = "1" Then
Alert("Ingrese un tipo de cambio.") Alert("Ingrese un tipo de cambio.")
Exit Sub Exit Sub
@@ -1040,7 +1034,7 @@ Partial Class Contabilidad_DiarioPagos
''hago el movimiento de fluctuacion cambiaria ''hago el movimiento de fluctuacion cambiaria
If CveMoneda = 2 Then If CveMoneda = 2 Then
Dim FluctuacionCambiaria, FluctuacionCambiariaIVA As Double Dim FluctuacionCambiaria, FluctuacionCambiariaIVA As Decimal
''registro a la cuenta complementaria del proveedor ''registro a la cuenta complementaria del proveedor
'If gvr.DataKey("IdCtaContComplementaria").ToEntero > 0 Then 'If gvr.DataKey("IdCtaContComplementaria").ToEntero > 0 Then
@@ -1091,16 +1085,13 @@ Partial Class Contabilidad_DiarioPagos
If TotalBancos > 0 Or gvr.DataKey("CveEstatusIE").ToString = "2" Then ' cuando tiene importe en bancos o esta cancelado If TotalBancos > 0 Or gvr.DataKey("CveEstatusIE").ToString = "2" Then ' cuando tiene importe en bancos o esta cancelado
ConceptoMov = gvr.FCTextBox("TxtDescripcion").Text ConceptoMov = gvr.FCTextBox("TxtDescripcion").Text
Dim ImporteMovimientoBancos As Double = gvr.DataKey("Importe").ToDouble * TipoCambioPago Dim ImporteMovimientoBancos As Decimal = gvr.DataKey("Importe").ToDecimal * TipoCambioPago
If CveMoneda = 2 AndAlso IdCtaContBancosComplementaria > 0 Then If CveMoneda = 2 AndAlso IdCtaContBancosComplementaria > 0 Then
ImporteMovimientoBancos = gvr.DataKey("Importe").ToDouble ImporteMovimientoBancos = gvr.DataKey("Importe").ToDecimal
ConceptoMov = String.Format("{0} TC:{1} ${2}", ConceptoMov, TipoCambioPago, TotalBancos.FormatoNumero) ConceptoMov = String.Format("{0} TC:{1} ${2}", ConceptoMov, TipoCambioPago, TotalBancos.FormatoNumero)
End If End If
Dim TmpTotalBancos As Decimal = Math.Round(ImporteMovimientoBancos, 2)
Dim TmpTotalBancos As Double = Math.Round(ImporteMovimientoBancos, 2)
Dim TotalBancosME As Double = TotalBancos Dim TotalBancosME As Double = TotalBancos
If CveMoneda = 2 AndAlso IdCtaContBancosComplementaria <= 0 Then If CveMoneda = 2 AndAlso IdCtaContBancosComplementaria <= 0 Then
ConceptoMov = String.Format("{0} TC:{1} ${2}", ConceptoMov, TipoCambioPago, TotalBancosME.FormatoNumero) ConceptoMov = String.Format("{0} TC:{1} ${2}", ConceptoMov, TipoCambioPago, TotalBancosME.FormatoNumero)
@@ -1117,7 +1108,7 @@ Partial Class Contabilidad_DiarioPagos
'hago el movimiento de fluctuacion cambiaria BANCARIA Complementaria 'hago el movimiento de fluctuacion cambiaria BANCARIA Complementaria
If CveMoneda = 2 AndAlso IdCtaContBancosComplementaria > 0 Then If CveMoneda = 2 AndAlso IdCtaContBancosComplementaria > 0 Then
TmpTotalBancos = Math.Round(gvr.DataKey("Importe").ToDouble * TipoCambioPago - ImporteMovimientoBancos, 2) TmpTotalBancos = Math.Round(gvr.DataKey("Importe").ToDecimal * TipoCambioPago - ImporteMovimientoBancos, 2)
'se ocupa verificar que no tenga una diferencia de un centavo por las conversiones de dolares a peso 'se ocupa verificar que no tenga una diferencia de un centavo por las conversiones de dolares a peso
Dim dtF As DataTable = Nothing Dim dtF As DataTable = Nothing
@@ -1125,7 +1116,7 @@ Partial Class Contabilidad_DiarioPagos
'hago ajuste 'hago ajuste
dtF = Conta.DtResultados dtF = Conta.DtResultados
Dim tCargos, tAbonos As Decimal Dim tCargos, tAbonos As Decimal
tCargos = dtF.SUM("Cargo") : tAbonos = dtF.SUM("Abono") tCargos = dtF.SUMD("Cargo") : tAbonos = dtF.SUMD("Abono")
If Math.Abs(tCargos - (tAbonos + TmpTotalBancos)) < 1 Then If Math.Abs(tCargos - (tAbonos + TmpTotalBancos)) < 1 Then
TmpTotalBancos += (tCargos - (tAbonos + TmpTotalBancos)) TmpTotalBancos += (tCargos - (tAbonos + TmpTotalBancos))
End If End If
@@ -1494,7 +1485,7 @@ Partial Class Contabilidad_DiarioPagos
Conta.AddCausacionesIVA(IDPoliza, 0, 0, 0, 0, 0, 0, True) Conta.AddCausacionesIVA(IDPoliza, 0, 0, 0, 0, 0, 0, True)
Conta.AjustaPoliza(IDPoliza) Conta.AjustaPoliza(IDPoliza)
PrePolizas.UpdatePoliza(Fecha, NumPoliza, IDPoliza, gvr.DataKey("CvePrePoliza").ToEntero, gvr.DataKey("CveEmpresa").ToEntero) 'PrePolizas.UpdatePrePoliza(Fecha, NumPoliza, IDPoliza, gvr.DataKey("CvePrePoliza").ToEntero, gvr.DataKey("CveEmpresa").ToEntero)
Conta.Commit() Conta.Commit()
PrePolizas.Commit() PrePolizas.Commit()
@@ -1627,7 +1618,7 @@ Partial Class Contabilidad_DiarioPagos
Else Else
'sino tiene cuenta 'sino tiene cuenta
'si la compra es mayor o igual al anticipo, se simplifica el movimiento a anticipos 'si la compra es mayor o igual al anticipo, se simplifica el movimiento a anticipos
If e.Row.DBCampo("IdCtaContBancos").ToEntero > 0 AndAlso tDtCompras IsNot Nothing AndAlso tDtCompras.Rows.Count > 0 AndAlso tDtCompras.SUM("Total") >= e.Row.DBCampo("Importe") AndAlso e.Row.DBCampo("IdCtaContComplementaria").ToEntero > 0 Then If e.Row.DBCampo("IdCtaContBancos").ToEntero > 0 AndAlso tDtCompras IsNot Nothing AndAlso tDtCompras.Rows.Count > 0 AndAlso tDtCompras.SUM("Total") >= e.Row.DBCampo("Importe").ToDecimal AndAlso e.Row.DBCampo("IdCtaContComplementaria").ToEntero > 0 Then
Simplificar = True Simplificar = True
e.Row.FCCheckBox("Chk").Visible = True e.Row.FCCheckBox("Chk").Visible = True
End If End If

View File

@@ -1,4 +1,5 @@
Imports System.Data Option Strict Off
Imports System.Data
Imports System.IO Imports System.IO
Imports Extensiones Imports Extensiones
Imports iText.Kernel.Geom Imports iText.Kernel.Geom

View File

@@ -90,9 +90,9 @@ Partial Class Contabilidad_OCDetalleAlmacen
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
If Cargo > Abono Then If Cargo > Abono Then
If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, Diferencia, Diferencia, 176, Referencia, Referencia, ImporteME:=Diferencia, CveCompra:=CveCompra, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Diferencia, Diferencia, 176, Referencia, Referencia, ImporteME:=Diferencia, CveCompra:=CveCompra, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then
If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Diferencia, -Diferencia, 177, Referencia, Referencia, CveCompra:=CveCompra, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -Diferencia, -Diferencia, 177, Referencia, Referencia, CveCompra:=CveCompra, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then
ContadorProcesados = ContadorProcesados + 1 ContadorProcesados = ContadorProcesados + 1
Else Else
ErrorProcesamiento = True ErrorProcesamiento = True
@@ -102,11 +102,10 @@ Partial Class Contabilidad_OCDetalleAlmacen
ErrorProcesamiento = True ErrorProcesamiento = True
Exit For Exit For
End If End If
Else Else
If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Diferencia, -Diferencia, 176, Referencia, Referencia, CveCompra:=CveCompra, Contabilizable:=1, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -Diferencia, -Diferencia, 176, Referencia, Referencia, CveCompra:=CveCompra, Contabilizable:=True, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then
If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, Diferencia, Diferencia, 177, Referencia, Referencia, CveCompra:=CveCompra, Contabilizable:=1, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Diferencia, Diferencia, 177, Referencia, Referencia, CveCompra:=CveCompra, Contabilizable:=True, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then
ContadorProcesados = ContadorProcesados + 1 ContadorProcesados = ContadorProcesados + 1
Else Else
ErrorProcesamiento = True ErrorProcesamiento = True
@@ -116,18 +115,12 @@ Partial Class Contabilidad_OCDetalleAlmacen
ErrorProcesamiento = True ErrorProcesamiento = True
Exit For Exit For
End If End If
End If End If
End If End If
End If End If
Next Next
DTDatos.AcceptChanges() DTDatos.AcceptChanges()
If Not ErrorProcesamiento Then If Not ErrorProcesamiento Then
ObjConta.Commit() ObjConta.Commit()
@@ -139,11 +132,7 @@ Partial Class Contabilidad_OCDetalleAlmacen
End If End If
ObjConta.Dispose() ObjConta.Dispose()
CargaDatos() CargaDatos()
End Sub End Sub
End Class End Class

View File

@@ -1,4 +1,4 @@
 Option Strict Off
Imports System.Data Imports System.Data
Imports System.IO Imports System.IO
@@ -215,9 +215,9 @@ Partial Class ContabilidadC_RegPrePoliza
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
Tick = DateTime.Now.Ticks.ToString() Tick = DateTime.Now.Ticks.ToString()
If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 OrElse UsuarioActual.CveEmpresa = 119 Then 'If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 OrElse UsuarioActual.CveEmpresa = 119 Then
Response.Redirect(Request.Url.PathAndQuery.Replace("RegPrePoliza", "RegPrePolizaS")) ' Response.Redirect(Request.Url.PathAndQuery.Replace("RegPrePoliza", "RegPrePolizaS"))
End If 'End If
CveMoneda = 1 CveMoneda = 1
ViewState("CvePrePoliza") = 0 ViewState("CvePrePoliza") = 0
@@ -462,9 +462,9 @@ Partial Class ContabilidadC_RegPrePoliza
If ObjContabilidad.GetPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa) Then If ObjContabilidad.GetPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa) Then
Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("") Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("")
If dr IsNot Nothing Then If dr IsNot Nothing Then
DdlTipoPoliza.SelectedValue = dr("CveTipoPoliza") DdlTipoPoliza.SelectedValue = dr("CveTipoPoliza").ToString
TxtFechaDocumento.Text = dr("Fecha") TxtFechaDocumento.Text = dr("Fecha").ToString.ToDate.ToShortDateString
TxtConcepto.Text = dr("Concepto") TxtConcepto.Text = dr("Concepto").ToString
DivDatosPoliza.Visible = True DivDatosPoliza.Visible = True
TipoPoliza = DdlTipoPoliza.SelectedItem.Text TipoPoliza = DdlTipoPoliza.SelectedItem.Text
Folio = dr("FolioPoliza").ToString() Folio = dr("FolioPoliza").ToString()
@@ -765,7 +765,7 @@ Partial Class ContabilidadC_RegPrePoliza
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
DdlVentas.ClearSelection() DdlVentas.ClearSelection()
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", -1, "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
DdlVentas.DataSource = ObjVentas.DtResultados '.FiltraParametros("Saldo > 0") DdlVentas.DataSource = ObjVentas.DtResultados '.FiltraParametros("Saldo > 0")
DdlVentas.DataBind() DdlVentas.DataBind()
DdlVentas.Items.Insert(0, New ListItem(" - ", "-1")) DdlVentas.Items.Insert(0, New ListItem(" - ", "-1"))
@@ -781,7 +781,7 @@ Partial Class ContabilidadC_RegPrePoliza
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
DdlVentas.ClearSelection() DdlVentas.ClearSelection()
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", -1, "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
DdlVentas.DataSource = ObjVentas.DtResultados '.FiltraParametros("Saldo > 0") DdlVentas.DataSource = ObjVentas.DtResultados '.FiltraParametros("Saldo > 0")
DdlVentas.DataBind() DdlVentas.DataBind()
DdlVentas.Items.Insert(0, New ListItem(" - ", "-1")) DdlVentas.Items.Insert(0, New ListItem(" - ", "-1"))
@@ -876,11 +876,7 @@ Partial Class ContabilidadC_RegPrePoliza
dr("FolioPoliza") = drt("FolioPoliza") dr("FolioPoliza") = drt("FolioPoliza")
DtMovimientos.Rows.Add(dr) DtMovimientos.Rows.Add(dr)
Next Next
GvMov.DataSource = DtMovimientos GvMov.DataSource = DtMovimientos
GvMov.DataBind() GvMov.DataBind()
UPMovs.Update() UPMovs.Update()
@@ -900,8 +896,8 @@ Partial Class ContabilidadC_RegPrePoliza
e.Row.FCTextBox("TxtCargo").Visible = True e.Row.FCTextBox("TxtCargo").Visible = True
End If End If
e.Row.FCTextBox("TxtAbono").Text = If(e.Row.DBCampo("Abono") = 0, "", e.Row.DBCampo("Abono")) e.Row.FCTextBox("TxtAbono").Text = If(e.Row.DBCampo("Abono") = "0", "", e.Row.DBCampo("Abono"))
e.Row.FCTextBox("TxtCargo").Text = If(e.Row.DBCampo("Cargo") = 0, "", e.Row.DBCampo("Cargo")) e.Row.FCTextBox("TxtCargo").Text = If(e.Row.DBCampo("Cargo") = "0", "", e.Row.DBCampo("Cargo"))
e.Row.FCTextBox("TxtConcepto").Text = e.Row.DBCampo("Descripcion") e.Row.FCTextBox("TxtConcepto").Text = e.Row.DBCampo("Descripcion")
If CvePeriodo > 0 Then If CvePeriodo > 0 Then
@@ -1030,7 +1026,7 @@ Partial Class ContabilidadC_RegPrePoliza
For Each gvr As GridViewRow In GvMov.Rows For Each gvr As GridViewRow In GvMov.Rows
If gvr.DataKey("IDCuenta").ToEntero() > 0 Then If gvr.DataKey("IDCuenta").ToEntero() > 0 Then
IdCtaContable = gvr.DataKey("IDCuenta") IdCtaContable = gvr.DataKey("IDCuenta").ToEntero
End If End If
CveProveedor = gvr.DataKey("CveProveedor").ToEntero() CveProveedor = gvr.DataKey("CveProveedor").ToEntero()
CveCompra = gvr.DataKey("CveCompra").ToEntero() CveCompra = gvr.DataKey("CveCompra").ToEntero()
@@ -1056,7 +1052,7 @@ Partial Class ContabilidadC_RegPrePoliza
'Registra movimieno bancario 'Registra movimieno bancario
If CveConcepto = 30 Then If CveConcepto = 30 Then
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFecha.Text, gvr.DataKey("ContadoNumeroFolio").ToString, CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFecha.Text.ToDate, gvr.DataKey("ContadoNumeroFolio").ToString,
gvr.DataKey("ContadoBeneficiario").ToString, gvr.DataKey("ContadoImporte").ToString.ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "", gvr.DataKey("ContadoBeneficiario").ToString, gvr.DataKey("ContadoImporte").ToString.ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "",
False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
@@ -1216,12 +1212,13 @@ Partial Class ContabilidadC_RegPrePoliza
End If End If
Else Else
contador = contador + 1 contador = contador + 1
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, If(row.FCTextBox("TxtCargo").Text.ToDecimal() <> 0, False, True), If(row.FCTextBox("TxtCargo").Text.ToDecimal() <> 0, If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, If(row.FCTextBox("TxtCargo").Text.ToDecimal() <> 0, False, True),
row.FCTextBox("TxtCargo").Text.ToDecimal(), row.FCTextBox("TxtAbono").Text.ToDecimal()), row.DataKey("Referencia").ToString(), If(row.FCTextBox("TxtCargo").Text.ToDecimal() <> 0, row.FCTextBox("TxtCargo").Text.ToDecimal(), row.FCTextBox("TxtAbono").Text.ToDecimal()),
row.DataKey("CveConceptoContable").ToEntero(), row.FCTextBox("TxtConcepto").Text, Now, If(row.FCTextBox("TxtCargo").Text.ToDecimal() <> 0, row.FCTextBox("TxtCargo").Text.ToDecimal(), row.FCTextBox("TxtAbono").Text.ToDecimal()),
row.FCDropDownList("DdlCtaContable").SelectedValue.ToEntero(), 0, CveSubProyecto:=row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero(), row.DataKey("CveConceptoContable").ToEntero(), row.DataKey("Referencia").ToString(),
CveTipoGasto:=If(DdlTipoGasto.Visible, row.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero(), row.DataKey("CveTipoGasto").ToEntero()), row.FCTextBox("TxtConcepto").Text, CveSubProyecto:=row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero(),
CveProveedor:=DdlProveedores.SelectedValue.ToEntero()) Then CveTipoGasto:=If(DdlTipoGasto.Visible, row.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero(), row.DataKey("CveTipoGasto").ToEntero()),
CveProveedor:=DdlProveedores.SelectedValue.ToEntero()) Then
OcurrioError = True OcurrioError = True
Exit For Exit For
End If End If
@@ -1245,7 +1242,7 @@ Partial Class ContabilidadC_RegPrePoliza
CargaPrePoliza() CargaPrePoliza()
If Not OcurrioError Then If Not OcurrioError Then
If IdPoliza > 0 AndAlso contador Then If IdPoliza > 0 AndAlso contador > 0 Then
BtnContabilizar_Click(Nothing, Nothing) BtnContabilizar_Click(Nothing, Nothing)
End If End If
@@ -1663,22 +1660,22 @@ Partial Class ContabilidadC_RegPrePoliza
If DrM IsNot Nothing Then If DrM IsNot Nothing Then
HdnCve.Value = idMov.ToString() HdnCve.Value = idMov.ToString()
DdlCtaContable.SelectedValue = DrM("IdCuenta") DdlCtaContable.SelectedValue = DrM("IdCuenta").ToString
TxtReferencia.Text = DrM("Referencia") TxtReferencia.Text = DrM("Referencia").ToString
TxtObservaciones.Text = DrM("Concepto") TxtObservaciones.Text = DrM("Concepto").ToString
' (Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) = dr("TipoMovto") ' (Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) = dr("TipoMovto")
DrM("EsComodin") = 0 DrM("EsComodin") = 0
DdlConceptosContables.SelectedValue = DrM("CveConcepto").ToString() DdlConceptosContables.SelectedValue = DrM("CveConcepto").ToString()
TxtCargo.Text = DrM("Cargo").ToString() TxtCargo.Text = DrM("Cargo").ToString()
TxtAbono.Text = DrM("Abono").ToString() TxtAbono.Text = DrM("Abono").ToString()
TxtDescripcion.Text = DrM("Descripcion") TxtDescripcion.Text = DrM("Descripcion").ToString
DdlSubProyecto.SelectedValue = DrM("CveSubProyecto") DdlSubProyecto.SelectedValue = DrM("CveSubProyecto").ToString
DdlProveedores.SelectedValue = DrM("CveProveedor") DdlProveedores.SelectedValue = DrM("CveProveedor").ToString
DdlCompras.SelectedValue = DrM("CveCompra") DdlCompras.SelectedValue = DrM("CveCompra").ToString
DdlPersonal.SelectedValue = DrM("CvePersonal") DdlPersonal.SelectedValue = DrM("CvePersonal").ToString
' DrM("CveClasificacion") = -1 ' DrM("CveClasificacion") = -1
DdlClientes.SelectedValue = DrM("CveCliente") DdlClientes.SelectedValue = DrM("CveCliente").ToString
DdlVentas.SelectedValue = DrM("CveVenta") DdlVentas.SelectedValue = DrM("CveVenta").ToString
LbCancelarEdicion.Visible = True LbCancelarEdicion.Visible = True
LbAgregar.Text = "Actualizar" LbAgregar.Text = "Actualizar"
GvMov.Rows(e.NewEditIndex).FCTextBox("TxtCargo").CssClass = "" GvMov.Rows(e.NewEditIndex).FCTextBox("TxtCargo").CssClass = ""
@@ -2109,7 +2106,7 @@ Partial Class ContabilidadC_RegPrePoliza
Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero() Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero()
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden") Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden")
Dim DtExcel As DataTable = (From row As DataRow In Dt.Rows Dim DtExcel As DataTable = (From row In Dt.AsEnumerable
Select New With Select New With
{ {
.ConceptoAdministrativo = row.Item("ConceptoContable"), .ConceptoAdministrativo = row.Item("ConceptoContable"),

View File

@@ -1,4 +1,4 @@
 Option Strict Off
Imports System.Data Imports System.Data
'Imports DocumentFormat.OpenXml 'Imports DocumentFormat.OpenXml
Imports Extensiones Imports Extensiones
@@ -448,9 +448,9 @@ Partial Class ContabilidadC_RegPrePolizaS
LblEncabezado.Text = "Edición de Póliza" LblEncabezado.Text = "Edición de Póliza"
ViewState("CvePrePoliza") = tCvePrePoliza ViewState("CvePrePoliza") = tCvePrePoliza
DdlTipoPoliza.SelectedValue = dr("CveTipoPoliza") DdlTipoPoliza.SelectedValue = dr("CveTipoPoliza").ToString
TxtFechaDocumento.Text = dr("Fecha") TxtFechaDocumento.Text = dr("Fecha").ToString.ToDate.ToShortDateString
TxtConcepto.Text = dr("Concepto") TxtConcepto.Text = dr("Concepto").ToString
DivDatosPoliza.Visible = True DivDatosPoliza.Visible = True
TipoPoliza = DdlTipoPoliza.SelectedItem.Text TipoPoliza = DdlTipoPoliza.SelectedItem.Text
Folio = dr("FolioPoliza").ToString Folio = dr("FolioPoliza").ToString
@@ -458,7 +458,7 @@ Partial Class ContabilidadC_RegPrePolizaS
TxtFolio.Text = dr("FolioPoliza").ToString TxtFolio.Text = dr("FolioPoliza").ToString
TxtUsuarioElaboro.Text = dr("Usuario").ToString TxtUsuarioElaboro.Text = dr("Usuario").ToString
TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy") TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString.ToEntero
HplImprimirPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}")}" HplImprimirPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}")}"
HplImprimirPDF.Visible = True HplImprimirPDF.Visible = True
If UsuarioActual.CveRol = 1 Then If UsuarioActual.CveRol = 1 Then
@@ -568,7 +568,7 @@ Partial Class ContabilidadC_RegPrePolizaS
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen")) If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE")) If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
If e.Row.DBCampo("Modificado") Then If e.Row.DBCampo("Modificado") = "True" Then
e.Row.FCCheckBox("chkModificado").Checked = True e.Row.FCCheckBox("chkModificado").Checked = True
End If End If
End If End If
@@ -719,7 +719,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
DdlVentas.ClearSelection() DdlVentas.ClearSelection()
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", -1, "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
DdlVentas.DataSource = ObjVentas.DtResultados '.FiltraParametros("Saldo > 0") DdlVentas.DataSource = ObjVentas.DtResultados '.FiltraParametros("Saldo > 0")
DdlVentas.DataBind() DdlVentas.DataBind()
DdlVentas.Items.Insert(0, New ListItem(" - ", "-1")) DdlVentas.Items.Insert(0, New ListItem(" - ", "-1"))
@@ -827,8 +827,8 @@ Partial Class ContabilidadC_RegPrePolizaS
e.Row.FCTextBox("TxtCargo").Visible = True e.Row.FCTextBox("TxtCargo").Visible = True
End If End If
e.Row.FCTextBox("TxtAbono").Text = If(e.Row.DBCampo("Abono") = 0, "", e.Row.DBCampo("Abono")) e.Row.FCTextBox("TxtAbono").Text = If(e.Row.DBCampo("Abono") = "0", "", e.Row.DBCampo("Abono"))
e.Row.FCTextBox("TxtCargo").Text = If(e.Row.DBCampo("Cargo") = 0, "", e.Row.DBCampo("Cargo")) e.Row.FCTextBox("TxtCargo").Text = If(e.Row.DBCampo("Cargo") = "0", "", e.Row.DBCampo("Cargo"))
e.Row.FCTextBox("TxtConcepto").Text = e.Row.DBCampo("Descripcion") e.Row.FCTextBox("TxtConcepto").Text = e.Row.DBCampo("Descripcion")
If CvePeriodo > 0 Then If CvePeriodo > 0 Then
@@ -988,14 +988,14 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim tCveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda").ToEntero Dim tCveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda").ToEntero
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, tFolio, CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text.ToDate, tFolio,
gvr.DataKey("ContadoBeneficiario"), gvr.DataKey("ContadoImporte").ToDecimal, tCveMoneda, 0, gvr.DataKey("ContadoObservaciones"), "", gvr.DataKey("ContadoBeneficiario"), gvr.DataKey("ContadoImporte").ToDecimal, tCveMoneda, 0, gvr.DataKey("ContadoObservaciones"), "",
False, False, 0, CvePrePolizaInsertada, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) False, False, 0, CvePrePolizaInsertada, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIE < 0 Then If CveIE < 0 Then
MsgError = "No se pudo registrar movimiento bancario" MsgError = "No se pudo registrar movimiento bancario"
Exit For Exit For
Else Else
If tFolio > 0 Then If tFolio <> "0" Or tFolio <> "" Then
FolioIE = tFolio FolioIE = tFolio
Else Else
FolioIE = ObjIE.Folio FolioIE = ObjIE.Folio
@@ -1156,7 +1156,7 @@ Partial Class ContabilidadC_RegPrePolizaS
If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then
Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL) Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL)
CveIEAgregado = ObjIE.AddBancos_IE(row.DataKey("ContadoCuenta").ToEntero, row.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, row.DataKey("ContadoNumeroFolio"), CveIEAgregado = ObjIE.AddBancos_IE(row.DataKey("ContadoCuenta").ToEntero, row.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text.ToDate, row.DataKey("ContadoNumeroFolio"),
row.DataKey("ContadoBeneficiario"), ImporteIE, CveMoneda, 0, row.DataKey("ContadoObservaciones"), "", row.DataKey("ContadoBeneficiario"), ImporteIE, CveMoneda, 0, row.DataKey("ContadoObservaciones"), "",
False, False, 0, row.DataKey("CvePrePoliza").ToEntero, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) False, False, 0, row.DataKey("CvePrePoliza").ToEntero, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIEAgregado < 0 Then If CveIEAgregado < 0 Then
@@ -1185,7 +1185,7 @@ Partial Class ContabilidadC_RegPrePolizaS
If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then
Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL) Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL)
CveIEAgregado = ObjIE.AddBancos_IE(row.DataKey("ContadoCuenta").ToEntero, row.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, row.DataKey("ContadoNumeroFolio"), CveIEAgregado = ObjIE.AddBancos_IE(row.DataKey("ContadoCuenta").ToEntero, row.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text.ToDate, row.DataKey("ContadoNumeroFolio"),
row.DataKey("ContadoBeneficiario"), ImporteIE, CveMoneda, 0, row.DataKey("ContadoObservaciones"), "", row.DataKey("ContadoBeneficiario"), ImporteIE, CveMoneda, 0, row.DataKey("ContadoObservaciones"), "",
False, False, 0, row.DataKey("CvePrePoliza").ToEntero, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) False, False, 0, row.DataKey("CvePrePoliza").ToEntero, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIEAgregado < 0 Then If CveIEAgregado < 0 Then
@@ -1232,7 +1232,7 @@ Partial Class ContabilidadC_RegPrePolizaS
CargaPrePoliza(CvePrePoliza) CargaPrePoliza(CvePrePoliza)
If Not OcurrioError Then If Not OcurrioError Then
If IdPoliza > 0 AndAlso contador Then If IdPoliza > 0 AndAlso contador > 0 Then
Contabilizar() Contabilizar()
End If End If
@@ -1301,8 +1301,8 @@ Partial Class ContabilidadC_RegPrePolizaS
DvModalconceptoCliente.Visible = True DvModalconceptoCliente.Visible = True
'DdlClientesE.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", "") 'DdlClientesE.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", "")
DdlClientesE.ddl.Items.Insert(0, New ListItem(GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", ""), CveCliente)) DdlClientesE.ddl.Items.Insert(0, New ListItem(GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", ""), CveCliente.ToString))
DdlClientesE.SelectedValue = CveCliente DdlClientesE.SelectedValue = CveCliente.ToString
CargaVentasE(CveCliente) CargaVentasE(CveCliente)
End If End If
@@ -1311,7 +1311,7 @@ Partial Class ContabilidadC_RegPrePolizaS
End If End If
If CveClasificacion > 0 Then If CveClasificacion > 0 Then
DdlClasificacionesE.SelectedValue = CveClasificacion DdlClasificacionesE.SelectedValue = CveClasificacion.ToString
End If End If
TxtConceptoE.Text = Concepto TxtConceptoE.Text = Concepto
TxtReferenciaE.Text = Referencia TxtReferenciaE.Text = Referencia
@@ -1323,13 +1323,8 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlCuentaContableE.SelectedValueExist(CveCuenta) DdlCuentaContableE.SelectedValueExist(CveCuenta)
If Cargo <> 0 Then If Cargo <> 0 Then TxtCargoE.Text = Cargo.FormatoNumero
TxtCargoE.Text = Cargo If Abono <> 0 Then TxtAbonoE.Text = Abono.FormatoNumero
End If
If Abono <> 0 Then
TxtAbonoE.Text = Abono
End If
If CveConceptoContable = 30 Then If CveConceptoContable = 30 Then
If Abono = 0 Then If Abono = 0 Then
@@ -1588,7 +1583,7 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlVentasE.ClearSelection() DdlVentasE.ClearSelection()
Dim ObjVentas As New ClsVentas Dim ObjVentas As New ClsVentas
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", -1, "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
If CveMoneda = 2 Then If CveMoneda = 2 Then
DdlVentasE.DataSource = ObjVentas.DtResultados.FiltraParametros("CveMoneda = 2") DdlVentasE.DataSource = ObjVentas.DtResultados.FiltraParametros("CveMoneda = 2")
Else Else
@@ -1626,7 +1621,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Private Function CargaValidacionesConcepto() As Boolean Private Function CargaValidacionesConcepto() As Boolean
Dim Retorno As Boolean = True Dim Retorno As Boolean = True
If DdlConceptosContablesE.SelectedValue <= 0 Then If DdlConceptosContablesE.SelectedValue.ToEntero <= 0 Then
Alert("No se ha especificado el concepto", TipoMensaje.ToastAdventencia) Alert("No se ha especificado el concepto", TipoMensaje.ToastAdventencia)
Return False Return False
End If End If
@@ -1636,7 +1631,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim AplicaBancos = Boolean.Parse(DrConceptoContable("AplicaBancos").ToString) Dim AplicaBancos = Boolean.Parse(DrConceptoContable("AplicaBancos").ToString)
If AplicaComplementaria Then If AplicaComplementaria Then
Dim Importe As Decimal = IIf(TxtCargoE.Text.ToDecimal <> 0, TxtCargoE.Text.ToDecimal, TxtAbonoE.Text.ToDecimal) Dim Importe As Decimal = If(TxtCargoE.Text.ToDecimal <> 0, TxtCargoE.Text.ToDecimal, TxtAbonoE.Text.ToDecimal)
'valida Mon Extranjera por el TC - Mon Extranjera 'valida Mon Extranjera por el TC - Mon Extranjera
Dim dif As Decimal = ((TxtME.Text.ToDecimal * TxtTipoCambio.Text.ToDecimal).RoundSQL - TxtME.Text.ToDecimal).RoundSQL - Importe Dim dif As Decimal = ((TxtME.Text.ToDecimal * TxtTipoCambio.Text.ToDecimal).RoundSQL - TxtME.Text.ToDecimal).RoundSQL - Importe
@@ -1706,7 +1701,7 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("EsComplementaria") = DrConceptoContable("EsComplementaria") dr("EsComplementaria") = DrConceptoContable("EsComplementaria")
dr("EsMonedaExtranjera") = DrConceptoContable("EsMonedaExtranjera") dr("EsMonedaExtranjera") = DrConceptoContable("EsMonedaExtranjera")
If dr("EsMonedaExtranjera") = "True" Then dr("ImporteME") = TxtME.Text.ToDecimal If dr("EsMonedaExtranjera").ToString = "True" Then dr("ImporteME") = TxtME.Text.ToDecimal
End If End If
If DdlPorcentajeIVAE.Visible Then If DdlPorcentajeIVAE.Visible Then
@@ -1716,7 +1711,7 @@ Partial Class ContabilidadC_RegPrePolizaS
DtMovimientos.Rows.Add(dr) DtMovimientos.Rows.Add(dr)
DtMovimientos.AcceptChanges() DtMovimientos.AcceptChanges()
If CvePrePoliza > 0 Or CvePrePolizaOrigen Then If CvePrePoliza > 0 Or CvePrePolizaOrigen > 0 Then
GvPrePoliza.DataSource = DtMovimientos GvPrePoliza.DataSource = DtMovimientos
GvPrePoliza.DataBind() GvPrePoliza.DataBind()
UpPrePoliza.Visible = True UpPrePoliza.Visible = True
@@ -1769,7 +1764,7 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("EsComplementaria") = DrConceptoContable("EsComplementaria") dr("EsComplementaria") = DrConceptoContable("EsComplementaria")
dr("EsMonedaExtranjera") = DrConceptoContable("EsMonedaExtranjera") dr("EsMonedaExtranjera") = DrConceptoContable("EsMonedaExtranjera")
If dr("EsMonedaExtranjera") = "True" Then dr("ImporteME") = TxtME.Text.ToDecimal If dr("EsMonedaExtranjera").ToString = "True" Then dr("ImporteME") = TxtME.Text.ToDecimal
End If End If
@@ -2117,7 +2112,7 @@ Partial Class ContabilidadC_RegPrePolizaS
DdlCuentaContable.SelectedValueExist(DrM("CveCuenta").ToString) DdlCuentaContable.SelectedValueExist(DrM("CveCuenta").ToString)
TxtReferencia.Text = DrM("Referencia").ToString TxtReferencia.Text = DrM("Referencia").ToString
TxtConcepto.Text = DrM("Concepto") TxtConcepto.Text = DrM("Concepto").ToString
' (Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) = dr("TipoMovto") ' (Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) = dr("TipoMovto")
DrM("EsComodin") = 0 DrM("EsComodin") = 0
DdlConceptosContables.SelectedValueExist(DrM("CveConceptoContable").ToString) DdlConceptosContables.SelectedValueExist(DrM("CveConceptoContable").ToString)
@@ -2236,7 +2231,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden") Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden")
Dim DtExcel As DataTable = (From row As DataRow In Dt.Rows Dim DtExcel As DataTable = (From row In Dt.AsEnumerable
Select New With Select New With
{ {
.ConceptoAdministrativo = row.Item("ConceptoContable"), .ConceptoAdministrativo = row.Item("ConceptoContable"),
@@ -2405,11 +2400,11 @@ Partial Class ContabilidadC_RegPrePolizaS
'carga el consecutivo 'carga el consecutivo
If FolioExcel = 0 Then If FolioExcel = 0 Then
FolioExcel = SiguienteFolioBancos(CveBancoCuenta, TipoMov) FolioExcel = SiguienteFolioBancos(CveBancoCuenta, TipoMov).ToLong
End If End If
Folio = FolioExcel Folio = FolioExcel.ToString
ImporteDocumento = IIf(Row("Abono").ToString.ToDecimal <> 0, Row("Abono").ToString.ToDecimal, Row("Cargo").ToString.ToDecimal) ImporteDocumento = If(Row("Abono").ToString.ToDecimal <> 0, Row("Abono").ToString.ToDecimal, Row("Cargo").ToString.ToDecimal)
Observaciones = Row("Referencia").ToString Observaciones = Row("Referencia").ToString
Beneficiario = Row("Concepto").ToString Beneficiario = Row("Concepto").ToString
@@ -2579,7 +2574,7 @@ Partial Class ContabilidadC_RegPrePolizaS
ArregloCuentasFolios.AcceptChanges() ArregloCuentasFolios.AcceptChanges()
Return Folio Return Folio.ToString
End Function End Function
#End Region #End Region
@@ -2689,9 +2684,9 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("") Dim dr As DataRow = ObjContabilidad.DtResultados.FiltroPrimero("")
If dr IsNot Nothing Then If dr IsNot Nothing Then
DivAgregarConceptos.Visible = False DivAgregarConceptos.Visible = False
DdlTipoPoliza.SelectedValue = dr("CveTipoPoliza") DdlTipoPoliza.SelectedValue = dr("CveTipoPoliza").ToString
TxtFechaDocumento.Text = dr("Fecha") TxtFechaDocumento.Text = dr("Fecha").ToString.ToDate.ToShortDateString
TxtConcepto.Text = dr("Concepto") TxtConcepto.Text = dr("Concepto").ToString
DivDatosPoliza.Visible = True DivDatosPoliza.Visible = True
TipoPoliza = DdlTipoPoliza.SelectedItem.Text TipoPoliza = DdlTipoPoliza.SelectedItem.Text
Folio = dr("FolioPoliza").ToString Folio = dr("FolioPoliza").ToString
@@ -2700,7 +2695,7 @@ Partial Class ContabilidadC_RegPrePolizaS
TxtUsuarioElaboro.Text = dr("Usuario").ToString TxtUsuarioElaboro.Text = dr("Usuario").ToString
TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy") TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
' TxtEstatus.Text = If(Boolean.Parse(dr("Estatus").ToString), "Activa", "Inactiva") ' TxtEstatus.Text = If(Boolean.Parse(dr("Estatus").ToString), "Activa", "Inactiva")
CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString.ToEntero
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then
'DivAgregarConceptos.Visible = True 'DivAgregarConceptos.Visible = True
@@ -2874,7 +2869,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim tFolio As String = gvr.DataKey("ContadoNumeroFolio").ToString Dim tFolio As String = gvr.DataKey("ContadoNumeroFolio").ToString
If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero) If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero)
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, tFolio, CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text.ToDate, tFolio,
gvr.DataKey("ContadoBeneficiario").ToString, Importe, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "", gvr.DataKey("ContadoBeneficiario").ToString, Importe, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "",
False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
FolioIE = gvr.DataKey("ContadoNumeroFolio").ToString FolioIE = gvr.DataKey("ContadoNumeroFolio").ToString
@@ -2928,11 +2923,11 @@ Partial Class ContabilidadC_RegPrePolizaS
MsgError = "Error" MsgError = "Error"
End Try End Try
If MsgError = "" Then 'If MsgError = "" Then
If Not ObjMov.UpdatePrePolizasOrdenamiento(CvePrePoliza, UsuarioActual.CveEmpresa) Then ' If ObjMov.UpdatePrePolizasOrdenamiento(CvePrePoliza, UsuarioActual.CveEmpresa) <= 0 Then
MsgError = "Orror al ordenar polzia" ' MsgError = "Error al ordenar póliza"
End If ' End If
End If 'End If
If MsgError = "" Then If MsgError = "" Then
Alert(If(MensajeAlert.ToString = "", $"Se registro con exito. {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}", $"Se registro con exito. {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")} <br>" & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePoliza}""") Alert(If(MensajeAlert.ToString = "", $"Se registro con exito. {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}", $"Se registro con exito. {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")} <br>" & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePoliza}""")
@@ -3039,7 +3034,7 @@ Partial Class ContabilidadC_RegPrePolizaS
If Venta.GetVenta(DdlVentasE.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then If Venta.GetVenta(DdlVentasE.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
Dim dr As DataRow = Venta.DtResultados.FiltroPrimero("") Dim dr As DataRow = Venta.DtResultados.FiltroPrimero("")
If dr IsNot Nothing Then If dr IsNot Nothing Then
TxtTipoCambio.Text = dr("TipoCambioValuacion") TxtTipoCambio.Text = dr("TipoCambioValuacion").ToString
End If End If
End If End If

View File

@@ -17,7 +17,7 @@ Partial Class Contabilidad_FiltraPolizas
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
ViewState("Orden") = "" ViewState("Orden") = ""
TxtFechaI.Text = Now.ToDate TxtFechaI.Text = Now.ToDate.ToShortDateString
TxtFechaF.Text = Now.ToShortDateString TxtFechaF.Text = Now.ToShortDateString
CargaDatos() CargaDatos()
End If End If
@@ -25,7 +25,7 @@ Partial Class Contabilidad_FiltraPolizas
Public Sub CargaDatos() Public Sub CargaDatos()
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
Dim FechaFin As DateTime = $"{TxtFechaF.Text} 23:59:59" Dim FechaFin As DateTime = $"{TxtFechaF.Text} 23:59:59".ToDateTime
If ObjConta.GetPolizasXDia(TxtFechaI.Text.ToDate, FechaFin) Then If ObjConta.GetPolizasXDia(TxtFechaI.Text.ToDate, FechaFin) Then
ViewState("DTPolizas") = ObjConta.DtResultados ViewState("DTPolizas") = ObjConta.DtResultados

View File

@@ -61,8 +61,8 @@ Partial Class Contabilidad2_CatContaEjercicios
Protected Sub BtnAgregarMotivoD_Click(sender As Object, e As EventArgs) Handles BtnAgregarMotivoD.Click Protected Sub BtnAgregarMotivoD_Click(sender As Object, e As EventArgs) Handles BtnAgregarMotivoD.Click
TxtEjercicio.Text = "" TxtEjercicio.Text = ""
ChkEstatus.Checked = 0 ChkEstatus.Checked = False
DdlPeriodoActual.SelectedValue = 0 DdlPeriodoActual.SelectedValue = "0"
LbAgregar.Text = "Agregar" LbAgregar.Text = "Agregar"
UpModalModulos.Update() UpModalModulos.Update()
RegistraScript("$('#ModalCat').modal();") RegistraScript("$('#ModalCat').modal();")
@@ -72,12 +72,12 @@ Partial Class Contabilidad2_CatContaEjercicios
Dim ObjConta As New ClsContabilidad Dim ObjConta As New ClsContabilidad
Dim errorString As String = "" Dim errorString As String = ""
If LbAgregar.Text = "Agregar" Then If LbAgregar.Text = "Agregar" Then
If Not ObjConta.AddContaEjercicio(DateTime.Today, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Ejercicio:=TxtEjercicio.Text, If Not ObjConta.AddContaEjercicio(TxtEjercicio.Text.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
PeriodoActual:=DdlPeriodoActual.SelectedValue.ToEntero, Estatus:=ChkEstatus.Checked) Then PeriodoActual:=DdlPeriodoActual.SelectedValue.ToEntero) Then
errorString = "Error al agregar" errorString = "Error al agregar"
End If End If
ElseIf LbAgregar.Text = "Actualizar" Then ElseIf LbAgregar.Text = "Actualizar" Then
If Not ObjConta.UpdateContaEjercicio(CveEjercicio, Ejercicio:=TxtEjercicio.Text, PeriodoActual:=DdlPeriodoActual.SelectedValue.ToEntero, If Not ObjConta.UpdateContaEjercicio(CveEjercicio, Ejercicio:=TxtEjercicio.Text.ToEntero, PeriodoActual:=DdlPeriodoActual.SelectedValue.ToEntero,
Estatus:=ChkEstatus.Checked) Then Estatus:=ChkEstatus.Checked) Then
errorString = "Error al actualizar" errorString = "Error al actualizar"
End If End If
@@ -101,7 +101,7 @@ Partial Class Contabilidad2_CatContaEjercicios
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
CveEjercicio = GvRow.DataKey("CveEjercicio").ToEntero CveEjercicio = GvRow.DataKey("CveEjercicio").ToEntero
TxtEjercicio.Text = GvRow.DataKey("Ejercicio") TxtEjercicio.Text = GvRow.DataKey("Ejercicio")
ChkEstatus.Checked = GvRow.DataKey("Estatus") ChkEstatus.Checked = GvRow.DataKey("Estatus") = "True"
DdlPeriodoActual.SelectedValue = GvRow.DataKey("PeriodoActualNumero") DdlPeriodoActual.SelectedValue = GvRow.DataKey("PeriodoActualNumero")
LbAgregar.Text = "Actualizar" LbAgregar.Text = "Actualizar"
UpModalModulos.Update() UpModalModulos.Update()

View File

@@ -44,7 +44,7 @@ Partial Class Contabilidad2_CatCuentas
Private Property Afectable As Boolean Private Property Afectable As Boolean
Get Get
Return ViewState("Afectable").ToString Return CBool(ViewState("Afectable").ToString)
End Get End Get
Set(value As Boolean) Set(value As Boolean)
ViewState("Afectable") = value ViewState("Afectable") = value
@@ -204,7 +204,7 @@ Partial Class Contabilidad2_CatCuentas
DTcuenta.SelectedValue = dr("Tipo").ToString() DTcuenta.SelectedValue = dr("Tipo").ToString()
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
LblSubCuenta.Text = dr("Nombre").ToString LblSubCuenta.Text = dr("Nombre").ToString
Afectable = dr("Afectable").ToString Afectable = CBool(dr("Afectable").ToString)
CvePadre = dr("CvePadre").ToString.ToEntero CvePadre = dr("CvePadre").ToString.ToEntero
End If End If
@@ -230,10 +230,10 @@ Partial Class Contabilidad2_CatCuentas
onconceptochange() onconceptochange()
CveProveedor = -1 CveProveedor = -1
DdlProveedores.SelectedText = "" DdlProveedores.SelectedText = ""
DdlProveedores.SelectedValue = CveProveedor DdlProveedores.SelectedValue = CveProveedor.ToString
CveCliente = -1 CveCliente = -1
DdlClientesWS.SelectedText = "" DdlClientesWS.SelectedText = ""
DdlClientesWS.SelectedValue = CveCliente DdlClientesWS.SelectedValue = CveCliente.ToString
Dim PorcentajeImpuesto As Decimal = -1 Dim PorcentajeImpuesto As Decimal = -1
DdlClasificacion.SelectedValueExist(PorcentajeImpuesto) DdlClasificacion.SelectedValueExist(PorcentajeImpuesto)
CveClasificacion = -1 CveClasificacion = -1
@@ -266,24 +266,24 @@ Partial Class Contabilidad2_CatCuentas
objconta.GetConta_CuentasDataContabilidad(IDSelected, UsuarioActual.CveEmpresa) objconta.GetConta_CuentasDataContabilidad(IDSelected, UsuarioActual.CveEmpresa)
If objconta.DtResultados.Rows.Count > 0 Then If objconta.DtResultados.Rows.Count > 0 Then
Dim rowcc As DataRow = objconta.DtResultados.Rows(0) Dim rowcc As DataRow = objconta.DtResultados.Rows(0)
DdlConcepto.SelectedValue = -1 DdlConcepto.SelectedValue = "-1"
DdlConcepto.SelectedValueExist(rowcc("CveConceptoAdmin").ToString().ToEntero()) DdlConcepto.SelectedValueExist(rowcc("CveConceptoAdmin").ToString().ToEntero())
onconceptochange() onconceptochange()
CveProveedor = rowcc("CveProveedor").ToString().ToEntero() CveProveedor = rowcc("CveProveedor").ToString().ToEntero()
DdlProveedores.SelectedText = rowcc("Proveedor").ToString().ToEntero() DdlProveedores.SelectedText = rowcc("Proveedor").ToString()
DdlProveedores.SelectedValue = CveProveedor DdlProveedores.SelectedValue = CveProveedor.ToString
CveCliente = rowcc("CveCliente").ToString().ToEntero() CveCliente = rowcc("CveCliente").ToString().ToEntero()
DdlClientesWS.SelectedText = rowcc("Cliente").ToString().ToEntero() DdlClientesWS.SelectedText = rowcc("Cliente").ToString
DdlClientesWS.SelectedValue = CveCliente DdlClientesWS.SelectedValue = CveCliente.ToString
Dim PorcentajeImpuesto As Decimal = rowcc("PorcentajeImpuesto").ToString().ToDecimal() * 100 Dim PorcentajeImpuesto As Decimal = rowcc("PorcentajeImpuesto").ToString().ToDecimal() * 100
TxtPorcentaje.Text = (PorcentajeImpuesto) TxtPorcentaje.Text = PorcentajeImpuesto.ToString
CveClasificacion = rowcc("CveClasificacion").ToString().ToEntero() CveClasificacion = rowcc("CveClasificacion").ToString().ToEntero()
DdlClasificacion.SelectedValueExist(CveClasificacion) DdlClasificacion.SelectedValueExist(CveClasificacion)
CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero() CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero()
ddlBancos.SelectedValue = -1 ddlBancos.SelectedValue = "-1"
ddlBancos.SelectedValueExist(CveBancoCuenta) ddlBancos.SelectedValueExist(CveBancoCuenta)
CveAlmacen = rowcc("CveAlmacen").ToString().ToEntero() CveAlmacen = rowcc("CveAlmacen").ToString().ToEntero()
DdlAlmacen.SelectedValue = -1 DdlAlmacen.SelectedValue = "-1"
DdlAlmacen.SelectedValueExist(CveAlmacen) DdlAlmacen.SelectedValueExist(CveAlmacen)
DdlPersonal.SelectedValueExist(rowcc("CvePersonal").ToString().ToEntero()) DdlPersonal.SelectedValueExist(rowcc("CvePersonal").ToString().ToEntero())
End If End If
@@ -291,7 +291,7 @@ Partial Class Contabilidad2_CatCuentas
End Using End Using
If dr("CveAgrupadorSAT").ToString.ToEntero = 0 Then If dr("CveAgrupadorSAT").ToString.ToEntero = 0 Then
DdlAgrupadorSAT.SelectedValue = -1 DdlAgrupadorSAT.SelectedValue = "-1"
Else Else
DdlAgrupadorSAT.SelectedValueExist(dr("CveAgrupadorSAT").ToString) DdlAgrupadorSAT.SelectedValueExist(dr("CveAgrupadorSAT").ToString)
End If End If
@@ -464,28 +464,28 @@ Partial Class Contabilidad2_CatCuentas
End If End If
If Not IsNothing(row) Then If Not IsNothing(row) Then
If CveTipoSaldo = 3 Then If CveTipoSaldo = 3 Then
PorcentajeIVA = TxtPorcentaje.ToEntero / 100 PorcentajeIVA = TxtPorcentaje.Text.ToDecimal / 100D
End If End If
End If End If
ObjConta.IniciaTransacSQL() ObjConta.IniciaTransacSQL()
If Afectable Then If Afectable Then
If ObjConta.GetCuentas(IDSelected, "-1", -1, UsuarioActual.CveEmpresa) Then If ObjConta.GetCuentas(IDSelected, "-1", -1, UsuarioActual.CveEmpresa) Then
drt = ObjConta.DtResultados.FiltroPrimero(String.Format("CveCuenta={0}", IDSelected)) drt = ObjConta.DtResultados.FiltroPrimero(String.Format("CveCuenta={0}", IDSelected))
CveConceptoAdmin = IIf(drt("CveConceptoAdmin").ToString.ToEntero = 0, -1, drt("CveConceptoAdmin").ToString.ToEntero) CveConceptoAdmin = If(drt("CveConceptoAdmin").ToString.ToEntero = 0, -1, drt("CveConceptoAdmin").ToString.ToEntero)
CveProveedor = IIf(drt("CveProveedor").ToString.ToEntero = 0, -1, drt("CveProveedor").ToString.ToEntero) CveProveedor = If(drt("CveProveedor").ToString.ToEntero = 0, -1, drt("CveProveedor").ToString.ToEntero)
CveCliente = IIf(drt("CveCliente").ToString.ToEntero = 0, -1, drt("CveCliente").ToString.ToEntero) CveCliente = If(drt("CveCliente").ToString.ToEntero = 0, -1, drt("CveCliente").ToString.ToEntero)
CveClasificacion = IIf(drt("CveClasificacion").ToString.ToEntero = 0, -1, drt("CveClasificacion").ToString.ToEntero) CveClasificacion = If(drt("CveClasificacion").ToString.ToEntero = 0, -1, drt("CveClasificacion").ToString.ToEntero)
PorcentajeImpuesto = IIf(drt("PorcentajeImpuesto").ToString.ToEntero = 0, -1, drt("PorcentajeImpuesto").ToString.ToEntero) PorcentajeImpuesto = If(drt("PorcentajeImpuesto").ToString.ToEntero = 0, -1, drt("PorcentajeImpuesto").ToString.ToEntero)
CveBancoCuenta = IIf(drt("CveBancoCuenta").ToString.ToEntero = 0, -1, drt("CveBancoCuenta").ToString.ToEntero) CveBancoCuenta = If(drt("CveBancoCuenta").ToString.ToEntero = 0, -1, drt("CveBancoCuenta").ToString.ToEntero)
'CveAlmacen = IIf(drt("CveAlmacen").ToString.ToEntero = 0, -1, drt("CveAlmacen").ToString.ToEntero) 'CveAlmacen = IIf(drt("CveAlmacen").ToString.ToEntero = 0, -1, drt("CveAlmacen").ToString.ToEntero)
'CvePersonal = IIf(drt("CvePersonal").ToString.ToEntero = 0, -1, drt("CvePersonal").ToString.ToEntero) 'CvePersonal = IIf(drt("CvePersonal").ToString.ToEntero = 0, -1, drt("CvePersonal").ToString.ToEntero)
NombreCuenta = IIf(drt("Nombre").ToString = "", "", drt("Nombre").ToString.ToEntero) NombreCuenta = If(drt("Nombre").ToString = "", "", drt("Nombre").ToString)
TipoCuenta = IIf(drt("Tipo").ToString = "", "", drt("Tipo").ToString.ToEntero) TipoCuenta = If(drt("Tipo").ToString = "", "", drt("Tipo").ToString)
CuentaMayor = IIf(drt("CtaMayor").ToString.ToEntero = 0, 0, drt("CtaMayor").ToString.ToEntero) CuentaMayor = If(drt("CtaMayor").ToString.ToEntero = 0, 0, drt("CtaMayor").ToString.ToEntero)
CveMoneda = IIf(drt("CveMoneda").ToString.ToEntero = -1, -1, drt("CveMoneda").ToString.ToEntero) CveMoneda = If(drt("CveMoneda").ToString.ToEntero = -1, -1, drt("CveMoneda").ToString.ToEntero)
DigAgrup = IIf(drt("DigAgrup").ToString.ToEntero = -1, -1, drt("DigAgrup").ToString.ToEntero) DigAgrup = If(drt("DigAgrup").ToString.ToEntero = -1, -1, drt("DigAgrup").ToString.ToEntero)
CveAgrupadorSat = IIf(drt("CveAgrupadorSAT").ToString.ToEntero = 0, -1, drt("CveAgrupadorSAT").ToString.ToEntero) CveAgrupadorSat = If(drt("CveAgrupadorSAT").ToString.ToEntero = 0, -1, drt("CveAgrupadorSAT").ToString.ToEntero)
NomIdioma = IIf(drt("NomIdioma").ToString = "", "", drt("NomIdioma").ToString.ToEntero) NomIdioma = If(drt("NomIdioma").ToString = "", "", drt("NomIdioma").ToString)
idnew = ObjConta.AddCuenta(CvePadre, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, idnew = ObjConta.AddCuenta(CvePadre, TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString, CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente,
CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta) CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta)
@@ -573,7 +573,7 @@ Partial Class Contabilidad2_CatCuentas
ArbolCuentas.DataSource = DtDatos ArbolCuentas.DataSource = DtDatos
'.Attributes.Add("data-hijos","0"); '.Attributes.Add("data-hijos","0");
Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem) Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem)
item.Attributes.Item("data-hijos") = item.Attributes.Item("data-hijos").ToEntero + 1 item.Attributes.Item("data-hijos") = (item.Attributes.Item("data-hijos").ToEntero + 1).ToString
Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL) Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL)
If (IsNothing(objul)) Then If (IsNothing(objul)) Then
objul = New ADServerControl.DragableUL objul = New ADServerControl.DragableUL
@@ -636,7 +636,6 @@ Partial Class Contabilidad2_CatCuentas
'ObjConta.IniciaTransacSQL() 'ObjConta.IniciaTransacSQL()
If ObjConta.RemoveCuenta(IDSelected.ToEntero) Then If ObjConta.RemoveCuenta(IDSelected.ToEntero) Then
' ObjConta.Commit()
Dim customerRow As Data.DataRow Dim customerRow As Data.DataRow
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0) customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
@@ -646,7 +645,7 @@ Partial Class Contabilidad2_CatCuentas
ArbolCuentas.DataSource = DtDatos ArbolCuentas.DataSource = DtDatos
Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem) Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem)
Dim padre As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", item.CvePadre)), ADServerControl.DragableItem) Dim padre As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", item.CvePadre)), ADServerControl.DragableItem)
padre.Attributes.Item("data-hijos") = padre.Attributes.Item("data-hijos").ToEntero - 1 padre.Attributes.Item("data-hijos") = (padre.Attributes.Item("data-hijos").ToEntero - 1).ToString
ArbolCuentas.Controls.Remove(item) ArbolCuentas.Controls.Remove(item)
RegistraScript(String.Format("$('#{0}').click();", editar.ClientID)) RegistraScript(String.Format("$('#{0}').click();", editar.ClientID))

View File

@@ -165,15 +165,15 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If CveCliente > 0 Then If CveCliente > 0 Then
Dim drp As String = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre") Dim drp As String = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre")
DdlClientes.ddl.Items.Insert(0, New ListItem(drp, CveCliente)) DdlClientes.ddl.Items.Insert(0, New ListItem(drp, CveCliente.ToString))
DdlClientes.SelectedValue = CveCliente DdlClientes.SelectedValue = CveCliente.ToString
DdlClientes.SelectedText = drp DdlClientes.SelectedText = drp
End If End If
If CvePersonal > 0 Then If CvePersonal > 0 Then
Dim drp As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal).FiltroPrimeroValor("NombreCompleto") Dim drp As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal).FiltroPrimeroValor("NombreCompleto")
DdlPersonal.ddl.Items.Insert(0, New ListItem(drp, CvePersonal)) DdlPersonal.ddl.Items.Insert(0, New ListItem(drp, CvePersonal.ToString))
DdlPersonal.SelectedValue = CvePersonal DdlPersonal.SelectedValue = CvePersonal.ToString
DdlPersonal.SelectedText = drp DdlPersonal.SelectedText = drp
End If End If
@@ -301,12 +301,12 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Private Sub LimpiarDatos() Private Sub LimpiarDatos()
CveConceptoAsignacion = -1 CveConceptoAsignacion = -1
DdlCconceptosContables.SelectedValue = -1 DdlCconceptosContables.SelectedValue = "-1"
DdlCuenta.SelectedValue = -1 DdlCuenta.SelectedValue = "-1"
DdlProveedor.SelectedValue = -1 DdlProveedor.SelectedValue = "-1"
DdlClasificacion.SelectedValue = -1 DdlClasificacion.SelectedValue = "-1"
DdlAlmacen.SelectedValue = -1 DdlAlmacen.SelectedValue = "-1"
DdlConceptoNomina.SelectedValue = -1 DdlConceptoNomina.SelectedValue = "-1"
DdlCuentaBancaria.SelectedValueExist("-1") DdlCuentaBancaria.SelectedValueExist("-1")
TxtPorcentajeIVA.Text = "" TxtPorcentajeIVA.Text = ""
DdlClientes.ddl.DataSource = "" DdlClientes.ddl.DataSource = ""

View File

@@ -339,7 +339,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
TotalPadre = False TotalPadre = False
e.Row.ControlStyle.Font.Bold = False e.Row.ControlStyle.Font.Bold = False
CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False CType(e.Row.FindControl("tr1"), HtmlTableRow).Visible = False
e.Row.FCHyperLink("HLPoliza").NavigateUrl = String.Format("/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}", e.Row.DBCampo("CvePoliza")) e.Row.FCHyperLink("HLPoliza").NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", e.Row.DBCampo("CvePoliza"))
If e.Row.DBCampo("CargosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("CargosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4)) If e.Row.DBCampo("CargosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbCargos").Text = e.Row.DBCampo("CargosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4))
If e.Row.DBCampo("AbonosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("AbonosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4)) If e.Row.DBCampo("AbonosMovto").ToDouble <> 0 Then e.Row.FCLabel("LbAbonos").Text = e.Row.DBCampo("AbonosMovto").ToString.FormatoNumero(If("1" = "1", 2, 4))