Compilacion correciones

This commit is contained in:
rakcsle
2023-08-24 11:23:50 -07:00
parent d094d993a2
commit e36f1786ed
23 changed files with 115 additions and 114 deletions

View File

@@ -279,7 +279,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
End Sub End Sub
Private Sub DescargarExcel() Private Sub DescargarExcel()
Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows.Cast(Of GridViewRow)()
Where row.RowType = DataControlRowType.DataRow Where row.RowType = DataControlRowType.DataRow
Select New With Select New With
{ {

View File

@@ -244,8 +244,8 @@ Partial Class Inventarios_CatAlmacenes
'CargaSucursal() 'CargaSucursal()
Dim ObjAlmacen As New ClsInventarios Dim ObjAlmacen As New ClsInventarios
Dim TieneError = False Dim TieneError = False
Dim Estatus = 0 Dim Estatus As Boolean = False
If ChkEstatus.Checked Then Estatus = 1 If ChkEstatus.Checked Then Estatus = True
Dim CuentaContable As Integer = 0 Dim CuentaContable As Integer = 0
Dim CveCuenta As Integer = 0 Dim CveCuenta As Integer = 0
@@ -271,7 +271,7 @@ Partial Class Inventarios_CatAlmacenes
Else Else
TieneError = True TieneError = True
End If End If
ElseIf ObjAlmacen.UpdateAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, DdlModalidad.SelectedValue.ToEntero, (CByte(Estatus)), HdnID.Value.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero, CveAlmacenVirtual:=DdlAlmacenesVirtuales.SelectedValue.ToEntero) Then ElseIf ObjAlmacen.UpdateAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, DdlModalidad.SelectedValue.ToEntero, Estatus, HdnID.Value.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero, CveAlmacenVirtual:=DdlAlmacenesVirtuales.SelectedValue.ToEntero) Then
Alert("El Almacen se actualizo correctamente.", TipoMensaje.MsgInformacion) Alert("El Almacen se actualizo correctamente.", TipoMensaje.MsgInformacion)
UpDatos.Update() UpDatos.Update()
ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
@@ -290,7 +290,7 @@ Partial Class Inventarios_CatAlmacenes
Public Sub Agregar() Public Sub Agregar()
HdnModalidad.Value = "A" HdnModalidad.Value = "A"
UpDatos.Update() UpDatos.Update()
If DdlModalidad.SelectedValue = 1 Then If DdlModalidad.SelectedValue.ToEntero = 1 Then
DdlCuentasContables.Visible = True DdlCuentasContables.Visible = True
End If End If
BtnAgregarAlmacen.Text = "Agregar" BtnAgregarAlmacen.Text = "Agregar"
@@ -328,9 +328,9 @@ Partial Class Inventarios_CatAlmacenes
UpDatos.Update() UpDatos.Update()
BtnAgregarAlmacen.Text = "Actualizar" BtnAgregarAlmacen.Text = "Actualizar"
myModalLabel.InnerText = "Actualizar Almacén" myModalLabel.InnerText = "Actualizar Almacén"
DdlInventariable.SelectedValue = If((GvRow.DataKey("Inventariable")) = "True", 1, 0) DdlInventariable.SelectedValueExist(If((GvRow.DataKey("Inventariable")) = "True", 1, 0))
DdlModalidad.SelectedValue = If((GvRow.DataKey("Modalidad")) = "Solo Existencia", 0, 1) DdlModalidad.SelectedValueExist(If((GvRow.DataKey("Modalidad")) = "Solo Existencia", 0, 1))
divddlcc.Visible = If((DdlModalidad.SelectedValue) = 1, True, False) divddlcc.Visible = If((DdlModalidad.SelectedValue.ToEntero) = 1, True, False)
DdlCuentasContables.SelectedValueExist(GvRow.DataKey("IdCtaContable")) DdlCuentasContables.SelectedValueExist(GvRow.DataKey("IdCtaContable"))
DdlCuentasSig.SelectedValueExist(-1) DdlCuentasSig.SelectedValueExist(-1)
DdlCuentasSig.SelectedValueExist(GvRow.DataKey("CveCuenta")) DdlCuentasSig.SelectedValueExist(GvRow.DataKey("CveCuenta"))
@@ -354,7 +354,7 @@ Partial Class Inventarios_CatAlmacenes
End Sub End Sub
Private Sub DdlModalidad_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlModalidad.SelectedIndexChanged Private Sub DdlModalidad_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlModalidad.SelectedIndexChanged
If DdlModalidad.SelectedValue = 1 Then If DdlModalidad.SelectedValue.ToEntero = 1 Then
divddlcc.Visible = True divddlcc.Visible = True
CargaCuentasContables() CargaCuentasContables()
Else Else
@@ -366,7 +366,7 @@ Partial Class Inventarios_CatAlmacenes
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
Dim ObjAlmacen As New ClsInventarios Dim ObjAlmacen As New ClsInventarios
If ObjAlmacen.GetAlmacenes(DdlTipoAlmacenFiltro.SelectedValue, DdlModalidadFiltro.SelectedValue, UsuarioActual.CveEmpresa, DdlSubProyectoFiltro.SelectedValue.ToEntero) Then If ObjAlmacen.GetAlmacenes(DdlTipoAlmacenFiltro.SelectedValue.ToEntero, DdlModalidadFiltro.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyectoFiltro.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) GvDatos.DataSource = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GvDatos.DataBind() GvDatos.DataBind()
Else Else

View File

