This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2019-10-07 13:09:15 -07:00
parent a97d4cc137
commit b0296087bf
2 changed files with 26 additions and 5 deletions

View File

@@ -13,6 +13,9 @@
</asp:UpdatePanel> </asp:UpdatePanel>
<asp:UpdatePanel ID="UpnTools" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpnTools" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<li>
<asp:Button ID="btnpruebas" CssClass="hidden" OnClick="btnpruebas_Click" runat="server" Text="Button" />
</li>
<li> <li>
<asp:LinkButton ID="LnkAddPS" runat="server"><i class="fa fa-plus-circle"></i>Agregar Concepto</asp:LinkButton> <asp:LinkButton ID="LnkAddPS" runat="server"><i class="fa fa-plus-circle"></i>Agregar Concepto</asp:LinkButton>
</li> </li>

View File

@@ -3755,7 +3755,7 @@ Partial Class Compras_Compras
Dim GuardaNoDeducibles As Boolean = False Dim GuardaNoDeducibles As Boolean = False
If ChkEsNoDeducible.Checked Then If ChkEsNoDeducible.Checked Then
For Each Row As DataRow In TmpDT.Rows For Each Row As DataRow In TmpDT.Rows
If Row("NoDeducible").ToString().ToUpper() = "TRUE" OrElse Row("NoDeducible").ToString().ToUpper() = "1" Then If Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1") Then
GuardaNoDeducibles = True GuardaNoDeducibles = True
End If End If
Next Next
@@ -4748,7 +4748,7 @@ Partial Class Compras_Compras
CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia, OtrosGastos:=Row("OtrosGastos").ToString.ToDecimal, CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia, OtrosGastos:=Row("OtrosGastos").ToString.ToDecimal,
RetIVA:=Row("RetIVA").ToString.ToDouble, RetISR:=Row("RetISR").ToString.ToDouble, IEPSPS:=Row("IEPSPS").ToString.ToDouble, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDouble, RetIVA:=Row("RetIVA").ToString.ToDouble, RetISR:=Row("RetISR").ToString.ToDouble, IEPSPS:=Row("IEPSPS").ToString.ToDouble, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDouble,
IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDouble, IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDouble,
IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDouble, NoDeducible:=If((Row("NoDeducible").ToString = "True" OrElse Row("NoDeducible").ToString = "1") AndAlso EsNoDeducible, True, False)) Then IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDouble, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False)) Then
ErrorDetalles = True ErrorDetalles = True
Exit For Exit For
@@ -9312,7 +9312,7 @@ Partial Class Compras_Compras
If Not ObjCompra.UpdateCompraDetalle(Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, Row("IVA").ToString.ToDouble, Row("Total").ToString.ToDouble, If Not ObjCompra.UpdateCompraDetalle(Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, Row("IVA").ToString.ToDouble, Row("Total").ToString.ToDouble,
Row("Descuento").ToString.ToDouble, Row("Obs").ToString, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero, CveAF, Row("CveCompraDetalle").ToString.ToEntero, CvePersonal:=CvePersonal, CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia, Row("Descuento").ToString.ToDouble, Row("Obs").ToString, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero, CveAF, Row("CveCompraDetalle").ToString.ToEntero, CvePersonal:=CvePersonal, CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia,
RetIVA:=Row("RetIVA").ToString.ToDouble, RetISR:=Row("RetISR").ToString.ToDouble, IEPSPS:=Row("IEPSPS").ToString.ToDouble, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDouble, RetIVA:=Row("RetIVA").ToString.ToDouble, RetISR:=Row("RetISR").ToString.ToDouble, IEPSPS:=Row("IEPSPS").ToString.ToDouble, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDouble,
IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDouble, NoDeducible:=If(Row("NoDeducible").ToString = "True" AndAlso EsNoDeducible, True, False)) Then IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDouble, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False)) Then
Retorno = False Retorno = False
Exit For Exit For
@@ -16518,7 +16518,7 @@ Partial Class Compras_Compras
Dim PS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("") Dim PS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("")
DdlIVA.Enabled = True DdlIVA.Enabled = True
ChkEsNoDeduciblePS.Checked = If(GvRow.DataKey("NoDeducible").Contiene("True", "1"), True, False) ChkEsNoDeduciblePS.Checked = If(GvRow.DataKey("NoDeducible").ToUpper().Contiene("TRUE", "1"), True, False)
If PS IsNot Nothing Then If PS IsNot Nothing Then
If PS("IVA").ToString.ToEntero() <> -1 Then If PS("IVA").ToString.ToEntero() <> -1 Then
@@ -18988,5 +18988,23 @@ Partial Class Compras_Compras
End If End If
ObjComp.Dispose() ObjComp.Dispose()
End Sub End Sub
Protected Sub btnpruebas_Click(sender As Object, e As EventArgs)
Dim GuardaNoDeducibles As Boolean = False
If ChkEsNoDeducible.Checked Then
For Each Row As DataRow In TmpDT.Rows
If Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1") Then
GuardaNoDeducibles = True
End If
Next
If GuardaNoDeducibles = False Then
Alert("Si la compra es No Deducible, mínimo se debe registrar un producto No Deducible", TipoMensaje.MsgAdvertencia)
Exit Sub
Else
Alert("todo bien!", TipoMensaje.MsgInformacion)
End If
End If
End Sub
End Class End Class