Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -3425,6 +3425,7 @@ Public Class ClsBancos
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -262,6 +262,8 @@ Public Class ClsCompras
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert(String.Format("Ya existe una compra con el mismo Folio: {0}-{1}.", Serie, Folio), TipoMensaje.MsgAdvertencia)
|
||||
ElseIf Ex1.Message.Contains("UK_Comp_Compras_CveFactura") Then
|
||||
Alert(String.Format("La factura {0}-{1} ya se encuentra registrada.", Serie, Folio), TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al Guardar la Compra.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
|
||||
@@ -3533,7 +3533,16 @@ Public Class ClsPaginas
|
||||
If ObjPersonal.GetPersonal(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjPersonal.DtResultados
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
GlobalDTRHPersonal = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
|
||||
|
||||
Dim Str As New StringBuilder
|
||||
|
||||
If CvePersonal <> -1 Then Str.Append($" CvePersonal = {CvePersonal}")
|
||||
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
'GlobalDTRHPersonal = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
GlobalDTRHPersonal = Dv.ToTable
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTRHPersonal-{CveEmpresa}"
|
||||
@@ -8072,6 +8081,7 @@ Public Class ClsPaginas
|
||||
Dim tFechaUltimaFluctuacion As Date
|
||||
Dim tImportePago, tImporteVenta As Decimal
|
||||
Dim CveConceptoContableComplementaria As Integer = 207
|
||||
Dim Contabilizable As Boolean = True
|
||||
If PorcentajePago > 1 Then PorcentajePago = 1
|
||||
Pago.CveConceptoPago = If(Pago.CveConceptoPago = -1, 2, Pago.CveConceptoPago) 'si viene en parametro lo toma com primera opcion, sino el 2
|
||||
If VentaActual.CveMoneda <> 1 Then
|
||||
@@ -8088,7 +8098,8 @@ Public Class ClsPaginas
|
||||
TCValuacion = UltimaFluctuacion.TCFluctuacion
|
||||
End If
|
||||
If VentaActual.Fecha < tFechaUltimaFluctuacion Then TCValuacionVenta = TCValuacion
|
||||
If Pago.Fecha < tFechaUltimaFluctuacion Then TCValuacionPago = TCValuacion
|
||||
'si tiene fecha de documento, debe de evaluarse para su tc. y no la fecha de la prepóliza
|
||||
If IIf(Pago.FechaDocumentoRelacionado > MinFecha, Pago.FechaDocumentoRelacionado, Pago.Fecha).ToString.ToDate < tFechaUltimaFluctuacion Then TCValuacionPago = TCValuacion
|
||||
End If
|
||||
End If
|
||||
If VentaActual.CveMoneda = 1 And Pago.CveMonedaPago <> 1 Then 'factura pesos, pago en dolares
|
||||
@@ -8102,11 +8113,34 @@ Public Class ClsPaginas
|
||||
tImportePago = (Pago.ImportePago * TCValuacionPago).RoundSQL
|
||||
End If
|
||||
If VentaActual.CveMoneda > 1 Then ImporteME = Pago.ImportePagoVenta
|
||||
'CONDICION ESPECIAL, PARA ANTICIPOS ESPECIALES, QUE SE EMITE LA VENTA, PERO NO SE CONTABILIZA, EL TRATAMIENTO SE LLEVA POR EL ANTICIPO
|
||||
If VentaActual.TipoDocto = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then
|
||||
Pago.AplicaTraslado = False
|
||||
Dim IdCtaContable As Integer = VentaActual.IdCtaContableClienteAnticipo
|
||||
If VentaActual.CveMoneda = 2 Then IdCtaContable = VentaActual.IdCtaContableClienteAnticipoExtranjera
|
||||
Contabilizable = False
|
||||
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
'Agregamos la Extranjera
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 295, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoExtranjera, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, 227, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoComplementaria, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
Else
|
||||
'Agregamos Nacional
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 3, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipo, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
|
||||
End If
|
||||
|
||||
If Not ErrorMovtos AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 95, VentaActual.SerieFolio, VentaActual.SerieFolio, IdCtaContable, CveIE:=Pago.CveIE, CveVenta:=VentaActual.CveVenta, CveSubProyecto:=VentaActual.CveSubProyecto, CveCliente:=VentaActual.CveCliente, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then
|
||||
ErrorMovtos = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'movimiento de pago cliente
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, Pago.ImportePagoVenta, Pago.CveConceptoPago, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, Pago.ImportePagoVenta, Pago.CveConceptoPago, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, Contabilizable:=Contabilizable) Then ErrorMovtos = True
|
||||
'movimiento de pago cliente Complementaria
|
||||
If Not ErrorMovtos AndAlso VentaActual.CveMoneda > 1 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, (ImporteME * TCValuacionVenta - ImporteME).RoundSQL, CveConceptoContableComplementaria, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, (ImporteME * TCValuacionVenta - ImporteME).RoundSQL, CveConceptoContableComplementaria, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, Contabilizable:=Contabilizable) Then ErrorMovtos = True
|
||||
End If
|
||||
If Pago.AplicaTraslado Then
|
||||
'si tiene iva y su proporcion
|
||||
@@ -8272,6 +8306,7 @@ Public Class ClsPaginas
|
||||
Public Property CveVenta As Integer = -1
|
||||
Public Property CveCliente As Integer
|
||||
Public Property CveMoneda As Integer
|
||||
Public Property TipoDocto As String
|
||||
Public Property Fecha As Date
|
||||
Public Property SerieFolio As String = ""
|
||||
Public Property ClienteNombre As String = ""
|
||||
|
||||
@@ -825,7 +825,21 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
End If
|
||||
Next
|
||||
|
||||
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 5, CveBitacora, UsuarioActual.CveEmpresa)
|
||||
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 5, CveBitacora, UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
If Not ErrorRegistrar Then
|
||||
|
||||
If Conta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||
If Conta.ValorPolizaDescuadre > 0 Then
|
||||
ErrorRegistrar = True
|
||||
GuardaLogAD($"Banc/FluctuaA | Error:{Conta.MensajePolizaDescuadre} Diferencia:{Conta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
End If
|
||||
Else
|
||||
Alert("No se pudo validar la prepoliza de cuadre.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Not ErrorRegistrar Then
|
||||
Conta.Commit()
|
||||
|
||||
@@ -1042,8 +1042,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero)
|
||||
|
||||
|
||||
Dim tCveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero).FiltroPrimeroValor("CveMoneda").ToEntero
|
||||
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, tFolio,
|
||||
gvr.DataKey("ContadoBeneficiario"), gvr.DataKey("ContadoImporte").ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones"), "",
|
||||
gvr.DataKey("ContadoBeneficiario"), gvr.DataKey("ContadoImporte").ToDecimal, tCveMoneda, 0, gvr.DataKey("ContadoObservaciones"), "",
|
||||
False, False, 0, CvePrePolizaInsertada, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveIE < 0 Then
|
||||
MsgError = "No se pudo registrar movimiento bancario"
|
||||
|
||||
@@ -478,6 +478,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
@@ -487,6 +488,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
|
||||
params.Add(New ReportParameter("CveMoneda", DdlMoneda.SelectedValue))
|
||||
params.Add(New ReportParameter("Cuenta", Cuenta))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)
|
||||
|
||||
End Sub
|
||||
Protected Sub DdlTipoCuentas_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoCuentas.SelectedIndexChanged
|
||||
If DdlTipoCuentas.SelectedValue.ToEntero = -2 Then
|
||||
|
||||
@@ -842,70 +842,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox10">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>JOC</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox9</rd:DefaultName>
|
||||
<Top>1.36525cm</Top>
|
||||
<Left>5.21284cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>0.88604cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox11">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>FLR</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox9</rd:DefaultName>
|
||||
<Top>1.36525cm</Top>
|
||||
<Left>7.41418cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>0.88604cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox12">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
@@ -928,7 +864,7 @@
|
||||
<Left>14.00924cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.5cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -961,7 +897,7 @@
|
||||
<Left>18.00832cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.36771cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
|
||||
@@ -842,70 +842,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox10">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>JOC</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox9</rd:DefaultName>
|
||||
<Top>1.36525cm</Top>
|
||||
<Left>5.21284cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>0.88604cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox11">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>FLR</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox9</rd:DefaultName>
|
||||
<Top>1.36525cm</Top>
|
||||
<Left>7.41418cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>0.88604cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox12">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
@@ -928,7 +864,7 @@
|
||||
<Left>14.00924cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.5cm</Width>
|
||||
<ZIndex>3</ZIndex>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -961,7 +897,7 @@
|
||||
<Left>18.00832cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Width>2.36771cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
|
||||
@@ -1890,6 +1890,9 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim CveConceptoContable As Integer = 260
|
||||
Dim CveClasificacion As Integer = -1
|
||||
Select Case DdlConcepto.SelectedValue.ToEntero
|
||||
Case 2
|
||||
CveConceptoContable = 78
|
||||
EsContabilizable = True
|
||||
Case 28, 31
|
||||
CveConceptoContable = 51
|
||||
|
||||
@@ -1919,6 +1922,9 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
'2-78
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, tValorInventario, TxtObservaciones.Text.Trim, 68, TxtObservaciones.Text.Trim, TxtFecha.Text.ToDate, idCtaContable, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=tValorInventario, CveClasificacion:=CveClasificacion, Contabilizable:=EsContabilizable) Then
|
||||
ErrorMovInv = True
|
||||
Else
|
||||
@@ -1941,6 +1947,19 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
ErrorMovInv = True
|
||||
GuardaLogAD($"Inv/ES | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
Alert("No se pudo validar la prepoliza de cuadre.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
Alert("No se pudo validar la prepoliza de cuadre.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
'------------------------------------------------
|
||||
If Not ErrorMovInv Then
|
||||
'DEVENGAR
|
||||
@@ -2076,7 +2095,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
|
||||
|
||||
If Not ErrorAC And Not ErrorMovInv Then
|
||||
If Not ErrorAC And Not ErrorMovInv Then
|
||||
|
||||
Dim Msg As New StringBuilder
|
||||
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b><a href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a></b>", ObjInventario.Folio, CveMovimiento)
|
||||
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
|
||||
@@ -151,7 +151,10 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Private Sub OcultarControles(CvePersonal As Integer)
|
||||
|
||||
DdlPersonal.SelectedValue = CvePersonal.ToString()
|
||||
DdlPersonal.SelectedText = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal).FiltroPrimeroValor("NombreCompleto")
|
||||
DdlPersonal.SelectedText = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal).FiltroPrimeroValor("NombreCompleto", $" CvePersonal = {CvePersonal}")
|
||||
|
||||
|
||||
|
||||
DdlPersonal.Enabled = False
|
||||
DVTipo.Visible = False
|
||||
End Sub
|
||||
|
||||
@@ -36,6 +36,14 @@ Partial Class Ventas_ClientesAbonar
|
||||
ViewState("CveMonedaFiltro") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaIngreso As Date
|
||||
Get
|
||||
Return ViewState("FechaIngreso").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaIngreso") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveSubProyecto As Integer
|
||||
Get
|
||||
Return ViewState("CveSubProyecto").ToString.ToEntero
|
||||
@@ -855,7 +863,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveProveedorIntermediario:=CveProvIntermediario)
|
||||
Else
|
||||
If RblTipoPago.SelectedValue.Contiene("3") Then
|
||||
If RblTipoPago.SelectedValue.Contiene("3") Then 'ixc
|
||||
CveIE = DdlIngreso.SelectedValue.ToEntero
|
||||
If CveMonedaPago = 2 And Not ChkPagarPesos.Checked Then CveMoneda = 2
|
||||
If ChkPagarDolares.Checked Then CveMoneda = 2
|
||||
@@ -957,6 +965,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
VentaActual.Fecha = gvr.DataKey("Fecha").ToDate
|
||||
VentaActual.CveCliente = gvr.DataKey("CveCliente").ToEntero
|
||||
VentaActual.CveMoneda = gvr.DataKey("CveMoneda").ToEntero
|
||||
VentaActual.TipoDocto = gvr.DataKey("TipoDocto")
|
||||
VentaActual.SerieFolio = gvr.DataKey("SerieFolio")
|
||||
VentaActual.ClienteNombre = NombreComercial
|
||||
VentaActual.TC = gvr.DataKey("TipoCambio").ToDecimal
|
||||
@@ -981,34 +990,37 @@ Partial Class Ventas_ClientesAbonar
|
||||
Pago.ImportePagoVenta = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||
Pago.Referencia = TxtFolio.Text
|
||||
|
||||
If RblTipoPago.SelectedValue = "3" Then Pago.TipoPago = "I"
|
||||
If RblTipoPago.SelectedValue = "3" Then
|
||||
Pago.TipoPago = "I"
|
||||
Pago.FechaDocumentoRelacionado = FechaIngreso
|
||||
End If
|
||||
|
||||
'Tipos de cambio
|
||||
If Pago.CveMonedaPago = 1 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
|
||||
Pago.TCPago = TxtTC.Text.ToDecimal
|
||||
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
||||
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
||||
Pago.TCPago = IIf(TxtTCDolaresDolares.Visible, TxtTCDolaresDolares.Text.ToDecimal, TxtTCDolares.Text.ToDecimal)
|
||||
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||
Pago.TCPago = TxtTCDolares.Text.ToDecimal
|
||||
End If
|
||||
tipoCambioPago = Pago.TCPago
|
||||
|
||||
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal
|
||||
|
||||
If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then
|
||||
EsAnticipoEspecial = True
|
||||
Pago.AplicaTraslado = False
|
||||
Dim IdCtaContable As Integer = If(EsAnticipoEspecial, IdCtaAnticipo, IdCuentaCliente)
|
||||
If VentaActual.CveMoneda = 2 Then IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaExtranjeraAnticipo, IdCtaContMonedaExtranjera)
|
||||
'If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then
|
||||
' EsAnticipoEspecial = True
|
||||
' Pago.AplicaTraslado = False
|
||||
' Dim IdCtaContable As Integer = If(EsAnticipoEspecial, IdCtaAnticipo, IdCuentaCliente)
|
||||
' If VentaActual.CveMoneda = 2 Then IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaExtranjeraAnticipo, IdCtaContMonedaExtranjera)
|
||||
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 3, VentaActual.SerieFolio, VentaActual.SerieFolio, IdCtaContable, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 95, VentaActual.SerieFolio, VentaActual.SerieFolio, IdCtaContable, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
Else
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
End If
|
||||
End If
|
||||
' If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 3, VentaActual.SerieFolio, VentaActual.SerieFolio, IdCtaContable, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 95, VentaActual.SerieFolio, VentaActual.SerieFolio, IdCtaContable, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then
|
||||
' MsgError = "No se pudo insertar la póliza"
|
||||
' End If
|
||||
' Else
|
||||
' MsgError = "No se pudo insertar la póliza"
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(590) = "1" AndAlso MsgError = "" Then '' si es empresa agrícola
|
||||
Dim FluctuacionAnticipo As Decimal = 0
|
||||
@@ -2714,6 +2726,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim Deudores As New ClsMovimientos
|
||||
If Deudores.GetIngresosSaldosDetalle(CveCliente, -1, UsuarioActual.CveEmpresa) Then
|
||||
HdnIngresoImporte.Value = Deudores.DtResultados.FiltroPrimeroValor("Saldo", String.Format("CveIE = {0}", DdlIngreso.SelectedValue))
|
||||
TxtTCDolares.Text = Deudores.DtResultados.FiltroPrimeroValor("TipoCambio", String.Format("CveIE = {0}", DdlIngreso.SelectedValue))
|
||||
FechaIngreso = Deudores.DtResultados.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE = {0}", DdlIngreso.SelectedValue))
|
||||
End If
|
||||
Deudores.Dispose()
|
||||
End If
|
||||
|
||||
@@ -600,10 +600,10 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
|
||||
//
|
||||
|
||||
if (e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23)
|
||||
{
|
||||
e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
||||
}
|
||||
//if (e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23)
|
||||
//{
|
||||
// e.Row.FCLinkButton("LnkValidarRefac").Visible = false;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user