Validacion para emision de carta porte, regeneracion del pdf al emitir,direccion del cliente y validacion de descuento negativo
This commit is contained in:
@@ -6113,8 +6113,6 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
CargaDireccionCP()
|
||||
|
||||
ViewState("Vendedor") = ObjCliente.Vendedor
|
||||
ViewState("CtaContable") = ObjCliente.CuentaContable
|
||||
ViewState("IdCtaContClientes") = ObjCliente.IdCtaContClientes
|
||||
@@ -7197,8 +7195,6 @@ Partial Class Ventas
|
||||
|
||||
CargaVendedores()
|
||||
|
||||
CargaDireccionCP()
|
||||
|
||||
'SI LA VENTA YA ESTA REGISTRADA NO DEBE HABILITAR ACCIONES
|
||||
If CveVenta <= 0 Then
|
||||
Dim EsModuloCotizacion As Boolean = False
|
||||
@@ -14972,7 +14968,7 @@ Partial Class Ventas
|
||||
|
||||
'TIMBRADO NUEVO
|
||||
Try
|
||||
Dim ObjetoPDF As Byte() = DescargarFactura(ObjFactura.CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario)
|
||||
Dim ObjetoPDF As Byte() = DescargarFactura(ObjFactura.CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Regenerar:=True)
|
||||
|
||||
If ObjetoPDF Is Nothing OrElse ObjetoPDF.Length = 0 Then
|
||||
PdfFactura(ObjFactura, AplicaPagare:=If(ObjFactura.TipoDocto.Contiene("Ing", "Rem", "Ant"), "1", "0"))
|
||||
@@ -16300,12 +16296,14 @@ Partial Class Ventas
|
||||
Dim TmpDTComplementosTimbrado As New DataTable
|
||||
PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
||||
|
||||
Dim RespCartaPorte = Timbres.PreParaCartaPorteFactura(CveTimbreCartaPorteVenta, UsuarioActual)
|
||||
If Not RespCartaPorte.TieneError Then
|
||||
ObjFactura.Timbre.Complementos.CartaPorte = RespCartaPorte.CartaPorte
|
||||
Else
|
||||
Alert(RespCartaPorte.Mensaje, TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
If ChkEmitirCartaPorte.Checked Then
|
||||
Dim RespCartaPorte = Timbres.PreParaCartaPorteFactura(CveTimbreCartaPorteVenta, UsuarioActual)
|
||||
If Not RespCartaPorte.TieneError Then
|
||||
ObjFactura.Timbre.Complementos.CartaPorte = RespCartaPorte.CartaPorte
|
||||
Else
|
||||
Alert(RespCartaPorte.Mensaje, TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) Then
|
||||
@@ -18039,6 +18037,11 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If Descuento < 0 Then
|
||||
Descuento = 0
|
||||
Alert("No se calculó el descuento correctamente", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ObjDescuento.ImporteDescuento = Descuento.RoundSQL(2)
|
||||
ObjDescuento.CvePromocionDetalle = CvePromocionDetalle
|
||||
If SeAjustoPU Then
|
||||
@@ -34220,14 +34223,6 @@ Partial Class Ventas
|
||||
|
||||
#Region "C A R T A - P O R T E"
|
||||
|
||||
Public Sub CargaDireccionCP()
|
||||
LblDireccion.Text = "Dirección"
|
||||
LblColonia.Text = "Colonia"
|
||||
LblCiudad.Text = "Ciudad"
|
||||
LblEstado.Text = "Estado"
|
||||
LblCP.Text = "00000"
|
||||
End Sub
|
||||
|
||||
Public Sub CargarCamiones()
|
||||
|
||||
TxtFechaEntregaCP.Text = Now.ToString("dd/MM/yyyy")
|
||||
|
||||
Reference in New Issue
Block a user