This commit is contained in:
2024-01-13 13:14:08 -07:00
8 changed files with 70 additions and 155 deletions

View File

@@ -1449,8 +1449,10 @@ Namespace Modelos
End Function End Function
Public Function AgregarPS(CvePS As Integer, Cantidad As Decimal, PU As Decimal, Descuento As Decimal, Obs As String, Public Function AgregarPS(CvePS As Integer, Cantidad As Decimal, PU As Decimal, Descuento As Decimal, Obs As String,
Optional CveUM As Integer = -1, Optional CveProyecto As Integer = -1, Optional Proyecto As String = "", Optional CveSubProyecto As Integer = -1, Optional CveUM As Integer = -1, Optional CveProyecto As Integer = -1, Optional Proyecto As String = "",
Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1, Optional CuentaPredial As String = "") As Boolean Optional CveSubProyecto As Integer = -1,
Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1,
Optional CuentaPredial As String = "", Optional CveVentaDetallePadre As Integer = -1) As Boolean
If Not CvePS > 0 Then If Not CvePS > 0 Then
Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError) Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError)
@@ -1626,7 +1628,7 @@ Namespace Modelos
Row("EntregaDirecta") = 0 Row("EntregaDirecta") = 0
'Contratos 'Contratos
Row("CveContratoDetalle") = -1 Row("CveContratoDetalle") = -1
Row("CveVentaDetalle") = -1 Row("CveVentaDetalle") = CveVentaDetallePadre
Row("CveMovimientoDetallePedido") = -1 Row("CveMovimientoDetallePedido") = -1
Row("CveOrdenCompraDetalle") = -1 Row("CveOrdenCompraDetalle") = -1
Row("CveVentaDetalleRemision") = -1 Row("CveVentaDetalleRemision") = -1
@@ -2154,7 +2156,7 @@ Namespace Modelos
CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=factura.OrdenCompra, CveCuentaTerminal:=factura.CveCuentaTerminal, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal, 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)), 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, 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 CveMedico:=factura.CveMedico, CveProcedimiento:=factura.CveProcedimiento, CveTipoVenta:=factura.CveTipoVenta, FechaParaSurtir:=factura.FechaParaSurtir) 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")

View File

@@ -86,7 +86,6 @@
border: 1px solid #999999; border: 1px solid #999999;
border-top: 0; border-top: 0;
font-family: verdana,tahoma,helvetica; font-family: verdana,tahoma,helvetica;
font-size: 12px;
padding: 8px; padding: 8px;
} }

View File

@@ -165,14 +165,16 @@
</div> </div>
<asp:UpdatePanel ID="UpDatosGvVentas" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatosGvVentas" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvVentas" ClientIDMode="Static" Width="100%" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"> <asp:GridView ID="GvVentas" ClientIDMode="Static" Width="100%" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns> <Columns>
<asp:BoundField HeaderText="Tipo Documento" DataField="TipoDocto" ItemStyle-Width="125px" /> <asp:BoundField HeaderText="Tipo Docto" DataField="TipoDocto" ItemStyle-Width="55px" />
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="~/Ventas/Ventas.aspx?CveVenta={0}" Target="_blank" ItemStyle-Width="15%" HeaderText="SerieFolio" ControlStyle-CssClass="Texto" DataTextField="SerieFolio" /> <asp:HyperLinkField DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="~/Ventas/Ventas.aspx?CveVenta={0}" Target="_blank" ItemStyle-Width="80px" HeaderText="SerieFolio" ControlStyle-CssClass="Texto" DataTextField="SerieFolio" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" /> <asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Center" />
<asp:HyperLinkField DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="~/Ventas/Clientes.aspx?CveCliente={0}" Target="_blank" HeaderText="Cliente" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="Nombre" /> <asp:HyperLinkField DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="~/Ventas/Clientes.aspx?CveCliente={0}" Target="_blank" HeaderText="Cliente" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="Nombre" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Sucursal" DataField="SubProyecto" /> <asp:BoundField HeaderText="Sucursal" DataField="SubProyecto" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Médico" DataField="Medico" Visible="false" />
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" Visible="false" />
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>

