EMD - Mejoras Propuestas - Sayri, pendiente verificar correo

This commit is contained in:
rakcsle
2024-03-05 13:18:49 -07:00
parent b63ce53815
commit b59061dc84
4 changed files with 294 additions and 2 deletions

View File

@@ -921,7 +921,23 @@
<asp:Button runat="server" ID="btnProrateo" Visible="false" Text="Prorratear" CommandArgument="Compras" CssClass="btn btn-success" />
<asp:Button runat="server" ID="btnProrateo2" Visible="false" Text="Prorratear Nomina" CommandArgument="Nomina" CssClass="btn btn-success" />
<asp:Button runat="server" ID="BtnProrateoDeducible" Visible="false" Text="Prorratear 8.5%" CommandArgument="Prorratear Deducible" CssClass="btn btn-success" />
</div>
</div>
<asp:UpdatePanel ID="UpDVAtencionOCAnticipo" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div style="z-index: 5; position: relative;">
<div class="alert alert-danger alert-dismissable" runat="server" id="DVAtencionOCAnticipo" visible="false" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
<strong style="font-size: 20px; margin-right: 25px;">Atención! </strong>
El Proveedor tiene Saldo a favor pendiente por aplicar
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="col-md-6 ">

View File

@@ -714,6 +714,18 @@ Partial Class Compras_Compras
ViewState("CveMetodoPago") = value
End Set
End Property
Private Property MetodoPagoOC As Integer
Get
If ViewState("MetodoPagoOC") Is Nothing Then
ViewState("MetodoPagoOC") = -1
End If
Return ViewState("MetodoPagoOC").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("MetodoPagoOC") = value
End Set
End Property
Private Property TipoCambio As Decimal
Get
Return ViewState("TipoCambio").ToString.ToDecimal
@@ -1018,6 +1030,20 @@ Partial Class Compras_Compras
End Set
End Property
Private Property CveIEAnticipo As Integer
Get
If ViewState("CveIEAnticipo") Is Nothing Then
ViewState("CveIEAnticipo") = -1
End If
Return ViewState("CveIEAnticipo").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveIEAnticipo") = value
End Set
End Property
Public Property FechaCompraOriginal As Date
Get
Return ViewState("FechaCompraOriginal").ToString.ToDate
@@ -3967,6 +3993,11 @@ Partial Class Compras_Compras
'------------------ INICIA VALIDACIONES ------------------
If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 Then
Alert("La orden de compra se definió de contado, favor de especificar la compra de contado.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim CveSubProyectoPrincipal As Integer = AsignarSubProyectoPrincipal()
If Not CveSubProyectoPrincipal > 0 Then
@@ -13656,6 +13687,7 @@ Partial Class Compras_Compras
CargaOC()
End Sub
Private Sub CargaOC()
MetodoPagoOC = -1
Dim EntregaDirecta As Integer = 0
DivOCSolicitudAnticipo.Visible = False
DivOCSolicitudAnticipoModal.Visible = False
@@ -13694,6 +13726,7 @@ Partial Class Compras_Compras
HdnVCveOC.Value += String.Format("{0}{1}", If(HdnVCveOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveOrdenCompra").ToString)
HdnCveEstatusOC.Value += String.Format("{0}{1}", If(HdnCveEstatusOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveEstatusSiguiente").ToString)
EntregaDirecta += If(OC.DtResultados.Rows(0)("EntregaDirecta").ToString = "True", 1, 0)
MetodoPagoOC = OC.DtResultados.Rows(0)("EntregaDirecta").ToString.ToEntero
End If
End If
Next
@@ -13709,6 +13742,7 @@ Partial Class Compras_Compras
HdnVCveOC.Value += String.Format("{0}{1}", If(HdnVCveOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveOrdenCompra").ToString)
HdnCveEstatusOC.Value += String.Format("{0}{1}", If(HdnCveEstatusOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveEstatusSiguiente").ToString)
EntregaDirecta += If(OC.DtResultados.Rows(0)("EntregaDirecta").ToString = "True", 1, 0)
MetodoPagoOC = OC.DtResultados.Rows(0)("EntregaDirecta").ToString.ToEntero
End If
End If
Next
@@ -13751,7 +13785,9 @@ Partial Class Compras_Compras
Protected Sub BtnVOC_Click(sender As Object, e As EventArgs)
VinculaOC()
End Sub
Private Sub VinculaOC()
CveIEAnticipo = -1
If TxtOC.Text <> "" Then
'VARIABLES
@@ -13798,6 +13834,7 @@ Partial Class Compras_Compras
If ObjOC.DtResultados.Rows(0)("CveIEAnticipo").ToString.ToEntero > 0 Then
FoliosOCAnticipo += $"{ObjOC.DtResultados.Rows(0)("FolioOC").ToString},"
FoliosOCAnticipoIE += $"{ObjOC.DtResultados.Rows(0)("FolioIEAnticipo").ToString},"
CveIEAnticipo = ObjOC.DtResultados.Rows(0)("CveIEAnticipo").ToString.ToEntero
DivOCSolicitudAnticipo.Visible = True
DivOCSolicitudAnticipoModal.Visible = True
End If
@@ -13889,6 +13926,9 @@ Partial Class Compras_Compras
If DivOCSolicitudAnticipo.Visible And FoliosOCAnticipo.Length > 0 Then
LtSolicitudAnticipoFoliosOC.Text = $"La(s) siguiente(s) OC: {FoliosOCAnticipo.Substring(0, FoliosOCAnticipo.Length - 1)}. tienen vinculado un anticipo"
LtSolicitudAnticipoFoliosIE.Text = $" {FoliosOCAnticipoIE.Substring(0, FoliosOCAnticipoIE.Length - 1)}"
DVAtencionOCAnticipo.Visible = True
UpDVAtencionOCAnticipo.Update()
End If
'PROMOCIONES
@@ -14436,13 +14476,39 @@ Partial Class Compras_Compras
'ANTICIPO OC
If DivOCSolicitudAnticipo.Visible Then
If CveIEAnticipo > 0 Then
DVAtencionOCAnticipo.Visible = True
UpDVAtencionOCAnticipo.Update()
End If
Dim scripsSeccion As String = ""
For Each gvRow As GridViewRow In GVAnticipos.Rows
If gvRow.DataKey("CveIE").ToEntero = CveIEAnticipo Then
Dim Chk As CheckBox = gvRow.FCCheckBox("Chk")
scripsSeccion = scripsSeccion & $"$('#{Chk.ClientID}').click();"
'RegistraScript($"$('#{Chk.ClientID}').click();", "100")
End If
Next
RegistraScript("MuestraAnticipos();", "MuestaAnticiposOC")
RegistraScript("
setTimeout(function() {
" & scripsSeccion & "
}, 200)
")
UpAnticipos.Update()
End If
CalculaTotales()
CompraEstaVinculadaOC = True
If MetodoPagoOC = 0 AndAlso RBLPago.SelectedValue.ToEntero <> 2 Then
Alert("La orden de compra se definió de contado, favor de especificar la compra de contado.", TipoMensaje.MsgAdvertencia)
End If
End Sub
Private Sub VinculacionAsync(Optional VinculacionCompleta As Boolean = False)