This commit is contained in:
2022-01-12 21:29:10 -07:00
43 changed files with 522 additions and 321 deletions

View File

@@ -64,20 +64,20 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAutorizacion,CveCliente,CveVendedor,Importe"
EmptyDataText="No se encontraron autorizaciones" ToolTip="Listado de autorizaciones"
EmptyDataText="No se encontraron autorizaciones" ToolTip=""
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" Width="100%" GridLines="None">
<Columns>
<asp:HyperLinkField DataTextField="NombreComercial" Target="_blank" HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
<asp:BoundField DataField="Vendedor" HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
<asp:BoundField DataField="Importe" ItemStyle-Width="15%" HeaderText="Importe" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N2}" />
<asp:BoundField DataField="LimiteCredito" ItemStyle-Width="15%" HeaderText="Limite Credito" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N2}" />
<asp:BoundField DataField="Saldo" ItemStyle-Width="15%" HeaderText="Saldo" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N2}" />
<asp:BoundField DataField="FechaIng" ItemStyle-Width="10%" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField DataField="Vendedor" HeaderText="Vendedor" ItemStyle-Width="15%" />
<asp:BoundField DataField="Importe" ItemStyle-Width="15%" HeaderText="Importe" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
<asp:BoundField DataField="LimiteCredito" ItemStyle-Width="10%" HeaderText="Limite Credito" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
<asp:BoundField DataField="Saldo" ItemStyle-Width="10%" HeaderText="Saldo" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
<asp:BoundField DataField="FechaIng" ItemStyle-Width="10%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField DataField="TipoAutorizacionTexto" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="15%" HeaderText="Dias Vencidos" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
<asp:BoundField DataField="TipoDocumento" HeaderText="Tipo Documento" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="5%" HeaderText="Dias Vencidos" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
<asp:BoundField DataField="TipoDocumento" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="5%" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%">
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
<ItemTemplate>
<asp:Label ID="LblEstatus" Text='<%# Eval("Estatus") %>' runat="server"></asp:Label>
</ItemTemplate>

View File

@@ -24,21 +24,25 @@ Partial Class Ventas_CatAutorizacionLimites
#End Region
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaCombos()
CargaDatos()
End If
End Sub
#Region "CARGAS"
Private Sub CargaCombos()
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
If Not IsPostBack Then
CargaCombos()
CargaDatos()
End If
End Sub
#Region "CARGAS"
Private Sub CargaCombos()
DdlCliente.setEsWebService(True)
DdlClienteFiltro.setEsWebService(True)
'Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
'If EsWS Then
DdlCliente.setEsWebService(True)
DdlClienteFiltro.setEsWebService(True)
Else
DdlCliente.setEsWebService(False)
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
' DdlCliente.setEsWebService(True)
' DdlClienteFiltro.setEsWebService(True)
'Else
' DdlCliente.setEsWebService(False)
' DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
' DdlCliente.DataBind()
' DdlCliente.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))

View File

@@ -1787,7 +1787,7 @@ Partial Class Clientes
If ObjClientes.TipoCliente = 2 Then
TabFiscalContable.Visible = False
TabCxC.Visible = False
TabAnticipos.Visible = False
'TabAnticipos.Visible = False
TabRetenciones.Visible = False
TabOS.Visible = False
TabComplementos.Visible = False

View File

@@ -6768,10 +6768,19 @@ Partial Class PV
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
DdlBCIAjuste.Items.Clear()
If DTBCIUsados IsNot Nothing AndAlso CveTamanio > 0 Then
DdlBCIAjuste.Items.Clear()
DdlBCIAjuste.DataSource = DTBCIUsados.FiltraParametros($"CveTamaño={CveTamanio}")
DdlBCIAjuste.DataBind()
DdlBCIAjuste.Items.Insert(0, New ListItem("Seleccione", "-1"))
RFVAnio.Enabled = True
If CveTamanio = 16 Then 'motobaterias
DdlBCIAjuste.Items.Insert(0, New ListItem(" - ", "0"))
RFVAnio.Enabled = False
End If
UPPDatosUsado.Update() ''refresca el RFV
Else
DdlBCIAjuste.Items.Insert(0, New ListItem(" - ", "0"))
End If
DdlTipoUso.Items.Clear()

