SMS- Cambios 2024.01.16
--visualizar FechaCirugía (FechaParaSurtir) --si es pedido editar fecha de cirugía, al igual de médico/proced. --si es Remsión editar fecha de cirugía --al Generar OS ,vincular la nueva CveVenta en campo CveCotización de OS. --Al cancelar un "pedido/remisión" si tiene vinculada una OS, cancelarla también, cambiarle el estatus
This commit is contained in:
@@ -2448,8 +2448,6 @@ Partial Class Ventas
|
||||
CveAlmacenDevolucion = 0
|
||||
Me.CveEstadoCancelacion = 0
|
||||
|
||||
TxtFechaOS.Text = NowADS().ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
|
||||
txtFechaICot.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||
TxtFechaIRem.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||
TxtFechaIPed.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||
@@ -2831,6 +2829,8 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
Else
|
||||
TxtFechaOS.Text = NowADS().ToDateTime.ToString("yyyy-MM-dd HH:mm").Replace(" ", "T")
|
||||
|
||||
If Request("CveOS") IsNot Nothing AndAlso IsNumeric(Request("CveOS")) AndAlso Request("CveOS").ToEntero() > 0 Then
|
||||
ViewState("CveOS") = Request("CveOS")
|
||||
CargaOS(CveOS)
|
||||
@@ -5869,21 +5869,28 @@ Partial Class Ventas
|
||||
|
||||
CveTipoVenta = If(DbRowVenta("CveTipoVenta").ToString.ToEntero > 0, DbRowVenta("CveTipoVenta").ToString.ToEntero, -1)
|
||||
|
||||
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso CveTipoVenta.Contiene(1, 3, 5) Then
|
||||
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso CveTipoVenta.Contiene(1, 2, 3, 5) Then
|
||||
TrVentasMedicas1.Visible = True
|
||||
DdlMedico.SelectedValueExist(DbRowVenta("CveMedico").ToString)
|
||||
DdlProcedimiento.SelectedValueExist(DbRowVenta("CveProcedimiento").ToString)
|
||||
|
||||
|
||||
DdlMedico.Enabled = False
|
||||
DdlProcedimiento.Enabled = False
|
||||
|
||||
If DbRowVenta("FechaParaSurtir").ToString().ToDate() > DateTime.MinValue Then
|
||||
TrVentasMedicas2.Visible = True
|
||||
ChkRequiereTecnico.Enabled = False
|
||||
TxtFechaOS.Enabled = False
|
||||
|
||||
TxtFechaOS.Text = DbRowVenta("FechaParaSurtir").ToString().ToDateTime().ToString("yyyy-MM-dd HH:mm").Replace(" ", "T")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
Return Retorno
|
||||
End Function
|
||||
@@ -21676,6 +21683,12 @@ Partial Class Ventas
|
||||
DdlMetodoPago33.Enabled = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
If DdlMedico.SelectedValue.ToEntero() > 0 Then
|
||||
TxtFechaOS.Enabled = True
|
||||
End If
|
||||
End If
|
||||
|
||||
UPPVentas.Update()
|
||||
UpPS.Update()
|
||||
UpCliente.Update()
|
||||
@@ -21775,10 +21788,18 @@ Partial Class Ventas
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), TipoDocto:=DdlTipoComprobante.SelectedValue, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDecimal, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(),
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero) Then
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, FechaParaSurtir:=TxtFechaOS.Text.Replace(",", "").ToDateTime()) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If Not OcurrioError Then
|
||||
If DdlMedico.SelectedValue.ToEntero() > 0 Then
|
||||
If Not ObjVentas.UpdateFechaOSVenta(CveVenta, TxtFechaOS.Text.Replace(",", "").ToDateTime(), UsuarioActual.CveEmpresa) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Cargo de nueva cuenta el detalle de Ventas (Conceptos)
|
||||
If Not OcurrioError Then
|
||||
Dim index As Integer = 0
|
||||
@@ -33603,6 +33624,12 @@ Partial Class Ventas
|
||||
|
||||
TxtDescripcionVenta.Enabled = True
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
If DdlMedico.SelectedValue.ToEntero() > 0 Then
|
||||
TxtFechaOS.Enabled = True
|
||||
End If
|
||||
End If
|
||||
|
||||
UpCliente.Update()
|
||||
UpParametros.Update()
|
||||
UPObservaciones.Update()
|
||||
@@ -33626,10 +33653,18 @@ Partial Class Ventas
|
||||
|
||||
If Not ObjVentas.UpdateObservacionesVenta(Me.CveVenta, UsuarioActual.CveEmpresa, DdlVendedor.SelectedValue.ToEntero(), TxtObsFact.Text, RblPaqueteria.SelectedValue.ToEntero(), TxtCorreoNotificaciones.Text,
|
||||
TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero, DescripcionVenta:=TxtDescripcionVenta.Text.Trim,
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero) Then
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, FechaParaSurtir:=TxtFechaOS.Text.Replace(",", "").ToDateTime()) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
If DdlMedico.SelectedValue.ToEntero() > 0 Then
|
||||
If Not ObjVentas.UpdateFechaOSVenta(CveVenta, TxtFechaOS.Text.Replace(",", "").ToDateTime(), UsuarioActual.CveEmpresa) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError AndAlso AplicaUpdateTC Then
|
||||
If Not ObjVentas.UpdateVentaTC(Me.CveVenta, UsuarioActual.CveEmpresa, TxtTipoCambio.Text.ToDecimal()) Then
|
||||
TieneError = True
|
||||
@@ -36373,7 +36408,7 @@ Partial Class Ventas
|
||||
Dim EstatusOrdenServicio As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 1").ToEntero
|
||||
|
||||
If ObjOrdenServicio.AddOrdenesServicios(CveCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFechaOS.Text.Replace(",", "").ToDateTime, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", UsuarioActual.CveUsuario, EstatusOrdenServicio,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveOSTipo, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVentaOS, -1, -1, CveOSTipo, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||
Direccion:="", Telefono:="", CveModeloAuto:=-1, Año:="", CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime) Then
|
||||
CveOSVentaMedica = ObjOrdenServicio.CveOS
|
||||
|
||||
Reference in New Issue
Block a user