This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-09-22 20:16:00 -07:00
50 changed files with 3137 additions and 2091 deletions

View File

@@ -4760,4 +4760,25 @@ Public Class ClsBancos
#End Region #End Region
#Region "reportes"
Public Function GetPagosNoBancarios(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1, Optional CvePersonal As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Banc_PagosNoBancarios")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los pagos no bancarios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#End Region
End Class End Class

View File

@@ -1863,6 +1863,7 @@ Public Class ClsInventarios
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen .Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing) .Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing)
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveCliente", SqlDbType.Int).Value = CveCliente

View File

@@ -1188,13 +1188,12 @@ Public Class ClsMovimientos
Return Retorno Return Retorno
End Function End Function
Public Function GetCxPDetalle(FechaI As String, FechaF As String, CveProveedor As Integer, CveProveedorClasificacion As Integer, Public Function GetCxPDetalle(FechaI As String, FechaF As String, CveProveedor As Integer, CveProveedorClasificacion As Integer, CveProveedorSucursal As Integer, CveUsuario As Integer,
CveProveedorSucursal As Integer, CveUsuario As Integer, CveUsuarioResponsable As Integer, Anio As Integer, Mes As Integer, AnioMes As String, CveMoneda As Integer, CveSubProyecto As Integer,
CveUsuarioResponsable As Integer, CveEstatusFactura As Integer, Fecha As String, Agrupador As Integer, Opcion As String, CveEmpresa As Integer, CveSucursal As Integer,
Anio As Integer, Mes As Integer, AnioMes As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEstatusFactura As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional FechaVI As String = "-1", Optional FechaVF As String = "1",
Fecha As String, Agrupador As Integer, Opcion As String, CveEmpresa As Integer, CveSucursal As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional CveTipoProveedor As Integer = -1,
Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional Comprobaciones As Integer = -1, Optional AplicaNC As Integer = -1) As Boolean
Optional CveUsuarioConsulta As Integer = -1, Optional CveTipoProveedor As Integer = -1, Optional Comprobaciones As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
If FechaCorte = Nothing Then FechaCorte = Now If FechaCorte = Nothing Then FechaCorte = Now
@@ -1227,6 +1226,7 @@ Public Class ClsMovimientos
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor .Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
.Add("@Comprobaciones", SqlDbType.Int).Value = Comprobaciones .Add("@Comprobaciones", SqlDbType.Int).Value = Comprobaciones
.Add("@AplicaNC", SqlDbType.Int).Value = AplicaNC
End With End With
Try Try

View File

@@ -145,9 +145,18 @@
<div class="col-md-1"> <div class="col-md-1">
<h5>TC:<asp:Literal runat="server" ID="LtTipoCambioActual"></asp:Literal></h5> <h5>TC:<asp:Literal runat="server" ID="LtTipoCambioActual"></asp:Literal></h5>
</div> </div>
<div class="col-md-3"> <div class="col-md-2">
<asp:TextBox ID="TxtConceptoFluctuacion" runat="server"></asp:TextBox> <asp:TextBox ID="TxtConceptoFluctuacion" runat="server"></asp:TextBox>
</div> </div>
<div class="col-md-2" style="width: 80px;" runat="server" id="LiSubProyectoLbl">
<asp:Label runat="server" ID="LblSubProyecto"></asp:Label>
</div>
<div class="col-md-1 " runat="server" id="LiSubProyectoDdl">
<asp:DropDownList ID="DdlSubproyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" Style="max-width: 200px !important;">
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
<div class="portlet-body"> <div class="portlet-body">

View File

@@ -19,6 +19,7 @@ Partial Class Bancos_FluctuacionCambiaria
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
CargarCentrosDeCosto(Nothing, DdlSubproyecto, Nothing, LblSubProyecto)
CargaUltimaFluctuacion() CargaUltimaFluctuacion()
End If End If
End Sub End Sub
@@ -225,6 +226,12 @@ Partial Class Bancos_FluctuacionCambiaria
#Region "FLUCTUACION COMPRAS" #Region "FLUCTUACION COMPRAS"
Protected Sub BtnGeneraCompras_Click(sender As Object, e As EventArgs) Protected Sub BtnGeneraCompras_Click(sender As Object, e As EventArgs)
If DdlSubproyecto.SelectedValue.ToEntero < 0 Then
Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim Total As Decimal = 0 Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad Dim Conta As New ClsContabilidad
Conta.IniciaTransacSQL() Conta.IniciaTransacSQL()
@@ -245,7 +252,6 @@ Partial Class Bancos_FluctuacionCambiaria
IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230 IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230
Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias
Total = LblTotal.ToDecimal Total = LblTotal.ToDecimal
If Total > 0 Then If Total > 0 Then
CveConceptoContable = 64 CveConceptoContable = 64
@@ -258,7 +264,10 @@ Partial Class Bancos_FluctuacionCambiaria
idCta = idCtaPerdida idCta = idCtaPerdida
TipoMovto = False TipoMovto = False
End If End If
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta) Then
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubproyecto.SelectedValue.ToEntero) Then
ErrorRegistrar = True ErrorRegistrar = True
End If End If
@@ -291,6 +300,13 @@ Partial Class Bancos_FluctuacionCambiaria
#Region "FLUCTUACION VENTAS" #Region "FLUCTUACION VENTAS"
Protected Sub BtnGeneraVentas_Click(sender As Object, e As EventArgs) Protected Sub BtnGeneraVentas_Click(sender As Object, e As EventArgs)
If DdlSubproyecto.SelectedValue.ToEntero < 0 Then
Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim Total As Decimal = 0 Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad Dim Conta As New ClsContabilidad
Conta.IniciaTransacSQL() Conta.IniciaTransacSQL()
@@ -323,7 +339,7 @@ Partial Class Bancos_FluctuacionCambiaria
idCta = idCtaPerdida idCta = idCtaPerdida
TipoMovto = False TipoMovto = False
End If End If
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta) Then If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubproyecto.SelectedValue.ToEntero) Then
ErrorRegistrar = True ErrorRegistrar = True
End If End If
@@ -361,6 +377,13 @@ Partial Class Bancos_FluctuacionCambiaria
#Region "FLUCTUACION BANCOS" #Region "FLUCTUACION BANCOS"
Protected Sub BtnGeneraBancos_Click(sender As Object, e As EventArgs) Protected Sub BtnGeneraBancos_Click(sender As Object, e As EventArgs)
If DdlSubproyecto.SelectedValue.ToEntero < 0 Then
Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim Total As Decimal = 0 Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad Dim Conta As New ClsContabilidad
Conta.IniciaTransacSQL() Conta.IniciaTransacSQL()
@@ -417,7 +440,7 @@ Partial Class Bancos_FluctuacionCambiaria
Exit For Exit For
End If End If
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta) Then If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubproyecto.SelectedValue.ToEntero) Then
ErrorRegistrar = True ErrorRegistrar = True
End If End If
End If End If
@@ -453,6 +476,13 @@ Partial Class Bancos_FluctuacionCambiaria
#Region "FLUCTUACION DEUDOR" #Region "FLUCTUACION DEUDOR"
Protected Sub BtnGeneraDedudores_Click(sender As Object, e As EventArgs) Protected Sub BtnGeneraDedudores_Click(sender As Object, e As EventArgs)
If DdlSubproyecto.SelectedValue.ToEntero < 0 Then
Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim Total As Decimal = 0 Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad Dim Conta As New ClsContabilidad
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL()) Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
@@ -493,7 +523,7 @@ Partial Class Bancos_FluctuacionCambiaria
idCta = idCtaPerdida idCta = idCtaPerdida
TipoMovto = False TipoMovto = False
End If End If
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, ConceptoFluctuacion, Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta) Then If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, ConceptoFluctuacion, Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubproyecto.SelectedValue.ToEntero) Then
ErrorRegistrar = True ErrorRegistrar = True
End If End If
@@ -527,6 +557,11 @@ Partial Class Bancos_FluctuacionCambiaria
Protected Sub BtnGeneraFiliales_Click(sender As Object, e As EventArgs) Protected Sub BtnGeneraFiliales_Click(sender As Object, e As EventArgs)
If DdlSubproyecto.SelectedValue.ToEntero < 0 Then
Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim Total As Decimal = 0 Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad Dim Conta As New ClsContabilidad
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL()) Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
@@ -571,7 +606,7 @@ Partial Class Bancos_FluctuacionCambiaria
idCta = idCtaPerdida idCta = idCtaPerdida
TipoMovto = False TipoMovto = False
End If End If
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, ConceptoFluctuacion, Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta) Then If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, ConceptoFluctuacion, Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubproyecto.SelectedValue.ToEntero) Then
ErrorRegistrar = True ErrorRegistrar = True
End If End If
@@ -622,6 +657,12 @@ Partial Class Bancos_FluctuacionCambiaria
Protected Sub BtnGeneraAcreedores_Click(sender As Object, e As EventArgs) Protected Sub BtnGeneraAcreedores_Click(sender As Object, e As EventArgs)
If DdlSubproyecto.SelectedValue.ToEntero < 0 Then
Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim Total As Decimal = 0 Dim Total As Decimal = 0
Dim Conta As New ClsContabilidad Dim Conta As New ClsContabilidad
Conta.IniciaTransacSQL() Conta.IniciaTransacSQL()
@@ -655,7 +696,7 @@ Partial Class Bancos_FluctuacionCambiaria
idCta = idCtaPerdida idCta = idCtaPerdida
TipoMovto = False TipoMovto = False
End If End If
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta) Then If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), " ", CveConceptoContable, "Fluctuación", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubproyecto.SelectedValue.ToEntero) Then
ErrorRegistrar = True ErrorRegistrar = True
End If End If

View File

@@ -2696,6 +2696,8 @@ Partial Class Bancos_IE
MsgError = "No se pudo insertar la póliza de saldo inicial." MsgError = "No se pudo insertar la póliza de saldo inicial."
End If End If
End If End If
Dim UsaComplementariaBancos As Boolean = False
If UsuarioActual.CveEmpresa = 119 Then UsaComplementariaBancos = True
If MsgError = "" Then If MsgError = "" Then
@@ -2887,14 +2889,18 @@ Partial Class Bancos_IE
importeMovimiento = TxtImporte.Text.ToDecimal importeMovimiento = TxtImporte.Text.ToDecimal
importeMX = importeMovimiento importeMX = importeMovimiento
If tCveMoneda > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then If tCveMoneda > 1 AndAlso UsaComplementariaBancos Then
'Agregamos complementaria 'Agregamos complementaria
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso." MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If End If
Else
If tCveMoneda > 1 Then
Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal
importeMX = (importeMovimiento * TC).RoundSQL
End If
End If End If
End Select End Select

View File

@@ -451,6 +451,23 @@ Partial Class Bancos_PopIECompras
End Set End Set
End Property End Property
Private Property CveSubProyecto As Integer
Get
If ViewState("CveSubProyecto") Is Nothing Then
Return -1
Else
Return ViewState("CveSubProyecto").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CveSubProyecto") = value
End Set
End Property
#End Region #End Region
@@ -668,6 +685,8 @@ Partial Class Bancos_PopIECompras
TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal
NombreProveedor = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", String.Format("CveProveedor = {0}", CveProveedor)) NombreProveedor = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", String.Format("CveProveedor = {0}", CveProveedor))
CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero
LtlTitulo.Text = "Cuentas por Pagar" LtlTitulo.Text = "Cuentas por Pagar"
LtlTipo2.Text = "Folio de la Compra" LtlTipo2.Text = "Folio de la Compra"
LtlTipo3.Text = "Fecha de la Compra" LtlTipo3.Text = "Fecha de la Compra"
@@ -1475,6 +1494,7 @@ Partial Class Bancos_PopIECompras
Dim CvePrePoliza As Integer = ObjMov.AddPrePolizas("Bancos/PopIECompras", CvePlantillaPoliza, ImportePagado, ImportePagado, CveMoneda, Fecha, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=CveTipoPoliza) Dim CvePrePoliza As Integer = ObjMov.AddPrePolizas("Bancos/PopIECompras", CvePlantillaPoliza, ImportePagado, ImportePagado, CveMoneda, Fecha, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=CveTipoPoliza)
If Inserta Then If Inserta Then
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
'SE AGREGA DETALLE DE UNA COMPRA 'SE AGREGA DETALLE DE UNA COMPRA
@@ -1534,6 +1554,9 @@ Partial Class Bancos_PopIECompras
'inserto las compras que voy a pagar 'inserto las compras que voy a pagar
If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
For Each Row As DataRow In ObjMov.DtResultados.Rows For Each Row As DataRow In ObjMov.DtResultados.Rows
Dim CveSubProyectoInsertar As Integer = -1
Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero
TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False) TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False)
Dim ImporteMovimiento As Decimal = 0 Dim ImporteMovimiento As Decimal = 0
@@ -2704,6 +2727,14 @@ Partial Class Bancos_PopIECompras
End If End If
End If End If
Case 64 'Ganancia Case 64 'Ganancia
CveSubProyectoInsertar = CveSubProyecto
If CveSubProyectoInsertar <= 0 Then
MsgError = "No se pudo obtener el sub proyecto o centro de costo"
End If
If CveMoneda <> 1 OrElse CveMonedaCompra <> 1 Then If CveMoneda <> 1 OrElse CveMonedaCompra <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
@@ -2723,6 +2754,13 @@ Partial Class Bancos_PopIECompras
ImporteMovimiento = 0 ImporteMovimiento = 0
End If End If
Case 65 'Perdida Case 65 'Perdida
CveSubProyectoInsertar = CveSubProyecto
If CveSubProyectoInsertar <= 0 Then
MsgError = "No se pudo obtener el sub proyecto o centro de costo"
End If
If CveMoneda <> 1 OrElse CveMonedaCompra <> 1 Then If CveMoneda <> 1 OrElse CveMonedaCompra <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
@@ -3331,7 +3369,11 @@ Partial Class Bancos_PopIECompras
' CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
'End If 'End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, -1, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, If(ConceptoContable = 30, TxtFolio.Text.Trim, TxtObservaciones.Text), ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, CveIE, -1, CveCompra, CveSubProyecto:=CveSubProyectoInsertar, CveProveedor:=CveProveedor2, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=TimpocambioGeneral, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeImpuesto) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If

View File

@@ -3146,6 +3146,7 @@ Partial Class Bancos_ProveedoresAbonar
If gr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor If gr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor
Dim ConceptoPartida As String = String.Format("Saldar compra {0}", gr.DataKey("SerieFolio").ToString) Dim ConceptoPartida As String = String.Format("Saldar compra {0}", gr.DataKey("SerieFolio").ToString)
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ProveedoresAbonar/Saldar", 98, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, TxtFechaIncobrable.Text.ToDate, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ProveedoresAbonar/Saldar", 98, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, TxtFechaIncobrable.Text.ToDate, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveMoneda > 1 AndAlso (IdCtaContComplementaria > 0 Or UsuarioActual.CveEmpresa = 119) Then If CveMoneda > 1 AndAlso (IdCtaContComplementaria > 0 Or UsuarioActual.CveEmpresa = 119) Then
@@ -3223,15 +3224,23 @@ Partial Class Bancos_ProveedoresAbonar
If CveMoneda > 1 Then If CveMoneda > 1 Then
Dim ImporteFluctuacion As Decimal = 0 Dim ImporteFluctuacion As Decimal = 0
ImporteFluctuacion = Saldo * (TCPago - TCCompra) ImporteFluctuacion = Saldo * (TCPago - TCCompra)
If CveSubProyecto <= 0 Then
MsgError = "No se pudo obtener el sub proyecto o centro de costo"
End If
If TCCompra > TCPago Then If TCCompra > TCPago Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
Else Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
End If End If
End If End If

View File

@@ -77,7 +77,8 @@
<asp:UpdatePanel ID="UpDevolucionAlmacen" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDevolucionAlmacen" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<li id="LiDevolucionAlmacen" runat="server" visible="false"> <li id="LiDevolucionAlmacen" runat="server" visible="false">
<asp:LinkButton Text="Solicitar Devolución" OnClick="LBDevolucionAlmacen_Click" ID="LBDevolucionAlmacen" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de solicitar la Devolución de Almacén?" data-btn-ok-label="si" /> <%--<asp:LinkButton Text="Solicitar Devolución" OnClick="LBDevolucionAlmacen_Click" ID="LBDevolucionAlmacen" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de solicitar la Devolución de Almacén?" data-btn-ok-label="si" />--%>
<asp:LinkButton ID="HplDevv" OnClick="LBDevolucionAlmacen_Click" runat="server"><i class='fa fa-plus'></i> Solicitar Devolución</asp:LinkButton>
</li> </li>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -4966,6 +4967,44 @@
</div> </div>
</div> </div>
<div id="DivDevolucion" class="modal fade">
<div class="modal-dialog">
<asp:UpdatePanel ID="UPPSolDev" runat="server" class="modal-content rowpadding" tabindex="-1" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header">
<h4>
Productos a devolver
</h4>
</div>
<div class="modal-body">
<div class="row">
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:GridView ID="GvSolDev" runat="server" AutoGenerateColumns="false" GridLines="none" BorderWidth="0" DataKeyNames="CveCompraDetalle,CvePS" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn">
<Columns>
<asp:TemplateField ItemStyle-Width="55px" HeaderText="Cant">
<ItemTemplate>
<asp:TextBox ID="TxtCant" runat="server" Text='<%#Eval("Cantidad") %>' Width="50px" ></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="UM" headertext="UM" />
<asp:BoundField DataField="CodigoPS" headertext="Producto" />
</Columns>
</asp:GridView>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnDevolucion" runat="server" Text="Solicitar Devolución" OnClick="BtnDevolucion_Click" ClientIDMode="Static" CssClass="btn btn-success" />
<button type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<%-- MODAL FLETES E IMPORTACIONES --%> <%-- MODAL FLETES E IMPORTACIONES --%>
<div id="ModalFletesImportaciones" class="modal ADS fade" role="dialog"> <div id="ModalFletesImportaciones" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalFletesImportaciones" UpdateMode="Conditional"> <asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalFletesImportaciones" UpdateMode="Conditional">

