This commit is contained in:
HECTOR RODRIGUEZ
2021-02-24 11:12:13 -07:00
23 changed files with 454 additions and 361 deletions

View File

@@ -68,7 +68,7 @@ Public Class ClsClientes
Public Property RecepcionPagos As String
Public Property TipoPago As String
Public Property CuentaContable As String
Public Property ConvenioCIE As String
'Public Property ConvenioCIE As String
Public Property FormaFacturacion As String
Public Property IdCtaContClientes As Integer
Public Property IdCtaContMonedaExtranjera As Integer
@@ -86,8 +86,8 @@ Public Class ClsClientes
Public Property CveCuentaFondoGarantia As Integer
Public Property Codigo As String
Public Property LimiteCredito As Double
Public Property NumCtaPago As String
Public Property CveMetodoPago As Integer
'Public Property NumCtaPago As String
'Public Property CveMetodoPago As Integer
Public Property AplicaFEMSA As Boolean
Public Property FEMSA_NumSociedad As String
Public Property FEMSA_NumProveedor As String
@@ -341,11 +341,11 @@ Public Class ClsClientes
_CveCuentaRetIVA = Data.Rows(0)("IdCtaContRetIVASIG").ToString.ToEntero
_CveCuentaRetISR = Data.Rows(0)("IdCtaContRetISRSIG").ToString.ToEntero
_CveCuentaFondoGarantia = Data.Rows(0)("IdCtaContFondoGarantiaSIG").ToString.ToEntero
_ConvenioCIE = Data.Rows(0)("ConvenioCIE").ToString
'_ConvenioCIE = Data.Rows(0)("ConvenioCIE").ToString
_FormaFacturacion = Data(0)("FormaFacturacion").ToString
_LimiteCredito = Data(0)("LimiteCredito").ToString.ToDouble
_NumCtaPago = Data(0)("NumCtaPago").ToString
_CveMetodoPago = Data(0)("CveMetodoPago").ToString.ToEntero
'_NumCtaPago = Data(0)("NumCtaPago").ToString
'_CveMetodoPago = Data(0)("CveMetodoPago").ToString.ToEntero
_AplicaFEMSA = CBool(Data(0)("AplicaFEMSA").ToString)
_FEMSA_NumSociedad = Data(0)("FEMSA_NumSociedad").ToString
_FEMSA_NumProveedor = Data(0)("FEMSA_NumProveedor").ToString
@@ -569,7 +569,7 @@ Public Class ClsClientes
RetieneIVAFletes As Boolean, CveUsuario As Integer, CveEmpresa As Integer, NombreCorto As String, CveVendedor As Integer, PlazoCobranza As Integer, PlazoCobranzaRemision As Integer, RecepcionPagos As String, TipoPago As String,
IdCtaContClientes As Integer, CtaContClientes As String, IdCtaContAnticipos As Integer, CtaContAnticipos As String, IdCtaContRetIVA As Integer, CtaContRetIVA As String, IdCtaContRetISR As Integer, CtaContRetISR As String, IdCtaFondoGarantia As Integer, CtaFondoGarantia As String,
IdCtaContCompClientes As Integer, CtaCompClientes As String, IdCtaContCompAnticipos As Integer, CtaCompAnticipos As String,
ConvenioCIE As String, FormaFacturacion As String, Codigo As String, LimiteCredito As Double, NumCtaPago As String, CveMetodoPago As Integer, AplicaFEMSA As Boolean, FEMSA_NumSociedad As String, FEMSA_NumProveedor As String,
FormaFacturacion As String, Codigo As String, LimiteCredito As Double, AplicaFEMSA As Boolean, FEMSA_NumSociedad As String, FEMSA_NumProveedor As String,
FEMSA_Mail As String, AplicaDetallista As Boolean, Detallista_GLNComprador As String, Detallista_Departamento As String, Detallista_GLNVendedor As String, Detallista_NumProveedor As String,
SevenEleven_NumProveedor As String, AplicaFord As Boolean, Ford_GSDB As String, TelefonoExtension As String, TelefonoOtros As String, PermiteCredito As Boolean, CveSubProyecto As Integer, CveClienteCorporativo As Integer,
Optional CveClienteClasificacion As Integer = -1, Optional CveUsuarioResponsable As Integer = -1,
@@ -637,14 +637,12 @@ Public Class ClsClientes
.Add("@CtaContCompClientes", SqlDbType.VarChar).Value = CtaCompClientes
.Add("@IdCtaContCompAnticipos", SqlDbType.Int).Value = IdCtaContCompAnticipos
.Add("@CtaContCompAnticipos", SqlDbType.VarChar).Value = CtaCompAnticipos
.Add("@ConvenioCIE", SqlDbType.VarChar).Value = ConvenioCIE
.Add("@CtaContCompAnticipos", SqlDbType.VarChar).Value = CtaCompAnticipos
.Add("@FormaFacturacion", SqlDbType.VarChar).Value = FormaFacturacion
.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
.Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito
.Add("@NumCtaPago", SqlDbType.VarChar).Value = NumCtaPago
.Add("@CveMetodoPago", SqlDbType.Int).Value = CveMetodoPago
.Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito
.Add("@AplicaFEMSA", SqlDbType.Bit).Value = If(AplicaFEMSA, 1, 0)
.Add("@FEMSA_NumSociedad", SqlDbType.VarChar).Value = FEMSA_NumSociedad
.Add("@FEMSA_NumProveedor", SqlDbType.VarChar).Value = FEMSA_NumProveedor
@@ -754,7 +752,7 @@ Public Class ClsClientes
IdCtaContClientes As Integer, CtaContClientes As String, IdCtaContAnticipos As Integer, CtaContAnticipos As String, IdCtaContRetIVA As Integer, CtaContRetIVA As String, IdCtaContRetISR As Integer, CtaContRetISR As String, IdCtaFondoGarantia As Integer, CtaFondoGarantia As String,
IdCtaContCompClientes As Integer, CtaCompClientes As String, IdCtaContCompAnticipos As Integer, CtaCompAnticipos As String,
IdCtaContMonedaExtranjera As Integer, CtaContMonedaExtranjera As String, IdCtaContMonedaExtranjeraAnticipos As Integer, CtaContMonedaExtranjeraAnticipos As String,
ConvenioCIE As String, FormaFacturacion As String, Codigo As String, LimiteCredito As Double, NumCtaPago As String, CveMetodoPago As Integer, AplicaFEMSA As Boolean, FEMSA_NumSociedad As String,
FormaFacturacion As String, Codigo As String, LimiteCredito As Double, AplicaFEMSA As Boolean, FEMSA_NumSociedad As String,
FEMSA_NumProveedor As String, FEMSA_Mail As String, AplicaDetallista As Boolean, Detallista_GLNComprador As String, Detallista_Departamento As String, Detallista_GLNVendedor As String,
Detallista_NumProveedor As String, SevenEleven_NumProveedor As String, AplicaFord As Boolean, Ford_GSDB As String, CveUsuario As Integer, CveCliente As Integer, CveUsuarioModifico As Integer, CveEmpresa As Integer, TelefonoExtension As String, TelefonoOtros As String,
PermiteCredito As Boolean, CveSubProyecto As Integer, CveClienteCorporativo As Integer,
@@ -833,14 +831,13 @@ Public Class ClsClientes
.Add("@IdCtaContMonedaExtranjera", SqlDbType.Int).Value = IdCtaContMonedaExtranjera
.Add("@CtaContMonedaExtranjera", SqlDbType.VarChar).Value = CtaContMonedaExtranjera
.Add("@IdCtaContMonedaExtranjeraAnticipos", SqlDbType.Int).Value = IdCtaContMonedaExtranjeraAnticipos
.Add("@CtaContMonedaExtranjeraAnticipos", SqlDbType.VarChar).Value = IdCtaContMonedaExtranjeraAnticipos
.Add("@ConvenioCIE", SqlDbType.VarChar).Value = ConvenioCIE
.Add("@CtaContMonedaExtranjeraAnticipos", SqlDbType.VarChar).Value = IdCtaContMonedaExtranjeraAnticipos
.Add("@FormaFacturacion", SqlDbType.VarChar).Value = FormaFacturacion
.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
.Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito
.Add("@NumCtaPago", SqlDbType.VarChar).Value = NumCtaPago
.Add("@CveMetodoPago", SqlDbType.Int).Value = CveMetodoPago
.Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito
.Add("@AplicaFEMSA", SqlDbType.Bit).Value = If(AplicaFEMSA, 1, 0)
.Add("@FEMSA_NumSociedad", SqlDbType.VarChar).Value = FEMSA_NumSociedad
.Add("@FEMSA_NumProveedor", SqlDbType.VarChar).Value = FEMSA_NumProveedor