@@ -29,7 +29,7 @@ Partial Class Inventarios_ConsignacionesMaterial
CreaDTCons() CreaDTCons()
InicializarListas() InicializarListas()
TxtFecha.Text = Now TxtFecha.Text = Now.ToString("dd/MM/yyyy")
End If End If
End Sub End Sub
Private Sub CreaDTCons() Private Sub CreaDTCons()
@@ -108,7 +108,7 @@ Partial Class Inventarios_ConsignacionesMaterial
CveMovimientoC = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 6, 1, TxtFecha.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal) CveMovimientoC = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 6, 1, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal)
If CveMovimientoC <= 0 Then If CveMovimientoC <= 0 Then
Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError) Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError)
@@ -120,7 +120,7 @@ Partial Class Inventarios_ConsignacionesMaterial
If Not gr.FCTextBox("tbCantR").Text.ToString = "" Then If Not gr.FCTextBox("tbCantR").Text.ToString = "" Then
If Not Mov.AddMovimientoDetalle(CveMovimientoC, gr.FCTextBox("tbCantR").Text.ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveUnidadMedida").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CvePS").ToString.ToEntero, If Not Mov.AddMovimientoDetalle(CveMovimientoC, gr.FCTextBox("tbCantR").Text.ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveUnidadMedida").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CvePS").ToString.ToEntero,
DTmp.Rows(gr.RowIndex)("PU").ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveSeccionAlmacen").ToString.ToEntero) Then DTmp.Rows(gr.RowIndex)("PU").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CveSeccionAlmacen").ToString.ToEntero) Then
Mensaje = "Error al guardar los movimientos" Mensaje = "Error al guardar los movimientos"
Exit For Exit For
End If End If
@@ -128,7 +128,7 @@ Partial Class Inventarios_ConsignacionesMaterial
Next Next
CveMovimiento = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 3, 1, TxtFecha.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal) CveMovimiento = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 3, 1, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal)
If CveMovimiento <= 0 Then If CveMovimiento <= 0 Then
Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError) Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError)
@@ -138,7 +138,7 @@ Partial Class Inventarios_ConsignacionesMaterial
For Each gr As GridViewRow In GvConsignacion.Rows For Each gr As GridViewRow In GvConsignacion.Rows
If Not gr.FCTextBox("tbCantR").Text.ToString = "" Then If Not gr.FCTextBox("tbCantR").Text.ToString = "" Then
If Not Mov.AddMovimientoDetalle(CveMovimiento, gr.FCTextBox("tbCantR").Text.ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveUnidadMedida").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CvePS").ToString.ToEntero, If Not Mov.AddMovimientoDetalle(CveMovimiento, gr.FCTextBox("tbCantR").Text.ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveUnidadMedida").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CvePS").ToString.ToEntero,
DTmp.Rows(gr.RowIndex)("PU").ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveSeccionAlmacen").ToString.ToEntero) Then DTmp.Rows(gr.RowIndex)("PU").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CveSeccionAlmacen").ToString.ToEntero) Then
Mensaje = "Error al guardar los movimientos" Mensaje = "Error al guardar los movimientos"
Exit For Exit For
End If End If
@@ -181,7 +181,7 @@ Partial Class Inventarios_ConsignacionesMaterial
If CveConcepto = 7 Then If CveConcepto = 7 Then
If tbCant.Text >= Total Then If tbCant.Text.ToDouble >= Total Then
Alert("No hay existencia suficiente en el Inventario.", TipoMensaje.MsgInformacion) Alert("No hay existencia suficiente en el Inventario.", TipoMensaje.MsgInformacion)
ObjInventario.Dispose() ObjInventario.Dispose()
@@ -204,7 +204,7 @@ Partial Class Inventarios_ConsignacionesMaterial
End If End If
AddDTmp(tbCant.Text.ToDouble, ddlUnidad.SelectedValue.ToEntero, ddlUnidad.SelectedItem.ToString, ddlProducto.SelectedValue, ddlProducto.SelectedItem.ToString, DdlAlmacen.SelectedItem.ToString, DdlAlmacen.SelectedValue.ToEntero, DdlSeccion.SelectedValue.ToEntero) AddDTmp(tbCant.Text.ToEntero, ddlUnidad.SelectedValue.ToEntero, ddlUnidad.SelectedItem.ToString, ddlProducto.SelectedValue.ToEntero, ddlProducto.SelectedItem.ToString, DdlAlmacen.SelectedItem.ToString, DdlAlmacen.SelectedValue.ToEntero, DdlSeccion.SelectedValue.ToEntero)
tbCant.Text = "" tbCant.Text = ""
GvConsignacion.DataSource = DTmp GvConsignacion.DataSource = DTmp
GvConsignacion.DataBind() GvConsignacion.DataBind()
@@ -240,7 +240,7 @@ Partial Class Inventarios_ConsignacionesMaterial
Protected Sub DdlPersonal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPersonal.SelectedIndexChanged Protected Sub DdlPersonal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPersonal.SelectedIndexChanged
Dim ObjInventario As New ClsInventarios Dim ObjInventario As New ClsInventarios
If ObjInventario.GetConsignaciones(UsuarioActual.CveEmpresa, DdlPersonal.SelectedValue) Then If ObjInventario.GetConsignaciones(UsuarioActual.CveEmpresa, DdlPersonal.SelectedValue.ToEntero) Then
GvConsignacion.DataSource = ObjInventario.DtResultados GvConsignacion.DataSource = ObjInventario.DtResultados
DTmp = ObjInventario.DtResultados DTmp = ObjInventario.DtResultados
@@ -264,7 +264,7 @@ Partial Class Inventarios_ConsignacionesMaterial
CvePersonal = DdlPersonal.SelectedValue.ToEntero CvePersonal = DdlPersonal.SelectedValue.ToEntero
For Each dr As DataRow In DTmp.FiltraParametros("", DistinctColumns:={"CveAlmacen"}).Rows For Each dr As DataRow In DTmp.FiltraParametros("", DistinctColumns:={"CveAlmacen"}).Rows
CveMovimiento = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 6, 1, TxtFecha.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal) CveMovimiento = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 6, 1, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal)
If CveMovimiento <= 0 Then If CveMovimiento <= 0 Then
Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError) Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError)
@@ -274,7 +274,7 @@ Partial Class Inventarios_ConsignacionesMaterial
For Each gr As GridViewRow In GvConsignacion.Rows For Each gr As GridViewRow In GvConsignacion.Rows
If Not gr.FCTextBox("tbCantR").Text.ToString = "" Then If Not gr.FCTextBox("tbCantR").Text.ToString = "" Then
If Not Mov.AddMovimientoDetalle(CveMovimiento, gr.FCTextBox("tbCantR").Text.ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveUnidadMedida").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CvePS").ToString.ToEntero, If Not Mov.AddMovimientoDetalle(CveMovimiento, gr.FCTextBox("tbCantR").Text.ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveUnidadMedida").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CvePS").ToString.ToEntero,
DTmp.Rows(gr.RowIndex)("PU").ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveSeccionAlmacen").ToString.ToEntero) Then DTmp.Rows(gr.RowIndex)("PU").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CveSeccionAlmacen").ToString.ToEntero) Then
Mensaje = "Error al guardar los movimientos" Mensaje = "Error al guardar los movimientos"
Exit For Exit For
End If End If
@@ -314,7 +314,7 @@ Partial Class Inventarios_ConsignacionesMaterial
Protected Sub cbEC_CheckedChanged(sender As Object, e As EventArgs) Handles cbEC.CheckedChanged Protected Sub cbEC_CheckedChanged(sender As Object, e As EventArgs) Handles cbEC.CheckedChanged
If Not DdlPersonal.SelectedValue.ToEntero = -1 Then If Not DdlPersonal.SelectedValue.ToEntero = -1 Then
Dim ObjInventario As New ClsInventarios Dim ObjInventario As New ClsInventarios
If ObjInventario.GetConsignaciones(UsuarioActual.CveEmpresa, DdlPersonal.SelectedValue) Then If ObjInventario.GetConsignaciones(UsuarioActual.CveEmpresa, DdlPersonal.SelectedValue.ToEntero) Then
GvConsignacion.DataSource = ObjInventario.DtResultados GvConsignacion.DataSource = ObjInventario.DtResultados
DTmp = ObjInventario.DtResultados DTmp = ObjInventario.DtResultados
@@ -368,7 +368,7 @@ Partial Class Inventarios_ConsignacionesMaterial
CveMovimiento = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 7, 1, TxtFecha.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal) CveMovimiento = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 7, 1, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal)
If CveMovimiento <= 0 Then If CveMovimiento <= 0 Then
Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError) Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError)
@@ -379,7 +379,7 @@ Partial Class Inventarios_ConsignacionesMaterial
For Each row As DataRow In DTmp.FiltraParametros("Nuevo=1").Rows For Each row As DataRow In DTmp.FiltraParametros("Nuevo=1").Rows
If Not Mov.AddMovimientoDetalle(CveMovimiento, row("Cantidad").ToString.ToDouble, row("CveUnidadMedida").ToString.ToEntero, row("CvePS").ToString.ToEntero, row("PU").ToString.ToDouble, If Not Mov.AddMovimientoDetalle(CveMovimiento, row("Cantidad").ToString.ToDouble, row("CveUnidadMedida").ToString.ToEntero, row("CvePS").ToString.ToEntero, row("PU").ToString.ToDecimal,
row("CveSeccionAlmacen").ToString.ToEntero) Then row("CveSeccionAlmacen").ToString.ToEntero) Then
Mensaje = "Error al guardar los movimientos" Mensaje = "Error al guardar los movimientos"
Exit For Exit For
@@ -420,7 +420,7 @@ Partial Class Inventarios_ConsignacionesMaterial
Protected Sub GvConsignacion_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvConsignacion.RowDataBound Protected Sub GvConsignacion_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvConsignacion.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Nuevo") = 0 Then If e.Row.DBCampo("Nuevo").ToEntero = 0 Then
e.Row.FCImageButton("imgD").Visible = False e.Row.FCImageButton("imgD").Visible = False
e.Row.FCTextBox("tbCantR").Attributes.Add("onchange", String.Format("ValidarCantidad(this,{0})", e.Row.DBCampo("Cantidad"))) e.Row.FCTextBox("tbCantR").Attributes.Add("onchange", String.Format("ValidarCantidad(this,{0})", e.Row.DBCampo("Cantidad")))
End If End If

View File

