Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -99,6 +99,20 @@ Partial Class OS_OrdenesServicios
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CvePedido As Integer
|
||||
Get
|
||||
If ViewState("CvePedido") Is Nothing Then
|
||||
ViewState("CvePedido") = -1
|
||||
End If
|
||||
|
||||
Return ViewState("CvePedido").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePedido") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property CveOsDetalle As Integer
|
||||
Get
|
||||
@@ -641,6 +655,10 @@ Partial Class OS_OrdenesServicios
|
||||
CveTecnico = ObjOS.CveUsuarioAtendio
|
||||
CargarEstatusDelUsuario(TipoEstatus)
|
||||
CveVenta = ObjOS.CveVenta
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
CvePedido = ObjOS.CveCotizacion
|
||||
End If
|
||||
|
||||
|
||||
'Dim validacionTieneEstatus As Integer = EstatusOSDelUsuario.FiltraParametros(String.Format("CveEstatusOrdenServicio = {0}", ObjOS.CveEstatusOrdenServicio)).Rows.Count
|
||||
|
||||
@@ -2972,7 +2990,7 @@ Partial Class OS_OrdenesServicios
|
||||
End Select
|
||||
|
||||
Dim ObjOS As New ClsOS
|
||||
If ObjOS.GetOrdenesServicioDevolucionMaterial(CveOS, CveVenta, Opcion, UsuarioActual.CveEmpresa) Then
|
||||
If ObjOS.GetOrdenesServicioDevolucionMaterial(CveOS, If(UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1, CvePedido, CveVenta), Opcion, UsuarioActual.CveEmpresa) Then
|
||||
DTSolicitudDev = ObjOS.DtResultados
|
||||
GvMU.DataSource = DTSolicitudDev
|
||||
GvMU.Columns(3).Visible = DTSolicitudDev.MIN("Serie") <> ""
|
||||
@@ -3093,7 +3111,7 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
Next
|
||||
If AplicaDevolucion Then
|
||||
If Not ObjV.UpdateVentasDevolucionAlmacen(1, CveVenta) Then
|
||||
If Not ObjV.UpdateVentasDevolucionAlmacen(1, CveVentaPedido) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
@@ -3213,6 +3231,16 @@ Partial Class OS_OrdenesServicios
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
If ProcesoOK Then
|
||||
|
||||
If Not ObjOS.UpdateVentaOS(Respuesta.CveVenta, CveOS) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -3249,7 +3277,7 @@ Partial Class OS_OrdenesServicios
|
||||
Dim CveSubProyectoPedido As Integer = -1
|
||||
Dim CveMoneda As Integer = -1
|
||||
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
If ObjVentas.GetVenta(CvePedido, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Copy().Rows(0)
|
||||
CveMoneda = DbRowVenta("CveMoneda").ToString.ToEntero
|
||||
CveSubProyectoPedido = DbRowVenta("CveSubProyecto").ToString().ToEntero()
|
||||
|
||||
@@ -21749,19 +21749,24 @@ Partial Class Ventas
|
||||
Moneda = 1
|
||||
End If
|
||||
|
||||
Dim FechaParaSurtir As DateTime = MinFecha
|
||||
If TxtFechaOS.Text.Replace(",", "").ToDateTime() > MinFecha Then
|
||||
FechaParaSurtir = TxtFechaOS.Text.Replace(",", "").ToDateTime()
|
||||
End If
|
||||
|
||||
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
|
||||
UsuarioActual.CveEmpresa, CveVenta,
|
||||
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
|
||||
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, FechaParaSurtir:=TxtFechaOS.Text.Replace(",", "").ToDateTime()) Then
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, FechaParaSurtir:=FechaParaSurtir) 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
|
||||
If DdlMedico.SelectedValue.ToEntero() > 0 AndAlso TxtFechaOS.Text.Replace(",", "").ToDateTime() > MinFecha Then
|
||||
If Not ObjVentas.UpdateFechaOSVenta(CveVenta, FechaParaSurtir, UsuarioActual.CveEmpresa) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
@@ -33618,15 +33623,20 @@ Partial Class Ventas
|
||||
'DdlMedicoObservaciones.Enabled = True
|
||||
'DdlProcedimientoObservaciones.Enabled = True
|
||||
|
||||
Dim FechaParaSurtir As DateTime = MinFecha
|
||||
If TxtFechaOS.Text.Replace(",", "").ToDateTime() > MinFecha Then
|
||||
FechaParaSurtir = TxtFechaOS.Text.Replace(",", "").ToDateTime()
|
||||
End If
|
||||
|
||||
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, FechaParaSurtir:=TxtFechaOS.Text.Replace(",", "").ToDateTime()) Then
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, FechaParaSurtir:=FechaParaSurtir) 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
|
||||
If DdlMedico.SelectedValue.ToEntero() > 0 AndAlso FechaParaSurtir > MinFecha Then
|
||||
If Not ObjVentas.UpdateFechaOSVenta(CveVenta, FechaParaSurtir, UsuarioActual.CveEmpresa) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user