This commit is contained in:
2020-10-23 19:36:22 -07:00
14 changed files with 378 additions and 71 deletions

View File

@@ -1490,7 +1490,7 @@ Public Class ClsPaginas
' Application("GlobalDTBancosCuentas") = value
' End Set
'End Property
Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1) As DataTable
Property GlobalDTBancosCuentas(CveUsuario As Integer, Optional CveCuenta As Integer = -1, Optional Estatus As Integer = 1, Optional CveEmpresa As Integer = -1, Optional CveTipoCuenta As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTBancosCuentas-{0}", CveEmpresa)
'sino existe, recarga los datos
@@ -1506,6 +1506,7 @@ Public Class ClsPaginas
Dim Str As String = String.Format("CveEmpresa = {0} ", UsuarioActual.CveEmpresa)
If CveUsuario > -1 Then Str = String.Format("{0} AND CveUsuario = {1}", Str, CveUsuario)
If CveTipoCuenta > -1 Then Str = String.Format("{0} AND CveTipoCuenta = {1}", Str, CveTipoCuenta)
If CveCuenta > -1 Then Str = String.Format("{0} AND CveCuenta = {1}", Str, CveCuenta)
If Estatus > -1 Then Str = String.Format("{0} AND Estatus = '{1}'", Str, If(Estatus = 1, "Activo", "Inactivo"))

View File

@@ -404,7 +404,7 @@ Public Class ClsProductosServicios
Optional CveFraccionArancelaria As Integer = -1, Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1,
Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False) As Integer
Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_ProductosServiciosAdd")
@@ -483,6 +483,7 @@ Public Class ClsProductosServicios
.Add("@AplicaLote", SqlDbType.Bit).Value = AplicaLote
.Add("@AplicaCaducidad", SqlDbType.Bit).Value = AplicaCaducidad
.Add("@AplicaSeccion", SqlDbType.Bit).Value = AplicaSeccion
.Add("@TiempoCaducidad", SqlDbType.SmallInt).Value = TiempoCaducidad
End With
Try
@@ -629,7 +630,7 @@ Public Class ClsProductosServicios
Optional CveFraccionArancelaria As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False,
Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False) As Boolean
Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -710,6 +711,7 @@ Public Class ClsProductosServicios
.Add("@AplicaLote", SqlDbType.Bit).Value = AplicaLote
.Add("@AplicaCaducidad", SqlDbType.Bit).Value = AplicaCaducidad
.Add("@AplicaSeccion", SqlDbType.Bit).Value = AplicaSeccion
.Add("@TiempoCaducidad", SqlDbType.SmallInt).Value = TiempoCaducidad
End With
Try

View File

@@ -107,40 +107,40 @@ Public Class ClsVentas
Data = New DataTable
End Sub
#Region "Conexiones"
#Region "Conexiones"
Private Sub ConexionAdd()
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Private Sub ConexionAdd()
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try
DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
SqlAdapter.Fill(Data)
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
End If
End Sub
Private Sub ConexionClose()
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
Try
SqlAdapter.Fill(Data)
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
CveConexion = 0
End If
End With
SqlAdapter.Fill(Data)
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
End If
End Sub
Private Sub ConexionClose()
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
Try
SqlAdapter.Fill(Data)
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
CveConexion = 0
End If
End Sub
#End Region
@@ -4591,6 +4591,75 @@ Public Class ClsVentas
End Try
Return retorno
End Function
Public Function GetClientesPersonalEntrega(CvePersonalEntrega As Integer, CveCliente As Integer, CveEmpresa As Integer, Estatus As Integer) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Vta_ClientesPersonalEntregaGet", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePersonalEntrega", SqlDbType.Int).Value = CvePersonalEntrega
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Estatus", SqlDbType.Int).Value = Estatus
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los clientes personal entrega", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return retorno
End Function
Public Function AddClientesPersonalEntrega(PersonalEntrega As String, CveCliente As Integer, CveUsuario As Integer, Estatus As Boolean) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Vta_ClientesPersonalEntregaAdd", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@PersonalEntrega", SqlDbType.NVarChar).Value = PersonalEntrega
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al agregar el personal entrega", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return retorno
End Function
Public Function UpdateClientesPersonalEntrega(CvePersonalEntrega As Integer, PersonalEntrega As String, CveUsuario As Integer, Estatus As Boolean) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Vta_ClientesPersonalEntregaUpdate", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePersonalEntrega", SqlDbType.Int).Value = CvePersonalEntrega
.Add("@PersonalEntrega", SqlDbType.NVarChar).Value = PersonalEntrega
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar el personal entrega", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return retorno
End Function
Public Function RemoveClientesPersonalEntrega(CvePersonalEntrega As Integer) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Vta_ClientesPersonalEntregaDelete", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePersonalEntrega", SqlDbType.Int).Value = CvePersonalEntrega
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar el personal entrega", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return retorno
End Function
#Region "Conciliación emitidas SAT"
Public Function ConciliacionemitidasSATGet(cveEmpresa As Int32) As Boolean

