Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1735,13 +1735,14 @@ Public Class ClsCompras
|
||||
Return OnError
|
||||
End Function
|
||||
|
||||
Public Function UpdateEstatus(pFueValidado As Integer, pCveFactura As Integer) As Boolean
|
||||
Public Function UpdateEstatus(pFueValidado As Integer, pCveFactura As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim OnError As Boolean = False
|
||||
|
||||
DataAdapter("UPDATE Comp_Facturas SET FueValidado = @pFueValidado WHERE CveFactura = @pCveFactura ", CommandType.Text)
|
||||
DataAdapter("UPDATE Comp_Facturas SET FueValidado = @pFueValidado WHERE CveFactura = @pCveFactura AND CveEmpresa = @CveEmpresa ", CommandType.Text)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@pFueValidado", SqlDbType.SmallInt).Value = pFueValidado
|
||||
.Add("@pCveFactura", SqlDbType.Int).Value = pCveFactura
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -1754,12 +1755,14 @@ Public Class ClsCompras
|
||||
Return OnError
|
||||
End Function
|
||||
|
||||
Public Function DeleteFactura(pCveFactura As Integer) As Boolean
|
||||
Public Function DeleteFactura(pCveFactura As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim OnError As Boolean = False
|
||||
|
||||
DataAdapter(" DELETE Comp_Facturas WHERE CveFactura = @pCveFactura AND CveCompra IS NULL ", CommandType.Text)
|
||||
|
||||
SqlAdapter.SelectCommand.Parameters.Add("@pCveFactura", SqlDbType.Int).Value = pCveFactura
|
||||
DataAdapter(" DELETE Comp_Facturas WHERE CveFactura = @pCveFactura AND CveEmpresa = @CveEmpresa AND CveCompra IS NULL ", CommandType.Text)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@pCveFactura", SqlDbType.Int).Value = pCveFactura
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -1074,8 +1074,8 @@ Public Class ClsContPAQi
|
||||
StrSQL.AppendLine(" INNER JOIN Polizas p ON mp.IdPoliza = p.Id ")
|
||||
StrSQL.AppendLine(" INNER JOIN Cuentas c ON c.Id = mp.IdCuenta ")
|
||||
StrSQL.AppendLine(" INNER JOIN TiposPolizas t ON mp.TipoPol = t.Codigo ")
|
||||
StrSQL.AppendLine(" LEFT JOIN SIG_Resp_2022_04_01.dbo.Usuarios U ON U.CveUsuario = P.IdUsuario ")
|
||||
StrSQL.AppendLine(" LEFT JOIN SegmentosNegocio s ON mp.IdSegNeg = s.id ")
|
||||
StrSQL.AppendLine(" LEFT JOIN SERVIDOR.Ventas.dbo.Usuarios U ON U.CveUsuario = P.IdUsuario ")
|
||||
StrSQL.AppendLine(" LEFT JOIN SegmentosNegocio s ON mp.IdSegNeg = s.id ")
|
||||
StrSQL.AppendLine(" WHERE (@IdPoliza = -1 OR mp.IdPoliza = @IdPoliza) ")
|
||||
StrSQL.AppendLine(" AND (@Eje = -1 OR mp.Ejercicio = @Eje) ")
|
||||
StrSQL.AppendLine(" AND (@Periodo = -1 OR mp.Periodo = @Periodo) ")
|
||||
|
||||
@@ -187,8 +187,6 @@ Public Class ClsContabilidad
|
||||
If Valor1 = "2" OrElse Valor2 = "2" Then
|
||||
Retorno = 3
|
||||
End If
|
||||
Case 140
|
||||
Retorno = 2 'egreso
|
||||
|
||||
|
||||
End Select
|
||||
|
||||
@@ -3146,11 +3146,11 @@ Public Class ClsNominas
|
||||
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
addParameters("@CveEmbarqueManifiesto", SqlDbType.Int, cveEmbarqueManifiesto)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el PA_AGRO_Embarque_ManifiestoGet.")
|
||||
retorno = RunQuery("Ocurrió un error al obtener el Embarque Manifiesto .")
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function PA_Agro_Embarque_PalletGet(cvePallet As Int32, cveCultivo As Int32, cveCultivoVariedad As Int32, cveEnvase As Int32, cveEtiqueta As Int32, cveEtiquetasporTarima As Int32, cveFormatoImpresion As Int32, cveTamaño As Int32, cveTipoTarima As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32, cveTemporada As Int32) As Boolean
|
||||
Public Function PA_Agro_Embarque_PalletGet(cvePallet As Int32, cveCultivo As Int32, cveCultivoVariedad As Int32, cveEnvase As Int32, cveEtiqueta As Int32, cveEtiquetasporTarima As Int32, cveFormatoImpresion As Int32, cveTamaño As Int32, cveTipoTarima As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32, cveTemporada As Int32, Optional agrupado As Boolean = False) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Agro_Embarque_PalletGet", CommandType.StoredProcedure)
|
||||
addParameters("@CvePallet", SqlDbType.Int, cvePallet)
|
||||
@@ -3165,7 +3165,8 @@ Public Class ClsNominas
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
addParameters("@CveEmbarqueManifiesto", SqlDbType.Int, cveEmbarqueManifiesto)
|
||||
addParameters("@CveTemporada", SqlDbType.Int, cveTemporada)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el PA_Agro_Embarque_PalletGet.")
|
||||
addParameters("@Agrupado", SqlDbType.Bit, agrupado)
|
||||
retorno = RunQuery("Ocurrió un error al obtener el Embarque Pallet .")
|
||||
Return retorno
|
||||
End Function
|
||||
#Region "Visor sat"
|
||||
|
||||
@@ -4926,7 +4926,7 @@ Public Class ClsVentas
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function GetRepMetasVendedores(FechaMesActual As String, CveEmpresa As Integer, CveVendedor As Integer, CveCategoria As Integer, CveClasificacion As Integer,
|
||||
CveClasificacion2 As Integer, CveMarca As Integer, CveSubProyecto As Integer, CveCliente As Integer,
|
||||
CveClasificacion2 As Integer, CveMarca As Integer, CveSubProyecto As Integer, CveCliente As Integer, EsDistribuidor As Integer,
|
||||
Optional GrupoSuperior As Integer = 0) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_MetasVendedores", CommandType.StoredProcedure)
|
||||
@@ -4940,6 +4940,7 @@ Public Class ClsVentas
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
||||
.Add("@GrupoSuperior", SqlDbType.Int).Value = GrupoSuperior
|
||||
End With
|
||||
Try
|
||||
|
||||
@@ -753,7 +753,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Dim HuboError As Boolean = False
|
||||
Dim ObjCompra As New ClsCompras
|
||||
Dim ObjEventos As New ClsOIEventos(ObjCompra.IniciaTransacSQL())
|
||||
If ObjCompra.UpdateEstatus(Valida.EsValida, gvr.DataKey("CveFactura").ToEntero) Then
|
||||
If ObjCompra.UpdateEstatus(Valida.EsValida, gvr.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
If ObjCompra.CancelarCompra(gvr.DataKey("CveCompra").ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
MsgValidadas.AppendFormat("Factura Cancelada: {0} - {1}<br>", gvr.DataKey("SerieFolio"), gvr.DataKey("Descripcion"))
|
||||
@@ -2071,21 +2071,21 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
#Region " TIPO TRANSACCION "
|
||||
Private Sub CargaTipoTransaccion()
|
||||
If TipoPago = 1 Then
|
||||
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo = 'Egs' AND CveTipoTransaccion IN (1, 2) ")
|
||||
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo = 'Egs' AND CveTipoTransaccion IN (1, 2) and Estatus = 1 ")
|
||||
DdlTipoTransaccion.DataBind()
|
||||
DdlTipoTransaccion.SelectedValue = TipoPago.ToString
|
||||
ElseIf TipoPago = 2 Then
|
||||
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo = 'Egs' AND CveTipoTransaccion IN (1, 2) ")
|
||||
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo = 'Egs' AND CveTipoTransaccion IN (1, 2) and Estatus = 1 ")
|
||||
DdlTipoTransaccion.DataBind()
|
||||
DdlTipoTransaccion.SelectedValue = TipoPago.ToString
|
||||
RecargaCuentasDepositos()
|
||||
ElseIf TipoPago = 3 Then
|
||||
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo = 'Egs' AND CveTipoTransaccion IN (1, 2) ")
|
||||
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo = 'Egs' AND CveTipoTransaccion IN (1, 2)and Estatus = 1 ")
|
||||
DdlTipoTransaccion.DataBind()
|
||||
DdlTipoTransaccion.SelectedValue = TipoPago.ToString
|
||||
RecargaCuentasDepositos()
|
||||
Else
|
||||
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo = 'Egs'")
|
||||
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo = 'Egs' and Estatus = 1")
|
||||
DdlTipoTransaccion.DataBind()
|
||||
End If
|
||||
|
||||
|
||||
@@ -1711,7 +1711,7 @@ Partial Class Compras_Compras
|
||||
If Valida.EsValida = 2 Then
|
||||
Validada = False
|
||||
|
||||
If ObjeFacturas.UpdateEstatus(Valida.EsValida, CveFactura) Then
|
||||
If ObjeFacturas.UpdateEstatus(Valida.EsValida, CveFactura, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
End If
|
||||
|
||||
@@ -1735,11 +1735,7 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
If Validada And Not EnListadoEFOS Then
|
||||
|
||||
|
||||
|
||||
Try
|
||||
|
||||
XMLDoc.Load(Archivo)
|
||||
Catch ex As Exception
|
||||
Try
|
||||
@@ -1749,13 +1745,8 @@ Partial Class Compras_Compras
|
||||
Catch ex2 As Exception
|
||||
GuardaLog("Error al intentar leer el XML del SAT. Error:" & ex2.ToString())
|
||||
End Try
|
||||
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
CreaDTConceptos()
|
||||
|
||||
CargaComprobanteXML(XMLDoc)
|
||||
|
||||
If NuevaValidacionXML = 1 Or (Version = "3.3" Or Version = "4.0") Then
|
||||
@@ -1821,7 +1812,6 @@ Partial Class Compras_Compras
|
||||
CargaConceptosXML(XMLDoc)
|
||||
End If
|
||||
|
||||
|
||||
Select Case TipoComprobante
|
||||
Case "ingreso" : DdlTipoComprobante.SelectedValue = "Fac" : DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("NC")) : DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("DEV"))
|
||||
Case "egreso" : DdlTipoComprobante.SelectedValue = "NC" : DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Fac")) : DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant")) : ChkAplicaNotaCredito.Enabled = False
|
||||
@@ -4707,7 +4697,7 @@ Partial Class Compras_Compras
|
||||
If OCVinculada AndAlso DdlOCVinculaInv.Visible AndAlso Not (CveImportacion > 0 Or CveFlete > 0) Then
|
||||
CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 140, 141) And Not (CveImportacion > 0 Or CveFlete > 0) Then 'se comento, RMF. 2020.08.19, no le hallo sentido
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 140, 141, 152) And Not (CveImportacion > 0 Or CveFlete > 0) Then 'se comento, RMF. 2020.08.19, no le hallo sentido
|
||||
CveConceptoContableAlmacen = 205
|
||||
End If
|
||||
Else
|
||||
@@ -5158,7 +5148,7 @@ Partial Class Compras_Compras
|
||||
AutoConta = False
|
||||
End If
|
||||
|
||||
If (AutoConta Or UsuarioActual.Empresa.UsaAC) And ObjContaAC Is Nothing Then
|
||||
If (AutoConta Or UsuarioActual.Empresa.UsaAC) And ObjContaAC Is Nothing AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
End If
|
||||
@@ -7809,8 +7799,6 @@ Partial Class Compras_Compras
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
|
||||
|
||||
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), TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
@@ -7835,7 +7823,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorPrepoliza AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) AndAlso UsuarioActual.CveEmpresa <> 72 Then
|
||||
If Not ErrorPrepoliza AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
ErrorPrepolizaDescuadre = True
|
||||
@@ -8809,7 +8797,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim ErrorCompra = False
|
||||
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad) AndAlso IdPoliza > 0 Then
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad) AndAlso IdPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
If Not ObjAC.RemovePoliza(IdPoliza) Then
|
||||
@@ -9945,7 +9933,7 @@ Partial Class Compras_Compras
|
||||
Dim ObjInventario As New ClsInventarios(ObjCompra.IniciaTransacSQL)
|
||||
Dim ObjContabilidad As New ClsContabilidad(ObjCompra.IniciaTransacSQL)
|
||||
Dim ObjAF As New ClsAF(ObjCompra.IniciaTransacSQL)
|
||||
Dim ObjContaAC As ClsContPAQi = Nothing '= New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjContaAC As ClsContPAQi = Nothing
|
||||
|
||||
Dim Retorno As Boolean = True
|
||||
Dim CveEstatusFactura As Integer = HdnCveEstatusFactura.Value.ToEntero
|
||||
@@ -10429,7 +10417,7 @@ Partial Class Compras_Compras
|
||||
Next
|
||||
|
||||
If Retorno Then
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IdPoliza > 0 Then
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IdPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
If ObjContaAC Is Nothing Then
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
@@ -15065,7 +15053,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then
|
||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
End If
|
||||
@@ -18499,6 +18487,10 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
If DrPS("CvePSCargo").ToString <> "" Then 'si es un producto de usado. que se registre contablemente como alamcen(como producto)
|
||||
CveTipoPS = 2
|
||||
End If
|
||||
|
||||
Dim DecimalesPermitidos = 6
|
||||
|
||||
Row("CveConcepto") = TmpDT.Rows.Count + 1
|
||||
@@ -18655,13 +18647,19 @@ Partial Class Compras_Compras
|
||||
|
||||
'PS - CLASIFICACION
|
||||
If DdlPS.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Dim PSRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If PSRow IsNot Nothing Then
|
||||
Dim CveTipoPS As Integer = PSRow("CveTipoPS").ToString.ToEntero
|
||||
If PSRow("CvePSCargo").ToString <> "" Then 'si es un producto de usado. que se registre contablemente como alamcen(como producto)
|
||||
CveTipoPS = 2
|
||||
End If
|
||||
|
||||
DrPS("CveClasificacion") = PSRow("CveClasificacion").ToString
|
||||
DrPS("Clasificacion") = PSRow("Clasificacion").ToString
|
||||
DrPS("CvePS") = DdlPS.SelectedValue
|
||||
DrPS("PS") = PSRow("PS").ToString
|
||||
DrPS("CveTipoPS") = PSRow("CveTipoPS").ToString.ToEntero
|
||||
DrPS("CveTipoPS") = CveTipoPS
|
||||
DrPS("CveSATPS") = PSRow("CveSATPS").ToString.ToEntero
|
||||
DrPS("SATClaveProductoServicio") = PSRow("SATClaveProductoServicio").ToString
|
||||
DrPS("CveSATPSActualizado") = 0
|
||||
|
||||
@@ -247,6 +247,7 @@ Partial Class PopUpVerFactura
|
||||
Dim SCAC As String = ""
|
||||
Dim CAAT As String = ""
|
||||
Dim NumeroTrailer As String = ""
|
||||
Dim Permiso As String = ""
|
||||
|
||||
|
||||
Dim tablaReporte As New DataTable
|
||||
@@ -282,7 +283,7 @@ Partial Class PopUpVerFactura
|
||||
LineaTransportacion = row("LineaTransportacion").ToString()
|
||||
SCAC = row("SCAC").ToString()
|
||||
CAAT = row("CAAT").ToString()
|
||||
|
||||
Permiso = row("Permiso").ToString()
|
||||
'If row("CveCamionRemolque1").ToString() = "1" Then
|
||||
' Rem1Placa = "12-TF-5E"
|
||||
' Remolque1 = "Remolque 1"
|
||||
@@ -292,8 +293,8 @@ Partial Class PopUpVerFactura
|
||||
|
||||
'End If
|
||||
|
||||
If objnom.PA_Agro_Embarque_PalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then
|
||||
NoPallets = objnom.DtResultados.Rows.Count.ToString()
|
||||
If objnom.PA_Agro_Embarque_PalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1, True) And objnom.DtResultados.Rows.Count > 0 Then
|
||||
NoPallets = objnom.DtResultados.SUM("NoPallets").ToString()
|
||||
NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2")
|
||||
NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0")
|
||||
|
||||
@@ -317,6 +318,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Camion", Camion))
|
||||
params.Add(New ReportParameter("Rem1Placa", Rem1Placa))
|
||||
params.Add(New ReportParameter("Remolque1", Remolque1))
|
||||
params.Add(New ReportParameter("Permiso", Permiso))
|
||||
|
||||
|
||||
params.Add(New ReportParameter("LongitudCaja", LongitudCaja))
|
||||
|
||||
@@ -123,6 +123,9 @@ Partial Class Compras_RepProductosServiciosDetalle
|
||||
txtFechaI.Text = If(Mes <> "-1", String.Format("01/{0}/0001", Mes), txtFechaI.Text)
|
||||
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
|
||||
|
||||
If CveCultivo.ToEntero() > 0 AndAlso FechaI = "-1" AndAlso Anio = "-1" AndAlso Mes = "-1" AndAlso AnioMes = "-1" Then
|
||||
txtFechaI.Text = "01/01/1900"
|
||||
End If
|
||||
If Fecha <> "-1" Then
|
||||
txtFechaI.Text = Fecha
|
||||
txtFechaF.Text = Fecha
|
||||
|
||||
@@ -1095,7 +1095,7 @@ Partial Class Compras_eFacturas
|
||||
Dim ObjDatos As New ClsCompras
|
||||
Dim FueValidado As Integer = 0
|
||||
If GvD.Rows(e.RowIndex).FCCheckBox("ChkFueValidado").Checked Then FueValidado = 1
|
||||
If ObjDatos.UpdateEstatus(FueValidado, GvD.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
If ObjDatos.UpdateEstatus(FueValidado, GvD.DataKeys(e.RowIndex).Value.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvD.EditIndex = -1
|
||||
BtnConsultar_Click(sender, e)
|
||||
End If
|
||||
@@ -1138,16 +1138,16 @@ Partial Class Compras_eFacturas
|
||||
If ObjValidacion.EsValida = 2 Then
|
||||
Alert("La factura está cancelada ante el SAT.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
Correcto = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero)
|
||||
Correcto = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
|
||||
Else
|
||||
Alert("La Factura no se pudo validar.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
ObjValidacion.Dispose()
|
||||
Case "ValidarCFD"
|
||||
Correcto = ObjDatos.UpdateEstatus(1, GvRow.DataKey("CveFactura").ToEntero)
|
||||
Correcto = ObjDatos.UpdateEstatus(1, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
|
||||
|
||||
Case "Omitir"
|
||||
Correcto = ObjDatos.UpdateEstatus(3, GvRow.DataKey("CveFactura").ToEntero)
|
||||
Correcto = ObjDatos.UpdateEstatus(3, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
|
||||
End Select
|
||||
|
||||
ObjDatos.Dispose()
|
||||
@@ -1261,7 +1261,7 @@ Partial Class Compras_eFacturas
|
||||
Dim ObjDatos As New ClsCompras
|
||||
Dim FueValidado As Integer = 0
|
||||
If GvPagos.Rows(e.RowIndex).FCCheckBox("ChkFueValidado").Checked Then FueValidado = 1
|
||||
If ObjDatos.UpdateEstatus(FueValidado, GvD.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
If ObjDatos.UpdateEstatus(FueValidado, GvD.DataKeys(e.RowIndex).Value.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvPagos.EditIndex = -1
|
||||
End If
|
||||
ObjDatos.Dispose()
|
||||
@@ -1298,16 +1298,16 @@ Partial Class Compras_eFacturas
|
||||
If ObjValidacion.EsValida = 2 Then
|
||||
Alert("La factura está cancelada ante el SAT.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
Correcto = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero)
|
||||
Correcto = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
|
||||
Else
|
||||
Alert("La Factura no se pudo validar.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
ObjValidacion.Dispose()
|
||||
Case "ValidarCFD"
|
||||
Correcto = ObjDatos.UpdateEstatus(1, GvRow.DataKey("CveFactura").ToEntero)
|
||||
Correcto = ObjDatos.UpdateEstatus(1, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
|
||||
|
||||
Case "Omitir"
|
||||
Correcto = ObjDatos.UpdateEstatus(3, GvRow.DataKey("CveFactura").ToEntero)
|
||||
Correcto = ObjDatos.UpdateEstatus(3, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
|
||||
End Select
|
||||
|
||||
ObjDatos.Dispose()
|
||||
@@ -1317,15 +1317,15 @@ Partial Class Compras_eFacturas
|
||||
End Sub
|
||||
#End Region
|
||||
Protected Sub ImgCFDiMasivo_Click(sender As Object, e As EventArgs) Handles LnkCFDiMasivo.Click
|
||||
Dim ObjDatos As New ClsCompras
|
||||
ObjDatos.IniciaTransacSQL()
|
||||
|
||||
Dim ErrorTrans As Boolean = False
|
||||
If Tab.ActiveTabIndex = 0 Then
|
||||
For Each GvRow As GridViewRow In GvD.Rows
|
||||
If GvRow.DataKey("TipoFactura") = "CFDi" AndAlso GvRow.DataKey("FueValidado").Contiene("0", "1") Then
|
||||
Dim ObjValidacion As New ClsValidaCFDi(GvRow.DataKey("UUID"), GvRow.DataKey("RFCDe"), GvRow.DataKey("RFCPara"), GvRow.DataKey("Total").ToDecimal)
|
||||
If ObjValidacion.EsValida > 0 Then
|
||||
If Not ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero) Then
|
||||
Dim ObjDatos As New ClsCompras
|
||||
If Not ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
ErrorTrans = True
|
||||
End If
|
||||
End If
|
||||
@@ -1337,22 +1337,23 @@ Partial Class Compras_eFacturas
|
||||
If GvRow.DataKey("TipoFactura") = "CFDi" AndAlso GvRow.DataKey("FueValidado").Contiene("0", "1") Then
|
||||
Dim ObjValidacion As New ClsValidaCFDi(GvRow.DataKey("UUID"), GvRow.DataKey("RFCDe"), GvRow.DataKey("RFCPara"), 0)
|
||||
If ObjValidacion.EsValida > 0 Then
|
||||
If Not ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero) Then
|
||||
Dim ObjDatos As New ClsCompras
|
||||
If Not ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
ErrorTrans = True
|
||||
End If
|
||||
ObjDatos.Dispose()
|
||||
End If
|
||||
ObjValidacion.Dispose()
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If Not ErrorTrans Then
|
||||
ObjDatos.Commit()
|
||||
|
||||
Alert("La verificación masiva ha terminado", TipoMensaje.MsgInformacion)
|
||||
CargaDatos()
|
||||
Else
|
||||
ObjDatos.RollBack()
|
||||
|
||||
End If
|
||||
ObjDatos.Dispose()
|
||||
|
||||
End Sub
|
||||
Protected Sub LnkNoRecibidas_Click(sender As Object, e As EventArgs, Optional ValidaRowCount As Boolean = False) Handles LnkNoRecibias.Click
|
||||
Dim DtNoRecibidas As New DataTable
|
||||
@@ -2656,7 +2657,7 @@ Partial Class Compras_eFacturas
|
||||
ObjGral.Dispose()
|
||||
If Borrar = True Then
|
||||
Dim ObjCompras As New ClsCompras
|
||||
If ObjCompras.DeleteFactura(CveFactura) Then
|
||||
If ObjCompras.DeleteFactura(CveFactura, UsuarioActual.CveEmpresa) Then
|
||||
GvD.EditIndex = -1
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divDescripcion"))
|
||||
Alert("La factura se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
@@ -2681,7 +2682,7 @@ Partial Class Compras_eFacturas
|
||||
ObjGral.Dispose()
|
||||
If Borrar = True Then
|
||||
Dim ObjCompras As New ClsCompras
|
||||
If ObjCompras.DeleteFactura(CveFactura) Then
|
||||
If ObjCompras.DeleteFactura(CveFactura, UsuarioActual.CveEmpresa) Then
|
||||
GvPagos.EditIndex = -1
|
||||
RegistraScript("$('#divDescripcionPago').modal('hide');")
|
||||
Alert("La factura se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
@@ -3966,7 +3967,7 @@ Partial Class Compras_eFacturas
|
||||
ValidadoSAT = False
|
||||
Else
|
||||
Dim ObjDatos As New ClsCompras
|
||||
ValidadoSAT = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, gvRow.DataKey("CveFactura").ToEntero)
|
||||
ValidadoSAT = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, gvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
|
||||
ObjDatos.Dispose()
|
||||
End If
|
||||
|
||||
|
||||
@@ -176,6 +176,8 @@
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtConcepto" runat="server" Width="100%" CssClass="form-control" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtConcepto.ClientID.ToString()%>">Concepto:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVConcepto" runat="server" ControlToValidate="TxtConcepto" Display="None" ErrorMessage="El campo <b>''Concepto''</b> es requerido, por favor ingrese uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RFVConcepto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -357,7 +359,7 @@
|
||||
</div>
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False"
|
||||
DataKeyNames="IdMov,Cargo,Abono,TipoMovto,CveConcepto,CveConceptoContable,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,CveCuenta, ContadoTipoTransaccion, ContadoCuenta, ContadoNumeroFolio, ContadoImporte, ContadoBeneficiario, ContadoObservaciones,EsComplementaria"
|
||||
DataKeyNames="IdMov,Cargo,Abono,TipoMovto,CveConceptoContable,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,CveCuenta, ContadoTipoTransaccion, ContadoCuenta, ContadoNumeroFolio, ContadoImporte, ContadoBeneficiario, ContadoObservaciones,EsComplementaria, ImporteME"
|
||||
Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
@@ -475,12 +477,12 @@
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
|
||||
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover mysmallbtn GvPrePoliza" GridLines="None"
|
||||
DataKeyNames="CvePrePolizaDetalle,IdMov, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC,EsComplementaria" Width="100%" >
|
||||
DataKeyNames="CvePrePolizaDetalle,IdMov, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC,ImporteME,Cargo,Abono" Width="100%" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConceptoContable" runat="server" Text='<%# Eval("ConceptoContable") %>'></asp:Literal><br />
|
||||
<asp:Literal ID="LtlConceptoContable" runat="server" Text='<%# Eval("ConceptoContable") %>'></asp:Literal><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" Width="125px" />
|
||||
</asp:TemplateField>
|
||||
@@ -520,9 +522,7 @@
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>TipoGasto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="DdlTipoGasto" runat="server" Text='<%# Eval("TipoGasto") %>'></asp:Literal><br />
|
||||
<%--<asp:HiddenField ID="HdnTipoGasto" runat="server" Value='<%# Eval("CveTipoGasto") %>' />--%>
|
||||
<%--<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="150px"></asp:DropDownList>--%>
|
||||
<asp:Literal ID="DdlTipoGasto" runat="server" Text='<%# Eval("TipoGasto") %>'></asp:Literal><br />
|
||||
</ItemTemplate>
|
||||
<ItemStyle />
|
||||
</asp:TemplateField>
|
||||
@@ -723,7 +723,7 @@
|
||||
<div id="DivEditConcepto" align="center" class="modal ADS fade" role="dialog">
|
||||
|
||||
|
||||
<div class="modal-dialog" style="width: 450px;" id="DvMoldalConceptoAncho" >
|
||||
<div class="modal-dialog" style="width: 450px;" id="DivModalConceptoAncho" >
|
||||
|
||||
<asp:UpdatePanel ID="UpModalConcepto" runat="server" class="modal-content" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -796,7 +796,7 @@
|
||||
<div class="row" runat="server" id="DvModalconceptoVenta" visible="false">
|
||||
<div class="col-xs-2" style="text-align: left">Venta:</div>
|
||||
<div class="col-xs-4" style="text-align: left">
|
||||
<asp:DropDownList ID="DdlVentasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="405px"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlVentasE" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="405px" AutoPostBack="true" OnSelectedIndexChanged="DdlVentasE_SelectedIndexChanged"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlVentasE" InitialValue="-1" runat="server" ControlToValidate="DdlVentasE" Display="None" ErrorMessage="El campo <b>''Venta''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CeRfvDdlVentasE" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlVentasE" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
@@ -837,9 +837,7 @@
|
||||
TC:
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:TextBox ID="TxtTipoCambio" runat="server" CssClass=" form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||
<asp:CompareValidator ID="RfvTxtModalConceptoTipoCambio" runat="server" ControlToValidate="TxtTipoCambio" Display="None" ErrorMessage="El campo <b>''Tipo de Cambio''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpMocalConceptoGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceRfvTxtModalConceptoTipoCambio" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtModalConceptoTipoCambio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:TextBox ID="TxtTipoCambio" runat="server" CssClass=" form-control input-sm" Style="text-align: right"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -859,19 +857,17 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Referencia:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtReferenciaE" runat="server" Width="405px" MaxLength="100" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtReferenciaE" runat="server" ControlToValidate="TxtReferenciaE" Display="None" ErrorMessage="El campo <b>''Referebcia''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CeRfvTxtReferenciaE" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtReferenciaE" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:TextBox ID="TxtReferenciaE" runat="server" Width="405px" MaxLength="100" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Descripción:</div>
|
||||
<div class="col-xs-2" style="text-align: left">Concepto:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtConceptoE" runat="server" Width="405px" MaxLength="100" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RfvTxtConceptoE" runat="server" ControlToValidate="TxtConceptoE" Display="None" ErrorMessage="El campo <b>''Referebcia''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtConceptoE" runat="server" ControlToValidate="TxtConceptoE" Display="None" ErrorMessage="El campo <b>''Concepto''</b> es requerido por la aplicación, por favor ingrese uno." ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CeRfvTxtConceptoE" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtConceptoE" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
|
||||
@@ -903,9 +899,11 @@
|
||||
<div class="col-xs-2" style="text-align: left">
|
||||
Mon Extrajera:
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<asp:TextBox ID="TxtME" runat="server" CssClass=" form-control input-sm" Style="text-align: right"></asp:TextBox><br />
|
||||
|
||||
<div class="col-xs-2">
|
||||
<asp:TextBox ID="TxtME" runat="server" CssClass=" form-control input-sm" Style="text-align: right"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-xs-8">
|
||||
Importe en dólares, en Cargo/Abono, su proporcional
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -925,10 +923,7 @@
|
||||
<asp:CompareValidator ID="CVAbono" runat="server" ControlToValidate="TxtAbono" Display="None" ErrorMessage="El campo <b>''Abono''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpMocalConceptoGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCCAbono" runat="server" HighlightCssClass="vco" TargetControlID="CVAbono" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6" runat="server" id="DvMoldalConceptoSeccion2" visible="false">
|
||||
|
||||
@@ -990,8 +985,18 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAceptar" runat="server" class="btn btn-success" Text="Aceptar" ValidationGroup="GrpMocalConceptoGuardar" />
|
||||
<button id="BtnCancelar" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<asp:Button ID="BtnAceptar" runat="server" class="btn btn-success" Text="Aceptar" ValidationGroup="GrpMocalConceptoGuardar" />
|
||||
<button id="BtnCancelar" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:CheckBox ID="ChkSeguir" runat="server" Checked="true" />
|
||||
<label for="<%= ChkSeguir.ClientID.ToString()%>">Seguir Registrando:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -59,15 +59,15 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'PARA CREAR IE
|
||||
Private Property CveConcepto As Integer
|
||||
Public Property DrConceptoContable As DataRow
|
||||
Get
|
||||
Return ViewState("CveConcepto").ToString.ToEntero
|
||||
Return CType(ViewState("ArregloMovs"), DataRow)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveConcepto") = value
|
||||
Set(value As DataRow)
|
||||
ViewState("ArregloMovs") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveTipoTransaccion As Integer
|
||||
Get
|
||||
Return ViewState("CveTipoTransaccion").ToString.ToEntero
|
||||
@@ -244,7 +244,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
CveMoneda = 1
|
||||
ViewState("CvePrePoliza") = 0
|
||||
ViewState("CvePeriodo") = "0"
|
||||
CveConcepto = -1
|
||||
|
||||
CveTipoTransaccion = -1
|
||||
CveCuenta = -1
|
||||
Folio = "-1"
|
||||
@@ -344,14 +344,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
CargaCuentas()
|
||||
|
||||
|
||||
If IfNull(Request("Tipo"), "").ToString <> "NOMPROV" Then
|
||||
GvPrePoliza.Columns(4).Visible = False
|
||||
GvMov.Columns(4).Visible = False
|
||||
GvPrePoliza.Columns(5).Visible = False
|
||||
GvMov.Columns(5).Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -364,13 +361,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
.Add("Cuenta", Type.GetType("System.String"))
|
||||
.Add("Referencia", Type.GetType("System.String"))
|
||||
.Add("Concepto", Type.GetType("System.String"))
|
||||
.Add("Cargo", Type.GetType("System.Double"))
|
||||
.Add("Abono", Type.GetType("System.Double"))
|
||||
.Add("Cargo", Type.GetType("System.Decimal"))
|
||||
.Add("Abono", Type.GetType("System.Decimal"))
|
||||
.Add("TipoMovto", Type.GetType("System.Boolean"))
|
||||
.Add("ImporteMN", Type.GetType("System.Decimal"))
|
||||
.Add("ImporteME", Type.GetType("System.Decimal"))
|
||||
.Add("EsComodin", Type.GetType("System.Int32"))
|
||||
.Add("CveConcepto", Type.GetType("System.Int32"))
|
||||
.Add("CveSubProyecto", Type.GetType("System.Int32"))
|
||||
.Add("Descripcion", Type.GetType("System.String"))
|
||||
.Add("CveProveedor", Type.GetType("System.Int32"))
|
||||
@@ -378,6 +374,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
.Add("CveCompra", Type.GetType("System.Int32"))
|
||||
.Add("CveCliente", Type.GetType("System.Int32"))
|
||||
.Add("CveVenta", Type.GetType("System.Int32"))
|
||||
.Add("CveIE", Type.GetType("System.Int32"))
|
||||
.Add("CveClasificacion", Type.GetType("System.Int32"))
|
||||
.Add("MultipleSubProyecto", Type.GetType("System.Boolean"))
|
||||
.Add("CveTipoGasto", Type.GetType("System.Int32"))
|
||||
@@ -394,15 +391,14 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
.Add("ContadoTipoTransaccion", Type.GetType("System.Int32"))
|
||||
.Add("ContadoCuenta", Type.GetType("System.Int32"))
|
||||
.Add("ContadoNumeroFolio", Type.GetType("System.String"))
|
||||
.Add("ContadoImporte", Type.GetType("System.Double"))
|
||||
.Add("ContadoImporte", Type.GetType("System.Decimal"))
|
||||
.Add("ContadoBeneficiario", Type.GetType("System.String"))
|
||||
.Add("ContadoObservaciones", Type.GetType("System.String"))
|
||||
.Add("PorcentajeImpuesto", Type.GetType("System.Double"))
|
||||
.Add("PorcentajeImpuesto", Type.GetType("System.Decimal"))
|
||||
.Add("Modificado", Type.GetType("System.Boolean"))
|
||||
.Add("EsComplementaria", Type.GetType("System.Boolean"))
|
||||
.Add("TC", Type.GetType("System.Decimal"))
|
||||
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -531,12 +527,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
BtnEliminar.ToolTip = "No se puede eliminar al prepóliza, eliminarlos desde el módulo"
|
||||
End If
|
||||
|
||||
|
||||
'DtMovimientos.DefaultView.Sort = "OrdenPP"
|
||||
'DtMovimientos = DtMovimientos.DefaultView.ToTable
|
||||
|
||||
GvPrePoliza.DataSource = DtMovimientos
|
||||
|
||||
If Not DtMovimientos.Columns.Contains("IdMov") Then
|
||||
Dim workColumn As DataColumn = DtMovimientos.Columns.Add("IdMov", GetType(Integer))
|
||||
workColumn.AutoIncrement = True
|
||||
workColumn.AutoIncrementStep = 1
|
||||
End If
|
||||
|
||||
If Not DtMovimientos.Columns.Contains("ContadoCuenta") Then
|
||||
|
||||
@@ -580,7 +576,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza"))
|
||||
divContabilizada.Visible = True
|
||||
IdPoliza = dr("IdPoliza").ToString.ToEntero
|
||||
ElseIf TxtTotalCargos.Text.ToDouble = TxtTotalAbonos.Text.ToDouble Then
|
||||
ElseIf TxtTotalCargos.Text.ToDecimal = TxtTotalAbonos.Text.ToDecimal Then
|
||||
'sino está contabilizada, se activa el botón
|
||||
' BtnContabilizar.Visible = True
|
||||
End If
|
||||
@@ -616,33 +612,15 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
''Asignamos los Subproyectos
|
||||
'e.Row.FCDropDownList("DdlSubProyecto").DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
'e.Row.FCDropDownList("DdlSubProyecto").DataBind()
|
||||
'e.Row.FCDropDownList("DdlSubProyecto").Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
'e.Row.FCDropDownList("DdlSubProyecto").SelectedValueExist(e.Row.DataKey("CveSubProyecto"))
|
||||
|
||||
'Asignamos los Tipos de Gasto
|
||||
'e.Row.FCDropDownList("DdlTipoGasto").DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||
'e.Row.FCDropDownList("DdlTipoGasto").DataBind()
|
||||
'e.Row.FCDropDownList("DdlTipoGasto").Items.Insert(0, New ListItem("Sin Asignar", "-1"))
|
||||
'e.Row.FCDropDownList("DdlTipoGasto").SelectedValueExist(e.Row.DataKey("CveTipoGasto"))
|
||||
|
||||
'ASignamos las CuentasContables
|
||||
'e.Row.FCDropDownList("DdlCtaContable").DataSource = Session("DtCuentas")
|
||||
'e.Row.FCDropDownList("DdlCtaContable").DataBind()
|
||||
'e.Row.FCDropDownList("DdlCtaContable").Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||
'e.Row.FCDropDownList("DdlCtaContable").SelectedValueExist(e.Row.DataKey("IdCtaContable"))
|
||||
|
||||
If e.Row.DataKey("IdCtaContable") > 0 Then
|
||||
If e.Row.DataKey("IdCtaContable") <> "" Then
|
||||
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", e.Row.DataKey("IdCtaContable")))
|
||||
If drr IsNot Nothing Then
|
||||
e.Row.FCLiteral("DdlCtaContable").Text = drr("CuentaFormato").ToString() + " - " + drr("Nombre").ToString()
|
||||
End If
|
||||
End If
|
||||
|
||||
TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + e.Row.FCLiteral("TxtCargo").Text.ToDouble).ToString.FormatoNumero
|
||||
TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + e.Row.FCLiteral("TxtAbono").Text.ToDouble).ToString.FormatoNumero
|
||||
TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDecimal + e.Row.FCLiteral("TxtCargo").Text.ToDecimal).ToString.FormatoNumero
|
||||
TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDecimal + e.Row.FCLiteral("TxtAbono").Text.ToDecimal).ToString.FormatoNumero
|
||||
|
||||
Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero
|
||||
|
||||
@@ -900,15 +878,16 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim dr As DataRow = DtMovimientos.NewRow
|
||||
|
||||
dr("CodigoCuenta") = drt("Codigo").ToString & "<br>" & drt("Nombre").ToString
|
||||
dr("CodigoNombreCuenta") = drt("Codigo").ToString & "<br>" & drt("Nombre").ToString
|
||||
dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
|
||||
dr("Referencia") = If(drt("CveConcepto").ToString.Contiene("29", "130"), drt("Personal"), drt("RazonSocial"))
|
||||
dr("Referencia") = If(drt("CveConceptoContable").ToString.Contiene("29", "130"), drt("Personal"), drt("RazonSocial"))
|
||||
dr("Concepto") = TxtConcepto.Text
|
||||
dr("TipoMovto") = If(drt("TipoMovto").ToString = "False", 0, 1)
|
||||
dr("EsComodin") = EsComodin
|
||||
dr("CveConcepto") = drt("CveConcepto")
|
||||
dr("CveConceptoContable") = drt("CveConceptoContable")
|
||||
dr("CveSubProyecto") = drt("CveSubProyectoNegativo")
|
||||
dr("Cargo") = TxtCargo.Text.ToDouble
|
||||
dr("Abono") = TxtAbono.Text.ToDouble
|
||||
dr("Cargo") = TxtCargo.Text.ToDecimal
|
||||
dr("Abono") = TxtAbono.Text.ToDecimal
|
||||
dr("CveProveedor") = drt("CveProveedor")
|
||||
dr("CvePersonal") = drt("CvePersonal")
|
||||
dr("CveClasificacion") = -1
|
||||
@@ -978,11 +957,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
|
||||
'Agregamos la opcion para vincular los movimientos bancarios
|
||||
If e.Row.DataKey("CveConcepto").ToEntero.Contiene(41) Then
|
||||
If e.Row.DataKey("CveConceptoContable").ToEntero.Contiene(41) Then
|
||||
Dim ObjMovimientos As New ClsMovimientos
|
||||
Dim DdlSaldos As DropDownList = e.Row.FCDropDownList("DdlSaldos")
|
||||
|
||||
Select Case e.Row.DataKey("CveConcepto").ToEntero
|
||||
Select Case e.Row.DataKey("CveConceptoContable").ToEntero
|
||||
|
||||
'Acreedores
|
||||
Case 41
|
||||
@@ -998,7 +977,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
ObjMovimientos.Dispose()
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("CveConcepto").ToEntero.Contiene(30) Then
|
||||
If e.Row.DataKey("CveConceptoContable").ToEntero.Contiene(30) Then
|
||||
e.Row.FCLinkButton("ImgBancos").Visible = True
|
||||
|
||||
If e.Row.DataKey("ContadoTipoTransaccion").ToEntero > 0 And e.Row.DataKey("ContadoCuenta").ToEntero > 0 And e.Row.DataKey("ContadoNumeroFolio").ToString.Length > 0 And
|
||||
@@ -1032,8 +1011,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
|
||||
'validaciones
|
||||
|
||||
|
||||
If Not (TotalCargos = TotalAbonos AndAlso (GvPrePoliza.Rows.Count > 0 Or GvMov.Rows.Count > 0)) AndAlso UsuarioActual.CveRol <> 1 Then
|
||||
Alert($"La suma de los movimientos no son iguales ({TotalCargos}-{TotalAbonos})", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -1049,9 +1026,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
'terminan validaciones
|
||||
@@ -1073,6 +1048,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim TmpCargo As Decimal = 0D
|
||||
Dim TmpAbono As Decimal = 0D
|
||||
Dim DifCargoAbono As Decimal = 0D
|
||||
Dim TipoGrid As Integer = 0 ' 0 - GvMov, 1 - GvPrePoliza
|
||||
|
||||
Try
|
||||
|
||||
@@ -1082,7 +1058,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If CvePrePolizaInsertada > 0 Then
|
||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||
Dim idCuentaContabilizacion As Long = 1
|
||||
Dim Importe As Double = 0
|
||||
Dim Importe As Decimal = 0
|
||||
Dim ImporteME As Decimal = 0
|
||||
Dim TipoCambio As Decimal = 1
|
||||
Dim TipoMovto As Boolean = False
|
||||
@@ -1090,56 +1066,81 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
FolioPoliza = ObjMov.FolioPoliza
|
||||
|
||||
Dim Gv As GridView = GvMov
|
||||
If DdlPlantilla.SelectedValue = "53" Then
|
||||
Gv = GvPrePoliza
|
||||
TipoGrid = 1
|
||||
End If
|
||||
|
||||
'inserto las compras que voy a pagarDdlSaldos
|
||||
For Each gvr As GridViewRow In GvMov.Rows
|
||||
For Each gvr As GridViewRow In Gv.Rows
|
||||
'If gvr.DataKey("IDCuenta").ToEntero > 0 Then
|
||||
' IdCtaContable = gvr.DataKey("IDCuenta")
|
||||
'End If
|
||||
|
||||
'Registra movimieno bancario
|
||||
If gvr.DataKey("CveConcepto").ToEntero = 30 AndAlso gvr.DataKey("ContadoImporte").ToString.ToDecimal <> 0 Then
|
||||
If gvr.DataKey("CveConceptoContable").ToEntero = 30 AndAlso gvr.DataKey("ContadoImporte").ToDecimal <> 0 Then
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, gvr.DataKey("ContadoNumeroFolio").ToString,
|
||||
gvr.DataKey("ContadoBeneficiario").ToString, gvr.DataKey("ContadoImporte").ToString.ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "",
|
||||
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, gvr.DataKey("ContadoNumeroFolio"),
|
||||
gvr.DataKey("ContadoBeneficiario"), gvr.DataKey("ContadoImporte").ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones"), "",
|
||||
False, False, 0, CvePrePolizaInsertada, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveIE < 0 Then
|
||||
MsgError = "No se pudo registrar movimiento bancario"
|
||||
Exit For
|
||||
End If
|
||||
'If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
' FolioIE = ObjIE.Folio
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
ImporteME = 0
|
||||
TipoCambio = 1
|
||||
|
||||
If gvr.DataKey("TipoMovto") = "True" Then
|
||||
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
|
||||
TmpAbono = TmpAbono + Importe
|
||||
TipoMovto = True
|
||||
If TipoGrid = 0 Then 'gvmov
|
||||
Importe = gvr.FCTextBox("TxtAbono").Text.ToDecimal
|
||||
TmpAbono = TmpAbono + Importe
|
||||
TipoMovto = True
|
||||
|
||||
If gvr.DataKey("EsComplementaria") = "True" Then
|
||||
ImporteME = gvr.FCTextBox("TxtAbonoME").Text.ToDecimal
|
||||
TipoCambio = gvr.FCTextBox("TipoCambio").Text.ToDecimal
|
||||
If gvr.DataKey("EsComplementaria") = "True" Then
|
||||
ImporteME = gvr.FCTextBox("TxtAbonoME").Text.ToDecimal
|
||||
TipoCambio = gvr.FCTextBox("TipoCambio").Text.ToDecimal
|
||||
End If
|
||||
Else
|
||||
Importe = gvr.DataKey("Abono").ToDecimal
|
||||
TmpAbono = TmpAbono + Importe
|
||||
TipoMovto = True
|
||||
|
||||
If gvr.DataKey("EsComplementaria") = "True" Then
|
||||
ImporteME = gvr.DataKey("MonedaExtranjera").ToDecimal
|
||||
TipoCambio = gvr.DataKey("TipoCambio").ToDecimal
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
If TipoGrid = 0 Then 'gvmov
|
||||
Importe = gvr.FCTextBox("TxtCargo").Text.ToDecimal
|
||||
TmpCargo = TmpCargo + Importe
|
||||
TipoMovto = False
|
||||
|
||||
Importe = gvr.FCTextBox("TxtCargo").Text.ToDouble
|
||||
TmpCargo = TmpCargo + Importe
|
||||
TipoMovto = False
|
||||
If gvr.DataKey("EsComplementaria") = "True" Then
|
||||
ImporteME = gvr.FCTextBox("TxtCargoME").Text.ToDecimal
|
||||
TipoCambio = gvr.FCTextBox("TxtTC").Text.ToDecimal
|
||||
End If
|
||||
Else
|
||||
Importe = gvr.DataKey("Cargo").ToDecimal
|
||||
TmpCargo = TmpCargo + Importe
|
||||
TipoMovto = False
|
||||
|
||||
If gvr.DataKey("EsComplementaria") = "True" Then
|
||||
ImporteME = gvr.FCTextBox("TxtCargoME").Text.ToDecimal
|
||||
TipoCambio = gvr.FCTextBox("TxtTC").Text.ToDecimal
|
||||
If gvr.DataKey("EsComplementaria") = "True" Then
|
||||
ImporteME = gvr.DataKey("MonedaExtranjera").ToDecimal
|
||||
TipoCambio = gvr.DataKey("TipoCambio").ToDecimal
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If Not gvr.DataKey("CveConcepto").Contiene("30", "10") Then ' 30-bancos, 10-anticipos proveedores
|
||||
If Not gvr.DataKey("CveConceptoContable").Contiene("30", "10") Then ' 30-bancos, 10-anticipos proveedores
|
||||
|
||||
If gvr.DataKey("CveConcepto").ToEntero = 41 Then
|
||||
If gvr.DataKey("CveConceptoContable").ToEntero = 41 Then
|
||||
CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero
|
||||
Else
|
||||
CveIE = -1
|
||||
@@ -1147,23 +1148,29 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If idCuentaContabilizacion = 1 AndAlso (IdCtaContable = 0) Then
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
If Importe <> 0 Then
|
||||
Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero
|
||||
|
||||
'If gvr.datakey("CveConcepto") = "299" Then
|
||||
' tCveCuenta = gvr.DataKey("CveCuenta").ToEntero
|
||||
'End If
|
||||
Dim tReferencia As String = gvr.DataKey("Referencia")
|
||||
Dim tConcepto As String = gvr.DataKey("Concepto")
|
||||
Dim tCveSubProyecto As Integer = gvr.DataKey("CveSubProyecto").ToEntero
|
||||
Dim tCveTipoGasto As Integer = gvr.DataKey("CveTipoGasto").ToEntero
|
||||
If TipoGrid = 0 Then 'gvmov
|
||||
tReferencia = gvr.FCLiteral("LtlReferencia").Text
|
||||
tConcepto = gvr.FCTextBox("TxtConcepto").Text
|
||||
tCveSubProyecto = gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero
|
||||
tCveTipoGasto = gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePolizaInsertada, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.DataKey("CveConcepto").ToEntero, gvr.FCTextBox("TxtConcepto").Text,
|
||||
TxtFechaDocumento.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CveIE:=CveIE,
|
||||
If ObjMov.AddPrePolizasDetalle(CvePrePolizaInsertada, TipoMovto, Importe, tReferencia, gvr.DataKey("CveConceptoContable").ToEntero, tConcepto,
|
||||
TxtFechaDocumento.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=tCveSubProyecto, CveIE:=CveIE,
|
||||
CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, CveCompra:=gvr.DataKey("CveCompra").ToEntero,
|
||||
CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero,
|
||||
ImporteMX:=Importe, ImporteME:=ImporteME, TipoCambio:=TipoCambio,
|
||||
CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
|
||||
CveTipoGasto:=tCveTipoGasto,
|
||||
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta) Then
|
||||
ContRegInsertados = ContRegInsertados + 1
|
||||
|
||||
@@ -1172,7 +1179,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
If CveIE > 0 AndAlso gvr.DataKey("CveConcepto").ToEntero = 30 Then
|
||||
If CveIE > 0 AndAlso gvr.DataKey("CveConceptoContable").ToEntero = 30 Then
|
||||
MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""Texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE)
|
||||
End If
|
||||
|
||||
@@ -1197,7 +1204,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
MsgError = $"No se insertaron registros (Revise que los importes de los registros contengan valores)"
|
||||
End If
|
||||
|
||||
|
||||
If MsgError = "" Then
|
||||
'MENSAJE IE
|
||||
|
||||
@@ -1327,10 +1333,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim CveSubProyecto As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveSubProyecto").ToString.ToEntero
|
||||
Dim CveTipoGasto As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveTipoGasto").ToString.ToEntero
|
||||
Dim CveCuenta As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveCuenta").ToString.ToEntero
|
||||
Dim Cargo As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtCargo").Text.ToDouble
|
||||
Dim Abono As Double = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtAbono").Text.ToDouble
|
||||
Dim PorcentajeImpuesto As Double = GvPrePoliza.Rows(IndiceGrid).DataKey("PorcentajeImpuesto").ToEntero
|
||||
Dim Cargo As Decimal = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtCargo").Text.ToDecimal
|
||||
Dim Abono As Decimal = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtAbono").Text.ToDecimal
|
||||
Dim PorcentajeImpuesto As Decimal = GvPrePoliza.Rows(IndiceGrid).DataKey("PorcentajeImpuesto").ToDecimal
|
||||
Dim CveClasificacion As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveClasificacion").ToEntero
|
||||
Dim MonedaExtr As Decimal = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtCargo").Text.ToDecimal
|
||||
|
||||
'CargaConceptosContablesE()
|
||||
'CargaModalConceptoCuentas()
|
||||
@@ -1338,7 +1345,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DdlConceptosContablesE.SelectedValueExist(CveConceptoContable)
|
||||
DdlConceptosContablesE_SelectedIndexChanged(DdlConceptosContablesE, e)
|
||||
|
||||
TxtTipoCambio.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("TC").ToString.ToDouble.ToString("###,###,###.00")
|
||||
TxtTipoCambio.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("TC").ToString.ToDecimal.ToString("###,###,###.00")
|
||||
DdlModalConceptoTipoTransaccion.SelectedValueExist(GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoTipoTransaccion"))
|
||||
DdlModalConceptoCuenta.SelectedValueExist(GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoCuenta"))
|
||||
TxtModalConceptoDocumentoFolio.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoNumeroFolio")
|
||||
@@ -1346,6 +1353,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
TxtModalConceptoDocumentoObservaciones.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoObservaciones")
|
||||
TxtModalConceptoDocumentoImporte.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ContadoImporte").ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
TxtME.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ImporteME").ToDecimal.FormatoNumero
|
||||
|
||||
DdlPorcentajeIVAE.SelectedValueExist(PorcentajeImpuesto)
|
||||
|
||||
DdlProveedoresE.SelectedValueExist(CveProveedor)
|
||||
@@ -1428,8 +1437,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged
|
||||
|
||||
'Aquii hay que consultar el concepto y determinar que es lo que se vba aplicar
|
||||
@@ -1440,6 +1447,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If CveConceptoContableInsertar > 0 Then
|
||||
|
||||
DT_Concepto = GlobalDTContaConceptosContables(CveConceptoContableInsertar)
|
||||
DrConceptoContable = GlobalDTContaConceptosContables(CveConceptoContableInsertar).FiltroPrimero("")
|
||||
|
||||
Dim AplicaActivoFijo As Boolean = False
|
||||
Dim AplicaAlmacen As Boolean = False
|
||||
@@ -1455,6 +1463,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim AplicaTC As Boolean = False 'ok
|
||||
Dim AplicaVenta As Boolean = False
|
||||
Dim AplicaComplementaria As Boolean = False 'ok
|
||||
Dim AplicaME As Boolean = False 'ok
|
||||
|
||||
AplicaActivoFijo = Boolean.Parse(DT_Concepto.Rows(0)("AplicaActivoFijo").ToString)
|
||||
AplicaAlmacen = Boolean.Parse(DT_Concepto.Rows(0)("AplicaAlmacen").ToString)
|
||||
@@ -1472,6 +1481,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
AplicaTC = Boolean.Parse(DT_Concepto.Rows(0)("AplicaTC").ToString)
|
||||
AplicaVenta = Boolean.Parse(DT_Concepto.Rows(0)("AplicaVenta").ToString)
|
||||
AplicaComplementaria = Boolean.Parse(DT_Concepto.Rows(0)("EsComplementaria").ToString)
|
||||
'AplicaME = Boolean.Parse(DT_Concepto.Rows(0)("EsMonedaExtranjera").ToString)
|
||||
|
||||
|
||||
If AplicaImpuesto Then
|
||||
@@ -1494,15 +1504,10 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If AplicaPersonal Then
|
||||
CargaPersonalE()
|
||||
DvModalconceptoPersonal.Visible = True
|
||||
|
||||
'DdlPersonalE.Visible = True
|
||||
Else
|
||||
DvModalconceptoPersonal.Visible = False
|
||||
|
||||
'DdlPersonalE.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
If AplicaClasificacion Then
|
||||
CargaClasificacionesE()
|
||||
DvModalconceptoClasificacion.Visible = True
|
||||
@@ -1525,16 +1530,16 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
DvModalconceptoCliente.Visible = False
|
||||
End If
|
||||
|
||||
If AplicaBancos Then
|
||||
If AplicaBancos AndAlso Not AplicaComplementaria Then
|
||||
CargaModalConceptoTipoTransaccion("Egs")
|
||||
'DvMoldalConceptoAncho.Attributes.Add("style", "width:1000px")
|
||||
'DivModalConceptoAncho.Attributes.Add("style", "width:1000px")
|
||||
DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-6")
|
||||
DvMoldalConceptoSeccion2.Visible = True
|
||||
RegistraScript("$('#DvMoldalConceptoAncho').attr('style','width:1000px');")
|
||||
RegistraScript("$('#DivModalConceptoAncho').attr('style','width:1000px');")
|
||||
Else
|
||||
' DvMoldalConceptoAncho.Attributes.Add("style", "width:450px")
|
||||
' DivModalConceptoAncho.Attributes.Add("style", "width:450px")
|
||||
DvMoldalConceptoSeccion1.Attributes.Add("class", "col-md-12")
|
||||
RegistraScript("$('#DvMoldalConceptoAncho').attr('style','width:450px');")
|
||||
RegistraScript("$('#DivModalConceptoAncho').attr('style','width:450px');")
|
||||
DvMoldalConceptoSeccion2.Visible = False
|
||||
End If
|
||||
|
||||
@@ -1549,11 +1554,31 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Else
|
||||
DivMonedaExtranjera.Visible = False
|
||||
End If
|
||||
CargaCuentaConcepto(CveConceptoContableInsertar)
|
||||
|
||||
End If
|
||||
|
||||
UpModalConcepto.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentaConcepto(CveConcepto As Integer)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentasAsignacionesSistema(UsuarioActual.CveEmpresa, -1, 1, CveConcepto) Then
|
||||
Dim dr As DataRow = ObjConta.DtResultados.FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
DdlCuentaContableE.SelectedValueExist(dr("CveCuenta"))
|
||||
Else
|
||||
If ObjConta.GetCuentasGlobales(UsuarioActual.CveEmpresa, CveConcepto) Then
|
||||
Dim drY As DataRow = ObjConta.DtResultados.FiltroPrimero("")
|
||||
If drY IsNot Nothing Then
|
||||
DdlCuentaContableE.SelectedValueExist(drY("CveCuenta"))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Sub
|
||||
Private Sub CargaProveedoresE()
|
||||
DdlProveedoresE.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DdlProveedoresE.DataBind()
|
||||
@@ -1592,7 +1617,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If CveMoneda = 2 Then
|
||||
DdlVentasE.DataSource = ObjVentas.DtResultados.FiltraParametros("CveMoneda = 2")
|
||||
Else
|
||||
DdlVentasE.DataSource = ObjVentas.DtResultados '.FiltraParametros("Saldo > 0")
|
||||
DdlVentasE.DataSource = ObjVentas.DtResultados.FiltraParametros("CveMoneda = 1")
|
||||
End If
|
||||
|
||||
DdlVentasE.DataBind()
|
||||
@@ -1619,18 +1644,52 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
CargaComprasE(DdlProveedoresE.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
Private Sub DdlClientesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientesE.selectedindexchange
|
||||
Dim tCveMoneda As Integer = 1
|
||||
|
||||
CargaVentasE(DdlClientesE.SelectedValue.ToEntero, IIf(DdlConceptosContablesE.SelectedValue.Contiene("291", "292"), 2, -1))
|
||||
If DrConceptoContable IsNot Nothing Then
|
||||
Dim AplicaME = Boolean.Parse(DrConceptoContable("EsMonedaExtranjera").ToString)
|
||||
If AplicaME Then
|
||||
tCveMoneda = 2
|
||||
End If
|
||||
End If
|
||||
|
||||
CargaVentasE(DdlClientesE.SelectedValue.ToEntero, tCveMoneda)
|
||||
End Sub
|
||||
|
||||
Private Function CargaValidacionesConcepto() As Boolean
|
||||
Dim Retorno As Boolean = true
|
||||
|
||||
If DrConceptoContable IsNot Nothing Then
|
||||
Dim AplicaComplementaria = Boolean.Parse(DrConceptoContable("EsComplementaria").ToString)
|
||||
|
||||
If AplicaComplementaria Then
|
||||
Dim Importe As Decimal = IIf(TxtCargoE.Text.ToDecimal <> 0, TxtCargoE.Text.ToDecimal, TxtAbonoE.Text.ToDecimal)
|
||||
'valida Mon Extranjera por el TC - Mon Extranjera
|
||||
Dim dif As Decimal = ((TxtME.Text.ToDecimal * TxtTipoCambio.Text.ToDecimal) - TxtME.Text.ToDecimal).RoundSQL - Importe
|
||||
|
||||
If dif <> 0 Then
|
||||
Alert("El importe moneda extranjera no coinciden con el TC ")
|
||||
Retorno = False
|
||||
Else
|
||||
Retorno = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Protected Sub BtnAceptar_Click(sender As Object, e As EventArgs) Handles BtnAceptar.Click
|
||||
|
||||
'asdasdasd
|
||||
If Not CargaValidacionesConcepto() Then
|
||||
Exit Sub
|
||||
End If
|
||||
ChkSeguir.Visible = False
|
||||
|
||||
If IndiceGrid = -1 Then
|
||||
|
||||
ChkSeguir.Visible = True
|
||||
If DtMovimientos Is Nothing Then CreaDT()
|
||||
|
||||
Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero)
|
||||
@@ -1643,10 +1702,10 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
|
||||
dr("Concepto") = TxtConceptoE.Text
|
||||
dr("Referencia") = TxtReferenciaE.Text
|
||||
dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDouble) > 0, False, True)
|
||||
dr("Cargo") = TxtCargoE.Text.ToDouble
|
||||
dr("Abono") = TxtAbonoE.Text.ToDouble
|
||||
dr("ImporteMN") = If(Math.Abs(TxtCargoE.Text.ToDouble) > 0, TxtCargoE.Text.ToDouble, TxtAbonoE.Text.ToDouble)
|
||||
dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDecimal) > 0, False, True)
|
||||
dr("Cargo") = TxtCargoE.Text.ToDecimal
|
||||
dr("Abono") = TxtAbonoE.Text.ToDecimal
|
||||
dr("ImporteMN") = If(Math.Abs(TxtCargoE.Text.ToDecimal) > 0, TxtCargoE.Text.ToDecimal, TxtAbonoE.Text.ToDecimal)
|
||||
dr("CveSubProyecto") = DdlSubProyectoE.SelectedValue
|
||||
dr("SubProyecto") = DdlSubProyectoE.SelectedItem.Text
|
||||
dr("CveProveedor") = DdlProveedoresE.SelectedValue.ToEntero
|
||||
@@ -1675,7 +1734,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
|
||||
UpTotalCargo.Update()
|
||||
UpTotalAbono.Update()
|
||||
RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal")
|
||||
If Not ChkSeguir.Checked Then RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal")
|
||||
|
||||
Else
|
||||
Dim CvePrePolizaDetalle As Integer = GvPrePoliza.DataKeys(IndiceGrid).Value.ToString.ToEntero
|
||||
@@ -1686,65 +1745,65 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Rows = DtMovimientos.Select("IdMov = " & IdMov)
|
||||
End If
|
||||
If Rows.Count > 0 Then
|
||||
Dim dr As DataRow = Rows(0)
|
||||
Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero)
|
||||
dr("IdCtaContable") = IdCtaContable
|
||||
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
|
||||
dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text
|
||||
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
|
||||
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
|
||||
dr("Concepto") = TxtConceptoE.Text
|
||||
dr("Referencia") = TxtReferenciaE.Text
|
||||
dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDouble) > 0, False, True)
|
||||
dr("ImporteMN") = If(Math.Abs(TxtCargoE.Text.ToDouble) > 0, TxtCargoE.Text.ToDouble, TxtAbonoE.Text.ToDouble)
|
||||
dr("CveSubProyecto") = DdlSubProyectoE.SelectedValue
|
||||
dr("SubProyecto") = DdlSubProyectoE.SelectedItem.Text
|
||||
dr("CveProveedor") = DdlProveedoresE.SelectedValue.ToEntero
|
||||
dr("CveCompra") = DdlComprasE.SelectedValue.ToEntero
|
||||
dr("CvePersonal") = DdlPersonalE.SelectedValue.ToEntero
|
||||
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
|
||||
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
|
||||
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
|
||||
dr("Modificado") = True
|
||||
Dim dr As DataRow = Rows(0)
|
||||
Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero)
|
||||
dr("IdCtaContable") = IdCtaContable
|
||||
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
|
||||
dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text
|
||||
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
|
||||
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
|
||||
dr("Concepto") = TxtConceptoE.Text
|
||||
dr("Referencia") = TxtReferenciaE.Text
|
||||
dr("TipoMovto") = If(Math.Abs(TxtCargoE.Text.ToDecimal) > 0, False, True)
|
||||
dr("ImporteMN") = If(Math.Abs(TxtCargoE.Text.ToDecimal) > 0, TxtCargoE.Text.ToDecimal, TxtAbonoE.Text.ToDecimal)
|
||||
dr("CveSubProyecto") = DdlSubProyectoE.SelectedValue
|
||||
dr("SubProyecto") = DdlSubProyectoE.SelectedItem.Text
|
||||
dr("CveProveedor") = DdlProveedoresE.SelectedValue.ToEntero
|
||||
dr("CveCompra") = DdlComprasE.SelectedValue.ToEntero
|
||||
dr("CvePersonal") = DdlPersonalE.SelectedValue.ToEntero
|
||||
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
|
||||
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
|
||||
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
|
||||
dr("Modificado") = True
|
||||
|
||||
dr("ContadoCuenta") = DdlModalConceptoCuenta.SelectedValue.ToEntero
|
||||
dr("ContadoTipoTransaccion") = DdlModalConceptoTipoTransaccion.SelectedValue.ToEntero
|
||||
dr("ContadoNumeroFolio") = TxtModalConceptoDocumentoFolio.Text
|
||||
dr("ContadoBeneficiario") = TxtModalConceptoDocumentoBeneficiario.Text
|
||||
dr("ContadoObservaciones") = TxtModalConceptoDocumentoObservaciones.Text
|
||||
dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
|
||||
dr("ContadoCuenta") = DdlModalConceptoCuenta.SelectedValue.ToEntero
|
||||
dr("ContadoTipoTransaccion") = DdlModalConceptoTipoTransaccion.SelectedValue.ToEntero
|
||||
dr("ContadoNumeroFolio") = TxtModalConceptoDocumentoFolio.Text
|
||||
dr("ContadoBeneficiario") = TxtModalConceptoDocumentoBeneficiario.Text
|
||||
dr("ContadoObservaciones") = TxtModalConceptoDocumentoObservaciones.Text
|
||||
dr("ContadoImporte") = TxtModalConceptoDocumentoImporte.Text.ToDecimal
|
||||
|
||||
dr("TC") = TxtTipoCambio.Text.ToDecimal
|
||||
|
||||
dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal
|
||||
|
||||
If TxtCargoE.Text <> "" Then
|
||||
dr("Cargo") = TxtCargoE.Text.ToDouble
|
||||
dr("Abono") = "".ToDouble
|
||||
Else
|
||||
dr("Abono") = TxtAbonoE.Text.ToDouble
|
||||
dr("Cargo") = "".ToDouble
|
||||
End If
|
||||
If TxtCargoE.Text <> "" Then
|
||||
dr("Cargo") = TxtCargoE.Text.ToDecimal
|
||||
dr("Abono") = "".ToDecimal
|
||||
Else
|
||||
dr("Abono") = TxtAbonoE.Text.ToDecimal
|
||||
dr("Cargo") = "".ToDecimal
|
||||
End If
|
||||
|
||||
DtMovimientos.AcceptChanges()
|
||||
GvPrePoliza.EditIndex = -1
|
||||
DtMovimientos.AcceptChanges()
|
||||
GvPrePoliza.EditIndex = -1
|
||||
|
||||
'If CvePrePoliza > 0 Or CvePrePolizaOrigen > 0 Then
|
||||
GvPrePoliza.DataSource = DtMovimientos
|
||||
GvPrePoliza.DataBind()
|
||||
UpPrePoliza.Update()
|
||||
GvPrePoliza.DataBind()
|
||||
UpPrePoliza.Update()
|
||||
GvPrePoliza.Visible = True
|
||||
'End If
|
||||
|
||||
GvPrePoliza.Columns(11).Visible = True
|
||||
GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
|
||||
GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
|
||||
|
||||
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
|
||||
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
|
||||
UpTotalCargo.Update()
|
||||
UpTotalAbono.Update()
|
||||
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
|
||||
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
|
||||
UpTotalCargo.Update()
|
||||
UpTotalAbono.Update()
|
||||
DdlClientesE.SelectedValue = "-1"
|
||||
DdlClientesE.SelectedText = ""
|
||||
|
||||
End If
|
||||
End If
|
||||
RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal")
|
||||
End If
|
||||
UpPrePoliza.Update()
|
||||
@@ -1795,11 +1854,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("Cuenta") = DdlConceptosContables.SelectedItem
|
||||
dr("Referencia") = TxtReferencia.Text
|
||||
dr("Concepto") = TxtConcepto.Text
|
||||
dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, False, True)
|
||||
dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDecimal) > 0, False, True)
|
||||
dr("EsComodin") = 0
|
||||
dr("CveConcepto") = DdlConceptosContables.SelectedValue
|
||||
dr("Cargo") = TxtCargo.Text.ToDouble
|
||||
dr("Abono") = TxtAbono.Text.ToDouble
|
||||
dr("CveConceptoContable") = DdlConceptosContables.SelectedValue
|
||||
dr("Cargo") = TxtCargo.Text.ToDecimal
|
||||
dr("Abono") = TxtAbono.Text.ToDecimal
|
||||
dr("Descripcion") = TxtDescripcion.Text
|
||||
dr("CveSubProyecto") = DdlSubProyecto.SelectedValue
|
||||
dr("CveProveedor") = DdlProveedores.SelectedValue.ToEntero
|
||||
@@ -1825,10 +1884,10 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CveConceptoContable") = DdlConceptosContables.SelectedValue
|
||||
dr("Concepto") = TxtDescripcion.Text
|
||||
dr("Referencia") = TxtReferencia.Text
|
||||
dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, False, True)
|
||||
dr("Cargo") = TxtCargo.Text.ToDouble
|
||||
dr("Abono") = TxtAbono.Text.ToDouble
|
||||
dr("ImporteMN") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, TxtCargo.Text.ToDouble, TxtAbono.Text.ToDouble)
|
||||
dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDecimal) > 0, False, True)
|
||||
dr("Cargo") = TxtCargo.Text.ToDecimal
|
||||
dr("Abono") = TxtAbono.Text.ToDecimal
|
||||
dr("ImporteMN") = If(Math.Abs(TxtCargo.Text.ToDecimal) > 0, TxtCargo.Text.ToDecimal, TxtAbono.Text.ToDecimal)
|
||||
dr("CveSubProyecto") = DdlSubProyecto.SelectedValue
|
||||
dr("SubProyecto") = DdlSubProyecto.SelectedItem.Text
|
||||
dr("CveProveedor") = DdlProveedores.SelectedValue.ToEntero
|
||||
@@ -1837,9 +1896,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CveCliente") = DdlClientes.SelectedValue.ToEntero
|
||||
dr("CveVenta") = DdlVentas.SelectedValue.ToEntero
|
||||
|
||||
|
||||
TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + TxtAbono.Text.ToDouble).ToString.FormatoNumero
|
||||
TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + TxtCargo.Text.ToDouble).ToString.FormatoNumero
|
||||
TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDecimal + TxtAbono.Text.ToDecimal).ToString.FormatoNumero
|
||||
TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDecimal + TxtCargo.Text.ToDecimal).ToString.FormatoNumero
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
DtMovimientos.AcceptChanges()
|
||||
|
||||
@@ -1867,13 +1925,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("Cuenta") = DdlConceptosContables.SelectedItem.Text
|
||||
dr("Referencia") = TxtReferencia.Text
|
||||
dr("Concepto") = TxtConcepto.Text
|
||||
dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDouble) > 0, False, True)
|
||||
dr("TipoMovto") = If(Math.Abs(TxtCargo.Text.ToDecimal) > 0, False, True)
|
||||
dr("EsComodin") = 0
|
||||
dr("CveConcepto") = DdlConceptosContables.SelectedValue
|
||||
dr("CveConceptoContable") = DdlConceptosContables.SelectedValue
|
||||
dr("ConceptoContable") = DdlConceptosContables.SelectedItem.Text
|
||||
dr("Cargo") = TxtCargo.Text.ToDouble
|
||||
dr("Abono") = TxtAbono.Text.ToDouble
|
||||
dr("Cargo") = TxtCargo.Text.ToDecimal
|
||||
dr("Abono") = TxtAbono.Text.ToDecimal
|
||||
dr("Descripcion") = TxtDescripcion.Text
|
||||
dr("CveSubProyecto") = DdlSubProyecto.SelectedValue
|
||||
dr("CveProveedor") = DdlProveedores.SelectedValue.ToEntero
|
||||
@@ -1883,8 +1940,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CveCliente") = DdlClientes.SelectedValue.ToEntero
|
||||
dr("CveVenta") = DdlVentas.SelectedValue.ToEntero
|
||||
|
||||
TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + TxtAbono.Text.ToDouble).ToString.FormatoNumero
|
||||
TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + TxtCargo.Text.ToDouble).ToString.FormatoNumero
|
||||
TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDecimal + TxtAbono.Text.ToDecimal).ToString.FormatoNumero
|
||||
TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDecimal + TxtCargo.Text.ToDecimal).ToString.FormatoNumero
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
DtMovimientos.AcceptChanges()
|
||||
|
||||
@@ -1980,9 +2037,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
GvMov.DataBind()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero
|
||||
'CveCuenta = DdlCuenta.SelectedValue.ToEntero
|
||||
'Folio = TxtDocumentoFolio.Text
|
||||
@@ -2074,7 +2128,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
TxtConcepto.Text = DrM("Concepto")
|
||||
' (Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) = dr("TipoMovto")
|
||||
DrM("EsComodin") = 0
|
||||
DdlConceptosContables.SelectedValueExist(DrM("CveConcepto").ToString)
|
||||
DdlConceptosContables.SelectedValueExist(DrM("CveConceptoContable").ToString)
|
||||
TxtCargo.Text = DrM("Cargo").ToString
|
||||
TxtAbono.Text = DrM("Abono").ToString
|
||||
TxtDescripcion.Text = DrM("Descripcion").ToString
|
||||
@@ -2203,7 +2257,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
.SubProyecto = row.Item("SubProyecto"),
|
||||
.Folio = "",
|
||||
.TipoTransferencia = "",
|
||||
.CveConceptoContable = row.Item("CveConcepto"),
|
||||
.CveConceptoContable = row.Item("CveConceptoContable"),
|
||||
.CveSubProyecto = IIf(row.Item("CveSubProyecto").ToString.ToEntero > 0, row.Item("CveSubProyecto"), -1),
|
||||
.IdCtaContable = IIf(row.Item("IdCtaContable").ToString.ToEntero > 0, row.Item("IdCtaContable"), -1),
|
||||
.CveCuenta = row.Item("CveCuenta")
|
||||
@@ -2322,7 +2376,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim ObjConta2 As New ClsContabilidad
|
||||
Dim FolioExcel As Long = -1
|
||||
Dim TipoMov As Integer = -1
|
||||
Dim TipoNaturalesa As String = ""
|
||||
Dim TipoNaturaleza As String = ""
|
||||
Dim CveBancoCuenta As Integer = -1
|
||||
If ObjConta2.GetCuentas(-1, Row("Cuenta").ToString.Replace("-", "").Trim, 1, UsuarioActual.CveEmpresa) Then
|
||||
CveCuentaExcel = ObjConta2.DtResultados.FiltroPrimeroValor("CveCuenta", "").ToEntero
|
||||
@@ -2355,7 +2409,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
|
||||
TipoMov = GlobalDTTipoTransacciones.FiltroPrimeroValor("CveTipoTransaccion", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero
|
||||
TipoNaturalesa = GlobalDTTipoTransacciones.FiltroPrimeroValor("Tipo", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero
|
||||
TipoNaturaleza = GlobalDTTipoTransacciones.FiltroPrimeroValor("Tipo", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero
|
||||
|
||||
FolioExcel = Row("Folio").ToString.ToEntero
|
||||
CveTipoTransaccion = TipoMov
|
||||
@@ -2376,16 +2430,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If Row("Abono").ToString.ToDecimal > 0 And TipoNaturalesa = "Ing" Or Row("Cargo").ToString.ToDecimal > 0 And TipoNaturalesa = "Egs" Then
|
||||
If Row("Abono").ToString.ToDecimal > 0 And TipoNaturaleza = "Ing" Or Row("Cargo").ToString.ToDecimal > 0 And TipoNaturaleza = "Egs" Then
|
||||
Alert($"El movimiento con cuenta: {NombreCuenta} , importe: {ImporteDocumento.ToString("###,###,###.00")} (registro {ContadorRegistros}), no tiene la naturaleza correcta", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If Row("Abono").ToString.ToDecimal > 0 And Row("Cargo").ToString.ToDecimal > 0 Then
|
||||
@@ -2393,14 +2442,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If CveConceptoContable = 30 AndAlso Row("TipoTransferencia").ToString = "" Then
|
||||
Alert($" El registro {ContadorRegistros} es movimiento bancario y no se especifica el tipo de transferencia , importe: {ImporteDocumento.ToString("###,###,###.00")}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
'sino viene el cveconcepto, busca por le nombre del concepto
|
||||
If CveConceptoContable = 0 Then
|
||||
Alert(String.Format("El concepto <b>{0}</b> no se reconoció, favor de verificar el archivo.", Row("ConceptoAdministrativo")))
|
||||
@@ -2426,18 +2472,21 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim dr As DataRow = DtMovimientos.NewRow
|
||||
Dim CodigoCuenta As String = ""
|
||||
|
||||
dr("CodigoCuenta") = NombreCuenta 'Cuenta & "<br>" & NombreCuenta
|
||||
dr("CodigoCuenta") = NombreCuenta
|
||||
dr("CodigoNombreCuenta") = NombreCuenta
|
||||
dr("Cuenta") = ConceptoAdministrativo
|
||||
dr("Referencia") = Row("Referencia").ToString
|
||||
dr("Concepto") = Row("Concepto").ToString
|
||||
dr("TipoMovto") = TipoMovto
|
||||
dr("EsComodin") = 0
|
||||
dr("CveConcepto") = CveConceptoContable
|
||||
dr("CveConceptoContable") = CveConceptoContable
|
||||
dr("ConceptoContable") = Row("ConceptoAdministrativo").ToString
|
||||
dr("Cargo") = Row("Cargo").ToString.ToDecimal.RoundSQL
|
||||
dr("Abono") = Row("Abono").ToString.ToDecimal.RoundSQL
|
||||
dr("ImporteME") = 0
|
||||
dr("ImporteMN") = IIf(Row("Cargo").ToString.ToDecimal <> 0, Row("Cargo").ToString.ToDecimal, Row("Abono").ToString.ToDecimal)
|
||||
dr("Descripcion") = Row("Concepto").ToString
|
||||
dr("SubProyecto") = Row("SubProyecto").ToString.Trim
|
||||
dr("CveSubProyecto") = CveSubProyecto
|
||||
dr("CveProveedor") = -1
|
||||
dr("CveCompra") = -1
|
||||
@@ -2446,6 +2495,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("CveCliente") = -1
|
||||
dr("CveVenta") = -1
|
||||
dr("CveCuenta") = CveCuentaExcel
|
||||
dr("CveTipoGasto") = -1
|
||||
dr("CvePrePolizaDetalle") = -1
|
||||
dr("PorcentajeImpuesto") = 0D
|
||||
dr("TC") = 1
|
||||
dr("EsComplementaria") = 0
|
||||
dr("Modificado") = 1
|
||||
|
||||
dr("ContadoTipoTransaccion") = CveTipoTransaccion
|
||||
dr("ContadoCuenta") = CveBancoCuenta
|
||||
@@ -2454,23 +2509,20 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
dr("ContadoBeneficiario") = Beneficiario
|
||||
dr("ContadoObservaciones") = Observaciones
|
||||
|
||||
If Row("Cargo").ToString.ToDecimal <> 0 OrElse Row("Abono").ToString.ToDecimal Then
|
||||
If Row("Cargo").ToString.ToDecimal <> 0 OrElse Row("Abono").ToString.ToDecimal <> 0 Then
|
||||
DtMovimientos.Rows.Add(dr)
|
||||
DtMovimientos.AcceptChanges()
|
||||
End If
|
||||
|
||||
ContadorRegistros = ContadorRegistros + 1
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
|
||||
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
|
||||
|
||||
GvMov.DataSource = DtMovimientos
|
||||
GvMov.DataBind()
|
||||
UPMovs.Update()
|
||||
GvPrePoliza.DataSource = DtMovimientos
|
||||
GvPrePoliza.DataBind()
|
||||
UpPrePoliza.Update()
|
||||
|
||||
Catch ex As Exception
|
||||
Alert("No se pudo cargar el excel", TipoMensaje.MsgAdvertencia)
|
||||
@@ -2774,7 +2826,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza"))
|
||||
divContabilizada.Visible = True
|
||||
IdPoliza = dr("IdPoliza").ToString.ToEntero
|
||||
ElseIf TxtTotalCargos.Text.ToDouble = TxtTotalAbonos.Text.ToDouble Then
|
||||
ElseIf TxtTotalCargos.Text.ToDecimal = TxtTotalAbonos.Text.ToDecimal Then
|
||||
'sino está contabilizada, se activa el botón
|
||||
'BtnContabilizar.Visible = True
|
||||
End If
|
||||
@@ -2859,7 +2911,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||
Dim idCuentaContabilizacion As Long = 1
|
||||
Dim Importe As Double = 0
|
||||
Dim Importe As Decimal = 0
|
||||
Dim ImporteME As Decimal = 0
|
||||
Dim TipoCambio As Decimal = 1
|
||||
Dim TipoMovto As Boolean = False
|
||||
@@ -2869,14 +2921,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
'inserto las compras que voy a pagarDdlSaldos
|
||||
For Each gvr As GridViewRow In GvPrePoliza.Rows
|
||||
|
||||
|
||||
|
||||
ImporteME = 0
|
||||
TipoCambio = 1
|
||||
|
||||
If Boolean.Parse(gvr.DataKey("TipoMovto")) Then
|
||||
|
||||
Importe = gvr.FCLiteral("TxtAbono").Text.ToDouble
|
||||
Importe = gvr.FCLiteral("TxtAbono").Text.ToDecimal
|
||||
TipoMovto = True
|
||||
|
||||
If gvr.DataKey("EsComplementaria") = "True" Then
|
||||
@@ -2885,7 +2935,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
|
||||
Else
|
||||
Importe = gvr.FCLiteral("TxtCargo").Text.ToDouble
|
||||
Importe = gvr.FCLiteral("TxtCargo").Text.ToDecimal
|
||||
TipoMovto = False
|
||||
|
||||
If gvr.DataKey("EsComplementaria") = "True" Then
|
||||
@@ -3060,8 +3110,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
UpPoliza.Update()
|
||||
UpGuardar.Update()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LnkFolioManual_Click(sender As Object, e As EventArgs) Handles LnkFolioManual.Click
|
||||
@@ -3071,5 +3119,17 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
UpPoliza.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlVentasE_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Dim Venta As New ClsVentas
|
||||
If Venta.GetVenta(DdlVentasE.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = Venta.DtResultados.FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
TxtTipoCambio.Text = dr("TipoCambioValuacion")
|
||||
End If
|
||||
End If
|
||||
|
||||
Venta.Dispose()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -1429,7 +1429,7 @@
|
||||
</Line>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>21.48868cm</Top>
|
||||
<Top>20.79018cm</Top>
|
||||
<Left>0.0208cm</Left>
|
||||
<Height>2.10099cm</Height>
|
||||
<Width>20.06179cm</Width>
|
||||
@@ -2750,7 +2750,7 @@
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DsOC</DataSetName>
|
||||
<Top>4.77915cm</Top>
|
||||
<Top>4.08065cm</Top>
|
||||
<Left>0.11516cm</Left>
|
||||
<Height>2.29418cm</Height>
|
||||
<Width>19.97108cm</Width>
|
||||
@@ -3175,7 +3175,7 @@
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>14.08621cm</Top>
|
||||
<Top>13.38771cm</Top>
|
||||
<Left>0.04257cm</Left>
|
||||
<Height>3.74574cm</Height>
|
||||
<Width>20.109cm</Width>
|
||||
@@ -4241,7 +4241,7 @@
|
||||
</Tablix>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>7.24707cm</Top>
|
||||
<Top>6.54857cm</Top>
|
||||
<Left>0.11516cm</Left>
|
||||
<Height>6.80033cm</Height>
|
||||
<Width>20.03641cm</Width>
|
||||
@@ -4288,7 +4288,7 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox8</rd:DefaultName>
|
||||
<Top>20.29602cm</Top>
|
||||
<Top>19.59752cm</Top>
|
||||
<Left>0.07003cm</Left>
|
||||
<Height>1.01627cm</Height>
|
||||
<Width>5.45089cm</Width>
|
||||
@@ -4749,7 +4749,7 @@
|
||||
</Tablix>
|
||||
</ReportItems>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Top>17.84606cm</Top>
|
||||
<Top>17.14756cm</Top>
|
||||
<Left>0.00547cm</Left>
|
||||
<Height>2.25247cm</Height>
|
||||
<Width>20.1554cm</Width>
|
||||
@@ -4763,273 +4763,6 @@
|
||||
</Border>
|
||||
</Style>
|
||||
</Rectangle>
|
||||
<Textbox Name="Textbox19">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Nombre</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>1.14544in</Top>
|
||||
<Left>0.07305cm</Left>
|
||||
<Height>0.22222in</Height>
|
||||
<Width>0.81128in</Width>
|
||||
<ZIndex>16</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>#c4d79b</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Style>None</Style>
|
||||
</TopBorder>
|
||||
<LeftBorder>
|
||||
<Style>None</Style>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Style>None</Style>
|
||||
</RightBorder>
|
||||
<BackgroundColor>#c4d79b</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox20">
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!ClienteNombre.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>1.14544in</Top>
|
||||
<Left>0.84004in</Left>
|
||||
<Height>0.22222in</Height>
|
||||
<Width>4.80807in</Width>
|
||||
<ZIndex>17</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>#c4d79b</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Style>None</Style>
|
||||
</TopBorder>
|
||||
<LeftBorder>
|
||||
<Style>None</Style>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Style>None</Style>
|
||||
</RightBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox22">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Dirección</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>1.36766in</Top>
|
||||
<Left>0.02757in</Left>
|
||||
<Height>0.2309in</Height>
|
||||
<Width>0.80675in</Width>
|
||||
<ZIndex>18</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>#c4d79b</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Style>None</Style>
|
||||
</TopBorder>
|
||||
<LeftBorder>
|
||||
<Style>None</Style>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Style>None</Style>
|
||||
</RightBorder>
|
||||
<BackgroundColor>#c4d79b</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox29">
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!ClienteDireccion.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>1.36766in</Top>
|
||||
<Left>0.84004in</Left>
|
||||
<Height>0.2309in</Height>
|
||||
<Width>7.0427in</Width>
|
||||
<ZIndex>19</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>#c4d79b</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Style>None</Style>
|
||||
</TopBorder>
|
||||
<LeftBorder>
|
||||
<Style>None</Style>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Style>None</Style>
|
||||
</RightBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox30">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Ciudad</Value>
|
||||
<Style>
|
||||
<FontFamily>Calibri</FontFamily>
|
||||
<FontSize>9pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>1.59856in</Top>
|
||||
<Left>0.02876in</Left>
|
||||
<Height>0.23558in</Height>
|
||||
<Width>0.81128in</Width>
|
||||
<ZIndex>20</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Style>None</Style>
|
||||
</TopBorder>
|
||||
<BottomBorder>
|
||||
<Color>#c4d79b</Color>
|
||||
<Width>1.25pt</Width>
|
||||
</BottomBorder>
|
||||
<LeftBorder>
|
||||
<Style>None</Style>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Style>None</Style>
|
||||
</RightBorder>
|
||||
<BackgroundColor>#c4d79b</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox31">
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!ClienteLugar.Value</Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontSize>6pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>1.59856in</Top>
|
||||
<Left>0.84004in</Left>
|
||||
<Height>0.23611in</Height>
|
||||
<Width>4.79418in</Width>
|
||||
<ZIndex>21</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>#c4d79b</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Style>None</Style>
|
||||
</TopBorder>
|
||||
<LeftBorder>
|
||||
<Style>None</Style>
|
||||
</LeftBorder>
|
||||
<RightBorder>
|
||||
<Style>None</Style>
|
||||
</RightBorder>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Textbox Name="Textbox32">
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
@@ -5059,11 +4792,11 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox19</rd:DefaultName>
|
||||
<Top>1.62495in</Top>
|
||||
<Left>5.61883in</Left>
|
||||
<Height>0.2092in</Height>
|
||||
<Width>2.26391in</Width>
|
||||
<ZIndex>22</ZIndex>
|
||||
<Top>1.37495in</Top>
|
||||
<Left>5.662in</Left>
|
||||
<Height>0.23161in</Height>
|
||||
<Width>2.24597in</Width>
|
||||
<ZIndex>16</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>#c4d79b</Color>
|
||||
@@ -5085,7 +4818,7 @@
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>23.58967cm</Height>
|
||||
<Height>22.89117cm</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>20.16633cm</Width>
|
||||
|
||||
@@ -4561,13 +4561,15 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Value>GGN:</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox209</rd:DefaultName>
|
||||
@@ -4602,7 +4604,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Value>=Parameters!Permiso.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
@@ -7146,7 +7148,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -7179,7 +7180,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -7212,7 +7212,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -7245,7 +7244,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
@@ -7278,7 +7276,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
@@ -7334,6 +7331,12 @@
|
||||
</ReportSection>
|
||||
</ReportSections>
|
||||
<ReportParameters>
|
||||
<ReportParameter Name="Permiso">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="NoEmbarque">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
|
||||
@@ -1329,30 +1329,30 @@ Partial Class General_SaldosIniciales
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaComplementaria = True
|
||||
|
||||
'PrePólizaDetalle
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SubTotal, Folio.ToString, 4, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=Sucursal.ToEntero, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, ConceptoContable, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SubTotal, Folio.ToString, 4, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=Sucursal.ToEntero, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, ConceptoContable, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
|
||||
If IVA > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, Folio.ToString, 13, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IVA, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, Folio.ToString, 13, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IVA, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
End If
|
||||
'If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio.ToString, 38, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS) Then ErrorVentas = True : Exit For
|
||||
|
||||
If RetIVA > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetIVA, Folio.ToString, 8, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=RetIVA, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetIVA, Folio.ToString, 8, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=RetIVA, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
End If
|
||||
If ImpuestoLocal > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImpuestoLocal, Folio.ToString, 27, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImpuestoLocal, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImpuestoLocal, Folio.ToString, 27, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImpuestoLocal, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
End If
|
||||
|
||||
|
||||
If UsaComplementaria Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total * TipoCambio.ToDecimal - Total, Folio.ToString, 203, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteME:=Total, ImporteMX:=Total * TipoCambio.ToDecimal - Total, TipoCambio:=TipoCambio.ToDecimal) Then ErrorVentas = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total * TipoCambio.ToDecimal - Total, Folio.ToString, 203, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteME:=Total, ImporteMX:=Total * TipoCambio.ToDecimal - Total, TipoCambio:=TipoCambio.ToDecimal, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
End If
|
||||
|
||||
'Saldo
|
||||
If Saldo < Total Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total - Saldo, Folio.ToString, ConceptoContablePago, Folio.ToString, Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total - Saldo, CveVentaAmortizacion:=CveVenta) Then ErrorVentas = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total - Saldo, Folio.ToString, 95, Folio.ToString, Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total - Saldo) Then ErrorVentas = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total - Saldo, Folio.ToString, ConceptoContablePago, Folio.ToString, Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total - Saldo, CveVentaAmortizacion:=CveVenta, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total - Saldo, Folio.ToString, 95, Folio.ToString, Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total - Saldo, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -1360,8 +1360,8 @@ Partial Class General_SaldosIniciales
|
||||
Dim CveIE As Integer = ObjIE.AddBancos_IE(1, 1, Fecha, Folio.ToString, "", Total, 1,
|
||||
1, "Anticipo Cliente", "", False, False, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, 30, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveIE:=CveIE, CveCliente:=CveCliente) Then ErrorVentas = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total, Folio.ToString, 66, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveIE:=CveIE, CveCliente:=CveCliente) Then ErrorVentas = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, 30, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveIE:=CveIE, CveCliente:=CveCliente, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total, Folio.ToString, 66, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveIE:=CveIE, CveCliente:=CveCliente, Contabilizable:=False) Then ErrorVentas = True : Exit For
|
||||
|
||||
End If
|
||||
Encontrados = Encontrados + 1
|
||||
|
||||
@@ -8147,7 +8147,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
if (objnom.GetDispersionNominaBanorte(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CrearLayoutNominaBanorte(objnom.DtResultados, "1234");
|
||||
CrearLayoutNominaBanorte(objnom.DtResultados, "66564");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -451,9 +451,16 @@
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaFAdd" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaFAdd" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-2" style="padding-top: 14px; padding-left: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker " style="padding-left: 0px;" data-date-format="dd/mm/yyyy">
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaFAdd" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<asp:LinkButton ID="LnkSolicitarSat" OnClick="LnkSolicitarSat_Click" runat="server">Solicitar</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkSolicitarSat" CssClass="btn btn-primary" OnClick="LnkSolicitarSat_Click" runat="server">Solicitar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
@@ -44,9 +49,9 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
TxtRpdFechaInicio.Text = string.Format("01/01/{0}", DateTime.Now.Year - 1);
|
||||
TxtRpdFechaFin.Text = string.Format("31/12/{0}", DateTime.Now.Year - 1);
|
||||
LnkConsultar_Click(null, null);
|
||||
TxtRpdFechaInicio.Text = string.Format("01/{0:MM/yyyy}", DateTime.Now.AddMonths(-1));
|
||||
TxtRpdFechaFin.Text = string.Format("{0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).LastDayOfMonth());
|
||||
//LnkConsultar_Click(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,6 +179,9 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
|
||||
}
|
||||
}
|
||||
UPModalViewSolicitudes.Update();
|
||||
var api = new GeneralesAPI();
|
||||
api.GeneraSolicitud();
|
||||
api.VerificaSolicitudesNominas();
|
||||
}
|
||||
protected void LnkShowSolicitudes_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -196,6 +204,9 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
|
||||
using (ClsNominas nom = new ClsNominas())
|
||||
{
|
||||
Continuar = nom.SolicitudesNominasAdd(idSolicitudCFDI, idSolicitudMetadata, estatus, observaciones, fechaInicio, fechaFin, cveUsuarioIng, cveEmpresa);
|
||||
var api = new GeneralesAPI();
|
||||
api.GeneraSolicitud();
|
||||
api.VerificaSolicitudesNominas();
|
||||
}
|
||||
if (Continuar)
|
||||
{
|
||||
@@ -207,4 +218,198 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class GeneralesAPI : ADSNetLibrary.Helpers.Conexiones.SIGAPI.BaseSIGAPI
|
||||
{
|
||||
public GeneralesAPI(string domainApi = "http://localhost:4001/", string token = "") : base(domainApi, token) { }
|
||||
|
||||
|
||||
public object GeneraSolicitud()
|
||||
{
|
||||
return getData<object>("GeneraSolicitud", null, ADSNetLibrary.Helpers.Conexiones.SIGAPI.requestMethod.GET,false);
|
||||
}
|
||||
public object VerificaSolicitudesNominas()
|
||||
{
|
||||
return getData<object>("VerificaSolicitudesNominas", null, ADSNetLibrary.Helpers.Conexiones.SIGAPI.requestMethod.GET, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//using ADSNetLibrary. SIGAPI;
|
||||
//using ADSNetLibrary. SIGAPI.Models;
|
||||
//using ADSNetLibrary. SIGAPI.Models.Request;
|
||||
//using ADSNetLibrary.SIGAPI.Models.Sistema;
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
////using System.IdentityModel.Tokens.Jwt;
|
||||
//using System.Linq;
|
||||
//using System.Net.Http;
|
||||
//using System.Net.Http.Headers;
|
||||
//using System.Text;
|
||||
//using System.Threading;
|
||||
//using System.Threading.Tasks;
|
||||
|
||||
namespace ADSNetLibraryzd.Helpers.Conexiones.SIGAPI
|
||||
{
|
||||
|
||||
public enum requestMethod
|
||||
{
|
||||
POST = 1,
|
||||
GET = 2
|
||||
}
|
||||
public class BaseSIGAPI
|
||||
{
|
||||
private const string tituloLog = "ADSNetLibrary.Helpers.Conexiones.SIGAPI";
|
||||
public string domainApi;
|
||||
public string authorization;
|
||||
protected string RouteController = "";
|
||||
protected string FullRoute = "";
|
||||
public string GetRoutbyclass() { string classname = this.GetType().Name; return classname.Substring(0, classname.Length - 3); }
|
||||
public string GetRoute(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(FullRoute))
|
||||
{
|
||||
return string.Format("api/{0}/{1}", (string.IsNullOrEmpty(RouteController) ? GetRoutbyclass() : RouteController), path);
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Format("{0}{1}", FullRoute, path);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// nueva instancia de conexion para una api
|
||||
/// </summary>
|
||||
/// <param name="domainApi"> url de la api</param>
|
||||
/// <param name="authorization"> llenar si se tiene si se desea obtner usuar campos usuario y pasword</param>
|
||||
public BaseSIGAPI(string domainApi, string authorization = null, string fullRoute = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(domainApi))
|
||||
{
|
||||
domainApi = "http://localhost:4001/";//"http://jam.adssistemas.mx:4001/";//Helpers.ModVars.UrlApi;
|
||||
}
|
||||
this.authorization = authorization;
|
||||
this.domainApi = domainApi;
|
||||
this.FullRoute = fullRoute;
|
||||
}
|
||||
|
||||
//public string GetSIGToken(string userName, string password, int cveEmpresa)
|
||||
//{
|
||||
// var objauth = new RequestLogin() { UserName = userName, Password = password, CveEmpresa = cveEmpresa };
|
||||
// var retorno = getData<ResponseModel<ResponseLogin>>("api/Usuario/Login", objauth, requestMethod.POST, false, true);
|
||||
// if (retorno != null && retorno.IsSuccess)
|
||||
// {
|
||||
// return retorno.Result.AccessToken;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Obtiene datos de la api asincrono.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Clase genérica en donde se obtiene la información del SqlDataReader.</typeparam>
|
||||
/// <param name="path">ruta sin domino ejemplo "/api/usuarios/login".</param>
|
||||
/// <param name="requestobject">request object.</param>
|
||||
/// <returns>Lista de objetos.</returns>
|
||||
public async Task<T> getDataAsync<T>(string path, object requestobject, requestMethod reqmet = requestMethod.POST, bool needauthorization = true, bool isfullpath = false) where T : class, new()
|
||||
{
|
||||
T objreturn = null;
|
||||
using (
|
||||
HttpClient client = new HttpClient())
|
||||
{
|
||||
// Setting Base address.
|
||||
client.BaseAddress = new Uri(domainApi);
|
||||
// Setting content type.
|
||||
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
||||
// Setting Authorization.
|
||||
if (needauthorization) { client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", authorization); }
|
||||
client.Timeout = TimeSpan.FromMinutes(15);
|
||||
HttpResponseMessage response = new HttpResponseMessage();
|
||||
|
||||
var strjsonreq = Newtonsoft.Json.JsonConvert.SerializeObject(requestobject);
|
||||
StringContent content = new StringContent(strjsonreq, Encoding.UTF8, "application/json");
|
||||
string route = isfullpath ? path : GetRoute(path);
|
||||
try
|
||||
{
|
||||
|
||||
switch (reqmet)
|
||||
{
|
||||
case requestMethod.POST:
|
||||
response = await client.PostAsync(route, content);
|
||||
break;
|
||||
case requestMethod.GET:
|
||||
response = await client.GetAsync(route);
|
||||
break;
|
||||
}
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string jsondata = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
||||
Newtonsoft.Json.JsonSerializerSettings settings = new Newtonsoft.Json.JsonSerializerSettings
|
||||
{
|
||||
NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
|
||||
MissingMemberHandling = Newtonsoft.Json.MissingMemberHandling.Ignore
|
||||
};
|
||||
objreturn = Newtonsoft.Json.JsonConvert.DeserializeObject<T>(jsondata, settings);
|
||||
}
|
||||
else {
|
||||
//ModExtensiones.GuardaLog(string.Format("{0}{1}{2}{1}StatusCode:{3}{1}{4}{1}{5}{1}", tituloLog, ModVars.NewLine, route, response.StatusCode, response.RequestMessage, strjsonreq), ModVars.ADSNetLibraryLog);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
//ModExtensiones.GuardaLog(string.Format("{0}{1}{2}{1}{3}{1}{4}{1}", tituloLog, ModVars.NewLine, route, e, strjsonreq), ModVars.ADSNetLibraryLog);
|
||||
}
|
||||
|
||||
}
|
||||
return objreturn;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Obtiene datos de la api.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Clase genérica en donde se obtiene la información del SqlDataReader.</typeparam>
|
||||
/// <param name="path">ruta sin domino ejemplo "/api/usuarios/login".</param>
|
||||
/// <param name="requestobject">request object.</param>
|
||||
/// <returns>Lista de objetos.</returns>
|
||||
public T getData<T>(string path, object requestobject, requestMethod reqmet = requestMethod.POST, bool needauthorization = true, bool isfullpath = false) where T : class, new()
|
||||
{
|
||||
return AsyncHelper.RunSync<T>(() => getDataAsync<T>(path, requestobject, reqmet, needauthorization, isfullpath));
|
||||
}
|
||||
}
|
||||
internal static class AsyncHelper
|
||||
{
|
||||
private static readonly TaskFactory _myTaskFactory = new
|
||||
TaskFactory(CancellationToken.None,
|
||||
TaskCreationOptions.None,
|
||||
TaskContinuationOptions.None,
|
||||
TaskScheduler.Default);
|
||||
|
||||
public static TResult RunSync<TResult>(Func<Task<TResult>> func)
|
||||
{
|
||||
return AsyncHelper._myTaskFactory
|
||||
.StartNew<Task<TResult>>(func)
|
||||
.Unwrap<TResult>()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
}
|
||||
|
||||
public static void RunSync(Func<Task> func)
|
||||
{
|
||||
AsyncHelper._myTaskFactory
|
||||
.StartNew<Task>(func)
|
||||
.Unwrap()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -630,7 +630,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
DtExcel.Columns.Add(New DataColumn("Fecha Modificación", GetType(DateTime)))
|
||||
DtExcel.Columns.Add(New DataColumn("Usuario Modificó", GetType(String)))
|
||||
DtExcel.Columns.Add(New DataColumn("Porcentaje", GetType(Decimal)))
|
||||
DtExcel.Columns.Add(New DataColumn("Fecha Ingreso", GetType(Decimal)))
|
||||
DtExcel.Columns.Add(New DataColumn("Fecha Ingreso", GetType(DateTime)))
|
||||
DtExcel.Columns.Add(New DataColumn("Usuario Ingresó", GetType(String)))
|
||||
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
|
||||
DataKeyNames="CveVenta,CveCliente,Folio,TipoDocto,Nombre,FolioFiscal,Total,SubTotal,RFCReceptor"
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación" OnRowDataBound="GvDatos_RowDataBound"
|
||||
DataKeyNames="CveVenta,CveCliente,Folio,TipoDocto,Nombre,FolioFiscal,Total,SubTotal,RFCReceptor,CveEstatusRefacturacion"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="25%" />
|
||||
|
||||
@@ -98,16 +98,29 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
string Folio = GvRow.DataKey("Folio");
|
||||
string TipoDocto = GvRow.DataKey("TipoDocto");
|
||||
string Nombre = GvRow.DataKey("Nombre");
|
||||
string CveEstatusRefact = GvRow.DataKey("CveEstatusRefacturacion");
|
||||
string Msg;
|
||||
if (CveVenta > 0 && Uuid != "")
|
||||
{
|
||||
var resp = VerificarVigenciaSAT(CveVenta, CveCliente, Folio, TipoDocto, Uuid, UsuarioActual.Empresa.RFC, RFCReceptor, Total);
|
||||
if (resp.EnviarAcuse)
|
||||
{
|
||||
Alert(resp.Mensaje, TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion: "Enviar", TextoSegundoBoton: "Cancelar");
|
||||
Msg = resp.Mensaje;
|
||||
if (CveEstatusRefact == "4")
|
||||
{
|
||||
Msg = Msg+ "<br/><a class='Texto' href='/Ventas/Ventas.aspx?CveDevolucion=" + CveVenta + "&NuevaFactura=1'> Refacturar</a>";
|
||||
}
|
||||
|
||||
Alert(Msg, TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion: "Enviar", TextoSegundoBoton: "Cancelar");
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert(resp.Mensaje);
|
||||
Msg = resp.Mensaje;
|
||||
if (CveEstatusRefact == "4")
|
||||
{
|
||||
Msg = Msg + "<br/><a class='Texto' href='/Ventas/Ventas.aspx?CveDevolucion=" + CveVenta + "&NuevaFactura=1'> Refacturar</a>";
|
||||
}
|
||||
Alert(Msg);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -579,7 +592,13 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
if (e.Row.DBCampo("CveEstatusRefacturacion") == "4" && gv.ID=="GvDatos")
|
||||
{
|
||||
e.Row.FCLinkButton("BtnValidar").Text= "<i class='fa fa-check'>02</i>";
|
||||
e.Row.FCLinkButton("BtnValidar").CssClass = "btn btn-circle btn-sm blue";
|
||||
}
|
||||
//if (e.Row.DBCampo("CveEstatusRefacturacion") == "4" && gv.ID == "GvDatos")
|
||||
//{
|
||||
// e.Row.FCLinkButton("BtnValidar").CssClass = "btn btn-circle btn-sm blue" ;
|
||||
//}
|
||||
|
||||
//
|
||||
|
||||
//if (e.Row.DBCampo("PuedeRefacturar").ToString().ToEntero() == 1 && e.Row.DBCampo("CveEstatusFactura").ToString().ToEntero() == 23)
|
||||
|
||||
@@ -375,24 +375,46 @@
|
||||
<asp:GridView ID="GvDatos" runat="server" Width="99%" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None" DataKeyNames="TipoDocumento,SerieFolio">
|
||||
<Columns>
|
||||
<%--0--%>
|
||||
<asp:HyperLinkField HeaderText="Serie Folio" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="~/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--1--%>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" />
|
||||
<%--2--%>
|
||||
<asp:BoundField HeaderText="Suc. Ejec." DataField="SubProyectoEjecucion" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
<%--3--%>
|
||||
<asp:BoundField HeaderText="Suc. Cob." DataField="SubProyectoCobranza" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
<%--4--%>
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--5--%>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--6--%>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--7--%>
|
||||
<asp:BoundField HeaderText="Código" DataField="CodigoProducto" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--8--%>
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="PS" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--9--%>
|
||||
<asp:BoundField HeaderText="Observación" DataField="Observaciones" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
<%--10--%>
|
||||
<asp:BoundField HeaderText="PU" DataField="PU" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--11--%>
|
||||
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--12--%>
|
||||
<asp:BoundField HeaderText="Desc" DataField="Descuento" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--13--%>
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--14--%>
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--15--%>
|
||||
<asp:BoundField HeaderText="RFC" DataField="RFC" ItemStyle-Width="5%" Visible="false" />
|
||||
<%--16--%>
|
||||
<asp:BoundField HeaderText="Método de Pago" DataField="MetodoPago" ItemStyle-Width="5%" Visible="false" />
|
||||
<%--17--%>
|
||||
<asp:BoundField HeaderText="Forma de Pago" DataField="FormaPago" ItemStyle-Width="5%" Visible="false" />
|
||||
<%--18--%>
|
||||
<asp:BoundField HeaderText="F. Emisión" DataField="FechaIng" DataFormatString="{0:d}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" Visible="false" />
|
||||
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
@@ -434,6 +456,17 @@
|
||||
<asp:CheckBox ID="ChkFormaPago" runat="server" Text="Forma de Pago" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFechaHoraEmision" runat="server" Text="Fecha Hora de Emisión" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -626,6 +626,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
GvDatos.Columns(15).Visible = ChkRFC.Checked
|
||||
GvDatos.Columns(16).Visible = ChkMetodoPago.Checked
|
||||
GvDatos.Columns(17).Visible = ChkFormaPago.Checked
|
||||
GvDatos.Columns(18).Visible = ChkFechaHoraEmision.Checked
|
||||
|
||||
CargaDatos()
|
||||
UPDatos.Update()
|
||||
|
||||
@@ -91,7 +91,7 @@ Partial Class Ventas_eFacturas
|
||||
Alert("La factura está cancelada ante el SAT.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
If ObjDatos.UpdateEstatus(Valida.EsValida, gvr.DataKey("CveFactura").ToEntero) Then
|
||||
If ObjDatos.UpdateEstatus(Valida.EsValida, gvr.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
BtnConsultar_Click(sender, e)
|
||||
End If
|
||||
ObjDatos.Dispose()
|
||||
@@ -108,7 +108,7 @@ Partial Class Ventas_eFacturas
|
||||
|
||||
Dim ObjDatos As New ClsCompras
|
||||
|
||||
If ObjDatos.UpdateEstatus(1, gvr.DataKey("CveFactura").ToEntero) Then
|
||||
If ObjDatos.UpdateEstatus(1, gvr.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
BtnConsultar_Click(sender, e)
|
||||
End If
|
||||
ObjDatos.Dispose()
|
||||
@@ -124,7 +124,7 @@ Partial Class Ventas_eFacturas
|
||||
|
||||
Dim ObjDatos As New ClsCompras
|
||||
|
||||
If ObjDatos.UpdateEstatus(3, gvr.DataKey("CveFactura").ToEntero) Then
|
||||
If ObjDatos.UpdateEstatus(3, gvr.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
BtnConsultar_Click(sender, e)
|
||||
End If
|
||||
ObjDatos.Dispose()
|
||||
@@ -297,7 +297,7 @@ Partial Class Ventas_eFacturas
|
||||
Dim ObjDatos As New ClsCompras
|
||||
Dim FueValidado As Integer = 0
|
||||
If GvD.Rows(e.RowIndex).FCCheckBox("ChkFueValidado").Checked Then FueValidado = 1
|
||||
If ObjDatos.UpdateEstatus(FueValidado, GvD.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
If ObjDatos.UpdateEstatus(FueValidado, GvD.DataKeys(e.RowIndex).Value.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvD.EditIndex = -1
|
||||
BtnConsultar_Click(sender, e)
|
||||
End If
|
||||
@@ -323,7 +323,7 @@ Partial Class Ventas_eFacturas
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvD.RowDeleting
|
||||
Dim Fact As New ClsCompras
|
||||
If Fact.DeleteFactura(e.Keys("CveFactura").ToString.ToEntero) Then
|
||||
If Fact.DeleteFactura(e.Keys("CveFactura").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvD.EditIndex = -1
|
||||
Alert("La factura se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
CargaDatos()
|
||||
|
||||
10
vwd.webinfo
10
vwd.webinfo
@@ -474,6 +474,16 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user