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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -494,6 +494,10 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim CveContratoEstatus As Integer = If(context.Request("CveContratoEstatus") IsNot Nothing, context.Request("CveContratoEstatus").ToEntero, -1)
|
||||
Dim CveTipoActivoFijo As Integer = If(context.Request("CveTipoActivoFijo") IsNot Nothing, context.Request("CveTipoActivoFijo").ToEntero, -1)
|
||||
Dim CvePersonal As Integer = If(context.Request("CvePersonal") IsNot Nothing, context.Request("CvePersonal").ToEntero, -1)
|
||||
Dim FI As DateTime, FF As DateTime, FT As DateTime
|
||||
FI = context.Request("start").ToDate
|
||||
FF = context.Request("end").ToDate
|
||||
|
||||
|
||||
If Not cveContrato > 0 Then
|
||||
cveContrato = -1
|
||||
@@ -503,7 +507,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
CveCliente = -1
|
||||
End If
|
||||
|
||||
If ObjContratos.GetContratos(cveContrato, usuarioActual_.CveEmpresa, TipoContrato:=34, CveCliente:=CveCliente, CveEstatus:=CveContratoEstatus) Then
|
||||
If ObjContratos.GetContratosReporte(usuarioActual_.CveEmpresa, FI.ToString.ToDate, FF.ToString.ToDate, CveCliente:=CveCliente, CveTipoAF:=CveTipoActivoFijo,
|
||||
CveTipoContrato:=34, CveEstatus:=CveContratoEstatus) Then
|
||||
|
||||
'CveTipoAF
|
||||
'CveChofer, CveChofer2
|
||||
@@ -589,7 +594,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
'EMPIEZA METODO PARA AGREGAR CUANDO SI ES RECURRENTE
|
||||
|
||||
Dim FinRecurrencia As Integer = cevent.recurrenciafin.ToEntero
|
||||
Dim FI As DateTime, FF As DateTime, FT As DateTime
|
||||
|
||||
Dim DiasSemana As String() = cevent.diassemana.Split(","c)
|
||||
FI = cevent.start.ToDateTime
|
||||
FF = cevent.end.ToDateTime
|
||||
|
||||
@@ -4545,7 +4545,7 @@
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRetIVAModal" ClientIDMode="Static" Enabled="false" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPS"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtRetIVAModal" ClientIDMode="Static" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPS"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBERetIVA" runat="server" TargetControlID="TxtRetIVAModal" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtRetIVAModal.ClientID.ToString()%>">% RetIVA:</label>
|
||||
</div>
|
||||
|
||||
@@ -13496,7 +13496,7 @@ Partial Class Compras_Compras
|
||||
GvOC1.DataBind()
|
||||
|
||||
' TmpDT = OrdenarTablas("CvePS", DTOCTemp, TmpDT)
|
||||
GvOC2.DataSource = TmpDT.FiltraParametros("", "CodigoPS")
|
||||
GvOC2.DataSource = TmpDT
|
||||
GvOC2.DataBind()
|
||||
|
||||
UpGvOC1.Update()
|
||||
@@ -14541,11 +14541,10 @@ Partial Class Compras_Compras
|
||||
|
||||
CargaTipoCentroCostoOC()
|
||||
|
||||
GvOC1.DataSource = DTOCGV.FiltraParametros("", "CveOrdenCompra, CodigoPS")
|
||||
GvOC1.DataSource = DTOCGV
|
||||
GvOC1.DataBind()
|
||||
|
||||
|
||||
|
||||
Dim DTCVEOGV As DataTable = DTOCGV.FiltraParametros("", "", {"CveOrdenCompra"})
|
||||
If DTCVEOGV.Rows.Count > 1 Then
|
||||
GvOC1.Columns(0).Visible = True
|
||||
@@ -14559,7 +14558,7 @@ Partial Class Compras_Compras
|
||||
Cont += 1
|
||||
Next
|
||||
UpGvOC1.Update()
|
||||
TmpDT = TmpDT.FiltraParametros("", "CodigoPS")
|
||||
TmpDT = TmpDT.FiltraParametros("", "PU")
|
||||
|
||||
GvOC2.DataSource = TmpDT
|
||||
GvOC2.DataBind()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -454,18 +454,11 @@
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Requiere Seguncdo Chofer</label>
|
||||
<div class="col-md-8" style="text-align:left!important">
|
||||
<asp:CheckBox runat="server" ID="chkSegundoChofer" AutoPostBack="true" OnCheckedChanged="chkSegundoChofer_CheckedChanged" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1" runat="server" id="DVChofer2">
|
||||
<label class="col-md-4">Chofer 2</label>
|
||||
<div class="col-md-8">
|
||||
<div class="row my-1" >
|
||||
<label class="col-md-4">Chofer 2 <asp:CheckBox runat="server" ID="chkSegundoChofer" AutoPostBack="true" OnCheckedChanged="chkSegundoChofer_CheckedChanged" /></label>
|
||||
<div class="col-md-8" runat="server" id="DVChofer2">
|
||||
<asp:DropDownList ID="DdlChofer2" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
@@ -525,27 +518,21 @@
|
||||
<asp:Button runat="server" ID="BtnModal" OnClick="MostrarModal"></asp:Button>
|
||||
<asp:HiddenField runat="server" ID="HdnCveContrato" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
<asp:Button runat="server" ID="BtnDdlTipoAF" OnClick="BtnDdlTipoAF_Click" ClientIDMode="Static"></asp:Button>
|
||||
<%--<asp:Button runat="server" ID="BtnDdlTipoAF" OnClick="BtnDdlTipoAF_Click" ClientIDMode="Static"></asp:Button>--%>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<asp:HiddenField runat="server" ID="HidModClienteNombre" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HidModCveCliente" ClientIDMode="Static" />
|
||||
|
||||
<asp:HiddenField runat="server" ID="HidCurrentMonth" ClientIDMode="Static" Value="-1" />
|
||||
<asp:HiddenField runat="server" ID="HidCurrentYear" ClientIDMode="Static" Value="-1" />
|
||||
|
||||
|
||||
|
||||
<asp:HiddenField runat="server" ID="HidCurrentYear" ClientIDMode="Static" Value="-1" />
|
||||
<asp:HiddenField runat="server" ID="HidCveTipoAF" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
<asp:HiddenField runat="server" ID="HidNumChoferes" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HidRemisionSerieFolio" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HidCveVentaRemision" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField runat="server" ID="HidRemisionSaldo" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
|
||||
<asp:HiddenField runat="server" ID="HidCveAF" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -799,7 +786,7 @@
|
||||
}
|
||||
$('#<%=TxtFechaRegreso.ClientID%>').val(formatearFechaISO(event.FechaFinal));
|
||||
$('#<%=DdlClientes.ClientID%>').val(event.CveCliente);
|
||||
$('#<%=DdlAF.ClientID%>').val(event.CveActivoFijo);
|
||||
|
||||
$('#<%=DdlChofer.ClientID%>').val(event.CvePersonal);
|
||||
$('#<%=DdlChofer2.ClientID%>').val(event.CvePersonal2);
|
||||
$('#<%=DdlEstatusContrato.ClientID%>').val(event.CveEventoEstatus);
|
||||
@@ -815,13 +802,17 @@
|
||||
$('#<%=DdlSubProyectoModal.ClientID%>').val(event.CveSubProyecto);
|
||||
|
||||
$('#<%= HidCveTipoAF.ClientID%>').val( $('#<%=DdlTipoAF.ClientID%>').val() );
|
||||
$('#<%=BtnDdlTipoAF.ClientID%>').click();
|
||||
|
||||
<%--$('#<%=BtnDdlTipoAF.ClientID%>').click();--%>
|
||||
<%--$('#<%=DdlAF.ClientID%>').val(event.CveActivoFijo);--%>
|
||||
|
||||
$('#HidNumChoferes').val(event.NumChoferes);
|
||||
|
||||
$('#HidRemisionSerieFolio').val(event.RemisionSerieFolio);
|
||||
$('#HidCveVentaRemision').val(event.CveVentaRemision);
|
||||
$('#HidRemisionSaldo').val(event.RemisionSaldo);
|
||||
$('#HidCveAF').val(event.CveActivoFijo);
|
||||
|
||||
|
||||
<%-- $('#HidRemision').text(event.RemisionSerieFolio);
|
||||
$('#HypRemision').attr('href', '/Ventas/Ventas.aspx?CveVenta=' + event.CveVentaRemision);
|
||||
@@ -836,8 +827,7 @@
|
||||
|
||||
$('#HidModCveCliente').val(event.CveCliente);
|
||||
|
||||
$('#<%=BtnModal.ClientID%>').click();
|
||||
|
||||
$('#<%=BtnModal.ClientID%>').click();
|
||||
|
||||
}
|
||||
|
||||
@@ -926,8 +916,7 @@
|
||||
}
|
||||
|
||||
function Calendario(mes = -1, anio = -1) {
|
||||
|
||||
|
||||
|
||||
let fechaActual = new Date();
|
||||
if (mes === -1) {
|
||||
mes = fechaActual.getMonth() + 1;
|
||||
@@ -1018,10 +1007,8 @@
|
||||
let currentYear = pointDate.year();
|
||||
|
||||
$('#<%=HidCurrentMonth.ClientID%>').val(currentMonth);
|
||||
$('#<%=HidCurrentYear.ClientID%>').val(currentYear);
|
||||
|
||||
$('#<%=HidCurrentYear.ClientID%>').val(currentYear);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -44,8 +44,7 @@ Partial Class RepContratosCalendario
|
||||
If Not IsPostBack Then
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString()
|
||||
txtFechaF.Text = GetLastDayOfMonth(NowADS()).ToShortDateString()
|
||||
InicializaCombos()
|
||||
InicializaCalendar()
|
||||
InicializaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
'InicializaCalendar()
|
||||
@@ -68,14 +67,13 @@ Partial Class RepContratosCalendario
|
||||
CargaCronograma(DdlTipoVista.SelectedValue.ToEntero)
|
||||
End If
|
||||
GvContratos.DataSource = DtAvance
|
||||
|
||||
DdlEstatusContrato.Enabled = UsuarioActual.TienePermisoProceso(173)
|
||||
|
||||
ObjContratos.Dispose()
|
||||
GvContratos.DataBind()
|
||||
UpTitulos.Update()
|
||||
|
||||
RegistraScript("InitCalendar();")
|
||||
InicializaCalendar()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -291,8 +289,6 @@ Partial Class RepContratosCalendario
|
||||
|
||||
DdlChofer.SelectedValueExist(GvRow.DataKey("CveChofer"))
|
||||
DdlChofer2.SelectedValueExist(GvRow.DataKey("CveChofer2"))
|
||||
|
||||
|
||||
chkSegundoChofer.Checked = If(NumChoferes = 2, True, False)
|
||||
|
||||
DdlEstatusContrato.SelectedValueExist(GvRow.DataKey("CveContratosEstatus"))
|
||||
@@ -350,6 +346,8 @@ Partial Class RepContratosCalendario
|
||||
LblSaldo.Text = ""
|
||||
End If
|
||||
|
||||
CargaAFDdl(HidCveTipoAF.Value.ToEntero)
|
||||
DdlAF.SelectedValueExist(HidCveAF.Value)
|
||||
|
||||
|
||||
|
||||
@@ -365,12 +363,13 @@ Partial Class RepContratosCalendario
|
||||
Private Sub OcultarMostrarSegundoChofer()
|
||||
|
||||
If chkSegundoChofer.Checked Then
|
||||
DVChofer2.Attributes.Add("style", "display:block")
|
||||
DdlChofer2.Visible = True
|
||||
'DVChofer2.Attributes.Add("style", "display:block")
|
||||
Else
|
||||
DVChofer2.Attributes.Add("style", "display:none")
|
||||
DdlChofer2.Visible = False
|
||||
'DVChofer2.Attributes.Add("style", "display:none")
|
||||
End If
|
||||
|
||||
|
||||
UpCommando.Update()
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
@@ -379,10 +378,11 @@ Partial Class RepContratosCalendario
|
||||
CargaAFDdl(DdlTipoAF.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnDdlTipoAF_Click(sender As Object, e As EventArgs)
|
||||
'Protected Sub BtnDdlTipoAF_Click(sender As Object, e As EventArgs)
|
||||
|
||||
CargaAFDdl(HidCveTipoAF.Value.ToEntero)
|
||||
End Sub
|
||||
' CargaAFDdl(HidCveTipoAF.Value.ToEntero)
|
||||
|
||||
'End Sub
|
||||
|
||||
Private Sub CargaAFDdl(CveTipoAF As Integer)
|
||||
'Lista de Activos fijos
|
||||
@@ -392,8 +392,6 @@ Partial Class RepContratosCalendario
|
||||
DdlAF.Items.Clear()
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
|
||||
If ObjContratos.GetContratosValUnidadesAgendadas(DdlAF.SelectedValue.ToEntero, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, UsuarioActual.CveEmpresa, CveContrato, 2) Then
|
||||
|
||||
If CveTipoAF > 0 Then
|
||||
@@ -401,9 +399,6 @@ Partial Class RepContratosCalendario
|
||||
Else
|
||||
DdlAF.DataSource = ObjContratos.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
|
||||
@@ -415,9 +410,6 @@ Partial Class RepContratosCalendario
|
||||
|
||||
DdlAF.DataBind()
|
||||
DdlAF.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
|
||||
|
||||
UpModal.Update()
|
||||
|
||||
End Sub
|
||||
@@ -454,17 +446,10 @@ Partial Class RepContratosCalendario
|
||||
Protected Sub RBTipoVista_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
InicializaCalendar()
|
||||
CargaCronograma()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlTipoVista_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaCronograma(DdlTipoVista.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -500,19 +500,26 @@
|
||||
<div class="chequesie2">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Total:</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
<div class="col-md-3 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ReadOnly="true" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
|
||||
</div>
|
||||
<label id="lblCambio" class="col-md-2">Cambio:</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
<div class="col-md-3 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtCambio" CssClass="form-control input-sm " Enabled="false" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBECambio" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<br />
|
||||
</div>
|
||||
<label id="lblCambio2" class="col-md-2">Sob/falt:</label>
|
||||
<div class="col-md-3 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtFaltante" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: center;">
|
||||
|
||||
@@ -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
|
||||
@@ -651,6 +643,7 @@ Partial Class Ventas_PVCobranza
|
||||
DtPagos.Rows.Add({1, TxtImporteEfectivo.Text.ToDecimal})
|
||||
End If
|
||||
|
||||
|
||||
Dim PagoMaximo = DtPagos.MAX("Importe")
|
||||
|
||||
Dim CveFormaPago As Integer = DtPagos.FiltroPrimeroValor("CveFormaPago", $"Importe = {PagoMaximo}").ToEntero()
|
||||
@@ -745,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 DdlTipoComprobante.SelectedValue = "Ant" AndAlso 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