-- mejora para agrupar en la póliza e141
This commit is contained in:
@@ -25,6 +25,15 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
ViewState("CveMoneda") = value
|
ViewState("CveMoneda") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
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
|
Private Property IdCuentaBancaria As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("IdCuentaBancaria").ToString.ToEntero
|
Return ViewState("IdCuentaBancaria").ToString.ToEntero
|
||||||
@@ -316,7 +325,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||||
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
|
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
|
||||||
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If HdnTipoTransaccion.Value = "Egs" Then
|
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
|
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim ValFechaDocumento As Boolean = False
|
Dim ValFechaDocumento As Boolean = False
|
||||||
Dim FoliosFechasValFechaDocumento As New StringBuilder
|
Dim FoliosFechasValFechaDocumento As New StringBuilder
|
||||||
|
|
||||||
@@ -408,16 +413,11 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
FechaDocumento = TxtFechaPrePoliza.Text.ToDate
|
FechaDocumento = TxtFechaPrePoliza.Text.ToDate
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim AnioFactura As Integer = FechaFactura.Year
|
Dim AnioFactura As Integer = FechaFactura.Year
|
||||||
Dim MesFactura As Integer = FechaFactura.Month
|
Dim MesFactura As Integer = FechaFactura.Month
|
||||||
|
|
||||||
|
|
||||||
Dim AnioDocumento As Integer = FechaDocumento.Year
|
Dim AnioDocumento As Integer = FechaDocumento.Year
|
||||||
Dim MesDocumento As Integer = FechaDocumento.Month
|
Dim MesDocumento As Integer = FechaDocumento.Month
|
||||||
|
|
||||||
|
|
||||||
If AnioFactura > AnioDocumento Then
|
If AnioFactura > AnioDocumento Then
|
||||||
|
|
||||||
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("FechaCompra").ToDate.ToString("dd/MM/yyyy") } <br/>")
|
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
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If HdnCheque.Value.ToEntero > 0 And ChkChequeExcedente.Checked And TxtImporte.Text.ToDecimal = 0 Then
|
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)
|
Alert("El importe del cheque excedente debe ser mayor a cero", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -488,8 +486,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
Dim UsaSimplificacionCajaChica As Boolean = False
|
Dim UsaSimplificacionCajaChica As Boolean = False
|
||||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaSimplificacionCajaChica = True
|
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaSimplificacionCajaChica = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim concepto As String = "Compras: "
|
Dim concepto As String = "Compras: "
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvCxP.Rows
|
For Each Gvr As GridViewRow In GvCxP.Rows
|
||||||
@@ -502,7 +498,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
If HdnCheque.Value.ToEntero > 0 AndAlso Not ChkReembolsarSinBancos.Checked Then
|
If HdnCheque.Value.ToEntero > 0 AndAlso Not ChkReembolsarSinBancos.Checked Then
|
||||||
CveIERegistrado = DDlCheques.SelectedValue.ToEntero
|
CveIERegistrado = DDlCheques.SelectedValue.ToEntero
|
||||||
|
|
||||||
@@ -514,7 +509,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
If ObjMov.GetRetCuenta(30, CveCajaChica) Then
|
If ObjMov.GetRetCuenta(30, CveCajaChica) Then
|
||||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
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
|
||||||
End If
|
End If
|
||||||
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
|
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)
|
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
|
IdPoliza = drp("IdPoliza").ToString.ToEntero
|
||||||
Else
|
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
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -544,7 +542,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||||
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
|
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
|
||||||
If UsuarioActual.Empresa.UsaContabilidadSIG Then CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ChkChequeExcedente.Checked Then
|
If ChkChequeExcedente.Checked Then
|
||||||
@@ -568,7 +565,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
If ObjMov.GetRetCuenta(30, CveCajaChica) Then
|
If ObjMov.GetRetCuenta(30, CveCajaChica) Then
|
||||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
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
|
||||||
End If
|
End If
|
||||||
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
|
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.GetRetCuenta(30, CveCajaChica) Then
|
||||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
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
|
||||||
End If
|
End If
|
||||||
Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString
|
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.GetRetCuenta(30, CveCajaChica) Then
|
||||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
|
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
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If ObjMov.GetRetCuenta(29, CvePersonal) Then
|
If ObjMov.GetRetCuenta(29, CvePersonal) Then
|
||||||
If ObjMov.DtResultados.Rows.Count > 0 Then
|
If ObjMov.DtResultados.Rows.Count > 0 Then
|
||||||
IdCtaPersonal = ObjMov.DtResultados.Rows(0)("IdCtaContPersonal").ToString.ToEntero
|
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
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -933,6 +926,31 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
End If
|
End If
|
||||||
End If
|
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
|
End Select
|
||||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||||
If ImporteMovto = gvr.FCLiteral("LtlSaldo").Text.ToDouble Then
|
If ImporteMovto = gvr.FCLiteral("LtlSaldo").Text.ToDouble Then
|
||||||
@@ -959,84 +977,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
End If
|
End If
|
||||||
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
|
Dim SaldoExcedente As Double = gvr.FCTextBox("TxtSaldoExcedente").Text.ToDecimal
|
||||||
|
|
||||||
@@ -1282,71 +1223,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
End If
|
End If
|
||||||
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
|
End If
|
||||||
|
|
||||||
@@ -1408,31 +1284,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
AutoConta = False
|
AutoConta = False
|
||||||
End If
|
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
|
'Conta ContPAQ AUTOMATICA
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError.Trim = "" Then
|
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))
|
ObjMovtos.GetCxPPersonalCajaChica(UsuarioActual.CveEmpresa, CvePersonal, CveCajaChica, If(TxtNumeroReembolso.Text.Trim = "", "-1", TxtNumeroReembolso.Text.Trim))
|
||||||
DtDatos = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0")
|
DtDatos = ObjMovtos.DtResultados.FiltraParametros("Saldo > 0")
|
||||||
GvCxP.DataSource = DtDatos
|
GvCxP.DataSource = DtDatos
|
||||||
|
CvePrePolizaComprobacion = DtDatos.MAX("CvePrePolizaComprobacion").ToEntero
|
||||||
|
|
||||||
'Limpia Ddl Chequesventas
|
'Limpia Ddl Chequesventas
|
||||||
DDlCheques.Items.Clear()
|
DDlCheques.Items.Clear()
|
||||||
|
|||||||
Reference in New Issue
Block a user