E140. Corrección de timbrado para NC por pronto pago
This commit is contained in:
@@ -8984,7 +8984,6 @@ Partial Class Ventas
|
||||
End If
|
||||
Dim SerieFolioNCProntoPago As String = ""
|
||||
Dim CveVentaNCProntoPago As Integer = -1
|
||||
Dim GeneroDescuentoProntoPago As Boolean = False
|
||||
|
||||
'SOLO GENERAR NC POR DESCUENTO PRONTO PAGO SI EL PAGO ES DE CONTADO
|
||||
If ErrorList.Count = 0 AndAlso RBLPago.SelectedValue = "2" AndAlso ObjFactura.DescuentoProntoPago > 0 Then
|
||||
@@ -8994,13 +8993,13 @@ Partial Class Ventas
|
||||
If (ImportePagado + ImporteRNC + ObjFactura.DescuentoProntoPago) >= ObjFactura.Total Then
|
||||
|
||||
Dim RespFacturaProntoPago = GenerarNCProntoPago(ObjVentas.IniciaTransacSQL(), ObjClientes, ObjContPaq, ObjFactura)
|
||||
|
||||
If RespFacturaProntoPago.ObjFacturaProntoPago Is Nothing OrElse RespFacturaProntoPago Is Nothing Then
|
||||
ErrorList.Add("No se pudo generar la nota de crédito de pronto pago")
|
||||
Else
|
||||
If RespFacturaProntoPago.Mensaje.CveVenta <= 0 OrElse RespFacturaProntoPago.Mensaje.TieneError Then
|
||||
ErrorList.Add("No se pudo generar la nota de crédito de pronto pago")
|
||||
Else
|
||||
GeneroDescuentoProntoPago = True
|
||||
CveVentaNCProntoPago = RespFacturaProntoPago.Mensaje.CveVenta
|
||||
SerieFolioNCProntoPago = RespFacturaProntoPago.Mensaje.SerieFolio
|
||||
|
||||
@@ -33244,9 +33243,6 @@ Partial Class Ventas
|
||||
ObjFacturaProntoPago.FormaPago33 = "Aplicación de anticipos"
|
||||
ObjFacturaProntoPago.FormaPagoSAT33 = "30"
|
||||
|
||||
ObjFacturaProntoPago.MetodoPago = ""
|
||||
ObjFacturaProntoPago.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {ObjFacturaProntoPago.CveMetodoPago33}")
|
||||
|
||||
ObjFacturaProntoPago.CveSubProyecto = CveSubProyecto
|
||||
ObjFacturaProntoPago.SetSubProyecto()
|
||||
|
||||
@@ -33279,9 +33275,7 @@ Partial Class Ventas
|
||||
ObjFacturaProntoPago.CveTipoRelacion = 7
|
||||
ObjFacturaProntoPago.TipoRelacion = "07"
|
||||
|
||||
Dim Fol As New List(Of String)
|
||||
Fol.Add(ObjFactura.FolioFiscal)
|
||||
ObjFacturaProntoPago.UUIDRelacionados = Fol
|
||||
ObjFacturaProntoPago.UUIDRelacionados = New List(Of String)
|
||||
|
||||
Select Case ObjFacturaProntoPago.TipoDocto
|
||||
Case "Ing"
|
||||
@@ -33345,17 +33339,17 @@ Partial Class Ventas
|
||||
|
||||
ObjFacturaProntoPago.DtVentasNC = DtVentasNC
|
||||
|
||||
ObjFacturaProntoPago.Timbre = PreParaTimbre(ObjFacturaProntoPago)
|
||||
|
||||
Resp = ObjFacturaProntoPago.EmitirFactura(False, Transac:=SqlTransaccion, ObjContPaqTransac:=ObjConta)
|
||||
|
||||
ObjFacturaProntoPago.Dispose()
|
||||
Retorno.ObjFacturaProntoPago = ObjFacturaProntoPago
|
||||
|
||||
Catch ex As Exception
|
||||
Resp.CveVenta = -1
|
||||
Resp.TieneError = True
|
||||
OnError("Ocurrio un error al generar la nota de credito de pronto pago", ex)
|
||||
End Try
|
||||
|
||||
Retorno.ObjFacturaProntoPago = ObjFacturaProntoPago
|
||||
Retorno.Mensaje = Resp
|
||||
|
||||
Return Retorno
|
||||
@@ -33368,7 +33362,7 @@ Partial Class Ventas
|
||||
PorcentajeRetISR As Double, ImporteRetISR As Double, PorcentajeIEPS As Double, ImporteIEPS As Double, TipoDescuento As Integer, Descuento As Double,
|
||||
Total As Double, Serie As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String,
|
||||
SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer,
|
||||
CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer)
|
||||
CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer, CodigoObjetoImpuesto As String)
|
||||
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = TmpDT.NewRow()
|
||||
@@ -33417,6 +33411,7 @@ Partial Class Ventas
|
||||
Row("EntregaDirecta") = EntregaDirecta
|
||||
Row("SATClaveProdServ") = SATClaveProdServ
|
||||
Row("SATClaveUM") = SATClaveUM
|
||||
Row("CodigoObjetoImpuesto") = CodigoObjetoImpuesto
|
||||
|
||||
'Contratos
|
||||
Row("CveContratoDetalle") = CveContratoDetalle
|
||||
@@ -33470,7 +33465,7 @@ Partial Class Ventas
|
||||
DrPS("CveUM").ToString.ToEntero, DrPS("UnidadMedida").ToString, DrPS("CveClasificacion").ToString.ToEntero, DrPS("Clasificacion").ToString, CveProyecto, CveSubProyecto,
|
||||
"", Cantidad, Dr("ImportePU").ToString.ToDecimal, Dr("PorcentajeIVA").ToString.ToDecimal, Dr("ImporteIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("ImporteRetIVA").ToString.ToDecimal,
|
||||
Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("ImporteRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("ImporteIEPS").ToString.ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString.ToDecimal, "", "", -1, -1,
|
||||
DrPS("SATClavePS").ToString, DrPS("SATClaveUnidadMedida").ToString, -1, -1, -1, -1, -1, -1)
|
||||
DrPS("SATClavePS").ToString, DrPS("SATClaveUnidadMedida").ToString, -1, -1, -1, -1, -1, -1, DrPS("CodigoObjetoImpuesto").ToString())
|
||||
Next
|
||||
|
||||
End Sub
|
||||
@@ -33639,6 +33634,7 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String))
|
||||
TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String))
|
||||
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
|
||||
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
|
||||
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
|
||||
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user