This commit is contained in:
rakcsle
2022-06-16 12:00:45 -07:00
37 changed files with 2341 additions and 1213 deletions

View File

@@ -344,13 +344,9 @@ Public Class CFDIConceptosImpuestos
Public Property TipoFactor As String = "Tasa"
Public Property TasaOCuota As Decimal = 0.00D
Public Property Importe As Decimal = 0.00D ' propiedad utilizada solo para hacer ajustes, por default toma la multiplicación de base * tasa
Public Property BaseMN As Decimal = 0.00D
Public Property ImporteMN As Decimal = 0.00D
'Public ReadOnly Property Importe As Decimal
' Get
' If ImporteT = 0.00 Then Return Base * TasaOCuota Else Return ImporteT
' End Get
'End Property
Public Property BaseMN As Decimal = 0.000000D
Public Property ImporteMN As Decimal = 0.000000D
End Class
@@ -401,6 +397,7 @@ Public Class CFDIRetenciones
Public Property Impuesto As String
Public Property Importe As Decimal = 0.000000D
Public Property TasaOCuota As String
Public Property ImporteMN As Decimal = 0.000000D
End Class
@@ -428,7 +425,6 @@ Public Class CFDITraslados
Public Property Base As Decimal = 0.000000D
Public Property ImporteMN As Decimal = 0.000000D
Public Property BaseMN As Decimal = 0.000000D
Public Property EquivalenciaDR As Decimal = 0.000000D
End Class
@@ -463,17 +459,17 @@ Public Class CFDIComplementoPagos
Public ReadOnly Property Totales As CFDIComplementoPagosTotales
Get
Dim tRetorno As New CFDIComplementoPagosTotales
tRetorno.MontoTotalPagos = (From c In DocumentosRelacionados Select c.ImpPagado * TipoCambioP).Sum()
tRetorno.MontoTotalPagos = (From c In DocumentosRelacionados Select c.ImpPagadoMN).Sum()
tRetorno.TotalTrasladosBaseIVA0 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0 Select c.BaseMN * c.EquivalenciaDR).Sum()
tRetorno.TotalTrasladosBaseIVA8 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.BaseMN * c.EquivalenciaDR).Sum()
tRetorno.TotalTrasladosBaseIVA16 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.16 Select c.BaseMN * c.EquivalenciaDR).Sum()
tRetorno.TotalTrasladosBaseIVA0 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0 Select c.BaseMN).Sum()
tRetorno.TotalTrasladosBaseIVA8 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.BaseMN).Sum()
tRetorno.TotalTrasladosBaseIVA16 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.16 Select c.BaseMN).Sum()
tRetorno.TotalTrasladosImpuestoIVA0 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0 Select c.Importe * c.EquivalenciaDR).Sum()
tRetorno.TotalTrasladosImpuestoIVA8 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.ImporteMN * c.EquivalenciaDR).Sum()
tRetorno.TotalTrasladosImpuestoIVA16 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.16 Select c.ImporteMN * c.EquivalenciaDR).Sum()
tRetorno.TotalTrasladosImpuestoIVA0 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0 Select c.Importe).Sum()
tRetorno.TotalTrasladosImpuestoIVA8 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.ImporteMN).Sum()
tRetorno.TotalTrasladosImpuestoIVA16 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.16 Select c.ImporteMN).Sum()
tRetorno.TotalRetencionesIEPS = (From c In Retenciones Where c.Impuesto = "003" Select c.Importe).Sum()
tRetorno.TotalRetencionesIEPS = (From c In Retenciones Where c.Impuesto = "003" Select c.ImporteMN).Sum()
Return tRetorno
End Get
@@ -510,15 +506,15 @@ Public Class CFDIComplementoPagos
For Each c As CFDIComplementoPagosDocsRelacionados In DocumentosRelacionados
For Each imp As CFDIConceptosImpuestos In c.Impuestos
If imp.TrasladooRetencion = "R" Then
tRetorno.Add(New CFDIRetenciones With {.Impuesto = imp.Impuesto, .Importe = imp.Importe * (1 / c.TipoCambioDR)})
tRetorno.Add(New CFDIRetenciones With {.Impuesto = imp.Impuesto, .Importe = imp.Importe, .ImporteMN = imp.ImporteMN})
End If
Next
Next
If tRetorno.Count > 0 Then
TRetenciones = tRetorno.GroupBy(Function(t) New With {Key t.Impuesto}) _
.Select(Function(t) New CFDIRetenciones With {.Impuesto = t.Key.Impuesto,
.Importe = t.Sum(Function(tt) tt.Importe)}) _
.Importe = t.Sum(Function(tt) tt.Importe),
.ImporteMN = t.Sum(Function(tt) tt.ImporteMN)}) _
.OrderBy(Function(x) x.Impuesto).ToList
End If
@@ -535,7 +531,7 @@ Public Class CFDIComplementoPagos
For Each c As CFDIComplementoPagosDocsRelacionados In DocumentosRelacionados
For Each imp As CFDIConceptosImpuestos In c.Impuestos
If imp.TrasladooRetencion = "T" Then
tRetorno.Add(New CFDITraslados With {.Impuesto = imp.Impuesto, .Base = imp.Base, .Importe = imp.Importe, .TasaOCuota = imp.TasaOCuota, .TipoFactor = imp.TipoFactor, .BaseMN = imp.BaseMN, .ImporteMN = imp.ImporteMN, .EquivalenciaDR = c.TipoCambioDR})
tRetorno.Add(New CFDITraslados With {.Impuesto = imp.Impuesto, .Base = imp.Base, .Importe = imp.Importe, .TasaOCuota = imp.TasaOCuota, .TipoFactor = imp.TipoFactor, .BaseMN = imp.BaseMN, .ImporteMN = imp.ImporteMN})
End If
Next
Next
@@ -572,6 +568,7 @@ Public Class CFDIComplementoPagosDocsRelacionados
Public Property NumParcialidad As Integer = 1
Public Property ImpSaldoAnt As Decimal
Public Property ImpPagado As Decimal
Public Property ImpPagadoMN As Decimal
Public Property ImpSaldoInsoluto As Decimal
Public Property ObjetoImpuesto As String = "01"
Public Property Impuestos As List(Of CFDIConceptosImpuestos)

View File

@@ -6012,11 +6012,17 @@ Public Class ClsPaginas
RutaReporte = String.Format("{0}{1}", bdir, RutaReporte)
End If
If EsProduccion AndAlso SubReportData Is Nothing Then
If EsProduccion Then
Dim wsreport As New WSRDLC.WebServiceSoapClient
Dim params As New List(Of WSRDLC.ReportParameter)
Dim reportobjects As New List(Of WSRDLC.ReportObjects)
Dim wsreport As New WSRDLC2.WebServiceSoapClient
Dim params As New List(Of WSRDLC2.ReportParameter)
Dim reportobjects As New List(Of WSRDLC2.ReportObjects)
Dim jsonData As String = Nothing
If SubReportData IsNot Nothing Then
jsonData = Newtonsoft.Json.JsonConvert.SerializeObject(SubReportData)
End If
Dim ds As New DataSet
For Each rpds As ReportDataSource In DataSource
@@ -6026,7 +6032,7 @@ Public Class ClsPaginas
dt.TableName = rpds.Name
ds.Tables.Add(dt)
Else
Dim ojext As New WSRDLC.ReportObjects
Dim ojext As New WSRDLC2.ReportObjects
ojext.Name = rpds.Name
ojext.Value = rpds.Value
reportobjects.Add(ojext)
@@ -6034,7 +6040,7 @@ Public Class ClsPaginas
Next
For Each rpds As ReportParameter In Parametros
Dim param As New WSRDLC.ReportParameter
Dim param As New WSRDLC2.ReportParameter
param.Name = rpds.Name
'SI ES TEXTO, QUITAR TABS Y OTROS ESPACIOS QUE DEN PROBLEMAS AL MANDAR LA PETICION
@@ -6047,7 +6053,7 @@ Public Class ClsPaginas
params.Add(param)
Next
Bytes = wsreport.StreamNEWPDFBytes(RutaReporte, ds, reportobjects.ToArray(), params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
Bytes = wsreport.StreamNEWPDFBytes(RutaReporte, ds, reportobjects.ToArray(), params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario, jsonData)
wsreport = Nothing
params = Nothing
ds.Dispose() : ds = Nothing
@@ -9035,8 +9041,6 @@ Public Class ClsPaginas
Else ' se considera que es la version 4.0
cfdVer = "http://www.sat.gob.mx/cfd/4"
End If
If Version = "4.0" Then
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
@@ -9047,8 +9051,6 @@ Public Class ClsPaginas
End If
End If
namespaces.AddNamespace(Prefijo, cfdVer)
namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital")
namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal")
@@ -9113,17 +9115,8 @@ Public Class ClsPaginas
DrRelacionado("MonedaDR") = Relacionado.Attributes("MonedaDR").Value
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso Version = "4.0" Then
' Relacionado.SelectSingleNode($"//{PagoVersion}:ImpuestosDR/{PagoVersion}:TrasladosDR/{PagoVersion}:TrasladoDR", namespaces)
'Dim NodoImpuestosDR As XmlNode = Relacionado.SelectSingleNode($"{PagoVersion}:ImpuestosDR", namespaces)
'Dim NodoTrasladosDR As XmlNode = NodoImpuestosDR.SelectSingleNode($"{PagoVersion}:TrasladosDR", namespaces)
'Dim TrasladoDR As XmlNodeList = NodoTrasladosDR.ChildNodes
Dim NodosTraslados = Relacionado.SelectNodes($"{PagoVersion}:ImpuestosDR/{PagoVersion}:TrasladosDR/{PagoVersion}:TrasladoDR", namespaces)
For Each NodoTraslados As XmlNode In NodosTraslados
@@ -9132,7 +9125,6 @@ Public Class ClsPaginas
Dim TasaOCuotaDR As String = ValorXML(NodoTraslados, "TasaOCuotaDR")
Dim ImporteDR As Decimal = ValorXML(NodoTraslados, "ImporteDR").ToDecimal
If ImpuestoDR = "001" Then
DrRelacionado("Tra001ImpuestoDR") = ImpuestoDR
DrRelacionado("Tra001TipoFactorDR") = TipoFactor
@@ -9153,19 +9145,15 @@ Public Class ClsPaginas
DrRelacionado("Tra003TasaOCuotaDR") = TasaOCuotaDR
DrRelacionado("Tra003ImporteDR") = ImporteDR
End If
Next
For Each NodoRetenciiones As XmlNode In Relacionado.SelectNodes($"{PagoVersion}:ImpuestosDR/{PagoVersion}:RetencionesDR/{PagoVersion}:RetencionDR", namespaces)
Dim ImpuestoDR As String = ValorXML(NodoRetenciiones, "ImpuestoDR") ' ImpuestoDR
Dim TipoFactor As String = ValorXML(NodoRetenciiones, "TipoFactorDR")
Dim TasaOCuotaDR As String = ValorXML(NodoRetenciiones, "TasaOCuotaDR")
Dim ImporteDR As Decimal = ValorXML(NodoRetenciiones, "ImporteDR").ToDecimal
If ImpuestoDR = "001" Then
DrRelacionado("Ret001ImpuestoDR") = ImpuestoDR
DrRelacionado("Ret001TipoFactorDR") = TipoFactor
@@ -9186,20 +9174,10 @@ Public Class ClsPaginas
DrRelacionado("Ret003TasaOCuotaDR") = TasaOCuotaDR
DrRelacionado("Ret003ImporteDR") = ImporteDR
End If
Next
End If
DTConceptosPagoRelacionado.Rows.Add(DrRelacionado)
Next
End If
Next
@@ -9215,7 +9193,6 @@ Public Class ClsPaginas
Cantidad = nodeconcepto.Attributes("Cantidad").InnerText
CvePS = nodeconcepto.Attributes("ClaveProdServ").InnerText
End If
End If
Dim CadenaOriginal As String = $"||1.0| {FolioFiscal} | {FechaCertificacion.ToDate.ToShortDateString} T {FechaCertificacion.ToDateTime.ToShortTimeString} | {SelloCFDi} | {NoSerieCertificado} ||"

View File

@@ -2229,11 +2229,10 @@ Public Class ClsVentas
End Function
Public Function AddPromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean,
CveMoneda As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoAplicacion As String,
Optional CveMarca As Integer = -1) As Integer
Optional CveMarca As Integer = -1, Optional EsDistribuidor As Integer = -1) As Integer
Dim Retorno = -1
DataAdapter("PA_Vta_PromocionesAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@Promocion", SqlDbType.VarChar).Value = Promocion
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
@@ -2247,6 +2246,7 @@ Public Class ClsVentas
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@TipoAplicacion", SqlDbType.VarChar).Value = TipoAplicacion
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
.Add("@CvePromocion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
@@ -2260,11 +2260,10 @@ Public Class ClsVentas
Return Retorno
End Function
Public Function UpdatePromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean,
CveMoneda As Integer, CveUsuario As Integer, CvePromocion As Integer, CveSubProyecto As Integer, TipoAplicacion As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1) As Boolean
CveMoneda As Integer, CveUsuario As Integer, CvePromocion As Integer, CveSubProyecto As Integer, TipoAplicacion As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional EsDistribuidor As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionesUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@Promocion", SqlDbType.VarChar).Value = Promocion
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
@@ -2278,6 +2277,7 @@ Public Class ClsVentas
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@TipoAplicacion", SqlDbType.Int).Value = TipoAplicacion
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With

View File

@@ -29,7 +29,7 @@ Public Class LogicNominas
ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero()
ObjFactura.Serie = cfdi.Comprobante.Serie
ObjFactura.Timbre = cfdi
If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC) Then
If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC, False) Then
Retorno = ObjTimbrado.MensajeErrorCFDI
End If
End If
@@ -139,6 +139,8 @@ Public Class LogicNominas
Dim ClaveEstado As String = ""
Dim MetodoPagoFijo As Boolean
Dim CodigoPostal As String = ""
Dim ObjIncapacidades As New List(Of CFDINominaIncapacidades)
'Conexiones a la Base de Datos
Dim cfdi As New CFDITimbre
@@ -175,7 +177,7 @@ Public Class LogicNominas
RFC = objPersonal.RFC
cfdi.Emisor.RegistroPatronal = objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString()
NombreCompleto = objPersonal.NombreCompleto
CodigoPostal = objPersonal.CP
Sindicalizado = objPersonal.DtResultados.Rows(0)("Sindicalizado").ToString().ToUpper().Contiene("TRUE", "1")
CURP = objPersonal.CURP
NumeroSS = objPersonal.NumeroSS
@@ -441,6 +443,10 @@ Public Class LogicNominas
cfdi.Comprobante.FormadePago = "99"
cfdi.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString() ' AHORITA SOLO SE REQUIERE ESPECIFICAR EL CODIGO POSTAL
cfdi.Comprobante.NumCuentaPago = "" 'objPersonal.BancoNumCuenta
'4.0
cfdi.Receptor.DomicilioFiscalReceptor = CodigoPostal
cfdi.Receptor.RegimenFiscalReceptor = "605"
cfdi.Nomina.Receptor.CURP = CURP
cfdi.Nomina.Receptor.NSS = NumeroSS