View File

@@ -183,8 +183,8 @@
</tr>
<tr>
<td>
<div id="DivFacturas" style="overflow-y: auto; width: 760px; max-height: 215px;">
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None">
<div id="DivFacturas" style="overflow-y: auto; width: 760px; max-height: 165px;">
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None">
<Columns>
<asp:TemplateField>
<HeaderTemplate>Tipo</HeaderTemplate>
@@ -210,30 +210,36 @@
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Pedido/OC</HeaderTemplate>
<asp:TemplateField>
<HeaderTemplate>Sucursal</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlPedidoContrato" runat="server"></asp:Literal>
<asp:Literal ID="LtlSucursal" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Total</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Sucursal</HeaderTemplate>
<HeaderTemplate>Mon</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlSucursal" runat="server"></asp:Literal>
<asp:Literal ID="LtlMon" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Estatus</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlEstatus" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Pedido/OC</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlPedidoContrato" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>XML</HeaderTemplate>
<ItemTemplate>

View File

@@ -151,19 +151,10 @@ Partial Class PopUpBuscarFolio
Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
'If e.Row.RowIndex = 0 Then
' e.Row.Cells(0).Width = Unit.Pixel(38)
' e.Row.Cells(1).Width = Unit.Pixel(65)
' e.Row.Cells(2).Width = Unit.Pixel(70)
' e.Row.Cells(3).Width = Unit.Pixel(250)
' 'e.Row.Cells(4).Width = Unit.Pixel(75)
' e.Row.Cells(4).Width = Unit.Pixel(75)
' e.Row.Cells(5).Width = Unit.Pixel(100)
' e.Row.Cells(6).Width = Unit.Pixel(100)
'End If
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
'e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
Dim Liga As String = String.Format("<a class='Texto' href='javascript:Ir(""{0}"");'>", e.Row.DBCampo("CveVenta"))
If UsuarioActual.CveEmpresa = 140 AndAlso e.Row.DBCampo("TipoDocto").Contiene("Rem") Then
@@ -171,11 +162,12 @@ Partial Class PopUpBuscarFolio
End If
e.Row.FCLiteral("LtlTipo").Text = String.Format("<div class='truncate' style='width:27px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("TipoDocto"))
e.Row.FCLiteral("LtlFolio").Text = String.Format("<div class='truncate' style='width:56px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Folio"))
e.Row.FCLiteral("LtlFolio").Text = String.Format("<div class='truncate' style='width:95px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Folio"))
e.Row.FCLiteral("LtlFecha").Text = String.Format("<div class='truncate' style='width:64px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Fecha").ToDate.ToShortDateString)
e.Row.FCLiteral("LtlNombre").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Nombre"))
'e.Row.FCLiteral("LtlSubTotal").Text = Liga & e.Row.DBCampo("SubTotal").FormatoNumero & "&nbsp;</a>"
e.Row.FCLiteral("LtlTotal").Text = String.Format("<div class='truncate' style='width:56px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Total").FormatoNumero)
e.Row.FCLiteral("LtlMon").Text = String.Format("<div class='truncate' style='width:30px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Abreviatura"))
e.Row.FCLiteral("LtlSucursal").Text = String.Format("<div class='truncate' style='width:80px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("SubProyecto"))
e.Row.FCLiteral("LtlEstatus").Text = String.Format("<div class='truncate' style='width:80px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("EstatusFactura"))
e.Row.FCLiteral("LtlPedidoContrato").Text = String.Format("<div class='truncate' style='width:80px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("PedidoContrato"))

View File

@@ -65,12 +65,10 @@ Partial Class Ventas_RepAuxiliarFacturas
End Sub
#Region "C A R G A - C O M B O S"
Private Sub CargaClientes()
DdlClientes.ddl.Items.Clear()
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
DdlClientes.DataBind()
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
'Private Sub CargaClientes()
' DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
'End Sub
Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs)
DdlEstatus.Items.Clear()
@@ -139,7 +137,7 @@ Partial Class Ventas_RepAuxiliarFacturas
Private Sub CargaCombos()
'Cargo Clientes
CargaClientes()
'CargaClientes()
'Cargo Proyectos
DdlProyecto.DataSource = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1)

View File

@@ -130,12 +130,15 @@
</ADS:Dropdownlost>
</div>
<label class="col-md-1">Contrato: </label>
<div class="col-md-2">
<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlContrato" DataTextField="ContratoCompleto" DataValueField="CveContrato" runat="server">
</asp:DropDownList>
</div>
<label class="col-md-1 ">Vendedor:</label>
<div class="col-md-2">
<asp:ListBox ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
<%-- <asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
</div>
</div>
</div>
</div>
@@ -188,13 +191,13 @@
</div>
</div>
<label class="col-md-1 ">Vendedor:</label>
<div class="col-md-2">
<asp:ListBox ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
<%-- <asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
</div>
<label class="col-md-1">Contrato: </label>
<div class="col-md-2">
<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlContrato" DataTextField="ContratoCompleto" DataValueField="CveContrato" runat="server">
</asp:DropDownList>
</div>
</div>
</div>
</div>
@@ -232,7 +235,7 @@
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label Text="Fecha Vencimiento" runat="server" CausesValidation="false"> </asp:Label>
<asp:Label Text="F. Vencimiento" runat="server" CausesValidation="false"> </asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaVencimiento" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}") %>'></asp:Literal>
@@ -287,7 +290,7 @@
<asp:Literal ID="LtlIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="10%" >
<HeaderTemplate>
<asp:Label Text="Total" runat="server" CausesValidation="false"> </asp:Label>
</HeaderTemplate>

