Alias Flexible
This commit is contained in:
@@ -4587,8 +4587,11 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-2">U.M.:</label>
|
||||
<div class="col-md-10">
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlUnidadAlias" runat="server" Class="table-group-action-input form-control input-inline input-sm" Style="width: 125px !important;" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:CheckBox ID="ChkAliasFlexible" Text="Alias Flexible:" runat="server" TextAlign="Left" AutoPostBack ="true" Visible="false" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1617,6 +1617,11 @@ Partial Class Compras_Compras
|
||||
DdlTipoGastoAsignar.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||
DdlTipoGastoAsignar.DataBind()
|
||||
UpParametros.Update()
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
ChkAliasFlexible.Visible = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGvAcarreos(tCveProveedor As Integer)
|
||||
@@ -5962,10 +5967,6 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If TipoCambioCompra > 1 AndAlso DdlMoneda.SelectedValue.ToEntero <> 1 Then Concepto += $" TC{TipoCambioCompra} ${importeMovimiento.FormatoNumero(2)}"
|
||||
@@ -6062,7 +6063,7 @@ Partial Class Compras_Compras
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
Case 14 'IVA X Acreditar
|
||||
importeMovimiento = importeIVAxAcreditar
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
PorcentajeImpuesto = PorcentajeIVA
|
||||
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||
@@ -6382,30 +6383,30 @@ Partial Class Compras_Compras
|
||||
Else
|
||||
importeMovimiento = 0
|
||||
End If
|
||||
Case 285 'Ret IVA 6% Servicios
|
||||
'Case 285 'Ret IVA 6% Servicios
|
||||
|
||||
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
|
||||
' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
|
||||
|
||||
'If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
' End If
|
||||
'End If
|
||||
' 'If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||
' ' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
' ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||
' ' End If
|
||||
' 'End If
|
||||
|
||||
|
||||
If DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then
|
||||
' If DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then
|
||||
|
||||
If CveMoneda = 2 Then
|
||||
importeMN = TxtRetIVA.Text.ToDecimal * TxtTC.Text.ToDecimal
|
||||
Else
|
||||
importeMN = TxtRetIVA.Text.ToDecimal
|
||||
importeMovimiento = TxtRetIVA.Text.ToDecimal
|
||||
' If CveMoneda = 2 Then
|
||||
' importeMN = TxtRetIVA.Text.ToDecimal * TxtTC.Text.ToDecimal
|
||||
' Else
|
||||
' importeMN = TxtRetIVA.Text.ToDecimal
|
||||
' importeMovimiento = TxtRetIVA.Text.ToDecimal
|
||||
|
||||
End If
|
||||
' End If
|
||||
|
||||
Else
|
||||
importeMovimiento = 0
|
||||
End If
|
||||
' Else
|
||||
' importeMovimiento = 0
|
||||
' End If
|
||||
Case 6 'Compra
|
||||
|
||||
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141, 152, 153, 154, 159, 160, 161, 162, 163) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
|
||||
@@ -8446,7 +8447,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
Dim IVADetalles As Decimal = TmpDT.SUM("IVA", " IVA > 0 ").ToDecimal
|
||||
Dim IVADetalles As Decimal = TmpDT.SUMD("IVA", " IVA > 0 ")
|
||||
Dim DiferenciaIVas As Decimal = TxtIVA.Text.ToDecimal - IVADetalles
|
||||
|
||||
|
||||
@@ -8459,8 +8460,9 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
For Each dRow As DataRow In TmpDT.Rows
|
||||
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dRow("CvePS").ToString.ToEntero).Rows.Count > 0 Then
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dRow("CvePS").ToString.ToEntero).Rows(0)
|
||||
Dim DttPS As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dRow("CvePS").ToString.ToEntero)
|
||||
If DttPS.Rows.Count > 0 Then
|
||||
Dim DrPS As DataRow = DttPS.Rows(0)
|
||||
dRow("AplicaIEPS") = Boolean.Parse(DrPS("AplicaIEPS").ToString)
|
||||
dRow("IEPSGrabaIVA") = Boolean.Parse(DrPS("IEPSGrabaIVA").ToString)
|
||||
Else
|
||||
@@ -8486,7 +8488,7 @@ Partial Class Compras_Compras
|
||||
IndiceContador = IndiceContador + 1
|
||||
Next
|
||||
|
||||
IVADetalles = TmpDT.SUM("IVA", " IVA > 0 ").ToDecimal
|
||||
IVADetalles = TmpDT.SUMD("IVA", " IVA > 0 ")
|
||||
DiferenciaIVas = TxtIVA.Text.ToDecimal - IVADetalles
|
||||
|
||||
If Math.Abs(DiferenciaIVas) > 0.01D Then
|
||||
@@ -8506,21 +8508,16 @@ Partial Class Compras_Compras
|
||||
TmpDT.Rows(IndiceUltimo)("IVA") = TmpDT.Rows(IndiceUltimo)("IVA").ToString.ToDecimal + DiferenciaIVas
|
||||
End If
|
||||
|
||||
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'Revalidacion de ajuste
|
||||
IVADetalles = TmpDT.SUM("IVA", " IVA > 0 ").ToDecimal
|
||||
IVADetalles = TmpDT.SUMD("IVA", " IVA > 0 ")
|
||||
DiferenciaIVas = TxtIVA.Text.ToDecimal - IVADetalles
|
||||
|
||||
|
||||
|
||||
If Math.Abs(DiferenciaIVas) > 0.01D Then
|
||||
Respuesta = False
|
||||
If IVADetalles > 0 Then
|
||||
@@ -8542,8 +8539,6 @@ Partial Class Compras_Compras
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Respuesta Then
|
||||
|
||||
Dim IEPSPSDetalles As Decimal = TmpDT.SUMD("IEPSPS", " IEPSPS > 0 ")
|
||||
@@ -8552,11 +8547,9 @@ Partial Class Compras_Compras
|
||||
Dim DTConsultaIEPSPS As New DataTable
|
||||
DTConsultaIEPSPS = TmpDT.FiltraParametros(" AplicaIEPS = 'True'")
|
||||
|
||||
|
||||
Dim IndiceContador As Integer = 0
|
||||
Dim IndicePrimero As Integer = 0
|
||||
|
||||
|
||||
For Each dRow As DataRow In TmpDT.Rows
|
||||
If Boolean.Parse(dRow("AplicaIEPS").ToString) Then
|
||||
IndicePrimero = IndiceContador
|
||||
@@ -8590,12 +8583,6 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
@@ -18686,8 +18673,8 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
|
||||
If PS.AddPSAlias(System.Web.HttpUtility.HtmlDecode(TxtPSAlias.Text.Trim), CvePS, UsuarioActual.CveUsuario) Then
|
||||
GlobalDTProductosServiciosAlias(-1) = PS.DtResultados
|
||||
If PS.AddPSAlias(System.Web.HttpUtility.HtmlDecode(TxtPSAlias.Text.Trim), CvePS, UsuarioActual.CveUsuario, ChkAliasFlexible.Checked) Then
|
||||
GlobalDTProductosServiciosAlias(UsuarioActual.CveEmpresa) = PS.DtResultados
|
||||
|
||||
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CvePS") = CvePS
|
||||
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("PS") = tPS
|
||||
@@ -20954,6 +20941,10 @@ Partial Class Compras_Compras
|
||||
UpFacturaNC.Update()
|
||||
UpMostrarTodos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub ChkAliasFlexible_CheckedChanged(sender As Object, e As EventArgs) Handles ChkAliasFlexible.CheckedChanged
|
||||
TxtPSAlias.Enabled = ChkAliasFlexible.Checked
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Public Class MMensajeDevolucion
|
||||
|
||||
@@ -1403,7 +1403,7 @@
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UPGVAlias" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GVAlias" runat="server" ShowHeader="True" AutoGenerateColumns="False" EmptyDataText="No se encontraron Alias del Producto o Servicio." CellPadding="1" CellSpacing="1" RowStyle-VerticalAlign="Middle" RowStyle-HorizontalAlign="Center" DataKeyNames="CvePS,PSAlias" CssClass="table table-striped table-advance table-hover" Style="text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GVAlias" runat="server" ShowHeader="True" AutoGenerateColumns="False" EmptyDataText="No se encontraron Alias del Producto o Servicio." CellPadding="1" CellSpacing="1" RowStyle-VerticalAlign="Middle" DataKeyNames="CvePS,PSAlias" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
@@ -1411,6 +1411,12 @@
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="699px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="Flex" runat="server" Text='<%#If(Eval("Flexible").ToString = "True", "Si", "No") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="50px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
|
||||
|
||||
Reference in New Issue
Block a user