This commit is contained in:
2023-12-18 06:58:53 -07:00
parent 4fd8c5f522
commit 82998ee4ad
9 changed files with 143 additions and 40 deletions

View File

@@ -309,19 +309,18 @@
<i></i>
</div>
<div class="row" runat="server" id="DVCodigoPSAlterno" visible="false" >
<div class=" col-md-6">
<div class=" col-md-3">
<div class="form-group form-md-line-input input-iconright" >
<asp:TextBox ID="TxtCodigoAlterno" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
<label class="truncate" for="<%= TxtCodigoAlterno.ClientID.ToString()%>">Número de Parte / Código (Alterno):</label>
<label class="truncate" for="<%= TxtCodigoAlterno.ClientID.ToString()%>">Código Alterno:</label>
<i></i>
</div>
</div>
<div class=" col-md-6">
<div class=" col-md-9">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPSAlterno" CssClass="form-control" runat="server" MaxLength="200"></asp:TextBox>
<label class="truncate" for="<%= TxtPSAlterno.ClientID.ToString()%>">Descripción del Producto / Servicio (Alterno):</label>
<label class="truncate" for="<%= TxtPSAlterno.ClientID.ToString()%>">Descripción Alterna:</label>
<i></i>
</div>
</div>

View File

@@ -184,15 +184,14 @@ Partial Class ProductosyServicios
InicializaValores()
If Request("CvePS") IsNot Nothing AndAlso IsNumeric(Request("CvePS")) AndAlso Request("CvePS").ToEntero > 0 Then
ViewState("CvePS") = Request("CvePS")
CargarMarcas()
CargaDatos()
'Configuración de Modalidad Update
BtnGuardar.Text = "Guardar Cambios"
CargarAlias()
CargaExistencias()
If CargaDatos() Then
CargarMarcas()
'Configuración de Modalidad Update
BtnGuardar.Text = "Guardar Cambios"
CargarAlias()
CargaExistencias()
End If
Else
'Configuración de Modalidad Insert
RegistraScript("$('#C_Tab_TabPaquetes_tab').css('display' , 'none')")
@@ -850,11 +849,12 @@ Partial Class ProductosyServicios
'DdlCtaContableInventarios.DataBind()
'ObjContabilidad.Dispose()
End Sub
Private Sub CargaDatos()
Private Function CargaDatos() As Boolean
Dim Retorno As Boolean = False
Dim ObjProductosServicios As New ClsProductosServicios()
If ObjProductosServicios.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then
If ObjProductosServicios.DtResultados.Rows.Count > 0 Then
Retorno = True
'SI NO TIENE VALOR Y NO TIENE EL PROCESO MUESTRA SIN CLASIFICACION
If ObjProductosServicios.CveClasificacion.ToString.Equals("-1") And Not UsuarioActual.TienePermisoProceso(147) And UsuarioActual.Empresa.Funcionalidad(121) = "1" Then
DdlClasificacion.SelectedValueExist("0")
@@ -1106,7 +1106,8 @@ Partial Class ProductosyServicios
End If
ObjProductosServicios.Dispose()
gvPaqueteDetalle.DataBind()
End Sub
Return Retorno
End Function
Protected Sub CargarAlias()
Dim ObjAlias As New ClsProductosServicios
ObjAlias.GetPSAlias(CvePS, UsuarioActual.CveEmpresa)

View File