View File

@@ -3896,6 +3896,7 @@ Partial Class Compras_Compras
'------------------INICIA VALIDACIONES------------------ '------------------INICIA VALIDACIONES------------------
Dim EstatusCredito As Integer = 0 Dim EstatusCredito As Integer = 0
Dim CveSubProyecto As Integer = 0
'Credito Multiple 'Credito Multiple
If RBLPago.SelectedValue.ToEntero = 4 Then If RBLPago.SelectedValue.ToEntero = 4 Then
@@ -4062,11 +4063,14 @@ Partial Class Compras_Compras
' Dim NotHas117 As Boolean = Not UsuarioActual.TienePermisoProceso(117) ' Dim NotHas117 As Boolean = Not UsuarioActual.TienePermisoProceso(117)
' 'verifica que tenga proyecto y clasificacion ' 'verifica que tenga proyecto y clasificacion
For Each Row As DataRow In TmpDT.Rows For Each Row As DataRow In TmpDT.Rows
If Row("CveSubProyecto").ToString.ToEntero <= 0 Then If Row("CveSubProyecto").ToString.ToEntero <= 0 Then
Alert("No se ha completado la asignacion de proyectos en la compra. ", TipoMensaje.MsgAdvertencia) Alert("No se ha completado la asignacion de proyectos en la compra. ", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
CveSubProyecto = Row("CveSubProyecto").ToString.ToEntero
If Row("CveClasificacionActualizar").ToString.ToEntero <= 0 Then 'If NotHas117 AndAlso Row("CveClasificacionActualizar").ToString.ToEntero <= 0 Then If Row("CveClasificacionActualizar").ToString.ToEntero <= 0 Then 'If NotHas117 AndAlso Row("CveClasificacionActualizar").ToString.ToEntero <= 0 Then
Alert("Hay productos que no tienen clasificación asignada.<br> Favor de asignarle una y darle guardar.", TipoMensaje.MsgAdvertencia) Alert("Hay productos que no tienen clasificación asignada.<br> Favor de asignarle una y darle guardar.", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
@@ -5690,6 +5694,8 @@ Partial Class Compras_Compras
For Each Row As DataRow In DTPlatilla.Rows For Each Row As DataRow In DTPlatilla.Rows
Dim CveSubProyectoInsertar As Integer = -1
Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero
Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False) Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False)
Dim importeMovimiento As Decimal = 0 Dim importeMovimiento As Decimal = 0
@@ -6291,6 +6297,15 @@ Partial Class Compras_Compras
' End If ' End If
' End If ' End If
Case 64 'Ganancia Case 64 'Ganancia
CveSubProyectoInsertar = CveSubProyecto
If CveSubProyectoInsertar <= 0 Then
ErrorPrepoliza = True
Alert("Concepto ganancia cambiaria sin sub proyecto", TipoMensaje.MsgAdvertencia)
End If
If TCPago > 0 AndAlso TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then If TCPago > 0 AndAlso TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
@@ -6307,6 +6322,12 @@ Partial Class Compras_Compras
Case 65 'Perdida Case 65 'Perdida
CveSubProyectoInsertar = CveSubProyecto
If CveSubProyectoInsertar <= 0 Then
ErrorPrepoliza = True
Alert("Concepto perdida cambiaria sin sub proyecto", TipoMensaje.MsgAdvertencia)
End If
If TCPago > 0 AndAlso TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then If TCPago > 0 AndAlso TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
@@ -6597,11 +6618,17 @@ Partial Class Compras_Compras
'SumatoriaOCINV = -SumatoriaOCINV 'SumatoriaOCINV = -SumatoriaOCINV
Dim CveClasificacionCostoOC = TmpDT.FiltroPrimeroValor("CveClasificacion", "ISNULL(TipoAF, 0) <> 2 And ISNULL(CveAlmacen, 0) = 0 And ISNULL(AplicaCostoIndirecto, 0) <> 1 And ISNULL(CveTipoPS, 0) = 2").ToEntero Dim CveClasificacionCostoOC = TmpDT.FiltroPrimeroValor("CveClasificacion", "ISNULL(TipoAF, 0) <> 2 And ISNULL(CveAlmacen, 0) = 0 And ISNULL(AplicaCostoIndirecto, 0) <> 1 And ISNULL(CveTipoPS, 0) = 2").ToEntero
Dim CveSubProyecto As Integer = TmpDT.MAX("CveSubProyecto").ToEntero Dim CveSubProyecto69 As Integer = TmpDT.MAX("CveSubProyecto").ToEntero
If CveSubProyecto69 <= 0 Then
Alert("Debe de asignar un sub proyecto o centro de constos", TipoMensaje.MsgAdvertencia)
ErrorPrepoliza = True
Exit For
End If
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {CveClasificacionCostoOC}").ToString.ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SumatoriaOCINV, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveClasificacion:=CveClasificacionCostoOC, ImporteMX:=SumatoriaOCINV, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SumatoriaOCINV, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveClasificacion:=CveClasificacionCostoOC, ImporteMX:=SumatoriaOCINV, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
@@ -6717,10 +6744,10 @@ Partial Class Compras_Compras
Dim IdCtaContableDescCompra As Integer = UsuarioActual.Empresa.Funcionalidad(405).ToEntero Dim IdCtaContableDescCompra As Integer = UsuarioActual.Empresa.Funcionalidad(405).ToEntero
Dim CveSubProyecto As Integer = TmpDT.MAX("CveSubProyecto").ToEntero Dim CveSubProyecto259 As Integer = TmpDT.MAX("CveSubProyecto").ToEntero
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto259) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=-importeMN, ImporteME:=If(tipoCambioActual = 1, 0, -importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -importeMovimiento, Referencia, 259, Concepto, FechaMovimiento, IdCtaContableDescCompra, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=-importeMN, ImporteME:=If(tipoCambioActual = 1, 0, -importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto259) Then
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
Else Else
@@ -7528,7 +7555,8 @@ Partial Class Compras_Compras
End If End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveSubProyecto:=CveSubProyectoInsertar, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit For Exit For
End If End If
@@ -7552,7 +7580,7 @@ Partial Class Compras_Compras
End If End If
End If End If
If Not ErrorPrepoliza AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then If Not ErrorPrepoliza AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) AndAlso UsuarioActual.CveEmpresa <> 72 Then
If ObjConta.ValorPolizaDescuadre > 0 Then If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
ErrorPrepolizaDescuadre = True ErrorPrepolizaDescuadre = True
@@ -10485,7 +10513,7 @@ Partial Class Compras_Compras
If UsuarioActual.CveEmpresa.Contiene(119, 7) Then If UsuarioActual.CveEmpresa.Contiene(119, 7) Then
node = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces) node = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
If ValorXML(node, "TipoRelacion").ToString.Contiene("04", "07") Then If ValorXML(node, "TipoRelacion").ToString.Contiene("07") Then
Dim nodeDocumentosRelacionados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:CfdiRelacionado", Prefijo), namespaces) Dim nodeDocumentosRelacionados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:CfdiRelacionado", Prefijo), namespaces)
For Each documento As XmlNode In nodeDocumentosRelacionados For Each documento As XmlNode In nodeDocumentosRelacionados
If documento.Attributes("UUID").Value <> "" Then If documento.Attributes("UUID").Value <> "" Then
@@ -16933,6 +16961,8 @@ Partial Class Compras_Compras
CargaRetIVAConcepto() CargaRetIVAConcepto()
CargaRetISRConcepto() CargaRetISRConcepto()
Dim NumNoDed As Integer = TmpDT.COUNT("CvePS", "NoDeducible = True ")
If NumNoDed > 0 Then GvPS.Columns(10).Visible = True 'visualiza columnas de nodeducibles
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
InicializaAplicaNCFact() InicializaAplicaNCFact()
@@ -18436,30 +18466,69 @@ Partial Class Compras_Compras
End If End If
If EstatusAlmacen = 1 Then If EstatusAlmacen = 1 Then
LBDevolucionAlmacen.Text = "<i class='fa fa-pencil'></i> Cancelar Devolución Almacén" HplDevv.Text = "<i class='fa fa-pencil'></i> Cancelar Devolución Almacén"
LBDevolucionAlmacen.ToolTip = "¿Está seguro de Cancelar la Devolución de Almacén?" HplDevv.ToolTip = "¿Está seguro de Cancelar la Devolución de Almacén?"
Else Else
LBDevolucionAlmacen.Text = "<i class='fa fa-pencil'></i> Solicitar Devolución Almacén" HplDevv.Text = "<i class='fa fa-pencil'></i> Solicitar Devolución Almacén"
LBDevolucionAlmacen.ToolTip = "¿Está seguro de Solicitar la Devolución de Almacén?" HplDevv.ToolTip = "¿Está seguro de Solicitar la Devolución de Almacén?"
End If End If
End If End If
'UpInvDev.Update() 'UpInvDev.Update()
End Sub End Sub
Protected Sub LBDevolucionAlmacen_Click(sender As Object, e As EventArgs) Protected Sub LBDevolucionAlmacen_Click(sender As Object, e As EventArgs)
GvSolDev.DataSource = TmpDT
GvSolDev.DataBind()
RegistraScript("$('#DivDevolucion').modal('show');", "DivDevolucion")
UPPSolDev.Update()
End Sub
Protected Sub BtnDevolucion_Click(sender As Object, e As EventArgs)
Dim ObjCompras As New ClsCompras Dim ObjCompras As New ClsCompras
Dim TieneError As Boolean = False
ObjCompras.IniciaTransacSQL()
If EstatusAlmacen = 0 Then
For Each gvr As GridViewRow In GvSolDev.Rows
If gvr.FCTextBox("TxtCant").Text.ToDecimal > 0 Then
'actualiza el estatus del detalle
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 0)
Else
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 1)
End If
Next
End If
If ObjCompras.UpdateEstatusAlmacen(CveCompra, If(EstatusAlmacen = 1, 0, 1)) Then If ObjCompras.UpdateEstatusAlmacen(CveCompra, If(EstatusAlmacen = 1, 0, 1)) Then
EstatusAlmacen = If(EstatusAlmacen = 1, 0, 1) EstatusAlmacen = If(EstatusAlmacen = 1, 0, 1)
Alert(If(EstatusAlmacen = 1, "La solicitud de devolución de almacen se guardo correctamente.", "La solicitud de almacen se canceló correctamente.")) Alert(If(EstatusAlmacen = 1, "La solicitud de devolución de almacen se guardo correctamente.", "La solicitud de almacen se canceló correctamente."))
End If End If
If Not TieneError Then
ObjCompras.Commit()
Else
ObjCompras.RollBack()
End If
ObjCompras.Dispose() ObjCompras.Dispose()
InicializaDevolucionAlmacen() InicializaDevolucionAlmacen()
End Sub End Sub
'Protected Sub LBDevolucionAlmacen_Click(sender As Object, e As EventArgs)
' Dim ObjCompras As New ClsCompras
' If ObjCompras.UpdateEstatusAlmacen(CveCompra, If(EstatusAlmacen = 1, 0, 1)) Then
' EstatusAlmacen = If(EstatusAlmacen = 1, 0, 1)
' Alert(If(EstatusAlmacen = 1, "La solicitud de devolución de almacen se guardo correctamente.", "La solicitud de almacen se canceló correctamente."))
' End If
' ObjCompras.Dispose()
' InicializaDevolucionAlmacen()
'End Sub
Private Sub HabilitaNCInv() Private Sub HabilitaNCInv()
If Not UsuarioActual.CveUsuario = 100 Then If Not UsuarioActual.CveUsuario = 100 Then
@@ -19617,7 +19686,18 @@ Partial Class Compras_Compras
Dim CveSubProyecto As Integer = TmpDT.MAX("CveSubProyecto").ToEntero Dim CveSubProyecto As Integer = TmpDT.MAX("CveSubProyecto").ToEntero
If DiferenciaInvOC.RoundSQL() <> 0 Then If DiferenciaInvOC.RoundSQL() <> 0 Then
If CveSubProyecto <= 0 Then
Alert("Debe de asignar un sub proyecto o centro de constos.", TipoMensaje.MsgAdvertencia)
Retorno = False
End If
CvePrePoliza = ObjConta.AddPrePolizas("Compras/OC-(OCAlmacen)", 74, DiferenciaInvOC, DiferenciaInvOC, 1, Fecha, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePoliza = ObjConta.AddPrePolizas("Compras/OC-(OCAlmacen)", 74, DiferenciaInvOC, DiferenciaInvOC, 1, Fecha, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
@@ -19960,6 +20040,8 @@ Partial Class Compras_Compras
End If End If
End Sub End Sub
End Class End Class
Public Class MMensajeDevolucion Public Class MMensajeDevolucion

View File

@@ -788,7 +788,7 @@ Partial Class PopUpVerFactura
ResponsableRecibio = Dr("ResponsableRecibio").ToString ResponsableRecibio = Dr("ResponsableRecibio").ToString
Identificacion = Dr("Identificacion").ToString Identificacion = Dr("Identificacion").ToString
Domicilio = Dr("Domicilio").ToString Domicilio = Dr("Domicilio").ToString
Telefono = Dr("Telefono").ToString Telefono = Dr("Telefono1").ToString
Ciudad = Dr("Ciudad").ToString Ciudad = Dr("Ciudad").ToString
Licencia = Dr("Licencia").ToString Licencia = Dr("Licencia").ToString
End If End If
@@ -813,7 +813,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("DomicilioFiscal", $"{UsuarioActual.Empresa.Direccion}, {UsuarioActual.Empresa.Colonia}, {UsuarioActual.Empresa.Localidad}, {UsuarioActual.Empresa.Estado}, Tel. {UsuarioActual.Empresa.Telefono}")) params.Add(New ReportParameter("DomicilioFiscal", $"{UsuarioActual.Empresa.Direccion}, {UsuarioActual.Empresa.Colonia}, {UsuarioActual.Empresa.Localidad}, {UsuarioActual.Empresa.Estado}, Tel. {Telefono}"))
params.Add(New ReportParameter("SerieFolio", SerieFolio)) params.Add(New ReportParameter("SerieFolio", SerieFolio))
params.Add(New ReportParameter("DomicilioSucursal", DomicilioSucursal)) params.Add(New ReportParameter("DomicilioSucursal", DomicilioSucursal))
params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
@@ -826,7 +826,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Chofer", Chofer)) params.Add(New ReportParameter("Chofer", Chofer))
params.Add(New ReportParameter("Placa", Placa)) params.Add(New ReportParameter("Placa", Placa))
params.Add(New ReportParameter("Recibio", Recibio)) params.Add(New ReportParameter("Recibio", Recibio))
params.Add(New ReportParameter("FechaEntrega", FechaEntrega)) params.Add(New ReportParameter("FechaEntrega", FechaEntrega.ToString()))
params.Add(New ReportParameter("EspecifUnidad", EspecifUnidad)) params.Add(New ReportParameter("EspecifUnidad", EspecifUnidad))
params.Add(New ReportParameter("DireccionOrigen", SBDireccionO.ToString)) params.Add(New ReportParameter("DireccionOrigen", SBDireccionO.ToString))
params.Add(New ReportParameter("DireccionDestino", SBDireccionD.ToString)) params.Add(New ReportParameter("DireccionDestino", SBDireccionD.ToString))

View File

@@ -2164,6 +2164,52 @@
</table> </table>
</div> </div>
</div> </div>
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Pagos no bancarios</span>
</div>
<div class="actions">
<div class="btn-group">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpdatePanel10">
<ContentTemplate>
<asp:LinkButton ID="LnkPagosNoBancariosPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
<asp:LinkButton ID="LnkPagosNoBancariosExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkPagosNoBancariosPDF" />
<asp:PostBackTrigger ControlID="LnkPagosNoBancariosExcel" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>
</div>
<div class="portlet-body">
<div class="row col-md-12" align="right">
<input type="text" id="TxtBusquedaPagosNoBancarios" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaPagosNoBancarios','{0}')", GvPagosNoBancarios.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaPagosNoBancarios','{0}')", GvPagosNoBancarios.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="table-scrollable">
<asp:GridView ID="GvPagosNoBancarios" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron pagos no bancarios" Width="50%"
CssClass="table table-striped table-advance table-hover ScrollAD" data-sort="false" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None" DataKeyNames="CvePrePoliza,CveCompra,CveVenta,CvePersonal,ImporteMN,VentaSerieFolio,CompraSerieFolio,NombreCompleto,FechaIng,Abreviatura">
<Columns>
<asp:BoundField HeaderText="Nombre Completo" DataField="NombreCompleto"/>
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString = "{0:dd/MM/yyyy}"/>
<asp:HyperLinkField HeaderText="Venta Serie Folio" DataTextField="VentaSerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}"/>
<asp:HyperLinkField HeaderText="Compra Serie Folio" DataTextField="CompraSerieFolio" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}"/>
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlImp" runat="server" Text='<%# Eval("ImporteMN", "{0:N2}")%>'></asp:Literal>
<asp:Literal ID="LtlMon" runat="server" Text='<%# Eval("Abreviatura")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</ContentTemplate> </ContentTemplate>

View File

