-- option strict on
This commit is contained in:
@@ -73,7 +73,7 @@ Partial Class AC_RegDevengadoIngresos
|
||||
End Sub
|
||||
|
||||
Private Sub Limpiar()
|
||||
CboPresupuesto.SelectedValue = -1
|
||||
CboPresupuesto.SelectedValue = "-1"
|
||||
TxtImporte.Text = ""
|
||||
TxtFecha.Text = "__/__/____"
|
||||
ChkDevengar.Checked = False
|
||||
|
||||
@@ -18,10 +18,10 @@ Partial Class AF_CatCargasCombustible
|
||||
Dim ObjAF As New ClsAF()
|
||||
|
||||
Dim AnioMes = If(Request("AnioMes") IsNot Nothing, Request("AnioMes").ToString, "-1").ToString
|
||||
Dim CveProveedor = If(Request("CveProveedor") IsNot Nothing AndAlso Request("CveProveedor").ToEntero() > 0, Request("CveProveedor").ToEntero(), -1).ToString
|
||||
Dim CveSubProyecto = If(Request("CveSubProyecto") IsNot Nothing AndAlso Request("CveSubProyecto").ToEntero() > 0, Request("CveSubProyecto").ToEntero(), -1).ToString
|
||||
Dim CveTipoAF = If(Request("CveTipoAF") IsNot Nothing AndAlso Request("CveTipoAF").ToEntero() > 0, Request("CveTipoAF").ToEntero(), -1).ToString
|
||||
Dim CveAF = If(Request("CveAF") IsNot Nothing AndAlso Request("CveAF").ToEntero() > 0, Request("CveAF").ToEntero(), -1).ToString
|
||||
Dim CveProveedor As Integer = If(Request("CveProveedor") IsNot Nothing AndAlso Request("CveProveedor").ToEntero() > 0, Request("CveProveedor").ToEntero(), -1).ToString.ToEntero
|
||||
Dim CveSubProyecto As Integer = If(Request("CveSubProyecto") IsNot Nothing AndAlso Request("CveSubProyecto").ToEntero() > 0, Request("CveSubProyecto").ToEntero(), -1).ToString.ToEntero
|
||||
Dim CveTipoAF As Integer = If(Request("CveTipoAF") IsNot Nothing AndAlso Request("CveTipoAF").ToEntero() > 0, Request("CveTipoAF").ToEntero(), -1).ToString.ToEntero
|
||||
Dim CveAF As Integer = If(Request("CveAF") IsNot Nothing AndAlso Request("CveAF").ToEntero() > 0, Request("CveAF").ToEntero(), -1).ToString.ToEntero
|
||||
Dim FechaI = If(Request("FechaI") IsNot Nothing, Request("FechaI").ToString, "-1").ToString
|
||||
Dim FechaF = If(Request("FechaF") IsNot Nothing, Request("FechaF").ToString, "-1").ToString
|
||||
|
||||
@@ -39,7 +39,7 @@ Partial Class AF_CatCargasCombustible
|
||||
|
||||
If AnioMes <> "-1" Then
|
||||
FechaI = String.Format("01/{0}/{1}", sMes, sAnio)
|
||||
FechaF = FechaI.ToDate.LastDayOfMonth
|
||||
FechaF = FechaI.ToDate.LastDayOfMonth.ToShortDateString
|
||||
End If
|
||||
|
||||
If ObjAF.GetCargasCombustible(CveAF, CveProveedor, CveTipoAF, CveSubProyecto, FechaI, FechaF, UsuarioActual.CveEmpresa, CveCargaCombustible:=-1) Then
|
||||
@@ -75,7 +75,7 @@ Partial Class AF_CatCargasCombustible
|
||||
Dim ObjAF As New ClsAF()
|
||||
DdlActivoFijo.Items.Clear()
|
||||
|
||||
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, "-1", -1) Then
|
||||
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "-1", -1) Then
|
||||
DdlActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlActivoFijo.DataSource = ObjAF.DtResultados
|
||||
DdlActivoFijo.DataBind()
|
||||
@@ -110,7 +110,7 @@ Partial Class AF_CatCargasCombustible
|
||||
|
||||
FechaCarga = DateTime.Parse(String.Format("{0} {1}:{2} {3}", TxtFecha.Text, TimeSelector.Hour, TimeSelector.Minute, TimeSelector.AmPm))
|
||||
|
||||
If ObjAF.AddCargaCombustible(DdlCombustible.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, TxtFolio.Text.Trim, FechaCarga, CkhTanque.Checked, TxtCantidad.Text.ToDouble, TxtCosto.Text.ToDouble,
|
||||
If ObjAF.AddCargaCombustible(DdlCombustible.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, TxtFolio.Text.Trim, FechaCarga, If(CkhTanque.Checked, 1, 0), TxtCantidad.Text.ToDouble, TxtCosto.Text.ToDouble,
|
||||
TxtOdometro.Text.ToDouble, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Se registró la carga correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
@@ -80,29 +80,10 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
objAcum.Dispose()
|
||||
|
||||
UPGvFolioGarantia.DataBind()
|
||||
UpGral.Update()
|
||||
|
||||
'CargaGvTamanioBitacora()
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub CargaGvTamanioBitacora()
|
||||
|
||||
' Dim objAcum As New ClsAcumuladores
|
||||
|
||||
' If objAcum.TamañoBitacoraGet(UsuarioActual.Empresa.CveEmpresa) Then
|
||||
' GvBitacora.DataSource = objAcum.DtResultados
|
||||
' Else
|
||||
' GvBitacora.DataSource = Nothing
|
||||
' End If
|
||||
|
||||
' objAcum.Dispose()
|
||||
|
||||
' UpGvBitacora.DataBind()
|
||||
' UpGral.Update()
|
||||
|
||||
|
||||
'End Sub
|
||||
UpGral.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarFolioGarantia_Click(sender As Object, e As EventArgs) Handles BtnAgregarFolioGarantia.Click
|
||||
LtlTituloModalFolioGarantia.Text = "Agregar Folio Garantía"
|
||||
BtnAgregarFolioGarantiaModal.Text = "Agregar"
|
||||
@@ -180,8 +161,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
Public Sub Remove_ClickFolioGarantia(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveFolioGarantia")
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveFolioGarantia").ToEntero
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
If objAcum.FoliosGarantiaRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
|
||||
@@ -199,12 +179,9 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
Public Sub Edit_ClickFolioGarantia(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
|
||||
LtlTituloModalFolioGarantia.Text = "Editar Folio Garantía"
|
||||
Actualizar = True
|
||||
|
||||
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia")
|
||||
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia").ToEntero
|
||||
|
||||
TxtFolioGarantia.Text = GvRow.DataKey("FolioGarantia")
|
||||
DdlEstatusEditar.SelectedValueExist(GvRow.DataKey("CveEstatus"))
|
||||
@@ -233,8 +210,8 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia")
|
||||
CveMovimiento = IIf(GvRow.DataKey("CveMovimiento") <> "", GvRow.DataKey("CveMovimiento"), -1)
|
||||
CveFolioGarantia = GvRow.DataKey("CveFolioGarantia").ToEntero
|
||||
CveMovimiento = If(GvRow.DataKey("CveMovimiento") <> "", GvRow.DataKey("CveMovimiento").ToEntero, -1)
|
||||
LblFolio.Text = GvRow.DataKey("FolioGarantia")
|
||||
|
||||
Using ObjAcum As New ClsAcumuladores
|
||||
@@ -252,9 +229,6 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -91,10 +91,10 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
BtnAgregarFolioGarantiaModal.Text = "Agregar"
|
||||
CargaCombosModal()
|
||||
|
||||
If DdlMarca.SelectedValue <> -1 Then DdlMarcaM.SelectedValueExist(DdlMarca.SelectedValue.ToEntero)
|
||||
If DdlTipoUso.SelectedValue <> -1 Then DdlTipoUsoM.SelectedValueExist(DdlTipoUso.SelectedValue.ToEntero)
|
||||
If DdlMarca.SelectedValue <> "-1" Then DdlMarcaM.SelectedValueExist(DdlMarca.SelectedValue.ToEntero)
|
||||
If DdlTipoUso.SelectedValue <> "-1" Then DdlTipoUsoM.SelectedValueExist(DdlTipoUso.SelectedValue.ToEntero)
|
||||
|
||||
TxtMes.Text = TxtMes.Text.ToEntero + 1
|
||||
TxtMes.Text = (TxtMes.Text.ToEntero + 1).ToString
|
||||
TxtValor.Text = ""
|
||||
TxtMes.Focus()
|
||||
|
||||
@@ -128,7 +128,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
If Not Actualizar Then
|
||||
If ObjAcum.GarantiasMesesAdd(DdlMarcaM.SelectedValue.ToEntero, DdlTipoUsoM.SelectedValue.ToEntero, TxtMes.Text.ToEntero, TxtValor.Text.ToDecimal, txtFechaI.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
TxtMes.Text = TxtMes.Text.ToEntero + 1
|
||||
TxtMes.Text = (TxtMes.Text.ToEntero + 1).ToString
|
||||
TxtValor.Text = ""
|
||||
TxtMes.Focus()
|
||||
|
||||
@@ -180,8 +180,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveGarantiaMes")
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveGarantiaMes").ToEntero
|
||||
|
||||
If objAcum.GarantiasMesesRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
|
||||
CargadatosGvFolioGarantia()
|
||||
@@ -202,12 +201,10 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
Public Sub Edit_ClickFolioGarantia(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
|
||||
LtlTituloModalFolioGarantia.Text = "Editar Garantía de Mes"
|
||||
Actualizar = True
|
||||
|
||||
CveGarantiaMes = GvRow.DataKey("CveGarantiaMes")
|
||||
CveGarantiaMes = GvRow.DataKey("CveGarantiaMes").ToEntero
|
||||
|
||||
TxtMes.Text = GvRow.DataKey("Mes")
|
||||
TxtValor.Text = GvRow.DataKey("Valor")
|
||||
|
||||
@@ -169,8 +169,7 @@ Partial Class Acumuladores_CatTiposDefecto
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveTipoDefecto")
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveTipoDefecto").ToEntero
|
||||
|
||||
If objAcum.TiposDefectoRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
|
||||
CargadatosGvTiposD()
|
||||
@@ -192,12 +191,11 @@ Partial Class Acumuladores_CatTiposDefecto
|
||||
Public Sub Edit_ClickTiposD(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
|
||||
LtlTituloModalTiposD.Text = "Editar Tipo Defecto"
|
||||
Actualizar = True
|
||||
|
||||
CveTipoDefecto = GvRow.DataKey("CveTipoDefecto")
|
||||
CveTipoDefecto = GvRow.DataKey("CveTipoDefecto").ToEntero
|
||||
|
||||
TxtTiposD.Text = GvRow.DataKey("TipoDefecto")
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||
|
||||
@@ -170,8 +170,7 @@ Partial Class Acumuladores_CatTiposUso
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveTipoUso")
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveTipoUso").ToEntero
|
||||
|
||||
If objAcum.TiposUsoRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
|
||||
CargadatosGvTiposUso()
|
||||
@@ -193,12 +192,10 @@ Partial Class Acumuladores_CatTiposUso
|
||||
Public Sub Edit_ClickTiposUso(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
|
||||
LtlTituloModalTiposUso.Text = "Editar Tipo Uso"
|
||||
Actualizar = True
|
||||
|
||||
CveTipoUso = GvRow.DataKey("CveTipoUso")
|
||||
CveTipoUso = GvRow.DataKey("CveTipoUso").ToEntero
|
||||
|
||||
TxtTiposUso.Text = GvRow.DataKey("TipoUso")
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||
@@ -216,10 +213,6 @@ Partial Class Acumuladores_CatTiposUso
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -22,8 +22,8 @@ Partial Class Acumuladores_RepEntradasUsados
|
||||
|
||||
Protected Sub Page_Load() Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
txtFechaI.Text = Today.AddDays((-1) * (Today.Day - 1))
|
||||
txtFechaF.Text = Today
|
||||
txtFechaI.Text = Today.AddDays((-1) * (Today.Day - 1)).ToShortDateString
|
||||
txtFechaF.Text = Today.ToShortDateString
|
||||
CargarDatos()
|
||||
CargarCombos()
|
||||
End If
|
||||
@@ -40,14 +40,14 @@ Partial Class Acumuladores_RepEntradasUsados
|
||||
Dim i As Integer
|
||||
If Cargado = 0 Then
|
||||
For i = Date.Now.Year.ToEntero To (fecha.Year.ToEntero - 5) Step -1
|
||||
Años = New ListItem(i, i)
|
||||
Años = New ListItem(i.ToString, i.ToString)
|
||||
DdlAño.Items.Add(Años)
|
||||
Next
|
||||
End If
|
||||
Cargado = 1
|
||||
|
||||
DdlAño.SelectedValue = fecha.Year.ToEntero
|
||||
DdlMes.SelectedValue = fecha.Month.ToEntero
|
||||
DdlAño.SelectedValue = fecha.Year.ToString
|
||||
DdlMes.SelectedValue = fecha.Month.ToString
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
@@ -55,7 +55,7 @@ Partial Class Acumuladores_RepEntradasUsados
|
||||
|
||||
BtnImprimir.Visible = False
|
||||
|
||||
If ObjAcum.EntradasUsadosGet(UsuarioActual.CveEmpresa, DdlAlmacenes.SelectedValue.ToEntero, txtFechaI.Text, txtFechaF.Text) Then
|
||||
If ObjAcum.EntradasUsadosGet(UsuarioActual.CveEmpresa, DdlAlmacenes.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate) Then
|
||||
GvAcum.DataSource = ObjAcum.DtResultados
|
||||
DatosEntradasUsados = ObjAcum.DtResultados
|
||||
|
||||
@@ -115,10 +115,10 @@ Partial Class Acumuladores_RepEntradasUsados
|
||||
Dim dt As DataTable
|
||||
Dim NombreArchivo As String
|
||||
Try
|
||||
If DdlOpcion.SelectedValue = 1 Then
|
||||
If DdlOpcion.SelectedValue = "1" Then
|
||||
ObjAcum.GetSabanaVenta(Fecha, 1, UsuarioActual.CveEmpresa)
|
||||
|
||||
ElseIf DdlOpcion.SelectedValue = 2 Then
|
||||
ElseIf DdlOpcion.SelectedValue = "2" Then
|
||||
ObjAcum.GetSabanaVenta(Fecha, 2, UsuarioActual.CveEmpresa)
|
||||
|
||||
End If
|
||||
@@ -151,12 +151,11 @@ Partial Class Acumuladores_RepEntradasUsados
|
||||
If Mes.ToEntero < 10 Then
|
||||
Mes = String.Format("0{0}", Mes)
|
||||
End If
|
||||
If DdlOpcion.SelectedValue = 1 Then
|
||||
If DdlOpcion.SelectedValue = "1" Then
|
||||
NombreArchivo = String.Format("700415-{0}{1}-GE", Mes, Año)
|
||||
workbook.Save(Response, $"{NombreArchivo}.xlsx", SaveOptions.XlsxDefault)
|
||||
|
||||
|
||||
ElseIf DdlOpcion.SelectedValue = 2 Then
|
||||
ElseIf DdlOpcion.SelectedValue = "2" Then
|
||||
NombreArchivo = String.Format("700415-{0}{1}-CS", Mes, Año)
|
||||
workbook.Save(Response, $"{NombreArchivo}.xlsx", SaveOptions.XlsxDefault)
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
TxtFechaI.text = now.Firstdayofmonth
|
||||
txtfechaf.text = now.toshortdatestring
|
||||
TxtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
TxtFechaF.text = now.toshortdatestring
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -152,7 +152,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
|
||||
LbTam.Text = renglon.DataKey("Codigo_Clientes")
|
||||
Dim CveAlmacen As Integer = -1
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.EntradasUsadosClientesDetalleRep(renglon.DataKey("EsDistribuidor"), renglon.DataKey("CveCliente"), renglon.DataKey("CvePS"), TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, CveAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If ObjAcum.EntradasUsadosClientesDetalleRep(CBool(renglon.DataKey("EsDistribuidor")), renglon.DataKey("CveCliente").ToEntero, renglon.DataKey("CvePS").ToEntero, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, CveAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
GvVentas.DataSource = ObjAcum.DtResultados
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
|
||||
@@ -114,7 +114,6 @@ Partial Class Acumuladores_Tamaños
|
||||
Protected Sub BtnAgregarTamanioModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarTamanioModal.Click
|
||||
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
|
||||
Dim Cargo, Bonificacion, Compra, Puntos As Decimal
|
||||
|
||||
Cargo = If(TxtCargo.Text.ToDecimal > 0, TxtCargo.Text.ToDecimal, -1)
|
||||
@@ -123,8 +122,6 @@ Partial Class Acumuladores_Tamaños
|
||||
Puntos = If(TxtPuntos.Text.ToDecimal > 0, TxtPuntos.Text.ToDecimal, -1)
|
||||
|
||||
|
||||
|
||||
|
||||
If Not Actualizar Then
|
||||
If ObjAcum.TamañoAdd(TxtTamanio.Text, Cargo, Bonificacion, Compra, Puntos, DdlPS.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
@@ -175,8 +172,8 @@ Partial Class Acumuladores_Tamaños
|
||||
|
||||
Dim objAcum As New ClsAcumuladores
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveTamaño")
|
||||
Dim activo As Boolean = False
|
||||
Dim CveCapacitador As Integer = GvRow.DataKey("CveTamaño").ToEntero
|
||||
|
||||
If objAcum.TamañoRemove(CveCapacitador, UsuarioActual.CveEmpresa) Then
|
||||
CargadatosGvTamanio()
|
||||
@@ -197,12 +194,11 @@ Partial Class Acumuladores_Tamaños
|
||||
Public Sub Edit_ClickTamanio(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim activo As Boolean = 0
|
||||
|
||||
LtlTituloModalTamanio.Text = "Editar Tamaño"
|
||||
Actualizar = True
|
||||
|
||||
CveTamaño = GvRow.DataKey("CveTamaño")
|
||||
CveTamaño = GvRow.DataKey("CveTamaño").ToEntero
|
||||
|
||||
TxtTamanio.Text = GvRow.DataKey("Tamaño")
|
||||
TxtCargo.Text = GvRow.DataKey("Cargo").ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
@@ -175,12 +175,12 @@ Partial Class Agrupecuaria_CierreCultivo
|
||||
Dim CveConceptoTotal As Integer = 69
|
||||
|
||||
If CveClasificacion > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, ImporteMovimiento, ImporteMovimiento, CveConceptoClasificaiones, Clasificacion, Clasificacion, CvePrePolizaOriginal:=CvePrePoliza, CveSubProyecto:=CveSubProyecto, CveClasificacion:=CveClasificacion) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMovimiento, CveConceptoClasificaiones, Clasificacion, Clasificacion, CvePrePolizaOriginal:=CvePrePoliza, CveSubProyecto:=CveSubProyecto, CveClasificacion:=CveClasificacion) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, 0, ImporteCierre, ImporteCierre, 69, ConceptoTotales, ConceptoTotales, CveSubProyecto:=CveSubProyecto, CveClasificacion:=CveClasificacionTotalitaria) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteCierre, ImporteCierre, 69, ConceptoTotales, ConceptoTotales, CveSubProyecto:=CveSubProyecto, CveClasificacion:=CveClasificacionTotalitaria) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
@@ -132,9 +132,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim CorreoSupervisor As String = dRow("Correo").ToString()
|
||||
Dim Sucursal As String = dRow("Sucursal").ToString
|
||||
Dim Vendedor As String = dRow("Nombre").ToString()
|
||||
Dim CveSubProyecto As Integer = dRow("CveSubProyecto").ToString()
|
||||
|
||||
|
||||
Dim CveSubProyecto As Integer = dRow("CveSubProyecto").ToString.ToEntero
|
||||
CorreoSupervisor = "oscar.irigoyen@adssistemas.mx;rene.molina@adssistemas.mx"
|
||||
|
||||
Dim ObjGen = New ClsVentas
|
||||
|
||||
@@ -71,10 +71,10 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
|
||||
RespuestaError.Message = "Ocurrió un error al obtener el cuerpo de los parametros"
|
||||
End If
|
||||
|
||||
If Not TieneError AndAlso Not String.IsNullOrEmpty(JsonRequest("fecha")) Then
|
||||
If Not TieneError AndAlso Not String.IsNullOrEmpty(JsonRequest("fecha").ToString) Then
|
||||
Dim ObjContaAC As ClsContPAQi = Nothing
|
||||
|
||||
Dim observaciones As String = IIf(JsonRequest("observaciones").ToString() <> "", JsonRequest("observaciones").ToString(), "Salida Almacen")
|
||||
Dim observaciones As String = If(JsonRequest("observaciones").ToString() <> "", JsonRequest("observaciones").ToString(), "Salida Almacen")
|
||||
|
||||
Dim IDPoliza As Integer = 0
|
||||
Dim usuario As String = JsonRequest("usuario").ToString()
|
||||
@@ -311,7 +311,7 @@ Public Class E48 : Implements IHttpHandler, IRequiresSessionState
|
||||
Else
|
||||
context.Response.StatusCode = 200
|
||||
Respuesta.Message = "La salida se registró correctamente"
|
||||
Respuesta.Folio = folioSalida
|
||||
Respuesta.Folio = FolioSalida.ToString
|
||||
|
||||
retorno = JsonConvert.SerializeObject(Respuesta).ToString
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ Public Class E72 : Implements IHttpHandler, IRequiresSessionState
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Private Function CreaDT()
|
||||
Private Function CreaDT() As DataTable
|
||||
Dim DtMovimientos As DataTable = New DataTable("Productos")
|
||||
With DtMovimientos.Columns
|
||||
.Add("Codigo", Type.GetType("System.String"))
|
||||
|
||||
@@ -9,86 +9,86 @@ Imports System.Text
|
||||
|
||||
Public Class MobileHandler : Implements IHttpHandler
|
||||
Private Property Contexto As HttpContext
|
||||
|
||||
|
||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||
Contexto = context
|
||||
|
||||
|
||||
If context.Request("Opcion") IsNot Nothing Then
|
||||
Dim Opcion As String = context.Request("Opcion")
|
||||
|
||||
|
||||
Select Case Opcion
|
||||
Case "ValidaUsuario"
|
||||
ValidaUsuario()
|
||||
Case "Simpatizantes"
|
||||
If IfNull(Contexto.Request("Agrupador"), "0") <> "0" Then
|
||||
If IfNull(Contexto.Request("Agrupador"), "0").ToString <> "0" Then
|
||||
RepSimpatizantes(IfNull(Contexto.Request("Agrupador"), "0").ToString.ToEntero, 41)
|
||||
End If
|
||||
Case "Metas"
|
||||
If IfNull(Contexto.Request("Agrupador"), "0") <> "0" Then
|
||||
If IfNull(Contexto.Request("Agrupador"), "0").ToString <> "0" Then
|
||||
RepMetas(IfNull(Contexto.Request("Agrupador"), "0").ToString.ToEntero, 41)
|
||||
End If
|
||||
Case "Actividades"
|
||||
If IfNull(Contexto.Request("Agrupador"), "0") <> "0" Then
|
||||
If IfNull(Contexto.Request("Agrupador"), "0").ToString <> "0" Then
|
||||
RepActividadesRecientes(41)
|
||||
End If
|
||||
|
||||
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||
Get
|
||||
Return False
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Sub ValidaUsuario()
|
||||
Dim ObjUsuario As New ClsSisUsuarios
|
||||
Dim User As Usuario
|
||||
|
||||
|
||||
Dim IP As String
|
||||
|
||||
|
||||
IP = clsUtilerias.GetIP4Address 'Request.ServerVariables("REMOTE_ADDR").ToString()
|
||||
|
||||
If IP = "::1" Then
|
||||
IP = "127.0.0.1"
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Dim Json As New StringBuilder
|
||||
|
||||
|
||||
User = ObjUsuario.ValidaUsuario(Contexto.Request("Usuario"), Contexto.Request("Password"), IMEI)
|
||||
|
||||
If User IsNot Nothing Then
|
||||
|
||||
|
||||
Dim Token As String = String.Format("{0}*{1}*{2}", Now.ToString, IP, User.CveUsuario)
|
||||
Token = Encripta(Token)
|
||||
json.AppendFormat("{{ ""CveUsuario"" : ""{0}"", ""Nombre"" : ""{1}"", ""Token"" : ""{2}"" }} ", User.CveUsuario, User.Nombre, Token)
|
||||
Else
|
||||
json.Append("{ ""CveUsuario"" : ""-1"", ""Nombre"" : ""No valido"" } ")
|
||||
End If
|
||||
|
||||
|
||||
Contexto.Response.Write(json.ToString)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub RepActividadesRecientes(CveEmpresa As Integer)
|
||||
Dim Json As String = ""
|
||||
Dim Ind As New ClsProspectos
|
||||
|
||||
|
||||
If Ind.GetProspectosSupervisor(CveEmpresa) Then
|
||||
|
||||
|
||||
Json = DataTableToJSON(Ind.DtResultados)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Ind.Dispose()
|
||||
|
||||
|
||||
|
||||
Contexto.Response.Write(Json)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub RepSimpatizantes(Agrupador As Integer, CveEmpresa As Integer)
|
||||
Dim Json As String = ""
|
||||
Dim Ind As New ClsProspectos
|
||||
@@ -96,22 +96,22 @@ Public Class MobileHandler : Implements IHttpHandler
|
||||
If Ind.GetProspectosAgrupados2(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, Agrupador, CveEmpresa) Then
|
||||
Dim yValues As New ArrayList
|
||||
Dim xValues As New ArrayList
|
||||
|
||||
|
||||
'cuando es por edades, ordena por la claverango
|
||||
Dim dt As DataTable = Ind.DtResultados.FiltraParametros("CveAgrupador > 0", If(Agrupador = 9, "CveRangoEdad", "Total Desc"))
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
Json = DataTableToJSON(Ind.DtResultados)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Ind.Dispose()
|
||||
|
||||
|
||||
|
||||
Contexto.Response.Write(Json)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub RepMetas(Opcion As Integer, CveEmpresa As Integer)
|
||||
Dim ObjProspectos As New ClsProspectos
|
||||
Dim dt As DataTable
|
||||
@@ -122,20 +122,20 @@ Public Class MobileHandler : Implements IHttpHandler
|
||||
dt = dt.FiltraParametros("CveCoordinador > 0 AND CveAgrupador IS NULL")
|
||||
Else
|
||||
dt = dt.FiltraParametros("CveSupervisor > 0 AND CveCoordinador IS NULL")
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
Json = DataTableToJSON(dt)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
ObjProspectos.Dispose()
|
||||
Contexto.Response.Write(Json)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
pFechaF = context.Request("FechaF")
|
||||
End If
|
||||
|
||||
Retorno = IniciaFacturacionMasiva(CveEmpresaFacturar, pFechaI, pFechaF)
|
||||
Retorno = IniciaFacturacionMasiva(CveEmpresaFacturar.ToString, pFechaI, pFechaF)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -180,7 +180,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Dim DTRemisiones As DataTable = Nothing
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetRemisionesSinFacturar(FechaI, FechaF, CveCliente, -1, 1, -1) Then
|
||||
If ObjVentas.GetRemisionesSinFacturar(FechaI.ToShortDateString, FechaF.ToShortDateString, CveCliente, -1, 1, -1) Then
|
||||
DTRemisiones = ObjVentas.DtResultados.FiltraParametros("CveContrato = 0")
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
@@ -388,7 +388,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
ObjFactura.DtPromociones = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
If ObjVentas.GetRemisionesSinFacturar(FechaI, FechaF, CveCliente, -1, 1, -1) Then
|
||||
If ObjVentas.GetRemisionesSinFacturar(FechaI.ToShortDateString, FechaF.ToShortDateString, CveCliente, -1, 1, -1) Then
|
||||
ObjFactura.DtRemisiones = ObjVentas.DtResultados.FiltraParametros("CveContrato = 0")
|
||||
End If
|
||||
|
||||
@@ -400,7 +400,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
ObjFactura.ObservacionesAlmacen = DatosRemisiones("Almacen").ToString()
|
||||
|
||||
For Each Venta As JObject In DatosRemisiones("Ventas")
|
||||
ObjFactura.RemisionesLista.Add(Venta("CveVenta"))
|
||||
ObjFactura.RemisionesLista.Add(Venta("CveVenta").ToString.ToEntero)
|
||||
Next
|
||||
|
||||
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||
@@ -567,7 +567,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
|
||||
TmpDT.Columns.Add("Total", GetType(Decimal))
|
||||
'Para uso del módulo contable
|
||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
|
||||
TmpDT.Columns.Add("CveProyecto", GetType(Integer))
|
||||
TmpDT.Columns.Add("Proyecto", GetType(String))
|
||||
@@ -613,7 +613,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
||||
Try
|
||||
For Each Dr As DataRow In DtRemisionesPS.Select()
|
||||
Dim Row As DataRow = AgregarProductoServicio(Retorno, UsuarioActual, TmpDT, Dr("Consec").ToString.ToEntero(), Dr("Cantidad").ToString.ToDouble(), Dr("CveUM").ToString.ToEntero, Dr("UM").ToString, Dr("CveClasificacion").ToString.ToEntero, Dr("Clasificacion").ToString,
|
||||
Dim Row As DataRow = AgregarProductoServicio(Retorno, UsuarioActual, TmpDT, Dr("Consec").ToString.ToEntero(), Dr("Cantidad").ToString.ToDecimal(), Dr("CveUM").ToString.ToEntero, Dr("UM").ToString, Dr("CveClasificacion").ToString.ToEntero, Dr("Clasificacion").ToString,
|
||||
Dr("CvePS").ToString.ToEntero, Dr("PS").ToString, Dr("Obs").ToString, Dr("PU").ToString.ToDecimal, Dr("Descuento").ToString.ToDecimal,
|
||||
Dr("CveSubProyecto").ToString.ToEntero, CveVentaDetalle:=-1, CveContratoDetalle:=Dr("CveContratoDetalle").ToString.ToEntero,
|
||||
CveVentaDetalleRemision:=Dr("CveVentaDetalle").ToString.ToEntero, RegeneraIEPS:=True)
|
||||
@@ -631,7 +631,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Return TmpDT
|
||||
End Function
|
||||
|
||||
Private Function AgregarProductoServicio(ByRef Retorno As Modelos.Factura.MMensajeFactura, UsuarioActual As Usuario, TmpDT As DataTable, Consec As Integer, Cantidad As Double, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
|
||||
Private Function AgregarProductoServicio(ByRef Retorno As Modelos.Factura.MMensajeFactura, UsuarioActual As Usuario, TmpDT As DataTable, Consec As Integer, Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
|
||||
PU As Decimal, Descuento As Decimal, CveSubProyecto As Integer,
|
||||
Optional Serie As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
|
||||
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
|
||||
@@ -854,7 +854,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
|
||||
Cuerpo = Cuerpo.Replace("{""NombreCliente""}", ObjFactura.Cliente.NombreComercial)
|
||||
Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante)
|
||||
Cuerpo = Cuerpo.Replace("{""Fecha""}", ObjFactura.Fecha.ToString("dd/MM/yyyy"))
|
||||
Cuerpo = Cuerpo.Replace("{""Total""}", ObjFactura.Total)
|
||||
Cuerpo = Cuerpo.Replace("{""Total""}", ObjFactura.Total.ToString)
|
||||
Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", ObjFactura.FechaVencimiento.ToString("dd/MM/yyyy"))
|
||||
Cuerpo = Cuerpo.Replace("{""SerieFolio""}", ObjFactura.SerieFolio)
|
||||
End If
|
||||
|
||||
@@ -291,7 +291,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
|
||||
ObjFactura.CveMoneda = DR("CveMoneda").ToString.ToEntero
|
||||
ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||
ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DR("CveMoneda").ToString.ToEntero}")
|
||||
ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(Now))
|
||||
ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(Now)).ToDecimal
|
||||
ObjFactura.TipoDocto = "Ing"
|
||||
ObjFactura.RefDocto = ""
|
||||
ObjFactura.Folio = -1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%@ WebHandler Language="VB" Class="SIGGPS" %>
|
||||
'Option Explicit On
|
||||
'Option Strict On
|
||||
Option Strict Off
|
||||
|
||||
Imports System
|
||||
Imports System.Web
|
||||
|
||||
@@ -851,11 +851,11 @@ Namespace Fluent
|
||||
random.NextBytes(DefaultNode)
|
||||
End Sub
|
||||
|
||||
<Extension()>
|
||||
Function GetVersion(ByVal guid As Guid) As GuidVersion
|
||||
Dim bytes = guid.ToByteArray
|
||||
Return ((bytes(VersionByte) And &HFF) >> VersionByteShift)
|
||||
End Function
|
||||
'<Extension()>
|
||||
'Function GetVersion(ByVal guid As Guid) As GuidVersion
|
||||
' Dim bytes = guid.ToByteArray
|
||||
' Return ((bytes(VersionByte) And &HFF) >> VersionByteShift)
|
||||
'End Function
|
||||
|
||||
Function GetDateTimeOffset(ByVal guid As Guid) As DateTimeOffset
|
||||
Dim bytes As Byte() = guid.ToByteArray
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@ WebHandler Language="VB" Class="SIGWeb" %>
|
||||
|
||||
Option Strict Off
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
@@ -753,7 +753,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim ColumnaNombre As String = "NombreComercial"
|
||||
'Abreviaturas. N. Nombre, NC. NombreComercial,...
|
||||
If context.Request("ColTexto") IsNot Nothing AndAlso context.Request("ColTexto").Contiene("N", "CodigoNombre") Then
|
||||
ColumnaNombre = IIf(context.Request("ColTexto") = "N", "Nombre", context.Request("ColTexto"))
|
||||
ColumnaNombre = If(context.Request("ColTexto") = "N", "Nombre", context.Request("ColTexto"))
|
||||
End If
|
||||
|
||||
Dim EsDistribuidor As Integer = IfNull(context.Request("esdistribuidor"), "-1").ToString.ToEntero
|
||||
@@ -761,7 +761,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim cveclienteclasificacion = IfNull(context.Request("cveclienteclasificacion"), "-1").ToString.ToEntero
|
||||
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
Dim CveEmpresa As String
|
||||
Dim CveEmpresa As Integer
|
||||
If IsNothing(usuario) Then
|
||||
context.Response.Write("")
|
||||
Else
|
||||
@@ -810,7 +810,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim DtRetorno As DataTable = Nothing
|
||||
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
Dim CveEmpresa As String
|
||||
Dim CveEmpresa As Integer
|
||||
If IsNothing(usuario) Then
|
||||
context.Response.Write("")
|
||||
Else
|
||||
@@ -853,7 +853,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Private Function getpsalmacen(ByVal context As HttpContext) As String
|
||||
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
Dim CveEmpresa As String
|
||||
Dim CveEmpresa As Integer
|
||||
Dim retorno As String = ""
|
||||
Dim DtPSRetorno As DataTable = Nothing
|
||||
|
||||
@@ -908,7 +908,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
' EN EL WHERE DE LINQ NO SE DEBE USAS EL OPERADOR 'AND' SABE PORQUE FUNCIONA DIFERENTE SE DEBE USAR 'ANDALSO',
|
||||
' EJEMPLO UNA CONDICION AND DE DOS CAMPOS ARROJA CERO RESULTADOS PERO SI SE PONE ESTAS DOS CONDICIONES POR SEPARADO ARROJA DATOS
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
Dim CveEmpresa As String
|
||||
Dim CveEmpresa As Integer
|
||||
If IsNothing(usuario) Then
|
||||
context.Response.Write("")
|
||||
Else
|
||||
@@ -987,9 +987,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
'APLICACION DE FILTROS
|
||||
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
|
||||
If Estatus = 1 Then
|
||||
If Estatus = "1" Then
|
||||
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveEstado) = 1))
|
||||
ElseIf Estatus = -1 Then
|
||||
ElseIf Estatus = "-1" Then
|
||||
|
||||
End If
|
||||
|
||||
@@ -1314,7 +1314,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim DtPSRetorno As DataTable = Nothing
|
||||
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
Dim CveEmpresa As String
|
||||
Dim CveEmpresa As Integer
|
||||
If IsNothing(usuario) Then
|
||||
context.Response.Write("")
|
||||
Else
|
||||
@@ -1340,9 +1340,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
'APLICACION DE FILTROS
|
||||
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa))
|
||||
If Estatus = 1 Then
|
||||
If Estatus = "1" Then
|
||||
DTPS = DTPS.Where((Function(a) Convert.ToInt32(a!CveEstado) = 1))
|
||||
ElseIf Estatus = -1 Then
|
||||
ElseIf Estatus = "-1" Then
|
||||
|
||||
End If
|
||||
|
||||
@@ -1407,7 +1407,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim DtRetorno As DataTable = Nothing
|
||||
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
Dim CveEmpresa As String
|
||||
Dim CveEmpresa As Integer
|
||||
If IsNothing(usuario) Then
|
||||
context.Response.Write("")
|
||||
Else
|
||||
@@ -1530,7 +1530,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
System.IO.Directory.CreateDirectory(direct)
|
||||
End If
|
||||
Dim fileurl As String = $"{direct}{Path.GetFileName(urfile)}"
|
||||
If uuid.Length Then
|
||||
If uuid.Length > 0 Then
|
||||
fileurl = $"{direct}{uuid}{Path.GetExtension(urfile)}"
|
||||
End If
|
||||
System.IO.File.Move(urfile, fileurl)
|
||||
@@ -1583,7 +1583,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim DtRetorno As DataTable = Nothing
|
||||
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
Dim CveEmpresa As String
|
||||
Dim CveEmpresa As Integer
|
||||
If IsNothing(usuario) Then
|
||||
context.Response.Write("")
|
||||
Else
|
||||
@@ -1667,13 +1667,6 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim TieneError = False
|
||||
|
||||
CveMovimiento.ToString.GuardaLog
|
||||
|
||||
'Dim ObjConta As ClsContPAQi = Nothing
|
||||
'If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then
|
||||
' ObjConta = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
' ObjConta.IniciaTransacSQL()
|
||||
'End If
|
||||
|
||||
'If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, String.Format("{0}, Informacion = {1}", TxtDescripcion.Text, DescripcionDetalladaEliminar), "Inventarios", TxtFolio.Text + " / " + DdlConcepto.SelectedItem.Text) Then
|
||||
' TieneError = True
|
||||
'End If
|
||||
|
||||
@@ -75,7 +75,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
|
||||
If context.Request("var") IsNot Nothing Then
|
||||
URLParametros = Parametros(context.Request("var"))
|
||||
metodo = URLParametros("metodo")
|
||||
metodo = URLParametros("metodo").ToString
|
||||
'SI TRAE UN JSON COMO PARAMETRO
|
||||
ElseIf context.Request("metodo") IsNot Nothing Then
|
||||
metodo = context.Request("metodo").ToString()
|
||||
@@ -106,7 +106,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
|
||||
|
||||
Public Sub timbrarNominab()
|
||||
Dim cveEmpresa As String = "5"
|
||||
Dim cveEmpresa As Integer = 5
|
||||
|
||||
|
||||
Dim Dv As New DataView(DirectCast(currentcontext.Application("GlobalDTUsuarios"), DataTable), $"CveUsuario = 100 AND CveEmpresa ={cveEmpresa}", "", DataViewRowState.CurrentRows)
|
||||
@@ -119,7 +119,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
If GlobalDTUsuarios.Rows.Count > 0 Then
|
||||
Dim dtrow As DataRow = GlobalDTUsuarios.Rows(0)
|
||||
Dim ObjUsuario As New ClsSisUsuarios
|
||||
usuario = ObjUsuario.ValidaUsuario(dtrow("Usuario"), dtrow("Contraseña"), IMEI, cveEmpresa)
|
||||
usuario = ObjUsuario.ValidaUsuario(dtrow("Usuario").ToString, dtrow("Contraseña").ToString, IMEI, cveEmpresa)
|
||||
ObjUsuario.Dispose()
|
||||
|
||||
Dim ObjEmpresa As New ClsSisEmpresas()
|
||||
@@ -217,8 +217,8 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
Using GlobalDTUsuarios As DataTable = Dv.ToTable()
|
||||
If GlobalDTUsuarios.Rows.Count > 0 Then
|
||||
Dim dtrow As DataRow = GlobalDTUsuarios.Rows(0)
|
||||
username = dtrow("Usuario")
|
||||
pass = dtrow("Contraseña")
|
||||
username = dtrow("Usuario").ToString
|
||||
pass = dtrow("Contraseña").ToString
|
||||
End If
|
||||
End Using
|
||||
End Using
|
||||
@@ -260,7 +260,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
|
||||
Public Function timbrarNomina() As String
|
||||
Dim retorno As String = ""
|
||||
Dim cveEmpresa As String = URLParametros("CveEmpresa").ToString().ToEntero()
|
||||
Dim cveEmpresa As Integer = URLParametros("CveEmpresa").ToString().ToEntero()
|
||||
|
||||
Dim CvePeriodo As Integer = URLParametros("CvePeriodo").ToString().ToEntero()
|
||||
Dim CveNomina As Integer = URLParametros("CveNomina").ToString().ToEntero()
|
||||
@@ -906,7 +906,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
Using ObjVentas As New ClsVentas
|
||||
'VENDEDORES
|
||||
If ObjVentas.GetRepMetasVendedores(FechaEnvio, UsuarioActual.CveEmpresa, -1, -1,
|
||||
-1, -1, -1,-1,
|
||||
-1, -1, -1, -1,
|
||||
-1, -1, GrupoSuperior:=0) Then
|
||||
DtGrupoVendedores = ObjVentas.DtResultados.Copy
|
||||
End If
|
||||
@@ -1092,7 +1092,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
params.Add(New ReportParameter("pImg", ""))
|
||||
End If
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
params.Add(New ReportParameter("FechaImpresion", Today))
|
||||
params.Add(New ReportParameter("FechaImpresion", Today.ToString))
|
||||
params.Add(New ReportParameter("SubProyecto", UsuarioEnviar.SubProyecto))
|
||||
params.Add(New ReportParameter("Agente", UsuarioEnviar.Agente))
|
||||
|
||||
@@ -1118,7 +1118,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
params.Add(New ReportParameter("pImg", ""))
|
||||
End If
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||
params.Add(New ReportParameter("FechaImpresion", Today))
|
||||
params.Add(New ReportParameter("FechaImpresion", Today.ToString))
|
||||
params.Add(New ReportParameter("SubProyecto", "Todos"))
|
||||
params.Add(New ReportParameter("Agente", "Todos"))
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class CRM_CatMetas
|
||||
Inherits ClsPaginas
|
||||
@@ -116,22 +114,17 @@ Partial Class CRM_CatMetas
|
||||
|
||||
Dim ObjCRM As New ClsCRM
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
CveMeta = GvRow.DataKey("CveMeta")
|
||||
|
||||
CveMeta = GvRow.DataKey("CveMeta").ToEntero
|
||||
If ObjCRM.RemoveMetas(CveMeta, UsuarioActual.CveEmpresa) Then
|
||||
CargadatosGvMeta()
|
||||
|
||||
Alert("Meta eliminada Correctamente ", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al Eliminar la Meta", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjCRM.Dispose()
|
||||
|
||||
CargadatosGvMeta()
|
||||
|
||||
CveMeta = -1
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Edit_ClickMeta(sender As Object, e As EventArgs)
|
||||
@@ -141,20 +134,14 @@ Partial Class CRM_CatMetas
|
||||
LtlTituloModalMeta.Text = "Editar Meta"
|
||||
BtnAgregarMetaModal.Text = "Actualizar"
|
||||
Actualizar = True
|
||||
|
||||
CveMeta = GvRow.DataKey("CveMeta")
|
||||
|
||||
|
||||
CveMeta = GvRow.DataKey("CveMeta").ToEntero
|
||||
DdlVendedor.Items.Clear()
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, 1)
|
||||
DdlVendedor.DataBind()
|
||||
DdlVendedor.SelectedValueExist(GvRow.DataKey("CveVendedor").ToEntero)
|
||||
|
||||
txtFechaI.Text = GvRow.DataKey("FechaI")
|
||||
txtFechaF.Text = GvRow.DataKey("FechaF")
|
||||
|
||||
TxtNumMeta.Text = GvRow.DataKey("NumMeta").ToEntero
|
||||
|
||||
TxtNumMeta.Text = GvRow.DataKey("NumMeta")
|
||||
TxtImporte.Text = GvRow.DataKey("Importe").ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
UpModalMeta.Update()
|
||||
|
||||
@@ -36,40 +36,24 @@ Partial Class RepContratosObraAvances
|
||||
|
||||
GVDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub Indicadores(DTDatos As DataTable)
|
||||
|
||||
Dim NumeroContratos As Integer = DTDatos.Rows.Count
|
||||
|
||||
'Dim TotalContratos As Decimal = DTDatos.SUM("Importe")
|
||||
Dim TotalContratos As Decimal = DTDatos.SUM("ImporteSubTotal")
|
||||
|
||||
|
||||
Dim TotalAvance As Decimal = DTDatos.SUM("AvanceImporte")
|
||||
Dim TotalContratos As Decimal = DTDatos.SUMD("ImporteSubTotal")
|
||||
Dim TotalAvance As Decimal = DTDatos.SUMD("AvanceImporte")
|
||||
Dim TotalFaltante As Decimal = TotalContratos - TotalAvance
|
||||
|
||||
|
||||
Dim TotalAvancePorcentaje As Decimal = ((TotalAvance * 100) / TotalContratos).RoundAD(2)
|
||||
Dim TotalFaltantePorcentaje As Decimal = (100 - TotalAvancePorcentaje).RoundAD(2)
|
||||
|
||||
|
||||
LtlGrafNumeroContratos.Text = NumeroContratos.ToString
|
||||
LtlGrafTotal.Text = TotalContratos.ToString("###,###,###.00")
|
||||
|
||||
|
||||
LtlAvanceImporte.Text = $"$ {TotalAvance.ToString("###,###,###.00")}"
|
||||
LtlAvanceImporteProcentaje1.Text = $"{TotalAvancePorcentaje.ToString("###.00")} %"
|
||||
LtlAvanceImporteProcentaje2.Text = $"{TotalAvancePorcentaje.ToString("###.00")}%"
|
||||
SPAvance1.Attributes.Add("style", $"width:{TotalAvancePorcentaje.ToString.ToEntero}%")
|
||||
|
||||
|
||||
LtlFaltanteImporte.Text = $"$ {TotalFaltante.ToString("###,###,###.00")}"
|
||||
LtlFaltanteImportePorcentaje1.Text = $"{TotalFaltantePorcentaje.ToString("###.00")} %"
|
||||
LtlFaltanteImportePorcentaje2.Text = $"{TotalFaltantePorcentaje.ToString("###.00")}%"
|
||||
@@ -105,12 +89,8 @@ Partial Class RepContratosObraAvances
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVDatos.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim HplContratado As HyperLink = e.Row.FCHyperLink("HplContratado")
|
||||
|
||||
HplContratado.NavigateUrl = $"./RepContratosObraAvancesDetalle.aspx?CveContrato={e.Row.DataKey("CveContrato")}&NumeroContrato={e.Row.DataKey("NumeroContrato")}"
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -83,7 +83,7 @@ Partial Class RepContratosObraAvancesDetalle
|
||||
|
||||
Private Sub Indicadores(DTDatos As DataTable, NumeroEstimaciones As Integer)
|
||||
|
||||
LtlGrafNumeroEstimaciones.Text = NumeroEstimaciones
|
||||
LtlGrafNumeroEstimaciones.Text = NumeroEstimaciones.ToString
|
||||
|
||||
|
||||
Dim AvanceImporte As Decimal = DTDatos(0)("AvanceImporte").ToString.ToDecimal
|
||||
@@ -389,7 +389,7 @@ Partial Class RepContratosObraAvancesDetalle
|
||||
|
||||
Dim RowH As Double = WSDetalle.Row(19).Height
|
||||
|
||||
For Each drowArchivos In DTArchivos.Rows
|
||||
For Each drowArchivos As DataRow In DTArchivos.Rows
|
||||
|
||||
Dim Archivo As String = drowArchivos("Archivo").ToString
|
||||
Dim RutaArchivo As String = $"{UsuarioActual.Empresa.Ruta}\Contrato\{CveContrato}\Anexos\{Archivo}"
|
||||
|
||||
@@ -36,7 +36,7 @@ Partial Class General_RepIndicadorResumen
|
||||
Dim Grupo As Integer = 28 'Clasificación - PS
|
||||
|
||||
If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), MinFecha, MaxFecha, -1,
|
||||
-1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, Grupo, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:="Ing", TipoCambio:=1) Then
|
||||
-1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, Grupo, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:="Ing,Dev", TipoCambio:=1) Then
|
||||
GvVxP.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
@@ -390,7 +390,7 @@ Public Class WSApp
|
||||
If Not Retorno.TieneError Then
|
||||
Dim DtInv As DataTable = Nothing
|
||||
Dim ObjInv As New ClsInventarios()
|
||||
ObjInv.GetMovimientos(-1, -1, "-1", UsuarioActual.CveEmpresa)
|
||||
ObjInv.GetMovimientos(-1, -1, -1, UsuarioActual.CveEmpresa)
|
||||
If ObjInv.DtResultados.Rows.Count > 0 Then
|
||||
DtInv = ObjInv.DtResultados.FiltraParametros($"CveVenta = {CveVenta}")
|
||||
ObjInv.Dispose()
|
||||
@@ -578,22 +578,22 @@ Public Class WSApp
|
||||
If ObjFolios.GetFolios("Rem", UsuarioActual.CveEmpresa) Then
|
||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format("CveSubProyecto = {0} And Estado = 'Activo'", CveSubProyecto))
|
||||
If DT.Rows.Count > 0 Then
|
||||
ObjFactura.Folio = DT.Rows(0)("FActual").ToString
|
||||
ObjFactura.Folio = DT.Rows(0)("FActual").ToString.ToEntero
|
||||
ObjFactura.Serie = DT.Rows(0)("Serie").ToString
|
||||
End If
|
||||
DT.Dispose()
|
||||
End If
|
||||
ObjFolios.Dispose()
|
||||
|
||||
If Not String.IsNullOrEmpty(ObjFactura.Folio) Then
|
||||
If Not String.IsNullOrEmpty(ObjFactura.Folio.ToString) Then
|
||||
|
||||
Select Case CveMoneda
|
||||
Case 1
|
||||
ObjFactura.TipoCambio = "1"
|
||||
ObjFactura.TipoCambio = 1
|
||||
Case 2
|
||||
ObjFactura.TipoCambio = ClsPaginas.GlobalTipoCambio(Now).ToString
|
||||
ObjFactura.TipoCambio = ClsPaginas.GlobalTipoCambio(Now).ToDecimal
|
||||
Case Else
|
||||
ObjFactura.TipoCambio = ClsPaginas.GlobalTipoCambio(Now).ToString
|
||||
ObjFactura.TipoCambio = ClsPaginas.GlobalTipoCambio(Now).ToDecimal
|
||||
End Select
|
||||
ObjFactura.CveVendedor = -1
|
||||
|
||||
@@ -766,7 +766,7 @@ Public Class WSApp
|
||||
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
|
||||
TmpDT.Columns.Add("Total", GetType(Decimal))
|
||||
'Para uso del módulo contable
|
||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
|
||||
TmpDT.Columns.Add("CveProyecto", GetType(Integer))
|
||||
TmpDT.Columns.Add("Proyecto", GetType(String))
|
||||
@@ -922,7 +922,7 @@ Public Class WSApp
|
||||
Row("CvePS") = PS.CvePS
|
||||
Row("Obs") = PS.Obs
|
||||
|
||||
TotalCalculableImpuestos = (PS.Cantidad.Value * PS.Precio) - PS.Descuento
|
||||
TotalCalculableImpuestos = (PS.Cantidad * PS.Precio) - PS.Descuento
|
||||
|
||||
Row("PU") = PS.Precio
|
||||
Row("Codigo") = DrPS("Codigo")
|
||||
@@ -955,8 +955,8 @@ Public Class WSApp
|
||||
Row("Descuento") = Math.Round(PS.Descuento, 2)
|
||||
Row("TipoDescuento") = "2"
|
||||
|
||||
Row("Total") = (PS.Cantidad.Value * PS.Precio)
|
||||
Row("TotalImporte") = Math.Round(PS.Cantidad.Value * PS.Precio, 2)
|
||||
Row("Total") = (PS.Cantidad * PS.Precio)
|
||||
Row("TotalImporte") = Math.Round(PS.Cantidad * PS.Precio, 2)
|
||||
|
||||
Row("SATClaveProdServ") = DrPS("SATClavePS")
|
||||
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
||||
@@ -1088,8 +1088,8 @@ Namespace WebServiceAppModels2
|
||||
Public Property CveUsuario As Integer
|
||||
Public Property Usuario As String
|
||||
Public Property CveEmpresa As Integer
|
||||
Public Property CveCliente As String
|
||||
Public Property CvePrecioLista As String
|
||||
Public Property CveCliente As Integer
|
||||
Public Property CvePrecioLista As Integer
|
||||
Public Property Procesos As List(Of String)
|
||||
Public Property Empresa As String
|
||||
Public Property Cliente As String
|
||||
@@ -1712,11 +1712,11 @@ Namespace WebServiceAppModels2
|
||||
|
||||
Public Class MVentaProductos
|
||||
Public Property CvePS As Integer
|
||||
Public Property Cantidad As Double?
|
||||
Public Property Cantidad As Decimal = 0
|
||||
Public Property Obs As String
|
||||
Public Property PS As String
|
||||
Public Property Precio As Double
|
||||
Public Property Descuento As Double
|
||||
Public Property Precio As Decimal
|
||||
Public Property Descuento As Decimal
|
||||
End Class
|
||||
|
||||
Public Class MMessage
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@ WebService Language="VB" Class="WSSIGApp" %>
|
||||
|
||||
Option Strict Off
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
@@ -1023,7 +1023,8 @@ Public Class WSSIGApp
|
||||
Dim IdPoliza = -1
|
||||
If RequiereCotizacion Then
|
||||
Dim CveProveedor = -1
|
||||
Dim TotalCot = 0.0, IVACot = 0D, RetIVA = 0.0, RetISR = 0.0, PorIVA = 0.0, Porcentaje = 0.0
|
||||
Dim TotalCot = 0.0, IVACot = 0D, RetIVA = 0.0, RetISR = 0.0
|
||||
Dim PorIVA As Decimal = 0, Porcentaje = 0.0
|
||||
|
||||
|
||||
For Each dr As DataRow In DtDetalle.FiltraParametros("", "CveProveedor").Rows
|
||||
@@ -1034,7 +1035,7 @@ Public Class WSSIGApp
|
||||
CveProveedor = dr("CveProveedor").ToString.ToEntero
|
||||
|
||||
Porcentaje = DtDetalle.SUM("Total", String.Format("CveProveedor = {0}", CveProveedor)) / DtDetalle.SUM("Total")
|
||||
PorIVA = GlobalDTCompProveedores(CveEmpresa).FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)).Rows(0)("IVA").ToString.ToDouble
|
||||
PorIVA = GlobalDTCompProveedores(CveEmpresa).FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)).Rows(0)("IVA").ToString.ToDecimal
|
||||
IVACot = (DtDetalle.SUM("Total", String.Format("CveProveedor = {0}", CveProveedor)) * PorIVA).ToString.ToDecimal
|
||||
RetIVA = DrOC("RetIVA").ToString().ToDecimal * Porcentaje
|
||||
RetISR = DrOC("RetISR").ToString().ToDecimal * Porcentaje
|
||||
@@ -1061,7 +1062,7 @@ Public Class WSSIGApp
|
||||
End If
|
||||
|
||||
'AGREGA DETALLES
|
||||
If Not objOrdenCompra.AddOrdenCompraDetalle(objOrdenCompra.CveOrdenCompra, dr("Cantidad").ToString.ToDouble(), dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDouble, dr("CveSubProyecto").ToString.ToEntero(), dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, CveUsuarioActual, CveOrdenCompra, CvePresupuestoEgreso:=dr("CvePresupuestoEgreso").ToString.ToEntero, Descuento:=dr("Descuento").ToString.ToDouble) Then
|
||||
If Not objOrdenCompra.AddOrdenCompraDetalle(objOrdenCompra.CveOrdenCompra, dr("Cantidad").ToString.ToDecimal(), dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDecimal, dr("CveSubProyecto").ToString.ToEntero(), dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, CveUsuarioActual, CveOrdenCompra, CvePresupuestoEgreso:=dr("CvePresupuestoEgreso").ToString.ToEntero, Descuento:=dr("Descuento").ToString.ToDecimal) Then
|
||||
HuboError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1071,7 +1072,7 @@ Public Class WSSIGApp
|
||||
Dim CveProveedor As Integer = DrOC("CveProveedor").ToString.ToEntero
|
||||
Dim RetIVA = DrOC("RetIVA").ToString().ToDecimal
|
||||
Dim RetISR = DrOC("RetISR").ToString().ToDecimal
|
||||
Dim PorcentajeIVA As Double = DrOC("PorcentajeIVA").ToString().ToDouble
|
||||
Dim PorcentajeIVA As Decimal = DrOC("PorcentajeIVA").ToString().ToDecimal
|
||||
If objOrdenCompra.AddOrdenCompra("OC", -1, Descripcion, Justificacion, Prioridad, Fecha, CveMoneda, CveEstatusInicialOC, FechaEstimadaEntrega, LugarEntrega,
|
||||
CveUsuario, CveEmpresaActual, 0, CveProveedor, CveCliente:=CveCliente, CveVendedor:=CveVendedor, PrioridadObservacion:=PrioridadObservacion,
|
||||
PorcentajeIVA:=PorcentajeIVA, IVA:=IVA, RetIVA:=RetIVA, RetISR:=RetISR, IDPoliza:=IDPolizaPresupuestal, CveCotizacion:=CveCotizacion, FolioAdicional:=FolioAdicional,
|
||||
@@ -1090,7 +1091,7 @@ Public Class WSSIGApp
|
||||
'TERMINA: USA AC
|
||||
If Not HuboError Then
|
||||
For Each dr As DataRow In DtDetalle.Rows
|
||||
If Not objOrdenCompra.AddOrdenCompraDetalle(objOrdenCompra.CveOrdenCompra, dr("Cantidad").ToString.ToDouble(), dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDouble, dr("CveSubProyecto").ToString.ToEntero(), dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, CveUsuarioActual, CveOrdenCompra, CvePresupuestoEgreso:=dr("CvePresupuestoEgreso").ToString.ToEntero, Descuento:=dr("Descuento").ToString.ToDouble) Then
|
||||
If Not objOrdenCompra.AddOrdenCompraDetalle(objOrdenCompra.CveOrdenCompra, dr("Cantidad").ToString.ToDecimal(), dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, dr("Importe").ToString.ToDecimal, dr("CveSubProyecto").ToString.ToEntero(), dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, CveUsuarioActual, CveOrdenCompra, CvePresupuestoEgreso:=dr("CvePresupuestoEgreso").ToString.ToEntero, Descuento:=dr("Descuento").ToString.ToDecimal) Then
|
||||
HuboError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1780,7 +1781,7 @@ Public Class WSSIGApp
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
<WebMethod>
|
||||
Public Function AddVentas(TipoDocto As String, CveCliente As Integer, CveSubProyecto As Integer, CveUsuario As Integer, SubTotal As Double, IVA As Double, CveMoneda As Integer, Observaciones As String, Productos As String) As String
|
||||
Public Function AddVentas(TipoDocto As String, CveCliente As Integer, CveSubProyecto As Integer, CveUsuario As Integer, SubTotal As Decimal, IVA As Decimal, CveMoneda As Integer, Observaciones As String, Productos As String) As String
|
||||
Dim Retorno = New Modelos.Factura.MMensajeFactura()
|
||||
Try
|
||||
Dim ObjUsuarios As New ClsSisUsuarios()
|
||||
@@ -1820,7 +1821,7 @@ Public Class WSSIGApp
|
||||
Return JsonConvert.SerializeObject(Retorno)
|
||||
End Function
|
||||
#Region "F A C T U R A C I O N"
|
||||
Private Function CreaFactura(TipoDocto As String, SubTotal As Double, IVA As Double, CveCliente As Integer, CveSubProyecto As Integer, CveMoneda As Integer, UsuarioActual As Usuario, ListaPS As List(Of MVentaProductos)) As Modelos.Factura
|
||||
Private Function CreaFactura(TipoDocto As String, SubTotal As Decimal, IVA As Decimal, CveCliente As Integer, CveSubProyecto As Integer, CveMoneda As Integer, UsuarioActual As Usuario, ListaPS As List(Of MVentaProductos)) As Modelos.Factura
|
||||
If CveSubProyecto <= 0 Then
|
||||
'SE ASIGNA EL SUBPROYECTO MATRIZ, EN CASO DE NO ENCONTRARSE SE LE ASIGNA CUALQUIERA
|
||||
Dim Dr As DataRow = Nothing
|
||||
@@ -1846,22 +1847,22 @@ Public Class WSSIGApp
|
||||
If ObjFolios.GetFolios(TipoDocto, UsuarioActual.CveEmpresa) Then
|
||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format("CveSubProyecto = {0} And Estado = 'Activo'", CveSubProyecto))
|
||||
If DT.Rows.Count > 0 Then
|
||||
ObjFactura.Folio = DT.Rows(0)("FActual").ToString()
|
||||
ObjFactura.Folio = DT.Rows(0)("FActual").ToString.ToEntero
|
||||
ObjFactura.Serie = DT.Rows(0)("Serie").ToString()
|
||||
End If
|
||||
DT.Dispose()
|
||||
End If
|
||||
ObjFolios.Dispose()
|
||||
|
||||
If Not String.IsNullOrEmpty(ObjFactura.Folio) Then
|
||||
If ObjFactura.Folio > 0 Then
|
||||
|
||||
Select Case CveMoneda
|
||||
Case 1
|
||||
ObjFactura.TipoCambio = "1"
|
||||
ObjFactura.TipoCambio = 1
|
||||
Case 2
|
||||
ObjFactura.TipoCambio = GlobalTipoCambio(Now).ToString
|
||||
ObjFactura.TipoCambio = GlobalTipoCambio(Now).ToDecimal
|
||||
Case Else
|
||||
ObjFactura.TipoCambio = GlobalTipoCambio(Now).ToString
|
||||
ObjFactura.TipoCambio = GlobalTipoCambio(Now).ToDecimal
|
||||
End Select
|
||||
ObjFactura.CveVendedor = -1
|
||||
|
||||
@@ -2011,7 +2012,7 @@ Public Class WSSIGApp
|
||||
TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
|
||||
TmpDT.Columns.Add("Total", GetType(Decimal))
|
||||
'Para uso del módulo contable
|
||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
|
||||
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
|
||||
TmpDT.Columns.Add("CveProyecto", GetType(Integer))
|
||||
TmpDT.Columns.Add("Proyecto", GetType(String))
|
||||
@@ -2133,8 +2134,8 @@ Public Class WSSIGApp
|
||||
Row("IVA") = Row("PorcentajeIVA")
|
||||
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, 2)
|
||||
|
||||
Row("Total") = (PS.Cantidad * PS.Precio).Value
|
||||
Row("TotalImporte") = Math.Round(PS.Cantidad.Value * PS.Precio, 2)
|
||||
Row("Total") = PS.Cantidad * PS.Precio
|
||||
Row("TotalImporte") = Math.Round(PS.Cantidad * PS.Precio, 2)
|
||||
|
||||
Row("SATClaveProdServ") = DrPS("SATClavePS")
|
||||
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
||||
@@ -2638,7 +2639,7 @@ Public Class WSSIGApp
|
||||
|
||||
If Not TieneError Then
|
||||
ObjOC.Commit()
|
||||
Retorno = ObjOC.Folio
|
||||
Retorno = ObjOC.Folio.ToString
|
||||
Else
|
||||
ObjOC.RollBack()
|
||||
Retorno = ""
|
||||
@@ -2872,7 +2873,7 @@ Public Class WSSIGApp
|
||||
'Agrega CveCotizacion a la lista
|
||||
|
||||
For Each RowCD As DataRow In ObjOC.DtResultados.Rows
|
||||
If Not ObjOC.AddCotizacionDetalle(ObjOC.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 ObjOC.AddCotizacionDetalle(ObjOC.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
|
||||
Else
|
||||
TieneError = True
|
||||
@@ -3499,7 +3500,7 @@ Public Class WSSIGApp
|
||||
If Ent.EmpresaCRM.CveEmpresaCRM > 0 Then
|
||||
If Ent.EmpresaCRM.CveEncuestaAplicada > 0 Then
|
||||
For Each Resp In Ent.Respuestas
|
||||
If Not ObjDatosTecnicos.UpdateDatosTecnicosCRM(Resp.CveEncuestaAplicadaDetalle, Ent.EmpresaCRM.CveEncuestaAplicada, Resp.CvePregunta, Resp.CveRespuesta, IfNull(Resp.Valor, "")) Then
|
||||
If Not ObjDatosTecnicos.UpdateDatosTecnicosCRM(Resp.CveEncuestaAplicadaDetalle, Ent.EmpresaCRM.CveEncuestaAplicada, Resp.CvePregunta, Resp.CveRespuesta, IfNull(Resp.Valor, "").ToString) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -3688,7 +3689,8 @@ Public Class WSSIGApp
|
||||
If item.CveAcercamiento > 0 Then
|
||||
TieneError = Not ObjCRM.UpdateAcercamiento(item.CveAcercamiento, item.CveContactoPrincipal, item.CveTipoProceso, item.CveEtapaProcesoActual, item.CveVendedor, item.CveMedioCaptacion, item.CveProbabilidadAcercamiento, item.NombreAcercamiento, item.Descripcion, item.Importe, item.Comision, item.Prioridad, item.CveUsuarioMod, item.CveRechazoMotivo, item.CveEncuestaAplicadaProceso, item.FechaApertura, item.FechaCierre)
|
||||
Else
|
||||
TieneError = Not ObjCRM.AddAcercamiento(item.CveEmpresaCRM, item.CveContactoPrincipal, item.CveTipoProceso, item.CveEtapaProcesoActual, item.CveVendedor, item.CveMedioCaptacion, item.CveRechazoMotivo, item.CveProbabilidadAcercamiento, item.FechaApertura, item.NombreAcercamiento, item.Descripcion, item.Importe, item.Comision, item.Prioridad, item.CveEmpresa, item.CveUsuarioIng, item.FechaCierre)
|
||||
Dim i As Integer = ObjCRM.AddAcercamiento(item.CveEmpresaCRM, item.CveContactoPrincipal, item.CveTipoProceso, item.CveEtapaProcesoActual, item.CveVendedor, item.CveMedioCaptacion, item.CveRechazoMotivo, item.CveProbabilidadAcercamiento, item.FechaApertura, item.NombreAcercamiento, item.Descripcion, item.Importe, item.Comision, item.Prioridad, item.CveEmpresa, item.CveUsuarioIng, Now)
|
||||
If i <= 0 Then TieneError = True
|
||||
End If
|
||||
If TieneError Then
|
||||
Exit For
|
||||
@@ -4177,7 +4179,7 @@ Public Class WSSIGApp
|
||||
Public Function GetRepAcercamientos(CveEmpresa As Integer, CveVendedor As Integer, FechaInicio As DateTime, FechaFin As DateTime) As String
|
||||
Dim Retorno = "[]"
|
||||
Using ObjCRM As New ClsCRM
|
||||
If ObjCRM.GetAcercamiento(CveEmpresa, CveVendedor:=CveVendedor, FechaInicio:=FechaInicio, FechaFin:="-1") Then
|
||||
If ObjCRM.GetAcercamiento(CveEmpresa, CveVendedor:=CveVendedor, FechaInicio:=FechaInicio.ToShortDateString, FechaFin:="-1") Then
|
||||
Retorno = ObjCRM.DtResultados.DataTableToJSONIPP()
|
||||
End If
|
||||
End Using
|
||||
@@ -4921,11 +4923,11 @@ Namespace WebServiceAppModels
|
||||
Public Property IDTemp As Integer
|
||||
Public Property IDTempVenta As Integer
|
||||
Public Property CvePS As Integer
|
||||
Public Property Cantidad As Double?
|
||||
Public Property Cantidad As Decimal = 0
|
||||
Public Property Obs As String
|
||||
Public Property PS As String
|
||||
Public Property Precio As Double
|
||||
Public Property Descuento As Double
|
||||
Public Property Precio As Decimal
|
||||
Public Property Descuento As Decimal
|
||||
Public Property CveUnidadMedida As Integer
|
||||
End Class
|
||||
Public Class MMessage
|
||||
|
||||
@@ -76,7 +76,7 @@ Public Class WS_PuntoVenta
|
||||
Partial Public Class ClsMetodosPagoWS
|
||||
Public Property CveMetodoPago As Integer
|
||||
Public Property MetodoPago As String
|
||||
Public Property Importe As Double
|
||||
Public Property Importe As Decimal
|
||||
|
||||
Public Sub New()
|
||||
|
||||
@@ -296,15 +296,15 @@ Public Class WS_PuntoVenta
|
||||
Public FolioFact As Integer
|
||||
Public CveCliente As Integer
|
||||
Public CveClienteSucursal As Integer
|
||||
Public SubTotal As Double
|
||||
Public Descuento As Double
|
||||
Public Amortizacion As Double
|
||||
Public IVA As Double
|
||||
Public RetIVA As Double
|
||||
Public RetISR As Double
|
||||
Public Total As Double
|
||||
Public SubTotal As Decimal
|
||||
Public Descuento As Decimal
|
||||
Public Amortizacion As Decimal
|
||||
Public IVA As Decimal
|
||||
Public RetIVA As Decimal
|
||||
Public RetISR As Decimal
|
||||
Public Total As Decimal
|
||||
Public CveMoneda As Integer
|
||||
Public TipoCambio As Double
|
||||
Public TipoCambio As Decimal
|
||||
Public CveMetodoPago As Integer
|
||||
Public CondicionesPago As Integer
|
||||
Public FormaPago As Integer
|
||||
@@ -816,7 +816,7 @@ Public Class WS_PuntoVenta
|
||||
|
||||
Dim Errores As Boolean = False
|
||||
Dim CveVentas As New List(Of ListItem)
|
||||
Dim TotalPagado As Double = 0
|
||||
Dim TotalPagado As Decimal = 0
|
||||
|
||||
|
||||
For Each objVenta As ClsVentaWS In ArregloVentas
|
||||
@@ -947,7 +947,7 @@ Public Class WS_PuntoVenta
|
||||
If CvePrePoliza > 0 Then
|
||||
Dim TipoMovimientoVenta As Boolean = True
|
||||
Dim TipoMovimientoImpuestos As Boolean = False
|
||||
Dim ImporteMov As Double
|
||||
Dim ImporteMov As Decimal
|
||||
|
||||
'Se agregan los movimientos de la Venta
|
||||
'If DT.Rows.Count > 0 Then
|
||||
@@ -987,11 +987,10 @@ Public Class WS_PuntoVenta
|
||||
ErrorMovtosCxC = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'Se agregan el Traslado de IVA
|
||||
ImporteMov = objVenta.IVA
|
||||
If ImporteMov <> 0 Then
|
||||
Dim PorcentajeImpuesto = 0
|
||||
Dim PorcentajeImpuesto As Decimal = 0
|
||||
If objVenta.SubTotal > 0 Then
|
||||
PorcentajeImpuesto = (objVenta.IVA / objVenta.SubTotal)
|
||||
End If
|
||||
@@ -1200,7 +1199,7 @@ Public Class WS_PuntoVenta
|
||||
'End Function
|
||||
|
||||
<WebMethod()>
|
||||
Public Function AddBancosIE(Importe As Double, Moneda As Integer, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer, Cuenta As Integer, Comprobante As String, Opcion As String) As Boolean
|
||||
Public Function AddBancosIE(Importe As Decimal, Moneda As Integer, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer, Cuenta As Integer, Comprobante As String, Opcion As String) As Boolean
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
Dim Folio As Long
|
||||
@@ -1211,7 +1210,7 @@ Public Class WS_PuntoVenta
|
||||
Dim MsgError As String = ""
|
||||
Dim CveConceptoContable As Integer = 4
|
||||
Dim CveConceptoCompra As Integer = 30
|
||||
Dim CIF As Double = 0
|
||||
Dim CIF As Decimal = 0
|
||||
Dim CvePlantillaPoliza As Integer = 4
|
||||
Dim CveTipoPoliza As Integer = 1
|
||||
Dim CvePrePoliza As Integer = 0
|
||||
@@ -1227,15 +1226,14 @@ Public Class WS_PuntoVenta
|
||||
Folio = Banco.GetNextFolio(Cuenta, CveTipoTransaccion)
|
||||
Banco.Dispose()
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(Cuenta, CveTipoTransaccion, Fecha, Folio, "", Importe, Moneda,
|
||||
CveIE = ObjIE.AddBancos_IE(Cuenta, CveTipoTransaccion, Fecha, Folio.ToString, "", Importe, Moneda,
|
||||
0, Opcion, "", False, False, -1, CvePrePoliza, "pdf", CveUsuario, CveEmpresa)
|
||||
|
||||
|
||||
If CveIE > 0 Then
|
||||
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Importe, Importe, "", CveConceptoContable, " ", CveIE:=CveIE) Then
|
||||
Dim IVA As Double = 0
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe - IVA - CIF, Importe - IVA - CIF, "", CveConceptoCompra, " ", CveIE:=CveIE) Then
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Importe, Importe, CveConceptoContable, "", " ", CveIE:=CveIE) Then
|
||||
Dim IVA As Decimal = 0
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe - IVA - CIF, Importe - IVA - CIF, CveConceptoCompra, "", " ", CveIE:=CveIE) Then
|
||||
|
||||
Else
|
||||
MsgError = "no se pudo insertar el detalle de la póliza2"
|
||||
@@ -1243,9 +1241,7 @@ Public Class WS_PuntoVenta
|
||||
Else
|
||||
MsgError = "no se pudo insertar el detalle de la póliza"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjIE.Commit()
|
||||
|
||||
@@ -19,7 +19,7 @@ Public Class WsTSoft
|
||||
Inherits System.Web.Services.WebService
|
||||
|
||||
<WebMethod()>
|
||||
Public Function AddRemision(FolioRemision As String, NoEconomico As String, CveEstatus As Integer, GeoInicial As String, GeoCarga As String, GeoEntrega As String, Fecha As String) As String
|
||||
Public Function AddRemision(FolioRemision As String, NoEconomico As String, CveEstatus As Integer, GeoInicial As String, GeoCarga As String, GeoEntrega As String, Fecha As Date) As String
|
||||
Dim retorno As String = ""
|
||||
Dim Continuar As Boolean = False
|
||||
|
||||
@@ -54,7 +54,7 @@ Public Class WsTSoft
|
||||
End Function
|
||||
|
||||
<WebMethod()>
|
||||
Public Function UpEstatusRemision(FolioRemision As String, CveEstatus As String) As String
|
||||
Public Function UpEstatusRemision(FolioRemision As String, CveEstatus As Integer) As String
|
||||
Dim retorno As String = ""
|
||||
Dim objTsoft As New ClsTSoft
|
||||
Dim Continuar As Boolean = objTsoft.UpEstatusRemision(FolioRemision, CveEstatus)
|
||||
@@ -106,7 +106,7 @@ Public Class WsTSoft
|
||||
OnError("Ocurrió un error al asignar las direcciones", ex)
|
||||
End Try
|
||||
|
||||
Dim RowPosicion As DataRow = DtPosicion.Rows("0")
|
||||
Dim RowPosicion As DataRow = DtPosicion.Rows(0)
|
||||
|
||||
ObjPos.Fecha = RowPosicion("Fecha").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm:ss")
|
||||
ObjPos.Lat = RowPosicion("Lat").ToString()
|
||||
|
||||
Reference in New Issue
Block a user