View File

@@ -237,13 +237,15 @@ Public Class ClsSisRoles
Return Retorno
End Function
Public Function GetRolesModulos(CveRol As Integer, CveModulo As Integer) As Boolean
Public Function GetRolesModulos(CveRol As Integer, CveModulo As Integer, CvePlataforma As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Sis_RolesModulosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveRol", SqlDbType.Int).Value = CveRol
.Add("@CveModulo", SqlDbType.Int).Value = CveModulo
.Add("@CvePlataforma", SqlDbType.Int).Value = CvePlataforma
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try

View File

@@ -1382,12 +1382,21 @@ Partial Class Bancos_PopIECompras
Dim rv As RangeValidator = CType(e.Row.FindControl("RVSaldoDeudor"), RangeValidator)
End If
End Sub
End Sub
#End Region
#Region "G U A R D A R"
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
'VALIDACION PARA LOS IMPORTES CUANDO SE QUIERE PAGAR EN DIFERENTE MONEDA
If FechaCompra.ToString("dd/MM/yyyy").ToDate > TxtFechaDocumento.Text.ToDate Then
Alert($"La fecha de compra no puede ser mayor que la fecha de pago <br/> Fecha de compra: { FechaCompra.ToString("dd/MM/yyyy") } ", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'VALIDACION PARA LOS IMPORTES CUANDO SE QUIERE PAGAR EN DIFERENTE MONEDA
If Not Page.IsValid Then
Exit Sub
End If

View File

@@ -1382,12 +1382,21 @@ Partial Class Bancos_PopIEVentas
End If
UpDatos.Update()
End Sub
End Sub
#End Region
#Region "G U A R D A R"
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
'VALIDACION PARA LOS IMPORTES CUANDO SE QUIERE PAGAR EN DIFERENTE MONEDA
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
If FechaVenta.ToString("dd/MM/yyyy").ToDate > TxtFechaDocumento.Text.ToDate Then
Alert($"La fecha de venta no puede ser mayor que la fecha de pago <br/> Fecha de venta: { FechaVenta.ToString("dd/MM/yyyy") }", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'VALIDACION PARA LOS IMPORTES CUANDO SE QUIERE PAGAR EN DIFERENTE MONEDA
If Not Page.IsValid Then
Exit Sub
End If
@@ -2148,34 +2157,34 @@ Partial Class Bancos_PopIEVentas
Else
ImporteMovimiento = 0
End If
CveSubProyectoContabilizar = CveSubProyectoVenta
'Case 65 'Perdida
' If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
' Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
' TimpocambioGeneral = TCImpuestos
' Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
' Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
' Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
' Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
' Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
' Diferencia = Math.Round(Diferencia, 2)
' 'si la diferencia es negativa es pérdida, si es positiva es ganancia
' If Diferencia > 0 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = Math.Abs(Diferencia)
' ImporteMX = ImporteMovimiento
' End If
' Else
' ImporteMovimiento = 0
' End If
' CveSubProyectoContabilizar = CveSubProyectoVenta
CveSubProyectoContabilizar = CveSubProyectoVenta
'Case 65 'Perdida
' If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
' Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
' TimpocambioGeneral = TCImpuestos
' Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
' Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
' Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
' Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
' Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
' Diferencia = Math.Round(Diferencia, 2)
' 'si la diferencia es negativa es pérdida, si es positiva es ganancia
' If Diferencia > 0 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = Math.Abs(Diferencia)
' ImporteMX = ImporteMovimiento
' End If
' Else
' ImporteMovimiento = 0
' End If
' CveSubProyectoContabilizar = CveSubProyectoVenta
Case 30
If RBLContado.SelectedValue = "1" Then
If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
@@ -2878,249 +2887,249 @@ Partial Class Bancos_PopIEVentas
End If
Next
ImporteMovimiento = 0
End If
'Case 16 'Ret ISR X Acreditar COMPRA
' If RBLContado.SelectedValue = "5" Then
' For Each rw As GridViewRow In GvCompras.Rows
' If rw.FCCheckBox("Chk").Checked Then
' If rw.DataKey("CveRetIVAConcepto").ToString.ToDecimal = 1 Then
' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal
' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra
' ImporteMX = ImporteMovimiento
' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal
' End If
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
' ImporteMX = Math.Round(ImporteMX, 2)
' If rw.DataKey("TipoCambio").ToString.ToDecimal > 1 Then ConceptoMovimiento += $" TC:{rw.DataKey("TipoCambio").ToString.ToDecimal} ${ImporteMovimiento.FormatoNumero(2)}"
' 'Conta ContPAQ
' If IdCtaContRetISRProveedor > 0 Then
' IdCtaContable = IdCtaContRetISRProveedor
' ElseIf UsuarioActual.Empresa.Funcionalidad(315).ToEntero > 0 Then
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(315).ToEntero
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' 'Conta SIG
' If CveCuentaRetISRProveedor <> 0 Then
' CveCuenta = CveCuentaRetISRProveedor
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
' MsgError = "No se pudo insertar la póliza"
' End If
' End If
' End If
' End If
' Next
' ImporteMovimiento = 0
' End If
'Case 23 'Ret ISR Acreditable COMPRA
' If RBLContado.SelectedValue = "5" Then
' For Each rw As GridViewRow In GvCompras.Rows
' If rw.FCCheckBox("Chk").Checked Then
' If rw.DataKey("CveRetIVAConcepto").ToString.ToDecimal = 1 Then
' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal
' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra
' ImporteMX = ImporteMovimiento
' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento '* If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)
' End If
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
' ImporteMX = Math.Round(ImporteMX, 2)
' If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
' 'Conta ContPAQ
' If IdCtaContRetISRAcreditableProveedor > 0 Then
' IdCtaContable = IdCtaContRetISRAcreditableProveedor
' ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(316).ToEntero
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' 'Conta SIG
' If CveCuentaRetISRProveedor <> 0 Then
' CveCuenta = CveCuentaRetISRProveedor
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
' MsgError = "No se pudo insertar la póliza"
' End If
' End If
' End If
' End If
' Next
' ImporteMovimiento = 0
' End If
'Case 243 'Ret ISR x Acreditar Terceros y Arrendamiento
' If RBLContado.SelectedValue = "5" Then
' For Each rw As GridViewRow In GvCompras.Rows
' If rw.FCCheckBox("Chk").Checked Then
' If rw.DataKey("CveRetISRConcepto").ToString.ToDecimal = 2 Then
' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal
' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra
' ImporteMX = ImporteMovimiento
' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal
' End If
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
' ImporteMX = Math.Round(ImporteMX, 2)
' If rw.DataKey("TipoCambio").ToString.ToDecimal > 1 Then ConceptoMovimiento += $" TC:{rw.DataKey("TipoCambio").ToString.ToDecimal} ${ImporteMovimiento.FormatoNumero(2)}"
' 'Conta ContPAQ
' If IdCtaContRetISRProveedor > 0 Then
' IdCtaContable = IdCtaContRetISRProveedor
' ElseIf UsuarioActual.Empresa.Funcionalidad(317).ToEntero > 0 Then
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(317).ToEntero
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' 'Conta SIG
' If CveCuentaRetISRProveedor <> 0 Then
' CveCuenta = CveCuentaRetISRProveedor
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
' MsgError = "No se pudo insertar la póliza"
' End If
' End If
' End If
' End If
' Next
' ImporteMovimiento = 0
' End If
'Case 244 'Ret ISR Acreditable Terceros y Arrendamiento
' If RBLContado.SelectedValue = "5" Then
' For Each rw As GridViewRow In GvCompras.Rows
' If rw.FCCheckBox("Chk").Checked Then
' If rw.DataKey("CveRetISRConcepto").ToString.ToDecimal = 2 Then
' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal
' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra
' ImporteMX = ImporteMovimiento
' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento '* If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)
' End If
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
' ImporteMX = Math.Round(ImporteMX, 2)
' If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
' 'Conta ContPAQ
' If IdCtaContRetISRAcreditableProveedor > 0 Then
' IdCtaContable = IdCtaContRetISRAcreditableProveedor
' ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' 'Conta SIG
' If CveCuentaRetISRProveedor <> 0 Then
' CveCuenta = CveCuentaRetISRProveedor
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
' MsgError = "No se pudo insertar la póliza"
' End If
' End If
' End If
' End If
' Next
' ImporteMovimiento = 0
' End If
End If
'Case 16 'Ret ISR X Acreditar COMPRA
' If RBLContado.SelectedValue = "5" Then
' For Each rw As GridViewRow In GvCompras.Rows
' If rw.FCCheckBox("Chk").Checked Then
' If rw.DataKey("CveRetIVAConcepto").ToString.ToDecimal = 1 Then
' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal
' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra
' ImporteMX = ImporteMovimiento
' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal
' End If
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
' ImporteMX = Math.Round(ImporteMX, 2)
' If rw.DataKey("TipoCambio").ToString.ToDecimal > 1 Then ConceptoMovimiento += $" TC:{rw.DataKey("TipoCambio").ToString.ToDecimal} ${ImporteMovimiento.FormatoNumero(2)}"
' 'Conta ContPAQ
' If IdCtaContRetISRProveedor > 0 Then
' IdCtaContable = IdCtaContRetISRProveedor
' ElseIf UsuarioActual.Empresa.Funcionalidad(315).ToEntero > 0 Then
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(315).ToEntero
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' 'Conta SIG
' If CveCuentaRetISRProveedor <> 0 Then
' CveCuenta = CveCuentaRetISRProveedor
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
' MsgError = "No se pudo insertar la póliza"
' End If
' End If
' End If
' End If
' Next
' ImporteMovimiento = 0
' End If
'Case 23 'Ret ISR Acreditable COMPRA
' If RBLContado.SelectedValue = "5" Then
' For Each rw As GridViewRow In GvCompras.Rows
' If rw.FCCheckBox("Chk").Checked Then
' If rw.DataKey("CveRetIVAConcepto").ToString.ToDecimal = 1 Then
' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal
' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra
' ImporteMX = ImporteMovimiento
' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento '* If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)
' End If
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
' ImporteMX = Math.Round(ImporteMX, 2)
' If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
' 'Conta ContPAQ
' If IdCtaContRetISRAcreditableProveedor > 0 Then
' IdCtaContable = IdCtaContRetISRAcreditableProveedor
' ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(316).ToEntero
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' 'Conta SIG
' If CveCuentaRetISRProveedor <> 0 Then
' CveCuenta = CveCuentaRetISRProveedor
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
' MsgError = "No se pudo insertar la póliza"
' End If
' End If
' End If
' End If
' Next
' ImporteMovimiento = 0
' End If
'Case 243 'Ret ISR x Acreditar Terceros y Arrendamiento
' If RBLContado.SelectedValue = "5" Then
' For Each rw As GridViewRow In GvCompras.Rows
' If rw.FCCheckBox("Chk").Checked Then
' If rw.DataKey("CveRetISRConcepto").ToString.ToDecimal = 2 Then
' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal
' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra
' ImporteMX = ImporteMovimiento
' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal
' End If
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
' ImporteMX = Math.Round(ImporteMX, 2)
' If rw.DataKey("TipoCambio").ToString.ToDecimal > 1 Then ConceptoMovimiento += $" TC:{rw.DataKey("TipoCambio").ToString.ToDecimal} ${ImporteMovimiento.FormatoNumero(2)}"
' 'Conta ContPAQ
' If IdCtaContRetISRProveedor > 0 Then
' IdCtaContable = IdCtaContRetISRProveedor
' ElseIf UsuarioActual.Empresa.Funcionalidad(317).ToEntero > 0 Then
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(317).ToEntero
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' 'Conta SIG
' If CveCuentaRetISRProveedor <> 0 Then
' CveCuenta = CveCuentaRetISRProveedor
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then
' MsgError = "No se pudo insertar la póliza"
' End If
' End If
' End If
' End If
' Next
' ImporteMovimiento = 0
' End If
'Case 244 'Ret ISR Acreditable Terceros y Arrendamiento
' If RBLContado.SelectedValue = "5" Then
' For Each rw As GridViewRow In GvCompras.Rows
' If rw.FCCheckBox("Chk").Checked Then
' If rw.DataKey("CveRetISRConcepto").ToString.ToDecimal = 2 Then
' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal
' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra
' ImporteMX = ImporteMovimiento
' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento '* If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)
' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra)
' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)
' End If
' ImporteMovimiento = Math.Round(ImporteMovimiento, 2)
' ImporteMX = Math.Round(ImporteMX, 2)
' If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}"
' 'Conta ContPAQ
' If IdCtaContRetISRAcreditableProveedor > 0 Then
' IdCtaContable = IdCtaContRetISRAcreditableProveedor
' ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
' End If
' End If
' End If
' 'Conta SIG
' If CveCuentaRetISRProveedor <> 0 Then
' CveCuenta = CveCuentaRetISRProveedor
' Else
' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
' If ObjMov.DtResultados.Rows.Count > 0 Then
' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero
' End If
' End If
' End If
' If ImporteMovimiento > 0 Then
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then
' MsgError = "No se pudo insertar la póliza"
' End If
' End If
' End If
' End If
' Next
' ImporteMovimiento = 0
' End If
Case 14 'Iva por Acreditar COMPRA
If RBLContado.SelectedValue = "5" Then
For Each rw As GridViewRow In GvCompras.Rows

