--tipos de venta

This commit is contained in:
2025-03-19 21:34:24 -07:00
parent 16f6bef7c0
commit 356e97ad36
7 changed files with 85 additions and 23 deletions

View File

@@ -1662,6 +1662,7 @@ Partial Class Ventas_ClientesAbonar
DtVentasNC.AcceptChanges()
ObjFacturaDevolucion.DtVentasNC = DtVentasNC
ObjFacturaDevolucion.CveTipoVenta = 8 'PRONTO PAGO
ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion, ListaVentasGenerarNC)

View File

@@ -368,6 +368,11 @@
<asp:DropDownList ID="DdlTipoRelacion" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion">
</asp:DropDownList>
</div>
<label class="col-md-1" id="LblTipoVenta" runat="server" visible="false">Tipo Venta:</label>
<div class="col-md-2" id="DivTipoVenta" runat="server" visible="false">
<asp:DropDownList ID="DdlTipoVenta" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="TipoVenta" DataValueField="CveTipoVenta">
</asp:DropDownList>
</div>
</div>
</div>
</div>

View File

@@ -215,7 +215,15 @@ Partial Class Ventas_RepVentas
ChkIEPS.Checked = UsuarioActual.Empresa.Funcionalidad(713) = "1" 'empresa deduce IEPS
End Sub
Private Sub CargaCombos()
Private Sub CargaCombos()
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
LblTipoVenta.Visible = True
DivTipoVenta.Visible = True
DdlTipoVenta.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' AND TipoDocto = 'Egs' ")
DdlTipoVenta.DataBind()
DdlTipoVenta.Items.Insert(0, New ListItem("Todos", "-1"))
End If
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto, VisualizacionReporte:=1)
@@ -265,8 +273,8 @@ Partial Class Ventas_RepVentas
TxtFechaISabana.Text = NowADS().FirstDayOfMonth.ToShortDateString
TxtFechaFSabana.Text = NowADS().ToShortDateString
End Sub
End Sub
#End Region
@@ -310,7 +318,7 @@ Partial Class Ventas_RepVentas
If ObjVentas.GetRepVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores,
DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable,
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero) Then
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero()) Then
GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados
Else
@@ -531,7 +539,7 @@ Partial Class Ventas_RepVentas
'LIGA A DETALLE
Dim Liga As String = $"/Ventas/RepVentasDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaInicial}&FechaF={FechaFinal}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}&TipoCliente={ If(DdlGrupo.SelectedValue.ToEntero = 20, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)}&ModalidadContable={If(ChkLecturaAdmin.Checked, 0, 1)}&CveTipoRelacion={DdlTipoRelacion.SelectedValue}&ServicioDomicilio={DdlServicioDomicilio.SelectedValue}&EsFacturaGlobal={DdlFacturaGlobal.SelectedValue}&EsFilial={e.Row.DBCampo("EsFilial")}"
Dim Liga As String = $"/Ventas/RepVentasDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaInicial}&FechaF={FechaFinal}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}&TipoCliente={ If(DdlGrupo.SelectedValue.ToEntero = 20, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)}&ModalidadContable={If(ChkLecturaAdmin.Checked, 0, 1)}&CveTipoRelacion={DdlTipoRelacion.SelectedValue}&ServicioDomicilio={DdlServicioDomicilio.SelectedValue}&EsFacturaGlobal={DdlFacturaGlobal.SelectedValue}&EsFilial={e.Row.DBCampo("EsFilial")}&CveTipoVenta={e.Row.DBCampo("CveTipoVenta")}"
e.Row.FCLiteral("LtlGrupo").Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral("LtlGrupo").Text & "</a>"

View File

