funcionaldiad de franquicias, mejoras
This commit is contained in:
@@ -46,8 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<label id="LblMarca" runat="server" visible="false" class="col-md-1 v-center truncate">Marca:</label>
|
<label id="LblMarca" runat="server" visible="false" class="col-md-1 v-center truncate">Marca:</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<asp:ListBox ID="DdlMarca" runat="server" DataTextField="Marca" DataValueField="CveMarca" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 50%; height: 50px !important;">
|
<asp:ListBox ID="DdlMarca" visible="false" runat="server" DataTextField="Marca" DataValueField="CveMarca" data-text="Todos" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 50%; height: 50px !important;">
|
||||||
<asp:ListItem Text="Todas" Value="-1"></asp:ListItem>
|
|
||||||
</asp:ListBox>
|
</asp:ListBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If Correcto Then
|
If Correcto AndAlso Not TieneError Then
|
||||||
Alert("Los Precios de lista de los Productos/Servicios se actualizaron correctamente")
|
Alert("Los Precios de lista de los Productos/Servicios se actualizaron correctamente")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -531,9 +531,13 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
|
|
||||||
Private Function ActualizarPreciosFranquicia(ObjPS As ClsProductosServicios, Codigo As String, PS As String, Precio As Decimal, PrecioMinimo As Decimal, PrecioLista As String) As Boolean
|
Private Function ActualizarPreciosFranquicia(ObjPS As ClsProductosServicios, Codigo As String, PS As String, Precio As Decimal, PrecioMinimo As Decimal, PrecioLista As String) As Boolean
|
||||||
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(563)
|
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(563)
|
||||||
|
Dim StrMsg As New StringBuilder
|
||||||
|
Dim StrMsgError As New StringBuilder
|
||||||
|
If FranquiciasStr <> "" Then
|
||||||
|
|
||||||
Dim Franquicias = FranquiciasStr.Split(","c)
|
Dim Franquicias = FranquiciasStr.Split(","c)
|
||||||
Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
|
Dim Porcentaje As Decimal = If(TxtPorcentaje.Text = "", -1, TxtPorcentaje.Text.ToDecimal)
|
||||||
Dim StrMsg As New StringBuilder
|
|
||||||
For Each Franquicia In Franquicias
|
For Each Franquicia In Franquicias
|
||||||
Dim CveFranquicia As Integer = Franquicia.ToEntero
|
Dim CveFranquicia As Integer = Franquicia.ToEntero
|
||||||
Dim CvePS As Integer = GlobalDTPS(CveFranquicia, Codigo:=Codigo).FiltroPrimeroValor("CvePS", "").ToEntero
|
Dim CvePS As Integer = GlobalDTPS(CveFranquicia, Codigo:=Codigo).FiltroPrimeroValor("CvePS", "").ToEntero
|
||||||
@@ -541,19 +545,24 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
|
|
||||||
If CvePS <= 0 Then
|
If CvePS <= 0 Then
|
||||||
Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
|
Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
|
||||||
StrMsg.AppendFormat("El producto '{0}' no se encuentra en la Franquicia '{1}'", PS, EmpresaFranquicia)
|
StrMsg.AppendFormat("El producto '{0}' no se encuentra en la Franquicia '{1}' <br/>", PS, EmpresaFranquicia)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
If CvePrecioLisa <= 0 Then
|
'If CvePrecioLisa <= 0 Then
|
||||||
Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
|
' Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
|
||||||
StrMsg.AppendFormat("El precio lista '{0}' no existe en la Franquicia '{1}'", DdlPrecioLista.SelectedItem.Text, EmpresaFranquicia)
|
' StrMsg.AppendFormat("El precio lista '{0}' no existe en la Franquicia '{1}'<br/>", DdlPrecioLista.SelectedItem.Text, EmpresaFranquicia)
|
||||||
End If
|
'End If
|
||||||
If CvePrecioLisa > 0 AndAlso CvePS > 0 AndAlso Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLisa, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=PrecioMinimo) Then
|
If CvePrecioLisa > 0 AndAlso CvePS > 0 AndAlso Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLisa, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=PrecioMinimo) Then
|
||||||
StrMsg.AppendFormat("No se pudo actualizar el producto")
|
StrMsgError.AppendFormat("No se pudo actualizar el producto")
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If StrMsg.ToString = "" Then
|
End If
|
||||||
|
|
||||||
|
If StrMsgError.ToString = "" Then
|
||||||
|
If StrMsg.ToString <> "" Then
|
||||||
|
Alert(StrMsg.ToString, TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
Return False
|
Return False
|
||||||
Else
|
Else
|
||||||
Return True
|
Return True
|
||||||
|
|||||||
Reference in New Issue
Block a user