View File

@@ -711,6 +711,30 @@ Partial Class Bancos_ProveedoresAbonar
#Region " GUARDAR "
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
Dim ValFechaDocumento As Boolean = False
Dim FoliosFechasValFechaDocumento As New StringBuilder
FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha superior a la fecha de pago: <br/>")
For Each gvRowVal As GridViewRow In GvCxP.Rows
If gvRowVal.FCCheckBox("Chk").Checked Then
If gvRowVal.DataKey("Fecha").ToDate > TxtFechaDocumento.Text.ToDate Then
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }<br/>")
ValFechaDocumento = True
End If
End If
Next
If ValFechaDocumento Then
Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If DdlTipoTransaccion.SelectedValue.ToEntero < 0 Then
Alert("Seleccione un tipo de transacción", TipoMensaje.MsgAdvertencia)
Exit Sub

View File

@@ -3988,6 +3988,20 @@ Partial Class Compras_Compras
Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click
'------------------INICIA VALIDACIONES------------------
Dim TempIva As Decimal
For Each drowv As DataRow In TmpDT.Rows
TempIva = TempIva + (drowv("Total").ToString.ToDecimal * drowv("IVAPorcentaje").ToString.ToDecimal)
Next
Dim DifGenelraIvas As Decimal = (TxtIVA.Text.ToDecimal - TempIva)
If Math.Abs(DifGenelraIvas) > 0.2 Then
Alert($"Los importes no coinciden, error en calculo de IVA diferencia { DifGenelraIvas }", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim EstatusCredito As Integer = 0
Dim CveSubProyecto As Integer = 0
'Credito Multiple
@@ -4586,7 +4600,7 @@ Partial Class Compras_Compras
'End If
'METODO DE PREPOLIZA DE ALMACEN
If UsuarioActual.CveEmpresa.Contiene(1, 119, 72, 80, 140, 141, 152, 153, 159, 160, 161, 162, 163) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
If UsuarioActual.CveEmpresa.Contiene(1, 119, 72, 80, 140, 141, 152, 153, 154, 159, 160, 161, 162, 163) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
Dim ImporteAlmacen = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal
If ImporteAlmacen > 0 Then
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then

View File

@@ -244,7 +244,7 @@
<asp:TextBox ID="TxtTotal" runat="server" CssClass="form-control input-sm" Visible="false" MaxLength="12" Width="140px" placeholder="Total" Enabled="false" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
</div>
</div>
<div class="row" runat="server" id="rowComisiones" visible="false">
<div class="row" runat="server" >
<label class="col-md-2" runat="server" id="lblpagocomisiones">Otros Ingresos:</label>
<div class="col-md-3">
<asp:CheckBox ID="ChkAjusteOI" runat="server" AutoPostBack="true" />

View File

@@ -112,11 +112,11 @@ Partial Class Compras_ReembolsosComprobaciones
CbPermitirExcedente.Visible = False
End If
If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then
rowComisiones.Visible = True
End If
' If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then
'rowComisiones.Visible = True
' End If
If UsuarioActual.CveEmpresa = 119 Then
If UsuarioActual.CveEmpresa = 119 Then
ChkReembolsarSinBancos.Visible = True
End If

View File

@@ -1172,7 +1172,7 @@ Partial Class General_SaldosIniciales
Dim CveSATEstado As Integer = GlobalDTEstado("MEX").FiltroPrimeroValor("CveSATEstado", String.Format("NombreEstado ='{0}'", Estado)).ToEntero
If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, NumExt.ToString, "", Colonia, Poblacion, Poblacion, Estado, Pais, RFC, CodigoPostal, Telefono, Contacto, "", "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, PlazoCobranza, -1,
"-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", "", Codigo, LimiteCredito, "", 1, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación, CargoUsado:=CargoUsado,
"-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", Codigo, LimiteCredito, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación, CargoUsado:=CargoUsado,
BonificacionUsado:=BonificacionUsado, CobranzaContacto:=CobranzaContacto, CobranzaCorreo:=CobranzaCorreo, DiasEspecifico:=DiasPagoEspecifico, DiasRevision:=DìaVisita, CobranzaTelefono:=CobranzaTelefono, CveFormaPago33:=CveFormaPago33, CveUsoCFDI:=CveUsoCFDI, CveSATEstado:=CveSATEstado) Then
ErrorClientes = True
@@ -1398,7 +1398,7 @@ Partial Class General_SaldosIniciales
'If Not CveCliente > 0 Then Alert(String.Format("No se encontró el cliente con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorVentas = True : RFC.GuardaLog : Exit For
TipoDocto = IIf(TipoDocto.Contiene("INGRESO", "INGRESOS"), "Ing", IIf(TipoDocto = "EGRESO", "Egs", "Rem")).ToString
TipoDocto = IIf(TipoDocto.Contiene("INGRESO", "INGRESOS"), "Ing", IIf(TipoDocto.Contiene("EGRESO", "EGRESOS"), "Egs", "Rem")).ToString
'PrePóliza
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Venta/SaldoInicial", 1, Total, Total, 1, Fecha, String.Format("{0}-{1}", Serie, Folio), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
@@ -1410,8 +1410,9 @@ Partial Class General_SaldosIniciales
End If
'Moneda
If Moneda.ToUpper.Contiene("PESOS", "PESO", "MN") Then
If Moneda.ToUpper.Contiene("PESOS", "PESO", "MXN") Then
CveMoneda = 1
TipoCambio = "1"
ElseIf Moneda.ToUpper.Contiene("DÓLARES", "DOLARES", "USD") Then
CveMoneda = 2
End If
@@ -1460,12 +1461,20 @@ Partial Class General_SaldosIniciales
End If
End If
Dim UsaComplementaria As Boolean = False
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaComplementaria = True
'PrePólizaDetalle
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SubTotal, Folio.ToString, 4, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=Sucursal.ToEntero) Then ErrorVentas = True : Exit For
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, ConceptoContable, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total) Then ErrorVentas = True : Exit For
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, Folio.ToString, 13, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IVA, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For
'If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio.ToString, 38, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS) Then ErrorVentas = True : Exit For
If UsaComplementaria Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, 203, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteME:=Total, ImporteMX:=Total * TipoCambio.ToDecimal, TipoCambio:=TipoCambio.ToDecimal) Then ErrorVentas = True : Exit For
End If
'Saldo
If Saldo < Total Then