View File

@@ -1107,7 +1107,7 @@ Public Class Timbrado
Dim VentaFolioFiscal, VentaSerie, VentaFolio, VentaAbreviaturaSAT, VentaMetodoPago, ObjetoImpuesto As String
Dim VentaImportePago, VentaImporteSaldoInsoluto, VentaImporteSaldoAnterior, VentaTipoCambio, VentaTipoCambioMN, PorcentajeIVA, PorcentajeIEPS As Decimal
Dim VentaImportePago, VentaImportePagoMN, VentaImporteSaldoInsoluto, VentaImporteSaldoAnterior, VentaTipoCambio, VentaTipoCambioMN, PorcentajeIVA, PorcentajeIEPS As Decimal
Dim VentaNumParcialidad As Integer
If dttpagos IsNot Nothing AndAlso dttpagos.Rows.Count > 0 Then
@@ -1126,6 +1126,7 @@ Public Class Timbrado
PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal
PorcentajeIEPS = dr("PorcentajeIEPS").ToString.ToDecimal
ObjetoImpuesto = dr("ObjetoImpuesto").ToString
VentaImportePagoMN = dr("VentasTotalPagado").ToString.ToDecimal
'' si la moneda es igual, se omite el tipo de cambio de la venta
If MonedaPago = VentaAbreviaturaSAT Then
@@ -1134,7 +1135,7 @@ Public Class Timbrado
'condiciones especiales para el pago en pesos, facturas en moneda extranjera
ElseIf MonedaPago = "MXN" AndAlso VentaAbreviaturaSAT <> "MXN" Then
VentaTipoCambioMN = VentaTipoCambio
VentaTipoCambio = 1 / VentaTipoCambio
VentaTipoCambio = (1 / VentaTipoCambio).RoundSQL(6)
End If
' For Each drr As Data.DataRow In DtFacturasPagadas.Rows
@@ -1144,9 +1145,10 @@ Public Class Timbrado
.MonedaDR = VentaAbreviaturaSAT,
.MetodoDePagoDR = VentaMetodoPago,
.ImpPagado = VentaImportePago,
.ImpPagadoMN = (VentaImportePago / VentaTipoCambio).RoundSQL,
.ImpSaldoInsoluto = VentaImporteSaldoInsoluto,
.ImpSaldoAnt = VentaImporteSaldoAnterior,
.TipoCambioDR = VentaTipoCambioMN,
.TipoCambioDR = VentaTipoCambio,
.EquivalenciaDR = VentaTipoCambio,
.NumParcialidad = VentaNumParcialidad,
.ObjetoImpuesto = ObjetoImpuesto} 'If(drr("MetodoPago").ToString = "PUE", 0, drr("NumParcialidad").ToString.ToEntero)}
@@ -1158,8 +1160,8 @@ Public Class Timbrado
.TasaOCuota = drp("PorcentajeImpuesto").ToString().ToDecimal,
.Impuesto = drp("TipoImpuesto").ToString,
.Importe = drp("Importe").ToString().ToDecimal.RoundSQL,
.BaseMN = (drp("Base").ToString.ToDecimal * VentaTipoCambioMN).RoundSQL,
.ImporteMN = (drp("Importe").ToString.ToDecimal * VentaTipoCambioMN).RoundSQL
.BaseMN = (drp("Base").ToString.ToDecimal / VentaTipoCambio).RoundSQL(6),
.ImporteMN = (drp("Importe").ToString.ToDecimal * VentaTipoCambio).RoundSQL(6)
}
)
@@ -1183,7 +1185,7 @@ Public Class Timbrado
Return Timbre
End Function
Public Function TimbrarFactura(UsuarioActual As Usuario, Ventas As Modelos.Factura, Optional CvePACEspecial As Integer = -1) As Boolean
Public Function TimbrarFactura(UsuarioActual As Usuario, Ventas As Modelos.Factura, Optional CvePACEspecial As Integer = -1, Optional NomUsaPac4 As Boolean = True) As Boolean
Dim Retorno As Boolean = False
Dim tCvePAC As Integer = UsuarioActual.Empresa.CvePAC
@@ -1219,7 +1221,7 @@ Public Class Timbrado
Retorno = If(Ret = "", True, False)
Case 3
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso NomUsaPac4 Then
Retorno = TimbrarFacturaProFactV40(UsuarioActual, Ventas)
Else
Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas)
@@ -1227,7 +1229,7 @@ Public Class Timbrado
'Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas, TmpDTConceptos, TmpDTImpuestos, TmpDTComplementos, Ruta, LstFordASN, FordGSDBM, ObjV)
Case 4
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso NomUsaPac4 Then
Dim Ret As String = TimbrarFacturaGoCFDIv40(Ventas, UsuarioActual, CvePACEspecial)
If Ret <> "" Then MensajeErrorCFDI = Ret
Retorno = If(Ret = "", True, False)
@@ -1239,7 +1241,7 @@ Public Class Timbrado
Case 5
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso NomUsaPac4 Then
Dim Ret As String = TimbrarFacturaPADEv40(Ventas, UsuarioActual, CvePACEspecial)
If Ret <> "" Then MensajeErrorCFDI = Ret
Retorno = If(Ret = "", True, False)
@@ -4186,9 +4188,9 @@ Public Class Timbrado
If docimp.TrasladooRetencion = "T" Then
Dim Tra As New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionadoImpuestosDRTrasladoDR
Tra.BaseDR = docimp.BaseMN.RoundSQL(2)
Tra.BaseDR = docimp.Base.RoundSQL(2)
Tra.ImporteDRSpecified = True
Tra.ImporteDR = docimp.ImporteMN.RoundSQL(2)
Tra.ImporteDR = docimp.Importe.RoundSQL(2)
Tra.ImpuestoDR = docimp.Impuesto
Tra.TipoFactorDR = docimp.TipoFactor
Tra.TasaOCuotaDRSpecified = True
@@ -4225,8 +4227,8 @@ Public Class Timbrado
ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).ImpuestoP = Tra.Impuesto
ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).TipoFactorP = Tra.TipoFactor
ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).TasaOCuotaP = Tra.TasaOCuota.RoundSQL(6)
ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).ImporteP = Tra.Importe.RoundSQL(6)
ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).BaseP = Tra.Base.RoundSQL(2)
ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).ImporteP = Tra.ImporteMN.RoundSQL(6)
ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).BaseP = Tra.BaseMN.RoundSQL(2)
x += 1
Next
End If
@@ -5100,7 +5102,7 @@ Public Class Timbrado
doc.Serie,
doc.Folio,
doc.MonedaDR,
doc.TipoCambioDR,
doc.EquivalenciaDR,
doc.NumParcialidad,
doc.ImpSaldoAnt,
doc.ImpPagado,
@@ -5135,7 +5137,7 @@ Public Class Timbrado
If (ObjCFDITimbre.ComplementoPagos.Retenciones).Count > 0 Then
For Each Ret As CFDIRetenciones In ObjCFDITimbre.ComplementoPagos.Retenciones
cfdi.Pago20RetencionP(Ret.Impuesto, Ret.Importe)
cfdi.Pago20RetencionP(Ret.Impuesto, Ret.ImporteMN)
Next
End If

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="2105a997-fa03-4807-8d26-cbfb76ae1932" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
<ClientOptions>
<GenerateAsynchronousMethods>false</GenerateAsynchronousMethods>
<EnableDataBinding>true</EnableDataBinding>
<ExcludedTypes />
<ImportXmlTypes>false</ImportXmlTypes>
<GenerateInternalTypes>false</GenerateInternalTypes>
<GenerateMessageContracts>false</GenerateMessageContracts>
<NamespaceMappings />
<CollectionMappings />
<GenerateSerializableTypes>true</GenerateSerializableTypes>
<Serializer>Auto</Serializer>
<UseSerializerForFaults>true</UseSerializerForFaults>
<ReferenceAllAssemblies>true</ReferenceAllAssemblies>
<ReferencedAssemblies />
<ReferencedDataContractTypes />
<ServiceContractMappings />
</ClientOptions>
<MetadataSources>
<MetadataSource Address="http://localhost:7999/WebService.asmx" Protocol="http" SourceId="1" />
</MetadataSources>
<Metadata>
<MetadataFile FileName="WebService.disco" MetadataType="Disco" ID="0abaa1a0-3fdc-4ecb-a1c7-88bc3c7f8fb7" SourceId="1" SourceUrl="http://localhost:7999/WebService.asmx?disco" />
<MetadataFile FileName="WebService.wsdl" MetadataType="Wsdl" ID="a3713287-032e-47a0-ad01-24b755d2f1e5" SourceId="1" SourceUrl="http://localhost:7999/WebService.asmx?wsdl" />
</Metadata>
<Extensions>
<ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" />
<ExtensionFile FileName="configuration.svcinfo" Name="configuration.svcinfo" />
</Extensions>
</ReferenceGroup>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
<contractRef ref="http://localhost:7999/WebService.asmx?wsdl" docRef="http://localhost:7999/WebService.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
<soap address="http://localhost:7999/WebService.asmx" xmlns:q1="http://tempuri.org/" binding="q1:WebServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
<soap address="http://localhost:7999/WebService.asmx" xmlns:q2="http://tempuri.org/" binding="q2:WebServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
</discovery>

View File

@@ -0,0 +1,312 @@
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:element name="HelloWorld">
<s:complexType />
</s:element>
<s:element name="HelloWorldResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="StreamPDF">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="RutaReporte" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="source">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="0" maxOccurs="1" name="Parametros" type="tns:ArrayOfReportParameter" />
<s:element minOccurs="0" maxOccurs="1" name="NombreArchivo" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Formato" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="CveEmpresa" type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="CveUsuario" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfReportParameter">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="ReportParameter" nillable="true" type="tns:ReportParameter" />
</s:sequence>
</s:complexType>
<s:complexType name="ReportParameter">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Values" type="tns:ArrayOfString" />
<s:element minOccurs="1" maxOccurs="1" name="Visible" type="s:boolean" />
</s:sequence>
</s:complexType>
<s:complexType name="ArrayOfString">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" />
</s:sequence>
</s:complexType>
<s:element name="StreamPDFResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="StreamPDFResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="StreamPDFBytes">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="RutaReporte" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="source">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="0" maxOccurs="1" name="Parametros" type="tns:ArrayOfReportParameter" />
<s:element minOccurs="0" maxOccurs="1" name="NombreArchivo" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Formato" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="CveEmpresa" type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="CveUsuario" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="StreamPDFBytesResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="StreamPDFBytesResult" type="s:base64Binary" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="StreamNEWPDF">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="RutaReporte" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="source">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="0" maxOccurs="1" name="reportobjects" type="tns:ArrayOfReportObjects" />
<s:element minOccurs="0" maxOccurs="1" name="Parametros" type="tns:ArrayOfReportParameter" />
<s:element minOccurs="0" maxOccurs="1" name="NombreArchivo" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Formato" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="CveEmpresa" type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="CveUsuario" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfReportObjects">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="ReportObjects" nillable="true" type="tns:ReportObjects" />
</s:sequence>
</s:complexType>
<s:complexType name="ReportObjects">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Value" />
</s:sequence>
</s:complexType>
<s:element name="StreamNEWPDFResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="StreamNEWPDFResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="StreamNEWPDFBytes">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="RutaReporte" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="source">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="0" maxOccurs="1" name="reportobjects" type="tns:ArrayOfReportObjects" />
<s:element minOccurs="0" maxOccurs="1" name="Parametros" type="tns:ArrayOfReportParameter" />
<s:element minOccurs="0" maxOccurs="1" name="NombreArchivo" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Formato" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="CveEmpresa" type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="CveUsuario" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="JsonSubReportData" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="StreamNEWPDFBytesResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="StreamNEWPDFBytesResult" type="s:base64Binary" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="HelloWorldSoapIn">
<wsdl:part name="parameters" element="tns:HelloWorld" />
</wsdl:message>
<wsdl:message name="HelloWorldSoapOut">
<wsdl:part name="parameters" element="tns:HelloWorldResponse" />
</wsdl:message>
<wsdl:message name="StreamPDFSoapIn">
<wsdl:part name="parameters" element="tns:StreamPDF" />
</wsdl:message>
<wsdl:message name="StreamPDFSoapOut">
<wsdl:part name="parameters" element="tns:StreamPDFResponse" />
</wsdl:message>
<wsdl:message name="StreamPDFBytesSoapIn">
<wsdl:part name="parameters" element="tns:StreamPDFBytes" />
</wsdl:message>
<wsdl:message name="StreamPDFBytesSoapOut">
<wsdl:part name="parameters" element="tns:StreamPDFBytesResponse" />
</wsdl:message>
<wsdl:message name="StreamNEWPDFSoapIn">
<wsdl:part name="parameters" element="tns:StreamNEWPDF" />
</wsdl:message>
<wsdl:message name="StreamNEWPDFSoapOut">
<wsdl:part name="parameters" element="tns:StreamNEWPDFResponse" />
</wsdl:message>
<wsdl:message name="StreamNEWPDFBytesSoapIn">
<wsdl:part name="parameters" element="tns:StreamNEWPDFBytes" />
</wsdl:message>
<wsdl:message name="StreamNEWPDFBytesSoapOut">
<wsdl:part name="parameters" element="tns:StreamNEWPDFBytesResponse" />
</wsdl:message>
<wsdl:portType name="WebServiceSoap">
<wsdl:operation name="HelloWorld">
<wsdl:input message="tns:HelloWorldSoapIn" />
<wsdl:output message="tns:HelloWorldSoapOut" />
</wsdl:operation>
<wsdl:operation name="StreamPDF">
<wsdl:input message="tns:StreamPDFSoapIn" />
<wsdl:output message="tns:StreamPDFSoapOut" />
</wsdl:operation>
<wsdl:operation name="StreamPDFBytes">
<wsdl:input message="tns:StreamPDFBytesSoapIn" />
<wsdl:output message="tns:StreamPDFBytesSoapOut" />
</wsdl:operation>
<wsdl:operation name="StreamNEWPDF">
<wsdl:input message="tns:StreamNEWPDFSoapIn" />
<wsdl:output message="tns:StreamNEWPDFSoapOut" />
</wsdl:operation>
<wsdl:operation name="StreamNEWPDFBytes">
<wsdl:input message="tns:StreamNEWPDFBytesSoapIn" />
<wsdl:output message="tns:StreamNEWPDFBytesSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WebServiceSoap" type="tns:WebServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="HelloWorld">
<soap:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="StreamPDF">
<soap:operation soapAction="http://tempuri.org/StreamPDF" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="StreamPDFBytes">
<soap:operation soapAction="http://tempuri.org/StreamPDFBytes" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="StreamNEWPDF">
<soap:operation soapAction="http://tempuri.org/StreamNEWPDF" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="StreamNEWPDFBytes">
<soap:operation soapAction="http://tempuri.org/StreamNEWPDFBytes" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="WebServiceSoap12" type="tns:WebServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="HelloWorld">
<soap12:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="StreamPDF">
<soap12:operation soapAction="http://tempuri.org/StreamPDF" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="StreamPDFBytes">
<soap12:operation soapAction="http://tempuri.org/StreamPDFBytes" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="StreamNEWPDF">
<soap12:operation soapAction="http://tempuri.org/StreamNEWPDF" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="StreamNEWPDFBytes">
<soap12:operation soapAction="http://tempuri.org/StreamNEWPDFBytes" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WebService">
<wsdl:port name="WebServiceSoap" binding="tns:WebServiceSoap">
<soap:address location="http://localhost:7999/WebService.asmx" />
</wsdl:port>
<wsdl:port name="WebServiceSoap12" binding="tns:WebServiceSoap12">
<soap12:address location="http://localhost:7999/WebService.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configurationSnapshot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:xml-wcfconfigurationsnapshot">
<behaviors />
<bindings>
<binding digest="System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;WebServiceSoap1&quot; /&gt;" bindingType="basicHttpBinding" name="WebServiceSoap1" />
</bindings>
<endpoints>
<endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:7999/WebService.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;WebServiceSoap1&quot; contract=&quot;WSRDLC2.WebServiceSoap&quot; name=&quot;WebServiceSoap1&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost:7999/WebService.asmx&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;WebServiceSoap1&quot; contract=&quot;WSRDLC2.WebServiceSoap&quot; name=&quot;WebServiceSoap1&quot; /&gt;" contractName="WSRDLC2.WebServiceSoap" name="WebServiceSoap1" />
</endpoints>
</configurationSnapshot>

