This commit is contained in:
2020-05-30 10:28:13 -07:00
23 changed files with 790 additions and 280 deletions

View File

@@ -2904,28 +2904,28 @@ Public Class ClsInventarios
Return Retorno Return Retorno
End Function End Function
Public Function LoteBatchFechaCaducidadGet(CvePS As Integer, Lote As String, Batch As String, CveEmpresa As Integer, Optional CveAlmacen As Integer = -1) As Boolean 'Public Function LoteBatchFechaCaducidadGet(CvePS As Integer, Lote As String, Batch As String, CveEmpresa As Integer, Optional CveAlmacen As Integer = -1) As Boolean
Dim Retorno As Boolean = False ' Dim Retorno As Boolean = False
DataAdapter("PA_Inv_LoteBatchFechaCaducidadGet") ' DataAdapter("PA_Inv_LoteBatchFechaCaducidadGet")
With SqlAdapter.SelectCommand.Parameters ' With SqlAdapter.SelectCommand.Parameters
.Add("@CvePS", SqlDbType.Int).Value = CvePS ' .Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@Lote", SqlDbType.VarChar).Value = Lote ' .Add("@Lote", SqlDbType.VarChar).Value = Lote
.Add("@Batch", SqlDbType.VarChar).Value = Batch ' .Add("@Batch", SqlDbType.VarChar).Value = Batch
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen ' .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
End With ' End With
Try ' Try
SqlAdapter.Fill(Data) ' SqlAdapter.Fill(Data)
Retorno = True ' Retorno = True
Catch ex As Exception ' Catch ex As Exception
OnError("Ocurrió un error al obtener la Fecha Caducidad del Lote-Batch.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) ' OnError("Ocurrió un error al obtener la Fecha Caducidad del Lote-Batch.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try ' End Try
Return Retorno ' Return Retorno
End Function 'End Function
Public Function ActualizarEsDevolucionVenta(CveVenta As Integer, Valor As Integer) As Boolean Public Function ActualizarEsDevolucionVenta(CveVenta As Integer, Valor As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("Vta_UpdateDevolucionVenta") DataAdapter("Vta_UpdateDevolucionVenta")

View File

@@ -1566,6 +1566,7 @@ Partial Class Bancos_PagoElectronico
Param.Add(ArrayCorreos(index)) 'Para Param.Add(ArrayCorreos(index)) 'Para
Param.Add("Notificación de Pago") 'Asunto Param.Add("Notificación de Pago") 'Asunto
Param.Add(GeneraCorreo2(DtPago.Rows(index), ObjIE, ArrayCveIEs(index).ToEntero)) 'Body Param.Add(GeneraCorreo2(DtPago.Rows(index), ObjIE, ArrayCveIEs(index).ToEntero)) 'Body
Dim Hilo As New Threading.Thread(AddressOf MandaCorreo) Dim Hilo As New Threading.Thread(AddressOf MandaCorreo)
@@ -2130,11 +2131,11 @@ Partial Class Bancos_PagoElectronico
End If End If
Return strBody.ToString Return strBody.ToString
End Function End Function
#End Region #End Region
#Region " GENERA CORREO 2" #Region " GENERA CORREO 2"
Private Function GeneraCorreo2(Dr As DataRow, ByRef ObjIE As ClsBancos, CveIE As Integer) As String Private Function GeneraCorreo2(Dr As DataRow, ByRef ObjIE As ClsBancos, CveIE As Integer) As String
Dim strBody As New StringBuilder Dim strBody As New StringBuilder
@@ -2456,11 +2457,227 @@ Partial Class Bancos_PagoElectronico
End If End If
Return strBody.ToString Return strBody.ToString
End Function End Function
Private Function GeneraCorreo(CveIE As Integer) As String
Dim strBody As New StringBuilder
Dim objIE As New ClsBancos
If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
strBody.Append("<head> ")
strBody.Append(" <style type=""text/css""> ")
strBody.Append(" body ")
strBody.Append(" { ")
strBody.Append(" margin:0px; ")
strBody.Append(" padding:0px 0px 0px 0px; ")
strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
strBody.Append(" font-size: 10px; ")
strBody.Append(" background-color:#F0F0F0; ")
strBody.Append(" } ")
strBody.Append(" a.Texto ")
strBody.Append(" { ")
strBody.Append(" font-size:11px; ")
strBody.Append(" background-color:#F7F6F3; ")
strBody.Append(" text-decoration:none; ")
strBody.Append(" font-weight:bold; ")
strBody.Append(" } ")
strBody.Append(" .Texto ")
strBody.Append(" { ")
strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
strBody.Append(" } ")
strBody.Append(" .TextoAlterno ")
strBody.Append(" { ")
strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
strBody.Append(" vertical-align:middle; height:20px;")
strBody.Append(" } ")
strBody.Append(" .BarraIdentidad ")
strBody.Append(" { ")
strBody.Append(" color:#FFFFFF; ")
strBody.Append(" background:#F0F0F0; ")
strBody.Append(" font-weight:bold; ")
strBody.Append(" font-size:19px; ")
strBody.Append(" font-style:oblique; ")
strBody.Append(" } ")
strBody.Append(" .Titulos ")
strBody.Append(" { ")
strBody.Append(" background-color: Gray;")
strBody.Append(" color:White; ")
strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
strBody.Append(" text-decoration:none; ")
strBody.Append(" } ")
strBody.Append(" .Verde {color: #00CC00;} ")
strBody.Append(" .Negro {color: #000000;} ")
strBody.Append(" .Rojo {color: #FF0000;} ")
strBody.Append(" </style> ")
strBody.Append("</head> ")
strBody.Append("<body> ")
strBody.AppendFormat("<div id='C_div' style='width: 600px'>")
strBody.AppendFormat(" <fieldset>")
strBody.AppendFormat(" <legend><b>{0}</b></legend>", UsuarioActual.Empresa.Empresa)
strBody.AppendFormat(" <table class='TextoG' border='0' cellpadding='0' cellspacing='0' width='100%'>")
strBody.AppendFormat(" <tr>")
strBody.AppendFormat(" <td style='width:100px'>{0}</td>", UsuarioActual.Empresa.Direccion)
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" <tr>")
strBody.AppendFormat(" <td>Col. {0}</td>", UsuarioActual.Empresa.Colonia)
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" <tr>")
strBody.AppendFormat(" <td>{0}, {1}, C.P.{2}</td>", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP)
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" <tr>")
strBody.AppendFormat(" <td>RFC {0}</td>", UsuarioActual.Empresa.RFC)
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" </table>")
strBody.AppendFormat(" </fieldset>")
strBody.AppendFormat("</div><br/><br/>")
strBody.AppendFormat("<div style='width: 600px'>")
strBody.AppendFormat(" <fieldset>")
strBody.AppendFormat(" <legend><b> </b></legend>")
strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
strBody.Append(" <tr style=""height: 22px""> ")
strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
strBody.Append(" </tr> ")
End If
If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
strBody.Append(" <tr style=""height: 22px""> ")
strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
strBody.Append(" </tr> ")
End If
strBody.Append(" <tr style=""height: 22px""> ")
strBody.AppendFormat(" <td>&nbsp;</td> ")
strBody.Append(" </tr> ")
strBody.Append(" </table> ")
strBody.AppendFormat(" </fieldset>")
strBody.Append(" </div> ")
strBody.AppendFormat("<div style='width: 600px'>")
strBody.AppendFormat(" <table style='width:100%'>")
strBody.AppendFormat(" <tr>")
strBody.AppendFormat(" <td style='vertical-align: top'>")
strBody.AppendFormat(" <fieldset>")
strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
strBody.AppendFormat(" <table width='100%'>")
strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <td>Movimiento:</td>")
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <td>Banco:</td>")
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <td>Cuenta:</td>")
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta)
strBody.AppendFormat(" </tr>")
If objIE.CuentaDepositado.ToString <> "" Then
strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <td>Cuenta Destino:</td>")
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado)
strBody.AppendFormat(" </tr>")
End If
strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <td>Fecha:</td>")
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy"))
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <td>Importe:</td>")
strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda)
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <td>Observaciones:</td>")
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones)
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <td colspan='2'>")
strBody.AppendFormat(" <hr />")
strBody.AppendFormat(" </td>")
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" </table>")
strBody.AppendFormat(" </fieldset>")
strBody.AppendFormat(" </td>")
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" </table>")
strBody.AppendFormat("</div>")
'MOVIMIENTOS CHEQUE
If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
Dim Textov33 As String = ""
If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
End If
strBody.AppendFormat("<div style='width: 1000px'>")
strBody.AppendFormat(" <table style='width:1000px'>")
strBody.AppendFormat(" <tr>")
strBody.AppendFormat(" <td style='vertical-align: top'>")
strBody.AppendFormat(" <fieldset>")
strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33)
strBody.AppendFormat(" <table width='1000px'>")
strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
strBody.AppendFormat(" <th scope='col' style='width: 10%'>Fecha</th>")
strBody.AppendFormat(" <th scope='col' style='width: 20%'>Factura</th>")
strBody.AppendFormat(" <th scope='col' style='width: 20%'>Importe ($)</th>")
strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>")
strBody.AppendFormat(" <th scope='col' style='width: 15%'>NC Aplicadas</th>")
strBody.AppendFormat(" </tr>")
For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
strBody.AppendFormat(" <td>{0}</td>", dr("ImporteNC").ToString.FormatoNumero)
strBody.AppendFormat(" </tr>")
Next
strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <td colspan='5'>")
strBody.AppendFormat(" <hr />")
strBody.AppendFormat(" </td>")
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" </table>")
strBody.AppendFormat(" </fieldset>")
strBody.AppendFormat(" </td>")
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" </table>")
strBody.AppendFormat("</div>")
End If
strBody.Append(" <div> Favor de no responder a este correo. </div> ")
strBody.Append("</body></html>")
End If
objIE.Dispose()
Return strBody.ToString
End Function
#End Region #End Region
#Region " IMPRIMIR " #Region " IMPRIMIR "
Protected Sub BtnReporteAltaCarga_Click(sender As Object, e As EventArgs) Protected Sub BtnReporteAltaCarga_Click(sender As Object, e As EventArgs)
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/LayoutAltaProveedor.rdlc", UsuarioActual.Empresa.Ruta)) Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/LayoutAltaProveedor.rdlc", UsuarioActual.Empresa.Ruta))

