This commit is contained in:
2022-02-08 21:18:04 -07:00
6 changed files with 77 additions and 38 deletions

View File

@@ -237,6 +237,31 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function UpdatePrePolizasOrdenamiento(CvePrePoliza As Integer, CveEmpresa As Integer) As Integer
FolioPoliza = -1
Dim Retorno As Integer = -1
DataAdapter("PA_Conta_PrePolizas_Ordenamiento")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePrePoliza", SqlDbType.VarChar).Value = CvePrePoliza
.Add("@CveEmpresa", SqlDbType.Bit).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Catch ex As Exception
OnError("Ocurrió un error al actualziar el ordenamientio", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
''' <summary>
''' Actualiza la IdPoliza de una PrePoliza
''' </summary>

View File

@@ -2042,7 +2042,9 @@ Public Class ClsPaginas
ObjVendedores.Dispose()
End If
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0} AND CveEstatus = {1} AND VendedorTipo = {2}", CveEmpresa, If(Estatus, 1, 0), VendedorTipo), "", DataViewRowState.CurrentRows)
GlobalDTVendedores = Dv.ToTable
Dv.Dispose()
Else
@@ -6582,7 +6584,7 @@ Public Class ClsPaginas
params.Add(New CrystalParametro("LogoPath", LogoRuta))
'VENDEDOR
Dim RowVendedor As DataRow = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
Dim RowVendedor As DataRow = GlobalDTVendedores(-1).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
If Not IsNothing(RowVendedor) Then
params.Add(New CrystalParametro("VendedorNombre", RowVendedor("Vendedor").ToString))
params.Add(New CrystalParametro("VendedorMail", RowVendedor("Correo").ToString))
@@ -7168,7 +7170,7 @@ Public Class ClsPaginas
Dim VendedorTelefono As String = ""
Dim VendedorCelular As String = ""
Dim RowVendedor As DataRow = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
Dim RowVendedor As DataRow = GlobalDTVendedores(-1).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
If Not IsNothing(RowVendedor) Then
VendedorNombre = RowVendedor("Vendedor").ToString

View File

@@ -233,14 +233,14 @@ Partial Class Bancos_RepEgresosSinComprobante
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now,
"Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1,
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, IdCtaContable, -1,
gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal) Then
MsgError = "Ocurrio un error al saldar el movimiento"
Exit For
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero,
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, gr.DataKey("CveIE").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=gr.DataKey("CveSubProyecto").ToEntero) Then
MsgError = "Ocurrio un error al saldar el movimiento"
Exit For

View File

@@ -1107,7 +1107,7 @@ Partial Class Compras_ReembolsosComprobaciones
'Otros Ingresos
If ChkAjusteOI.Checked Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 78, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, UsuarioActual.Empresa.IdCuentaOtrosIngresos, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
End If
End If

View File

@@ -493,7 +493,12 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
'DtMovimientos.DefaultView.Sort = "OrdenPP"
'DtMovimientos = DtMovimientos.DefaultView.ToTable
GvPrePoliza.DataSource = DtMovimientos
@@ -2971,23 +2976,28 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
Catch ex As Exception
MsgError = "Error"
End Try
End Try
If MsgError = "" Then
If Not ObjMov.UpdatePrePolizasOrdenamiento(CvePrePoliza, UsuarioActual.CveEmpresa) Then
MsgError = "Orror al ordenar polzia"
End If
End If
If MsgError = "" Then
Alert(If(MensajeAlert.ToString = "", $"Se registro con exito. {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}", $"Se registro con exito. {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")} <br>" & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePoliza}""")
ObjIE.Commit()
If Conta IsNot Nothing Then Conta.Commit()
UPPDocumento.Update()
TxtConcepto.Text = ""
GvMov.DataBind()
ObjIE.Commit()
If Conta IsNot Nothing Then Conta.Commit()
UPPDocumento.Update()
TxtConcepto.Text = ""
GvMov.DataBind()
TxtFechaDocumento.Text = ""
Else

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSet1">
@@ -1185,7 +1185,7 @@
<TextRun>
<Value>=Fields!Fecha.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<Format>d</Format>
<Language>es-MX</Language>
</Style>
@@ -1222,7 +1222,7 @@
<TextRun>
<Value>=Parameters!TipoPoliza.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1256,7 +1256,7 @@
<TextRun>
<Value>=Parameters!Numero.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1292,7 +1292,7 @@
<TextRun>
<Value>=Fields!ConceptoPoliza.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1331,7 +1331,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1368,7 +1368,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1405,7 +1405,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1442,7 +1442,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1482,7 +1482,7 @@
<TextRun>
<Value>=RowNumber("Fecha")</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1514,7 +1514,7 @@
<TextRun>
<Value>=Fields!Referencia.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1544,7 +1544,7 @@
<TextRun>
<Value>=Fields!Codigo.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<Format>#-####</Format>
</Style>
</TextRun>
@@ -1575,7 +1575,7 @@
<TextRun>
<Value>=Fields!CodigoCuenta.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1611,7 +1611,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1643,7 +1643,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1673,6 +1673,7 @@
<TextRun>
<Value>=Fields!Cargo.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00;(#,0.00);''</Format>
<Language>es-MX</Language>
</Style>
@@ -1704,6 +1705,7 @@
<TextRun>
<Value>=Fields!Abono.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00;(#,0.00);''</Format>
<Language>es-MX</Language>
</Style>
@@ -1742,7 +1744,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1774,7 +1776,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1806,7 +1808,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1836,7 +1838,7 @@
<TextRun>
<Value>=Fields!Concepto.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1870,7 +1872,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1902,7 +1904,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1934,7 +1936,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
<Language>es-MX</Language>
</Style>
</TextRun>
@@ -1967,7 +1969,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
<Language>es-MX</Language>
</Style>
</TextRun>