From 8a30794d8bad4aad63d942c7e09694e07ebee894 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 3 Dec 2019 13:39:18 -0700 Subject: [PATCH] =?UTF-8?q?-entradasusados.aspx=20--=20pv.=20mensaje=20de?= =?UTF-8?q?=20descuento=20por=20ajuste=20--=20clientes,=20generar=20RNC=20?= =?UTF-8?q?por=20bonificaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Acumuladores/EntradasUsados.aspx | 19 ++++++++++ Acumuladores/EntradasUsados.aspx.vb | 5 +++ App_Code/ClsAcumuladores.vb | 31 +++++++++++++++-- App_Code/ClsPaginas.vb | 4 ++- Ventas/Clientes.aspx.vb | 54 +++++++++++++++-------------- Ventas/PV.aspx.vb | 1 + Ventas/Ventas.aspx | 5 ++- Ventas/Ventas.aspx.vb | 5 +++ 8 files changed, 92 insertions(+), 32 deletions(-) create mode 100644 Acumuladores/EntradasUsados.aspx create mode 100644 Acumuladores/EntradasUsados.aspx.vb diff --git a/Acumuladores/EntradasUsados.aspx b/Acumuladores/EntradasUsados.aspx new file mode 100644 index 000000000..b7c2dd864 --- /dev/null +++ b/Acumuladores/EntradasUsados.aspx @@ -0,0 +1,19 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntradasUsados.aspx.vb" Inherits="Acumuladores_EntradasUsados" %> + + + + + + + + + + + + + + + + + + diff --git a/Acumuladores/EntradasUsados.aspx.vb b/Acumuladores/EntradasUsados.aspx.vb new file mode 100644 index 000000000..3a0e4f59c --- /dev/null +++ b/Acumuladores/EntradasUsados.aspx.vb @@ -0,0 +1,5 @@ + +Partial Class Acumuladores_EntradasUsados + Inherits System.Web.UI.Page + +End Class diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 3762fb841..423775dc4 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -838,12 +838,39 @@ Public Class ClsAcumuladores OnError("Ocurrió un error al consultar el reporte de usados. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno - End Function + End Function + + Public Function EntradasUsadosGet(CveAlmacen As Integer, FechaI As Date, FechaF As Date, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + 'Data = New DataTable + SqlDataAdapter("PA_Acum_EntradasUsadosGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen + .Add("@FechaInicio", SqlDbType.Date).Value = FechaI + .Add("@FechaFin", SqlDbType.Date).Value = FechaF + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + + OnError("Ocurrió un error al consultar los movimientos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + + End Try + + Return Retorno + End Function + + + + #Region " IDisposable Support " - ' IDisposable + ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) If Not disposedValue Then If disposing Then diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 55e577b76..68c1d49da 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4093,6 +4093,7 @@ Public Class ClsPaginas PaginaDict.Add("/Inventarios/RepTraspasoEmitido.aspx".ToUpper(), 891) PaginaDict.Add("/Inventarios/KardexSeccionAlmacen.aspx".ToUpper(), 892) PaginaDict.Add("/Inventarios/RepTraspasoAlmacen.aspx".ToUpper(), 688) + #End Region #Region "MF" PaginaDict.Add("/MF/BitacoraDiaria.aspx".ToUpper(), 801) @@ -4578,7 +4579,8 @@ Public Class ClsPaginas PaginaDict.Add("/Acumuladores/CatTiposDefecto.aspx".ToUpper(), 1033) PaginaDict.Add("/Acumuladores/CatTiposUso.aspx".ToUpper(), 1034) PaginaDict.Add("/Acumuladores/CatFoliosGarantia.aspx".ToUpper(), 1035) - PaginaDict.Add("/Acumuladores/CatGarantiasMeses.aspx".ToUpper(), 1036) + PaginaDict.Add("/Acumuladores/CatGarantiasMeses.aspx".ToUpper(), 1036) + PaginaDict.Add("/Acumuladores/EntradasUsados.aspx".ToUpper(), 543) 'Antes de aquí. diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 4c705db45..c2751d5d1 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -8745,7 +8745,7 @@ Partial Class Clientes 'If ObjFactura.CveCliente > 0 Then ' If TmpDT.Rows.Count > 0 Then - ' Dim Retorno = ObjFactura.EmitirFactura() + ' Dim Retorno = ObjFactura.EmitirFactura(false) ' For Each Mensaje In Retorno.Mensajes ' Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion)) ' Next @@ -8792,14 +8792,16 @@ Partial Class Clientes CreaObjetosVenta(2) - 'If ObjFactura.CveCliente > 0 Then - ' If TmpDT.Rows.Count > 0 Then - ' Dim Retorno = ObjFactura.EmitirFactura() - ' For Each Mensaje In Retorno.Mensajes - ' Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion)) - ' Next - ' End If - 'End If + If ObjFactura.CveCliente > 0 Then + If TmpDT.Rows.Count > 0 Then + Dim Retorno = ObjFactura.EmitirFactura(False) + For Each Mensaje In Retorno.Mensajes + Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion)) + Next + End If + End If + + Alert("Listo") CargaUsados() @@ -8857,7 +8859,7 @@ Partial Class Clientes e.Row.FCCheckBox("ChkCargo").Visible = False Else e.Row.FCCheckBox("ChkCargo").Checked = False - e.Row.FCCheckBox("ChkCargo").Visible = True + e.Row.FCCheckBox("ChkCargo").Visible = False 'True End If If FacturadoBonificacion Then @@ -9647,29 +9649,29 @@ Partial Class Clientes ' ObjVentas.Commit() ' CargaUsados() - ' Dim DtDetallesVenta As New DataTable + ' 'Dim DtDetallesVenta As New DataTable - ' If ObjVentas.GetVentaDetalle(CveVenta) Then + ' 'If ObjVentas.GetVentaDetalle(CveVenta) Then - ' DtDetallesVenta = ObjVentas.DtResultados - ' 'CreaObjetosVenta(CveVenta, Serie, Folio, SubTotal, Iva, DtDetallesVenta) + ' ' DtDetallesVenta = ObjVentas.DtResultados + ' ' 'CreaObjetosVenta(CveVenta, Serie, Folio, SubTotal, Iva, DtDetallesVenta) - ' ObjFactura.Timbre = PreParaTimbre(ObjFactura, ObjFactura.CveSubProyecto) + ' ' ObjFactura.Timbre = PreParaTimbre(ObjFactura, ObjFactura.CveSubProyecto) - ' Dim ObjTimbrado As New Timbrado - ' Dim SeTimbro As Boolean = False + ' ' Dim ObjTimbrado As New Timbrado + ' ' Dim SeTimbro As Boolean = False - ' SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) + ' ' SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) - ' If SeTimbro Then - ' Alert("Se timbro correctamente") - ' Else - ' Alert("No se pudo timbrar, intente mas tarde.", TipoMensaje.MsgError) - ' End If + ' ' If SeTimbro Then + ' ' Alert("Se timbro correctamente") + ' ' Else + ' ' Alert("No se pudo timbrar, intente mas tarde.", TipoMensaje.MsgError) + ' ' End If - ' Else - ' Alert("No se pudo timbrar, no se pudieron obtener los detalles de la venta.", TipoMensaje.MsgError) - ' End If + ' 'Else + ' ' Alert("No se pudo timbrar, no se pudieron obtener los detalles de la venta.", TipoMensaje.MsgError) + ' 'End If ' End If diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 0f23ec3c5..429beedd3 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -5393,6 +5393,7 @@ Partial Class PV DivDatosVenta.Attributes.Add("class", "col-md-6") TxtPrecio.Attributes.Add("onKeyUp", $"CambiaAjuste(this,{TxtPrecio.ClientID});") TxtPrecio.Text = TxtPrecio.Text + TxtObsPS.Text = "Descuento por garantía" Else For Each Gvr As GridViewRow In GvRecepcionUsados.Rows If Gvr.RowType = DataControlRowType.DataRow Then diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 806acee32..36fc1a4f1 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -5871,9 +5871,8 @@
- + +
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 61837ccbb..344adddab 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -20872,6 +20872,7 @@ Partial Class Ventas End If ObjMovtos.Dispose() GvRemisionesNC.DataBind() + UpModalRemisionesNC.Update() End Sub Private Sub CargaDescRNC() @@ -23780,4 +23781,8 @@ Partial Class Ventas End Sub #End Region + Protected Sub BtnModalAplicarRemisionesNC_Click(sender As Object, e As EventArgs) + CargaRNC() + RegistraScript("$('#ModalAplicarRemisionesNC').modal()") + End Sub End Class \ No newline at end of file