-- corrección de aplicación de Anticipo
-- y simplificacióne n la NC generada
This commit is contained in:
@@ -3621,8 +3621,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "Bloqueo Pantalla"
|
#Region "Bloqueo Pantalla"
|
||||||
@@ -10765,6 +10763,13 @@ Partial Class Ventas
|
|||||||
If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, ObjFacturaDevolucion, ObjBancos, Nothing,
|
If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, ObjFacturaDevolucion, ObjBancos, Nothing,
|
||||||
Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCDesc, IndexNC:=(If(DtVentasNC IsNot Nothing, DtVentasNC.Rows.Count - 1, 0))) Then
|
Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCDesc, IndexNC:=(If(DtVentasNC IsNot Nothing, DtVentasNC.Rows.Count - 1, 0))) Then
|
||||||
ListaNotasCreditoGeneradas.Add(ObjFacturaDevolucion)
|
ListaNotasCreditoGeneradas.Add(ObjFacturaDevolucion)
|
||||||
|
If ObjFacturaDevolucion.CvePrePoliza > 0 Then
|
||||||
|
If ObjConta.ValidacionesPrePoliza(ObjFacturaDevolucion.CvePrePoliza, UsuarioActual, Opcion:=5, AutoConta:=False) Then
|
||||||
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
|
GuardaLogAD($"Ventas/Ventas-NCGeneradas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -10778,10 +10783,16 @@ Partial Class Ventas
|
|||||||
If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, ObjFacturaBonificacion, ObjBancos, Nothing,
|
If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjAcum, ObjContr, ObjFacturaBonificacion, ObjBancos, Nothing,
|
||||||
Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCBonificacion, IndexNC:=(DtVentasNC.Rows.Count - 1)) Then
|
Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCBonificacion, IndexNC:=(DtVentasNC.Rows.Count - 1)) Then
|
||||||
ListaNotasCreditoGeneradas.Add(ObjFacturaBonificacion)
|
ListaNotasCreditoGeneradas.Add(ObjFacturaBonificacion)
|
||||||
|
If ObjFacturaBonificacion.CvePrePoliza > 0 Then
|
||||||
|
If ObjConta.ValidacionesPrePoliza(ObjFacturaBonificacion.CvePrePoliza, UsuarioActual, Opcion:=5, AutoConta:=False) Then
|
||||||
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
|
GuardaLogAD($"Ventas/Ventas-NCGeneradas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al generar nota de crédito de amortización", ex)
|
OnError("Ocurrió un error al generar nota de crédito de amortización", ex)
|
||||||
ErrorList.Add("No se pudo generar la nota de crédito de amortización")
|
ErrorList.Add("No se pudo generar la nota de crédito de amortización")
|
||||||
@@ -15276,7 +15287,7 @@ Partial Class Ventas
|
|||||||
If ObjFactura.CveMoneda = 2 AndAlso CveMonedaAnticipo = 1 Then
|
If ObjFactura.CveMoneda = 2 AndAlso CveMonedaAnticipo = 1 Then
|
||||||
Importe11MX = Importe11MX * tipoCambio
|
Importe11MX = Importe11MX * tipoCambio
|
||||||
End If
|
End If
|
||||||
Dim ConPrePAnt As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(12, VentaActual.CveMoneda, True, 1)
|
Dim ConPrePAnt As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(12, CveMonedaAnticipo, True, 1)
|
||||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, Importe11MX, Importe11MX, ConPrePAnt.CveConcepto, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteME:=If(tipoCambioAnticipo = 1, 0, importeMovimiento), CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioAnticipo) Then
|
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, Importe11MX, Importe11MX, ConPrePAnt.CveConcepto, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteME:=If(tipoCambioAnticipo = 1, 0, importeMovimiento), CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioAnticipo) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
Exit For
|
Exit For
|
||||||
|
|||||||
Reference in New Issue
Block a user