This commit is contained in:
2021-01-13 15:23:32 -07:00
15 changed files with 627 additions and 206 deletions

View File

@@ -431,7 +431,8 @@ Public Class ClsCRM
Return Retorno Return Retorno
End Function End Function
Public Function AddEmpresaCRM(NombreEmpresa As String, RFC As String, CveMedioCaptacion As Integer, CveEmpresa As Integer, CveUsuarioIng As Integer, CveEncuestaAplicada As Integer, CveVendedor As Integer, Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1") As Integer Public Function AddEmpresaCRM(NombreEmpresa As String, RFC As String, CveMedioCaptacion As Integer, CveEmpresa As Integer, CveUsuarioIng As Integer, CveEncuestaAplicada As Integer, CveVendedor As Integer,
Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional CveGiroClasificacion As Integer = -1) As Integer
Dim CveEmpresaCRM As Integer = -1 Dim CveEmpresaCRM As Integer = -1
DataAdapter("PA_CRM_EmpresaAdd") DataAdapter("PA_CRM_EmpresaAdd")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -444,6 +445,7 @@ Public Class ClsCRM
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@Correo", SqlDbType.VarChar).Value = Correo .Add("@Correo", SqlDbType.VarChar).Value = Correo
.Add("@CveGiroClasificacion", SqlDbType.Int).Value = CveGiroClasificacion
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With End With
@@ -456,7 +458,8 @@ Public Class ClsCRM
Return CveEmpresaCRM Return CveEmpresaCRM
End Function End Function
Public Function UpdateEmpresCRM(NombreEmpresa As String, RFC As String, CveMedioCaptacion As Integer, CveEmpresaCRM As Integer, CveVendedor As Integer, CveUsuarioMod As Integer, Optional CveCliente As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1") As Boolean Public Function UpdateEmpresCRM(NombreEmpresa As String, RFC As String, CveMedioCaptacion As Integer, CveEmpresaCRM As Integer, CveVendedor As Integer, CveUsuarioMod As Integer,
Optional CveCliente As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional CveGiroClasificacion As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_CRM_EmpresaUpdate") DataAdapter("PA_CRM_EmpresaUpdate")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -469,6 +472,7 @@ Public Class ClsCRM
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@Correo", SqlDbType.VarChar).Value = Correo .Add("@Correo", SqlDbType.VarChar).Value = Correo
.Add("@CveGiroClasificaciones", SqlDbType.Int).Value = CveGiroClasificacion
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -651,7 +655,8 @@ Public Class ClsCRM
Public Function GetAcercamiento(CveEmpresa As Integer, Optional CveEmpresaCRM As Integer = -1, Optional CveAcercamiento As Integer = -1, Optional CveTipoProceso As Integer = -1, Public Function GetAcercamiento(CveEmpresa As Integer, Optional CveEmpresaCRM As Integer = -1, Optional CveAcercamiento As Integer = -1, Optional CveTipoProceso As Integer = -1,
Optional CveVendedor As Integer = -1, Optional FechaInicio As String = "-1", Optional FechaFin As String = "-1", Optional NombreAcercamiento As String = "-1", Optional CveVendedor As Integer = -1, Optional FechaInicio As String = "-1", Optional FechaFin As String = "-1", Optional NombreAcercamiento As String = "-1",
Optional CveMedioCaptacion As Integer = -1, Optional CveRechazoMotivo As Integer = -1, Optional CveProbabilidad As Integer = -1, Optional CveMedioCaptacion As Integer = -1, Optional CveRechazoMotivo As Integer = -1, Optional CveProbabilidad As Integer = -1,
Optional FechaApertura As String = "-1", Optional FechaCierre As String = "-1", Optional TopSelect As Integer = 10000) As Boolean Optional FechaApertura As String = "-1", Optional FechaCierre As String = "-1", Optional TopSelect As Integer = 10000, Optional CvePS As Integer = -1,
Optional CveGiroClasificacion As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_CRM_AcercamientoGet") DataAdapter("PA_CRM_AcercamientoGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -675,6 +680,9 @@ Public Class ClsCRM
.Add("@FechaCierre", SqlDbType.VarChar).Value = FechaCierre .Add("@FechaCierre", SqlDbType.VarChar).Value = FechaCierre
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect .Add("@TopSelect", SqlDbType.Int).Value = TopSelect
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveGiroClasificacion", SqlDbType.Int).Value = CveGiroClasificacion
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -688,7 +696,7 @@ Public Class ClsCRM
Public Function AddAcercamiento(CveEmpresaCRM As Integer, CveContactoPrincipal As Integer, CveTipoProceso As Integer, CveEtapaProcesoActual As Integer, CveVendedor As Integer, CveMedioCaptacion As Integer, Public Function AddAcercamiento(CveEmpresaCRM As Integer, CveContactoPrincipal As Integer, CveTipoProceso As Integer, CveEtapaProcesoActual As Integer, CveVendedor As Integer, CveMedioCaptacion As Integer,
CveRechazoMotivo As Integer, CveProbabilidadAcercamiento As Integer, FechaApertura As DateTime, NombreAcercamiento As String, Descripcion As String, Importe As Double, Comision As Double, CveRechazoMotivo As Integer, CveProbabilidadAcercamiento As Integer, FechaApertura As DateTime, NombreAcercamiento As String, Descripcion As String, Importe As Double, Comision As Double,
Prioridad As Integer, CveEmpresa As Integer, CveUsuarioIng As Integer, Prioridad As Integer, CveEmpresa As Integer, CveUsuarioIng As Integer,
Optional FechaCierre As Nullable(Of DateTime) = Nothing) As Integer Optional FechaCierre As Nullable(Of DateTime) = Nothing, Optional CvePS As Integer = -1) As Integer
Dim _CveAcercamiento As Integer = -1 Dim _CveAcercamiento As Integer = -1
DataAdapter("PA_CRM_AcercamientoAdd") DataAdapter("PA_CRM_AcercamientoAdd")
@@ -714,6 +722,7 @@ Public Class ClsCRM
.Add("@Prioridad", SqlDbType.Int).Value = Prioridad .Add("@Prioridad", SqlDbType.Int).Value = Prioridad
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuarioIng", SqlDbType.Int).Value = CveUsuarioIng .Add("@CveUsuarioIng", SqlDbType.Int).Value = CveUsuarioIng
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With End With
@@ -729,7 +738,7 @@ Public Class ClsCRM
Public Function UpdateAcercamiento(CveAcercamiento As Integer, CveContactoPrincipal As Integer, CveTipoProceso As Integer, CveEtapaProcesoActual As Integer, CveVendedor As Integer, CveMedioCaptacion As Integer, Public Function UpdateAcercamiento(CveAcercamiento As Integer, CveContactoPrincipal As Integer, CveTipoProceso As Integer, CveEtapaProcesoActual As Integer, CveVendedor As Integer, CveMedioCaptacion As Integer,
CveProbabilidadAcercamiento As Integer, NombreAcercamiento As String, Descripcion As String, Importe As Double, Comision As Double, CveProbabilidadAcercamiento As Integer, NombreAcercamiento As String, Descripcion As String, Importe As Double, Comision As Double,
Prioridad As Integer, CveUsuarioMod As Integer, Optional CveRechazoMotivo As Integer = -1, Optional CveEncuestaAplicadaProceso As Integer = -1, Prioridad As Integer, CveUsuarioMod As Integer, Optional CveRechazoMotivo As Integer = -1, Optional CveEncuestaAplicadaProceso As Integer = -1,
Optional FechaApertura As Nullable(Of DateTime) = Nothing, Optional FechaCierre As Nullable(Of DateTime) = Nothing) As Boolean Optional FechaApertura As Nullable(Of DateTime) = Nothing, Optional FechaCierre As Nullable(Of DateTime) = Nothing, Optional CvePS As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_CRM_AcercamientoUpdate") DataAdapter("PA_CRM_AcercamientoUpdate")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -755,6 +764,7 @@ Public Class ClsCRM
.Add("@CveRechazoMotivo", SqlDbType.Int).Value = CveRechazoMotivo .Add("@CveRechazoMotivo", SqlDbType.Int).Value = CveRechazoMotivo
.Add("@FechaApertura", SqlDbType.DateTime).Value = IIf(FechaApertura Is Nothing, SqlTypes.SqlDateTime.Null, FechaApertura) .Add("@FechaApertura", SqlDbType.DateTime).Value = IIf(FechaApertura Is Nothing, SqlTypes.SqlDateTime.Null, FechaApertura)
.Add("@FechaCierre", SqlDbType.DateTime).Value = IIf(FechaCierre Is Nothing, SqlTypes.SqlDateTime.Null, FechaCierre) .Add("@FechaCierre", SqlDbType.DateTime).Value = IIf(FechaCierre Is Nothing, SqlTypes.SqlDateTime.Null, FechaCierre)
.Add("@CvePS", SqlDbType.Int).Value = CvePS
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -1832,7 +1832,7 @@ Partial Class Bancos_ProveedoresAbonar
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) 'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion) Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioCompraValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * TipoCambioPago) 'Añadimos la diferencia de perdida en la venta Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioCompraValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * TipoCambioPago) 'Añadimos la diferencia de perdida en la venta

View File

@@ -405,12 +405,15 @@
</div> </div>
<%-- style="padding-bottom: 17px;" --%> <%-- style="padding-bottom: 17px;" --%>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDescripcion" CssClass="form-control MultiLineTextBox" onkeyDown="checkTextAreaMaxLength(this,event,'200');" TextMode="MultiLine" Rows="3" CausesValidation="true" runat="server" MaxLength="200"></asp:TextBox> <asp:TextBox ID="TxtDescripcion" CssClass="form-control MultiLineTextBox" onkeyDown="checkTextAreaMaxLength(this,event,'200');" TextMode="MultiLine" Rows="2" CausesValidation="true" runat="server" MaxLength="200"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%> <%--<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%>
<label style="height: 83px;" for="<%= TxtDescripcion.ClientID.ToString()%>">Descripción del Proyecto:</label> <label style="height: 83px;" for="<%= TxtDescripcion.ClientID.ToString()%>">Descripción del Proyecto:</label>
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright">
<label style="color:#888888" for="<%= DdlPS.ClientID.ToString()%>">Producto Servicio:</label>
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:100%" CssClassDdl="form-control select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -234,6 +234,18 @@ public partial class CRM_Acercamiento : ClsPaginas
ViewState["CveAcercamientoGasto"] = value; ViewState["CveAcercamientoGasto"] = value;
} }
} }
private int CvePS
{
get
{
return ViewState["CvePS"] == null ? -1 : ViewState["CvePS"].ToString().ToEntero();
}
set
{
ViewState["CvePS"] = value;
}
}
#endregion #endregion
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
@@ -269,6 +281,7 @@ public partial class CRM_Acercamiento : ClsPaginas
} }
} }
} }
CargarPS();
} }
} }
@@ -322,6 +335,8 @@ public partial class CRM_Acercamiento : ClsPaginas
CveEncuestaAplicadaProceso = (ObjCRM.DtResultados.FiltroPrimeroValor("CveEncuestaAplicadaProceso").ToEntero() > 0) ? ObjCRM.DtResultados.FiltroPrimeroValor("CveEncuestaAplicadaProceso").ToEntero() : -1; CveEncuestaAplicadaProceso = (ObjCRM.DtResultados.FiltroPrimeroValor("CveEncuestaAplicadaProceso").ToEntero() > 0) ? ObjCRM.DtResultados.FiltroPrimeroValor("CveEncuestaAplicadaProceso").ToEntero() : -1;
//CveEtapaBitacoraSeleccionada = CveEtapaActual; //CveEtapaBitacoraSeleccionada = CveEtapaActual;
CvePS = ObjCRM.DtResultados.FiltroPrimeroValor("CvePS").ToEntero();
HdfEtapaSeleccionada.Value = CveEtapaActual.ToString(); HdfEtapaSeleccionada.Value = CveEtapaActual.ToString();
//INHABILITAMOS CAMPOS QUE NO SE PUEDEN EDITAR //INHABILITAMOS CAMPOS QUE NO SE PUEDEN EDITAR
DdlEmpresaCRM.Enabled = false; DdlEmpresaCRM.Enabled = false;
@@ -556,6 +571,17 @@ public partial class CRM_Acercamiento : ClsPaginas
if (DTEtapasProceso.FiltroPrimeroValor("CveTipoEtapa", String.Format("CveEtapaProceso = {0}", DdlEtapaProceso.SelectedValue.ToEntero())).Contiene("1", "2", "3")) if (DTEtapasProceso.FiltroPrimeroValor("CveTipoEtapa", String.Format("CveEtapaProceso = {0}", DdlEtapaProceso.SelectedValue.ToEntero())).Contiene("1", "2", "3"))
GuardarCambioEtapa(); GuardarCambioEtapa();
} }
private void CargarPS()
{
DdlPS.setEsWebService(true);
if(CvePS > 0)
{
string productoAsignado = get_GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS: CvePS).FiltroPrimeroValor("PSCodigo");
DdlPS.SelectedValue = CvePS.ToString();
DdlPS.SelectedText = productoAsignado;
}
}
#endregion #endregion
#region "GUARDAR" #region "GUARDAR"
@@ -605,7 +631,7 @@ public partial class CRM_Acercamiento : ClsPaginas
} }
if ((CveEncuestaAplicadaProceso != 0) && ObjCRM.UpdateAcercamiento(CveAcercamiento, CveContactoPrincipal, CveTipoProceso, CveEtapaProcesoActualActualizar, CveVendedor, CveMedioCaptacion, CveProbabilidadAcercamiento, if ((CveEncuestaAplicadaProceso != 0) && ObjCRM.UpdateAcercamiento(CveAcercamiento, CveContactoPrincipal, CveTipoProceso, CveEtapaProcesoActualActualizar, CveVendedor, CveMedioCaptacion, CveProbabilidadAcercamiento,
NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveUsuario, CveEncuestaAplicadaProceso: CveEncuestaAplicadaProceso, FechaApertura: FechaApertura, FechaCierre: FechaCierre)) NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveUsuario, CveEncuestaAplicadaProceso: CveEncuestaAplicadaProceso, FechaApertura: FechaApertura, FechaCierre: FechaCierre, CvePS:DdlPS.SelectedValue.ToEntero()))
{ {
//String MensajeBitacora = (CveEtapaProcesoActualActualizar != CveEtapaActual) ? String.Format("Se actualizó la etapa del acercamiento a {0}.", DTEtapasProceso.FiltroPrimeroValor("EtapaProceso", "CveEtapaProceso = " + CveEtapaProcesoActualActualizar)) : String.Format("Se actualizó el Acercamiento {0} con Vendedor {2} y Contacto Principal {3}.", NombreAcercamiento, DdlTipoProceso.SelectedItem, DdlVendedor.SelectedItem, DdlContactoPrincipal.SelectedValue == "-1" ? "aun no asignado" : DdlContactoPrincipal.SelectedItem.Text); //String MensajeBitacora = (CveEtapaProcesoActualActualizar != CveEtapaActual) ? String.Format("Se actualizó la etapa del acercamiento a {0}.", DTEtapasProceso.FiltroPrimeroValor("EtapaProceso", "CveEtapaProceso = " + CveEtapaProcesoActualActualizar)) : String.Format("Se actualizó el Acercamiento {0} con Vendedor {2} y Contacto Principal {3}.", NombreAcercamiento, DdlTipoProceso.SelectedItem, DdlVendedor.SelectedItem, DdlContactoPrincipal.SelectedValue == "-1" ? "aun no asignado" : DdlContactoPrincipal.SelectedItem.Text);
@@ -671,7 +697,7 @@ public partial class CRM_Acercamiento : ClsPaginas
int CveUsuarioIng = UsuarioActual.CveUsuario; int CveUsuarioIng = UsuarioActual.CveUsuario;
if (ObjCRM.UpdateAcercamiento(CveAcercamiento, CveContactoPrincipal, CveTipoProceso, CveEtapaProcesoActualActualizar, CveVendedor, CveMedioCaptacion, CveProbabilidadAcercamiento, if (ObjCRM.UpdateAcercamiento(CveAcercamiento, CveContactoPrincipal, CveTipoProceso, CveEtapaProcesoActualActualizar, CveVendedor, CveMedioCaptacion, CveProbabilidadAcercamiento,
NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveUsuario, CveEncuestaAplicadaProceso: CveEncuestaAplicadaProceso, FechaApertura: FechaApertura, FechaCierre: FechaCierre)) NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveUsuario, CveEncuestaAplicadaProceso: CveEncuestaAplicadaProceso, FechaApertura: FechaApertura, FechaCierre: FechaCierre, CvePS: DdlPS.SelectedValue.ToEntero()))
{ {
CveEtapaActual = CveEtapaProcesoActualActualizar; CveEtapaActual = CveEtapaProcesoActualActualizar;
HdfEtapaSeleccionada.Value = CveEtapaProcesoActualActualizar.ToString(); HdfEtapaSeleccionada.Value = CveEtapaProcesoActualActualizar.ToString();

View File

@@ -109,6 +109,11 @@
<asp:RequiredFieldValidator ID="RFVSubProyecto" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlSucursales" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sucursal''</b> es necesario." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVSubProyecto" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlSucursales" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sucursal''</b> es necesario." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
</div> </div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlGiroClasificacion" Width="50%" runat="server" DataValueField="CveClienteClasificacion" DataTextField="ClienteClasificacion" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
<label for="<%=DdlGiroClasificacion.ClientID.ToString()%>">Giro:</label>
</div>
<%-- DATOS DINAMICOS - TABLA ENCUESTA --%> <%-- DATOS DINAMICOS - TABLA ENCUESTA --%>
<asp:UpdatePanel ID="UpDatosTecnicos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatosTecnicos" runat="server" UpdateMode="Conditional">
@@ -676,6 +681,12 @@
</div> </div>
</div> </div>
<div class="row">
<div class="form-group col-md-6 form-md-line-input input-iconright">
<label style="color:#888888" for="<%= DdlPS.ClientID.ToString()%>">Producto Servicio:</label>
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:100%" CssClassDdl="form-control select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
</div>
</div>
</div> </div>

View File

@@ -217,6 +217,19 @@ public partial class CRM_EmpresaCRM : ClsPaginas
ViewState["DtProbabilidadAcercamiento"] = value; ViewState["DtProbabilidadAcercamiento"] = value;
} }
} }
private int CveGiroClasificacion
{
get
{
return ViewState["CveGiroClasificacion"].ToString().ToEntero();
}
set
{
ViewState["CveGiroClasificacion"] = value;
}
}
#endregion #endregion
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
@@ -237,6 +250,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas
CargaDatosTecnicos(); CargaDatosTecnicos();
} }
VerificaPermisos(); VerificaPermisos();
CargaClasificaciones();
DdlPS.setEsWebService(true);
} }
} }
@@ -274,7 +289,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
{ {
string Mensaje = ""; string Mensaje = "";
//DATOS GENERALES //DATOS GENERALES
CveEmpresaCRM = ObjCRM.AddEmpresaCRM(NombreEmpresa, RFC, CveMedioCaptacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CveEncuestaAplicada, CveVendedorActualizar, CveSubProyecto, Correo); CveEmpresaCRM = ObjCRM.AddEmpresaCRM(NombreEmpresa, RFC, CveMedioCaptacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CveEncuestaAplicada, CveVendedorActualizar, CveSubProyecto, Correo, DdlGiroClasificacion.SelectedValue.ToEntero());
if (CveEmpresaCRM > 0) if (CveEmpresaCRM > 0)
{ {
@@ -321,7 +336,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
CveEncuestaAplicada = GuardaDatosTecnicos(ObjDatosTecnicos, CveEncuestaAplicada); CveEncuestaAplicada = GuardaDatosTecnicos(ObjDatosTecnicos, CveEncuestaAplicada);
} }
if ((CveEncuestaAplicada != 0) && ObjCRM.UpdateEmpresCRM(NombreEmpresa, RFC, CveMedioCaptacion, CveEmpresaCRM, CveVendedorActualizar, UsuarioActual.CveUsuario, CveSubProyecto: CveSubProyecto, Correo: Correo)) if ((CveEncuestaAplicada != 0) && ObjCRM.UpdateEmpresCRM(NombreEmpresa, RFC, CveMedioCaptacion, CveEmpresaCRM, CveVendedorActualizar, UsuarioActual.CveUsuario, CveSubProyecto: CveSubProyecto, Correo: Correo,CveGiroClasificacion:DdlGiroClasificacion.SelectedValue.ToEntero()))
{ {
if (!ObjBitacora.AddEventoBitacora(String.Format("Se actualizó la empresa {0} con RFC {1}", NombreEmpresa, RFC), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM)) if (!ObjBitacora.AddEventoBitacora(String.Format("Se actualizó la empresa {0} con RFC {1}", NombreEmpresa, RFC), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM))
{ {
@@ -628,6 +643,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
CveVendedor = ObjCRM.DtResultados.FiltroPrimeroValor("CveVendedorAsignado").ToEntero(); CveVendedor = ObjCRM.DtResultados.FiltroPrimeroValor("CveVendedorAsignado").ToEntero();
CveSubProyecto = ObjCRM.DtResultados.FiltroPrimeroValor("CveSubProyecto").ToEntero(); CveSubProyecto = ObjCRM.DtResultados.FiltroPrimeroValor("CveSubProyecto").ToEntero();
CveCliente = ObjCRM.DtResultados.FiltroPrimeroValor("CveCliente").ToEntero(); CveCliente = ObjCRM.DtResultados.FiltroPrimeroValor("CveCliente").ToEntero();
CveGiroClasificacion = ObjCRM.DtResultados.FiltroPrimeroValor("CveGiroClasificacion").ToEntero();
if (!(CveCliente > 0)) if (!(CveCliente > 0))
{ {
@@ -652,6 +668,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas
BtnEliminarEmpresa.Enabled = false; BtnEliminarEmpresa.Enabled = false;
DivBitacora.Visible = false; DivBitacora.Visible = false;
CveGiroClasificacion = -1;
} }
ObjCRM.Dispose(); ObjCRM.Dispose();
@@ -665,6 +683,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
else else
{ {
CreaTempDTContactos(); CreaTempDTContactos();
CveGiroClasificacion = -1;
} }
DdlVendedorAsignado.SelectedValueExist(CveVendedor); DdlVendedorAsignado.SelectedValueExist(CveVendedor);
@@ -1429,7 +1448,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
if (ObjCRM.DtResultados.Rows.Count > 0) if (ObjCRM.DtResultados.Rows.Count > 0)
{ {
CveAcercamiento = ObjCRM.AddAcercamiento(CveEmpresaCRM, CveContactoPrincipal, CveTipoProceso, CveEtapaProcesoActual, CveVendedor, CveMedioCaptacion, CveRechazoMotivo, CveProbabilidadAcercamiento, CveAcercamiento = ObjCRM.AddAcercamiento(CveEmpresaCRM, CveContactoPrincipal, CveTipoProceso, CveEtapaProcesoActual, CveVendedor, CveMedioCaptacion, CveRechazoMotivo, CveProbabilidadAcercamiento,
FechaApertura, NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveEmpresa, CveUsuarioIng); FechaApertura, NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveEmpresa, CveUsuarioIng, CvePS:DdlPS.SelectedValue.ToEntero());
}else }else
{ {
Alert("No tiene 'Etapa Proceso' con el 'Proceso' seleccionado al agregar el Acercamiento",ModExtensiones.TipoMensaje.MsgAdvertencia); Alert("No tiene 'Etapa Proceso' con el 'Proceso' seleccionado al agregar el Acercamiento",ModExtensiones.TipoMensaje.MsgAdvertencia);
@@ -1487,7 +1506,9 @@ public partial class CRM_EmpresaCRM : ClsPaginas
BtnEliminarEmpresa.Visible = false; BtnEliminarEmpresa.Visible = false;
if (!UsuarioActual.TienePermisoProceso(251)) if (!UsuarioActual.TienePermisoProceso(251))
{
LnkAgregarAcercamiento.Visible = false; LnkAgregarAcercamiento.Visible = false;
}
if ((UsuarioActual.CveVendedor != CveVendedor)) if ((UsuarioActual.CveVendedor != CveVendedor))
{ {
@@ -1545,4 +1566,13 @@ public partial class CRM_EmpresaCRM : ClsPaginas
CargaMetodosCaptacion(); CargaMetodosCaptacion();
UpDatos.Update(); UpDatos.Update();
} }
private void CargaClasificaciones()
{
DataTable dtGiroClasificaciones = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa);
DdlGiroClasificacion.DataSource = dtGiroClasificaciones;
DdlGiroClasificacion.DataBind();
DdlGiroClasificacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlGiroClasificacion.SelectedValueExist(CveGiroClasificacion);
}
} }

View File

@@ -20,7 +20,7 @@
<div class="portlet-title portlet-filterT smalltitle"> <div class="portlet-title portlet-filterT smalltitle">
<div class="tools"> <div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" ValidationGroup="Valida" /> <asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" ValidationGroup="Valida" />
<%--<a href="javascript:;" class="expand"></a>--%> <a href="javascript:;" class="expand"></a>
</div> </div>
<div class="titlefiltros caption"> <div class="titlefiltros caption">
@@ -54,13 +54,24 @@
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudF" TargetControlID="TxtFechaFin" PopupButtonID="imgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender runat="server" ID="CEFechaSolicitudF" TargetControlID="TxtFechaFin" PopupButtonID="imgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div> </div>
<label class="col-md-1" style="width: 30px; margin-top: 5px;">PS:</label>
<div class="col-md-2">
<div style="width:100%">
<ADS:Dropdownlost runat="server" Width="100%" ID="DdlPS" CssClassDdl="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<%-- <div class="portlet-body" style="display: none;"> <div class="portlet-body" style="display: none;">
<div class="row" style="margin-left: 10px; margin-top: 10px;"> <div class="row" style="margin-left: 10px; margin-top: 10px;">
<label class="col-md-1" style="width: 90px;"">Giro:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlGiroClasificacion" Width="100%" runat="server" DataValueField="CveClienteClasificacion" DataTextField="ClienteClasificacion" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
</div>
</div>
</div> </div>
</div>--%>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View File

@@ -5,6 +5,7 @@ using System.Web;
using System.Web.UI; using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using Extensiones; using Extensiones;
using System.Data;
public partial class CRM_RepAcercamientos : ClsPaginas public partial class CRM_RepAcercamientos : ClsPaginas
{ {
@@ -46,9 +47,9 @@ public partial class CRM_RepAcercamientos : ClsPaginas
{ {
string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text; string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text;
string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text; string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text;
int CvePS = DdlPS.SelectedValue.ToEntero() == 0 ? -1 : DdlPS.SelectedValue.ToEntero();
ClsCRM ObjCRM = new ClsCRM(); ClsCRM ObjCRM = new ClsCRM();
if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin)) if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin, CvePS: CvePS, CveGiroClasificacion:DdlGiroClasificacion.SelectedValue.ToEntero()))
{ {
GVDatos.DataSource = ObjCRM.DtResultados; GVDatos.DataSource = ObjCRM.DtResultados;
GVDatos.DataBind(); GVDatos.DataBind();
@@ -84,6 +85,12 @@ public partial class CRM_RepAcercamientos : ClsPaginas
//CALCULAMOS EL INTERVALO DE LA SEMANA ACTUAL //CALCULAMOS EL INTERVALO DE LA SEMANA ACTUAL
TxtFechaInicio.Text = DateTime.Now.AddDays(-((int)DateTime.Now.DayOfWeek) + 1).ToShortDateString(); TxtFechaInicio.Text = DateTime.Now.AddDays(-((int)DateTime.Now.DayOfWeek) + 1).ToShortDateString();
//TxtFechaFin.Text = DateTime.Now.AddDays((7 - (int)DateTime.Now.DayOfWeek)).ToShortDateString(); //TxtFechaFin.Text = DateTime.Now.AddDays((7 - (int)DateTime.Now.DayOfWeek)).ToShortDateString();
DdlPS.setEsWebService(true);
DataTable dtGiroClasificaciones = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa);
DdlGiroClasificacion.DataSource = dtGiroClasificaciones;
DdlGiroClasificacion.DataBind();
DdlGiroClasificacion.Items.Insert(0, new ListItem("Seleccione", "-1"));
} }
#endregion #endregion
} }

View File

@@ -434,6 +434,7 @@
<asp:HyperLink ID="HplImporte" CssClass="Texto thickbox" runat="server"></asp:HyperLink></td> <asp:HyperLink ID="HplImporte" CssClass="Texto thickbox" runat="server"></asp:HyperLink></td>
</div> </div>
</div> </div>
<div class="form-group proveedoreespes" id="trSaldo" runat="server" visible="False"> <div class="form-group proveedoreespes" id="trSaldo" runat="server" visible="False">
@@ -442,6 +443,7 @@
<asp:HyperLink ID="HplSaldoAuxiliar" CssClass="Texto thickbox" runat="server"></asp:HyperLink></td> <asp:HyperLink ID="HplSaldoAuxiliar" CssClass="Texto thickbox" runat="server"></asp:HyperLink></td>
</div> </div>
</div> </div>
<div class="form-group proveedoreespes" id="trContabilizada" runat="server" visible="true"> <div class="form-group proveedoreespes" id="trContabilizada" runat="server" visible="true">
@@ -623,10 +625,18 @@
<asp:HyperLink ID="HplAddClasificacion" data-toggle="tooltip" data-placement="top" NavigateUrl="/Ventas/CatClasificaciones.aspx" CssClass="btn btn-default btn-circle btn-xs " ToolTip="Agregar Clasificacion" runat="server"><i class="fa fa-plus" style="color:black" aria-hidden="true"></i></asp:HyperLink>&nbsp;&nbsp;&nbsp; <asp:HyperLink ID="HplAddClasificacion" data-toggle="tooltip" data-placement="top" NavigateUrl="/Ventas/CatClasificaciones.aspx" CssClass="btn btn-default btn-circle btn-xs " ToolTip="Agregar Clasificacion" runat="server"><i class="fa fa-plus" style="color:black" aria-hidden="true"></i></asp:HyperLink>&nbsp;&nbsp;&nbsp;
<span data-toggle="collapse" data-target="#DivReclasifica"> <span data-toggle="collapse" data-target="#DivReclasifica">
<div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Reclasificar productos"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div> <div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Reclasificar productos"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div>
<asp:LinkButton ID="ImgClasificacion" CssClass="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" ToolTip="Aplicar Clasificación a Productos" runat="server" Style="display: none;"><i class="fa fa-arrow-circle-down" style="color:green" aria-hidden="true"></i></asp:LinkButton> <asp:LinkButton ID="ImgClasificacion" CssClass="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" ToolTip="Aplicar Clasificación a Productos" runat="server" Style="display: none;"><i class="fa fa-arrow-circle-down" style="color:green" aria-hidden="true"></i></asp:LinkButton>
@@ -638,6 +648,8 @@
<asp:Label ID="LitHProyecto" runat="server" Text=""></asp:Label> <asp:Label ID="LitHProyecto" runat="server" Text=""></asp:Label>
<asp:Label runat="server" ID="LblSubProyectoHeader" Text=""></asp:Label>&nbsp; <asp:Label runat="server" ID="LblSubProyectoHeader" Text=""></asp:Label>&nbsp;
<asp:LinkButton ID="ImgActualizarProyecto" CssClass="btn btn-default btn-circle" data-toggle="tooltip" data-placement="top" ToolTip="Actualizar Cambios" runat="server" Visible="False"><i class="fa fa-arrow-circle-down" aria-hidden="true"></i></asp:LinkButton> <asp:LinkButton ID="ImgActualizarProyecto" CssClass="btn btn-default btn-circle" data-toggle="tooltip" data-placement="top" ToolTip="Actualizar Cambios" runat="server" Visible="False"><i class="fa fa-arrow-circle-down" aria-hidden="true"></i></asp:LinkButton>
<span data-toggle="collapse" data-target="#DivReclasifica"> <span data-toggle="collapse" data-target="#DivReclasifica">
<div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Cambiar sucursal"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div> <div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Cambiar sucursal"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div>
@@ -649,6 +661,10 @@
<span data-toggle="collapse" data-target="#DivReclasifica"> <span data-toggle="collapse" data-target="#DivReclasifica">
<div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Cambiar tipo de gasto"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div> <div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Cambiar tipo de gasto"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div>
</span> </span>
@@ -827,6 +843,7 @@
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
@@ -854,6 +871,7 @@
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Importe", "{0:N2}") %>'></asp:Literal>&nbsp; <asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Importe", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
@@ -862,6 +880,7 @@
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>&nbsp; <asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField Visible="False"> <asp:TemplateField Visible="False">
@@ -944,6 +963,10 @@
<asp:HyperLink ID="HLAplicaNCFact" NavigateUrl="#" Visible="false" data-toggle="modal" data-target="#FacturaNC" runat="server"><i title="Aplicar Notas de Credito" data-toggle="tooltip" class='fa fa-money font-green'></i></asp:HyperLink> <asp:HyperLink ID="HLAplicaNCFact" NavigateUrl="#" Visible="false" data-toggle="modal" data-target="#FacturaNC" runat="server"><i title="Aplicar Notas de Credito" data-toggle="tooltip" class='fa fa-money font-green'></i></asp:HyperLink>
</td> </td>
</tr> </tr>
@@ -1065,6 +1088,10 @@
<asp:TextBox ID="TxtTC" Text="" Width="50px" runat="server" /> <asp:TextBox ID="TxtTC" Text="" Width="50px" runat="server" />
</div> </div>
</ContentTemplate> </ContentTemplate>
@@ -1102,6 +1129,10 @@
<asp:CheckBox Text="" ID="ChkConsignacion" OnCheckedChanged="ChkConsignacion_CheckedChanged" AutoPostBack="true" Enabled="false" runat="server" /> <asp:CheckBox Text="" ID="ChkConsignacion" OnCheckedChanged="ChkConsignacion_CheckedChanged" AutoPostBack="true" Enabled="false" runat="server" />
</li> </li>
<br /> <br />
@@ -1115,6 +1146,10 @@
<asp:DropDownList runat="server" ID="DdlConsignacion" DataValueField="CveConsignacion" DataTextField="SerieFolioFecha" Width="180px"></asp:DropDownList> <asp:DropDownList runat="server" ID="DdlConsignacion" DataValueField="CveConsignacion" DataTextField="SerieFolioFecha" Width="180px"></asp:DropDownList>
</li> </li>
<%--<li>Folio Consignación: <%--<li>Folio Consignación:
@@ -1391,6 +1426,10 @@
<asp:TextBox ID="TxtTipoCambioOC" runat="server" align="right" MaxLength="12" Text="" Width="100px"></asp:TextBox> <asp:TextBox ID="TxtTipoCambioOC" runat="server" align="right" MaxLength="12" Text="" Width="100px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtTipoCambioOC" FilterType="Custom, Numbers" ValidChars="." /> <ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtTipoCambioOC" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RFVTipoCambioOC" runat="server" ControlToValidate="TxtTipoCambioOC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Cambio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTipoCambioOC"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTipoCambioOC" runat="server" ControlToValidate="TxtTipoCambioOC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Cambio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTipoCambioOC"></asp:RequiredFieldValidator>
@@ -1793,10 +1832,15 @@
<br /> <br />
Producto/Servicio Producto/Servicio
</HeaderTemplate> </HeaderTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="Producto/Servicio SAT" DataField="SATClaveProductoServicio" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Left" Visible="false" /> <asp:BoundField HeaderText="Producto/Servicio SAT" DataField="SATClaveProductoServicio" ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Left" Visible="false" />
@@ -2022,6 +2066,7 @@
<asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label> <asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
@@ -2115,6 +2160,7 @@
<asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label> <asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
@@ -2211,6 +2257,10 @@
<br /> <br />
<asp:DropDownList ID="DdlPersonalHeader" runat="server" AutoPostBack="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" AppendDataBoundItems="true" Width="100%" CssClass="form-control input-sm select2me"> <asp:DropDownList ID="DdlPersonalHeader" runat="server" AutoPostBack="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" AppendDataBoundItems="true" Width="100%" CssClass="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
@@ -2231,6 +2281,7 @@
<asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label> <asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
@@ -2397,6 +2448,8 @@
<tr id="TrRembolsoUpdate" runat="server" visible="False"> <tr id="TrRembolsoUpdate" runat="server" visible="False">
<td>Reembolso: <td>Reembolso:
<asp:RadioButtonList ID="RblRembolso" OnSelectedIndexChanged="RblRembolso_SelectedIndexChanged" RepeatDirection="Horizontal" runat="server" AutoPostBack="True"> <asp:RadioButtonList ID="RblRembolso" OnSelectedIndexChanged="RblRembolso_SelectedIndexChanged" RepeatDirection="Horizontal" runat="server" AutoPostBack="True">
<asp:ListItem Value="1">Personal/Empleado</asp:ListItem> <asp:ListItem Value="1">Personal/Empleado</asp:ListItem>
<asp:ListItem Value="2">Caja Chica</asp:ListItem> <asp:ListItem Value="2">Caja Chica</asp:ListItem>
@@ -2669,6 +2722,7 @@
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion")%>'></asp:Literal>&nbsp; <asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion")%>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField> <asp:TemplateField>
@@ -2803,6 +2857,7 @@
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp; <asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Mon" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Mon" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
@@ -2810,6 +2865,7 @@
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>&nbsp; <asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Amort." ItemStyle-HorizontalAlign="Right"> <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Amort." ItemStyle-HorizontalAlign="Right">
@@ -2879,7 +2935,6 @@
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<ItemTemplate> <ItemTemplate>
<%--<asp:CheckBox ID="cbInv" runat="server" Checked="false" />--%>
<asp:TextBox ID="TxtCantidadNCInv" CssClass="form-control" runat="server" /> <asp:TextBox ID="TxtCantidadNCInv" CssClass="form-control" runat="server" />
<ajax:FilteredTextBoxExtender ID="SoloNumerosFolio" runat="server" TargetControlID="TxtCantidadNCInv" FilterType="Numbers, custom" ValidChars="." /> <ajax:FilteredTextBoxExtender ID="SoloNumerosFolio" runat="server" TargetControlID="TxtCantidadNCInv" FilterType="Numbers, custom" ValidChars="." />
</ItemTemplate> </ItemTemplate>
@@ -2965,6 +3020,10 @@
<asp:Label ID="lbPS" runat="server" ClientIDMode="Static"></asp:Label> <asp:Label ID="lbPS" runat="server" ClientIDMode="Static"></asp:Label>
a otro Almacén </h4> a otro Almacén </h4>
</td> </td>
@@ -3027,7 +3086,7 @@
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br /> <asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' >Agendar</i>" Visible="false" Style="cursor: pointer;" ToolTip="Agendar"></asp:HyperLink><br /> <asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' >Agendar</i>" Visible="false" Style="cursor: pointer;" ToolTip="Agendar"></asp:HyperLink><br />
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal> <asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
<UserControl:TareaNueva runat="server" id="TareaNueva" /> <UserControl:TareaNueva runat="server" ID="TareaNueva" />
</div> </div>
</div> </div>
@@ -3509,6 +3568,7 @@
Tipo Cambio: Tipo Cambio:
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<asp:TextBox CssClass="form-control" ID="TxtConvertirPesos" runat="server" Width="100px"></asp:TextBox> <asp:TextBox CssClass="form-control" ID="TxtConvertirPesos" runat="server" Width="100px"></asp:TextBox>
@@ -3745,7 +3805,7 @@
<br /> <br />
<div style="text-align: center"> <div style="text-align: center">
<asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text=" Múltiple Crédito" visible="false" /> <asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text=" Múltiple Crédito" Visible="false" />
</div> </div>
<br /> <br />
@@ -3856,6 +3916,7 @@
<div class="row" style="text-align: left; padding-left: 20px"> <div class="row" style="text-align: left; padding-left: 20px">
Observaciones: Observaciones:
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-8" style="width: 100%; text-align: left"> <div class="col-md-8" style="width: 100%; text-align: left">
@@ -4020,6 +4081,7 @@
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp; <asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Right" /> <ItemStyle HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
@@ -4029,6 +4091,7 @@
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaDocumento", "{0:d}") %>'></asp:Literal>&nbsp; <asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaDocumento", "{0:d}") %>'></asp:Literal>&nbsp;
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Right" /> <ItemStyle HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
@@ -4092,6 +4155,7 @@
<asp:DropDownList ID="DdlCredito" Width="300px" CssClass="form-control input-sm select2me" DataTextField="ReferenciaImporte" DataValueField="CveCredito" runat="server" AutoPostBack="True"></asp:DropDownList></td> <asp:DropDownList ID="DdlCredito" Width="300px" CssClass="form-control input-sm select2me" DataTextField="ReferenciaImporte" DataValueField="CveCredito" runat="server" AutoPostBack="True"></asp:DropDownList></td>
</div> </div>
</div> </div>
<div class="row" id="DivCreditoMensualidad" runat="server"> <div class="row" id="DivCreditoMensualidad" runat="server">
@@ -4101,6 +4165,10 @@
<asp:RequiredFieldValidator ID="RFVCreditoDetalle" runat="server" ControlToValidate="DdlCreditoDetalle" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Crédito''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVCreditoDetalle" runat="server" ControlToValidate="DdlCreditoDetalle" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Crédito''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECreditoDetalle" runat="server" HighlightCssClass="vco" TargetControlID="RFVCreditoDetalle" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCECreditoDetalle" runat="server" HighlightCssClass="vco" TargetControlID="RFVCreditoDetalle" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
@@ -4236,6 +4304,10 @@
<label for="<%= ddlUM.ClientID.ToString()%>">Unidad de Medida:</label> <label for="<%= ddlUM.ClientID.ToString()%>">Unidad de Medida:</label>
</div> </div>
</ContentTemplate> </ContentTemplate>
@@ -4392,6 +4464,10 @@
<asp:Label ID="LblTotalPS" ClientIDMode="Static" runat="server" Text="0.00"></asp:Label> <asp:Label ID="LblTotalPS" ClientIDMode="Static" runat="server" Text="0.00"></asp:Label>
</div> </div>
@@ -4543,6 +4619,10 @@
<label id="LbUMActual" class="bold"></label> <label id="LbUMActual" class="bold"></label>
Equivale:</label> Equivale:</label>
<div class="col-md-9"> <div class="col-md-9">
@@ -4559,6 +4639,7 @@
Agregar como nueva unidad de medida Agregar como nueva unidad de medida
</button> </button>
</div> </div>
</div> </div>
@@ -4643,6 +4724,9 @@
<h4 class="modal-title">Facturas</h4> <h4 class="modal-title">Facturas</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<ajax:TabContainer ID="TabModoNC" runat="server" AutoPostBack="true" ActiveTabIndex="0" Width="100%" OnActiveTabChanged="TabModoNC_ActiveTabChanged">
<ajax:TabPanel runat="server" HeaderText="Saldo">
<ContentTemplate>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<label class="col-md-6"><b>Total NC.: </b></label> <label class="col-md-6"><b>Total NC.: </b></label>
@@ -4693,11 +4777,58 @@
</asp:GridView> </asp:GridView>
</div> </div>
</div> </div>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabNCAlmacen" runat="server" HeaderText="Almacen">
<ContentTemplate>
<div class="row">
<div class="col-md-12 h4 text-right">
Saldo: $<asp:Label Text="0.00" ID="LbNCInvSaldoAlmacen" runat="server" />
</div>
</div>
<br />
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GVNCInvAlmacen" runat="server" EmptyDataText="Aun no hay registros." Width="100%" AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" DataKeyNames="CveCompraDetalle" CssClass="table table-striped table-hover Widthall ScrollAD" data-heighterror="450" data-freezerows="1" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Cantidad">
<ItemTemplate>
<asp:TextBox ID="TxtCantidadNCInv" CssClass="form-control input-sm" runat="server" />
<ajax:FilteredTextBoxExtender ID="SoloNumerosFolio" runat="server" TargetControlID="TxtCantidadNCInv" FilterType="Numbers, custom" ValidChars="." />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="10%" />
</asp:TemplateField>
<asp:HyperLinkField HeaderText="SerieFolio" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?={0}" />
<asp:BoundField HeaderText="Original" DataField="CantidadC" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Surtido" DataField="CantidadS" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Pendiente" DataField="CantidadF" DataFormatString="{0:#,##0.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="7.5%" />
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
<asp:BoundField HeaderText="P.U." DataField="PU" DataFormatString="{0:#,##0.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%">
<ItemTemplate>
<asp:Label ID="LbTotal" Text='<%# (CDbl(Eval("PU").ToString) * CDbl(Eval("CantidadF").ToString)).ToString("N2") %>' runat="server"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<div class="row">
<div class="col-md-12 h5 text-right">
Importe: $<asp:Label Text="0.00" ID="LbNCInvImporteAlmacen" runat="server" />
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<asp:UpdatePanel ID="UpFooterFacturaNC" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpFooterFacturaNC" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:Button Text="Guardar" ID="BtnFacturaNC" OnClick="BtnFacturaNC_Click" CssClass="btn btn-primary" ValidationGroup="GrpFacturaNC" runat="server" /> <asp:Button Text="Guardar" ID="BtnFacturaNC" OnClick="BtnFacturaNC_Click" CssClass="btn btn-primary" ValidationGroup="GrpFacturaNC" runat="server" Visible="false" />
<asp:Button Text="Aplicar NC" ID="BtnNCInvAlmacen" OnClick="BtnNCInvAlmacen_Click" CssClass="btn btn-primary" ValidationGroup="GrpModalNCInv" runat="server" Visible="false" />
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
@@ -4815,13 +4946,11 @@
<asp:UpdatePanel ID="UPPSolDev" runat="server" class="modal-content rowpadding" tabindex="-1" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPPSolDev" runat="server" class="modal-content rowpadding" tabindex="-1" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="modal-header"> <div class="modal-header">
<h4> <h4>Productos a devolver
Productos a devolver
</h4> </h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="row"> <div class="row">
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
@@ -4835,8 +4964,8 @@
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="Cantidad" HeaderText="Total" /> <asp:BoundField DataField="Cantidad" HeaderText="Total" />
<asp:BoundField DataField="UM" headertext="UM" /> <asp:BoundField DataField="UM" HeaderText="UM" />
<asp:BoundField DataField="CodigoPS" headertext="Producto" /> <asp:BoundField DataField="CodigoPS" HeaderText="Producto" />
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
@@ -4867,7 +4996,7 @@
<div class="col-md-1" style="width: 100%"> <div class="col-md-1" style="width: 100%">
<asp:RadioButtonList ID="RblGastosVincularCrear" runat="server" OnSelectedIndexChanged="RblGastosVincularCrear_Click" AutoPostBack="true" CssClass="GastoIndirectoOpciones" RepeatDirection="Horizontal"> <asp:RadioButtonList ID="RblGastosVincularCrear" runat="server" OnSelectedIndexChanged="RblGastosVincularCrear_Click" AutoPostBack="true" CssClass="GastoIndirectoOpciones" RepeatDirection="Horizontal">
<asp:ListItem Text="Gasto y Servicios" Value="1" /> <asp:ListItem Text="Gasto y Servicios" Value="1" />
<asp:ListItem Text="Costo Indirecto/Importaciones" Value="0" selected="True" /> <asp:ListItem Text="Costo Indirecto/Importaciones" Value="0" Selected="True" />
</asp:RadioButtonList> </asp:RadioButtonList>
</div> </div>
</div> </div>
@@ -5278,7 +5407,9 @@
</div> </div>
<div class="col-md-10" style="text-align: right!important">Sub Total: </div> <div class="col-md-10" style="text-align: right!important">Sub Total: </div>
<div class="col-md-2"><asp:Label runat="server" ClientIDMode="Static" id="LblTotalContrato"></asp:Label></div> <div class="col-md-2">
<asp:Label runat="server" ClientIDMode="Static" ID="LblTotalContrato"></asp:Label>
</div>
<br /> <br />
@@ -5809,6 +5940,7 @@
alert("El Importe no debe de exceder a el saldo.[" + Sumatoria + " " + saldoAmortizacion + "]"); alert("El Importe no debe de exceder a el saldo.[" + Sumatoria + " " + saldoAmortizacion + "]");
} }
$('#C_LbNCInvImporte').text(FormatoNumero(Sumatoria, 2)); $('#C_LbNCInvImporte').text(FormatoNumero(Sumatoria, 2));
$('#C_LbNCInvImporteAlmacen').text(FormatoNumero(Sumatoria, 2));
} }
function SumaValoresInvNC() { function SumaValoresInvNC() {

View File

@@ -8295,6 +8295,16 @@ Partial Class Compras_Compras
End If End If
End If End If
Next Next
For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, CveCompra, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then
ErrorMovInv = True
Exit For
End If
End If
Next
End If End If
@@ -18816,6 +18826,7 @@ Partial Class Compras_Compras
HLAplicaNCFact.Visible = True HLAplicaNCFact.Visible = True
LblTotalNC.Text = TxtTotal.Text.FormatoNumero LblTotalNC.Text = TxtTotal.Text.FormatoNumero
CargaCuentasXPagar() CargaCuentasXPagar()
TabModoNC_ActiveTabChanged(TabModoNC, EventArgs.Empty)
End Sub End Sub
Private Sub CargaCuentasXPagar() Private Sub CargaCuentasXPagar()
@@ -18949,6 +18960,9 @@ Partial Class Compras_Compras
ChkNCInv.Visible = True ChkNCInv.Visible = True
GVNCInv.DataSource = DtPendientesAlmacen GVNCInv.DataSource = DtPendientesAlmacen
GVNCInv.DataBind() GVNCInv.DataBind()
GVNCInvAlmacen.DataSource = DtPendientesAlmacen
GVNCInvAlmacen.DataBind()
End If End If
End If End If
@@ -18978,20 +18992,22 @@ Partial Class Compras_Compras
SaldoAnticipo += gvr.FCTextBox("TxtAnticipo").Text.ToDouble SaldoAnticipo += gvr.FCTextBox("TxtAnticipo").Text.ToDouble
End If End If
Next Next
End If
If SaldoAnticipo <= 0 Then If SaldoAnticipo <= 0 Then
Alert("No hay movimientos seleccionados para aplicar", TipoMensaje.MsgAdvertencia) Alert("No hay movimientos seleccionados para aplicar", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
End If
LbNCInvSaldo.Text = SaldoAnticipo.FormatoNumero() LbNCInvSaldo.Text = SaldoAnticipo.FormatoNumero()
LbNCInvSaldoAlmacen.Text = SaldoAnticipo.FormatoNumero()
If ChkNCInvNC.Checked Then If ChkNCInvNC.Checked Then
Dim ObjInventarios As New ClsInventarios Dim ObjInventarios As New ClsInventarios
If ObjInventarios.RecepcionAlmacenGet(-1, -1, UsuarioActual.CveEmpresa, CveProveedor) AndAlso ObjInventarios.DtResultados.FiltraParametros($"CveCompra IN ({CveCompras}) AND CantidadF > 0").Rows.Count > 0 Then If ObjInventarios.RecepcionAlmacenGet(-1, -1, UsuarioActual.CveEmpresa, CveProveedor) AndAlso ObjInventarios.DtResultados.FiltraParametros($"CantidadF > 0").Rows.Count > 0 Then
DtPendientesAlmacen = ObjInventarios.DtResultados.FiltraParametros($"CveCompra IN ({CveCompras}) AND CantidadF > 0").Copy DtPendientesAlmacen = ObjInventarios.DtResultados.FiltraParametros($"CantidadF > 0").Copy
End If End If
ObjInventarios.Dispose() ObjInventarios.Dispose()
End If End If
@@ -19000,10 +19016,12 @@ Partial Class Compras_Compras
If ChkNCInvNC.Checked Then If ChkNCInvNC.Checked Then
GVNCInv.DataSource = DtPendientesAlmacen GVNCInv.DataSource = DtPendientesAlmacen
GVNCInv.DataBind() GVNCInv.DataBind()
UpNCInv.Update()
RegistraScript("$('#FacturaNC').modal('hide');", "FacturaNC") GVNCInvAlmacen.DataSource = DtPendientesAlmacen
GVNCInvAlmacen.DataBind()
End If End If
RegistraScript("$('#ModalNCInv').modal('show');", "ModalNCInv")
Else Else
If ChkNCInvNC.Checked Then If ChkNCInvNC.Checked Then
Alert("Niguna de las facturas seleccionadas cuenta con productos pendientes de darles entrada.", TipoMensaje.MsgAdvertencia) Alert("Niguna de las facturas seleccionadas cuenta con productos pendientes de darles entrada.", TipoMensaje.MsgAdvertencia)
@@ -19016,14 +19034,22 @@ Partial Class Compras_Compras
End If End If
UpNCInv.Update() UpNCInv.Update()
UpFacturaNC.Update()
End Sub End Sub
Protected Sub GVNCInv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVNCInv.RowDataBound Protected Sub GVNCInv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVNCInv.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
'e.Row.FCCheckBox("cbInv").Attributes.Add("onclick", "FnCambiaInvNC(this);") 'e.Row.FCCheckBox("cbInv").Attributes.Add("onclick", "FnCambiaInvNC(this);")
e.Row.FCTextBox("TxtCantidadNCInv").Attributes.Add("onkeyup", $"ValidarCantidad(this,{e.Row.DBCampo("CantidadF")});FnCambiaInvNC(this);") e.Row.FCTextBox("TxtCantidadNCInv").Attributes.Add("onkeyup", $"ValidarCantidad(this,{e.Row.DBCampo("CantidadF")});FnCambiaInvNC(this);")
End If End If
End Sub End Sub
Protected Sub GVNCInvAlmacen_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVNCInvAlmacen.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
'e.Row.FCCheckBox("cbInv").Attributes.Add("onclick", "FnCambiaInvNC(this);")
e.Row.FCTextBox("TxtCantidadNCInv").Attributes.Add("onkeyup", $"ValidarCantidad(this,{e.Row.DBCampo("CantidadF")});FnCambiaInvNC(this);")
End If
End Sub
Protected Sub BtnNCInv_Click(sender As Object, e As EventArgs) Protected Sub BtnNCInv_Click(sender As Object, e As EventArgs)
If ChkNCInvNC.Checked Then If ChkNCInvNC.Checked Then
@@ -19081,6 +19107,34 @@ Partial Class Compras_Compras
Protected Sub BtnNCConfirmacion_Click(sender As Object, e As EventArgs) Protected Sub BtnNCConfirmacion_Click(sender As Object, e As EventArgs)
GuardaAnticipos(Nothing, Nothing) GuardaAnticipos(Nothing, Nothing)
End Sub End Sub
Protected Sub BtnNCInvAlmacen_Click(sender As Object, e As EventArgs)
'Dim ObjCompras As New ClsCompras
'Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL)
'Dim TieneError = False
'For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
' If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
' If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, Gvr.DataKey("CveCompra").ToEntero, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then
' TieneError = True
' Exit For
' End If
' End If
'Next
'If Not TieneError Then
' Alert("Se guardo la devolución correctamente", TipoMensaje.MsgInformacion)
' ObjCompras.Commit()
'Else
' Alert("Ocurrió un error al guardar la devolución", TipoMensaje.MsgError)
' ObjCompras.RollBack()
'End If
'ObjCompras.Dispose()
RegistraScript("$('#FacturaNC').modal('hide');", "ModalNCInv")
End Sub
#End Region #End Region
#Region " INVENTARIO: MOVIMIENTOS DE LA COMPRA " #Region " INVENTARIO: MOVIMIENTOS DE LA COMPRA "
@@ -20228,6 +20282,10 @@ Partial Class Compras_Compras
Protected Sub BtnFacturaNC_Click(sender As Object, e As EventArgs) Protected Sub BtnFacturaNC_Click(sender As Object, e As EventArgs)
If ChkNCInvNC.Checked Then If ChkNCInvNC.Checked Then
CargaNCINV() CargaNCINV()
TabModoNC.ActiveTabIndex = 1
TabModoNC_ActiveTabChanged(TabModoNC, EventArgs.Empty)
UpFacturaNC.Update()
Else Else
RegistraScript("$('#FacturaNC').modal('hide');", "FacturaNC") RegistraScript("$('#FacturaNC').modal('hide');", "FacturaNC")
End If End If
@@ -20721,6 +20779,20 @@ Partial Class Compras_Compras
End Sub End Sub
Protected Sub TabModoNC_ActiveTabChanged(sender As Object, e As EventArgs)
Select Case TabModoNC.ActiveTabIndex
Case 0
BtnFacturaNC.Visible = True
BtnNCInvAlmacen.Visible = False
TabNCAlmacen.Enabled = False
Case 1
BtnFacturaNC.Visible = False
BtnNCInvAlmacen.Visible = True
TabNCAlmacen.Enabled = True
End Select
UpFooterFacturaNC.Update()
End Sub
End Class End Class
Public Class MMensajeDevolucion Public Class MMensajeDevolucion

View File

@@ -1153,6 +1153,29 @@ Partial Class PopUpVerFactura
End If End If
End If End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso (Vta.DtDocumentosRelacionados Is Nothing OrElse Vta.DtDocumentosRelacionados.Rows.Count = 0) Then
If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then
Vta.DtNCVinculadas = ObjVentas.DtResultados
Vta.DtDocumentosRelacionados = ObjVentas.DtResultados '.FiltraParametros("FolioFiscal IS NOT NULL")
If Vta.DtDocumentosRelacionados.Rows.Count > 0 Then
If Vta.TipoDocto.Contiene("Ing") Then
Vta.Timbre.CFDIRelacionados.TipoRelacion = "01"
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso"
End If
If Vta.TipoDocto.Contiene("Egs") Then
Vta.Timbre.CFDIRelacionados.TipoRelacion = "01"
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso"
End If
If Vta.TipoDocto.Contiene("Dev") Then
Vta.Timbre.CFDIRelacionados.TipoRelacion = "03"
Vta.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
End If
End If
End If
End If
End If End If
'If UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then 'If UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then

View File

@@ -763,6 +763,9 @@ Partial Class Compras_RepCxP
TxtRF.Text = "" TxtRF.Text = ""
RFVRF.Enabled = True RFVRF.Enabled = True
End If End If
UpBodyEdit.Update()
End Sub
Protected Sub BtnGuardarPersonalizarRangoEditar_Click(sender As Object, e As EventArgs) Protected Sub BtnGuardarPersonalizarRangoEditar_Click(sender As Object, e As EventArgs)
If Not ChkMayor.Checked And TxtRI.Text.ToDouble > TxtRF.Text.ToDouble Then If Not ChkMayor.Checked And TxtRI.Text.ToDouble > TxtRF.Text.ToDouble Then
@@ -771,6 +774,9 @@ Partial Class Compras_RepCxP
End If End If
If Modalidad = "A" Then If Modalidad = "A" Then
If Not ValidarRangosAgregar() Then
Exit Sub
End If
Dim Dt As DataRow = Nothing Dim Dt As DataRow = Nothing
Dt = DtPersonalizarRango.NewRow Dt = DtPersonalizarRango.NewRow
Dt("RangoInicial") = TxtRI.Text.ToDouble Dt("RangoInicial") = TxtRI.Text.ToDouble
@@ -783,6 +789,61 @@ Partial Class Compras_RepCxP
Exit Sub Exit Sub
End If End If
DtPersonalizarRango.Rows(Index)("RangoInicial") = TxtRI.Text.ToDouble DtPersonalizarRango.Rows(Index)("RangoInicial") = TxtRI.Text.ToDouble
DtPersonalizarRango.Rows(Index)("RangoFinal") = TxtRF.Text.ToDouble
DtPersonalizarRango.Rows(Index)("Tipo") = DdlTipo.SelectedValue
DtPersonalizarRango.Rows(Index)("TipoEscrito") = DdlTipo.SelectedItem.Text
DtPersonalizarRango.AcceptChanges()
End If
DtPersonalizarRango = DtPersonalizarRango.FiltraParametros("", "Tipo,RangoInicial,RangoFinal")
CargaGv()
RegistraScript("$('#DivPersonalizarRangoEditar').modal('hide')")
RegistraScript("$('#DivPersonalizarRango').modal()", "SDSD")
End Sub
Private Function ValidarRangosAgregar() As Boolean
Dim UltimoRango As DataTable = DtPersonalizarRango.FiltraParametros(String.Format("Tipo = {0}", DdlTipo.SelectedValue), "RangoInicial")
Dim TieneNullRow As DataRow = UltimoRango.Rows(UltimoRango.Rows.Count - 1)
Dim aux As String = TieneNullRow.Item("RangoFinal").ToString
'Dim TieneNull As DataTable = UltimoRango.FiltraParametros(String.Format("RangoFinal < 0"))
If aux = "" Then
Alert("Falta indicar el valor maximo del rango anterior", TipoMensaje.MsgAdvertencia)
Return False
End If
Dim ValorMinimoPosible As Double = UltimoRango.MAX("RangoFinal").ToDouble
If Not TxtRI.Text.ToDouble > ValorMinimoPosible Then
Alert("El rango inicial no puede ser inferior al rango final anterior", TipoMensaje.MsgAdvertencia)
End If
Return TxtRI.Text.ToDouble > ValorMinimoPosible
End Function
Private Function ValidarRangosEditar() As Boolean
Dim TablaDeDatosAux As DataTable = DtPersonalizarRango.FiltraParametros(String.Format("Tipo = {0}", DdlTipo.SelectedValue))
'Valida que hay datos en el row anterior
Dim valorMinimo As Double = 0.0
If Index > 0 Then
'Validar que el RowAnterior sea del mismo tipo
Dim RowAnterior As GridViewRow = GvPersonalizarRango.Rows(Index - 1)
If RowAnterior.DataKey("Tipo") = DdlTipo.SelectedValue Then
'Validar que el valor final del row anterior no sea null
valorMinimo = If(RowAnterior.DataKey("RangoFinal") IsNot Nothing, RowAnterior.DataKey("RangoFinal").ToDouble, -1.0)
End If
End If
'Valida que datos en e row siguiente
Dim valorMaximo As Double = 1000000.0
If Index < (GvPersonalizarRango.Rows.Count - 1) Then
'Validamos que el row siguiente sea del mismo tipo
Dim RowSiguiente As GridViewRow = GvPersonalizarRango.Rows(Index + 1)
If RowSiguiente.DataKey("Tipo") = DdlTipo.SelectedValue Then
'Validamos que el valor inicial del row siguiente no sea NULL
valorMaximo = If(RowSiguiente.DataKey("RangoInicial") IsNot Nothing, RowSiguiente.DataKey("RangoInicial").ToDouble, 1000000.0)
End If
End If
If Not TxtRI.Text.ToDouble > valorMinimo Then
Alert("El rango inicial no puede ser inferior al rango final anterior", TipoMensaje.MsgAdvertencia)
Return False
End If End If
If Not TxtRF.Text.ToDouble < valorMaximo Then If Not TxtRF.Text.ToDouble < valorMaximo Then

View File

@@ -577,10 +577,10 @@
<asp:TextBox ID="TxtPagina" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtPagina" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<label for="<%= TxtPagina.ClientID.ToString()%>">Página: </label> <label for="<%= TxtPagina.ClientID.ToString()%>">Página: </label>
</div> </div>
<div class="form-group form-md-line-input"> <%--<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtGiro" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtGiro" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<label for="<%= TxtGiro.ClientID.ToString()%>">Giro:</label> <label for="<%= TxtGiro.ClientID.ToString()%>">Giro:</label>
</div> </div>--%>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNotificar" CssClass="form-control" runat="server" MaxLength="300"></asp:TextBox> <asp:TextBox ID="TxtNotificar" CssClass="form-control" runat="server" MaxLength="300"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVEnotificar" runat="server" CssClass="help-block errorimput" ValidationExpression="(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*" ControlToValidate="TxtNotificar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Notificar A''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator> <asp:RegularExpressionValidator ID="REVEnotificar" runat="server" CssClass="help-block errorimput" ValidationExpression="(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*" ControlToValidate="TxtNotificar" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Notificar A''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
@@ -607,7 +607,7 @@
<div class="form-group form-md-line-input input-iconright" id="DivPortletAsignaciones" runat="server"> <div class="form-group form-md-line-input input-iconright" id="DivPortletAsignaciones" runat="server">
<asp:DropDownList ID="DdlClasificacion" DataValueField="CveClienteClasificacion" DataTextField="ClienteClasificacion" Width="150px" runat="server" CssClass="form-control select2me"> <asp:DropDownList ID="DdlClasificacion" DataValueField="CveClienteClasificacion" DataTextField="ClienteClasificacion" Width="150px" runat="server" CssClass="form-control select2me">
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificación:</label> <label for="<%= DdlClasificacion.ClientID.ToString()%>">Giro:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright" id="Div1" runat="server"> <div class="form-group form-md-line-input input-iconright" id="Div1" runat="server">

View File

@@ -1465,7 +1465,7 @@ Partial Class Clientes
TxtEmailCotizacion.Text = ObjClientes.MailCotizacion TxtEmailCotizacion.Text = ObjClientes.MailCotizacion
TxtNotificar.Text = ObjClientes.NotificarA TxtNotificar.Text = ObjClientes.NotificarA
TxtPagina.Text = ObjClientes.Pagina TxtPagina.Text = ObjClientes.Pagina
TxtGiro.Text = ObjClientes.Giro 'TxtGiro.Text = ObjClientes.Giro
DdlPrecioLista.SelectedValue = ObjClientes.CvePrecioLista.ToString DdlPrecioLista.SelectedValue = ObjClientes.CvePrecioLista.ToString
TxtCC.Text = ObjClientes.NotificarA TxtCC.Text = ObjClientes.NotificarA
ChkMail.Checked = ObjClientes.EnviarFactura ChkMail.Checked = ObjClientes.EnviarFactura
@@ -2520,11 +2520,11 @@ Partial Class Clientes
MetodoPago = 1 MetodoPago = 1
End If End If
Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "")
If ObjClientes.AddCliente(TxtNombre.Text.Trim, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim, TxtTelefono.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), If ObjClientes.AddCliente(TxtNombre.Text.Trim, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim, TxtTelefono.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text.Trim, TxtGiro.Text.Trim, DdlPrecioLista.SelectedValue.ToEntero, ChkMail.Checked, TxtRetIVA.Text.ToDouble, TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text.Trim, Giro, DdlPrecioLista.SelectedValue.ToEntero, ChkMail.Checked, TxtRetIVA.Text.ToDouble,
TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero, TxtPlazoCobranza.Text.Trim.ToEntero, TxtPlazoCobranzaRemision.Text.Trim.ToEntero, TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero, TxtPlazoCobranza.Text.Trim.ToEntero, TxtPlazoCobranzaRemision.Text.Trim.ToEntero,
DiasPago, DdlTipoPago.SelectedValue, DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero, DiasPago, DdlTipoPago.SelectedValue, DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero,
DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableFondoGarantia.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableFondoGarantia.SelectedValue.ToEntero,
@@ -2617,9 +2617,9 @@ Partial Class Clientes
Else Else
NombreCliente = TxtNombre.Text.Trim() NombreCliente = TxtNombre.Text.Trim()
End If End If
Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "")
If ObjClientes.UpdateCliente(NombreCliente, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim, If ObjClientes.UpdateCliente(NombreCliente, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim,
TxtTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text, TxtGiro.Text, DdlPrecioLista.SelectedValue.ToEntero, ChkMail.Checked, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, TxtTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text, Giro, DdlPrecioLista.SelectedValue.ToEntero, ChkMail.Checked, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked,
ChkEstado.Checked, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero, TxtPlazoCobranza.Text.Trim.ToEntero, TxtPlazoCobranzaRemision.Text.Trim.ToEntero, DiasPago, DdlTipoPago.SelectedValue, ChkEstado.Checked, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero, TxtPlazoCobranza.Text.Trim.ToEntero, TxtPlazoCobranzaRemision.Text.Trim.ToEntero, DiasPago, DdlTipoPago.SelectedValue,
DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero, DdlCtaContableAnticipos.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero, DdlCtaContableAnticipos.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero,
DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableFondoGarantia.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableCompClientes.SelectedValue.ToEntero, DdlCtaContableCompClientes.SelectedItem.Text, DdlCtaContableCompAnticipos.SelectedValue.ToEntero, DdlCtaContableCompAnticipos.SelectedItem.Text, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableFondoGarantia.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableCompClientes.SelectedValue.ToEntero, DdlCtaContableCompClientes.SelectedItem.Text, DdlCtaContableCompAnticipos.SelectedValue.ToEntero, DdlCtaContableCompAnticipos.SelectedItem.Text,

View File

@@ -3981,7 +3981,7 @@ Partial Class Ventas
Dim TipoEstatus As Integer = GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {CveEstatus}").ToEntero() Dim TipoEstatus As Integer = GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {CveEstatus}").ToEntero()
If UsuarioActual.Empresa.Funcionalidad(135) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso TipoEstatus = 5 Then If UsuarioActual.Empresa.Funcionalidad(135).Contiene("1", "2") AndAlso DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso TipoEstatus = 5 Then
If UsuarioActual.TienePermisoProceso(159) Then If UsuarioActual.TienePermisoProceso(159) Then
Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto"))) Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
If TienePermiso <> "" Then If TienePermiso <> "" Then
@@ -4087,7 +4087,7 @@ Partial Class Ventas
End If End If
'SI LA AUTORIZACION ES POR SUPERVISOR, BUSCA EL SUPERVISOR QUE TIENE EL VENDEDOR
If UsuarioActual.Empresa.Funcionalidad(135) = "1" Then If UsuarioActual.Empresa.Funcionalidad(135) = "1" Then
'Reviso cuales son los supervisores 'Reviso cuales son los supervisores
Dim Objeto As New ClsVtaVendedores Dim Objeto As New ClsVtaVendedores
@@ -4104,7 +4104,7 @@ Partial Class Ventas
If TipoEstatus = 2 Then If TipoEstatus = 2 Then
LkCotizacionAutorizar.Visible = False LkCotizacionAutorizar.Visible = False
ElseIf TipoEstatus = 2 Then ElseIf TipoEstatus = 5 Then
LkCotizacionAutorizar.Visible = False LkCotizacionAutorizar.Visible = False
End If End If
End If End If
@@ -4113,8 +4113,18 @@ Partial Class Ventas
Objeto.Dispose() Objeto.Dispose()
End If End If
String.Format("CveVendedor = {0}", DbRowVenta("CveVendedor").ToString()) 'SI LA AUTORIZACION ES POR PERMISO, BUSCA QUE EL USUARIO TENGA EL PERMISO PARA AUTORIZAR
If UsuarioActual.Empresa.Funcionalidad(135) = "2" Then
'Reviso cuales son los supervisores
If UsuarioActual.TienePermisoProceso(116) Then
LkCotizacionAutorizar.Visible = True
If TipoEstatus = 2 Then
LkCotizacionAutorizar.Visible = False
ElseIf TipoEstatus = 5 Then
LkCotizacionAutorizar.Visible = False
End If
End If
End If
Case "Ant" Case "Ant"
Trsaldo.Visible = True Trsaldo.Visible = True
@@ -4872,8 +4882,10 @@ Partial Class Ventas
'Verifico si tiene la funcionalidad (135) 'Verifico si tiene la funcionalidad (135)
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(135) = "1" Then If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(135).Contiene("1", "2") Then
'Reviso cuales son los supervisores
Select Case UsuarioActual.Empresa.Funcionalidad(135)
Case "1" ' POR SUPERVISOR
Dim ObjVendedores As New ClsVtaVendedores Dim ObjVendedores As New ClsVtaVendedores
If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
@@ -4896,6 +4908,21 @@ Partial Class Ventas
DTVendedores.Dispose() DTVendedores.Dispose()
End If End If
ObjVendedores.Dispose() ObjVendedores.Dispose()
Case "2" ' POR PERMISO
If UsuarioActual.TienePermisoProceso(116) Then
If GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {Me.CveEstatus}").ToEntero() = 2 Then
BtnsFacturar.Visible = True
BtnGenerarRemision.Visible = True
Else
BtnsFacturar.Visible = False
BtnGenerarRemision.Visible = False
End If
End If
End Select
End If End If
If DdlTipoComprobante.SelectedValue = "Cot" Then If DdlTipoComprobante.SelectedValue = "Cot" Then
@@ -10132,6 +10159,8 @@ Partial Class Ventas
End If End If
End If End If
tPS = tPS.Replace("|", " ")
If tPS.Length >= 1000 Then If tPS.Length >= 1000 Then
Dim tPSRecortado = tPS.Remove(999, tPS.Length - 999) Dim tPSRecortado = tPS.Remove(999, tPS.Length - 999)
tPS = tPSRecortado tPS = tPSRecortado
@@ -15479,7 +15508,7 @@ Partial Class Ventas
TrAlmacenAsignado.Visible = False TrAlmacenAsignado.Visible = False
TrAlmacenOrigen.Visible = False TrAlmacenOrigen.Visible = False
If DdlTipoComprobante.SelectedValue = "Cot" And UsuarioActual.Empresa.Funcionalidad(135) = "1" Then If DdlTipoComprobante.SelectedValue = "Cot" And UsuarioActual.Empresa.Funcionalidad(135).Contiene("1", "2") Then
Alert("Se ocupa una autorización.", TipoMensaje.MsgAdvertencia) Alert("Se ocupa una autorización.", TipoMensaje.MsgAdvertencia)
TrDireccion.Visible = False TrDireccion.Visible = False
TrCiudad.Visible = False TrCiudad.Visible = False
@@ -21211,8 +21240,14 @@ Partial Class Ventas
ObjVentas.Dispose() ObjVentas.Dispose()
If ActualizoEstatus Then If ActualizoEstatus Then
'GeneraPDFCotizacion(True)
If UsuarioActual.Empresa.Funcionalidad(135) = "1" Then
GeneraPDFCotizacion(True)
Alert("La cotización ha sido enviada al correo de nuestro cliente:" & Mail) Alert("La cotización ha sido enviada al correo de nuestro cliente:" & Mail)
ElseIf UsuarioActual.Empresa.Funcionalidad(135) = "2" Then
Alert("La cotización ha sido autorizada.")
End If
Else Else
Alert("No se pudo autorizar la cotización", TipoMensaje.MsgError) Alert("No se pudo autorizar la cotización", TipoMensaje.MsgError)
End If End If