-- activación para devoluciónes de facturas del 2024 E189
This commit is contained in:
@@ -10,6 +10,7 @@ Imports System.Security.Cryptography.X509Certificates
|
||||
Imports ADSNetLibrary.SIGAPI.Models.CRM.Request
|
||||
Imports ADSNetLibrary.SIGAPI.Services.CRM
|
||||
Imports ADSTimbrado
|
||||
Imports com.itextpdf.text.pdf.languages
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Modelos
|
||||
@@ -7777,8 +7778,9 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not EsFilial AndAlso (((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta <= 0) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot", "Rem") AndAlso CveVenta > 0)) AndAlso RBLPago.SelectedValue = "1" AndAlso PermiteCredito) Then
|
||||
Dim tTipoDocto As String = ""
|
||||
If ValorAutorizacion = "3" Then tTipoDocto = "Rem"
|
||||
If Not EsFilial AndAlso (((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta <= 0) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot", tTipoDocto) AndAlso CveVenta > 0)) AndAlso RBLPago.SelectedValue = "1" AndAlso PermiteCredito) Then
|
||||
'FUNCIONALIDAD 702 - NO VERIFICAR LIMITE DE CRÉDITO Y CANDADOS DE VENTA
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
|
||||
|
||||
@@ -9437,7 +9439,7 @@ Partial Class Ventas
|
||||
Private Sub GvInv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvInv.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(567) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(567) = "1" OrElse (UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Dev") Then
|
||||
e.Row.FCCheckBox("cbInv").Checked = True
|
||||
End If
|
||||
|
||||
@@ -16513,7 +16515,7 @@ Partial Class Ventas
|
||||
Next
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Dev") AndAlso DivAlmacen.Visible AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 Then
|
||||
If factura.TipoDocto.Contiene("Ing", "Dev") AndAlso DivAlmacen.Visible AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 Then
|
||||
|
||||
Dim Filtro As String = ""
|
||||
Select Case factura.TipoDocto
|
||||
@@ -16601,12 +16603,22 @@ Partial Class Ventas
|
||||
If drPU IsNot Nothing Then
|
||||
PU = drPU("PU").ToString.ToDecimal
|
||||
Else
|
||||
'sino se encontró valor, manda mensaje
|
||||
ErrorList.Add("Ocurrió un error al obtener el costo.<br />")
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
'OBTENGO EL ÚLTIMO COSTO
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetUltimoCosto(UsuarioActual.CveEmpresa, Dr("CvePS").ToString.ToEntero) Then
|
||||
Dim drcosto As DataRow = ObjInventarios.DtResultados.FiltroPrimero("")
|
||||
If drcosto IsNot Nothing Then
|
||||
PU = drcosto("UltimoCosto").ToString.ToDecimal
|
||||
End If
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
If PU <= 0 Then
|
||||
'sino se encontró valor, manda mensaje
|
||||
ErrorList.Add("Ocurrió un error al obtener el costo.<br />")
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Dim CveSeccionAlmacen As Integer = -3
|
||||
'If AplicaSeccion Then CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacen, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen", "").ToEntero
|
||||
@@ -32163,7 +32175,7 @@ Partial Class Ventas
|
||||
|
||||
LimpiaDocumentoDEV()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(567) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(567) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
DivAlmacen.Visible = True
|
||||
LltSalidaAlmacen.Text = "Devolución Almacen"
|
||||
|
||||
@@ -38775,7 +38787,8 @@ Partial Class Ventas
|
||||
End Using
|
||||
|
||||
Dim PuedeAplicarDevolucion As Boolean = False
|
||||
|
||||
'código temporal RMF. para devoluciones de facturas cargadas de saldos iniciales.
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso TxtFecha.Text.ToDate.Year < 2025 Then SaldoAlmacen = -1
|
||||
If SaldoAlmacen < 0 Then
|
||||
If DevolucionAlmacen = 0 Then
|
||||
PuedeAplicarDevolucion = True
|
||||
|
||||
Reference in New Issue
Block a user