View File

@@ -74,7 +74,16 @@ Partial Class RepNotasSinAlmacen
Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278) Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278)
GvVentas.Columns(5).Visible = TienePermisoImportes GvVentas.Columns(5).Visible = TienePermisoImportes
GvCompras.Columns(4).Visible = TienePermisoImportes GvCompras.Columns(4).Visible = TienePermisoImportes
GvCompras.Columns(5).Visible = TienePermisoDesmarcar GvCompras.Columns(5).Visible = TienePermisoDesmarcar
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then ' es empresa hospitalaria
GvVentas.Columns(3).HeaderText = "Hospital"
GvVentas.Columns(6).Visible = True
GvVentas.Columns(7).Visible = True
CType(GvVentas.Columns(2), BoundField).DataFormatString = "{0:dd/MM/yyyy HH:mm}"
CType(GvVentas.Columns(2), BoundField).ItemStyle.Width = Unit.Pixel(120)
End If
End Sub End Sub
Private Sub CargaCombos() Private Sub CargaCombos()
TxtFechaF.Text = NowADS().ToShortDateString TxtFechaF.Text = NowADS().ToShortDateString
@@ -88,18 +97,10 @@ Partial Class RepNotasSinAlmacen
DdlProveedor.setEsWebService(True) DdlProveedor.setEsWebService(True)
DdlProveedor.Attributes.Add("data-metodo", "getproveedores") DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
DdlProveedor.SelectedText = "Todos" DdlProveedor.SelectedText = "Todos"
DdlProveedor.SelectedValue = "-1" DdlProveedor.SelectedValue = "-1"
'DdlSucursal.DataSource = GlobalDTSucursales(UsuarioActual.CveEmpresa) CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
'DdlSucursal.DataBind()
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
'DdlSubProyecto.Items.Clear()
'DdlSubProyecto.SelectedValue = Nothing
'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=1)
'DdlSubProyecto.DataBind()
'DdlSubProyecto.Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1"))
End Sub End Sub
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
@@ -131,13 +132,8 @@ Partial Class RepNotasSinAlmacen
GvVentas.DataSource = Nothing GvVentas.DataSource = Nothing
End If End If
GvVentas.DataBind() GvVentas.DataBind()
'If (GvVentas.Rows.Count > 0) Then
' GvVentas.UseAccessibleHeader = True
' GvVentas.HeaderRow.TableSection = TableRowSection.TableHeader
' RegistraScript("OrdenarGvVentas();")
'End If
Else Else
'Compras 'Compras
If Not DdlProveedor.SelectedValue.ToEntero > 0 Then If Not DdlProveedor.SelectedValue.ToEntero > 0 Then

View File

