--FERRETERA.
crear la impresión de etiquetas de productos y precios, campo nuevo. en PS (producto de exhibición)
This commit is contained in:
@@ -413,7 +413,7 @@ Public Class ClsProductosServicios
|
||||
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
|
||||
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
|
||||
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0,
|
||||
Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0, Optional CodigoAlterno As String = "-1", Optional PSAlterno As String = "-1") As Integer
|
||||
Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0, Optional CodigoAlterno As String = "-1", Optional PSAlterno As String = "-1", Optional ProductoExhibicion As Boolean = False) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_ProductosServiciosAdd")
|
||||
@@ -521,7 +521,7 @@ Public Class ClsProductosServicios
|
||||
|
||||
.Add("@CodigoAlterno", SqlDbType.VarChar).Value = CodigoAlterno
|
||||
.Add("@PSAlterno", SqlDbType.VarChar).Value = PSAlterno
|
||||
|
||||
.Add("@ProductoExhibicion", SqlDbType.Bit).Value = ProductoExhibicion
|
||||
|
||||
End With
|
||||
|
||||
@@ -658,7 +658,7 @@ Public Class ClsProductosServicios
|
||||
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
|
||||
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
|
||||
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0,
|
||||
Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0, Optional CodigoAlterno As String = "-1", Optional PSAlterno As String = "-1") As Boolean
|
||||
Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0, Optional CodigoAlterno As String = "-1", Optional PSAlterno As String = "-1", Optional ProductoExhibicion As Boolean = False) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -765,6 +765,7 @@ Public Class ClsProductosServicios
|
||||
.Add("@EcommerceCantidad", SqlDbType.SmallMoney).Value = EcommerceCantidad
|
||||
.Add("@CodigoAlterno", SqlDbType.VarChar).Value = CodigoAlterno
|
||||
.Add("@PSAlterno", SqlDbType.VarChar).Value = PSAlterno
|
||||
.Add("@ProductoExhibicion", SqlDbType.Bit).Value = ProductoExhibicion
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -2332,6 +2333,25 @@ Public Class ClsProductosServicios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetPSPrecios(CvePrecioLista As Integer, Productos As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ProductosPreciosGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
|
||||
.Add("@Productos", SqlDbType.VarChar).Value = Productos
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los precios de los productos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
#Region " P S C O M P L E M E N T O S"
|
||||
|
||||
|
||||
@@ -1301,13 +1301,20 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
|
||||
'IMPRIME VALE
|
||||
'IMPRIME ACUSE
|
||||
If UrlParametros("OP").ToString = "CAN" Then
|
||||
If UrlParametros("CVEVTA") IsNot Nothing AndAlso UrlParametros("CVEVTA").ToString.ToEntero > 0 Then
|
||||
ImprimeCancelacion(UrlParametros("CVEVTA").ToString.ToEntero)
|
||||
End If
|
||||
End If
|
||||
|
||||
'IMPRIME ETIQUETA
|
||||
If UrlParametros("OP").ToString = "ETIQUETA" Then
|
||||
If UrlParametros("PRODUCTOS") IsNot Nothing AndAlso UrlParametros("CVEPRECIOLISTA").ToString.ToEntero > 0 Then
|
||||
ImprimeEtiqueta(UrlParametros("PRODUCTOS").ToString, UrlParametros("CVEPRECIOLISTA").ToString.ToEntero)
|
||||
End If
|
||||
End If
|
||||
|
||||
'IMPRIME AFR
|
||||
If UrlParametros("OP").ToString = "AFR" Then
|
||||
If UrlParametros("CVEAFR") IsNot Nothing AndAlso UrlParametros("CVEAFR").ToString.ToEntero > 0 Then
|
||||
@@ -6020,6 +6027,25 @@ Partial Class PopUpVerFactura
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "OP = 'E T I Q U E T A'"
|
||||
Public Sub ImprimeEtiqueta(CvesProductos As String, CvePrecioLista As Integer)
|
||||
Dim DtPrecios As DataTable = Nothing
|
||||
|
||||
Dim ObjVentas As New ClsProductosServicios
|
||||
If ObjVentas.GetPSPrecios(CvePrecioLista, CvesProductos) AndAlso ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
DtPrecios = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If DtPrecios IsNot Nothing Then
|
||||
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt"
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
ImprimirPDFStimul(DirectorioArchivo, DtPrecios, params, "Precios")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "IMPRESION POLIZAS"
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
<input type="text" id="TxtBuscar" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscar','{0}')", GVPrecios.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscar','{0}')", GVPrecios.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVPrecios" runat="server" GridLines="None" DataKeyNames="CvePS, CvePrecioLista,PrecioLista,PS,Codigo,NumeroParte,Porcentaje,CodigoPS"
|
||||
<asp:GridView ID="GVPrecios" runat="server" GridLines="None" DataKeyNames="CvePS, CvePrecioLista,PrecioLista,PS,Codigo,NumeroParte,Porcentaje,CodigoPS,ProductoExhibicion"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False" data-sort="true" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%">
|
||||
|
||||
@@ -296,34 +296,49 @@ Partial Class Ventas_ActualizarPrecios
|
||||
Alert("Se debe de especificar un porcentaje.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
Dim Correcto As Boolean = False
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
'Dim Importe As Decimal = If(TxtImporte.Text = "", -1, TxtImporte.Text.ToDecimal)
|
||||
Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
|
||||
|
||||
Dim MensajeAlert As New StringBuilder
|
||||
Dim sbProductos As New StringBuilder
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
ObjPS.IniciaTransacSQL()
|
||||
|
||||
For Each row As GridViewRow In GVPrecios.Rows
|
||||
|
||||
If row.FCCheckBox("chkPS").Checked Then
|
||||
Correcto = ObjPS.UpdatePSPreciosLista(row.FCTextBox("TxtPrecio").Text.ToDecimal, DdlPrecioLista.SelectedValue.ToEntero, Porcentaje, row.DataKey("CvePS").ToEntero, UsuarioActual.CveUsuario, NowADS(), If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal)
|
||||
|
||||
If Correcto Then
|
||||
TieneError = ActualizarPreciosFranquicia(ObjPS, row.DataKey("Codigo"), row.DataKey("PS"), row.FCTextBox("TxtPrecio").Text.ToDecimal, row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal, DdlPrecioLista.SelectedItem.Text)
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If Correcto AndAlso Not TieneError Then
|
||||
Alert("Los Precios de lista de los Productos/Servicios se actualizaron correctamente")
|
||||
End If
|
||||
Try
|
||||
For Each row As GridViewRow In GVPrecios.Rows
|
||||
If row.FCCheckBox("chkPS").Checked Then
|
||||
TieneError = Not ObjPS.UpdatePSPreciosLista(row.FCTextBox("TxtPrecio").Text.ToDecimal, DdlPrecioLista.SelectedValue.ToEntero, Porcentaje, row.DataKey("CvePS").ToEntero, UsuarioActual.CveUsuario, NowADS(), If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal)
|
||||
If CBool(row.DataKey("ProductoExhibicion")) Then
|
||||
sbProductos.AppendFormat("{0},", row.DataKey("CvePS").ToEntero)
|
||||
End If
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
TieneError = ActualizarPreciosFranquicia(ObjPS, row.DataKey("Codigo"), row.DataKey("PS"), row.FCTextBox("TxtPrecio").Text.ToDecimal, row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal, DdlPrecioLista.SelectedItem.Text)
|
||||
Else
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not TieneError Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso sbProductos.Length > 0 Then
|
||||
MensajeAlert.AppendFormat("Los precios de lista de los productos/servicios se actualizaron correctamente. <br/> <b><a target='_blank' class='Texto' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar Etiquetas</a></b>", Encripta(String.Format("OP=ETIQUETA&CVEPRECIOLISTA={0}&PRODUCTOS={1}", DdlPrecioLista.SelectedValue.ToEntero, sbProductos.ToString())))
|
||||
Else
|
||||
MensajeAlert.Append("Los precios de lista de los productos/servicios se actualizaron correctamente.")
|
||||
End If
|
||||
|
||||
Alert(MensajeAlert.ToString())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
GuardaLog(ex.ToString())
|
||||
End Try
|
||||
|
||||
If TieneError Then
|
||||
ObjPS.RollBack()
|
||||
Alert("Ocurrió un error al actualizar precios", TipoMensaje.MsgError)
|
||||
Else
|
||||
ObjPS.Commit()
|
||||
End If
|
||||
|
||||
@@ -246,6 +246,10 @@
|
||||
<label>Aplica para Venta:</label>
|
||||
<asp:CheckBox ID="ChkAplicaParaVenta" CssClass="make-switchsd" data-size="small" runat="server" Checked="True" />
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivPSExhibicion" runat="server" visible="false">
|
||||
<label>Producto de exhibición:</label>
|
||||
<asp:CheckBox ID="ChkPSExhibicion" CssClass="make-switchsd" data-size="small" runat="server" Checked="True" />
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-3">
|
||||
<asp:TextBox ID="TxtVentaMinima" CssClass="form-control " runat="server"></asp:TextBox>
|
||||
<%--<ajax:FilteredTextBoxExtender ID="FTBETVentaMinima" TargetControlID="TxtVentaMinima" FilterType="Numbers" runat="server" ValidChars=".," />--%>
|
||||
|
||||
@@ -1113,6 +1113,11 @@ Partial Class ProductosyServicios
|
||||
DVCodigoPSAlterno.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
DivPSExhibicion.Visible = True
|
||||
ChkPSExhibicion.Checked = CBool(ObjProductosServicios.DtResultados.Rows(0)("ProductoExhibicion").ToString)
|
||||
End If
|
||||
Else
|
||||
Alert("El Producto o Servicio Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("$('#C_Tab_TabPaquetes_tab').css('display' , 'none')")
|
||||
@@ -1509,7 +1514,7 @@ Partial Class ProductosyServicios
|
||||
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
|
||||
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked,
|
||||
NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim.Replace(".", ""), EcommercePrecio:=TxtEcommercePrecio.Text.Trim.ToDecimal,
|
||||
CveClasificacionEcommerce:=DdlEcommerceClasificacion.SelectedValue.ToEntero, EcommerceCantidad:=TxtEcommerceCantidad.Text.Trim.ToDecimal, CodigoAlterno:=TxtCodigoAlterno.Text.Trim, PSAlterno:=TxtPSAlterno.Text.Trim) > 0 Then
|
||||
CveClasificacionEcommerce:=DdlEcommerceClasificacion.SelectedValue.ToEntero, EcommerceCantidad:=TxtEcommerceCantidad.Text.Trim.ToDecimal, CodigoAlterno:=TxtCodigoAlterno.Text.Trim, PSAlterno:=TxtPSAlterno.Text.Trim, ProductoExhibicion:=ChkPSExhibicion.Checked) > 0 Then
|
||||
ViewState("CvePS") = ObjProductosServicios.CvePS
|
||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||
@@ -1583,7 +1588,7 @@ Partial Class ProductosyServicios
|
||||
RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked,
|
||||
NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim.Replace(".", ""), ActivoEcommerce:=ChkActivoEcommerce.Checked,
|
||||
EcommercePrecio:=TxtEcommercePrecio.Text.Trim.ToDecimal, CveClasificacionEcommerce:=DdlEcommerceClasificacion.SelectedValue.ToEntero, EcommerceCantidad:=TxtEcommerceCantidad.Text.Trim.ToDecimal,
|
||||
CodigoAlterno:=TxtCodigoAlterno.Text.Trim, PSAlterno:=TxtPSAlterno.Text.Trim) Then
|
||||
CodigoAlterno:=TxtCodigoAlterno.Text.Trim, PSAlterno:=TxtPSAlterno.Text.Trim, ProductoExhibicion:=ChkPSExhibicion.Checked) Then
|
||||
|
||||
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
|
||||
TieneError = True
|
||||
|
||||
Reference in New Issue
Block a user