@@ -72,12 +72,12 @@ Partial Class Inventarios_Equivalencia
End If End If
If psEquivalencias.AddPSEquivalencias(ddlProducto.SelectedValue.ToEntero, CveUnidadMedida, Cantidad, UnidadBase, Precio, 1) Then If psEquivalencias.AddPSEquivalencias(ddlProducto.SelectedValue.ToEntero, CveUnidadMedida, Cantidad.ToDecimal, UnidadBase, Precio, 1) Then
gvEquivalencias.DataSource = psEquivalencias.DtResultados gvEquivalencias.DataSource = psEquivalencias.DtResultados
ViewState("dtEquivalencias") = psEquivalencias.DtResultados ViewState("dtEquivalencias") = psEquivalencias.DtResultados
txtCantidad.Text = "" txtCantidad.Text = ""
@@ -137,7 +137,7 @@ Partial Class Inventarios_Equivalencia
If dt.Rows(i).Item("Base").ToString = "True" Then If dt.Rows(i).Item("Base").ToString = "True" Then
Dim psEquivalencias As New ClsProductosServicios Dim psEquivalencias As New ClsProductosServicios
If Not psEquivalencias.UpdatePSEquivalencias(ddlProducto.SelectedValue.ToEntero, dt.Rows(i).Item("CveUnidadMedida").ToString.ToEntero, dt.Rows(i).Item("Cantidad").ToString.ToDouble, False, dt.Rows(i).Item("Precio").ToString.ToDouble, 1) Then If Not psEquivalencias.UpdatePSEquivalencias(ddlProducto.SelectedValue.ToEntero, dt.Rows(i).Item("CveUnidadMedida").ToString.ToEntero, dt.Rows(i).Item("Cantidad").ToString.ToDecimal, False, dt.Rows(i).Item("Precio").ToString.ToDouble, 1) Then
Alert("Error al actualizar registro.", TipoMensaje.MsgError) Alert("Error al actualizar registro.", TipoMensaje.MsgError)
Return dt Return dt
End If End If
@@ -266,7 +266,7 @@ Partial Class Inventarios_Equivalencia
Dim base As Boolean = DirectCast(gvEquivalencias.Rows(e.RowIndex).FindControl("cbEBase"), CheckBox).Checked Dim base As Boolean = DirectCast(gvEquivalencias.Rows(e.RowIndex).FindControl("cbEBase"), CheckBox).Checked
Dim CveUnidadMedida As Integer = DirectCast(gvEquivalencias.Rows(e.RowIndex).FindControl("ddlEUnidad"), DropDownList).SelectedValue.ToEntero Dim CveUnidadMedida As Integer = DirectCast(gvEquivalencias.Rows(e.RowIndex).FindControl("ddlEUnidad"), DropDownList).SelectedValue.ToEntero
If psEquivalencias.UpdatePSEquivalencias(ddlProducto.SelectedValue.ToEntero, CveUnidadMedida, cantidad, base, precio, UsuarioActual.CveUsuario) Then If psEquivalencias.UpdatePSEquivalencias(ddlProducto.SelectedValue.ToEntero, CveUnidadMedida, cantidad.ToDecimal, base, precio, UsuarioActual.CveUsuario) Then
dt = psEquivalencias.DtResultados dt = psEquivalencias.DtResultados
If base Then If base Then
@@ -277,7 +277,7 @@ Partial Class Inventarios_Equivalencia
ViewState("dtEquivalencias") = dt ViewState("dtEquivalencias") = dt
gvEquivalencias.EditIndex = -1 gvEquivalencias.EditIndex = -1
gvEquivalencias.DataSource = dt gvEquivalencias.DataSource = dt
gvEquivalencias.DataBind() gvEquivalencias.DataBind()

View File

@@ -313,7 +313,7 @@ Partial Class Inventarios_InventarioFisicoDetalle
GvIFD.DataSource = Nothing GvIFD.DataSource = Nothing
End If End If
' DtDatos = Inventario.DtResultados ' DtDatos = Inventario.DtResultados
LtlTotalRegistros.Text = Inventario.DtResultados.Rows.Count LtlTotalRegistros.Text = Inventario.DtResultados.Rows.Count.ToString
End If End If
Inventario.Dispose() Inventario.Dispose()
GvIFD.DataBind() GvIFD.DataBind()
@@ -354,10 +354,10 @@ Partial Class Inventarios_InventarioFisicoDetalle
CveProducto = dr("CvePS").ToString.ToEntero CveProducto = dr("CvePS").ToString.ToEntero
CveUnidadMedida = dr("CveUnidadMedida").ToString.ToEntero CveUnidadMedida = dr("CveUnidadMedida").ToString.ToEntero
'Dim AplicaSeccion As Boolean = dr("AplicaSeccion") = "1" 'Dim AplicaSeccion As Boolean = dr("AplicaSeccion") = "1"
Dim AplicaCaducidad As Boolean = dr("AplicaCaducidad") = "1" Dim AplicaCaducidad As Boolean = dr("AplicaCaducidad").ToString = "1"
Dim AplicaLote As Boolean = dr("AplicaLote") = "1" Dim AplicaLote As Boolean = dr("AplicaLote").ToString = "1"
Dim AplicaSerie As Boolean = dr("AplicaSerie") = "1" Dim AplicaSerie As Boolean = dr("AplicaSerie").ToString = "1"
Dim AplicaSeccion As Boolean = dr("AplicaSeccion") = "1" Dim AplicaSeccion As Boolean = dr("AplicaSeccion").ToString = "1"
'divSeccionAlmacen.Visible = AplicaSeccion 'divSeccionAlmacen.Visible = AplicaSeccion
divLote.Visible = AplicaLote divLote.Visible = AplicaLote
@@ -453,7 +453,7 @@ Partial Class Inventarios_InventarioFisicoDetalle
If GvIFDUltimoRegistrado.Rows.Count > 0 Then If GvIFDUltimoRegistrado.Rows.Count > 0 Then
GvIFDUltimoRegistrado.Rows(0).Cells(0).Text = Now GvIFDUltimoRegistrado.Rows(0).Cells(0).Text = Now.ToString("dd/MM/yyyy")
GvIFDUltimoRegistrado.Rows(0).Cells(1).Text = dr("CodigoBarras").ToString GvIFDUltimoRegistrado.Rows(0).Cells(1).Text = dr("CodigoBarras").ToString
GvIFDUltimoRegistrado.Rows(0).Cells(2).Text = dr("Codigo").ToString GvIFDUltimoRegistrado.Rows(0).Cells(2).Text = dr("Codigo").ToString
GvIFDUltimoRegistrado.Rows(0).Cells(3).Text = dr("PSCodigo").ToString GvIFDUltimoRegistrado.Rows(0).Cells(3).Text = dr("PSCodigo").ToString
@@ -620,7 +620,7 @@ Partial Class Inventarios_InventarioFisicoDetalle
Protected Sub Impimir(Optional Formato As String = "PDF", Optional Agrupar As Boolean = False) Protected Sub Impimir(Optional Formato As String = "PDF", Optional Agrupar As Boolean = False)
Dim DtDatos As New DataTable Dim DtDatos As New DataTable
Dim ObjInventario As New ClsInventarios() Dim ObjInventario As New ClsInventarios()
If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue, Agrupar:=Agrupar) Then If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToEntero, Agrupar:=Agrupar) Then
DtDatos = ObjInventario.DtResultados.FiltraParametros("CveInventarioFisico > 0 ").Copy DtDatos = ObjInventario.DtResultados.FiltraParametros("CveInventarioFisico > 0 ").Copy
End If End If
ObjInventario.Dispose() ObjInventario.Dispose()
@@ -773,9 +773,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
Alert("La cantidad debe ser mayor a 0", TipoMensaje.MsgAdvertencia) Alert("La cantidad debe ser mayor a 0", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
Dim serie As String = IIf(TxtSerieLote.Text.ToString = "", "-1", TxtSerieLote.Text.ToString) Dim serie As String = If(TxtSerieLote.Text.ToString = "", "-1", TxtSerieLote.Text.ToString)
Dim Lote As String = IIf(TxtLoteEdit.Text.ToString = "", "-1", TxtLoteEdit.Text.ToString) Dim Lote As String = If(TxtLoteEdit.Text.ToString = "", "-1", TxtLoteEdit.Text.ToString)
Dim FechaCaducidad As Date = IIf(TxtFechaCaducida.Text.ToString = "", MinFecha, TxtFechaCaducida.Text.ToString.ToDate) Dim FechaCaducidad As Date = If(TxtFechaCaducida.Text.ToString = "", MinFecha, TxtFechaCaducida.Text.ToString.ToDate)
If objInventario.UpdateInventarioFisicoDetalles(HfCveInventarioFisicoDetalle.Value.ToEntero, HfCvePS.Value.ToEntero, HfCveUM.Value.ToEntero, TxtCantidad.Text.ToDecimal, serie, Lote, FechaCaducidad) Then If objInventario.UpdateInventarioFisicoDetalles(HfCveInventarioFisicoDetalle.Value.ToEntero, HfCvePS.Value.ToEntero, HfCveUM.Value.ToEntero, TxtCantidad.Text.ToDecimal, serie, Lote, FechaCaducidad) Then
If objInventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then If objInventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then

View File

@@ -66,7 +66,7 @@ Partial Class Inventarios_KardexAlmacen
Private Sub CargaPS() Private Sub CargaPS()
If Not ddlProducto2.UsaWebService Then If Not ddlProducto2.UsaWebService Then
Dim Filtro = If(DdlClasificacion.SelectedValue >= 0, String.Format("CveClasificacion={0} And CveTipoPS=2", DdlClasificacion.SelectedValue), "CveTipoPS=2") Dim Filtro = If(DdlClasificacion.SelectedValue.ToEntero >= 0, String.Format("CveClasificacion={0} And CveTipoPS=2", DdlClasificacion.SelectedValue), "CveTipoPS=2")
ddlProducto2.ddl.Items.Clear() ddlProducto2.ddl.Items.Clear()
ddlProducto2.DataSource = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(Filtro, "PSCodigo") ddlProducto2.DataSource = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(Filtro, "PSCodigo")
ddlProducto2.DataBind() ddlProducto2.DataBind()

View File

@@ -22,7 +22,7 @@ Partial Class Inventarios_KardexAlmacen
DdlOrden.Visible = True DdlOrden.Visible = True
LblMarca.Visible = True LblMarca.Visible = True
DdlMarca.Visible = True DdlMarca.Visible = True
DdlOrden.SelectedValue = 2 DdlOrden.SelectedValueExist(2)
End If End If
If UsuarioActual.CveEmpresa = 119 Then If UsuarioActual.CveEmpresa = 119 Then
@@ -154,7 +154,7 @@ Partial Class Inventarios_KardexAlmacen
Dim IncluyeTransitorios As Integer = DdlIncluyeTransitorios.SelectedValue.ToEntero Dim IncluyeTransitorios As Integer = DdlIncluyeTransitorios.SelectedValue.ToEntero
If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), IncluyeTransitorios, If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), IncluyeTransitorios,
DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue, DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue.ToEntero,
Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO) Then Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO) Then
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
dt = ObjMovimientos.DtResultados dt = ObjMovimientos.DtResultados
@@ -189,7 +189,7 @@ Partial Class Inventarios_KardexAlmacen
GvDatos.DataBind() GvDatos.DataBind()
For index = 4 To GvDatos.Rows(0).Cells.Count - 1 For index = 4 To GvDatos.Rows(0).Cells.Count - 1
GvDatos.HeaderRow.Cells(index).Text = GvDatos.HeaderRow.Cells(index).Text.Split("|")(0) GvDatos.HeaderRow.Cells(index).Text = GvDatos.HeaderRow.Cells(index).Text.Split("|"c)(0)
Next Next
End Sub End Sub
@@ -214,9 +214,9 @@ Partial Class Inventarios_KardexAlmacen
If IsNumeric(Celda) Then If IsNumeric(Celda) Then
Dim CveAlmacen2 As Integer = -1 Dim CveAlmacen2 As Integer = -1
If Index >= 5 Then If Index >= 5 Then
Dim Array = GvDatos.HeaderRow.Cells(Index).Text.Split("|") Dim Array As String() = GvDatos.HeaderRow.Cells(Index).Text.Split("|"c)
If Array.Length > 1 Then If Array.Length > 1 Then
CveAlmacen2 = Array(1) CveAlmacen2 = Array(1).ToEntero
End If End If
End If End If
@@ -511,7 +511,7 @@ Partial Class Inventarios_KardexAlmacen
Protected Sub BtnDescargarPOG_Click(sender As Object, e As EventArgs) Protected Sub BtnDescargarPOG_Click(sender As Object, e As EventArgs)
Dim Fecha As Date = txtFechaI.Text.ToDate Dim Fecha As Date = txtFechaI.Text.ToDate
Dim Nombre As String = IIf(RBLPOG.SelectedValue = "0", "Ventas-", "Existencias-") Dim Nombre As String = If(RBLPOG.SelectedValue = "0", "Ventas-", "Existencias-")
Using ObjInventario As New ClsInventarios Using ObjInventario As New ClsInventarios