@@ -374,8 +374,7 @@ Partial Class OS_OrdenesServicios
'CargaEstatusOS() 'CargaEstatusOS()
CargaDatos() CargaDatos()
'PermisosSegunEstatus() 'PermisosSegunEstatus()
CargaDetalles()
CargaMateriales()
DivSeFactura.Visible = True DivSeFactura.Visible = True
BtnGuardar.Text = "Guardar Cambios" BtnGuardar.Text = "Guardar Cambios"
@@ -706,7 +705,8 @@ Partial Class OS_OrdenesServicios
CargaEventoBitacora() CargaEventoBitacora()
CargaHistorial() CargaHistorial()
CargaDetalles()
CargaMateriales()
If TipoEstatus.Contiene(1, 2, 3) Then If TipoEstatus.Contiene(1, 2, 3) Then
LnkAccionesMaterialUtilizado.Visible = True LnkAccionesMaterialUtilizado.Visible = True
@@ -3032,8 +3032,6 @@ Partial Class OS_OrdenesServicios
End If End If
Dim ProcesoOK As Boolean = True Dim ProcesoOK As Boolean = True
Dim ObjV As New ClsVentas Dim ObjV As New ClsVentas
Dim ObjOS As New ClsOS(ObjV.IniciaTransacSQL()) Dim ObjOS As New ClsOS(ObjV.IniciaTransacSQL())
@@ -3041,8 +3039,6 @@ Partial Class OS_OrdenesServicios
Dim ObjConta As New ClsContabilidad(ObjV.IniciaTransacSQL()) Dim ObjConta As New ClsContabilidad(ObjV.IniciaTransacSQL())
Dim GenrarRemisionMovimientos As Boolean = False Dim GenrarRemisionMovimientos As Boolean = False
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
For Each GVRow As GridViewRow In GvMU.Rows For Each GVRow As GridViewRow In GvMU.Rows
@@ -3054,20 +3050,15 @@ Partial Class OS_OrdenesServicios
Dim Serie As String = If(GVRow.DataKey("Serie") = "", "-1", GVRow.DataKey("Serie")) Dim Serie As String = If(GVRow.DataKey("Serie") = "", "-1", GVRow.DataKey("Serie"))
Dim Lote As String = If(GVRow.DataKey("Lote") = "", "-1", GVRow.DataKey("Lote")) Dim Lote As String = If(GVRow.DataKey("Lote") = "", "-1", GVRow.DataKey("Lote"))
Dim FechaCaducidad As DateTime = If(GVRow.DataKey("FechaCaducidad") = "", MinFecha, GVRow.DataKey("FechaCaducidad").ToDate) Dim FechaCaducidad As DateTime = If(GVRow.DataKey("FechaCaducidad") = "", MinFecha, GVRow.DataKey("FechaCaducidad").ToDate)
If Not ObjOS.AddOrdenesServicioMateriales(CveOS, CvePS, CantidadRegistro, Serie, Lote, FechaCaducidad, UsuarioActual.CveUsuario) Then If Not ObjOS.AddOrdenesServicioMateriales(CveOS, CvePS, CantidadRegistro, Serie, Lote, FechaCaducidad, UsuarioActual.CveUsuario) Then
Alert("Ocurrió un error al guardar el material.", TipoMensaje.MsgAdvertencia) Alert("Ocurrió un error al guardar el material.", TipoMensaje.MsgAdvertencia)
ProcesoOK = False ProcesoOK = False
Exit For Exit For
End If End If
End If End If
Next Next
If ProcesoOK Then If ProcesoOK Then
Dim CveOSEstatusFinalizada As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 4").ToEntero Dim CveOSEstatusFinalizada As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 4").ToEntero
If CveOSEstatusFinalizada > 0 Then If CveOSEstatusFinalizada > 0 Then
If Not ObjOS.UpdateOrdenesServiciosEstatus(CveOSEstatusFinalizada, UsuarioActual.CveUsuario, CveOS) Then If Not ObjOS.UpdateOrdenesServiciosEstatus(CveOSEstatusFinalizada, UsuarioActual.CveUsuario, CveOS) Then
ProcesoOK = False ProcesoOK = False
@@ -3144,7 +3135,7 @@ Partial Class OS_OrdenesServicios
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal
If CantidadRegistro > 0 Then If CantidadRegistro > 0 Then
Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero ' DtVentaDetalle.Rows(IndexMov1)("CveVentaDetalle").ToString.ToEntero Dim CveVentaDetalle As Integer = DtVentaDetalle.FiltroPrimeroValor("CveVentaDetalle", $"CveVentaDetallePadre = {GvRow.DataKey("CveVentaDetalle")}").ToEntero
Dim CveMovimientoDetalle As Integer = GvRow.DataKey("CveMovimientoDetalle").ToEntero Dim CveMovimientoDetalle As Integer = GvRow.DataKey("CveMovimientoDetalle").ToEntero
Dim Serie As String = GvRow.DataKey("Serie") Dim Serie As String = GvRow.DataKey("Serie")
@@ -3225,13 +3216,9 @@ Partial Class OS_OrdenesServicios
End If End If
End If End If
If ProcesoOK Then If ProcesoOK Then
ObjV.Commit() ObjV.Commit()
If DdlTipoVenta.SelectedValue.ToEntero = 5 Then If DdlTipoVenta.SelectedValue.ToEntero = 5 Then
Dim Liga As String = $" document.location.href=""/OS/OrdenesServicios.aspx?CveOS={CveOS}""; " Dim Liga As String = $" document.location.href=""/OS/OrdenesServicios.aspx?CveOS={CveOS}""; "
Alert("El material utilizado se guardó correctamente", TipoMensaje.MsgInformacion, Liga) Alert("El material utilizado se guardó correctamente", TipoMensaje.MsgInformacion, Liga)
@@ -3288,7 +3275,7 @@ Partial Class OS_OrdenesServicios
Dim Obs As String = GvRow.DataKey("Observaciones") Dim Obs As String = GvRow.DataKey("Observaciones")
If CantidadRegistro > 0 Then If CantidadRegistro > 0 Then
If Not ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyectoPedido) Then If Not ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyectoPedido, CveVentaDetallePadre:=GvRow.DataKey("CveVentaDetalle").ToEntero) Then
Alert("Error al agregar producto", TipoMensaje.MsgAdvertencia) Alert("Error al agregar producto", TipoMensaje.MsgAdvertencia)
ProcesoOK = False ProcesoOK = False
Exit For Exit For

