Ventas - fechaparasurtir

This commit is contained in:
2024-01-11 21:43:58 -07:00
parent e16c86064c
commit 42205b3fb8
4 changed files with 31 additions and 63 deletions

View File

@@ -3548,12 +3548,21 @@ Public Class ClsPaginas
End Property
Property GlobalDTAC_PD_Programas(CveEjeRector As Integer) As DataTable
Get
Dim CveEmpresa As Integer = 48
Dim AppNombre As String = $"GlobalDTAC_PD_Programas-{CveEmpresa}"
'sino existe, recarga los datos
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjAC As New ClsAC
If ObjAC.GetClasificacionAdministrativa(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjAC.DtResultados
End Using
End If
GlobalDTAC_PD_Programas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
If CveEjeRector <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTAC_PD_Programas"), DataTable), String.Format("CveEjeRector = {0}", CveEjeRector), "", DataViewRowState.CurrentRows)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEjeRector = {0}", CveEjeRector), "", DataViewRowState.CurrentRows)
GlobalDTAC_PD_Programas = Dv.ToTable
Dv.Dispose()
Else
GlobalDTAC_PD_Programas = DirectCast(Application("GlobalDTAC_PD_Programas"), DataTable)
GlobalDTAC_PD_Programas = DirectCast(Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
@@ -5454,7 +5463,7 @@ Public Class ClsPaginas
If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
Vta.FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
Vta.NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("NoCertificadoSAT").InnerText
Vta.FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
Vta.FechaTimbrado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText
Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText
End If
@@ -5573,7 +5582,7 @@ Public Class ClsPaginas
If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
Vta.FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
Vta.NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("noCertificadoSAT").InnerText
Vta.FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
Vta.FechaTimbrado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloCFD").InnerText
Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloSAT").InnerText
End If
@@ -5651,7 +5660,7 @@ Public Class ClsPaginas
'ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme.Replace("https", "http"), Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
'Dim CadenaOriginals As String = "||1.0|" + Vta.FolioFiscal + "|" + Vta.FechaCertificacion.ToString("yyyy-MM-dd") + "T" + Vta.FechaCertificacion.ToString("HH:mm:ss") + "|" + Vta.SelloCFDi + "|" + Vta.NoSerieCertificado + "||"
Dim CadenaOriginals As String = String.Format("||{0}|{1}|{2}T{3}|{4}|{5}||", If(Vta.Version.Contiene("3.3", "4.0"), "1.1", "1.0"), Vta.FolioFiscal, Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"), Vta.SelloCFDi, Vta.NoSerieCertificado)
Dim CadenaOriginals As String = String.Format("||{0}|{1}|{2}T{3}|{4}|{5}||", If(Vta.Version.Contiene("3.3", "4.0"), "1.1", "1.0"), Vta.FolioFiscal, Vta.FechaTimbrado.ToString("yyyy-MM-dd"), Vta.FechaTimbrado.ToString("HH:mm:ss"), Vta.SelloCFDi, Vta.NoSerieCertificado)
If Not ImagenCBB.Exists Then ImgCBB = ""
Dim RutaFormato As String = ""
Dim RutaFormatoDefault As String = ""
@@ -5717,7 +5726,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("DomicilioSucursal", DomicilioSucursal))
params.Add(New ReportParameter("Vencimiento", Vta.FechaVencimiento.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("FolioFiscal", Vta.FolioFiscal))
params.Add(New ReportParameter("FechaCertificacion", String.Format("{0}T{1}", Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"))))
params.Add(New ReportParameter("FechaCertificacion", String.Format("{0}T{1}", Vta.FechaTimbrado.ToString("yyyy-MM-dd"), Vta.FechaTimbrado.ToString("HH:mm:ss"))))
params.Add(New ReportParameter("SelloCFDI", Vta.SelloCFDi))
params.Add(New ReportParameter("CadenaSAT", CadenaOriginals))
params.Add(New ReportParameter("SelloSAT", Vta.SelloSAT))

View File

@@ -339,8 +339,6 @@ Public Class ClsTransportes
End Function
#End Region
#End Region
#Region "Rutas"
Public Function GetRutas(CveRuta As Integer, CveUsuario As Integer, CveEmpresa As Integer, Ruta As String, Estatus As Boolean, FechaIng As DateTime) As Boolean
Dim Retorno As Boolean = False

View File

@@ -424,7 +424,7 @@ Public Class ClsVentas
Return Retorno
End Function
Public Function AddVenta(TipoDocto As String, FolioFact As Integer, CveCliente As Integer, CveClienteSucursal As Integer, SubTotal As Double, Descuento As Double, Amortizacion As Double, IVA As Double, RetIVA As Double, RetISR As Double, Total As Double,
Public Function AddVenta(TipoDocto As String, FolioFact As Integer, CveCliente As Integer, CveClienteSucursal As Integer, SubTotal As Decimal, Descuento As Decimal, Amortizacion As Decimal, IVA As Decimal, RetIVA As Decimal, RetISR As Decimal, Total As Decimal,
CveMoneda As Integer, TipoCambio As Double, CveMetodoPago As Integer, CondicionesPago As Integer, FormaPago As Integer, FechaVencimiento As DateTime, Fecha As DateTime, MotivoDescuento As String, Observaciones As String, FechaEjecucion As DateTime,
CveVendedor As Integer, Alfa1 As String, Alfa2 As String, Alfa3 As String, Num1 As Double, Num2 As Double, Num3 As Double,
Fech1 As Date, Fech2 As Date, Fech3 As Date, CveCorte As Integer, NumeroPersonas As Integer, CvePrePoliza As Integer, CveUsuario As Integer, CveEmpresa As Integer,
@@ -438,7 +438,8 @@ Public Class ClsVentas
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1",
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "",
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False,
Optional FechaParaSurtir As DateTime = MinFecha
) As Boolean
Dim Retorno As Boolean = False
@@ -449,15 +450,15 @@ Public Class ClsVentas
.Add("@FolioFact", SqlDbType.Int).Value = FolioFact
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
.Add("@SubTotal", SqlDbType.Float).Value = SubTotal.RoundSQL
.Add("@Descuento", SqlDbType.Float).Value = Descuento.RoundSQL
.Add("@Amortizacion", SqlDbType.Float).Value = Amortizacion.RoundSQL
.Add("@IVA", SqlDbType.Float).Value = IVA.RoundSQL
.Add("@IEPS", SqlDbType.Float).Value = IEPS.RoundSQL
.Add("@RetIVA", SqlDbType.Float).Value = RetIVA.RoundSQL
.Add("@RetISR", SqlDbType.Float).Value = RetISR.RoundSQL
.Add("@ImpuestoLocal", SqlDbType.Float).Value = ImpuestoLocal.RoundSQL
.Add("@Total", SqlDbType.Float).Value = Total.RoundSQL
.Add("@SubTotal", SqlDbType.Money).Value = SubTotal.RoundSQL
.Add("@Descuento", SqlDbType.Money).Value = Descuento.RoundSQL
.Add("@Amortizacion", SqlDbType.Money).Value = Amortizacion.RoundSQL
.Add("@IVA", SqlDbType.Money).Value = IVA.RoundSQL
.Add("@IEPS", SqlDbType.Money).Value = IEPS.RoundSQL
.Add("@RetIVA", SqlDbType.Money).Value = RetIVA.RoundSQL
.Add("@RetISR", SqlDbType.Money).Value = RetISR.RoundSQL
.Add("@ImpuestoLocal", SqlDbType.Money).Value = ImpuestoLocal.RoundSQL
.Add("@Total", SqlDbType.Money).Value = Total.RoundSQL
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@TipoCambio", SqlDbType.Float).Value = TipoCambio
.Add("@CveMetodoPago", SqlDbType.Int).Value = CveMetodoPago
@@ -480,7 +481,7 @@ Public Class ClsVentas
.Add("@Fech3", SqlDbType.VarChar).Value = IIf(Fech3.ToString.Contiene("1/1/0001 12:00:00 a. m.", "01/01/0001 12:00:00 a. m."), "-1", Fech3.ToString("yyyy/MM/dd"))
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
.Add("@NumeroPersonas", SqlDbType.Int).Value = NumeroPersonas
.Add("@Propina", SqlDbType.Float).Value = Propina
.Add("@Propina", SqlDbType.Money).Value = Propina
.Add("@CveVentaTerminal", SqlDbType.Int).Value = CveVentaTerminal
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
.Add("@AtencionA", SqlDbType.VarChar).Value = AtencionA
@@ -544,6 +545,7 @@ Public Class ClsVentas
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
.Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS
.Add("@FechaParaSurtir", SqlDbType.DateTime).Value = If(FechaParaSurtir = MinFecha, Fecha, FechaParaSurtir)
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue

View File

@@ -7094,7 +7094,6 @@ Namespace Modelos
Public Property FacturarSucursal As Boolean = False
'Public Property Sucursal As SucursalModel
Public Property SubProyecto As Modelos.SubProyectoModel
Public Property DtDetalle As Data.DataTable
Public Property DtMercancias As Data.DataTable
Public Property DtDetalleAC As Data.DataTable
@@ -7108,7 +7107,6 @@ Namespace Modelos
Public Property DtDesgloseImpuestos As Data.DataTable
Public Property DtDocumentosRelacionados As Data.DataTable
Public Property DtNCVinculadas As Data.DataTable
Public Property DtAnticipos As Data.DataTable
Public Property DtPromociones As Data.DataTable
Public Property DtImpuestosLocales As Data.DataTable
@@ -7122,10 +7120,8 @@ Namespace Modelos
Public Property DtDocumentacionCliente As Data.DataTable
Public Property DtContratosSerieDetalle As Data.DataTable
Public Property DtOtrosConceptos As Data.DataTable
Public Property DtRemisionesDocumentosRelacionados As Data.DataTable
Public Property DtInventario As Data.DataTable
'Public Property DtAnticipoAmortizacion As Data.DataTable
Public Property DtRemConceptosSurtidos As Data.DataTable
Public Property UsadosBonificacion As List(Of Integer)
Public Property TipoBonificacion As Integer = 0
@@ -7176,7 +7172,6 @@ Namespace Modelos
Public Property RefDocto As String = ""
Public Property RealizarDevolucionAlmacen As Boolean
Public Property CveAlmacenDevolucionVenta As Integer
Public Property TipoDocumento As String
@@ -7224,28 +7219,6 @@ Namespace Modelos
End Select
End Get
End Property
Public ReadOnly Property TipodeComprobanteSAT As ClbNegBICFDv3_2.TipoDeComprobante
Get
Select Case TipoDocto
Case "Ing"
Return ClbNegBICFDv3_2.TipoDeComprobante.ingreso
Case "Egs"
Return ClbNegBICFDv3_2.TipoDeComprobante.egreso
Case "Dev"
Return ClbNegBICFDv3_2.TipoDeComprobante.egreso
Case "Cot"
Return Nothing
Case "Rem"
Return Nothing
Case "Nom"
Return Nothing
Case "Ant"
Return ClbNegBICFDv3_2.TipoDeComprobante.ingreso
Case Else
Return Nothing
End Select
End Get
End Property
Public ReadOnly Property ClaseDoctoSat As Integer
Get
Select Case TipoDocto
@@ -7293,7 +7266,6 @@ Namespace Modelos
Return retorno
End Get
End Property
Public Property CondicionesPago As Integer = 0 ' 0 - Contado, 1 - Credito (CHECAR)
Public ReadOnly Property CondicionesPagoText As String
@@ -7308,7 +7280,6 @@ Namespace Modelos
Return retorno
End Get
End Property
Public Property MotivoDescuento As String = ""
Public Property EsGarantia As Boolean = False
@@ -7433,24 +7404,21 @@ Namespace Modelos
Public Property Num1 As Double = 0
Public Property Num2 As Double = 0
Public Property Num3 As Double = 0
Public Property DiasCredito As Integer
Public Property EsDiasCreditoFijo As Boolean
Public Property CveCorte As Integer = -1
'Public Property CveMesa As Integer = -1
Public Property NumeroPersonas As Integer = 0
<ComponentModel.DataAnnotations.Schema.NotMapped>
Public Property FechaPago As Date
Public Property CveNCaVincular As Integer
Public Property FolioFiscal As String = ""
Public Property NoSerieCertificado As String
Public Property SelloCFDi As String = ""
Public Property SelloSAT As String = ""
Public Property FechaEmision As Date
Public Property FechaCertificacion As Date
Public Property FechaTimbrado As Date
Public Property NoSerieCertificadoContribuyente As String
Public Property NumeroCuenta As String = ""
Public Property CveTipoAmortizacionAnticipo As Integer = -1
@@ -7564,8 +7532,8 @@ Namespace Modelos
Public Property VendedorCodigo As String = ""
Public Property CveSucursalEjecucion As Integer
Public Property FechaEjecucion As DateTime
Public Property FechaParaSurtir As DateTime = MinFecha
Public Property CveSucursalCobranza As Integer
Public Property CveSubProyectoCobranza As Integer
Public Property CveSubProyectoEjecucion As Integer
Public Property CveOS As Integer
@@ -7578,25 +7546,16 @@ Namespace Modelos
Public Property TipoEstatus As Integer = 0
Public Property CveCondicionEntrega As Integer = -1
Public Property CondicionEntrega As String = ""
Public Property TipoRelacion As String
Public Property UUIDRelacionados As List(Of String)
Public Property CveVentaRelacion As Integer = -1
Public Property ImporteRelacion As Decimal
Public Property EsNCAmortizacion As Boolean
Public Property Kilometraje As Decimal
Public Property CveTipoRetencion As Integer
Public Property VentaDesglosaIEPS As Boolean
Public Property CveMotivoCancelacion As Integer = -1
Public Property MotivoCancelacion As String = ""
Public Property TipoContable As Integer = -1
#End Region