No permitir timbrado en amortizacion de anticipos en factura con total en 0

This commit is contained in:
2020-11-13 20:54:19 -07:00
parent ddea609bb5
commit 3bea8796e6

View File

@@ -4177,6 +4177,11 @@ Partial Class Ventas
DdlTipoAmortizacionAnticipo.SelectedValueExist(DbRowVenta("CveTipoAmortizacionAnticipo"))
DdlTiposRelacion.SelectedValueExist(DbRowVenta("CveTipoRelacion"))
'Si es AMORTIZACIÓN ANTICIPO SOBRE FACTURA EN CERO no debe timbrar
If DbRowVenta("CveTipoAmortizacionAnticipo").ToString().ToEntero() = 3 Then
BtnEmitir.Visible = False
End If
'HdnAmortizacion.Value = LblAmort.Text.ToDouble.ToString()
'HdnSubTotalDescuestos.Value = (TxtSubTotal.Text.Replace(",", "").ToDouble - LblDescuentos.Text.Replace(",", "").ToDouble - LblAmortizacion.Text.Trim.Replace(",", "").ToDouble - TxtRetISR.Text.Replace(",", "").ToDouble).FormatoNumero(2)
'DdlAmortizacionConceptos.SelectedValue = DbRowVenta("AnticipoPosicion").ToString()
@@ -5723,6 +5728,15 @@ Partial Class Ventas
End If
End If
'Puede hacer pedido
If Me.CveVenta <= 0 Then
If Not UsuarioActual.TienePermisoProceso(177) Then
If DdlTipoComprobante.Items.FindByValue("Pd2") IsNot Nothing Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
End If
End If
End If
'CUANDO SEA COTIZACION Y SEA COMPUPROVEEDORES (EMPRESA 72) NO DEBE ENVIAR CORREO AL CLIENTE
If UsuarioActual.CveEmpresa = 72 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
ChkEnviarFactura.Checked = False
@@ -7660,6 +7674,11 @@ Partial Class Ventas
End If
End If
'Si es AMORTIZACIÓN ANTICIPO SOBRE FACTURA EN CERO no debe timbrar
If DdlTipoAmortizacionAnticipo.SelectedValue = "3" Then
DebeTimbrar = False
End If
If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant", "Dev") Then
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso UsuarioActual.Empresa.FacturaProduccion Then
@@ -12825,7 +12844,7 @@ Partial Class Ventas
pdf = PdfFactura(ObjFactura)
Catch ex As Exception
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgError)
OnError("Ocurrió un error al generar el PDF", ex)
End Try
LocalSerieFolio = ObjFactura.SerieFolio
@@ -16664,6 +16683,16 @@ Partial Class Ventas
LnkRemisiones.Visible = False
End If
'Puede hacer pedido
If Me.CveVenta <= 0 Then
If Not UsuarioActual.TienePermisoProceso(177) Then
If DdlTipoComprobante.Items.FindByValue("Pd2") IsNot Nothing Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
End If
End If
End If
'[IPP]: FALTA CONFIGURAR Y DAR PERMISO A TODOS LOS QUE TENGAN ACCESO A VENTAS
''Puede remisionar
'If Not UsuarioActual.TienePermisoProceso(199) Then