edición y mejora en carga excel
This commit is contained in:
@@ -206,7 +206,7 @@
|
|||||||
<asp:DropDownList ID="DdlVentas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
|
<asp:DropDownList ID="DdlVentas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="160px">
|
<asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="160px">
|
||||||
</asp:DropDownList><br />
|
</asp:DropDownList><br />
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@@ -519,8 +519,6 @@
|
|||||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="DdlCtaContable" runat="server" Text='<%# Eval("CodigoNombreCuenta") %>'></asp:Literal><br />
|
<asp:Literal ID="DdlCtaContable" runat="server" Text='<%# Eval("CodigoNombreCuenta") %>'></asp:Literal><br />
|
||||||
<%--<asp:HiddenField ID="HdnCtaContable" runat="server" Value='<%# Eval("IdCtaContable") %>' />--%>
|
|
||||||
<%--<asp:DropDownList ID="DdlCtaContable" runat="server" Width="200px" CssClass="form-control input-sm select2me" DataValueField="Id" DataTextField="CtaCodigo"></asp:DropDownList><br />--%>
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Left" Width="300px" />
|
<ItemStyle HorizontalAlign="Left" Width="300px" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -740,7 +738,7 @@
|
|||||||
Cuenta:
|
Cuenta:
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<asp:DropDownList ID="DdlCtaContableE" runat="server" Width="405px" CssClass="form-control input-sm select2me" DataValueField="CveCuenta" DataTextField="CtaCodigo"></asp:DropDownList><br />
|
<asp:DropDownList ID="DdlCuentaContableE" runat="server" Width="405px" CssClass="form-control input-sm select2me" DataValueField="CveCuenta" DataTextField="CtaCodigo"></asp:DropDownList><br />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
|
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports System.Linq
|
Imports System.Linq
|
||||||
@@ -625,12 +624,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Private Sub CargaCuentasContables()
|
Private Sub CargaCuentasContables()
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||||
DdlCtaContable.DataSource = ObjConta.DtResultados
|
DdlCuentaContableE.DataSource = ObjConta.DtResultados
|
||||||
DtCuentasContables = ObjConta.DtResultados
|
DtCuentasContables = ObjConta.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
DdlCtaContable.DataBind()
|
DdlCuentaContableE.DataBind()
|
||||||
DdlCtaContable.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaTiposGasto()
|
Private Sub CargaTiposGasto()
|
||||||
@@ -729,20 +728,20 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
IdCuenta = 0
|
IdCuenta = 0
|
||||||
CodigoCuenta = ""
|
CodigoCuenta = ""
|
||||||
NombreCuenta = ""
|
NombreCuenta = ""
|
||||||
If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables
|
'If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables
|
||||||
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString))
|
' Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString))
|
||||||
If drr IsNot Nothing Then
|
' If drr IsNot Nothing Then
|
||||||
IdCuenta = drt("IdCtaContable").ToString.ToEntero
|
' IdCuenta = drt("IdCtaContable").ToString.ToEntero
|
||||||
CodigoCuenta = drr("CuentaFormato").ToString()
|
' CodigoCuenta = drr("CuentaFormato").ToString()
|
||||||
NombreCuenta = drr("Nombre").ToString()
|
' NombreCuenta = drr("Nombre").ToString()
|
||||||
'Cuenta = drr("Nombre").ToString()
|
' 'Cuenta = drr("Nombre").ToString()
|
||||||
End If
|
' End If
|
||||||
EsComodin = 0
|
' EsComodin = 0
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Dim dr As DataRow = DtMovimientos.NewRow
|
Dim dr As DataRow = DtMovimientos.NewRow
|
||||||
|
|
||||||
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
dr("CodigoCuenta") = drt("Codigo").ToString & "<br>" & drt("Nombre").ToString
|
||||||
dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
|
dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
|
||||||
dr("Referencia") = If(drt("CveConcepto").ToString.Contiene("29", "130"), drt("Personal"), drt("RazonSocial"))
|
dr("Referencia") = If(drt("CveConcepto").ToString.Contiene("29", "130"), drt("Personal"), drt("RazonSocial"))
|
||||||
dr("Concepto") = TxtObservaciones.Text
|
dr("Concepto") = TxtObservaciones.Text
|
||||||
@@ -838,7 +837,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
e.Row.FCLinkButton("ImgBancos").Visible = True
|
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
|
If e.Row.DataKey("ContadoTipoTransaccion").ToEntero > 0 And e.Row.DataKey("ContadoCuenta").ToEntero > 0 And e.Row.DataKey("ContadoNumeroFolio").ToString.Length > 0 And
|
||||||
e.Row.DataKey("ContadoImporte").ToEntero > 0 And e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then
|
e.Row.DataKey("ContadoImporte").ToDecimal > 0 And e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then
|
||||||
e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
|
e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -902,10 +901,13 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFecha.Text, gvr.DataKey("ContadoNumeroFolio").ToString,
|
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFecha.Text, gvr.DataKey("ContadoNumeroFolio").ToString,
|
||||||
gvr.DataKey("ContadoBeneficiario").ToString, gvr.DataKey("ContadoImporte").ToString.ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "",
|
gvr.DataKey("ContadoBeneficiario").ToString, gvr.DataKey("ContadoImporte").ToString.ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "",
|
||||||
False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario"
|
If CveIE < 0 Then
|
||||||
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
|
MsgError = "No se pudo registrar movimiento bancario"
|
||||||
FolioIE = ObjIE.Folio
|
Exit For
|
||||||
End If
|
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
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -1045,7 +1047,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
ImporteMX:=If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
ImporteMX:=If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
||||||
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveProveedor:=row.DataKey("CveProveedor").ToEntero,
|
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveProveedor:=row.DataKey("CveProveedor").ToEntero,
|
||||||
CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
||||||
CvePersonal:=row.DataKey("CvePersonal").ToEntero) Then
|
CvePersonal:=row.DataKey("CvePersonal").ToEntero, CveCuenta:=row.DataKey("CveCuenta").ToEntero) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -1123,7 +1125,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
CargaTipoGastoE()
|
CargaTipoGastoE()
|
||||||
DdlTipoGastoE.SelectedValueExist(CveTipoGasto)
|
DdlTipoGastoE.SelectedValueExist(CveTipoGasto)
|
||||||
CargaCtaContableE()
|
CargaCtaContableE()
|
||||||
DdlCtaContableE.SelectedValueExist(CveCuenta)
|
DdlCuentaContableE.SelectedValueExist(CveCuenta)
|
||||||
|
|
||||||
If Cargo <> 0 Then
|
If Cargo <> 0 Then
|
||||||
TxtCargoE.Text = Cargo
|
TxtCargoE.Text = Cargo
|
||||||
@@ -1160,12 +1162,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Private Sub CargaCtaContableE()
|
Private Sub CargaCtaContableE()
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||||
DdlCtaContableE.DataSource = ObjConta.DtResultados
|
DdlCuentaContableE.DataSource = ObjConta.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
|
|
||||||
DdlCtaContableE.DataBind()
|
DdlCuentaContableE.DataBind()
|
||||||
DdlCtaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0"))
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged
|
Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged
|
||||||
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
|
If DdlConceptosContablesE.SelectedValue.ToEntero.Contiene(5, 17, 201, 206, 14, 15, 16, 19, 25, 26, 21) Then
|
||||||
@@ -1266,7 +1268,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
If DtMovimientos Is Nothing Then CreaDT()
|
If DtMovimientos Is Nothing Then CreaDT()
|
||||||
If CvePrePoliza > 0 Then
|
If CvePrePoliza > 0 Then
|
||||||
Dim dr As DataRow = DtMovimientos.NewRow
|
Dim dr As DataRow = DtMovimientos.NewRow
|
||||||
dr("IdCtaContable") = DdlCtaContableE.SelectedValue
|
dr("IdCtaContable") = DdlCuentaContableE.SelectedValue
|
||||||
|
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
|
||||||
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
|
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
|
||||||
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
|
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
|
||||||
dr("Concepto") = TxtConceptoE.Text
|
dr("Concepto") = TxtConceptoE.Text
|
||||||
@@ -1351,7 +1354,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
If Rows.Count > 0 Then
|
If Rows.Count > 0 Then
|
||||||
Dim dr As DataRow = Rows(0)
|
Dim dr As DataRow = Rows(0)
|
||||||
dr("IdCtaContable") = DdlCtaContableE.SelectedValue
|
dr("IdCtaContable") = DdlCuentaContableE.SelectedValue
|
||||||
|
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
|
||||||
|
dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text
|
||||||
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
|
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
|
||||||
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
|
dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue
|
||||||
dr("Concepto") = TxtConceptoE.Text
|
dr("Concepto") = TxtConceptoE.Text
|
||||||
@@ -1366,8 +1371,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
|
dr("CveCliente") = DdlClientesE.SelectedValue.ToEntero
|
||||||
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
|
dr("CveVenta") = DdlVentasE.SelectedValue.ToEntero
|
||||||
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
|
dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, ""))
|
||||||
dr("CveCuenta") = DdlCtaContableE.SelectedValue.ToEntero
|
|
||||||
dr("CodigoNombreCuenta") = DdlCtaContableE.SelectedItem.Text
|
|
||||||
dr("Modificado") = True
|
dr("Modificado") = True
|
||||||
|
|
||||||
|
|
||||||
@@ -1445,10 +1448,10 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Dim dr As DataRow = Rows(0)
|
Dim dr As DataRow = Rows(0)
|
||||||
Dim CodigoCuenta As String = ""
|
Dim CodigoCuenta As String = ""
|
||||||
Dim NombreCuenta As String = ""
|
Dim NombreCuenta As String = ""
|
||||||
dr("CveCuenta") = DdlCtaContable.SelectedValue
|
dr("CveCuenta") = DdlCuentaContable.SelectedValue
|
||||||
|
|
||||||
If DdlCtaContable.SelectedValue.ToEntero > 0 Then
|
If DdlCuentaContable.SelectedValue.ToEntero > 0 Then
|
||||||
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", DdlCtaContable.SelectedValue))
|
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", DdlCuentaContable.SelectedValue))
|
||||||
If drr IsNot Nothing Then
|
If drr IsNot Nothing Then
|
||||||
CodigoCuenta = drr("CuentaFormato").ToString()
|
CodigoCuenta = drr("CuentaFormato").ToString()
|
||||||
NombreCuenta = drr("Nombre").ToString()
|
NombreCuenta = drr("Nombre").ToString()
|
||||||
@@ -1472,7 +1475,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
dr("CveClasificacion") = -1
|
dr("CveClasificacion") = -1
|
||||||
dr("CveCliente") = DdlClientes.SelectedValue.ToEntero
|
dr("CveCliente") = DdlClientes.SelectedValue.ToEntero
|
||||||
dr("CveVenta") = DdlVentas.SelectedValue.ToEntero
|
dr("CveVenta") = DdlVentas.SelectedValue.ToEntero
|
||||||
dr("CveCuenta") = DdlCtaContable.SelectedValue.ToEntero
|
|
||||||
End If
|
End If
|
||||||
GvMov.DataSource = DtMovimientos
|
GvMov.DataSource = DtMovimientos
|
||||||
GvMov.DataBind()
|
GvMov.DataBind()
|
||||||
@@ -1485,6 +1487,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
If CvePrePoliza > 0 Then
|
If CvePrePoliza > 0 Then
|
||||||
Dim dr As DataRow = DtMovimientos.NewRow
|
Dim dr As DataRow = DtMovimientos.NewRow
|
||||||
dr("IdCtaContable") = -1 'DdlCtaContable.SelectedValue
|
dr("IdCtaContable") = -1 'DdlCtaContable.SelectedValue
|
||||||
|
dr("CveCuenta") = DdlCuentaContable.SelectedValue
|
||||||
dr("ConceptoContable") = DdlConceptosContables.SelectedItem.Text
|
dr("ConceptoContable") = DdlConceptosContables.SelectedItem.Text
|
||||||
dr("CveConceptoContable") = DdlConceptosContables.SelectedValue
|
dr("CveConceptoContable") = DdlConceptosContables.SelectedValue
|
||||||
dr("Concepto") = TxtDescripcion.Text
|
dr("Concepto") = TxtDescripcion.Text
|
||||||
@@ -1517,10 +1520,10 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Dim CodigoCuenta As String = ""
|
Dim CodigoCuenta As String = ""
|
||||||
Dim NombreCuenta As String = ""
|
Dim NombreCuenta As String = ""
|
||||||
|
|
||||||
dr("CveCuenta") = DdlCtaContable.SelectedValue
|
dr("CveCuenta") = DdlCuentaContable.SelectedValue
|
||||||
|
|
||||||
If DdlCtaContable.SelectedValue.ToEntero > 0 Then
|
If DdlCuentaContable.SelectedValue.ToEntero > 0 Then
|
||||||
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", DdlCtaContable.SelectedValue))
|
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", DdlCuentaContable.SelectedValue))
|
||||||
If drr IsNot Nothing Then
|
If drr IsNot Nothing Then
|
||||||
CodigoCuenta = drr("CuentaFormato").ToString()
|
CodigoCuenta = drr("CuentaFormato").ToString()
|
||||||
NombreCuenta = drr("Nombre").ToString()
|
NombreCuenta = drr("Nombre").ToString()
|
||||||
@@ -1716,7 +1719,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
If DrM IsNot Nothing Then
|
If DrM IsNot Nothing Then
|
||||||
HdnCve.Value = idMov.ToString
|
HdnCve.Value = idMov.ToString
|
||||||
|
|
||||||
DdlCtaContable.SelectedValue = DrM("CveCuenta")
|
DdlCuentaContable.SelectedValue = DrM("CveCuenta")
|
||||||
TxtReferencia.Text = DrM("Referencia")
|
TxtReferencia.Text = DrM("Referencia")
|
||||||
TxtObservaciones.Text = DrM("Concepto")
|
TxtObservaciones.Text = DrM("Concepto")
|
||||||
' (Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) = dr("TipoMovto")
|
' (Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) = dr("TipoMovto")
|
||||||
@@ -2024,7 +2027,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Dim CveClasificacion As Integer = -1
|
Dim CveClasificacion As Integer = -1
|
||||||
Dim CveCuentaExcel As Integer = -1
|
Dim CveCuentaExcel As Integer = -1
|
||||||
Dim ObjConta2 As New ClsContabilidad
|
Dim ObjConta2 As New ClsContabilidad
|
||||||
Dim FolioExcel As Integer = -1
|
Dim FolioExcel As Long = -1
|
||||||
Dim TipoMov As Integer = -1
|
Dim TipoMov As Integer = -1
|
||||||
Dim CveBancoCuenta As Integer = -1
|
Dim CveBancoCuenta As Integer = -1
|
||||||
If ObjConta2.GetCuentas(-1, Row("Cuenta").ToString.Replace("-", "").Trim, 1, UsuarioActual.CveEmpresa) Then
|
If ObjConta2.GetCuentas(-1, Row("Cuenta").ToString.Replace("-", "").Trim, 1, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -2040,17 +2043,34 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If CveConceptoContable = 30 Then
|
If CveConceptoContable = 30 Then
|
||||||
|
|
||||||
Dim objconta3 As New ClsContabilidad
|
Dim objconta3 As New ClsContabilidad
|
||||||
objconta3.GetConta_CuentasDataContabilidad(CveCuentaExcel, UsuarioActual.CveEmpresa)
|
objconta3.GetConta_CuentasDataContabilidad(CveCuentaExcel, UsuarioActual.CveEmpresa)
|
||||||
If objconta3.DtResultados.Rows.Count > 0 Then
|
If objconta3.DtResultados.Rows.Count > 0 Then
|
||||||
Dim rowcc As DataRow = objconta3.DtResultados.Rows(0)
|
Dim rowcc As DataRow = objconta3.DtResultados.Rows(0)
|
||||||
CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero()
|
CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero()
|
||||||
DdlCuenta.SelectedValue = CveBancoCuenta
|
DdlCuenta.SelectedValue = CveBancoCuenta
|
||||||
|
Else
|
||||||
|
CveBancoCuenta = 0
|
||||||
End If
|
End If
|
||||||
|
objconta3.Dispose()
|
||||||
|
|
||||||
|
If CveBancoCuenta = 0 Then
|
||||||
|
Alert(String.Format("La cuenta <b>{0}</b> no está vinculada a una cuenta bancaria administrativa favor de verificar el archivo.", Row("Cuenta").ToString), TipoMensaje.MsgAdvertencia)
|
||||||
|
DtMovimientos.Clear()
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
TipoMov = GlobalDTTipoTransacciones.FiltroPrimeroValor("CveTipoTransaccion", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero
|
TipoMov = GlobalDTTipoTransacciones.FiltroPrimeroValor("CveTipoTransaccion", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero
|
||||||
FolioExcel = Row("Folio").ToString
|
FolioExcel = Row("Folio").ToString.ToEntero
|
||||||
CveTipoTransaccion = TipoMov
|
CveTipoTransaccion = TipoMov
|
||||||
CveCuenta = CveBancoCuenta
|
CveCuenta = CveBancoCuenta
|
||||||
|
'carga el consecutivo
|
||||||
|
|
||||||
|
If FolioExcel = 0 Then
|
||||||
|
FolioExcel = SiguienteFolioBancos(CveBancoCuenta, TipoMov)
|
||||||
|
End If
|
||||||
|
|
||||||
Folio = FolioExcel
|
Folio = FolioExcel
|
||||||
ImporteDocumento = IIf(Row("Abono").ToString.ToEntero > 0, Row("Abono").ToString, Row("Cargo").ToString)
|
ImporteDocumento = IIf(Row("Abono").ToString.ToEntero > 0, Row("Abono").ToString, Row("Cargo").ToString)
|
||||||
Observaciones = Row("Referencia").ToString
|
Observaciones = Row("Referencia").ToString
|
||||||
@@ -2062,7 +2082,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'sino viene el cveconcepto, busca por le nombre del concepto
|
'sino viene el cveconcepto, busca por le nombre del concepto
|
||||||
If CveConceptoContable = 0 Then
|
If CveConceptoContable = 0 Then
|
||||||
Alert(String.Format("El concepto <b>{0}</b> no se reconoció, favor de verificar el archivo.", Row("ConceptoAdministrativo")))
|
Alert(String.Format("El concepto <b>{0}</b> no se reconoció, favor de verificar el archivo.", Row("ConceptoAdministrativo")))
|
||||||
@@ -2110,8 +2129,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
dr("CveCuenta") = CveCuentaExcel
|
dr("CveCuenta") = CveCuentaExcel
|
||||||
|
|
||||||
dr("ContadoTipoTransaccion") = CveTipoTransaccion
|
dr("ContadoTipoTransaccion") = CveTipoTransaccion
|
||||||
dr("ContadoCuenta") = CveCuenta
|
dr("ContadoCuenta") = CveBancoCuenta
|
||||||
dr("ContadoNumeroFolio") = Folio
|
dr("ContadoNumeroFolio") = FolioExcel
|
||||||
dr("ContadoImporte") = ImporteDocumento
|
dr("ContadoImporte") = ImporteDocumento
|
||||||
dr("ContadoBeneficiario") = Beneficiario
|
dr("ContadoBeneficiario") = Beneficiario
|
||||||
dr("ContadoObservaciones") = Observaciones
|
dr("ContadoObservaciones") = Observaciones
|
||||||
@@ -2135,6 +2154,63 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
#Region "Siguiente Folio"
|
||||||
|
Public Property ArregloCuentasFolios As DataTable
|
||||||
|
Get
|
||||||
|
|
||||||
|
If ViewState("ArregloCuentasFolios") Is Nothing Then
|
||||||
|
Dim dt = New DataTable("CuentasBancos")
|
||||||
|
With dt.Columns
|
||||||
|
.Add("CveCuenta", Type.GetType("System.Int32"))
|
||||||
|
.Add("CveTipoTransaccion", Type.GetType("System.Int32"))
|
||||||
|
.Add("Folio", Type.GetType("System.Double"))
|
||||||
|
End With
|
||||||
|
ViewState("ArregloCuentasFolios") = dt
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return CType(ViewState("ArregloCuentasFolios"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("ArregloCuentasFolios") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Function SiguienteFolioBancos(CveCuentaBancos As Integer, CveTipoTransaccionBancos As Integer) As String
|
||||||
|
Dim Retorno As String = "0"
|
||||||
|
|
||||||
|
Dim Folio As Long = ArregloCuentasFolios.FiltroPrimeroValor("Folio", String.Format("CveCuenta = {0} and CveTipoTransaccion = {1}", CveCuentaBancos, CveTipoTransaccionBancos)).ToLong
|
||||||
|
|
||||||
|
If Folio = 0 Then
|
||||||
|
Dim Banco As New ClsBancos
|
||||||
|
Folio = Banco.GetNextFolio(CveCuentaBancos, CveTipoTransaccionBancos)
|
||||||
|
Banco.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Folio += 1
|
||||||
|
|
||||||
|
Dim a As DataRow() = ArregloCuentasFolios.Select(String.Format("CveCuenta = {0} and CveTipoTransaccion = {1}", CveCuentaBancos, CveTipoTransaccionBancos))
|
||||||
|
|
||||||
|
If a.Count = 0 Then
|
||||||
|
Dim dr As DataRow = ArregloCuentasFolios.NewRow
|
||||||
|
dr("Folio") = Folio
|
||||||
|
dr("CveCuenta") = CveCuentaBancos
|
||||||
|
dr("CveTipoTransaccion") = CveTipoTransaccionBancos
|
||||||
|
ArregloCuentasFolios.Rows.Add(dr)
|
||||||
|
Else
|
||||||
|
a(0)("Folio") = Folio 'actualizo el folio
|
||||||
|
End If
|
||||||
|
|
||||||
|
ArregloCuentasFolios.AcceptChanges()
|
||||||
|
|
||||||
|
Return Folio
|
||||||
|
End Function
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region "Paquete Egresos"
|
#Region "Paquete Egresos"
|
||||||
Protected Sub LnkImprimirPDF_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkImprimirPDF_Click(sender As Object, e As EventArgs)
|
||||||
ImprimirPolizaPDF(IdPoliza)
|
ImprimirPolizaPDF(IdPoliza)
|
||||||
|
|||||||
Reference in New Issue
Block a user