This commit is contained in:
2024-08-15 12:51:20 -07:00
9 changed files with 62351 additions and 142 deletions

View File

@@ -555,6 +555,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.id = dr("CveContrato").ToString.ToEntero cevent.id = dr("CveContrato").ToString.ToEntero
cevent.title = If(dr("CodigoAF").ToString.Trim.Length > 0, $"#{dr("CodigoAF").ToString}-{dr("DescripcionContrato").ToString}", $"-{dr("DescripcionContrato").ToString}") cevent.title = If(dr("CodigoAF").ToString.Trim.Length > 0, $"#{dr("CodigoAF").ToString}-{dr("DescripcionContrato").ToString}", $"-{dr("DescripcionContrato").ToString}")
cevent.description = dr("DescripcionContrato").ToString
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime) cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
cevent.FechaFinal = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime) cevent.FechaFinal = String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)

62241
Bin/MailKit.xml Normal file

File diff suppressed because it is too large Load Diff

BIN
Bin/MimeKit.dll Normal file

Binary file not shown.

View File

@@ -1266,7 +1266,7 @@
<asp:UpdatePanel ID="UpInv" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpInv" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvInv" runat="server" DataKeyNames="Total,PU,Cantidad,CvePS" AutoGenerateColumns="false" GridLines="None" EmptyDataText="Aun no hay registros." <asp:GridView ID="GvInv" runat="server" DataKeyNames="Total,PU,Cantidad,CvePS,Descuento" AutoGenerateColumns="false" GridLines="None" EmptyDataText="Aun no hay registros."
ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall mysmallbtn" Visible="false"> ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall mysmallbtn" Visible="false">
<Columns> <Columns>
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
@@ -1340,7 +1340,7 @@
<ItemTemplate> <ItemTemplate>
<asp:DropDownList runat="server" ID="Ddlnewps" DataTextField="PSCodigo" DataValueField="CvePS" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList> <asp:DropDownList runat="server" ID="Ddlnewps" DataTextField="PSCodigo" DataValueField="CvePS" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField>--%> </asp:TemplateField>--%>
</Columns> </Columns>
</asp:GridView> </asp:GridView>

View File

@@ -6430,7 +6430,8 @@ Partial Class Compras_Compras
For Each gvRowInv As GridViewRow In GvInv.Rows For Each gvRowInv As GridViewRow In GvInv.Rows
Dim gvCantidad As Decimal = gvRowInv.FCTextBox("TbCantidad").Text.ToDecimal Dim gvCantidad As Decimal = gvRowInv.FCTextBox("TbCantidad").Text.ToDecimal
Dim gvPU As Decimal = gvRowInv.DataKey("PU").ToDecimal Dim gvPU As Decimal = gvRowInv.DataKey("PU").ToDecimal
ImpPrepoliza = ImpPrepoliza + (gvCantidad * gvPU) Dim gvDescuento As Decimal = gvRowInv.DataKey("PU").ToDecimal
ImpPrepoliza = (ImpPrepoliza + (gvCantidad * gvPU)) - gvDescuento
Next Next
ImpPrepolizaMN = ImpPrepoliza * tipoCambioActual * Multiplicador ImpPrepolizaMN = ImpPrepoliza * tipoCambioActual * Multiplicador

View File