View File

@@ -864,7 +864,7 @@ Partial Class Inventarios_ResguardoMaterial
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
Dim CveSeccionAlmacen As Integer = 0
Importe = ObjInventario.DtResultados.SUMD("Total").RoundSQL
Importe = ObjInventario.DtResultados.SUMD("Total").RoundAD
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
If CBool(Dr("AplicaSeccion")) Then
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestino.SelectedValue.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
@@ -929,7 +929,7 @@ Partial Class Inventarios_ResguardoMaterial
Else
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
Cont = 0
Importe = ObjInventario.DtResultados.SUMD("Total").RoundSQL
Importe = ObjInventario.DtResultados.SUMD("Total").RoundAD
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
Dim CveSeccionAlmacen As Integer = DiccionarioSecciones(Dr("CveMovimientoDetalle").ToString.ToEntero).ToString.ToEntero
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString) Then

View File

@@ -121,6 +121,9 @@ public partial class OI_Tablero : ClsPaginas
{
CargaTablero();
this.Alert("El Tablero Se ha Eliminado");
}else
{
this.Alert("El Tablero Se ha Eliminado", ModExtensiones.TipoMensaje.MsgAdvertencia);
}
}
protected void LnkTableros_Click(object sender, EventArgs e)

View File

@@ -90,7 +90,7 @@ Partial Class CatRoles
If Array.Length = 2 Then
Dim ObjPermisos As New ClsSisRoles()
ViewState("CveRol") = Array(0).ToEntero
If ObjPermisos.GetRolesModulos(Array(0).ToEntero, -1) Then
If ObjPermisos.GetRolesModulos(Array(0).ToEntero, -1, 1, UsuarioActual.CveEmpresa) Then
GvPermisos.DataSource = ObjPermisos.DtResultados.FiltraParametros("AGRUPACION ='N'")
Else
GvPermisos.DataSource = Nothing

View File

@@ -76,7 +76,7 @@ Partial Class Sistemas_PermisosPorUsuario
UsuarioControlado = False
End If
Dim ObjRoles As New ClsSisRoles
If ObjRoles.GetRolesModulos(-1, -1) Then
If ObjRoles.GetRolesModulos(-1, -1, 1, UsuarioActual.CveEmpresa) Then
DTRolesModulos = ObjRoles.DtResultados
End If
ObjRoles.Dispose()

View File

@@ -92,7 +92,7 @@ Partial Class Sistemas_RolesDetalle
Private Sub CargaGridPermisos()
Dim ObjPermisos As New ClsSisRoles()
If ObjPermisos.GetRolesModulos(CveRol, -1) Then
If ObjPermisos.GetRolesModulos(CveRol, -1, 1, UsuarioActual.CveEmpresa) Then
GvPermisos.DataSource = ObjPermisos.DtResultados.FiltraParametros("AGRUPACION ='N'")
Else
GvPermisos.DataSource = Nothing

View File

@@ -2941,7 +2941,7 @@ Partial Class Sistemas_UsuarioDetalle
#Region "TAB - ACCESO MODULOS"
Public Sub CargaModulosAcceso()
Dim ObjPermisos As New ClsSisUsuarios
If ObjPermisos.GetUsuariosModulos(CveUsuario, UsuarioActual.CveEmpresa, If(UsuarioControlado, UsuarioActual.CveUsuario, -1)) Then
If ObjPermisos.GetUsuariosModulos(CveUsuario, UsuarioActual.CveEmpresa, If(UsuarioControlado, UsuarioActual.CveUsuario, -1), CvePlataforma:=1) Then
DTModulos = ObjPermisos.DtResultados.FiltraParametros("Liga <> '' ")
Else
DTModulos = Nothing