View File

@@ -0,0 +1,201 @@
<?xml version="1.0" encoding="utf-8"?>
<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="P0uAp1SH45jZSSsEEmhR5aLMvQQ=">
<bindingConfigurations>
<bindingConfiguration bindingType="basicHttpBinding" name="WebServiceSoap1">
<properties>
<property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>WebServiceSoap1</serializedValue>
</property>
<property path="/closeTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/openTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/receiveTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/sendTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/allowCookies" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/bypassProxyOnLocal" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/hostNameComparisonMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HostNameComparisonMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>StrongWildcard</serializedValue>
</property>
<property path="/maxBufferPoolSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/maxBufferSize" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>65536</serializedValue>
</property>
<property path="/maxReceivedMessageSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/proxyAddress" isComplexType="false" isExplicitlyDefined="false" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/readerQuotas" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement</serializedValue>
</property>
<property path="/readerQuotas/maxDepth" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxStringContentLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxArrayLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxBytesPerRead" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxNameTableCharCount" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/textEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.Text.Encoding, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.Text.UTF8Encoding</serializedValue>
</property>
<property path="/transferMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.TransferMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Buffered</serializedValue>
</property>
<property path="/useDefaultWebProxy" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/messageEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.WSMessageEncoding, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Text</serializedValue>
</property>
<property path="/security" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.BasicHttpSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.BasicHttpSecurityElement</serializedValue>
</property>
<property path="/security/mode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.BasicHttpSecurityMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>None</serializedValue>
</property>
<property path="/security/transport" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.HttpTransportSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.HttpTransportSecurityElement</serializedValue>
</property>
<property path="/security/transport/clientCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HttpClientCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>None</serializedValue>
</property>
<property path="/security/transport/proxyCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HttpProxyCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>None</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy/policyEnforcement" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.PolicyEnforcement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Never</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy/protectionScenario" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.ProtectionScenario, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>TransportSelected</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy/customServiceNames" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ServiceNameElementCollection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>(Collection)</serializedValue>
</property>
<property path="/security/transport/realm" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/security/message" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.BasicHttpMessageSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.BasicHttpMessageSecurityElement</serializedValue>
</property>
<property path="/security/message/clientCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.BasicHttpMessageCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>UserName</serializedValue>
</property>
<property path="/security/message/algorithmSuite" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.Security.SecurityAlgorithmSuite, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Default</serializedValue>
</property>
</properties>
</bindingConfiguration>
</bindingConfigurations>
<endpoints>
<endpoint name="WebServiceSoap1" contract="WSRDLC2.WebServiceSoap" bindingType="basicHttpBinding" address="http://localhost:7999/WebService.asmx" bindingConfiguration="WebServiceSoap1">
<properties>
<property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>http://localhost:7999/WebService.asmx</serializedValue>
</property>
<property path="/behaviorConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/binding" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>basicHttpBinding</serializedValue>
</property>
<property path="/bindingConfiguration" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>WebServiceSoap1</serializedValue>
</property>
<property path="/contract" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>WSRDLC2.WebServiceSoap</serializedValue>
</property>
<property path="/headers" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.AddressHeaderCollectionElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.AddressHeaderCollectionElement</serializedValue>
</property>
<property path="/headers/headers" isComplexType="false" isExplicitlyDefined="true" clrType="System.ServiceModel.Channels.AddressHeaderCollection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>&lt;Header /&gt;</serializedValue>
</property>
<property path="/identity" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.IdentityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.IdentityElement</serializedValue>
</property>
<property path="/identity/userPrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.UserPrincipalNameElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.UserPrincipalNameElement</serializedValue>
</property>
<property path="/identity/userPrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/servicePrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.ServicePrincipalNameElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.ServicePrincipalNameElement</serializedValue>
</property>
<property path="/identity/servicePrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/dns" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.DnsElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.DnsElement</serializedValue>
</property>
<property path="/identity/dns/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/rsa" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.RsaElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.RsaElement</serializedValue>
</property>
<property path="/identity/rsa/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/certificate" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.CertificateElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.CertificateElement</serializedValue>
</property>
<property path="/identity/certificate/encodedValue" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/certificateReference" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.CertificateReferenceElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.CertificateReferenceElement</serializedValue>
</property>
<property path="/identity/certificateReference/storeName" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.StoreName, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>My</serializedValue>
</property>
<property path="/identity/certificateReference/storeLocation" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.StoreLocation, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>LocalMachine</serializedValue>
</property>
<property path="/identity/certificateReference/x509FindType" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.X509FindType, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>FindBySubjectDistinguishedName</serializedValue>
</property>
<property path="/identity/certificateReference/findValue" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/certificateReference/isChainIncluded" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>False</serializedValue>
</property>
<property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>WebServiceSoap1</serializedValue>
</property>
<property path="/kind" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/endpointConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
</properties>
</endpoint>
</endpoints>
</SavedWcfConfigurationInformation>

View File

@@ -1249,6 +1249,15 @@
</div>
</div>
<div class="row">
<div class="col-md-12" id="DVTipoTransacciónCancelar2" runat="server" visible="false">
Cuenta Devolución:
<asp:DropDownList ID="DdlDevolucionCuenta" CssClass="form-control input-sm select2me" runat="server" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" >
<asp:ListItem Value="-1">-</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>

View File

@@ -6,6 +6,7 @@ Imports Extensiones
Imports System.Web.Services
Imports System.IO
Imports Microsoft.Reporting.WebForms
Imports System.Xml
Partial Class Bancos_IE
Inherits ClsPaginas
@@ -629,6 +630,13 @@ Partial Class Bancos_IE
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
'PDFReciboDePagos(-1, 1336198, 87212, False) '--pago20
'PDFReciboDePagos(-1, 1361624, 87916, False) '--pago20
''PDFReciboDePagos(-1, 1304037, 87219, False)
'Exit Sub
Me.CveCorte = -1
Folio = ""
IDCtaBeneficiario = 0
@@ -1416,7 +1424,7 @@ Partial Class Bancos_IE
End If
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False
@@ -1538,7 +1546,7 @@ Partial Class Bancos_IE
DivOtrosIngresosEgresos.Visible = True
End If
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False
@@ -1594,7 +1602,7 @@ Partial Class Bancos_IE
HdnProvPorRetISR.Value = "0" 'ObjProveedor.RetISR.ToString
IDCtaBeneficiario = ObjPersonal.IdCtaContPersonal
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If IDCtaBeneficiario = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
Alert("El Beneficiario no tiene cuenta contable vinculada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False
@@ -1836,7 +1844,6 @@ Partial Class Bancos_IE
dt = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveTipoCuenta <> 1") ' quito las cajas chicas
End If
If pCveMoneda > 0 Then
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", pCveMoneda))
End If
@@ -4229,191 +4236,6 @@ Partial Class Bancos_IE
#End Region
''[IPP] IFs REEMPLAZADOS - MIRAS DE ELIMINAR 2018/08/15
'If Not Opcion.Contiene("DEV", "INGPC", "DevDinV") AndAlso MsgError = "" Then
'Dim TipoMovimiento As Boolean = True
'If Opcion.Contiene("ANTC") Then
' TipoMovimiento = False
' End If
''MOVIMIENTOS EGRESOS
'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtImporte.Text.ToDouble, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaConta, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
'Dim IVA As Double = 0 ' TxtImporte.Text.ToDouble * HdnProvPorIVA.Value.ToDouble
'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, TxtImporte.Text.ToDouble - IVA - CIF, Ref, CveConceptoCompra, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario, CveIEDevolucion:=DdlIEAcreedor.SelectedValue.ToEntero) Then
'If IVA > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, IVA, Ref, 19, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
' MsgError = "Detalle"
' End If
''intereses pagados
'If CIF > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, CIF, Ref, 46, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=CIF, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then
' MsgError = "Detalle"
' End If
'Else
' MsgError = "no se pudo insertar el detalle de la póliza2"
' End If
'Else
' MsgError = "no se pudo insertar el detalle de la póliza"
' End If
'If Opcion.Contiene("EGSSINFACT") AndAlso CveSolicitudViatico > 0 AndAlso MsgError = "" Then
'If Not ObjIE.UpdateSolicitudesViaticosIE(CveSolicitudViatico, CveIE) Then
' MsgError = "Ocurrió un Error al vincular el egreso con la solicitud de viatico."
' End If
'End If
''MOVIMIENTOS INGRESOS - DEVOLUCIONES
'ElseIf Opcion.Contiene("DEV") AndAlso MsgError = "" Then
'Dim CveIEOtro As Integer = If(CveProveedor > 0 Or CvePersonal > 0, DdlIEDevolucion.SelectedValue.ToEntero, CveIE)
'If CveCliente > 0 AndAlso Not DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDouble = 0 Then
''RMF- CASO DONDE HAY UNA DEVOLUCION Y TENGO QUE AFECTAR LAS FACTURAS QUE SE HABIAN MARCADO COMO PAGADAS TENGO QUE REGRESARLAS A PENDIENTES
'Dim Mov As New ClsMovimientos
'If Mov.GetMovimientosIE(2, DdlIEDevolucion.SelectedValue.ToEntero, -1, Now, Now, 1, 0, UsuarioActual.CveEmpresa) Then
'Dim DtIE As DataTable = Mov.DtResultados
'For Each dr As DataRow In DtIE.Rows
'If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, If(dr("TipoMovto").ToString.ToEntero = 1, False, True), If(dr("CveConceptoContable").ToString.ToEntero.Contiene(66), -TxtImporte.Text.ToDouble, dr("Importe").ToString.ToDouble), "", dr("CveConceptoContable").ToString.ToEntero, "", Now, IDCtaBeneficiario, -1, CveIE, CveCliente:=dr("CveCliente").ToString.ToEntero, CveVenta:=dr("CveVenta").ToString.ToEntero, ImporteMX:=If(dr("CveConceptoContable").ToString.ToEntero.Contiene(66), -TxtImporte.Text.ToDouble, -dr("Importe").ToString.ToDouble), ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario) Then
' MsgError = "no se pudo insertar el detalle de la póliza 2"
' End If
'Next
' ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaConta)
' End If
' Mov.Dispose()
' 'Devolucion de INGxC Formato Charlie
' ElseIf CveCliente > 0 AndAlso DivIvaIxC.Visible Then
'Dim Mov As New ClsMovimientos
' 'INGxC
' ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(TxtImporte.Text.ToDouble - TxtIvaIxC.Text.ToDouble), Ref, 66, Conc, Now, IDCtaContable, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-(TxtImporte.Text.ToDouble - TxtIvaIxC.Text.ToDouble), ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaConta)
' If TxtIvaIxC.Text.ToDouble > 0 Then
' 'Iva
' ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -TxtIvaIxC.Text.ToDouble, Ref, 61, Conc, Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-TxtIvaIxC.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
' End If
' 'Bancos
' ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -TxtImporte.Text.ToDouble, Ref, 30, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-TxtImporte.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario)
' Mov.Dispose()
' Else
'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDouble, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaConta) Then
'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, Ref, CveConceptoCompra, Conc, Now, IDCtaBeneficiario, -1, CveIE:=If(CveIEOtro < 0, CveIE, CveIEOtro), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario) Then
' MsgError = "no se pudo insertar el detalle de la póliza 2"
' End If
'Else
' MsgError = "no se pudo insertar el detalle de la póliza"
' End If
'End If
''Nuevo INGxC Formato Charlie
'ElseIf Opcion.Contiene("INGPC") AndAlso MsgError = "" Then
'Dim ConceptoContable As Integer
'Dim TipoMovimiento As Boolean
'Dim importeMovimiento As Decimal
'Dim FechaMovimiento As Date = Now
'Dim Concepto As String = ""
'Dim Referencia As String = TxtPagueseA.Text
'Dim importeMX As Decimal
'Dim Multiplicador As Integer
'If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
'For Each Row As DataRow In ObjMov.DtResultados.Rows
' ConceptoContable = Row("CveConcepto").ToString.ToEntero
' TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False)
' importeMovimiento = 0
' Multiplicador = (Row("Multiplicador").ToString.ToEntero)
' Concepto = ObjMov.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, TxtPagueseA.Text, "", TxtFolio.Text)
' Select Case ConceptoContable
'Case 10
'If RBL.SelectedValue = "P" AndAlso CveProveedor > 0 Then
' importeMovimiento = TxtImporte.Text.ToDecimal
' importeMX = importeMovimiento
' End If
'Case 28
'If RBL.SelectedValue = "FE" AndAlso CvePersonal > 0 Then
' importeMovimiento = TxtImporte.Text.ToDecimal
' importeMX = importeMovimiento
' End If
'Case 37
'If RBL.SelectedValue = "DD" AndAlso CveProveedor > 0 Then
' importeMovimiento = TxtImporte.Text.ToDecimal
' importeMX = importeMovimiento
' End If
'Case 41
'If RBL.SelectedValue = "AC" AndAlso CveProveedor > 0 Then
' importeMovimiento = TxtImporte.Text.ToDecimal
' importeMX = importeMovimiento
' End If
'Case 50
'If RBL.SelectedValue = "DP" AndAlso CveProveedor > 0 Then
' importeMovimiento = TxtImporte.Text.ToDecimal
' importeMX = importeMovimiento
' End If
'Case 66
'If RBL.SelectedValue = "C" AndAlso CveCliente > 0 Then
' importeMovimiento = TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal
' importeMX = importeMovimiento
' 'Agregamos el IVA
' If DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDecimal <> 0 Then
'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, 61, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar) Then
' MsgError = "Ocurrió un Error al registrar el asiento del ingreso."
' End If
'End If
'If tCveMoneda > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then
''Agregamos complementaria
'Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 226, Concepto, FechaMovimiento, IDCtaBeneficiarioComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC, CveCuenta:=0) Then
' MsgError = "Ocurrió un Error al registrar el asiento del ingreso."
' End If
'End If
'End If
'Case 30
' importeMovimiento = TxtImporte.Text.ToDecimal
' importeMX = importeMovimiento
' If tCveMoneda > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then
''Agregamos complementaria
'Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar) Then
' MsgError = "Ocurrió un Error al registrar el asiento del ingreso."
' End If
'End If
'End Select
'If importeMovimiento <> 0 Then
'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCuenta:=If(ConceptoContable = 30, CveCuentaConta, CveCuentaBeneficiario)) Then
' MsgError = "Ocurrió un Error al registrar el asiento del ingreso."
' End If
'End If
'Next
'End If
'End If
Protected Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click
Dim IE As New ClsBancos
@@ -4498,7 +4320,7 @@ Partial Class Bancos_IE
End If
Try
If (UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso IDPoliza > 0 AndAlso (UsuarioActual.Empresa.UsaAC)) Then
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (IDPoliza > 0 AndAlso (UsuarioActual.Empresa.UsaAC)) Then
If ObjAC Is Nothing Then
ErrorCancelar = True
@@ -4594,8 +4416,9 @@ Partial Class Bancos_IE
Dim TipoMovimiento As Integer = 1
Dim CveTipoTransaccionCancelacion As Integer = DdlTipoTransaccionCancelacion.SelectedValue.ToEntero
Dim CveCuentaDevolucion As Integer = DdlDevolucionCuenta.SelectedValue.ToEntero
If ChkGeneraCancelacion.Checked AndAlso GeneraCancelacionEnCero Then
If ChkGeneraCancelacion.Checked Then
GeneraCancelacionEnCero = False
TipoMovimiento = 2
@@ -4610,7 +4433,7 @@ Partial Class Bancos_IE
If Not GeneraCancelacionEnCero Then
'CANCELA IE MES ANTERIOR
CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, TipoMovimiento:=TipoMovimiento,
CveTipoTransaccionCancelacion:=CveTipoTransaccionCancelacion)
CveTipoTransaccionCancelacion:=CveTipoTransaccionCancelacion, CveCuentaDevolucion:=CveCuentaDevolucion)
If CvePrePolizaCancelacion <= 0 Then
ErrorCancelar = True
MensajeError = "Error al cancelar IE MES ANTERIOR"
@@ -4626,7 +4449,7 @@ Partial Class Bancos_IE
Else
'CANCELA IE MES ACTUAL
CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate,
CveTipoTransaccionCancelacion:=CveTipoTransaccionCancelacion)
CveTipoTransaccionCancelacion:=CveTipoTransaccionCancelacion, CveCuentaDevolucion:=CveCuentaDevolucion)
If CvePrePolizaCancelacion <= 0 Then
ErrorCancelar = True
MensajeError = "Error al cancelar IE MES ACTUAL"
@@ -4683,23 +4506,23 @@ Partial Class Bancos_IE
Dim ObjCancelacion As New Timbrado
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
'If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
' CargaComplementosPago()
' RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
' ErrorCancelarComplemento = False
' Alert("El complemento se cancelo correctamente.")
'End If
If Banc.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, Date.Now, "", 1) Then
CargaComplementosPago()
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
ErrorCancelarComplemento = False
Alert("El complemento se cancelo correctamente.")
End If
Else
Dim respCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
If respCancelacion.Verificado Then
'If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
' CargaComplementosPago()
' RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
' ErrorCancelarComplemento = False
' Alert("El complemento se cancelo correctamente.")
'End If
If Banc.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
CargaComplementosPago()
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
ErrorCancelarComplemento = False
Alert("El complemento se cancelo correctamente.")
End If
Else
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgAdvertencia)
@@ -4791,7 +4614,7 @@ Partial Class Bancos_IE
Dim IdPolizaNueva = -1
Dim FolioPolizaNueva = -1
If (UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso IDPoliza > 0 AndAlso (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1")) Then
If (IDPoliza > 0 AndAlso (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1")) Then
If ObjAC Is Nothing Then
ErrorCancelar = True
@@ -5119,7 +4942,7 @@ Partial Class Bancos_IE
Dim ErrorCompra = False
'Elimina la poliza
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IDPoliza > 0 Then
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IDPoliza > 0 Then
If Not ObjAC.RemovePoliza(IDPoliza) Then
ErrorCompra = True
End If
@@ -6038,7 +5861,7 @@ Partial Class Bancos_IE
Str.AppendFormat("<a class="" texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML &nbsp;<i class="" fa fa-file""></i></i></a>&nbsp;&nbsp;", Encripta(String.Format("OP=Pag&EXT=xml&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%"))))
Str.AppendFormat("<a class="" texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF &nbsp;<i class="" fa fa-ad-pdf""></i></i></i></a>&nbsp;", Encripta(String.Format("OP=Pag&EXT=pdf&CveIE={0}&SerieFolio={1}", gvr.DataKey("CveIE").ToEntero, ObjBanco.ComplementoSerieFolio.Replace("&", "%26%"))))
'Str.Append($"<a style='color:#337ab7' target='_blank' href='./IE.aspx?CveID={gvr.DataKey("CveIE")}'>{gvr.DataKey("Folio")}</a> &nbsp; {gvr.DataKey("NombreCliente")}<br>")
PDFReciboDePagos(-1, gvr.DataKey("CveIE").ToEntero, ObjBanco.CveComplementoPago, False)
PDFReciboDePagos(-1, gvr.DataKey("CveIE").ToEntero, ObjBanco.CveComplementoPago, False, True)
Alert(Str.ToString, TipoMensaje.MsgInformacion)
CargaComplementosPago()
Else
@@ -6313,7 +6136,7 @@ Partial Class Bancos_IE
If Banco.GeneraTimbrePago(CveIE, -1, UsuarioActual) Then
If Banco.Mensaje = "" Then
Banco.Commit()
PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False)
PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False, True)
Str.AppendFormat("Folio: <b>{0}</b> &nbsp;", Banco.ComplementoSerieFolio)
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML &nbsp;<i class=""fa fa-file""></i></i></a>&nbsp;&nbsp;", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF &nbsp;<i class=""fa fa-ad-pdf""></i></i></i></a>&nbsp;", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}&CveIE={2}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago, CveIE)))
@@ -6760,24 +6583,23 @@ Partial Class Bancos_IE
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
'If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
' CargaComplementosPago()
' Alert("El complemento se cancelo correctamente.")
'End If
If ObjBanco.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, Date.Now, "", 1) Then
CargaComplementosPago()
Alert("El complemento se cancelo correctamente.")
End If
Else
Dim resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
If resp.Verificado Then
'If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
If ObjBanco.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
' Alert("El complemento se cancelo correctamente.")
'End If
Else
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgError)
' Alert("El complemento se cancelo correctamente.")
'End If
Else
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgError)
End If
End If
End If
ObjBanco.Dispose()
@@ -6971,17 +6793,21 @@ Partial Class Bancos_IE
TipoMovto = "Egs"
End If
GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs'")
DdlTipoTransaccionCancelacion.Items.Clear()
DdlTipoTransaccionCancelacion.DataSource = GlobalDTTipoTransacciones.FiltraParametros($"Tipo ='{TipoMovto}' AND Estatus = 1")
DdlTipoTransaccionCancelacion.DataBind()
DdlTipoTransaccionCancelacion.Items.Insert(0, New ListItem("Seleccione una", "-1"))
DdlDevolucionCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlDevolucionCuenta.DataBind()
DdlDevolucionCuenta.Items.Insert(0, New ListItem("-", "-1"))
If ChkGeneraCancelacion.Checked Then
DVTipoTransacciónCancelar.Visible = True
DVTipoTransacciónCancelar2.Visible = True
Else
DVTipoTransacciónCancelar.Visible = False
DVTipoTransacciónCancelar2.Visible = False
End If
UpEliminarCotizacion.Update()