@@ -221,7 +221,8 @@
<asp:ListItem Text="Media" Value="2"></asp:ListItem> <asp:ListItem Text="Media" Value="2"></asp:ListItem>
<asp:ListItem Text="Baja" Value="3"></asp:ListItem> <asp:ListItem Text="Baja" Value="3"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:DropDownList ID="DdlSubProyectoGral" Visible="false" CssClass="form-control select2me" runat="server" Width="85%" DataTextField="SubProyecto" DataValueField="CveSubProyecto" OnSelectedIndexChanged ="DdlSubProyectoGral_SelectedIndexChanged" AutoPostBack="true"> <asp:DropDownList ID="DdlSubProyectoGral" Visible="false" CssClass="form-control select2me" runat="server" Width="85%" DataTextField="SubProyecto" DataValueField="CveSubProyecto"
OnSelectedIndexChanged ="DdlSubProyectoGral_SelectedIndexChanged" AutoPostBack="true">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
@@ -492,12 +493,7 @@
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPorcentajeProntoPago" ValidChars="1234567890." /> <ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPorcentajeProntoPago" ValidChars="1234567890." />
</td> </td>
</tr> </tr>
<tr id="TrEdicionMasiva" runat="server" visible="false">
<td><b>Edición Masiva:</b></td>
<td>
<asp:Button runat="server" ID="BtnEdicionMasiva" Text="Editar" CssClass="btn btn-primary" OnClick="BtnEdicionMasiva_Click" />
</td>
</tr>
@@ -808,7 +804,7 @@
Producto o Servicio(<asp:HyperLink ID="HplPS" NavigateUrl="/Ventas/CatPS.aspx" runat="server">+</asp:HyperLink>)</th> Producto o Servicio(<asp:HyperLink ID="HplPS" NavigateUrl="/Ventas/CatPS.aspx" runat="server">+</asp:HyperLink>)</th>
<th scope="col">Unidad</th> <th scope="col">Unidad</th>
<th scope="col">Observación</th> <th scope="col">Observación</th>
<th scope="col"> <th scope="col" runat="server" id="TdProyectoSubPrpyecto">
<asp:Label ID="TtituloProyecto" Text="" runat="server" /> <asp:Label ID="TtituloProyecto" Text="" runat="server" />
<asp:Label ID="TituloSubProyecto" Text="" runat="server" /> <asp:Label ID="TituloSubProyecto" Text="" runat="server" />
</th> </th>
@@ -854,7 +850,7 @@
</td> </td>
<td> <td>
<asp:TextBox ID="TxtObsPS" CssClass=" form-control input-sm txtobs" runat="server" Rows="2" TextMode="MultiLine" MaxLength="750"></asp:TextBox></td> <asp:TextBox ID="TxtObsPS" CssClass=" form-control input-sm txtobs" runat="server" Rows="2" TextMode="MultiLine" MaxLength="750"></asp:TextBox></td>
<td> <td runat="server" id="TdProyectoSubPrpyectoDdl">
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Style="width: 100%; max-width: 600px;" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto"> <asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" Style="width: 100%; max-width: 600px;" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto">
</asp:DropDownList> </asp:DropDownList>
<asp:DropDownList ID="DdlSubProyecto" CssClass=" form-control input-sm select2me" runat="server" OnSelectedIndexChanged="DdlSubProyecto_SelectedIndexChanged" DataTextField="SubProyecto" Style="width: 100%; max-width: 600px;" DataValueField="CveSubProyecto" ValidationGroup="GrpDetalleGuardar"> <asp:DropDownList ID="DdlSubProyecto" CssClass=" form-control input-sm select2me" runat="server" OnSelectedIndexChanged="DdlSubProyecto_SelectedIndexChanged" DataTextField="SubProyecto" Style="width: 100%; max-width: 600px;" DataValueField="CveSubProyecto" ValidationGroup="GrpDetalleGuardar">
@@ -1707,6 +1703,11 @@
<ContentTemplate> <ContentTemplate>
<table> <table>
<tr> <tr>
<td style="text-align: center;">
<asp:Button runat="server" ID="BtnEdicionMasiva" Text="Edición Masiva" CssClass="btn btn-success" OnClick="BtnEdicionMasiva_Click" Width="170px" />
</td>
</tr>
<tr>
<td style="text-align: center;"> <td style="text-align: center;">
<asp:Panel runat="server" ID="PnlUsuarioAsignado" Visible="False"> <asp:Panel runat="server" ID="PnlUsuarioAsignado" Visible="False">
Asignar a: Asignar a:
@@ -1716,7 +1717,7 @@
<asp:Panel runat="server" ID="PnlUsuarioYaAsignado" Visible="false" Style="text-align:left;font-size:14px;height:34px;margin-top:10px"> <asp:Panel runat="server" ID="PnlUsuarioYaAsignado" Visible="false" Style="text-align:left;font-size:14px;height:34px;margin-top:10px">
Asignado a: Asignado a:
<asp:Label runat="server" ID="LblUsuarioYaAsignado"/><br /><br /> <asp:Label runat="server" ID="LblUsuarioYaAsignado"/><br /><br />
</asp:Panel> </asp:Panel>
<asp:Button ID="BtnGuardar" CssClass="btn btn-primary" Style="margin-top: 5px;" runat="server" Text="Guardar" Width="170px" ValidationGroup="GrpGuardar" /> <asp:Button ID="BtnGuardar" CssClass="btn btn-primary" Style="margin-top: 5px;" runat="server" Text="Guardar" Width="170px" ValidationGroup="GrpGuardar" />
<asp:UpdatePanel runat="server"> <asp:UpdatePanel runat="server">
<ContentTemplate> <ContentTemplate>

