diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index b983ac43d..a1ac30b08 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -852,14 +852,15 @@ Public Class ClsOS Return Retorno End Function - Public Function GetDetalleMateriales(CveOSDetalle As Integer, CveOS As Integer, Optional FiltraTipoAlamacen As Boolean = False) As Boolean + Public Function GetDetalleMateriales(CveOSDetalle As Integer, CveOS As Integer, Opcion As Integer, Optional FiltraTipoAlmacen As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OS_OrdenesServicioDetallesMaterialesGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveOSDetalle", SqlDbType.Int).Value = CveOSDetalle .Add("@CveOS", SqlDbType.Int).Value = CveOS - .Add("@FiltraTipoAlamacen", SqlDbType.Bit).Value = FiltraTipoAlamacen + .Add("@FiltraTipoAlmacen", SqlDbType.Bit).Value = FiltraTipoAlmacen + .Add("@Opcion", SqlDbType.Int).Value = Opcion End With Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 60bf8c37c..4415487d8 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5727,6 +5727,11 @@ Public Class ClsPaginas params.Add(New ReportParameter("ClientePais", If(Vta.Cliente.Pais.Length > 0, Vta.Cliente.Pais, ""))) params.Add(New ReportParameter("ClienteContacto", Vta.AtencionA)) End If + + If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then + params.Add(New ReportParameter("UsaProductoAlterno", If(Vta.Cliente.UsaProductoAlterno, "1", "0"))) + End If + 'PARAMETROS SEGUN TIPO DOCUMENTO Select Case Vta.TipoDocto Case "Ing" diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index d922e528d..0543bb1c9 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -7954,6 +7954,7 @@ Namespace Modelos Public Property CorreoCotizacion As String Public Property ImprimeNombreSucursal As Integer Public Property CobranzaCorreo As String + Public Property UsaProductoAlterno As Boolean = False End Class diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index c996c2303..35e084999 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -2980,7 +2980,7 @@ Partial Class PopUpVerFactura Vta.Cliente.MailCotizacion = dtVentas(0)("SucClienteCorreo").ToString Vta.Cliente.CodigoRegimenFiscal = dtVentas(0)("CodigoRegimenFiscal").ToString Vta.Cliente.RegimenFiscal = dtVentas(0)("RegimenFiscal").ToString - + Vta.Cliente.UsaProductoAlterno = CBool(dtVentas(0)("UsaProductoAlterno")) Vta.RefDocto = dtVentas(0)("Ref").ToString Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero diff --git a/OS/OrdenesServicios.aspx b/OS/OrdenesServicios.aspx index 1bb42a407..dde2b56c3 100644 --- a/OS/OrdenesServicios.aspx +++ b/OS/OrdenesServicios.aspx @@ -1304,22 +1304,22 @@ Lote - + Serie - + Fecha Cad. - -
+ + <%--
@@ -1330,7 +1330,7 @@ -
+
--%>
diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index b1fe50d71..08b091a33 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -838,11 +838,14 @@ Partial Class OS_OrdenesServicios Dim ObjMateriales As New ClsOS If ObjMateriales.GetDetalleMateriales(CveOsDetalle, CveOS, -1) Then + For Each RowE As DataRow In ObjMateriales.DtResultados.Rows Dim Row As DataRow = Nothing Row = TmpDTMaterialesDetalle.NewRow() + + Row("CveConsecutivo") = Consecutivo Row("CveConsecutivoDetalle") = CveConsecutivoDetalle Row("CveOSDetalle") = CveOsDetalle @@ -3041,12 +3044,6 @@ Partial Class OS_OrdenesServicios End Sub - - - - - - Protected Sub LnkAccionesDevolucion_Click(sender As Object, e As EventArgs) LnkModalSolicitarDevolucion.Visible = True @@ -3054,15 +3051,22 @@ Partial Class OS_OrdenesServicios GvSolicitarDevolucion.DataSource = Nothing DTSolicitudDev = New DataTable + GvSolicitarDevolucion.Columns(3).Visible = False 'Lote + GvSolicitarDevolucion.Columns(4).Visible = False 'Serie + GvSolicitarDevolucion.Columns(5).Visible = False 'Fecha Caducidad + Dim ObjOS As New ClsOS - - If ObjOS.GetOrdenesServicioDevolucionMaterial(CveOS, CveVenta, UsuarioActual.CveEmpresa) Then DTSolicitudDev = ObjOS.DtResultados GvSolicitarDevolucion.DataSource = DTSolicitudDev End If + GvSolicitarDevolucion.Columns(3).Visible = DTSolicitudDev.MAX("Lote").ToString.Trim().Length > 0 + GvSolicitarDevolucion.Columns(4).Visible = DTSolicitudDev.MAX("Serie").ToString.Trim().Length > 0 + GvSolicitarDevolucion.Columns(5).Visible = DTSolicitudDev.MAX("FechaCaducidad").ToString.Trim().Length > 0 + + ObjOS.Dispose() GvSolicitarDevolucion.DataBind() @@ -3086,24 +3090,24 @@ Partial Class OS_OrdenesServicios e.Row.FCTextBox("TxtDev").Attributes.Add("onblur", String.Format("ValidarCantidad(this, {0})", e.Row.DataKey("Cantidad"))) 'AplicaSerie, AplicaLote, AplicaCaducidad - If Boolean.Parse(e.Row.DataKey("AplicaSerie")) Then - e.Row.FCTextBox("TxtSerie").Visible = True - End If + 'If Boolean.Parse(e.Row.DataKey("AplicaSerie")) Then + ' e.Row.FCTextBox("TxtSerie").Visible = True + 'End If - If Boolean.Parse(e.Row.DataKey("AplicaLote")) Then - e.Row.FCTextBox("TxtLote").Visible = True - End If + 'If Boolean.Parse(e.Row.DataKey("AplicaLote")) Then + ' e.Row.FCTextBox("TxtLote").Visible = True + 'End If - If Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then + 'If Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then - e.Row.FCHtmlGenericControl("DVFechaCaducidad").Visible = True - 'e.Row.FCTextBox("TxtFechaCaducidad").Visible = True - 'e.Row.FCMaskedEditExtender("METxtFechaCaducidad").Visible = True - 'e.Row.FCCalendarExtender("CCTxtFechaCaducidad").Visible = True - 'e.Row.FCCompareValidator("CVTxtFechaCaducidad").Visible = True - 'e.Row.FCValidatorCalloutExtender("VCTxtFechaCaducidad").Visible = True + ' e.Row.FCHtmlGenericControl("DVFechaCaducidad").Visible = True + ' 'e.Row.FCTextBox("TxtFechaCaducidad").Visible = True + ' 'e.Row.FCMaskedEditExtender("METxtFechaCaducidad").Visible = True + ' 'e.Row.FCCalendarExtender("CCTxtFechaCaducidad").Visible = True + ' 'e.Row.FCCompareValidator("CVTxtFechaCaducidad").Visible = True + ' 'e.Row.FCValidatorCalloutExtender("VCTxtFechaCaducidad").Visible = True - End If + 'End If @@ -3220,9 +3224,9 @@ Partial Class OS_OrdenesServicios Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero Dim CveMovimientoDetalle As Integer = GvRow.DataKey("CveMovimientoDetalle").ToEntero - Dim Lote As String = GvRow.FCTextBox("TxtLote").Text.Trim - Dim Serie As String = GvRow.FCTextBox("TxtSerie").Text.Trim - Dim FechaCaducidad As DateTime = GvRow.FCTextBox("TxtFechaCaducidad").Text.ToDate + Dim Lote As String = GvRow.DataKey("Lote") + Dim Serie As String = GvRow.DataKey("Serie") + Dim FechaCaducidad As DateTime = GvRow.DataKey("FechaCaducidad").ToDate diff --git a/OS/RepOSMedicas.aspx b/OS/RepOSMedicas.aspx index 515216683..a1c88c61a 100644 --- a/OS/RepOSMedicas.aspx +++ b/OS/RepOSMedicas.aspx @@ -168,8 +168,8 @@ <%--0--%> <%----%> - <%--1--%> - + <%--1--%> + <%--2--%> <%--3--%> diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 4880672b7..d4b0fd8d3 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -8471,13 +8471,9 @@
Productos utilizados en el procedimiento - + - - - - @@ -8486,22 +8482,24 @@ + + + + + + + - <%-- - - --%> - - - - - - + + + + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index e1eff45d0..e418969b4 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -4483,7 +4483,7 @@ Partial Class Ventas End If For Each Row As DataRow In DtDetalle.Rows - If OS.GetDetalleMateriales(Row("CveOSDetalle").ToString().ToEntero(), CveOS) Then + If OS.GetDetalleMateriales(Row("CveOSDetalle").ToString().ToEntero(), CveOS, -1) Then If OS.DtResultados.FiltraParametros("SeFacturara = 1").Rows.Count > 0 Then Alert("Hay materiales en la Orden de Servicio, ¿Desea facturar los materiales?", TipoMensaje.MsgConfirmacion, "BtnMateriales()") End If @@ -8075,6 +8075,7 @@ Partial Class Ventas e.Row.FCTextBox("TxtPrecio").Enabled = False End If + 'PERMISO EDITAR REM If e.Row.DBCampo("TipoDocto") = "Rem" And ModalidadEdicion Then 'LO PERMITIDO MODIFICAR @@ -21640,7 +21641,7 @@ Partial Class Ventas DtDetalle = TmpDT.Copy For Each Row As DataRow In DtDetalle.Rows - If OS.GetDetalleMateriales(Row("CveOSDetalle").ToString().ToEntero(), CveOS) Then + If OS.GetDetalleMateriales(Row("CveOSDetalle").ToString().ToEntero(), CveOS, -1) Then Dim Cons As Integer = TmpDT.Rows.Count + 1 For Each dr As DataRow In OS.DtResultados.FiltraParametros("SeFacturara = 1 ").Rows @@ -36068,21 +36069,23 @@ Partial Class Ventas DdlMedico.SelectedValueExist(DdlMedicoModal.SelectedValue) DdlProcedimiento.SelectedValueExist(DdlProcedimientoModal.SelectedValue) - 'si es A - Vista o ,Fuera De Linea requiere tecnico - If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 2) Then + 'si es pago directo es factura + If RBLTipoVenta.SelectedValue.Contiene("2") Then + DdlTipoComprobante.SelectedValueExist("Ing") + TdRequiereTecnico1.Visible = True + TdRequiereTecnico2.Visible = True + Else TdFechaOS1.Visible = True TdFechaOS2.Visible = True ChkRequiereTecnico.Checked = True ChkRequiereTecnico.Enabled = False DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped")) DdlTipoComprobante.SelectedValueExist("Ped") - Else - DdlTipoComprobante.SelectedValueExist("Ing") + End If DdlTipoComprobante.Enabled = False - TdRequiereTecnico1.Visible = True - TdRequiereTecnico2.Visible = True + CargaCliente(CveCliente) @@ -36101,7 +36104,7 @@ Partial Class Ventas Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString - Dim PU As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal + Dim PU As Decimal = GvRow.DataKey("Precio").ToDecimal Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero @@ -36128,6 +36131,14 @@ Partial Class Ventas End Sub + Protected Sub GvProductosProcedimiento_RowDataBound(sender As Object, e As GridViewRowEventArgs) + If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.DataKey("Precio").ToDecimal = 0 Then + e.Row.FCTextBox("TxtCantidad").Enabled = False + End If + End If + End Sub + Protected Sub ChkRequiereTecnicoModal_CheckedChanged(sender As Object, e As EventArgs) DvModalRequiereOSFecha.Visible = ChkRequiereTecnicoModal.Checked @@ -36259,5 +36270,7 @@ Partial Class Ventas CargarSaldoAuxiliar(CveCliente) End Sub + + End Class