Refacturacion de anticipos
This commit is contained in:
@@ -4202,13 +4202,14 @@ Public Class ClsVentas
|
|||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function TraspasaVentasAplicadasAnt(CveVentaNueva As Integer, CveVentaAnterior As Integer, CveEmpresa As Integer) As Boolean
|
Public Function TraspasaVentasAplicadasAnt(CveVentaNueva As Integer, CveVentaAnterior As Integer, CveEmpresa As Integer, CvePrePoliza As Integer) As Boolean
|
||||||
Dim retorno As Boolean = False
|
Dim retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_TraspasaVentasAplicadasAnt", CommandType.StoredProcedure)
|
DataAdapter("PA_Vta_TraspasaVentasAplicadasAnt", CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveVentaNueva", SqlDbType.Int).Value = CveVentaNueva
|
.Add("@CveVentaNueva", SqlDbType.Int).Value = CveVentaNueva
|
||||||
.Add("@CveVentaAnterior", SqlDbType.Int).Value = CveVentaAnterior
|
.Add("@CveVentaAnterior", SqlDbType.Int).Value = CveVentaAnterior
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -2652,7 +2652,7 @@ Namespace Modelos
|
|||||||
Case 11 'Anticipo
|
Case 11 'Anticipo
|
||||||
|
|
||||||
'[IPP] SI ES REFACTURACION LOS ANTICIPOS NO LOS DEBE APLICAR EN EL INGRESO REFACTURADO (VIEJO)
|
'[IPP] SI ES REFACTURACION LOS ANTICIPOS NO LOS DEBE APLICAR EN EL INGRESO REFACTURADO (VIEJO)
|
||||||
If NuevaFactura = 1 And ObjFactura.CveVenta = CveDevolucion Then
|
If CveEstatusRefacturacion > 0 Then
|
||||||
Exit Select
|
Exit Select
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -4458,6 +4458,10 @@ Namespace Modelos
|
|||||||
|
|
||||||
Dim CveEstatusRefacturacion As Integer = If(ObjFactura.CveEstatusRefacturacion <= 0, 0, ObjFactura.CveEstatusRefacturacion)
|
Dim CveEstatusRefacturacion As Integer = If(ObjFactura.CveEstatusRefacturacion <= 0, 0, ObjFactura.CveEstatusRefacturacion)
|
||||||
|
|
||||||
|
If Not EsRefacturacion Then
|
||||||
|
CveEstatusRefacturacion = 0
|
||||||
|
End If
|
||||||
|
|
||||||
Dim CancelacionFecha As Date
|
Dim CancelacionFecha As Date
|
||||||
Dim FolioFiscal As String = ObjFactura.FolioFiscal
|
Dim FolioFiscal As String = ObjFactura.FolioFiscal
|
||||||
Dim CancelacionAcuse As String = ""
|
Dim CancelacionAcuse As String = ""
|
||||||
@@ -4485,7 +4489,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
If CveEstatusFacturaAsignado <= 0 Then
|
If CveEstatusFacturaAsignado <= 0 Then
|
||||||
Try
|
Try
|
||||||
If ObjFactura.FolioFiscal <> "" Then
|
If ObjFactura.FolioFiscal <> "" AndAlso UsuarioActual.Empresa.FacturaProduccion Then
|
||||||
If ObjFactura.TipoDocto.Contiene("Ing", "Ant", "Dev", "Egs") Then
|
If ObjFactura.TipoDocto.Contiene("Ing", "Ant", "Dev", "Egs") Then
|
||||||
|
|
||||||
'VERIFICA SI DEBE VALIDAR ANTE EL SAT
|
'VERIFICA SI DEBE VALIDAR ANTE EL SAT
|
||||||
|
|||||||
@@ -12728,7 +12728,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'EN CASO DE SER REFACTURACION DE ANTICIPO SE ACTUALIZAN LAS VENTAS APLICADAS HACIA EL NUEVO
|
'EN CASO DE SER REFACTURACION DE ANTICIPO SE ACTUALIZAN LAS VENTAS APLICADAS HACIA EL NUEVO
|
||||||
If NuevaFactura = 1 AndAlso CveDevolucion > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ant") Then
|
If NuevaFactura = 1 AndAlso CveDevolucion > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ant") Then
|
||||||
If Not ObjVentas.TraspasaVentasAplicadasAnt(ObjFactura.CveVenta, CveDevolucion, UsuarioActual.CveEmpresa) Then
|
If Not ObjVentas.TraspasaVentasAplicadasAnt(ObjFactura.CveVenta, CveDevolucion, UsuarioActual.CveEmpresa, ObjFactura.CvePrePoliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -26625,6 +26625,7 @@ Partial Class Ventas
|
|||||||
If Not DtCotizaciones.Columns.Contains("Aplicado") Then
|
If Not DtCotizaciones.Columns.Contains("Aplicado") Then
|
||||||
DtCotizaciones.Columns.Add("Aplicado", Type.GetType("System.Boolean"))
|
DtCotizaciones.Columns.Add("Aplicado", Type.GetType("System.Boolean"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
GvCotPS.DataSource = DtCotizaciones.FiltraParametros("Cantidad > 0 AND EsAcumulador = False")
|
GvCotPS.DataSource = DtCotizaciones.FiltraParametros("Cantidad > 0 AND EsAcumulador = False")
|
||||||
Else
|
Else
|
||||||
@@ -26699,6 +26700,7 @@ Partial Class Ventas
|
|||||||
CotizacionesLista.Add(row("CveVenta").ToString().ToEntero())
|
CotizacionesLista.Add(row("CveVenta").ToString().ToEntero())
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
'CARGA LOS USADOS RELACIONADOS A LOS PRODUCTOS SELECCIONADOS DE LA COTIZACION
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
CalculaUsadosCotizacion(Cves, DTSeleccionadas, DtCotizaciones)
|
CalculaUsadosCotizacion(Cves, DTSeleccionadas, DtCotizaciones)
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user