View File

@@ -223,7 +223,7 @@ Partial Class Inventarios_PrestamosdeProveedor
ErrorMovInv = True ErrorMovInv = True
End If End If
Dim CveClasifCosto As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", String.Format("CvePS ={0} ", CvePS)) Dim CveClasifCosto As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", String.Format("CvePS ={0} ", CvePS)).ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, tValorInventario, tValorInventario, 68, TxtObservacionesEntrega.Text.Trim, TxtObservacionesEntrega.Text.Trim, CveMovimientoAlmacen:=CveMovimientoSalida) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, tValorInventario, tValorInventario, 68, TxtObservacionesEntrega.Text.Trim, TxtObservacionesEntrega.Text.Trim, CveMovimientoAlmacen:=CveMovimientoSalida) Then
ErrorMovInv = True ErrorMovInv = True

View File

@@ -22,7 +22,7 @@ Partial Class Inventarios_RepUMEquivalencia
Public Sub CargaDatos() Public Sub CargaDatos()
Dim ObjInv As New ClsInventarios Dim ObjInv As New ClsInventarios
If ObjInv.RepExistenciasEquivalencias( DdlClasificacion.SelectedValue,-1,UsuarioActual.CveEmpresa) Then If ObjInv.RepExistenciasEquivalencias(DdlClasificacion.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
GVDatos.DataSource = ObjInv.DtResultados GVDatos.DataSource = ObjInv.DtResultados
If ObjInv.DtResultados.Columns.Count <= 5 Then If ObjInv.DtResultados.Columns.Count <= 5 Then
divGvdatos.Style.Add("width", "50%") divGvdatos.Style.Add("width", "50%")
@@ -44,7 +44,7 @@ Partial Class Inventarios_RepUMEquivalencia
divHeader.Style.Add("width", "96.5%") divHeader.Style.Add("width", "96.5%")
End If End If
End If End If
divGvdatos.Visible = True divGvdatos.Visible = True
UpDatos.Update() UpDatos.Update()
ObjInv.Dispose() ObjInv.Dispose()
GVDatos.DataBind() GVDatos.DataBind()

View File

@@ -21,7 +21,7 @@ Partial Class MF_CatOperadores
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
ElseIf HdnModalidad.Value = "U" Then ElseIf HdnModalidad.Value = "U" Then
If ObjMF.UpdateOperador(HdnID.Value, TxtOperador.Text, Estatus) Then If ObjMF.UpdateOperador(HdnID.Value.ToEntero, TxtOperador.Text, Estatus) Then
CargaDatos() CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -75,7 +75,7 @@ Partial Class MF_CatOperadores
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnID.Value = GvRow.DataKey("CveOperador") HdnID.Value = GvRow.DataKey("CveOperador")
UpDatos.Update() UpDatos.Update()
If ObjMF.RemoveOperador(HdnID.Value) Then If ObjMF.RemoveOperador(HdnID.Value.ToEntero) Then
CargaDatos() CargaDatos()
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -90,7 +90,7 @@ Partial Class MF_CatOperadores
Private Sub GvOperador_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOperador.RowDataBound Private Sub GvOperador_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOperador.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Estatus") = True Then If Boolean.Parse(e.Row.DBCampo("Estatus")) = True Then
e.Row.FCLabel("LblEstatus").Text = "Activo" e.Row.FCLabel("LblEstatus").Text = "Activo"
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green

View File

@@ -157,7 +157,7 @@ Partial Class Nomina_ReportePTU
If Not IsNothing(rowc) Then If Not IsNothing(rowc) Then
CveConcepto = rowc("CveConcepto").ToString().ToEntero() CveConcepto = rowc("CveConcepto").ToString().ToEntero()
Else Else
CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, 0, -1, 0, 0, 0, 0, 0, -1, 1, -1, -1, -1, -1) CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, False, -1, 0, 0, 0, 0, 0, -1, 1, -1, -1, -1, -1)
End If End If
If CveConcepto < 1 Then If CveConcepto < 1 Then
continuar = False continuar = False
@@ -171,7 +171,7 @@ Partial Class Nomina_ReportePTU
CvePeriodo = CvePeriodoSeleccionado CvePeriodo = CvePeriodoSeleccionado
If continuar Then If continuar Then
continuar = objNomina.AddUtilidad(CvePersonal, Importe, CvePeriodo, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ejercicio, DiasLaborados, SueldoTotal) continuar = objNomina.AddUtilidad(CvePersonal, Importe, CvePeriodo, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ejercicio, DiasLaborados, SueldoTotal.ToDecimal)
End If End If
If Not continuar Then If Not continuar Then
Exit For Exit For
@@ -233,7 +233,7 @@ Partial Class Nomina_ReportePTU
End Sub End Sub
Protected Sub GVTipoPeriodo_RowDataBound(sender As Object, e As GridViewRowEventArgs) Protected Sub GVTipoPeriodo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If (Not IsNothing(dtPeriodos) AndAlso dtPeriodos.Rows.Count()) Then If (Not IsNothing(dtPeriodos) AndAlso dtPeriodos.Rows.Count > 0) Then
Dim dddlperiodo As DropDownList = e.Row.FCDropDownList("ddlPeriodo") Dim dddlperiodo As DropDownList = e.Row.FCDropDownList("ddlPeriodo")
dddlperiodo.DataSource = dtPeriodos.FiltraParametros(String.Format("CveTipoPeriodo={0}", e.Row.DataKey("CveTipoPeriodo"))) dddlperiodo.DataSource = dtPeriodos.FiltraParametros(String.Format("CveTipoPeriodo={0}", e.Row.DataKey("CveTipoPeriodo")))
dddlperiodo.DataBind() dddlperiodo.DataBind()