View File

@@ -98,7 +98,7 @@ Partial Class Bancos_RepComplementoPago
End If
End If
CargaDatos()
'CargaDatos()
End If
End Sub
@@ -163,7 +163,7 @@ Partial Class Bancos_RepComplementoPago
If Banco.GeneraTimbrePago(gvr.DataKey("CveIE").ToEntero, -1, UsuarioActual, FechaTimbrado:=FechaTimbrado) Then
If Banco.Mensaje = "" Then
Banco.Commit()
PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False)
PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False, True)
Str.AppendFormat("Folio: <b>{0}</b> &nbsp;", Banco.ComplementoSerieFolio)
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML &nbsp;<i class=""fa fa-file""></i></i></a>&nbsp;&nbsp;", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF &nbsp;<i class=""fa fa-ad-pdf""></i></i></i></a>&nbsp;", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
@@ -171,7 +171,7 @@ Partial Class Bancos_RepComplementoPago
MandaCorreo(Banco.ComplementoSerieFolio, gvr.DataKey("CobranzaCorreo"))
End If
Else
Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}", gvr.DataKey("Folio"), Banco.Mensaje)
Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}<br/>", gvr.DataKey("Folio"), Banco.Mensaje)
Banco.RollBack()
End If
Catch ex As Exception

Binary file not shown.

Binary file not shown.

View File

@@ -822,7 +822,7 @@ Partial Class Compras_ReembolsosComprobaciones
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVANoAcreditable > 0, IdCtaContIVANoAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteNOIVA), ImporteMX:=(ImporteNOIVA) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVANoAcreditable > 0, IdCtaContIVANoAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteNOIVA), ImporteMX:=(ImporteNOIVA) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle"
End If
End If
@@ -1058,7 +1058,7 @@ Partial Class Compras_ReembolsosComprobaciones
Dim ImporteNOIVA As Decimal = gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVANoAcreditable > 0, IdCtaContIVANoAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteNOIVA), ImporteMX:=(ImporteNOIVA) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVANoAcreditable > 0, IdCtaContIVANoAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteNOIVA), ImporteMX:=(ImporteNOIVA) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Detalle"
End If
End If

View File

@@ -63,6 +63,9 @@
<asp:LinkButton ID="lbDescargar" runat="server"><%--<img src="/Metronic/assets/global/img/portlet-reload-icon.png" />--%><i class="fa fa-download"></i>
Descarga Facturas SAT</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkShowSolicitudes" OnClick="LnkShowSolicitudes_Click" runat="server">Solicitudes SAT</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkBitacotaFacturas" runat="server" OnClick="LnkBitacotaFacturas_Click"><i class="fa fa-book" ></i> Bitácora Facturas</asp:LinkButton>
</li>
@@ -946,7 +949,199 @@
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="ModalViewSolicitudes" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UPModalViewSolicitudes" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
<contenttemplate>
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Solicitudes CFDI</h4>
</div>
<div class="modal-body">
<br />
<div class="portlet light xspadding bordered " id="PnlAgregar">
<div class="portlet-title">
<div class="caption ">
<i class="fa fa-bookmark font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Solicitar información al sat</span>
</div>
<div class="tools">
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom " style="display: none">
<div class="row">
<div class="col-md-4">
<asp:Label runat="server" Text="Fecha Inicio" AssociatedControlID="txtFechaIAdd"></asp:Label>
</div>
<div class="col-md-4">
<asp:Label runat="server" Text="Fecha Fin" AssociatedControlID="txtFechaFAdd"></asp:Label>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox ID="txtFechaIAdd" CssClass="form-control input-sm ADSMaskDate" Style="" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaIAdd" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:maskededitextender id="MEEFechaIAdd" runat="server" targetcontrolid="txtFechaIAdd" mask="99/99/9999" masktype="Date" displaymoney="Left" acceptnegative="Left"></ajax:maskededitextender>
<ajax:calendarextender runat="server" id="CalendarExtender1" targetcontrolid="txtFechaIAdd" popupbuttonid="LnkFechaIAdd" popupposition="BottomRight" enabled="True"></ajax:calendarextender>
<asp:RequiredFieldValidator ID="rfvFechaIAdd" runat="server" ControlToValidate="txtFechaIAdd" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="VGAdd"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaIAdd" runat="server" ControlToValidate="txtFechaIAdd" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:validatorcalloutextender id="ValidatorCalloutExtender3" runat="server" highlightcssclass="vco" targetcontrolid="rfvFechaIAdd" width="350px"></ajax:validatorcalloutextender>
<ajax:validatorcalloutextender id="ValidatorCalloutExtender4" runat="server" highlightcssclass="vco" targetcontrolid="cvFechaIAdd" width="350px"></ajax:validatorcalloutextender>
</div>
</div>
<div class="col-md-4">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox ID="txtFechaFAdd" CssClass="form-control input-sm ADSMaskDate" Style="" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaFAdd" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:maskededitextender id="MEEFechaFAdd" runat="server" targetcontrolid="txtFechaFAdd" mask="99/99/9999" masktype="Date" displaymoney="Left" acceptnegative="Left"></ajax:maskededitextender>
<ajax:calendarextender runat="server" id="CalendarExtender2" targetcontrolid="txtFechaFAdd" popupbuttonid="LnkFechaFAdd" popupposition="BottomRight" enabled="True"></ajax:calendarextender>
<asp:RequiredFieldValidator ID="rfvFechaFAdd" runat="server" ControlToValidate="txtFechaFAdd" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="VGAdd"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaFAdd" runat="server" ControlToValidate="txtFechaFAdd" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:validatorcalloutextender id="ValidatorCalloutExtender5" runat="server" highlightcssclass="vco" targetcontrolid="rfvFechaFAdd" width="350px"></ajax:validatorcalloutextender>
<ajax:validatorcalloutextender id="ValidatorCalloutExtender6" runat="server" highlightcssclass="vco" targetcontrolid="cvFechaFAdd" width="350px"></ajax:validatorcalloutextender>
</div>
</div>
<div class="col-md-4">
<div class="text-right">
<asp:LinkButton ID="LnkSolicitarSat" CssClass="btn btn-primary" OnClick="LnkSolicitarSat_Click" runat="server">Solicitar</asp:LinkButton>
</div>
</div>
</div>
</div>
</div>
<div class="portlet light xspadding bordered " id="PnlPendientes">
<div class="portlet-title">
<div class="caption ">
<i class="fa fa-bookmark font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Solicitudes pendientes de respuesta del SAT </span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
<asp:GridView ID="GVSolicitudesPendientes" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
DataKeyNames="CveSolicitud,CveSolicitudCFDI,CveSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa">
<columns>
<asp:TemplateField HeaderText="Folio">
<itemtemplate>
<asp:Label runat="server" Text='<%# Eval("CveSolicitud")%>'></asp:Label>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Inicio">
<itemtemplate>
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'></asp:Label>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Fin">
<itemtemplate>
<asp:Label ID="lblfechaFin" runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'></asp:Label>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus">
<itemtemplate>
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("EstatusText")%>'></asp:Label>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Observaciones">
<itemtemplate>
<asp:Label ID="lblobservaciones" runat="server" Text='<%# Eval("Observaciones")%>'></asp:Label>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha solicitud">
<itemtemplate>
<asp:Label runat="server" Text='<%# Eval("FechaIng","{0:dd/MM/yyyy HH:mm}")%>'></asp:Label>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Solicitó">
<itemtemplate>
<asp:Label runat="server" Text='<%# Eval("UsuarioIng")%>'></asp:Label>
</itemtemplate>
</asp:TemplateField>
</columns>
</asp:GridView>
</div>
</div>
<div class="portlet light xspadding bordered " id="PnlTerminads">
<div class="portlet-title">
<div class="caption ">
<i class="fa fa-bookmark font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">solicitudes respondidas por el sat</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
<asp:GridView ID="GVSolicitudesNominas" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
DataKeyNames="CveSolicitud,idSolicitudCFDI,idSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa">
<columns>
<asp:TemplateField HeaderText="Folio">
<itemtemplate>
<asp:Label runat="server" Text='<%# Eval("CveSolicitud")%>'></asp:Label>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Inicio">
<itemtemplate>
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'></asp:Label>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Fin">
<itemtemplate>
<asp:Label ID="lblfechaFin" runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'></asp:Label>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="No CFDI">
<itemtemplate>
<asp:Label ID="lblobservaciones" runat="server" Text='<%# Eval("numeroCFDIs")%>'></asp:Label>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Observaciones">
<itemtemplate>
<asp:Label ID="lblobservaciones" runat="server" Text='<%# Eval("Observaciones")%>'></asp:Label>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha solicitud">
<itemtemplate>
<asp:Label runat="server" Text='<%# Eval("FechaIng","{0:dd/MM/yyyy HH:mm}")%>'></asp:Label>
</itemtemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Solicitó">
<itemtemplate>
<asp:Label runat="server" Text='<%# Eval("UsuarioIng")%>'></asp:Label>
</itemtemplate>
</asp:TemplateField>
</columns>
</asp:GridView>
</div>
</div>
</div>
<div class="modal-footer">
<asp:LinkButton ID="LnkverificarSolicitudes" CssClass="btn btn-primary" OnClick="LnkverificarSolicitudes_Click" runat="server">Verificar pendientes</asp:LinkButton>
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</div>
</contenttemplate>
</asp:UpdatePanel>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript">