@@ -511,7 +511,7 @@ Partial Class Compras_Proveedores
'CargaColectivas() 'CargaColectivas()
'CargaSaldosBeneficiarios() 'CargaSaldosBeneficiarios()
CargaUsuariosPortal() CargaUsuariosPortal()
CargarPagosNoBancarios()
CargaFiltroMonedas() CargaFiltroMonedas()
MostrarFiltro() MostrarFiltro()
@@ -6269,6 +6269,15 @@ Partial Class Compras_Proveedores
End If End If
End Sub End Sub
Private Sub CargarPagosNoBancarios()
Dim ObjBancos As New ClsBancos
If ObjBancos.GetPagosNoBancarios(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor) Then
GvPagosNoBancarios.DataSource = ObjBancos.DtResultados
GvPagosNoBancarios.DataBind()
End If
ObjBancos.Dispose()
End Sub
End Class End Class

View File

@@ -291,7 +291,7 @@
<asp:HiddenField runat="server" ID="HdnFechasComprasVinculadas" Value="-1" ClientIDMode="Static" /> <asp:HiddenField runat="server" ID="HdnFechasComprasVinculadas" Value="-1" ClientIDMode="Static" />
<asp:GridView ID="GvCxP" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes" DataKeyNames="CveCompra,FechaCompra,Proveedor,SerieFolio,Original,SubTotal,IVA,RetIVA,RetISR,IdCtaContProveedores,IdCtaContProveedoresSIG,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,IVADeducible,IVANoDeducible,CveTipoConcepto"> <asp:GridView ID="GvCxP" GridLines="None" CssClass="table table-hover table-advance Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes" DataKeyNames="CveCompra,FechaCompra,Proveedor,SerieFolio,Original,SubTotal,IVA,RetIVA,RetISR,IdCtaContProveedores,IdCtaContProveedoresSIG,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,IVADeducible,IVANoDeducible,CveTipoConcepto,CveSubProyecto">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate> <HeaderTemplate>

View File

@@ -637,6 +637,9 @@ Partial Class Compras_ReembolsosComprobaciones
'inserto las compras que voy a pagar 'inserto las compras que voy a pagar
For Each gvr As GridViewRow In GvCxP.Rows For Each gvr As GridViewRow In GvCxP.Rows
If gvr.FCCheckBox("Chk").Checked Then If gvr.FCCheckBox("Chk").Checked Then
ConceptoMovimiento = $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}" ConceptoMovimiento = $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}"
Referencia = gvr.DataKey("SerieFolio").ToString Referencia = gvr.DataKey("SerieFolio").ToString
@@ -675,14 +678,19 @@ Partial Class Compras_ReembolsosComprobaciones
CveIEPago = CveIERegistrado CveIEPago = CveIERegistrado
End If End If
'Otros Ingresos 'Otros Ingresos
If (ChkAjusteOI.Checked Or ChkOtrosIngresosCheque.Checked) AndAlso gvr.FCTextBox("TxtComision").Text.ToDecimal > 0 Then If (ChkAjusteOI.Checked Or ChkOtrosIngresosCheque.Checked) AndAlso gvr.FCTextBox("TxtComision").Text.ToDecimal > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.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(CvePrePolizaPago, False, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, 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" MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
End If End If
If CveCajaChica > 0 AndAlso Not HdnCheque.Value.ToEntero > 0 Then If CveCajaChica > 0 AndAlso Not HdnCheque.Value.ToEntero > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.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, Contabilizable:=False) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, 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, Contabilizable:=False) Then
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos" MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
End If End If
End If End If

View File

@@ -222,7 +222,7 @@
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1"><span>Comprobación:</span></div> <div class="col-md-1" style="margin-left:20px"><span>Comprobación:</span></div>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList ID="DdlComprobacion" runat="server" CssClass="select2me" AppendDataBoundItems="true" Width="100%"> <asp:DropDownList ID="DdlComprobacion" runat="server" CssClass="select2me" AppendDataBoundItems="true" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
@@ -230,6 +230,14 @@
<asp:ListItem Text="No" Value="0"></asp:ListItem> <asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="col-md-1" style="margin-left:20px"><span>Aplica NC:</span></div>
<div class="col-md-1">
<asp:DropDownList ID="DdlAplicaNC" runat="server" CssClass="select2me" AppendDataBoundItems="true" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
<asp:ListItem Text="No" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -379,7 +379,7 @@ Partial Class RepCxPDetalle
DdlUsuarioResponsable.SelectedValue.ToEntero, Anio, Mes, AnioMes, CveMoneda, CveSubProyecto, DdlEstatusCompra.SelectedValue.ToEntero, DdlUsuarioResponsable.SelectedValue.ToEntero, Anio, Mes, AnioMes, CveMoneda, CveSubProyecto, DdlEstatusCompra.SelectedValue.ToEntero,
Fecha, DdlGrupo.SelectedValue.ToEntero, Opcion, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, Fecha, DdlGrupo.SelectedValue.ToEntero, Opcion, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero,
TCEspecifico, FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=IIf(CveTipoProveedor = 3, TCEspecifico, FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveTipoProveedor:=IIf(CveTipoProveedor = 3,
-1, CveTipoProveedor), Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero) Then -1, CveTipoProveedor), Comprobaciones:=DdlComprobacion.SelectedValue.ToEntero, AplicaNC:=DdlAplicaNC.SelectedValue.ToEntero()) Then
Dim TMP_DTDatos As New DataTable Dim TMP_DTDatos As New DataTable

View File

@@ -98,8 +98,7 @@
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Notas de Crédito" OnRowDataBound="GvDatos_RowDataBound" <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Notas de Crédito" OnRowDataBound="GvDatos_RowDataBound"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None"
DataKeyNames="CveCompra,Saldo,CveIE,CveProveedor,CvePersonal,CveMoneda,IdCtaContProveedores, DataKeyNames="CveCompra,Saldo,CveIE,CveProveedor,CvePersonal,CveMoneda,IdCtaContProveedores,IdCtaContExtranjera,IdCtaContComplementaria,TipoCambio,CveSubProyecto">
IdCtaContExtranjera,IdCtaContComplementaria,TipoCambio">
<Columns> <Columns>
<asp:TemplateField ItemStyle-Width="7%"> <asp:TemplateField ItemStyle-Width="7%">
<ItemTemplate> <ItemTemplate>

View File