@@ -88,20 +88,62 @@
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
<asp:GridView ID="GvD" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Pendientes"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
data-sort="true"
data-freezerows="1" GridLines="None">
<Columns>
<asp:HyperLinkField DataTextfield="SerieFolio" HeaderText="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
<asp:BoundField Datafield="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
<asp:BoundField Datafield="PS" HeaderText="Ps" />
<%-- <asp:BoundField Datafield="TipoEntrega" HeaderText="Tipo" ControlStyle-Width="100px" /> --%>
<asp:BoundField Datafield="PS" HeaderText="Producto" />
<asp:BoundField Datafield="Cantidad" HeaderText="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField Datafield="Hmo" HeaderText="Hmo" DataFormatString="{0:#,###.##}" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center"/>
<asp:BoundField Datafield="Cul" HeaderText="Cul" DataFormatString="{0:#,###.##}" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center"/>
<asp:BoundField Datafield="Mex" HeaderText="Mex" DataFormatString="{0:#,###.##}" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center"/>
<asp:BoundField Datafield="LP" HeaderText="LP" DataFormatString="{0:#,###.##}" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center"/>
<asp:TemplateField HeaderText="HMO" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Button ID="BtnHMO" runat="server" Text="Surtir" Visible="false" CssClass="btn btn-sm green" CommandName="153" CommandArgument='<%#Eval("CveVenta") %>' />
<asp:Label ID="LblHmo" runat="server" Text='<%# Eval("Hmo", "{0:#,###.##}") %>' ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cul" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Button ID="BtnCul" runat="server" Text="Surtir" Visible="false" CssClass="btn btn-sm green" CommandName="271" CommandArgument='<%#Eval("CveVenta") %>' />
<asp:Label ID="LblCul" runat="server" Text='<%# Eval("Cul", "{0:#,###.##}") %>' ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Mex" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Button ID="BtnMex" runat="server" Text="Surtir" Visible="false" CssClass="btn btn-sm green" CommandName="275" CommandArgument='<%#Eval("CveVenta") %>' />
<asp:Label ID="LblMex" runat="server" Text='<%# Eval("Mex", "{0:#,###.##}") %>' ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="LP" ItemStyle-Width="125px" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Button ID="BtnLP" runat="server" Text="Surtir" Visible="false" CssClass="btn btn-sm green" CommandName="274" CommandArgument='<%#Eval("CveVenta") %>' />
<asp:Label ID="LblLP" runat="server" Text='<%# Eval("LP", "{0:#,###.##}") %>' ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
<asp:GridView ID="GvR" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
data-sort="true"
data-freezerows="1" GridLines="None">
<Columns>
<asp:HyperLinkField DataTextfield="SerieFolio" HeaderText="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
<asp:BoundField Datafield="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
<%-- <asp:BoundField Datafield="TipoEntrega" HeaderText="Tipo" ControlStyle-Width="100px" /> --%>
<asp:BoundField Datafield="Almacen" HeaderText="Almacen" />
<asp:HyperLinkField DataTextfield="Folio" HeaderText="Folio" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" />
<asp:BoundField Datafield="PS" HeaderText="Producto" />
<asp:BoundField Datafield="Cantidad" HeaderText="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField Datafield="CantidadSurtida" HeaderText="Surtido" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Center" />
</Columns>
<RowStyle CssClass="Texto" />

View File

@@ -1,6 +1,5 @@
Imports System.Data
Imports Extensiones
Imports iText.Barcodes.Dmcode
Imports Microsoft.Reporting.WebForms
Partial Class Ventas_RepEntregasEcommerce
@@ -10,12 +9,11 @@ Partial Class Ventas_RepEntregasEcommerce
If Not Page.IsPostBack Then
CargaCombos()
CargaDatos()
End If
End Sub
Private Sub CargaCombos()
txtFechaI.Text = NowADS.AddDays(-3).ToShortDateString
txtFechaI.Text = NowADS.AddDays(-5).ToShortDateString
txtFechaF.Text = NowADS.ToShortDateString
End Sub
@@ -25,11 +23,20 @@ Partial Class Ventas_RepEntregasEcommerce
If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text.Trim.ToDate Else FechaI = MinFecha
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text.Trim.ToDate Else FechaF = MaxFecha
Dim Obj As New ClsVentas
If Obj.GetEntregasEcommerce(FechaI, FechaF, 1, UsuarioActual.CveEmpresa) Then
GvD.DataSource = Obj.DtResultados
If Obj.GetEntregasEcommerce(FechaI, FechaF, RBL.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
If RBL.SelectedValue = "1" Then
GvD.DataSource = Obj.DtResultados
GvD.Visible = True : GvR.Visible = False
Else
GvR.DataSource = Obj.DtResultados
GvR.Visible = True : GvD.Visible = False
End If
End If
Obj.Dispose()
GvD.DataBind()
GvR.DataBind()
UPDatos.Update()
End Sub
@@ -127,13 +134,38 @@ Partial Class Ventas_RepEntregasEcommerce
Private Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CvePS") = "" Then e.Row.CssClass = "SubTotales"
If e.Row.DBCampo("CvePS") = "" Then
e.Row.CssClass = "SubTotales"
If e.Row.DBCampo("HMO").ToDecimal >= e.Row.DBCampo("Cantidad").ToDecimal Then e.Row.FCButton("BtnHMO").Visible = True
If e.Row.DBCampo("CUL").ToDecimal >= e.Row.DBCampo("Cantidad").ToDecimal Then e.Row.FCButton("BtnCUL").Visible = True
If e.Row.DBCampo("Mex").ToDecimal >= e.Row.DBCampo("Cantidad").ToDecimal Then e.Row.FCButton("BtnMex").Visible = True
If e.Row.DBCampo("LP").ToDecimal >= e.Row.DBCampo("Cantidad").ToDecimal Then e.Row.FCButton("BtnLP").Visible = True
e.Row.FCLabel("LblHmo").Visible = False
e.Row.FCLabel("LblCUL").Visible = False
e.Row.FCLabel("LblMex").Visible = False
e.Row.FCLabel("LblLP").Visible = False
Else
If e.Row.DBCampo("CveAlmacenTraspasoOrigen") <> "" Then
Dim tCve As Integer = e.Row.DBCampo("CveAlmacenTraspasoOrigen").ToEntero
Dim tCol As Integer = If(tCve = 153, 4, If(tCve = 271, 5, If(tCve = 275, 6, 7)))
e.Row.Cells(tCol).BackColor = Drawing.Color.LightGreen
End If
End If
End If
End Sub
#End Region
Private Sub GvD_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvD.RowCommand
If e.CommandName <> "" Then
Dim ObjSurtir As New ClsInventarios
If ObjSurtir.UpdateAlmacenTraspasoOrigen(e.CommandName.ToEntero, e.CommandArgument.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
Alert("Se asignó el almacen por surtir.")
End If
ObjSurtir.Dispose()
CargaDatos()
End If
End Sub
End Class