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

@@ -37,7 +37,7 @@
<asp:BoundField DataField="FechaIng" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Estatus">
<ItemTemplate>
<asp:Label ID="LblEstatus" runat="server" Text='<%# Eval("Estatus") %>'>></asp:Label>
<asp:Label ID="LblEstatus" runat="server" Text='<%#If(Eval("Estatus").ToString <> "", "Si", "") %>'>></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">

View File

@@ -1704,6 +1704,28 @@ Public Class ClsInventarios
End Function
Public Function UpdateAlmacenTraspasoOrigen(CveAlmacenTraspasoOrigen As Integer, CveVenta As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AlmacenTraspasoOrigenUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveAlmacenTraspasoOrigen", SqlDbType.Int).Value = CveAlmacenTraspasoOrigen
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualiza almacen origen.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetExistenciasSucursales(PSRequest As String, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False

View File

@@ -2640,7 +2640,7 @@ Public Class ClsNominas
Try
DTSet = New DataSet()
DataAdapter("PA_RH_PersonalChecadorASistencia", CommandType.StoredProcedure)
DataAdapter("PA_RH_PersonalChecadorAsistencia", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaInicio", SqlDbType.DateTime).Value = FechaInicio
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin

View File

@@ -156,7 +156,7 @@ Public Class ClsVentas
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al guardar los dataos del timbre.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
OnError("Ocurrió un error al guardar los datos del timbre.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
@@ -1976,7 +1976,7 @@ Public Class ClsVentas
Return Retorno
End Function
Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Porcentaje As Double) As Integer
Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Predeterminada As Boolean, Porcentaje As Double) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_Vta_PrecioListaAdd")
@@ -1986,6 +1986,7 @@ Public Class ClsVentas
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@PrecioLista", SqlDbType.VarChar).Value = PrecioLista
.Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje
.Add("@Predeterminada", SqlDbType.Bit).Value = Predeterminada
.Add("@CvePrecioLista", SqlDbType.Int).Direction = ParameterDirection.Output
End With
@@ -2005,7 +2006,8 @@ Public Class ClsVentas
Return Retorno
End Function
Public Function UpdatePrecioLista(PrecioLista As String, Estatus As Boolean, CveUsuario As Integer, Porcentaje As Double, CvePrecioLista As Integer) As Boolean
Public Function UpdatePrecioLista(PrecioLista As String, Estatus As Boolean, CveUsuario As Integer, Porcentaje As Double,
Predeterminada As Boolean, CvePrecioLista As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PrecioListaUpdate")
@@ -2015,6 +2017,7 @@ Public Class ClsVentas
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje
.Add("@Predeterminada", SqlDbType.Bit).Value = Predeterminada
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
End With

View File

@@ -4542,14 +4542,18 @@ Namespace Modelos
If MovimientoPrePoliza AndAlso CveMovimientoInventario > 0 Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
Dim DtCostos As DataTable = ObjInventario.DtResultados.Copy
Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"})
Dim tCveSubProyecto As Integer = Me.CveSubProyecto
Dim ValorInventario As Decimal
Dim GroupBycostos As String() = {"CveClasificacion", "CveSubProyecto", "SubProyecto"}
Dim tmpCostos As DataTable = DtCostos.GroupByDT("", "", {GroupBycostos}, SumColumns:={"Total"}).FiltraParametros("GroupADSType = 1")
For Each RowInv As DataRow In DtCostosDistinct.Rows
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion")))
For Each RowInv As DataRow In tmpCostos.Rows
'ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion")))
ValorInventario = RowInv("Total").ToString.ToDecimal
If UsuarioActual.CveEmpresa <> 119 Then tCveSubProyecto = RowInv("CveSubProyecto").ToString.ToEntero()
Try
If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, ValorInventario, 69, Me.SerieFolio, Me.SerieFolio, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, CveSubProyecto:=Me.CveSubProyecto) Then
If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, ValorInventario, 69, Me.SerieFolio, Me.SerieFolio, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, CveSubProyecto:=tCveSubProyecto) Then
OcurrioError = True
Exit For
End If

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