@@ -145,6 +145,7 @@ Partial Class Compras_RepNotasCredito
CvePrePoliza = ObjConta.AddPrePolizas("Compras/RepNotasCredito", 103, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now, "Saldado manual", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CvePrePoliza = ObjConta.AddPrePolizas("Compras/RepNotasCredito", 103, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now, "Saldado manual", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveMoneda > 1 Then If CveMoneda > 1 Then
IdCtaContable = gr.DataKey("IdCtaContExtranjera").ToEntero IdCtaContable = gr.DataKey("IdCtaContExtranjera").ToEntero
ImporteMN = (gr.DataKey("Saldo").ToDecimal * TCCompra).RoundSQL ImporteMN = (gr.DataKey("Saldo").ToDecimal * TCCompra).RoundSQL
@@ -165,7 +166,7 @@ Partial Class Compras_RepNotasCredito
End If End If
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(266).ToString.ToEntero IdCtaContable = UsuarioActual.Empresa.Funcionalidad(266).ToString.ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, "", 211, Concepto, TxtFechaSaldar.Text.ToDate, IdCtaContable, -1, gr.DataKey("CveIE").ToEntero, ImporteMX:=If(CveMoneda > 1, (Importe * TC), Importe).RoundSQL, CveCuenta:=-1, CveCompra:=gr.DataKey("CveCompra").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, "", 211, Concepto, TxtFechaSaldar.Text.ToDate, IdCtaContable, -1, gr.DataKey("CveIE").ToEntero, ImporteMX:=If(CveMoneda > 1, (Importe * TC), Importe).RoundSQL, CveCuenta:=-1, CveCompra:=gr.DataKey("CveCompra").ToEntero, CveSubProyecto:=gr.DataKey("CveSubProyecto").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero) Then
MsgError = "Ocurrio un Error al saldar el movimiento" MsgError = "Ocurrio un Error al saldar el movimiento"
End If End If

View File

@@ -67,7 +67,7 @@
<asp:LinkButton ID="LnkBitacotaFacturas" runat="server" OnClick="LnkBitacotaFacturas_Click"><i class="fa fa-book" ></i> Bitácora Facturas</asp:LinkButton> <asp:LinkButton ID="LnkBitacotaFacturas" runat="server" OnClick="LnkBitacotaFacturas_Click"><i class="fa fa-book" ></i> Bitácora Facturas</asp:LinkButton>
</li> </li>
<li> <li>
<asp:LinkButton ID="LnkVinculacionMasivaComplementos" runat="server" OnClick="LnkVinculacionMasivaComplementos_Click" Visible ="true" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea realizar la vinculación masiva de complementos?" data-btn-ok-label="si"><i class="fa fa-tasks" ></i> Vinculación Masiva Complementos</asp:LinkButton> <asp:LinkButton ID="LnkVinculacionMasivaComplementos" runat="server" OnClick="LnkVinculacionMasivaComplementos_Click" Visible ="false" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea realizar la vinculación masiva de complementos?" data-btn-ok-label="si"><i class="fa fa-tasks" ></i> Vinculación Masiva Complementos</asp:LinkButton>
</li> </li>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>

View File

@@ -816,10 +816,14 @@ Partial Class ContabilidadC_RegPrePolizaS
TipoMovto = False TipoMovto = False
End If End If
If CveConcepto = 41 Then If CveConcepto <> 30 Then
CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero
Else If CveConcepto = 41 Then
CveIE = -1 CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero
Else
CveIE = -1
End If
End If End If

View File

@@ -101,11 +101,12 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<%-- CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true"--%>
<asp:UpdatePanel ID="UpAnual" UpdateMode="Conditional" runat="server"> <asp:UpdatePanel ID="UpAnual" UpdateMode="Conditional" runat="server">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvAnual" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none" <asp:GridView ID="GvAnual" runat="server" DataKeyNames="Level,CveCuenta" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none"
CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="2" data-heightmenos="300"> CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="2" data-heightmenos="300" data-sort="true" OnDataBound="GvAnual_DataBound" >
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate> <HeaderTemplate>

View File

@@ -42,6 +42,63 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
End Set End Set
End Property End Property
Public Property DtHeadersCount As Integer
Get
If ViewState("DtHeadersCount") Is Nothing Then
Return -1
Else
Return ViewState("DtHeadersCount").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("DtHeadersCount") = value
End Set
End Property
Private Property DTHeaders As DataTable
Get
If ViewState("DTHeaders") Is Nothing Then
Return New DataTable
Else
Return DirectCast(ViewState("DTHeaders"), DataTable)
End If
End Get
Set(value As DataTable)
ViewState("DTHeaders") = value
End Set
End Property
Private Property DTDatos As DataTable
Get
If ViewState("DTDatos") Is Nothing Then
Return New DataTable
Else
Return DirectCast(ViewState("DTDatos"), DataTable)
End If
End Get
Set(value As DataTable)
ViewState("DTDatos") = value
End Set
End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -122,19 +179,32 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
CargaDatos() CargaDatos()
End Sub End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
DTHeaders = New DataTable
DTDatos = New DataTable
Dim Conta As New ClsContabilidad Dim Conta As New ClsContabilidad
DtHeadersCount = 0
If Conta.GetAnexoCatalogoAnual(CveCuenta, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlEjercicio2.SelectedValue.ToEntero, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlPeriodo.SelectedValue.ToEntero) Then If Conta.GetAnexoCatalogoAnual(CveCuenta, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlEjercicio2.SelectedValue.ToEntero, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlPeriodo.SelectedValue.ToEntero) Then
Dim DtHeaders As DataTable = Conta.DSResultados.Tables(0) 'Dim DtHeaders As DataTable = Conta.DSResultados.Tables(0)
DTHeaders = Conta.DSResultados.Tables(0)
DTDatos = Conta.DSResultados.Tables(1)
DtHeadersCount = DTHeaders.Rows.Count
GvAnual.DataSource = Conta.DSResultados.Tables(1) GvAnual.DataSource = Conta.DSResultados.Tables(1)
Dim Index = 2 Dim Index = 2
For Index = 2 To GvAnual.Columns.Count - 1 For Index = 2 To GvAnual.Columns.Count - 1
GvAnual.Columns(Index).Visible = False GvAnual.Columns(Index).Visible = False
Next Index Next Index
listaCamposanios.Clear() listaCamposanios.Clear()
Index = 2 Index = 2
For Each Dr As DataRow In DtHeaders.Rows For Each Dr As DataRow In DTHeaders.Rows
GvAnual.Columns(Index).Visible = True GvAnual.Columns(Index).Visible = True
CType(GvAnual.Columns(Index), BoundField).DataField = String.Format("Ejercicio{0}", Dr("Ejercicio")) CType(GvAnual.Columns(Index), BoundField).DataField = String.Format("Ejercicio{0}", Dr("Ejercicio"))
GvAnual.Columns(Index).HeaderText = Dr("Ejercicio").ToString GvAnual.Columns(Index).HeaderText = Dr("Ejercicio").ToString
@@ -166,7 +236,9 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
UpAnual.Update() UpAnual.Update()
'RegistraScript($"LimpiaCeros({DdlDivisor.SelectedValue});") 'RegistraScript($"LimpiaCeros({DdlDivisor.SelectedValue});")
RegistraScript($"LimpiaCeros();")
'RegistraScript($"LimpiaCeros();")
Conta.Dispose() Conta.Dispose()
@@ -193,7 +265,58 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
e.Row.Style.Add("font-weight", "bold") e.Row.Style.Add("font-weight", "bold")
End If End If
e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
If e.Row.DataKey("Level").ToEntero = 0 Then
e.Row.CssClass = "Totales"
End If
If e.Row.DataKey("Level").ToEntero = 1 Then
e.Row.CssClass = "SubTotales"
End If
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
Dim inicial As Boolean = True
Dim Index As Integer = 2
For Each DRow As DataRow In DTHeaders.Rows
Dim Importe As Decimal = e.Row.DBCampo($"Ejercicio{DRow("Ejercicio")}").ToDecimal
Dim Anio As Integer = DRow("Ejercicio").ToString.ToEntero
If Importe <> 0 Then
e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{Anio}&FI=01/01/{Anio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue.ToEntero}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
End If
If e.Row.Cells(Index + 1).Text.ToDecimal = 0 Then
e.Row.Cells(Index + 1).Text = "-"
ElseIf e.Row.Cells(Index + 1).Text.ToDecimal < 0 Then
e.Row.Cells(Index + 1).ForeColor = Drawing.Color.Red
End If
If e.Row.Cells(Index + 2).Text.Replace("%", "").ToDecimal = 0 Then
e.Row.Cells(Index + 2).Text = "-"
ElseIf e.Row.Cells(Index + 2).Text.Replace("%", "").ToDecimal < 0 Then
e.Row.Cells(Index + 2).ForeColor = Drawing.Color.Red
End If
'If inicial Then
' Index = Indice + 1
' inicial = False
' Continue For
'End If
Index += 3
Next
'e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
End If End If
End Sub End Sub
@@ -231,4 +354,56 @@ Partial Class Contabilidad2_RepAnexoCatalogoAnual
Protected Sub GvAnual_DataBound(sender As Object, e As EventArgs)
'If DtHeadersCount > 0 Then
' '96 32
' Dim NColumns As Integer = GvAnual.Columns.Count
' Dim row As New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal)
' Dim cell1 As New TableHeaderCell()
' cell1.Text = ""
' cell1.ColumnSpan = 1
' row.Controls.Add(cell1)
' Dim cell2 As New TableHeaderCell()
' cell2.Text = ""
' cell2.ColumnSpan = 1
' row.Controls.Add(cell2)
' Dim cell3 As New TableHeaderCell()
' cell3.Text = ""
' cell3.ColumnSpan = 1
' row.Controls.Add(cell3)
' Dim cell4 As New TableHeaderCell()
' cell4.Text = ""
' cell4.ColumnSpan = 1
' row.Controls.Add(cell4)
' For x = 0 To DtHeadersCount
' Dim cell As New TableHeaderCell()
' cell.Text = ""
' cell.ColumnSpan = 1
' row.Controls.Add(cell)
' Dim cellColspan2 = New TableHeaderCell()
' cellColspan2.ColumnSpan = 2
' cellColspan2.Text = "Variación"
' row.Controls.Add(cellColspan2)
' x = x + 1
' Next
' GvAnual.HeaderRow.Parent.Controls.AddAt(0, row)
'End If
End Sub
End Class End Class

View File

@@ -103,7 +103,7 @@
<div> <div>
<div style="background-color: #fff;"> <div style="background-color: #fff;">
<asp:GridView ID="GvCC" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none" <asp:GridView ID="GvCC" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none"
CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="2" data-heightmenos="300"> DataKeyNames="Level,CveCuenta" CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="2" data-heightmenos="300">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate> <HeaderTemplate>
@@ -124,141 +124,144 @@
<asp:Label runat="server" Text='<%# Eval("Nombre")%>'></asp:Label> <asp:Label runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoGeneral" HeaderText="Total" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoGeneral" HeaderText="Total" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNA" HeaderText="Sin SubProyecto" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNA" HeaderText="Sin SubProyecto" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNAPorcentaje" HeaderText="%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" DataField="SubProyectoNAPorcentaje" HeaderText="%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" /> <asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
<asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" /> <asp:BoundField DataFormatString="{0:N2}%" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="50px" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>

View File

@@ -33,6 +33,39 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
End Set End Set
End Property End Property
Private Property DTHeaders As DataTable
Get
If ViewState("DTHeaders") Is Nothing Then
Return New DataTable
Else
Return DirectCast(ViewState("DTHeaders"), DataTable)
End If
End Get
Set(value As DataTable)
ViewState("DTHeaders") = value
End Set
End Property
Private Property DTDatos As DataTable
Get
If ViewState("DTDatos") Is Nothing Then
Return New DataTable
Else
Return DirectCast(ViewState("DTDatos"), DataTable)
End If
End Get
Set(value As DataTable)
ViewState("DTDatos") = value
End Set
End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -113,11 +146,15 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
End Sub End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
DTHeaders = New DataTable
DTDatos = New DataTable
Dim Conta As New ClsContabilidad Dim Conta As New ClsContabilidad
If Conta.GetAnexoCatalagoCC(CveCuenta, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then If Conta.GetAnexoCatalagoCC(CveCuenta, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
Dim DtHeaders As DataTable = Conta.DSResultados.Tables(0) DTHeaders = Conta.DSResultados.Tables(0)
DTDatos = Conta.DSResultados.Tables(1)
GvCC.DataSource = Conta.DSResultados.Tables(1) GvCC.DataSource = Conta.DSResultados.Tables(1)
Dim Index = 4 Dim Index = 4
@@ -127,18 +164,19 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
listaCampos.Clear() listaCampos.Clear()
Index = 4 Index = 4
For Each Dr As DataRow In DtHeaders.Rows For Each Dr As DataRow In DTHeaders.Rows
GvCC.Columns(Index).Visible = True GvCC.Columns(Index).Visible = True
CType(GvCC.Columns(Index), BoundField).DataField = String.Format("SubProyecto{0}", Dr("SubProyecto")) CType(GvCC.Columns(Index), BoundField).DataField = String.Format("SubProyecto{0}", Dr("SubProyecto"))
GvCC.Columns(Index).HeaderText = Dr("SubProyecto").ToString() GvCC.Columns(Index).HeaderText = Dr("SubProyecto").ToString()
listaCampos.Add(New String() {String.Format("SubProyecto{0}", Dr("SubProyecto")), Dr("SubProyecto").ToString()}) listaCampos.Add(New String() {String.Format("SubProyecto{0}", Dr("SubProyecto")), Dr("SubProyecto").ToString()})
GvCC.Columns(Index + 1).Visible = True 'GvCC.Columns(Index + 1).Visible = True
CType(GvCC.Columns(Index + 1), BoundField).DataField = String.Format("SubProyecto{0}Porcentaje", Dr("SubProyecto")) 'CType(GvCC.Columns(Index + 1), BoundField).DataField = String.Format("SubProyecto{0}Porcentaje", Dr("SubProyecto"))
GvCC.Columns(Index + 1).HeaderText = "%" 'GvCC.Columns(Index + 1).HeaderText = "%"
'Index += 2
Index += 2 Index += 1
Next Next
GvCC.DataBind() GvCC.DataBind()
@@ -156,7 +194,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
End If End If
RegistraScript($"LimpiaCeros({DdlDivisor.SelectedValue});") 'RegistraScript($"LimpiaCeros({DdlDivisor.SelectedValue});")
Conta.Dispose() Conta.Dispose()
End Sub End Sub
@@ -165,15 +203,118 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
#Region " GV ROW DATABOUND " #Region " GV ROW DATABOUND "
Protected Sub GvCC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCC.RowDataBound Protected Sub GvCC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCC.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then If e.Row.RowIndex = 0 Then
e.Row.Style.Add("font-weight", "bold") e.Row.Style.Add("font-weight", "bold")
End If End If
setgraficaCC(e) setgraficaCC(e)
e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
If e.Row.DataKey("Level").ToEntero = 0 Then
e.Row.CssClass = "Totales"
End If
If e.Row.DataKey("Level").ToEntero = 1 Then
e.Row.CssClass = "SubTotales"
End If
Dim Index As Integer = 2
For Each DRow As DataRow In DTHeaders.Rows
Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
'Dim Anio As Integer = DRow("SubProyecto").ToString.ToEntero
If e.Row.CssClass = "Totales" And Index = 2 Then
e.Row.Cells(Index).ForeColor = Drawing.ColorTranslator.FromHtml("#337ab7")
End If
If e.Row.Cells(Index).Text.Replace("%", "").ToDecimal = 0 Then
e.Row.Cells(Index).Text = "-"
ElseIf e.Row.Cells(Index).Text.Replace("%", "").ToDecimal < 0 Then
e.Row.Cells(Index).ForeColor = Drawing.Color.Red
End If
Index += 1
Next
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
Dim inicial As Boolean = True
Index = 4
For Each DRow As DataRow In DTHeaders.Rows
Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
'Dim Anio As Integer = DRow("SubProyecto").ToString.ToEntero
If e.Row.Cells(Index).Text.Replace("%", "").ToDecimal = 0 Then
e.Row.Cells(Index).Text = "-"
ElseIf e.Row.Cells(Index).Text.Replace("%", "").ToDecimal < 0 Then
e.Row.Cells(Index).ForeColor = Drawing.Color.Red
End If
If Importe <> 0 Then
e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue.ToEntero}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
End If
'If e.Row.Cells(Index + 1).Text.ToDecimal = 0 Then
' e.Row.Cells(Index + 1).Text = "-"
'ElseIf e.Row.Cells(Index + 1).Text.ToDecimal < 0 Then
' e.Row.Cells(Index + 1).ForeColor = Drawing.Color.Red
'End If
Index += 1
Next
'Index = 4
'For Each DRow As DataRow In DTHeaders.Rows
' Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
' 'Dim Anio As Integer = DRow("SubProyecto").ToString.ToEntero
' If Importe > 0 Then
' e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue.ToEntero}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
' Else
' e.Row.Cells(Index).Text = "-"
' End If
' If e.Row.Cells(Index + 1).Text.ToDecimal = 0 Then
' e.Row.Cells(Index + 1).Text = "-"
' ElseIf e.Row.Cells(Index + 1).Text.ToDecimal < 0 Then
' e.Row.Cells(Index + 1).ForeColor = Drawing.Color.Red
' End If
' If e.Row.Cells(Index + 2).Text.Replace("%", "").ToDecimal = 0 Then
' e.Row.Cells(Index + 2).Text = "-"
' ElseIf e.Row.Cells(Index + 2).Text.Replace("%", "").ToDecimal < 0 Then
' e.Row.Cells(Index + 2).ForeColor = Drawing.Color.Red
' End If
' Index += 1
'Next
' e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
End If End If
End Sub End Sub
Public Sub setgraficaCC(e As GridViewRowEventArgs) Public Sub setgraficaCC(e As GridViewRowEventArgs)
@@ -198,7 +339,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
SubProyecto = DdlSubProyecto.SelectedItem.Text SubProyecto = DdlSubProyecto.SelectedItem.Text
End If End If
GvCC.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}", "Anexo del Catálogo - Mensual", SubProyecto, DdlDivisor.SelectedValue.ToEntero, DatoTituloExtra:=$"Periodo {DdlPeriodo.SelectedItem.Text}") GvCC.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}", $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", SubProyecto, DdlDivisor.SelectedValue.ToEntero, DatoTituloExtra:=$"Periodo {DdlPeriodo.SelectedItem.Text}")
End Sub End Sub

View File

@@ -121,6 +121,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div style="background-color: #fff;"> <div style="background-color: #fff;">
<asp:GridView ID="GvMensual2" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none" <asp:GridView ID="GvMensual2" runat="server" AutoGenerateColumns="False" ShowHeader="true" EmptyDataText="No se encontraron datos" GridLines="none"
DataKeyNames="Level,CveCuenta"
CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="2" data-heightmenos="300"> CssClass="ADSCROLLER2 table table-striped table-advance table-hover" data-cols="2" data-heightmenos="300">
<Columns> <Columns>

View File

@@ -169,7 +169,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
End If End If
RegistraScript($"LimpiaCeros();") 'RegistraScript($"LimpiaCeros();")
Conta.Dispose() Conta.Dispose()
End Sub End Sub
@@ -184,8 +184,126 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual
e.Row.Style.Add("font-weight", "bold") e.Row.Style.Add("font-weight", "bold")
End If End If
setgrafica(e) setgrafica(e)
e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
If e.Row.DataKey("Level").ToEntero = 0 Then
e.Row.CssClass = "Totales"
End If
If e.Row.DataKey("Level").ToEntero = 1 Then
e.Row.CssClass = "SubTotales"
End If
Dim Enero, Febrero, Marzo, Abril, Mayo, Junio, Julio, Agosto, Septiembre, Octubre, Noviembre, Diciembre As Decimal
Enero = e.Row.DBCampo("Enero").ToDecimal()
Febrero = e.Row.DBCampo("Febrero").ToDecimal()
Marzo = e.Row.DBCampo("Marzo").ToDecimal()
Abril = e.Row.DBCampo("Abril").ToDecimal()
Mayo = e.Row.DBCampo("Mayo").ToDecimal()
Junio = e.Row.DBCampo("Junio").ToDecimal()
Julio = e.Row.DBCampo("Julio").ToDecimal()
Agosto = e.Row.DBCampo("Agosto").ToDecimal()
Septiembre = e.Row.DBCampo("Septiembre").ToDecimal()
Octubre = e.Row.DBCampo("Octubre").ToDecimal()
Noviembre = e.Row.DBCampo("Noviembre").ToDecimal()
Diciembre = e.Row.DBCampo("Diciembre").ToDecimal()
Dim CveCunetaRow As Integer = e.Row.DataKey("CveCuenta").ToEntero
For x = 2 To GvMensual2.Columns.Count - 1
If e.Row.Cells(x).Text.Replace("%", "").ToDecimal = 0 Then
e.Row.Cells(x).Text = "-"
ElseIf e.Row.Cells(x).Text.Replace("%", "").ToDecimal < 0 Then
e.Row.Cells(x).ForeColor = Drawing.Color.Red
End If
If x = 2 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/01/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/01/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
End If
If x = 3 Then
e.Row.Cells(x).Text = $"<a { If(Febrero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/02/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/02/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Febrero.ToString("###,###,##0"), Febrero.ToString("###,###,###.00")) }</a>"
End If
If x = 6 Then
e.Row.Cells(x).Text = $"<a { If(Marzo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/03/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/03/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }</a>"
End If
If x = 10 Then
e.Row.Cells(x).Text = $"<a { If(Abril < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/04/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/04/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Abril.ToString("###,###,##0"), Abril.ToString("###,###,###.00")) }</a>"
End If
If x = 14 Then
e.Row.Cells(x).Text = $"<a { If(Marzo < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/05/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/05/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Marzo.ToString("###,###,##0"), Marzo.ToString("###,###,###.00")) }</a>"
End If
If x = 17 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/06/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/06/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
End If
If x = 21 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/07/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/07/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
End If
If x = 24 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/08/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/08/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
End If
If x = 28 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/09/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/09/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
End If
If x = 32 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/10/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/10/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
End If
If x = 35 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/11/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/11/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
End If
If x = 38 Then
e.Row.Cells(x).Text = $"<a { If(Enero < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF={ $"01/12/{DdlEjercicio.SelectedValue}".ToDate.LastDayOfMonth.ToShortDateString }&FI=01/12/{DdlEjercicio}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Enero.ToString("###,###,##0"), Enero.ToString("###,###,###.00")) }</a>"
End If
Next
If Enero = 0 Then
e.Row.Cells(2).Text = "-"
Else
End If
' e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
' Level 0 Total 1 SubTotal 1
End If End If
End Sub End Sub

File diff suppressed because it is too large Load Diff

View File

@@ -130,11 +130,11 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
TxtFechaDel.Text = FechaInicio.ToShortDateString TxtFechaDel.Text = FechaInicio.ToShortDateString
End If End If
'If Request("CveSubProyecto") IsNot Nothing Then If Request("CveSubProyecto") IsNot Nothing Then
' If IsNumeric(Request("CveSubProyecto")) Then If IsNumeric(Request("CveSubProyecto")) Then
' CveSubProyecto = Request("CveSubProyecto").ToString DdlSubproyecto.SelectedValueExist(Request("CveSubProyecto").ToString)
' End If End If
'End If End If
ErrorParametros = False ErrorParametros = False

View File

@@ -705,8 +705,11 @@ Partial Class Contratos_Default
End If End If
TipoContrato = DdlTipoContrato.SelectedValue.ToEntero TipoContrato = DdlTipoContrato.SelectedValue.ToEntero
TxtDescripcionTipoContrato.Text = GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros("CveContratoTipo = " & DdlTipoContrato.SelectedValue)(0)("Descripcion").ToString() If GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros("CveContratoTipo = " & DdlTipoContrato.SelectedValue).Rows.Count > 0 Then
TxtDescripcionTipoContrato.Visible = True TxtDescripcionTipoContrato.Text = GlobalDTContratosTipos(UsuarioActual.CveEmpresa).FiltraParametros("CveContratoTipo = " & DdlTipoContrato.SelectedValue)(0)("Descripcion").ToString()
TxtDescripcionTipoContrato.Visible = True
End If
CargaContratoPadre() CargaContratoPadre()
UpProyecto.Update() UpProyecto.Update()
@@ -725,6 +728,15 @@ Partial Class Contratos_Default
TableDatosCabecera.Visible = True TableDatosCabecera.Visible = True
End If End If
If CveTipoContrato = 25 Then
DvMax.Visible = False
DvMin.Visible = False
DvTotal.Visible = False
DivFianzas.Visible = False
DivImpuestosLocales.Visible = False
End If
ElseIf modalidadDetalleInt = 2 Then ElseIf modalidadDetalleInt = 2 Then
ModalidadDetalle = 2 ModalidadDetalle = 2
@@ -737,6 +749,15 @@ Partial Class Contratos_Default
TableDatosCabecera.Visible = True TableDatosCabecera.Visible = True
End If End If
If CveTipoContrato = 25 Then
DvMax.Visible = False
DvMin.Visible = False
DvTotal.Visible = False
DivFianzas.Visible = False
DivImpuestosLocales.Visible = False
End If
End If End If
UpGral.Update() UpGral.Update()
@@ -755,11 +776,13 @@ Partial Class Contratos_Default
Exit Sub Exit Sub
End If End If
Me.CveTipoContrato = DdlTipoContrato.SelectedValue.ToEntero
'Dim TipoMov = GlobalDTContratosTipos.FiltroPrimeroValor("TipoMovimiento", $"CveContratoTipo='{CveTipoContrato}'").ToEntero 'Dim TipoMov = GlobalDTContratosTipos.FiltroPrimeroValor("TipoMovimiento", $"CveContratoTipo='{CveTipoContrato}'").ToEntero
If rpCompra.Checked Then If rpCompra.Checked Then
Dim CveContratoTipo = DdlTipoContrato.SelectedValue.ToEntero
Response.Redirect($"/Contratos/Presupuestos.aspx?CveContrato=-1&CveContratoTipo={CveContratoTipo}") Response.Redirect($"/Contratos/Presupuestos.aspx?CveContrato=-1&CveContratoTipo={Me.CveTipoContrato}")
'RegistraScript("window.location='/Contratos/Presupuestos.aspx") 'RegistraScript("window.location='/Contratos/Presupuestos.aspx")
Else Else

View File

@@ -93,7 +93,7 @@
<ContentTemplate> <ContentTemplate>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<asp:GridView ID="GvCiclosComerciales" runat="server" DataKeyNames="CveCicloComercial, NumeroContrato, CveSubProyecto" AutoGenerateColumns="False" ShowHeader="True" EmptyDataText="No se encontraron pendientes por facturar" GridLines="none" ToolTip="Listado de Pendientes" CssClass="table table-striped table-hover Widthall"> <asp:GridView ID="GvCiclosComerciales" runat="server" DataKeyNames="CveCicloComercial, NumeroContrato, CveSubProyecto, FechaVenc" AutoGenerateColumns="False" ShowHeader="True" EmptyDataText="No se encontraron pendientes por facturar" GridLines="none" ToolTip="Listado de Pendientes" CssClass="table table-striped table-hover Widthall">
<Columns> <Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="center" headertext="" ItemStyle-Width="10%"> <asp:TemplateField ItemStyle-HorizontalAlign="center" headertext="" ItemStyle-Width="10%">
<ItemTemplate> <ItemTemplate>

View File

@@ -166,300 +166,187 @@ Partial Class Contratos_FacturacionMasiva
End Sub End Sub
Protected Sub ImgFacturarTodos_Click(sender As Object, e As EventArgs) Handles BtnFacturar.Click Protected Sub ImgFacturarTodos_Click(sender As Object, e As EventArgs) Handles BtnFacturar.Click
EjecutarFacturacion()
End Sub
Private Sub EjecutarFacturacion()
Dim FacturadoCorrecto = True Dim FacturadoCorrecto = True
Dim sb As New StringBuilder()
For Each row As GridViewRow In GvCiclosComerciales.Rows For Each row As GridViewRow In GvCiclosComerciales.Rows
If row.FCCheckBox("chkDis").Checked Then If row.FCCheckBox("chkDis").Checked Then
FacturadoCorrecto = EmitirImprimir(row.DataKey("CveCicloComercial").ToString.ToEntero) Dim fecha As DateTime = DateTime.Now ', row.DataKey("FechaVenc").ToString.ToDateTime()
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
Dim Etiqueta As String = String.Format("{0} - {1}", nombreMes, fecha.Year)
Dim Resp = EmitirImprimir(row.DataKey("CveCicloComercial").ToString.ToEntero, Etiqueta)
For Each Msg In Resp.Mensajes
sb.AppendFormat("{0}</br></br>", Msg)
Next
If Not FacturadoCorrecto Then If Not FacturadoCorrecto Then
If Mensaje = "" Then If Mensaje = "" Then
Alert("Ocurrió un error al facturar masivamente, por favor contacte a soporte técnico", TipoMensaje.MsgAdvertencia) Alert("Ocurrió un error al facturar masivamente, por favor contacte a soporte técnico", TipoMensaje.MsgAdvertencia)
Else Else
Alert($"{Mensaje} en el contrato {row.DataKey("NumeroContrato").ToString}", TipoMensaje.MsgAdvertencia) Alert($"{Mensaje} en el contrato {row.DataKey("NumeroContrato").ToString}", TipoMensaje.MsgAdvertencia)
End If End If
Exit For
End If End If
End If End If
Next Next
If FacturadoCorrecto Then
Alert("Los periodos se facturaron correctamente") If sb.ToString().Length > 0 Then
TxtObservaciones.Text = "" Alert($"Se generaron las siguientes facturas: </br></br> {sb.ToString()}")
Else
Alert("No se generaron facturas", TipoMensaje.MsgAdvertencia)
End If End If
CargaDatos(DdlContrato.SelectedValue.ToEntero, DdlCliente.SelectedValue.ToEntero) CargaDatos(DdlContrato.SelectedValue.ToEntero, DdlCliente.SelectedValue.ToEntero)
RegistraScript("$('#divAgregar').modal('hide')") RegistraScript("$('#divAgregar').modal('hide')")
UpBodyEstatus.Update() UpBodyEstatus.Update()
End Sub End Sub
Protected Sub btnFacturarAqui_Click(sender As Object, e As EventArgs) Protected Sub btnFacturarAqui_Click(sender As Object, e As EventArgs)
CveCicloComercial = CType(sender, LinkButton).CommandArgument.ToEntero EjecutarFacturacion()
CreaObjetosVenta()
If ObjFactura Is Nothing Or ObjFactura.Cliente Is Nothing Then
Alert("Ocurrió un error al procesar los datos de la Venta.", TipoMensaje.MsgError)
ObjFactura = Nothing
Exit Sub
End If
If ObjFactura.CveCliente > 0 Then
If DTDetalle.Rows.Count > 0 Then
Dim ObjVentas As New ClsVentas()
Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
Dim ObjInventario As New ClsInventarios(ObjVentas.IniciaTransacSQL())
Dim ObjContr As New ClsContratos(ObjVentas.IniciaTransacSQL())
Dim ObjOS As New ClsOS(ObjVentas.IniciaTransacSQL())
Dim ObjBancos As New ClsBancos(ObjVentas.IniciaTransacSQL())
Dim ObjClientes As New ClsClientes(ObjVentas.IniciaTransacSQL())
Dim ObjContPaq As ClsContPAQi = Nothing
'Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL())
ErrorList = New List(Of String)
MensajeAlert = New StringBuilder
'CONTABILIDAD AUTOMATICA Y AC
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
End If
'GUARDA VENTA
GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjFactura, TmpDT, ObjFactura.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS)
If CveCicloComercial > 0 AndAlso ErrorList.Count = 0 Then
If Not ObjContr.CicloComercialUpdate(CveCicloComercial, True, UsuarioActual.CveEmpresa) Then
ErrorList.Add("No se pudo actualizar ")
End If
End If
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot")) Then
ObjVentas.Commit()
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
ViewState("CveVenta") = ObjFactura.CveVenta
Dim SeTimbro As Boolean = False
'TIMBRADO Y CASO ESPECIAL NOTA DE CREDITO
If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant") Then
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso UsuarioActual.Empresa.FacturaProduccion Then
Dim sw As New Diagnostics.Stopwatch
sw.Start()
'FACTURA INGRESO/EGRESO
Dim ObjTimbrado As New Timbrado
SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura)
sw.Stop()
GuardaLogTimbrado(sw.ElapsedMilliseconds.ToString, UsuarioActual.Empresa.CvePAC)
End If
'MENSAJE PRINCIPAL
MensajeAlert.AppendFormat(String.Format("<br/>La {0}: <b>{1}</b> se generó correctamente.<br/><br/>", ObjFactura.TipoDocumento, ObjFactura.SerieFolio))
If SeTimbro Then
'XML
Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
If File.Exists(ArchivoXML) Then
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", ObjFactura.CveVenta, "XML", ObjFactura.SerieFolio, ObjFactura.TipoDocto)))
End If
'IMPRESION
GeneraPDFFactura(False)
Else
MensajeAlert.AppendFormat("La factura no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir o póngase en contacto con soporte técnico.")
End If
'MUESTA ALERT OK
Dim Liga = If(UsuarioActual.CveRol = 1165, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={ObjFactura.CveCliente}&Opt=3"";")
Alert(MensajeAlert.ToString, TipoMensaje.MsgInformacion)
ObjFactura = Nothing
Else
ObjVentas.RollBack()
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
For Each ErrorItem In ErrorList
Alert(ErrorItem, TipoMensaje.MsgAdvertencia)
Next
'MUESTA ALERT ERROR
Alert("Ocurrió un error al procesar los datos. Por favor rectifique y vuelta a intentar.", TipoMensaje.MsgError)
End If
ObjVentas.Dispose()
ObjConta.Dispose()
ObjInventario.Dispose()
ObjContr.Dispose()
ErrorList = Nothing
MensajeAlert = Nothing
If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
CargaDatos(DdlContrato.SelectedValue.ToEntero, DdlCliente.SelectedValue.ToEntero)
Else
ObjVentas.RollBack()
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
For Each ErrorItem In ErrorList
Alert(ErrorItem, TipoMensaje.MsgAdvertencia)
Next
'MUESTA ALERT ERROR
Alert("Ocurrió un error al procesar los datos. Por favor rectifique y vuelta a intentar.", TipoMensaje.MsgError)
ObjVentas.Dispose()
ObjConta.Dispose()
ObjInventario.Dispose()
ObjContr.Dispose()
'ObjFolios.Dispose()
ErrorList = Nothing
MensajeAlert = Nothing
If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
End If
Else
Mensaje = "Las facturas del contrato"
End If
End If
End Sub End Sub
Private Function EmitirImprimir(pCveCicloComercial As Integer) As Boolean Private Function EmitirImprimir(pCveCicloComercial As Integer, Etiqueta As String) As Modelos.Factura.MMensajeFactura
Dim retorno As Boolean = False Dim Resp As New Modelos.Factura.MMensajeFactura
ViewState("CveCicloComercial") = pCveCicloComercial ViewState("CveCicloComercial") = pCveCicloComercial
CreaObjetosVenta() CreaObjetosVenta(Etiqueta)
If ObjFactura Is Nothing Or ObjFactura.Cliente Is Nothing Then If ObjFactura Is Nothing Or ObjFactura.Cliente Is Nothing Then
Alert("Ocurrió un error al procesar los datos de la Venta.", TipoMensaje.MsgError) Alert("Ocurrió un error al procesar los datos de la Venta.", TipoMensaje.MsgError)
ObjFactura = Nothing ObjFactura = Nothing
Return False Return Resp
End If End If
If ObjFactura.CveCliente > 0 Then If ObjFactura.CveCliente > 0 Then
If DTDetalle.Rows.Count > 0 Then If DTDetalle.Rows.Count > 0 Then
Dim ObjVentas As New ClsVentas() Resp = ObjFactura.EmitirFactura()
Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
Dim ObjInventario As New ClsInventarios(ObjVentas.IniciaTransacSQL()) 'Dim ObjVentas As New ClsVentas()
Dim ObjContr As New ClsContratos(ObjVentas.IniciaTransacSQL()) 'Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
Dim ObjOS As New ClsOS(ObjVentas.IniciaTransacSQL()) 'Dim ObjInventario As New ClsInventarios(ObjVentas.IniciaTransacSQL())
Dim ObjBancos As New ClsBancos(ObjVentas.IniciaTransacSQL()) 'Dim ObjContr As New ClsContratos(ObjVentas.IniciaTransacSQL())
Dim ObjClientes As New ClsClientes(ObjVentas.IniciaTransacSQL()) 'Dim ObjOS As New ClsOS(ObjVentas.IniciaTransacSQL())
Dim ObjContPaq As ClsContPAQi = Nothing 'Dim ObjBancos As New ClsBancos(ObjVentas.IniciaTransacSQL())
'Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL()) 'Dim ObjClientes As New ClsClientes(ObjVentas.IniciaTransacSQL())
ErrorList = New List(Of String) 'Dim ObjContPaq As ClsContPAQi = Nothing
MensajeAlert = New StringBuilder ''Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL())
'ErrorList = New List(Of String)
'MensajeAlert = New StringBuilder
'CONTABILIDAD AUTOMATICA Y AC ''CONTABILIDAD AUTOMATICA Y AC
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then 'If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa) ' ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
End If 'End If
'GUARDA VENTA ''GUARDA VENTA
GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjFactura, TmpDT, ObjFactura.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS) 'GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjFactura, TmpDT, ObjFactura.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS)
If pCveCicloComercial > 0 AndAlso ErrorList.Count = 0 Then 'If pCveCicloComercial > 0 AndAlso ErrorList.Count = 0 Then
If Not ObjContr.CicloComercialUpdate(pCveCicloComercial, True, UsuarioActual.CveEmpresa) Then ' If Not ObjContr.CicloComercialUpdate(pCveCicloComercial, True, UsuarioActual.CveEmpresa) Then
ErrorList.Add("No se pudo actualizar ") ' ErrorList.Add("No se pudo actualizar ")
End If ' End If
End If 'End If
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot")) Then 'If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot")) Then
ObjVentas.Commit() ' ObjVentas.Commit()
If ObjContPaq IsNot Nothing Then ObjContPaq.Commit() ' If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
ViewState("CveVenta") = ObjFactura.CveVenta ' ViewState("CveVenta") = ObjFactura.CveVenta
Dim SeTimbro As Boolean = False ' Dim SeTimbro As Boolean = False
'TIMBRADO Y CASO ESPECIAL NOTA DE CREDITO ' 'TIMBRADO Y CASO ESPECIAL NOTA DE CREDITO
If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant") Then ' If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant") Then
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso UsuarioActual.Empresa.FacturaProduccion Then ' If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso UsuarioActual.Empresa.FacturaProduccion Then
Dim sw As New Diagnostics.Stopwatch ' Dim sw As New Diagnostics.Stopwatch
sw.Start() ' sw.Start()
'FACTURA INGRESO/EGRESO ' 'FACTURA INGRESO/EGRESO
Dim ObjTimbrado As New Timbrado ' Dim ObjTimbrado As New Timbrado
SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) ' SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura)
sw.Stop() ' sw.Stop()
GuardaLogTimbrado(sw.ElapsedMilliseconds.ToString, UsuarioActual.Empresa.CvePAC) ' GuardaLogTimbrado(sw.ElapsedMilliseconds.ToString, UsuarioActual.Empresa.CvePAC)
End If ' End If
'MENSAJE PRINCIPAL ' 'MENSAJE PRINCIPAL
MensajeAlert.AppendFormat(String.Format("<br/>La {0}: <b>{1}</b> se generó correctamente.<br/><br/>", ObjFactura.TipoDocumento, ObjFactura.SerieFolio)) ' MensajeAlert.AppendFormat(String.Format("<br/>La {0}: <b>{1}</b> se generó correctamente.<br/><br/>", ObjFactura.TipoDocumento, ObjFactura.SerieFolio))
If SeTimbro Then ' If SeTimbro Then
'XML ' 'XML
Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio) ' Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
If File.Exists(ArchivoXML) Then ' If File.Exists(ArchivoXML) Then
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", ObjFactura.CveVenta, "XML", ObjFactura.SerieFolio, ObjFactura.TipoDocto))) ' MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", ObjFactura.CveVenta, "XML", ObjFactura.SerieFolio, ObjFactura.TipoDocto)))
End If ' End If
'IMPRESION ' 'IMPRESION
GeneraPDFFactura(False) ' GeneraPDFFactura(False)
Else ' Else
MensajeAlert.AppendFormat("La factura no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir o póngase en contacto con soporte técnico.") ' MensajeAlert.AppendFormat("La factura no se pudo timbrar.</b> Por favor intentelo de nuevo a traves del boton Emitir o póngase en contacto con soporte técnico.")
End If ' End If
'MUESTA ALERT OK ' 'MUESTA ALERT OK
Dim Liga = If(UsuarioActual.CveRol = 1165, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={ObjFactura.CveCliente}&Opt=3"";") ' Dim Liga = If(UsuarioActual.CveRol = 1165, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={ObjFactura.CveCliente}&Opt=3"";")
retorno = True ' retorno = True
ObjFactura = Nothing ' ObjFactura = Nothing
Else ' Else
ObjVentas.RollBack() ' ObjVentas.RollBack()
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack() ' If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
For Each ErrorItem In ErrorList ' For Each ErrorItem In ErrorList
Alert(ErrorItem, TipoMensaje.MsgAdvertencia) ' Alert(ErrorItem, TipoMensaje.MsgAdvertencia)
Next ' Next
'MUESTA ALERT ERROR ' 'MUESTA ALERT ERROR
Alert("Ocurrió un error al procesar los datos. Por favor rectifique y vuelta a intentar.", TipoMensaje.MsgError) ' Alert("Ocurrió un error al procesar los datos. Por favor rectifique y vuelta a intentar.", TipoMensaje.MsgError)
End If ' End If
ObjVentas.Dispose() ' ObjVentas.Dispose()
ObjConta.Dispose() ' ObjConta.Dispose()
ObjInventario.Dispose() ' ObjInventario.Dispose()
ObjContr.Dispose() ' ObjContr.Dispose()
ErrorList = Nothing ' ErrorList = Nothing
MensajeAlert = Nothing ' MensajeAlert = Nothing
If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose() ' If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
Else 'Else
ObjVentas.RollBack() ' ObjVentas.RollBack()
If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack() ' If ObjContPaq IsNot Nothing Then ObjContPaq.RollBack()
For Each ErrorItem In ErrorList ' For Each ErrorItem In ErrorList
Alert(ErrorItem, TipoMensaje.MsgAdvertencia) ' Alert(ErrorItem, TipoMensaje.MsgAdvertencia)
Next ' Next
'MUESTA ALERT ERROR ' 'MUESTA ALERT ERROR
Alert("Ocurrió un error al procesar los datos. Por favor rectifique y vuelta a intentar.", TipoMensaje.MsgError) ' Alert("Ocurrió un error al procesar los datos. Por favor rectifique y vuelta a intentar.", TipoMensaje.MsgError)
ObjVentas.Dispose() ' ObjVentas.Dispose()
ObjConta.Dispose() ' ObjConta.Dispose()
ObjInventario.Dispose() ' ObjInventario.Dispose()
ObjContr.Dispose() ' ObjContr.Dispose()
'ObjFolios.Dispose() ' 'ObjFolios.Dispose()
ErrorList = Nothing ' ErrorList = Nothing
MensajeAlert = Nothing ' MensajeAlert = Nothing
If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose() ' If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
End If 'End If
Else Else
Mensaje = "No se pudo completar facturación por que no se encontraron partidas " Mensaje = "No se pudo completar facturación por que no se encontraron partidas "
End If End If
End If End If
TmpDT.Clear() TmpDT.Clear()
Return retorno Return Resp
End Function End Function
@@ -467,49 +354,91 @@ Partial Class Contratos_FacturacionMasiva
TmpDT = New DataTable TmpDT = New DataTable
TmpDT.Columns.Add("CveVenta", GetType(Integer)) TmpDT.Columns.Add("CveVenta", GetType(Integer))
TmpDT.Columns.Add("Consec", GetType(Integer)) TmpDT.Columns.Add("Consec", GetType(Integer))
TmpDT.Columns.Add("Cantidad", GetType(Double)) TmpDT.Columns.Add("Cantidad", GetType(Decimal))
TmpDT.Columns.Add("Codigo", GetType(String)) TmpDT.Columns.Add("Codigo", GetType(String))
TmpDT.Columns.Add("CveUM", GetType(Integer)) TmpDT.Columns.Add("CveUM", GetType(Integer))
TmpDT.Columns.Add("UM", GetType(String)) TmpDT.Columns.Add("UM", GetType(String))
TmpDT.Columns.Add("SATClaveUM", GetType(String))
TmpDT.Columns.Add("CveClasificacion", GetType(Integer)) TmpDT.Columns.Add("CveClasificacion", GetType(Integer))
TmpDT.Columns.Add("Clasificacion", GetType(String)) TmpDT.Columns.Add("Clasificacion", GetType(String))
TmpDT.Columns.Add("CvePS", GetType(Integer)) TmpDT.Columns.Add("CvePS", GetType(Integer))
TmpDT.Columns.Add("PS", GetType(String)) TmpDT.Columns.Add("PS", GetType(String))
TmpDT.Columns.Add("CodigoPS", GetType(String)) TmpDT.Columns.Add("CodigoPS", GetType(String))
TmpDT.Columns.Add("SATClaveProdServ", GetType(String))
TmpDT.Columns.Add("NoIdentificacion", GetType(String))
TmpDT.Columns.Add("CveTipoPS", GetType(Integer))
TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer)) TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer))
TmpDT.Columns.Add("SerieLote", GetType(String)) TmpDT.Columns.Add("Serie", GetType(String))
TmpDT.Columns.Add("CuentaPredial", GetType(String))
TmpDT.Columns.Add("Obs", GetType(String)) TmpDT.Columns.Add("Obs", GetType(String))
TmpDT.Columns.Add("TiempoEntrega", GetType(String)) TmpDT.Columns.Add("TiempoEntrega", GetType(String))
TmpDT.Columns.Add("PU", GetType(Double)) TmpDT.Columns.Add("PU", GetType(Decimal))
TmpDT.Columns.Add("IVA", GetType(Double)) TmpDT.Columns.Add("IVA", GetType(Decimal))
TmpDT.Columns.Add("IEPS", GetType(Double)) TmpDT.Columns.Add("ImporteIVA", GetType(Decimal))
TmpDT.Columns.Add("Descuento", GetType(Double)) TmpDT.Columns.Add("PorcentajeIVA", GetType(Decimal))
TmpDT.Columns.Add("ImporteRetIVA", GetType(Decimal))
TmpDT.Columns.Add("ImporteRetISR", GetType(Decimal))
TmpDT.Columns.Add("PorcentajeRetIVA", GetType(Decimal))
TmpDT.Columns.Add("PorcentajeRetISR", GetType(Decimal))
TmpDT.Columns.Add("ImporteIEPS", GetType(Decimal))
TmpDT.Columns.Add("IEPS", GetType(Decimal))
TmpDT.Columns.Add("PorcentajeIEPS", GetType(Decimal))
TmpDT.Columns.Add("Descuento", GetType(Decimal))
TmpDT.Columns.Add("TipoDescuento", GetType(Integer)) TmpDT.Columns.Add("TipoDescuento", GetType(Integer))
TmpDT.Columns.Add("Total", GetType(Double)) TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
TmpDT.Columns.Add("Total", GetType(Decimal))
'Para uso del módulo contable
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer))
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("CveProyecto", GetType(Integer))
TmpDT.Columns.Add("Proyecto", GetType(String)) TmpDT.Columns.Add("Proyecto", GetType(String))
TmpDT.Columns.Add("CveSubProyecto", GetType(Integer)) TmpDT.Columns.Add("CveSubProyecto", GetType(Integer))
TmpDT.Columns.Add("SubProyecto", GetType(String)) TmpDT.Columns.Add("SubProyecto", GetType(String))
TmpDT.Columns.Add("CvePresupuestoIngreso", GetType(Integer)) TmpDT.Columns.Add("CveVentaDetallePadre", GetType(Integer))
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
TmpDT.Columns.Add("CveVentaDetalle", GetType(Integer))
TmpDT.Columns.Add("Observacion", GetType(String))
TmpDT.Columns.Add("SATClaveUM", GetType(String))
TmpDT.Columns.Add("SATClaveProdServ", GetType(String))
TmpDT.Columns.Add("CuentaPredial", GetType(String))
TmpDT.Columns.Add("NoIdentificacion", GetType(String))
TmpDT.Columns.Add("TotalImporte", GetType(Double))
TmpDT.Columns.Add("PorcentajeIVA", GetType(Double))
TmpDT.Columns.Add("ImporteIVA", GetType(Double))
TmpDT.Columns.Add("PorcentajeIEPS", GetType(Double))
TmpDT.Columns.Add("ImporteIEPS", GetType(Double))
TmpDT.Columns.Add("PorcentajeRetIVA", GetType(Double))
TmpDT.Columns.Add("ImporteRetIVA", GetType(Double))
TmpDT.Columns.Add("PorcentajeRetISR", GetType(Double))
TmpDT.Columns.Add("ImporteRetISR", GetType(Double))
'TipoDescuento: 1 = Descuento * PU; 2 = Descuento por Total del concepto
TmpDT.Columns.Add("CvePresupuestoIngreso", GetType(Integer))
TmpDT.Columns.Add("CveFuenteRecaudacion", GetType(Integer))
'Contratos
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
'Remisiones a Facturas
TmpDT.Columns.Add("CveVentaDetalle", GetType(Integer))
TmpDT.Columns.Add("CveVentaDetalleRemision", GetType(Integer))
TmpDT.Columns.Add("CveVentaDetalleCotizacion", GetType(Integer))
'Pedido2 a Facturas
TmpDT.Columns.Add("CveVentaDetallePedido2", GetType(Integer))
TmpDT.Columns.Add("Origen", GetType(Integer))
'Ordenes Servicio
TmpDT.Columns.Add("CveOS", GetType(Integer))
TmpDT.Columns.Add("CveOSDetalle", GetType(Integer))
TmpDT.Columns.Add("SeFacturara", GetType(Integer))
TmpDT.Columns.Add("Folio", GetType(Integer))
TmpDT.Columns.Add("Estatus", GetType(String))
'Ordenamiento
TmpDT.Columns.Add("Orden", GetType(Integer))
TmpDT.Columns.Add("TipoDocto", GetType(String))
'OC
TmpDT.Columns.Add("CveOrdenCompraDetalle", GetType(Integer))
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
TmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal))
TmpDT.Columns.Add("CantidadFacturadaCot", GetType(Decimal))
TmpDT.Columns.Add("CantidadFacturadaPed2", GetType(Decimal))
TmpDT.Columns.Add("CantidadInventario", GetType(Decimal))
TmpDT.Columns.Add("ClaveSATFraccionArancelaria", GetType(String))
TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String))
TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String))
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
End Sub End Sub
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False) Private Sub CreaObjetosVenta(Etiqueta As String, Optional VistaPrevia As Boolean = False)
Dim ObjFolios As New ClsGralFolios() Dim ObjFolios As New ClsGralFolios()
Dim Folio As String = "" Dim Folio As String = ""
Dim Serie As String = "" Dim Serie As String = ""
@@ -518,10 +447,9 @@ Partial Class Contratos_FacturacionMasiva
Dim Proyecto As String = "" Dim Proyecto As String = ""
Dim SubProyecto As String = "" Dim SubProyecto As String = ""
ObjFactura = New Modelos.Factura(UsuarioActual)
ObjFactura.DirectorioServidor = Server.MapPath("/")
ObjFactura = New Modelos.Factura ObjFactura.CveCicloComercial = CveCicloComercial
Dim objContratos As New ClsContratos
Dim DR As DataRow = DTCicloComercial.FiltroPrimero($"CveCicloComercial = {CveCicloComercial}") Dim DR As DataRow = DTCicloComercial.FiltroPrimero($"CveCicloComercial = {CveCicloComercial}")
ObjFactura.Version = "3.3" ObjFactura.Version = "3.3"
@@ -544,7 +472,7 @@ Partial Class Contratos_FacturacionMasiva
ObjFactura.MetodoPago = "Efectivo" ObjFactura.MetodoPago = "Efectivo"
ObjFactura.FechaPago = DateTime.Today ObjFactura.FechaPago = DateTime.Today
ObjFactura.MotivoDescuento = "" ObjFactura.MotivoDescuento = ""
ObjFactura.Observaciones = DR("Observaciones").ToString ObjFactura.Observaciones = Etiqueta + " " + TxtObservaciones.Text + " " + DR("Observaciones").ToString
ObjFactura.FechaEjecucion = DateTime.Today ObjFactura.FechaEjecucion = DateTime.Today
'ObjFactura.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {1}") 'ObjFactura.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {1}")
ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.UsuarioCreo = UsuarioActual.Usuario
@@ -589,13 +517,14 @@ Partial Class Contratos_FacturacionMasiva
End If End If
ObjFolios.Dispose() ObjFolios.Dispose()
Dim objContratos As New ClsContratos
If objContratos.GetContratosDetalle(DR("CveContrato").ToString.ToEntero) Then If objContratos.GetContratosDetalle(DR("CveContrato").ToString.ToEntero) Then
DTDetalle = objContratos.DtResultados DTDetalle = objContratos.DtResultados
Else Else
DTDetalle = Nothing DTDetalle = Nothing
End If End If
objContratos.Dispose() objContratos.Dispose()
Dim DtR As DataRow Dim DtR As DataRow
ObjFactura.SubTotal = SUM(DTDetalle, "Total").ToDecimal ObjFactura.SubTotal = SUM(DTDetalle, "Total").ToDecimal
ObjFactura.IVA = SUM(DTDetalle, "ImporteIVA").ToDecimal ObjFactura.IVA = SUM(DTDetalle, "ImporteIVA").ToDecimal
@@ -607,6 +536,8 @@ Partial Class Contratos_FacturacionMasiva
ObjFactura.Folio = Folio.ToEntero ObjFactura.Folio = Folio.ToEntero
For Each row As DataRow In DTDetalle.Rows For Each row As DataRow In DTDetalle.Rows
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=row("CvePS").ToString().ToEntero()).FiltroPrimero("")
DtR = TmpDT.NewRow DtR = TmpDT.NewRow
DtR("CveVenta") = -1 DtR("CveVenta") = -1
DtR("Codigo") = row("Codigo") DtR("Codigo") = row("Codigo")
@@ -614,27 +545,18 @@ Partial Class Contratos_FacturacionMasiva
DtR("Cantidad") = row("CantidadContratada") DtR("Cantidad") = row("CantidadContratada")
DtR("CveUM") = row("CveUM") DtR("CveUM") = row("CveUM")
DtR("UM") = row("UM") DtR("UM") = row("UM")
DtR("SATClaveUM") = row("SATClaveUM")
DtR("CveClasificacion") = row("CveClasificacion") DtR("CveClasificacion") = row("CveClasificacion")
DtR("Clasificacion") = row("Clasificacion") DtR("Clasificacion") = row("Clasificacion")
DtR("CvePS") = row("CvePS") DtR("CvePS") = row("CvePS")
DtR("PS") = row("PS") DtR("PS") = row("PS")
DtR("CodigoPS") = row("CodigoPS") DtR("CodigoPS") = row("CodigoPS")
DtR("Obs") = ""
DtR("PU") = row("PU")
DtR("Descuento") = 0
DtR("TipoDescuento") = 0
DtR("CveProyecto") = CveProyecto
DtR("Proyecto") = Proyecto
DtR("CveSubProyecto") = CveSubProyecto
DtR("SubProyecto") = SubProyecto
DtR("CveVentaDetalle") = 0
DtR("CveContratoDetalle") = row("CveContratoDetalle")
DtR("Observacion") = row("Observacion")
DtR("SATClaveUM") = row("SATClaveUM")
DtR("SATClaveProdServ") = row("SATClaveProdServ") DtR("SATClaveProdServ") = row("SATClaveProdServ")
DtR("CuentaPredial") = row("CuentaPredial")
DtR("NoIdentificacion") = row("NoIdentificacion") DtR("NoIdentificacion") = row("NoIdentificacion")
DtR("TotalImporte") = row("Total") DtR("CveTipoPS") = DrPS("CveTipoPS")
DtR("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario")
DtR("Obs") = Etiqueta + " " + TxtObservaciones.Text + " " + row("Observacion").ToString
DtR("PU") = row("PU")
DtR("IVA") = row("PorcentajeIVA") DtR("IVA") = row("PorcentajeIVA")
DtR("PorcentajeIVA") = row("PorcentajeIVA") DtR("PorcentajeIVA") = row("PorcentajeIVA")
DtR("ImporteIVA") = row("ImporteIVA") DtR("ImporteIVA") = row("ImporteIVA")
@@ -644,6 +566,17 @@ Partial Class Contratos_FacturacionMasiva
DtR("ImporteRetIVA") = row("ImporteRetIVA") DtR("ImporteRetIVA") = row("ImporteRetIVA")
DtR("PorcentajeRetISR") = row("PorcentajeRetISR") DtR("PorcentajeRetISR") = row("PorcentajeRetISR")
DtR("ImporteRetISR") = row("ImporteRetISR") DtR("ImporteRetISR") = row("ImporteRetISR")
DtR("Descuento") = 0
DtR("TipoDescuento") = 0
DtR("CveProyecto") = CveProyecto
DtR("Proyecto") = Proyecto
DtR("CveSubProyecto") = CveSubProyecto
DtR("SubProyecto") = SubProyecto
DtR("CveVentaDetalle") = 0
DtR("CveContratoDetalle") = row("CveContratoDetalle")
DtR("CuentaPredial") = row("CuentaPredial")
DtR("TotalImporte") = row("Total")
TmpDT.Rows.Add(DtR) TmpDT.Rows.Add(DtR)
Next Next
@@ -954,6 +887,8 @@ Partial Class Contratos_FacturacionMasiva
Multiplicador = (Row("Multiplicador").ToString.ToEntero) Multiplicador = (Row("Multiplicador").ToString.ToEntero)
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", "") Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", "")
Dim PorcentajeImpuesto As Decimal = 0
Select Case ConceptoContable Select Case ConceptoContable
Case 1 'Cliente Case 1 'Cliente
If ObjFactura.TipoDocto <> "Egs" Then If ObjFactura.TipoDocto <> "Egs" Then
@@ -1077,6 +1012,7 @@ Partial Class Contratos_FacturacionMasiva
FechaMovimiento = ObjFactura.FechaPago FechaMovimiento = ObjFactura.FechaPago
IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar IdCtaContable = UsuarioActual.Empresa.IdCuentaIVAxTrasladar
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
PorcentajeImpuesto = TmpDTDetalle.MAX("PorcentajeIVA").ToDecimal
Case 38 'IEPS por Trasladar Case 38 'IEPS por Trasladar
If Not ObjFactura.TipoDocto.Contiene("Rem") Then If Not ObjFactura.TipoDocto.Contiene("Rem") Then
@@ -1090,6 +1026,7 @@ Partial Class Contratos_FacturacionMasiva
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxTrasladarSIG").ToString.ToEntero CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxTrasladarSIG").ToString.ToEntero
End If End If
End If End If
PorcentajeImpuesto = TmpDTDetalle.MAX("PorcentajeIEPS").ToDecimal
End If End If
End Select End Select
@@ -1101,7 +1038,7 @@ Partial Class Contratos_FacturacionMasiva
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento)) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), PorcentajeImpuesto:=PorcentajeImpuesto) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Else Else
ViewState("SeGuardoPrePoliza") = True ViewState("SeGuardoPrePoliza") = True