View File

@@ -67,23 +67,29 @@ Partial Class Bancos_PopUpBuscarIE
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
Dim ObjBancosIE As New ClsBancos
Dim Folio As String = "-1" Dim Folio As String = "-1"
If TxtFolio.Text <> "" Then Folio = String.Format("%{0}%", TxtFolio.Text.Trim) If TxtFolio.Text <> "" Then Folio = String.Format("%{0}%", TxtFolio.Text.Trim)
If ObjBancosIE.GetBancosIE(-1, DdlBanco.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, "-1", -1, Folio, "-1", -1, -1, -1, -1, -1, txtFechaI.Text.ToDate, MaxFecha.ToShortDateString.ToDate, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then If ValidarFiltrosSeleccionado() Then
DtDatos = ObjBancosIE.DtResultados 'If(TxtFolio.Text <> "", ObjBancosIE.DtResultados.FiltraParametros(String.Format("Folio Like '{0}'", TxtFolio.Text)), ObjBancosIE.DtResultados)
Dim ObjBancosIE As New ClsBancos
If ObjBancosIE.GetBancosIE(-1, DdlBanco.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, "-1", -1, Folio, "-1", -1, -1, -1, -1, -1, txtFechaI.Text.ToDate,
MaxFecha.ToShortDateString.ToDate, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
DtDatos = ObjBancosIE.DtResultados 'If(TxtFolio.Text <> "", ObjBancosIE.DtResultados.FiltraParametros(String.Format("Folio Like '{0}'", TxtFolio.Text)), ObjBancosIE.DtResultados)
Else
Alert("Ocurrió un error al consultar los Anticipos", TipoMensaje.MsgError)
DtDatos = Nothing
End If
ObjBancosIE.Dispose()
If DtDatos IsNot Nothing Then
GvDatos.DataSource = DtDatos
GvDatos.DataBind()
UpDatos.Update()
End If
Else Else
Alert("Ocurrió un error al consultar los Anticipos", TipoMensaje.MsgError) Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
DtDatos = Nothing
End If
ObjBancosIE.Dispose()
If DtDatos IsNot Nothing Then
GvDatos.DataSource = DtDatos
GvDatos.DataBind()
UpDatos.Update()
End If End If
End Sub End Sub
@@ -103,4 +109,11 @@ Partial Class Bancos_PopUpBuscarIE
End If End If
End Sub End Sub
Private Function ValidarFiltrosSeleccionado() As Boolean
If DdlBanco.SelectedValue.ToEntero > 0 Then Return True
If DdlCuenta.SelectedValue.ToEntero > 0 Then Return True
If TxtFolio.Text.Length > 0 Then Return True
Return False
End Function
End Class End Class

View File

@@ -26,27 +26,32 @@ public partial class CGame_PopUpBuscarProduccion :ClsPaginas
ClsCGame ObjCort = new ClsCGame(); ClsCGame ObjCort = new ClsCGame();
if (ObjCort.GetHuerta(UsuarioActual.CveEmpresa)) if (ObjCort.GetHuerta(UsuarioActual.CveEmpresa))
{ {
DdlHuerta.DataSource = ObjCort.DtResultados; DdlHuerta.DataSource = ObjCort.DtResultados;
DdlHuerta.Items.Insert(0, new ListItem("Todos", "-1"));
DdlHuerta.DataBind();
}
DdlHuerta.Items.Insert(0, new ListItem("Todos", "-1")); DdlHuerta.Items.Insert(0, new ListItem("Todos", "-1"));
UPDatos.Update(); DdlHuerta.DataBind();
} }
ObjCort.Dispose();
protected void Consultar_Click(object sender, EventArgs e) UPDatos.Update();
} }
String Folio;
if (TxtFolio.Text != "") { Folio = TxtFolio.Text; } else { Folio = "-1"; } protected void Consultar_Click(object sender, EventArgs e)
ClsCGame ObjCGame = new ClsCGame(); {
if (ObjCGame.GetProduccion(UsuarioActual.CveEmpresa, Folio, -1, DdlHuerta.SelectedValue.ToEntero(), TxtFechaEntregaI.Text.ToDate(), TxtFechaEntregaF.Text.ToDate())) if (ValidarFiltrosSeleccionados())
{ {
String Folio;
if (TxtFolio.Text != "") { Folio = TxtFolio.Text; } else { Folio = "-1"; }
ClsCGame ObjCGame = new ClsCGame();
if (ObjCGame.GetProduccion(UsuarioActual.CveEmpresa, Folio, -1, DdlHuerta.SelectedValue.ToEntero(), TxtFechaEntregaI.Text.ToDate(), TxtFechaEntregaF.Text.ToDate()))
{
GvDatos.DataSource = ObjCGame.DtResultados;
GvDatos.DataBind(); GvDatos.DataBind();
LtlTotalRegistros.Text = ObjCGame.DtResultados.Rows.Count.ToString();
if (ObjCGame.DtResultados.Rows.Count < 1)
{
Alert("No se encontraron resultados con los filtros seleccionados", TipoMensaje.MsgAdvertencia);
}
else else
LtlTotalRegistros.Text = ObjCGame.DtResultados.Rows.Count.ToString();
if (ObjCGame.DtResultados.Rows.Count < 1)
{ {
Alert("No se encontraron resultados con los filtros seleccionados", TipoMensaje.MsgAdvertencia);
TblBusqueda.Visible = true; TblBusqueda.Visible = true;
} }
} }
@@ -60,4 +65,12 @@ public partial class CGame_PopUpBuscarProduccion :ClsPaginas
} }
#region GridView #region GridView
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.FCLabel("LblFolio").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", "<a href='javascript:Ir("+"" + e.Row.DBCampo("CveProduccion") + ""+");'>", e.Row.DBCampo("Folio"));
}
}
#endregion #endregion

View File

