diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 5839b9a96..cf9ba7c1b 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -576,7 +576,7 @@ Public Class ClsVentas Optional AtencionA As String = "", Optional PedidoContrato As String = "", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Decimal = -1, Optional RetISR As Decimal = -1, Optional Kilometraje As Decimal = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False, Optional CveVendedor As Integer = -1, - Optional RequiereOS As Boolean = False, Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1) As Boolean + Optional RequiereOS As Boolean = False, Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional FechaParaSurtir As DateTime = MinFecha) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasUpdate") @@ -612,6 +612,7 @@ Public Class ClsVentas .Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS .Add("@CveMedico", SqlDbType.Int).Value = CveMedico .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento + .Add("@FechaParaSurtir", SqlDbType.DateTime).Value = FechaParaSurtir End With Try @@ -625,7 +626,8 @@ Public Class ClsVentas End Function Public Function UpdateObservacionesVenta(CveVenta As Integer, CveEmpresa As Integer, CveVendedor As Integer, Observaciones As String, FormaPaqueteria As Integer, CorreoNotificaciones As String, ObservacionesAlm As String, - Pedido As String, OrdenCompra As String, FechaPago As String, CveUsoCFDI As Integer, Optional DescripcionVenta As String = "-1", Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1) As Boolean + Pedido As String, OrdenCompra As String, FechaPago As String, CveUsoCFDI As Integer, Optional DescripcionVenta As String = "-1", Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, + Optional FechaParaSurtir As DateTime = MinFecha) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasObservacionesUpdate") With SqlAdapter.SelectCommand.Parameters @@ -643,8 +645,42 @@ Public Class ClsVentas .Add("@DescripcionVenta", SqlDbType.VarChar).Value = DescripcionVenta .Add("@CveMedico", SqlDbType.Int).Value = CveMedico .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento + .Add("@FechaParaSurtir", SqlDbType.DateTime).Value = FechaParaSurtir + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar las observaciones de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + Public Function UpdateEstatusOCRelacionada(CveVenta As Integer, CveEstatusOrdenServicio As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_VentasOSEstatusUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@CveEstatusOrdenServicio", SqlDbType.Int).Value = CveEstatusOrdenServicio + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar las observaciones de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + + Public Function UpdateFechaOSVenta(CveVenta As Integer, FechaCita As DateTime, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_VentasOSFechaCitaUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@FechaCita", SqlDbType.DateTime).Value = FechaCita + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index df92c7193..ebd40bcc6 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -6221,6 +6221,17 @@ Namespace Modelos End If End If + 'CANCELAR ORDEN DE SERVICIO + If Not ErrorCancelar Then + If ObjFactura.CveMedico > 0 Then + Dim CveEstatusCancelacion As Integer = ClsPaginas.GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 5", "Orden ASC").ToString().ToEntero() + If Not ObjVentas.UpdateEstatusOCRelacionada(ObjFactura.CveVenta, CveEstatusCancelacion, ObjFactura.CveEmpresa) Then + ErrorCancelar = True + MensajeError = "Ocurrió un error al cancelar la orden de servicio" + End If + End If + End If + End If 'MARCA LA VENTA PARA REALIZAR LA DEVOLUCION POSTERIORMENTE diff --git a/Empresas/186/Formatos/Traslado.rdlc b/Empresas/186/Formatos/Traslado.rdlc index 7a9a096a5..1f5390b8a 100644 --- a/Empresas/186/Formatos/Traslado.rdlc +++ b/Empresas/186/Formatos/Traslado.rdlc @@ -724,7 +724,7 @@ 8.06981in - 4.8037cm + 5.67302cm true true @@ -824,7 +824,7 @@ CIUDAD DE MEXICO - =Microsoft.VisualBasic.Interaction.iif(Parameters!CveConcepto.Value = 8, "AVISO", "ENTRADA") & " DE TRASLADO " + =Microsoft.VisualBasic.Interaction.iif(Parameters!CveConcepto.Value = 8, "PRE-REMISIÓN", "ENTRADA DE TRASLADO") @@ -982,7 +982,7 @@ CIUDAD DE MEXICO Textbox12 - 2.21518cm + 2.85018cm 16.09549cm 0.44478cm 4.32987cm @@ -1187,7 +1187,7 @@ CIUDAD DE MEXICO true - 2.70907cm + 3.66157cm 2.01145cm 20.32792cm 8 @@ -1229,6 +1229,39 @@ CIUDAD DE MEXICO 2pt + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + +