-- option explicit
-- repie, filtro por usuario
This commit is contained in:
@@ -1765,8 +1765,8 @@ Partial Class Bancos_IE
|
||||
|
||||
#Region " GUARDAR - ACTUALIZAR "
|
||||
Private Function ValidaGuardar() As Boolean
|
||||
Dim EsValido = True
|
||||
Dim PagueseA = ""
|
||||
Dim EsValido As Boolean = True
|
||||
Dim PagueseA As String = ""
|
||||
If HdnCveCliente.Value.ToEntero > 0 Then
|
||||
PagueseA = DdlCliente.SelectedText.ToString()
|
||||
ElseIf HdnCveProveedor.Value.ToEntero > 0 Then
|
||||
@@ -1798,7 +1798,7 @@ Partial Class Bancos_IE
|
||||
|
||||
Dim Dep As New ClsGenerales
|
||||
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor) Then
|
||||
Dim Row = Dep.DtResultados.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
|
||||
Dim Row As DataRow = Dep.DtResultados.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
|
||||
If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then
|
||||
Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia)
|
||||
EsValido = False
|
||||
@@ -2019,7 +2019,6 @@ Partial Class Bancos_IE
|
||||
|
||||
'*****-_- TERMINA: CONFIGURACION REGISTRO -_-*****
|
||||
|
||||
|
||||
Dim FolioFijo As Integer = 0
|
||||
Dim tCveMoneda As Integer = CveMoneda
|
||||
Dim tImporteMonedaExtranjera As Decimal = TxtImporte.Text.ToDecimal
|
||||
@@ -2028,7 +2027,7 @@ Partial Class Bancos_IE
|
||||
tImporteMonedaExtranjera = (TxtImporte.Text.ToDecimal * GlobalTipoCambio(TxtFechaDocumento.Text.Trim.ToDate).ToString.ToDecimal).RoundSQL
|
||||
tImporteMonedaME = TxtImporte.Text.ToDecimal
|
||||
End If
|
||||
Dim PagueseA = ""
|
||||
Dim PagueseA As String = ""
|
||||
|
||||
If HdnCveCliente.Value.ToEntero > 0 Then
|
||||
PagueseA = DdlCliente.SelectedText.ToString()
|
||||
@@ -2123,7 +2122,7 @@ Partial Class Bancos_IE
|
||||
ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal), -(TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal), 66, Ref, Conc, CveIE:=CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteME:=tImporteMonedaExtranjera)
|
||||
|
||||
If TxtIvaIxC.Text.ToDouble > 0 Then
|
||||
Dim PorcentajeIVA = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2)
|
||||
Dim PorcentajeIVA As Decimal = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2)
|
||||
'Iva
|
||||
ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -TxtIvaIxC.Text.ToDecimal, -TxtIvaIxC.Text.ToDecimal, 61, Ref, Conc, CveIE:=CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=If(PorcentajeIVA.ToString().Contiene("0.08", "0.16"), PorcentajeIVA, 0))
|
||||
End If
|
||||
@@ -2215,8 +2214,6 @@ Partial Class Bancos_IE
|
||||
importeMX = importeMovimiento
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Case 50
|
||||
If RBL.SelectedValue = "DP" AndAlso CveProveedor > 0 Then
|
||||
importeMovimiento = TxtImporte.Text.ToDecimal
|
||||
@@ -2232,7 +2229,7 @@ Partial Class Bancos_IE
|
||||
If DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDecimal <> 0 Then
|
||||
Dim CveConIVA As Integer = 61
|
||||
If UsuarioActual.CveEmpresa = 70 Then CveConIVA = 299
|
||||
Dim PorcentajeIVA = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2)
|
||||
Dim PorcentajeIVA As Decimal = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2)
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, TxtIvaIxC.Text.ToDecimal, CveConIVA, Concepto, Concepto, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=PorcentajeIVA) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||
End If
|
||||
@@ -2244,9 +2241,7 @@ Partial Class Bancos_IE
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, (importeMovimiento * TC - importeMovimiento).RoundSQL, 226, Concepto, Concepto, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteME:=importeMovimiento, TipoCambio:=TC) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Case 30
|
||||
@@ -2274,18 +2269,16 @@ Partial Class Bancos_IE
|
||||
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Case "DevDinV"
|
||||
Dim ImporteAplicar = 0.0D
|
||||
Dim ImporteAplicarMN = 0.0D
|
||||
Dim ImporteAplicarME = 0.0D
|
||||
Dim ReferenciaAplicar = ObjIE.Folio
|
||||
Dim ConceptoAplicar = $"Devolución al cliente {PagueseA} {TxtImporte.Text} NC:{SerieFolioDevDin}"
|
||||
Dim ImporteAplicar As Decimal = 0.0D
|
||||
Dim ImporteAplicarMN As Decimal = 0.0D
|
||||
Dim ImporteAplicarME As Decimal = 0.0D
|
||||
Dim ReferenciaAplicar As String = ObjIE.Folio
|
||||
Dim ConceptoAplicar As String = $"Devolución al cliente {PagueseA} {TxtImporte.Text} NC:{SerieFolioDevDin}"
|
||||
|
||||
ImporteAplicar = TxtImporte.Text.ToDecimal
|
||||
ImporteAplicarME = ImporteAplicar
|
||||
@@ -2343,9 +2336,9 @@ Partial Class Bancos_IE
|
||||
|
||||
'IMPUESTOS
|
||||
If ObjMov.GetPrePolizasDetalle(CvePrePolizaDevDin, UsuarioActual.CveEmpresa) Then
|
||||
Dim PorcentajePagoDevDin = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6)
|
||||
Dim CveConceptoContableAplicar = -1
|
||||
Dim TipoMovtoAplicar = False
|
||||
Dim PorcentajePagoDevDin As Decimal = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6)
|
||||
Dim CveConceptoContableAplicar As Integer = -1
|
||||
Dim TipoMovtoAplicar As Boolean = False
|
||||
|
||||
For Each Dr As DataRow In ObjMov.DtResultados.FiltraParametros("CveConceptoContable IN (13,8,9,38)").Rows
|
||||
Dim PorcentajeImpuesto As Decimal = Dr("PorcentajeImpuesto").ToString.ToDecimal()
|
||||
@@ -2379,13 +2372,13 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
Case "DevDinC"
|
||||
Dim ImporteAplicar = 0.0D
|
||||
Dim ImporteAplicarMN = 0.0D
|
||||
Dim ImporteAplicarME = 0.0D
|
||||
Dim ReferenciaAplicar = ObjIE.Folio
|
||||
Dim ImporteAplicar As Decimal = 0.0D
|
||||
Dim ImporteAplicarMN As Decimal = 0.0D
|
||||
Dim ImporteAplicarME As Decimal = 0.0D
|
||||
Dim ReferenciaAplicar As String = ObjIE.Folio
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
|
||||
Dim ConceptoAplicar = $"Devolución de Proveedor {PagueseA} {TxtImporte.Text} NC:{SerieFolioDeCDin}"
|
||||
Dim ConceptoAplicar As String = $"Devolución de Proveedor {PagueseA} {TxtImporte.Text} NC:{SerieFolioDeCDin}"
|
||||
|
||||
ImporteAplicar = TxtImporte.Text.ToDecimal
|
||||
ImporteAplicarME = ImporteAplicar
|
||||
@@ -2502,17 +2495,13 @@ Partial Class Bancos_IE
|
||||
MsgError = "Ocurrió un error al registrar el asiento de perdidada cfambiaria"
|
||||
Exit Select
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'IMPUESTOS
|
||||
|
||||
Dim PorcentajePagoDevDin = (ImporteAplicar / ImporteAplicar).RoundSQL(6)
|
||||
Dim CveConceptoContableAplciar = -1
|
||||
Dim PorcentajePagoDevDin As Decimal = (ImporteAplicar / ImporteAplicar).RoundSQL(6)
|
||||
Dim CveConceptoContableAplciar As Integer = -1
|
||||
'Dim TipoMovtoAplicar = False
|
||||
|
||||
|
||||
@@ -2799,7 +2788,7 @@ Partial Class Bancos_IE
|
||||
'BANCOS COMPLEMENTARIA
|
||||
If tCveMoneda > 1 And UsaComplementariaBancos Then
|
||||
Dim ImporteAplicar As Decimal = TxtImporte.Text.ToDecimal
|
||||
Dim ImporteAplicarMN = (ImporteAplicar * TxtTipoCambio.Text.ToDecimal - ImporteAplicar).RoundSQL()
|
||||
Dim ImporteAplicarMN As Decimal = (ImporteAplicar * TxtTipoCambio.Text.ToDecimal - ImporteAplicar).RoundSQL()
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteAplicar, ImporteAplicarMN, 204, Ref, Conc, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=tImporteMonedaME, TipoCambio:=TxtTipoCambio.Text.ToDecimal) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
|
||||
End If
|
||||
@@ -2907,7 +2896,7 @@ Partial Class Bancos_IE
|
||||
'End If
|
||||
|
||||
If MsgError = "" Then
|
||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||
If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
' MsgError = ObjMov.MensajePolizaDescuadre
|
||||
GuardaLogAD($"Bancos/IE | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
@@ -2989,12 +2978,12 @@ Partial Class Bancos_IE
|
||||
Alert("El Documento se guardo correctamente", TipoMensaje.MsgInformacion, "document.location.href=""../Inicio.aspx""")
|
||||
Else
|
||||
If ChkAplicaViatico.Checked Then
|
||||
Dim SerieFolio = $"VIA-{Folio}"
|
||||
Dim SerieFolio As String = $"VIA-{Folio}"
|
||||
Msg.Clear()
|
||||
Msg.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=DesXmlVIA&SERIEFOLIO={0}&TIPO={1}", SerieFolio, "Viaticos")))
|
||||
End If
|
||||
|
||||
Dim AccionJS = ""
|
||||
Dim AccionJS As String = ""
|
||||
|
||||
If Opcion = "DevDinV" Then
|
||||
AccionJS = $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}"";"
|
||||
@@ -3346,10 +3335,10 @@ Partial Class Bancos_IE
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ErrorCancelar = False
|
||||
Dim MensajeError = ""
|
||||
Dim IdPolizaNueva = -1
|
||||
Dim FolioPolizaNueva = -1
|
||||
Dim ErrorCancelar As Boolean = False
|
||||
Dim MensajeError As String = ""
|
||||
Dim IdPolizaNueva As Integer = -1
|
||||
Dim FolioPolizaNueva As Integer = -1
|
||||
Dim MensajeLog As String = ""
|
||||
|
||||
Dim Banc As New ClsBancos
|
||||
@@ -3523,7 +3512,7 @@ Partial Class Bancos_IE
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Error al cancelar complemento de pago"
|
||||
Else
|
||||
Dim FolioCancelado = $"{TxtFolio.Text}_C_{Banc.DtResultados(0)("Cantidad").ToString().ToEntero + 1}"
|
||||
Dim FolioCancelado As String = $"{TxtFolio.Text}_C_{Banc.DtResultados(0)("Cantidad").ToString().ToEntero + 1}"
|
||||
If Not Banc.UpdateFolioCancelado(CveIE.ToEntero, Folio:=FolioCancelado) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Error al actualizar complemento de pago"
|
||||
|
||||
Reference in New Issue
Block a user