Correciones Promociones, Compras IEPS en producto
This commit is contained in:
@@ -2221,8 +2221,9 @@ Partial Class Compras_Compras
|
||||
ChkIEPS.Visible = True
|
||||
ChkIEPS.Checked = True
|
||||
DdlConceptoIEPS.Visible = True
|
||||
CargaProductos(DdlConceptoIEPS, If(UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero > 0, UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero, -1))
|
||||
CargaProductos(DdlConceptoIEPS, If(UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero > 0, UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero, -1), If(IVATemp > 0, False, True))
|
||||
LbImporte.Text = "$" + TrasladoIEPS.ToString
|
||||
|
||||
End If
|
||||
If OtrosImpuestos > 0 Then
|
||||
ChkOtrosI.Visible = True
|
||||
@@ -18140,7 +18141,7 @@ Partial Class Compras_Compras
|
||||
#End Region
|
||||
|
||||
#Region "DEDUCCIONES IEPS / OTROS IMPUESTOS"
|
||||
Protected Sub CargaProductos(Ddl As DropDownList, CvePS As Integer)
|
||||
Protected Sub CargaProductos(Ddl As DropDownList, CvePS As Integer, Optional OpIncluirIEPSEnProducto As Boolean = False)
|
||||
Ddl.DataSource = TmpDT
|
||||
Ddl.DataBind()
|
||||
Ddl.Items.Insert(0, New ListItem("Seleccione un concepto", "-1"))
|
||||
@@ -18150,6 +18151,10 @@ Partial Class Compras_Compras
|
||||
Ddl.Items.Insert(1, New ListItem(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimeroValor("PS"), CvePS.ToString))
|
||||
End If
|
||||
|
||||
If OpIncluirIEPSEnProducto Then
|
||||
Ddl.Items.Add(New ListItem("Incluir en Producto", "-2"))
|
||||
End If
|
||||
|
||||
'Ddl.Items.Insert(1, New ListItem(Concepto, "-1"))
|
||||
End Sub
|
||||
|
||||
@@ -18166,16 +18171,35 @@ Partial Class Compras_Compras
|
||||
If IEPSGasto Then
|
||||
Dim CvePS As Integer = DdlConceptoIEPS.SelectedValue.ToEntero
|
||||
' If CvePS = -1 Then CvePS = UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero
|
||||
AgregarConceptoIEPS(TrasladoIEPS, CvePS)
|
||||
|
||||
If CvePS = -2 Then 'opción Incluir en producto
|
||||
|
||||
For Each Dr As DataRow In TmpDT.Rows
|
||||
Dr("PU") = ((Dr("IEPSPS").ToString.ToDecimal / Dr("Cantidad").ToString.ToDecimal) + Dr("Pu").ToString.ToDecimal).RoundSQL(6)
|
||||
Dr("IEPSPS") = 0
|
||||
Dr("IEPSPSPorcentaje") = 0
|
||||
Dr("Total") = (Dr("PU").ToString.ToDecimal * Dr("Cantidad").ToString.ToDecimal - Dr("Descuento").ToString.ToDecimal)
|
||||
Next
|
||||
|
||||
CalculaTotales(True)
|
||||
|
||||
Else
|
||||
AgregarConceptoIEPS(TrasladoIEPS, CvePS)
|
||||
|
||||
For Each Dr As DataRow In TmpDT.Rows
|
||||
Dr("IEPSPS") = 0
|
||||
Dr("IEPSPSPorcentaje") = 0
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
|
||||
TrasladoIEPS = 0
|
||||
TxtIEPS.Text = 0.ToString.FormatoNumero
|
||||
TrIEPS.Visible = False
|
||||
For Each Dr As DataRow In TmpDT.Rows
|
||||
Dr("IEPSPS") = 0
|
||||
Dr("IEPSPSPorcentaje") = 0
|
||||
Next
|
||||
TmpDT.AcceptChanges()
|
||||
|
||||
|
||||
End If
|
||||
'AGREGA OTROS IMPUESTOS COMO CONCEPTO
|
||||
If OtrosImpuestosGasto Then
|
||||
@@ -18195,7 +18219,6 @@ Partial Class Compras_Compras
|
||||
Alert("Debe seleccionar al menos un impuesto", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
MostrarOcultarColumnaIEPS()
|
||||
AddPS2()
|
||||
End Sub
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<asp:LinkButton ID="ImgAddFolio" runat="server" Visible="True" OnClick="BtnGenerarAPartir_Click"> Generar a partir de</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgrgarPlantillaPS" runat="server" Visible="True" OnClick="LnkAgrgarPlantillaPS_Click"> Agregar Productos desde platilla</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkAgrgarPlantillaPS" runat="server" Visible="True" OnClick="LnkAgrgarPlantillaPS_Click"> Agregar Productos desde plantilla</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -451,24 +451,23 @@
|
||||
<button type="button" class="close" data-dismiss="modal" style="top: 3px !important; margin-top: 6px !important;"></button>
|
||||
<h4 class="modal-title" style="color: #FFF; text-align: center;">Agregar Producto/Servicio Plantilla</h4>
|
||||
</div>
|
||||
<div class="modal-body rowpadding">
|
||||
<div class="modal-body rowpadding">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align:right">
|
||||
<asp:LinkButton runat="server" ID="LnkDecargaPlatilla" OnClick="LnkDecargaPlatilla_Click"><i class="fa fa-arrow-down" aria-hidden="true"></i> Descarga Plantilla</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-11" style="margin-left: 30px; margin-right: 30px; margin-bottom: 50px;">
|
||||
<div class="col-md-11" style="margin-left: 30px; margin-right: 30px;">
|
||||
<asp:TextBox ID="TxtExcel" CssClass="ADSdropzone hidden" Text="" data-maxFile="1" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" data-dismiss="modal" class="btn btn-">Cerrar</button>
|
||||
<asp:Button Text="Agregar" CssClass="btn btn-primary" ID="BrnAgregarPlantilla" OnClick="BrnAgregarPlantilla_Click" runat="server" />
|
||||
<div class="row">
|
||||
<div class="col-lg-12" style="text-align:center!important">
|
||||
<asp:LinkButton runat="server" ID="LnkDecargaPlatilla" OnClick="LnkDecargaPlatilla_Click" CssClass="btn btn-warning"><i class="fa fa-arrow-down" aria-hidden="true"></i> Formato</asp:LinkButton>
|
||||
<button type="button" data-dismiss="modal" class="btn btn-">Cerrar</button>
|
||||
<asp:Button Text="Agregar" CssClass="btn btn-primary" ID="BrnAgregarPlantilla" OnClick="BrnAgregarPlantilla_Click" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1114,7 +1114,7 @@ Partial Class Ventas_Promociones
|
||||
Dim CveClasificacion As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{ClasificacionStr}'").ToString().ToEntero()
|
||||
Dim CvePS As Integer = DTPS.FiltroPrimeroValor("CvePS", $"Codigo = '{CodigoStr}'").ToString().ToEntero()
|
||||
Dim CodigoPS As String = DTPS.FiltroPrimeroValor("PSCodigo", $"Codigo = '{CodigoStr}'").ToString()
|
||||
Dim CveTipoPromosicion As Integer = -1
|
||||
Dim CveTipoPromocion As Integer = -1
|
||||
Dim Promocion As Decimal = PromocionStr.ToDecimal
|
||||
Dim CantidadMinima As Decimal = CantidadMinimaStr.ToDecimal
|
||||
Dim CveRin As Integer = DTRines.FiltroPrimeroValor("CveRinTamaño", $"Codigo = '{RinStr}'").ToString().ToEntero()
|
||||
@@ -1127,37 +1127,37 @@ Partial Class Ventas_Promociones
|
||||
Else
|
||||
|
||||
If ClasificacionStr.Length > 0 Then
|
||||
SBErrorRegistro.Append(If(CveClasificacion > 0, "", $"No se encontro Clasificación {ClasificacionStr}. "))
|
||||
SBErrorRegistro.Append(If(CveClasificacion > 0, "", $"No se encontro Clasificación '{ClasificacionStr}'. "))
|
||||
Else
|
||||
SBErrorRegistro.Append(If(CvePS > 0, "", $"No se encontro codigo de Producto/Servicio {CodigoStr }. "))
|
||||
SBErrorRegistro.Append(If(CvePS > 0, "", $"No se encontro código de Producto/Servicio '{CodigoStr }'. "))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If TipoPromocionStr.ToUpper = "IMPORTE $" Then
|
||||
CveTipoPromosicion = 1
|
||||
CveTipoPromocion = 1
|
||||
ElseIf TipoPromocionStr.ToUpper = "DESCUENTO %" Then
|
||||
CveTipoPromosicion = 2
|
||||
CveTipoPromocion = 2
|
||||
ElseIf TipoPromocionStr.ToUpper = "CANTIDAD" Then
|
||||
CveTipoPromosicion = 3
|
||||
CveTipoPromocion = 3
|
||||
Else
|
||||
SBErrorRegistro.Append($"Tipo Promosion no encontrada {TipoPromocionStr}. ")
|
||||
SBErrorRegistro.Append($"Tipo Promoción no encontrada '{TipoPromocionStr}'. ")
|
||||
End If
|
||||
|
||||
If Not Promocion > 0 Then
|
||||
SBErrorRegistro.Append($"La Promoción debe de ser mayor a 0. ")
|
||||
End If
|
||||
|
||||
If Not CantidadMinima > 0 Then
|
||||
If CantidadMinimaStr.Length > 0 And Not CantidadMinima > 0 Then
|
||||
SBErrorRegistro.Append($"La Cantidad Minima debe de ser mayor a 0. ")
|
||||
End If
|
||||
|
||||
If RinStr.Length > 0 And Not CveRin > 0 Then
|
||||
SBErrorRegistro.Append($"Tamaño de Rin no encontrado {RinStr}. ")
|
||||
SBErrorRegistro.Append($"Tamaño de Rin no encontrado '{RinStr}'. ")
|
||||
End If
|
||||
|
||||
If Not IncluyeImpuestosStr.ToUpper.Contiene("´SÍ", "SI", "1", "NO", "0") Then
|
||||
SBErrorRegistro.Append($"Campo IncluyeImpuestos no valido {IncluyeImpuestos}.<br/> ")
|
||||
SBErrorRegistro.Append($"Campo IncluyeImpuestos no válido '{IncluyeImpuestosStr}'.<br/> ")
|
||||
End If
|
||||
|
||||
If SBErrorRegistro.ToString.Length > 0 Then
|
||||
@@ -1165,7 +1165,7 @@ Partial Class Ventas_Promociones
|
||||
Else
|
||||
dRow("CveClasificacion") = CveClasificacion
|
||||
dRow("CvePS") = CvePS
|
||||
dRow("CveTipoPromosicion") = CveTipoPromosicion
|
||||
dRow("CveTipoPromosicion") = CveTipoPromocion
|
||||
dRow("Promocion") = Promocion
|
||||
dRow("CantidadMinima") = CantidadMinima
|
||||
dRow("RinTamaño") = RinTamaño
|
||||
@@ -1174,9 +1174,8 @@ Partial Class Ventas_Promociones
|
||||
dRow("CodigoPS") = If(CveClasificacion > 0, "Todos", CodigoPS)
|
||||
End If
|
||||
|
||||
RegistroActual = RegistroActual + 1
|
||||
|
||||
End If
|
||||
RegistroActual = RegistroActual + 1
|
||||
|
||||
Next
|
||||
|
||||
|
||||
Reference in New Issue
Block a user