View File

@@ -2517,7 +2517,59 @@ Partial Class Compras_eFacturas
DTConceptos.Columns.Add("Total", GetType(Double))
End Sub
#End Region
#Region "Sat descargamasiva"
Private Sub cargasolicitudes()
Using nom As ClsNominas = New ClsNominas()
If nom.SolicitudesGet(-1, UsuarioActual.CveEmpresa, 2) Then
GVSolicitudesPendientes.DataSource = nom.DtResultados.FiltraParametros("Estatus =0")
GVSolicitudesPendientes.DataBind()
GVSolicitudesNominas.DataSource = nom.DtResultados.FiltraParametros("Estatus =1")
GVSolicitudesNominas.DataBind()
End If
End Using
UPModalViewSolicitudes.Update()
End Sub
Protected Sub LnkShowSolicitudes_Click(ByVal sender As Object, ByVal e As EventArgs)
cargasolicitudes()
Me.RegistraScript("$('#ModalViewSolicitudes').modal();")
End Sub
Protected Sub LnkSolicitarSat_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim idSolicitudCFDI As Integer = 0
Dim idSolicitudMetadata As Integer = 0
Dim estatus As Integer = 0
Dim observaciones As String = ""
Dim fechaInicio As DateTime = txtFechaIAdd.Text.ToDateTime()
Dim fechaFin As DateTime = txtFechaFAdd.Text.ToDateTime()
Dim cveUsuarioIng As Integer = UsuarioActual.CveUsuario
Dim cveEmpresa As Integer = UsuarioActual.CveEmpresa
Dim Continuar As Boolean = False
Using nom As ClsNominas = New ClsNominas()
Continuar = nom.SolicitudesAdd(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa, 2)
'Dim api = New GeneralesAPI()
'api.GeneraSolicitud()
'api.VerificaSolicitudesNominas()
End Using
If Continuar Then
txtFechaIAdd.Text = ""
txtFechaFAdd.Text = ""
Me.RegistraScript("$('#DModalSolicitudesNominas').modal('hide');")
cargasolicitudes()
Me.Alert("se a envia la solicitud al sat, le enviaremos un correo en cuanto tengamos una respuesta", ModExtensiones.TipoMensaje.ToastInformacion)
End If
End Sub
Protected Sub LnkverificarSolicitudes_Click(ByVal sender As Object, ByVal e As EventArgs)
'Dim api = New GeneralesAPI()
'api.GeneraSolicitud()
'api.VerificaSolicitudesNominas()
cargasolicitudes()
End Sub
#End Region
#Region "D E S C A R G A R - F A C T U R A "
Protected Sub lbDescargar_Click(sender As Object, e As EventArgs) Handles lbDescargar.Click

View File

@@ -1440,11 +1440,42 @@
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Reg.fiscal: </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>SemiBold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value xml:space="preserve"> </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!RegimenFiscalCodigo.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>0.00137in</Top>
<Left>4.38498cm</Left>
<Height>1.62208in</Height>
<Height>1.80958in</Height>
<Width>3.6362in</Width>
<ZIndex>10</ZIndex>
<Style>
@@ -2421,7 +2452,15 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>VERSION 3.3</Value>
<Value>VERSION </Value>
<Style>
<FontFamily>MYRiad Pro</FontFamily>
<FontSize>9.16pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!CFDIVersion.Value</Value>
<Style>
<FontFamily>MYRiad Pro</FontFamily>
<FontSize>9.16pt</FontSize>
@@ -2622,7 +2661,6 @@
<rd:DataSourceID>c220a38d-e45b-4e04-917e-7dfd9cc3345f</rd:DataSourceID>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="DsOC">
<Query>
@@ -3425,6 +3463,18 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="CFDIVersion">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="RegimenFiscalCodigo">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="Logo119">

View File

@@ -92,6 +92,11 @@
<Border>
<Style>None</Style>
</Border>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -126,6 +131,11 @@
<Border>
<Style>None</Style>
</Border>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -160,6 +170,11 @@
<Border>
<Style>None</Style>
</Border>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -194,6 +209,11 @@
<Border>
<Style>None</Style>
</Border>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -228,6 +248,11 @@
<Border>
<Style>None</Style>
</Border>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -466,6 +491,11 @@
<Border>
<Style>None</Style>
</Border>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -627,6 +657,7 @@
<Style>None</Style>
</TopBorder>
<BottomBorder>
<Color>Black</Color>
<Width>1pt</Width>
</BottomBorder>
<LeftBorder>
@@ -675,6 +706,7 @@
<Style>None</Style>
</TopBorder>
<BottomBorder>
<Color>Black</Color>
<Width>1pt</Width>
</BottomBorder>
<LeftBorder>
@@ -720,6 +752,7 @@
<Width>5pt</Width>
</Border>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
@@ -761,6 +794,7 @@
<Width>5pt</Width>
</Border>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
@@ -801,6 +835,7 @@
<Width>5pt</Width>
</Border>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
@@ -1062,6 +1097,7 @@
<Style>None</Style>
</TopBorder>
<BottomBorder>
<Color>Black</Color>
<Width>1pt</Width>
</BottomBorder>
<LeftBorder>
@@ -1086,7 +1122,7 @@
<DataSetName>DataSet2</DataSetName>
<Top>6.1698cm</Top>
<Left>0.06623cm</Left>
<Height>0.90895cm</Height>
<Height>0.90896cm</Height>
<Width>20.38566cm</Width>
<ZIndex>2</ZIndex>
<Style>
@@ -1222,6 +1258,7 @@
<Style>None</Style>
</TopBorder>
<BottomBorder>
<Color>Black</Color>
<Width>1pt</Width>
</BottomBorder>
<LeftBorder>
@@ -1267,6 +1304,7 @@
<Width>5pt</Width>
</Border>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
@@ -1408,6 +1446,7 @@
<Style>None</Style>
</TopBorder>
<BottomBorder>
<Color>Black</Color>
<Width>1pt</Width>
</BottomBorder>
<LeftBorder>
@@ -1743,6 +1782,7 @@
<TextRun>
<Value>Remolque 1</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
@@ -1750,24 +1790,28 @@
<TextRun>
<Value> Placa: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!RemolquePlaca1.Value</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value> Tipo Rem: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!RemolqueSubtimo1.Value</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
@@ -1803,6 +1847,7 @@
<TextRun>
<Value>Remolque 2</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
@@ -1810,24 +1855,28 @@
<TextRun>
<Value> Placa: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!RemolquePlaca2.Value</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value> Tipo Rem: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!RemolqueSubtimo2.Value</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>7pt</FontSize>
</Style>
</TextRun>

View File

@@ -141,7 +141,7 @@
<Top>1.43777in</Top>
<Left>0.27639cm</Left>
<Height>0.17222in</Height>
<Width>0.81128in</Width>
<Width>0.57108in</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
@@ -180,9 +180,9 @@
</Paragraphs>
<rd:DefaultName>Textbox19</rd:DefaultName>
<Top>1.43777in</Top>
<Left>0.93398in</Left>
<Left>0.67989in</Left>
<Height>0.17222in</Height>
<Width>3.24868in</Width>
<Width>3.44722in</Width>
<ZIndex>3</ZIndex>
<Style>
<Border>
@@ -1703,7 +1703,7 @@
</Paragraphs>
<rd:DefaultName>Textbox19</rd:DefaultName>
<Top>1.43777in</Top>
<Left>10.65925cm</Left>
<Left>10.53225cm</Left>
<Height>0.1875in</Height>
<Width>0.36336in</Width>
<ZIndex>20</ZIndex>
@@ -1745,9 +1745,9 @@
</Paragraphs>
<rd:DefaultName>Textbox19</rd:DefaultName>
<Top>1.43916in</Top>
<Left>4.55379in</Left>
<Left>4.50379in</Left>
<Height>0.18472in</Height>
<Width>1.12758in</Width>
<Width>0.93723in</Width>
<ZIndex>21</ZIndex>
<Style>
<Border>
@@ -1778,6 +1778,7 @@
<TextRun>
<Value>Uso CFDI:</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
@@ -1788,9 +1789,9 @@
</Paragraphs>
<rd:DefaultName>Textbox19</rd:DefaultName>
<Top>1.43777in</Top>
<Left>14.44108cm</Left>
<Left>13.86958cm</Left>
<Height>0.17222in</Height>
<Width>0.63582in</Width>
<Width>0.51158in</Width>
<ZIndex>22</ZIndex>
<Style>
<Border>
@@ -1830,9 +1831,9 @@
</Paragraphs>
<rd:DefaultName>Textbox19</rd:DefaultName>
<Top>1.43916in</Top>
<Left>6.36573in</Left>
<Left>5.98593in</Left>
<Height>0.17083in</Height>
<Width>1.55925in</Width>
<Width>1.97686in</Width>
<ZIndex>23</ZIndex>
<Style>
<Border>
@@ -1875,8 +1876,8 @@
<rd:DefaultName>Textbox19</rd:DefaultName>
<Top>1.62527in</Top>
<Left>0.27639cm</Left>
<Height>0.15972in</Height>
<Width>0.81128in</Width>
<Height>0.17083in</Height>
<Width>0.57108in</Width>
<ZIndex>24</ZIndex>
<Style>
<Border>
@@ -1898,6 +1899,7 @@
</Style>
</Textbox>
<Textbox Name="Textbox74">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
@@ -1915,24 +1917,15 @@
</Paragraphs>
<rd:DefaultName>Textbox19</rd:DefaultName>
<Top>1.62527in</Top>
<Left>0.92009in</Left>
<Height>0.15972in</Height>
<Width>4.18029in</Width>
<Left>0.67989in</Left>
<Height>0.17083in</Height>
<Width>3.44722in</Width>
<ZIndex>25</ZIndex>
<Style>
<Border>
<Color>White</Color>
<Style>None</Style>
</Border>
<TopBorder>
<Style>None</Style>
</TopBorder>
<LeftBorder>
<Style>None</Style>
</LeftBorder>
<RightBorder>
<Style>None</Style>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -2396,7 +2389,14 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Este documento es una representación impresa de un CFDI Version 3.3</Value>
<Value>Este documento es una representación impresa de un CFDI Version </Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=IIf(Parameters!CFDIVersion.Value = "4.0","4.0","3.3")</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -3288,6 +3288,94 @@
</Border>
</Style>
</Rectangle>
<Textbox Name="Textbox80">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Regimen Fiscal:</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox19</rd:DefaultName>
<Top>1.62527in</Top>
<Left>10.5005cm</Left>
<Height>0.17222in</Height>
<Width>0.82757in</Width>
<ZIndex>48</ZIndex>
<Style>
<Border>
<Color>#4f81bd</Color>
<Style>None</Style>
</Border>
<TopBorder>
<Style>None</Style>
</TopBorder>
<LeftBorder>
<Style>None</Style>
</LeftBorder>
<RightBorder>
<Style>None</Style>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox81">
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!RegimenFiscalCodigo.Value</Value>
<Style>
<FontFamily>Calibri</FontFamily>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox19</rd:DefaultName>
<Top>1.62527in</Top>
<Left>4.96163in</Left>
<Height>0.17083in</Height>
<Width>3.00857in</Width>
<ZIndex>49</ZIndex>
<Style>
<Border>
<Color>White</Color>
<Style>None</Style>
</Border>
<TopBorder>
<Style>None</Style>
</TopBorder>
<LeftBorder>
<Style>None</Style>
</LeftBorder>
<RightBorder>
<Style>None</Style>
</RightBorder>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>14.35534cm</Height>
<Style />

View File

@@ -33,6 +33,14 @@
<DataField>Etiqueta</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="ImpManifiesto">
<DataField>ImpManifiesto</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="TipoTarima">
<DataField>TipoTarima</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Envase">
<DataField>Envase</DataField>
<rd:TypeName>System.String</rd:TypeName>
@@ -215,12 +223,16 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Empaque </Value>
<Style />
<Value>EMPAQUE </Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!SubProyecto.Value</Value>
<Style />
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
@@ -515,7 +527,7 @@
<Top>0.3175cm</Top>
<Left>9.78675cm</Left>
<Height>3cm</Height>
<Width>9.55022cm</Width>
<Width>9.55023cm</Width>
<Style>
<Border>
<Style>None</Style>
@@ -7291,7 +7303,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Value>=IIf(Fields!ImpManifiesto.Value.ToString() ="1",Fields!TipoTarima.Value.ToString() ,"")</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
@@ -7312,6 +7324,7 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
@@ -7456,7 +7469,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Campo </Value>
<Value>CAMPO </Value>
<Style>
<FontSize>8pt</FontSize>
</Style>

View File