View File

@@ -220,81 +220,21 @@
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ninguna remisión pendiente por facturar" DataKeyNames="CveVenta" <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ninguna remisión pendiente por facturar" DataKeyNames="CveVenta"
ToolTip="Remisiones sin Facturar" ToolTip="Remisiones sin Facturar"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
data-sort="true" Style="text-align: center;" GridLines="None"> data-sort="true" GridLines="None">
<Columns> <Columns>
<asp:TemplateField> <asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="100px" DataTextField ="Folio" DataNavigateUrlFormatString="/Ventas/RepRemisionesDetalle.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" />
<HeaderTemplate> <asp:HyperLinkField HeaderText="Fecha" ItemStyle-Width="100px" DataTextField ="Fecha" DataTextFormatString="{0:d}" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" />
<asp:Label Text="Folio" runat="server" CausesValidation="false"> </asp:Label> <asp:BoundField HeaderText="Vencimiento" DataField="FechaVencimiento" DataFormatString="{0:d}" />
</HeaderTemplate> <asp:BoundField HeaderText="Cliente" DataField="Cliente" />
<ItemTemplate> <asp:BoundField HeaderText="Contrato" DataField="TieneContrato" Visible="false" />
<asp:Literal ID="LtlFolio" runat="server" Text='<%# Eval("Folio") %>'></asp:Literal> <asp:BoundField HeaderText="Médico" DataField="Medico" Visible="false" />
</ItemTemplate> <asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" Visible="false" />
</asp:TemplateField> <asp:BoundField HeaderText="Vendedor" DataField="Vendedor" />
<asp:TemplateField> <asp:BoundField DataField="PorcentajeAvance" HeaderText="Facturado" DataFormatString="{0:F}%" HtmlEncode="false" />
<HeaderTemplate> <asp:BoundField DataField="SubTotal" HeaderText="SubTotal" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
<asp:Label Text="Fecha" runat="server" CausesValidation="false"> </asp:Label> <asp:BoundField DataField="Descuento" HeaderText="Descuento" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
</HeaderTemplate> <asp:BoundField DataField="IVA" HeaderText="IVA" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label Text="F. Vencimiento" runat="server" CausesValidation="false"> </asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaVencimiento" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>
<asp:Label Text="Cliente" runat="server" CausesValidation="false"> </asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlCliente" runat="server" Text='<%# Eval("Cliente") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label Text="Contrato" runat="server" CausesValidation="false"> </asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlContrato" runat="server" Text='<%# Eval("TieneContrato") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="PorcentajeAvance" HeaderText="Facturado" DataFormatString="{0:F}" HtmlEncode="false" />
<%-- <asp:TemplateField>
<HeaderTemplate>
<asp:Label Text="Facturado" runat="server" CausesValidation="false"> </asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlAvance" runat="server" Text='<%# String.Concat(Eval("PorcentajeAvance"), "%") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label Text="SubTotal" runat="server" CausesValidation="false"> </asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" Visible="false">
<HeaderTemplate>
<asp:Label Text="Descuento" runat="server" CausesValidation="false"> </asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# Eval("Descuento", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label Text="IVA" runat="server" CausesValidation="false"> </asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="10%" > <asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="10%" >
<HeaderTemplate> <HeaderTemplate>
<asp:Label Text="Total" runat="server" CausesValidation="false"> </asp:Label> <asp:Label Text="Total" runat="server" CausesValidation="false"> </asp:Label>
@@ -304,15 +244,8 @@
<%--<asp:Literal ID="LtlMon" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>--%> <%--<asp:Literal ID="LtlMon" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>--%>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right"> <asp:BoundField DataField="ImporteInventario" HeaderText="Inventario" DataFormatString="{0:N2} MXN" Visible="false" ItemStyle-HorizontalAlign="Right" />
<HeaderTemplate>
<asp:Label Text="Inventario" runat="server" CausesValidation="false"> </asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlTotalInventario" runat="server" Text='<%# Eval("ImporteInventario", "{0:N2}") & " MXN" %>'></asp:Literal>
<%--<asp:Literal ID="LtlMon" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>--%>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
<HeaderStyle CssClass="Titulos" /> <HeaderStyle CssClass="Titulos" />
<RowStyle CssClass="Texto" /> <RowStyle CssClass="Texto" />

