mejora en funcionalidad 132

This commit is contained in:
2022-08-29 12:11:29 -07:00
parent fc3b03eeb9
commit 6b8ce06103
4 changed files with 32 additions and 76 deletions

View File

@@ -66,40 +66,10 @@
<div class="titlefiltros caption "> <div class="titlefiltros caption ">
<ul class="list-inline"> <ul class="list-inline">
<li>Cliente: <li>Cliente:
<ADS:Dropdownlost ID="DdlClientes" CssClassDdl="select2me" runat="server" CssStyle="width: 350px;" DataTextField="NombreComercial" Onselectedindexchange="DdlCliente_SelectedIndexChanged" DataValueField="CveCliente"></ADS:Dropdownlost> <ADS:Dropdownlost ID="DdlClientes" CssClassDdl="select2me" runat="server" CssStyle="width: 350px;" DataTextField="NombreComercial" Onselectedindexchange="DdlCliente_SelectedIndexChanged" DataValueField="CveCliente"></ADS:Dropdownlost>
<%--<asp:DropDownList ID="DdlClientes" runat="server" DataValueField="CveCliente" DataTextField="Nombre" OnSelectedIndexChanged="DdlCliente_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="350px"></asp:DropDownList>--%> <%--<asp:DropDownList ID="DdlClientes" runat="server" DataValueField="CveCliente" DataTextField="Nombre" OnSelectedIndexChanged="DdlCliente_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="350px"></asp:DropDownList>--%>
</li> </li>
<li>Serie-Folio: <li>Serie-Folio:
<asp:DropDownList ID="DdlFolio" runat="server" DataValueField="CveVenta" DataTextField="SerieFolio" CssClass="form-control input-sm select2me" Width="250px"></asp:DropDownList> <asp:DropDownList ID="DdlFolio" runat="server" DataValueField="CveVenta" DataTextField="SerieFolio" CssClass="form-control input-sm select2me" Width="250px"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="DdlFolio" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpBuscar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="DdlFolio" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpBuscar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFolio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFolio" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCEFolio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFolio" Width="300px"></ajax:ValidatorCalloutExtender>
@@ -108,25 +78,17 @@
</div> </div>
<div class="tools"> <div class="tools">
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" OnClick="BtnBuscar_Click" ValidationGroup="GrpBuscar" class="btn btn-primary" /> <asp:Button ID="BtnBuscar" runat="server" Text="Buscar" OnClick="BtnBuscar_Click" ValidationGroup="GrpBuscar" class="btn btn-primary" />
<%--<a href="javascript:;" class="expand"></a>--%>
</div> </div>
</div> </div>
<div class="portlet-body" style="display: none;"> <div class="portlet-body" style="display: none;">
<%--<ul class="list-inline">
<li>Descripcion:
<asp:Label ID="lbDescripcion" runat="server"></asp:Label>
</li>
</ul>--%>
</div> </div>
</div> </div>
</asp:Panel> </asp:Panel>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div class="row" style="margin-left: 0px; margin-right: 0px;"> <div class="row" style="margin-left: 0px; margin-right: 0px;">
<div class="col-md-6"> <div class="col-md-6">
<%--DATOS DE LA VENTA--%> <%--DATOS DE LA VENTA--%>

View File