@@ -215,6 +215,9 @@
<li>
<asp:LinkButton ID="LnkTimbrarTodos" Visible="false" OnClick="LnkTimbrarTodos_Click" runat="server"><i class="fa fa-bell"></i> Timbrar todos</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkReenviarcorreo" Visible="false" OnClick="LnkReenviarcorreo_Click" runat="server"><i class="fa fa-bell"></i> Renviar correo</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkRegistrarProvision" Visible="false" OnClick="LnkRegistrarProvision_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea registrar provisión?" data-btn-ok-label="si"><i class="fa fa-thumbs-up" aria-hidden="true" ></i>Registrar provisión</asp:LinkButton>
</li>

View File

@@ -474,6 +474,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
LnkCargaAsistenciaMasiva.Visible = (Estatus < 2);
LnkModalPlantillaNomina.Visible = true;
LnkTimbrarTodos.Visible = (Estatus > 2);
LnkReenviarcorreo.Visible = true;
LnkLayoutContable.Visible = (Estatus >= 2);
LnkProvisionNomina.Visible = CvePrePolizaProvision > 0;
@@ -1118,15 +1119,79 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
#endregion
protected void LnkReenviarcorreo_Click(object sender, EventArgs e)
{
string msggral = "";
int CvePeriodo = 0;
ClsSisMail Mail = new ClsSisMail();
DataTable dtpersonal = new DataTable();
DataRow drow;
using (ClsRH objrh = new ClsRH())
{
objrh.GetPersonal(-1, UsuarioActual.CveEmpresa);
dtpersonal = objrh.DtResultados.FiltraParametros("", "", new string[] { "CvePersonal", "MaiReciboNomina", "NombreCompleto" });
}
foreach (GridViewRow gvRow in GvNominas.Rows)
{
CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero();
int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
int CveNomina = gvRow.DataKey("CveNomina").ToEntero();
int SeTimbro = (gvRow.DataKey("SeTimbro").ToUpper()=="TRUE" ?1:gvRow.DataKey("SeTimbro").ToEntero());
LinkButton LnkTimbrar = gvRow.FCLinkButton("LnkTimbrar");
string MaiReciboNomina = string.Empty;
string NombreCompleto = string.Empty;
if (dtpersonal.Rows.Count > 0 && (drow = dtpersonal.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal))) != null)
{
MaiReciboNomina = drow["MaiReciboNomina"].ToString();
NombreCompleto = drow["NombreCompleto"].ToString();
}
if (CvePersonal > 0 && SeTimbro==1)
{
if (MaiReciboNomina.Trim().Length > 0)
{
byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta);
if (pdf != null)
{
List<ClsSisMail.ArchivoMail> objarch = new List<ClsSisMail.ArchivoMail>();
objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina.pdf" });
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, MaiReciboNomina.Trim(), string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy}", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), "", "", objarch);
// Mail.SendMail(ClsPaginas.EmpresaNotificaciones, "caudillo.90d@gmail.com", string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy} ", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), MaiReciboNomina.Trim(), "", objarch);
}
}
}
}
Alert("se reenviaron los recibos timbrados");
}
protected void LnkTimbrarTodos_Click(object sender, EventArgs e)
{
string msggral = "";
int CvePeriodo = 0;
ClsSisMail Mail = new ClsSisMail();
DataTable dtpersonal = new DataTable();
DataRow drow;
using (ClsRH objrh = new ClsRH())
{
objrh.GetPersonal(-1, UsuarioActual.CveEmpresa);
dtpersonal = objrh.DtResultados.FiltraParametros("", "", new string[] { "CvePersonal", "MaiReciboNomina", "NombreCompleto" });
}
foreach (GridViewRow gvRow in GvNominas.Rows)
{
int CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero();
CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero();
int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
int CveNomina = gvRow.DataKey("CveNomina").ToEntero();
LinkButton LnkTimbrar = gvRow.FCLinkButton("LnkTimbrar");
string MaiReciboNomina = string.Empty;
string NombreCompleto = string.Empty;
if (dtpersonal.Rows.Count > 0 && (drow = dtpersonal.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal))) != null)
{
MaiReciboNomina = drow["MaiReciboNomina"].ToString();
NombreCompleto = drow["NombreCompleto"].ToString();
}
if (CvePersonal > 0 && LnkTimbrar.Visible)
{
LogicNominas lognom = new LogicNominas();
@@ -1138,9 +1203,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
else
{
ClsNominas ObjPeriodo = new ClsNominas();
ObjPeriodo.CambiaEstatusPeriodo(CvePeriodo, (int)enumNominasEstatus.Timbrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjPeriodo.Dispose();
LnkTimbrar.Visible = false;
gvRow.CssClass = "success";
gvRow.FindControl("ImgDelete").Visible = false;
@@ -1149,6 +1211,21 @@ public partial class Nomina_Nomina2 : ClsPaginas
gvRow.FindControl("HypPDF").Visible = true;
gvRow.ForeColor = Color.Green;
if (MaiReciboNomina.Trim().Length > 0)
{
byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta);
if (pdf != null)
{
List<ClsSisMail.ArchivoMail> objarch = new List<ClsSisMail.ArchivoMail>();
objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina.pdf" });
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, MaiReciboNomina.Trim(), string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy}", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), "", "", objarch);
//Mail.SendMail(ClsPaginas.EmpresaNotificaciones, "caudillo.90d@gmail.com", string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy} ", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), MaiReciboNomina.Trim(), "", objarch);
}
}
}
@@ -1159,6 +1236,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
Alert(string.Format("Los siguientes empleados no se timbraron por las siguiente situaciones: <table class=\"table table-striped table-hover mysmallbtn\" ><tbody><tr><th>Código</th><th>Nombre</th><th>Mensaje SAT</th></tr>{0}</tbody></table>", msggral), TipoMensaje.MsgAdvertencia);
}
else
{
using (ClsNominas ObjPeriodo = new ClsNominas())
{
ObjPeriodo.CambiaEstatusPeriodo(CvePeriodo, (int)enumNominasEstatus.Timbrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
}
}
UpDatos.Update();
}
private void CreaObjetoEmpresa(ref Usuario UsuarioActual)
@@ -1192,6 +1277,24 @@ public partial class Nomina_Nomina2 : ClsPaginas
int CveNomina = gvRow.DataKey("CveNomina").ToEntero();
LogicNominas lognom = new LogicNominas();
Usuario UsuarioActual = null;
ClsSisMail Mail = new ClsSisMail();
DataTable dtpersonal = new DataTable();
DataRow drow;
string MaiReciboNomina = string.Empty;
string NombreCompleto = string.Empty;
if (dtpersonal.Rows.Count > 0 && (drow = dtpersonal.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal))) != null)
{
MaiReciboNomina = drow["MaiReciboNomina"].ToString();
NombreCompleto = drow["NombreCompleto"].ToString();
}
using (ClsRH objrh = new ClsRH())
{
objrh.GetPersonal(-1, UsuarioActual.CveEmpresa);
dtpersonal = objrh.DtResultados.FiltraParametros("", "", new string[] { "CvePersonal", "MaiReciboNomina", "NombreCompleto" });
}
/*
if (EsProduccion == false)
{
@@ -1207,7 +1310,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
else
{
UsuarioActual = this.UsuarioActual;
}
}*/
UsuarioActual = this.UsuarioActual;
string Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual);
if (Msg != null && Msg.Length > 0)
{ Alert(string.Format("El empleado no se pudo timbrar, el sat nos devolvio el siguiente mensaje:<br/>{0}", Msg), TipoMensaje.MsgAdvertencia); }
@@ -1216,6 +1320,18 @@ public partial class Nomina_Nomina2 : ClsPaginas
ClsNominas ObjPeriodo = new ClsNominas();
ObjPeriodo.CambiaEstatusPeriodo(CvePeriodo, (int)enumNominasEstatus.Timbrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjPeriodo.Dispose();
if (MaiReciboNomina.Trim().Length > 0)
{
byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta);
if (pdf != null)
{
List<ClsSisMail.ArchivoMail> objarch = new List<ClsSisMail.ArchivoMail>();
objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina" });
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, MaiReciboNomina.Trim(), string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy}", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), "", "", objarch);
}
}
Alert("Se ha timbrado correctamente");
gvRow.FindControl("ImgDelete").Visible = false;
gvRow.FindControl("LnkCancelar").Visible = true;
@@ -3442,7 +3558,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreRecibo.rdlc");
}
ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null,Content_Disposition: "Inline");
ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null, Content_Disposition: "Inline");
}
protected void BtnGuardarInfornavit_Click(object sender, EventArgs e)
{
@@ -8110,8 +8226,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
#region Layouts
enum Bancos
enum Bancos
{
SinSelccion,
Bancomer,
@@ -8121,29 +8237,33 @@ public partial class Nomina_Nomina2 : ClsPaginas
Bancos Banco
{
get {
get
{
if (ViewState["Banco"] == null)
{
ViewState["Banco"] = Bancos.SinSelccion;
}
return (Bancos) ViewState["Banco"];
return (Bancos)ViewState["Banco"];
}
set {
ViewState["Banco"] = (Bancos) value;
set
{
ViewState["Banco"] = (Bancos)value;
}
}
string ConvenioPagoElectronico
{
get {
get
{
if (ViewState["ConvenioPagoElectronico"] == null)
{
ViewState["ConvenioPagoElectronico"] = string.Empty;
}
return ViewState["ConvenioPagoElectronico"].ToString();
return ViewState["ConvenioPagoElectronico"].ToString();
}
set {
ViewState["ConvenioPagoElectronico"] = (string) value;
set
{
ViewState["ConvenioPagoElectronico"] = (string)value;
}
}
@@ -8153,7 +8273,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
// RBLModalBancosLayout.SelectedValue = "1";
Banco = Bancos.SinSelccion;
CargaCuentas();
this.RegistraScript("$('#ModalLayoutBancos').modal('show');");
UpModalBancosLayout.Update();
}
@@ -8162,7 +8282,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
DdlCuenta.Items.Clear();
DataTable DTCuentas = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta <> 1 AND UsaLayout = 'True' AND LEN(ConvenioPagoElectronico) > 0 ");
DataTable DTCuentas = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta <> 1 AND UsaLayout = 'True' AND LEN(ConvenioPagoElectronico) > 0 ");
DTCuentas.CaseSensitive = false;
DdlCuenta.DataSource = DTCuentas.FiltraParametros(" Banco IN('BANCOMER','BANORTE')");
DdlCuenta.DataBind();
@@ -8184,8 +8304,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
if (DdlCuenta.SelectedItem.Text.ToUpper().Contains("BANCOMER"))
{
Banco = Bancos.Bancomer;
}else if (DdlCuenta.SelectedItem.Text.ToUpper().Contains("BANORTE"))
}
else if (DdlCuenta.SelectedItem.Text.ToUpper().Contains("BANORTE"))
{
Banco = Bancos.Banorte;
}
@@ -8200,14 +8321,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
Banco = Bancos.SinSelccion;
}
}
protected void BtnModalBancosProcesar_Click(object sender, EventArgs e)
{
if (Banco == Bancos.Bancomer)
{
using (ClsNominas objnom = new ClsNominas())
@@ -8230,7 +8351,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
}
}
@@ -8328,7 +8449,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
Alert(SbErrores.ToString(), TipoMensaje.MsgAdvertencia);
}
private void CrearLayoutNominaBanorte(DataTable DTNomina, string Emisora, int Consecutivo )
private void CrearLayoutNominaBanorte(DataTable DTNomina, string Emisora, int Consecutivo)
{
StringBuilder sb = new StringBuilder();
StringBuilder SbErrores = new StringBuilder();
@@ -8436,7 +8557,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
sb.AppendLine("");
}
}

View File

@@ -2711,9 +2711,14 @@
</div>
<br />
<div class="row" runat="server" id="DivTCRow" style="width: 100%">
<label class="col-md-3">Tipo de Cambio:</label>
<div class="col-md-3">
<asp:TextBox ID="TxtTCCambioMoneda" runat="server" Width="100%" CssClass="form-control" CausesValidation="true"></asp:TextBox>
<label class="col-md-3">Conservar PU:</label>
<div class="col-md-1">
<asp:CheckBox ID="chkMonedaPU" runat="server" ></asp:CheckBox>
</div>
<label class="col-md-3">Tipo de Cambio:</label>
<div class="col-md-2">
<asp:TextBox ID="TxtTCCambioMoneda" runat="server" Width="100px" CssClass="form-control input-sm" CausesValidation="true"></asp:TextBox>
</div>
</div>
</ContentTemplate>

View File

@@ -8046,7 +8046,7 @@ Partial Class OC
Dim CveMovimientoAlmacen As Integer = ObjOC.DtResultados.FiltroPrimeroValor("CveMovimientoAlmacen").ToEntero
Dim TCAjuste As Decimal = ObjOC.DtResultados.FiltroPrimeroValor("TipoCambioAjuste").ToDecimal
Dim ConservaPU As Boolean = chkMonedaPU.Checked
If CveMonedaOC = 2 Then
CveMonedaOC = 1
@@ -8073,28 +8073,47 @@ Partial Class OC
Exit For
End If
Else
''-pesos a dólares
CveMonedaOC = 2
TCAjuste = TxtTCCambioMoneda.Text.ToDecimal
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Importe176, lblFolio.Text, 176, Concepto, Now, IdCtaContableOC, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=-Importe176, ImporteME:=-Importe176, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -Importe176, lblFolio.Text, 176, Concepto, Now, IdCtaContableOC, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=-Importe176, ImporteME:=-Importe176, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
ErrorPrepoliza = True
Exit For
Else
Importe228 = (Importe176 / TCAjuste)
Dim TCAjustePU As Decimal = TCAjuste
If ConservaPU Then
TCAjustePU = 1
End If
Importe228 = (Importe176 / TCAjustePU)
Importe229 = (Importe228 * TCAjuste - Importe228).RoundSQL
Importe228 = Importe228.RoundSQL(3) ' se redondea a 3 digitos, por la conversion, y no afecta al CK de complementaria
Dim dift As Decimal = Importe176 - Importe228 - Importe229
If dift <> 0 Then Importe229 += dift
PU = Importe176PU / TCAjuste
Dim difcosto As Decimal = Importe176 - Importe228 - Importe229
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, Importe228, lblFolio.Text, 228, Concepto, Now, IdCtaContableME, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=Importe228, ImporteME:=Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, Importe229, lblFolio.Text, 229, Concepto, Now, IdCtaContableMEComp, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=Importe229, ImporteME:=Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
PU = Importe176PU
If Not ConservaPU Then PU = Importe176PU / TCAjuste
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe228, lblFolio.Text, 228, Concepto, Now, IdCtaContableME, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=Importe228, ImporteME:=Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe229, lblFolio.Text, 229, Concepto, Now, IdCtaContableMEComp, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=Importe229, ImporteME:=Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
ErrorPrepoliza = True
Exit For
Else
If difcosto <> 0 Then
Dim tcveSub As Integer = DtDetalle.MAX("CveSubProyecto").ToEntero
Dim tcveClasif As Integer = DtDetalle.MAX("CveClasificacion").ToEntero
Dim IdCtaContable69 As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {tcveClasif}").ToString.ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, difcosto, lblFolio.Text, 69, Concepto, Now, IdCtaContable69, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=difcosto, ImporteME:=difcosto, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveSubProyecto:=tcveSub, CveClasificacion:=tcveClasif, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then
ErrorPrepoliza = True
Exit For
End If
End If
If Not ObjOC.UpdateOrdenCompraDetalleAjuste(CveOrdenCompra, gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, PU, UsuarioActual.CveUsuario) Then
Retorno = False
Exit For
End If
End If
Else
ErrorPrepoliza = True