View File

@@ -97,10 +97,10 @@ Partial Class RepRemisiones
End If End If
If DtVentas IsNot Nothing Then If DtVentas IsNot Nothing Then
GvDatos.Columns(7).Visible = DtVentas.SUMD("Descuento") > 0 GvDatos.Columns(10).Visible = DtVentas.SUMD("Descuento") > 0
End If End If
GvDatos.Columns(10).Visible = chkInv.Checked 'solo se visualiza si está selccionada GvDatos.Columns(13).Visible = chkInv.Checked 'solo se visualiza si está selccionada
ObjVentas.Dispose() ObjVentas.Dispose()
GvDatos.DataBind() GvDatos.DataBind()
@@ -118,16 +118,12 @@ Partial Class RepRemisiones
e.Row.CssClass = "SubTotales2" e.Row.CssClass = "SubTotales2"
e.Row.Font.Bold = True e.Row.Font.Bold = True
e.Row.Attributes.Add("style", "background:#CCCCCC !important") e.Row.Attributes.Add("style", "background:#CCCCCC !important")
Else Else
e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>"
e.Row.FCLiteral("LtlFecha").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/Ventas.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFecha").Text & "</a>"
If e.Row.DBCampo("FechaVencimiento").ToDate < NowADS() Then If e.Row.DBCampo("FechaVencimiento").ToDate < NowADS() Then
' e.Row.Cells(2).CssClass = "danger" ' e.Row.Cells(2).CssClass = "danger"
e.Row.Cells(2).ForeColor = Drawing.Color.Red e.Row.Cells(2).ForeColor = Drawing.Color.Red
End If End If
e.Row.Cells(5).Text = e.Row.Cells(5).Text + "%"
End If End If
e.Row.FCLiteral("LtlTotal").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & "&FechaI=" & FechaI & "&FechaF=" & FechaF & "&FechaV=" & FechaV & "&CveCliente=" & If(e.Row.DBCampo("CveCliente").ToString().ToEntero() > 0, e.Row.DBCampo("CveCliente").ToString(), DdlClientes.SelectedValue) & "&CveContrato=" & CveContrato & "&CveSubProyecto=" & Sucursales & "&CveMoneda=" & e.Row.DBCampo("CveMoneda") & """>" & e.Row.FCLiteral("LtlTotal").Text & "</a>" e.Row.FCLiteral("LtlTotal").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & "&FechaI=" & FechaI & "&FechaF=" & FechaF & "&FechaV=" & FechaV & "&CveCliente=" & If(e.Row.DBCampo("CveCliente").ToString().ToEntero() > 0, e.Row.DBCampo("CveCliente").ToString(), DdlClientes.SelectedValue) & "&CveContrato=" & CveContrato & "&CveSubProyecto=" & Sucursales & "&CveMoneda=" & e.Row.DBCampo("CveMoneda") & """>" & e.Row.FCLiteral("LtlTotal").Text & "</a>"
@@ -137,28 +133,28 @@ Partial Class RepRemisiones
#Region "CARGA COMBOS FILTRO" #Region "CARGA COMBOS FILTRO"
Private Sub CargaCliente() Private Sub CargaCliente()
'CargaClientes
'Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
'If EsWS Then
DdlClientes.setEsWebService(True) DdlClientes.setEsWebService(True)
' Else
'DdlClientes.setEsWebService(False)
'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
'DdlClientes.DataBind()
'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
'End If
If UsuarioActual.TienePermisoProceso(201) Then If UsuarioActual.TienePermisoProceso(201) Then
divVerInv.Visible = True divVerInv.Visible = True
End If
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then ' es empresa hospitalaria
GvDatos.Columns(3).HeaderText = "Hospital"
GvDatos.Columns(5).Visible = True
GvDatos.Columns(6).Visible = True
'columna de fecha
GvDatos.Columns(1).HeaderText = "Fecha Cirugía"
CType(GvDatos.Columns(1), HyperLinkField).DataTextFormatString = "{0:dd/MM/yyyy HH:mm}"
CType(GvDatos.Columns(1), HyperLinkField).ItemStyle.Width = Unit.Pixel(120)
End If End If
End Sub End Sub
Private Sub CargaSucursales() Private Sub CargaSucursales()
DdlSubProyectos.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) DdlSubProyectos.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyectos.DataBind() DdlSubProyectos.DataBind()
'DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub End Sub
Private Sub CargaContrato() Private Sub CargaContrato()

View File

@@ -21679,7 +21679,7 @@ Partial Class Ventas
Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero() Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero()
Dim TipoCambio As Decimal = TxtTipoCambio.Text.ToDecimal Dim TipoCambio As Decimal = TxtTipoCambio.Text.ToDecimal
EditoRemision = True EditoRemision = True
CveClienteSucursal = DdlClienteSucursal.SelectedValue.ToEntero CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero
Try Try
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS 'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
If DdlMoneda.SelectedValue.ToEntero() <> 2 AndAlso ChkConvertirDolares.Checked Then If DdlMoneda.SelectedValue.ToEntero() <> 2 AndAlso ChkConvertirDolares.Checked Then
@@ -33550,7 +33550,7 @@ Partial Class Ventas
TxtPedidoContrato.Enabled = True TxtPedidoContrato.Enabled = True
TxtObsAlmacen.Enabled = True TxtObsAlmacen.Enabled = True
RblPaqueteria.Enabled = True RblPaqueteria.Enabled = True
DdlSucursalCliente.Enabled = True
LnkUpdateLineaAdicional.Visible = True LnkUpdateLineaAdicional.Visible = True
'Acciones 'Acciones
BtnEditar.Text = "Guardar" BtnEditar.Text = "Guardar"