-- considerar los importes de educación del médico, desde la venta, si tiene dato
This commit is contained in:
@@ -180,13 +180,15 @@
|
|||||||
|
|
||||||
<asp:BoundField HeaderText="$ E. Médica" DataField="ComisionMedico" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<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" />
|
<asp:BoundField HeaderText="Fecha Pago" DataField="FechaPago" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" ControlStyle-Width="100px" />
|
||||||
|
<asp:TemplateField HeaderText="Pagada" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:CheckBox ID="ChkPagada" Visible='<%# If(Eval("CveVenta").ToString <> "", True, False) %>' Checked='<%#If(Eval("Num1").ToString = "1", True, False) %>' AutoPostBack ="true" runat="server" OnCheckedChanged="ChkPagada_CheckedChanged"></asp:CheckBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.Data.SqlClient
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
|
||||||
Partial Class Ventas_RepComisionesSMS
|
Partial Class Ventas_RepComisionesSMS
|
||||||
@@ -47,6 +48,7 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor)
|
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor)
|
||||||
DdlVendedor.Enabled = False
|
DdlVendedor.Enabled = False
|
||||||
GvDatos.Columns(16).Visible = False 'gerente
|
GvDatos.Columns(16).Visible = False 'gerente
|
||||||
|
GvDatos.Columns(19).Visible = False 'pagada
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||||
@@ -62,6 +64,7 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
GvDatos.Columns(16).Visible = False 'gerente
|
GvDatos.Columns(16).Visible = False 'gerente
|
||||||
GvDatos.Columns(17).Visible = False 'ed.medica
|
GvDatos.Columns(17).Visible = False 'ed.medica
|
||||||
GvDatos.Columns(18).Visible = False 'fecha pago
|
GvDatos.Columns(18).Visible = False 'fecha pago
|
||||||
|
GvDatos.Columns(19).Visible = False 'pagada
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -91,10 +94,8 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
|
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "EXCEL"
|
#Region "EXCEL"
|
||||||
@@ -115,7 +116,6 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
Protected Sub LnkComisiones_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkComisiones_Click(sender As Object, e As EventArgs)
|
||||||
CargaComisiones()
|
CargaComisiones()
|
||||||
RegistraScript("$('#DvModalComisiones').modal('show');")
|
RegistraScript("$('#DvModalComisiones').modal('show');")
|
||||||
@@ -124,24 +124,18 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
Private Sub CargaComisiones()
|
Private Sub CargaComisiones()
|
||||||
DTDatos = New DataTable
|
DTDatos = New DataTable
|
||||||
GvComisiones.DataSource = Nothing
|
GvComisiones.DataSource = Nothing
|
||||||
|
|
||||||
Dim objVentas As New ClsVentas
|
Dim objVentas As New ClsVentas
|
||||||
|
|
||||||
If objVentas.GetComisionesMedicas(UsuarioActual.CveEmpresa) Then
|
If objVentas.GetComisionesMedicas(UsuarioActual.CveEmpresa) Then
|
||||||
GvComisiones.DataSource = objVentas.DtResultados
|
GvComisiones.DataSource = objVentas.DtResultados
|
||||||
DTDatos = objVentas.DtResultados
|
DTDatos = objVentas.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|
||||||
objVentas.Dispose()
|
objVentas.Dispose()
|
||||||
|
|
||||||
GvComisiones.DataBind()
|
GvComisiones.DataBind()
|
||||||
|
|
||||||
UpDvModalComisiones.Update()
|
UpDvModalComisiones.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub BtnGuardarComisiones_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnGuardarComisiones_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim objVentas As New ClsVentas
|
Dim objVentas As New ClsVentas
|
||||||
@@ -162,7 +156,6 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
Dim ComisionVendedorGV As Decimal = (GvRow.FCTextBox("TxtComisionVendedor").Text.ToDecimal / 100).RoundSQL(4)
|
Dim ComisionVendedorGV As Decimal = (GvRow.FCTextBox("TxtComisionVendedor").Text.ToDecimal / 100).RoundSQL(4)
|
||||||
Dim ComisionTecnicoGV As Decimal = (GvRow.FCTextBox("TxtComisionTecnico").Text.ToDecimal / 100).RoundSQL(4)
|
Dim ComisionTecnicoGV As Decimal = (GvRow.FCTextBox("TxtComisionTecnico").Text.ToDecimal / 100).RoundSQL(4)
|
||||||
|
|
||||||
|
|
||||||
If ComisionMedicoDT <> ComisionMedicoGV Or ComisionVendedorDT <> ComisionVendedorGV Or ComisionTecnicoDT <> ComisionTecnicoGV Or ComisionGerenteDT <> ComisionGerenteGV Then
|
If ComisionMedicoDT <> ComisionMedicoGV Or ComisionVendedorDT <> ComisionVendedorGV Or ComisionTecnicoDT <> ComisionTecnicoGV Or ComisionGerenteDT <> ComisionGerenteGV Then
|
||||||
If Not objVentas.AddUpdateComisionesMedicas(GvRow.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, ComisionMedicoGV, ComisionVendedorGV, ComisionTecnicoGV, ComisionGerenteGV) Then
|
If Not objVentas.AddUpdateComisionesMedicas(GvRow.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, ComisionMedicoGV, ComisionVendedorGV, ComisionTecnicoGV, ComisionGerenteGV) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
@@ -194,14 +187,12 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
e.Row.FCTextBox("TxtComisionMedico").Text = e.Row.DataKey("ComisionMedico").ToDecimal.ToString("###.00")
|
e.Row.FCTextBox("TxtComisionMedico").Text = e.Row.DataKey("ComisionMedico").ToDecimal.ToString("###.00")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If e.Row.DataKey("ComisionGerente").ToDecimal = 0 Then
|
If e.Row.DataKey("ComisionGerente").ToDecimal = 0 Then
|
||||||
e.Row.FCTextBox("TxtComisionGerente").Text = ""
|
e.Row.FCTextBox("TxtComisionGerente").Text = ""
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TxtComisionGerente").Text = (e.Row.DataKey("ComisionGerente").ToDecimal * 100).ToString("###.00")
|
e.Row.FCTextBox("TxtComisionGerente").Text = (e.Row.DataKey("ComisionGerente").ToDecimal * 100).ToString("###.00")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If e.Row.DataKey("ComisionVendedor").ToDecimal = 0 Then
|
If e.Row.DataKey("ComisionVendedor").ToDecimal = 0 Then
|
||||||
e.Row.FCTextBox("TxtComisionVendedor").Text = ""
|
e.Row.FCTextBox("TxtComisionVendedor").Text = ""
|
||||||
Else
|
Else
|
||||||
@@ -214,8 +205,6 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
e.Row.FCTextBox("TxtComisionTecnico").Text = (e.Row.DataKey("ComisionTecnico").ToDecimal * 100).ToString("###.00")
|
e.Row.FCTextBox("TxtComisionTecnico").Text = (e.Row.DataKey("ComisionTecnico").ToDecimal * 100).ToString("###.00")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -379,4 +368,14 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub ChkPagada_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
|
Dim chk As CheckBox = DirectCast(sender, CheckBox)
|
||||||
|
Dim gvr As GridViewRow = DirectCast(chk.NamingContainer, GridViewRow)
|
||||||
|
Using ObjVenta As New ClsVentas
|
||||||
|
If ObjVenta.UpdateVentaAdicional(gvr.DataKey("CveVenta").ToEntero, "NUM1", If(chk.Checked, "1", "0"), UsuarioActual.CveEmpresa) Then
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user