Puntos GDiaz:
--verificar el permiso para visualizar la columna del costo en cotizaciones con proceso
This commit is contained in:
@@ -1131,6 +1131,7 @@
|
||||
<th></th>
|
||||
<th runat="server" visible="false" id="nomostrar2"></th>
|
||||
<th runat="server" visible="false" id="thProntoPago2"></th>
|
||||
<th runat="server" visible="false" id="thCosto2"></th>
|
||||
</tr>
|
||||
<tr class="TextTab" runat="server" id="TrEdit">
|
||||
<th>
|
||||
@@ -1254,9 +1255,10 @@
|
||||
<%--<th style="text-align: center;">
|
||||
<asp:LinkButton ID="LbVerInventario" ClientIDMode="Static" runat="server" CssClass="btn btn-circle btn-sm purple" Text="<i class='icon-magnifier'></i>"></asp:LinkButton>
|
||||
</th>--%>
|
||||
<th runat="server" id="thOrden"></th>
|
||||
<th runat="server" visible="false" id="nomostrar"></th>
|
||||
<th runat="server" visible="false" id="thProntoPago"></th>
|
||||
|
||||
<th runat="server" visible="false" id="thCosto"></th>
|
||||
</tr>
|
||||
</table>
|
||||
<%--</asp:Panel>--%>
|
||||
@@ -1519,6 +1521,8 @@
|
||||
</asp:TemplateField>
|
||||
<%--22--%>
|
||||
<asp:BoundField DataField="TieneProntoPago" HeaderText="Pronto Pago" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center" ReadOnly="true" Visible="false" />
|
||||
<%--23--%>
|
||||
<asp:BoundField DataField="Costo" HeaderText="Costo" DataFormatString="{0:0.######}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" ReadOnly="true" Visible="false" />
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
|
||||
@@ -2805,6 +2805,9 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("NumeroPedimento", GetType(String))
|
||||
TmpDT.Columns.Add("CodigoAlterno", GetType(String))
|
||||
TmpDT.Columns.Add("PSAlterno", GetType(String))
|
||||
TmpDT.Columns.Add("Costo", GetType(Decimal))
|
||||
TmpDT.Columns("Costo").DefaultValue = 0D
|
||||
|
||||
GvPS.DataSource = ObjVentas.DtResultados
|
||||
GvPS.DataBind()
|
||||
|
||||
@@ -2823,6 +2826,9 @@ Partial Class Ventas
|
||||
If ObjCGame.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveManifiesto").ToEntero()) Then
|
||||
GvPS.DataSource = ObjCGame.DtResultados
|
||||
TmpDT = ObjCGame.DtResultados
|
||||
TmpDT.Columns.Add("Costo", GetType(Decimal))
|
||||
TmpDT.Columns("Costo").DefaultValue = 0D
|
||||
|
||||
GvPS.DataBind()
|
||||
End If
|
||||
|
||||
@@ -2866,6 +2872,8 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("NumeroPedimento", GetType(String))
|
||||
TmpDT.Columns.Add("CodigoAlterno", GetType(String))
|
||||
TmpDT.Columns.Add("PSAlterno", GetType(String))
|
||||
TmpDT.Columns.Add("Costo", GetType(Decimal))
|
||||
TmpDT.Columns("Costo").DefaultValue = 0D
|
||||
GvPS.DataSource = ObjVentas.DtResultados
|
||||
GvPS.DataBind()
|
||||
|
||||
@@ -4922,6 +4930,9 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
|
||||
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
|
||||
|
||||
TmpDT.Columns.Add("Costo", GetType(Decimal))
|
||||
TmpDT.Columns("Costo").DefaultValue = 0D
|
||||
End If
|
||||
|
||||
CargaAFVenta()
|
||||
@@ -5844,6 +5855,7 @@ Partial Class Ventas
|
||||
'Ocultamos los botones Clonar y Ordenar
|
||||
GvPS.Columns(19).Visible = False
|
||||
GvPS.Columns(20).Visible = False
|
||||
thOrden.Visible = False
|
||||
|
||||
GvFirmas.DataSource = DTmpF
|
||||
GvFirmas.DataBind()
|
||||
@@ -19709,11 +19721,23 @@ Partial Class Ventas
|
||||
NumTurnos = TxtNumTurnos.Text.ToDecimal()
|
||||
End If
|
||||
|
||||
'SI TIENE PERMISO PARA VER COSTO, QUE LO AGREGUE AL TMPDT
|
||||
Dim Costo As Decimal = 0
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.TienePermisoProceso(385) Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
Costo = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||
If Costo <= 0 Then Costo = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
End If
|
||||
|
||||
AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero(), DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero(), DdlClasificacion.SelectedItem.Text,
|
||||
CvePS, "", TxtObsPS.Text.TrimEnd, PU, ObjDescuento.ImporteDescuento,
|
||||
DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text,
|
||||
Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle,
|
||||
ImporteProntoPago:=ObjDescuento.ImporteProntoPago, ObjDescuento:=ObjDescuento, CvePrecioLista:=CvePrecioListaPS, PrecioLista:=PrecioListaPS, NumTurnos:=NumTurnos)
|
||||
ImporteProntoPago:=ObjDescuento.ImporteProntoPago, ObjDescuento:=ObjDescuento, CvePrecioLista:=CvePrecioListaPS, PrecioLista:=PrecioListaPS, NumTurnos:=NumTurnos, Costo:=Costo)
|
||||
|
||||
CalculaUsados()
|
||||
|
||||
@@ -19865,7 +19889,8 @@ Partial Class Ventas
|
||||
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "",
|
||||
Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False,
|
||||
Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "",
|
||||
Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Decimal = 0D, Optional CantidadConversion As Decimal = 0) As Boolean
|
||||
Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Decimal = 0D, Optional CantidadConversion As Decimal = 0,
|
||||
Optional Costo As Decimal = 0) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
Try
|
||||
@@ -20122,6 +20147,7 @@ Partial Class Ventas
|
||||
Row("AFValorInicial") = AFValorInicial
|
||||
|
||||
Row("NumTurnos") = NumTurnos
|
||||
Row("Costo") = Costo
|
||||
|
||||
Row("CodigoAlterno") = DrPS("CodigoAlterno")
|
||||
Row("PSAlterno") = DrPS("PSAlterno")
|
||||
@@ -20388,6 +20414,9 @@ Partial Class Ventas
|
||||
TmpDT.Columns("CantidadConversion").DefaultValue = 0
|
||||
|
||||
TmpDT.Columns.Add("TotalConImpuestos", GetType(Decimal))
|
||||
|
||||
TmpDT.Columns.Add("Costo", GetType(Decimal))
|
||||
TmpDT.Columns("Costo").DefaultValue = 0D
|
||||
End Sub
|
||||
Private Sub CreaDTmpC()
|
||||
DTmpC = New DataTable
|
||||
@@ -21337,6 +21366,16 @@ Partial Class Ventas
|
||||
HlAgregarExcel.Visible = True
|
||||
End If
|
||||
|
||||
If (CveVenta <= 0 OrElse EsCreaApartirDe) AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
GvPS.Columns(23).Visible = True
|
||||
thCosto.Visible = True
|
||||
thCosto2.Visible = True
|
||||
Else
|
||||
GvPS.Columns(23).Visible = False
|
||||
thCosto.Visible = False
|
||||
thCosto2.Visible = False
|
||||
End If
|
||||
UpPS.Update()
|
||||
UpCargaExceles.Update()
|
||||
|
||||
UpFacturar.Update()
|
||||
@@ -27077,6 +27116,7 @@ Partial Class Ventas
|
||||
GvPS.Columns(17).Visible = False
|
||||
GvPS.Columns(19).Visible = False
|
||||
GvPS.Columns(20).Visible = False
|
||||
thOrden.Visible = False
|
||||
|
||||
DdlVendedor.SelectedValue = DbRowVenta("CveVendedor").ToString()
|
||||
DdlTipoComprobante.Enabled = False
|
||||
@@ -30952,6 +30992,8 @@ Partial Class Ventas
|
||||
'TmpDT.Columns.Add("CveActivoFijo", GetType(Integer))
|
||||
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
|
||||
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
|
||||
TmpDT.Columns.Add("Costo", GetType(Decimal))
|
||||
TmpDT.Columns("Costo").DefaultValue = 0D
|
||||
End If
|
||||
Dim FechaFactura As DateTime = NowADS()
|
||||
|
||||
@@ -31594,6 +31636,8 @@ Partial Class Ventas
|
||||
GvPS.Columns(18).Visible = False
|
||||
GvPS.Columns(19).Visible = False
|
||||
GvPS.Columns(20).Visible = False
|
||||
thOrden.Visible = False
|
||||
|
||||
DivRemisionesFacturadas.Visible = False
|
||||
DivAnticiposVinculados.Visible = False
|
||||
|
||||
@@ -36398,6 +36442,8 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
||||
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
|
||||
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
|
||||
TmpDT.Columns.Add("Costo", GetType(Decimal))
|
||||
TmpDT.Columns("Costo").DefaultValue = 0D
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
@@ -36562,6 +36608,8 @@ Partial Class Ventas
|
||||
TmpDT.Columns("NumTurnos").DefaultValue = 0D
|
||||
TmpDT.Columns.Add("NumeroPedimento", GetType(String))
|
||||
TmpDT.Columns.Add("TotalConImpuestos", GetType(Decimal))
|
||||
TmpDT.Columns.Add("Costo", GetType(Decimal))
|
||||
TmpDT.Columns("Costo").DefaultValue = 0D
|
||||
|
||||
Return TmpDT
|
||||
End Function
|
||||
|
||||
Reference in New Issue
Block a user