@@ -598,7 +598,7 @@ Partial Class Inventarios_EntregaAlmacen
CveContrato = drE("CveContrato").ToString().ToEntero() CveContrato = drE("CveContrato").ToString().ToEntero()
CveVendedor = drE("CveVendedor").ToString().ToEntero() CveVendedor = drE("CveVendedor").ToString().ToEntero()
CveCliente = drE("CveCliente").ToString().ToEntero() CveCliente = drE("CveCliente").ToString().ToEntero()
ClienteEntregaPersonal(CveCliente) 'ClienteEntregaPersonal(CveCliente)
CveSubProyecto = drE("CveSubProyecto").ToString().ToEntero() CveSubProyecto = drE("CveSubProyecto").ToString().ToEntero()
EsInterno = CBool(DtDatos.Rows(0)("EsInterno").ToString()) EsInterno = CBool(DtDatos.Rows(0)("EsInterno").ToString())
CveDireccionEnvio = drE("CveDireccionEnvio").ToString.ToEntero CveDireccionEnvio = drE("CveDireccionEnvio").ToString.ToEntero
@@ -1118,9 +1118,9 @@ Partial Class Inventarios_EntregaAlmacen
DtDatosDetalle.Columns.Add("FueTraspaso", GetType(Integer)) DtDatosDetalle.Columns.Add("FueTraspaso", GetType(Integer))
End If End If
End Sub End Sub
Private Sub CargaSerie(Optional CerrarCompletado As Boolean = False) Private Sub CargaSerie(Optional CerrarCompletado As Boolean = False, Optional CargaMasivo As Boolean = False)
RegistraScript("$('#DivSerie').modal('show')", "show")
If Not CargaMasivo Then RegistraScript("$('#DivSerie').modal('show')", "show")
Dim AplicaCaducidad = False Dim AplicaCaducidad = False
If GlobalDTPS(UsuarioActual.CveEmpresa, ).FiltraParametros("").Rows(0) IsNot Nothing Then If GlobalDTPS(UsuarioActual.CveEmpresa, ).FiltraParametros("").Rows(0) IsNot Nothing Then
@@ -1174,7 +1174,7 @@ Partial Class Inventarios_EntregaAlmacen
Dim Mensaje As New StringBuilder Dim Mensaje As New StringBuilder
Mensaje.AppendFormat("Serie Recomendado: <b>{0}</b>", DtSerie.Rows(0)("Serie")) Mensaje.AppendFormat("Serie Recomendado: <b>{0}</b>", DtSerie.Rows(0)("Serie"))
If AplicaCaducidad Then Mensaje.AppendFormat(", Caducicdad: <b>{0}</b>", DtSerie.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString) If AplicaCaducidad Then Mensaje.AppendFormat(", Caducidad: <b>{0}</b>", DtSerie.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString)
LbSerieRecomendado.Text = Mensaje.ToString() 'String.Format("Serie / Lote Recomendado: <b>{0}</b>, Caducicdad: <b>{1}</b>", ObjInventarios.DtResultados.Rows(0)("SerieLote"), ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString) LbSerieRecomendado.Text = Mensaje.ToString() 'String.Format("Serie / Lote Recomendado: <b>{0}</b>, Caducicdad: <b>{1}</b>", ObjInventarios.DtResultados.Rows(0)("SerieLote"), ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString)
Else Else
LbSerieRecomendado.Text = "No se encontro ningun Serie/Lote." LbSerieRecomendado.Text = "No se encontro ningun Serie/Lote."
@@ -1228,7 +1228,7 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
End Sub End Sub
Private Sub AgregaSerie(Serie As String, Tipo As Integer) Private Sub AgregaSerie(Serie As String, Tipo As Integer, Optional CargaMasivo As Boolean = False)
If Serie.Trim = "" Then If Serie.Trim = "" Then
Alert("El campo Serie es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) Alert("El campo Serie es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
@@ -1290,7 +1290,7 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
If Tipo < 3 Then If Tipo < 3 Then
CargaSerie(True) CargaSerie(True, cargaMasivo)
End If End If
End Sub End Sub
@@ -1548,8 +1548,7 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
End If End If
If Gvr.DataKey("AplicaSerie") = "True" Then
If Gvr.DataKey("AplicaSerieLote") = "True" Then
TdSeriePS.Visible = True TdSeriePS.Visible = True
TxtSeriePS.Focus() TxtSeriePS.Focus()
@@ -1560,7 +1559,6 @@ Partial Class Inventarios_EntregaAlmacen
Exit Sub Exit Sub
End If End If
Dim CantidadEspecial = Gvr.DataKey("CveClasificacion").ToString().ToEntero().Contiene(17601, 17881) OrElse Gvr.DataKey("CvePS").ToString().ToEntero().Contiene(343032, 343033) Dim CantidadEspecial = Gvr.DataKey("CveClasificacion").ToString().ToEntero().Contiene(17601, 17881) OrElse Gvr.DataKey("CvePS").ToString().ToEntero().Contiene(343032, 343033)
If CantidadEspecial Then If CantidadEspecial Then
@@ -1614,7 +1612,7 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
End Sub End Sub
Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs) Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
AgregaSerie(TxtSeriePS.Text.Trim, 2) AgregaSerie(TxtSeriePS.Text.Trim, 2, True)
TdSeriePS.Visible = False TdSeriePS.Visible = False
TxtSeriePS.Text = "" TxtSeriePS.Text = ""