View File

@@ -460,7 +460,7 @@
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName> <rd:DefaultName>Textbox1</rd:DefaultName>
<Top>0.9533cm</Top> <Top>0.9533cm</Top>
<Left>0.23022cm</Left> <Left>0.21008cm</Left>
<Height>0.66127cm</Height> <Height>0.66127cm</Height>
<Width>9.36417cm</Width> <Width>9.36417cm</Width>
<ZIndex>2</ZIndex> <ZIndex>2</ZIndex>
@@ -769,10 +769,11 @@
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
<Format>dd/MM/yyyy</Format>
</Style> </Style>
</TextRun> </TextRun>
<TextRun> <TextRun>
<Value>=Parameters!FechaEntrega.Value</Value> <Value>=Left(Parameters!FechaEntrega.Value,10)</Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
@@ -1869,7 +1870,7 @@
<Height>8.91698in</Height> <Height>8.91698in</Height>
<Style /> <Style />
</Body> </Body>
<Width>7.657in</Width> <Width>7.66009in</Width>
<Page> <Page>
<PageHeader> <PageHeader>
<Height>3.39287cm</Height> <Height>3.39287cm</Height>
@@ -2201,7 +2202,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Fecha Impresión:</Value> <Value>Fecha Impresion:</Value>
<Style> <Style>
<FontSize>9pt</FontSize> <FontSize>9pt</FontSize>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
@@ -2520,8 +2521,9 @@
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="FechaEntrega"> <ReportParameter Name="FechaEntrega">
<DataType>DateTime</DataType> <DataType>String</DataType>
<Nullable>true</Nullable> <Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="ResponsableCarga"> <ReportParameter Name="ResponsableCarga">

