Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1488,7 +1488,7 @@ Public Class ClsBancos
|
||||
Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1,
|
||||
Optional Referencia As String = "-1", Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False,
|
||||
Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "", Optional ConceptoCIE As String = "", Optional CveOCAnticipo As Integer = -1, Optional ImporteDeduccionesPago As Decimal = -1,
|
||||
Optional AnticipoPuntual As Boolean = False, Optional FechaEmision As Date = MinFecha, Optional CveAutorizacion As String = "") As Integer
|
||||
Optional AnticipoPuntual As Boolean = False, Optional FechaEmision As Date = MinFecha, Optional CveAutorizacion As String = "", Optional CveSubProyecto As Integer = -1) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Banc_IEAdd")
|
||||
@@ -1532,6 +1532,7 @@ Public Class ClsBancos
|
||||
.Add("@AnticipoPuntual", SqlDbType.Bit).Value = AnticipoPuntual
|
||||
.Add("@FechaEmision", SqlDbType.Date).Value = FechaEmision
|
||||
.Add("@CveAutorizacion", SqlDbType.VarChar).Value = CveAutorizacion
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -3264,6 +3264,25 @@ Public Class ClsNominas
|
||||
Return retorno
|
||||
End Function
|
||||
#End Region
|
||||
Public Function GetConfiguracionNom(CveEmpresa As Int32, periodo As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_ConfiguracionNomGet", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Periodo", SqlDbType.Int).Value = periodo
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch sqEx As SqlException
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al obtener los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al obtener los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
#Region "MovtosPermanentes"
|
||||
|
||||
Public Function GetMovtoPermanenteRep(CveEmpresa As Int32, CvePersonal As Integer) As Boolean
|
||||
|
||||
@@ -10432,8 +10432,9 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Nomina/PreNominaHistorial.aspx".ToUpper(), 148)
|
||||
PaginaDict.Add("/Nomina/RepPreNomina.aspx".ToUpper(), 74)
|
||||
PaginaDict.Add("/Nomina/Nomina.aspx".ToUpper(), 75)
|
||||
PaginaDict.Add("/Nomina/NominaB.aspx".ToUpper(), 75)
|
||||
PaginaDict.Add("/Nomina/Nomina2.aspx".ToUpper(), 75)
|
||||
PaginaDict.Add("/Nomina/Configuracion.aspx".ToUpper(), 1135)
|
||||
PaginaDict.Add("/Nomina/RepMovtosPermanentes.aspx".ToUpper(), 1136)
|
||||
|
||||
PaginaDict.Add("/Nomina/ReportedeAcumulados.aspx".ToUpper(), 75)
|
||||
PaginaDict.Add("/Nomina/ListaAsistencias.aspx".ToUpper(), 91)
|
||||
PaginaDict.Add("/Nomina/CatConceptos.aspx".ToUpper(), 172)
|
||||
|
||||
@@ -439,7 +439,7 @@ Namespace Modelos
|
||||
End If
|
||||
Timbre = New CFDITimbre
|
||||
End Sub
|
||||
Public Sub New(UsuarioActual As Usuario, CveVenta As Integer, CveEmpresa As Integer, Optional DirectorioServidor As String = "", Optional EsCancelacion As Boolean = False, Optional CargaDTDetalle As Boolean = True, Optional CargaDatosCliente As Boolean = True, Optional CargaDatosRelacionados As Boolean = True, Optional VerificaAlmacen As Boolean = True)
|
||||
Public Sub New(UsuarioActual As Usuario, CveVenta As Integer, CveEmpresa As Integer, Optional DirectorioServidor As String = "", Optional EsCancelacion As Boolean = False, Optional CargaDTDetalle As Boolean = True, Optional CargaDatosCliente As Boolean = True, Optional CargaDatosRelacionados As Boolean = True, Optional VerificaAlmacen As Boolean = False)
|
||||
Me.UsuarioActual = UsuarioActual
|
||||
Me.CveVenta = CveVenta
|
||||
Me.CveEmpresa = CveEmpresa
|
||||
|
||||
@@ -924,8 +924,8 @@ Public Class Timbrado
|
||||
.TasaOCuota = drp("PorcentajeImpuesto").ToString().ToDecimal,
|
||||
.Impuesto = drp("TipoImpuesto").ToString,
|
||||
.Importe = drp("Importe").ToString().ToDecimal.RoundSQL,
|
||||
.BaseMN = (drp("Base").ToString.ToDecimal / Equivalencia).RoundSQL(2),
|
||||
.ImporteMN = (drp("Importe").ToString.ToDecimal / Equivalencia).RoundSQL(2)
|
||||
.BaseMN = (drp("Base").ToString.ToDecimal / Equivalencia).RoundSQL(6), 'OIC 2024-08-03 cambio Round 2 a 6 Caso Emp 119 CveIE 2931362 pago de pesos en dolares
|
||||
.ImporteMN = (drp("Importe").ToString.ToDecimal / Equivalencia).RoundSQL(6) 'OIC 2024-08-03 cambio Round 2 a 6 Caso Emp 119 CveIE 2931362 pago de pesos en dolares
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -1605,7 +1605,7 @@ Partial Class Compras_eFacturas
|
||||
End While
|
||||
End If
|
||||
Catch ex As Exception
|
||||
GuardaLog("'ERROR :" & ex.Message)
|
||||
GuardaLogAD("'ERROR :" & ex.Message, eFacturasLog)
|
||||
End Try
|
||||
End Using
|
||||
Next
|
||||
@@ -1702,7 +1702,7 @@ Partial Class Compras_eFacturas
|
||||
Next
|
||||
|
||||
If File.Exists(filePathXML) Then
|
||||
Dim a As New ComprobanteFactura
|
||||
Dim a As New ComprobanteFactura(eFacturasLog)
|
||||
Dim FF As Factura = a.CargaComprobanteXML(File.ReadAllText(filePathXML), UsuarioActual.Empresa.Ruta, UsuarioActual.Empresa.RFC, UsuarioActual.CveEmpresa, True, rowLog, NombreArchivo:=fInfoXML.Name)
|
||||
|
||||
If FF IsNot Nothing AndAlso FF.CveFactura > 0 Then
|
||||
@@ -5221,6 +5221,14 @@ Partial Class Compras_eFacturas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property eFacturasLog As String
|
||||
Get
|
||||
Return "eFacturasLog"
|
||||
End Get
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
Private Sub CargaClasificacionesComprobaciones()
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then
|
||||
@@ -7434,9 +7442,16 @@ Namespace ADS.eFacturas
|
||||
Public Property MonedaDR As String
|
||||
Public Property MetodoDePagoDR As String
|
||||
Public Property NumParcialidad As String
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ComprobanteFactura
|
||||
Public Property ArchivoLog As String
|
||||
|
||||
Public Sub New(NombreArchivoLog As String)
|
||||
ArchivoLog = NombreArchivoLog
|
||||
End Sub
|
||||
|
||||
Public Property Pagos As List(Of Pago)
|
||||
Public Property XMLNodosPagos As String
|
||||
Public Property XMLNodosPagosCount As Integer
|
||||
@@ -7552,7 +7567,7 @@ Namespace ADS.eFacturas
|
||||
|
||||
Fact.SumaTotalTraslados += Fact.TrasladoIVA + Fact.TrasladoIEPS
|
||||
Catch ex As Exception
|
||||
ex.ToString().GuardaLog()
|
||||
ex.ToString().GuardaLogAD(ArchivoLog)
|
||||
End Try
|
||||
End If
|
||||
|
||||
@@ -7628,7 +7643,7 @@ Namespace ADS.eFacturas
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
ModExtensiones.GuardaLog(ex.ToString())
|
||||
ModExtensiones.GuardaLogAD(ex.ToString(), ArchivoLog)
|
||||
End Try
|
||||
End If
|
||||
|
||||
@@ -7730,7 +7745,7 @@ Namespace ADS.eFacturas
|
||||
XMLDoc.LoadXml(XMlStr)
|
||||
XMLCargaExistosa = True
|
||||
Catch ex As Exception
|
||||
GuardaLog("Error al intentar leer . Error:" & ex.ToString())
|
||||
GuardaLogAD("Error al intentar leer . Error:" & ex.ToString(), ArchivoLog)
|
||||
'Errores.AppendLine("Error al intentar leer el XML. Error:" & ex.ToString())
|
||||
XMLCargaExistosa = False
|
||||
End Try
|
||||
@@ -7999,11 +8014,11 @@ Namespace ADS.eFacturas
|
||||
Select Case Fact.RespuestaInsert
|
||||
Case 0
|
||||
Dim RRutaDestino As String = String.Format("{0}{1}\{2}.xml", Destino, Fact.EmisorRFC, ObjCompra.CveFactura)
|
||||
ModExtensiones.GuardaLog(String.Format(" '--------{0} Compra ya insertada : {1}{2} - {3}", 1, Fact.Serie, Fact.Folio, RRutaDestino))
|
||||
ModExtensiones.GuardaLogAD(String.Format(" '--------{0} Compra ya insertada : {1}{2} - {3}", 1, Fact.Serie, Fact.Folio, RRutaDestino), ArchivoLog)
|
||||
|
||||
File.WriteAllText(RRutaDestino, StrFuente, UTF8Encoding.UTF8)
|
||||
'ObjCompra.UpdateArchivo(ObjCompra.CveFactura, "XML")
|
||||
ModExtensiones.GuardaLog(" '--------XML Actualizado ")
|
||||
ModExtensiones.GuardaLogAD(" '--------XML Actualizado ", ArchivoLog)
|
||||
rowLog("Motivo") = $"Ya registrado {Fact.Serie}-{Fact.Folio} se actualiza XML."
|
||||
|
||||
Correcto = True
|
||||
@@ -8015,7 +8030,7 @@ Namespace ADS.eFacturas
|
||||
Try
|
||||
File.WriteAllText(String.Format("{0}{1}\{2}.xml", Destino, Fact.EmisorRFC, ObjCompra.CveFactura), StrFuente, UTF8Encoding.UTF8)
|
||||
' ObjCompra.UpdateArchivo(ObjCompra.CveFactura, "XML")
|
||||
ModExtensiones.GuardaLog($" '-------- XML Guardado Factura: {Fact.Serie}-{Fact.Folio} UUID: {Fact.UUID} , RFC Emisor: {Fact.EmisorRFC}")
|
||||
ModExtensiones.GuardaLogAD($" '-------- XML Guardado Factura: {Fact.Serie}-{Fact.Folio} UUID: {Fact.UUID} , RFC Emisor: {Fact.EmisorRFC}", ArchivoLog)
|
||||
|
||||
' Si se movieron los dos archivos, los marca como correcto
|
||||
If File.Exists(String.Format("{0}{1}\{2}.xml", Destino, Fact.EmisorRFC, ObjCompra.CveFactura)) Then
|
||||
@@ -8024,13 +8039,13 @@ Namespace ADS.eFacturas
|
||||
Correcto = False
|
||||
End If
|
||||
|
||||
ModExtensiones.GuardaLog(" '++++++++ Compra Insertada :" & Fact.Serie & Fact.Folio & " - Correcto:" & If(Correcto, "Si", "No" & " Obs: "))
|
||||
ModExtensiones.GuardaLogAD(" '++++++++ Compra Insertada :" & Fact.Serie & Fact.Folio & " - Correcto:" & If(Correcto, "Si", "No" & " Obs: "), ArchivoLog)
|
||||
rowLog("Motivo") = $"Agregado {Fact.Serie}-{Fact.Folio}"
|
||||
|
||||
Catch ex As Exception
|
||||
StrMover = ex.Message
|
||||
Correcto = False
|
||||
ModExtensiones.GuardaLog(" '++++++++ Compra no Insertada :" & Fact.Serie & Fact.Folio & " - Correcto:" & If(Correcto, "Si", "No" & " Obs: ") & StrMover)
|
||||
ModExtensiones.GuardaLogAD(" '++++++++ Compra no Insertada :" & Fact.Serie & Fact.Folio & " - Correcto:" & If(Correcto, "Si", "No" & " Obs: ") & StrMover, ArchivoLog)
|
||||
rowLog("Motivo") = $"Error al agregar {Fact.Serie}-{Fact.Folio}"
|
||||
End Try
|
||||
|
||||
@@ -8039,7 +8054,7 @@ Namespace ADS.eFacturas
|
||||
|
||||
Catch ex As Exception
|
||||
Correcto = True
|
||||
GuardaLog(ex.ToString())
|
||||
GuardaLogAD(ex.ToString(), ArchivoLog)
|
||||
End Try
|
||||
|
||||
Else
|
||||
@@ -8058,7 +8073,7 @@ Namespace ADS.eFacturas
|
||||
ObjCompra.Dispose()
|
||||
|
||||
Else
|
||||
ModExtensiones.GuardaLog($" '++++++++ Compra RFC Distinto RFC Empresa: {RFCEmpresa}, RFC XML: {Fact.ReceptorRFC} ")
|
||||
ModExtensiones.GuardaLogAD($" '++++++++ Compra RFC Distinto RFC Empresa: {RFCEmpresa}, RFC XML: {Fact.ReceptorRFC} ", ArchivoLog)
|
||||
rowLog("Motivo") = "RFC Distinto"
|
||||
rowLog("Motivo") = $"RFC ""{Fact.ReceptorRFC}"" Incorrecto"
|
||||
End If
|
||||
@@ -8090,7 +8105,7 @@ Namespace ADS.eFacturas
|
||||
Dim b As Byte() = cfdi.ConvertirQrCode(String.Format("?re={0}&rr={1}&tt={2}&id={3}", Fact.EmisorRFC, Fact.ReceptorRFC, String.Format("{0,12:F6}", dtotal).Trim(), Fact.UUID))
|
||||
File.WriteAllBytes(TmpArchivoQR, b)
|
||||
Catch ex As Exception
|
||||
ModExtensiones.GuardaLog(ex.Message)
|
||||
ModExtensiones.GuardaLogAD(ex.Message, ArchivoLog)
|
||||
End Try
|
||||
|
||||
If System.IO.File.Exists(TmpArchivoQR) Then
|
||||
@@ -8115,7 +8130,7 @@ Namespace ADS.eFacturas
|
||||
'Dim DtDocumentosR As DataTable = Nothing
|
||||
|
||||
If Fact.TipoComprobante.Contiene("P", "T") Then
|
||||
ModExtensiones.GuardaLog(String.Format(" '--------PDF Generar Tipo {0}", Fact.TipoComprobante))
|
||||
ModExtensiones.GuardaLogAD(String.Format(" '--------PDF Generar Tipo {0}", Fact.TipoComprobante), ArchivoLog)
|
||||
Retorno = GenGoPdf(ArchivoXML, TmpArchivoPDF, DirectorioEmpresas)
|
||||
Fact.ArchivoPDF = Path.GetFileName(TmpArchivoPDF)
|
||||
|
||||
@@ -8134,8 +8149,8 @@ Namespace ADS.eFacturas
|
||||
Else
|
||||
|
||||
If (Fact.Version = "3.3" Or Fact.Version = "4.0") Then
|
||||
Dim cxml As XmlSatCFDI = XmlSatCFDI.readXML(ArchivoXML)
|
||||
ModExtensiones.GuardaLog(String.Format(" *********** UUID : {0} ***********", cxml.complemento.UUID))
|
||||
Dim cxml As XmlSatCFDI = XmlSatCFDI.readXML(ArchivoXML, ArchivoLog)
|
||||
ModExtensiones.GuardaLogAD(String.Format(" *********** UUID : {0} ***********", cxml.complemento.UUID), ArchivoLog)
|
||||
cxml.ImprimirPDF(TmpArchivoPDF, DirectorioEmpresa, Fact.TipoComprobante)
|
||||
Fact.ArchivoPDF = Path.GetFileName(TmpArchivoPDF)
|
||||
|
||||
@@ -8152,7 +8167,7 @@ Namespace ADS.eFacturas
|
||||
End Try
|
||||
|
||||
Else
|
||||
ModExtensiones.GuardaLog(String.Format(" *********** TFDUUID : {0} ***********", Fact.UUID))
|
||||
ModExtensiones.GuardaLogAD(String.Format(" *********** TFDUUID : {0} ***********", Fact.UUID), ArchivoLog)
|
||||
Dim DomFiscal As String = String.Format("Domicilio Fiscal {0}{1} {2}{0}Col.{3}{0}CP. {4} {5},{6},{7}", vbCr, Fact.DomFisCalle, Fact.DomFisNoExt, Fact.DomFisCol, Fact.DomFisCP, Fact.DomFisMun, Fact.DomFisEst, Fact.DomFisPais)
|
||||
|
||||
If GeneraPDFNew(TmpArchivoPDF, Fact.UUID, Fact.SubTotal, Fact.Descuento, Fact.Total, Fact.TrasladoIVA.FormatoNumero(), Fact.Moneda, Fact.FormaDePago, Fact.TFDNoCertSAT, Fact.TFDFechaTimbrado.ToDate(), Fact.noCertificado,
|
||||
@@ -8192,7 +8207,7 @@ Namespace ADS.eFacturas
|
||||
MensajeError &= " - " & ex.InnerException.ToString()
|
||||
End If
|
||||
|
||||
ModExtensiones.GuardaLog(MensajeError)
|
||||
ModExtensiones.GuardaLogAD(MensajeError, ArchivoLog)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
@@ -8300,10 +8315,10 @@ Namespace ADS.eFacturas
|
||||
End Using
|
||||
Retorno = True
|
||||
Else
|
||||
ModExtensiones.GuardaLog("ERROR: No existe Formato Base")
|
||||
ModExtensiones.GuardaLogAD("ERROR: No existe Formato Base", ArchivoLog)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ModExtensiones.GuardaLog(String.Format("Ocurrio un Error al generar el reporte RLDC :" & ex.ToString()))
|
||||
ModExtensiones.GuardaLogAD(String.Format("Ocurrio un Error al generar el reporte RLDC :" & ex.ToString()), ArchivoLog)
|
||||
Retorno = False
|
||||
End Try
|
||||
Return Retorno
|
||||
@@ -8356,7 +8371,7 @@ Namespace ADS.eFacturas
|
||||
XMLNodosPagos = nodePagos.InnerXml.Replace("pago20:", "").Replace("pagos20:", "").Replace(PrefijoPagos & ":", "")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ModExtensiones.GuardaLog(ex.ToString())
|
||||
ModExtensiones.GuardaLogAD(ex.ToString(), ArchivoLog)
|
||||
End Try
|
||||
End If
|
||||
|
||||
@@ -8410,7 +8425,7 @@ Namespace ADS.eFacturas
|
||||
|
||||
|
||||
Private Function GenGoPdf(ByVal XmlRutaArchivo As String, ByVal PDFRutaArchivo As String, DirectorioEmpresa As String) As Boolean
|
||||
ModExtensiones.GuardaLog(" '--------PDF GenGoPdf Inicia ")
|
||||
ModExtensiones.GuardaLogAD(" '--------PDF GenGoPdf Inicia ", ArchivoLog)
|
||||
|
||||
Dim Respuesta As Boolean = False
|
||||
Dim RutaRDLC As String = $"{DirectorioEmpresa}\Grales\Formatos\ReciboDePagoGOPDF.rdlc" 'String.Format("{0}{1}", Extensiones.ApplicationParameter.RutaArchivos, "Empresas\Grales\Formatos\ReciboDePagoGOPDF.rdlc")
|
||||
@@ -8427,15 +8442,15 @@ Namespace ADS.eFacturas
|
||||
If result IsNot Nothing Then
|
||||
File.WriteAllBytes(PDFRutaArchivo, result)
|
||||
Respuesta = True
|
||||
ModExtensiones.GuardaLog($" '--------PDF GenGoPdf Generado")
|
||||
ModExtensiones.GuardaLogAD($" '--------PDF GenGoPdf Generado", ArchivoLog)
|
||||
Else
|
||||
ModExtensiones.GuardaLog($" '--------PDF GenGoPdf Error se genero nulo \n RDLC: {RutaRDLC} Ruta Xml: {XmlRutaArchivo} Ruta PDF: {PDFRutaArchivo} \n MensajeError: {goPdf.MensajeError} CodigoError :{goPdf.CodigoError}")
|
||||
ModExtensiones.GuardaLogAD($" '--------PDF GenGoPdf Error se genero nulo \n RDLC: {RutaRDLC} Ruta Xml: {XmlRutaArchivo} Ruta PDF: {PDFRutaArchivo} \n MensajeError: {goPdf.MensajeError} CodigoError :{goPdf.CodigoError}", ArchivoLog)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ModExtensiones.GuardaLog($" '--------PDF GenGoPdf Error {ex.Message} -- > {ex.StackTrace} \n RDLC: {RutaRDLC} Ruta Xml: {XmlRutaArchivo} Ruta PDF: {PDFRutaArchivo}")
|
||||
ModExtensiones.GuardaLogAD($" '--------PDF GenGoPdf Error {ex.Message} -- > {ex.StackTrace} \n RDLC: {RutaRDLC} Ruta Xml: {XmlRutaArchivo} Ruta PDF: {PDFRutaArchivo}", ArchivoLog)
|
||||
End Try
|
||||
|
||||
ModExtensiones.GuardaLog(" '--------PDF GenGoPdf Finaliza ")
|
||||
ModExtensiones.GuardaLogAD(" '--------PDF GenGoPdf Finaliza ", ArchivoLog)
|
||||
Return Respuesta
|
||||
End Function
|
||||
|
||||
@@ -8448,7 +8463,7 @@ Namespace ADS.eFacturas
|
||||
''' Clase para contener los valores de un xml CFDI cambio norma
|
||||
''' </summary>
|
||||
Public Class XmlSatCFDI
|
||||
Public Sub New()
|
||||
Public Sub New(NombreArchivoLog As String)
|
||||
comprobante = New CFDIComprobante()
|
||||
emisor = New CFDIEmisor()
|
||||
receptor = New CFDIReceptor()
|
||||
@@ -8456,6 +8471,7 @@ Namespace ADS.eFacturas
|
||||
cFDIRelacionados = New List(Of CFDIRelacionado)()
|
||||
conceptos = New List(Of CFDIConcepto)()
|
||||
Impuestos = New List(Of CFDIImpuesto)()
|
||||
ArchivoLog = NombreArchivoLog
|
||||
End Sub
|
||||
|
||||
Public comprobante As CFDIComprobante
|
||||
@@ -8465,6 +8481,7 @@ Namespace ADS.eFacturas
|
||||
Public cFDIRelacionados As List(Of CFDIRelacionado)
|
||||
Public conceptos As List(Of CFDIConcepto)
|
||||
Public Impuestos As List(Of CFDIImpuesto)
|
||||
Public Property ArchivoLog As String = "Log"
|
||||
|
||||
Public Function GetConceptosforpdf() As List(Of CFDIConcepto_I)
|
||||
Dim lcon As New List(Of CFDIConcepto_I)()
|
||||
@@ -8512,8 +8529,8 @@ Namespace ADS.eFacturas
|
||||
Return lcon
|
||||
End Function
|
||||
|
||||
Public Shared Function readXML(fileUrl As String) As XmlSatCFDI
|
||||
Dim xmlCFDI As New XmlSatCFDI()
|
||||
Public Shared Function readXML(fileUrl As String, NombreArchivoLog As String) As XmlSatCFDI
|
||||
Dim xmlCFDI As New XmlSatCFDI(NombreArchivoLog)
|
||||
Dim canread As Boolean = True
|
||||
' Keys
|
||||
Dim keyComprobante As String = "cfdi:Comprobante"
|
||||
@@ -8923,7 +8940,7 @@ Namespace ADS.eFacturas
|
||||
Dim cfdi As New RVCFDI33.GeneraCFDI()
|
||||
cQr = cfdi.ConvertirQrCode($"?re={objxml.emisor.Rfc}&rr={objxml.receptor.Rfc}&tt={(If(objxml.complemento.Pagos Is Nothing, objxml.comprobante.Total, objxml.complemento.Pagos.Monto))}&id={objxml.complemento.UUID}")
|
||||
Catch exQR As Exception
|
||||
ModExtensiones.GuardaLog("Error al generar QR - " & exQR.Message & " - " & exQR.StackTrace.ToString())
|
||||
ModExtensiones.GuardaLogAD("Error al generar QR - " & exQR.Message & " - " & exQR.StackTrace.ToString(), ArchivoLog)
|
||||
End Try
|
||||
|
||||
Dim parametros As New List(Of ReportParameter)()
|
||||
|
||||
@@ -229,10 +229,10 @@ Partial Class RH_CatDocumentos
|
||||
TxtOrden.Text = Orden.ToString
|
||||
|
||||
TxtDiasLimite.Text = GvRow.DataKey("DiasLimite")
|
||||
ChkAplicaDiasLimite.Checked = Boolean.Parse(GvRow.DataKey("AplicaDiasLimite"))
|
||||
TxtPeriodicidad.Text = GvRow.DataKey("Periodicidad")
|
||||
|
||||
ChkAplicaFechaVencimiento.Checked = Boolean.Parse(GvRow.DataKey("AplicaFechaVencimiento"))
|
||||
ChkAplicaDiasLimite.Checked = If(GvRow.DataKey("AplicaDiasLimite").ToEntero = 1, True, False)
|
||||
TxtPeriodicidad.Text = GvRow.DataKey("Periodicidad")
|
||||
|
||||
ChkAplicaFechaVencimiento.Checked = If(GvRow.DataKey("AplicaFechaVencimiento").ToEntero = 1, True, False)
|
||||
|
||||
DdlDocumentacionTipo.SelectedValueExist(CveDocumentacionTipo)
|
||||
chkEstatus.Checked = Estatus
|
||||
|
||||
@@ -199,7 +199,8 @@
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS, CodigoPS, CveUM, Cantidad, Precio, Observaciones, CveContratoDetalle,UnidadMedida,Serie, Lote, FechaCaducidad" EmptyDataText="No se encontraron Productos registrados" ToolTip="Listado de Productos" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cantidad" HeaderStyle-HorizontalAlign="Left" DataFormatString="{0:N}" ItemStyle-HorizontalAlign="Center" DataField="Cantidad" ItemStyle-Width="30px" />
|
||||
<asp:BoundField HeaderText="Producto" HeaderStyle-HorizontalAlign="Left" DataField="CodigoPS" ItemStyle-Width="60%" />
|
||||
<asp:BoundField HeaderText="Producto" HeaderStyle-HorizontalAlign="Left" DataField="CodigoPS" ItemStyle-Width="60%" />
|
||||
<asp:BoundField HeaderText="Existencia" HeaderStyle-HorizontalAlign="Right" DataField="Existencia" ItemStyle-Width="40px" DataFormatString="{0:N2}" />
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="Si" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports System.Data
|
||||
Imports ClosedXML.Excel.XLPredefinedFormat
|
||||
Imports DocumentFormat.OpenXml.Math
|
||||
Imports Extensiones
|
||||
Imports Telerik.Web.UI.ComboBox.ComboBoxStyles
|
||||
|
||||
@@ -165,6 +166,10 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
TempDT.Columns.Add("Serie", Type.GetType("System.String"))
|
||||
TempDT.Columns.Add("Lote", Type.GetType("System.String"))
|
||||
TempDT.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime"))
|
||||
TempDT.Columns.Add("Existencia", Type.GetType("System.Decimal"))
|
||||
|
||||
|
||||
|
||||
|
||||
TempDT.Columns.Add()
|
||||
End Sub
|
||||
@@ -180,6 +185,8 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'If ObjInventario.GetExistenciasPS(DdlProductoServicio.SelectedValue.ToEntero, DdlUM.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, PendientePorSurtir:=1, Lote:=TxtLote.Text.ToString, FechaCaducidad:=TxtCaducidad.Text.ToString) >= TxtCantidad.Text.ToDouble Then
|
||||
|
||||
TxtCantidad.Text = ""
|
||||
@@ -200,14 +207,47 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
|
||||
|
||||
Private Function AddPSTemporal() As Boolean
|
||||
|
||||
|
||||
'Dim CveUsuarioAutoriza As Integer = -1
|
||||
Dim EstatusAlmacen As Integer = 2
|
||||
'VERIFICA EXISTENCIAS
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Existencia As Decimal = 0
|
||||
Dim TieneErrorExistencia As Boolean = False
|
||||
Dim MensajeExistencia As New StringBuilder
|
||||
MensajeExistencia.Append("No hay la existencia suficiente de los siguientes productos:<br/>")
|
||||
'Dim CodigoPS As String = ""
|
||||
Dim CveUnidadMedida As Integer = GlobalDTPS(UsuarioActual.CveEmpresa, DdlProductoServicio.SelectedValue.ToEntero).FiltroPrimeroValor("CveUnidadMedida").ToEntero
|
||||
|
||||
|
||||
'CodigoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=Row.DataKey("CvePS").ToEntero).FiltroPrimeroValor("PSCodigo", "")
|
||||
Existencia = ObjInventarios.GetExistenciasPS(DdlProductoServicio.SelectedValue.ToEntero, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=NowADS.ToString("yyyy/MM/dd 23:59"))
|
||||
|
||||
If Existencia - (TempDT.SUM("Cantidad", $"CvePS = {DdlProductoServicio.SelectedValue.ToEntero} AND CveUM = {CveUnidadMedida}") + TxtCantidad.Text.Trim.ToDecimal) <= 0 Then
|
||||
MensajeExistencia.AppendFormat("<br/> - <b>{0}.</b> Existencia: {1}", DdlProductoServicio.SelectedText, Existencia)
|
||||
TieneErrorExistencia = True
|
||||
End If
|
||||
|
||||
If TieneErrorExistencia Then
|
||||
Alert(MensajeExistencia.ToString, TipoMensaje.MsgAdvertencia)
|
||||
ObjInventarios.Dispose()
|
||||
Return False
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim Row As DataRow = TempDT.NewRow()
|
||||
Dim Lote As String = "-1"
|
||||
Dim FechaCaducidad As Date = MinFecha
|
||||
Row("Cantidad") = TxtCantidad.Text.Trim.ToDouble
|
||||
Row("Cantidad") = TxtCantidad.Text.Trim.ToDecimal
|
||||
Row("CvePS") = DdlProductoServicio.SelectedValue.ToEntero
|
||||
Row("CodigoPS") = DdlProductoServicio.SelectedText
|
||||
Row("Precio") = 0
|
||||
'Row("CveUM") = DdlUM.SelectedValue.ToEntero
|
||||
Row("CveUM") = CveUnidadMedida
|
||||
Row("Existencia") = Existencia
|
||||
'Row("UnidadMedida") = DdlUM.SelectedItem.Text
|
||||
Row("Observaciones") = ""
|
||||
Row("Lote") = "-1"
|
||||
@@ -249,20 +289,6 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Dim CodigoPS As String = ""
|
||||
|
||||
|
||||
''Aqui poner permiso para poder evitar permiso de traslado
|
||||
'If ObjInventarios.GetAlmacenes(-1, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||
|
||||
' If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
' CveUsuarioAutoriza = If(ObjInventarios.DtResultados.FiltraParametros($"CveAlmacen = {DdlAlmacenDestino.SelectedValue}")(0)("CveUsuarioAutoriza").ToString.ToEntero > 0, ObjInventarios.DtResultados.FiltraParametros($"CveAlmacen = {DdlAlmacenDestino.SelectedValue}")(0)("CveUsuarioAutoriza").ToString.ToEntero, -1)
|
||||
' If CveUsuarioAutoriza > 0 Then
|
||||
' EstatusAlmacen = 1
|
||||
' End If
|
||||
|
||||
' Else
|
||||
' CveUsuarioAutoriza = -1
|
||||
' End If
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,10 @@ Partial Class CatContrasenia
|
||||
End Sub
|
||||
|
||||
Public Sub GuardaDatos()
|
||||
If TxtContrasenia1.Text.Length < 7 Then
|
||||
Alert("La contraseña debe ser de al menos 8 caracteres.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Usuario As New ClsSisUsuarios
|
||||
Usuario.IniciaTransacSQL()
|
||||
@@ -41,9 +45,9 @@ Partial Class CatContrasenia
|
||||
Usuario.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
GuardaDatos()
|
||||
|
||||
@@ -909,7 +909,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim EsAnticipoEspecial As Boolean = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, gvr.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, gvr.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa, VerificaAlmacen:=False)
|
||||
End If
|
||||
|
||||
Dim VentaActual As New Venta(UsuarioActual)
|
||||
|
||||
@@ -111,7 +111,13 @@ Partial Class Ventas_PVCobranza
|
||||
'If UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", CveMon))
|
||||
DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", CveMon))
|
||||
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", CveMon))
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa.Contiene(195, 197) Then
|
||||
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(CveMon <= 0, 1, CveMon)))
|
||||
Else
|
||||
DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(CveMon <= 0, 1, CveMon)))
|
||||
End If
|
||||
'DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", CveMon))
|
||||
|
||||
DtCC.Dispose()
|
||||
|
||||
@@ -387,16 +393,8 @@ Partial Class Ventas_PVCobranza
|
||||
End If
|
||||
|
||||
If LtlSaldo.Text.ToDecimal() > Pagado Then
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
If (LtlSaldo.Text.ToDecimal() - Pagado) > 6 Then
|
||||
Alert("Favor de especificar el saldo total de pagar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
Alert("Favor de especificar el saldo total de pagar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Alert("Favor de especificar el saldo total de pagar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim PagadoSinEfectivo As Decimal = Pagado - TxtImporteEfectivo.Text.ToDecimal
|
||||
@@ -486,13 +484,13 @@ Partial Class Ventas_PVCobranza
|
||||
If CvePrePoliza > 0 Then
|
||||
|
||||
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteCredito.Text.ToDecimal > 0 Then
|
||||
MsgError = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte)
|
||||
MsgError = RegistraIE(12, DdlCuentaTarjetaCredito.SelectedValue.ToEntero, TxtImporteCredito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
|
||||
SaldoPendiente -= TxtImporteCredito.Text.ToDecimal
|
||||
PagoAplicado += TxtImporteCredito.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteDebito.Text.ToDecimal > 0 Then
|
||||
MsgError = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte)
|
||||
MsgError = RegistraIE(11, DdlCuentaTarjetaDebito.SelectedValue.ToEntero, TxtImporteDebito.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
|
||||
SaldoPendiente -= TxtImporteDebito.Text.ToDecimal
|
||||
PagoAplicado += TxtImporteDebito.Text.ToDecimal
|
||||
End If
|
||||
@@ -503,13 +501,13 @@ Partial Class Ventas_PVCobranza
|
||||
Obs = $"{VentaActual.SerieFolio} - Autorizó: {TxtAutorizo.Text}"
|
||||
End If
|
||||
|
||||
MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, Obs:=Obs, CveAutorizacion:=TxtClaveAutorizacion.Text.Trim())
|
||||
MsgError = RegistraIE(3, DdlCuentaCheque.SelectedValue.ToEntero, TxtImporteCheque.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, Obs:=Obs, CveAutorizacion:=TxtClaveAutorizacion.Text.Trim(), CveSubProyecto:=VentaActual.CveSubProyecto)
|
||||
SaldoPendiente -= TxtImporteCheque.Text.ToDecimal
|
||||
PagoAplicado += TxtImporteCheque.Text.ToDecimal
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteTransferencia.Text.ToDecimal > 0 Then
|
||||
MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte)
|
||||
MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
|
||||
SaldoPendiente -= TxtImporteTransferencia.Text.ToDecimal
|
||||
PagoAplicado += TxtImporteTransferencia.Text.ToDecimal
|
||||
End If
|
||||
@@ -522,18 +520,12 @@ Partial Class Ventas_PVCobranza
|
||||
TxtCambio.Text = (PagoAplicado - SaldoTotalInicial).FormatoNumero
|
||||
PagoEfectivo = SaldoPendiente
|
||||
End If
|
||||
MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte)
|
||||
MsgError = RegistraIE(13, DdlCuentaEfectivo.SelectedValue.ToEntero, PagoEfectivo, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
|
||||
SaldoPendiente -= PagoEfectivo
|
||||
End If
|
||||
|
||||
If SaldoPendiente > 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
If SaldoPendiente > 6 Then
|
||||
MsgError = "Tiene saldo pendiente por aplicar"
|
||||
End If
|
||||
Else
|
||||
MsgError = "Tiene saldo pendiente por aplicar"
|
||||
End If
|
||||
MsgError = "Tiene saldo pendiente por aplicar"
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, tCveCorte) Then
|
||||
@@ -746,14 +738,14 @@ Partial Class Ventas_PVCobranza
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas, tCveCorte As Integer, Optional Obs As String = "", Optional CveAutorizacion As String = "") As String
|
||||
Private Function RegistraIE(Metodo As Integer, CveBancoCuenta As Integer, ImportePago As Decimal, Fecha As Date, CvePrePoliza As Integer, VentaActual As Venta, ByRef ObjIE As ClsBancos, ByRef ObjConta As ClsContabilidad, ByRef ObjVentas As ClsVentas, tCveCorte As Integer, Optional Obs As String = "", Optional CveAutorizacion As String = "", Optional CveSubProyecto As Integer = -1) As String
|
||||
Dim Retorno As String = ""
|
||||
Dim CveIEPago As Integer = 0
|
||||
Dim ErrorConta As Boolean
|
||||
If String.IsNullOrEmpty(Obs) Then
|
||||
Obs = VentaActual.SerieFolio
|
||||
End If
|
||||
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, Obs, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte, CveAutorizacion:=CveAutorizacion)
|
||||
CveIEPago = ObjIE.AddBancos_IE(CveBancoCuenta, Metodo, Fecha, "-1", VentaActual.ClienteNombre, ImportePago, 1, 1, Obs, "", False, True, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte, CveAutorizacion:=CveAutorizacion, CveSubProyecto:=CveSubProyecto)
|
||||
If CveIEPago > 0 Then
|
||||
Dim Pago As New VentaPago
|
||||
Pago.ImportePagoVenta = ImportePago
|
||||
|
||||
@@ -531,7 +531,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion, bool EsRefacturacion = false, string FolioSustitucion = "", int CveEstatusRefacturacion = 0, int CveMotivoCancelacion = 0)
|
||||
{
|
||||
Modelos.Factura.MCancelacionVentaMensaje retorno = null;
|
||||
var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion: true);
|
||||
var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion: true, VerificaAlmacen : true);
|
||||
|
||||
if (factura.ErrorList.Count > 0) { retorno.HuboError = true; return retorno; }
|
||||
|
||||
|
||||
@@ -3734,27 +3734,32 @@ Partial Class Ventas
|
||||
|
||||
Private Sub CargaListasPreciosSubProyectos(CvePS As Integer)
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
DivPrecioLista.Visible = True
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Ped") Then
|
||||
DivPrecioLista.Visible = True
|
||||
|
||||
Using ObjVta As New ClsVentas
|
||||
If ObjVta.GetPreciosListaSPPermitidos(DdlSubProyectoDatos.SelectedValue.ToEntero(), CvePS, UsuarioActual.CveEmpresa) Then
|
||||
Dim Dt As DataTable = Nothing
|
||||
Using ObjVta As New ClsVentas
|
||||
If ObjVta.GetPreciosListaSPPermitidos(DdlSubProyectoDatos.SelectedValue.ToEntero(), CvePS, UsuarioActual.CveEmpresa) Then
|
||||
Dim Dt As DataTable = Nothing
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(384) Then
|
||||
Dt = ObjVta.DtResultados.Copy()
|
||||
Else
|
||||
Dt = ObjVta.DtResultados.FiltraParametros("Restringuida = 'False'")
|
||||
End If
|
||||
|
||||
DdlPrecioLista.DataSource = Dt
|
||||
If Dt IsNot Nothing Then
|
||||
DdlPrecioLista.SelectedValueExist(Dt.FiltroPrimeroValor("CvePrecioLista", "Predeterminada = 'True'"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(384) Then
|
||||
Dt = ObjVta.DtResultados.Copy()
|
||||
Else
|
||||
Dt = ObjVta.DtResultados.FiltraParametros("Restringuida = 'False'")
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlPrecioLista.DataSource = Dt
|
||||
If Dt IsNot Nothing Then
|
||||
DdlPrecioLista.SelectedValueExist(Dt.FiltroPrimeroValor("CvePrecioLista", "Predeterminada = 'True'"))
|
||||
End If
|
||||
DdlPrecioLista.DataBind()
|
||||
Else
|
||||
DivPrecioLista.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlPrecioLista.DataBind()
|
||||
UpPS.Update()
|
||||
End If
|
||||
End Sub
|
||||
@@ -15758,7 +15763,7 @@ Partial Class Ventas
|
||||
' DrPago("Importe") = DrPago("Importe").ToString().ToDecimal - TxtCambio.Text.ToDecimal
|
||||
'End If
|
||||
|
||||
CveIEPago = ObjBancos.AddBancos_IE(DrPago("CveCuenta").ToString().ToEntero(), DrPago("CveTipoMovimiento").ToString().ToEntero(), Fecha, FolioIE.ToString(), String.Format("PAGO: {0}", TxtFolio.Text), DrPago("Importe").ToString().ToDouble, DdlMoneda.SelectedValue.ToEntero(), tipoCambio, DrPago("Observaciones").ToString(), "", False, False, -1, ObjFactura.CvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte, MesesSinIntereses:=DrPago("MesesSinIntereses").ToString().ToEntero(), Modulo:="Ventas/Guardar")
|
||||
CveIEPago = ObjBancos.AddBancos_IE(DrPago("CveCuenta").ToString().ToEntero(), DrPago("CveTipoMovimiento").ToString().ToEntero(), Fecha, FolioIE.ToString(), String.Format("PAGO: {0}", TxtFolio.Text), DrPago("Importe").ToString().ToDouble, DdlMoneda.SelectedValue.ToEntero(), tipoCambio, DrPago("Observaciones").ToString(), "", False, False, -1, ObjFactura.CvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte, MesesSinIntereses:=DrPago("MesesSinIntereses").ToString().ToEntero(), Modulo:="Ventas/Guardar", CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero())
|
||||
|
||||
If CveIEPago > 0 Then
|
||||
importeMovimiento = DrPago("Importe").ToString().ToDecimal * ValorMultiplicador
|
||||
@@ -17025,7 +17030,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(185) = "1" Then
|
||||
If e.Row.DBCampo("Tipo").ToString() = "Ant" AndAlso Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
|
||||
If e.Row.DBCampo("Tipo").ToString().Contiene("Ant", "IxC") AndAlso Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
|
||||
e.Row.FCCheckBox("Chk" & e.Row.RowIndex).Enabled = False
|
||||
e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ToolTip = "Anticipo Bloqueado"
|
||||
e.Row.FCLinkButton("LnkSolicitarActivarAnticipo").Visible = True
|
||||
@@ -17945,19 +17950,28 @@ Partial Class Ventas
|
||||
DdlPrecioLista.SelectedValueExist(ObjPrecioSugerido.CvePrecioLista)
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
If DirectCast(DdlPrecioLista.DataSource, DataTable) IsNot Nothing Then
|
||||
Dim dt = DirectCast(DdlPrecioLista.DataSource, DataTable)
|
||||
If dt IsNot Nothing Then
|
||||
If dt.Rows.Count > 0 Then
|
||||
'CHECA SI EL PRECIO SUGERIDO ESTA EN LA LISTA DE PRECIOS PERMITIDAS
|
||||
If dt.FiltroPrimeroValor("CvePrecioLista", $"CvePrecioLista = {ObjPrecioSugerido.CvePrecioLista}").ToEntero() <= 0 Then
|
||||
If ObjPrecioSugerido.CvePrecioLista = Me.CvePrecioListaCliente Then
|
||||
Alert("La lista de precios del cliente no esta permitido en la sucursal actual", TipoMensaje.MsgAdvertencia)
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Ped") Then
|
||||
If DirectCast(DdlPrecioLista.DataSource, DataTable) IsNot Nothing Then
|
||||
Dim dt = DirectCast(DdlPrecioLista.DataSource, DataTable)
|
||||
If dt IsNot Nothing Then
|
||||
If dt.Rows.Count > 0 Then
|
||||
'CHECA SI EL PRECIO SUGERIDO ESTA EN LA LISTA DE PRECIOS PERMITIDAS
|
||||
If dt.FiltroPrimeroValor("CvePrecioLista", $"CvePrecioLista = {ObjPrecioSugerido.CvePrecioLista}").ToEntero() <= 0 Then
|
||||
If ObjPrecioSugerido.CvePrecioLista = Me.CvePrecioListaCliente Then
|
||||
Alert("La lista de precios del cliente no esta permitido en la sucursal actual", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
ObjPrecioSugerido.CvePrecioLista = -1
|
||||
ObjPrecioSugerido.PrecioSugerido = 0
|
||||
tPrecioSugerido = 0
|
||||
PrecioSugerido = 0
|
||||
End If
|
||||
Else
|
||||
ObjPrecioSugerido.CvePrecioLista = -1
|
||||
ObjPrecioSugerido.PrecioSugerido = 0
|
||||
tPrecioSugerido = 0
|
||||
PrecioSugerido = 0
|
||||
|
||||
Alert("No se encontro una lista de precios permitida en la sucursal actual", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
ObjPrecioSugerido.CvePrecioLista = -1
|
||||
@@ -17965,22 +17979,29 @@ Partial Class Ventas
|
||||
tPrecioSugerido = 0
|
||||
PrecioSugerido = 0
|
||||
|
||||
Alert("No se encontro una lista de precios permitida en la sucursal actual", TipoMensaje.MsgAdvertencia)
|
||||
Alert("No se encontraron listas de precio disponibles", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
ObjPrecioSugerido.CvePrecioLista = -1
|
||||
ObjPrecioSugerido.PrecioSugerido = 0
|
||||
tPrecioSugerido = 0
|
||||
PrecioSugerido = 0
|
||||
|
||||
Alert("No se encontraron listas de precio disponibles", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
|
||||
DdlPrecioLista.SelectedValueExistInsert("-1", "Sin lista")
|
||||
Me.CvePrecioLista = -1
|
||||
|
||||
ObjPrecioSugerido.CvePrecioLista = -1
|
||||
ObjPrecioSugerido.PrecioSugerido = 0
|
||||
tPrecioSugerido = 0
|
||||
PrecioSugerido = 0
|
||||
End If
|
||||
End If
|
||||
|
||||
If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
|
||||
|
||||
TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
|
||||
@@ -17996,6 +18017,7 @@ Partial Class Ventas
|
||||
HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString()
|
||||
HdnIVARetAPS.Value = drPS("RetIVA").ToString()
|
||||
HdnCodigo.Value = drPS("Codigo").ToString()
|
||||
|
||||
If DdlClasificacion.SelectedIndex = 0 Then
|
||||
If drPS("CveClasificacion").ToString() IsNot Nothing Then
|
||||
DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString())
|
||||
@@ -18028,7 +18050,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Egs", "Ant") Then
|
||||
AgregarPS()
|
||||
End If
|
||||
|
||||
@@ -18490,6 +18512,18 @@ Partial Class Ventas
|
||||
TrTipoContable.Visible = True
|
||||
End If
|
||||
|
||||
CargaListasPreciosSubProyectos(If(DdlPS.SelectedValue.ToEntero() <= 0, -1, DdlPS.SelectedValue.ToEntero()))
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
Dim DatarowPS = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:="84111506").FiltroPrimero("")
|
||||
If DatarowPS IsNot Nothing Then
|
||||
DdlPS.SelectedValue = DatarowPS("CvePS").ToString()
|
||||
DdlPS.SelectedText = DatarowPS("CodigoPS").ToString()
|
||||
|
||||
DdlPS_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
End If
|
||||
|
||||
Updatetabs.Update()
|
||||
UPCondicionesPago.Update()
|
||||
UpCliente.Update()
|
||||
|
||||
Reference in New Issue
Block a user