-pago con conta=1
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2">Tipo Mov:</label>
|
<label class="col-md-2">Tipo Mov:</label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="156px" ValidationGroup="GrpGuardar">
|
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="250px" ValidationGroup="GrpGuardar">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:HiddenField ID="HdnTipoTransaccion" runat="server" Value="" />
|
<asp:HiddenField ID="HdnTipoTransaccion" runat="server" Value="" />
|
||||||
</div>
|
</div>
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
</table>--%>
|
</table>--%>
|
||||||
<br />
|
<br />
|
||||||
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CveSubProyecto,CvePersonal" ShowHeaderWhenEmpty="true" Width="100%" CssClass="table table-striped table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CveSubProyecto,CvePersonal,CveCuenta" ShowHeaderWhenEmpty="true" Width="100%" CssClass="table table-striped table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Código</HeaderTemplate>
|
<HeaderTemplate>Código</HeaderTemplate>
|
||||||
|
|||||||
@@ -155,6 +155,7 @@ Partial Class Bancos_PolizaCheque
|
|||||||
Dim IDMov As DataColumn = DtMovimientos.Columns.Add("IdMov", Type.GetType("System.Int32")) : IDMov.AutoIncrement = True
|
Dim IDMov As DataColumn = DtMovimientos.Columns.Add("IdMov", Type.GetType("System.Int32")) : IDMov.AutoIncrement = True
|
||||||
With DtMovimientos.Columns
|
With DtMovimientos.Columns
|
||||||
.Add("IdCuenta", Type.GetType("System.Int32"))
|
.Add("IdCuenta", Type.GetType("System.Int32"))
|
||||||
|
.Add("CveCuenta", Type.GetType("System.Int32"))
|
||||||
.Add("CodigoCuenta", Type.GetType("System.String"))
|
.Add("CodigoCuenta", Type.GetType("System.String"))
|
||||||
.Add("Cuenta", Type.GetType("System.String"))
|
.Add("Cuenta", Type.GetType("System.String"))
|
||||||
.Add("Referencia", Type.GetType("System.String"))
|
.Add("Referencia", Type.GetType("System.String"))
|
||||||
@@ -401,6 +402,7 @@ Partial Class Bancos_PolizaCheque
|
|||||||
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden")
|
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(UsuarioActual.CveEmpresa, CvePlantilla).FiltraParametros("", "Orden")
|
||||||
Dim Cuenta As String = ""
|
Dim Cuenta As String = ""
|
||||||
Dim IdCuenta As Integer = 0
|
Dim IdCuenta As Integer = 0
|
||||||
|
Dim CveCuenta As Integer = 0
|
||||||
Dim CodigoCuenta As String = ""
|
Dim CodigoCuenta As String = ""
|
||||||
Dim NombreCuenta As String = ""
|
Dim NombreCuenta As String = ""
|
||||||
Dim EsComodin As Integer = 0
|
Dim EsComodin As Integer = 0
|
||||||
@@ -412,6 +414,7 @@ Partial Class Bancos_PolizaCheque
|
|||||||
|
|
||||||
Cuenta = drt("ConceptoContable").ToString
|
Cuenta = drt("ConceptoContable").ToString
|
||||||
IdCuenta = 0
|
IdCuenta = 0
|
||||||
|
CveCuenta = 0
|
||||||
CodigoCuenta = ""
|
CodigoCuenta = ""
|
||||||
NombreCuenta = ""
|
NombreCuenta = ""
|
||||||
|
|
||||||
@@ -420,7 +423,7 @@ Partial Class Bancos_PolizaCheque
|
|||||||
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", drt("CveCuenta").ToString))
|
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", drt("CveCuenta").ToString))
|
||||||
|
|
||||||
If drr IsNot Nothing Then
|
If drr IsNot Nothing Then
|
||||||
IdCuenta = drt("IdCtaContable").ToString.ToEntero
|
CveCuenta = drt("CveCuenta").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()
|
||||||
@@ -470,6 +473,7 @@ Partial Class Bancos_PolizaCheque
|
|||||||
|
|
||||||
Dim dr As DataRow = DtMovimientos.NewRow
|
Dim dr As DataRow = DtMovimientos.NewRow
|
||||||
dr("IdCuenta") = IdCuenta
|
dr("IdCuenta") = IdCuenta
|
||||||
|
dr("CveCuenta") = CveCuenta
|
||||||
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||||
dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
|
dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
|
||||||
dr("RazonSocial") = drt("RazonSocial")
|
dr("RazonSocial") = drt("RazonSocial")
|
||||||
@@ -567,22 +571,6 @@ Partial Class Bancos_PolizaCheque
|
|||||||
|
|
||||||
DtMovimientos.Rows.Add(dr)
|
DtMovimientos.Rows.Add(dr)
|
||||||
Next
|
Next
|
||||||
'Dim drtt As DataRow = DtMovimientos.NewRow
|
|
||||||
'drtt("IdCuenta") = 0
|
|
||||||
'drtt("CodigoCuenta") = ""
|
|
||||||
'drtt("Cuenta") = Cuenta
|
|
||||||
'drtt("RazonSocial") = ""
|
|
||||||
'drtt("Concepto") = ""
|
|
||||||
'drtt("TipoMovto") = 0
|
|
||||||
'drtt("EsComodin") = EsComodin
|
|
||||||
'drtt("CveConcepto") = 44
|
|
||||||
'drtt("CveProveedor") = "-1"
|
|
||||||
'drtt("SubProyecto") = ""
|
|
||||||
'drtt("Proyecto") = ""
|
|
||||||
'drtt("Personal") = ""
|
|
||||||
'drtt("CveSubProyecto") = -1
|
|
||||||
'drtt("CvePersonal") = -1
|
|
||||||
'DtMovimientos.Rows.Add(drtt)
|
|
||||||
|
|
||||||
ObjNomina.Dispose()
|
ObjNomina.Dispose()
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
@@ -810,19 +798,7 @@ Partial Class Bancos_PolizaCheque
|
|||||||
e.Row.FCLiteral("LtlSP").Visible = False
|
e.Row.FCLiteral("LtlSP").Visible = False
|
||||||
e.Row.FCDropDownList("DdlSubProyecto").Visible = True
|
e.Row.FCDropDownList("DdlSubProyecto").Visible = True
|
||||||
End If
|
End If
|
||||||
'cuando se modifica el importe de la cuenta bancaria que se actualice el importe del documento
|
|
||||||
'If e.Row.DBCampo("EsComodin") = "1" Then
|
|
||||||
' If e.Row.DBCampo("TipoMovto") = "1" Then
|
|
||||||
' e.Row.FCTextBox("TxtAbono").Attributes.Add("onkeyup", "FncImporte('TxtImporte',this.id,2)")
|
|
||||||
' e.Row.FCTextBox("TxtAbono").Text = TxtImporte.Text
|
|
||||||
' Else
|
|
||||||
' e.Row.FCTextBox("TxtCargo").Attributes.Add("onkeyup", "FncImporte('TxtImporte',this.id,2)")
|
|
||||||
' e.Row.FCTextBox("TxtCargo").Text = TxtImporte.Text
|
|
||||||
' End If
|
|
||||||
' TxtImporte.Attributes.Add("onkeyup", String.Format("FncImporte(this.id,'{0}',1)", e.Row.FCTextBox(If(e.Row.DBCampo("TipoMovto") = "1", "TxtAbono", "TxtCargo")).ClientID))
|
|
||||||
|
|
||||||
' UPPImporte.Update()
|
|
||||||
'End If
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -966,7 +942,7 @@ Partial Class Bancos_PolizaCheque
|
|||||||
Importe = Importe * TC
|
Importe = Importe * TC
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Referencia, gvr.DataKey("CveConcepto").ToEntero, TxtObservaciones.Text, Now, gvr.DataKey("IDCuenta").ToEntero, -1, CveIE, CveProveedor:=CveProveedor, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, ImporteMX:=Importe, TipoCambio:=TC) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Referencia, gvr.DataKey("CveConcepto").ToEntero, TxtObservaciones.Text, Now, gvr.DataKey("IDCuenta").ToEntero, -1, CveIE, CveProveedor:=CveProveedor, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, ImporteMX:=Importe, TipoCambio:=TC, CveCuenta:=gvr.DataKey("CveCuenta").ToEntero) Then
|
||||||
MsgError = "no se pudo insertar el detalle de la póliza2"
|
MsgError = "no se pudo insertar el detalle de la póliza2"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1009,12 +985,6 @@ Partial Class Bancos_PolizaCheque
|
|||||||
MsgError = "No se insertó el encabezado"
|
MsgError = "No se insertó el encabezado"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If ChkContabilizar.Checked AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
|
||||||
' If Not ObjIE.UpdateIEPrePoliza(TxtFechaDocumento.Text.ToDate, NumPoliza.ToString, IDPoliza, CvePrePoliza, CveIE, 0) Then
|
|
||||||
' MsgError = "Error al actualizar la poliza"
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgError = "Error"
|
MsgError = "Error"
|
||||||
End Try
|
End Try
|
||||||
@@ -1030,20 +1000,17 @@ Partial Class Bancos_PolizaCheque
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'El movimiento 2 es el de Pago
|
'El movimiento 2 es el de Pago
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
|
If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then
|
||||||
If idCuentaContabilizacion > 0 Then
|
|
||||||
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
'Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
'Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||||
IDPoliza = ObjMov.ContaIdPoliza
|
IDPoliza = ObjMov.ContaIdPoliza
|
||||||
Else
|
|
||||||
MsgError = "Error al contabilizar"
|
|
||||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas", TipoMensaje.MsgError)
|
MsgError = "Error al contabilizar"
|
||||||
|
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -1090,8 +1057,6 @@ Partial Class Bancos_PolizaCheque
|
|||||||
Alert("La suma de los movimientos no son iguales", TipoMensaje.MsgAdvertencia)
|
Alert("La suma de los movimientos no son iguales", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
'' -------------------------------------- codigo para generar la poliza del cheque
|
'' -------------------------------------- codigo para generar la poliza del cheque
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user