-- option explicit
-- repie, filtro por usuario
This commit is contained in:
@@ -175,14 +175,12 @@ Partial Class Contabilidad_DiarioPagos
|
||||
|
||||
If TxtTC.Text.ToDouble > 0 Then TxtTC.Enabled = False Else TxtTC.Text = ""
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
'------------------------------------------ consulto F y E
|
||||
If CargaOpcion.Contiene(-1, 1) Then
|
||||
|
||||
|
||||
ds = Conta.GetDiarioPagosCompras(DdlProveedores.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, 2, DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
If ds IsNot Nothing AndAlso ds.Tables.Count = 2 Then
|
||||
|
||||
@@ -197,7 +195,6 @@ Partial Class Contabilidad_DiarioPagos
|
||||
' '------------------------------------------ consulto Transferencias
|
||||
If CargaOpcion.Contiene(-1, 2) Then
|
||||
|
||||
|
||||
ds = Conta.GetDiarioPagosCompras(DdlProveedores.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, 3, DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
If ds IsNot Nothing AndAlso ds.Tables.Count = 1 Then
|
||||
DtDatosTransf = ds.Tables(0)
|
||||
@@ -211,8 +208,6 @@ Partial Class Contabilidad_DiarioPagos
|
||||
' '------------------------------------------ consulto anticipos
|
||||
|
||||
If CargaOpcion.Contiene(-1, 3) Then
|
||||
|
||||
|
||||
ds = Conta.GetDiarioPagosCompras(DdlProveedores.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, 4, DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
|
||||
If ds IsNot Nothing AndAlso ds.Tables.Count = 2 Then
|
||||
@@ -1605,15 +1600,12 @@ Partial Class Contabilidad_DiarioPagos
|
||||
|
||||
If e.Row.DBCampo("ValidoCuenta") = "1" Then
|
||||
e.Row.FCCheckBox("Chk").Visible = True
|
||||
|
||||
''pero si hay compras sin contabilizar, y la factura no tenga completa las clasificaciones
|
||||
If tDtCompras IsNot Nothing AndAlso tDtCompras.Rows.Count > 0 Then
|
||||
'
|
||||
If tDtCompras.MIN("Valido") = "0" Then
|
||||
e.Row.FCCheckBox("Chk").Visible = False
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
'sino tiene cuenta
|
||||
|
||||
@@ -944,7 +944,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If CvePrePoliza > 0 Then
|
||||
ActualizarPrePoliza()
|
||||
Else
|
||||
Dim MensajeAlert = New StringBuilder
|
||||
Dim MensajeAlert As StringBuilder = New StringBuilder
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
Dim IDPoliza As Integer = 0
|
||||
@@ -1164,10 +1164,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero,
|
||||
-1, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True),
|
||||
If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal),
|
||||
-1, If(row.DataKey("Cargo").ToDecimal <> 0, False, True),
|
||||
If(row.DataKey("Cargo").ToDecimal <> 0, row.DataKey("Cargo").ToDecimal, row.DataKey("Abono").ToDecimal),
|
||||
CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
|
||||
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
|
||||
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
||||
@@ -1180,7 +1179,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
contador = contador + 1
|
||||
|
||||
|
||||
Dim ImporteIE As Decimal = If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal)
|
||||
Dim ImporteIE As Decimal = If(row.DataKey("Cargo").ToDecimal <> 0, row.DataKey("Cargo").ToDecimal, row.DataKey("Abono").ToDecimal)
|
||||
|
||||
If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then
|
||||
Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL)
|
||||
@@ -1569,8 +1568,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If CveCliente <= 0 Then Exit Sub
|
||||
|
||||
If DrConceptoContable IsNot Nothing Then
|
||||
Dim AplicaME = Boolean.Parse(DrConceptoContable("EsMonedaExtranjera").ToString)
|
||||
Dim AplicaVenta = Boolean.Parse(DrConceptoContable("AplicaVenta").ToString)
|
||||
Dim AplicaME As Boolean = Boolean.Parse(DrConceptoContable("EsMonedaExtranjera").ToString)
|
||||
Dim AplicaVenta As Boolean = Boolean.Parse(DrConceptoContable("AplicaVenta").ToString)
|
||||
If AplicaME Then
|
||||
CveMoneda = 2
|
||||
End If
|
||||
@@ -1626,8 +1625,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
|
||||
If DrConceptoContable IsNot Nothing Then
|
||||
Dim AplicaComplementaria = Boolean.Parse(DrConceptoContable("EsComplementaria").ToString)
|
||||
Dim AplicaBancos = Boolean.Parse(DrConceptoContable("AplicaBancos").ToString)
|
||||
Dim AplicaComplementaria As Boolean = Boolean.Parse(DrConceptoContable("EsComplementaria").ToString)
|
||||
Dim AplicaBancos As Boolean = Boolean.Parse(DrConceptoContable("AplicaBancos").ToString)
|
||||
|
||||
If AplicaComplementaria Then
|
||||
Dim Importe As Decimal = If(TxtCargoE.Text.ToDecimal <> 0, TxtCargoE.Text.ToDecimal, TxtAbonoE.Text.ToDecimal)
|
||||
@@ -2223,7 +2222,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If NombreHoja.Length > 30 Then
|
||||
NombreHoja = NombreHoja.Substring(0, 29)
|
||||
End If
|
||||
Dim worksheet = workbook.Worksheets.Add(NombreHoja)
|
||||
Dim worksheet As ExcelWorksheet = workbook.Worksheets.Add(NombreHoja)
|
||||
|
||||
Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero
|
||||
'Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla, UsuarioActual.CveEmpresa)
|
||||
@@ -2255,8 +2254,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
.StartColumn = 0
|
||||
})
|
||||
|
||||
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
||||
For i = 0 To columnCount
|
||||
Dim columnCount As Integer = worksheet.CalculateMaxUsedColumns()
|
||||
For i As Integer = 0 To columnCount
|
||||
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||
Next
|
||||
worksheet.Columns("K").Hidden = True
|
||||
@@ -2286,8 +2285,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
||||
Dim dt As New DataTable
|
||||
' Conexion As Odbc.OdbcConnection = Nothing
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorExcel = False
|
||||
Dim ErrorArchivo As Boolean = False
|
||||
Dim ErrorExcel As Boolean = False
|
||||
DdlPlantilla.SelectedValue = DdlPlantilla2.SelectedValue
|
||||
dt = ReadExcelFile(Ruta + FileName, True, 0)
|
||||
|
||||
@@ -2528,7 +2527,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Get
|
||||
|
||||
If ViewState("ArregloCuentasFolios") Is Nothing Then
|
||||
Dim dt = New DataTable("CuentasBancos")
|
||||
Dim dt As DataTable = New DataTable("CuentasBancos")
|
||||
With dt.Columns
|
||||
.Add("CveCuenta", Type.GetType("System.Int32"))
|
||||
.Add("CveTipoTransaccion", Type.GetType("System.Int32"))
|
||||
@@ -2811,7 +2810,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If CvePrePoliza > 0 Then
|
||||
ActualizarPrePoliza()
|
||||
Else
|
||||
Dim MensajeAlert = New StringBuilder
|
||||
Dim MensajeAlert As StringBuilder = New StringBuilder
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
Dim IDPoliza As Integer = 0
|
||||
|
||||
@@ -166,8 +166,6 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
if (e.Row.DBCampo("CveCompra").ToEntero() < 1)
|
||||
{
|
||||
e.Row.CssClass = "Totales";
|
||||
|
||||
|
||||
}
|
||||
if (e.Row.DBCampo("PorcentajeIVA").ToDecimal() > 0)
|
||||
{
|
||||
@@ -301,8 +299,6 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
{
|
||||
System.Text.StringBuilder Respuesta = new System.Text.StringBuilder();
|
||||
|
||||
|
||||
|
||||
return Respuesta.ToString();
|
||||
}
|
||||
|
||||
@@ -380,8 +376,6 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
Response.End();
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void LnkModalCompara_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -399,8 +393,6 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
RegistraScript("$('#ModalCompara').modal('show')");
|
||||
UpCompara.Update();
|
||||
}
|
||||
|
||||
|
||||
protected string LV(string Valor)
|
||||
{
|
||||
return (Valor.ToDecimal() > 0) ? Valor.ToDecimal().ToString().FormatoNumero(0).Replace(",", string.Empty) : "";
|
||||
@@ -547,37 +539,30 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
//}
|
||||
|
||||
|
||||
|
||||
protected void GvIEPSA_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if(e.Row.RowType == DataControlRowType.DataRow && e.Row.DataKey("PorcentajeIEPS").Trim() == "")
|
||||
{
|
||||
e.Row.Cells[0].Text = "Total";
|
||||
e.Row.Font.Bold = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvIVAA_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow && e.Row.DataKey("PorcentajeIVA").Trim() == "")
|
||||
{
|
||||
e.Row.Cells[0].Text = "Total";
|
||||
e.Row.Font.Bold = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvIVA2_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow && e.Row.DataKey("PorcentajeIVA").Trim() == "")
|
||||
{
|
||||
e.Row.Cells[0].Text = "Total";
|
||||
e.Row.Font.Bold = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvRetIVA_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow && e.Row.DataKey("TipoRetIVA").Trim() == "")
|
||||
@@ -585,7 +570,6 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
||||
e.Row.Cells[0].Text = "Total";
|
||||
e.Row.Font.Bold = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user