This commit is contained in:
rakcsle
2022-05-16 20:54:46 -07:00
11 changed files with 224 additions and 221 deletions

View File

@@ -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 SERVIDOR.Ventas.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) ")

View File

@@ -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

View File

@@ -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

View File

@@ -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
@@ -7833,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
@@ -8807,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
@@ -9943,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
@@ -10427,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()
@@ -15063,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
@@ -18497,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
@@ -18653,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

View File

@@ -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" 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>
@@ -857,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>

View File

@@ -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,8 +361,8 @@ 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"))
@@ -377,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"))
@@ -393,10 +391,10 @@ 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"))
@@ -529,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
@@ -578,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
@@ -614,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
@@ -898,6 +878,7 @@ 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("CveConceptoContable").ToString.Contiene("29", "130"), drt("Personal"), drt("RazonSocial"))
dr("Concepto") = TxtConcepto.Text
@@ -905,8 +886,8 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("EsComodin") = EsComodin
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
@@ -1077,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
@@ -1114,8 +1095,8 @@ Partial Class ContabilidadC_RegPrePolizaS
TipoCambio = 1
If gvr.DataKey("TipoMovto") = "True" Then
If TipoGrid = "0" Then 'gvprep
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
If TipoGrid = 0 Then 'gvmov
Importe = gvr.FCTextBox("TxtAbono").Text.ToDecimal
TmpAbono = TmpAbono + Importe
TipoMovto = True
@@ -1134,16 +1115,27 @@ Partial Class ContabilidadC_RegPrePolizaS
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("CveConceptoContable").Contiene("30", "10") Then ' 30-bancos, 10-anticipos proveedores
@@ -1156,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("CveConceptoContable").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
@@ -1206,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
@@ -1336,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()
@@ -1347,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")
@@ -1355,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)
@@ -1504,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
@@ -1535,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
@@ -1707,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
@@ -1750,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()
@@ -1859,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("CveConceptoContable") = DdlConceptosContables.SelectedValue
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
@@ -1889,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
@@ -1901,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()
@@ -1931,12 +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("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
@@ -1946,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()
@@ -2043,9 +2037,6 @@ Partial Class ContabilidadC_RegPrePolizaS
GvMov.DataBind()
'CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero
'CveCuenta = DdlCuenta.SelectedValue.ToEntero
'Folio = TxtDocumentoFolio.Text
@@ -2385,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
@@ -2418,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
@@ -2439,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
@@ -2456,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")))
@@ -2489,7 +2472,8 @@ 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
@@ -2499,7 +2483,10 @@ Partial Class ContabilidadC_RegPrePolizaS
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
@@ -2508,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
@@ -2516,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)
@@ -2836,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
@@ -2921,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
@@ -2931,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
@@ -2947,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

View File

@@ -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

View File

@@ -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)))

View File

@@ -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%" />

View File

@@ -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)

View File

@@ -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()