View File

@@ -66,7 +66,7 @@ Partial Class Ventas_RepVentasUtilidad
'Cargo categorias
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
DdlCategoria.DataBind()
DdlCategoria.Items.Insert(0, New ListItem("Todas", "-1"))
'Cargo Clasificaciones
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
@@ -164,7 +164,7 @@ Partial Class Ventas_RepVentasUtilidad
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
DtVentas = ObjVentas.DtResultados
GvDatos.DataSource = ObjVentas.DtResultados
GvDatos.DataBind()
@@ -315,7 +315,7 @@ Partial Class Ventas_RepVentasUtilidad
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
Dim FechaInicio As String = txtFechaI.Text
Dim FechaFin As String = txtFechaF.Text

View File

@@ -178,7 +178,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, If(CveVenta = -1, Orden, CveVenta), DdlClientes.SelectedValue.ToEntero, Sucursales,
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
DtVentas = ObjVentas.DtResultados
GvDatos.DataSource = ObjVentas.DtResultados
GvDatos.DataBind()
@@ -299,7 +299,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, CveVenta, DdlClientes.SelectedValue.ToEntero, Sucursales,
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, ddlmarcas.selectedvalue.toentero) Then
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
Dim FechaInicio As String = txtFechaI.Text
Dim FechaFin As String = txtFechaF.Text
@@ -361,7 +361,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
If ObjVentas.GetReporteVentasUtilidadDetalle(Vendedores, CveVenta, DdlClientes.SelectedValue.ToEntero, Sucursales,
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, -1, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero, -1) Then
Dim FechaInicio As String = txtFechaI.Text
Dim FechaFin As String = txtFechaF.Text

View File

@@ -178,6 +178,16 @@
<div class="col-md-2">
<asp:Dropdownlist runat="server" ID="DdlMarcas" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="Marca" DataValueField="CveMarca" />
</div>
<div class="col-md-1 truncate" id="divgarantia1" runat="server" visible="false">
Garantía:
</div>
<div class="col-md-2" id="divgarantia2" runat="server" visible="false">
<asp:Dropdownlist runat="server" ID="DdlGarantia" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%">
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:Dropdownlist>
</div>
</div>
</div>
</div>

View File