View File

@@ -1606,7 +1606,7 @@ Partial Class Inventarios_RecepcionAlmacen
Dim TxtCantidad = GvInv.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF") Dim TxtCantidad = GvInv.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
If Gvr.DataKey("AplicaSerieLote") = "True" Then If Gvr.DataKey("AplicaSerie") = "True" Then
TdSeriePS.Visible = True TdSeriePS.Visible = True
TxtSeriePS.Focus() TxtSeriePS.Focus()
@@ -1673,11 +1673,14 @@ Partial Class Inventarios_RecepcionAlmacen
End Sub End Sub
Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs) Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
AgregaSerie(TxtSeriePS.Text.Trim, 2) AgregaSerie(TxtSeriePS.Text.Trim, 2, CargaMasivaSeries:=True)
TdSeriePS.Visible = False TdSeriePS.Visible = False
TxtSeriePS.Text = "" TxtSeriePS.Text = ""
TxtCodigoPS.Text = "" TxtCodigoPS.Text = ""
TxtCodigoPS.Focus() TxtCodigoPS.Focus()
UPInv.Update()
GvInv.DataSource = DtInv
GvInv.DataBind()
End Sub End Sub
Protected Sub BtnGuardarCantidadEspecial_Click(sender As Object, e As EventArgs) Protected Sub BtnGuardarCantidadEspecial_Click(sender As Object, e As EventArgs)
AgregaCantidadEspecial() AgregaCantidadEspecial()
@@ -1775,7 +1778,6 @@ Partial Class Inventarios_RecepcionAlmacen
DtInv.AcceptChanges() DtInv.AcceptChanges()
Next Next
UPInv.Update() UPInv.Update()
UpSerie.Update() UpSerie.Update()
TxtSerie.Text = "" TxtSerie.Text = ""
@@ -1814,7 +1816,7 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
'PARA VALIDAR SI LA SERIE ES IGUAL AL CODIGO O CODIGOBARRAS 'PARA VALIDAR SI LA SERIE ES IGUAL AL CODIGO O CODIGOBARRAS
If Serie.ToUpper = dr("Codigo").ToString.ToUpper Or Serie.ToUpper = dr("CodigoBarras").ToString.ToUpper Then If Serie.ToUpper = dr("Codigo").ToString.ToUpper OrElse Serie.ToUpper = dr("CodigoBarras").ToString.ToUpper Then
MensajeAlert.Append($"<br/> El numero de Serie <b>{Serie}</b> coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.") MensajeAlert.Append($"<br/> El numero de Serie <b>{Serie}</b> coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.")
Continue For Continue For
End If End If
@@ -1829,20 +1831,21 @@ Partial Class Inventarios_RecepcionAlmacen
Dim MensajeSinExistencias As New StringBuilder Dim MensajeSinExistencias As New StringBuilder
Dim ObjInventarios As New ClsInventarios Dim ObjInventarios As New ClsInventarios
Dim Index = 0 Dim Index = 0
Dim Cantidad As Integer = LbCantidad.Text.ToEntero
If CargaMasivaSeries Then Cantidad = DtInv.FiltroPrimeroValor("CantidadF", "Consec = " & CveConsecSerie).ToEntero
'DtInv
For Each Serie In SeriesArreglo For Each Serie In SeriesArreglo
If Serie <> "" Then If Serie <> "" Then
Dim Row = DtDatosDetalle.NewRow
Dim Row = DtDatosDetalle.NewRow
Index = Index + 1 Index = Index + 1
If Index > LbCantidad.Text.ToEntero Then If Index > Cantidad Then Exit For
Exit For
End If
'VALIDA QUE SIGA AGREGANDO 'VALIDA QUE SIGA AGREGANDO
If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < LbCantidad.Text.ToEntero Then If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < Cantidad Then
Exit For MensajeAlert.Append("series cargadas en su totalidad") : Exit For
End If End If
'VERIFICA EXISTENCIAS 'VERIFICA EXISTENCIAS

