OI Temas, Cat Checadores
This commit is contained in:
@@ -1202,7 +1202,8 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpInv" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvInv" runat="server" DataKeyNames="Total,PU,Cantidad,CvePS" AutoGenerateColumns="false" GridLines="None" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall mysmallbtn" Visible="false">
|
||||
<asp:GridView ID="GvInv" runat="server" DataKeyNames="Total,PU,Cantidad,CvePS,PUProntoPago,TotalProntoPago" AutoGenerateColumns="false" GridLines="None" EmptyDataText="Aun no hay registros."
|
||||
ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall mysmallbtn" Visible="false">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
|
||||
@@ -1117,6 +1117,49 @@ Partial Class Compras_Compras
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Descuento por pronto pago proveedor
|
||||
''' </summary>
|
||||
''' <returns>Porcentaje de descuento de proveedor</returns>
|
||||
Private Property PorcentajeProntoPago As Decimal
|
||||
Get
|
||||
If ViewState("PorcentajeProntoPago") Is Nothing Then
|
||||
ViewState("PorcentajeProntoPago") = 0D
|
||||
End If
|
||||
Return ViewState("PorcentajeProntoPago").ToString.ToDecimal
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("PorcentajeProntoPago") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ImporteRemNC As Decimal
|
||||
Get
|
||||
If ViewState("ImporteRemNC") Is Nothing Then
|
||||
ViewState("ImporteRemNC") = 0D
|
||||
End If
|
||||
Return ViewState("ImporteRemNC").ToString.ToDecimal
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("ImporteRemNC") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ImporteRemNCProntoPago As Decimal
|
||||
Get
|
||||
If ViewState("ImporteRemNCProntoPago") Is Nothing Then
|
||||
ViewState("ImporteRemNCProntoPago") = 0D
|
||||
End If
|
||||
Return ViewState("ImporteRemNCProntoPago").ToString.ToDecimal
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("ImporteRemNCProntoPago") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip")
|
||||
@@ -3280,6 +3323,8 @@ Partial Class Compras_Compras
|
||||
|
||||
Private Sub CargaProveedor(CveProveedor As Integer, RFC As String, Optional RecargaCombo As Boolean = True)
|
||||
|
||||
PorcentajeProntoPago = 0D
|
||||
|
||||
Dim ObjProveedor As New ClsCompProveedores()
|
||||
|
||||
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", RFC, "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
@@ -3435,6 +3480,10 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||
PorcentajeProntoPago = ObjProveedor.PorcentajeProntoPago
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -9999,6 +10048,8 @@ Partial Class Compras_Compras
|
||||
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer))
|
||||
TmpDT.Columns.Add("TemporadaCuadro", GetType(String))
|
||||
TmpDT.Columns.Add("PUProntoPago", GetType(Decimal))
|
||||
TmpDT.Columns.Add("TotalProntoPago", GetType(Decimal))
|
||||
|
||||
TmpDTOriginal = New DataTable
|
||||
TmpDTOriginal.Columns.Add("Consec", GetType(Integer))
|
||||
@@ -10108,6 +10159,8 @@ Partial Class Compras_Compras
|
||||
TmpDTOriginal.Columns.Add("CveContratoDetalle", GetType(Double))
|
||||
TmpDTOriginal.Columns.Add("CveCultivoCuadroDetalle", GetType(Double))
|
||||
TmpDTOriginal.Columns.Add("TemporadaCuadro", GetType(String))
|
||||
TmpDTOriginal.Columns.Add("PUProntoPago", GetType(Decimal))
|
||||
TmpDTOriginal.Columns.Add("TotalProntoPago", GetType(Decimal))
|
||||
|
||||
|
||||
End Sub
|
||||
@@ -10437,6 +10490,17 @@ Partial Class Compras_Compras
|
||||
e.Row.FCTextBox("TxtDividir").Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||
|
||||
e.Row.Cells(4).Text = e.Row.DataKey("PUProtoPago").ToDecimal.ToString("###,###,###.00")
|
||||
|
||||
'If PorcentajeProntoPago > 0 Then
|
||||
' e.Row.Cells(4).Text = e.Row.DataKey("PUProtoPago").ToDecimal - ()
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'HEADER GvInv
|
||||
@@ -14293,10 +14357,22 @@ Partial Class Compras_Compras
|
||||
LbSubTotalDif.Visible = False
|
||||
Vinculacion()
|
||||
Else
|
||||
LbSubTotalDif.Visible = True
|
||||
LbSubTotalDif.Text = (SubTotalCompra - SubTotalGV).FormatoNumero
|
||||
Alert("Los SubTotales de la vinculación no coinciden. Rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia,,)
|
||||
RegistraScript("CalculaTotalesOC();")
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||
|
||||
ImporteRemNC = (SubTotalCompra - SubTotalGV).RoundSQL(2)
|
||||
ImporteRemNCProntoPago = (SubTotalCompra * PorcentajeProntoPago).RoundSQL(2)
|
||||
|
||||
Vinculacion()
|
||||
|
||||
Else
|
||||
LbSubTotalDif.Visible = True
|
||||
LbSubTotalDif.Text = (SubTotalCompra - SubTotalGV).FormatoNumero
|
||||
Alert("Los SubTotales de la vinculación no coinciden. Rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia,,)
|
||||
RegistraScript("CalculaTotalesOC();")
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
UpEstatus.Update()
|
||||
@@ -16866,6 +16942,13 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim Row As DataRow = Nothing
|
||||
|
||||
If Not TmpDT.Columns.Contains("PUProntoPago") Then
|
||||
TmpDT.Columns.Add("PUProntoPago", GetType(Decimal))
|
||||
End If
|
||||
If Not TmpDT.Columns.Contains("TotalProntoPago") Then
|
||||
TmpDT.Columns.Add("TotalProntoPago", GetType(Decimal))
|
||||
End If
|
||||
|
||||
Row = TmpDT.NewRow()
|
||||
Dim Retorno As Integer = 0
|
||||
Dim CveContrato As Integer = -1
|
||||
|
||||
Reference in New Issue
Block a user