Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -173,13 +173,7 @@
|
||||
<asp:Literal ID="LtlnVentas" runat="server" Text='<%# Eval("nVentas") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Utilidad" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="70px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUtilidad" runat="server" Text='<%# Eval("Utilidad", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Venta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="70px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSerieFolio" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Literal>
|
||||
|
||||
@@ -66,8 +66,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
@@ -84,32 +83,62 @@
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Médico:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Vendedor:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlVendedor" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Técnico:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlUsuarioAtendio" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveUsuario" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha I. Pago:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaIPago" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioIPago" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaIPago" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaIPago" PopupButtonID="ImgCalendarioIPago" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaIPago" runat="server" ControlToValidate="TxtFechaIPago" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaIPago" runat="server" ControlToValidate="TxtFechaIPago" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaIPago" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaIPago" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha F. Pago:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="TxtFechaFPago" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioFPago" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtFechaFPago" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtFechaFPago" PopupButtonID="ImgCalendarioFPago" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaFPago" runat="server" ControlToValidate="TxtFechaFPago" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaFPago" runat="server" ControlToValidate="TxtFechaFPago" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaFPago" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaFPago" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-1 ">Médico:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Vendedor:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlVendedor" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Técnico:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlUsuarioAtendio" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveUsuario" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -130,7 +159,7 @@
|
||||
EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField HeaderText="Folio" DataField="SerieFolio" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" DatatextField="SerieFolio" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Nombre Hospital" DataField="Hospital" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Especialidad" DataField="Especialidad" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Médico" DataField="Medico" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -138,20 +167,18 @@
|
||||
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="P Unitario" DataField="PU" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Venta Total" DataField="Total" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="P Unitario" DataField="PU" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Venta Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="$ Vendedor" DataField="ComisionVendedor" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="$ Vendedor" DataField="ComisionVendedor" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField HeaderText="Técnico" DataField="Nombre" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="$ Técnico" DataField="ComisionTecnico" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField HeaderText="$ E. Médica" DataField="ComisionMedico" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Fecha Pago" DataField="FechaPago" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" ControlStyle-Width="100px" />
|
||||
|
||||
|
||||
<asp:BoundField HeaderText="$ Técnico" DataField="ComisionTecnico" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="$ Gerente" DataField="ComisionGerente" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||
|
||||
<asp:BoundField HeaderText="$ E. Médica" DataField="ComisionMedico" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Fecha Pago" DataField="FechaPago" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" ControlStyle-Width="100px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -185,7 +212,7 @@
|
||||
<asp:GridView ID="GvComisiones" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CvePS,ComisionMedico,ComisionGerente,ComisionVendedor,ComisionTecnico"
|
||||
data-sort="true" OnRowDataBound="GvComisiones_RowDataBound"
|
||||
EmptyDataText="No se encontraron Comisiones" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
EmptyDataText="No se encontraron Comisiones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Código/Producto" ItemStyle-HorizontalAlign="Left">
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Data.Entity
|
||||
Imports Extensiones
|
||||
Imports Microsoft.EntityFrameworkCore
|
||||
|
||||
|
||||
Partial Class Ventas_RepComisionesSMS
|
||||
Inherits ClsPaginas
|
||||
@@ -62,10 +59,12 @@ Partial Class Ventas_RepComisionesSMS
|
||||
Public Sub CargaDatos()
|
||||
|
||||
LnkExportar.Visible = False
|
||||
Dim FechaIPago As Date = If(TxtFechaIPago.Text.ToDate < MinFecha, MinFecha, TxtFechaIPago.Text.ToDate)
|
||||
Dim FechaFPago As Date = If(TxtFechaFPago.Text.ToDate < MinFecha, MaxFecha, TxtFechaFPago.Text.ToDate)
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetComisionesMedicasRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, -1, -1, DdlMedico.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, -1, 1) Then
|
||||
If ObjVentas.GetComisionesMedicasRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, -1, -1, DdlMedico.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, -1, FechaIPago, FechaFPago) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
|
||||
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
@@ -76,9 +75,10 @@ Partial Class Ventas_RepComisionesSMS
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
If UsuarioActual.CveVendedor = 0 Then GvDatos.Columns(15).Visible = True 'columna de comisiones de gerente
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
@@ -270,7 +270,7 @@ Partial Class Ventas_RepComisionesSMS
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
GvComisionesEspeciales.DataSource = Nothing
|
||||
If ObjVentas.GetComisionesMedicasEsPeciales(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetComisionesMedicasEspeciales(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvComisionesEspeciales.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
@@ -345,7 +345,12 @@ Partial Class Ventas_RepComisionesSMS
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.AddComisionesMedicasEspeciales(DdlModalMedico.SelectedValue.ToEntero, DdlModalPS.SelectedValue.ToEntero, DdlModalTipoComision.SelectedValue.ToEntero, Comision, UsuarioActual.CveUsuario) Then
|
||||
Alert("Comisión agregada correctamente")
|
||||
Alert("Comisión agregada correctamente", TipoMensaje.ToastInformacion)
|
||||
DdlModalPS.SelectedValue = "-1"
|
||||
DdlModalPS.SelectedValue = ""
|
||||
DdlModalPS.SelectedText = ""
|
||||
TxtModalComision.Text = ""
|
||||
DdlModalPS.Focus()
|
||||
Else
|
||||
errorProceso = True
|
||||
End If
|
||||
@@ -354,7 +359,16 @@ Partial Class Ventas_RepComisionesSMS
|
||||
|
||||
If Not errorProceso Then
|
||||
CargaComisionesEspeciales()
|
||||
ReiniciaModalComisionesEspeciales()
|
||||
'ReiniciaModalComisionesEspeciales()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("SerieFolio") = "" Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -758,12 +758,12 @@
|
||||
<td><b>Fecha:</b></td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 117px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" AutoPostBack="true" CssClass="form-control" CausesValidation="true" MaxLength="10" OnTextChanged="TxtFecha_TextChanged"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtFecha" runat="server" Enabled="false" AutoPostBack="true" CssClass="form-control" CausesValidation="true" MaxLength="10" OnTextChanged="TxtFecha_TextChanged"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server" ></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="false" ></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
@@ -3228,12 +3228,11 @@ Partial Class Ventas
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(301).ToEntero() > 0 Then
|
||||
TxtFecha.Enabled = False
|
||||
ImgFecha.Visible = False
|
||||
If UsuarioActual.Empresa.Funcionalidad(301) <> "" Then
|
||||
TxtFecha.Enabled = True
|
||||
ImgFecha.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
CargarCodigo()
|
||||
InicializaImprimirNew()
|
||||
|
||||
@@ -3497,13 +3496,6 @@ Partial Class Ventas
|
||||
ImgFecha.Visible = False
|
||||
End If
|
||||
|
||||
'condición temporal por implementación JAM. usuario FernandaRomo
|
||||
If UsuarioActual.CveUsuario.Contiene(11703, 1719) Then
|
||||
TxtFecha.Enabled = True
|
||||
ImgFecha.Visible = True
|
||||
End If
|
||||
TxtFecha.Enabled = True
|
||||
|
||||
BloqueaCondicionesPago()
|
||||
|
||||
BloqueaClasificaciones()
|
||||
|
||||
Reference in New Issue
Block a user