View File

@@ -316,12 +316,14 @@
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField Visible="false">
<%--<asp:TemplateField Visible="false">
<HeaderTemplate>CIE</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlCIE" runat="server" Text='<%# Eval("ConvenioCIE") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</asp:TemplateField>--%>
<asp:TemplateField Visible="false" ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>Calle</HeaderTemplate>
<ItemTemplate>
@@ -441,7 +443,7 @@
</tr>
<tr>
<td style="text-align: left">
<asp:CheckBox ID="ChkCIE" runat="server" Text="CIE" /></td>
<%--<asp:CheckBox ID="ChkCIE" runat="server" Text="CIE" /></td>--%>
<td style="text-align: left">
<asp:CheckBox ID="ChkCalle" runat="server" Text="Calle" /></td>
</tr>

View File

@@ -163,11 +163,11 @@ Partial Class CatClientes
GvDatos.Columns(21).Visible = ChkRetISR.Checked
GvDatos.Columns(22).Visible = ChkPlazoCobranza.Checked
GvDatos.Columns(23).Visible = ChkLimiteCredito.Checked
GvDatos.Columns(24).Visible = ChkCIE.Checked
GvDatos.Columns(25).Visible = ChkCalle.Checked
GvDatos.Columns(26).Visible = ChkCelular.Checked
GvDatos.Columns(27).Visible = ChkCorreoCotizacion.Checked
GvDatos.Columns(28).Visible = ChkOtroTelefono.Checked
'GvDatos.Columns(24).Visible = ChkCIE.Checked
GvDatos.Columns(24).Visible = ChkCalle.Checked
GvDatos.Columns(25).Visible = ChkCelular.Checked
GvDatos.Columns(26).Visible = ChkCorreoCotizacion.Checked
GvDatos.Columns(27).Visible = ChkOtroTelefono.Checked
CargaDatos()

View File

