Merge ClsVentas
This commit is contained in:
@@ -118,7 +118,7 @@ Partial Class CatClasificaciones
|
||||
'End If
|
||||
'Cuenta.Dispose()
|
||||
Else
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 2 Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
DivCuentaIngresos.Visible = False
|
||||
DivCuentaCostos.Visible = False
|
||||
DivCuentaGasto.Visible = False
|
||||
@@ -224,17 +224,26 @@ Partial Class CatClasificaciones
|
||||
|
||||
|
||||
Private Sub CargaCuentasContables(Optional IdCuentaPadre As Integer = -1)
|
||||
Dim ObjEmpresa As New ClsSisEmpresas
|
||||
Dim Empresa As Empresa = Nothing
|
||||
If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
Empresa = ObjEmpresa.Empresa
|
||||
Dim ObjContabilidad As New ClsContPAQi(Empresa)
|
||||
If ObjContabilidad.GetCuentas(-1, "-1", 1, 20000) Then
|
||||
DtCuentasContables = ObjContabilidad.DtResultados
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||
|
||||
Dim ObjEmpresa As New ClsSisEmpresas
|
||||
Dim Empresa As Empresa = Nothing
|
||||
If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
Empresa = ObjEmpresa.Empresa
|
||||
Dim ObjContabilidad As New ClsContPAQi(Empresa)
|
||||
If ObjContabilidad.GetCuentas(-1, "-1", 1, 20000) Then
|
||||
DtCuentasContables = ObjContabilidad.DtResultados
|
||||
End If
|
||||
ObjContabilidad.Dispose()
|
||||
End If
|
||||
ObjContabilidad.Dispose()
|
||||
ObjEmpresa.Dispose()
|
||||
ElseIf UsuarioActual.Empresa.TipoContabilizacion = 2 Then
|
||||
DdlCuentaGasto.DataValueField = "CveCuenta"
|
||||
DdlCuentaGasto.DataTextField = "Cuenta"
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCargarCuentas_Click(sender As Object, e As EventArgs) Handles BtnCargarCuentas.Click
|
||||
|
||||
@@ -3048,7 +3048,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoDefecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoDefecto" DataValueField="CveTipoDefecto" Width="100%" OnSelectedIndexChanged="DdlTipoDefecto_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:DropDownList ID="DdlTipoDefecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="CodigoTipoDefectoTexto" DataValueField="CveTipoDefecto" Width="100%" OnSelectedIndexChanged="DdlTipoDefecto_SelectedIndexChanged" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoDefecto" runat="server" ControlToValidate="DdlTipoDefecto" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Defecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETipoDefecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoDefecto"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
@@ -688,7 +688,7 @@ Partial Class PV
|
||||
Get
|
||||
Return New Dictionary(Of Integer, Decimal) From {
|
||||
{20516, 0.23D}, 'Descuento para lubricantes LTH
|
||||
{20515, 0.24D} 'Descuento para filtros LTH
|
||||
{20515, 0.28D} 'Descuento para filtros LTH
|
||||
}
|
||||
End Get
|
||||
End Property
|
||||
@@ -4020,7 +4020,7 @@ Partial Class PV
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlTipoDefecto_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlTipoDefecto.SelectedIndexChanged
|
||||
If DdlTipoDefecto.SelectedValue.ToEntero = 17 Then
|
||||
If DdlTipoDefecto.SelectedValue.Contiene("17", "18", "20") Then
|
||||
DivCodigoTD.Visible = True
|
||||
DdlTipoDefecto.Width = New Unit(140%)
|
||||
Else
|
||||
|
||||
@@ -196,6 +196,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSubProyectoSaldar" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlSubProyectoSaldar.ClientID.ToString()%>">Centro Costo:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtConcepto" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="VgGuardar"></asp:RequiredFieldValidator>
|
||||
|
||||
@@ -94,7 +94,9 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
|
||||
DdlSucursal.DataSource = get_GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa);
|
||||
DdlSucursal.DataBind();
|
||||
DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlSucursal.SelectedValue = "-1";
|
||||
DdlSucursal.SelectedValue = "-1";
|
||||
DdlSubProyectoSaldar.DataSource = get_GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa);
|
||||
DdlSubProyectoSaldar.DataBind();
|
||||
}
|
||||
|
||||
//protected void CargaClientes()
|
||||
@@ -386,7 +388,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 78, TxtConcepto.Text, TxtFecha.Text.ToDate(), UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE, CveVenta, ImporteMX: Gv.DataKey("Saldo").ToDecimal(), CveCuenta: -1, CveSubProyecto: Gv.DataKey("CveSubProyecto").ToEntero()))
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Folio").ToString(), 78, TxtConcepto.Text, TxtFecha.Text.ToDate(), UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE, CveVenta, ImporteMX: Gv.DataKey("Saldo").ToDecimal(), CveCuenta: -1, CveSubProyecto: DdlSubProyectoSaldar.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "Ocurrio un error al saldar el movimiento";
|
||||
break;
|
||||
|
||||
@@ -645,7 +645,9 @@ Partial Class Ventas_RepVentas
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
If DtVentas IsNot Nothing Then
|
||||
Dim StrFiltro As New StringBuilder
|
||||
StrFiltro.AppendFormat(" <b>Agrupado por</b>: {0}", DdlGrupo.SelectedItem.Text)
|
||||
StrFiltro.AppendFormat(" <b>Agrupado por</b>: {0}", DdlGrupo.SelectedItem.Text)
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepVentas.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim ruta As String = ""
|
||||
|
||||
If DdlTipoComprobante.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>Tipo Documento</b>: {0}", DdlTipoComprobante.GetSelectedText)
|
||||
If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" <b>Fecha Inicio </b>: {0}", txtFechaI.Text.ToDate.ToShortDateString)
|
||||
@@ -653,7 +655,7 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
If DdlProyecto.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Proyecto</b>: {0}", DdlProyecto.SelectedItem.Text)
|
||||
If DdlSubProyecto.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>SubProyecto</b>: {0}", DdlSubProyecto.GetSelectedText)
|
||||
If DdlClientes.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Cliente</b>: {0}", DdlClientes.SelectedText)
|
||||
If DdlClientes.SelectedValue <> "" Then StrFiltro.AppendFormat(" <b>Cliente</b>: {0}", DdlClientes.SelectedText)
|
||||
If DdlVendedor.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>Vendedor</b>: {0}", DdlVendedor.GetSelectedText)
|
||||
If DdlEstatus.GetSelectedText <> "" Then StrFiltro.AppendFormat(" <b>Estatus</b>: {0}", DdlEstatus.GetSelectedText)
|
||||
If DdlSubProyectoEjecucion.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" <b>Proyecto Ejecución</b>: {0}", DdlSubProyectoEjecucion.SelectedItem.Text)
|
||||
@@ -682,8 +684,15 @@ Partial Class Ventas_RepVentas
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
If Archivo.Exists Then
|
||||
ruta = UsuarioActual.Empresa.Ruta & "Formatos/RepVentas.rdlc"
|
||||
Else
|
||||
ruta = "Empresas/Grales/Formatos/RepVentas.rdlc"
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepVentas.rdlc", dt, params, String.Format("ReporteVentas-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato)
|
||||
|
||||
ImprimirPDF(ruta, dt, params, String.Format("ReporteVentas-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Serie Folio" DataTextField="SerieFolio" DataTextFormatString="{0}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Center" HeaderText="Fecha" DataTextField="FechaVenta" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveVenta,CveVendedor,FechaI,FechaF,CveCliente,Orden,CveSubProyecto,CvePS,CveClasificacion" DataNavigateUrlFormatString="RepVentasUtilidadDetalle.aspx?CveVenta={0}&CveVendedor={1}&FechaI={2:d}&FechaF={3:d}&CveCliente={4}&Orden={5}&CveSubProyecto={6}&CvePS={7}&CveClasificacion={8}"/>
|
||||
|
||||
@@ -181,6 +181,9 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
End If
|
||||
|
||||
If Not e.Row.RowIndex = 0 AndAlso e.Row.DBCampo("SubTotal").ToDecimal = 0 AndAlso e.Row.DBCampo("CveVenta").ToEntero > 0 Then
|
||||
If e.Row.DBCampo("FechaVenta").ToDate < txtFechaI.Text.ToDate.FirstDayOfMonth Then
|
||||
e.Row.ToolTip = "Venta con realizada en un periodo anterior"
|
||||
End If
|
||||
e.Row.CssClass = "danger"
|
||||
ElseIf Not e.Row.RowIndex = 0 AndAlso e.Row.DBCampo("CveVenta") <> "" Then
|
||||
e.Row.Cells(0).BackColor = ColorTranslator.FromHtml("#e9e9e9")
|
||||
@@ -218,6 +221,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
|
||||
If e.Row.DBCampo("CveVenta").ToEntero > 0 AndAlso Not CBool(e.Row.DBCampo("TienePago")) Then
|
||||
e.Row.Cells(15).BackColor = Drawing.Color.LightPink
|
||||
e.Row.Cells(15).ToolTip = "Factura sin pago registrado"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user