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
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CargaDireccionCP()
|
|
||||||
|
|
||||||
ViewState("Vendedor") = ObjCliente.Vendedor
|
ViewState("Vendedor") = ObjCliente.Vendedor
|
||||||
ViewState("CtaContable") = ObjCliente.CuentaContable
|
ViewState("CtaContable") = ObjCliente.CuentaContable
|
||||||
ViewState("IdCtaContClientes") = ObjCliente.IdCtaContClientes
|
ViewState("IdCtaContClientes") = ObjCliente.IdCtaContClientes
|
||||||
@@ -7197,8 +7195,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
CargaVendedores()
|
CargaVendedores()
|
||||||
|
|
||||||
CargaDireccionCP()
|
|
||||||
|
|
||||||
'SI LA VENTA YA ESTA REGISTRADA NO DEBE HABILITAR ACCIONES
|
'SI LA VENTA YA ESTA REGISTRADA NO DEBE HABILITAR ACCIONES
|
||||||
If CveVenta <= 0 Then
|
If CveVenta <= 0 Then
|
||||||
Dim EsModuloCotizacion As Boolean = False
|
Dim EsModuloCotizacion As Boolean = False
|
||||||
@@ -14972,7 +14968,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'TIMBRADO NUEVO
|
'TIMBRADO NUEVO
|
||||||
Try
|
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
|
If ObjetoPDF Is Nothing OrElse ObjetoPDF.Length = 0 Then
|
||||||
PdfFactura(ObjFactura, AplicaPagare:=If(ObjFactura.TipoDocto.Contiene("Ing", "Rem", "Ant"), "1", "0"))
|
PdfFactura(ObjFactura, AplicaPagare:=If(ObjFactura.TipoDocto.Contiene("Ing", "Rem", "Ant"), "1", "0"))
|
||||||
@@ -16300,12 +16296,14 @@ Partial Class Ventas
|
|||||||
Dim TmpDTComplementosTimbrado As New DataTable
|
Dim TmpDTComplementosTimbrado As New DataTable
|
||||||
PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
||||||
|
|
||||||
Dim RespCartaPorte = Timbres.PreParaCartaPorteFactura(CveTimbreCartaPorteVenta, UsuarioActual)
|
If ChkEmitirCartaPorte.Checked Then
|
||||||
If Not RespCartaPorte.TieneError Then
|
Dim RespCartaPorte = Timbres.PreParaCartaPorteFactura(CveTimbreCartaPorteVenta, UsuarioActual)
|
||||||
ObjFactura.Timbre.Complementos.CartaPorte = RespCartaPorte.CartaPorte
|
If Not RespCartaPorte.TieneError Then
|
||||||
Else
|
ObjFactura.Timbre.Complementos.CartaPorte = RespCartaPorte.CartaPorte
|
||||||
Alert(RespCartaPorte.Mensaje, TipoMensaje.MsgAdvertencia)
|
Else
|
||||||
Exit Sub
|
Alert(RespCartaPorte.Mensaje, TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) Then
|
If ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) Then
|
||||||
@@ -18039,6 +18037,11 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
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.ImporteDescuento = Descuento.RoundSQL(2)
|
||||||
ObjDescuento.CvePromocionDetalle = CvePromocionDetalle
|
ObjDescuento.CvePromocionDetalle = CvePromocionDetalle
|
||||||
If SeAjustoPU Then
|
If SeAjustoPU Then
|
||||||
@@ -34220,14 +34223,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
#Region "C A R T A - P O R T E"
|
#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()
|
Public Sub CargarCamiones()
|
||||||
|
|
||||||
TxtFechaEntregaCP.Text = Now.ToString("dd/MM/yyyy")
|
TxtFechaEntregaCP.Text = Now.ToString("dd/MM/yyyy")
|
||||||
|
|||||||
Reference in New Issue
Block a user