Alias Flexible
This commit is contained in:
@@ -4587,9 +4587,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2">U.M.:</label>
|
<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>
|
<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>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<asp:CheckBox ID="ChkAliasFlexible" Text="Alias Flexible:" runat="server" TextAlign="Left" AutoPostBack ="true" Visible="false" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
@@ -1617,6 +1617,11 @@ Partial Class Compras_Compras
|
|||||||
DdlTipoGastoAsignar.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
DdlTipoGastoAsignar.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||||
DdlTipoGastoAsignar.DataBind()
|
DdlTipoGastoAsignar.DataBind()
|
||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
|
|
||||||
|
If UsuarioActual.CveRol = 1 Then
|
||||||
|
ChkAliasFlexible.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaGvAcarreos(tCveProveedor As Integer)
|
Private Sub CargaGvAcarreos(tCveProveedor As Integer)
|
||||||
@@ -5962,10 +5967,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TipoCambioCompra > 1 AndAlso DdlMoneda.SelectedValue.ToEntero <> 1 Then Concepto += $" TC{TipoCambioCompra} ${importeMovimiento.FormatoNumero(2)}"
|
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)}"
|
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||||
Case 14 'IVA X Acreditar
|
Case 14 'IVA X Acreditar
|
||||||
importeMovimiento = importeIVAxAcreditar
|
importeMovimiento = importeIVAxAcreditar
|
||||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
|
||||||
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||||
PorcentajeImpuesto = PorcentajeIVA
|
PorcentajeImpuesto = PorcentajeIVA
|
||||||
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0)
|
||||||
@@ -6382,30 +6383,30 @@ Partial Class Compras_Compras
|
|||||||
Else
|
Else
|
||||||
importeMovimiento = 0
|
importeMovimiento = 0
|
||||||
End If
|
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.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then
|
||||||
' If ObjConta.DtResultados.Rows.Count > 0 Then
|
' ' If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||||
' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
' ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
|
||||||
' End If
|
' ' End If
|
||||||
'End If
|
' 'End If
|
||||||
|
|
||||||
|
|
||||||
If DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then
|
' If DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then
|
||||||
|
|
||||||
If CveMoneda = 2 Then
|
' If CveMoneda = 2 Then
|
||||||
importeMN = TxtRetIVA.Text.ToDecimal * TxtTC.Text.ToDecimal
|
' importeMN = TxtRetIVA.Text.ToDecimal * TxtTC.Text.ToDecimal
|
||||||
Else
|
' Else
|
||||||
importeMN = TxtRetIVA.Text.ToDecimal
|
' importeMN = TxtRetIVA.Text.ToDecimal
|
||||||
importeMovimiento = TxtRetIVA.Text.ToDecimal
|
' importeMovimiento = TxtRetIVA.Text.ToDecimal
|
||||||
|
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Else
|
' Else
|
||||||
importeMovimiento = 0
|
' importeMovimiento = 0
|
||||||
End If
|
' End If
|
||||||
Case 6 'Compra
|
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"
|
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 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
|
Dim DiferenciaIVas As Decimal = TxtIVA.Text.ToDecimal - IVADetalles
|
||||||
|
|
||||||
|
|
||||||
@@ -8459,8 +8460,9 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
For Each dRow As DataRow In TmpDT.Rows
|
For Each dRow As DataRow In TmpDT.Rows
|
||||||
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dRow("CvePS").ToString.ToEntero).Rows.Count > 0 Then
|
Dim DttPS As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dRow("CvePS").ToString.ToEntero)
|
||||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dRow("CvePS").ToString.ToEntero).Rows(0)
|
If DttPS.Rows.Count > 0 Then
|
||||||
|
Dim DrPS As DataRow = DttPS.Rows(0)
|
||||||
dRow("AplicaIEPS") = Boolean.Parse(DrPS("AplicaIEPS").ToString)
|
dRow("AplicaIEPS") = Boolean.Parse(DrPS("AplicaIEPS").ToString)
|
||||||
dRow("IEPSGrabaIVA") = Boolean.Parse(DrPS("IEPSGrabaIVA").ToString)
|
dRow("IEPSGrabaIVA") = Boolean.Parse(DrPS("IEPSGrabaIVA").ToString)
|
||||||
Else
|
Else
|
||||||
@@ -8486,7 +8488,7 @@ Partial Class Compras_Compras
|
|||||||
IndiceContador = IndiceContador + 1
|
IndiceContador = IndiceContador + 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
IVADetalles = TmpDT.SUM("IVA", " IVA > 0 ").ToDecimal
|
IVADetalles = TmpDT.SUMD("IVA", " IVA > 0 ")
|
||||||
DiferenciaIVas = TxtIVA.Text.ToDecimal - IVADetalles
|
DiferenciaIVas = TxtIVA.Text.ToDecimal - IVADetalles
|
||||||
|
|
||||||
If Math.Abs(DiferenciaIVas) > 0.01D Then
|
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
|
TmpDT.Rows(IndiceUltimo)("IVA") = TmpDT.Rows(IndiceUltimo)("IVA").ToString.ToDecimal + DiferenciaIVas
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TmpDT.AcceptChanges()
|
TmpDT.AcceptChanges()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'Revalidacion de ajuste
|
'Revalidacion de ajuste
|
||||||
IVADetalles = TmpDT.SUM("IVA", " IVA > 0 ").ToDecimal
|
IVADetalles = TmpDT.SUMD("IVA", " IVA > 0 ")
|
||||||
DiferenciaIVas = TxtIVA.Text.ToDecimal - IVADetalles
|
DiferenciaIVas = TxtIVA.Text.ToDecimal - IVADetalles
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Math.Abs(DiferenciaIVas) > 0.01D Then
|
If Math.Abs(DiferenciaIVas) > 0.01D Then
|
||||||
Respuesta = False
|
Respuesta = False
|
||||||
If IVADetalles > 0 Then
|
If IVADetalles > 0 Then
|
||||||
@@ -8542,8 +8539,6 @@ Partial Class Compras_Compras
|
|||||||
Respuesta = True
|
Respuesta = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Respuesta Then
|
If Respuesta Then
|
||||||
|
|
||||||
Dim IEPSPSDetalles As Decimal = TmpDT.SUMD("IEPSPS", " IEPSPS > 0 ")
|
Dim IEPSPSDetalles As Decimal = TmpDT.SUMD("IEPSPS", " IEPSPS > 0 ")
|
||||||
@@ -8552,11 +8547,9 @@ Partial Class Compras_Compras
|
|||||||
Dim DTConsultaIEPSPS As New DataTable
|
Dim DTConsultaIEPSPS As New DataTable
|
||||||
DTConsultaIEPSPS = TmpDT.FiltraParametros(" AplicaIEPS = 'True'")
|
DTConsultaIEPSPS = TmpDT.FiltraParametros(" AplicaIEPS = 'True'")
|
||||||
|
|
||||||
|
|
||||||
Dim IndiceContador As Integer = 0
|
Dim IndiceContador As Integer = 0
|
||||||
Dim IndicePrimero As Integer = 0
|
Dim IndicePrimero As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
For Each dRow As DataRow In TmpDT.Rows
|
For Each dRow As DataRow In TmpDT.Rows
|
||||||
If Boolean.Parse(dRow("AplicaIEPS").ToString) Then
|
If Boolean.Parse(dRow("AplicaIEPS").ToString) Then
|
||||||
IndicePrimero = IndiceContador
|
IndicePrimero = IndiceContador
|
||||||
@@ -8590,12 +8583,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Return Respuesta
|
Return Respuesta
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
@@ -18686,8 +18673,8 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If PS.AddPSAlias(System.Web.HttpUtility.HtmlDecode(TxtPSAlias.Text.Trim), CvePS, UsuarioActual.CveUsuario) Then
|
If PS.AddPSAlias(System.Web.HttpUtility.HtmlDecode(TxtPSAlias.Text.Trim), CvePS, UsuarioActual.CveUsuario, ChkAliasFlexible.Checked) Then
|
||||||
GlobalDTProductosServiciosAlias(-1) = PS.DtResultados
|
GlobalDTProductosServiciosAlias(UsuarioActual.CveEmpresa) = PS.DtResultados
|
||||||
|
|
||||||
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CvePS") = CvePS
|
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CvePS") = CvePS
|
||||||
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("PS") = tPS
|
TmpDT.Rows(HdnAliasInd.Value.ToEntero)("PS") = tPS
|
||||||
@@ -20954,6 +20941,10 @@ Partial Class Compras_Compras
|
|||||||
UpFacturaNC.Update()
|
UpFacturaNC.Update()
|
||||||
UpMostrarTodos.Update()
|
UpMostrarTodos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ChkAliasFlexible_CheckedChanged(sender As Object, e As EventArgs) Handles ChkAliasFlexible.CheckedChanged
|
||||||
|
TxtPSAlias.Enabled = ChkAliasFlexible.Checked
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class MMensajeDevolucion
|
Public Class MMensajeDevolucion
|
||||||
|
|||||||
@@ -1403,7 +1403,7 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<asp:UpdatePanel ID="UPGVAlias" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPGVAlias" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<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>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -1411,6 +1411,12 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="699px" />
|
<ItemStyle Width="699px" />
|
||||||
</asp:TemplateField>
|
</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>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
|
<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