SMS - 2024.01.08 Enviar Cvemedico y CveProcedimiento al facturar remision
This commit is contained in:
@@ -13189,6 +13189,23 @@ Partial Class Ventas
|
|||||||
Dim DescripcionVenta As String = ""
|
Dim DescripcionVenta As String = ""
|
||||||
If TxtDescripcionVenta.Text <> "" Then DescripcionVenta = TxtDescripcionVenta.Text
|
If TxtDescripcionVenta.Text <> "" Then DescripcionVenta = TxtDescripcionVenta.Text
|
||||||
|
|
||||||
|
|
||||||
|
Dim CveMedico As Integer = -1
|
||||||
|
Dim CveProcedimiento As Integer = -1
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
|
If SeEstaFActurandoVentaMedica Then
|
||||||
|
CveMedico = DdlMedicoObservaciones.SelectedValue.ToEntero
|
||||||
|
CveProcedimiento = DdlProcedimientoObservaciones.SelectedValue.ToEntero
|
||||||
|
Else
|
||||||
|
CveMedico = DdlMedico.SelectedValue.ToEntero
|
||||||
|
CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
||||||
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
|
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
|
||||||
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
||||||
@@ -13206,7 +13223,7 @@ Partial Class Ventas
|
|||||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
|
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
|
||||||
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
|
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
|
||||||
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta,
|
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta,
|
||||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, RequiereOS:=ChkRequiereTecnico.Checked) Then
|
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, RequiereOS:=ChkRequiereTecnico.Checked) Then
|
||||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
Else
|
Else
|
||||||
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
|
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
|
||||||
@@ -32179,6 +32196,8 @@ Partial Class Ventas
|
|||||||
End Function
|
End Function
|
||||||
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
|
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If DdlVendedor.SelectedValue.ToEntero() <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDoctoNuevo = "Ing" Then
|
If DdlVendedor.SelectedValue.ToEntero() <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDoctoNuevo = "Ing" Then
|
||||||
Alert("Debe seleccionar un vendedor.", TipoMensaje.MsgAdvertencia)
|
Alert("Debe seleccionar un vendedor.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -32212,6 +32231,9 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso TipoDoctoNuevo = "Ing" Then
|
||||||
|
SeEstaFActurandoVentaMedica = True
|
||||||
|
End If
|
||||||
|
|
||||||
If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 And RBLPago.SelectedValue.ToEntero() = 2 Then
|
If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 And RBLPago.SelectedValue.ToEntero() = 2 Then
|
||||||
Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia)
|
Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -33655,6 +33677,11 @@ Partial Class Ventas
|
|||||||
DdlUsoCFDI.Enabled = True
|
DdlUsoCFDI.Enabled = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||||
|
DdlMedicoObservaciones.Enabled = True
|
||||||
|
DdlProcedimientoObservaciones.Enabled = True
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(289) Then
|
If UsuarioActual.TienePermisoProceso(289) Then
|
||||||
If LblSeTimbro.Text = "No" Then
|
If LblSeTimbro.Text = "No" Then
|
||||||
DdlUsoCFDI.Enabled = False
|
DdlUsoCFDI.Enabled = False
|
||||||
@@ -33693,8 +33720,12 @@ Partial Class Ventas
|
|||||||
Dim ObjVentas As New ClsVentas()
|
Dim ObjVentas As New ClsVentas()
|
||||||
ObjVentas.IniciaTransacSQL()
|
ObjVentas.IniciaTransacSQL()
|
||||||
|
|
||||||
|
DdlMedicoObservaciones.Enabled = True
|
||||||
|
DdlProcedimientoObservaciones.Enabled = True
|
||||||
|
|
||||||
If Not ObjVentas.UpdateObservacionesVenta(Me.CveVenta, UsuarioActual.CveEmpresa, DdlVendedor.SelectedValue.ToEntero(), TxtObsFact.Text, RblPaqueteria.SelectedValue.ToEntero(), TxtCorreoNotificaciones.Text,
|
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) Then
|
TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero, DescripcionVenta:=TxtDescripcionVenta.Text.Trim,
|
||||||
|
CveMedico:=DdlMedicoObservaciones.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimientoObservaciones.SelectedValue.ToEntero) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -35030,6 +35061,20 @@ Partial Class Ventas
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Property SeEstaFActurandoVentaMedica As Boolean
|
||||||
|
Get
|
||||||
|
If ViewState("SeEstaFActurandoVentaMedica") Is Nothing Then
|
||||||
|
ViewState("SeEstaFActurandoVentaMedica") = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Boolean.Parse(ViewState("SeEstaFActurandoVentaMedica").ToString)
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("SeEstaFActurandoVentaMedica") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user