@@ -331,14 +331,20 @@
</asp:DropDownList>
</div>
<asp:Label runat="server" ID="LblFacturaGlobal" class="col-md-1 truncate" Visible="false">Factura Global:</asp:Label>
<div class="col-md-2" runat="server" id="DivFacturaGlobal" Visible="false">
<asp:DropDownList ID="DdlFacturaGlobal" CssClass=" form-control input-sm select2me" runat="server" Width="100%" >
<asp:ListItem Value ="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Solo Globales</asp:ListItem>
<asp:ListItem Value="0">Sin Globales</asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-2" runat="server" id="DivFacturaGlobal" visible="false">
<asp:DropDownList ID="DdlFacturaGlobal" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="1">Solo Globales</asp:ListItem>
<asp:ListItem Value="0">Sin Globales</asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-1" id="LblTipoVenta" runat="server" visible="false">Tipo Venta:</label>
<div class="col-md-2" id="DivTipoVenta" runat="server" visible="false">
<asp:DropDownList ID="DdlTipoVenta" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="TipoVenta" DataValueField="CveTipoVenta">
</asp:DropDownList>
</div>
</div>
</div>
</div>
@@ -346,7 +352,7 @@
</asp:UpdatePanel>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" data-sort="true" Width="99%" DataKeyNames="CveVenta,TipoDocumento,SerieFolio" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas"
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" data-sort="true" Width="99%" DataKeyNames="CveVenta,TipoDocumento,SerieFolio" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
<Columns>
<%-- 0--%>
@@ -607,11 +613,11 @@
<asp:Literal ID="LtlDescripcionVenta" runat="server" Text='<%# Eval("DescripcionVenta") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cobranza" Visible="false">
<ItemTemplate>
<asp:Literal ID="LtlCobranza" runat="server" Text='<%# Eval("CobranzaEstatusTurno") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cobranza" Visible="false">
<ItemTemplate>
<asp:Literal ID="LtlCobranza" runat="server" Text='<%# Eval("CobranzaEstatusTurno") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<%-- 42--%>
<asp:TemplateField HeaderText="Descargar XML" Visible="false">
<ItemTemplate>
@@ -814,7 +820,8 @@
<asp:CheckBox ID="ChkKilometraje" runat="server" Visible="False" Text="&nbsp; Kilometraje" /></td>
</tr>
<tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkGestionCobranzaTurno" runat="server" Visible="true" Text="&nbsp; Cobranza" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkGestionCobranzaTurno" runat="server" Visible="true" Text="&nbsp; Cobranza" /></td>
<td style="text-align: left;"></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkDescripcionVenta" runat="server" Visible="true" Text="&nbsp; Descripción Venta" /></td>

View File

@@ -186,6 +186,8 @@ Partial Class RepVentasDetalle
TipoCliente = If(Request("TipoCliente") IsNot Nothing, Request("TipoCliente").ToString.ToEntero, -1).ToString.ToEntero
CveTipoRelacion = If(Request("CveTipoRelacion") IsNot Nothing, Request("CveTipoRelacion").ToString, "-1").ToString
Dim CveTipoVenta = If(Request("CveTipoVenta") IsNot Nothing, Request("CveTipoVenta").ToString.ToEntero, -1).ToString.ToEntero
DdlTipoVenta.SelectedValueExist(CveTipoVenta)
DdlTipoCliente.SelectedValueExist(TipoCliente)
@@ -318,6 +320,15 @@ Partial Class RepVentasDetalle
End Sub
Private Sub CargaCombos()
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
LblTipoVenta.Visible = True
DivTipoVenta.Visible = True
DdlTipoVenta.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' AND TipoDocto = 'Egs'")
DdlTipoVenta.DataBind()
DdlTipoVenta.Items.Insert(0, New ListItem("Todos", "-1"))
End If
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto, VisualizacionReporte:=1)
CargaClientes()
@@ -457,7 +468,7 @@ Partial Class RepVentasDetalle
CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec,
CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(),
ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero) Then
ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero()) Then
DtVentas = AddRows(ObjVentas.DtResultados)
ImgImprimir.Enabled = True
GvDatos.DataSource = AddRows(ObjVentas.DtResultados)

View File

@@ -12424,6 +12424,9 @@ Partial Class Ventas
End If
End If
ObjFacturaBonificacion.CveTipoVenta = 7 'PRONTO PAGO
End Sub
@@ -14638,6 +14641,31 @@ Partial Class Ventas
End If
End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso factura.TipoDocto = "Egs" AndAlso Not factura.EsGarantia Then
CveTipoVentaGuardar = -1
If NCDescuento Then
If ListaNCDescuento IsNot Nothing AndAlso ListaNCDescuento.Count > 0 Then
'VERIFICA SI BONIFICACION
If ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 2)) Then
CveTipoVentaGuardar = 7 ' BONIFICACION
ElseIf ListaNCDescuento.Any(Function(RNC) (Not RNC.Num1 = 2)) Then
CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS
End If
End If
Else
If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then
'VERIFICA SI BONIFICACION
If ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 2)) Then
CveTipoVentaGuardar = 7 ' BONIFICACION
ElseIf ListaRemisionesNC.Any(Function(RNC) (Not RNC.Num1 = 2)) Then
CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS
End If
End If
End If
End If
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, 0, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,