View File

@@ -36,7 +36,7 @@ Partial Class Nominas_SobreRecibo
If CvePersonal > 0 AndAlso CvePeriodo > 0 Then If CvePersonal > 0 AndAlso CvePeriodo > 0 Then
CargaDatos() CargaDatos()
CargaPersonal() CargaPersonal()
DdlPersonal.SelectedValue = CvePersonal DdlPersonal.SelectedValueExist(CvePersonal)
LtNombrePersonal.Text = DdlPersonal.SelectedItem.Text LtNombrePersonal.Text = DdlPersonal.SelectedItem.Text
UPFiltros.Visible = False UPFiltros.Visible = False
End If End If
@@ -134,7 +134,7 @@ Partial Class Nominas_SobreRecibo
e.Row.Cells(0).Style.Add("padding-left", "16px") e.Row.Cells(0).Style.Add("padding-left", "16px")
End If End If
e.Row.FCLabel("LtlImporte").Text = e.Row.FCLabel("LtlImporte").Text.ToDecimal e.Row.FCLabel("LtlImporte").Text = e.Row.FCLabel("LtlImporte").Text
End If End If
End Sub End Sub

View File

@@ -306,7 +306,7 @@ Partial Class OC_CotizacionEnLinea
End If End If
For Each dr As GridViewRow In GvD.Rows For Each dr As GridViewRow In GvD.Rows
If Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString) Then If Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDecimal, dr.FCTextBox("txtCantidadSurtir").Text.ToDecimal, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString) Then
TieneError = True TieneError = True
Exit For Exit For
End If End If
@@ -366,12 +366,12 @@ Partial Class OC_CotizacionEnLinea
If objCotizacion.GetOC(CveOrdenCompra, CveEmpresa) Then If objCotizacion.GetOC(CveOrdenCompra, CveEmpresa) Then
Dim Folio = "", Descripcion = "", Justificacion = "", Estatus = "", Empresa = "", FechaEstimadaEntrega = "" Dim Folio = "", Descripcion = "", Justificacion = "", Estatus = "", Empresa = "", FechaEstimadaEntrega = ""
Folio = objCotizacion.Folio Folio = objCotizacion.Folio.ToString
Descripcion = objCotizacion.Descripcion Descripcion = objCotizacion.Descripcion
Justificacion = objCotizacion.Justificacion Justificacion = objCotizacion.Justificacion
Estatus = objCotizacion.Estatus Estatus = objCotizacion.Estatus
Empresa = objCotizacion.Empresa Empresa = objCotizacion.Empresa
FechaEstimadaEntrega = objCotizacion.FechaEstimadaEntrega FechaEstimadaEntrega = objCotizacion.FechaEstimadaEntrega.ToString("dd/MM/yyyy")
If objCotizacion.GetCotizaciones(-1, CveCotizacion) Then If objCotizacion.GetCotizaciones(-1, CveCotizacion) Then
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ") strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")

View File

@@ -234,7 +234,7 @@ Partial Class OC_CotizacionEnvio
'Agrega CveCotizacion a la lista 'Agrega CveCotizacion a la lista
OrdenCotizacion.Add(objCotizacion.CveCotizacion) OrdenCotizacion.Add(objCotizacion.CveCotizacion)
For Each RowCD As DataRow In objCotizacion.DtResultados.Rows For Each RowCD As DataRow In objCotizacion.DtResultados.Rows
If Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, RowCD("CvePS").ToString.ToEntero, -1, RowCD("Cantidad").ToString.ToDouble, RowCD("CveUnidadMedida").ToString.ToEntero, 0, "-1", "", RowCD("CveOrdenCompraDetalle").ToString.ToEntero) Then TieneError = True : Exit For If Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, RowCD("CvePS").ToString.ToEntero, -1, RowCD("Cantidad").ToString.ToDecimal, RowCD("CveUnidadMedida").ToString.ToEntero, 0, "-1", "", RowCD("CveOrdenCompraDetalle").ToString.ToEntero) Then TieneError = True : Exit For
Next Next
'If TieneError = False Then 'If TieneError = False Then

View File

