automerge
This commit is contained in:
@@ -755,6 +755,7 @@ Public Class ClsContabilidad
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@Movtos").Value.ToString.ToEntero
|
||||
Catch ex As Exception
|
||||
@@ -3889,7 +3890,7 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetCambioSituacionFinanciera(FechaI As Date, FechaF As Date, Unidad As Integer, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetCambioSituacionFinanciera(FechaI As Date, FechaF As Date, Unidad As Integer, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional ConMovimientos As Integer = -1) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_RepCambioSituacionFinanciera")
|
||||
@@ -3901,9 +3902,11 @@ Public Class ClsContabilidad
|
||||
.Add("@TipoReporte", SqlDbType.Int).Value = TipoReporte
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@ConMovimientos", SqlDbType.Int).Value = ConMovimientos
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
@@ -4148,7 +4151,7 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetLibroDiario(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetLibroDiario(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Optional CveTipoPoliza As Integer = -1) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
'SqlAdapter.SelectCommand.t
|
||||
@@ -4159,6 +4162,7 @@ Public Class ClsContabilidad
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveTipoPoliza", SqlDbType.Int).Value = CveTipoPoliza
|
||||
End With
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
|
||||
|
||||
@@ -7686,7 +7686,7 @@ Public Class ClsPaginas
|
||||
End If
|
||||
|
||||
'COMPU DN DIFUSA
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 137, 132, 144) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 137, 132, 144, 177) Then
|
||||
|
||||
Dim FirmaVendedor As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", UsuarioActual.Empresa.Ruta, Vta.CveVendedor))
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1075,23 +1075,38 @@ Partial Class Bancos_PopIECompras
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlFuncionarioEmpleado_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlFuncionarioEmpleado.SelectedIndexChanged
|
||||
ArrIEFuncionariosEmpleados = New ArrayList()
|
||||
ArrIEFuncionariosEmpleados = New ArrayList()
|
||||
ArrIE = New ArrayList()
|
||||
|
||||
Dim objGastosXComprobar As New ClsMovimientos
|
||||
|
||||
Dim CvePersonal As Integer = DdlFuncionarioEmpleado.SelectedValue.ToEntero
|
||||
|
||||
If CveCompra > 0 Then
|
||||
For Each Ant As Anticipos In ArrIE
|
||||
If Ant.CvePersonal = CvePersonal Then
|
||||
ArrIEFuncionariosEmpleados.Add(New Anticipos With {.CveIE = Ant.CveIE, .Importe = Ant.Importe, .CvePersonal = Ant.CvePersonal})
|
||||
End If
|
||||
Next
|
||||
'actualizo el monto maximo a pagar en el movimiento bancario
|
||||
Dim tSaldo As Decimal = DdlFuncionarioEmpleado.SelectedItem.Text.Split(CChar("-"))(1).ToDecimal
|
||||
If tSaldo < MovimientoPagar.Saldo Then
|
||||
TxtImporte.Text = tSaldo.FormatoNumero()
|
||||
End If
|
||||
End If
|
||||
|
||||
If objGastosXComprobar.GetEgresosSinComprobarPersonal(UsuarioActual.CveEmpresa) Then
|
||||
|
||||
|
||||
|
||||
For Each Row As DataRow In objGastosXComprobar.DtResultados.FiltraParametros("CvePersonal > 0 AND FechaDocumento IS NOT NULL").Rows
|
||||
ArrIE.Add(New Anticipos With {.CveIE = Row("CveIE").ToString.ToEntero, .Importe = Row("Saldo").ToString.ToDecimal, .CvePersonal = Row("CvePersonal").ToString.ToEntero})
|
||||
Next
|
||||
|
||||
If CveCompra > 0 Then
|
||||
For Each Ant As Anticipos In ArrIE
|
||||
If Ant.CvePersonal = CvePersonal Then
|
||||
ArrIEFuncionariosEmpleados.Add(New Anticipos With {.CveIE = Ant.CveIE, .Importe = Ant.Importe, .CvePersonal = Ant.CvePersonal})
|
||||
End If
|
||||
Next
|
||||
'actualizo el monto maximo a pagar en el movimiento bancario
|
||||
Dim tSaldo As Decimal = DdlFuncionarioEmpleado.SelectedItem.Text.Split(CChar("-"))(1).ToDecimal
|
||||
If tSaldo < MovimientoPagar.Saldo Then
|
||||
TxtImporte.Text = tSaldo.FormatoNumero()
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DdlIngreso_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlIngreso.SelectedIndexChanged
|
||||
@@ -1379,6 +1394,17 @@ Partial Class Bancos_PopIECompras
|
||||
Fecha = TxtFechaDocumento.Text.Trim.ToDate
|
||||
CveConcepto = 29
|
||||
CveIE = -1
|
||||
|
||||
If ArrIEFuncionariosEmpleados IsNot Nothing AndAlso ArrIEFuncionariosEmpleados.Count > 0 Then
|
||||
Dim objAray As Anticipos = DirectCast(ArrIEFuncionariosEmpleados(0), Anticipos)
|
||||
CveIE = objAray.CveIE
|
||||
End If
|
||||
|
||||
If Not CveIE > 0 Then
|
||||
Alert("No se encontro movimientos bancarios de perosonal", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
TipoMovimiento = True
|
||||
Dim stringPersonal As String = DdlFuncionarioEmpleado.SelectedItem.ToString
|
||||
CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero
|
||||
@@ -1516,9 +1542,13 @@ Partial Class Bancos_PopIECompras
|
||||
Else
|
||||
MsgError = "Ocurrio un Error al registrarse el movimiento bancario."
|
||||
Inserta = False
|
||||
End If
|
||||
Case Else
|
||||
End If
|
||||
Case "2" ' F Y E
|
||||
|
||||
Case Else
|
||||
|
||||
CveIE = -1
|
||||
|
||||
End Select
|
||||
|
||||
If DdlOtrosPagos.SelectedValue = "2" AndAlso TxtComision.Text.ToDecimal > 0 Then
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:UpdatePanel ID="UpEncabezado" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Label runat="server" ID="LblEncabezadoAcercamiento" Text=" Registro de Acercamiento"></asp:Label>
|
||||
<asp:Label runat="server" ID="LblEncabezadoAcercamiento" Text=" Registro de Acercamiento/Oportunidad"></asp:Label>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -301,7 +301,7 @@
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCerrarAcercamiento" OnClick="LnkCerrarAcercamiento_Click" Text="" runat="server" Style="cursor: pointer; margin-right: 5px;"><i class="fa fa-times"></i><span runat="server" id="SpanTituloCierre" style="padding-left: 5px;">Cerrar Acercamiento</span></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkCerrarAcercamiento" OnClick="LnkCerrarAcercamiento_Click" Text="" runat="server" Style="cursor: pointer; margin-right: 5px;"><i class="fa fa-times"></i><span runat="server" id="SpanTituloCierre" style="padding-left: 5px;">Cerrar Acercamiento/Oportunidad</span></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -364,7 +364,7 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-users font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Datos del Acercamiento</span>
|
||||
<span class="caption-subject bold uppercase">Datos del Acercamiento/Oportunidad</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
@@ -376,7 +376,7 @@
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombreAcercamiento" CssClass="form-control " runat="server" MaxLength="150"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNombreAcercamiento" runat="server" ControlToValidate="TxtNombreAcercamiento" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre del Acercamiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:RequiredFieldValidator ID="RFVNombreAcercamiento" runat="server" ControlToValidate="TxtNombreAcercamiento" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre del Acercamiento/Oportunidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtNombreAcercamiento.ClientID.ToString()%>">Proyecto:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
@@ -988,7 +988,7 @@
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardarAcercamiento" Visible="false" runat="server" OnClick="BtnGuardarAcercamiento_Click" CssClass="btn btn-primary" Text="Guardar" ValidationGroup="GrpGuardar" />
|
||||
<asp:Button ID="BtnEliminarAcercamiento" Visible="false" runat="server" OnClick="BtnEliminarAcercamiento_Click" CssClass="btn btn-danger" Text="Eliminar" AlternateText="Eliminar" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea continuar, esta acción eliminara todo registro del acercamiento?" data-btn-ok-label="si" />
|
||||
<asp:Button ID="BtnEliminarAcercamiento" Visible="false" runat="server" OnClick="BtnEliminarAcercamiento_Click" CssClass="btn btn-danger" Text="Eliminar" AlternateText="Eliminar" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea continuar, esta acción eliminara todo registro del acercamiento/Oportunidad?" data-btn-ok-label="si" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
|
||||
@@ -271,6 +271,23 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
private int VendedorTipo
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["VendedorTipo"] == null)
|
||||
{
|
||||
ViewState["VendedorTipo"] = -1;
|
||||
}
|
||||
return ViewState["VendedorTipo"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["VendedorTipo"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
//public int RCveEvento { get { return ViewState["RCveEvento"] != null ? ViewState["RCveEvento"].ToString().ToEntero() : 0; } set { ViewState["RCveEvento"] = value; } }
|
||||
public System.Data.DataTable CheckListNew { get { return ViewState["CheckListNew"] != null ? (System.Data.DataTable)ViewState["CheckListNew"] : null; } set { ViewState["CheckListNew"] = value; } }
|
||||
public int chklistitemindex { get { return ViewState["chklistitemindex"] != null ? ViewState["chklistitemindex"].ToString().ToEntero() : 0; } set { ViewState["chklistitemindex"] = value; } }
|
||||
@@ -313,6 +330,14 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
}
|
||||
CargarPS();
|
||||
//BtnGuardarAcercamiento.Visible = true;
|
||||
|
||||
if (!(Request["OPTAB"] == null))
|
||||
{
|
||||
if(Request["OPTAB"].ToString() == "COT")
|
||||
{
|
||||
TabsAcercamiento.ActiveTab = TabCotizaciones;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,6 +457,21 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
|
||||
CargaImagenes();
|
||||
|
||||
|
||||
if (UsuarioActual.CveVendedor > 0)
|
||||
{
|
||||
ClsVtaVendedores ObjVendedores = new ClsVtaVendedores();
|
||||
if (ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
if (ObjVendedores.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
VendedorTipo = ObjVendedores.DtResultados.FiltroPrimeroValor("VendedorTipo", $"CveVendedor = {UsuarioActual.CveVendedor}").ToEntero();
|
||||
}
|
||||
}
|
||||
ObjVendedores.Dispose();
|
||||
}
|
||||
|
||||
|
||||
UpEncabezado.Update();
|
||||
UPAcercamiento.Update();
|
||||
UPBitacoraEtapas.Update();
|
||||
@@ -718,7 +758,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
HuboError = false;
|
||||
CveEtapaActual = CveEtapaProcesoActualActualizar;
|
||||
HdfEtapaSeleccionada.Value = CveEtapaProcesoActualActualizar.ToString();
|
||||
Alert(String.Format("Se actualizó el acercamiento {0} de tipo {1}.", NombreAcercamiento, TipoProceso), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
Alert(String.Format("Se actualizó el acercamiento/oportunidad {0} de tipo {1}.", NombreAcercamiento, TipoProceso), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -798,7 +838,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No se actualizó el acercamiento.", ModExtensiones.TipoMensaje.ToastError);
|
||||
Alert("No se actualizó el acercamiento/oportunidad.", ModExtensiones.TipoMensaje.ToastError);
|
||||
}
|
||||
|
||||
|
||||
@@ -841,12 +881,12 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
}
|
||||
if (!HuboError)
|
||||
{
|
||||
Alert("El Acercamiento ha sido eliminado.", ModExtensiones.TipoMensaje.MsgInformacion, String.Format("document.location.href=\"/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}\"", CveEmpresaCRM));
|
||||
Alert("El Acercamiento/Oportunidad ha sido eliminado.", ModExtensiones.TipoMensaje.MsgInformacion, String.Format("document.location.href=\"/CRM/EmpresaCRM.aspx?CveEmpresaCRM={0}\"", CveEmpresaCRM));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No se puede eliminar el acercamiento porque el prospecto cuenta con cotizaciones/facturaciones previas.", ModExtensiones.TipoMensaje.MsgError);
|
||||
Alert("No se puede eliminar el Acercamiento/Oportunidad porque el prospecto cuenta con cotizaciones/facturaciones previas.", ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
|
||||
objBitacora.Dispose();
|
||||
@@ -941,9 +981,9 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
{
|
||||
String MensajeBitacora = "";
|
||||
if (CveEtapaActual == CveEtapaCierre)
|
||||
MensajeBitacora = String.Format("Se actualizó el cierre del acercamiento, con motivo {1} y fecha de {0} al {2}.", TituloCierre, DdlRechazoMotivo.SelectedItem.Text, TxtFechaCierreRechazo.Text);
|
||||
MensajeBitacora = String.Format("Se actualizó el cierre del acercamiento/oportunidad, con motivo {1} y fecha de {0} al {2}.", TituloCierre, DdlRechazoMotivo.SelectedItem.Text, TxtFechaCierreRechazo.Text);
|
||||
else
|
||||
MensajeBitacora = String.Format("Se Cerró el acercamiento, con motivo {1} y fecha de {0} al {2}.", TituloCierre, DdlRechazoMotivo.SelectedItem.Text, TxtFechaCierreRechazo.Text);
|
||||
MensajeBitacora = String.Format("Se Cerró el acercamiento/oportunidad, con motivo {1} y fecha de {0} al {2}.", TituloCierre, DdlRechazoMotivo.SelectedItem.Text, TxtFechaCierreRechazo.Text);
|
||||
|
||||
//if (ObjBitacora.AddEventoBitacora(MensajeBitacora, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveEtapaProcesoCRM: CveEtapaCierre))
|
||||
//{
|
||||
@@ -1262,7 +1302,7 @@ public partial class CRM_Acercamiento : ClsPaginas
|
||||
}
|
||||
|
||||
//SOLO VENDEDOR ASIGNADO PUEDE EDITAR
|
||||
if (CveVendedorAsignado != UsuarioActual.CveVendedor)
|
||||
if( (CveVendedorAsignado != UsuarioActual.CveVendedor) & VendedorTipo != 2)
|
||||
{
|
||||
BtnGuardarAcercamiento.Visible = false;
|
||||
BtnEliminarAcercamiento.Visible = false;
|
||||
|
||||
@@ -19,6 +19,19 @@
|
||||
Div.MultiLineTextBox > label#lbltxtdinamico {
|
||||
height: 83px;
|
||||
}
|
||||
|
||||
|
||||
/* #DivBodyEmpresa > div:nth-child(2) > .form-group.form-md-line-input .help-block.errorimput ~ label:before {
|
||||
content: " ";
|
||||
color: #F3565D;
|
||||
}*/
|
||||
|
||||
#DivBodyEmpresa > div:nth-child(2) > .help-block.errorimput ~ label:before {
|
||||
content: " ";
|
||||
color: #F3565D;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -70,12 +83,21 @@
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRFC" CssClass="form-control " runat="server" MaxLength="13"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ID="REVRFC" runat="server" CssClass="help-block errorimput" ValidationExpression="^([A-Z\d]){12,13}$" ControlToValidate="TxtRFC" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVRFC" runat="server" ControlToValidate="TxtRFC" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>--%>
|
||||
|
||||
<label for="<%= TxtRFC.ClientID.ToString()%>">RFC:</label>
|
||||
<i></i>
|
||||
</div>--%>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright " style="content:''">
|
||||
<asp:TextBox ID="TxtRFC" CssClass="form-control " runat="server" MaxLength="13"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ID="REVRFC" runat="server" CssClass="help-block errorimput"
|
||||
ValidationExpression="^([A-Z\d]){12,13}$" ControlToValidate="TxtRFC"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
||||
<label for="<%= TxtRFC.ClientID.ToString()%>">RFC:</label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -299,7 +321,7 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<%-- SECCION ACERCAMIENTO --%>
|
||||
<ajax:TabPanel ID="TabAcercamiento" runat="server" HeaderText="Acercamientos">
|
||||
<ajax:TabPanel ID="TabAcercamiento" runat="server" HeaderText="Acercamientos/Oportunidades">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12 ">
|
||||
@@ -307,11 +329,11 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Acercamientos Registrados </span>
|
||||
<span class="caption-subject bold uppercase">Acercamientos/Oportunidades Registrados </span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarAcercamiento" Visible="false" OnClick="LnkAgregarAcercamiento_Click" data-toggle="tooltip" title="Agregar un Acercamiento" class="btn btn-circle btn-sm btn-default"><i class="fa fa-plus"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarAcercamiento" Visible="false" OnClick="LnkAgregarAcercamiento_Click" data-toggle="tooltip" title="Agregar un Acercamiento/Oportunidad" class="btn btn-circle btn-sm btn-default"><i class="fa fa-plus"></i></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -339,7 +361,7 @@
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Acercamiento" ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Acercamiento/Oportunidad" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink NavigateUrl="#" Target="_blank" ID="HplNombreAcercamiento" runat="server" Text='<%# Eval("NombreAcercamiento")%>'> </asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
@@ -406,7 +428,7 @@
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" ToolTip="Listado de Cotizaciones" CssClass="table table-striped table-advance table-hover ScrollAD Widthall mysmallbtn" AlternatingRowStyle-BorderStyle="None"
|
||||
GridLines="None" BorderColor="#D3D3D3" BorderWidth="1" AutoGenerateColumns="false" OnRowDataBound="GvCotizacion_RowDataBound">
|
||||
<Columns>
|
||||
<asp:HyperLinkField DataTextField="NombreAcercamientoCRM" Target="_blank" DataNavigateUrlFields="CveAcercamientoCRM" DataNavigateUrlFormatString="/CRM/Acercamiento.aspx?CveAcercamiento={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Acercamiento" />
|
||||
<asp:HyperLinkField DataTextField="NombreAcercamientoCRM" Target="_blank" DataNavigateUrlFields="CveAcercamientoCRM" DataNavigateUrlFormatString="/CRM/Acercamiento.aspx?CveAcercamiento={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Acercamiento/Oportunidad" />
|
||||
<asp:BoundField DataField="DescripcionCRM" HeaderText="Descripcion" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:HyperLinkField DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Serie Folio" />
|
||||
@@ -666,7 +688,7 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Agregar Acercamiento</h4>
|
||||
<h4 class="modal-title">Agregar Acercamiento/Oportunidad</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
@@ -102,6 +102,11 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["DTContactos"] == null)
|
||||
{
|
||||
ViewState["DTContactos"] = new DataTable();
|
||||
}
|
||||
|
||||
return (DataTable)ViewState["DTContactos"];
|
||||
}
|
||||
|
||||
@@ -137,6 +142,26 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
private int VendedorTipo
|
||||
{
|
||||
get
|
||||
{
|
||||
if(ViewState["VendedorTipo"] == null)
|
||||
{
|
||||
ViewState["VendedorTipo"] = -1;
|
||||
}
|
||||
return ViewState["VendedorTipo"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["VendedorTipo"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private int CveSubProyecto
|
||||
{
|
||||
get
|
||||
@@ -154,6 +179,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
return (DataTable)ViewState["TempDTContactos"];
|
||||
}
|
||||
|
||||
@@ -749,7 +775,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
CveVendedor = objServicio.Result[0].CveVendedorAsignado.ToEntero();
|
||||
CveSubProyecto = objServicio.Result[0].CveSubProyecto.ToEntero();
|
||||
CveCliente = objServicio.Result[0].CveCliente.ToEntero();
|
||||
CveGiroClasificacion = objServicio.Result[0].CveGiroClasificacion > 0 ? objServicio.Result[0].CveGiroClasificacion.ToEntero() : -1;
|
||||
CveGiroClasificacion = objServicio.Result[0].CveGiroClasificacion > 0 ? objServicio.Result[0].CveGiroClasificacion.ToEntero() : -1;
|
||||
|
||||
if (!(CveCliente > 0))
|
||||
{
|
||||
@@ -803,6 +829,22 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
|
||||
CargaEventoBitacora();
|
||||
}
|
||||
|
||||
if(UsuarioActual.CveVendedor > 0)
|
||||
{
|
||||
ClsVtaVendedores ObjVendedores = new ClsVtaVendedores();
|
||||
if (ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
if(ObjVendedores.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
VendedorTipo = ObjVendedores.DtResultados.FiltroPrimeroValor("VendedorTipo", $"CveVendedor = {UsuarioActual.CveVendedor}").ToEntero();
|
||||
}
|
||||
}
|
||||
ObjVendedores.Dispose();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void DdlTipoProceso_Change(object sender, EventArgs e)
|
||||
@@ -1623,7 +1665,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
{
|
||||
if (DTContactos.Rows.Count == 0)
|
||||
{
|
||||
Alert("Para crear un nuevo acercamiento es necesario agregar al menos un Contacto.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
Alert("Para crear un nuevo acercamiento/Oportunidad es necesario agregar al menos un Contacto.", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1707,22 +1749,22 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
}
|
||||
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/Oportunidad", ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
|
||||
if (CveAcercamiento > 0)
|
||||
{
|
||||
if (ObjBitacora.AddEventoBitacora(String.Format("Se registró el Acercamiento {0} como Proceso de Tipo {1}, con Vendedor {2} y Contacto Principal {3}.", NombreAcercamiento, DdlTipoProceso.SelectedItem, DdlVendedor.SelectedItem, DdlContactoPrincipal.SelectedValue == "-1" ? "aun no asignado" : DdlContactoPrincipal.SelectedItem.Text), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveContactoCRM: CveContactoPrincipal, CveEtapaProcesoCRM: CveEtapaProcesoActual))
|
||||
if (ObjBitacora.AddEventoBitacora(String.Format("Se registró el Acercamiento/Oportunidad {0} como Proceso de Tipo {1}, con Vendedor {2} y Contacto Principal {3}.", NombreAcercamiento, DdlTipoProceso.SelectedItem, DdlVendedor.SelectedItem, DdlContactoPrincipal.SelectedValue == "-1" ? "aun no asignado" : DdlContactoPrincipal.SelectedItem.Text), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM, CveTipoProcesoCRM: CveTipoProceso, CveAcercamientoCRM: CveAcercamiento, CveContactoCRM: CveContactoPrincipal, CveEtapaProcesoCRM: CveEtapaProcesoActual))
|
||||
{
|
||||
string asunto = String.Format("Se registró el Acercamiento {0}", NombreAcercamiento);
|
||||
string mensaje = String.Format("Se registró el Acercamiento {0} como Proceso de Tipo {1}, con Vendedor {2} y Contacto Principal {3}.", NombreAcercamiento, DdlTipoProceso.SelectedItem, DdlVendedor.SelectedItem, DdlContactoPrincipal.SelectedValue == "-1" ? "aun no asignado" : DdlContactoPrincipal.SelectedItem.Text);
|
||||
string asunto = String.Format("Se registró el Acercamiento/Oportunidad {0}", NombreAcercamiento);
|
||||
string mensaje = String.Format("Se registró el Acercamiento/Oportunidad {0} como Proceso de Tipo {1}, con Vendedor {2} y Contacto Principal {3}.", NombreAcercamiento, DdlTipoProceso.SelectedItem, DdlVendedor.SelectedItem, DdlContactoPrincipal.SelectedValue == "-1" ? "aun no asignado" : DdlContactoPrincipal.SelectedItem.Text);
|
||||
mandarCorreo(asunto, mensaje);
|
||||
HuboError = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("Ocurrio un error al agregar el Acercamiento", ModExtensiones.TipoMensaje.MsgError);
|
||||
Alert("Ocurrio un error al agregar el Acercamiento/Oportunidad", ModExtensiones.TipoMensaje.MsgError);
|
||||
HuboError = false;
|
||||
}
|
||||
|
||||
@@ -1741,7 +1783,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
//CARGA BITACORA
|
||||
if (!HuboError)
|
||||
{
|
||||
Alert(String.Format("Se registró el acercamiento <b>{0}</b> como proceso de tipo <b>{1}</b>.<br/><br/> Se le redireccionara al Detalle del Acercamiento.", NombreAcercamiento, DdlTipoProceso.SelectedItem), ModExtensiones.TipoMensaje.MsgInformacion, String.Format("document.location.href=\"/CRM/Acercamiento.aspx?CveAcercamiento={0}\"", CveAcercamiento));
|
||||
Alert(String.Format("Se registró el acercamiento/Oportunidad <b>{0}</b> como proceso de tipo <b>{1}</b>.<br/><br/> Se le redireccionara al Detalle del Acercamiento/Oportunidad.", NombreAcercamiento, DdlTipoProceso.SelectedItem), ModExtensiones.TipoMensaje.MsgInformacion, String.Format("document.location.href=\"/CRM/Acercamiento.aspx?CveAcercamiento={0}\"", CveAcercamiento));
|
||||
CargaEventoBitacora();
|
||||
}
|
||||
limpiarCamposModalAcercamiento();
|
||||
@@ -1771,7 +1813,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
||||
LnkAgregarAcercamiento.Visible = false;
|
||||
}
|
||||
|
||||
if ((UsuarioActual.CveVendedor != CveVendedor))
|
||||
if ((UsuarioActual.CveVendedor != CveVendedor) & VendedorTipo != 2)
|
||||
{
|
||||
if (UsuarioActual.CveUsuario != 100)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Acercamientos
|
||||
Reporte de Acercamientos/Oportunidades
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -149,7 +149,7 @@
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<%--1--%>
|
||||
<asp:TemplateField HeaderText="Acercamiento" ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField HeaderText="Acercamiento/Oportunidad" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink NavigateUrl="#" Target="_blank" ID="HplNombreAcercamiento" runat="server" Text='<%# Eval("NombreAcercamiento")%>'> </asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Procesos de Acercamientos
|
||||
Reporte de Procesos de Acercamientos/Oportunidades
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Rechazos Acercamientos
|
||||
Reporte de Rechazos Acercamientos/Opotunidades
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
|
||||
@@ -9,7 +9,7 @@ Imports System.IO
|
||||
Imports System.Threading.Tasks
|
||||
Imports Newtonsoft.Json
|
||||
Imports Extensiones
|
||||
|
||||
Imports System.Activities.Expressions
|
||||
|
||||
Partial Class Compras_Compras
|
||||
Inherits ClsPaginas
|
||||
@@ -1167,6 +1167,25 @@ Partial Class Compras_Compras
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property NumeroReembolsoOriginal As String
|
||||
Get
|
||||
|
||||
If ViewState("NumeroReembolsoOriginal") Is Nothing Then
|
||||
ViewState("NumeroReembolsoOriginal") = ""
|
||||
End If
|
||||
|
||||
Return ViewState("NumeroReembolsoOriginal").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("NumeroReembolsoOriginal") = value
|
||||
End Set
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip")
|
||||
@@ -2700,6 +2719,10 @@ Partial Class Compras_Compras
|
||||
TrRembolsoCajaChica.Visible = True
|
||||
End If
|
||||
|
||||
If dr("CvePersonal").ToString.ToEntero > 0 Or dr("CveCajaChica").ToString.ToEntero > 0 Then
|
||||
NumeroReembolsoOriginal = dr("NumeroReembolso").ToString
|
||||
End If
|
||||
|
||||
VisualizaEstatusCompraSaldo(dr("TipoDocto").ToString, dr("Saldo").ToString.ToDecimal, dr("Total").ToString.ToDecimal)
|
||||
If dr("IdPoliza").ToString.ToEntero > 0 Then
|
||||
HplCompraContabilizada.Text = "Si"
|
||||
@@ -2766,6 +2789,9 @@ Partial Class Compras_Compras
|
||||
ImgDownPDF.Visible = True : ImgDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Fact&EXT=pdf&CveFactura={0}&RFC={1}", dr("CveFactura"), dr("RFC").ToString.Replace("&", "%26%"))))
|
||||
End If
|
||||
|
||||
|
||||
TxtRembolsoNumero.Enabled = If(IdPoliza > 0, False, True)
|
||||
|
||||
'CargaDetalle
|
||||
If ObjCompra.GetCompraDetalle(CveCompra) Then
|
||||
TmpDT = ObjCompra.DtResultados
|
||||
@@ -9253,6 +9279,36 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If (TxtRembolsoNumero.Text.Trim.Length > 0 AndAlso IdPoliza <= 0) AndAlso (NumeroReembolsoOriginal.Trim <> TxtRembolsoNumero.Text.Trim) Then
|
||||
|
||||
'CUANDO ES REEMBOLSO COMPROBACION Y CAJA CHICA
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 119, 141) AndAlso TxtRembolsoNumero.Text.Trim <> "" AndAlso (DdlRembolsoPersonal.SelectedValue.ToEntero > 0 Or DdlRembolsoCajaChica.SelectedValue.ToEntero > 0) Then
|
||||
If ObjCompra.GetComprobacion(DdlRembolsoPersonal.SelectedValue.ToEntero, DdlRembolsoCajaChica.SelectedValue.ToEntero, TxtRembolsoNumero.Text.Trim, UsuarioActual.CveEmpresa) Then
|
||||
Dim CvePreComprobacion As Integer
|
||||
If ObjCompra.DtResultados.Rows.Count = 0 Then
|
||||
'sino existe, creamos la comprobacion
|
||||
Dim tConcepto As String = If(DdlRembolsoPersonal.SelectedValue.ToEntero > 0, DdlRembolsoPersonal.SelectedItem.Text, DdlRembolsoCajaChica.SelectedItem.Text)
|
||||
tConcepto = String.Format("{0}-{1}", tConcepto, TxtRembolsoNumero.Text.Trim)
|
||||
|
||||
CvePreComprobacion = ObjContabilidad.AddPrePolizas("Compras Comproba", 1, 0, 0, 1, TxtFecha.Text.ToDate, tConcepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If ObjCompra.AddComprobacion(DdlRembolsoPersonal.SelectedValue.ToEntero, DdlRembolsoCajaChica.SelectedValue.ToEntero, TxtRembolsoNumero.Text.Trim, CvePreComprobacion, UsuarioActual.CveEmpresa) > 0 Then
|
||||
|
||||
End If
|
||||
Else
|
||||
'si ya existe, obtenemos la prepóliza
|
||||
CvePreComprobacion = ObjCompra.DtResultados.FiltroPrimeroValor("CvePrePoliza").ToEntero
|
||||
End If
|
||||
|
||||
ObjContabilidad.PrePolizaUnificacion(CvePreComprobacion, CvePrePoliza)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
Retorno = False
|
||||
End If
|
||||
@@ -12249,6 +12305,24 @@ Partial Class Compras_Compras
|
||||
|
||||
Protected Sub BtnContado_Click(sender As Object, e As EventArgs)
|
||||
TxtRembolsoNumero.Text = TxtNumeroReembolso.Text
|
||||
|
||||
If RBLContado.SelectedValue.ToEntero = 6 Then ' Caja chica
|
||||
DdlFuncionarioEmpleado.SelectedValueExist(-1)
|
||||
TxtDocumentoImporteFE.Text = ""
|
||||
TextBox3.Text = ""
|
||||
ViewState("CvePersonal") = -1
|
||||
End If
|
||||
|
||||
If RBLContado.SelectedValue.ToEntero = 2 Then ' viaticos personal
|
||||
DdlTipoTransaccionCaja.SelectedValueExist(-1)
|
||||
DdlCuentaCajaChicaReembolso.SelectedValueExist(-1)
|
||||
DdlCuentaCaja.SelectedValueExist(-1)
|
||||
TxtDocumentoFolioCaja.Text = ""
|
||||
TxtDocumentoImporteCaja.Text = ""
|
||||
TxtDocumentoObservacionesCaja.Text = ""
|
||||
ViewState("CveCajaChica") = -1
|
||||
End If
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal"))
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -78,14 +78,14 @@ Partial Class Contabilidad_LibroMayor
|
||||
FechaInicio = If(IsDate(TxtFechaDel.Text), TxtFechaDel.Text.ToDate, MinFecha)
|
||||
FechaFin = If(IsDate(TxtFechaAl.Text), TxtFechaAl.Text.ToDate, MaxFecha)
|
||||
|
||||
'140
|
||||
Dim CvecuentaPadre As Integer = 57416 '140
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetLibroMayorSIG(CvecuentaPadre, FechaInicio, FechaFin, 1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.GetLibroMayorSIG(-1, FechaInicio, FechaFin, 1, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
|
||||
@@ -33,54 +33,54 @@
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<%-- <td width="90px">Fecha Inicio:</td>
|
||||
<td width="120px">
|
||||
<asp:TextBox ID="TxtFechaDel" Text="" runat="server" TabIndex="1" Width="70px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="ImgCalendarioDel" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</td>
|
||||
<td width="80px">Fecha Fin:</td>
|
||||
<td width="120px">
|
||||
<asp:TextBox ID="TxtFechaAl" Text="" runat="server" TabIndex="2" Width="70px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="ImgCalendarioAl" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</td>--%>
|
||||
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label>
|
||||
<div class="col-md-2" style="width: 125px;">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" >Ejercicio:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||
</asp:DropDownList> </div>
|
||||
<div class="col-md-1 " style="text-align: right; font-size: 14px;"><span>Divisor:</span></div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList Font-Size="14px" runat="server" ID="DdlUnidad" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Divisor</div>
|
||||
<div class="col-md-1 ">
|
||||
<asp:DropDownList CssClass="select2me" runat="server" ID="DdlUnidad" Width="100%">
|
||||
<asp:ListItem Text="1" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="1,000" Value="1000" />
|
||||
<asp:ListItem Text="1,000,000" Value="1000000" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px;">SubProyecto: </label>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Style="max-width: 200px !important;">
|
||||
|
||||
<label class="col-md-1 truncate" >SubProyecto: </label>
|
||||
<div class="col-md-1 ">
|
||||
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="tdTipoReporte" visible="true">
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Tipo:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">Tipo:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTipoReporte" CssClass="form-control input-sm select2me" runat="server">
|
||||
<asp:ListItem Text="Contable" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contable y Complementarias" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Complementarias" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate" >Movimientos: </label>
|
||||
<div class="col-md-1 ">
|
||||
<asp:DropDownList ID="DdlMovimiento" runat="server" CssClass="form-control input-sm select2me" >
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -88,14 +88,12 @@
|
||||
<br />
|
||||
|
||||
<%--PARA REPORTE--%>
|
||||
<rvweb:ReportViewer ID="rvReporteador" Visible="false" runat="server" Width="100%" Height="600"></rvweb:ReportViewer>
|
||||
<%--<rvweb:ReportViewer ID="rvReporteador" Visible="false" runat="server" Width="100%" Height="600"></rvweb:ReportViewer>--%>
|
||||
|
||||
|
||||
<table id="Tbl" runat="server" style="float: left;">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" CssClass="table table-advance table-hover tablenobottomborder" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound" ShowFooter="True">
|
||||
@@ -121,6 +119,13 @@
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Level">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblLevel" Text='<%# Eval("Level") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- <asp:BoundField DataField="Nombre" HeaderText="Cuenta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="300px"/>
|
||||
<asp:BoundField DataField="ImporteActual" DataFormatString="{0:N2}" HeaderText="ImporteActual" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>
|
||||
@@ -133,9 +138,16 @@
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -157,7 +157,7 @@ Partial Class AC2_RepCambiosSituacionFinanciera
|
||||
|
||||
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||
Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString
|
||||
If ObjConta.GetCambioSituacionFinanciera(FechaInicio, FechaFin, DdlUnidad.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.GetCambioSituacionFinanciera(FechaInicio, FechaFin, DdlUnidad.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa, DdlMovimiento.SelectedValue.ToEntero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</div>
|
||||
<div class="col-md-1 "><span>Divisor:</span></div>
|
||||
<div class="col-md-1 ">
|
||||
<asp:DropDownList runat="server" ID="DdlUnidad" CssClass="form-control input-sm">
|
||||
<asp:DropDownList runat="server" ID="DdlUnidad" CssClass="form-control input-sm selec2me">
|
||||
<asp:ListItem Text="1" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="1,000" Value="1000" />
|
||||
<asp:ListItem Text="1,000,000" Value="1000000" />
|
||||
@@ -91,13 +91,9 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<table id="Tbl" runat="server" style="width: 100%; float: left;">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" CssClass="table table-advance table-hover tablenobottomborder" AutoGenerateColumns="False" GridLines="None" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound" ShowFooter="True">
|
||||
@@ -141,9 +137,17 @@
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-1" style="width: 90px; padding-right: 2px;">Fecha Inicio:</label>
|
||||
<div class="col-md-2" style="width: 140px;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
@@ -68,6 +69,15 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 90px; padding-right: 2px;">Tipo Poliza:</label>
|
||||
<div class="col-md-2" style="width: 140px;">
|
||||
<asp:DropDownList runat="server" ID="DDlTipoPoliza" CssClass="select2me">
|
||||
<asp:ListItem Text="Todos" Selected="True" Value="-1" />
|
||||
<asp:ListItem Text="Ingresos" Value="1" />
|
||||
<asp:ListItem Text="Egresos" Value="2" />
|
||||
<asp:ListItem Text="Diario" Value="3" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -64,7 +64,7 @@ Partial Class Contabilidad2_RepLibroDiario
|
||||
'FechaFin = New Date(2016, 1, 31)
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetLibroDiario(FechaInicio, FechaFin, UsuarioActual.CveEmpresa) Then
|
||||
If ObjConta.GetLibroDiario(FechaInicio, FechaFin, UsuarioActual.CveEmpresa, DdlTipoPoliza.SelectedValue.Toentero) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
|
||||
@@ -497,7 +497,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>COYOTIRE</Value>
|
||||
<Value>JOSE HEBERTO PAZ DUEÑAS</Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
@@ -592,6 +592,26 @@
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>COYOTIRES</Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
<Color>DimGray</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<LeftIndent>0cm</LeftIndent>
|
||||
<RightIndent>0cm</RightIndent>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Top>0.0635cm</Top>
|
||||
|
||||
@@ -497,7 +497,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>COYOTIRE</Value>
|
||||
<Value>JOSE HEBERTO PAZ DUEÑAS</Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
@@ -592,6 +592,26 @@
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>COYOTIRES</Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
<Color>DimGray</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<LeftIndent>0cm</LeftIndent>
|
||||
<RightIndent>0cm</RightIndent>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Top>0.0635cm</Top>
|
||||
|
||||
@@ -497,7 +497,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>COYOTIRE</Value>
|
||||
<Value>JOSE HEBERTO PAZ DUEÑAS</Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
@@ -592,6 +592,26 @@
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>COYOTIRES</Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
<Color>DimGray</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<LeftIndent>0cm</LeftIndent>
|
||||
<RightIndent>0cm</RightIndent>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Top>0.0635cm</Top>
|
||||
|
||||
2271
Empresas/177/Formatos/Cotizacion.mrt
Normal file
2271
Empresas/177/Formatos/Cotizacion.mrt
Normal file
File diff suppressed because it is too large
Load Diff
2356
Empresas/177/Formatos/Remision.mrt
Normal file
2356
Empresas/177/Formatos/Remision.mrt
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Empresas/177/Logo.png
Normal file
BIN
Empresas/177/Logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 80 KiB |
1071
Empresas/Grales/Formatos/RepAcercamientos.rdlc
Normal file
1071
Empresas/Grales/Formatos/RepAcercamientos.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -80,8 +80,9 @@
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate" style="text-align: right!important; margin-left: 20px">SubProyecto</div>
|
||||
<div class="col-md-1 truncate" style="text-align: right!important; margin-left: 20px">
|
||||
<asp:Label runat="server" ID="lblSubProyecto">SubProyecto:</asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" Width="150px" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
||||
</asp:DropDownList>
|
||||
@@ -95,12 +96,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<%--<div class="row">
|
||||
<div class="col-md-6"></div>
|
||||
<div class="col-md-6 amChartsAttribution">
|
||||
<a href="http://www.amcharts.com/" class="amChartsLegend" id="amChartsAttribution">JS charts by amCharts</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
<asp:UpdatePanel ID="UPPMov" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
@@ -201,7 +202,7 @@
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span id="Span9" runat="server" class="caption-subject bold uppercase">Compras por Productos - Proveedor Productor - Gráfica </span>
|
||||
<span id="Span9" runat="server" class="caption-subject bold uppercase">Compras Productores - Gráfica por Cantidad(Kg) </span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
@@ -219,6 +220,61 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel ID="UPTablaCxP" runat="server" class="portlet light xspadding bordered " align="left" style="" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span id="Span6" runat="server" class="caption-subject bold uppercase">Compras no productores</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body formnombottom">
|
||||
<asp:GridView ID="GvCxP" runat="server" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD Widthall " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" />
|
||||
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel ID="UPGraficaCxP" runat="server" class="portlet light xspadding bordered " align="center" style="" UpdateMode="Conditional" Visible="false">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span id="Span7" runat="server" class="caption-subject bold uppercase">Compras no productores - Gráfica </span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body formnombottom">
|
||||
<div id="chartdiv_cxp"></div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel ID="UPTablaComprasAcreed" runat="server" class="portlet light xspadding bordered " align="left" UpdateMode="Conditional">
|
||||
@@ -268,7 +324,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body formnombottom">
|
||||
<div id="chartdiv_cxp"></div>
|
||||
<div id="chartdiv_cxpa"></div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -277,7 +333,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel ID="UPTablaCCxC" runat="server" class="portlet light xspadding bordered " align="left" style="" UpdateMode="Conditional">
|
||||
<asp:UpdatePanel ID="UPTablaCxC" runat="server" class="portlet light xspadding bordered " align="left" style="" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
@@ -293,12 +349,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body formnombottom">
|
||||
<asp:GridView ID="GvCCxC" runat="server" GridLines="None"
|
||||
<asp:GridView ID="GvCxC" runat="server" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD Widthall " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Gpo" HeaderText="Cliente" />
|
||||
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
|
||||
<asp:BoundField DataField="RazonSocial" HeaderText="Cliente" />
|
||||
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
|
||||
<asp:BoundField DataFormatString="{0:c}" DataField="Recuperado" ItemStyle-CssClass="margenbound" HeaderText="Recuperado" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -307,12 +364,12 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel ID="UPGraficaCCxC" runat="server" class="portlet light xspadding bordered " align="center" style="" UpdateMode="Conditional" Visible="false">
|
||||
<asp:UpdatePanel ID="UPGraficaCxC" runat="server" class="portlet light xspadding bordered " align="center" style="" UpdateMode="Conditional" Visible="false">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span id="Span5" runat="server" class="caption-subject bold uppercase">Cuentas por cobrar por Cliente - Gráfica </span>
|
||||
<span id="Span5" runat="server" class="caption-subject bold uppercase">Cuentas por cobrar - Gráfica Saldo(MXN)</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
@@ -323,51 +380,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body formnombottom">
|
||||
<div id="chartdiv_ccxc"></div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel ID="UPTablaCxP" runat="server" class="portlet light xspadding bordered " align="left" style="" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span id="Span6" runat="server" class="caption-subject bold uppercase">Cuentas por pagar por Proveedor </span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body formnombottom">
|
||||
<asp:GridView ID="GvCxP" runat="server" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD Widthall " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Gpo" HeaderText="Proveedor" />
|
||||
<asp:BoundField DataFormatString="{0:c}" DataField="Saldo" ItemStyle-CssClass="margenbound" HeaderText="Saldo" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<div id="chartdiv_cxc"></div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel ID="UPGraficaCPxP" runat="server" class="portlet light xspadding bordered " align="center" style="" UpdateMode="Conditional" Visible="false">
|
||||
<asp:UpdatePanel ID="UPGraficaCxCRec" runat="server" class="portlet light xspadding bordered " align="center" style="" UpdateMode="Conditional" Visible="false">
|
||||
<ContentTemplate>
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span id="Span7" runat="server" class="caption-subject bold uppercase">Cuentas por pagar por Proveedor - Gráfica </span>
|
||||
<span id="Span10" runat="server" class="caption-subject bold uppercase">Cuentas por cobrar - Gráfica Recuperado</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
@@ -378,13 +403,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body formnombottom">
|
||||
<div id="chartdiv_cpxp"></div>
|
||||
<div id="chartdiv_cxcrec"></div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:AsyncPostBackTrigger ControlID="btnConsultar" EventName="Click" />
|
||||
@@ -397,89 +423,120 @@
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<%--<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>--%>
|
||||
<%--<script src="https://code.highcharts.com/modules/data.js"></script>--%>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function CargaGraficasPastel(json) {
|
||||
Highcharts.setOptions({
|
||||
lang: {
|
||||
thousandsSep: ',',
|
||||
decimalPoint: '.'
|
||||
}
|
||||
});
|
||||
|
||||
function CargaGraficas(json) {
|
||||
|
||||
// Configuración genérica para todas las gráficas
|
||||
const chartconfig = {
|
||||
"hideCredits": true,
|
||||
"type": "pie",
|
||||
"theme": "light",
|
||||
"dataProvider": [], // se sobrescribe con la sección indicada del JSON en makeChart
|
||||
"valueField": "Valor",
|
||||
"titleField": "Texto",
|
||||
//"legend": {
|
||||
// "valueLabels": {
|
||||
// "text": "{value.value}"
|
||||
// }
|
||||
//},
|
||||
"outlineAlpha": 0.4,
|
||||
"depth3D": 0,
|
||||
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]% [[Moneda]])</span>",
|
||||
"angle": 0,
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
chart: {
|
||||
animation: {
|
||||
duration: 500
|
||||
},
|
||||
marginRight: 50
|
||||
},
|
||||
title: {
|
||||
text: undefined,
|
||||
align: 'left'
|
||||
},
|
||||
legend: {
|
||||
enabled: false
|
||||
},
|
||||
xAxis: {
|
||||
type: "category"
|
||||
},
|
||||
yAxis: {
|
||||
opposite: true,
|
||||
tickPixelInterval: 150,
|
||||
title: {
|
||||
text: null
|
||||
},
|
||||
labels: {
|
||||
//format: '${y} Kg'
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
formatter: function (tooltip) {
|
||||
var tooltiptext = tooltip.defaultFormatter.call(this, tooltip);
|
||||
//var isCurrency = /^(\d|-)?(\d|,)*\.?\d*$/.test(/<b>(.*?)<\/b>/.exec(tooltiptext));
|
||||
//if (isCurrency) {
|
||||
// tooltiptext = tooltiptext.replace("<b>", "<b>$");
|
||||
//}
|
||||
tooltiptext = tooltiptext.replace("</b>", " " + this.point.unit + "</b>");
|
||||
console.log(tooltiptext)
|
||||
return tooltiptext
|
||||
},
|
||||
//footerFormat: '{point.key}'
|
||||
},
|
||||
plotOptions: {
|
||||
series: {
|
||||
animation: false,
|
||||
groupPadding: 0,
|
||||
pointPadding: 0.1,
|
||||
borderWidth: 0,
|
||||
colorByPoint: true,
|
||||
dataSorting: {
|
||||
enabled: false,
|
||||
matchByName: true
|
||||
},
|
||||
type: "bar",
|
||||
dataLabels: {
|
||||
enabled: true,
|
||||
// format: '${y}'
|
||||
formatter: function () {
|
||||
var defaultlabel = Highcharts.getOptions().plotOptions[this.point.series.type].dataLabels.formatter.call(this);
|
||||
var isCurrency = /^(\d|-)?(\d|,)*\.?\d*$/.test(defaultlabel);
|
||||
return isCurrency ? "$" + defaultlabel : defaultlabel;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'bar',
|
||||
keys: ['name', 'y', 'color', 'unit'],
|
||||
data: undefined
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// document.querySelectorAll('div[id^=chartdiv]').forEach((chartdiv) => {
|
||||
// AmCharts.makeChart(chartdiv, chartconfig);
|
||||
// });
|
||||
//AmCharts.makeChart("chartdiv_vxp", { ...chartconfig, type: "serial", dataProvider: json["VxP"] }); // Ventas x Producto
|
||||
|
||||
AmCharts.makeChart("chartdiv_vxp", { ...chartconfig, dataProvider: json["VxP"] }); // Ventas x Producto
|
||||
AmCharts.makeChart("chartdiv_cxp", { ...chartconfig, dataProvider: json["CxP"] }); // Compras x Producto TipoProveedor 1
|
||||
AmCharts.makeChart("chartdiv_cxp192", { ...chartconfig, dataProvider: json["CxP192"] }); // Compras x Producto ProveedorClasificacion 192
|
||||
AmCharts.makeChart("chartdiv_ccxc", { ...chartconfig, dataProvider: json["CCxC"] }); // Cuentas por Cobrar x Cliente
|
||||
AmCharts.makeChart("chartdiv_cpxp", { ...chartconfig, dataProvider: json["CPxP"] }); // Cuentas por Pagar x Proveedor
|
||||
// AmCharts.makeChart("chartdiv_indicadores", { ...chartconfig, dataProvider: json["Indicadores"] }); // Indicadores por Proveedor Productor
|
||||
$('#' + "chartdiv_vxp").highcharts({ ...chartconfig, series: [{ ...chartconfig.series[0], data: customAccessor(json["VxP"]) }] })
|
||||
$('#' + "chartdiv_cxp192").highcharts({ ...chartconfig, series: [{ ...chartconfig.series[0], type: 'pie', data: customAccessor(json["CxP192"]) }] })
|
||||
$('#' + "chartdiv_cxp").highcharts({ ...chartconfig, series: [{ ...chartconfig.series[0], data: customAccessor(json["CxP"]) }] })
|
||||
$('#' + "chartdiv_cxpa").highcharts({ ...chartconfig, series: [{ ...chartconfig.series[0], data: customAccessor(json["CxPA"]) }] })
|
||||
$('#' + "chartdiv_cxc").highcharts({ ...chartconfig, series: [{ ...chartconfig.series[0], data: customAccessor(json["CxC"]) }, { type: 'line', keys: ['name', 'y', 'ignore', 'unit'], data: customAccessor(json["CxCR"]) }] })
|
||||
|
||||
//AmCharts.makeChart("chartdiv_cxp192", { ...chartconfig, dataProvider: json["CxP192"] }); // Compras x Producto ProveedorClasificacion 192
|
||||
//AmCharts.makeChart("chartdiv_cxc", { ...chartconfig, dataProvider: json["CxC"] }); // Cuentas por Cobrar x Cliente
|
||||
//AmCharts.makeChart("chartdiv_cxp", { ...chartconfig, dataProvider: json["CxP"] }); // Cuentas por Pagar x Proveedor
|
||||
//AmCharts.makeChart("chartdiv_indicadores", { ...chartconfig, dataProvider: json["Indicadores"] }); // Indicadores por Proveedor Productor
|
||||
|
||||
function customAccessor(data) {
|
||||
const newData = [];
|
||||
data.forEach(function (point, index) {
|
||||
newData.push([point.Texto, point.Valor, point.Color, point.Unidad]);
|
||||
});
|
||||
return newData;
|
||||
}
|
||||
|
||||
document.getElementById('amChartsAttribution').style.visibility = 'visible';
|
||||
}
|
||||
/*
|
||||
function CargaGraficasBarras(json) {
|
||||
|
||||
var chart = AmCharts.makeChart("chartdiv2", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": json,
|
||||
"startDuration": 2,
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "[[category]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"valueField": "Valor"
|
||||
}],
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}*/
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -1,98 +1,11 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports MoreLinq
|
||||
|
||||
Partial Class General_RepIndicadorResumen
|
||||
Inherits ClsPaginas
|
||||
#Region "propiedades"
|
||||
|
||||
Private Property VxP As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("VxP") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("VxP"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("VxP") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CxP As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("CxP") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("CxP"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("CxP") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CxP192 As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("CxP192") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("CxP192"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("CxP192") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CCxC As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("CCxC") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("CCxC"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("CCxC") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CPxP As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("CPxP") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("CPxP"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("CPxP") = value
|
||||
End Set
|
||||
End Property
|
||||
#If False Then
|
||||
Private Property gv1 As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("gv1") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("gv1"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("gv1") = value
|
||||
End Set
|
||||
End Property
|
||||
#End If
|
||||
Private Property Indicadores As DataTable
|
||||
Get
|
||||
|
||||
@@ -136,9 +49,7 @@ Partial Class General_RepIndicadorResumen
|
||||
Private Sub CargaCombos()
|
||||
|
||||
'Carga SubProyectos
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, lblSubProyecto)
|
||||
|
||||
TxtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
|
||||
TxtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||
@@ -161,77 +72,42 @@ Partial Class General_RepIndicadorResumen
|
||||
|
||||
If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), MinFecha, MaxFecha, -1,
|
||||
-1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=1) Then
|
||||
VxP = ObjVentas.DtResultados
|
||||
VxP.DefaultView.Sort = "CveMoneda,SubTotal DESC"
|
||||
VxP = VxP.DefaultView.ToTable
|
||||
GvVxP.DataSource = VxP
|
||||
Else
|
||||
GvVxP.DataSource = Nothing
|
||||
VxP = Nothing
|
||||
End If
|
||||
|
||||
If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1,
|
||||
UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveProveedorClasificacion:=192) Then
|
||||
CxP192 = ObjCompras.DtResultados
|
||||
CxP192.DefaultView.Sort = "CveMoneda,SubTotal DESC"
|
||||
CxP192 = CxP192.DefaultView.ToTable
|
||||
GvCxP192.DataSource = CxP192
|
||||
Else
|
||||
GvCxP192.DataSource = Nothing
|
||||
CxP192 = Nothing
|
||||
End If
|
||||
|
||||
'If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1,
|
||||
' UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=1) Then
|
||||
' CxP = ObjCompras.DtResultados
|
||||
' CxP.DefaultView.Sort = "CveMoneda,SubTotal DESC"
|
||||
' CxP = CxP.DefaultView.ToTable
|
||||
' GvCxP.DataSource = CxP
|
||||
'Else
|
||||
' GvCxP.DataSource = Nothing
|
||||
' CxP = Nothing
|
||||
'End If
|
||||
|
||||
Dim FechaCorte As String = $"31/12/{Now.Year}"
|
||||
|
||||
If ObjMovtos.GetCxC(TxtFechaI.Text, TxtFechaF.Text, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, -1, 1, -1,
|
||||
"-1", "-1", "-1", FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
|
||||
CCxC = ObjMovtos.DtResultados
|
||||
CCxC.DefaultView.Sort = "CveMoneda,Saldo DESC"
|
||||
CCxC = CCxC.DefaultView.ToTable
|
||||
GvCCxC.DataSource = CCxC
|
||||
Else
|
||||
GvCCxC.DataSource = Nothing
|
||||
CCxC = Nothing
|
||||
End If
|
||||
|
||||
If ObjMovtos.GetCxP(MinFecha, TxtFechaF.Text, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, 5, -1, 1,
|
||||
FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
|
||||
CPxP = ObjMovtos.DtResultados
|
||||
CPxP.DefaultView.Sort = "CveMoneda,Saldo DESC"
|
||||
CPxP = CPxP.DefaultView.ToTable
|
||||
GvCxP.DataSource = CPxP
|
||||
Else
|
||||
GvCxP.DataSource = Nothing
|
||||
CPxP = Nothing
|
||||
ObjVentas.DtResultados.DefaultView.Sort = "CveMoneda,SubTotal DESC"
|
||||
GvVxP.DataSource = ObjVentas.DtResultados.DefaultView.ToTable
|
||||
End If
|
||||
|
||||
'If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1,
|
||||
' UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveProveedorClasificacion:=192) Then
|
||||
' gv1 = ObjCompras.DtResultados
|
||||
' GridView1.DataSource = gv1
|
||||
'Else
|
||||
' GridView1.DataSource = Nothing
|
||||
' gv1 = Nothing
|
||||
' GvCxP192.DataSource = ObjCompras.DtResultados.DefaultView.Sort = "CveMoneda,SubTotal DESC"
|
||||
'End If
|
||||
|
||||
Dim FechaCorte As String = $"31/12/{Now.Year}"
|
||||
|
||||
'If ObjMovtos.GetCxC(TxtFechaI.Text, TxtFechaF.Text, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, -1, 1, -1,
|
||||
' "-1", "-1", "-1", FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
' ObjMovtos.DtResultados.DefaultView.Sort = "CveMoneda,Saldo DESC"
|
||||
' GvCxC.DataSource = ObjMovtos.DtResultados.DefaultView.ToTable
|
||||
'End If
|
||||
|
||||
'If ObjMovtos.GetCxP(MinFecha, TxtFechaF.Text, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, 5, -1, 1,
|
||||
' FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
' ObjMovtos.DtResultados.DefaultView.Sort = "CveMoneda,Saldo DESC"
|
||||
' GvCPxP.DataSource = ObjMovtos.DtResultados.DefaultView.ToTable
|
||||
'End If
|
||||
|
||||
If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero) Then
|
||||
|
||||
GvCxP192.DataSource = ObjCitrus.DTSetResultados.Tables(0)
|
||||
GvComprasAcreed.DataSource = ObjCitrus.DTSetResultados.Tables(1)
|
||||
CxP = ObjCitrus.DTSetResultados.Tables(1)
|
||||
'CxP Productores
|
||||
ObjCitrus.DTSetResultados.Tables(0).DefaultView.Sort = "Cantidad DESC"
|
||||
GvCxP192.DataSource = ObjCitrus.DTSetResultados.Tables(0).DefaultView.ToTable
|
||||
'CxP NO productores
|
||||
ObjCitrus.DTSetResultados.Tables(1).DefaultView.Sort = "Saldo DESC"
|
||||
GvCxP.DataSource = ObjCitrus.DTSetResultados.Tables(1).DefaultView.ToTable
|
||||
'Gastos (Compras acreedores)
|
||||
ObjCitrus.DTSetResultados.Tables(2).DefaultView.Sort = "Moneda,SubTotal DESC"
|
||||
GvComprasAcreed.DataSource = ObjCitrus.DTSetResultados.Tables(2).DefaultView.ToTable
|
||||
'Cuentas x Cobrar
|
||||
ObjCitrus.DTSetResultados.Tables(3).DefaultView.Sort = "SaldoMN DESC"
|
||||
GvCxC.DataSource = ObjCitrus.DTSetResultados.Tables(3).DefaultView.ToTable
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
@@ -240,11 +116,14 @@ Partial Class General_RepIndicadorResumen
|
||||
ObjCitrus.Dispose()
|
||||
|
||||
GvVxP.DataBind()
|
||||
GvCxP192.DataBind()
|
||||
GvCxP192.DataBind() 'Compras Productores
|
||||
GvCxP.DataBind() 'Compras NO productores
|
||||
GvComprasAcreed.DataBind()
|
||||
GvCCxC.DataBind()
|
||||
GvCxP.DataBind()
|
||||
|
||||
GvCxC.DataBind()
|
||||
If GvCxC.DataSource IsNot Nothing Then
|
||||
GvCxC.HeaderRow.Cells(1).Text = "<a href=""/CxC/RepCxC.aspx"" target=""_blank"">Saldo</a>"
|
||||
GvCxC.HeaderRow.Cells(2).Text = "<a href=""/Ventas/RepRecuperacion.aspx"" target=""_blank"">Recuperado</a>"
|
||||
End If
|
||||
|
||||
'Mostrar gráficos solo si hay datos en su respectiva tabla
|
||||
If GvVxP.Rows.Count > 0 Then
|
||||
@@ -262,15 +141,17 @@ Partial Class General_RepIndicadorResumen
|
||||
Else
|
||||
UPGraficaCxP192.Visible = False
|
||||
End If
|
||||
If GvCCxC.Rows.Count > 0 Then
|
||||
UPGraficaCCxC.Visible = True
|
||||
If GvCxC.Rows.Count > 0 Then
|
||||
UPGraficaCxC.Visible = True
|
||||
'UPGraficaCxCRec.Visible = True
|
||||
Else
|
||||
UPGraficaCCxC.Visible = False
|
||||
UPGraficaCxC.Visible = False
|
||||
'UPGraficaCxCRec.Visible = False
|
||||
End If
|
||||
If GvCxP.Rows.Count > 0 Then
|
||||
UPGraficaCPxP.Visible = True
|
||||
UPGraficaCxP.Visible = True
|
||||
Else
|
||||
UPGraficaCPxP.Visible = False
|
||||
UPGraficaCxP.Visible = False
|
||||
End If
|
||||
'If GvIndicadores.Rows.Count > 0 Then
|
||||
' UPGraficaIndicadores.Visible = True
|
||||
@@ -279,8 +160,8 @@ Partial Class General_RepIndicadorResumen
|
||||
'End If
|
||||
|
||||
'Si no había datos en ninguna tabla no cargar función de gráficos
|
||||
If (GvVxP.Rows.Count = 0 AndAlso GvComprasAcreed.Rows.Count = 0 AndAlso GvCxP192.Rows.Count = 0 AndAlso GvCCxC.Rows.Count = 0 AndAlso GvCxP.Rows.Count = 0) Then Exit Sub
|
||||
GraficasPastel()
|
||||
If (GvVxP.Rows.Count = 0 AndAlso GvComprasAcreed.Rows.Count = 0 AndAlso GvCxP192.Rows.Count = 0 AndAlso GvCxC.Rows.Count = 0 AndAlso GvCxP.Rows.Count = 0) Then Exit Sub
|
||||
Graficas()
|
||||
'GraficasBarras()
|
||||
End Sub
|
||||
Protected Sub GvVxP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvVxP.RowDataBound
|
||||
@@ -290,6 +171,24 @@ Partial Class General_RepIndicadorResumen
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvCxP192_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP192.RowDataBound
|
||||
'If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
' 'e.Row.Cells(0).Text = e.Row.DBCampo("Orden")
|
||||
' 'If e.Row.DBCampo("Orden") = "00ND" Then
|
||||
' ' e.Row.CssClass = "Totales"
|
||||
' ' e.Row.Cells(0).Text = "Total " + e.Row.DBCampo("Abreviatura")
|
||||
' 'End If
|
||||
'End If
|
||||
End Sub
|
||||
Protected Sub GvCxP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP.RowDataBound
|
||||
'If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
' If e.Row.DBCampo("Orden") = "" Then
|
||||
' e.Row.CssClass = "Totales"
|
||||
' End If
|
||||
' 'TODO: Sería mejor usar la Abreviatura de la tabla, pero habría que extender PA_Comp_RepCxP para incluir la columna Abreviatura
|
||||
' ' e.Row.Cells(2).Text = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {e.Row.DBCampo("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
'End If
|
||||
End Sub
|
||||
Protected Sub GvComprasAcreed_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvComprasAcreed.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'e.Row.Cells(0).Text = e.Row.DBCampo("Orden")
|
||||
@@ -298,34 +197,16 @@ Partial Class General_RepIndicadorResumen
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvCxP192_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP192.RowDataBound
|
||||
Protected Sub GvCxC_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxC.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'e.Row.Cells(0).Text = e.Row.DBCampo("Orden")
|
||||
'If e.Row.DBCampo("Orden") = "00ND" Then
|
||||
' e.Row.CssClass = "Totales"
|
||||
' e.Row.Cells(0).Text = "Total " + e.Row.DBCampo("Abreviatura")
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvCCxC_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCCxC.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Orden") = "" Then
|
||||
If e.Row.DBCampo("CveCliente") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
' End If
|
||||
' 'TODO: Sería mejor usar la Abreviatura de la tabla, pero habría que extender PA_Comp_RepCxP para incluir la columna Abreviatura
|
||||
e.Row.Cells(0).Text = $"Total {GlobalDTMonedas().FiltraParametros($"CveMoneda = {e.Row.DBCampo("CveMoneda").ToString}").Rows(0)("Moneda").ToString}"
|
||||
End If
|
||||
'TODO: Sería mejor usar la Abreviatura de la tabla, pero habría que extender PA_Comp_RepCxP para incluir la columna Abreviatura
|
||||
' e.Row.Cells(2).Text = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {e.Row.DBCampo("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvCxP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxP.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Orden") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
'TODO: Sería mejor usar la Abreviatura de la tabla, pero habría que extender PA_Comp_RepCxP para incluir la columna Abreviatura
|
||||
' e.Row.Cells(2).Text = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {e.Row.DBCampo("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CreaDataTableColor()
|
||||
DtColor = New DataTable
|
||||
DtColor.Columns.Add("Color")
|
||||
@@ -399,9 +280,9 @@ Partial Class General_RepIndicadorResumen
|
||||
DtColor.Rows.Add(RowColor)
|
||||
End Sub
|
||||
|
||||
Private Sub GraficasPastel()
|
||||
Private Sub Graficas()
|
||||
|
||||
Dim DtVxP, DtCxP, DtCxP192, DtCCxC, DtCPxP As New DataTable
|
||||
Dim DtVxP, DtCxP192, DtCxP, DtCxPA, DtCxC, DtCxCR As New DataTable
|
||||
Dim RowColorIndex As Integer = 0
|
||||
|
||||
'Ventas x Producto
|
||||
@@ -409,16 +290,16 @@ Partial Class General_RepIndicadorResumen
|
||||
DtVxP.Columns.Add("Texto")
|
||||
DtVxP.Columns.Add("Valor")
|
||||
DtVxP.Columns.Add("Color")
|
||||
DtVxP.Columns.Add("Moneda")
|
||||
DtVxP.Columns.Add("Unidad")
|
||||
RowColorIndex = 0
|
||||
For Each Dr As DataRow In VxP.Rows
|
||||
For Each Dr As DataRow In GvVxP.DataSource.Rows
|
||||
If Not Dr("Orden").ToString = "" Then
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = DtVxP.NewRow()
|
||||
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
Row("Texto") = Dr("GPO").ToString
|
||||
Row("Valor") = Dr("SubTotal").ToString.FormatoNumero
|
||||
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
|
||||
'Row("Moneda") = Dr("Abreviatura").ToString
|
||||
Row("Unidad") = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
DtVxP.Rows.Add(Row)
|
||||
RowColorIndex += 1
|
||||
If RowColorIndex = 17 Then
|
||||
@@ -426,141 +307,191 @@ Partial Class General_RepIndicadorResumen
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Dim query_vxp = From s In DtVxP.AsEnumerable().Take(20) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
'Dim vxp = From s In DtVxP.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Unidad = s("Unidad").ToString()}
|
||||
'Dim group_vxp = vxp.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||
' .Texto = Function(x) x.Texto.ToString,
|
||||
' .Valor = Math.Round(Function(x) x.Valor, 2), 'x Tasa de cambio
|
||||
' .Color = g.Min(Function(x) x.Color),
|
||||
' .Unidad = "MXN"
|
||||
'})
|
||||
Dim top_vxp = From s In DtVxP.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Unidad = s("Unidad").ToString()}
|
||||
Dim resto_vxp = From s In DtVxP.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Unidad = s("Unidad").ToString()}
|
||||
Dim group_resto_vxp = resto_vxp.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||
.Texto = "Otros",
|
||||
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||
.Color = "#000000",
|
||||
.Unidad = "MXN"
|
||||
})
|
||||
Dim query_vxp = top_vxp.Union(group_resto_vxp)
|
||||
'Dim query_vxp = top_vxp.Concat(From e In resto_vxp Group e By e.Texto Into gpo = Group)
|
||||
'Dim group_resto_vxp = From e In resto_vxp Group e By e.Texto Into gpo = Group
|
||||
'Dim group_resto_vxp = resto_vxp.GroupBy(Function(e) New With {Key e.Texto, Key e.Valor, Key e.Color, Key e.Unidad}).ToList()
|
||||
|
||||
'Compras x Producto TipoProveedor=1
|
||||
DtCxP.Reset()
|
||||
DtCxP.Columns.Add("Texto")
|
||||
DtCxP.Columns.Add("Valor")
|
||||
DtCxP.Columns.Add("Color")
|
||||
DtCxP.Columns.Add("Moneda")
|
||||
RowColorIndex = 0
|
||||
For Each Dr As DataRow In CxP.Rows
|
||||
If Dr("CveClasificacion").ToString <> "" Then
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = DtCxP.NewRow()
|
||||
Row("Texto") = Dr("Clasificacion").ToString ' $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
Row("Valor") = Dr("SubTotal").ToString.FormatoNumero
|
||||
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
|
||||
Row("Moneda") = Dr("Moneda").ToString
|
||||
DtCxP.Rows.Add(Row)
|
||||
RowColorIndex += 1
|
||||
If RowColorIndex = 17 Then
|
||||
RowColorIndex = 0
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Dim query_cxp = From s In DtCxP.AsEnumerable().Take(20) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
|
||||
'Compras x Producto ProveedorClasificacion=192
|
||||
'Compras ProveedorClasificacion=192
|
||||
DtCxP192.Reset()
|
||||
DtCxP192.Columns.Add("Texto")
|
||||
DtCxP192.Columns.Add("Valor")
|
||||
DtCxP192.Columns.Add("Color")
|
||||
DtCxP192.Columns.Add("Moneda")
|
||||
DtCxP192.Columns.Add("Unidad")
|
||||
RowColorIndex = 0
|
||||
For Each Dr As DataRow In CxP192.Rows
|
||||
If Not Dr("Orden").ToString = "00ND" Then
|
||||
For Each Dr As DataRow In GvCxP192.DataSource.Rows
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = DtCxP192.NewRow()
|
||||
Row("Texto") = Dr("RazonSocial").ToString
|
||||
Row("Valor") = Dr("Cantidad").ToString.FormatoNumero
|
||||
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
|
||||
Row("Unidad") = "Kg"
|
||||
DtCxP192.Rows.Add(Row)
|
||||
RowColorIndex += 1
|
||||
If RowColorIndex = 17 Then
|
||||
RowColorIndex = 0
|
||||
End If
|
||||
Next
|
||||
Dim top_cxp192 = From s In DtCxP192.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Unidad = s("Unidad").ToString()}
|
||||
Dim resto_cxp192 = From s In DtCxP192.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Unidad = s("Unidad").ToString()}
|
||||
Dim group_resto_cxp192 = resto_cxp192.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||
.Texto = "Otros",
|
||||
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||
.Color = "#000000",
|
||||
.Unidad = "MXN"
|
||||
})
|
||||
Dim query_cxp192 = top_cxp192.Union(group_resto_cxp192)
|
||||
|
||||
'Compras NO proveedor
|
||||
DtCxP.Reset()
|
||||
DtCxP.Columns.Add("Texto")
|
||||
DtCxP.Columns.Add("Valor")
|
||||
DtCxP.Columns.Add("Color")
|
||||
DtCxP.Columns.Add("Unidad")
|
||||
RowColorIndex = 0
|
||||
For Each Dr As DataRow In GvCxP.DataSource.Rows
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = DtCxP.NewRow()
|
||||
Row("Texto") = Dr("RazonSocial").ToString
|
||||
Row("Valor") = Dr("Saldo").ToString.FormatoNumero
|
||||
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
|
||||
Row("Unidad") = "MXN"
|
||||
DtCxP.Rows.Add(Row)
|
||||
RowColorIndex += 1
|
||||
If RowColorIndex = 17 Then
|
||||
RowColorIndex = 0
|
||||
End If
|
||||
Next
|
||||
Dim top_cxp = From s In DtCxP.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Unidad = s("Unidad").ToString()}
|
||||
Dim resto_cxp = From s In DtCxP.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Unidad = s("Unidad").ToString()}
|
||||
Dim group_resto_cxp = resto_cxp.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||
.Texto = "Otros",
|
||||
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||
.Color = "#000000",
|
||||
.Unidad = "MXN"
|
||||
})
|
||||
Dim query_cxp = top_cxp.Union(group_resto_cxp)
|
||||
|
||||
'Compras x Producto TipoProveedor=1 Acreedores (Gastos)
|
||||
DtCxPA.Reset()
|
||||
DtCxPA.Columns.Add("Texto")
|
||||
DtCxPA.Columns.Add("Valor")
|
||||
DtCxPA.Columns.Add("Color")
|
||||
DtCxPA.Columns.Add("Unidad")
|
||||
RowColorIndex = 0
|
||||
For Each Dr As DataRow In GvComprasAcreed.DataSource.Rows
|
||||
If Dr("CveClasificacion").ToString <> "" Then
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = DtCxP192.NewRow()
|
||||
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
Row = DtCxPA.NewRow()
|
||||
Row("Texto") = Dr("Clasificacion").ToString
|
||||
Row("Valor") = Dr("SubTotal").ToString.FormatoNumero
|
||||
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
|
||||
Row("Moneda") = Dr("Abreviatura").ToString
|
||||
DtCxP192.Rows.Add(Row)
|
||||
Row("Unidad") = Dr("Moneda").ToString
|
||||
DtCxPA.Rows.Add(Row)
|
||||
RowColorIndex += 1
|
||||
If RowColorIndex = 17 Then
|
||||
RowColorIndex = 0
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Dim query_cxp192 = From s In DtCxP192.AsEnumerable().Take(20) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
Dim top_cxpa = From s In DtCxPA.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Unidad = s("Unidad").ToString()}
|
||||
Dim resto_cxpa = From s In DtCxPA.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Unidad = s("Unidad").ToString()}
|
||||
Dim group_resto_cxpa = resto_cxpa.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||
.Texto = "Otros",
|
||||
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||
.Color = "#000000",
|
||||
.Unidad = "MXN"
|
||||
})
|
||||
Dim query_cxpa = top_cxpa.Union(group_resto_cxpa)
|
||||
|
||||
'Alert(Newtonsoft.Json.JsonConvert.SerializeObject(CCxC.Rows))
|
||||
|
||||
'Cuentas por cobrar x Cliente
|
||||
DtCCxC.Reset()
|
||||
DtCCxC.Columns.Add("Texto")
|
||||
DtCCxC.Columns.Add("Valor")
|
||||
DtCCxC.Columns.Add("Color")
|
||||
DtCCxC.Columns.Add("Moneda")
|
||||
'Cuentas por cobrar x Cliente -- Saldo
|
||||
DtCxC.Reset()
|
||||
DtCxC.Columns.Add("Texto")
|
||||
DtCxC.Columns.Add("Valor")
|
||||
DtCxC.Columns.Add("Color")
|
||||
DtCxC.Columns.Add("Unidad")
|
||||
RowColorIndex = 0
|
||||
For Each Dr As DataRow In CCxC.Rows
|
||||
If Not Dr("Orden").ToString = "" Then
|
||||
For Each Dr As DataRow In GvCxC.DataSource.Rows
|
||||
If Not Dr("CveCliente").ToString = "" Then
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = DtCCxC.NewRow()
|
||||
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
Row("Valor") = Dr("Saldo").ToString.FormatoNumero
|
||||
Row = DtCxC.NewRow()
|
||||
Row("Texto") = Dr("RazonSocial").ToString
|
||||
Row("Valor") = Dr("SaldoMN").ToString.FormatoNumero
|
||||
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
|
||||
Row("Moneda") = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
DtCCxC.Rows.Add(Row)
|
||||
Row("Unidad") = "MXN" '$"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
DtCxC.Rows.Add(Row)
|
||||
RowColorIndex += 1
|
||||
If RowColorIndex = 17 Then
|
||||
RowColorIndex = 0
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Dim query_ccxc = From s In DtCCxC.AsEnumerable().Take(20) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
Dim top_cxc = From s In DtCxC.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Unidad = s("Unidad").ToString()}
|
||||
Dim resto_cxc = From s In DtCxC.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Unidad = s("Unidad").ToString()}
|
||||
Dim group_resto_cxc = resto_cxc.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||
.Texto = "Otros",
|
||||
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||
.Color = "#000000",
|
||||
.Unidad = "MXN"
|
||||
})
|
||||
Dim query_cxc = top_cxc.Union(group_resto_cxc)
|
||||
|
||||
'Cuentas por pagar x Proveedor
|
||||
DtCPxP.Reset()
|
||||
DtCPxP.Columns.Add("Texto")
|
||||
DtCPxP.Columns.Add("Valor")
|
||||
DtCPxP.Columns.Add("Color")
|
||||
DtCPxP.Columns.Add("Moneda")
|
||||
'Cuentas por cobrar x Cliente -- Recuperado
|
||||
DtCxCR.Reset()
|
||||
DtCxCR.Columns.Add("Texto")
|
||||
DtCxCR.Columns.Add("Valor")
|
||||
DtCxCR.Columns.Add("Color")
|
||||
DtCxCR.Columns.Add("Unidad")
|
||||
RowColorIndex = 0
|
||||
For Each Dr As DataRow In CPxP.Rows
|
||||
If Not Dr("Orden").ToString = "" Then
|
||||
For Each Dr As DataRow In GvCxC.DataSource.Rows
|
||||
If Not Dr("CveCliente").ToString = "" Then
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = DtCPxP.NewRow()
|
||||
Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
Row("Valor") = Dr("Saldo").ToString.FormatoNumero
|
||||
Row = DtCxCR.NewRow()
|
||||
Row("Texto") = Dr("RazonSocial").ToString
|
||||
Row("Valor") = Dr("RecuperadoMN").ToString.FormatoNumero
|
||||
Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
|
||||
Row("Moneda") = $"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
DtCPxP.Rows.Add(Row)
|
||||
Row("Unidad") = "MXN" '$"{GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
DtCxCR.Rows.Add(Row)
|
||||
RowColorIndex += 1
|
||||
If RowColorIndex = 17 Then
|
||||
RowColorIndex = 0
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Dim query_cpxp = From s In DtCPxP.AsEnumerable().Take(20) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
Dim top_cxcr = From s In DtCxCR.AsEnumerable().Take(10) Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Unidad = s("Unidad").ToString()}
|
||||
Dim resto_cxcr = From s In DtCxCR.AsEnumerable().Skip(10) Select New With {.Texto = "Otros", .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Unidad = s("Unidad").ToString()}
|
||||
Dim group_resto_cxcr = resto_cxcr.GroupBy(Function(x) x.Texto).[Select](Function(g) New With {
|
||||
.Texto = "Otros",
|
||||
.Valor = Math.Round(g.Sum(Function(x) x.Valor), 2),
|
||||
.Color = "#000000",
|
||||
.Unidad = "MXN"
|
||||
})
|
||||
Dim query_cxcr = top_cxcr.Union(group_resto_cxcr)
|
||||
|
||||
'Alert(Newtonsoft.Json.JsonConvert.SerializeObject(CxC.Rows))
|
||||
|
||||
'TODO: Indicadores x Proveedor -- Determinar qué poner en la gráfica con E172
|
||||
|
||||
'Serializar datos agrupándolos por su respectivo DataTable, todos en un solo JSON
|
||||
Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CxP = query_cxp, .CxP192 = query_cxp192, .CCxC = query_ccxc, .CPxP = query_cpxp})
|
||||
'Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CCxC = New String() {}})
|
||||
Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CxP192 = query_cxp192, .CxP = query_cxp, .CxPA = query_cxpa, .CxC = query_cxc, .CxCR = query_cxcr})
|
||||
'Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.VxP = query_vxp, .CxC = New String() {}})
|
||||
'Alert(json)
|
||||
RegistraScript($"CargaGraficasPastel({json})", "22")
|
||||
RegistraScript($"CargaGraficas({json})", "sdkp24223")
|
||||
UPPMov.Update()
|
||||
End Sub
|
||||
Private Sub GraficasBarras()
|
||||
'Dim Dt As New DataTable()
|
||||
'Dt.Columns.Add("Texto")
|
||||
'Dt.Columns.Add("Valor")
|
||||
'Dt.Columns.Add("Color")
|
||||
'Dt.Columns.Add("Moneda")
|
||||
'Dim RowColorIndex As Integer = 0
|
||||
'For Each Dr As DataRow In VxC.Rows
|
||||
' If Not Dr("Orden").ToString = "" Then
|
||||
' Dim Row As DataRow = Nothing
|
||||
' Row = Dt.NewRow()
|
||||
' Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}"
|
||||
' Row("Valor") = Dr("SubTotal").ToString.FormatoNumero
|
||||
' Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString
|
||||
' Row("Moneda") = Dr("Moneda").ToString
|
||||
' Dt.Rows.Add(Row)
|
||||
' RowColorIndex += 1
|
||||
' If RowColorIndex = 17 Then
|
||||
' RowColorIndex = 0
|
||||
' End If
|
||||
' End If
|
||||
'Next
|
||||
|
||||
'Dim query = From s In Dt.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()}
|
||||
'Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(query)
|
||||
'RegistraScript($"CargaGraficasBarras({json})", "22")
|
||||
'UPPMov.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -916,6 +916,8 @@ Partial Class Inventarios_RepAnomalias
|
||||
'UPAcciones.Update()
|
||||
End Sub
|
||||
Private Sub LnkGuardar_Click(sender As Object, e As EventArgs) Handles LnkGuardar.Click
|
||||
ChkRelacionarInventario.Checked = True
|
||||
UpFecha.Update()
|
||||
RegistraScript("$('#ModalGuardar').modal('show')")
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -377,7 +377,7 @@ public class TareasJam : IHttpHandler
|
||||
}
|
||||
|
||||
|
||||
// ErrorProceso = true;
|
||||
//ErrorProceso = true;
|
||||
|
||||
|
||||
if (!ErrorProceso)
|
||||
|
||||
@@ -1886,6 +1886,18 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveAcercamiento As Integer
|
||||
Get
|
||||
If ViewState("CveAcercamiento") Is Nothing Then
|
||||
ViewState("CveAcercamiento") = -1
|
||||
End If
|
||||
Return ViewState("CveAcercamiento").ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveAcercamiento") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveEmpresaCRM As Integer
|
||||
Get
|
||||
Return ViewState("CveEmpresaCRM").ToString().ToEntero()
|
||||
@@ -1895,6 +1907,7 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property CveAcercamientoCRM As Integer
|
||||
Get
|
||||
Return ViewState("CveAcercamientoCRM").ToString().ToEntero()
|
||||
@@ -10072,6 +10085,18 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveEmpresaCRM > 0 AndAlso CveAcercamientoCRM > 0 Then
|
||||
|
||||
Dim ArchivoCotRdlc As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim ArchivoCotMrt As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.mrt", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
If ArchivoCotRdlc.Exists Or ArchivoCotMrt.Exists Then
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))
|
||||
Else
|
||||
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
|
||||
End If
|
||||
End If
|
||||
|
||||
'ERROR DE NO TIMBRADO
|
||||
If Not SeTimbro And (DdlTipoComprobante.SelectedValue = "Ing" Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev") Or DdlTipoComprobante.SelectedValue = "Ant") Then
|
||||
MensajeAlert.AppendFormat("La factura no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir.")
|
||||
@@ -10100,6 +10125,10 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveEmpresaCRM > 0 AndAlso CveAcercamientoCRM > 0 Then
|
||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta))}'", "Imprimir")
|
||||
End If
|
||||
|
||||
'DESCARGAR PDF DE CICOVISA
|
||||
'If UsuarioActual.CveEmpresa = 72 And CveCliente = 70381 Then
|
||||
' If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
|
||||
@@ -10108,6 +10137,7 @@ Partial Class Ventas
|
||||
'End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
|
||||
If Not CveEmpresaCRM > 0 Then
|
||||
|
||||
'EN EMPRESA DE ACUMULADORES NO DESCARGAR EL PDF
|
||||
@@ -10194,7 +10224,18 @@ Partial Class Ventas
|
||||
Liga2 = $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}"";"
|
||||
End If
|
||||
|
||||
Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False)
|
||||
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveEmpresaCRM > 0 AndAlso CveAcercamientoCRM > 0 Then
|
||||
Liga = $"document.location.href=""/CRM/Acercamiento.aspx?CveAcercamiento={CveAcercamientoCRM}&OPTAB=COT"";"
|
||||
Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga, TextoConfirmacion:="Aceptar", TextoSegundoBoton:=Nothing, JSBtn2:=Nothing, ShowCloseButton:=False)
|
||||
Else
|
||||
Alert(MensajeAlert.ToString(), TipoMensaje.MsgDosBotones, Liga, TextoConfirmacion:="Seguir Registrando", TextoSegundoBoton:="Ir al Cliente", JSBtn2:=Liga2, ShowCloseButton:=False)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
MensajeAlert.Clear()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user