.
This commit is contained in:
@@ -431,7 +431,8 @@ Public Class ClsCRM
|
||||
Return Retorno
|
||||
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
|
||||
DataAdapter("PA_CRM_EmpresaAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -444,6 +445,7 @@ Public Class ClsCRM
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@Correo", SqlDbType.VarChar).Value = Correo
|
||||
.Add("@CveGiroClasificacion", SqlDbType.Int).Value = CveGiroClasificacion
|
||||
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
End With
|
||||
@@ -456,7 +458,8 @@ Public Class ClsCRM
|
||||
Return CveEmpresaCRM
|
||||
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
|
||||
DataAdapter("PA_CRM_EmpresaUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -469,6 +472,7 @@ Public Class ClsCRM
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@Correo", SqlDbType.VarChar).Value = Correo
|
||||
.Add("@CveGiroClasificaciones", SqlDbType.Int).Value = CveGiroClasificacion
|
||||
End With
|
||||
Try
|
||||
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,
|
||||
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 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
|
||||
DataAdapter("PA_CRM_AcercamientoGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -675,6 +680,9 @@ Public Class ClsCRM
|
||||
.Add("@FechaCierre", SqlDbType.VarChar).Value = FechaCierre
|
||||
|
||||
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
|
||||
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveGiroClasificacion", SqlDbType.Int).Value = CveGiroClasificacion
|
||||
End With
|
||||
Try
|
||||
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,
|
||||
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,
|
||||
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
|
||||
DataAdapter("PA_CRM_AcercamientoAdd")
|
||||
@@ -714,6 +722,7 @@ Public Class ClsCRM
|
||||
.Add("@Prioridad", SqlDbType.Int).Value = Prioridad
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuarioIng", SqlDbType.Int).Value = CveUsuarioIng
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
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,
|
||||
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,
|
||||
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
|
||||
DataAdapter("PA_CRM_AcercamientoUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -755,6 +764,7 @@ Public Class ClsCRM
|
||||
.Add("@CveRechazoMotivo", SqlDbType.Int).Value = CveRechazoMotivo
|
||||
.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("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -1832,7 +1832,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||
'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
|
||||
|
||||
@@ -405,12 +405,15 @@
|
||||
</div>
|
||||
<%-- style="padding-bottom: 17px;" --%>
|
||||
<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>--%>
|
||||
<label style="height: 83px;" for="<%= TxtDescripcion.ClientID.ToString()%>">Descripción del Proyecto:</label>
|
||||
<i></i>
|
||||
</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>
|
||||
|
||||
@@ -234,6 +234,18 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
ViewState["CveAcercamientoGasto"] = value;
|
||||
}
|
||||
}
|
||||
private int CvePS
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CvePS"] == null ? -1 : ViewState["CvePS"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CvePS"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
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;
|
||||
//CveEtapaBitacoraSeleccionada = CveEtapaActual;
|
||||
|
||||
CvePS = ObjCRM.DtResultados.FiltroPrimeroValor("CvePS").ToEntero();
|
||||
|
||||
HdfEtapaSeleccionada.Value = CveEtapaActual.ToString();
|
||||
//INHABILITAMOS CAMPOS QUE NO SE PUEDEN EDITAR
|
||||
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"))
|
||||
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
|
||||
|
||||
#region "GUARDAR"
|
||||
@@ -605,7 +631,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@@ -671,7 +697,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
int CveUsuarioIng = UsuarioActual.CveUsuario;
|
||||
|
||||
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;
|
||||
HdfEtapaSeleccionada.Value = CveEtapaProcesoActualActualizar.ToString();
|
||||
|
||||
@@ -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>
|
||||
</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 --%>
|
||||
<asp:UpdatePanel ID="UpDatosTecnicos" runat="server" UpdateMode="Conditional">
|
||||
@@ -676,6 +681,12 @@
|
||||
</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>
|
||||
|
||||
|
||||
@@ -217,6 +217,19 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
ViewState["DtProbabilidadAcercamiento"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
private int CveGiroClasificacion
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveGiroClasificacion"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveGiroClasificacion"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
@@ -237,6 +250,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
CargaDatosTecnicos();
|
||||
}
|
||||
VerificaPermisos();
|
||||
CargaClasificaciones();
|
||||
DdlPS.setEsWebService(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,7 +289,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
{
|
||||
string Mensaje = "";
|
||||
//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)
|
||||
{
|
||||
@@ -321,7 +336,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
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))
|
||||
{
|
||||
@@ -628,8 +643,9 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
CveVendedor = ObjCRM.DtResultados.FiltroPrimeroValor("CveVendedorAsignado").ToEntero();
|
||||
CveSubProyecto = ObjCRM.DtResultados.FiltroPrimeroValor("CveSubProyecto").ToEntero();
|
||||
CveCliente = ObjCRM.DtResultados.FiltroPrimeroValor("CveCliente").ToEntero();
|
||||
CveGiroClasificacion = ObjCRM.DtResultados.FiltroPrimeroValor("CveGiroClasificacion").ToEntero();
|
||||
|
||||
if(!(CveCliente > 0))
|
||||
if (!(CveCliente > 0))
|
||||
{
|
||||
HplCrearCliente.Visible = true;
|
||||
HplCrearCliente.NavigateUrl = String.Format("/Ventas/Clientes.aspx?CveEmpresaCRM={0}", CveEmpresaCRM);
|
||||
@@ -652,6 +668,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
BtnEliminarEmpresa.Enabled = false;
|
||||
|
||||
DivBitacora.Visible = false;
|
||||
|
||||
CveGiroClasificacion = -1;
|
||||
}
|
||||
|
||||
ObjCRM.Dispose();
|
||||
@@ -665,6 +683,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
else
|
||||
{
|
||||
CreaTempDTContactos();
|
||||
CveGiroClasificacion = -1;
|
||||
}
|
||||
|
||||
DdlVendedorAsignado.SelectedValueExist(CveVendedor);
|
||||
@@ -1429,7 +1448,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
if (ObjCRM.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
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
|
||||
{
|
||||
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;
|
||||
|
||||
if (!UsuarioActual.TienePermisoProceso(251))
|
||||
{
|
||||
LnkAgregarAcercamiento.Visible = false;
|
||||
}
|
||||
|
||||
if ((UsuarioActual.CveVendedor != CveVendedor))
|
||||
{
|
||||
@@ -1545,4 +1566,13 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
CargaMetodosCaptacion();
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<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 class="titlefiltros caption">
|
||||
@@ -54,13 +54,24 @@
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudF" TargetControlID="TxtFechaFin" PopupButtonID="imgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</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 class="portlet-body" style="display: none;">
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<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>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class CRM_RepAcercamientos : ClsPaginas
|
||||
{
|
||||
@@ -46,9 +47,9 @@ public partial class CRM_RepAcercamientos : ClsPaginas
|
||||
{
|
||||
string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text;
|
||||
string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text;
|
||||
|
||||
int CvePS = DdlPS.SelectedValue.ToEntero() == 0 ? -1 : DdlPS.SelectedValue.ToEntero();
|
||||
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.DataBind();
|
||||
@@ -84,6 +85,12 @@ public partial class CRM_RepAcercamientos : ClsPaginas
|
||||
//CALCULAMOS EL INTERVALO DE LA SEMANA ACTUAL
|
||||
TxtFechaInicio.Text = DateTime.Now.AddDays(-((int)DateTime.Now.DayOfWeek) + 1).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
|
||||
}
|
||||
@@ -75,7 +75,7 @@
|
||||
<ContentTemplate>
|
||||
<li id="LiDevolucionAlmacen" runat="server" visible="false">
|
||||
<%--<asp:LinkButton Text="Solicitar Devolución" OnClick="LBDevolucionAlmacen_Click" ID="LBDevolucionAlmacen" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de solicitar la Devolución de Almacén?" data-btn-ok-label="si" />--%>
|
||||
<asp:LinkButton ID="HplDevv" OnClick="LBDevolucionAlmacen_Click" runat="server"><i class='fa fa-plus'></i> Solicitar Devolución</asp:LinkButton>
|
||||
<asp:LinkButton ID="HplDevv" OnClick="LBDevolucionAlmacen_Click" runat="server"><i class='fa fa-plus'></i> Solicitar Devolución</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -85,7 +85,7 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<li runat="server" visible="false" id="LiAccionesContratos">
|
||||
<asp:LinkButton ID="LnkContratos" OnClick="LnkContratos_Click" runat="server"><i class='fa fa-th-list'></i> Contratos</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkContratos" OnClick="LnkContratos_Click" runat="server"><i class='fa fa-th-list'></i> Contratos</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -434,6 +434,7 @@
|
||||
<asp:HyperLink ID="HplImporte" CssClass="Texto thickbox" runat="server"></asp:HyperLink></td>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
<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,17 +648,23 @@
|
||||
<asp:Label ID="LitHProyecto" runat="server" Text=""></asp:Label>
|
||||
<asp:Label runat="server" ID="LblSubProyectoHeader" Text=""></asp:Label>
|
||||
|
||||
|
||||
|
||||
<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">
|
||||
<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>
|
||||
<asp:LinkButton ID="ImgSubProyecto" CssClass="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" ToolTip="Aplicar SubProyecto a productos" runat="server" Style="display: none;"><i class="fa fa-arrow-circle-down" style="color:green" aria-hidden="true"></i></asp:LinkButton>
|
||||
</span>
|
||||
|
||||
|
||||
</th>
|
||||
<th style="width: 80px">Tipo de Gasto
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
</span>
|
||||
@@ -687,7 +703,7 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</th>
|
||||
@@ -827,6 +843,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
@@ -854,6 +871,7 @@
|
||||
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Importe", "{0:N2}") %>'></asp:Literal>
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
@@ -862,6 +880,7 @@
|
||||
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1065,6 +1088,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:TextBox ID="TxtTC" Text="" Width="50px" runat="server" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -1102,6 +1129,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:CheckBox Text="" ID="ChkConsignacion" OnCheckedChanged="ChkConsignacion_CheckedChanged" AutoPostBack="true" Enabled="false" runat="server" />
|
||||
</li>
|
||||
<br />
|
||||
@@ -1115,6 +1146,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:DropDownList runat="server" ID="DdlConsignacion" DataValueField="CveConsignacion" DataTextField="SerieFolioFecha" Width="180px"></asp:DropDownList>
|
||||
</li>
|
||||
<%--<li>Folio Consignación:
|
||||
@@ -1391,6 +1426,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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="." />
|
||||
<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 />
|
||||
Producto/Servicio
|
||||
|
||||
|
||||
|
||||
</HeaderTemplate>
|
||||
</asp:TemplateField>
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
@@ -2211,6 +2257,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br />
|
||||
<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>
|
||||
@@ -2231,6 +2281,7 @@
|
||||
<asp:Label ID="LtlConsecutivo" runat="server" Text='<%# Eval("Consec", "{0:N0}") %>' Font-Size="6pt"></asp:Label></label>
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
@@ -2397,6 +2448,8 @@
|
||||
<tr id="TrRembolsoUpdate" runat="server" visible="False">
|
||||
<td>Reembolso:
|
||||
|
||||
|
||||
|
||||
<asp:RadioButtonList ID="RblRembolso" OnSelectedIndexChanged="RblRembolso_SelectedIndexChanged" RepeatDirection="Horizontal" runat="server" AutoPostBack="True">
|
||||
<asp:ListItem Value="1">Personal/Empleado</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>
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
@@ -2803,6 +2857,7 @@
|
||||
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="Amort." ItemStyle-HorizontalAlign="Right">
|
||||
@@ -2879,7 +2935,6 @@
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<%--<asp:CheckBox ID="cbInv" runat="server" Checked="false" />--%>
|
||||
<asp:TextBox ID="TxtCantidadNCInv" CssClass="form-control" runat="server" />
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosFolio" runat="server" TargetControlID="TxtCantidadNCInv" FilterType="Numbers, custom" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
@@ -2965,6 +3020,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:Label ID="lbPS" runat="server" ClientIDMode="Static"></asp:Label>
|
||||
a otro Almacén </h4>
|
||||
</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="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>
|
||||
<UserControl:TareaNueva runat="server" id="TareaNueva" />
|
||||
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -3509,6 +3568,7 @@
|
||||
Tipo Cambio:
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtConvertirPesos" runat="server" Width="100px"></asp:TextBox>
|
||||
@@ -3730,9 +3790,9 @@
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div style="border: 1px solid black; width: 85%;margin-left: 7.5%;display:block">
|
||||
<div style="border: 1px solid black; width: 85%; margin-left: 7.5%; display: block">
|
||||
<asp:Panel ID="PnlContado" runat="server" Visible="False">
|
||||
<asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" Style="margin:auto" AutoPostBack="True" RepeatColumns="3">
|
||||
<asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" Style="margin: auto" AutoPostBack="True" RepeatColumns="3">
|
||||
<asp:ListItem Value="1" Selected="True">Bancos</asp:ListItem>
|
||||
<asp:ListItem Value="3">Créditos</asp:ListItem>
|
||||
<asp:ListItem Value="5">Acreedores</asp:ListItem>
|
||||
@@ -3744,11 +3804,11 @@
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div style="text-align:center">
|
||||
<asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text=" Múltiple Crédito" visible="false" />
|
||||
<div style="text-align: center">
|
||||
<asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text=" Múltiple Crédito" Visible="false" />
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<div runat="server" id="DivReembolso">
|
||||
<asp:Panel ID="Panel1" CssClass="text-small" runat="server" Width="100%" Visible="true" BorderStyle="Solid" BorderColor="#6A92AD" BorderWidth="2px">
|
||||
<div class="chequesie1">
|
||||
@@ -3760,9 +3820,9 @@
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="width: 90%; margin-left: 5%; margin-right: 5%; text-align: left">
|
||||
<asp:TextBox ID="TxtNumeroReembolso" runat="server" Width="100%" />
|
||||
<asp:RequiredFieldValidator ID="RfvTxtNumeroReembolso" runat="server" ControlToValidate="TxtNumeroReembolso" InitialValue="" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Num. Reembolso''</b> es necesario, por favor ingreselo." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtNumeroReembolso" runat="server" ControlToValidate="TxtNumeroReembolso" InitialValue="" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Num. Reembolso''</b> es necesario, por favor ingreselo." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceTxtNumeroReembolso" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtNumeroReembolso" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
@@ -3787,7 +3847,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br/>
|
||||
<br />
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<table>
|
||||
@@ -3804,7 +3864,7 @@
|
||||
</div>
|
||||
|
||||
<div runat="server" id="DivContado">
|
||||
<asp:Panel ID="PnlContadoBancos" CssClass="text-small" runat="server" Width="85%" Style="position:relative;margin:auto" Visible="true">
|
||||
<asp:Panel ID="PnlContadoBancos" CssClass="text-small" runat="server" Width="85%" Style="position: relative; margin: auto" Visible="true">
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="width: 25%; text-align: left">
|
||||
@@ -3833,7 +3893,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie2" style="height:100%">
|
||||
<div class="chequesie2" style="height: 100%">
|
||||
<div class="row">
|
||||
<label class="col-md-2" style="width: 25%; padding-left: 20px; text-align: left">
|
||||
<asp:Label ID="LblFolio" runat="server" Text="Número:"></asp:Label></label>
|
||||
@@ -3856,6 +3916,7 @@
|
||||
<div class="row" style="text-align: left; padding-left: 20px">
|
||||
Observaciones:
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8" style="width: 100%; text-align: left">
|
||||
@@ -3867,7 +3928,7 @@
|
||||
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Panel ID="PnlContadoCajaChica" CssClass="text-small" runat="server" Width="85%" Style="position:relative;margin:auto" Visible="False">
|
||||
<asp:Panel ID="PnlContadoCajaChica" CssClass="text-small" runat="server" Width="85%" Style="position: relative; margin: auto" Visible="False">
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Movimiento:</label>
|
||||
@@ -3886,7 +3947,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie2" style="height:100%">
|
||||
<div class="chequesie2" style="height: 100%">
|
||||
<div class="row">
|
||||
<label class="col-md-2">
|
||||
<asp:Label ID="Label5" runat="server" Text="Número:"></asp:Label></label>
|
||||
@@ -3915,7 +3976,7 @@
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Panel ID="PnlContadoFyE" CssClass="text-small" runat="server" Width="85%" Style="position:relative;margin:auto" Visible="False">
|
||||
<asp:Panel ID="PnlContadoFyE" CssClass="text-small" runat="server" Width="85%" Style="position: relative; margin: auto" Visible="False">
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Funcionario Empleado:</label>
|
||||
@@ -3941,7 +4002,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie2" style="height:100%">
|
||||
<div class="chequesie2" style="height: 100%">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<label class="col-md-2"></label>
|
||||
@@ -3965,7 +4026,7 @@
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Panel ID="PnlContadoDeudores" Width="84%" Style="position:relative;margin:auto" runat="server" Visible="False">
|
||||
<asp:Panel ID="PnlContadoDeudores" Width="84%" Style="position: relative; margin: auto" runat="server" Visible="False">
|
||||
|
||||
<asp:RadioButtonList ID="RBLTipoDeudor" runat="server" RepeatDirection="Horizontal" AutoPostBack="true">
|
||||
<asp:ListItem Value="1" Selected="True">D.D</asp:ListItem>
|
||||
@@ -4020,6 +4081,7 @@
|
||||
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
@@ -4029,6 +4091,7 @@
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaDocumento", "{0:d}") %>'></asp:Literal>
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
@@ -4073,7 +4136,7 @@
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
<asp:Panel ID="PnlContadoCreditos" CssClass="text-small" runat="server" Width="85%" Style="position:relative;margin:auto" Visible="true">
|
||||
<asp:Panel ID="PnlContadoCreditos" CssClass="text-small" runat="server" Width="85%" Style="position: relative; margin: auto" Visible="true">
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Tipo</label>
|
||||
@@ -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>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="DivCreditoMensualidad" runat="server">
|
||||
@@ -4101,7 +4165,11 @@
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -4109,7 +4177,7 @@
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Panel ID="PnlContadoAcreedores" CssClass="text-small" runat="server" Width="85%" Style="position:relative;margin:auto" Visible="False">
|
||||
<asp:Panel ID="PnlContadoAcreedores" CssClass="text-small" runat="server" Width="85%" Style="position: relative; margin: auto" Visible="False">
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Acreedor:</label>
|
||||
@@ -4134,7 +4202,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie2" style="height:100%">
|
||||
<div class="chequesie2" style="height: 100%">
|
||||
<div class="row">
|
||||
<label class="col-md-2"></label>
|
||||
<div class="col-md-4"></div>
|
||||
@@ -4236,6 +4304,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label for="<%= ddlUM.ClientID.ToString()%>">Unidad de Medida:</label>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -4289,18 +4361,18 @@
|
||||
<%--<asp:RequiredFieldValidator runat="server" Enabled="true" Display="None" ID="RFVSubProyecto" ControlToValidate="DdlSubProyecto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor seleccione uno." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCORVSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
<label runat="server" id="LblSubProyecto" for="<%= DdlSubProyecto.ClientID.ToString()%>">SubProyecto:</label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div runat="server" id="DVCultivosCuadro" visible ="false" class="form-group form-md-line-input input-iconright" >
|
||||
|
||||
<asp:DropDownList ID="DdlCultivosCuadro" CssClass=" form-control input-sm select2me" runat="server" DataTextField="Cuadro" Style="width: 100%; max-width: 600px;"
|
||||
DataValueField="CveCultivoCuadroDetalle" ValidationGroup="GrpDetalleGuardar">
|
||||
<div runat="server" id="DVCultivosCuadro" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<asp:DropDownList ID="DdlCultivosCuadro" CssClass=" form-control input-sm select2me" runat="server" DataTextField="Cuadro" Style="width: 100%; max-width: 600px;"
|
||||
DataValueField="CveCultivoCuadroDetalle" ValidationGroup="GrpDetalleGuardar">
|
||||
</asp:DropDownList>
|
||||
<label runat="server" id="Label9" for="<%= DdlCultivosCuadro.ClientID.ToString()%>">Cultivo:</label>
|
||||
</div>
|
||||
</div>
|
||||
<label runat="server" id="Label9" for="<%= DdlCultivosCuadro.ClientID.ToString()%>">Cultivo:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -4392,6 +4464,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:Label ID="LblTotalPS" ClientIDMode="Static" runat="server" Text="0.00"></asp:Label>
|
||||
</div>
|
||||
|
||||
@@ -4543,6 +4619,10 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<label id="LbUMActual" class="bold"></label>
|
||||
Equivale:</label>
|
||||
<div class="col-md-9">
|
||||
@@ -4559,6 +4639,7 @@
|
||||
Agregar como nueva unidad de medida
|
||||
|
||||
|
||||
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -4643,61 +4724,111 @@
|
||||
<h4 class="modal-title">Facturas</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label class="col-md-6"><b>Total NC.: </b></label>
|
||||
<div class="col-md-6">
|
||||
<asp:Label ID="LblTotalNC" runat="server"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="col-md-6"><b>Aplicado: </b></label>
|
||||
<div class="col-md-6">
|
||||
<asp:Label ID="LblAplicado" runat="server"></asp:Label>
|
||||
</div>
|
||||
<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="col-md-6">
|
||||
<label class="col-md-6"><b>Total NC.: </b></label>
|
||||
<div class="col-md-6">
|
||||
<asp:Label ID="LblTotalNC" runat="server"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="col-md-6"><b>Aplicado: </b></label>
|
||||
<div class="col-md-6">
|
||||
<asp:Label ID="LblAplicado" runat="server"></asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="row form-group">
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
<asp:UpdatePanel ID="UpChkNCInvNC" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:CheckBox ID="ChkNCInvNC" Text="Afecta Rep Sin Entrada" runat="server" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvFacturaNC" OnRowDataBound="GvFacturaNC_RowDataBound" DataKeyNames="CveCompra,TipoCambio,CveTipoConcepto" runat="server" AutoGenerateColumns="false" GridLines="None" CssClass="table table-striped table-hover Widthall ScrollAD">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkFacturaNC" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField DataTextField="SerieFolio" HeaderText="Folio" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Importe/Saldo" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:TemplateField ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" runat="server" Width="100%" />
|
||||
<ajax:FilteredTextBoxExtender ID="FTETxtImporte" runat="server" TargetControlID="TxtImporte" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
<asp:UpdatePanel ID="UpChkNCInvNC" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:CheckBox ID="ChkNCInvNC" Text="Afecta Rep Sin Entrada" runat="server" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvFacturaNC" OnRowDataBound="GvFacturaNC_RowDataBound" DataKeyNames="CveCompra,TipoCambio,CveTipoConcepto" runat="server" AutoGenerateColumns="false" GridLines="None" CssClass="table table-striped table-hover Widthall ScrollAD">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkFacturaNC" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField DataTextField="SerieFolio" HeaderText="Folio" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Importe/Saldo" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:TemplateField ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" runat="server" Width="100%" />
|
||||
<ajax:FilteredTextBoxExtender ID="FTETxtImporte" runat="server" TargetControlID="TxtImporte" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</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 class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooterFacturaNC" runat="server" UpdateMode="Conditional">
|
||||
<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>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
@@ -4815,36 +4946,34 @@
|
||||
<asp:UpdatePanel ID="UPPSolDev" runat="server" class="modal-content rowpadding" tabindex="-1" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<h4>
|
||||
Productos a devolver
|
||||
<h4>Productos a devolver
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:GridView ID="GvSolDev" runat="server" AutoGenerateColumns="false" GridLines="none" BorderWidth="0" DataKeyNames="Cantidad,CveCompraDetalle,CvePS" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn">
|
||||
<Columns>
|
||||
<%--<%#Eval("Cantidad") %>--%>
|
||||
<asp:TemplateField ItemStyle-Width="55px" HeaderText="Cant">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCant" runat="server" Text='' Width="50px" ></asp:TextBox>
|
||||
<asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtCant" runat="server" MinimumValue="0" Type="Double" ErrorMessage="Supera el total disponible"></asp:RangeValidator>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Cantidad" HeaderText="Total"/>
|
||||
<asp:BoundField DataField="UM" headertext="UM" />
|
||||
<asp:BoundField DataField="CodigoPS" headertext="Producto" />
|
||||
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:GridView ID="GvSolDev" runat="server" AutoGenerateColumns="false" GridLines="none" BorderWidth="0" DataKeyNames="Cantidad,CveCompraDetalle,CvePS" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn">
|
||||
<Columns>
|
||||
<%--<%#Eval("Cantidad") %>--%>
|
||||
<asp:TemplateField ItemStyle-Width="55px" HeaderText="Cant">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCant" runat="server" Text='' Width="50px"></asp:TextBox>
|
||||
<asp:RangeValidator ID="RVR" Display="Dynamic" ControlToValidate="TxtCant" runat="server" MinimumValue="0" Type="Double" ErrorMessage="Supera el total disponible"></asp:RangeValidator>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Cantidad" HeaderText="Total" />
|
||||
<asp:BoundField DataField="UM" HeaderText="UM" />
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto" />
|
||||
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnDevolucion" runat="server" Text="Solicitar Devolución" OnClick="BtnDevolucion_Click" ClientIDMode="Static" CssClass="btn btn-success" />
|
||||
<asp:Button ID="BtnDevolucion" runat="server" Text="Solicitar Devolución" OnClick="BtnDevolucion_Click" ClientIDMode="Static" CssClass="btn btn-success" />
|
||||
<button type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -4863,11 +4992,11 @@
|
||||
<asp:Label ID="LblTitulo" Text="" runat="server">Costo Indirecto/Importación</asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row" style="border-bottom:1px solid #e5e5e5">
|
||||
<div class="col-md-1" style="width:100%">
|
||||
<div class="row" style="border-bottom: 1px solid #e5e5e5">
|
||||
<div class="col-md-1" style="width: 100%">
|
||||
<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="Costo Indirecto/Importaciones" Value="0" selected="True" />
|
||||
<asp:ListItem Text="Costo Indirecto/Importaciones" Value="0" Selected="True" />
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
</div>
|
||||
@@ -5150,7 +5279,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<%-- <div id="DvModalContratos" class="modal ADS fade" role="dialog">
|
||||
<%-- <div id="DvModalContratos" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
@@ -5195,12 +5324,12 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DivmodalConmtrato" class="modal ADS fade">
|
||||
|
||||
<div id="DivmodalConmtrato" class="modal ADS fade">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpModalContrato" runat="server" class="modal-content rowpadding" tabindex="-1" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4>
|
||||
@@ -5212,25 +5341,25 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlContratosObra" AutoPostBack="true" OnSelectedIndexChanged="DdlContratosCompras_SelectedIndexChanged" DataTextField="ContratoCompleto" DataValueField="CveContrato" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlContratosObra.ClientID.ToString()%>">Contrato:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlContratosObra" AutoPostBack="true" OnSelectedIndexChanged="DdlContratosCompras_SelectedIndexChanged" DataTextField="ContratoCompleto" DataValueField="CveContrato" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlContratosObra.ClientID.ToString()%>">Contrato:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoGastoObra" runat="server" DataTextField="TipoGasto" DataValueField="CveTipoGasto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:DropDownList ID="DdlTipoGastoObra" runat="server" DataTextField="TipoGasto" DataValueField="CveTipoGasto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoGastoObra.ClientID.ToString()%>">Tipo de Gasto:</label>
|
||||
|
||||
|
||||
<asp:RequiredFieldValidator runat="server" Enabled="true" InitialValue="-1" Display="None" ID="RFVDdlTipoGastoObra" ControlToValidate="DdlTipoGastoObra" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Gasto''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpAplicaContrato"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlTipoGastoObra" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlTipoGastoObra" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator runat="server" Enabled="true" InitialValue="-1" Display="None" ID="RFVDdlTipoGastoObra" ControlToValidate="DdlTipoGastoObra" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Gasto''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpAplicaContrato"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlTipoGastoObra" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlTipoGastoObra" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -5253,21 +5382,21 @@
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" Text="" type="number" step="any"
|
||||
Width="90" runat="server" ></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCantidad" Text="" type="number" step="any"
|
||||
Width="90" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="PU">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtPU" Text='<%# Eval("PU", "{0:N2}")%>' type="number" step="any" Width="60px" >
|
||||
</asp:TextBox>
|
||||
<asp:TextBox runat="server" ID="TxtPU" Text='<%# Eval("PU", "{0:N2}")%>' type="number" step="any" Width="60px">
|
||||
</asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" Text="" CssClass='<%# String.Format("ImporteCSS CssImporte{0}", Eval("CveContratoDetalle")) %>' type="number" step="any" Width="90" runat="server" onkeydown="keydownenabledtab(event)"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtImporte" Text="" CssClass='<%# String.Format("ImporteCSS CssImporte{0}", Eval("CveContratoDetalle")) %>' type="number" step="any" Width="90" runat="server" onkeydown="keydownenabledtab(event)"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -5277,15 +5406,17 @@
|
||||
</div>
|
||||
</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-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>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<asp:Button ID="BtnAplicarContrato" runat="server" Text="Aceptar" ClientIDMode="Static" CssClass="btn btn-success" OnClick="BtnAplicarContrato_Click" ValidationGroup="GrpAplicaContrato" CausesValidation="true" />
|
||||
<div class="modal-footer">
|
||||
|
||||
<asp:Button ID="BtnAplicarContrato" runat="server" Text="Aceptar" ClientIDMode="Static" CssClass="btn btn-success" OnClick="BtnAplicarContrato_Click" ValidationGroup="GrpAplicaContrato" CausesValidation="true" />
|
||||
<button type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</div>
|
||||
@@ -5809,6 +5940,7 @@
|
||||
alert("El Importe no debe de exceder a el saldo.[" + Sumatoria + " " + saldoAmortizacion + "]");
|
||||
}
|
||||
$('#C_LbNCInvImporte').text(FormatoNumero(Sumatoria, 2));
|
||||
$('#C_LbNCInvImporteAlmacen').text(FormatoNumero(Sumatoria, 2));
|
||||
}
|
||||
|
||||
function SumaValoresInvNC() {
|
||||
@@ -6398,7 +6530,7 @@
|
||||
let Cantidad = 0.0;
|
||||
let Pu = 0.0;
|
||||
|
||||
try{
|
||||
try {
|
||||
|
||||
if (CantidadS.length > 0 && PuS.length > 0) {
|
||||
|
||||
@@ -6406,9 +6538,9 @@
|
||||
Pu = parseFloat(PuS);
|
||||
|
||||
$(".CssImporte" + ncss).val(Cantidad * Pu);
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
} else {
|
||||
$(".CssImporte" + ncss).val("0");
|
||||
}
|
||||
|
||||
@@ -6425,19 +6557,19 @@
|
||||
// }
|
||||
|
||||
//});
|
||||
|
||||
|
||||
ValidaBotonContrato(SubtotalValidar);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//if (SubtotalValidar == SubTotal) {
|
||||
// $('#BtnAplicarContrato').prop('disabled', false);
|
||||
//} else {
|
||||
// $('#BtnAplicarContrato').prop('disabled', true);
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function ValidaBotonContrato(SubtotalValidar) {
|
||||
|
||||
let SubTotal = 0.0;
|
||||
|
||||
@@ -8295,6 +8295,16 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
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
|
||||
|
||||
|
||||
@@ -18816,6 +18826,7 @@ Partial Class Compras_Compras
|
||||
HLAplicaNCFact.Visible = True
|
||||
LblTotalNC.Text = TxtTotal.Text.FormatoNumero
|
||||
CargaCuentasXPagar()
|
||||
TabModoNC_ActiveTabChanged(TabModoNC, EventArgs.Empty)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentasXPagar()
|
||||
@@ -18949,6 +18960,9 @@ Partial Class Compras_Compras
|
||||
ChkNCInv.Visible = True
|
||||
GVNCInv.DataSource = DtPendientesAlmacen
|
||||
GVNCInv.DataBind()
|
||||
|
||||
GVNCInvAlmacen.DataSource = DtPendientesAlmacen
|
||||
GVNCInvAlmacen.DataBind()
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -18978,20 +18992,22 @@ Partial Class Compras_Compras
|
||||
SaldoAnticipo += gvr.FCTextBox("TxtAnticipo").Text.ToDouble
|
||||
End If
|
||||
Next
|
||||
|
||||
If SaldoAnticipo <= 0 Then
|
||||
Alert("No hay movimientos seleccionados para aplicar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If SaldoAnticipo <= 0 Then
|
||||
Alert("No hay movimientos seleccionados para aplicar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
LbNCInvSaldo.Text = SaldoAnticipo.FormatoNumero()
|
||||
LbNCInvSaldoAlmacen.Text = SaldoAnticipo.FormatoNumero()
|
||||
|
||||
If ChkNCInvNC.Checked Then
|
||||
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
|
||||
DtPendientesAlmacen = ObjInventarios.DtResultados.FiltraParametros($"CveCompra IN ({CveCompras}) AND CantidadF > 0").Copy
|
||||
If ObjInventarios.RecepcionAlmacenGet(-1, -1, UsuarioActual.CveEmpresa, CveProveedor) AndAlso ObjInventarios.DtResultados.FiltraParametros($"CantidadF > 0").Rows.Count > 0 Then
|
||||
DtPendientesAlmacen = ObjInventarios.DtResultados.FiltraParametros($"CantidadF > 0").Copy
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
End If
|
||||
@@ -19000,10 +19016,12 @@ Partial Class Compras_Compras
|
||||
If ChkNCInvNC.Checked Then
|
||||
GVNCInv.DataSource = DtPendientesAlmacen
|
||||
GVNCInv.DataBind()
|
||||
UpNCInv.Update()
|
||||
RegistraScript("$('#FacturaNC').modal('hide');", "FacturaNC")
|
||||
|
||||
GVNCInvAlmacen.DataSource = DtPendientesAlmacen
|
||||
GVNCInvAlmacen.DataBind()
|
||||
|
||||
End If
|
||||
RegistraScript("$('#ModalNCInv').modal('show');", "ModalNCInv")
|
||||
|
||||
Else
|
||||
If ChkNCInvNC.Checked Then
|
||||
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
|
||||
|
||||
UpNCInv.Update()
|
||||
UpFacturaNC.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GVNCInv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVNCInv.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 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)
|
||||
|
||||
If ChkNCInvNC.Checked Then
|
||||
@@ -19081,6 +19107,34 @@ Partial Class Compras_Compras
|
||||
Protected Sub BtnNCConfirmacion_Click(sender As Object, e As EventArgs)
|
||||
GuardaAnticipos(Nothing, Nothing)
|
||||
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
|
||||
|
||||
#Region " INVENTARIO: MOVIMIENTOS DE LA COMPRA "
|
||||
@@ -20228,6 +20282,10 @@ Partial Class Compras_Compras
|
||||
Protected Sub BtnFacturaNC_Click(sender As Object, e As EventArgs)
|
||||
If ChkNCInvNC.Checked Then
|
||||
CargaNCINV()
|
||||
|
||||
TabModoNC.ActiveTabIndex = 1
|
||||
TabModoNC_ActiveTabChanged(TabModoNC, EventArgs.Empty)
|
||||
UpFacturaNC.Update()
|
||||
Else
|
||||
RegistraScript("$('#FacturaNC').modal('hide');", "FacturaNC")
|
||||
End If
|
||||
@@ -20721,6 +20779,20 @@ Partial Class Compras_Compras
|
||||
|
||||
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
|
||||
|
||||
Public Class MMensajeDevolucion
|
||||
|
||||
@@ -1152,6 +1152,29 @@ Partial Class PopUpVerFactura
|
||||
Vta.DtDocumentosRelacionados = ObjVentas.DtResultados.FiltraParametros("FolioFiscal IS NOT NULL")
|
||||
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
|
||||
|
||||
|
||||
@@ -763,6 +763,9 @@ Partial Class Compras_RepCxP
|
||||
TxtRF.Text = ""
|
||||
RFVRF.Enabled = True
|
||||
End If
|
||||
UpBodyEdit.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGuardarPersonalizarRangoEditar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If Not ChkMayor.Checked And TxtRI.Text.ToDouble > TxtRF.Text.ToDouble Then
|
||||
@@ -771,6 +774,9 @@ Partial Class Compras_RepCxP
|
||||
End If
|
||||
|
||||
If Modalidad = "A" Then
|
||||
If Not ValidarRangosAgregar() Then
|
||||
Exit Sub
|
||||
End If
|
||||
Dim Dt As DataRow = Nothing
|
||||
Dt = DtPersonalizarRango.NewRow
|
||||
Dt("RangoInicial") = TxtRI.Text.ToDouble
|
||||
@@ -783,6 +789,61 @@ Partial Class Compras_RepCxP
|
||||
Exit Sub
|
||||
End If
|
||||
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
|
||||
|
||||
If Not TxtRF.Text.ToDouble < valorMaximo Then
|
||||
|
||||
@@ -577,10 +577,10 @@
|
||||
<asp:TextBox ID="TxtPagina" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<label for="<%= TxtPagina.ClientID.ToString()%>">Página: </label>
|
||||
</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>
|
||||
<label for="<%= TxtGiro.ClientID.ToString()%>">Giro:</label>
|
||||
</div>
|
||||
</div>--%>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<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>
|
||||
@@ -607,7 +607,7 @@
|
||||
<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>
|
||||
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificación:</label>
|
||||
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Giro:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="Div1" runat="server">
|
||||
|
||||
@@ -1465,7 +1465,7 @@ Partial Class Clientes
|
||||
TxtEmailCotizacion.Text = ObjClientes.MailCotizacion
|
||||
TxtNotificar.Text = ObjClientes.NotificarA
|
||||
TxtPagina.Text = ObjClientes.Pagina
|
||||
TxtGiro.Text = ObjClientes.Giro
|
||||
'TxtGiro.Text = ObjClientes.Giro
|
||||
DdlPrecioLista.SelectedValue = ObjClientes.CvePrecioLista.ToString
|
||||
TxtCC.Text = ObjClientes.NotificarA
|
||||
ChkMail.Checked = ObjClientes.EnviarFactura
|
||||
@@ -2520,11 +2520,11 @@ Partial Class Clientes
|
||||
MetodoPago = 1
|
||||
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("_", ""),
|
||||
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,
|
||||
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,
|
||||
@@ -2617,9 +2617,9 @@ Partial Class Clientes
|
||||
Else
|
||||
NombreCliente = TxtNombre.Text.Trim()
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
|
||||
@@ -3981,7 +3981,7 @@ Partial Class Ventas
|
||||
|
||||
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
|
||||
Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
|
||||
If TienePermiso <> "" Then
|
||||
@@ -4087,7 +4087,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'SI LA AUTORIZACION ES POR SUPERVISOR, BUSCA EL SUPERVISOR QUE TIENE EL VENDEDOR
|
||||
If UsuarioActual.Empresa.Funcionalidad(135) = "1" Then
|
||||
'Reviso cuales son los supervisores
|
||||
Dim Objeto As New ClsVtaVendedores
|
||||
@@ -4104,7 +4104,7 @@ Partial Class Ventas
|
||||
|
||||
If TipoEstatus = 2 Then
|
||||
LkCotizacionAutorizar.Visible = False
|
||||
ElseIf TipoEstatus = 2 Then
|
||||
ElseIf TipoEstatus = 5 Then
|
||||
LkCotizacionAutorizar.Visible = False
|
||||
End If
|
||||
End If
|
||||
@@ -4113,8 +4113,18 @@ Partial Class Ventas
|
||||
Objeto.Dispose()
|
||||
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"
|
||||
Trsaldo.Visible = True
|
||||
@@ -4872,30 +4882,47 @@ Partial Class Ventas
|
||||
|
||||
|
||||
'Verifico si tiene la funcionalidad (135)
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(135) = "1" Then
|
||||
'Reviso cuales son los supervisores
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(135).Contiene("1", "2") Then
|
||||
|
||||
If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
|
||||
Dim DTVendedores As New DataTable
|
||||
If DbRowVenta("CveVendedor").ToString().ToEntero() > 0 AndAlso UsuarioActual.CveVendedor > 0 Then
|
||||
DTVendedores = ObjVendedores.DtResultados.FiltraParametros(String.Format("CveVendedor = {0}", DbRowVenta("CveVendedor").ToString())).FiltraParametros(String.Format("CveSupervisor = {0}", UsuarioActual.CveVendedor))
|
||||
End If
|
||||
Select Case UsuarioActual.Empresa.Funcionalidad(135)
|
||||
Case "1" ' POR SUPERVISOR
|
||||
Dim ObjVendedores As New ClsVtaVendedores
|
||||
|
||||
'Verifico si es su supervisor asignado
|
||||
If DTVendedores.Rows.Count > 0 Then
|
||||
If GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {Me.CveEstatus}").ToEntero() = 2 Then
|
||||
BtnsFacturar.Visible = True
|
||||
BtnGenerarRemision.Visible = True
|
||||
Else
|
||||
BtnsFacturar.Visible = False
|
||||
BtnGenerarRemision.Visible = False
|
||||
If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then
|
||||
Dim DTVendedores As New DataTable
|
||||
If DbRowVenta("CveVendedor").ToString().ToEntero() > 0 AndAlso UsuarioActual.CveVendedor > 0 Then
|
||||
DTVendedores = ObjVendedores.DtResultados.FiltraParametros(String.Format("CveVendedor = {0}", DbRowVenta("CveVendedor").ToString())).FiltraParametros(String.Format("CveSupervisor = {0}", UsuarioActual.CveVendedor))
|
||||
End If
|
||||
|
||||
'Verifico si es su supervisor asignado
|
||||
If DTVendedores.Rows.Count > 0 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
|
||||
|
||||
DTVendedores.Dispose()
|
||||
End If
|
||||
End If
|
||||
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
|
||||
|
||||
|
||||
DTVendedores.Dispose()
|
||||
End If
|
||||
ObjVendedores.Dispose()
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
@@ -10132,6 +10159,8 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
tPS = tPS.Replace("|", " ")
|
||||
|
||||
If tPS.Length >= 1000 Then
|
||||
Dim tPSRecortado = tPS.Remove(999, tPS.Length - 999)
|
||||
tPS = tPSRecortado
|
||||
@@ -15479,7 +15508,7 @@ Partial Class Ventas
|
||||
TrAlmacenAsignado.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)
|
||||
TrDireccion.Visible = False
|
||||
TrCiudad.Visible = False
|
||||
@@ -21211,8 +21240,14 @@ Partial Class Ventas
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If ActualizoEstatus Then
|
||||
'GeneraPDFCotizacion(True)
|
||||
Alert("La cotización ha sido enviada al correo de nuestro cliente:" & Mail)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(135) = "1" Then
|
||||
GeneraPDFCotizacion(True)
|
||||
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
|
||||
Alert("No se pudo autorizar la cotización", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user