@@ -1,4 +1,5 @@
Option Explicit On Option Explicit On
Option Strict On
Imports System.Data Imports System.Data
Imports System.IO Imports System.IO
@@ -507,7 +508,7 @@ Partial Class OC_OC
If ViewState("MonedaTexto") Is Nothing Then If ViewState("MonedaTexto") Is Nothing Then
Return "" Return ""
Else Else
Return ViewState("MonedaTexto").ToString.ToEntero Return ViewState("MonedaTexto").ToString
End If End If
End Get End Get
Set(value As String) Set(value As String)
@@ -1402,7 +1403,7 @@ Partial Class OC_OC
DdlVendedor.SelectedValueExist(objOC.CveVendedor.ToString) DdlVendedor.SelectedValueExist(objOC.CveVendedor.ToString)
If DdlVendedor.SelectedValue <> objOC.CveVendedor.ToString Then If DdlVendedor.SelectedValue <> objOC.CveVendedor.ToString Then
DdlVendedor.Items.Insert(1, New ListItem(GlobalDTVendedores(UsuarioActual.CveEmpresa, False).FiltroPrimeroValor("Vendedor", $"CveVendedor = {objOC.CveVendedor}"), objOC.CveVendedor.ToString)) DdlVendedor.Items.Insert(1, New ListItem(GlobalDTVendedores(UsuarioActual.CveEmpresa, 0).FiltroPrimeroValor("Vendedor", $"CveVendedor = {objOC.CveVendedor}"), objOC.CveVendedor.ToString))
End If End If
End If End If
@@ -1427,9 +1428,9 @@ Partial Class OC_OC
Select Case objOC.PorcentajeIVA.ToString.ToDecimal Select Case objOC.PorcentajeIVA.ToString.ToDecimal
Case 0 Case 0
DdlIVA.SelectedValue = "1" DdlIVA.SelectedValue = "1"
Case 0.16 Case 0.16D
DdlIVA.SelectedValue = "1.16" DdlIVA.SelectedValue = "1.16"
Case 0.08 Case 0.08D
DdlIVA.SelectedValue = "1.08" DdlIVA.SelectedValue = "1.08"
End Select End Select
'If objOC.PorcentajeIVA.ToString.ToDecimal = 0 Then DdlIVA.SelectedValue = "1" Else DdlIVA.SelectedValue = "1.16" 'If objOC.PorcentajeIVA.ToString.ToDecimal = 0 Then DdlIVA.SelectedValue = "1" Else DdlIVA.SelectedValue = "1.16"
@@ -2273,7 +2274,7 @@ Partial Class OC_OC
If drProv IsNot Nothing Then If drProv IsNot Nothing Then
If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr
RetISR = 0.0125 RetISR = 0.0125D
End If End If
End If End If
End If End If
@@ -3342,7 +3343,7 @@ Partial Class OC_OC
If (Not HuboError) AndAlso objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega, If (Not HuboError) AndAlso objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega,
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=CveProveedor, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, CveUsuario, CveEmpresaActual, 0, pCveProveedor:=CveProveedor, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
PorcentajeIVA:=PorIVA, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, PorcentajeIVA:=PorIVA.ToDecimal, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal,
CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, NumRemision:=TxtNumRemision.Text.Trim) Then CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, NumRemision:=TxtNumRemision.Text.Trim) Then
@@ -4059,7 +4060,7 @@ Partial Class OC_OC
Dim drProv As DataRow = GlobalDTCompProveedores(CveEmpresaActual, CveProveedor:=DdlProveedores.SelectedValue.ToEntero).FiltroPrimero("") Dim drProv As DataRow = GlobalDTCompProveedores(CveEmpresaActual, CveProveedor:=DdlProveedores.SelectedValue.ToEntero).FiltroPrimero("")
If drProv IsNot Nothing Then If drProv IsNot Nothing Then
If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr
RetISR = 0.0125 RetISR = 0.0125D
End If End If
End If End If
End If End If
@@ -4594,7 +4595,7 @@ Partial Class OC_OC
Filtro.Clear() Filtro.Clear()
If DtPresupuestosTemp.Rows.Count > 0 Then If DtPresupuestosTemp.Rows.Count > 0 Then
disponible = ContPaq.GetSaldoCuenta(DtPresupuestosTemp.Rows(0)("IdCuentaPorEjercer").ToString.ToEntero, 0, TxtFecha.Text.ToDate.Year) disponible = ContPaq.GetSaldoCuenta(DtPresupuestosTemp.Rows(0)("IdCuentaPorEjercer").ToString.ToEntero, 0, TxtFecha.Text.ToDate.Year).ToDecimal
If disponible > 0 AndAlso disponible > Total Then If disponible > 0 AndAlso disponible > Total Then
'Alert("Si hay dinero: ") 'Alert("Si hay dinero: ")
@@ -5593,15 +5594,15 @@ Partial Class OC_OC
Dim PorcentajeIVA As Decimal = 0D Dim PorcentajeIVA As Decimal = 0D
If DrPS("IVA").ToString().Contiene("-1", "") Then If DrPS("IVA").ToString().Contiene("-1", "") Then
PorcentajeIVA = Row("IVAPorcentaje") PorcentajeIVA = Row("IVAPorcentaje").ToString.ToDecimal
Else Else
PorcentajeIVA = DrPS("IVA") PorcentajeIVA = DrPS("IVA").ToString.ToDecimal
End If End If
Dim ImporteIEPS As Decimal = (TotalCalculableImpuestos * PorcentajeIEPS).RoundSQL(2) Dim ImporteIEPS As Decimal = (TotalCalculableImpuestos * PorcentajeIEPS).RoundSQL(2)
Dim ImporteIVA As Decimal = (TotalCalculableImpuestosIVA * PorcentajeIVA).RoundSQL(2) Dim ImporteIVA As Decimal = (TotalCalculableImpuestosIVA * PorcentajeIVA).RoundSQL(2)
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalleCotizacion").ToString.ToEntero, CvePS, Cantidad, PU, ImporteIEPS, PorcentajeIEPS, ImporteIVA, PorcentajeIVA, "", UsuarioActual.CveUsuario) Then If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalleCotizacion").ToString.ToEntero, CvePS, Cantidad, PU, ImporteIEPS, PorcentajeIEPS, ImporteIVA, PorcentajeIVA, 0, "", UsuarioActual.CveUsuario) Then
OcurrioError = True OcurrioError = True
Exit For Exit For
End If End If
@@ -7297,13 +7298,13 @@ Partial Class OC_OC
End Sub End Sub
Private Sub CalculaGenerales() Private Sub CalculaGenerales()
Dim Subtotal As Decimal = DtDetalle.SUM("Total", "Total > 0") + DtDetalle.SUM("Descuento") Dim Subtotal As Decimal = DtDetalle.SUMD("Total", "Total > 0") + DtDetalle.SUMD("Descuento")
Dim Descuento As Decimal = DtDetalle.SUM("Descuento") Dim Descuento As Decimal = DtDetalle.SUMD("Descuento")
Dim SubTotalIEPSIVA As Decimal = DtDetalle.SUM("IEPSPSIVA") Dim SubTotalIEPSIVA As Decimal = DtDetalle.SUMD("IEPSPSIVA")
Dim IVA As Decimal = DtDetalle.SUM("IVA") + SubTotalIEPSIVA Dim IVA As Decimal = DtDetalle.SUMD("IVA") + SubTotalIEPSIVA
Dim SubTotalIEPS As Decimal = DtDetalle.SUM("IEPSPS") Dim SubTotalIEPS As Decimal = DtDetalle.SUMD("IEPSPS")
Dim SubTotalRetIVA As Decimal = DtDetalle.SUM("RetIVA") Dim SubTotalRetIVA As Decimal = DtDetalle.SUMD("RetIVA")
Dim SubTotalRetISR As Decimal = DtDetalle.SUM("RetISR") Dim SubTotalRetISR As Decimal = DtDetalle.SUMD("RetISR")
'SUBTOTAL 'SUBTOTAL
LblSubTotal.Text = (Subtotal).FormatoNumero LblSubTotal.Text = (Subtotal).FormatoNumero
@@ -7513,7 +7514,7 @@ Partial Class OC_OC
TxtRetIVA.Text = TxtRetIVA.Text.FormatoNumero TxtRetIVA.Text = TxtRetIVA.Text.FormatoNumero
HdnRetIVA.Value = TxtRetIVA.Text HdnRetIVA.Value = TxtRetIVA.Text
Dim Porcentaje As Decimal = TxtRetIVA.Text.ToDecimal / DtDetalle.SUM("Total") Dim Porcentaje As Decimal = TxtRetIVA.Text.ToDecimal / DtDetalle.SUMD("Total")
Dim LastDr As DataRow = Nothing Dim LastDr As DataRow = Nothing
For Each Dr As DataRow In DtDetalle.Rows For Each Dr As DataRow In DtDetalle.Rows
'Dr("RetIVA") = (Math.Truncate((Dr("Total").ToString.ToDecimal * Porcentaje) * 100)) / 100 'Dr("RetIVA") = (Math.Truncate((Dr("Total").ToString.ToDecimal * Porcentaje) * 100)) / 100
@@ -7930,7 +7931,7 @@ Partial Class OC_OC
'cantidad, Producto, Precio Unitario, Fecha Entrega, Observación 'cantidad, Producto, Precio Unitario, Fecha Entrega, Observación
Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows.Cast(Of GridViewRow)()
Join rowPS In DtPS On rowPS("CvePS").ToString().ToEntero() Equals row.DataKey("CvePS").ToEntero() Join rowPS In DtPS On rowPS("CvePS").ToString().ToEntero() Equals row.DataKey("CvePS").ToEntero()
Where row.RowType = DataControlRowType.DataRow Where row.RowType = DataControlRowType.DataRow
Select New With Select New With
@@ -8028,7 +8029,7 @@ Partial Class OC_OC
Try Try
Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
Dim DtOCDetalle As DataTable = (From row As GridViewRow In GvD.Rows Dim DtOCDetalle As DataTable = (From row As GridViewRow In GvD.Rows.Cast(Of GridViewRow)()
Join rowPS In DtPS On rowPS("CvePS").ToString().ToEntero() Equals row.DataKey("CvePS").ToEntero() Join rowPS In DtPS On rowPS("CvePS").ToString().ToEntero() Equals row.DataKey("CvePS").ToEntero()
Where row.RowType = DataControlRowType.DataRow Where row.RowType = DataControlRowType.DataRow
Select New With Select New With
@@ -8129,12 +8130,12 @@ Partial Class OC_OC
PU = ObjOC.DtResultados.FiltroPrimeroValor("Importe228").ToDecimal * TCAjuste PU = ObjOC.DtResultados.FiltroPrimeroValor("Importe228").ToDecimal * TCAjuste
ImporteCI176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteCI228").ToDecimal ImporteCI176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteCI228").ToDecimal
Importe176 = Importe228 + Importe229 Importe176 = Importe228 + Importe229
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Importe228, -Importe228, 228, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -Importe228, -Importe228, 228, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Importe229, -Importe229, 229, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -Importe229, -Importe229, 229, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
Else Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, Importe176, Importe176, 176, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=Importe176, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe176, Importe176, 176, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=Importe176, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
Else Else
@@ -8412,7 +8413,7 @@ Partial Class OC_OC
PorletIEAnticipo.Visible = True PorletIEAnticipo.Visible = True
GvAnticpos.DataSource = objbancos.DtResultados GvAnticpos.DataSource = objbancos.DtResultados
ImporteAnticipos = objbancos.DtResultados.SUM("Importe") ImporteAnticipos = objbancos.DtResultados.SUMD("Importe")
End If End If
@@ -8536,7 +8537,7 @@ Partial Class OC_OC
Dim IdCuentaComprometido As Integer = If(HdnCveCuentaComprometido.Value = String.Empty, -1, HdnCveCuentaComprometido.Value.ToEntero) Dim IdCuentaComprometido As Integer = If(HdnCveCuentaComprometido.Value = String.Empty, -1, HdnCveCuentaComprometido.Value.ToEntero)
Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100 Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100
AddPS(Cantidad, CvePS, PS, "", PrecioUnitario, 0, TotalPS, CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UM, Clasificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto, LblCodigo.Text, AddPS(Cantidad.ToString, CvePS, PS, "", PrecioUnitario, 0, TotalPS, CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UM, Clasificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto, LblCodigo.Text,
CveActivoFijo, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer, IdCuentaComprometido, DdlACGeneral1.SelectedValue.ToEntero, DdlACGeneral2.SelectedValue.ToEntero, DdlACGeneral3.SelectedValue.ToEntero, DdlACGeneral4.SelectedValue.ToEntero, CveActivoFijo, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer, IdCuentaComprometido, DdlACGeneral1.SelectedValue.ToEntero, DdlACGeneral2.SelectedValue.ToEntero, DdlACGeneral3.SelectedValue.ToEntero, DdlACGeneral4.SelectedValue.ToEntero,
DdlACGeneral5.SelectedValue.ToEntero, RetIVA, RetISR) DdlACGeneral5.SelectedValue.ToEntero, RetIVA, RetISR)
@@ -8635,7 +8636,7 @@ Partial Class OC_OC
Dim PS As String = GvRow.DataKey("PS") Dim PS As String = GvRow.DataKey("PS")
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal
Dim TotalPS As Decimal = GvRow.FCTextBox("TxtImporte").Text.ToDecimal Dim TotalPS As Decimal = GvRow.FCTextBox("TxtImporte").Text.ToDecimal
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida") Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
Dim UMAbreviatura As String = GvRow.DataKey("Abreviatura").ToString Dim UMAbreviatura As String = GvRow.DataKey("Abreviatura").ToString
Dim SubProyecto As String = GvRow.DataKey("SubProyecto") Dim SubProyecto As String = GvRow.DataKey("SubProyecto")
@@ -8661,7 +8662,7 @@ Partial Class OC_OC
If Cantidad > 0 Then If Cantidad > 0 Then
AddPS(Cantidad, CvePS, PS, PS, PU, 0, TotalPS, AddPS(Cantidad.ToString, CvePS, PS, PS, PU, 0, TotalPS,
CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UMAbreviatura, Clasificacion, CveProyecto, Proyecto, CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UMAbreviatura, Clasificacion, CveProyecto, Proyecto,
CveSubProyecto, SubProyecto, Codigo, -1, 0, -1, -1, IdCuentaPorEjercer, CveSubProyecto, SubProyecto, Codigo, -1, 0, -1, -1, IdCuentaPorEjercer,
IdCuentaComprometido, -1, -1, -1, -1, IdCuentaComprometido, -1, -1, -1, -1,

View File

@@ -30,7 +30,7 @@ Partial Class RegOp
Master.EsPopup = True Master.EsPopup = True
If Request("p") IsNot Nothing Then If Request("p") IsNot Nothing Then
If Decripta(Request("p")) Then If Decripta(Request("p")).Length > 0 Then
Dim Par As Hashtable = ClsPaginas.UrlParametros Dim Par As Hashtable = ClsPaginas.UrlParametros
Select Case Par("OP").ToString Select Case Par("OP").ToString

View File

@@ -260,7 +260,7 @@ Partial Class RepCotizaciones
'Ingresar los detalles 'Ingresar los detalles
For Each RowD As DataRow In DtCotizacionesDetalle.FiltraParametros("CveCotizacion = " + CveCotizacion.ToString).Rows For Each RowD As DataRow In DtCotizacionesDetalle.FiltraParametros("CveCotizacion = " + CveCotizacion.ToString).Rows
If Not objCotizacion.AddOrdenCompraDetalle(CveOrdenCompra, RowD("Cantidad").ToString.ToDouble, RowD("CveUnidadMedida").ToString.ToEntero, RowD("CvePS").ToString.ToEntero, 0, -1, If(Not IsDBNull(Row("CveActivoFijo")), Row("CveActivoFijo").ToString.ToEntero, -1), Row("Observacion").ToString, UsuarioActual.CveUsuario) Then If Not objCotizacion.AddOrdenCompraDetalle(CveOrdenCompra, RowD("Cantidad").ToString.ToDecimal, RowD("CveUnidadMedida").ToString.ToEntero, RowD("CvePS").ToString.ToEntero, 0, -1, If(Not IsDBNull(Row("CveActivoFijo")), Row("CveActivoFijo").ToString.ToEntero, -1), Row("Observacion").ToString, UsuarioActual.CveUsuario) Then
HuboError = True HuboError = True
End If End If
Next Next

View File

@@ -55,7 +55,7 @@ Partial Class OI_Circular
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
params.Add(New ReportParameter("FechaImpresion", Today)) params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("Filtros", String.Format("Fecha Inicial: {0} Fecha Final: {1}", TxtFechaI.Text, TxtFechaF.Text))) params.Add(New ReportParameter("Filtros", String.Format("Fecha Inicial: {0} Fecha Final: {1}", TxtFechaI.Text, TxtFechaF.Text)))
ImprimirPDF("Empresas/Grales/Formatos/Circulares.rdlc", DtDatos, params, "Circulares", "PDF", RDSName:="DataSet1") ImprimirPDF("Empresas/Grales/Formatos/Circulares.rdlc", DtDatos, params, "Circulares", "PDF", RDSName:="DataSet1")

View File

@@ -55,15 +55,15 @@ Partial Class OI_CircularDetalle
If ObjOI.GetCircular(UsuarioActual.CveEmpresa, CveCircular) Then If ObjOI.GetCircular(UsuarioActual.CveEmpresa, CveCircular) Then
Dim Circular As DataRow = ObjOI.DtResultados(0) Dim Circular As DataRow = ObjOI.DtResultados(0)
TxtAsunto.Text = Circular.Item("Asunto") TxtAsunto.Text = Circular.Item("Asunto").ToString
TxtCorreo.Value = Circular.Item("CorreosInternos") TxtCorreo.Value = Circular.Item("CorreosInternos").ToString
TxtCorreoAdicional.Value = Circular.Item("CorreosExternos") TxtCorreoAdicional.Value = Circular.Item("CorreosExternos").ToString
TxtCircular.Text = Circular.Item("Circular") TxtCircular.Text = Circular.Item("Circular").ToString
If Circular.Item("ArchivoAdjunto") <> "" Then If Circular.Item("ArchivoAdjunto").ToString <> "" Then
archivosDiv.Visible = True archivosDiv.Visible = True
HkArchivo.NavigateUrl = $"~/Empresas/{UsuarioActual.CveEmpresa}/Formatos/{Circular.Item("ArchivoAdjunto")}" HkArchivo.NavigateUrl = $"~/Empresas/{UsuarioActual.CveEmpresa}/Formatos/{Circular.Item("ArchivoAdjunto")}"
HkArchivo.Text = Circular.Item("ArchivoAdjunto") HkArchivo.Text = Circular.Item("ArchivoAdjunto").ToString
End If End If
UpCliente.Update() UpCliente.Update()
@@ -84,7 +84,7 @@ Partial Class OI_CircularDetalle
Dim ObjOI As New ClsOIEventos Dim ObjOI As New ClsOIEventos
If CveCircular > 0 Then If CveCircular > 0 Then
Dim AdjuntoValidate As String = NombreArchivo().Split("-")(1) Dim AdjuntoValidate As String = NombreArchivo().Split("-"c)(1)
If ObjOI.UpdateCircular(CveCircular, TxtAsunto.Text, TxtCircular.Text, TxtCorreo.Value, TxtCorreoAdicional.Value, AdjuntoValidate) Then If ObjOI.UpdateCircular(CveCircular, TxtAsunto.Text, TxtCircular.Text, TxtCorreo.Value, TxtCorreoAdicional.Value, AdjuntoValidate) Then
GuardarArchivo(CveCircular) GuardarArchivo(CveCircular)
@@ -93,7 +93,7 @@ Partial Class OI_CircularDetalle
Else Else
Dim CorreoExtra As String = If(TxtCorreoAdicional.Value = "", "-1", TxtCorreoAdicional.Value) Dim CorreoExtra As String = If(TxtCorreoAdicional.Value = "", "-1", TxtCorreoAdicional.Value)
Dim AdjuntoValidate As String = NombreArchivo().Split("-")(1) Dim AdjuntoValidate As String = NombreArchivo().Split("-"c)(1)
Dim CircularInsertado As Integer = ObjOI.AddCircular(TxtAsunto.Text, TxtCircular.Text, TxtCorreo.Value, Today.ToString, UsuarioActual.CveUsuario, Dim CircularInsertado As Integer = ObjOI.AddCircular(TxtAsunto.Text, TxtCircular.Text, TxtCorreo.Value, Today.ToString, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, CorreoExtra, AdjuntoValidate) UsuarioActual.CveEmpresa, CorreoExtra, AdjuntoValidate)
If CircularInsertado > 0 Then If CircularInsertado > 0 Then
@@ -118,8 +118,8 @@ Partial Class OI_CircularDetalle
End Sub End Sub
Private Sub LimpiarModal() Private Sub LimpiarModal()
DdlRolesFiltro.SelectedValue = -1 DdlRolesFiltro.SelectedValueExist(-1)
DdlSucursales.SelectedValue = -1 DdlSucursales.SelectedValueExist(-1)
GvUsuarios.DataSource = Nothing GvUsuarios.DataSource = Nothing
GvUsuarios.DataBind() GvUsuarios.DataBind()
UpUsuarios.Update() UpUsuarios.Update()
@@ -222,7 +222,7 @@ Partial Class OI_CircularDetalle
Protected Sub LnkMandarCorreo_Click() Handles LnkMandarCorreo.Click Protected Sub LnkMandarCorreo_Click() Handles LnkMandarCorreo.Click
Dim correos() As String Dim correos() As String
correos = TxtCorreo.Value.Split(Environment.NewLine) correos = TxtCorreo.Value.Split(New String() {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries)
Dim ArchivoBytes As Byte() = ArchivoBytesArrya(HkArchivo.Text) Dim ArchivoBytes As Byte() = ArchivoBytesArrya(HkArchivo.Text)
Dim Contador As Integer = 0 Dim Contador As Integer = 0
@@ -263,9 +263,9 @@ Partial Class OI_CircularDetalle
Dim ArchivoEnviar As String = String.Format("{0}Formatos\{1}", UsuarioActual.Empresa.Ruta, ArchivoNombre) Dim ArchivoEnviar As String = String.Format("{0}Formatos\{1}", UsuarioActual.Empresa.Ruta, ArchivoNombre)
If File.Exists(ArchivoEnviar) Then If File.Exists(ArchivoEnviar) Then
Dim fs As System.IO.FileStream = System.IO.File.Open(ArchivoEnviar, IO.FileMode.Open, IO.FileAccess.Read) Dim fs As System.IO.FileStream = System.IO.File.Open(ArchivoEnviar, IO.FileMode.Open, IO.FileAccess.Read)
Dim buff(fs.Length) As Byte Dim buff(fs.Length.ToEntero) As Byte
If fs.Length > 0 Then If fs.Length > 0 Then
fs.Read(buff, 0, fs.Length - 1) fs.Read(buff, 0, fs.Length.ToEntero - 1)
fs.Close() fs.Close()
End If End If
Return buff Return buff

View File

@@ -213,7 +213,7 @@ Partial Class OI_Normatividad
ArbolCuentas.DataSource = DtDatos ArbolCuentas.DataSource = DtDatos
Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", DdlSubtitulo.SelectedValue.ToEntero)), ADServerControl.DragableItem) Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", DdlSubtitulo.SelectedValue.ToEntero)), 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}", DdlSubtitulo.SelectedValue.ToEntero)), ADServerControl.DragableUL) Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", DdlSubtitulo.SelectedValue.ToEntero)), ADServerControl.DragableUL)
If (IsNothing(objul)) Then If (IsNothing(objul)) Then
objul = New ADServerControl.DragableUL objul = New ADServerControl.DragableUL
@@ -235,7 +235,7 @@ Partial Class OI_Normatividad
End Sub End Sub
Private Sub LimpiarCampos() Private Sub LimpiarCampos()
Ttitulo.Text = "" Ttitulo.Text = ""
DdlSubtitulo.SelectedValue = -1 DdlSubtitulo.SelectedValueExist(-1)
TxtObservaciones.Text = "" TxtObservaciones.Text = ""
Guardar.Visible = False Guardar.Visible = False
@@ -265,7 +265,7 @@ Partial Class OI_Normatividad
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

