Filtros en remisiones y reembolsos comprobaciones
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" ValidationGroup="GrpConsultar" />
|
||||
|
||||
@@ -238,6 +238,7 @@ Partial Class Compras_RepRembolsoComprobaciones
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaCxP()
|
||||
UPFiltros.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos(tCveIE As Integer)
|
||||
Dim ObjIE As New ClsBancos()
|
||||
@@ -344,6 +345,8 @@ Partial Class Compras_RepRembolsoComprobaciones
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
|
||||
params.Add(New ReportParameter("FechaInicio", txtFechaI.Text))
|
||||
params.Add(New ReportParameter("FechaFin", txtFechaF.Text))
|
||||
|
||||
params.Add(New ReportParameter("CajaChica", If(DdlCajaChica.SelectedValue.ToEntero > 0, "Caja chica: " & DdlCajaChica.SelectedItem.Text, "Funcionario/Empleado: " & DdlPersonal.SelectedItem.Text)))
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -74,15 +74,14 @@ Partial Class RepRemisiones
|
||||
CargaContrato()
|
||||
CargaVendedor()
|
||||
CargaDatos()
|
||||
OrdenaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region " C A R G A - D A T O S "
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
Public Sub CargaDatos()
|
||||
|
||||
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||
FechaV = If(IsDate(TxtFechaVencimiento.Text.Trim()), TxtFechaVencimiento.Text.Trim(), "-1")
|
||||
@@ -90,29 +89,20 @@ Partial Class RepRemisiones
|
||||
CveContrato = If(DdlContrato.SelectedValue.ToEntero > 0, DdlContrato.SelectedValue.ToEntero, -1)
|
||||
|
||||
Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetRepRemisionesSinFacturar(FechaI, FechaF, FechaV, Sucursales, CveCliente, CveContrato, Vendedores, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Private Sub OrdenaDatos()
|
||||
'If (GvDatos.Rows.Count > 0) Then
|
||||
' GvDatos.UseAccessibleHeader = True
|
||||
' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
' RegistraScript("OrdenarGV();")
|
||||
'End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "G V - D A T O S "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -134,7 +124,7 @@ Partial Class RepRemisiones
|
||||
|
||||
e.Row.Cells(5).Text = e.Row.Cells(5).Text + "%"
|
||||
End If
|
||||
e.Row.FCLiteral("LtlTotal").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & "&FechaI=" & FechaI & "&FechaF=" & FechaF & "&FechaV=" & FechaV & "&CveCliente=" & e.Row.DBCampo("CveCliente") & "&CveContrato=" & CveContrato & "&CveSubProyecto=" & Sucursales & "&CveMoneda=" & e.Row.DBCampo("CveMoneda") & """>" & e.Row.FCLiteral("LtlTotal").Text & "</a>"
|
||||
e.Row.FCLiteral("LtlTotal").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & "&FechaI=" & FechaI & "&FechaF=" & FechaF & "&FechaV=" & FechaV & "&CveCliente=" & If(e.Row.DBCampo("CveCliente").ToString().ToEntero() > 0, e.Row.DBCampo("CveCliente").ToString(), DdlClientes.SelectedValue) & "&CveContrato=" & CveContrato & "&CveSubProyecto=" & Sucursales & "&CveMoneda=" & e.Row.DBCampo("CveMoneda") & """>" & e.Row.FCLiteral("LtlTotal").Text & "</a>"
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -165,11 +165,11 @@ Partial Class RepRemisionesDetalle
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
End If
|
||||
GvDatos.DataSource = DtVentas
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
Public Sub CargaCombos()
|
||||
CargaCliente()
|
||||
@@ -207,21 +207,10 @@ Partial Class RepRemisionesDetalle
|
||||
DdlSubProyectos.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyectos.DataBind()
|
||||
'DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Private Sub OrdenaDatos()
|
||||
If (GvDatos.Rows.Count > 0) Then
|
||||
GvDatos.UseAccessibleHeader = True
|
||||
GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
RegistraScript("OrdenarGV();")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "G V - D A T O S "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -230,13 +219,11 @@ Partial Class RepRemisionesDetalle
|
||||
e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "CARGA COMBOS FILTRO"
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "PDF"
|
||||
Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
If DtVentas IsNot Nothing Then
|
||||
|
||||
@@ -10937,15 +10937,6 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero()
|
||||
|
||||
'REFACTURACION CON PAGOS, DEBE CANCELAR SALDOS DEL DOCUMENTO ANTERIOR Y TRASPASAR PAGOS AL NUEVO
|
||||
If ModalidadRefacturacion = 2 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso ObjFactura.NuevaFactura = 1 Then
|
||||
If Not ObjConta.TraspasarSaldosPrePolizasRefacturacion(ObjFacturaNC.CveVenta, ObjFactura.CveVenta, ObjFactura.CvePrePoliza, CvePlantilaPoliza, UsuarioActual.CveEmpresa) Then
|
||||
ErrorList.Add("Ocurrió un error al traspasos saldos en refacturación")
|
||||
End If
|
||||
End If
|
||||
|
||||
'Si es Facturacion de una remision cancelamos, traspasamos saldos y agregamos evento a la bitacora
|
||||
If RemisionesLista.Count > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") Then
|
||||
|
||||
@@ -11038,6 +11029,15 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero()
|
||||
|
||||
'REFACTURACION CON PAGOS, DEBE CANCELAR SALDOS DEL DOCUMENTO ANTERIOR Y TRASPASAR PAGOS AL NUEVO
|
||||
If ModalidadRefacturacion = 2 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso ObjFactura.NuevaFactura = 1 Then
|
||||
If Not ObjConta.TraspasarSaldosPrePolizasRefacturacion(ObjFacturaNC.CveVenta, ObjFactura.CveVenta, ObjFactura.CvePrePoliza, CvePlantilaPoliza, UsuarioActual.CveEmpresa) Then
|
||||
ErrorList.Add("Ocurrió un error al traspasos saldos en refacturación")
|
||||
End If
|
||||
End If
|
||||
|
||||
Return ErrorPrepoliza
|
||||
Catch ex As Exception
|
||||
GuardaLog(ex.ToString())
|
||||
|
||||
Reference in New Issue
Block a user