View File

@@ -4204,7 +4204,7 @@ Partial Class Inventarios_EntradasSalidas
TxtnSerie.Text = "" TxtnSerie.Text = ""
TxtnLote.Text = "" TxtnLote.Text = ""
TxtnFechaCaducidad.Text = "" TxtnFechaCaducidad.Text = ""
DdlSeccionAlmacen.SelectedValue = "-1" 'DdlSeccionAlmacen.SelectedValue = "-1"
NumAgregados = NumAgregados + 1 NumAgregados = NumAgregados + 1
End If End If

View File

@@ -199,7 +199,10 @@ Partial Class Inventarios_PrestamosdeProveedor
CveSubProyecto = ObjInventario.DtResultados.FiltraParametros($"CveAlmacen = {DdlAlmacenOrigen.SelectedValue.ToEntero } ").FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero CveSubProyecto = ObjInventario.DtResultados.FiltraParametros($"CveAlmacen = {DdlAlmacenOrigen.SelectedValue.ToEntero } ").FiltroPrimeroValor("CveSubProyecto").ToString.ToEntero
End If End If
If CveSubProyecto <= 0 Then
Alert("Debe de asignar un sub proyecto o centro de costos.", TipoMensaje.MsgAdvertencia)
ErrorMovInv = True
End If
Dim CveClasifCosto As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", String.Format("CvePS ={0} ", CvePS)) Dim CveClasifCosto As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", String.Format("CvePS ={0} ", CvePS))
IdCtaContableOtro = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasifCosto}").ToEntero IdCtaContableOtro = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasifCosto}").ToEntero

View File