@@ -309,8 +309,8 @@ public partial class OI_Proyecto : ClsPaginas
else else
{ {
chkpara.Enabled = false; //chkpara.Enabled = false;
chkCCpara.Enabled = false; //chkCCpara.Enabled = false;
} }
string palomitavisto = ""; string palomitavisto = "";
string palomitasinver = "<i class=\"fa fa-check\" aria-hidden=\"true\"></i>"; string palomitasinver = "<i class=\"fa fa-check\" aria-hidden=\"true\"></i>";

View File

@@ -127,7 +127,7 @@ Partial Class OI_SubidasADS
If Not ChkCompletado Is Nothing And GvRow.DataKey("Actualizable").ToEntero = 1 Then If Not ChkCompletado Is Nothing And GvRow.DataKey("Actualizable").ToEntero = 1 Then
If ChkCompletado.Checked Then If ChkCompletado.Checked Then
If Not ObjDesarrollo.DesarrolloAddUpdate(GvRow.DataKey("CveDesarrollo").ToEntero, GvRow.DataKey("Desarrollo"), GvRow.DataKey("CveEvento").ToEntero, GvRow.DataKey("CveUsuarioResponsable").ToEntero, GvRow.DataKey("CveUsuarioPruebas"), GvRow.DataKey("CveModulo").ToEntero, GvRow.DataKey("Descripcion"), GvRow.DataKey("CveUsuarioAsignado").ToEntero, Nothing, -1, 5, -1, UsuarioActual.CveUsuario) Then If Not ObjDesarrollo.DesarrolloAddUpdate(GvRow.DataKey("CveDesarrollo").ToEntero, GvRow.DataKey("Desarrollo"), GvRow.DataKey("CveEvento").ToEntero, GvRow.DataKey("CveUsuarioResponsable").ToEntero, GvRow.DataKey("CveUsuarioPruebas").ToEntero, GvRow.DataKey("CveModulo").ToEntero, GvRow.DataKey("Descripcion"), GvRow.DataKey("CveUsuarioAsignado").ToEntero, Nothing, -1, 5, -1, UsuarioActual.CveUsuario) Then
Alert("Se presento un error al actulizar los estados") Alert("Se presento un error al actulizar los estados")
Exit For Exit For
End If End If