@@ -71,6 +71,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
'Cargo categorias
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
DdlCategoria.DataBind()
DdlCategoria.Items.Insert(0, New ListItem("Todas", "-1"))
'Cargo Clasificaciones
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
@@ -90,6 +91,12 @@ Partial Class Ventas_RepVentasUtilidadPadre
DdlPS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End If
'garantia
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
divgarantia1.visible = True
divgarantia2.visible = True
End If
DdlMarcas.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
DdlMarcas.DataBind()
DdlMarcas.Items.Insert(0, New ListItem("Todas", "-1"))
@@ -125,7 +132,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
If ObjVentas.GetReportePadreVentasUtilidad(If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM), DdlClientesWS.SelectedValue.ToEntero,
If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM), txtFechaI.Text.ToDate, txtFechaF.Text.ToDate,
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero,
DdlMarcas.SelectedValue.ToEntero) Then
DdlMarcas.SelectedValue.ToEntero, DdlGarantia.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados
DtDatos = ObjVentas.DtResultados
End If

View File

@@ -2264,7 +2264,7 @@ Partial Class Ventas
DivPenalizacion.Visible = True
End If
If UsuarioActual.CveRol = 1 Then
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
LnkSolicitarCredito.Visible = True
End If
@@ -6532,7 +6532,7 @@ Partial Class Ventas
ObjVentas.Dispose()
Case Else 'SI NO TIENE NINGUN TIPO DE AUTORIZACION CONFIGURADO
'RMF. codigo temporal para pruebas
If Alertas AndAlso UsuarioActual.CveEmpresa = 140 AndAlso UsuarioActual.CveUsuario.Contiene(100, 1937, 2275) AndAlso Now.Hour > 5 AndAlso Now.Hour < 9 Then
If Alertas AndAlso UsuarioActual.CveEmpresa = 140 Then
Dim Vta As New ClsVentas
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
@@ -7560,17 +7560,17 @@ Partial Class Ventas
End If
'SERIE ALMACEN
If e.Row.DBCampo("CveTipoInvPS").ToEntero() = 5 Then
If CveVenta > 0 Then
e.Row.FCLiteral("LtlSerie").Visible = True
Else
e.Row.FCTextBox("TxtSerie").Visible = True
If CveVenta > 0 AndAlso e.Row.DBCampo("Serie") <> "" Then
e.Row.FCLiteral("LtlSerie").Visible = True
End If
If e.Row.DBCampo("CveTipoInvPS").ToEntero() = 5 And CveVenta <= 0 Then
e.Row.FCTextBox("TxtSerie").Visible = True
e.Row.FCTextBox("TxtSerie").Attributes.Remove("onkeypress")
e.Row.FCTextBox("TxtSerie").Attributes.Add("onkeypress", String.Format("SeriePS(event,{0},this,{1});", e.Row.FCButton("BtnSerie").ClientID, e.Row.FCHiddenField("HdnSerie").ClientID))
e.Row.FCTextBox("TxtSerie").Attributes.Remove("onblur")
e.Row.FCTextBox("TxtSerie").Attributes.Add("onblur", String.Format("SeriePSBlur({0},this,{1});", e.Row.FCButton("BtnSerie").ClientID, e.Row.FCHiddenField("HdnSerie").ClientID))
End If
'e.Row.FCTextBox("TxtSerie").Attributes.Add("onkeyup", String.Format("LimpiaAF(1, '{0}'); EnterAFEdit(event,this,{1},{2});", e.Row.FCHiddenField("HdnCveConcepto").Value, e.Row.FCHiddenField("HdnCveAF").ClientID, e.Row.FCHiddenField("HdnCodAF").ClientID))
@@ -11548,7 +11548,7 @@ Partial Class Ventas
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado) Then
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia) Then
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Else
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
@@ -16026,8 +16026,9 @@ Partial Class Ventas
'falta verificar traer el acuse y reenviarlo
If UsuarioActual.Empresa.UsaAC Then
IDPoliza = GenerarPolizaAC(ObjAC, True)
If IDPoliza <= 0 Then
Dim IDMPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, ObjFacturaDevolucion, True)
IDPoliza = IDMPoliza.IdPoliza
If IDMPoliza.IdPoliza <= 0 Then
Mensaje = "No se pudo generar la poliza"
ErrorCancelar = True
End If
@@ -16116,8 +16117,9 @@ Partial Class Ventas
ElseIf Respuesta.NoCertificadoSAT <> String.Empty Then
If UsuarioActual.Empresa.UsaAC Then
IDPoliza = GenerarPolizaAC(ObjAC, True)
If IDPoliza <= 0 Then
Dim IDMPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, ObjFacturaDevolucion, True)
IDPoliza = IDMPoliza.IdPoliza
If IDMPoliza.IdPoliza <= 0 Then
Mensaje = "No se pudo generar la poliza"
ErrorCancelar = True
End If
@@ -18340,125 +18342,124 @@ Partial Class Ventas
End Function
Private Function GenerarPolizaAC(ObjAC As ClsContPAQi, Optional CancelacionIngreso As Boolean = False) As Integer
Dim Retorno As Integer = 0
Dim IDPoliza As Integer = 0
'Private Function GenerarPolizaAC(ObjAC As ClsContPAQi, Optional CancelacionIngreso As Boolean = False) As Integer
' Dim Retorno As Integer = 0
' Dim IDPoliza As Integer = 0
Dim ErrorAC As Boolean = False
'Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa) : ObjAC.IniciaTransacSQL()
Dim Fecha As Date = TxtFecha.Text.ToDate
Dim Concepto As String = String.Format("GD {0}", NombreCliente)
Dim Paridad As Integer = 1
Dim TipoMovto As Boolean = False
' Dim ErrorAC As Boolean = False
' 'Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa) : ObjAC.IniciaTransacSQL()
' Dim Fecha As Date = TxtFecha.Text.ToDate
' Dim Concepto As String = String.Format("GD {0}", NombreCliente)
' Dim Paridad As Integer = 1
' Dim TipoMovto As Boolean = False
If CancelacionIngreso Then
Concepto = String.Format("Cancelación GD {0}", NombreCliente)
Paridad = -1
TipoMovto = True
End If
' If CancelacionIngreso Then
' Concepto = String.Format("Cancelación GD {0}", NombreCliente)
' Paridad = -1
' TipoMovto = True
' End If
Dim TipoPoliza = If(DdlTipoComprobante.SelectedValue.ToString() = "OP" Or DdlTipoComprobante.SelectedValue.ToString() = "Com", 3, 1)
' Dim TipoPoliza = If(DdlTipoComprobante.SelectedValue.ToString() = "OP" Or DdlTipoComprobante.SelectedValue.ToString() = "Com", 3, 1)
IDPoliza = ObjAC.AddPoliza(TipoPoliza, Concepto, TxtTotal.Text.ToDouble * 2, TxtTotal.Text.ToDouble * 2, UsuarioActual.CveUsuario, Fecha)
Dim dr As DataRow ' = DTPresupuestoIngresos.FiltroPrimero(String.Format("CvePresupuestoIngreso = {0}", DdlFuenteRecaudacion.SelectedValue))
'Dim Importe As Double = TxtTotal.Text.ToDouble
Dim CtaCliente As Integer = ViewState("IdCtaContClientes").ToString().ToEntero()
Dim CtaISSSTESON As Integer = 643
Dim CtaISPT As Integer = 1745
' Dim NombreCliente As String = ViewState("NombreCliente").ToString()
' IDPoliza = ObjAC.AddPoliza(TipoPoliza, Concepto, TxtTotal.Text.ToDouble * 2, TxtTotal.Text.ToDouble * 2, UsuarioActual.CveUsuario, Fecha)
' Dim dr As DataRow ' = DTPresupuestoIngresos.FiltroPrimero(String.Format("CvePresupuestoIngreso = {0}", DdlFuenteRecaudacion.SelectedValue))
' 'Dim Importe As Double = TxtTotal.Text.ToDouble
' Dim CtaCliente As Integer = ViewState("IdCtaContClientes").ToString().ToEntero()
' Dim CtaISSSTESON As Integer = 643
' Dim CtaISPT As Integer = 1745
' ' Dim NombreCliente As String = ViewState("NombreCliente").ToString()
If IDPoliza > 0 Then
' If IDPoliza > 0 Then
'Orden de PAGO
If DdlTipoComprobante.SelectedValue.ToString() = "OP" Then
' 'Orden de PAGO
' If DdlTipoComprobante.SelectedValue.ToString() = "OP" Then
If DdlOrdenPago.SelectedValue.ToEntero() = 1 Then
'ISSSTESON
' If DdlOrdenPago.SelectedValue.ToEntero() = 1 Then
' 'ISSSTESON
If ObjAC.AddMovimiento(IDPoliza, CtaCliente, False, Paridad * TxtTotal.Text.ToDecimal, "", Concepto, 0, Fecha, "") Then
If Not ObjAC.AddMovimiento(IDPoliza, CtaISSSTESON, True, Paridad * TxtTotal.Text.ToDecimal, "", Concepto, 0, Fecha, "") Then
ErrorAC = True
End If
Else
ErrorAC = True
End If
' If ObjAC.AddMovimiento(IDPoliza, CtaCliente, False, Paridad * TxtTotal.Text.ToDecimal, "", Concepto, 0, Fecha, "V||" & CveVenta) Then
' If Not ObjAC.AddMovimiento(IDPoliza, CtaISSSTESON, True, Paridad * TxtTotal.Text.ToDecimal, "", Concepto, 0, Fecha, "V||" & CveVenta) Then
' ErrorAC = True
' End If
' Else
' ErrorAC = True
' End If
Else
'ISPT
' Else
' 'ISPT
If ObjAC.AddMovimiento(IDPoliza, CtaCliente, False, Paridad * TxtTotal.Text.ToDecimal, "", Concepto, 0, Fecha, "") Then
If Not ObjAC.AddMovimiento(IDPoliza, CtaISPT, True, Paridad * TxtTotal.Text.ToDecimal, "", Concepto, 0, Fecha, "") Then
ErrorAC = True
End If
Else
ErrorAC = True
End If
End If
' If ObjAC.AddMovimiento(IDPoliza, CtaCliente, False, Paridad * TxtTotal.Text.ToDecimal, "", Concepto, 0, Fecha, "V||" & CveVenta) Then
' If Not ObjAC.AddMovimiento(IDPoliza, CtaISPT, True, Paridad * TxtTotal.Text.ToDecimal, "", Concepto, 0, Fecha, "V||" & CveVenta) Then
' ErrorAC = True
' End If
' Else
' ErrorAC = True
' End If
' End If
' NORMAL
Else
Dim Detalles = From gvr As GridViewRow In GvPS.Rows.Cast(Of GridViewRow)()
Group gvr By Grp = New With {
Key .CvePresupuestoIngreso = gvr.FCDropDownList("DdlFR").SelectedValue.ToEntero()
} Into Group
Select Grp.CvePresupuestoIngreso,
TotalImporte = Group.Sum(Function(r) r.FCLiteral("LtlTotal").Text.ToDouble)
' ' NORMAL
' Else
' Dim Detalles = From gvr As GridViewRow In GvPS.Rows.Cast(Of GridViewRow)()
' Group gvr By Grp = New With {
' Key .CvePresupuestoIngreso = gvr.FCDropDownList("DdlFR").SelectedValue.ToEntero()
' } Into Group
' Select Grp.CvePresupuestoIngreso,
' TotalImporte = Group.Sum(Function(r) r.FCLiteral("LtlTotal").Text.ToDouble)
'Select Case TipoComprobante
' Case "Ing", "Egs"
For Each grp In Detalles
dr = DTPresupuestoIngresos.FiltroPrimero(String.Format("CvePresupuestoIngreso = {0}", grp.CvePresupuestoIngreso))
Concepto = String.Format("{0} - {1}: {2}", NombreCliente, DdlTipoComprobante.SelectedItem.Text.ToString(), TxtFolio.Text)
' 'Select Case TipoComprobante
' ' Case "Ing", "Egs"
' For Each grp In Detalles
' dr = DTPresupuestoIngresos.FiltroPrimero(String.Format("CvePresupuestoIngreso = {0}", grp.CvePresupuestoIngreso))
' Concepto = String.Format("{0} - {1}: {2}", NombreCliente, DdlTipoComprobante.SelectedItem.Text.ToString(), TxtFolio.Text)
If ObjAC.AddMovimiento(IDPoliza, dr("IdCuentaPorEjecutar").ToString().ToEntero(), False, Paridad * grp.TotalImporte, "", Concepto, 0, Fecha, "") Then
If ObjAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString().ToEntero(), True, Paridad * grp.TotalImporte, "", Concepto, 0, Fecha, "") Then
'CARGO la deuda del cliente
If ObjAC.AddMovimiento(IDPoliza, CtaCliente, TipoMovto, grp.TotalImporte, "", Concepto, 0, Fecha, "") Then
'abono,
If Not ObjAC.AddMovimiento(IDPoliza, dr("IdCuentaMatriz").ToString().ToEntero(), Not TipoMovto, grp.TotalImporte, "", Concepto, 0, Fecha, "") Then
ErrorAC = True
End If
Else
ErrorAC = True
End If
Else
ErrorAC = True
End If
Else
ErrorAC = True
End If
Next
' If ObjAC.AddMovimiento(IDPoliza, dr("IdCuentaPorEjecutar").ToString().ToEntero(), False, Paridad * grp.TotalImporte, "", Concepto, 0, Fecha, "") Then
' If ObjAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString().ToEntero(), True, Paridad * grp.TotalImporte, "", Concepto, 0, Fecha, "") Then
' 'CARGO la deuda del cliente
' If ObjAC.AddMovimiento(IDPoliza, CtaCliente, TipoMovto, grp.TotalImporte, "", Concepto, 0, Fecha, "") Then
' 'abono,
' If Not ObjAC.AddMovimiento(IDPoliza, dr("IdCuentaMatriz").ToString().ToEntero(), Not TipoMovto, grp.TotalImporte, "", Concepto, 0, Fecha, "") Then
' ErrorAC = True
' End If
' Else
' ErrorAC = True
' End If
' Else
' ErrorAC = True
' End If
' Else
' ErrorAC = True
' End If
' Next
'Case "OP", "Com"
' Dim Importe As Decimal = 0
' If ObjAC.AddMovimiento(123456, IDPoliza, CtaCliente, False, Importe, "", Concepto, 0, Fecha, "") Then
' If ObjAC.AddMovimiento(123456, IDPoliza, CtaCliente, True, Importe, "", Concepto, 0, Fecha, "") Then
' 'Case "OP", "Com"
' ' Dim Importe As Decimal = 0
' ' If ObjAC.AddMovimiento(123456, IDPoliza, CtaCliente, False, Importe, "", Concepto, 0, Fecha, "") Then
' ' If ObjAC.AddMovimiento(123456, IDPoliza, CtaCliente, True, Importe, "", Concepto, 0, Fecha, "") Then
' End If
' End If
'End Select
End If
' ' End If
' ' End If
' 'End Select
' End If
Else
ErrorAC = True
' Else
' ErrorAC = True
End If
' End If
If Not ErrorAC Then
ObjAC.AjustaPoliza(IDPoliza)
' If Not ErrorAC Then
' ObjAC.AjustaPoliza(IDPoliza)
' Retorno = IDPoliza
' Else
' Retorno = -1
' Alert("Error al agregar la Póliza de AC.", TipoMensaje.MsgError)
' End If
Retorno = IDPoliza
Else
' ' ObjAC.Dispose()
Alert("Error al Agregar la Póliza de AC.", TipoMensaje.MsgError)
End If
' Return Retorno
' ObjAC.Dispose()
Return Retorno
End Function
'End Function
Private Sub SetValues()
ViewState("TipoCambio") = 1