--merge Ventas.aspx
This commit is contained in:
@@ -6289,6 +6289,7 @@ Partial Class Compras_Compras
|
||||
importeMovimiento = importeRetIVAxAcreditar
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
If CtaProveedorRetIVA > 0 Then
|
||||
IdCtaContable = CtaProveedorRetIVA
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then
|
||||
@@ -8689,6 +8690,8 @@ Partial Class Compras_Compras
|
||||
Dim DTConsultaIEPSPS As New DataTable
|
||||
DTConsultaIEPSPS = TmpDT.FiltraParametros(" AplicaIEPS = 'True'")
|
||||
|
||||
|
||||
|
||||
Dim IndiceContador As Integer = 0
|
||||
Dim IndicePrimero As Integer = 0
|
||||
|
||||
@@ -8702,17 +8705,14 @@ Partial Class Compras_Compras
|
||||
|
||||
If DiferenciaIEPSPS.RoundAD(2) <> 0 Then
|
||||
|
||||
If DTConsultaIEPSPS.Rows.Count > 0 Then
|
||||
'Ajusta IPES en primer registro que aplique IEPS
|
||||
TmpDT.Rows(IndicePrimero)("IEPSPS") = TmpDT.Rows(IndicePrimero)("IEPSPS").ToString.ToDecimal + DiferenciaIEPSPS
|
||||
TmpDT.AcceptChanges()
|
||||
Else
|
||||
Respuesta = False
|
||||
Alert(String.Format("Los productos especificados en el listado no tienen asigando impuesto IEPS, favor de realizar la corrección en el producto que aplique el impuesto. ({0}-{1})", IEPSPSDetalles, TxtIEPS.Text.ToDecimal), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
TmpDT.Rows(IndicePrimero)("IEPSPS") = TmpDT.Rows(IndicePrimero)("IEPSPS").ToString.ToDecimal + DiferenciaIEPSPS
|
||||
TmpDT.AcceptChanges()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
For Each dRow As DataRow In TmpDT.Rows
|
||||
|
||||
If dRow("IEPSPSPorcentaje").ToString.ToDecimal > 0 AndAlso dRow("IEPSPS").ToString.ToDecimal = 0 Then
|
||||
|
||||
@@ -539,6 +539,12 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
|
||||
If UrlParametros("OP").ToString = "Almr" Then
|
||||
If UrlParametros("CVEMOVIMIENTO") IsNot Nothing AndAlso UrlParametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
||||
CargaMovimientosAlmacen(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, Resumen:=True)
|
||||
End If
|
||||
End If
|
||||
|
||||
If UrlParametros("OP").ToString = "Etiqueta" Then
|
||||
If UrlParametros("CVEMOVIMIENTO") IsNot Nothing AndAlso UrlParametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
||||
ImprimirEtiqueta(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, UrlParametros("MODALIDAD").ToString)
|
||||
@@ -1271,6 +1277,11 @@ Partial Class PopUpVerFactura
|
||||
DtOperadores.Columns.Add(New DataColumn("NumLicencia", GetType(String)))
|
||||
DtOperadores.Columns.Add(New DataColumn("NombreOperador", GetType(String)))
|
||||
|
||||
Dim DTRelacionados As New DataTable()
|
||||
DTRelacionados.Columns.Add(New DataColumn("Relacion", GetType(String)))
|
||||
DTRelacionados.Columns.Add(New DataColumn("UUID", GetType(String)))
|
||||
|
||||
|
||||
Dim XMLDoc As New XmlDocument
|
||||
Dim Path As String = String.Format("{0}\{1}\{2}\{3}.{4}", UsuarioActual.Empresa.Ruta, "XML", TipoDocto, String.Format("{0}", SerieFolio), "xml")
|
||||
Dim Archivo As New System.IO.FileInfo(Path)
|
||||
@@ -1449,10 +1460,59 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
|
||||
|
||||
|
||||
DtUbicaciones.Rows.Add(Row)
|
||||
Next
|
||||
|
||||
|
||||
|
||||
Dim nodeRelacion = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
|
||||
|
||||
If nodeRelacion IsNot Nothing Then
|
||||
Dim RelacionCodigo As String = ValorXML(nodeRelacion, "TipoRelacion")
|
||||
Dim Relacion As String = ""
|
||||
|
||||
Select Case RelacionCodigo
|
||||
Case "01"
|
||||
Relacion = "01 - Nota de crédito de los documentos relacionados"
|
||||
Case "02"
|
||||
Relacion = "02 - Nota de débito de los documentos relacionados"
|
||||
Case "03"
|
||||
Relacion = "03 - Devolución de mercancía sobre facturas o traslados previos"
|
||||
Case "04"
|
||||
Relacion = "04 - Sustitución de los CFDI previos"
|
||||
Case "05"
|
||||
Relacion = "05 - Traslados de mercancias facturados previamente"
|
||||
Case "06"
|
||||
Relacion = "06 - Factura generada por los traslados previos"
|
||||
Case "07"
|
||||
Relacion = "07 - CFDI por aplicación de anticipo"
|
||||
Case "08"
|
||||
Relacion = "08 - Factura generada por pagos en parcialidades"
|
||||
Case "09"
|
||||
Relacion = "09 - Factura generada por pagos diferidos"
|
||||
|
||||
End Select
|
||||
|
||||
Dim nodoDocumentosRealcionados = XMLDoc.SelectNodes(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
|
||||
For Each node As XmlNode In nodoDocumentosRealcionados
|
||||
|
||||
Dim nRow As DataRow = DTRelacionados.NewRow
|
||||
nRow("Relacion") = Relacion
|
||||
|
||||
Try
|
||||
Dim nodoUUID = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cfdi:CfdiRelacionado")
|
||||
nRow("UUID") = ValorXML(nodoUUID, "UUID", "")
|
||||
Catch ex As Exception
|
||||
nRow("UUID") = ""
|
||||
End Try
|
||||
|
||||
DTRelacionados.Rows.Add(nRow)
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim nodeTFD As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:TimbreFiscalDigital", "tfd"), namespaces)
|
||||
If nodeTFD IsNot Nothing Then
|
||||
FolioFiscal = ValorXML(nodeTFD, "UUID", "")
|
||||
@@ -1567,6 +1627,12 @@ Partial Class PopUpVerFactura
|
||||
rds4.Value = DtOperadores
|
||||
lrds.Add(rds4)
|
||||
|
||||
|
||||
Dim rds5 As New ReportDataSource
|
||||
rds5.Name = "DataSet5"
|
||||
rds5.Value = DTRelacionados
|
||||
lrds.Add(rds5)
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc", lrds, params, SerieFolio)
|
||||
End If
|
||||
End If
|
||||
@@ -2210,7 +2276,7 @@ Partial Class PopUpVerFactura
|
||||
|
||||
#Region " - OP = 'Alm' - REPORTE ENTRADAS ALMACEN "
|
||||
|
||||
Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer)
|
||||
Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer, Optional Resumen As Boolean = False)
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa)
|
||||
@@ -2306,11 +2372,11 @@ Partial Class PopUpVerFactura
|
||||
Dim CantidadUsados As Decimal = 0
|
||||
|
||||
If CveConcepto = 3 Or CveConcepto = 18 Or CveConcepto = 30 Or CveConcepto = 34 Or CveConcepto = 35 Or CveConcepto = 16 Or CveConcepto = 7 Or CveConcepto = 40 Then 'SALIDA Y DEVOLUCION DEL CLIENTE
|
||||
If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimiento, UsuarioActual.CveEmpresa, Resumen:=Resumen) Then
|
||||
DtMovimientos = ObjInventarios.DtResultados
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveMovimientoRelacionado > 0 Then
|
||||
If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimientoRelacionado, UsuarioActual.CveEmpresa, Resumen:=Resumen) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
Dim CveAlmacenRelacionado As Integer = ObjInventarios.DtResultados.Rows(0)("CveAlmacen").ToString().ToEntero()
|
||||
Dim CveTipoAlmacenRelacionado As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenRelacionado}").ToString.ToEntero
|
||||
|
||||
@@ -2340,7 +2406,7 @@ Partial Class PopUpVerFactura
|
||||
DtMovimientos.PrimaryKey = keys
|
||||
End If
|
||||
Else
|
||||
If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa, Resumen:=Resumen) Then
|
||||
DtMovimientos = ObjInventarios.DtResultados.Copy()
|
||||
CantidadProductos = DtMovimientos.SUM("Cantidad").ToDecimal()
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveMovimientoRelacionado > 0 Then
|
||||
|
||||
@@ -25,6 +25,15 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
ViewState("CveMoneda") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CvePrePolizaComprobacion As Integer
|
||||
Get
|
||||
Return ViewState("CvePrePolizaComprobacion").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePrePolizaComprobacion") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property IdCuentaBancaria As Integer
|
||||
Get
|
||||
Return ViewState("IdCuentaBancaria").ToString.ToEntero
|
||||
@@ -316,7 +325,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
If dr IsNot Nothing Then
|
||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
|
||||
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
|
||||
If HdnTipoTransaccion.Value = "Egs" Then
|
||||
@@ -383,9 +391,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ValFechaDocumento As Boolean = False
|
||||
Dim FoliosFechasValFechaDocumento As New StringBuilder
|
||||
|
||||
@@ -408,16 +413,11 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
FechaDocumento = TxtFechaPrePoliza.Text.ToDate
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim AnioFactura As Integer = FechaFactura.Year
|
||||
Dim MesFactura As Integer = FechaFactura.Month
|
||||
|
||||
|
||||
Dim AnioDocumento As Integer = FechaDocumento.Year
|
||||
Dim MesDocumento As Integer = FechaDocumento.Month
|
||||
|
||||
|
||||
If AnioFactura > AnioDocumento Then
|
||||
|
||||
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") } <br/>")
|
||||
@@ -441,8 +441,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If HdnCheque.Value.ToEntero > 0 And ChkChequeExcedente.Checked And TxtImporte.Text.ToDecimal = 0 Then
|
||||
Alert("El importe del cheque excedente debe ser mayor a cero", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -488,8 +486,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
Dim UsaSimplificacionCajaChica As Boolean = False
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaSimplificacionCajaChica = True
|
||||
|
||||
|
||||
|
||||
Dim concepto As String = "Compras: "
|
||||
|
||||
For Each Gvr As GridViewRow In GvCxP.Rows
|
||||
@@ -502,7 +498,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
|
||||
Next
|
||||
|
||||
|
||||
If HdnCheque.Value.ToEntero > 0 AndAlso Not ChkReembolsarSinBancos.Checked Then
|
||||
CveIERegistrado = DDlCheques.SelectedValue.ToEntero
|
||||
|
||||
@@ -514,7 +509,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
If ObjMov.GetRetCuenta(30, CveCajaChica) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
|
||||
@@ -535,7 +529,11 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones2", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
IdPoliza = drp("IdPoliza").ToString.ToEntero
|
||||
Else
|
||||
CvePrePolizaIERegistrado = drp("CvePrePoliza").ToString.ToEntero
|
||||
If UsuarioActual.CveEmpresa = 141 Then
|
||||
CvePrePolizaIERegistrado = CvePrePolizaComprobacion
|
||||
Else
|
||||
CvePrePolizaIERegistrado = drp("CvePrePoliza").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -544,7 +542,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
If dr IsNot Nothing Then
|
||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
|
||||
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
|
||||
If ChkChequeExcedente.Checked Then
|
||||
@@ -568,7 +565,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
If ObjMov.GetRetCuenta(30, CveCajaChica) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
|
||||
@@ -597,7 +593,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
If ObjMov.GetRetCuenta(30, CveCajaChica) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
|
||||
@@ -646,14 +641,12 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
If ObjMov.GetRetCuenta(30, CveCajaChica) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If ObjMov.GetRetCuenta(29, CvePersonal) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaPersonal = ObjMov.DtResultados.Rows(0)("IdCtaContPersonal").ToString.ToEntero
|
||||
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaPersonal = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -933,6 +926,31 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Case 5
|
||||
ConceptoContableRetIVAXAcreditar = 285
|
||||
ConceptoContableRetIVAAcreditable = 286
|
||||
If IdCtaRetIVA > 0 Then
|
||||
IdCtaContableRetIVAXAcreditar = IdCtaRetIVA
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(577).ToEntero > 0 Then
|
||||
IdCtaContableRetIVAXAcreditar = UsuarioActual.Empresa.Funcionalidad(577).ToEntero
|
||||
Else
|
||||
If ObjMov.GetRetCuenta(ConceptoContableRetIVAXAcreditar, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContableRetIVAXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If IdCtaRetIVA > 0 Then
|
||||
IdCtaContableRetIVAAcreditable = IdCtaRetIVA
|
||||
ElseIf UsuarioActual.Empresa.Funcionalidad(578).ToEntero > 0 Then
|
||||
IdCtaContableRetIVAAcreditable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
|
||||
Else
|
||||
If ObjMov.GetRetCuenta(ConceptoContableRetIVAAcreditable, UsuarioActual.CveEmpresa) Then
|
||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContableRetIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Select
|
||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||
If ImporteMovto = gvr.FCLiteral("LtlSaldo").Text.ToDouble Then
|
||||
@@ -959,84 +977,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
End If
|
||||
End If
|
||||
|
||||
'If MsgError = "" AndAlso gvr.DataKey("RetISR").ToDecimal > 0 Then
|
||||
' Dim ConceptoContableRetISRXAcreditar = 0, ConceptoContableRetISRAcreditable = 0, IdCtaContableRetISRXAcreditar = 0, IdCtaContableRetISRAcreditable = 0
|
||||
' Select Case gvr.DataKey("CveRetISRConcepto").ToEntero
|
||||
' Case 1
|
||||
' ConceptoContableRetISRXAcreditar = 16
|
||||
' ConceptoContableRetISRAcreditable = 23
|
||||
' If IdCtaRetISR > 0 Then
|
||||
' IdCtaContableRetISRXAcreditar = IdCtaRetISR
|
||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(315).ToEntero > 0 Then
|
||||
' IdCtaContableRetISRXAcreditar = UsuarioActual.Empresa.Funcionalidad(315).ToEntero
|
||||
' Else
|
||||
' If ObjMov.GetRetCuenta(ConceptoContableRetISRXAcreditar, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContableRetISRXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' If IdCtaRetISR > 0 Then
|
||||
' IdCtaContableRetISRAcreditable = IdCtaRetISR
|
||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then
|
||||
' IdCtaContableRetISRAcreditable = UsuarioActual.Empresa.Funcionalidad(308).ToEntero
|
||||
' Else
|
||||
' If ObjMov.GetRetCuenta(ConceptoContableRetISRAcreditable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContableRetISRAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' Case 2
|
||||
' ConceptoContableRetISRXAcreditar = 243
|
||||
' ConceptoContableRetISRAcreditable = 244
|
||||
' If IdCtaRetISR > 0 Then
|
||||
' IdCtaContableRetISRXAcreditar = IdCtaRetISR
|
||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(317).ToEntero > 0 Then
|
||||
' IdCtaContableRetISRXAcreditar = UsuarioActual.Empresa.Funcionalidad(317).ToEntero
|
||||
' Else
|
||||
' If ObjMov.GetRetCuenta(ConceptoContableRetISRXAcreditar, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContableRetISRXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' If IdCtaRetISR > 0 Then
|
||||
' IdCtaContableRetISRAcreditable = IdCtaRetISR
|
||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then
|
||||
' IdCtaContableRetISRAcreditable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero
|
||||
' Else
|
||||
' If ObjMov.GetRetCuenta(ConceptoContableRetISRAcreditable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContableRetISRAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End Select
|
||||
' If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||
' If ImporteMovto = gvr.FCLiteral("LtlSaldo").Text.ToDouble Then
|
||||
' 'Agrego el RetISR
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.DataKey("RetISR").ToDecimal, Referencia, ConceptoContableRetISRXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRXAcreditar, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal) * tipoCambio, CveCuenta:=CveCuentaIVAxAcreditar, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
|
||||
' MsgError = "Detalle"
|
||||
' End If
|
||||
|
||||
' 'Agrego el RetISR
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("RetISR").ToDecimal, Referencia, ConceptoContableRetISRAcreditable, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRAcreditable, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
|
||||
' MsgError = "Detalle"
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' 'Agrego el RetISR
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.DataKey("RetISR").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetISRXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRXAcreditar, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAxAcreditar, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
|
||||
' MsgError = "Detalle"
|
||||
' End If
|
||||
|
||||
' 'Agrego el RetISR
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("RetISR").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetISRAcreditable, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRAcreditable, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal) Then
|
||||
' MsgError = "Detalle"
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
|
||||
Dim SaldoExcedente As Double = gvr.FCTextBox("TxtSaldoExcedente").Text.ToDecimal
|
||||
|
||||
@@ -1282,71 +1223,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
End If
|
||||
End If
|
||||
|
||||
'If MsgError = "" AndAlso gvr.DataKey("RetISR").ToDecimal > 0 Then
|
||||
' Dim ConceptoContableRetISRXAcreditar = 0, ConceptoContableRetISRAcreditable = 0, IdCtaContableRetISRXAcreditar = 0, IdCtaContableRetISRAcreditable = 0
|
||||
' Select Case gvr.DataKey("CveRetISRConcepto").ToEntero
|
||||
' Case 1
|
||||
' ConceptoContableRetISRXAcreditar = 16
|
||||
' ConceptoContableRetISRAcreditable = 23
|
||||
' If IdCtaRetISR > 0 Then
|
||||
' IdCtaContableRetISRXAcreditar = IdCtaRetISR
|
||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(315).ToEntero > 0 Then
|
||||
' IdCtaContableRetISRXAcreditar = UsuarioActual.Empresa.Funcionalidad(315).ToEntero
|
||||
' Else
|
||||
' If ObjMov.GetRetCuenta(ConceptoContableRetISRXAcreditar, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContableRetISRXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' If IdCtaRetISR > 0 Then
|
||||
' IdCtaContableRetISRAcreditable = IdCtaRetISR
|
||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then
|
||||
' IdCtaContableRetISRAcreditable = UsuarioActual.Empresa.Funcionalidad(308).ToEntero
|
||||
' Else
|
||||
' If ObjMov.GetRetCuenta(ConceptoContableRetISRAcreditable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContableRetISRAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' Case 2
|
||||
' ConceptoContableRetISRXAcreditar = 243
|
||||
' ConceptoContableRetISRAcreditable = 244
|
||||
' If IdCtaRetISR > 0 Then
|
||||
' IdCtaContableRetISRXAcreditar = IdCtaRetISR
|
||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(317).ToEntero > 0 Then
|
||||
' IdCtaContableRetISRXAcreditar = UsuarioActual.Empresa.Funcionalidad(317).ToEntero
|
||||
' Else
|
||||
' If ObjMov.GetRetCuenta(ConceptoContableRetISRXAcreditar, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContableRetISRXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' If IdCtaRetISR > 0 Then
|
||||
' IdCtaContableRetISRAcreditable = IdCtaRetISR
|
||||
' ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then
|
||||
' IdCtaContableRetISRAcreditable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero
|
||||
' Else
|
||||
' If ObjMov.GetRetCuenta(ConceptoContableRetISRAcreditable, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContableRetISRAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End Select
|
||||
|
||||
' 'Agrego el RetISR
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, False, gvr.DataKey("RetISR").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetISRXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRXAcreditar, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAxAcreditar, CvePrePolizaOriginal:=CvePrePolizaExcedente, CvePersonal:=CvePersonal) Then
|
||||
' MsgError = "Detalle"
|
||||
' End If
|
||||
|
||||
' 'Agrego el RetISR
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("RetISR").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetISRAcreditable, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRAcreditable, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaExcedente, CvePersonal:=CvePersonal) Then
|
||||
' MsgError = "Detalle"
|
||||
' End If
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -1408,31 +1284,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
AutoConta = False
|
||||
End If
|
||||
|
||||
If AutoConta And MsgError.Trim = "" AndAlso UsuarioActual.Empresa.UsaContabilidadSIG Then
|
||||
If CvePrePolizaIERegistrado > 0 Then
|
||||
If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaPersonal > 0 Then
|
||||
If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaProveedor > 0 Then
|
||||
|
||||
Else
|
||||
MsgError = "No tiene cuenta contable SIG de proveedor"
|
||||
End If
|
||||
Else
|
||||
MsgError = "No tiene cuenta contable SIG de personal"
|
||||
End If
|
||||
End If
|
||||
|
||||
If ChkChequeExcedente.Checked Then
|
||||
If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaBancaria > 0 Then
|
||||
If UsuarioActual.Empresa.UsaContabilidadSIG AndAlso CveCuentaProveedor > 0 Then
|
||||
|
||||
Else
|
||||
MsgError = "No tiene cuenta contable SIG de proveedor"
|
||||
End If
|
||||
Else
|
||||
MsgError = "No tiene Cuenta contable SIG Bancaria"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Conta ContPAQ AUTOMATICA
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError.Trim = "" Then
|
||||
@@ -1626,6 +1477,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
ObjMovtos.GetCxPPersonalCajaChica(UsuarioActual.CveEmpresa, CvePersonal, CveCajaChica, If(TxtNumeroReembolso.Text.Trim = "", "-1", TxtNumeroReembolso.Text.Trim))
|
||||
DtDatos = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0")
|
||||
GvCxP.DataSource = DtDatos
|
||||
CvePrePolizaComprobacion = DtDatos.MAX("CvePrePolizaComprobacion").ToEntero
|
||||
|
||||
'Limpia Ddl Chequesventas
|
||||
DDlCheques.Items.Clear()
|
||||
@@ -1967,7 +1819,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
cfdi.Nomina.NumDiasPagados = 1
|
||||
cfdi.Emisor.Nombre = UsuarioActual.Empresa.Empresa
|
||||
cfdi.Emisor.RFC = UsuarioActual.Empresa.RFC
|
||||
cfdi.Emisor.RegistroPatronal = UsuarioActual.Empresa.RegistroPatronal
|
||||
cfdi.Emisor.RegistroPatronal = objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString()
|
||||
cfdi.Emisor.RegimenFiscal = UsuarioActual.Empresa.CodigoRegimenFiscal
|
||||
|
||||
'aplica persona fisica debe de tener CURP
|
||||
|
||||
@@ -253,13 +253,6 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row" runat="server" id="divAgruparMes" visible="false">
|
||||
<div class="col-md-1"><span>Ver por meses:</span></div>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox runat="server" ID="chkAgruparMes"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div id="DivEmpresasFiltro" runat="server" visible="false">
|
||||
<div class="col-md-1 truncate">
|
||||
@@ -269,11 +262,16 @@
|
||||
<asp:ListBox ID="DdlEmpresas" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server" DataTextField="Empresa" DataValueField="CveEmpresa"></asp:ListBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" title="Tipo Cliente:" data-toggle="tooltip" data-placement="top">
|
||||
Moneda:
|
||||
<div runat="server" id="divAgruparMes" visible="false">
|
||||
<div class="col-md-1 truncate ">Ver por meses: </div>
|
||||
<div class="col-md-1 truncate ">
|
||||
<asp:CheckBox runat="server" ID="chkAgruparMes"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-1 truncate" title="Moneda:" data-toggle="tooltip" data-placement="top">
|
||||
Moneda:
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<asp:DropDownList ID="DdlMoneda" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pesos" Value="1"></asp:ListItem>
|
||||
|
||||
Reference in New Issue
Block a user