ajustes de contratos
This commit is contained in:
@@ -5359,8 +5359,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 +5414,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 +5422,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>
|
||||
|
||||
@@ -8588,7 +8588,7 @@ 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
|
||||
@@ -9759,7 +9759,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
|
||||
@@ -20793,7 +20793,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
|
||||
@@ -20839,28 +20839,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
|
||||
@@ -20869,24 +20871,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
|
||||
|
||||
@@ -20896,7 +20897,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