View File

@@ -1609,7 +1609,7 @@ Partial Class RH_Personal
CargaUniformesPersonal()
End If
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 153, 154) Then
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 153, 154, 140) Then
LnkSurtir.Visible = True
DdlUniforme.Visible = False
@@ -5542,7 +5542,7 @@ Partial Class RH_Personal
Private Sub CargaUniformesPersonal()
If Not UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 153, 154) Then
If Not UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 153, 154, 140) Then
GvUniforme.Visible = True
GvUniformesResguardo.Visible = False

View File

@@ -10233,7 +10233,9 @@ Partial Class Clientes
If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
DivRazonSocial2.Attributes.Add("class", "col-md-8")
DVRegimenSociedad.Visible = True
TxtNombreComercial.Enabled = False
Else
TxtNombreComercial.Enabled = True
End If
DdlRegimenFiscal.DataSource = GlobalDTRegimenesFiscales(RdTipoPersona.SelectedValue.ToEntero).FiltraParametros("", "CodigoRegimenFiscal")
DdlRegimenFiscal.DataBind()

View File

@@ -352,6 +352,7 @@ Partial Class ProductosyServicios
DivObjetoImpuesto.Visible = True
DdlObjetoImpuesto.DataSource = GlobalDTSATObjetosImpuestos
DdlObjetoImpuesto.DataBind()
DdlObjetoImpuesto.SelectedValue = "02" 'se sugiere este valor, que sería el más utilizado
End If
CreaDtSeccionAlmacen()

View File

@@ -145,6 +145,16 @@
<asp:DropDownList ID="DdlMarca" DataTextField="Marca" DataValueField="CveMarca" CssClass="select2me" runat="server" Width="350px"></asp:DropDownList>
</div>
</div>
<div class="row" id="divDistribuidor" runat="server" visible="false">
<label class="col-md-2 truncate">Distribuidor:</label>
<div class="col-md-4">
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Distribuidor" Value="1"></asp:ListItem>
<asp:ListItem Text="No Distribuidor" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
</div>

View File

