Merge -- Empresas
This commit is contained in:
@@ -687,8 +687,9 @@
|
||||
<div class="btn btn-default btn-circle btn-xs " data-toggle="tooltip" data-placement="top" title="Cambiar tipo de gasto"><i class="fa fa-arrow-circle-down" style="color: green" aria-hidden="true"></i></div>
|
||||
</span>
|
||||
</th>
|
||||
<th style="width: 80px">P.U. </th>
|
||||
<th style="width: 50px">% IVA </th>
|
||||
<th style="width: 100px">P.U. </th>
|
||||
<th style="width: 40px">% IVA </th>
|
||||
<th style="width: 40px">% IEPS </th>
|
||||
<th style="width: 80px">Total </th>
|
||||
<div id="dvNoDeducible" runat="server" visible="false">
|
||||
<th style="width: 80px">¿No Deducible? </th>
|
||||
@@ -787,58 +788,68 @@
|
||||
<%-- 7 --%>
|
||||
<asp:BoundField DataField="PU" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
|
||||
<%-- 8 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblIVAPorcentaje" runat="server" Text='<%# String.Format("{0} {1}", (CDbl(Eval("IVAPorcentaje").ToString) * 100).ToString("#####"), If(CDbl(Eval("IVAPorcentaje").ToString) * 100 > 0, "%", "")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 9 --%>
|
||||
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%-- 9 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlIEPSPSPorcentaje" runat="server" Text='<%# If(Eval("IEPSPSPorcentaje").ToString.Length > 0, (CDbl(Eval("IEPSPSPorcentaje").ToString) * 100).ToString("#####") & If(CDbl(Eval("IEPSPSPorcentaje").ToString) * 100 > 0, "%", ""), "") %>'></asp:Label>
|
||||
<%--<asp:Label ID="Label10" runat="server" Text='<%# Eval("IEPSPSPorcentaje").ToString %>'></asp:Label>--%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<%-- 10 --%>
|
||||
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<%-- 11 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ControlStyle-Width="100px" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEsNoDeduciblePS" runat="server" Checked='<%# If(Eval("NoDeducible").ToString = "", 0, Eval("NoDeducible")) %>' AutoPostBack="true" OnCheckedChanged="ChkEsNoDeduciblePS_CheckedChanged" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 11 --%>
|
||||
<%-- 12 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" OnClick="Edit_Click" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 12 --%>
|
||||
<%-- 13 --%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 13 --%>
|
||||
<%-- 14 --%>
|
||||
<asp:TemplateField HeaderText="Clasificacion" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList runat="server" ID="DdlAC5" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="CodigoClasificacion" DataValueField="CveClasificacion" Width="150px" OnSelectedIndexChanged="CompruebaSaldoAC" Visible="true"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 14 --%>
|
||||
<%-- 15 --%>
|
||||
<asp:TemplateField HeaderText="Programa Operativo" Visible="False">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList runat="server" ID="DdlAC1" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="ProgramaOperativo" DataValueField="CveProgramaOperativo" Width="150px" OnSelectedIndexChanged="CompruebaSaldoAC"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 15 --%>
|
||||
<%-- 16 --%>
|
||||
<asp:TemplateField HeaderText="Unidad Administrativa" Visible="False">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList runat="server" ID="DdlAC2" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="UnidadAdministrativa" DataValueField="CveUnidadAdministrativa" Width="150px" OnSelectedIndexChanged="CompruebaSaldoAC"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 16 --%>
|
||||
<%-- 17 --%>
|
||||
<asp:TemplateField HeaderText="Fuente Financiamiento" Visible="False">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList runat="server" ID="DdlAC3" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="FuenteFinanciamiento" DataValueField="CveFuenteFinanciamiento" Width="150px" OnSelectedIndexChanged="CompruebaSaldoAC"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 17 --%>
|
||||
<%-- 18 --%>
|
||||
<asp:TemplateField HeaderText="Tipo Gasto" Visible="False">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList runat="server" ID="DdlAC4" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="100px" OnSelectedIndexChanged="CompruebaSaldoAC"></asp:DropDownList>
|
||||
@@ -4447,7 +4458,7 @@
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEImportacion" runat="server" TargetControlID="txtImportacion" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<%--<asp:TextBox ID="TxtIVAModal" ClientIDMode="Static" Enabled="false" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPS"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBEIVA" runat="server" TargetControlID="TxtIVAModal" FilterType="Custom, Numbers" ValidChars="." />--%>
|
||||
<label for="<%= DdlIVA.ClientID.ToString()%>">Importación:</label>
|
||||
<label for="<%= DdlIVA.ClientID.ToString()%>">IVA Importación:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
@@ -5359,8 +5370,8 @@
|
||||
</div>--%>
|
||||
|
||||
|
||||
<div id="DivmodalConmtrato" class="modal ADS fade">
|
||||
<div class="modal-dialog">
|
||||
<div id="DivmodalContrato" class="modal ADS fade">
|
||||
<div class="modal-dialog" style="width: 650px; min-width: 470px;">
|
||||
<asp:UpdatePanel ID="UpModalContrato" runat="server" class="modal-content rowpadding" tabindex="-1" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -5414,7 +5425,7 @@
|
||||
|
||||
<asp:TemplateField HeaderText="Producto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPS" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Width="250px"></asp:Label>
|
||||
<asp:Label ID="LblPS" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -5422,11 +5433,11 @@
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" onkeyup="ValidateCantCon(this)" type="number" step="any"
|
||||
data-cantidad='<%# Eval("CantidadMax")%>' data-pu='<%# Eval("PU")%>' data-cve='<%# Eval("CveContratoDetalle") %>'
|
||||
Width="90" runat="server"></asp:TextBox>
|
||||
Width="70" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="PU">
|
||||
<asp:TemplateField HeaderText="PU" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<span><%# Eval("PU", "{0:N2}")%></span>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -5824,9 +5824,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim CveSubProyectoInsertar As Integer = -1
|
||||
Dim ConceptoContable As Integer = Row("CveConcepto").ToString.ToEntero
|
||||
If chkImportacion.Checked And ConceptoContable = 14 Then
|
||||
ConceptoContable = 287
|
||||
End If
|
||||
|
||||
Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False)
|
||||
Dim importeMovimiento As Decimal = 0
|
||||
Dim IdCtaContable As Integer = 0
|
||||
@@ -6005,6 +6003,9 @@ Partial Class Compras_Compras
|
||||
|
||||
PorcentajeImpuesto = PorcentajeIVA
|
||||
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
|
||||
If chkImportacion.Checked Then
|
||||
ConceptoContable = 288
|
||||
End If
|
||||
|
||||
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
@@ -6035,6 +6036,11 @@ Partial Class Compras_Compras
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
PorcentajeImpuesto = PorcentajeIVA
|
||||
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||
|
||||
If chkImportacion.Checked Then
|
||||
ConceptoContable = 287
|
||||
End If
|
||||
|
||||
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
|
||||
@@ -7592,6 +7598,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'** PRUEBA CUANDO SE AMORTIZA NC ANTES DE QUE SE REGISTRE NO DEBE TENER CONCEPTO 19 ** JM 01/06/2017 SE HIZO ESTO PARA LA FACTURA HRFA-8012831 DE VIGILANCIA
|
||||
'[IPP] NC NO DEBE REGISTRAR IMPUESTOS EN AMORTIZACIÓN 27/Agosto/2018
|
||||
Dim tConceptoContable As Integer
|
||||
If Not Ant.TipoMovto.Contiene("NC", "DEV") Then
|
||||
Dim PorcentajePagoAnt As Decimal = importeMovimiento / If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, TmpDT.SUMD("ImporteConImpuestos"), TxtTotal.Text.ToDecimal)
|
||||
Dim ImporteIVA As Decimal = Math.Round(PorcentajePagoAnt * TxtIVA.Text.ToDecimal, 2)
|
||||
@@ -7599,12 +7606,20 @@ Partial Class Compras_Compras
|
||||
|
||||
If ImporteIVA <> 0 Then
|
||||
'Agregamos el 14
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, 14, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
tConceptoContable = 14
|
||||
If chkImportacion.Checked Then
|
||||
tConceptoContable = 287
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteIVA, Referencia, tConceptoContable, Concepto, FechaMovimiento, CtaIvaxAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
'Agregamos el 19
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIVA, Referencia, 19, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
tConceptoContable = 19
|
||||
If chkImportacion.Checked Then
|
||||
tConceptoContable = 288
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteIVA, Referencia, tConceptoContable, Concepto, FechaMovimiento, CtaIvaAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorLocal, CveAcreedor:=CveAcreedor, CveIE:=Ant.CveIE, CveColectiva:=CveColectiva, ImporteMX:=ImporteIVA * tipoCambioActual * Multiplicador, ImporteME:=If(tipoCambioActual = 1, 0, ImporteIVA), PorcentajeImpuesto:=PorcentajeImpuestoAnticipo, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
@@ -8582,13 +8597,57 @@ Partial Class Compras_Compras
|
||||
Next
|
||||
|
||||
Else
|
||||
Alert("Los productos especificados en el lisado no tienen asigando impuesto IVA, favor de realizar la correción en el producto que aplique el impúesto.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Los productos especificados en el listado no tienen asignado impuesto IVA, favor de realizar la corrección en el producto que aplique el impuesto.", TipoMensaje.MsgAdvertencia)
|
||||
Respuesta = False
|
||||
End If
|
||||
Else
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Respuesta Then
|
||||
|
||||
Dim IEPSPSDetalles As Decimal = TmpDT.SUM("IEPSPS", " IEPSPS > 0 ").ToDecimal
|
||||
Dim DiferenciaIEPSPS As Decimal = TxtIEPS.Text.ToDecimal - IEPSPSDetalles
|
||||
|
||||
Dim DTConsultaIEPSPS As New DataTable
|
||||
DTConsultaIEPSPS = TmpDT.FiltraParametros(" AplicaIEPS = 'True'")
|
||||
|
||||
|
||||
Dim IndiceContador As Integer = 0
|
||||
Dim IndicePrimero As Integer = 0
|
||||
|
||||
|
||||
For Each dRow As DataRow In TmpDT.Rows
|
||||
If Boolean.Parse(dRow("AplicaIEPS").ToString) Then
|
||||
IndicePrimero = IndiceContador
|
||||
Exit For
|
||||
End If
|
||||
IndiceContador = IndiceContador + 1
|
||||
Next
|
||||
|
||||
If DiferenciaIEPSPS <> 0 Then
|
||||
|
||||
If DTConsultaIEPSPS.Rows.Count > 0 Then
|
||||
'Ajusta IPES en primer registro que aplique IEPS
|
||||
TmpDT.Rows(IndicePrimero)("IEPSPS") = TmpDT.Rows(IndicePrimero)("IEPSPS").ToString.ToDecimal + DiferenciaIEPSPS
|
||||
TmpDT.AcceptChanges()
|
||||
Else
|
||||
Respuesta = False
|
||||
Alert("Los productos especificados en el lisado no tienen asigando impuesto IEPS, favor de realizar la correción en el producto que aplique el impúesto.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
@@ -9753,7 +9812,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 '= New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjContaAC As ClsContPAQi = Nothing '= New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim Retorno As Boolean = True
|
||||
Dim CveEstatusFactura As Integer = HdnCveEstatusFactura.Value.ToEntero
|
||||
@@ -10957,11 +11016,12 @@ Partial Class Compras_Compras
|
||||
'e.Row.Cells(11).Width = Unit.Pixel(43)
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then 'AndAlso (CveFactura > 0 Or CveCompra > 0)
|
||||
e.Row.Cells(12).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(13).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(14).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(15).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(16).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(16).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(17).Width = Unit.Pixel(150)
|
||||
e.Row.Cells(18).Width = Unit.Pixel(100)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -11062,11 +11122,11 @@ Partial Class Compras_Compras
|
||||
|
||||
'CargaPresupuestosEgresos
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
e.Row.Cells(13).Visible = True
|
||||
e.Row.Cells(14).Visible = True
|
||||
e.Row.Cells(15).Visible = True
|
||||
e.Row.Cells(16).Visible = True
|
||||
e.Row.Cells(17).Visible = True
|
||||
e.Row.Cells(18).Visible = True
|
||||
|
||||
e.Row.FCDropDownList("DdlAC1").Items.Clear()
|
||||
e.Row.FCDropDownList("DdlAC1").DataSource = DtPresupuestos.FiltraParametros("", DistinctColumns:={"CveProgramaOperativo", "ProgramaOperativo"})
|
||||
@@ -11097,19 +11157,19 @@ Partial Class Compras_Compras
|
||||
'SI EL PRESUPUESTO DE EGRESOS VIENE DESDE LA OC, SE BLOQUEA PE
|
||||
If e.Row.DBCampo("CveOrdenCompraDetalle").ToEntero > 0 AndAlso e.Row.DBCampo("CvePresupuestoEgreso").ToEntero > 0 Then
|
||||
|
||||
e.Row.Cells(13).Enabled = False
|
||||
e.Row.Cells(14).Enabled = False
|
||||
e.Row.Cells(15).Enabled = False
|
||||
e.Row.Cells(16).Enabled = False
|
||||
e.Row.Cells(17).Enabled = False
|
||||
e.Row.Cells(18).Enabled = False
|
||||
End If
|
||||
Else
|
||||
|
||||
e.Row.Cells(13).Visible = False
|
||||
e.Row.Cells(14).Visible = False
|
||||
e.Row.Cells(15).Visible = False
|
||||
e.Row.Cells(16).Visible = False
|
||||
e.Row.Cells(17).Visible = False
|
||||
e.Row.Cells(18).Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -13226,11 +13286,11 @@ Partial Class Compras_Compras
|
||||
|
||||
'Seccion Grid
|
||||
GvPS.Width = 1760
|
||||
GvPS.Columns(12).Visible = True
|
||||
GvPS.Columns(13).Visible = True
|
||||
GvPS.Columns(14).Visible = True
|
||||
GvPS.Columns(15).Visible = True
|
||||
GvPS.Columns(16).Visible = True
|
||||
GvPS.Columns(17).Visible = True
|
||||
|
||||
'Panel General
|
||||
UpPresupuestosAC.Visible = True
|
||||
@@ -17441,7 +17501,7 @@ Partial Class Compras_Compras
|
||||
CargaRetISRConcepto()
|
||||
|
||||
Dim NumNoDed As Integer = TmpDT.COUNT("CvePS", "NoDeducible = True ")
|
||||
If NumNoDed > 0 Then GvPS.Columns(10).Visible = True 'visualiza columnas de nodeducibles
|
||||
If NumNoDed > 0 Then GvPS.Columns(11).Visible = True 'visualiza columnas de nodeducibles
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||
InicializaAplicaNCFact()
|
||||
@@ -17971,14 +18031,16 @@ Partial Class Compras_Compras
|
||||
|
||||
ViewState("RetIVA") = If(PS("RetIVA").ToString = "-1", ViewState("RetIVA"), PS("RetIVA").ToString).ToString
|
||||
ViewState("RetISR") = If(PS("RetISR").ToString = "-1", ViewState("RetISR"), PS("RetISR").ToString).ToString
|
||||
ViewState("IEPSPS") = If(PS("IEPSPorcentaje").ToString = "-1", ViewState("IEPSPS"), PS("IEPSPorcentaje").ToString).ToString
|
||||
If TxtIEPSModal.Text = "" Then
|
||||
TxtIEPSModal.Text = FormatoNumero(PS("IEPSPorcentaje").ToString.ToDecimal * 100, 0)
|
||||
End If
|
||||
ViewState("IEPSPSIVA") = If(PS("IEPSGrabaIVA").ToString = "True", PS("IEPSPorcentaje").ToString.ToDouble, 0)
|
||||
|
||||
|
||||
'TxtIVAModal.Text = FormatoNumero(ViewState("IVAPS").ToString().ToDouble * 100, 0)
|
||||
TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 0)
|
||||
TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 0)
|
||||
TxtIEPSModal.Text = FormatoNumero(ViewState("IEPSPS").ToString().ToDouble * 100, 0)
|
||||
|
||||
|
||||
UpIVA.Update()
|
||||
|
||||
@@ -20441,12 +20503,12 @@ Partial Class Compras_Compras
|
||||
If ChkEsNoDeducible.Checked Then
|
||||
EsNoDeducible = True
|
||||
dvNoDeducible.Visible = True
|
||||
GvPS.Columns(10).Visible = True
|
||||
GvPS.Columns(11).Visible = True
|
||||
UpEsNoDeduciblePS.Visible = True
|
||||
Else
|
||||
EsNoDeducible = False
|
||||
dvNoDeducible.Visible = False
|
||||
GvPS.Columns(10).Visible = False
|
||||
GvPS.Columns(11).Visible = False
|
||||
UpEsNoDeduciblePS.Visible = False
|
||||
End If
|
||||
'DivEsNoDeducible.Visible = False
|
||||
@@ -20787,7 +20849,7 @@ Partial Class Compras_Compras
|
||||
DdlTipoGastoContrato.DataBind()
|
||||
DdlTipoGasto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
RegistraScript("$('#DivmodalConmtrato').modal('show')")
|
||||
RegistraScript("$('#DivmodalContrato').modal('show')")
|
||||
UpModalContrato.Update()
|
||||
|
||||
End Sub
|
||||
@@ -20833,28 +20895,30 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
Protected Sub BtnAplicarContrato_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim PorcentajeIVA As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
||||
|
||||
TmpDT.Rows.Clear()
|
||||
|
||||
Dim CveTipoGastoObra As Integer = DdlTipoGastoContrato.SelectedValue.ToEntero
|
||||
Dim TuipoGasto As String = DdlTipoGastoContrato.SelectedItem.Text
|
||||
Dim TipoGasto As String = DdlTipoGastoContrato.SelectedItem.Text
|
||||
|
||||
For Each GvRow As GridViewRow In GvContratosControl.Rows
|
||||
|
||||
Dim CveContratoDetalle As Integer = GvRow.DataKey("CveContratoDetalle").ToEntero
|
||||
|
||||
Dim Cantidad As Double = GvRow.FCTextBox("TxtCantidad").Text.ToDouble
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim PS As String = GvRow.DataKey("PS")
|
||||
Dim PU As Double = GvRow.DataKey("PU").ToDouble
|
||||
Dim TotalPS As Double = GvRow.FCTextBox("TxtImporte").Text.ToDouble
|
||||
Dim TotalPS As Decimal = GvRow.FCTextBox("TxtImporte").Text.ToDecimal
|
||||
Dim PU As Decimal
|
||||
|
||||
If Cantidad > 0 Then PU = TotalPS / Cantidad
|
||||
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim UMAbreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
|
||||
Dim SubProyecto As String = GvRow.DataKey("SubProyecto")
|
||||
Dim CveSubProyecto As Integer = GvRow.DataKey("CveSubProyecto").ToEntero
|
||||
Dim Codigo As String = "" 'GvRow.DataKey("Codigo")
|
||||
|
||||
Dim Proyecto As String = GvRow.DataKey("Proyecto")
|
||||
Dim CveProyecto As Integer = GvRow.DataKey("CveProyecto").ToEntero
|
||||
@@ -20863,24 +20927,23 @@ Partial Class Compras_Compras
|
||||
Dim RetIVA As Double = GvRow.DataKey("RetIVA").ToString.ToDouble
|
||||
Dim IvaPS As Double = GvRow.DataKey("IVA").ToString.ToDouble
|
||||
|
||||
If IvaPS = -1 Then
|
||||
IvaPS = PorcentajeIVA
|
||||
End If
|
||||
|
||||
IvaPS = IvaPS * TotalPS
|
||||
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToString.ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion")
|
||||
|
||||
|
||||
Dim IEPSPS As Double = GvRow.DataKey("IEPSPorcentaje").ToString.ToDouble
|
||||
Dim IEPSPSIVA As Double = If(GvRow.DataKey("IEPSGrabaIVA").ToString = "True", IEPSPS, 0)
|
||||
|
||||
Dim IdCuentaPorEjercer As Integer = -1
|
||||
Dim IdCuentaComprometido As Integer = -1
|
||||
|
||||
|
||||
|
||||
|
||||
If Cantidad > 0 Then
|
||||
|
||||
AddPS(Cantidad, CveUnidadMedida, UMAbreviatura, CveClasificacion, Clasificacion, CvePS, PS, 1, CveSubProyecto.ToString, SubProyecto, Proyecto, CveProyecto.ToString, "", PU, PU * Cantidad, IvaPS, RetIVA, RetISR, IEPSPS, IEPSPSIVA, 0, CveContratoDetalle:=CveContratoDetalle,
|
||||
CveTipoGasto:=CveTipoGastoObra, TipoGasto:=TuipoGasto)
|
||||
|
||||
AddPS(Cantidad, CveUnidadMedida, UMAbreviatura, CveClasificacion, Clasificacion, CvePS, PS, 1, CveSubProyecto.ToString, SubProyecto, Proyecto, CveProyecto.ToString, "", PU, PU * Cantidad, PorcentajeIVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, 0, PorcentajeIVA:=PorcentajeIVA, CveContratoDetalle:=CveContratoDetalle,
|
||||
CveTipoGasto:=CveTipoGastoObra, TipoGasto:=TipoGasto)
|
||||
|
||||
'ContratoObraAplciado = True
|
||||
|
||||
@@ -20890,7 +20953,7 @@ Partial Class Compras_Compras
|
||||
|
||||
AddPS2()
|
||||
If Not ChkContinualAgregandoControl.Checked Then
|
||||
RegistraScript("$('#DivmodalConmtrato').modal('hide')")
|
||||
RegistraScript("$('#DivmodalContrato').modal('hide')")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user