View File

@@ -1,4 +1,4 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntregaAlmacen.aspx.vb" Inherits="Inventarios_EntregaAlmacen" enableEventValidation="false" %>
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntregaAlmacen.aspx.vb" Inherits="Inventarios_EntregaAlmacen" EnableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
@@ -31,12 +31,12 @@
.gvEscondeColumna tr td:nth-child(3) {
display: none;
width:0px;
width: 0px;
}
.gvEscondeColumna tr th:nth-child(3) {
display: none;
width:0px;
width: 0px;
}
.btn.default:hover {
@@ -69,6 +69,10 @@
<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>--%>
</li>
@@ -76,6 +80,10 @@
<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>
<ajax:ValidatorCalloutExtender ID="VCEFolio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFolio" Width="300px"></ajax:ValidatorCalloutExtender>
@@ -244,14 +252,14 @@
</tr>
<tr>
<td colspan="2">
<asp:Panel ID="PnlEntrega" runat="server" Visible="false">
<asp:RadioButton id="RbSinEntrega" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="33%" GroupName="EntregaRadioGroup" Text="Entrega en mostrador" AutoPostBack="true"></asp:RadioButton>
<asp:RadioButton id="RbEntregaInterna" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="30%" GroupName="EntregaRadioGroup" Text="Entrega Interna" AutoPostBack="true"></asp:RadioButton>
<asp:RadioButton id="RbEntregaExterna" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="30%" GroupName="EntregaRadioGroup" Text="Entrega Externa" AutoPostBack="true"></asp:RadioButton>
</asp:Panel>
<asp:LinkButton ID="LnkPaqueteriaDetalle" runat="server" OnClick="PaqueteriaDetalle_Click" Visible="false">ver detalle de entrega</asp:LinkButton>
<asp:Panel ID="PnlEntrega" runat="server" Visible="false">
<asp:RadioButton ID="RbSinEntrega" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="33%" GroupName="EntregaRadioGroup" Text="Entrega en mostrador" AutoPostBack="true"></asp:RadioButton>
<asp:RadioButton ID="RbEntregaInterna" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="30%" GroupName="EntregaRadioGroup" Text="Entrega Interna" AutoPostBack="true"></asp:RadioButton>
<asp:RadioButton ID="RbEntregaExterna" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="30%" GroupName="EntregaRadioGroup" Text="Entrega Externa" AutoPostBack="true"></asp:RadioButton>
</asp:Panel>
<asp:LinkButton ID="LnkPaqueteriaDetalle" runat="server" OnClick="PaqueteriaDetalle_Click" Visible="false">ver detalle de entrega</asp:LinkButton>
</td>
</tr>
@@ -292,6 +300,10 @@
<b>Sucursal:</b>
<asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="90px"></asp:DropDownList>
@@ -379,6 +391,39 @@
</div>
<%--PERSONAL ENTREGA--%>
<div class="col-md-12" runat="server" id="DivPersonalEntrega" visible="false">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Entregas solo a:</span>
</div>
</div>
<div class="portlet-body form">
<asp:UpdatePanel runat="server" ID="UpClentesPersonalEntrega" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvClentesPersonalEntrega" runat="server" Width="100%" GridLines="None" DataKeyNames="CvePersonalEntrega,PersonalEntrega,Nombre,CveUsuario,Usuario,FechaIng,Estatus,Estado"
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de direcciones de envio">
<Columns>
<asp:BoundField HeaderText="Personal" DataField="PersonalEntrega" ItemStyle-Width="80%" />
<%--<asp:BoundField HeaderText="Estatus" DataField="Estado" ItemStyle-Width="20%" />--%>
<%--<asp:TemplateField HeaderText="Acciones" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%">
<ItemTemplate>
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="EditClientesPersonalEntrega_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="DeleteClientesPersonalEntrega_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>--%>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
@@ -408,7 +453,7 @@
<asp:UpdatePanel runat="server">
<ContentTemplate>
<div class="row" runat="server" id="DivCodigoSeriePS" visible="false">
<div class="col-md-2 pull-right">
<div class="btn-group" style="float: right;">
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Secciones" />
@@ -437,10 +482,10 @@
</ContentTemplate>
</asp:UpdatePanel>
<%--GV DATOS--%>
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,AplicaSerieLote,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,AplicaSerieLote,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
<HeaderStyle Height="30px" />
<Columns>
<asp:TemplateField>
@@ -452,11 +497,11 @@
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField HeaderText="Cant. a Surtir" >
<asp:TemplateField HeaderText="Cant. a Surtir">
<ItemTemplate>
<asp:TextBox ID="TbCantidadF" runat="server" Width="50px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" style="text-align: right" Text='<%# Eval("CantidadF", "{0:#,##0.######}") %>'></asp:TextBox>
<asp:TextBox ID="TbCantidadF" runat="server" Width="50px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" Style="text-align: right" Text='<%# Eval("CantidadF", "{0:#,##0.######}") %>'></asp:TextBox>
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-primary btn-xs" runat="server" />
</ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
<asp:HyperLinkField HeaderText="Producto o Servicio" Target="_blank" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" ItemStyle-HorizontalAlign="Left" />
@@ -721,6 +766,7 @@
<div class="col-md-5" style="text-align: right;">
Cantidad
</div>
<div class="col-md-7">
<asp:TextBox ClientIDMode="Static" ID="TxtCantidadEspecial" Text="" runat="server"></asp:TextBox>
@@ -763,6 +809,8 @@
<asp:Panel runat="server" DefaultButton="BtnGuardarCantidadEspecialDiv">
Cant.:
<asp:TextBox ClientIDMode="Static" ID="TxtCantidadEspecialDiv" Text="1" onfocus="this.select();" Width="50px" runat="server"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtCantidadEspecialDiv" FilterType="Custom, Numbers" ValidChars="." />
<br />
@@ -885,7 +933,7 @@
<tr runat="server" id="RowDimensiones" align="left" visible="true">
<td class="text-right" style="width: 140px"><b># Cajas:</b></td>
<td style="width: 200px">
<asp:TextBox ID="TxtNoCajas" runat="server" CssClass="form-control" Width="200px" Height="30px" Style="padding: 0px"></asp:TextBox>
<asp:TextBox ID="TxtNoCajas" runat="server" CssClass="form-control" Width="200px" Height="30px" Style="padding: 0px"></asp:TextBox>
</td>
</tr>

View File

@@ -575,6 +575,7 @@ Partial Class Inventarios_EntregaAlmacen
CveContrato = DtDatos.Rows(0)("CveContrato").ToString.ToEntero
CveVendedor = DtDatos.Rows(0)("CveVendedor").ToString.ToEntero
CveCliente = DtDatos.Rows(0)("CveCliente").ToString.ToEntero
ClienteEntregaPersonal(CveCliente)
CveSubProyecto = DtDatos.Rows(0)("CveSubProyecto").ToString.ToEntero
EsInterno = CBool(DtDatos.Rows(0)("EsInterno").ToString)
@@ -3774,8 +3775,25 @@ Partial Class Inventarios_EntregaAlmacen
ElseIf RbEntregaInterna.Checked Then
'RegistraScript("$('#ModalPaqueteriaInterna').modal('show')")
End If
End Sub
End Sub
#End Region
#Region "Cliente entrega personal"
Private Sub ClienteEntregaPersonal(CveCliente As Integer)
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetClientesPersonalEntrega(-1, CveCliente, UsuarioActual.CveEmpresa, 1) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
GvClentesPersonalEntrega.DataSource = ObjVentas.DtResultados
GvClentesPersonalEntrega.DataBind()
DivPersonalEntrega.Visible = True
Else
DivPersonalEntrega.Visible = False
End If
End If
ObjVentas.Dispose()
UpClentesPersonalEntrega.Update()
End Sub
#End Region
End Class

View File

@@ -93,7 +93,7 @@
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
</li>
<li>
<asp:LinkButton runat="server" ID="LnkProyectos" OnClick="LnkProyectos_Click" Text="Proyectos" />
<asp:LinkButton runat="server" ID="LnkProyectado" OnClick="LnkProyectado_Click" Text="Cargar Proyecciones" />
</li>
</asp:Content>
@@ -200,8 +200,8 @@
<asp:Label runat="server" ID="LblProyectado" Text="Incluir Proyectados" class="col-md-1 truncate" />
<div class="col-md-2">
<asp:DropDownList ID="DdlProyeccionFiltro" runat="server" CssClass="select2me" Width="100%" >
<asp:ListItem Text="Si" Value="1" Selected="True" />
<asp:ListItem Text="No" Value="2" />
<asp:ListItem Text="Si" Value="1" />
<asp:ListItem Text="No" Value="0" Selected="True" />
</asp:DropDownList>
</div>
</asp:Panel>

View File

@@ -344,7 +344,7 @@ Partial Class Inventarios_KardexAlmacen
End Sub
Protected Sub LnkProyectos_Click(sender As Object, e As EventArgs)
Protected Sub LnkProyectado_Click(sender As Object, e As EventArgs)
RegistraScript(String.Format("$('#{0}').modal();", "DivProyeccion"))
End Sub

View File

@@ -111,6 +111,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
int CvePeriodo;
decimal ImporteGravado = 0;
decimal ImporteExento = 0;
decimal ImporteValor = 0;
//string NombrePersonal = "";
int CveMetodoPago = 0;
int CveNomina = 0;
@@ -167,6 +168,8 @@ public partial class Nomina_Aguinaldo : ClsPaginas
Importe = row["Aguinaldo"].ToString().ToDecimal();
ImporteGravado = row["AguinaldoGravado"].ToString().ToDecimal();
ImporteExento = Importe - ImporteGravado;
ImporteValor = row["DiasLaborados"].ToString().ToDecimal();
if (CvePersonal > 0 && Importe>0 && row["CveNomina"].ToString().ToEntero()==0)
{
@@ -196,7 +199,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
if (CveNomina > 0)
{
if (!objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento, UsuarioActual.CveUsuario))
if (!objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento, ImporteValor, UsuarioActual.CveUsuario))
{
continuar = false;
}

View File

@@ -1002,9 +1002,9 @@ Partial Class RH_Personal
Private Sub CargaTiposContrato()
Dim dt As DataTable = GlobalDTTiposContrato
dt.Columns.Add("txtoddl", GetType(String), "CodigoTipoContrato + ' ' + TipoContrato")
DdlTipoContrato.DataSource = dt
DdlTipoContrato.DataBind()
'dt.Columns.Add("txtoddl", GetType(String), "CodigoTipoContrato + ' ' + TipoContrato")
'DdlTipoContrato.DataSource = dt
'DdlTipoContrato.DataBind()
End Sub
Private Sub CargaTurno()

View File

@@ -840,6 +840,38 @@
</div>
</div>
</div>
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Entregas solo a:</span>
</div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton runat="server" ID="BtnAgregarClientePersonalEntrega" data-toggle="tooltip" data-placement="right" title="Agregar dirección de envio." CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar"></asp:LinkButton>
</div>
</div>
</div>
<div class="portlet-body form">
<asp:UpdatePanel runat="server" ID="UpClentesPersonalEntrega" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvClentesPersonalEntrega" runat="server" Width="100%" GridLines="None" DataKeyNames="CvePersonalEntrega,PersonalEntrega,Nombre,CveUsuario,Usuario,FechaIng,Estatus,Estado"
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de direcciones de envio">
<Columns>
<asp:BoundField HeaderText="Personal" DataField="PersonalEntrega" ItemStyle-Width="80%"/>
<asp:BoundField HeaderText="Estatus" DataField="Estado" ItemStyle-Width="10%"/>
<asp:TemplateField HeaderText="Acciones" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%">
<ItemTemplate>
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="EditClientesPersonalEntrega_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="DeleteClientesPersonalEntrega_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
@@ -6185,6 +6217,45 @@
</div>
</div>
<%-- FIN MODAL MODIFICAR PRECIOS PS --%>
<%--MODAL PARA AGREGAR Cliente Personal Entrega--%>
<div id="DivModalClientePersonalEntrega" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<asp:UpdatePanel ID="UpClientePersonalEntrega" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="H3" runat="server">Cliente Personal Entrega</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox runat="server" ID="TxtPersonalEntrega" CssClass="form-control" MaxLength="70" CausesValidation="true" />
<label for="TxtPersonalEntrega">Personal Entrega:</label>
</div>
<%--<div class="form-group form-md-line-input input-iconright">
<label for="DdlUsuarioEntrega">Usuario:</label>
<asp:DropDownList runat="server" ID="DdlUsuarioEntrega" DataTextField="Usuario" DataValueField="CveUsuario" CssClass="select2me" Width="100%"/>
</div>--%>
<div class="form-group form-md-line-input input-iconright">
<label for="ChkPersonalEntrega">Estatus:</label>
<asp:CheckBox runat="server" ID="ChkPersonalEntrega" CssClass="make-switchsd" data-size="small" Text=" " />
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:LinkButton ID="LnkClientePersonalEntrega" runat="server" CssClass="btn btn-success" Text="Agregar" OnClick="LnkClientePersonalEntrega_Click"></asp:LinkButton>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<%--FIN MODAL CLIENTE PERSONAL ENTREGA--%>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">

View File

@@ -48,6 +48,15 @@ Partial Class Clientes
End Set
End Property
Private Property CveClientePersonalEntrega As Integer
Get
Return ViewState("CveClientePersonalEntrega").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveClientePersonalEntrega") = value
End Set
End Property
Private Property Modalidad As String
Get
Return ViewState("Modalidad").ToString
@@ -1743,6 +1752,8 @@ Partial Class Clientes
TxtCorreoEntregaCompras.Text = ObjClientes.DtResultados(0)("CorreoEntregaCompras").ToString
TxtCorreoEntregaAlmacen.Text = ObjClientes.DtResultados(0)("CorreoEntregaAlmacen").ToString
CargarClientePersonalEntrega()
Else
Existe = False
Alert("El Cliente Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
@@ -10216,5 +10227,60 @@ Partial Class Clientes
UpDatos.Update()
End Sub
Private Sub CargarClientePersonalEntrega()
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetClientesPersonalEntrega(-1, CveCliente, UsuarioActual.CveEmpresa, -1) Then
GvClentesPersonalEntrega.DataSource = ObjVentas.DtResultados
GvClentesPersonalEntrega.DataBind()
End If
ObjVentas.Dispose()
End Sub
Protected Sub BtnAgregarClientePersonalEntrega_Click(sender As Object, e As EventArgs) Handles BtnAgregarClientePersonalEntrega.Click
TxtPersonalEntrega.Text = ""
ChkPersonalEntrega.Checked = True
LnkClientePersonalEntrega.Text = "Agregar"
UpClientePersonalEntrega.Update()
RegistraScript("$('#DivModalClientePersonalEntrega').modal('show');")
End Sub
Protected Sub LnkClientePersonalEntrega_Click(sender As Object, e As EventArgs)
Dim ObjVentas As New ClsVentas()
If LnkClientePersonalEntrega.Text = "Agregar" Then
If ObjVentas.AddClientesPersonalEntrega(TxtPersonalEntrega.Text, CveCliente, UsuarioActual.CveUsuario, ChkPersonalEntrega.Checked) Then
Alert("Usuario para entregar agregado correctamente")
End If
Else
If ObjVentas.UpdateClientesPersonalEntrega(CveClientePersonalEntrega, TxtPersonalEntrega.Text, UsuarioActual.CveUsuario, ChkPersonalEntrega.Checked) Then
Alert("Usuario para entregar actualizado correctamente")
End If
End If
ObjVentas.Dispose()
RegistraScript("$('#DivModalClientePersonalEntrega').modal('hide');")
CargarClientePersonalEntrega()
UpClentesPersonalEntrega.Update()
End Sub
Protected Sub EditClientesPersonalEntrega_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
CveClientePersonalEntrega = GvRow.DataKey("CvePersonalEntrega").ToEntero
TxtPersonalEntrega.Text = GvRow.DataKey("PersonalEntrega")
ChkPersonalEntrega.Checked = GvRow.DataKey("Estatus") = "True"
LnkClientePersonalEntrega.Text = "Actualizar"
UpClientePersonalEntrega.Update()
RegistraScript("$('#DivModalClientePersonalEntrega').modal('show');")
End Sub
Protected Sub DeleteClientesPersonalEntrega_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
Dim ObjVentas As New ClsVentas()
If ObjVentas.RemoveClientesPersonalEntrega(GvRow.DataKey("CvePersonalEntrega").ToEntero) Then
Alert("Usuario para entregar eliminado correctamente")
End If
ObjVentas.Dispose()
CargarClientePersonalEntrega()
UpClentesPersonalEntrega.Update()
End Sub
End Class

View File

@@ -355,7 +355,7 @@ Partial Class Ventas_ClientesAbonar
Private Sub CargaCuentas()
DdlCuenta.Items.Clear()
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa, CveTipoCuenta:=2)
If ChkPagarPesos.Checked Then
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
@@ -1730,9 +1730,14 @@ Partial Class Ventas_ClientesAbonar
ErrorAC = True
End If
ErrorAC = Not ObjConta.AjustaPoliza(IDPoliza)
If Not ErrorAC Then
ErrorAC = Not ObjConta.AjustaPoliza(IDPoliza)
End If
If Not ErrorAC Then
ErrorAC = Not ObjIE.UpdateIEPrePoliza(Fecha, FolioPoliza.ToString, IDPoliza, CvePrePoliza, CveIE, 0)
End If
ErrorAC = Not ObjIE.UpdateIEPrePoliza(Fecha, FolioPoliza.ToString, IDPoliza, CvePrePoliza, CveIE, 0)
End If
End If

View File

@@ -849,6 +849,14 @@
</div>
</div>
<div class="row" style="margin-top: 5px;">
<label class="col-md-6 truncate">Aplica Sección</label>
<div class="col-md-6">
<asp:CheckBox ID="ChkSeccion" CssClass="chksino" data-size="small" runat="server" AutoPostBack="true" OnCheckedChanged="ChkSeccion_CheckedChanged" Text=" " />
</div>
</div>
<div class="row" style="margin-top: 5px;">
<label class="col-md-6 truncate">Aplica Lote</label>
<div class="col-md-6">
@@ -861,16 +869,16 @@
<label class="col-md-6 truncate">Aplica Caducidad</label>
<div class="col-md-6">
<asp:CheckBox ID="ChkCaducidad" CssClass="chksino" data-size="small" runat="server" Text=" " />
<asp:CheckBox ID="ChkCaducidad" CssClass="chksino" data-size="small" runat="server" Text=" " OnCheckedChanged="ChkCaducidad_CheckedChanged" AutoPostBack="true"/>
</div>
</div>
<div class="row" style="margin-top: 5px;">
<label class="col-md-6 truncate">Aplica Sección</label>
<div class="row" style="margin-top: 5px;" runat="server" id="DivTiempoCaducidad" visible="false">
<label class="col-md-6 truncate">Tiempo de Caducidad</label>
<div class="col-md-6">
<asp:CheckBox ID="ChkSeccion" CssClass="chksino" data-size="small" runat="server" AutoPostBack="true" OnCheckedChanged="ChkSeccion_CheckedChanged" Text=" " />
<asp:TextBox runat="server" ID="TxtTiempoCaducidad"/><label>Días</label>
<asp:RegularExpressionValidator ID="RfvTxtTiempoCaducidad" runat="server" ControlToValidate="TxtTiempoCaducidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tiempo Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar" ValidationExpression="\d{1,}" Display="None"></asp:RegularExpressionValidator>
<ajax:ValidatorCalloutExtender ID="VceTxtTiempoCaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtTiempoCaducidad" Width="300px" ></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row" style="margin-top: 5px;" id="DivProveedorCompra" runat="server" visible="false">

View File

@@ -1190,6 +1190,16 @@ Partial Class ProductosyServicios
Dim CveMarca As Integer = 0
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) And CvePS = -1 Then CveMarca = DdlMarcaPSDes.SelectedValue.ToEntero Else CveMarca = DdlMarca.SelectedValue.ToEntero
Dim TiempoCaducidad As Integer = -1
If ChkCaducidad.Checked Then
If TxtTiempoCaducidad.Text.Length > 0 AndAlso IsNumeric(TxtTiempoCaducidad.Text) Then
TiempoCaducidad = TxtTiempoCaducidad.Text.ToEntero()
Else
Alert("Falta indicar el tiempo de caducidad", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
If CvePS = -1 Then
Dim PSS As String = TxtPS.Text.Trim.Replace("|", "")
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper
@@ -1204,7 +1214,7 @@ Partial Class ProductosyServicios
CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero, CveTamaño:=DdlTamanio.SelectedValue.ToEntero,
CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(),
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked) > 0 Then
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TiempoCaducidad) > 0 Then
ViewState("CvePS") = ObjProductosServicios.CvePS
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
If GVR.FCCheckBox("ChkDeduccion").Checked Then
@@ -1250,7 +1260,7 @@ Partial Class ProductosyServicios
CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(),
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked,
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked) Then
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad) Then
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
TieneError = True
@@ -1411,7 +1421,7 @@ Partial Class ProductosyServicios
Dim ObjAliasDelete As New ClsProductosServicios
Dim TieneError = False
If ObjAliasDelete.RemovePSAlias(GVAlias.Rows(e.RowIndex).DataKey("CvePS").ToString.ToEntero, GVAlias.Rows(e.RowIndex).DataKey("PSAlias").ToString) Then
If ObjAliasDelete.RemovePSAlias(GVAlias.Rows(e.RowIndex).DataKey("CvePS").ToString.ToEntero, GVAlias.Rows(e.RowIndex).DataKey("PSAlias").ToString, -1) Then
GVAlias.EditIndex = -1
CargarAlias()
UPGVAlias.Update()
@@ -2731,4 +2741,10 @@ Partial Class ProductosyServicios
End If
Return Existencia > 0
End Function
Protected Sub ChkCaducidad_CheckedChanged(sender As Object, e As EventArgs)
Dim Activar As Boolean = ChkCaducidad.Checked
DivTiempoCaducidad.Visible = Activar
RfvTxtTiempoCaducidad.Enabled = Activar
End Sub
End Class