@@ -156,6 +156,13 @@ Partial Class Ventas_Promociones
DdlRin.Items.Insert(0, New ListItem("Todos", "-1"))
End If
'' si es E acumuladora
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
divDistribuidor.Visible = True
End If
End Sub
Private Sub CreaDT()
@@ -514,7 +521,7 @@ Partial Class Ventas_Promociones
ObjVentas.IniciaTransacSQL()
CvePromocion = ObjVentas.AddPromociones(TxtPromocion.Text.Trim, If(IsDate(TxtFechaI.Text), TxtFechaI.Text.ToDate, MinFecha), If(IsDate(TxtFechaF.Text), TxtFechaF.Text.ToDate, MaxFecha),
DdlVendedor.SelectedValue.ToEntero, CveCliente, ChkEstatus.Checked, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoAplicacion.SelectedValue.ToString, DdlMarca.SelectedValue.ToEntero)
UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoAplicacion.SelectedValue.ToString, DdlMarca.SelectedValue.ToEntero, DdlDistribuidor.SelectedValue.ToEntero)
If CvePromocion > 0 Then
For Each Dr As DataRow In TempDT.Rows
@@ -552,7 +559,7 @@ Partial Class Ventas_Promociones
If ObjVentas.UpdatePromociones(TxtPromocion.Text.Trim, If(IsDate(TxtFechaI.Text), TxtFechaI.Text.ToDate, MinFecha), If(IsDate(TxtFechaF.Text), TxtFechaF.Text.ToDate, MaxFecha),
DdlVendedor.SelectedValue.ToEntero, CveCliente, ChkEstatus.Checked, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
CvePromocion, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoAplicacion.SELECTEDVALUE.TOENTERO, UsuarioActual.CveEmpresa, CveMarca:=DdlMarca.SelectedValue.ToEntero) Then
CvePromocion, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoAplicacion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveMarca:=DdlMarca.SelectedValue.ToEntero, DdlDistribuidor.SelectedValue.ToEntero) Then
For Each Dr As DataRow In TempDT.FiltraParametros("Estatus = 0").Rows
If Not ObjVentas.AddPromocionesDetalle(CvePromocion, Dr("CvePS").ToString.ToEntero, Dr("CveTipoPromocion").ToString.ToEntero, Dr("Promocion").ToString.ToDouble, Dr("PUAnterior").ToString.ToDouble, Dr("PUPromocion").ToString.ToDouble,

File diff suppressed because it is too large Load Diff

View File

@@ -2630,7 +2630,9 @@ Partial Class Ventas
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
DdlMoneda.SelectedValueExist(2)
Using ObjVentas As New ClsNominas
If ObjVentas.EmbarqueManifiestoGet(-1, -1, -1, Request("CveEmbarqueManifiesto").ToString().ToEntero()) And ObjVentas.DtResultados.Rows.Count > 0 Then
DdlSubProyectoDatos.SelectedValueExist(ObjVentas.DtResultados.Rows(0)("CveSubProyecto").ToString())
End If
If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, "", Request("CveEmbarqueManifiesto").ToEntero()) Then
TmpDT = ObjVentas.DtResultados
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
@@ -4973,6 +4975,9 @@ Partial Class Ventas
If (UsuarioActual.TienePermisoProceso(166) Or UsuarioActual.CveRol = 1) AndAlso (LblFolioFiscal.Text = "" Or LblFolioFiscal.Text = "test") Then
LkEliminarFactura.Visible = True
End If
If (UsuarioActual.CveRol = 1) AndAlso (LblFolioFiscal.Text <> "") Then
LnkUUIDRelacionados.Visible = True
End If
'Envio Direccion
If DbRowVenta("CveDireccionEnvio").ToString().ToEntero() > 0 AndAlso DbRowVenta("CveDireccionEnvio").ToString() IsNot Nothing Then
@@ -6198,6 +6203,14 @@ Partial Class Ventas
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
End If
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
'S01 Sin efectos fiscales.
DdlUsoCFDI.SelectedValueExist("23")
DdlUsoCFDI.Enabled = False
RegimenFiscalCliente = "616"
ClienteCodigoRegimenFiscal = "616"
End If
End If
@@ -7150,6 +7163,15 @@ Partial Class Ventas
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString())
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString())
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
'S01 Sin efectos fiscales.
DdlUsoCFDI.SelectedValueExist("23")
DdlUsoCFDI.Enabled = False
RegimenFiscalCliente = "616"
ClienteCodigoRegimenFiscal = "616"
End If
End If
If CveVenta < 0 Then TxtAtencionA.Text = ObjCliente.DtResultados.Rows(0)("Contacto").ToString()
@@ -7183,6 +7205,15 @@ Partial Class Ventas
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
'S01 Sin efectos fiscales.
DdlUsoCFDI.SelectedValueExist("23")
DdlUsoCFDI.Enabled = False
RegimenFiscalCliente = "616"
ClienteCodigoRegimenFiscal = "616"
End If
End If
End If
@@ -31399,6 +31430,10 @@ Partial Class Ventas
DdlTipoRetencion.Visible = True
End If
If DivCartaPorte.Visible Then
HabilitarControlesCartaPorte(True)
End If
UpnTools.Update()
UpCliente.Update()
UpParametros.Update()
@@ -31412,7 +31447,7 @@ Partial Class Ventas
UpParametros.Update()
UpINV.Update()
UpFacturasRelacionadas.Update()
UpEmitirTransitorio.Update()
End Sub
#End Region
@@ -34036,12 +34071,12 @@ Partial Class Ventas
ValidaConfiguracionVehiculo()
End Sub
Public Sub CargaVentaCortePorte(CveVenta As Integer)
TxtFechaEntregaCP.Enabled = False
TxtFechaLlegadaCP.Enabled = False
Dim CveEntregaAlmacen As Integer = -1
Dim CveDireccionOrigen As Integer = -1
Dim CveDireccionDestino As Integer = -1
Dim CveCamionRemolque1 As Integer = -1
Dim CveCamionRemolque2 As Integer = -1
Dim CveConfigAutoTransporte As Integer = -1
Using ObjGral As New ClsGenerales
If ObjGral.GetGralTimbre(-1, "Ing", MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa, -1, CveVenta:=CveVenta) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
@@ -34050,20 +34085,24 @@ Partial Class Ventas
Me.CveTimbreCartaPorteVenta = RowCP("CveTimbre").ToString().ToEntero()
If CveTimbreCartaPorteVenta > 0 Then
ChkEmitirCartaPorte.Checked = True
ChkEmitirCartaPorte.Enabled = False
CveEntregaAlmacen = RowCP("CveEntregaAlmacen").ToString().ToEntero()
CveDireccionOrigen = RowCP("CveDireccionOrigen").ToString().ToEntero()
CveDireccionDestino = RowCP("CveDireccionDestino").ToString().ToEntero()
TxtFechaEntregaCP.Text = RowCP("FechaEntrega").ToString()
TxtFechaLlegadaCP.Text = RowCP("FechaLlegada").ToString()
TxtFechaEntregaCP.Text = RowCP("FechaEntrega").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm")
TxtFechaLlegadaCP.Text = RowCP("FechaLlegada").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm")
TxtDistancia.Text = RowCP("Distancia").ToString()
DdlChofer.SelectedValueExist(RowCP("CveChofer").ToString())
DdlUnidadCamion.SelectedValueExist(RowCP("CveCamion").ToString())
CveCamionRemolque1 = RowCP("CveCamionRemolque1").ToString().ToEntero()
CveCamionRemolque2 = RowCP("CveCamionRemolque2").ToString().ToEntero()
CveConfigAutoTransporte = RowCP("CveConfigAutoTransporte").ToString().ToEntero()
End If
End If
@@ -34072,7 +34111,6 @@ Partial Class Ventas
DtMercancias = ObjGral.DtResultados
End If
End Using
If ChkEmitirCartaPorte.Checked AndAlso CveCliente > 0 Then
@@ -34093,18 +34131,54 @@ Partial Class Ventas
GvMercanciasCP.DataSource = DtMercancias
GvMercanciasCP.DataBind()
If DdlUnidadCamion.SelectedValue.ToEntero() > 0 Then
If CveConfigAutoTransporte > 0 Then
DvRemolque1.Visible = False
DvRemolque2.Visible = False
DdlRemolque1.SelectedValueExist(-1)
DdlRemolque2.SelectedValueExist(-1)
DdlConfigAuto.SelectedValueExist(CveConfigAutoTransporte.ToString())
DdlConfigAuto_SelectedIndexChanged(DdlConfigAuto, EventArgs.Empty)
If CveCamionRemolque1 > 0 Then
DdlRemolque1.SelectedValueExist(CveCamionRemolque1.ToString())
DdlRemolque1_SelectedIndexChanged(DdlRemolque1, EventArgs.Empty)
If CveCamionRemolque2 > 0 Then
DdlRemolque2.SelectedValueExist(CveCamionRemolque2.ToString())
End If
End If
End If
End If
Else
TmpDTDireccionCP = Nothing
End If
DdlChofer.Enabled = False
DdlUnidadCamion.Enabled = False
DdlDireccionOrigen.Enabled = False
DdlDireccionDestino.Enabled = False
HabilitarControlesCartaPorte(False)
UpEmitirTransitorio.Update()
End Sub
Private Sub HabilitarControlesCartaPorte(Habilitar As Boolean)
ChkEmitirCartaPorte.Enabled = Habilitar
TxtFechaEntregaCP.Enabled = Habilitar
TxtFechaLlegadaCP.Enabled = Habilitar
DdlChofer.Enabled = Habilitar
DdlUnidadCamion.Enabled = Habilitar
DdlConfigAuto.Enabled = Habilitar
DdlRemolque1.Enabled = Habilitar
DdlRemolque2.Enabled = Habilitar
DdlDireccionOrigen.Enabled = Habilitar
DdlDireccionDestino.Enabled = Habilitar
TxtDistancia.Enabled = Habilitar
LnkAgregarMercancia.Enabled = Habilitar
GvMercanciasCP.Columns(3).Visible = Habilitar
End Sub
Private Sub ValidaConfiguracionVehiculo()
DvRemolque1.Visible = False
DvRemolque2.Visible = False
@@ -34262,93 +34336,93 @@ Partial Class Ventas
End Set
End Property
Property SucursalOrigenCP As Modelos.SucursalModel
Get
If ViewState("SucursalOrigenCP") Is Nothing Then
Return Nothing
End If
Return DirectCast(ViewState("SucursalOrigenCP"), Modelos.SucursalModel)
End Get
Set(value As Modelos.SucursalModel)
ViewState("SucursalOrigenCP") = value
End Set
End Property
Property SucursalDestinoCP As Modelos.SucursalModel
Get
If ViewState("SucursalDestinoCP") Is Nothing Then
Return Nothing
End If
Return DirectCast(ViewState("SucursalDestinoCP"), Modelos.SucursalModel)
End Get
Set(value As Modelos.SucursalModel)
ViewState("SucursalDestinoCP") = value
End Set
End Property
'Property SucursalOrigenCP As Modelos.SucursalModel
' Get
' If ViewState("SucursalOrigenCP") Is Nothing Then
' Return Nothing
' End If
' Return DirectCast(ViewState("SucursalOrigenCP"), Modelos.SucursalModel)
' End Get
' Set(value As Modelos.SucursalModel)
' ViewState("SucursalOrigenCP") = value
' End Set
'End Property
'Property SucursalDestinoCP As Modelos.SucursalModel
' Get
' If ViewState("SucursalDestinoCP") Is Nothing Then
' Return Nothing
' End If
' Return DirectCast(ViewState("SucursalDestinoCP"), Modelos.SucursalModel)
' End Get
' Set(value As Modelos.SucursalModel)
' ViewState("SucursalDestinoCP") = value
' End Set
'End Property
Private Sub CargaDireccionSucursalOrigen(Row As DataRow)
If SucursalOrigenCP Is Nothing Then
SucursalOrigenCP = New Modelos.SucursalModel
Else
SucursalOrigenCP = Nothing
SucursalOrigenCP = New Modelos.SucursalModel
End If
'Private Sub CargaDireccionSucursalOrigen(Row As DataRow)
' If SucursalOrigenCP Is Nothing Then
' SucursalOrigenCP = New Modelos.SucursalModel
' Else
' SucursalOrigenCP = Nothing
' SucursalOrigenCP = New Modelos.SucursalModel
' End If
Dim SBDomicilioSucursal As New StringBuilder()
Try
If Row IsNot Nothing Then
' Dim SBDomicilioSucursal As New StringBuilder()
' Try
' If Row IsNot Nothing Then
SucursalOrigenCP.Direccion = Row("Calle").ToString()
SucursalOrigenCP.NoExt = Row("NoExt").ToString()
SucursalOrigenCP.NoInt = Row("NoInt").ToString()
SucursalOrigenCP.Colonia = Row("Colonia").ToString()
SucursalOrigenCP.CP = Row("CP").ToString()
SucursalOrigenCP.Municipio = Row("Municipio").ToString()
SucursalOrigenCP.CveEstado = Row("CveEstado").ToString().ToEntero()
SucursalOrigenCP.Estado = Row("Estado").ToString()
SucursalOrigenCP.CvePais = Row("CvePais").ToString().ToEntero()
SucursalOrigenCP.Pais = Row("Pais").ToString()
' SucursalOrigenCP.Direccion = Row("Calle").ToString()
' SucursalOrigenCP.NoExt = Row("NoExt").ToString()
' SucursalOrigenCP.NoInt = Row("NoInt").ToString()
' SucursalOrigenCP.Colonia = Row("Colonia").ToString()
' SucursalOrigenCP.CP = Row("CP").ToString()
' SucursalOrigenCP.Municipio = Row("Municipio").ToString()
' SucursalOrigenCP.CveEstado = Row("CveEstado").ToString().ToEntero()
' SucursalOrigenCP.Estado = Row("Estado").ToString()
' SucursalOrigenCP.CvePais = Row("CvePais").ToString().ToEntero()
' SucursalOrigenCP.Pais = Row("Pais").ToString()
SBDomicilioSucursal.AppendFormat("{0}", Row("Calle").ToString())
' SBDomicilioSucursal.AppendFormat("{0}", Row("Calle").ToString())
If Row("NoInt").ToString().Length > 0 Then
SBDomicilioSucursal.AppendFormat(", No.Int: {0}", Row("NoInt").ToString())
End If
' If Row("NoInt").ToString().Length > 0 Then
' SBDomicilioSucursal.AppendFormat(", No.Int: {0}", Row("NoInt").ToString())
' End If
If Row("Colonia").ToString().Length > 0 Then
SBDomicilioSucursal.AppendFormat(", Col: {0}", Row("Colonia").ToString())
End If
' If Row("Colonia").ToString().Length > 0 Then
' SBDomicilioSucursal.AppendFormat(", Col: {0}", Row("Colonia").ToString())
' End If
If Row("CP").ToString().ToEntero > 0 Then
SBDomicilioSucursal.AppendFormat(", CP: {0}", Row("CP").ToString())
End If
' If Row("CP").ToString().ToEntero > 0 Then
' SBDomicilioSucursal.AppendFormat(", CP: {0}", Row("CP").ToString())
' End If
If Row("NoExt").ToString().Length > 0 Then
SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", Row("NoExt").ToString())
End If
' If Row("NoExt").ToString().Length > 0 Then
' SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", Row("NoExt").ToString())
' End If
Dim CiudadSucursal As String = String.Format("{0},{1}", Row("Municipio").ToString(), Row("Estado").ToString())
If CiudadSucursal.Length > 0 Then
SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
End If
' Dim CiudadSucursal As String = String.Format("{0},{1}", Row("Municipio").ToString(), Row("Estado").ToString())
' If CiudadSucursal.Length > 0 Then
' SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
' End If
If Row("Pais").ToString().Length > 0 Then
SBDomicilioSucursal.AppendFormat(", {0}", Row("Pais").ToString())
End If
' If Row("Pais").ToString().Length > 0 Then
' SBDomicilioSucursal.AppendFormat(", {0}", Row("Pais").ToString())
' End If
If Not String.IsNullOrEmpty(Row("Telefono").ToString()) Then
SucursalOrigenCP.TelefonoSucursal = Row("Telefono").ToString()
End If
End If
' If Not String.IsNullOrEmpty(Row("Telefono").ToString()) Then
' SucursalOrigenCP.TelefonoSucursal = Row("Telefono").ToString()
' End If
' End If
Catch ex As Exception
SBDomicilioSucursal.Clear()
GuardaLog(ex.ToString())
End Try
' Catch ex As Exception
' SBDomicilioSucursal.Clear()
' GuardaLog(ex.ToString())
' End Try
'TxtOrigenCP.Text = SBDomicilioSucursal.ToString
' 'TxtOrigenCP.Text = SBDomicilioSucursal.ToString
UpEmitirTransitorio.Update()
End Sub
' UpEmitirTransitorio.Update()
'End Sub
Protected Sub DdlDireccionEnvio_SelectedIndexChanged(sender As Object, e As EventArgs)
'If SucursalDestinoCP Is Nothing Then
@@ -34384,73 +34458,73 @@ Partial Class Ventas
UpEmitirTransitorio.Update()
End Sub
Protected Sub DdlDireccionOrigen_SelectedIndexChanged(sender As Object, e As EventArgs)
If SucursalOrigenCP Is Nothing Then
SucursalOrigenCP = New Modelos.SucursalModel
Else
SucursalOrigenCP = Nothing
SucursalOrigenCP = New Modelos.SucursalModel
End If
'Protected Sub DdlDireccionOrigen_SelectedIndexChanged(sender As Object, e As EventArgs)
' If SucursalOrigenCP Is Nothing Then
' SucursalOrigenCP = New Modelos.SucursalModel
' Else
' SucursalOrigenCP = Nothing
' SucursalOrigenCP = New Modelos.SucursalModel
' End If
If TmpDTDireccionCP IsNot Nothing AndAlso TmpDTDireccionCP.FiltraParametros(String.Format("CveDireccionEnvio = {0}", DdlDireccionOrigen.SelectedValue.ToEntero())).Rows.Count > 0 Then
' If TmpDTDireccionCP IsNot Nothing AndAlso TmpDTDireccionCP.FiltraParametros(String.Format("CveDireccionEnvio = {0}", DdlDireccionOrigen.SelectedValue.ToEntero())).Rows.Count > 0 Then
Dim Row As DataRow = TmpDTDireccionCP.FiltroPrimero(String.Format("CveDireccionEnvio = {0}", DdlDireccionOrigen.SelectedValue.ToEntero()))
If Row IsNot Nothing Then
' Dim Row As DataRow = TmpDTDireccionCP.FiltroPrimero(String.Format("CveDireccionEnvio = {0}", DdlDireccionOrigen.SelectedValue.ToEntero()))
' If Row IsNot Nothing Then
SucursalOrigenCP.Direccion = Row("EnvioDireccion").ToString()
SucursalOrigenCP.Colonia = Row("EnvioColonia").ToString()
SucursalOrigenCP.Municipio = Row("EnvioCiudad").ToString()
SucursalOrigenCP.CveEstado = Row("CveEstado").ToString().ToEntero()
SucursalOrigenCP.Estado = Row("EnvioEstado").ToString()
SucursalOrigenCP.CvePais = Row("CvePais").ToString().ToEntero()
SucursalOrigenCP.Pais = Row("Pais").ToString()
SucursalOrigenCP.CP = Row("EnvioCP").ToString()
' SucursalOrigenCP.Direccion = Row("EnvioDireccion").ToString()
' SucursalOrigenCP.Colonia = Row("EnvioColonia").ToString()
' SucursalOrigenCP.Municipio = Row("EnvioCiudad").ToString()
' SucursalOrigenCP.CveEstado = Row("CveEstado").ToString().ToEntero()
' SucursalOrigenCP.Estado = Row("EnvioEstado").ToString()
' SucursalOrigenCP.CvePais = Row("CvePais").ToString().ToEntero()
' SucursalOrigenCP.Pais = Row("Pais").ToString()
' SucursalOrigenCP.CP = Row("EnvioCP").ToString()
'TxtDestinoCP.Text = String.Format("{0} col. {1},CP:{2}, {3},{4},{5}", SucursalDestinoCP.Direccion, SucursalDestinoCP.Colonia, SucursalDestinoCP.CP, SucursalDestinoCP.Municipio, SucursalDestinoCP.Estado, SucursalDestinoCP.Pais)
Else
'TxtDestinoCP.Text = ""
End If
Else
'TxtDestinoCP.Text = ""
End If
' 'TxtDestinoCP.Text = String.Format("{0} col. {1},CP:{2}, {3},{4},{5}", SucursalDestinoCP.Direccion, SucursalDestinoCP.Colonia, SucursalDestinoCP.CP, SucursalDestinoCP.Municipio, SucursalDestinoCP.Estado, SucursalDestinoCP.Pais)
' Else
' 'TxtDestinoCP.Text = ""
' End If
' Else
' 'TxtDestinoCP.Text = ""
' End If
UpEmitirTransitorio.Update()
End Sub
' UpEmitirTransitorio.Update()
'End Sub
Protected Sub DdlDireccionDestino_SelectedIndexChanged(sender As Object, e As EventArgs)
If SucursalDestinoCP Is Nothing Then
SucursalDestinoCP = New Modelos.SucursalModel
Else
SucursalDestinoCP = Nothing
SucursalDestinoCP = New Modelos.SucursalModel
End If
'Protected Sub DdlDireccionDestino_SelectedIndexChanged(sender As Object, e As EventArgs)
' If SucursalDestinoCP Is Nothing Then
' SucursalDestinoCP = New Modelos.SucursalModel
' Else
' SucursalDestinoCP = Nothing
' SucursalDestinoCP = New Modelos.SucursalModel
' End If
If TmpDTDireccionCP IsNot Nothing AndAlso TmpDTDireccionCP.FiltraParametros(String.Format("CveDireccionEnvio = {0}", DdlDireccionDestino.SelectedValue.ToEntero())).Rows.Count > 0 Then
' If TmpDTDireccionCP IsNot Nothing AndAlso TmpDTDireccionCP.FiltraParametros(String.Format("CveDireccionEnvio = {0}", DdlDireccionDestino.SelectedValue.ToEntero())).Rows.Count > 0 Then
Dim Row As DataRow = TmpDTDireccionCP.FiltroPrimero(String.Format("CveDireccionEnvio = {0}", DdlDireccionDestino.SelectedValue.ToEntero()))
If Row IsNot Nothing Then
' Dim Row As DataRow = TmpDTDireccionCP.FiltroPrimero(String.Format("CveDireccionEnvio = {0}", DdlDireccionDestino.SelectedValue.ToEntero()))
' If Row IsNot Nothing Then
SucursalDestinoCP.Direccion = Row("EnvioDireccion").ToString()
SucursalDestinoCP.Colonia = Row("EnvioColonia").ToString()
SucursalDestinoCP.Municipio = Row("EnvioCiudad").ToString()
SucursalDestinoCP.CveEstado = Row("CveEstado").ToString().ToEntero()
SucursalDestinoCP.Estado = Row("EnvioEstado").ToString()
SucursalDestinoCP.CvePais = Row("CvePais").ToString().ToEntero()
SucursalDestinoCP.Pais = Row("Pais").ToString()
SucursalDestinoCP.CP = Row("EnvioCP").ToString()
' SucursalDestinoCP.Direccion = Row("EnvioDireccion").ToString()
' SucursalDestinoCP.Colonia = Row("EnvioColonia").ToString()
' SucursalDestinoCP.Municipio = Row("EnvioCiudad").ToString()
' SucursalDestinoCP.CveEstado = Row("CveEstado").ToString().ToEntero()
' SucursalDestinoCP.Estado = Row("EnvioEstado").ToString()
' SucursalDestinoCP.CvePais = Row("CvePais").ToString().ToEntero()
' SucursalDestinoCP.Pais = Row("Pais").ToString()
' SucursalDestinoCP.CP = Row("EnvioCP").ToString()
'TxtDestinoCP.Text = String.Format("{0} col. {1},CP:{2}, {3},{4},{5}", SucursalDestinoCP.Direccion, SucursalDestinoCP.Colonia, SucursalDestinoCP.CP, SucursalDestinoCP.Municipio, SucursalDestinoCP.Estado, SucursalDestinoCP.Pais)
Else
'TxtDestinoCP.Text = ""
End If
Else
'TxtDestinoCP.Text = ""
End If
' 'TxtDestinoCP.Text = String.Format("{0} col. {1},CP:{2}, {3},{4},{5}", SucursalDestinoCP.Direccion, SucursalDestinoCP.Colonia, SucursalDestinoCP.CP, SucursalDestinoCP.Municipio, SucursalDestinoCP.Estado, SucursalDestinoCP.Pais)
' Else
' 'TxtDestinoCP.Text = ""
' End If
' Else
' 'TxtDestinoCP.Text = ""
' End If
UpEmitirTransitorio.Update()
End Sub
' UpEmitirTransitorio.Update()
'End Sub
Protected Sub LnkAgregarMercancia_Click(sender As Object, e As EventArgs)
TxtCantidadMercancia.Text = ""
'DdlPSMercancia.SelectedValue = ""
@@ -34462,7 +34536,7 @@ Partial Class Ventas
Private Sub CreaDTMercancias()
DtMercancias = New DataTable()
DtMercancias.Columns.Add(New DataColumn("Consec", GetType(Integer)))
DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Integer)))
DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
DtMercancias.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
DtMercancias.Columns.Add(New DataColumn("CveUnidadMedida", GetType(Integer)))
DtMercancias.Columns.Add(New DataColumn("CodigoPS", GetType(String)))
@@ -34715,5 +34789,58 @@ Partial Class Ventas
UpAgregarMercancia.Update()
End Sub
Protected Sub LnkUUIDRelacionados_Click(sender As Object, e As EventArgs)
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, LblRFC.Text, TxtTotal.Text, True)
Dim sb As New StringBuilder
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
Dim Relacionados = Timbrado.ConsultarUUIDRelacionados(UsuarioActual.Empresa, FolioFiscal, UsuarioActual.Empresa.FacturaProduccion)
If Relacionados IsNot Nothing Then
Dim sbExtra As New StringBuilder()
If Relacionados.Codigo = 500 Then
sbExtra.Append("El servicio de verificación de documentos relacionados no esta disponible.")
Else
sbExtra.Append(Relacionados.Mensaje)
Dim SbHijos = New StringBuilder()
Dim SbPadres = New StringBuilder()
If Relacionados.RelacionadosPadre IsNot Nothing Then
For Each padre In Relacionados.RelacionadosPadre
SbPadres.AppendFormat("{0};", padre.Uuid)
Next
If SbPadres.Length > 0 Then
SbPadres.Remove(SbPadres.Length - 1, 1)
End If
End If
Using ObjVentas As New ClsVentas
If SbPadres.Length > 0 Then
If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbPadres.ToString(), UsuarioActual.CveEmpresa) Then
Dim dtt As DataTable = ObjVentas.DtResultados.FiltraParametros($"CveVenta <> {CveVenta}")
For Each dr As DataRow In dtt.Rows
sb.AppendFormat("{0}-{1}-{2}<br/>", dr("TipoDocto"), dr("SerieFolio"), dr("FolioFiscal"))
Next
End If
End If
End Using
End If
If sbExtra.Length > 0 Then
LbExtraRefacturacion.Text = $"<br><b>*{sbExtra.ToString()}</b>"
End If
End If
Alert(sb.ToString(), TipoMensaje.MsgInformacion)
End Sub
End Class

View File

@@ -500,6 +500,10 @@