View File

@@ -36,15 +36,15 @@ Partial Class PortalGPS_Penske
Dim ws As New WSPenske.ReceiveGPSInfo Dim ws As New WSPenske.ReceiveGPSInfo
Dim info As New WSPenske.GPSInfo Dim info As New WSPenske.GPSInfo
info.Proveedor = row("Proveedor").ToString info.Proveedor = row("Proveedor").ToString
info.Latitud = row("Lat").ToString info.Latitud = row("Lat").ToString.ToDecimal
info.Longitud = row("Lng").ToString info.Longitud = row("Lng").ToString.ToDecimal
info.NumUnidad = row("NoEconomico").ToString info.NumUnidad = row("NoEconomico").ToString
info.NumRemolque = row("NumeroRemolque").ToString info.NumRemolque = row("NumeroRemolque").ToString
info.Velocidad = row("Velocidad").ToString info.Velocidad = row("Velocidad").ToString
info.Placas = row("PlacasVehiculo").ToString info.Placas = row("PlacasVehiculo").ToString
info.Trackingnumber = row("TrackingNumber").ToString info.Trackingnumber = row("TrackingNumber").ToString
info.Ubicacion = direccion info.Ubicacion = direccion
info.FechaHoraEvento = row("FechaTrama").ToString info.FechaHoraEvento = row("FechaTrama").ToString.ToDate
info.FechaRecepcion = DateTime.Now.AddMinutes(120) info.FechaRecepcion = DateTime.Now.AddMinutes(120)
info.Username = row("Usuario").ToString info.Username = row("Usuario").ToString
info.Password = row("PWD").ToString info.Password = row("PWD").ToString