OS sms Remision vinculada a movimiento alamcen se agregan parametros a remision CveMedico, CveProcedimiento y CveTipoVenta, EmpresasModulos.aspx filtra
This commit is contained in:
@@ -2153,7 +2153,8 @@ Namespace Modelos
|
||||
PedidoContrato:=factura.PedidoContrato, ObservacionesAlmacen:=factura.ObservacionesAlmacen, CveSubProyecto:=factura.CveSubProyecto, CveSubProyectoCobranza:=factura.CveSubProyectoCobranza, CveSubProyectoEjecucion:=factura.CveSubProyectoEjecucion, CveFormaPago33:=factura.CveFormaPago33,
|
||||
CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=factura.OrdenCompra, CveCuentaTerminal:=factura.CveCuentaTerminal, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal,
|
||||
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor, EsGarantia:=factura.EsGarantia, DescripcionVenta:=factura.DescripcionVenta) Then
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor, EsGarantia:=factura.EsGarantia, DescripcionVenta:=factura.DescripcionVenta,
|
||||
CveMedico:=factura.CveMedico, CveProcedimiento:=factura.CveProcedimiento, CveTipoVenta:=factura.CveTipoVenta) Then
|
||||
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
|
||||
@@ -7669,6 +7670,9 @@ Namespace Modelos
|
||||
Public Property CveContratoSecciones As String = ""
|
||||
Public Property CveEstatus As Integer
|
||||
Public Property GenerarPDFFactura As Boolean = False
|
||||
Public Property CveMedico As Integer = -1
|
||||
Public Property CveProcedimiento As Integer = -1
|
||||
Public Property CveTipoVenta As Integer = -1
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1278,7 +1278,7 @@
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvMaterialUtilizado" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado Historial"
|
||||
DataKeyNames="CveVentaDetalle,Cantidad,CveAlmacenActual,CvePS,CveUM,PU,CveMovimientoDetalle,Lote,Serie,FechaCaducidad,CodigoPS"
|
||||
DataKeyNames="CveVentaDetalle,Cantidad,CveAlmacenActual,CvePS,CveUM,PU,CveMovimientoDetalle,Lote,Serie,FechaCaducidad,AplicaSerie,AplicaLote,AplicaCaducidad,CodigoPS,Descuento,Observaciones"
|
||||
CssClass="table table-striped table-advance table-hover Widthall" GridLines="None" OnRowDataBound="GvMaterialUtilizado_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
|
||||
@@ -3166,11 +3166,19 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
|
||||
Dim Respuesta As New RespuestaFacturacion()
|
||||
Dim DtVentaDetalle As New DataTable
|
||||
|
||||
If ProcesoOK Then
|
||||
|
||||
Respuesta = GeneraRemision(CveVentaPedido, ObjV.IniciaTransacSQL())
|
||||
If Not Respuesta.CveVenta > 0 Then
|
||||
|
||||
If Respuesta.CveVenta > 0 Then
|
||||
If ObjV.GetVentaDetalle(Respuesta.CveVenta) Then
|
||||
Dim dtClon As DataTable = ObjV.DtResultados.Copy
|
||||
dtClon.DefaultView.Sort = "CveVentaDetalle ASC"
|
||||
DtVentaDetalle = dtClon.DefaultView.ToTable()
|
||||
End If
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
@@ -3185,6 +3193,7 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
|
||||
Dim IndexMov1 As Integer = 0
|
||||
For Each GvRow As GridViewRow In GvMaterialUtilizado.Rows
|
||||
|
||||
Dim Cantidad As Decimal = GvRow.DataKey("Cantidad").ToDecimal
|
||||
@@ -3192,7 +3201,7 @@ Partial Class OS_OrdenesServicios
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim CveUM As Integer = GvRow.DataKey("CveUM").ToEntero
|
||||
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal
|
||||
Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero
|
||||
Dim CveVentaDetalle As Integer = DtVentaDetalle.Rows(IndexMov1)("CveVentaDetalle").ToString.ToEntero
|
||||
Dim CveMovimientoDetalle As Integer = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||
|
||||
Dim Serie As String = GvRow.DataKey("Serie")
|
||||
@@ -3206,6 +3215,7 @@ Partial Class OS_OrdenesServicios
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
IndexMov1 = IndexMov1 + 1
|
||||
Next
|
||||
|
||||
If ProcesoOK Then
|
||||
@@ -3214,13 +3224,14 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
Dim IndexMov2 As Integer = 0
|
||||
For Each dRow As DataRow In ObjInventario.DtResultados.Rows
|
||||
|
||||
Dim Cantidad As Decimal = dRow("Cantidad").ToString.ToDecimal
|
||||
Dim CvePS As Integer = dRow("CvePS").ToString.ToEntero
|
||||
Dim CveUM As Integer = dRow("CveUM").ToString.ToEntero
|
||||
Dim PU As Decimal = dRow("PU").ToString.ToDecimal
|
||||
Dim CveVentaDetalle As Integer = dRow("CveVentaDetalle").ToString.ToEntero
|
||||
Dim CveVentaDetalle As Integer = DtVentaDetalle.Rows(IndexMov2)("CveVentaDetalle").ToString.ToEntero
|
||||
Dim CveMovimientoDetalle As Integer = dRow("CveMovimientoDetalle").ToString.ToEntero
|
||||
|
||||
Dim Lote As String = dRow("Lote").ToString
|
||||
@@ -3232,12 +3243,13 @@ Partial Class OS_OrdenesServicios
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
End If
|
||||
IndexMov2 = IndexMov2 + 1
|
||||
Next
|
||||
If ProcesoOK Then
|
||||
Dim ObjEventos As New ClsOIEventos(ObjInventario.IniciaTransacSQL)
|
||||
Dim LigaVenta As String = String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimiento, Folio, "Material utilizado")
|
||||
|
||||
If Not ObjEventos.AddEventoBitacora(LigaVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaPedido, CveOS:=CveOS) Then
|
||||
If Not ObjEventos.AddEventoBitacora(LigaVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=Respuesta.CveVenta, CveOS:=CveOS) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
@@ -3254,7 +3266,7 @@ Partial Class OS_OrdenesServicios
|
||||
If ProcesoOK Then
|
||||
ObjV.Commit()
|
||||
Alert("El material utilizado se guardó correctamente")
|
||||
RegistraScript("$('#DVModalSolicitarDevolucion').modal('hide');")
|
||||
RegistraScript("$('#DivModalMaterialUtilizado').modal('hide');")
|
||||
Else
|
||||
ObjV.RollBack()
|
||||
End If
|
||||
@@ -3283,45 +3295,44 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
Dim ObjFactura As Modelos.Factura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyectoPedido, CveCliente, CveMoneda, "Rem")
|
||||
|
||||
If ObjFactura IsNot Nothing Then
|
||||
If ObjFactura IsNot Nothing AndAlso ProcesoOK Then
|
||||
|
||||
|
||||
|
||||
ObjFactura.CveMedico = DdlMedico.SelectedValue.ToEntero
|
||||
ObjFactura.CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
|
||||
ObjFactura.CveTipoVenta = DdlTipoVenta.SelectedValue.ToEntero
|
||||
|
||||
For Each GvRow As GridViewRow In GvMaterialUtilizado.Rows
|
||||
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim Cantidad As Decimal = GvRow.DataKey("Cantidad").ToDecimal
|
||||
Dim CantidadDev As Decimal = GvRow.FCTextBox("TxtDev").Text.ToDecimal
|
||||
Dim CantidadRegistro As Decimal = Cantidad - CantidadDev
|
||||
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal
|
||||
Dim Descuento As Decimal = GvRow.DataKey("Descuento").ToDecimal
|
||||
Dim Obs As String = GvRow.DataKey("Observaciones")
|
||||
|
||||
If Not ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyectoPedido) Then
|
||||
Alert("Error al agregar producto", TipoMensaje.MsgAdvertencia)
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
If ProcesoOK Then
|
||||
ObjFactura.CalculaTotales()
|
||||
Dim Resp As New Modelos.Factura.MMensajeFactura
|
||||
Resp = ObjFactura.EmitirFactura(False, Transac:=TransaccionSQL)
|
||||
|
||||
For Each GvRow As GridViewRow In GvMaterialUtilizado.Rows
|
||||
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim Cantidad As Decimal = GvRow.DataKey("Cantidad").ToDecimal
|
||||
Dim CantidadDev As Decimal = GvRow.FCTextBox("TxtDev").Text.ToDecimal
|
||||
Dim CantidadRegistro As Decimal = Cantidad - CantidadDev
|
||||
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal
|
||||
Dim Descuento As Decimal = GvRow.DataKey("Descuento").ToDecimal
|
||||
Dim Obs As String = GvRow.DataKey("Observaciones")
|
||||
|
||||
If Not ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyectoPedido) Then
|
||||
Alert("Error al agregar producto", TipoMensaje.MsgAdvertencia)
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If ProcesoOK Then
|
||||
ObjFactura.CalculaTotales()
|
||||
|
||||
|
||||
Dim Resp As New Modelos.Factura.MMensajeFactura
|
||||
Resp = ObjFactura.EmitirFactura(False, Transac:=TransaccionSQL)
|
||||
|
||||
If Resp.CveVenta > 0 Then
|
||||
Respuesta.CveVenta = Resp.CveVenta
|
||||
Respuesta.SerieFolio = Resp.SerieFolio
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
If Resp.CveVenta > 0 Then
|
||||
Respuesta.CveVenta = Resp.CveVenta
|
||||
Respuesta.SerieFolio = Resp.SerieFolio
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
@@ -1107,6 +1107,16 @@ function FormatoNumero(Importe, Decimales) {
|
||||
}
|
||||
|
||||
|
||||
function filtraListBox(txtBusqueda, listBox) {
|
||||
|
||||
var value = txtBusqueda.value.toLowerCase();
|
||||
$(`#${listBox} option`).filter(function () {
|
||||
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
jQuery.fn.center = function() {
|
||||
this.css("position", "absolute");
|
||||
var widthh = $(this).width();
|
||||
|
||||
@@ -38,26 +38,55 @@
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:ListBox runat="server" ID="ListModulosDisponible" DataTextField="Padres" DataValueField="CveModulo" Height="300px" Width="450px" SelectionMode="Multiple"></asp:ListBox>
|
||||
</td>
|
||||
<td width="100px" align="center">
|
||||
|
||||
<asp:Button Text=">" runat="server" ID="BtnAdd" ToolTip="Añadir Seleccionados" OnClick="BtnAdd_Click" class="btn btn-primary" /><br />
|
||||
<br />
|
||||
<asp:Button Text="<" runat="server" ID="BtnRemove" ToolTip="Quitar Seleccionados" OnClick="BtnRemove_Click" class="btn btn-primary" /><br />
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<asp:ListBox runat="server" ID="ListModulosEmpresa" DataTextField="Padres" DataValueField="CveModulo" Height="300px" Width="450px" SelectionMode="Multiple"></asp:ListBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<div class="row" style="max-width:1000px!important">
|
||||
<div class="col-md-5" >
|
||||
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px; max-width: 900px" align="left;">
|
||||
<input type="text" id="TxtBusquedaModulosDisponibles" class="form-control input-sm" onkeyup="<%= String.Format("filtraListBox(this,'{0}')", ListModulosDisponible.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("filtraListBox( this,'{0}')", ListModulosDisponible.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:ListBox runat="server" ID="ListModulosDisponible" DataTextField="Padres" DataValueField="CveModulo" Height="300px" Width="100%" SelectionMode="Multiple" ClientIDMode="Static"></asp:ListBox>
|
||||
|
||||
</div>
|
||||
<div class="col-md-1" style="text-align:center!important;max-width:100px;vertical-align:central!important">
|
||||
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<asp:Button Text=">" runat="server" ID="BtnAdd" ToolTip="Añadir Seleccionados" OnClick="BtnAdd_Click" class="btn btn-primary" /><br />
|
||||
<br />
|
||||
<asp:Button Text="<" runat="server" ID="BtnRemove" ToolTip="Quitar Seleccionados" OnClick="BtnRemove_Click" class="btn btn-primary" /><br />
|
||||
|
||||
</div>
|
||||
<div class="col-md-5" >
|
||||
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px; max-width: 900px" align="left;">
|
||||
<input type="text" id="TxtBusquedaModulosEmpresas" class="form-control input-sm" onkeyup="<%= String.Format("filtraListBox(this,'{0}')", ListModulosEmpresa.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("filtraListBox( this,'{0}')", ListModulosEmpresa.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:ListBox runat="server" ID="ListModulosEmpresa" DataTextField="Padres" DataValueField="CveModulo" Height="300px" Width="100%" SelectionMode="Multiple"></asp:ListBox>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
Reference in New Issue
Block a user