@@ -37,19 +37,23 @@ Partial Class CGame_PopUpBuscarOrdenProduccion
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
Dim Folio As String Dim Folio As String
If TxtFolio.Text.Trim <> "" Then Folio = TxtFolio.Text Else Folio = "-1" If TxtFolio.Text.Trim <> "" Then Folio = TxtFolio.Text Else Folio = "-1"
Dim ObjOP As New ClsCGame If ValidarFiltrosSeleccionado() Then
If ObjOP.GetOrdenProduccion(-1, UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero, Folio, TxtFechaEntregaI.Text.ToDate, TxtFechaEntregaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero) Then Dim ObjOP As New ClsCGame
GvOP.DataSource = ObjOP.DtResultados If ObjOP.GetOrdenProduccion(-1, UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero, Folio, TxtFechaEntregaI.Text.ToDate, TxtFechaEntregaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero) Then
GvOP.DataBind() GvOP.DataSource = ObjOP.DtResultados
LtlTotalRegistros.Text = ObjOP.DtResultados.Rows.Count.ToString GvOP.DataBind()
If Not ObjOP.DtResultados.Rows.Count > 0 Then LtlTotalRegistros.Text = ObjOP.DtResultados.Rows.Count.ToString
Alert("No se encontraron resultados con los filtros seleccionados", TipoMensaje.MsgAdvertencia) If Not ObjOP.DtResultados.Rows.Count > 0 Then
Else Alert("No se encontraron resultados con los filtros seleccionados", TipoMensaje.MsgAdvertencia)
TblBusqueda.Visible = True Else
TblBusqueda.Visible = True
End If
End If End If
ObjOP.Dispose()
UPDatos.Update()
Else
Alert("Seleccione un criterio de busqueda", TipoMensaje.MsgAdvertencia)
End If End If
ObjOP.Dispose()
UPDatos.Update()
End Sub End Sub
Private Sub GvOP_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOP.RowDataBound Private Sub GvOP_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOP.RowDataBound
@@ -57,4 +61,13 @@ Partial Class CGame_PopUpBuscarOrdenProduccion
e.Row.FCLabel("LblFolio").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", "<a href='javascript:Ir(""" & e.Row.DBCampo("CveOrdenProduccion") & """);'>", e.Row.DBCampo("Folio")) e.Row.FCLabel("LblFolio").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", "<a href='javascript:Ir(""" & e.Row.DBCampo("CveOrdenProduccion") & """);'>", e.Row.DBCampo("Folio"))
End If End If
End Sub End Sub
Private Function ValidarFiltrosSeleccionado() As Boolean
If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True
If TxtFolio.Text.Length > 0 Then Return True
If TxtFechaEntregaI.Text.Length > 0 Then Return True
If TxtFechaEntregaF.Text.Length > 0 Then Return True
If DdlCliente.SelectedValue.ToEntero > 0 Then Return True
Return False
End Function
End Class End Class

View File

@@ -164,21 +164,41 @@ public partial class CRM_PopUpBuscarAcercamiento : ClsPaginas
string FechaCierre = TxtFechaCierre.Text == "" ? "-1" : TxtFechaCierre.Text; string FechaCierre = TxtFechaCierre.Text == "" ? "-1" : TxtFechaCierre.Text;
string NombreAcercamiento = TxtAcercamiento.Text == "" ? "-1" : TxtAcercamiento.Text; string NombreAcercamiento = TxtAcercamiento.Text == "" ? "-1" : TxtAcercamiento.Text;
ClsCRM ObjCRM = new ClsCRM(); if (ValidarFiltrosSeleccionados())
if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveEmpresaCRM, -1, CveTipoProceso, CveVendedor, "-1", "-1", NombreAcercamiento, CveMedioCaptacion, CveRechazoMotivo, CveProbabilidad, FechaApertura, FechaCierre))
{ {
GVDatos.DataSource = ObjCRM.DtResultados; ClsCRM ObjCRM = new ClsCRM();
GVDatos.DataBind(); if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveEmpresaCRM, -1, CveTipoProceso, CveVendedor, "-1", "-1", NombreAcercamiento, CveMedioCaptacion, CveRechazoMotivo, CveProbabilidad, FechaApertura, FechaCierre))
{
GVDatos.DataSource = ObjCRM.DtResultados;
GVDatos.DataBind();
LtlTotalRegistros.Text = ObjCRM.DtResultados.Rows.Count.ToString(); LtlTotalRegistros.Text = ObjCRM.DtResultados.Rows.Count.ToString();
if (ObjCRM.DtResultados.Rows.Count > 0) if (ObjCRM.DtResultados.Rows.Count > 0)
DivBusqueda.Visible = true; DivBusqueda.Visible = true;
else else
DivBusqueda.Visible = false; DivBusqueda.Visible = false;
}
ObjCRM.Dispose();
UPDatos.Update();
}else
{
Alert("Seleccione un criterio de busqueda",ModExtensiones.TipoMensaje.MsgAdvertencia);
} }
}
ObjCRM.Dispose(); private bool ValidarFiltrosSeleccionados()
UPDatos.Update(); {
if (DdlTipoProceso.SelectedValue.ToEntero() > 0) return true;
if (DdlEmpresaCRM.SelectedValue.ToEntero() > 0) return true;
if (DdlVendedor.SelectedValue.ToEntero() > 0) return true;
if (DdlMedioCaptacion.SelectedValue.ToEntero() > 0) return true;
if (DdlRechazoMotivo.SelectedValue.ToEntero() > 0) return true;
if (DdlProbabilidad.SelectedValue.ToEntero() > 0) return true;
if (TxtFechaApertura.Text != "") return true;
if (TxtFechaCierre.Text != "") return true;
if (TxtAcercamiento.Text != "") return true;
return false;
} }
#endregion #endregion
} }

View File

@@ -6395,6 +6395,9 @@ Partial Class Compras_Compras
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
Dim Insertado205 As Boolean = False
If RBLPago.SelectedValue.ToEntero = 4 Then If RBLPago.SelectedValue.ToEntero = 4 Then
Exit Select 'Es credito el concepto 6 se agrega en CASE 17 Exit Select 'Es credito el concepto 6 se agrega en CASE 17
End If End If
@@ -6602,6 +6605,7 @@ Partial Class Compras_Compras
End If End If
End If End If
Case 205, 237, 240 Case 205, 237, 240
Insertado205 = True
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}" Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
If DdlMoneda.SelectedValue.ToEntero <> 1 AndAlso UsaComplementariaFleteImportaciones Then If DdlMoneda.SelectedValue.ToEntero <> 1 AndAlso UsaComplementariaFleteImportaciones Then
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionME, Concepto, FechaMovimiento, IdCtaContableME, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMovimiento, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionME, Concepto, FechaMovimiento, IdCtaContableME, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMovimiento, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
@@ -6803,14 +6807,17 @@ Partial Class Compras_Compras
End If End If
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}" Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, tcvecon, Concepto, FechaMovimiento, tidctacon, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True If Not Insertado205 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, tcvecon, Concepto, FechaMovimiento, tidctacon, IdSegmentoNegocio, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True
End If
End If End If
End If End If
Next Next

View File

@@ -38,7 +38,6 @@ Partial Class Compras_PopUpBuscarFolioC
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
Dim ObjCompras As New ClsCompras()
Dim Folio As String = "-1" Dim Folio As String = "-1"
Dim FolioFiscal As String = "-1" Dim FolioFiscal As String = "-1"
@@ -55,23 +54,29 @@ Partial Class Compras_PopUpBuscarFolioC
Descripcion = If(TxtDescripcion.Text.Trim = "", "-1", TxtDescripcion.Text.Trim) Descripcion = If(TxtDescripcion.Text.Trim = "", "-1", TxtDescripcion.Text.Trim)
Obs = If(TxtObservaciones.Text.Trim = "", "-1", TxtObservaciones.Text.Trim) Obs = If(TxtObservaciones.Text.Trim = "", "-1", TxtObservaciones.Text.Trim)
If ObjCompras.GetCompras(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Folio, FolioFiscal, Codigo, Proveedor, FechaI, FechaF, Descripcion, Obs, CveProveedor:=DdlProveedor.SelectedValue.ToEntero) Then If ValidarUnFiltroSeleccionado() Then
If ObjCompras.DtResultados.Rows.Count > 0 Then Dim ObjCompras As New ClsCompras()
LtlTotalRegistros.Text = ObjCompras.DtResultados.Rows.Count.ToString.FormatoNumero(0) If ObjCompras.GetCompras(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Folio, FolioFiscal, Codigo, Proveedor, FechaI, FechaF, Descripcion, Obs,
GV.DataSource = ObjCompras.DtResultados CveProveedor:=DdlProveedor.SelectedValue.ToEntero) Then
Else If ObjCompras.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = "0" LtlTotalRegistros.Text = ObjCompras.DtResultados.Rows.Count.ToString.FormatoNumero(0)
GV.DataSource = Nothing GV.DataSource = ObjCompras.DtResultados
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia) Else
LtlTotalRegistros.Text = "0"
GV.DataSource = Nothing
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
End If
End If End If
ObjCompras.Dispose()
GV.DataBind()
UPDatos.Update()
TblBusqueda.Visible = True
Else
Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
End If End If
ObjCompras.Dispose()
GV.DataBind()
UPDatos.Update()
TblBusqueda.Visible = True
End Sub End Sub
Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
@@ -100,5 +105,14 @@ Partial Class Compras_PopUpBuscarFolioC
End If End If
End Sub End Sub
Private Function ValidarUnFiltroSeleccionado() As Boolean
If TxtFolio.Text.Trim.Length > 0 Then Return True
If TxtFolioFiscal.Text.Trim.Length > 0 Then Return True
If TxtDescripcion.Text.Trim.Length > 0 Then Return True
If TxtObservaciones.Text.Trim.Length > 0 Then Return True
If DdlTipoDocto.SelectedValue.ToEntero > 0 Then Return True
Return False
End Function
End Class End Class

View File

@@ -60,15 +60,19 @@ Partial Class Compras_PopUpBuscarProveedor
If TxtTelefono.Text.Trim <> String.Empty Then Telefono = TxtTelefono.Text.Trim If TxtTelefono.Text.Trim <> String.Empty Then Telefono = TxtTelefono.Text.Trim
CveTipoProveedor = DdlTipoProveedor.SelectedValue.ToEntero CveTipoProveedor = DdlTipoProveedor.SelectedValue.ToEntero
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, Codigo, RazonSocial, NombreComercial, NombreCorto, RFC, Contacto, Telefono, -1, UsuarioActual.CveEmpresa, CveTipoProveedor:=CveTipoProveedor) Then If ValidarUnFiltroSeleccionado() Then
If ObjProveedor.DtResultados.Rows.Count > 0 Then If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, Codigo, RazonSocial, NombreComercial, NombreCorto, RFC, Contacto, Telefono, -1, UsuarioActual.CveEmpresa, CveTipoProveedor:=CveTipoProveedor) Then
LtlTotalRegistros.Text = ObjProveedor.DtResultados.Rows.Count.ToString.FormatoNumero(0) If ObjProveedor.DtResultados.Rows.Count > 0 Then
GV.DataSource = ObjProveedor.DtResultados LtlTotalRegistros.Text = ObjProveedor.DtResultados.Rows.Count.ToString.FormatoNumero(0)
Else GV.DataSource = ObjProveedor.DtResultados
LtlTotalRegistros.Text = "0" Else
GV.DataSource = Nothing LtlTotalRegistros.Text = "0"
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia) GV.DataSource = Nothing
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
End If
End If End If
Else
Alert("Seleccione un criterio de búsqueda", TipoMensaje.MsgAdvertencia)
End If End If
ObjProveedor.Dispose() ObjProveedor.Dispose()
@@ -106,7 +110,7 @@ Partial Class Compras_PopUpBuscarProveedor
Case Else Case Else
Liga = String.Format("<a class='Texto' href='javascript:Ir(""{0}"");'>", e.Row.DBCampo("CveProveedor")) Liga = String.Format("<a class='Texto' href='javascript:Ir(""{0}"");'>", e.Row.DBCampo("CveProveedor"))
End Select End Select
e.Row.FCLiteral("LtlCodigo").Text = String.Format("<div class='truncate' style='width:55px'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Codigo")) e.Row.FCLiteral("LtlCodigo").Text = String.Format("<div class='truncate' style='width:55px'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Codigo"))
e.Row.FCLiteral("LtlRazonSocial").Text = String.Format("<div class='truncate' style='width:165px'>{0}{1}</a></div>", Liga, e.Row.DBCampo("RazonSocial")) e.Row.FCLiteral("LtlRazonSocial").Text = String.Format("<div class='truncate' style='width:165px'>{0}{1}</a></div>", Liga, e.Row.DBCampo("RazonSocial"))
e.Row.FCLiteral("LtlNombreComercial").Text = String.Format("<div class='truncate' style='width:165px'>{0}{1}</a></div>", Liga, e.Row.DBCampo("NombreComercial")) e.Row.FCLiteral("LtlNombreComercial").Text = String.Format("<div class='truncate' style='width:165px'>{0}{1}</a></div>", Liga, e.Row.DBCampo("NombreComercial"))
@@ -115,4 +119,16 @@ Partial Class Compras_PopUpBuscarProveedor
e.Row.FCLiteral("LtlContacto").Text = String.Format("<div class='truncate' style='width:65px'>{0}{1}</a></div>", Liga, e.Row.DBCampo("ContactoNombre")) e.Row.FCLiteral("LtlContacto").Text = String.Format("<div class='truncate' style='width:65px'>{0}{1}</a></div>", Liga, e.Row.DBCampo("ContactoNombre"))
End If End If
End Sub End Sub
Private Function ValidarUnFiltroSeleccionado() As Boolean
If TxtCodigo.Text.Trim <> String.Empty Then Return True
If TxtRazonSocial.Text.Trim <> String.Empty Then Return True
If TxtNombreComercial.Text.Trim <> String.Empty Then Return True
If TxtNombreCorto.Text.Trim <> String.Empty Then Return True
If TxtRFC.Text.Trim <> String.Empty Then Return True
If TxtContacto.Text.Trim <> String.Empty Then Return True
If TxtTelefono.Text.Trim <> String.Empty Then Return True
If DdlTipoProveedor.SelectedValue.ToEntero > 0 Then Return True
Return False
End Function
End Class End Class

View File

@@ -340,6 +340,21 @@ Partial Class Compras_RepRembolsoComprobaciones
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", ""))
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
params.Add(New ReportParameter("CveCajaChica", DtDatos.Rows(0)("CveCajaChica").ToString))
params.Add(New ReportParameter("CveFyE", "0")) '
params.Add(New ReportParameter("cuentaRetiro", "Cuenta retiro: " & ""))
params.Add(New ReportParameter("CajaChica", "Caja chica: " & ""))
params.Add(New ReportParameter("observaciones", "Observaciones: " & ""))
params.Add(New ReportParameter("folio", DtDatos.Rows(0)("Folio").ToString))
params.Add(New ReportParameter("fecha", ""))
params.Add(New ReportParameter("importe", ""))
params.Add(New ReportParameter("TotAbono", DtDatos.SUM("Abonado").ToString))
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))

View File

@@ -125,7 +125,7 @@ Partial Class Contratos_PopUpBuscarContrato
End Sub End Sub
Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs) Handles BtnBuscar.Click Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs) Handles BtnBuscar.Click
Dim objContratos As New ClsContratos
Dim NumeroContrato As String = "-1" Dim NumeroContrato As String = "-1"
Dim Estatus As Integer = 1 Dim Estatus As Integer = 1
@@ -141,20 +141,27 @@ Partial Class Contratos_PopUpBuscarContrato
If TxtResponsable.Text.Trim.Length > 0 Then Responsable = TxtResponsable.Text If TxtResponsable.Text.Trim.Length > 0 Then Responsable = TxtResponsable.Text
If TxtNumeroContrato.Text.Trim.Length > 0 Then NumeroContrato = TxtNumeroContrato.Text If TxtNumeroContrato.Text.Trim.Length > 0 Then NumeroContrato = TxtNumeroContrato.Text
If (objContratos.GetContratosBusquedaRep(DdlTipo.SelectedValue.ToEntero, DdlTipoContrato.SelectedValue.ToEntero, NumeroContrato, Descripcion, If ValidarUnFiltroSeleccionado() Then
Ubicacion, Responsable, Estatus, DdlProyecto.SelectedValue.ToEntero, DdlSubProtecto.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, DdlCliente.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero)) Then Dim objContratos As New ClsContratos
GV.DataSource = objContratos.DtResultados If (objContratos.GetContratosBusquedaRep(DdlTipo.SelectedValue.ToEntero, DdlTipoContrato.SelectedValue.ToEntero, NumeroContrato, Descripcion, Ubicacion, Responsable, Estatus,
LtlTotalRegistros.Text = objContratos.DtResultados.Rows.Count.ToString DdlProyecto.SelectedValue.ToEntero, DdlSubProtecto.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, DdlCliente.SelectedValue.ToEntero,
DdlProveedor.SelectedValue.ToEntero)) Then
GV.DataSource = objContratos.DtResultados
LtlTotalRegistros.Text = objContratos.DtResultados.Rows.Count.ToString
Else
GV.DataSource = Nothing
LtlTotalRegistros.Text = "0"
End If
objContratos.Dispose()
GV.DataBind()
UPDatos.Update()
Else Else
GV.DataSource = Nothing Alert("Seleccione un criterio de busqueda", TipoMensaje.MsgAdvertencia)
LtlTotalRegistros.Text = "0"
End If End If
objContratos.Dispose()
GV.DataBind()
UPDatos.Update()
End Sub End Sub
Private Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound Private Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound
@@ -173,6 +180,19 @@ Partial Class Contratos_PopUpBuscarContrato
End If End If
End Sub End Sub
Private Function ValidarUnFiltroSeleccionado() As Boolean
If TxtDescripcion.Text.Trim.Length > 0 Then Return True
If TxtUbicacion.Text.Trim.Length > 0 Then Return True
If TxtResponsable.Text.Trim.Length > 0 Then Return True
If TxtNumeroContrato.Text.Trim.Length > 0 Then Return True
'If DdlTipo.SelectedValue.ToEntero > 0 Then Return True
If DdlTipoContrato.SelectedValue.ToEntero > 0 Then Return True
If DdlProyecto.SelectedValue.ToEntero > 0 Then Return True
If DdlSubProtecto.SelectedValue.ToEntero > 0 Then Return True
If DdlCliente.SelectedValue.ToEntero > 0 Then Return True
If DdlProveedor.SelectedValue.ToEntero > 0 Then Return True
Return False
End Function
End Class End Class

View File

@@ -85,6 +85,9 @@
<asp:LinkButton runat="server" ID="LnkCambioInventarioFisico" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkCambioInventarioFisico_Click" <asp:LinkButton runat="server" ID="LnkCambioInventarioFisico" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkCambioInventarioFisico_Click"
Text="<i class='fa fa-truck'></i> Inventario Fisico"></asp:LinkButton> Text="<i class='fa fa-truck'></i> Inventario Fisico"></asp:LinkButton>
</li> </li>
<li>
<asp:LinkButton runat="server" ID="LnkAgregarProducto" CssClass="" data-toggle="tooltip" data-placement="left" Text="<i class='fa fa-plus'></i> Agregar Producto"></asp:LinkButton>
</li>
<li> <li>
<asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" Visible="true" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Cargar Concepto</asp:HyperLink> <asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" Visible="true" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Cargar Concepto</asp:HyperLink>
</li> </li>
@@ -542,12 +545,12 @@
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="row"> <%--<div class="row">
<div class="col-md-12" align="Right"> <div class="col-md-12" align="Right">
<asp:LinkButton ID="LkAgregar" runat="server" CssClass="btn btn-default" Text="Agregar Producto" /> <asp:LinkButton ID="LkAgregar" runat="server" CssClass="btn btn-default" Text="Agregar Producto" />
</div> </div>
</div> </div>
<br /> <br />--%>
<div class="row"> <div class="row">
<div class="col-md-12" align="right"> <div class="col-md-12" align="right">

View File

@@ -3842,7 +3842,7 @@ Partial Class Inventarios_EntradasSalidas
#Region "DESCARGAR E IMPRIMIR LISTADO" #Region "DESCARGAR E IMPRIMIR LISTADO"
Public Sub DescargarFormato() Public Sub DescargarFormato()
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\Formatos\FormatoEntradasSalidas.xlsx" Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoEntradasSalidas.xlsx"
Dim Archivo As New IO.FileInfo(Directorio) Dim Archivo As New IO.FileInfo(Directorio)
If Archivo.Exists Then If Archivo.Exists Then
@@ -4169,7 +4169,7 @@ Partial Class Inventarios_EntradasSalidas
'#End Region '#End Region
Protected Sub LkAgregar_Click() Handles LkAgregar.Click Protected Sub LkAgregar_Click() Handles LnkAgregarProducto.Click
limpiarModalDetalle() limpiarModalDetalle()
UpAgregar.Update() UpAgregar.Update()
RegistraScript("$('#ModalAgregar').modal()") RegistraScript("$('#ModalAgregar').modal()")

View File

@@ -596,7 +596,9 @@ Partial Class Inventarios_EntregaAlmacen
DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen) DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen)
End If End If
If Not DtDatos.Columns.Contains("Serie") Then
DtDatos.Columns.Add("Serie", GetType(String))
End If
If Not DtDatos.Columns.Contains("Lote") Then If Not DtDatos.Columns.Contains("Lote") Then
DtDatos.Columns.Add("Lote", GetType(String)) DtDatos.Columns.Add("Lote", GetType(String))
End If End If
@@ -744,6 +746,20 @@ Partial Class Inventarios_EntregaAlmacen
DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen) DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen)
End If End If
If Not DtDatos.Columns.Contains("CveSeccion") Then
DtDatos.Columns.Add("CveSeccion", GetType(Integer))
End If
If Not DtDatos.Columns.Contains("FechaCaducidad") Then
DtDatos.Columns.Add("FechaCaducidad", GetType(Date))
End If
If Not DtDatos.Columns.Contains("Seleccionado") Then
DtDatos.Columns.Add("Seleccionado", GetType(Boolean))
End If
If Not DtDatos.Columns.Contains("CantidadSeleccionada") Then
DtDatos.Columns.Add("CantidadSeleccionada", GetType(Double))
End If
If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
DivCodigoSeriePS.Visible = True DivCodigoSeriePS.Visible = True
Else Else
@@ -812,7 +828,8 @@ Partial Class Inventarios_EntregaAlmacen
If e.Row.DBCampo("Consec") <> "" AndAlso DtDatosDetalle IsNot Nothing Then If e.Row.DBCampo("Consec") <> "" AndAlso DtDatosDetalle IsNot Nothing Then
Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DBCampo("Consec"))).Rows.Count Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DBCampo("Consec"))).Rows.Count
e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString
'e.Row.FCTextBox("TbCantidadF").Text = "0" Else
e.Row.FCTextBox("TbCantidadF").Text = "0"
End If End If
@@ -867,6 +884,7 @@ Partial Class Inventarios_EntregaAlmacen
'FUNCIONALIDAD PISTOLA DE CODIGOS 'FUNCIONALIDAD PISTOLA DE CODIGOS
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
e.Row.FCTextBox("TbCantidadF").Text = "0"
'NO BLOQUEA PARA ROL AD 'NO BLOQUEA PARA ROL AD
If UsuarioActual.CveRol = 1 Then If UsuarioActual.CveRol = 1 Then
If e.Row.DBCampo("Inv_CveMetodoInventario").Contiene("5", "6") Then If e.Row.DBCampo("Inv_CveMetodoInventario").Contiene("5", "6") Then
@@ -2540,10 +2558,10 @@ Partial Class Inventarios_EntregaAlmacen
If CBool(Dr("AplicaSerie")) Then If CBool(Dr("AplicaSerie")) Then
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec"))) DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
For Each Dr1 As DataRow In DtDetalle.Rows For Each Dr1 As DataRow In DtDetalle.Rows
StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" CveSeccionAlmacen=""{3}"" Serie=""{4}"" Lote=""{5}"" FechaCaducidad=""{6}"" ></concepto>", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("YYYY/MM/DD")) StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" CveSeccionAlmacen=""{3}"" Serie=""{4}"" Lote=""{5}"" FechaCaducidad=""{6}"" ></concepto>", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
Next Next
Else Else
StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" CveSeccionAlmacen=""{3}"" Serie=""{4}"" Lote=""{5}"" FechaCaducidad=""{6}"" ></concepto>", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("YYYY/MM/DD")) StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" CveSeccionAlmacen=""{3}"" Serie=""{4}"" Lote=""{5}"" FechaCaducidad=""{6}"" ></concepto>", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
End If End If
End If End If
Next Next

View File

@@ -49,27 +49,38 @@ Partial Class PopUpBuscarFolio
CargaDatos() CargaDatos()
End Sub End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
Dim Reporte As New ClsInventarios If ValidarFiltrosSeleccionados() Then
Dim Reporte As New ClsInventarios
Dim FechaInicial = If(TxtFechaI.Text.Trim <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text.ToDate, MinFecha) Dim FechaInicial = If(TxtFechaI.Text.Trim <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text.ToDate, MinFecha)
Dim FechaFinal = If(TxtFechaF.Text.Trim <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text.ToDate, MaxFecha) Dim FechaFinal = If(TxtFechaF.Text.Trim <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text.ToDate, MaxFecha)
Dim FechaIngI = If(TxtFechaIngInicio.Text.Trim <> "" AndAlso TxtFechaIngInicio.Text <> "__/__/____", TxtFechaIngInicio.Text.ToDate, MinFecha) Dim FechaIngI = If(TxtFechaIngInicio.Text.Trim <> "" AndAlso TxtFechaIngInicio.Text <> "__/__/____", TxtFechaIngInicio.Text.ToDate, MinFecha)
Dim FechaIngF = If(TxtFechaIngFin.Text.Trim <> "" AndAlso TxtFechaIngFin.Text <> "__/__/____", TxtFechaIngFin.Text.ToDate, MaxFecha) Dim FechaIngF = If(TxtFechaIngFin.Text.Trim <> "" AndAlso TxtFechaIngFin.Text <> "__/__/____", TxtFechaIngFin.Text.ToDate, MaxFecha)
If Reporte.GetMovimientosRep(DdlAlmacen.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, If(TxtFolio.Text = "", "-1", TxtFolio.Text.Trim).ToEntero, FechaIngI, FechaIngF, FechaInicial, FechaFinal, -1, UsuarioActual.CveEmpresa) Then If Reporte.GetMovimientosRep(DdlAlmacen.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, If(TxtFolio.Text = "", "-1", TxtFolio.Text.Trim).ToEntero,
GvM.DataSource = Reporte.DtResultados FechaIngI, FechaIngF, FechaInicial, FechaFinal, -1, UsuarioActual.CveEmpresa) Then
LtlTotalRegistros.Text = Reporte.DtResultados.Rows.Count.ToString.FormatoNumero(0) GvM.DataSource = Reporte.DtResultados
LtlTotalRegistros.Text = Reporte.DtResultados.Rows.Count.ToString.FormatoNumero(0)
Else
GvM.DataSource = Nothing
End If
GvM.DataBind()
UPDatos.Update()
TblBusqueda.Visible = True
Reporte.Dispose()
Else Else
GvM.DataSource = Nothing Alert("Seleccione un criterio de busqueda", TipoMensaje.MsgAdvertencia)
End If End If
GvM.DataBind()
UPDatos.Update()
TblBusqueda.Visible = True
Reporte.Dispose()
End Sub End Sub
Private Function ValidarFiltrosSeleccionados() As Boolean
If DdlAlmacen.SelectedValue.ToEntero > 0 Then Return True
If DdlTipoMovimiento.SelectedValue.ToEntero > 0 Then Return True
If TxtFolio.Text.Length > 0 Then Return True
Return False
End Function
#End Region #End Region
End Class End Class

View File

@@ -94,72 +94,77 @@ Partial Class Inventarios_Default
End If End If
End Sub End Sub
Private Sub CargaDatos(CvePS As Integer, Tipo As Integer) Private Sub CargaDatos(CvePS As Integer, Tipo As Integer)
Dim ObjInventarios As New ClsInventarios()
If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
Dim dr As Data.DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
If dr IsNot Nothing Then If ValidarFiltrosSeleccionados() Then
LtPs.Text = $"Producto: <b>{dr("PSCodigo").ToString}</b>" Dim ObjInventarios As New ClsInventarios()
Dim CvePrecioLista As Integer = -1 If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
If Not UsuarioActual.Empresa.Funcionalidad(404).ToString = "1" Then 'sino manneja precios de lista Dim dr As Data.DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
CvePrecioLista = -2
End If
Dim ObjVta As New ClsVentas If dr IsNot Nothing Then
Dim objPS As New ClsProductosServicios LtPs.Text = $"Producto: <b>{dr("PSCodigo").ToString}</b>"
If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then Dim CvePrecioLista As Integer = -1
If ObjVta.DtResultados.Rows.Count > 0 Then If Not UsuarioActual.Empresa.Funcionalidad(404).ToString = "1" Then 'sino manneja precios de lista
If CvePrecioLista = -1 Then CvePrecioLista = ObjVta.DtResultados.Rows(0)("CvePrecioLista").ToString.ToEntero CvePrecioLista = -2
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioLista, -1, DDlPS.SelectedValue.ToEntero) Then End If
If objPS.DtResultados.Rows.Count > 0 Then
LtPrecioPS.Text = $"Precio de venta: <b>$: {objPS.DtResultados.Rows(0)("PrecioLista").ToString.FormatoNumero} {dr("Abreviatura").ToString}</b>" Dim ObjVta As New ClsVentas
Dim objPS As New ClsProductosServicios
If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
If ObjVta.DtResultados.Rows.Count > 0 Then
If CvePrecioLista = -1 Then CvePrecioLista = ObjVta.DtResultados.Rows(0)("CvePrecioLista").ToString.ToEntero
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioLista, -1, DDlPS.SelectedValue.ToEntero) Then
If objPS.DtResultados.Rows.Count > 0 Then
LtPrecioPS.Text = $"Precio de venta: <b>$: {objPS.DtResultados.Rows(0)("PrecioLista").ToString.FormatoNumero} {dr("Abreviatura").ToString}</b>"
End If
End If End If
End If End If
End If End If
ObjVta.Dispose()
objPS.Dispose()
If UsuarioActual.CveEmpresa = 119 Then
If CBool(dr("AplicaIEPS")) Then
LtlIEPS.Visible = True
LtlIEPSPorcentaje.Visible = True
LtlIEPSPorcentaje.Text = $"<b>% {(dr("IEPSPorcentaje").ToString.ToDouble * 100).FormatoNumero}</b>"
Else
LtlIEPS.Visible = False
LtlIEPSPorcentaje.Visible = False
End If
If dr("IVA").ToString = "-1" OrElse dr("IVA").ToString.ToDecimal > 0 Then
LtlIVA.Visible = True
LtlIVAPorcentaje.Visible = True
LtlIVAPorcentaje.Text = $"<b>Si</b>"
Else
LtlIVA.Visible = False
LtlIVAPorcentaje.Visible = False
End If
End If
End If End If
ObjVta.Dispose()
objPS.Dispose() If UsuarioActual.CveUsuario = 100 Then
If UsuarioActual.CveEmpresa = 119 Then HlPendiente.Visible = True
If CBool(dr("AplicaIEPS")) Then HlPendiente.NavigateUrl = String.Format("/Inventarios/RepVentasXSurtir.aspx?CvePS={0}", CvePS)
LtlIEPS.Visible = True End If
LtlIEPSPorcentaje.Visible = True
LtlIEPSPorcentaje.Text = $"<b>% {(dr("IEPSPorcentaje").ToString.ToDouble * 100).FormatoNumero}</b>" If ObjInventarios.DtResultados.Rows.Count > 0 Then
Else GV.DataSource = ObjInventarios.DtResultados
LtlIEPS.Visible = False Else
LtlIEPSPorcentaje.Visible = False GV.DataSource = Nothing
End If Dim Js = If(Tipo = 1, "", "window.setTimeout(Focus,200);")
If dr("IVA").ToString = "-1" OrElse dr("IVA").ToString.ToDecimal > 0 Then Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
LtlIVA.Visible = True
LtlIVAPorcentaje.Visible = True
LtlIVAPorcentaje.Text = $"<b>Si</b>"
Else
LtlIVA.Visible = False
LtlIVAPorcentaje.Visible = False
End If
End If End If
End If End If
If UsuarioActual.CveUsuario = 100 Then ObjInventarios.Dispose()
HlPendiente.Visible = True GV.DataBind()
HlPendiente.NavigateUrl = String.Format("/Inventarios/RepVentasXSurtir.aspx?CvePS={0}", CvePS)
End If
If ObjInventarios.DtResultados.Rows.Count > 0 Then
GV.DataSource = ObjInventarios.DtResultados
Else UPDatos.Update()
GV.DataSource = Nothing TblBusqueda.Visible = True
Dim Js = If(Tipo = 1, "", "window.setTimeout(Focus,200);") Else
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia) Alert("Seleccione un producto o servicio", TipoMensaje.MsgAdvertencia)
End If
End If End If
ObjInventarios.Dispose()
GV.DataBind()
UPDatos.Update()
TblBusqueda.Visible = True
End Sub End Sub
Private Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound Private Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
@@ -227,6 +232,7 @@ Partial Class Inventarios_Default
End Sub End Sub
Private Sub CargarDatosMedRin() Private Sub CargarDatosMedRin()
Dim ObjInventarios As New ClsInventarios Dim ObjInventarios As New ClsInventarios
If ObjInventarios.GetExistenciasMedRin(DDlPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlRin.SelectedValue.ToEntero, DdlMedidas.SelectedValue.ToEntero) Then If ObjInventarios.GetExistenciasMedRin(DDlPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlRin.SelectedValue.ToEntero, DdlMedidas.SelectedValue.ToEntero) Then
GvMedRin.DataSource = ObjInventarios.DtResultados GvMedRin.DataSource = ObjInventarios.DtResultados
@@ -236,4 +242,9 @@ Partial Class Inventarios_Default
UPDatos.Update() UPDatos.Update()
End Sub End Sub
Private Function ValidarFiltrosSeleccionados() As Boolean
If DDlPS.SelectedValue.ToEntero > 0 Then Return True
Return False
End Function
End Class End Class

View File

@@ -168,17 +168,23 @@ Partial Class OC_PopUpBuscarReq
Dim FI As Date = If(txtFechaI.Text.Trim = "", MinFecha, txtFechaI.Text.Trim.ToDate) Dim FI As Date = If(txtFechaI.Text.Trim = "", MinFecha, txtFechaI.Text.Trim.ToDate)
Dim guia As String = If(TxtGuia.Text.Trim = "", "-1", TxtGuia.Text) Dim guia As String = If(TxtGuia.Text.Trim = "", "-1", TxtGuia.Text)
'Cargar Datos 'Cargar Datos
Dim ObjOC As New ClsOC
ObjOC.GetOrdenesCompraRep(DdlTipo.SelectedValue, CveProyecto, CveSubProyecto, -1, DdlEstatus.SelectedValue.ToEntero, FI, MaxFecha, -1, DdlProveedor.SelectedValue.ToEntero, If(TxtFolio.Text.ToEntero <= 0, -1, TxtFolio.Text.ToEntero), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Guia:=guia,
SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False))
Dim DtOC = ObjOC.DtResultados ' tipotermino, esattus inicial
ObjOC.Dispose()
GV.DataSource = DtOC If ValidarFiltrosSeleccionado() Then
GV.DataBind() Dim ObjOC As New ClsOC
LtlTotalRegistros.Text = GV.Rows.Count.ToString ObjOC.GetOrdenesCompraRep(DdlTipo.SelectedValue, CveProyecto, CveSubProyecto, -1, DdlEstatus.SelectedValue.ToEntero, FI, MaxFecha, -1, DdlProveedor.SelectedValue.ToEntero,
LblTotalRegistros.Text = "Número de registros: " If(TxtFolio.Text.ToEntero <= 0, -1, TxtFolio.Text.ToEntero), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Guia:=guia,
UPDatos.Update() SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False))
Dim DtOC = ObjOC.DtResultados ' tipotermino, esattus inicial
ObjOC.Dispose()
GV.DataSource = DtOC
GV.DataBind()
LtlTotalRegistros.Text = GV.Rows.Count.ToString
LblTotalRegistros.Text = "Número de registros: "
UPDatos.Update()
Else
Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
End If
End Sub End Sub
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
@@ -245,6 +251,17 @@ Partial Class OC_PopUpBuscarReq
End If End If
End Sub End Sub
Private Function ValidarFiltrosSeleccionado() As Boolean
If DdlTipo.SelectedValue.ToEntero > 0 Then Return True
If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True
If DdlProveedor.SelectedValue.ToEntero > 0 Then Return True
If TxtFolio.Text.ToEntero > 0 Then Return True
If DdlSubProyectos.SelectedValue.ToEntero > 0 Then Return True
If DdlProyectos.SelectedValue.ToEntero > 0 Then Return True
Return False
End Function
#End Region #End Region
#Region " VINCULA CON COMPRAS " #Region " VINCULA CON COMPRAS "

View File

@@ -35,16 +35,19 @@ Partial Class OS_PopUpBuscarOS
'If TxtFechaRecibido.Text.Trim <> String.Empty Then FechaRecibido.ToString() 'If TxtFechaRecibido.Text.Trim <> String.Empty Then FechaRecibido.ToString()
If DdlEstatusOrdenServicio.SelectedValue <> String.Empty Then CveEstatusOrdenServicio = DdlEstatusOrdenServicio.SelectedValue.ToEntero If DdlEstatusOrdenServicio.SelectedValue <> String.Empty Then CveEstatusOrdenServicio = DdlEstatusOrdenServicio.SelectedValue.ToEntero
If ValidarUnFiltroSeleccionado() Then
If ObjOS.GetOrdenesServicios(-1, CveCliente, Folio, CveUsuarioRecibio, CveEstatusOrdenServicio, UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then If ObjOS.GetOrdenesServicios(-1, CveCliente, Folio, CveUsuarioRecibio, CveEstatusOrdenServicio, UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
If ObjOS.DtResultados.Rows.Count > 0 Then If ObjOS.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = ObjOS.DtResultados.Rows.Count.ToString.FormatoNumero(0) LtlTotalRegistros.Text = ObjOS.DtResultados.Rows.Count.ToString.FormatoNumero(0)
GV.DataSource = ObjOS.DtResultados GV.DataSource = ObjOS.DtResultados
Else Else
LtlTotalRegistros.Text = "0" LtlTotalRegistros.Text = "0"
GV.DataSource = Nothing GV.DataSource = Nothing
Alert("No se encontraron registros con losparámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia) Alert("No se encontraron registros con losparámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
End If
End If End If
Else
Alert("Seleccione un criterio de búsqueda", TipoMensaje.MsgAdvertencia)
End If End If
ObjOS.Dispose() ObjOS.Dispose()
@@ -108,4 +111,13 @@ Partial Class OS_PopUpBuscarOS
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub End Sub
Private Function ValidarUnFiltroSeleccionado() As Boolean
If TxtFolio.Text.Trim <> String.Empty Then Return True
If DdlCliente.SelectedValue.ToEntero > 0 Then Return True
If DdlUsuarioRecibio.SelectedValue.ToEntero > 0 Then Return True
'If TxtFechaRecibido.Text.Trim <> String.Empty Then FechaRecibido.ToString()
If DdlEstatusOrdenServicio.SelectedValue.ToEntero > 0 Then Return True
Return False
End Function
End Class End Class

View File

@@ -142,7 +142,6 @@ Partial Class RH_PopUpBuscarPersonal
End Sub End Sub
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
Dim ObjPersonal As New ClsRH()
Dim Codigo As String = "-1" Dim Codigo As String = "-1"
Dim Nombre As String = "-1" Dim Nombre As String = "-1"
@@ -161,26 +160,32 @@ Partial Class RH_PopUpBuscarPersonal
Dim StrFiltroCaracteristica As String = GeneraFiltroCaracteristicas() Dim StrFiltroCaracteristica As String = GeneraFiltroCaracteristicas()
If ObjPersonal.GetPersonal2(-1, Codigo, Nombre, NSS, RFC, DdlTurnos.SelectedValue.ToEntero, DdlPuestos.SelectedValue.ToEntero, DdlDepartamentos.SelectedValue.ToEntero, If ValidarFiltrosSeleccionado() Then
Dim ObjPersonal As New ClsRH()
If ObjPersonal.GetPersonal2(-1, Codigo, Nombre, NSS, RFC, DdlTurnos.SelectedValue.ToEntero, DdlPuestos.SelectedValue.ToEntero, DdlDepartamentos.SelectedValue.ToEntero,
DdlRuta.SelectedValue.ToEntero, DdlEscolaridad.SelectedValue.ToEntero, DdlEstadoCivil.SelectedValue.ToEntero, DdlGenero.SelectedValue.ToEntero, DdlRuta.SelectedValue.ToEntero, DdlEscolaridad.SelectedValue.ToEntero, DdlEstadoCivil.SelectedValue.ToEntero, DdlGenero.SelectedValue.ToEntero,
DdlEstatus.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlClienteAsignado.SelectedValue.ToEntero, Horario, CveSupervisor, DdlEstatus.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlClienteAsignado.SelectedValue.ToEntero, Horario, CveSupervisor,
-1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", StrFiltroCaracteristica, 1, UsuarioActual.CveEmpresa) Then -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", StrFiltroCaracteristica, 1, UsuarioActual.CveEmpresa) Then
If ObjPersonal.DtResultados.Rows.Count > 0 Then If ObjPersonal.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = ObjPersonal.DtResultados.Rows.Count.ToString.FormatoNumero(0) LtlTotalRegistros.Text = ObjPersonal.DtResultados.Rows.Count.ToString.FormatoNumero(0)
GV.DataSource = ObjPersonal.DtResultados GV.DataSource = ObjPersonal.DtResultados
Else Else
LtlTotalRegistros.Text = "0" LtlTotalRegistros.Text = "0"
GV.DataSource = Nothing GV.DataSource = Nothing
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia) Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
End If
End If End If
ObjPersonal.Dispose()
GV.DataBind()
UPDatos.Update()
TblBusqueda.Visible = True
Else
Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
End If End If
ObjPersonal.Dispose()
GV.DataBind()
UPDatos.Update()
TblBusqueda.Visible = True
End Sub End Sub
Private Function GeneraFiltroCaracteristicas() As String Private Function GeneraFiltroCaracteristicas() As String
@@ -383,4 +388,26 @@ Partial Class RH_PopUpBuscarPersonal
End If End If
End Sub End Sub
Private Function ValidarFiltrosSeleccionado() As Boolean
If TxtCodigo.Text.Trim <> String.Empty Then Return True
If TxtNombre.Text.Trim <> String.Empty Then Return True
If TxtNSS.Text.Trim <> String.Empty Then Return True
If TxtRFC.Text.Trim <> String.Empty Then Return True
If TxtHorarioDe.Text.Trim <> String.Empty Then Return True
If DdlTurnos.SelectedValue.ToEntero > 0 Then Return True
If DdlPuestos.SelectedValue.ToEntero > 0 Then Return True
If DdlDepartamentos.SelectedValue.ToEntero > 0 Then Return True
If DdlRuta.SelectedValue.ToEntero > 0 Then Return True
If DdlEscolaridad.SelectedValue.ToEntero > 0 Then Return True
If DdlEstadoCivil.SelectedValue.ToEntero > 0 Then Return True
If DdlGenero.SelectedValue.ToEntero > 0 Then Return True
If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True
If DdlClienteAsignado.SelectedValue.ToEntero > 0 Then Return True
Return False
End Function
End Class End Class

View File

@@ -54,7 +54,6 @@ Partial Class PopUpBuscarClientes
End Sub End Sub
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
Dim ObjClientes As New ClsClientes()
Dim Nombre As String = "-1" Dim Nombre As String = "-1"
Dim Codigo As String = "-1" Dim Codigo As String = "-1"
@@ -70,30 +69,37 @@ Partial Class PopUpBuscarClientes
If TxtTelefono.Text.Trim <> String.Empty Then Telefono = TxtTelefono.Text.Trim If TxtTelefono.Text.Trim <> String.Empty Then Telefono = TxtTelefono.Text.Trim
If TxtMail.Text.Trim <> String.Empty Then Mail = TxtMail.Text.Trim If TxtMail.Text.Trim <> String.Empty Then Mail = TxtMail.Text.Trim
If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente) Then If ValidarUnFiltroSeleccionado() Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0) Dim ObjClientes As New ClsClientes()
GV.DataSource = ObjClientes.DtResultados If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 Then DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente) Then
GV.DataSource = ObjClientes.DtResultados.FiltraParametros("CveCliente IN (10450, 10460, 10458)") If ObjClientes.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = "0" LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0)
ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 Then GV.DataSource = ObjClientes.DtResultados
GV.DataSource = ObjClientes.DtResultados.FiltraParametros("CveCliente IN (27448)") If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 Then
GV.DataSource = ObjClientes.DtResultados.FiltraParametros("CveCliente IN (10450, 10460, 10458)")
LtlTotalRegistros.Text = "0"
ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 Then
GV.DataSource = ObjClientes.DtResultados.FiltraParametros("CveCliente IN (27448)")
LtlTotalRegistros.Text = "0"
End If
Else
LtlTotalRegistros.Text = "0" LtlTotalRegistros.Text = "0"
GV.DataSource = Nothing
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
End If End If
Else
LtlTotalRegistros.Text = "0"
GV.DataSource = Nothing
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
End If End If
ObjClientes.Dispose()
GV.DataBind()
UPDatos.Update()
TblBusqueda.Visible = True
Else
Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
End If End If
ObjClientes.Dispose()
GV.DataBind()
UPDatos.Update()
TblBusqueda.Visible = True
End Sub End Sub
Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound
@@ -127,4 +133,17 @@ Partial Class PopUpBuscarClientes
e.Row.FCLiteral("LtlMail").Text = String.Format("<div class='truncate' style='width:100px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Mail")) e.Row.FCLiteral("LtlMail").Text = String.Format("<div class='truncate' style='width:100px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Mail"))
End If End If
End Sub End Sub
Private Function ValidarUnFiltroSeleccionado() As Boolean
If TxtNombre.Text.Trim <> String.Empty Then Return True
If TxtCodigo.Text.Trim <> String.Empty Then Return True
If TxtNombreCorto.Text.Trim <> String.Empty Then Return True
If TxtRFC.Text.Trim <> String.Empty Then Return True
If TxtTelefono.Text.Trim <> String.Empty Then Return True
If TxtMail.Text.Trim <> String.Empty Then Return True
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True
If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True
Return False
End Function
End Class End Class

View File

@@ -88,7 +88,6 @@ Partial Class PopUpBuscarFolio
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
Dim ObjVentas As New ClsVentas()
Dim Serie As String = "-1" Dim Serie As String = "-1"
Dim Folio As Integer = -1 Dim Folio As Integer = -1
@@ -123,23 +122,31 @@ Partial Class PopUpBuscarFolio
PeidoContrato = If(TxtPedidoContrato.Text.Length = 0, "-1", TxtPedidoContrato.Text.Trim) PeidoContrato = If(TxtPedidoContrato.Text.Length = 0, "-1", TxtPedidoContrato.Text.Trim)
OrdenCompra = If(TxtOrdenCompra.Text.Length = 0, "-1", TxtOrdenCompra.Text.Trim) OrdenCompra = If(TxtOrdenCompra.Text.Length = 0, "-1", TxtOrdenCompra.Text.Trim)
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Serie, Folio, Codigo, Cliente.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlEstatusFactura.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, FolioFiscal, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedValue.ToEntero, -1), DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then If ValidarUnFiltroSeleccionado() Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = ObjVentas.DtResultados.Rows.Count.ToString.FormatoNumero(0) Dim ObjVentas As New ClsVentas()
GV.DataSource = ObjVentas.DtResultados If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Serie, Folio, Codigo, Cliente.ToEntero, DdlSubProyecto.SelectedValue.ToEntero,
Else DdlEstatusFactura.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, FolioFiscal, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedValue.ToEntero, -1),
LtlTotalRegistros.Text = "0" DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
GV.DataSource = Nothing If ObjVentas.DtResultados.Rows.Count > 0 Then
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia) LtlTotalRegistros.Text = ObjVentas.DtResultados.Rows.Count.ToString.FormatoNumero(0)
GV.DataSource = ObjVentas.DtResultados
Else
LtlTotalRegistros.Text = "0"
GV.DataSource = Nothing
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
End If
End If End If
ObjVentas.Dispose()
GV.DataBind()
UPDatos.Update()
TblBusqueda.Visible = True
Else
Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
End If End If
ObjVentas.Dispose()
GV.DataBind()
UPDatos.Update()
TblBusqueda.Visible = True
End Sub End Sub
Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound
@@ -271,4 +278,20 @@ Partial Class PopUpBuscarFolio
DdlEstatusFactura.Items.Add(New ListItem("Todos", "-1")) DdlEstatusFactura.Items.Add(New ListItem("Todos", "-1"))
DdlEstatusFactura.DataBind() DdlEstatusFactura.DataBind()
End Sub End Sub
Private Function ValidarUnFiltroSeleccionado() As Boolean
If DdlTipoDocto.SelectedValue.ToEntero > 0 Then Return True
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True
If DdlEstatusFactura.SelectedValue.ToEntero > 0 Then Return True
If DdlUsuario.SelectedValue.ToEntero > 0 Then Return True
If DdlPS.SelectedValue.ToEntero > 0 Then Return True
If DdlNombre.SelectedValue.ToEntero > 0 Then Return True
If TxtFolioFiscal.Text.Trim.Length > 0 Then Return True
If TxtPedidoContrato.Text.Length > 0 Then Return True
If TxtOrdenCompra.Text.Length > 0 Then Return True
Return False
End Function
End Class End Class

View File

@@ -64,18 +64,24 @@ Partial Class PopUpBuscarPs
If TxtCodigoBarras.Text.Trim = "" Then CodigoBarras = "-1" Else CodigoBarras = TxtCodigoBarras.Text.Trim If TxtCodigoBarras.Text.Trim = "" Then CodigoBarras = "-1" Else CodigoBarras = TxtCodigoBarras.Text.Trim
If TxtNombre.Text = "" Then Nombre = "-1" Else Nombre = TxtNombre.Text.ToUpper If TxtNombre.Text = "" Then Nombre = "-1" Else Nombre = TxtNombre.Text.ToUpper
Dim ObjPS As New ClsProductosServicios If ValidarUnFiltroSeleccionado() Then
If ObjPS.GetPS(-1, Ddlclasificacion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Codigo:=Codigo, CodigoBarras:=CodigoBarras, PS:=Nombre, pEstado:=DdlEstado.SelectedValue.ToEntero, CveTipoPS:=DdlCveTipoPS.SelectedValue.ToEntero, pAplicaParaVenta:=DdlAplicaVenta.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero) Then Dim ObjPS As New ClsProductosServicios
GvDatos.DataSource = ObjPS.DtResultados If ObjPS.GetPS(-1, Ddlclasificacion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Codigo:=Codigo, CodigoBarras:=CodigoBarras, PS:=Nombre,
dvbusqueda.Visible = True pEstado:=DdlEstado.SelectedValue.ToEntero, CveTipoPS:=DdlCveTipoPS.SelectedValue.ToEntero, pAplicaParaVenta:=DdlAplicaVenta.SelectedValue.ToEntero,
Else CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero) Then
GvDatos.DataSource = Nothing GvDatos.DataSource = ObjPS.DtResultados
dvbusqueda.Visible = False dvbusqueda.Visible = True
End If Else
ObjPS.Dispose() GvDatos.DataSource = Nothing
dvbusqueda.Visible = False
End If
ObjPS.Dispose()
GvDatos.DataBind() GvDatos.DataBind()
GvDatos.UseAccessibleHeader = True GvDatos.UseAccessibleHeader = True
Else
Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
End If
End Sub End Sub
#End Region #End Region
@@ -91,6 +97,17 @@ Partial Class PopUpBuscarPs
End Sub End Sub
#End Region #End Region
Private Function ValidarUnFiltroSeleccionado() As Boolean
If TxtCodigo.Text.Trim <> String.Empty Then Return True
If TxtCodigoBarras.Text.Trim <> String.Empty Then Return True
If TxtNombre.Text.Trim <> String.Empty Then Return True
If DdlCveTipoPS.SelectedValue.ToEntero > 0 Then Return True
If DdlAplicaVenta.SelectedValue.ToEntero > 0 Then Return True
If DdlCompuesto.SelectedValue.ToEntero > 0 Then Return True
Return False
End Function
End Class End Class

View File

@@ -18371,6 +18371,10 @@ Partial Class Ventas
DtTemporal.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime")) DtTemporal.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime"))
End If End If
If Not DtTemporal.Columns.Contains("Serie") Then
DtTemporal.Columns.Add("Serie", Type.GetType("System.String"))
End If
GvInv.Columns(4).Visible = DtTemporal.MAX("Serie", "Serie <> ''") <> "" Or CveVenta <= 0 GvInv.Columns(4).Visible = DtTemporal.MAX("Serie", "Serie <> ''") <> "" Or CveVenta <= 0
GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> "" GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> ""
GvInv.Columns(6).Visible = DtTemporal.MAX("FechaCaducidad").ToDate > MinFecha GvInv.Columns(6).Visible = DtTemporal.MAX("FechaCaducidad").ToDate > MinFecha