Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -65,6 +65,7 @@ Public Class ClsCompProveedores
|
||||
Public Property Situacion As String = ""
|
||||
Public Property DIOTNacionalidad As String
|
||||
Public Property CveRegimenFiscal As Integer = -1
|
||||
Public Property PorcentajeProntoPago As Decimal = 0D
|
||||
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
Get
|
||||
@@ -300,6 +301,7 @@ Public Class ClsCompProveedores
|
||||
Me.Situacion = Data.Rows(0)("Situacion").ToString
|
||||
Me.DIOTNacionalidad = Data.Rows(0)("DIOTNacionalidad").ToString
|
||||
Me.CveRegimenFiscal = Data.Rows(0)("CveRegimenFiscal").ToString.ToEntero
|
||||
Me.PorcentajeProntoPago = Data.Rows(0)("PorcentajeProntoPago").ToString.ToDecimal
|
||||
|
||||
End If
|
||||
|
||||
@@ -317,7 +319,7 @@ Public Class ClsCompProveedores
|
||||
CveProveedorClasificacion As Integer, CveUsuarioResponsable As Integer, NotificarA As String, CorreoCobranza As String, FolioDuplicado As Boolean, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Optional CveTipoProveedor As Integer = 1, Optional CveMonedaPreferente As Integer = 1, Optional UsaLimiteCredito As Boolean = False, Optional DIOTCveTipoTercero As Integer = -1, Optional DIOTCveTipoOperacion As Integer = -1, Optional DIOTNumeroIDFiscal As String = "",
|
||||
Optional AplicarEvaluacion As Boolean = False, Optional FechaEvaluacion As String = "-1", Optional CicloEvaluacion As Integer = -1, Optional DIOTCvePais As Integer = -1, Optional CveUsuarioEvaluador As Integer = -1, Optional CP As Integer = 0, Optional DIOTNacionalidad As String = "",
|
||||
Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1) As Boolean
|
||||
Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -367,6 +369,7 @@ Public Class ClsCompProveedores
|
||||
.Add("@CveUsuarioEvaluador", SqlDbType.Int).Value = CveUsuarioEvaluador
|
||||
.Add("@CveConfianzaProveedor", SqlDbType.Int).Value = CveConfianzaProveedor
|
||||
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
|
||||
.Add("@PorcentajeProntoPago", SqlDbType.Decimal).Value = PorcentajeProntoPago
|
||||
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
End With
|
||||
@@ -402,7 +405,7 @@ Public Class ClsCompProveedores
|
||||
CveProveedorClasificacion As Integer, CveUsuarioResponsable As Integer, Estatus As Boolean, NotificarA As String, CorreoCobranza As String, FolioDuplicado As Boolean, CveProveedor As Integer,
|
||||
Optional CveTipoProveedor As Integer = 1, Optional CveMonedaPreferente As Integer = 1, Optional UsaLimiteCredito As Boolean = False, Optional DIOTCveTipoTercero As Integer = -1, Optional DIOTCveTipoOperacion As Integer = -1, Optional DIOTNumeroIDFiscal As String = "", Optional CveUsuarioModifico As Integer = -1,
|
||||
Optional AplicarEvaluacion As Boolean = False, Optional FechaEvaluacion As String = "-1", Optional CicloEvaluacion As Integer = -1, Optional DIOTCvePais As Integer = -1, Optional CveUsuarioEvaluador As Integer = -1, Optional CP As Integer = 0, Optional DIOTNacionalidad As String = "",
|
||||
Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1) As Boolean
|
||||
Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Comp_ProveedorUpdate")
|
||||
@@ -455,6 +458,7 @@ Public Class ClsCompProveedores
|
||||
|
||||
.Add("@CveConfianzaProveedor", SqlDbType.Int).Value = CveConfianzaProveedor
|
||||
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
|
||||
.Add("@PorcentajeProntoPago", SqlDbType.Decimal).Value = PorcentajeProntoPago
|
||||
|
||||
''Proveedores
|
||||
'.Add("@IdCtaContProveedores", SqlDbType.Int).Value = IdCtaContProveedores
|
||||
|
||||
@@ -6772,7 +6772,7 @@ Public Class ClsVentas
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetComisionesMedicasRep(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CveSubProyecto As Integer, CveProcedimiento As Integer, CveMedico As Integer, CveVendedor As Integer, CveUsuario As Integer) As Boolean
|
||||
Public Function GetComisionesMedicasRep(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CveSubProyecto As Integer, CveProcedimiento As Integer, CveMedico As Integer, CveVendedor As Integer, CveUsuario As Integer, CveTipoVenta As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ComisionesMedicasRepGet")
|
||||
@@ -6786,6 +6786,8 @@ Public Class ClsVentas
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -20297,6 +20297,22 @@ Partial Class Compras_Compras
|
||||
Select row
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'Dim dataTable As New DataTable
|
||||
'Dim rowFilter As String = ""
|
||||
'Dim orderby As String = ""
|
||||
'Dim groupByColumns As String()() = {New String() {"SubProyecto", "CveSubProyecto", "Clasificacion", "CveClasificacion", "TipoGasto", "CveTipoGasto"}}
|
||||
'Dim sumColumns As String() = {"Total"}
|
||||
|
||||
|
||||
'Dim resultDataTable As DataTable = GroupByDT(TmpDT, rowFilter, orderby, groupByColumns, sumColumns)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If resultadosFiltrados.Count > 0 Then
|
||||
|
||||
Dim EnumAgrupado = (From row In TmpDT.AsEnumerable()
|
||||
|
||||
@@ -344,8 +344,8 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input" style="width:206px!important">
|
||||
<asp:DropDownList ID="DdlCveTipoProveedor" runat="server" CssClass="form-control select2me " Width="206px" AutoPostBack="True" OnSelectedIndexChanged="DdlCveTipoProveedor_SelectedIndexChanged">
|
||||
<asp:ListItem Selected="True" Text="-" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Proveedor" Value="1"></asp:ListItem>
|
||||
@@ -356,7 +356,14 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCECveTipoProveedor" runat="server" HighlightCssClass="vco posicionvalidation" TargetControlID="RFVCveTipoProveedor" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= DdlCveTipoProveedor.ClientID%>">Tipo de Proveedor:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" runat="server" visible="false" id="DVPorcentajeProntoPago">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:TextBox ID="TxtPorcentajeProntoPago" CssClass="form-control " runat="server" MaxLength="50" Width="206px"></asp:TextBox>
|
||||
<label for="<%= TxtPorcentajeProntoPago.ClientID%>">% Pronto Pago:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -640,9 +640,9 @@ Partial Class Compras_Proveedores
|
||||
GvA.Columns(5).Visible = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||
DVPorcentajeProntoPago.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -920,7 +920,7 @@ Partial Class Compras_Proveedores
|
||||
ChkEstado.Checked = ObjProveedor.Estatus = "Activo"
|
||||
LblFechaCaptura.Text = ObjProveedor.FechaIng.ToShortDateString
|
||||
LblUsuarioCapturo.Text = ObjProveedor.Usuario
|
||||
TxtObservaciones.Text = ObjProveedor.Observaciones
|
||||
TxtObservaciones.Text = ObjProveedor.Observaciones.ToString
|
||||
|
||||
CargaCombos()
|
||||
|
||||
@@ -950,6 +950,8 @@ Partial Class Compras_Proveedores
|
||||
|
||||
Retorno = True
|
||||
|
||||
TxtPorcentajeProntoPago.Text = (100 * ObjProveedor.PorcentajeProntoPago).ToString("###.00")
|
||||
|
||||
' enviaractivacion()
|
||||
CargaEventoBitacora()
|
||||
|
||||
@@ -1403,6 +1405,11 @@ Partial Class Compras_Proveedores
|
||||
Dim CicloEvaluacion As Integer = If(AplicarEvaluacion, DdlCicloEvaluacion.SelectedValue.ToEntero(), -1)
|
||||
|
||||
|
||||
Dim PorcentajeProntoPago As Decimal = 0
|
||||
If TxtPorcentajeProntoPago.Text.ToDecimal > 0 Then
|
||||
PorcentajeProntoPago = TxtPorcentajeProntoPago.Text.ToDecimal / 100
|
||||
End If
|
||||
|
||||
If CveProveedor = -1 Then
|
||||
|
||||
Dim ObjProveedores As New ClsCompProveedores()
|
||||
@@ -1414,7 +1421,7 @@ Partial Class Compras_Proveedores
|
||||
DdlCveClasificacionProveedor.SelectedValue.ToEntero, DdlCveUsuarioResponsable.SelectedValue.ToEntero, TxtNotificarA.Text.Trim, TxtCorreoCobranza.Text.Trim, ChkFolioDuplicado.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text,
|
||||
AplicarEvaluacion:=AplicarEvaluacion, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text,
|
||||
CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then
|
||||
CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago) Then
|
||||
|
||||
Dim NuevoCveProveedor As Integer = ObjProveedores.CveProveedor
|
||||
|
||||
@@ -1525,7 +1532,7 @@ Partial Class Compras_Proveedores
|
||||
DdlCveClasificacionProveedor.SelectedValue.ToEntero, DdlCveUsuarioResponsable.SelectedValue.ToEntero, ChkEstado.Checked, TxtNotificarA.Text.Trim, TxtCorreoCobranza.Text.Trim, ChkFolioDuplicado.Checked, CveProveedor,
|
||||
DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text, CveUsuarioModifico:=UsuarioActual.CveUsuario,
|
||||
DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, AplicarEvaluacion:=ChkAplicarEvaluacion.Checked, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text,
|
||||
CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then
|
||||
CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago) Then
|
||||
|
||||
GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
|
||||
@@ -99,6 +99,7 @@ Partial Class CatRutas
|
||||
DdlDestinoEstatus.SelectedValue = GvRow.DataKey("Estatus")
|
||||
DdlEsNacional.SelectedValue = GvRow.DataKey("EsNacional")
|
||||
|
||||
DdlEstado.Items.Clear()
|
||||
If Convert.ToBoolean(DdlEsNacional.SelectedValue) Then
|
||||
DdlEstado.DataSource = GlobalDTGralEstados("MEX") : DdlEstado.DataBind()
|
||||
Else
|
||||
|
||||
@@ -7,11 +7,14 @@
|
||||
Detalles del Contrato
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton runat="server" OnClick="ImprimirContrato"><i class="fa fa-print"></i> Imprimir Contrato</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.my-1 {
|
||||
}
|
||||
|
||||
.mx-1 {
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
@@ -121,130 +124,179 @@
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cliente</label>
|
||||
<div class="col-md-8">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="86%" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 86%;"
|
||||
UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
|
||||
<asp:LinkButton runat="server" CssClass="btn btn-primary fa-add" Width="12%"
|
||||
PostBackUrl="~/Ventas/Clientes.aspx?CveCliente=-1"></asp:LinkButton>
|
||||
<div class="input-group">
|
||||
<ADS:Dropdownlost ID="DdlClientes" CssClass="form-control" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente"
|
||||
UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
|
||||
<div class="input-group-addon" style="background-color: #428bca">
|
||||
<asp:LinkButton runat="server" ForeColor="White" Text="<i class='fa fa-add'></i>"
|
||||
PostBackUrl="~/Ventas/Clientes.aspx?CveCliente=-1"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Servicio</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Servicio''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDescripcion" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
<div class="input-group">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="3"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Servicio''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDescripcion" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-pencil"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<div class="row">
|
||||
<label class="col-md-4">Observaciones</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"></asp:TextBox>
|
||||
<div class="input-group">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="3"></asp:TextBox>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-eye"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Lugar de Salida</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||
<div class="input-group">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-location"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Fecha Salida</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="datetime"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaSalida" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
<div class="input-group">
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="datetime"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaSalida" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Fecha Regreso</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="datetime"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaRegreso" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
<div class="input-group">
|
||||
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="datetime"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaRegreso" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cantidad de pasajeros</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtCantidadPasajeros" CssStyle="col-md-8 form-control" runat="server"
|
||||
type="number"
|
||||
Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad de pasajeros''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidadPasajeros" runat="server" HighlightCssClass="VCOCantidadPasajeros"
|
||||
TargetControlID="RFVCantidadPasajeros" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
<div class="input-group">
|
||||
|
||||
<asp:TextBox ID="TxtCantidadPasajeros" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="number"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad de pasajeros''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidadPasajeros" runat="server" HighlightCssClass="VCOCantidadPasajeros"
|
||||
TargetControlID="RFVCantidadPasajeros" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-users"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Tipo Unidad</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoAF" runat="server" ControlToValidate="DdlTipoAF"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Unidad''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETipoAF" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTipoAF" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
<div class="input-group">
|
||||
|
||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoAF" runat="server" ControlToValidate="DdlTipoAF"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Unidad''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETipoAF" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTipoAF" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-bus"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<div class="row">
|
||||
<label class="col-md-4">Costo dólares</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
<div class="input-group">
|
||||
<asp:TextBox ID="TxtDolares" runat="server" CssClass="form-control" type="number"></asp:TextBox>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-usd"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Costo pesos</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtPesos" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
<div class="input-group">
|
||||
<asp:TextBox ID="TxtPesos" runat="server" CssClass="form-control" type="number"></asp:TextBox>
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-usd"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<div class="row">
|
||||
<label class="col-md-4">Anticipo</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" Width="95%" runat="server"
|
||||
type="decimal"></asp:TextBox>
|
||||
<span class="fa fa-percent"></span>
|
||||
<div class="input-group">
|
||||
<asp:TextBox ID="TxtAnticipo" runat="server" CssClass="form-control" type="number"></asp:TextBox>
|
||||
<div class="input-group-addon">%</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -283,6 +283,26 @@ Partial Class RepContratoDetalle
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub ImprimirContrato(sender As Object, e As EventArgs)
|
||||
Dim dtResult As New DataTable()
|
||||
|
||||
Dim params As New List(Of ReportParameter) From {
|
||||
New ReportParameter("Folio", LbFolio.Text),
|
||||
New ReportParameter("Cliente", DdlClientes.SelectedText),
|
||||
New ReportParameter("Servicio", TxtDescripcion.Text),
|
||||
New ReportParameter("Observaciones", TxtObservaciones.Text),
|
||||
New ReportParameter("Ubicacion", TxtUbicacion.Text),
|
||||
New ReportParameter("FechaSalida", TxtFechaSalida.Text.ToDate.ToString("HH:mm")),
|
||||
New ReportParameter("FechaRegreso", TxtFechaRegreso.Text.ToDate.ToString("HH:mm")),
|
||||
New ReportParameter("CantidadPasajeros", TxtCantidadPasajeros.Text),
|
||||
New ReportParameter("TipoAF", DdlTipoAF.Text),
|
||||
New ReportParameter("Dolares", Math.Round(TxtDolares.Text.ToDecimal, 2).ToString),
|
||||
New ReportParameter("Pesos", Math.Round(TxtPesos.Text.ToDecimal, 2).ToString),
|
||||
New ReportParameter("Anticipo", (TxtAnticipo.Text.ToDecimal * 100).ToString)
|
||||
}
|
||||
|
||||
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos\Contrato.mrt", dtResult, params, NombreArchivo:="Contrato")
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Boletos"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar" UpdateMode="Always">
|
||||
<asp:UpdatePanel runat="server" ID="UpAcciones" UpdateMode="Always">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkComisiones" OnClick="LnkComisiones_Click" data-toggle="tooltip" data-placement="left" title="Comisiones" Text="<i class='fa fa-money'></i> Comisiones"></asp:LinkButton>
|
||||
@@ -81,41 +81,32 @@
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
<%-- <label class="col-md-1 ">Cliente:</label>
|
||||
<label class="col-md-1 ">Médico:</label>
|
||||
<div class="col-md-1">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
<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 ">Grupo:</label>
|
||||
<label class="col-md-1 ">Vendedor:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlGrupo" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Value="1" Selected="True">Médico</asp:ListItem>
|
||||
<asp:ListItem Value="2" >Procedimiento</asp:ListItem>
|
||||
<asp:ListItem Value="3" >Clientes</asp:ListItem>
|
||||
<asp:DropDownList ID="DdlVendedor" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>--%>
|
||||
</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>
|
||||
<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" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Procedimiento:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Width="100%">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div> --%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -132,81 +123,31 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveMedico,Nombre,APaterno,AMaterno,CedulaProfesional,FechaNacimiento,Notas,Estatus,CveUsuario,FechaIng,CveEmpresa,Telefono,Mail,CveMedicoEspecialidad,CveMedicoSubEspecialidad,Celular,Usuario,CveVendedor"
|
||||
DataKeyNames="CveVenta,SerieFolio,Hospital,Medico,Especialidad,FechaCirugia,Procedimiento,Codigo,PU,Cantidad,Total,CveVendedor,Vendedor,Nombre,ComisionMedico,ComisionVendedor,ComisionTecnico"
|
||||
data-sort="true"
|
||||
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:TemplateField HeaderText="Nombre" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Apellido Paterno" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAPaterno" runat="server" Text='<%# Eval("APaterno") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Apellido Materno" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAMaterno" runat="server" Text='<%# Eval("AMaterno") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cédula Profesional" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCedulaProfesional" runat="server" Text='<%# Eval("CedulaProfesional") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Nacimiento" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaNacimiento" runat="server" Text='<%# Eval("FechaNacimiento", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Teléfono" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTelefono" runat="server" Text='<%# Eval("Telefono") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Correo" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCorreo" runat="server" Text='<%# Eval("Mail") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Hospital" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlHospital" runat="server" Text='<%# Eval("Hospital") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Consultorio" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConsultorio" runat="server" Text='<%# Eval("Consultorio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Especialidad" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEspecialidad" runat="server" Text='<%# Eval("Especialidad") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlVendedor" runat="server" Text='<%# Eval("Vendedor") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("EstatusStr") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:BoundField HeaderText="Folio" DataField="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" />
|
||||
<asp:BoundField HeaderText="Fecha Hora Cirugia" DataField="FechaCirugia" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:dd/MM/yyyy hh:mm}" />
|
||||
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Código Producto" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Nombre Del Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Precio Unitario" DataField="PU" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Cantidad Utilizada" DataField="Cantidad" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Monto Venta Total" DataField="Total" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Comisión Vendedor" DataField="ComisionVendedor" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField HeaderText="Técnico" DataField="Nombre" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Comisión Técnico" DataField="ComisionTecnico" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField HeaderText="Educación Médica" DataField="ComisionMedico" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
@@ -223,7 +164,7 @@
|
||||
|
||||
|
||||
<div id="DvModalComisiones" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 650px;">
|
||||
<div class="modal-dialog" style="width: 800px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpDvModalComisiones" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
@@ -247,13 +188,13 @@
|
||||
EmptyDataText="No se encontraron Comisiones" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Codigo/Producto" ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField HeaderText="Código/Producto" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigoPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Medico" ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField HeaderText="Médico" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtComisionMedico" Width="75px" runat="server" Text='<%# String.Format("{0:#.00}", Eval("ComisionMedico")) %>' Style="text-align: right;" onkeyup="FormatoMoneda(this)" AutoComplete="off"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -1,40 +1,86 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Extensions.Primitives
|
||||
|
||||
|
||||
Partial Class Ventas_RepComisionesSMS
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
Property DTDatos As DataTable
|
||||
Get
|
||||
If ViewState("DTDatos") Is Nothing Then
|
||||
ViewState("DTDatos") = New DataTable
|
||||
End If
|
||||
Return DirectCast(ViewState("DTDatos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
Dim FechaInicial As Date = New Date(10)
|
||||
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToString("dd/MM/yyyy")
|
||||
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
|
||||
'If UsuarioActual.Empresa.Funcionalidad(302) = "1" AndAlso DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then
|
||||
' DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros(String.Format("VendedorTipo IN (1,4) AND (CveSubProyecto IS NULL OR CveSubProyecto = {0})", DdlSubProyectoDatos.SelectedValue))
|
||||
'Else
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros("VendedorTipo = 1")
|
||||
'End If
|
||||
DdlVendedor.DataBind()
|
||||
DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedico.DataBind()
|
||||
DdlMedico.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlUsuarioAtendio.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||
DdlUsuarioAtendio.DataBind()
|
||||
DdlUsuarioAtendio.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
|
||||
|
||||
'Dim ObjVentas As New ClsVentas
|
||||
|
||||
'If ObjVentas.GetMedicos(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
' GvDatos.DataSource = ObjVentas.DtResultados
|
||||
'Else
|
||||
' GvDatos.DataSource = Nothing
|
||||
'End If
|
||||
LnkExportar.Visible = False
|
||||
|
||||
'ObjVentas.Dispose()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
'GvDatos.DataBind()
|
||||
If ObjVentas.GetComisionesMedicasRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, -1, -1, DdlMedico.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, -1) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
|
||||
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
LnkExportar.Visible = True
|
||||
End If
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
'UpDatos.Update()
|
||||
|
||||
|
||||
|
||||
@@ -49,10 +95,10 @@ Partial Class Ventas_RepComisionesSMS
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
GvDatos.Columns(10).Visible = False
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
||||
GvDatos.ExportToExcelGembox("CatMedicos", UsuarioActual, "Catálogo de Médicos", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||
GvDatos.Columns(10).Visible = True
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
||||
GvDatos.ExportToExcelGembox("CatMedicos", UsuarioActual, "Catálogo de Médicos", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||
GvDatos.Columns(10).Visible = True
|
||||
|
||||
|
||||
|
||||
@@ -70,13 +116,14 @@ Partial Class Ventas_RepComisionesSMS
|
||||
End Sub
|
||||
|
||||
Private Sub CargaComisiones()
|
||||
|
||||
DTDatos = New DataTable
|
||||
GvComisiones.DataSource = Nothing
|
||||
|
||||
Dim objVentas As New ClsVentas
|
||||
|
||||
If objVentas.GetComisionesMedicas(UsuarioActual.CveEmpresa) Then
|
||||
GvComisiones.DataSource = objVentas.DtResultados
|
||||
DTDatos = objVentas.DtResultados
|
||||
End If
|
||||
|
||||
objVentas.Dispose()
|
||||
@@ -98,8 +145,19 @@ Partial Class Ventas_RepComisionesSMS
|
||||
|
||||
For Each GvRow As GridViewRow In GvComisiones.Rows
|
||||
|
||||
If Not objVentas.AddUpdateComisionesMedicas(GvRow.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, GvRow.FCTextBox("TxtComisionMedico").Text.ToDecimal, GvRow.FCTextBox("TxtComisionVendedor").Text.ToDecimal, GvRow.FCTextBox("TxtComisionTecnico").Text.ToDecimal) Then
|
||||
TieneError = True
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim ComisionMedicoDT As Decimal = DTDatos.FiltroPrimeroValor("ComisionMedico", $"CvePS = {CvePS} ").ToDecimal
|
||||
Dim ComisionVendedorDT As Decimal = DTDatos.FiltroPrimeroValor("ComisionVendedor", $"CvePS = {CvePS} ").ToDecimal
|
||||
Dim ComisionTecnicoDT As Decimal = DTDatos.FiltroPrimeroValor("ComisionTecnico", $"CvePS = {CvePS} ").ToDecimal
|
||||
|
||||
Dim ComisionMedicoGV As Decimal = GvRow.FCTextBox("TxtComisionMedico").Text.ToDecimal
|
||||
Dim ComisionVendedorGV As Decimal = GvRow.FCTextBox("TxtComisionVendedor").Text.ToDecimal
|
||||
Dim ComisionTecnicoGV As Decimal = GvRow.FCTextBox("TxtComisionTecnico").Text.ToDecimal
|
||||
|
||||
If ComisionMedicoDT <> ComisionMedicoGV Or ComisionVendedorDT <> ComisionVendedorGV Or ComisionTecnicoDT <> ComisionTecnicoGV Then
|
||||
If Not objVentas.AddUpdateComisionesMedicas(GvRow.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, ComisionMedicoGV, ComisionVendedorGV, ComisionTecnicoGV) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Reference in New Issue
Block a user