@@ -906,27 +906,27 @@
</div>
</div>
<div class="portlet-body form">
<div class="form-group form-md-line-input">
<%-- <div class="form-group form-md-line-input">
<asp:TextBox ID="TxtConvenioCIE" CssClass="form-control" runat="server" MaxLength="50" Enabled="false"></asp:TextBox>
<label for="<%= TxtConvenioCIE.ClientID.ToString()%>">Convenio CIE:</label>
</div>
</div>--%>
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtReferenciaFiscal" CssClass="form-control" runat="server" Enabled="false"></asp:TextBox>
<label for="<%= TxtReferenciaFiscal.ClientID.ToString()%>">Referencia:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<%-- <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNumCtaPago" CssClass="form-control" runat="server" MaxLength="30" Enabled="false"></asp:TextBox>
<label for="<%= TxtNumCtaPago.ClientID.ToString()%>">Número de cuenta de Pago: </label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
</div>--%>
<%-- <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlMetodoPago" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPago" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlMetodoPago.ClientID.ToString()%>">Método de Pago:</label>
<asp:RequiredFieldValidator ID="RFVMetodoPago" runat="server" ControlToValidate="DdlMetodoPago" CssClass="help-block" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Método de Pago''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<i></i>
</div>
</div>--%>
<div id="DivRetenciones" runat="server">
<div class="row">
<div class="col-md-6">

View File

@@ -1242,10 +1242,10 @@ Partial Class Clientes
End Sub
Private Sub CargaMetodosPago()
DdlMetodoPago.DataSource = GlobalDTMetodosPago.FiltraParametros("Estatus = 'Activo'", "ClaveSAT") '.FiltraParametros("CveMetodoPago > 0 ")
'DdlMetodoPago.DataSource = GlobalDTMetodosPago.FiltraParametros("Estatus = 'Activo'", "ClaveSAT") '.FiltraParametros("CveMetodoPago > 0 ")
DdlMetodoPagoSucursal.DataSource = GlobalDTMetodosPago.FiltraParametros("Estatus = 'Activo'", "ClaveSAT")
DdlMetodoPagoSucursal.DataBind()
DdlMetodoPago.DataBind()
'DdlMetodoPago.DataBind()
End Sub
Private Sub CargaPrecioLista()
DdlPrecioLista.DataSource = GlobalDTPrecioListas(UsuarioActual.CveEmpresa)
@@ -1495,10 +1495,8 @@ Partial Class Clientes
IdCtaAnticipos = ObjClientes.IdCtaContAnticipos.ToString
IdCtaRetIVA = ObjClientes.IdCtaContRetIVA.ToString
IdCtaRetISR = ObjClientes.IdCtaContRetISR.ToString
IdCtaFondoGarantia = ObjClientes.IdCtaContFondoGarantia.ToString
TxtConvenioCIE.Text = ObjClientes.ConvenioCIE
TxtNumCtaPago.Text = ObjClientes.NumCtaPago
DdlMetodoPago.SelectedValue = ObjClientes.CveMetodoPago.ToString
IdCtaFondoGarantia = ObjClientes.IdCtaContFondoGarantia.ToString
'DdlMetodoPago.SelectedValue = ObjClientes.CveMetodoPago.ToString
TxtFormaFacturacion.Text = ObjClientes.FormaFacturacion
ChkPermiteCredito.Checked = ObjClientes.PermiteCredito
TxtLimiteCredito.Text = ObjClientes.LimiteCredito.FormatoNumero
@@ -2515,10 +2513,10 @@ Partial Class Clientes
End If
End If
Dim MetodoPago = DdlMetodoPago.SelectedValue.ToEntero
If UsuarioActual.Empresa.CvePlataforma = 3 Then
MetodoPago = 1
End If
'Dim MetodoPago = DdlMetodoPago.SelectedValue.ToEntero
'If UsuarioActual.Empresa.CvePlataforma = 3 Then
' MetodoPago = 1
'End If
Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "")
@@ -2529,7 +2527,7 @@ Partial Class Clientes
DiasPago, DdlTipoPago.SelectedValue, DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero,
DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableFondoGarantia.SelectedValue.ToEntero,
DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableCompClientes.SelectedValue.ToEntero, DdlCtaContableCompClientes.SelectedItem.Text, DdlCtaContableCompAnticipos.SelectedValue.ToEntero, DdlCtaContableCompAnticipos.SelectedItem.Text,
TxtConvenioCIE.Text.Trim, TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, TxtNumCtaPago.Text.Trim, MetodoPago, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim,
TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim,
TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim, ChkAplicaDetallista.Checked, TxtDet_GLNComprador.Text.Trim, TxtDet_Departamento.Text.Trim, TxtDet_GLNVendedor.Text.Trim, TxtDet_NumProveedor.Text.Trim, TxtProveedor.Text.Trim, ChkAplicaFord.Checked, TxtFordGSDB.Text.Trim,
TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero, DdlCorporativo.SelectedValue.ToEntero,
CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero, CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero,
@@ -2624,7 +2622,7 @@ Partial Class Clientes
DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero, DdlCtaContableAnticipos.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero,
DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableFondoGarantia.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableCompClientes.SelectedValue.ToEntero, DdlCtaContableCompClientes.SelectedItem.Text, DdlCtaContableCompAnticipos.SelectedValue.ToEntero, DdlCtaContableCompAnticipos.SelectedItem.Text,
DdlMonedaExtranjeraClientes.SelectedValue.ToEntero, DdlMonedaExtranjeraClientes.SelectedItem.Text, DdlMonedaExtranjeraAnticipos.SelectedValue.ToEntero, DdlMonedaExtranjeraAnticipos.SelectedItem.Text,
TxtConvenioCIE.Text.Trim, TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, TxtNumCtaPago.Text.Trim, DdlMetodoPago.SelectedValue.ToEntero, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim, TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim,
TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim, TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim,
ChkAplicaDetallista.Checked, TxtDet_GLNComprador.Text.Trim, TxtDet_Departamento.Text.Trim, TxtDet_GLNVendedor.Text.Trim, TxtDet_NumProveedor.Text.Trim, TxtProveedor.Text.Trim, ChkAplicaFord.Checked, TxtFordGSDB.Text.Trim, UsuarioActual.CveUsuario,
CveCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero, DdlCorporativo.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero, CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero,
CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero, ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero, CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), CobranzaExt:=TxtCobranzaExt.Text,
@@ -6122,7 +6120,7 @@ Partial Class Clientes
End If
If TxtNumeroCuenta2.Text.Trim.Length = 0 AndAlso TxtCLABE.Text.Trim.Length = 0 AndAlso TxtSWIFT.Text.Trim.Length = 0 AndAlso TxtConvenioCIE.Text.Trim.Length = 0 Then
If TxtNumeroCuenta2.Text.Trim.Length = 0 AndAlso TxtCLABE.Text.Trim.Length = 0 AndAlso TxtSWIFT.Text.Trim.Length = 0 Then
Alert("Debe especificar al menos un numero de cuenta.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
@@ -9458,9 +9456,9 @@ Partial Class Clientes
ObjFactura.Fecha = Now
ObjFactura.CvePrePoliza = -1
ObjFactura.CveMetodoPago = DdlMetodoPago.SelectedValue.ToEntero
ObjFactura.MetodoPago = DdlMetodoPago.SelectedItem.Text
ObjFactura.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {DdlMetodoPago.SelectedValue}")
'ObjFactura.CveMetodoPago = DdlMetodoPago.SelectedValue.ToEntero
'ObjFactura.MetodoPago = DdlMetodoPago.SelectedItem.Text
'ObjFactura.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {DdlMetodoPago.SelectedValue}")
ObjFactura.FechaVencimiento = TxtFechaPago.Text.ToDate
ObjFactura.CveMetodoPago33 = DdlMetodoPago33.SelectedValue.ToEntero

View File

@@ -652,6 +652,32 @@ Partial Class Ventas_ClientesAbonar
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
Dim ValFechaDocumento As Boolean = False
Dim FoliosFechasValFechaDocumento As New StringBuilder
FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha superior a la fecha de pago: <br/>")
For Each gvRowVal As GridViewRow In GvCxC.Rows
If gvRowVal.FCCheckBox("Chk").Checked Then
If gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy").ToDate > TxtFechaDocumento.Text.ToDate Then
FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") } <br/>")
ValFechaDocumento = True
End If
End If
Next
If ValFechaDocumento Then
Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not TxtImporte.Text.ToDecimal > 0 Then
Alert("Debe de llevar un Importe", TipoMensaje.MsgAdvertencia)
Exit Sub