@@ -360,6 +360,18 @@
</div> </div>
</div> </div>
</div> </div>
<%--ADVERTENCIA--%>
<div class="row">
<div class="col-md-12" style="vertical-align: middle;" align="center">
<div style="z-index: 5; position: relative;">
<div id="DivTraspasoDevolucion" visible="false" clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
<asp:Literal Text="La mercancía sera trasladada desde el almacen seleccionado al almacén de devolución" ID="LtlTextoDevolucion" runat="server"></asp:Literal>
</div>
</div>
</div>
</div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -418,7 +430,7 @@
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:GridView ID="GvInv" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True" <asp:GridView ID="GvInv" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
DataKeyNames="EntregaDirecta,Consec,CodigoBarras,CvePS,CveUM,PU,CantidadC,CantidadF,UM,PS,CveCompraDetalle,CveOrdenCompraDetalle,PUExtranjero,AplicaSerieLote,CveClasificacion,Codigo,CveVentaDetalle,CostoIndirecto,CveTamaño,Lote,AplicaSeccion,AplicaLote,AplicaCaducidad,AplicaSerie,CveAlmacenDevolucionProveedor" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None"> DataKeyNames="EntregaDirecta,Consec,CodigoBarras,CvePS,CveUM,PU,CantidadC,CantidadF,UM,PS,CveCompraDetalle,CveOrdenCompraDetalle,PUExtranjero,AplicaSerieLote,CveClasificacion,Codigo,CveVentaDetalle,CostoIndirecto,CveTamaño,Lote,AplicaSeccion,AplicaLote,AplicaCaducidad,AplicaSerie" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
<HeaderStyle Height="58px" /> <HeaderStyle Height="58px" />
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
@@ -1005,6 +1017,13 @@
}); });
} }
if ($('#DivTraspasoDevolucion')) {
$("#DivTraspasoDevolucion").pulsate("destroy");
jQuery('#DivTraspasoDevolucion').pulsate({
color: "#faebcc"
});
}
}); });
} }

View File

@@ -377,7 +377,7 @@ Partial Class Inventarios_RecepcionAlmacen
ViewState("CveVendedor") = value ViewState("CveVendedor") = value
End Set End Set
End Property End Property
Private Property RealizarTraspasoAlmacenDevolucion() As Boolean Private Property RealizarTraspasoAlmacenDevolucion As Boolean
Get Get
Return If(IsNothing(ViewState("RealizarTraspasoAlmacenDevolucion")), False, CBool(ViewState("RealizarTraspasoAlmacenDevolucion"))) Return If(IsNothing(ViewState("RealizarTraspasoAlmacenDevolucion")), False, CBool(ViewState("RealizarTraspasoAlmacenDevolucion")))
End Get End Get
@@ -725,7 +725,7 @@ Partial Class Inventarios_RecepcionAlmacen
Dim DtPendientes As New DataTable Dim DtPendientes As New DataTable
If ObjInventarios.ComprasPendientesAlmacenGet(-1, TxtFechaPendientes.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If ObjInventarios.ComprasPendientesAlmacenGet(-1, TxtFechaPendientes.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
Dim FiltroTemporal = If(UsuarioActual.CveEmpresa.Contiene(119, 140), "AND TipoDocto IN ('Fac','NC','DEV')", "AND TipoDocto IN ('Fac')") Dim FiltroTemporal = If(UsuarioActual.CveEmpresa.Contiene(119, 140, 1, 72, 80), "AND TipoDocto IN ('Fac','NC','DEV')", "AND TipoDocto IN ('Fac')")
DtPendientes = ObjInventarios.DtResultados.FiltraParametros($"CantOC >= 0 {FiltroTemporal}") DtPendientes = ObjInventarios.DtResultados.FiltraParametros($"CantOC >= 0 {FiltroTemporal}")
Else Else
DtPendientes = Nothing DtPendientes = Nothing
@@ -926,11 +926,16 @@ Partial Class Inventarios_RecepcionAlmacen
DtRecepcion = ObjInventario.DtResultados.Copy() DtRecepcion = ObjInventario.DtResultados.Copy()
End If End If
If TipoMovimiento = 2 AndAlso GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=21).Rows.Count > 0 Then CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero
If TipoMovimiento = 2 AndAlso CveAlmacenDevolucionProveedor > 0 Then
RealizarTraspasoAlmacenDevolucion = True RealizarTraspasoAlmacenDevolucion = True
CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero
'CreaDTAlmacenDevolucion() DivTraspasoDevolucion.Visible = True
'CargaAlmacenes(-1, "21", CveTipoCompra) LtlTextoDevolucion.Text = "La mercancía sera trasladada desde el almacen seleccionado al almacén de devolución"
ElseIf TipoMovimiento = 2 AndAlso GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=21).Rows.Count = 0 Then
LtlTextoDevolucion.Text = "La mercancía sera devuelta ha el almacen seleccionado."
DivTraspasoDevolucion.Visible = True
End If End If
DtDatosDetalle = Nothing DtDatosDetalle = Nothing
@@ -1115,6 +1120,7 @@ Partial Class Inventarios_RecepcionAlmacen
CveFleteSurtir = pCveImportacion CveFleteSurtir = pCveImportacion
CveFleteOrdenCompra = ObjInventario.DtResultados.Rows(0)("CveOC").ToString.ToEntero CveFleteOrdenCompra = ObjInventario.DtResultados.Rows(0)("CveOC").ToString.ToEntero
CveFleteCompra = ObjInventario.DtResultados.Rows(0)("CveCompra").ToString.ToEntero CveFleteCompra = ObjInventario.DtResultados.Rows(0)("CveCompra").ToString.ToEntero
CveImportacionCompra = CveFleteCompra ' se iguala para que al guardar el movimiento, se toma esta variable
LbProveedor.Text = ObjInventario.DtResultados.Rows(0)("RazonSocial").ToString LbProveedor.Text = ObjInventario.DtResultados.Rows(0)("RazonSocial").ToString
HLFolio.Text = ObjInventario.DtResultados.Rows(0)("Folio").ToString HLFolio.Text = ObjInventario.DtResultados.Rows(0)("Folio").ToString
If UsuarioActual.TienePermisoProceso(201) Then If UsuarioActual.TienePermisoProceso(201) Then
@@ -3261,7 +3267,7 @@ Partial Class Inventarios_RecepcionAlmacen
Msg.AppendFormat("Movimiento de Salida: Folio: <b>{0}</b>", String.Format("<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimientoSalidaTraspaso, FolioSalidaTraspaso)) Msg.AppendFormat("Movimiento de Salida: Folio: <b>{0}</b>", String.Format("<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimientoSalidaTraspaso, FolioSalidaTraspaso))
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalidaTraspaso))) Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalidaTraspaso)))
Msg.AppendFormat("<br/>Movimiento de Entrada: Folio: <b>{0}</b>", link) Msg.AppendFormat("<br/><br/>Movimiento de control: Folio: <b>{0}</b>", link)
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento))) Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
End If End If

View File

@@ -259,8 +259,7 @@
data-toggle="confirmation" data-popout="true" data-original-title="¿Confirmar autorización?" data-btn-ok-label="Si" OnClick="LnkAceptarTraslado_Click"></asp:LinkButton> data-toggle="confirmation" data-popout="true" data-original-title="¿Confirmar autorización?" data-btn-ok-label="Si" OnClick="LnkAceptarTraslado_Click"></asp:LinkButton>
</div> </div>
<div class="col-md-6" style="text-align:center!important"> <div class="col-md-6" style="text-align:center!important">
<asp:LinkButton runat="server" Text ="Rechazar" ID="LnkRechazarTraslado" CssClass="btn btn-danger" <asp:LinkButton runat="server" Text ="Rechazar" ID="LnkRechazarTraslado" CssClass="btn btn-danger" OnClick="LnkRechazarTraslado_Click" ></asp:LinkButton>
data-toggle="confirmation" data-popout="true" data-original-title="¿Confirmar rechazo?" data-btn-ok-label="Si" OnClick="LnkRechazarTraslado_Click" ></asp:LinkButton>
</div> </div>
</div> </div>
@@ -308,7 +307,7 @@
<%--<asp:BoundField HeaderText="Direccion Envio" HeaderStyle-HorizontalAlign="Left" DataField="DireccionEnvio" ItemStyle-Width="20%" />--%> <%--<asp:BoundField HeaderText="Direccion Envio" HeaderStyle-HorizontalAlign="Left" DataField="DireccionEnvio" ItemStyle-Width="20%" />--%>
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="20%" /> <asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Precio" HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:c}" ItemStyle-HorizontalAlign="Right" DataField="Precio" Visible="false" ItemStyle-Width="5%" /> <asp:BoundField HeaderText="Precio" HeaderStyle-HorizontalAlign="Right" DataFormatString="{0:c}" ItemStyle-HorizontalAlign="Right" DataField="Precio" Visible="false" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Serie" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" DataField="Serie" Visible="false" ItemStyle-Width="5%" /> <asp:BoundField HeaderText="Serie" DataField="Serie" Visible="false" ItemStyle-Width="5%" />
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%"> <asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="imgD" runat="server" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="Si" /> <asp:LinkButton ID="imgD" runat="server" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="Si" />
@@ -500,6 +499,51 @@
</div> </div>
</div> </div>
<div id="ModalRechazarTraslado" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalRechazo" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<asp:Literal ID="Literal3" runat="server">Rechazar solicitud</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="portlet-body rowpadding">
<div class="row">
<div class="col-md-10 form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtMotivoRechazo" CssClass="form-control marginFixRow" runat="server" MaxLength="200" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtMotivoRechazo.ClientID.ToString()%>">Motivo de rechazo:</label>
<asp:RequiredFieldValidator ID="RfvTxtMotivoRechazo" runat="server" ControlToValidate="TxtMotivoRechazo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo de rechazo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRechazo"></asp:RequiredFieldValidator>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<div class="row">
<div class="col-md-12">
<asp:Button ID="BtnModalRechazo" runat="server" class="btn btn-danger" Text="Rechazar" Style="margin-left: -100px;" ValidationGroup="GrpRechazo"
data-toggle="confirmation" data-popout="true" data-original-title="¿Confirmar rechazo?" data-btn-ok-label="Si" OnClick="BtnModalRechazo_Click" />
<button id="btnModalRechazoCerrar" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content> </asp:Content>

View File

@@ -36,19 +36,19 @@ Partial Class Inventarios_TrasladoSolicitud
ViewState("CveDireccionEnvio") = value ViewState("CveDireccionEnvio") = value
End Set End Set
End Property End Property
'Private Property CveUsuarioAutoriza As Integer Private Property CveUsuarioSolicita As Integer
' Get Get
' If ViewState("CveUsuarioAutoriza") Is Nothing Then If ViewState("CveUsuarioSolicita") Is Nothing Then
' Return -1 Return -1
' Else Else
' Return CType(ViewState("CveUsuarioAutoriza"), Integer) Return CType(ViewState("CveUsuarioSolicita"), Integer)
' End If End If
' End Get End Get
' Set(value As Integer) Set(value As Integer)
' ViewState("CveUsuarioAutoriza") = value ViewState("CveUsuarioSolicita") = value
' End Set End Set
'End Property End Property
#End Region #End Region
@@ -158,7 +158,7 @@ Partial Class Inventarios_TrasladoSolicitud
LbFolio.Text = ObjInventarios.DtResultados.Rows(0)("FolioTraspaso").ToString LbFolio.Text = ObjInventarios.DtResultados.Rows(0)("FolioTraspaso").ToString
TxtObservaciones.Text = ObjInventarios.DtResultados.Rows(0)("ObservacionesTraspaso").ToString TxtObservaciones.Text = ObjInventarios.DtResultados.Rows(0)("ObservacionesTraspaso").ToString
TempDT = ObjInventarios.DtResultados
GvDatos.DataSource = ObjInventarios.DtResultados GvDatos.DataSource = ObjInventarios.DtResultados
GvDatos.DataBind() GvDatos.DataBind()
@@ -178,6 +178,8 @@ Partial Class Inventarios_TrasladoSolicitud
HplContrato.Text = ObjInventarios.DtResultados.Rows(0)("DescripcionContrato").ToString HplContrato.Text = ObjInventarios.DtResultados.Rows(0)("DescripcionContrato").ToString
HplContrato.NavigateUrl = $"/Contratos/Contrato.aspx?CveContrato={ObjInventarios.DtResultados.Rows(0)("CveContrato").ToString.ToEntero}" HplContrato.NavigateUrl = $"/Contratos/Contrato.aspx?CveContrato={ObjInventarios.DtResultados.Rows(0)("CveContrato").ToString.ToEntero}"
CveUsuarioSolicita = ObjInventarios.DtResultados.Rows(0)("CveUsuario").ToString.ToEntero
'25/04/2018 '25/04/2018
CveDireccionEnvio = ObjInventarios.DtResultados.Rows(0)("CveDireccionEnvio").ToString.ToEntero CveDireccionEnvio = ObjInventarios.DtResultados.Rows(0)("CveDireccionEnvio").ToString.ToEntero
If CveDireccionEnvio > 0 And ObjClientes.DireccionEnvioGet(CveDireccionEnvio, -1, -1) Then If CveDireccionEnvio > 0 And ObjClientes.DireccionEnvioGet(CveDireccionEnvio, -1, -1) Then
@@ -269,6 +271,7 @@ Partial Class Inventarios_TrasladoSolicitud
LblEstatusAutorizo.Text = If(EstatusAlmacen = 2, "Aceptado", "Rechazado") LblEstatusAutorizo.Text = If(EstatusAlmacen = 2, "Aceptado", "Rechazado")
LblUsaurioAutorizo.Text = ObjInventarios.DtResultados.Rows(0)("NombreAutoriza").ToString() LblUsaurioAutorizo.Text = ObjInventarios.DtResultados.Rows(0)("NombreAutoriza").ToString()
LblFechaAutoriza.Text = ObjInventarios.DtResultados.Rows(0)("FechaAutorizacion").ToString().ToDate().ToString("dd/MM/yyyy") LblFechaAutoriza.Text = ObjInventarios.DtResultados.Rows(0)("FechaAutorizacion").ToString().ToDate().ToString("dd/MM/yyyy")
GvDatos.Columns(6).Visible = False ' se oculta la columna de eliminar
End If End If
@@ -993,15 +996,85 @@ Partial Class Inventarios_TrasladoSolicitud
CargaDatos() CargaDatos()
End Sub End Sub
Protected Sub LnkRechazarTraslado_Click(sender As Object, e As EventArgs) Protected Sub LnkRechazarTraslado_Click(sender As Object, e As EventArgs)
TxtMotivoRechazo.Text = ""
UpModalRechazo.Update()
RegistraScript("$('#ModalRechazarTraslado').modal();")
End Sub
Protected Sub BtnModalRechazo_Click(sender As Object, e As EventArgs)
RechazarTraslado()
End Sub
Private Sub RechazarTraslado()
Dim ErrorProceso As Boolean = False
If TxtMotivoRechazo.Text.Trim.Length.ToEntero = 0 Then
Alert("El motivo de rechazo es necesario", TipoMensaje.MsgAdvertencia)
End If
Dim ObjInven As New ClsInventarios Dim ObjInven As New ClsInventarios
If ObjInven.UpdateTrasladoAutorizar(CveTraspasoSolicitud, UsuarioActual.CveEmpresa, 3, UsuarioActual.CveUsuario, Now) Then If ObjInven.UpdateTrasladoAutorizar(CveTraspasoSolicitud, UsuarioActual.CveEmpresa, 3, UsuarioActual.CveUsuario, Now) Then
Alert("Rechazado correctamente.") Alert("Rechazado correctamente.")
ErrorProceso = False
Else
ErrorProceso = True
End If End If
ObjInven.Dispose() ObjInven.Dispose()
CargaDatos() If Not ErrorProceso Then
MandaCorreoRechazo(LbFolio.Text.ToEntero, CveTraspasoSolicitud, CveUsuarioSolicita, TxtMotivoRechazo.Text)
CargaDatos()
RegistraScript("$('#ModalRechazarTraslado').modal('hide');")
End If
End Sub
Private Sub MandaCorreoRechazo(Folio As Integer, CveTraspasoSolicitud As Integer, CveUsuarioSolicita As Integer, MotivoRechazo As String)
Dim SB As New StringBuilder
Dim CorreoDestino As String = GlobalDTUsuarios(CveUsuarioSolicita)(0)("Correo").ToString.Trim
If CorreoDestino.Length > 0 Then
SB.AppendLine($"<p>Se ha rechazado la solicitud de traspaso con folio {Folio}, el traspaso fue rechazado por el usuario {UsuarioActual.Nombre }, el traspaso fue rechazado por el motivo: {MotivoRechazo} </p>")
SB.AppendLine("<br>")
SB.AppendLine("<table border = '0'>")
SB.AppendLine("<tr style='color:white;background-color:#808080;' ><th>Cantidad</th> <th>U.M.</th> <th>Producto</th> <th>Observaciones</th> </tr>")
For Each GvRow As GridViewRow In GvDatos.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
SB.AppendLine($"<tr style='background-color:#F2F2F0;'> <td>{GvRow.DataKey("Cantidad")}</td> <td>{GvRow.DataKey("UnidadMedida")}</td> <td>{GvRow.DataKey("CodigoPS")}</td> <td>{GvRow.DataKey("Observaciones")}</td> </tr>")
End If
Next
SB.AppendLine("</table>")
SB.AppendLine("<br>")
SB.AppendLine($"<strong> <a href='{Request.Url.GetLeftPart(UriPartial.Authority)}/Inventarios/TrasladoSolicitud.aspx?CveTraspasoSolicitud={CveTraspasoSolicitud}'>Ir a solicitud de traspaso folio {Folio}</a></strong>")
Dim MandaCorre As New ClsSisMail
MandaCorre.SendMail(ClsPaginas.EmpresaNotificaciones, CorreoDestino, $"Rechazo de Autorización de traspaso #{Folio}", SB.ToString, Displayname:="SIG Notificaciones: Rechazo de Traspaso")
End If
End Sub End Sub
@@ -1056,5 +1129,6 @@ Partial Class Inventarios_TrasladoSolicitud
Next Next
GvDatos.Columns(5).Visible = Mostrar GvDatos.Columns(5).Visible = Mostrar
End Sub End Sub
End Class End Class

View File