View File

@@ -606,6 +606,23 @@ Partial Class OC_OC
End Property End Property
Private Property EstaEnmodiEdicionMasiva As Boolean
Get
If ViewState("EstaEnmodiEdicionMasiva") Is Nothing Then
ViewState("EstaEnmodiEdicionMasiva") = False
End If
Return Boolean.Parse(ViewState("EstaEnmodiEdicionMasiva").ToString)
End Get
Set(value As Boolean)
ViewState("EstaEnmodiEdicionMasiva") = value
End Set
End Property
#End Region #End Region
@@ -727,11 +744,19 @@ Partial Class OC_OC
End If End If
'temporal 'temporal
'If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
If UsuarioActual.CveEmpresa = 189 Then If UsuarioActual.CveEmpresa = 189 Then
'GlobalDTOCEstatusUsuarios(CveEmpresaActual, UsuarioActual.CveUsuario, TipoOC) 'GlobalDTOCEstatusUsuarios(CveEmpresaActual, UsuarioActual.CveUsuario, TipoOC)
DdlSubProyectoGral.DataSource = GlobalDTOCEstatusUsuarios(CveEmpresaActual, UsuarioActual.CveUsuario, TipoOC).FiltraParametros("", "SubProyecto", DistinctColumns:={"CveSubProyecto", "SubProyecto"}) DdlSubProyectoGral.DataSource = GlobalDTOCEstatusUsuarios(CveEmpresaActual, UsuarioActual.CveUsuario, TipoOC).FiltraParametros("", "SubProyecto", DistinctColumns:={"CveSubProyecto", "SubProyecto"})
DdlSubProyectoGral.DataBind() DdlSubProyectoGral.DataBind()
DdlSubProyectoGral.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
DdlSubProyectoGral.SelectedValueExist(UsuarioActual.CveSubProyecto) DdlSubProyectoGral.SelectedValueExist(UsuarioActual.CveSubProyecto)
TdProyectoSubPrpyectoDdl.Visible = False
TdProyectoSubPrpyecto.Visible = False
GvD.Columns(4).Visible = False
UPPDetalle.Update()
End If End If
BtnGeneraContrato.Visible = True : CargaClientesContrato() BtnGeneraContrato.Visible = True : CargaClientesContrato()
@@ -968,7 +993,7 @@ Partial Class OC_OC
If UsuarioActual.CveRol = 1 Then If UsuarioActual.CveRol = 1 Then
TrDescuentoEscalonado.Visible = True TrDescuentoEscalonado.Visible = True
TrDescuentoProntoPago.Visible = True TrDescuentoProntoPago.Visible = True
TrEdicionMasiva.Visible = True BtnEdicionMasiva.Visible = True
End If End If
End If End If
@@ -2246,12 +2271,24 @@ Partial Class OC_OC
#Region " AGREGAR " #Region " AGREGAR "
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
'VALIDA CVEPS 'VALIDA CVEPS
If DdlP2.SelectedValue().ToEntero <= 0 Then If DdlP2.SelectedValue().ToEntero <= 0 Then
Alert("El campo <b>'Producto/Servicio'</b> es necesario, por favor seleccione uno.", TipoMensaje.MsgAdvertencia) Alert("El campo <b>'Producto/Servicio'</b> es necesario, por favor seleccione uno.", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If
'VALIDA
If TxtDescuento.Text.ToDecimal > 0 AndAlso ((TxtCant.Text.ToDecimal * txtPrecioUnitario.Text.ToDecimal) <= TxtDescuentoAdd.Text.ToDecimal) Then
Alert($"El campo <b>'Descuento'</b> no debe ser mayor o igual al total({(TxtCant.Text.ToDecimal * txtPrecioUnitario.Text.ToDecimal).ToString("###,###,###.00")}).", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'Valida cantidad en contrato 'Valida cantidad en contrato
Dim TieneError As Boolean = False Dim TieneError As Boolean = False
Dim dttemp As New DataTable ' GlobalDTContratos().FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue.ToString)) Dim dttemp As New DataTable ' GlobalDTContratos().FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue.ToString))
@@ -4130,6 +4167,7 @@ Partial Class OC_OC
DtDetalle.AcceptChanges() DtDetalle.AcceptChanges()
CargaDatosDetalles() CargaDatosDetalles()
ModoEdicionMasiva()
End Sub End Sub
@@ -4173,6 +4211,14 @@ Partial Class OC_OC
CveClasificacion = gvr.FCDropDownList("DdlClasificacion").SelectedValue.ToEntero CveClasificacion = gvr.FCDropDownList("DdlClasificacion").SelectedValue.ToEntero
Clasificacion = gvr.FCDropDownList("DdlClasificacion").SelectedItem.Text Clasificacion = gvr.FCDropDownList("DdlClasificacion").SelectedItem.Text
'VALIDA
If Descuento > 0 AndAlso ((Cantidad * Importe) <= Descuento) Then
Alert($"El campo <b>'Descuento'</b> no debe ser mayor o igual al total({(Cantidad * Importe).ToString("###,###,###.00")}).", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'SE TOMAN VALORES EN CASO DE QUE LA CvePS SEA DIFERENTE DE LA ANTERIOR 'SE TOMAN VALORES EN CASO DE QUE LA CvePS SEA DIFERENTE DE LA ANTERIOR
Dim CvePSAnterior As Integer = gvr.DataKey("CvePS").ToEntero Dim CvePSAnterior As Integer = gvr.DataKey("CvePS").ToEntero
PS = gvr.DataKey("PS").ToString PS = gvr.DataKey("PS").ToString
@@ -9387,8 +9433,23 @@ Partial Class OC_OC
Protected Sub BtnEdicionMasiva_Click(sender As Object, e As EventArgs) Protected Sub BtnEdicionMasiva_Click(sender As Object, e As EventArgs)
If BtnEdicionMasiva.Text = "Editar" Then If BtnEdicionMasiva.Text = "Edición Masiva" Then
BtnEdicionMasiva.Text = "Aplicar" EstaEnmodiEdicionMasiva = True
Else
If GvD_RecalculaEdicionMasiva() Then
EstaEnmodiEdicionMasiva = False
End If
End If
ModoEdicionMasiva()
End Sub
Private Sub ModoEdicionMasiva()
If EstaEnmodiEdicionMasiva Then
BtnEdicionMasiva.Text = "Aplicar Edición Masiva"
For Each GvRow As GridViewRow In GvD.Rows For Each GvRow As GridViewRow In GvD.Rows
@@ -9401,6 +9462,7 @@ Partial Class OC_OC
GvRow.FCLiteral("LtlObsPS").Visible = False GvRow.FCLiteral("LtlObsPS").Visible = False
GvRow.FCLiteral("LtlDescuento").Visible = False GvRow.FCLiteral("LtlDescuento").Visible = False
GvRow.FCLabel("LtlImporte").Visible = False GvRow.FCLabel("LtlImporte").Visible = False
GvRow.FCLinkButton("imgE").Visible = False
'observación, PU, descuento, cantidad 'observación, PU, descuento, cantidad
@@ -9408,9 +9470,9 @@ Partial Class OC_OC
Else Else
GvD_RecalculaEdicionMasiva() 'GvD_RecalculaEdicionMasiva()
BtnEdicionMasiva.Text = "Editar" BtnEdicionMasiva.Text = "Edición Masiva"
For Each GvRow As GridViewRow In GvD.Rows For Each GvRow As GridViewRow In GvD.Rows
GvRow.FCTextBox("TxtEMObsPS").Visible = False GvRow.FCTextBox("TxtEMObsPS").Visible = False
GvRow.FCTextBox("TxtEMCantEdit").Visible = False GvRow.FCTextBox("TxtEMCantEdit").Visible = False
@@ -9421,6 +9483,8 @@ Partial Class OC_OC
GvRow.FCLiteral("LtlObsPS").Visible = True GvRow.FCLiteral("LtlObsPS").Visible = True
GvRow.FCLiteral("LtlDescuento").Visible = True GvRow.FCLiteral("LtlDescuento").Visible = True
GvRow.FCLabel("LtlImporte").Visible = True GvRow.FCLabel("LtlImporte").Visible = True
GvRow.FCLinkButton("imgE").Visible = True
Next Next
@@ -9429,12 +9493,30 @@ Partial Class OC_OC
UPPDetalle.Update() UPPDetalle.Update()
uppEstatus.Update() uppOpciones.Update()
End Sub End Sub
Private Function GvD_RecalculaEdicionMasiva() As Boolean
Private Sub GvD_RecalculaEdicionMasiva() For Each gvr As GridViewRow In GvD.Rows
Dim Cantidad, Importe, Descuento As Decimal
Cantidad = gvr.FCTextBox("TxtEMCantEdit").Text.Trim.ToDecimal
Importe = gvr.FCTextBox("TxtEMImporteEdit").Text.Trim.ToDecimal
Descuento = gvr.FCTextBox("TxtEMDescuentoEdit").Text.Trim.ToDecimal
Dim PS As String = gvr.DataKey("PS").ToString
Dim Total As Decimal = Importe * Cantidad - Descuento
'VALIDA
If Descuento > 0 AndAlso ((Cantidad * Importe) <= Descuento) Then
Alert($"El producto {PS}, cantidad {Cantidad}, el campo <b>'Descuento'</b> no debe ser mayor o igual al total({(Cantidad * Importe).ToString("###,###,###.00")}).", TipoMensaje.MsgAdvertencia)
Return False
End If
Next
For Each gvr As GridViewRow In GvD.Rows For Each gvr As GridViewRow In GvD.Rows
@@ -9448,8 +9530,7 @@ Partial Class OC_OC
Descuento = gvr.FCTextBox("TxtEMDescuentoEdit").Text.Trim.ToDecimal Descuento = gvr.FCTextBox("TxtEMDescuentoEdit").Text.Trim.ToDecimal
Obs = gvr.FCTextBox("TxtEMObsPS").Text.Trim Obs = gvr.FCTextBox("TxtEMObsPS").Text.Trim
'SubProyecto, Cantidad, Importe, Descuento, CveOrdenCompra, CveUnidadMedida, CvePresupuestoEgreso, PS,CveClasificacion, CvePS, CveSubProyecto, CveActivoFijo, CodigoAF, TipoDato, Observacion, '
'CveOrdenCompraDetalle,CveCompra,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje,CantidadNoEditable,CveCultivoCuadroDetalle
CveUnidad = gvr.DataKey("CveUnidadMedida").ToEntero CveUnidad = gvr.DataKey("CveUnidadMedida").ToEntero
UM = gvr.FCLiteral("LA").Text UM = gvr.FCLiteral("LA").Text
@@ -9466,118 +9547,10 @@ Partial Class OC_OC
Dim IEPSPSIVA As Decimal = gvr.DataKey("IEPSPSIVAPorcentaje").ToDecimal Dim IEPSPSIVA As Decimal = gvr.DataKey("IEPSPSIVAPorcentaje").ToDecimal
Dim Total As Decimal = Importe * Cantidad - Descuento Dim Total As Decimal = Importe * Cantidad - Descuento
'VALORES DEL PS
'CvePS = gvr.FCDropDownList("DdlPS").SelectedValue.ToEntero
'PS = gvr.FCDropDownList("DdlPS").SelectedItem.Text
'Dim DrPS As DataRow = GlobalDTPS(CveEmpresaActual, CvePS:=CvePS).FiltroPrimero("")
'If DrPS Is Nothing Then
' Alert("Ocurrió un error al cargar la información del producto para actualizar. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
'Dim IvaPS As Decimal = DrPS("IVA").ToString.ToDecimal
'IEPSPS = DrPS("IEPSPorcentaje").ToString.ToDecimal
'IEPSPSIVA = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDecimal, 0)
'If DdlProveedores.SelectedValue.ToEntero > 0 Then
' 'Si es Proveedor Extranjero el IVA es 0%
' Dim drProv As DataRow = GlobalDTCompProveedores(CveEmpresaActual, CveProveedor:=DdlProveedores.SelectedValue.ToEntero).FiltroPrimero("")
' If drProv IsNot Nothing Then
' If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr
' RetISR = 0.0125D
' End If
' End If
'End If
'If CvePS <> CvePSAnterior Or Not CveOrdenCompra > 0 Then
' RetISR = DrPS("RetISR").ToString.ToDecimal
' RetIVA = DrPS("RetIVA").ToString.ToDecimal
' If Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2) = 0.08 Then
' RetIVA = RetIVA / 2
' End If
' If IvaPS <> 0 Then IvaPS = -1
'End If
'CveSubProyecto = gvr.FCDropDownList("DdlSubProyectoEdit").SelectedValue.ToEntero
'SubProyecto = gvr.FCDropDownList("DdlSubProyectoEdit").SelectedItem.Text
'CveCultivoCuadroDetalle = gvr.FCDropDownList("DdlCultivosCuadroEdit").SelectedValue.ToEntero
'Cuadro = ""
'If CveCultivoCuadroDetalle > 0 Then
' Cuadro = gvr.FCDropDownList("DdlCultivosCuadroEdit").SelectedItem.Text
'End If
'If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Or UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
' CveProyecto = -1
' Proyecto = "Seleccione"
'Else
' CveProyecto = gvr.FCDropDownList("DdlProyectoEdit").SelectedValue.ToEntero
' Proyecto = gvr.FCDropDownList("DdlProyectoEdit").SelectedItem.Text
'End If
'If UsuarioActual.Empresa.Funcionalidad(532).Contiene("1", "2") Then
' Dim ObjCon As New ClsContratos
' Dim CvePresupuesto As Integer = 0
' Dim Autorizado As Decimal = 0
' Dim Ejercido As Decimal = 0
' If ObjCon.GetPresupuestos(-1, "-1", CveSubProyecto, 2, -1, UsuarioActual.CveEmpresa) Then
' If ObjCon.DtResultados.Rows.Count > 0 Then
' CvePresupuesto = ObjCon.DtResultados.Rows(0)("CvePresupuesto").ToString.ToEntero
' If CvePresupuesto > 0 Then
' If ObjCon.GetPresupuestosDetalle(CvePresupuesto, -1, UsuarioActual.CveEmpresa) Then
' If ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {CveClasificacion} And Importe > 0").Rows.Count > 0 Then
' Autorizado = ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {CveClasificacion} And Importe > 0").Rows(0)("Importe").ToString.ToDecimal
' End If
' End If
' If ObjCon.GetPresupuestosRep(CvePresupuesto, -1, 1, $"01/09/{NowADS().Year - 1}".ToDate, NowADS(), UsuarioActual.CveEmpresa, CveProyecto,
' CveSubProyecto, UsuarioActual.CveUsuario, CveClasificacion) Then
' If ObjCon.DtResultados.Rows.Count > 0 Then
' Ejercido = ObjCon.DtResultados.Rows(0)("Ejercido").ToString.ToDecimal
' End If
' End If
' End If
' End If
' End If
' ObjCon.Dispose()
' If CvePresupuesto > 0 And Autorizado > 0 Then
' Dim Diferencia As Decimal = (Ejercido + Total) - Autorizado
' If Diferencia > 0 Then
' Alert($"No hay presupuesto disponible:<br/> - Subproyecto <b>{SubProyecto}</b> <br/> - Clasificación <b>{Clasificacion}</b> <br/> se excede por <b>{Diferencia.FormatoNumero}</b>", TipoMensaje.MsgAdvertencia)
' Exit Sub
' End If
' End If
'End If
'Agarra el nuevo AF si se modifico o deja el pasado
'CveActivoFijo = If(gvr.FCHiddenField("HdnCveActivoFijo").Value.ToEntero > 0, gvr.FCHiddenField("HdnCveActivoFijo").Value.ToEntero, HdnEditCveActivoFijo.Value.ToEntero)
'Codigo = If(gvr.FCHiddenField("HdnCodigoAF").Value <> "-1", gvr.FCHiddenField("HdnCodigoAF").Value, HdnEditCodigo.Value)
'HdnEditCveActivoFijo.Value = ""
'HdnEditCodigo.Value = ""
Dim dr As DataRow() = DtDetalle.Select("CveOrdenCompraDetalle = " & gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero) Dim dr As DataRow() = DtDetalle.Select("CveOrdenCompraDetalle = " & gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero)
dr(0)("Cantidad") = Cantidad dr(0)("Cantidad") = Cantidad
'dr(0)("CveUnidadMedida") = CveUnidad
'dr(0)("UM") = UM
'dr(0)("CveClasificacion") = CveClasificacion
'dr(0)("Clasificacion") = Clasificacion
'If isWithFamily() Then
' dr(0)("CveSubFamilia") = CveClasificacion
' dr(0)("SubFamilia") = Clasificacion
'End If
'dr(0)("CvePS") = CvePS
'dr(0)("PS") = PS
dr(0)("Observacion") = Obs dr(0)("Observacion") = Obs
'dr(0)("CveSubProyecto") = CveSubProyecto
'dr(0)("SubProyecto") = SubProyecto
'dr(0)("CveProyecto") = CveProyecto
'dr(0)("Proyecto") = Proyecto
dr(0)("Importe") = Importe dr(0)("Importe") = Importe
dr(0)("Descuento") = Descuento dr(0)("Descuento") = Descuento
dr(0)("Total") = Total dr(0)("Total") = Total
@@ -9586,8 +9559,6 @@ Partial Class OC_OC
dr(0)("IEPSPSIVA") = IEPSPSIVA * Total dr(0)("IEPSPSIVA") = IEPSPSIVA * Total
dr(0)("IEPSPSIVAPorcentaje") = IEPSPSIVA dr(0)("IEPSPSIVAPorcentaje") = IEPSPSIVA
'If DdlIVA.SelectedValue.ToDecimal = 1 Then dr(0)("IVA") = 0 Else dr(0)("IVA") = IvaPS * Total
'dr(0)("IVAPorcentaje") = If(IvaPS = -1, Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), 0)
Dim TotalGravado As Decimal = Total Dim TotalGravado As Decimal = Total
If IEPSPSIVA > 0 Then TotalGravado = Total * (1 + IEPSPSIVA) 'grava para iva, el importe del IEPS If IEPSPSIVA > 0 Then TotalGravado = Total * (1 + IEPSPSIVA) 'grava para iva, el importe del IEPS
dr(0)("IVA") = Math.Round(dr(0)("IVAPorcentaje").ToString.ToDecimal * TotalGravado, 2) dr(0)("IVA") = Math.Round(dr(0)("IVAPorcentaje").ToString.ToDecimal * TotalGravado, 2)
@@ -9597,13 +9568,6 @@ Partial Class OC_OC
dr(0)("RetISR") = (RetISR * Total).RoundSQL(6) dr(0)("RetISR") = (RetISR * Total).RoundSQL(6)
dr(0)("RetISRPorcentaje") = RetISR dr(0)("RetISRPorcentaje") = RetISR
'dr(0)("CveActivoFijo") = CveActivoFijo
'dr(0)("CodigoAF") = Codigo
'dr(0)("CveCultivoCuadroDetalle") = CveCultivoCuadroDetalle
'dr(0)("Cuadro") = Cuadro
'si el tipodato viene de la BD, entonces sufrió una actualización 'si el tipodato viene de la BD, entonces sufrió una actualización
If dr(0)("TipoDato").ToString.ToEntero = 2 Then dr(0)("TipoDato") = 1 If dr(0)("TipoDato").ToString.ToEntero = 2 Then dr(0)("TipoDato") = 1
DtDetalle.AcceptChanges() DtDetalle.AcceptChanges()
@@ -9614,8 +9578,9 @@ Partial Class OC_OC
CargaDatosDetalles() CargaDatosDetalles()
Return True
End Sub End Function
End Class End Class

View File

@@ -425,7 +425,7 @@
<asp:BoundField DataField="ConceptoHistorialBitacora" HeaderText="Campo" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="ConceptoHistorialBitacora" HeaderText="Campo" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Anterior" HeaderText="Anterior" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="Anterior" HeaderText="Anterior" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Actual" HeaderText="Actual" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="Actual" HeaderText="Actual" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Descripcio n" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>

View File

@@ -786,7 +786,7 @@
$('#<%=TxtCantidadPasajeros.ClientID%>').val(event.CantidadPasajeros); $('#<%=TxtCantidadPasajeros.ClientID%>').val(event.CantidadPasajeros);
$('#<%=TxtFolio.ClientID%>').val(event.NumeroContrato); $('#<%=TxtFolio.ClientID%>').val(event.NumeroContrato);
$('#<%=TxtObservaciones.ClientID%>').val(event.Observaciones); $('#<%=TxtObservaciones.ClientID%>').val(event.Observaciones);
$('#<%=TxtDescripcion.ClientID%>').val(event.title); $('#<%=TxtDescripcion.ClientID%>').val(event.description);
$('#<%=TxtUbicacion.ClientID%>').val(event.NombreAcercamiento); $('#<%=TxtUbicacion.ClientID%>').val(event.NombreAcercamiento);
if (esCalendario) { if (esCalendario) {