View File

@@ -2451,7 +2451,7 @@ Partial Class PV
End If
If CveVenta <= 0 Then
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString.ToEntero
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString)
DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString)
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33.ToString)
@@ -2624,7 +2624,7 @@ Partial Class PV
End If
If CveVenta <= 0 Then
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString.ToEntero
DdlMetodoPago.SelectedValueExist(CveMetodoPagoCliente.ToString)
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)

View File

@@ -1588,14 +1588,16 @@ Partial Class Ventas
ViewState("EstatusCliente") = value
End Set
End Property
Private Property CveMetodoPagoCliente As Integer
Get
Return ViewState("CveMetodoPagoCliente").ToString().ToEntero()
End Get
Set(value As Integer)
ViewState("CveMetodoPagoCliente") = value
End Set
End Property
'Private Property CveMetodoPagoCliente As Integer
' Get
' Return ViewState("CveMetodoPagoCliente").ToString().ToEntero()
' End Get
' Set(value As Integer)
' ViewState("CveMetodoPagoCliente") = value
' End Set
'End Property
Private Property Modalidad As String
Get
Return ViewState("Modalidad").ToString()
@@ -2047,7 +2049,7 @@ Partial Class Ventas
ImprimeNombreSucursal = False
RegistraScript("SetDisabledTxtTotal(true);")
TrVistaPrevia.Visible = False
CveMetodoPagoCliente = 1
'CveMetodoPagoCliente = 1
CveAlmacenExistenciasContrato = -1
UpFacturar.Update()
'CargaTiposDocumentos()
@@ -5454,7 +5456,7 @@ Partial Class Ventas
If CveCliente = 239903 AndAlso UsuarioActual.CveEmpresa = 119 Then
DdlMetodoPago33.Enabled = False
ObjCliente.CveMetodoPago = 1 ' PUE, y que no se pueda modificar
'ObjCliente.CveMetodoPago = 1 ' PUE, y que no se pueda modificar
Else
DdlMetodoPago33.Enabled = True
End If
@@ -5462,7 +5464,7 @@ Partial Class Ventas
Dim CveCotizacion As Integer = IfNull(ViewState("CveCotizacion"), 0).ToString().ToEntero()
If (CveVenta <= 0 AndAlso CveCotizacion <= 0) Or EsCreaApartirDe Or NuevaFactura = 1 Then
CveMetodoPagoCliente = ObjCliente.CveMetodoPago
'CveMetodoPagoCliente = ObjCliente.CveMetodoPago
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33)
@@ -6214,7 +6216,7 @@ Partial Class Ventas
End If
If CveVenta <= 0 Then
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString().ToEntero()
'CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString().ToEntero()
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString())
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
@@ -6246,7 +6248,7 @@ Partial Class Ventas
Dim CveCotizacion As Integer = IfNull(ViewState("CveCotizacion"), 0).ToString().ToEntero()
If CveVenta <= 0 AndAlso CveCotizacion <= 0 Then
CveMetodoPagoCliente = ObjCliente.CveMetodoPago
'CveMetodoPagoCliente = ObjCliente.CveMetodoPago
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33)
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)

View File

@@ -178,8 +178,6 @@