Merge branch 'master' of http://rpimienta@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1,181 +1,181 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Linq
|
Imports System.Linq
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
|
||||||
Partial Class Bancos_CatBancos
|
Partial Class Bancos_CatBancos
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
ViewState("Orden") = ""
|
ViewState("Orden") = ""
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub CargaDatos()
|
Public Sub CargaDatos()
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
If ObjBancos.GetBancos() Then
|
If ObjBancos.GetBancos() Then
|
||||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTBancos = ObjBancos.DtResultados
|
GlobalDTBancos = ObjBancos.DtResultados
|
||||||
Else
|
Else
|
||||||
Me.GvDatos.DataSource = Nothing
|
Me.GvDatos.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
If ViewState("Orden").ToString() <> String.Empty Then
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
CargaGrid(ViewState("Orden").ToString())
|
||||||
Else
|
Else
|
||||||
CargaGrid("")
|
CargaGrid("")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
If ObjBancos.AddBancos(TxtBanco.Text.Trim, TxtEjecutivo.Text.Trim, TxtTelefono.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ObjBancos.AddBancos(TxtBanco.Text.Trim, TxtEjecutivo.Text.Trim, TxtTelefono.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
TxtBanco.Text = ""
|
TxtBanco.Text = ""
|
||||||
TxtEjecutivo.Text = ""
|
TxtEjecutivo.Text = ""
|
||||||
TxtTelefono.Text = ""
|
TxtTelefono.Text = ""
|
||||||
Alert("El nuevo Banco se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El nuevo Banco se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
UpTitulos.Update()
|
UpTitulos.Update()
|
||||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTBancos = ObjBancos.DtResultados
|
GlobalDTBancos = ObjBancos.DtResultados
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
If ViewState("Orden").ToString() <> String.Empty Then
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
CargaGrid(ViewState("Orden").ToString())
|
||||||
Else
|
Else
|
||||||
CargaGrid("")
|
CargaGrid("")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "G V D A T O S"
|
#Region "G V D A T O S"
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
If e.Row.RowIndex = 0 Then
|
If e.Row.RowIndex = 0 Then
|
||||||
e.Row.Cells(0).Width = Unit.Pixel(156) 'BANCO
|
e.Row.Cells(0).Width = Unit.Pixel(156) 'BANCO
|
||||||
e.Row.Cells(1).Width = Unit.Pixel(206) 'EJECUTIVO
|
e.Row.Cells(1).Width = Unit.Pixel(206) 'EJECUTIVO
|
||||||
e.Row.Cells(2).Width = Unit.Pixel(106) 'TELEFONO
|
e.Row.Cells(2).Width = Unit.Pixel(106) 'TELEFONO
|
||||||
e.Row.Cells(3).Width = Unit.Pixel(95) 'ESTATUS
|
e.Row.Cells(3).Width = Unit.Pixel(95) 'ESTATUS
|
||||||
e.Row.Cells(4).Width = Unit.Pixel(95) 'FECHA
|
e.Row.Cells(4).Width = Unit.Pixel(95) 'FECHA
|
||||||
e.Row.Cells(5).Width = Unit.Pixel(100) 'USUARIO
|
e.Row.Cells(5).Width = Unit.Pixel(100) 'USUARIO
|
||||||
e.Row.Cells(6).Width = Unit.Pixel(100) 'EDITAR
|
e.Row.Cells(6).Width = Unit.Pixel(100) 'EDITAR
|
||||||
e.Row.Cells(7).Width = Unit.Pixel(65) 'ELIMINAR
|
e.Row.Cells(7).Width = Unit.Pixel(65) 'ELIMINAR
|
||||||
End If
|
End If
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||||
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
|
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
If ObjBancos.RemoveBancos(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
If ObjBancos.RemoveBancos(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTBancos = ObjBancos.DtResultados
|
GlobalDTBancos = ObjBancos.DtResultados
|
||||||
Alert("El Banco se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("El Banco se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
If ViewState("Orden").ToString() <> String.Empty Then
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
CargaGrid(ViewState("Orden").ToString())
|
||||||
Else
|
Else
|
||||||
CargaGrid("")
|
CargaGrid("")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
If ViewState("Orden").ToString() <> String.Empty Then
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
CargaGrid(ViewState("Orden").ToString())
|
||||||
Else
|
Else
|
||||||
CargaGrid("")
|
CargaGrid("")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||||
|
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
|
|
||||||
Dim Banco As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtBanco"), TextBox).Text.Trim
|
Dim Banco As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtBanco"), TextBox).Text.Trim
|
||||||
Dim Ejecutivo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtEjecutivo"), TextBox).Text.Trim
|
Dim Ejecutivo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtEjecutivo"), TextBox).Text.Trim
|
||||||
Dim Telefono As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtTelefono"), TextBox).Text.Trim
|
Dim Telefono As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtTelefono"), TextBox).Text.Trim
|
||||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||||
Dim CveBanco As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
Dim CveBanco As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||||
|
|
||||||
|
|
||||||
If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco) Then
|
If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco) Then
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTBancos = ObjBancos.DtResultados
|
GlobalDTBancos = ObjBancos.DtResultados
|
||||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
If ViewState("Orden").ToString() <> String.Empty Then
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
CargaGrid(ViewState("Orden").ToString())
|
||||||
Else
|
Else
|
||||||
CargaGrid("")
|
CargaGrid("")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||||
GvDatos.EditIndex = e.NewEditIndex
|
GvDatos.EditIndex = e.NewEditIndex
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
If ViewState("Orden").ToString() <> String.Empty Then
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
CargaGrid(ViewState("Orden").ToString())
|
||||||
Else
|
Else
|
||||||
CargaGrid("")
|
CargaGrid("")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "O R D E N A M I E N T O"
|
#Region "O R D E N A M I E N T O"
|
||||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||||
Dim Orden As String = ""
|
Dim Orden As String = ""
|
||||||
Dim Campo As String = ""
|
Dim Campo As String = ""
|
||||||
Dim Literal As Literal = Nothing
|
Dim Literal As Literal = Nothing
|
||||||
Const OrdenInicial As String = ""
|
Const OrdenInicial As String = ""
|
||||||
Dim Arg(2) As String
|
Dim Arg(2) As String
|
||||||
|
|
||||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||||
Campo = Arg(0)
|
Campo = Arg(0)
|
||||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||||
|
|
||||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||||
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||||
Else
|
Else
|
||||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
||||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||||
End If
|
End If
|
||||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||||
ViewState("Orden") = Orden
|
ViewState("Orden") = Orden
|
||||||
CargaGrid(Orden)
|
CargaGrid(Orden)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaGrid(Orden As String)
|
Private Sub CargaGrid(Orden As String)
|
||||||
If Orden <> String.Empty Then
|
If Orden <> String.Empty Then
|
||||||
Dim DV As New DataView(CType(ViewState("DTBancos"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
Dim DV As New DataView(CType(ViewState("DTBancos"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||||
GvDatos.DataSource = DV.ToTable()
|
GvDatos.DataSource = DV.ToTable()
|
||||||
DV.Dispose()
|
DV.Dispose()
|
||||||
Else
|
Else
|
||||||
GvDatos.DataSource = CType(ViewState("DTBancos"), DataTable)
|
GvDatos.DataSource = CType(ViewState("DTBancos"), DataTable)
|
||||||
End If
|
End If
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
3068
Bancos/IE.aspx
3068
Bancos/IE.aspx
File diff suppressed because it is too large
Load Diff
37530
Compras/Compras.aspx.vb
37530
Compras/Compras.aspx.vb
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,388 +1,388 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Compras_RepRembolsoComprobaciones
|
Partial Class Compras_RepRembolsoComprobaciones
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
Private ReadOnly Property CveCajaChica As Integer
|
Private ReadOnly Property CveCajaChica As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveCajaChica").ToString.ToEntero
|
Return ViewState("CveCajaChica").ToString.ToEntero
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Private ReadOnly Property CvePersonal As Integer
|
Private ReadOnly Property CvePersonal As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CvePersonal").ToString.ToEntero
|
Return ViewState("CvePersonal").ToString.ToEntero
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Private Property CveMoneda As Integer
|
Private Property CveMoneda As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveMoneda").ToString.ToEntero
|
Return ViewState("CveMoneda").ToString.ToEntero
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveMoneda") = value
|
ViewState("CveMoneda") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property IdCuentaBancaria As Integer
|
Private Property IdCuentaBancaria As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("IdCuentaBancaria").ToString.ToEntero
|
Return ViewState("IdCuentaBancaria").ToString.ToEntero
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("IdCuentaBancaria") = value
|
ViewState("IdCuentaBancaria") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property NumeroReembolso As String
|
Private Property NumeroReembolso As String
|
||||||
Get
|
Get
|
||||||
NumeroReembolso = ViewState("NumeroReembolso").ToString
|
NumeroReembolso = ViewState("NumeroReembolso").ToString
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
ViewState("NumeroReembolso") = value
|
ViewState("NumeroReembolso") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property DtDatos As DataTable
|
Private Property DtDatos As DataTable
|
||||||
Get
|
Get
|
||||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||||
End Get
|
End Get
|
||||||
|
|
||||||
Set(ByVal value As DataTable)
|
Set(ByVal value As DataTable)
|
||||||
ViewState("DtDatos") = value
|
ViewState("DtDatos") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property DtCheques As DataTable
|
Private Property DtCheques As DataTable
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("DtCheques"), DataTable)
|
Return CType(ViewState("DtCheques"), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
ViewState("DtCheques") = value
|
ViewState("DtCheques") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
Private Sub Compras_RepRembolsoComprobaciones_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub Compras_RepRembolsoComprobaciones_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
|
|
||||||
ViewState("CveMoneda") = 1
|
ViewState("CveMoneda") = 1
|
||||||
|
|
||||||
'Cargar Filtros
|
'Cargar Filtros
|
||||||
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario)
|
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario)
|
||||||
dt = dt.FiltraParametros(String.Format("CveTipoCuenta = 1")) 'caja chica = 1
|
dt = dt.FiltraParametros(String.Format("CveTipoCuenta = 1")) 'caja chica = 1
|
||||||
DdlCajaChica.DataSource = dt
|
DdlCajaChica.DataSource = dt
|
||||||
DdlCajaChica.DataBind()
|
DdlCajaChica.DataBind()
|
||||||
|
|
||||||
Dim ObjPersonal As New ClsRH
|
Dim ObjPersonal As New ClsRH
|
||||||
ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa)
|
ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa)
|
||||||
DdlPersonal.DataSource = ObjPersonal.DtResultados
|
DdlPersonal.DataSource = ObjPersonal.DtResultados
|
||||||
ObjPersonal.Dispose()
|
ObjPersonal.Dispose()
|
||||||
DdlPersonal.DataBind()
|
DdlPersonal.DataBind()
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlTipoPago_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlTipoPago_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
ViewState("CveCajaChica") = -2
|
ViewState("CveCajaChica") = -2
|
||||||
ViewState("CvePersonal") = -2
|
ViewState("CvePersonal") = -2
|
||||||
|
|
||||||
LtTituloPago.Text = ""
|
LtTituloPago.Text = ""
|
||||||
|
|
||||||
If DdlTipoPago.SelectedValue = "1" Then
|
If DdlTipoPago.SelectedValue = "1" Then
|
||||||
DdlPersonal.Visible = True
|
DdlPersonal.Visible = True
|
||||||
DdlPersonal.SelectedValue = "-2"
|
DdlPersonal.SelectedValue = "-2"
|
||||||
LtTituloPago.Text = "F / E:"
|
LtTituloPago.Text = "F / E:"
|
||||||
|
|
||||||
'Valida Proceso 120 para ROL Administrador de obra - para FyE solo puede ver los del UsuarioActual
|
'Valida Proceso 120 para ROL Administrador de obra - para FyE solo puede ver los del UsuarioActual
|
||||||
If UsuarioActual.TienePermisoProceso(120) Then
|
If UsuarioActual.TienePermisoProceso(120) Then
|
||||||
If UsuarioActual.CvePersonal > 0 Then
|
If UsuarioActual.CvePersonal > 0 Then
|
||||||
DdlPersonal.SelectedValue = UsuarioActual.CvePersonal.ToString
|
DdlPersonal.SelectedValue = UsuarioActual.CvePersonal.ToString
|
||||||
ViewState("CvePersonal") = UsuarioActual.CvePersonal
|
ViewState("CvePersonal") = UsuarioActual.CvePersonal
|
||||||
End If
|
End If
|
||||||
DdlPersonal.Enabled = False
|
DdlPersonal.Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
DdlPersonal.Visible = False
|
DdlPersonal.Visible = False
|
||||||
DdlPersonal.SelectedValue = "-2"
|
DdlPersonal.SelectedValue = "-2"
|
||||||
|
|
||||||
DdlPersonal.Enabled = True
|
DdlPersonal.Enabled = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DdlTipoPago.SelectedValue = "2" Then
|
If DdlTipoPago.SelectedValue = "2" Then
|
||||||
DdlCajaChica.Visible = True
|
DdlCajaChica.Visible = True
|
||||||
DdlCajaChica.SelectedValue = "-2"
|
DdlCajaChica.SelectedValue = "-2"
|
||||||
LtTituloPago.Text = "Caja Chica:"
|
LtTituloPago.Text = "Caja Chica:"
|
||||||
Else
|
Else
|
||||||
DdlCajaChica.Visible = False
|
DdlCajaChica.Visible = False
|
||||||
DdlCajaChica.SelectedValue = "-2"
|
DdlCajaChica.SelectedValue = "-2"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
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
|
||||||
ViewState("CvePersonal") = DdlPersonal.SelectedValue
|
ViewState("CvePersonal") = DdlPersonal.SelectedValue
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlCajaChica_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCajaChica.SelectedIndexChanged
|
Protected Sub DdlCajaChica_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCajaChica.SelectedIndexChanged
|
||||||
ViewState("CveCajaChica") = DdlCajaChica.SelectedValue
|
ViewState("CveCajaChica") = DdlCajaChica.SelectedValue
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvCxP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP.RowDataBound
|
Protected Sub GvCxP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
If e.Row.RowIndex = 0 Then
|
If e.Row.RowIndex = 0 Then
|
||||||
e.Row.BackColor = Drawing.Color.LightGray
|
e.Row.BackColor = Drawing.Color.LightGray
|
||||||
End If
|
End If
|
||||||
'If e.Row.RowIndex = 1 Then
|
'If e.Row.RowIndex = 1 Then
|
||||||
' e.Row.Cells(0).Width = Unit.Pixel(100)
|
' e.Row.Cells(0).Width = Unit.Pixel(100)
|
||||||
' e.Row.Cells(1).Width = Unit.Pixel(300)
|
' e.Row.Cells(1).Width = Unit.Pixel(300)
|
||||||
' e.Row.Cells(2).Width = Unit.Pixel(70)
|
' e.Row.Cells(2).Width = Unit.Pixel(70)
|
||||||
' e.Row.Cells(3).Width = Unit.Pixel(70)
|
' e.Row.Cells(3).Width = Unit.Pixel(70)
|
||||||
' e.Row.Cells(4).Width = Unit.Pixel(80)
|
' e.Row.Cells(4).Width = Unit.Pixel(80)
|
||||||
' e.Row.Cells(5).Width = Unit.Pixel(40)
|
' e.Row.Cells(5).Width = Unit.Pixel(40)
|
||||||
' e.Row.Cells(6).Width = Unit.Pixel(60)
|
' e.Row.Cells(6).Width = Unit.Pixel(60)
|
||||||
' e.Row.Cells(7).Width = Unit.Pixel(60)
|
' e.Row.Cells(7).Width = Unit.Pixel(60)
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
|
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
|
||||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
|
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
|
||||||
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right
|
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right
|
||||||
|
|
||||||
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(7).ForeColor = Drawing.Color.Red
|
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(7).ForeColor = Drawing.Color.Red
|
||||||
If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxP" Then e.Row.Cells(5).ForeColor = Drawing.Color.Red
|
If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxP" Then e.Row.Cells(5).ForeColor = Drawing.Color.Red
|
||||||
If e.Row.DBCampo("Original").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldoOriginal"), Literal).Text = ""
|
If e.Row.DBCampo("Original").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldoOriginal"), Literal).Text = ""
|
||||||
If e.Row.DBCampo("Abonado").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlAbonado"), Literal).Text = ""
|
If e.Row.DBCampo("Abonado").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlAbonado"), Literal).Text = ""
|
||||||
If e.Row.DBCampo("Saldo").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldo"), Literal).Text = ""
|
If e.Row.DBCampo("Saldo").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldo"), Literal).Text = ""
|
||||||
If Not e.Row.DBCampo("IdPoliza").ToEntero > 0 Then e.Row.Cells(13).Text = ""
|
If Not e.Row.DBCampo("IdPoliza").ToEntero > 0 Then e.Row.Cells(13).Text = ""
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub LbkUnificar_Click(sender As Object, e As EventArgs) Handles LbkUnificar.Click
|
Private Sub LbkUnificar_Click(sender As Object, e As EventArgs) Handles LbkUnificar.Click
|
||||||
Dim ObjComp As New ClsCompras()
|
Dim ObjComp As New ClsCompras()
|
||||||
Dim ObjMov As New ClsContabilidad(ObjComp.IniciaTransacSQL)
|
Dim ObjMov As New ClsContabilidad(ObjComp.IniciaTransacSQL)
|
||||||
Dim ObjAC As ClsContPAQi = Nothing
|
Dim ObjAC As ClsContPAQi = Nothing
|
||||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
ObjAC.IniciaTransacSQL()
|
ObjAC.IniciaTransacSQL()
|
||||||
End If
|
End If
|
||||||
Dim TieneError = False
|
Dim TieneError = False
|
||||||
Dim CvePrePoliza As Integer = 0
|
Dim CvePrePoliza As Integer = 0
|
||||||
Dim IdPoliza As Integer = 0
|
Dim IdPoliza As Integer = 0
|
||||||
Dim Msg As New StringBuilder
|
Dim Msg As New StringBuilder
|
||||||
|
|
||||||
CvePrePoliza = ObjMov.AddPrePolizas("Compras/Registrar", 1, DtDatos(0)("Original").ToString.ToDecimal, DtDatos(0)("Original").ToString.ToDecimal, CveMoneda, TxtFechaUnificacion.Text.Trim.ToDate(), TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
CvePrePoliza = ObjMov.AddPrePolizas("Compras/Registrar", 1, DtDatos(0)("Original").ToString.ToDecimal, DtDatos(0)("Original").ToString.ToDecimal, CveMoneda, TxtFechaUnificacion.Text.Trim.ToDate(), TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
||||||
|
|
||||||
If CvePrePoliza > 0 AndAlso DdlPersonal.SelectedValue.ToEntero > 0 Then
|
If CvePrePoliza > 0 AndAlso DdlPersonal.SelectedValue.ToEntero > 0 Then
|
||||||
If Not ObjComp.UnificarComprasPersonal(CvePrePoliza, DdlPersonal.SelectedValue.ToEntero, -1, TxtNumeroReembolso.Text, UsuarioActual.CveEmpresa) Then
|
If Not ObjComp.UnificarComprasPersonal(CvePrePoliza, DdlPersonal.SelectedValue.ToEntero, -1, TxtNumeroReembolso.Text, UsuarioActual.CveEmpresa) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If CvePrePoliza > 0 AndAlso DdlCajaChica.SelectedValue.ToEntero > 0 Then
|
If CvePrePoliza > 0 AndAlso DdlCajaChica.SelectedValue.ToEntero > 0 Then
|
||||||
If Not ObjComp.UnificarComprasPersonal(CvePrePoliza, -1, DdlCajaChica.SelectedValue.ToEntero, TxtNumeroReembolso.Text, UsuarioActual.CveEmpresa) Then
|
If Not ObjComp.UnificarComprasPersonal(CvePrePoliza, -1, DdlCajaChica.SelectedValue.ToEntero, TxtNumeroReembolso.Text, UsuarioActual.CveEmpresa) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||||
GuardaLogAD($"Compras/RepRembolsoComprobaciones - Unificar | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
GuardaLogAD($"Compras/RepRembolsoComprobaciones - Unificar | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
Msg.AppendFormat("Se unificaron todas las compras con éxito")
|
Msg.AppendFormat("Se unificaron todas las compras con éxito")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaContabilidad AndAlso Not TieneError Then
|
If UsuarioActual.Empresa.UsaContabilidad AndAlso Not TieneError Then
|
||||||
If ObjAC Is Nothing Then
|
If ObjAC Is Nothing Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
If Not ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjAC) Then
|
If Not ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjAC) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Alert($"Ocurrio un error al contabilizar {ObjMov.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
|
Alert($"Ocurrio un error al contabilizar {ObjMov.AlertaMensaje}", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
IdPoliza = ObjMov.ContaIdPoliza
|
IdPoliza = ObjMov.ContaIdPoliza
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If IdPoliza > 0 AndAlso Not TieneError Then
|
If IdPoliza > 0 AndAlso Not TieneError Then
|
||||||
Msg.AppendFormat("<br/><br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IdPoliza)
|
Msg.AppendFormat("<br/><br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IdPoliza)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
ObjComp.Commit()
|
ObjComp.Commit()
|
||||||
If ObjAC IsNot Nothing Then ObjAC.Commit()
|
If ObjAC IsNot Nothing Then ObjAC.Commit()
|
||||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
ObjComp.RollBack()
|
ObjComp.RollBack()
|
||||||
If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
If ObjAC IsNot Nothing Then ObjAC.RollBack()
|
||||||
Alert("Ocurrió un error al unificar las compras", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrió un error al unificar las compras", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjComp.Dispose()
|
ObjComp.Dispose()
|
||||||
ObjMov.Dispose()
|
ObjMov.Dispose()
|
||||||
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
If ObjAC IsNot Nothing Then ObjAC.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region " CARGA DATOS "
|
#Region " CARGA DATOS "
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||||
CargaCxP()
|
CargaCxP()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaDatos(tCveIE As Integer)
|
Private Sub CargaDatos(tCveIE As Integer)
|
||||||
Dim ObjIE As New ClsBancos()
|
Dim ObjIE As New ClsBancos()
|
||||||
|
|
||||||
If ObjIE.GetBancosIE(tCveIE, UsuarioActual.CveEmpresa) Then
|
If ObjIE.GetBancosIE(tCveIE, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("El Documento solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
Alert("El Documento solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjIE.Dispose()
|
ObjIE.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub CargaCxP()
|
Protected Sub CargaCxP()
|
||||||
Dim ObjMovtos As New ClsMovimientos
|
Dim ObjMovtos As New ClsMovimientos
|
||||||
|
|
||||||
GvCxP.Visible = True
|
GvCxP.Visible = True
|
||||||
|
|
||||||
ObjMovtos.GetCxPPersonalCajaChica(UsuarioActual.CveEmpresa, CvePersonal, CveCajaChica, If(TxtNumeroReembolso.Text.Trim = "", "-1", TxtNumeroReembolso.Text.Trim))
|
ObjMovtos.GetCxPPersonalCajaChica(UsuarioActual.CveEmpresa, CvePersonal, CveCajaChica, If(TxtNumeroReembolso.Text.Trim = "", "-1", TxtNumeroReembolso.Text.Trim))
|
||||||
DtDatos = ObjMovtos.DtResultados
|
DtDatos = ObjMovtos.DtResultados
|
||||||
GvCxP.DataSource = DtDatos
|
GvCxP.DataSource = DtDatos
|
||||||
|
|
||||||
'cargo si tiene cheques pendientes sin amortizar
|
'cargo si tiene cheques pendientes sin amortizar
|
||||||
If CvePersonal > 0 Then
|
If CvePersonal > 0 Then
|
||||||
If DtDatos.Rows.Count > 0 AndAlso TxtNumeroReembolso.Text.Trim <> "" Then
|
If DtDatos.Rows.Count > 0 AndAlso TxtNumeroReembolso.Text.Trim <> "" Then
|
||||||
TxtConcepto.Text = $"{DdlPersonal.SelectedItem} R#{TxtNumeroReembolso.Text} ${DtDatos(0)("Original").ToString.FormatoNumero}"
|
TxtConcepto.Text = $"{DdlPersonal.SelectedItem} R#{TxtNumeroReembolso.Text} ${DtDatos(0)("Original").ToString.FormatoNumero}"
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
divUnificar.Visible = True
|
divUnificar.Visible = True
|
||||||
If DtDatos.Rows.Count > 1 Then TxtFechaUnificacion.Text = DtDatos(1)("FechaCompra").ToString.ToDate.ToShortDateString
|
If DtDatos.Rows.Count > 1 Then TxtFechaUnificacion.Text = DtDatos(1)("FechaCompra").ToString.ToDate.ToShortDateString
|
||||||
End If
|
End If
|
||||||
CargaEgresosSinComprobar()
|
CargaEgresosSinComprobar()
|
||||||
Else
|
Else
|
||||||
If UsuarioActual.CveEmpresa = 119 Then divUnificar.Visible = False
|
If UsuarioActual.CveEmpresa = 119 Then divUnificar.Visible = False
|
||||||
End If
|
End If
|
||||||
'ObjMovtos.GetEgresosSinComprobarPersonalDetalle(CvePersonal, UsuarioActual.CveEmpresa)
|
'ObjMovtos.GetEgresosSinComprobarPersonalDetalle(CvePersonal, UsuarioActual.CveEmpresa)
|
||||||
Else
|
Else
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
divUnificar.Visible = True
|
divUnificar.Visible = True
|
||||||
If DtDatos.Rows.Count > 1 Then TxtFechaUnificacion.Text = DtDatos(1)("FechaCompra").ToString.ToDate.ToShortDateString
|
If DtDatos.Rows.Count > 1 Then TxtFechaUnificacion.Text = DtDatos(1)("FechaCompra").ToString.ToDate.ToShortDateString
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 AndAlso CveCajaChica > 0 AndAlso DtDatos.Rows.Count > 0 AndAlso TxtNumeroReembolso.Text.Trim <> "" Then
|
If UsuarioActual.CveEmpresa = 119 AndAlso CveCajaChica > 0 AndAlso DtDatos.Rows.Count > 0 AndAlso TxtNumeroReembolso.Text.Trim <> "" Then
|
||||||
TxtConcepto.Text = $"{DdlCajaChica.SelectedItem} R#{TxtNumeroReembolso.Text} ${DtDatos(0)("Original").ToString.FormatoNumero}"
|
TxtConcepto.Text = $"{DdlCajaChica.SelectedItem} R#{TxtNumeroReembolso.Text} ${DtDatos(0)("Original").ToString.FormatoNumero}"
|
||||||
|
|
||||||
divUnificar.Visible = True
|
divUnificar.Visible = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjMovtos.Dispose()
|
ObjMovtos.Dispose()
|
||||||
GvCxP.DataBind()
|
GvCxP.DataBind()
|
||||||
|
|
||||||
LnkImprimir.Visible = True
|
LnkImprimir.Visible = True
|
||||||
NumeroReembolso = TxtNumeroReembolso.Text
|
NumeroReembolso = TxtNumeroReembolso.Text
|
||||||
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
||||||
If NumeroReembolso <> "" AndAlso CvePersonal > 0 AndAlso DtDatos.MAX("CvePrePolizaComprobacionSinBancos").ToEntero > 0 Then
|
If NumeroReembolso <> "" AndAlso CvePersonal > 0 AndAlso DtDatos.MAX("CvePrePolizaComprobacionSinBancos").ToEntero > 0 Then
|
||||||
DivVincularEgreso.Visible = True
|
DivVincularEgreso.Visible = True
|
||||||
Else
|
Else
|
||||||
DivVincularEgreso.Visible = False
|
DivVincularEgreso.Visible = False
|
||||||
End If
|
End If
|
||||||
If DtDatos.MAX("IdPoliza").ToEntero > 0 Then
|
If DtDatos.MAX("IdPoliza").ToEntero > 0 Then
|
||||||
LbkUnificar.Visible = False
|
LbkUnificar.Visible = False
|
||||||
Else
|
Else
|
||||||
LbkUnificar.Visible = True
|
LbkUnificar.Visible = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
UpAcciones.Update()
|
UpAcciones.Update()
|
||||||
|
|
||||||
UPCompras.Update()
|
UPCompras.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "PDF"
|
#Region "PDF"
|
||||||
Protected Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
|
Protected Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
|
||||||
Imprimir("PDF")
|
Imprimir("PDF")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||||
Imprimir("EXCEL")
|
Imprimir("EXCEL")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Imprimir(Formato As String)
|
Private Sub Imprimir(Formato As String)
|
||||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\Reembolso.rdlc", UsuarioActual.Empresa.Ruta))
|
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\Reembolso.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
If Archivo.Exists Then
|
If Archivo.Exists Then
|
||||||
params.Add(New ReportParameter("Numero", NumeroReembolso))
|
params.Add(New ReportParameter("Numero", NumeroReembolso))
|
||||||
params.Add(New ReportParameter("Anio", DtDatos.FiltraParametros("CveCompra > 0").MAX("Fecha").ToDate.Year.ToString))
|
params.Add(New ReportParameter("Anio", DtDatos.FiltraParametros("CveCompra > 0").MAX("Fecha").ToDate.Year.ToString))
|
||||||
params.Add(New ReportParameter("Nombre", DtDatos.MAX("SubProyecto")))
|
params.Add(New ReportParameter("Nombre", DtDatos.MAX("SubProyecto")))
|
||||||
params.Add(New ReportParameter("Fecha", Now.Date.ToString))
|
params.Add(New ReportParameter("Fecha", Now.Date.ToString))
|
||||||
params.Add(New ReportParameter("Elaboro", ""))
|
params.Add(New ReportParameter("Elaboro", ""))
|
||||||
params.Add(New ReportParameter("Autorizo", ""))
|
params.Add(New ReportParameter("Autorizo", ""))
|
||||||
params.Add(New ReportParameter("ElaboroPuesto", ""))
|
params.Add(New ReportParameter("ElaboroPuesto", ""))
|
||||||
params.Add(New ReportParameter("AutorizoPuesto", ""))
|
params.Add(New ReportParameter("AutorizoPuesto", ""))
|
||||||
ImprimirPDF(String.Format("{0}Formatos\Reembolso.rdlc", UsuarioActual.Empresa.Ruta), DtDatos.FiltraParametros("CveCompra > 0"), params, "Reembolso", RDSName:="DsCompras")
|
ImprimirPDF(String.Format("{0}Formatos\Reembolso.rdlc", UsuarioActual.Empresa.Ruta), DtDatos.FiltraParametros("CveCompra > 0"), params, "Reembolso", RDSName:="DsCompras")
|
||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
|
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
|
||||||
|
|
||||||
params.Add(New ReportParameter("CajaChica", If(DdlCajaChica.SelectedValue.ToEntero > 0, "Caja chica: " & DdlCajaChica.SelectedItem.Text, "Funcionario/Empleado: " & DdlPersonal.SelectedItem.Text)))
|
params.Add(New ReportParameter("CajaChica", If(DdlCajaChica.SelectedValue.ToEntero > 0, "Caja chica: " & DdlCajaChica.SelectedItem.Text, "Funcionario/Empleado: " & DdlPersonal.SelectedItem.Text)))
|
||||||
|
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
params.Add(New ReportParameter("LogoPath", logouri))
|
params.Add(New ReportParameter("LogoPath", logouri))
|
||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("LogoPath", ""))
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ImprimirPDF("Empresas/Grales/Formatos/RepRembolsosComprobaciones.rdlc", DtDatos, params, "RepRembolsosComprobaciones", Formato:=Formato)
|
ImprimirPDF("Empresas/Grales/Formatos/RepRembolsosComprobaciones.rdlc", DtDatos, params, "RepRembolsosComprobaciones", Formato:=Formato)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Private Sub CargaEgresosSinComprobar()
|
Private Sub CargaEgresosSinComprobar()
|
||||||
If CvePersonal > 0 Then
|
If CvePersonal > 0 Then
|
||||||
DdlCheque.Items.Clear()
|
DdlCheque.Items.Clear()
|
||||||
Dim ObjMov As New ClsMovimientos
|
Dim ObjMov As New ClsMovimientos
|
||||||
If ObjMov.GetEgresosSinComprobarPersonalDetalle(CvePersonal, UsuarioActual.CveEmpresa) Then
|
If ObjMov.GetEgresosSinComprobarPersonalDetalle(CvePersonal, UsuarioActual.CveEmpresa) Then
|
||||||
DdlCheque.DataSource = ObjMov.DtResultados.FiltraParametros("CveIE > 0", "FechaDocumento, FolioFecha")
|
DdlCheque.DataSource = ObjMov.DtResultados.FiltraParametros("CveIE > 0", "FechaDocumento, FolioFecha")
|
||||||
DdlCheque.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlCheque.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End If
|
End If
|
||||||
ObjMov.Dispose()
|
ObjMov.Dispose()
|
||||||
DdlCheque.DataBind()
|
DdlCheque.DataBind()
|
||||||
UPCompras.Update()
|
UPCompras.Update()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnVincularEgreso_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnVincularEgreso_Click(sender As Object, e As EventArgs)
|
||||||
If Not DdlCheque.SelectedValue.ToEntero > 0 Then
|
If Not DdlCheque.SelectedValue.ToEntero > 0 Then
|
||||||
Alert("Tiene que tener seleccionado un egreso sin comprobar", TipoMensaje.MsgAdvertencia)
|
Alert("Tiene que tener seleccionado un egreso sin comprobar", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjIE As New ClsBancos
|
Dim ObjIE As New ClsBancos
|
||||||
If ObjIE.UpdateComprobacionSinBancos(DdlCheque.SelectedValue.ToEntero, DtDatos.MAX("CvePrePolizaComprobacionSinBancos").ToEntero,
|
If ObjIE.UpdateComprobacionSinBancos(DdlCheque.SelectedValue.ToEntero, DtDatos.MAX("CvePrePolizaComprobacionSinBancos").ToEntero,
|
||||||
CvePersonal, UsuarioActual.CveEmpresa) Then
|
CvePersonal, UsuarioActual.CveEmpresa) Then
|
||||||
Alert("Vinculado correctamente")
|
Alert("Vinculado correctamente")
|
||||||
DdlCheque.SelectedIndex = 0
|
DdlCheque.SelectedIndex = 0
|
||||||
CargaEgresosSinComprobar()
|
CargaEgresosSinComprobar()
|
||||||
End If
|
End If
|
||||||
ObjIE.Dispose()
|
ObjIE.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -203,7 +203,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>www.adsistemas.mx|facturacion@adssistemas.mx</Value>
|
<Value>www.adssistemas.mx|facturacion@adssistemas.mx</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontStyle>Normal</FontStyle>
|
<FontStyle>Normal</FontStyle>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
|
|||||||
@@ -8,14 +8,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#DivShipment {
|
|
||||||
z-index: 1999;
|
|
||||||
}
|
|
||||||
|
|
||||||
#DivStop {
|
|
||||||
z-index: 2000;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
@@ -257,11 +249,13 @@
|
|||||||
<asp:RequiredFieldValidator ID="RFVName" runat="server" ControlToValidate="TxtLocName" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Name''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVName" runat="server" ControlToValidate="TxtLocName" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Name''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtLocName.ClientID.ToString()%>">Name:</label>
|
<label for="<%= TxtLocName.ClientID.ToString()%>">Name:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<form method="post">
|
||||||
<asp:TextBox ID="TxtLocID" CssClass="form-control " runat="server"></asp:TextBox>
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtLocID" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Location''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<asp:TextBox ID="TxtLocID" CssClass="form-control " runat="server"></asp:TextBox>
|
||||||
<label for="<%= TxtLocID.ClientID.ToString()%>">Location ID:</label>
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtLocID" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Location''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
</div>
|
<label for="<%= TxtLocID.ClientID.ToString()%>">Location ID:</label>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
<div class="portlet light smmallpadding traspasorow bordered">
|
<div class="portlet light smmallpadding traspasorow bordered">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
@@ -306,19 +300,27 @@
|
|||||||
<div class="row v-center">
|
<div class="row v-center">
|
||||||
<label class="col-md-12" style="color: gray">Early Arrival Time:</label>
|
<label class="col-md-12" style="color: gray">Early Arrival Time:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
<div class="row">
|
||||||
<asp:TextBox ID="TxtFechaStopI" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
<div class="col-md-12">
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaIStop" runat="server" ControlToValidate="TxtFechaStopI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Early Arrival Time''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEI" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaIStop" Width="350px"></ajax:ValidatorCalloutExtender>
|
<asp:TextBox ID="TxtFechaStopI" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaIStop" runat="server" ControlToValidate="TxtFechaStopI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Early Arrival Time''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEI" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaIStop" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="row v-center">
|
<div class="row v-center">
|
||||||
<label class="col-md-12" style="color: gray">Late Arrival Time:</label>
|
<label class="col-md-12" style="color: gray">Late Arrival Time:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
<div class="row">
|
||||||
<asp:TextBox ID="TxtFechaStopF" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
<div class="col-md-12">
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaFStop" runat="server" ControlToValidate="TxtFechaStopF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Late Arrival Time''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEF" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFStop" Width="350px"></ajax:ValidatorCalloutExtender>
|
<asp:TextBox ID="TxtFechaStopF" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaFStop" runat="server" ControlToValidate="TxtFechaStopF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Late Arrival Time''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEF" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFStop" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@@ -346,9 +348,16 @@
|
|||||||
<asp:RequiredFieldValidator ID="RFVStopRole" runat="server" ControlToValidate="DdlStopRole" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Stop Role''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVStopRole" runat="server" ControlToValidate="DdlStopRole" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Stop Role''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= DdlStopRole.ClientID.ToString()%>">Stop Role:</label>
|
<label for="<%= DdlStopRole.ClientID.ToString()%>">Stop Role:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="row v-center">
|
||||||
<asp:TextBox ID="TxtLoc" CssClass="form-control " runat="server"></asp:TextBox>
|
<div class="col-md-9">
|
||||||
<label for="<%= TxtLoc.ClientID.ToString()%>">Search Location:</label>
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtLoc" CssClass="form-control" runat="server"></asp:TextBox>
|
||||||
|
<label for="<%= TxtLoc.ClientID.ToString()%>">Search Location:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3 v-center">
|
||||||
|
<button type="button" class="btn btn-primary" onclick="BtnBuscar();">Buscar</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet light smmallpadding traspasorow bordered">
|
<div class="portlet light smmallpadding traspasorow bordered">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
@@ -510,6 +519,9 @@
|
|||||||
var markersEvent = [];
|
var markersEvent = [];
|
||||||
var markerEvent;
|
var markerEvent;
|
||||||
|
|
||||||
|
var searchBox;
|
||||||
|
var searchBoxEvent;
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initMap();
|
initMap();
|
||||||
Sys.Application.add_load(function (s, e) {
|
Sys.Application.add_load(function (s, e) {
|
||||||
@@ -517,9 +529,10 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#DivShipment').on('hidden.bs.modal', function () {
|
|
||||||
return false;
|
//$("form").submit(function (event) {
|
||||||
});
|
// event.preventDefault();
|
||||||
|
//});
|
||||||
|
|
||||||
function initMap() {
|
function initMap() {
|
||||||
|
|
||||||
@@ -544,65 +557,23 @@
|
|||||||
directionsDisplayEvent.setOptions({ suppressMarkers: true });
|
directionsDisplayEvent.setOptions({ suppressMarkers: true });
|
||||||
directionsDisplayEvent.setMap(mapEvent);
|
directionsDisplayEvent.setMap(mapEvent);
|
||||||
|
|
||||||
var searchBox = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc.ClientID%>"));
|
searchBox = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc.ClientID%>"));
|
||||||
var searchBoxEvent = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc2.ClientID%>"));
|
searchBoxEvent = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc2.ClientID%>"));
|
||||||
|
|
||||||
|
$("#<%= TxtLoc.ClientID%>").bind('keypress', function (e) {
|
||||||
|
if (e.keyCode == 13) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("#<%= TxtLoc2.ClientID%>").bind('keypress', function (e) {
|
||||||
|
if (e.keyCode == 13) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
searchBox.addListener('places_changed', function () {
|
searchBox.addListener('places_changed', function () {
|
||||||
var places = searchBox.getPlaces();
|
var places = searchBox.getPlaces();
|
||||||
if (places.length == 0) {
|
BuscarDireccion(places);
|
||||||
return;
|
|
||||||
}
|
|
||||||
var bounds = new google.maps.LatLngBounds();
|
|
||||||
places.forEach(function (place) {
|
|
||||||
if (!place.geometry) {
|
|
||||||
console.log("Returned place contains no geometry");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var lat = place.geometry.location.lat();
|
|
||||||
var lng = place.geometry.location.lng();
|
|
||||||
|
|
||||||
$("#<%= TxtLatLong.ClientID%>").val(lat + ',' + lng);
|
|
||||||
|
|
||||||
getDirecciones(lat, lng);
|
|
||||||
|
|
||||||
var icon = {
|
|
||||||
url: 'http://maps.google.com/mapfiles/ms/micons/truck.png',
|
|
||||||
size: new google.maps.Size(71, 71),
|
|
||||||
origin: new google.maps.Point(0, 0),
|
|
||||||
anchor: new google.maps.Point(17, 34),
|
|
||||||
scaledSize: new google.maps.Size(25, 25)
|
|
||||||
};
|
|
||||||
|
|
||||||
marker = new google.maps.Marker({
|
|
||||||
map: map,
|
|
||||||
icon: icon,
|
|
||||||
title: place.name,
|
|
||||||
position: place.geometry.location,
|
|
||||||
draggable: true,
|
|
||||||
animation: google.maps.Animation.DROP
|
|
||||||
});
|
|
||||||
|
|
||||||
google.maps.event.addListener(marker, 'dragend', function () {
|
|
||||||
var pos = marker.getPosition();
|
|
||||||
getDirecciones(pos.lat(), pos.lng());
|
|
||||||
});
|
|
||||||
// Create a marker for each place.
|
|
||||||
deleteMarkers(markers);
|
|
||||||
markers.push(marker);
|
|
||||||
|
|
||||||
if (place.geometry.viewport) {
|
|
||||||
// Only geocodes have viewport.
|
|
||||||
bounds.union(place.geometry.viewport);
|
|
||||||
} else {
|
|
||||||
bounds.extend(place.geometry.location);
|
|
||||||
}
|
|
||||||
|
|
||||||
map.fitBounds(bounds);
|
|
||||||
map.setCenter(bounds.getCenter());
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
searchBoxEvent.addListener('places_changed', function () {
|
searchBoxEvent.addListener('places_changed', function () {
|
||||||
@@ -632,6 +603,67 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
function BtnBuscar() {
|
||||||
|
var input = document.getElementById("<%= TxtLoc.ClientID%>");
|
||||||
|
|
||||||
|
google.maps.event.trigger(input, 'focus', {});
|
||||||
|
google.maps.event.trigger(input, 'keydown', { keyCode: 13 });
|
||||||
|
google.maps.event.trigger(this, 'focus', {});
|
||||||
|
}
|
||||||
|
function BuscarDireccion(places) {
|
||||||
|
if (places.length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var bounds = new google.maps.LatLngBounds();
|
||||||
|
places.forEach(function (place) {
|
||||||
|
if (!place.geometry) {
|
||||||
|
console.log("Returned place contains no geometry");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var lat = place.geometry.location.lat();
|
||||||
|
var lng = place.geometry.location.lng();
|
||||||
|
|
||||||
|
$("#<%= TxtLatLong.ClientID%>").val(lat + ',' + lng);
|
||||||
|
|
||||||
|
getDirecciones(lat, lng);
|
||||||
|
|
||||||
|
var icon = {
|
||||||
|
url: 'http://maps.google.com/mapfiles/ms/micons/truck.png',
|
||||||
|
size: new google.maps.Size(71, 71),
|
||||||
|
origin: new google.maps.Point(0, 0),
|
||||||
|
anchor: new google.maps.Point(17, 34),
|
||||||
|
scaledSize: new google.maps.Size(25, 25)
|
||||||
|
};
|
||||||
|
|
||||||
|
marker = new google.maps.Marker({
|
||||||
|
map: map,
|
||||||
|
icon: icon,
|
||||||
|
title: place.name,
|
||||||
|
position: place.geometry.location,
|
||||||
|
draggable: true,
|
||||||
|
animation: google.maps.Animation.DROP
|
||||||
|
});
|
||||||
|
|
||||||
|
google.maps.event.addListener(marker, 'dragend', function () {
|
||||||
|
var pos = marker.getPosition();
|
||||||
|
getDirecciones(pos.lat(), pos.lng());
|
||||||
|
});
|
||||||
|
// Create a marker for each place.
|
||||||
|
deleteMarkers(markers);
|
||||||
|
markers.push(marker);
|
||||||
|
|
||||||
|
if (place.geometry.viewport) {
|
||||||
|
// Only geocodes have viewport.
|
||||||
|
bounds.union(place.geometry.viewport);
|
||||||
|
} else {
|
||||||
|
bounds.extend(place.geometry.location);
|
||||||
|
}
|
||||||
|
|
||||||
|
map.fitBounds(bounds);
|
||||||
|
map.setCenter(bounds.getCenter());
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
function cargapin(lat, lng) {
|
function cargapin(lat, lng) {
|
||||||
setTimeout(function () { SetMapPinEvent(lat, lng) }, 1000);
|
setTimeout(function () { SetMapPinEvent(lat, lng) }, 1000);
|
||||||
}
|
}
|
||||||
@@ -682,22 +714,21 @@
|
|||||||
}
|
}
|
||||||
markers = [];
|
markers = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDirecciones(lat, lng) {
|
function getDirecciones(lat, lng) {
|
||||||
var url = '<%= ClsPaginas.UrlDirecciones%>' + 'nominatim/reverse.php?format=jsonv2&zoom=18&addressdetails=1&lat=' + lat + '&lon=' + lng;
|
var url = '<%= ClsPaginas.UrlDirecciones%>' + 'nominatim/reverse.php?format=jsonv2&zoom=18&addressdetails=1&lat=' + lat + '&lon=' + lng;
|
||||||
$.getJSON(url, function (data) {
|
$.getJSON(url, function (data) {
|
||||||
if (typeof (data.error) === 'undefined') {
|
if (typeof (data.error) === 'undefined') {
|
||||||
|
|
||||||
$("#<%= TxtLatLong.ClientID%>").val(lat + ',' + lng);
|
$("#<%= TxtLatLong.ClientID%>").val(lat + ',' + lng);
|
||||||
$("#<%= TxtAddress.ClientID%>").val(data.display_name);
|
$("#<%= TxtAddress.ClientID%>").val(data.display_name);
|
||||||
$("#<%= TxtCity.ClientID%>").val(data.address.city);
|
$("#<%= TxtCity.ClientID%>").val(data.address.city);
|
||||||
$("#<%= TxtState.ClientID%>").val(data.address.state);
|
$("#<%= TxtState.ClientID%>").val(data.address.state);
|
||||||
$("#<%= TxtContry.ClientID%>").val(data.address.country);
|
$("#<%= TxtContry.ClientID%>").val(data.address.country);
|
||||||
$("#<%= TxtPostalCode.ClientID%>").val(data.address.postcode);
|
$("#<%= TxtPostalCode.ClientID%>").val(data.address.postcode);
|
||||||
|
}
|
||||||
$('#DivShipment').modal({ backdrop: 'static', keyboard: false });
|
});
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script
|
||||||
|
|||||||
@@ -1311,31 +1311,32 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
Dim TxtCantidad = GvDatos.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
Dim TxtCantidad = GvDatos.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
||||||
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
''VALIDA EXISTENCIA
|
''VALIDA EXISTENCIA
|
||||||
If TipoMovimiento = 1 Then
|
If Not TipoDocto.Contiene("Dev") Then
|
||||||
Dim ObjInventario As New ClsInventarios
|
If TipoMovimiento = 1 Then
|
||||||
Dim Existencia = ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
Dim ObjInventario As New ClsInventarios
|
||||||
ObjInventario.Dispose()
|
Dim Existencia = ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
||||||
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
ObjInventario.Dispose()
|
||||||
TxtCodigoPS.Text = ""
|
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
||||||
Alert($"No hay existencias suficientes del producto: <br/><b>""{Gvr.DataKey("Codigo")}-{Gvr.DataKey("PS")}""</b>. <br/>Solo hay disponibles <b>{Existencia.FormatoNumero}</b> en Almacen. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
TxtCodigoPS.Text = ""
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
Alert($"No hay existencias suficientes del producto: <br/><b>""{Gvr.DataKey("Codigo")}-{Gvr.DataKey("PS")}""</b>. <br/>Solo hay disponibles <b>{Existencia.FormatoNumero}</b> en Almacen. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||||
Exit Sub
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
End If
|
Exit Sub
|
||||||
Else
|
End If
|
||||||
If DtExistencias IsNot Nothing Then
|
Else
|
||||||
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {Gvr.DataKey("CvePS")} AND CveUM = {Gvr.DataKey("CveUM").ToString.ToEntero}")
|
If DtExistencias IsNot Nothing Then
|
||||||
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {Gvr.DataKey("CvePS")} AND CveUM = {Gvr.DataKey("CveUM").ToString.ToEntero}")
|
||||||
TxtCodigoPS.Text = ""
|
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
||||||
Alert($"No hay existencias suficientes del producto: <br/><b>""{Gvr.DataKey("Codigo")}-{Gvr.DataKey("PS")}""</b>. <br/>Solo hay disponibles <b>{Existencia.FormatoNumero}</b> en Almacen. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
TxtCodigoPS.Text = ""
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
Alert($"No hay existencias suficientes del producto: <br/><b>""{Gvr.DataKey("Codigo")}-{Gvr.DataKey("PS")}""</b>. <br/>Solo hay disponibles <b>{Existencia.FormatoNumero}</b> en Almacen. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||||
Exit Sub
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
End If
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Gvr.DataKey("AplicaSerieLote") = "True" Then
|
If Gvr.DataKey("AplicaSerieLote") = "True" Then
|
||||||
TdSeriePS.Visible = True
|
TdSeriePS.Visible = True
|
||||||
TxtSeriePS.Focus()
|
TxtSeriePS.Focus()
|
||||||
|
|||||||
6980
Ventas/PV.aspx
6980
Ventas/PV.aspx
File diff suppressed because it is too large
Load Diff
10948
Ventas/PV.aspx.vb
10948
Ventas/PV.aspx.vb
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user