@@ -174,6 +174,8 @@
<label class="col-md-2">Chofer:</label> <label class="col-md-2">Chofer:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlChofer" runat="server" DataTextField="Chofer" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList> <asp:DropDownList ID="DdlChofer" runat="server" DataTextField="Chofer" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlChofer" runat="server" Enabled="false" ControlToValidate="DdlChofer" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceDdlChofer" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlChofer" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<label class="col-md-2">F. Entrega:</label> <label class="col-md-2">F. Entrega:</label>
<div class="col-md-2" style="padding-left: 5px; padding-top: 0px;"> <div class="col-md-2" style="padding-left: 5px; padding-top: 0px;">
@@ -196,15 +198,21 @@
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="Placa"></asp:DropDownList> <asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="Placa"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlUnidadCamion" runat="server" Enabled="false" ControlToValidate="DdlUnidadCamion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceDdlUnidadCamion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidadCamion" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<div id="divPlacaEspecificacion" runat="server"> <div id="divPlacaEspecificacion" runat="server">
<label class="col-md-2">Placa:</label> <label class="col-md-2">Placa:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:TextBox runat="server" Text="" ID="TxtPlaca" CssClass="form-control" /> <asp:TextBox runat="server" Text="" ID="TxtPlaca" CssClass="form-control" />
<asp:RequiredFieldValidator ID="RfvTxtPlaca" runat="server" Enabled="false" ControlToValidate="TxtPlaca" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceTxtPlaca" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtPlaca" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<label class="col-md-2">Especificación de la Unidad:</label> <label class="col-md-2">Especificación de la Unidad:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:TextBox runat="server" Text="" ID="TxtEspecifUnidad" CssClass="form-control" /> <asp:TextBox runat="server" Text="" ID="TxtEspecifUnidad" CssClass="form-control" />
<asp:RequiredFieldValidator ID="RfvTxtEspecifUnidad" runat="server" Enabled="false" ControlToValidate="TxtEspecifUnidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Especificación Unidad''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceTxtEspecifUnidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtEspecifUnidad" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</div> </div>
</div> </div>
@@ -383,7 +391,7 @@
<th width="160px">Comandos</th> <th width="160px">Comandos</th>
</tr> </tr>
</thead> </thea>
<tr> <tr>
<td></td> <td></td>
<td align="center"> <td align="center">
@@ -396,6 +404,8 @@
</td> </td>
<td> <td>
<asp:DropDownList ID="DdlUnidad" runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="form-control input-sm select2me" Style="width: 85px !important;"></asp:DropDownList> <asp:DropDownList ID="DdlUnidad" runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="form-control input-sm select2me" Style="width: 85px !important;"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlUnidad" runat="server" ControlToValidate="DdlUnidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceDdlUnidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlUnidad" Width="350px"></ajax:ValidatorCalloutExtender>
</td> </td>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:UpdatePanel runat="server"> <asp:UpdatePanel runat="server">

View File

@@ -209,6 +209,14 @@ Partial Class Inventarios_TraspasoAlmacen
If UsuarioActual.CveEmpresa.Contiene(1, 119) Then If UsuarioActual.CveEmpresa.Contiene(1, 119) Then
DivEmitirTimbrado.Visible = True DivEmitirTimbrado.Visible = True
LblEmitirTimbrado.Visible = True LblEmitirTimbrado.Visible = True
ChkEmitirTimbrado.Checked = True
Dim HabilitarValidators As Boolean = UsuarioActual.CveEmpresa.Contiene(119)
RfvDdlChofer.Enabled = HabilitarValidators
RfvDdlUnidadCamion.Enabled = HabilitarValidators
RfvTxtPlaca.Enabled = HabilitarValidators
RfvTxtEspecifUnidad.Enabled = HabilitarValidators
End If End If
CantidadTotal = 0 CantidadTotal = 0
@@ -1448,6 +1456,8 @@ Partial Class Inventarios_TraspasoAlmacen
TxtResponsable.Text = "" TxtResponsable.Text = ""
TxtGastoIndirecto.Text = "" TxtGastoIndirecto.Text = ""
RegistraScript("$('#DivTransitorio').show(200);$('#DivGastoIndirecto').show(100);$('#DivDocChofer').show(100);") RegistraScript("$('#DivTransitorio').show(200);$('#DivGastoIndirecto').show(100);$('#DivDocChofer').show(100);")
ChkEmitirTimbrado.Checked = LblEmitirTimbrado.Visible
Else Else
RegistraScript("$('#DivTransitorio').hide(500);$('#DivGastoIndirecto').hide(500);$('#DivDocChofer').hide(500);") RegistraScript("$('#DivTransitorio').hide(500);$('#DivGastoIndirecto').hide(500);$('#DivDocChofer').hide(500);")
End If End If

View File

@@ -2819,6 +2819,12 @@ Partial Class OC
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
If DdlSubProyecto.SelectedValue <= 0 Then
Alert("Debe de asignar un sub proyecto o centro de costos.", TipoMensaje.MsgAdvertencia)
TieneError = True
Exit For
End If
If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then
ImporteME = (DiferenciaInvOC / TCInvOC).RoundSQL() ImporteME = (DiferenciaInvOC / TCInvOC).RoundSQL()
ImporteMEComp = (DiferenciaInvOC - ImporteME).RoundSQL() ImporteMEComp = (DiferenciaInvOC - ImporteME).RoundSQL()
@@ -2834,8 +2840,6 @@ Partial Class OC
' Exit For ' Exit For
'End If 'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, 177, SerieFolio, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, 177, SerieFolio, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
TieneError = True TieneError = True
Exit For Exit For

View File

@@ -2822,6 +2822,32 @@
</asp:GridView> </asp:GridView>
</div> </div>
</div> </div>
<div class="portlet box blue-hoki">
<div class="portlet-title">
<div class="caption ">
<i class="icon-user-following bold "></i>
<span class="caption-subject uppercase">Pagos no bancarios</span>
</div>
<div class="tools"><a href="javascript;" class="collapse" data-original-title="" title=""></a></div>
</div>
<div class="portlet-body ">
<asp:GridView ID="GvPagosNoBancarios" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron pagos no bancarios" Width="50%"
CssClass="table table-striped table-advance table-hover ScrollAD" data-sort="false" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None" DataKeyNames="CvePrePoliza,CveCompra,CveVenta,CvePersonal,ImporteMN,VentaSerieFolio,CompraSerieFolio,NombreCompleto,FechaIng,Abreviatura">
<Columns>
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString = "{0:dd/MM/yyyy}"/>
<asp:HyperLinkField HeaderText="Venta Serie Folio" DataTextField="VentaSerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}"/>
<asp:HyperLinkField HeaderText="Compra Serie Folio" DataTextField="CompraSerieFolio" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}"/>
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlImp" runat="server" Text='<%# Eval("ImporteMN", "{0:N2}")%>'></asp:Literal>
<asp:Literal ID="LtlMon" runat="server" Text='<%# Eval("Abreviatura")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<div class="portlet box blue-hoki"> <div class="portlet box blue-hoki">
<div class="portlet-title"> <div class="portlet-title">
<div class="caption "> <div class="caption ">

View File

@@ -1509,7 +1509,8 @@ Partial Class RH_Personal
'Carga Conceptos de Nómina 'Carga Conceptos de Nómina
CarcaConceptosNomina() CarcaConceptosNomina()
'Carga Pagos no Bancarios
CargarPagosNoBancarios()
'Carga Resguardos 'Carga Resguardos
Dim ObjResguardos As New ClsAF Dim ObjResguardos As New ClsAF
If ObjResguardos.GetActivosFijosResguardos(-1, -1, CvePersonal, -1) Then If ObjResguardos.GetActivosFijosResguardos(-1, -1, CvePersonal, -1) Then
@@ -6338,4 +6339,13 @@ Partial Class RH_Personal
End Sub End Sub
Private Sub CargarPagosNoBancarios()
Dim ObjBancos As New ClsBancos
If ObjBancos.GetPagosNoBancarios(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal) Then
GvPagosNoBancarios.DataSource = ObjBancos.DtResultados
GvPagosNoBancarios.DataBind()
End If
ObjBancos.Dispose()
End Sub
End Class End Class

View File

@@ -2396,6 +2396,54 @@
</div> </div>
</div> </div>
</div> </div>
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Pagos no bancarios</span>
</div>
<div class="actions">
<div class="btn-group">
<asp:UpdatePanel UpdateMode="Conditional" runat="server" ID="UpdatePanel10">
<ContentTemplate>
<asp:LinkButton ID="LnkPagosNoBancariosPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
<asp:LinkButton ID="LnkPagosNoBancariosExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkPagosNoBancariosPDF" />
<asp:PostBackTrigger ControlID="LnkPagosNoBancariosExcel" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>
</div>
<div class="portlet-body">
<div class="row col-md-12" align="right">
<input type="text" id="TxtBusquedaPagosNoBancarios" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaPagosNoBancarios','{0}')", GvPagosNoBancarios.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaPagosNoBancarios','{0}')", GvPagosNoBancarios.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<div class="table-scrollable">
<asp:GridView ID="GvPagosNoBancarios" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron pagos no bancarios" Width="50%"
CssClass="table table-striped table-advance table-hover ScrollAD" data-sort="false" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None" DataKeyNames="CvePrePoliza,CveCompra,CveVenta,CvePersonal,ImporteMN,VentaSerieFolio,CompraSerieFolio,NombreCompleto,FechaIng,Abreviatura">
<Columns>
<asp:BoundField HeaderText="Nombre Completo" DataField="NombreCompleto"/>
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}"/>
<asp:HyperLinkField HeaderText="Venta Serie Folio" DataTextField="VentaSerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}"/>
<asp:HyperLinkField HeaderText="Compra Serie Folio" DataTextField="CompraSerieFolio" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}"/>
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlImp" runat="server" Text='<%# Eval("ImporteMN", "{0:N2}")%>'></asp:Literal>
<asp:Literal ID="LtlMon" runat="server" Text='<%# Eval("Abreviatura")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>

View File

@@ -1388,6 +1388,7 @@ Partial Class Clientes
'CargaMetodosPago33() 'CargaMetodosPago33()
'CargaFormaPago33() 'CargaFormaPago33()
'CargaComboCFDI() 'CargaComboCFDI()
CargarPagosNoBancarios()
If UsuarioActual.TienePermisoProceso(279) Then If UsuarioActual.TienePermisoProceso(279) Then
LnkPorcentajeMarcas.Visible = True LnkPorcentajeMarcas.Visible = True
@@ -10150,5 +10151,14 @@ Partial Class Clientes
Protected Sub DdlSATPais_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlSATPais_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaEstados(DdlSATPais.SelectedValue) CargaEstados(DdlSATPais.SelectedValue)
End Sub End Sub
Private Sub CargarPagosNoBancarios()
Dim ObjBancos As New ClsBancos
If ObjBancos.GetPagosNoBancarios(UsuarioActual.CveEmpresa, CveCliente:=CveCliente) Then
GvPagosNoBancarios.DataSource = ObjBancos.DtResultados
GvPagosNoBancarios.DataBind()
End If
ObjBancos.Dispose()
End Sub
End Class End Class

View File

@@ -2662,12 +2662,17 @@ Partial Class Ventas_ClientesAbonar
If tCveMoneda = 2 Then If tCveMoneda = 2 Then
Dim ImporteFluctuacion As Decimal = 0 Dim ImporteFluctuacion As Decimal = 0
ImporteFluctuacion = Saldo * (TCPago - TCVenta) ImporteFluctuacion = Saldo * (TCPago - TCVenta)
If CveSubProyecto <= 0 Then
MsgError = $"No se pudo obtener el sub proyecto de la venta {gr.DataKey("SerieFolio").ToString}"
End If
If TCPago > TCVenta Then If TCPago > TCVenta Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
Else Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento" MsgError = "Ocurrio un error al saldar el movimiento"
End If End If
End If End If

View File

@@ -277,7 +277,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion, bool EsRefacturacion = false) private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion, bool EsRefacturacion = false)
{ {
Modelos.Factura.MCancelacionVentaMensaje retorno = null; Modelos.Factura.MCancelacionVentaMensaje retorno = null;
var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa); var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:true);
if (EsRefacturacion) if (EsRefacturacion)
{ {
retorno = factura.CancelarPorRefacturacion(); retorno = factura.CancelarPorRefacturacion();

View File

@@ -119,7 +119,7 @@ Partial Class Ventas_RepRecuperacion
End If End If
If ObjMovtos.GetRepRecuperacion(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1, If ObjMovtos.GetRepRecuperacion(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1,
"-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue.ToString, CveBanco:=DdlBanco.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue.ToString, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero,
EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero) Then EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjMovtos.DtResultados GvDatos.DataSource = ObjMovtos.DtResultados
DtDatos = ObjMovtos.DtResultados DtDatos = ObjMovtos.DtResultados

View File

@@ -21048,7 +21048,7 @@ Partial Class Ventas
If CveMovimientoEntradaGeneral > 0 Then If CveMovimientoEntradaGeneral > 0 Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows For Each Dr As DataRow In ObjInventario.DtResultados.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaGeneral, Dr("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString().ToEntero(), Serie:=Dr("Serie").ToString(), Lote:=Dr("Lote").ToString(), CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaGeneral, Dr("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), CveSeccionAlmacen:=-3, Serie:=Dr("Serie").ToString(), Lote:=Dr("Lote").ToString(), CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
Return False Return False
End If End If
Next Next
@@ -22843,12 +22843,55 @@ Partial Class Ventas
'codigo para ajuste de centavo, si el importe total no cuadra con los totales 'codigo para ajuste de centavo, si el importe total no cuadra con los totales
Dim difTmp As Decimal = Importe - importeNC Dim difTmp As Decimal = Importe - importeNC
'el ajuste procede si no tiene iva,ni ieps, con iva sin ieps,
If Math.Abs(difTmp) > 0.00D Then If Math.Abs(difTmp) > 0.00D Then
'asusto la diferencia en el último concepto 'filtro si hay renglon sin impuestos.
Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString().ToDecimal + difTmp Dim drDIF As DataRow() = DtImpuestosLocal.Select("ImporteIVA = 0 AND ImporteIEPS = 0")
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal") = ImporteAjustado
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImportePU") = ImporteAjustado If drDIF IsNot Nothing AndAlso drDIF.Length > 0 Then
Dim ImporteAjustado0 As Decimal = drDIF(0)("ImporteTotal").ToString().ToDecimal + difTmp
drDIF(0)("ImporteTotal") = ImporteAjustado0
drDIF(0)("ImportePU") = ImporteAjustado0
Else
'filtro si hay renglon sin impuestos.
Dim drDIF2 As DataRow() = DtImpuestosLocal.Select("ImporteIVA > 0 AND ImporteIEPS = 0")
If drDIF2 IsNot Nothing AndAlso drDIF2.Length > 0 Then
Dim PorIVA As Decimal = drDIF2(0)("PorcentajeIVA").ToString().ToDecimal
Dim ImporteAjustado1 As Decimal = drDIF2(0)("ImporteTotal").ToString().ToDecimal + (difTmp / (1 + PorIVA)) 'saco el PU sin iva
drDIF2(0)("ImportePU") = ImporteAjustado1
drDIF2(0)("ImporteTotal") = ImporteAjustado1
drDIF2(0)("ImporteIVA") = (ImporteAjustado1) * drDIF2(0)("PorcentajeIVA").ToString().ToDecimal
Else
' ajustar cuando tiene ieps y no iva
Dim drDIF3 As DataRow() = DtImpuestosLocal.Select("ImporteIVA = 0 AND ImporteIEPS > 0")
If drDIF3 IsNot Nothing AndAlso drDIF3.Length > 0 Then
Dim PorIEPS As Decimal = drDIF3(0)("PorcentajeIEPS").ToString().ToDecimal
Dim ImporteAjustado1 As Decimal = drDIF3(0)("ImporteTotal").ToString().ToDecimal + (difTmp / (1 + PorIEPS)) 'saco el PU sin iva
drDIF3(0)("ImportePU") = ImporteAjustado1
drDIF3(0)("ImporteTotal") = ImporteAjustado1
drDIF3(0)("ImporteIEPS") = (ImporteAjustado1) * drDIF3(0)("PorcentajeIEPS").ToString().ToDecimal
Else
' ajustar cuando tiene ieps e iva
Dim drDIF4 As DataRow() = DtImpuestosLocal.Select("ImporteIVA > 0 AND ImporteIEPS > 0")
If drDIF4 IsNot Nothing AndAlso drDIF4.Length > 0 Then
Dim PorIEPS As Decimal = drDIF4(0)("PorcentajeIEPS").ToString().ToDecimal
Dim PorIVA As Decimal = drDIF4(0)("PorcentajeIVA").ToString().ToDecimal
Dim ImporteAntesIVA As Decimal = (difTmp / (1 + PorIVA))
Dim ImporteAjustado1 As Decimal = drDIF4(0)("ImporteTotal").ToString().ToDecimal + +(ImporteAntesIVA / (1 + PorIEPS)) 'saco el PU sin iva
drDIF4(0)("ImportePU") = ImporteAjustado1
drDIF4(0)("ImporteTotal") = ImporteAjustado1
drDIF4(0)("ImporteIEPS") = (ImporteAjustado1) * drDIF4(0)("PorcentajeIEPS").ToString().ToDecimal
drDIF4(0)("ImporteIVA") = (ImporteAjustado1 + drDIF4(0)("ImporteIEPS").ToString.ToDecimal) * drDIF4(0)("PorcentajeIVA").ToString().ToDecimal
End If
End If
End If
End If
End If End If
If Not NCDescuento Then If Not NCDescuento Then