es complementaria

This commit is contained in:
2021-10-14 12:39:28 -07:00
parent 7b9d77581d
commit b6fc2845ca
2 changed files with 41 additions and 13 deletions

View File

@@ -342,7 +342,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"
DataKeyNames="IdMov,Cargo,Abono,TipoMovto,CveConcepto,CveConceptoContable,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,CveCuenta, ContadoTipoTransaccion, ContadoCuenta, ContadoNumeroFolio, ContadoImporte, ContadoBeneficiario, ContadoObservaciones,EsComplementaria"
Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField>
@@ -392,6 +392,9 @@
<HeaderTemplate>Cargo</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtCargo" CssClass="txtcargo" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
<div id="divCargoME" runat="server" Visible="False">ME:<asp:TextBox ID="TxtCargoME" CssClass="" runat="server" Style="text-align: right" Width="55px"></asp:TextBox>
TC:<asp:TextBox ID="TxtTC" CssClass="" runat="server" Style="text-align: right" Width="45px"></asp:TextBox>
</div>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
@@ -399,6 +402,7 @@
<HeaderTemplate>Abono</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtAbono" CssClass="txtabono" runat="server" Style="text-align: right" Width="65px" Visible="False"></asp:TextBox>
<div id="divAbonoME" runat="server" Visible="False">ME:<asp:TextBox ID="TxtAbonoME" CssClass="" runat="server" Style="text-align: right" Width="55px" ></asp:TextBox></div>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>

View File

@@ -334,6 +334,7 @@ Partial Class ContabilidadC_RegPrePolizaS
.Add("ContadoObservaciones", Type.GetType("System.String"))
.Add("PorcentajeImpuesto", Type.GetType("System.Double"))
.Add("Modificado", Type.GetType("System.Boolean"))
.Add("EsComplementaria", Type.GetType("System.Boolean"))
End With
@@ -735,9 +736,11 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
'Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla, UsuarioActual.CveEmpresa)
Dim Cuenta As String = ""
Dim IdCuenta As Integer = 0
Dim CodigoCuenta As String = ""
@@ -778,7 +781,8 @@ Partial Class ContabilidadC_RegPrePolizaS
dr("CvePersonal") = drt("CvePersonal")
dr("CveClasificacion") = -1
dr("MultipleSubProyecto") = drt("MultipleSubProyecto")
dr("CveCuenta") = drt("CveCuenta")
dr("CveCuenta") = drt("CveCuenta")
dr("EsComplementaria") = drt("EsComplementaria")
'dr("FolioPoliza") = 0 'drt("FolioPoliza")
DtMovimientos.Rows.Add(dr)
@@ -835,6 +839,12 @@ Partial Class ContabilidadC_RegPrePolizaS
e.Row.FCDropDownList("DdlSubProyecto").Enabled = True
End If
If e.Row.DBCampo("EsComplementaria") = "True" Then
If e.Row.DBCampo("TipoMovto") = "0" Then e.Row.FindControl("divCargoME").Visible = True
If e.Row.DBCampo("TipoMovto") = "1" Then e.Row.FindControl("divAbonoME").Visible = True
End If
'Agregamos la opcion para vincular los movimientos bancarios
If e.Row.DataKey("CveConcepto").ToEntero.Contiene(41) Then
Dim ObjMovimientos As New ClsMovimientos
@@ -923,6 +933,8 @@ 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 ImporteME As Decimal = 0
Dim TipoCambio As Decimal = 1
Dim TipoMovto As Boolean = False
Dim IdCtaContable As Integer = 0
@@ -946,17 +958,26 @@ Partial Class ContabilidadC_RegPrePolizaS
'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
ImporteME = 0
TipoCambio = 1
If gvr.DataKey("TipoMovto").ToDouble > 0 Then
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
TipoMovto = True
Else
TipoMovto = True
If gvr.DataKey("EsComplementaria") = "True" Then
ImporteME = gvr.FCTextBox("TxtAbonoME").Text.ToDecimal
TipoCambio = gvr.FCTextBox("TipoCambio").Text.ToDecimal
End If
Else
Importe = gvr.FCTextBox("TxtCargo").Text.ToDouble
TipoMovto = False
End If
If gvr.DataKey("EsComplementaria") = "True" Then
ImporteME = gvr.FCTextBox("TxtCargoME").Text.ToDecimal
TipoCambio = gvr.FCTextBox("TxtTC").Text.ToDecimal
End If
End If
If gvr.DataKey("CveConcepto").ToEntero <> 30 Then
If gvr.DataKey("CveConcepto").ToEntero = 41 Then
@@ -982,7 +1003,8 @@ Partial Class ContabilidadC_RegPrePolizaS
TxtFecha.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CveIE:=CveIE,
CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, CveCompra:=gvr.DataKey("CveCompra").ToEntero,
CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero,
ImporteMX:=Importe, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
ImporteMX:=Importe, ImporteME:=ImporteME, TipoCambio:=TipoCambio,
CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta) Then
Else
MsgError = "No se pudo insertar el detalle de la póliza2"
@@ -1951,8 +1973,10 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim worksheet = workbook.Worksheets.Add(NombreHoja)
Dim CvePlantilla As Integer = DdlPlantilla2.SelectedValue.ToEntero
'Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla, UsuarioActual.CveEmpresa)
Dim Dt As DataTable = GlobalDTContaPlantillasPolizasDetalle(CvePlantilla).FiltraParametros(String.Format("CveEmpresa={0}", UsuarioActual.CveEmpresa), "Orden")
Dim DtExcel As DataTable = (From row As DataRow In Dt.Rows
Select New With
{