View File

@@ -720,14 +720,12 @@ Partial Class Inventarios_TraspasoAlmacen
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
If ChkEmitirTimbrado.Checked AndAlso ChkEmitirCartaPorte.Checked Then If ChkEmitirTimbrado.Checked AndAlso ChkEmitirCartaPorte.Checked Then
If Not ValidaPSSAT(DrPS) Then If Not ValidaPSSAT(DrPS) Then
Exit Sub Exit Sub
End If End If
End If End If
If DrPS IsNot Nothing Then If DrPS IsNot Nothing Then
CveClasificacion = DrPS("CveClasificacion").ToString.ToEntero CveClasificacion = DrPS("CveClasificacion").ToString.ToEntero
Dim DrUM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimero($"CveUnidadMedida = {CveUnidadMedida}") Dim DrUM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimero($"CveUnidadMedida = {CveUnidadMedida}")
@@ -2362,9 +2360,7 @@ Partial Class Inventarios_TraspasoAlmacen
#Region " AGREGA CON TXT | CODIGO - SERIE " #Region " AGREGA CON TXT | CODIGO - SERIE "
Protected Sub BtnCodigoPS_Click(sender As Object, e As EventArgs) Protected Sub BtnCodigoPS_Click(sender As Object, e As EventArgs)
If TxtCodigoPS.Text = "" Then If TxtCodigoPS.Text = "" Then Exit Sub
Exit Sub
End If
TdSeriePS.Visible = False TdSeriePS.Visible = False
@@ -2376,30 +2372,27 @@ Partial Class Inventarios_TraspasoAlmacen
Exit Sub Exit Sub
End If End If
If DrPS("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then If DrPS("AplicaSerie").ToString = "True" Then
TdSeriePS.Visible = True TdSeriePS.Visible = True
TxtSeriePS.Focus() TxtSeriePS.Focus()
CvePSSerie = DrPS("CvePS").ToString.ToEntero CvePSSerie = DrPS("CvePS").ToString.ToEntero
CveUMSerie = DrPS("CveUnidadMedida").ToString.ToEntero CveUMSerie = DrPS("CveUnidadMedida").ToString.ToEntero
Exit Sub Exit Sub
Else
AgregarPS(1, DrPS("CvePS").ToString.ToEntero, DrPS("CveUnidadMedida").ToString.ToEntero)
TxtCodigoPS.Text = ""
End If End If
AgregarPS(1, DrPS("CvePS").ToString.ToEntero, DrPS("CveUnidadMedida").ToString.ToEntero)
TxtCodigoPS.Text = ""
End Sub End Sub
Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs) Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
If TxtSeriePS.Text.Trim = "" Then If TxtSeriePS.Text.Trim = "" Then Exit Sub
Exit Sub
End If
txtCantidad.Text = "1" txtCantidad.Text = "1"
Dim Valido = ValidaExistencia(1, CvePSSerie, CveUMSerie, -1, TxtSeriePS.Text.Trim, "-1", MinFecha) Dim Valido = ValidaExistencia(1, CvePSSerie, CveUMSerie, -1, TxtSeriePS.Text.Trim, "-1", MinFecha)
If Valido Then If Valido Then
AgregarPS(1, CvePSSerie, CveUMSerie, TxtSeriePS.Text.Trim) AgregarPS(1, CvePSSerie, CveUMSerie, Serie:=TxtSeriePS.Text.Trim)
Else Else
TxtSeriePS.Text = "" TxtSeriePS.Text = ""
TxtSeriePS.Focus() TxtSeriePS.Focus()