This commit is contained in:
2021-12-02 21:05:29 -07:00
9 changed files with 506 additions and 191 deletions

View File

@@ -1,24 +1,24 @@
Imports Extensiones
Imports System.Data
Partial Class Acarreos_CatChoferes
Imports Extensiones
Imports System.Data
Partial Class Acarreos_CatChoferes
Inherits ClsPaginas
#Region " PROPIEDADES"
#Region " PROPIEDADES"
#End Region
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaDatos()
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaDatos()
CargaDdlTransportista()
Dim DT As DataTable = GlobalDTColonia(-1)
CargaDdls()
End If
End If
End Sub
@@ -36,30 +36,30 @@ Partial Class Acarreos_CatChoferes
DdlColonia.Items.Insert(0, New ListItem("Seleccione Una", "-1"))
End Sub
Private Sub CargaDatos()
Dim ObjAcar As New ClsAcarreos()
If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, -1,-1) Then
GvChofer.DataSource = ObjAcar.DtResultados
GvChofer.DataBind()
End If
ObjAcar.Dispose()
UpDatos.Update()
End Sub
Private Sub CargaDdlTransportista()
Dim ObjAcar As New ClsAcarreos()
If ObjAcar.GetTransportista(-1, UsuarioActual.CveEmpresa, 1) Then
DdlTransportista.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlTransportista.DataSource = ObjAcar.DtResultados
DdlTransportista.DataBind()
End If
ObjAcar.Dispose()
UpAddChofer.Update()
End Sub
End Sub
Private Sub CargaDatos()
Dim ObjAcar As New ClsAcarreos()
If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, -1, -1) Then
GvChofer.DataSource = ObjAcar.DtResultados
GvChofer.DataBind()
End If
ObjAcar.Dispose()
UpDatos.Update()
End Sub
Private Sub CargaDdlTransportista()
Dim ObjAcar As New ClsAcarreos()
If ObjAcar.GetTransportista(-1, UsuarioActual.CveEmpresa, 1) Then
DdlTransportista.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlTransportista.DataSource = ObjAcar.DtResultados
DdlTransportista.DataBind()
End If
ObjAcar.Dispose()
UpAddChofer.Update()
End Sub
Private Sub BtnAgregarChofer_Click(sender As Object, e As EventArgs) Handles BtnAgregarChofer.Click
@@ -70,66 +70,66 @@ Partial Class Acarreos_CatChoferes
End If
If DdlTransportista.SelectedValue = "-1" Then
Alert("Tiene que seleccionar un transportista.", TipoMensaje.MsgAdvertencia)
Else
Dim ObjAcar As New ClsAcarreos
Dim Estatus = 0
If DdlTransportista.SelectedValue = "-1" Then
Alert("Tiene que seleccionar un transportista.", TipoMensaje.MsgAdvertencia)
Else
Dim ObjAcar As New ClsAcarreos
Dim Estatus = 0
If ChkEstatus.Checked Then Estatus = 1
If HdnModalidad.Value = "A" Then
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then
CargaDatos()
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
End If
ElseIf HdnModalidad.Value = "U" Then
If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then
CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
End If
End If
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer"))
ObjAcar.Dispose()
UpDatos.Update()
End If
End Sub
If HdnModalidad.Value = "A" Then
If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then
CargaDatos()
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
End If
ElseIf HdnModalidad.Value = "U" Then
If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then
CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
End If
End If
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer"))
ObjAcar.Dispose()
UpDatos.Update()
End If
End Sub
Public Sub Edit_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnModalidad.Value = "U"
HdnID.Value = GvRow.DataKey("CveChofer")
UpDatos.Update()
BtnAgregarChofer.Text = "Actualizar"
myModalLabel.InnerText = "Actualizar Chofer"
TxtChofer.Text = GvRow.DataKey("Chofer")
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnModalidad.Value = "U"
HdnID.Value = GvRow.DataKey("CveChofer")
UpDatos.Update()
BtnAgregarChofer.Text = "Actualizar"
myModalLabel.InnerText = "Actualizar Chofer"
TxtChofer.Text = GvRow.DataKey("Chofer")
TxtIdentificacion.Text = GvRow.DataKey("Identificacion")
TxtTelefono.Text = GvRow.DataKey("Telefono")
TxtRFC.Text = GvRow.DataKey("RFC")
TxtTelefono.Text = GvRow.DataKey("Telefono")
TxtRFC.Text = GvRow.DataKey("RFC")
TxtDomicilio.Text = GvRow.DataKey("Domicilio")
TxtNumInt.Text = GvRow.DataKey("NumeroInterior")
TxtNumExt.Text = GvRow.DataKey("NumeroExterior")
'TxtColonia.Text = GvRow.DataKey("Colonia")
'TxtCiudad.Text = GvRow.DataKey("Ciudad")
'TxtEstado.Text = GvRow.DataKey("Estado")
TxtCP.Text = GvRow.DataKey("CP")
'TxtCiudad.Text = GvRow.DataKey("Ciudad")
'TxtEstado.Text = GvRow.DataKey("Estado")
TxtCP.Text = GvRow.DataKey("CP")
TxtLicencia.Text = GvRow.DataKey("Licencia")
TxtNumRegidTribOperador.Text = GvRow.DataKey("NumRegidTribOperador")
DdlResidenciaFiscalOperador.SelectedValueExist("-1")
DdlResidenciaFiscalOperador.SelectedValueExist(GvRow.DataKey("ResidenciaFiscalOperador"))
DdlResidenciaFiscalOperador.SelectedValueExist(GvRow.DataKey("ResidenciaFiscalOperador"))
DdlTransportista.SelectedValueExist(GvRow.DataKey("CveTransportista"))
divEstatus.Visible = True
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
divEstatus.Visible = True
ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus"))
DdlEstado.SelectedValueExist(GvRow.DataKey("CveEstado"))
@@ -168,34 +168,34 @@ Partial Class Acarreos_CatChoferes
UpAddChofer.Update()
UpAddChofer.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChofer"))
End Sub
Public Sub Agregar()
HdnModalidad.Value = "A"
UpDatos.Update()
BtnAgregarChofer.Text = "Agregar"
myModalLabel.InnerText = "Agregar Chofer"
TxtChofer.Text = ""
TxtIdentificacion.Text = ""
TxtDomicilio.Text = ""
TxtTelefono.Text = ""
'TxtCiudad.Text = ""
TxtLicencia.Text = ""
DdlTransportista.SelectedValueExist(-1)
TxtRFC.Text = ""
TxtNumInt.Text = ""
TxtNumExt.Text = ""
'TxtEstado.Text = ""
TxtCP.Text = ""
'TxtColonia.Text = ""
TxtNumRegidTribOperador.Text = ""
End Sub
Public Sub Agregar()
HdnModalidad.Value = "A"
UpDatos.Update()
BtnAgregarChofer.Text = "Agregar"
myModalLabel.InnerText = "Agregar Chofer"
TxtChofer.Text = ""
TxtIdentificacion.Text = ""
TxtDomicilio.Text = ""
TxtTelefono.Text = ""
'TxtCiudad.Text = ""
TxtLicencia.Text = ""
DdlTransportista.SelectedValueExist(-1)
TxtRFC.Text = ""
TxtNumInt.Text = ""
TxtNumExt.Text = ""
'TxtEstado.Text = ""
TxtCP.Text = ""
'TxtColonia.Text = ""
TxtNumRegidTribOperador.Text = ""
DdlResidenciaFiscalOperador.SelectedValueExist("-1")
@@ -206,40 +206,40 @@ Partial Class Acarreos_CatChoferes
DdlColonia.SelectedValueExist(-1)
ChkEstatus.Checked = True
divEstatus.Visible = False
UpAddChofer.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChofer"))
End Sub
Public Sub Delete_Click(sender As Object, e As EventArgs)
Dim ObjAcar As New ClsAcarreos()
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnID.Value = GvRow.DataKey("CveChofer")
UpDatos.Update()
If ObjAcar.RemoveChofer(HdnID.Value) Then
CargaDatos()
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
End If
ObjAcar.Dispose()
UpDatos.Update()
End Sub
Private Sub GvChofer_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvChofer.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Estatus") = True Then
e.Row.FCLabel("LblEstatus").Text = "Activo"
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green
Else
e.Row.FCLabel("LblEstatus").Text = "Inactivo"
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red
End If
End If
End Sub
Private Sub LnkChofer_Click(sender As Object, e As EventArgs) Handles LnkChofer.Click
Agregar()
ChkEstatus.Checked = True
divEstatus.Visible = False
UpAddChofer.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChofer"))
End Sub
Public Sub Delete_Click(sender As Object, e As EventArgs)
Dim ObjAcar As New ClsAcarreos()
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnID.Value = GvRow.DataKey("CveChofer")
UpDatos.Update()
If ObjAcar.RemoveChofer(HdnID.Value) Then
CargaDatos()
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
End If
ObjAcar.Dispose()
UpDatos.Update()
End Sub
Private Sub GvChofer_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvChofer.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Estatus") = True Then
e.Row.FCLabel("LblEstatus").Text = "Activo"
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green
Else
e.Row.FCLabel("LblEstatus").Text = "Inactivo"
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red
End If
End If
End Sub
Private Sub LnkChofer_Click(sender As Object, e As EventArgs) Handles LnkChofer.Click
Agregar()
End Sub
Protected Sub LnkValidar_Click(sender As Object, e As EventArgs)
@@ -331,4 +331,4 @@ Partial Class Acarreos_CatChoferes
Protected Sub DdlColonia_SelectedIndexChanged(sender As Object, e As EventArgs)
validaCodigoPostal()
End Sub
End Class
End Class

View File

@@ -3871,7 +3871,7 @@ Public Class ClsPaginas
Property GlobalDTClientesVendedoresSubProyectos(CveEmpresa As Integer) As DataTable
Property GlobalDTClientesVendedoresSubProyectos(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveSubProyecto As Integer = -1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTClientesVendedoresSubProyectos-{0}", CveEmpresa)
@@ -3880,9 +3880,13 @@ Public Class ClsPaginas
If ObjInv.GetClientesVendedoresSubProyectos(-1, -1, -1, CveEmpresa) Then Application(AppNombre) = ObjInv.DtResultados
ObjInv.Dispose()
End If
Dim Str As StringBuilder = New StringBuilder()
Str.Append("1 = 1 ")
If CveCliente <> -1 Then Str.AppendFormat(" AND CveCliente = {0} ", CveCliente)
If CveSubProyecto <> -1 Then Str.AppendFormat(" AND CveSubProyecto = {0} ", CveSubProyecto)
GlobalDTClientesVendedoresSubProyectos = DirectCast(Application(AppNombre), DataTable)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTClientesVendedoresSubProyectos = Dv.ToTable
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTClientesVendedoresSubProyectos-{0}", CveEmpresa)

View File

@@ -2769,8 +2769,9 @@ Partial Class Bancos_IE
ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal), Ref, 66, Conc, Now, IDCtaContable, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-(TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal), ImporteME:=tImporteMonedaExtranjera)
If TxtIvaIxC.Text.ToDouble > 0 Then
Dim PorcentajeIVA = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2)
'Iva
ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -TxtIvaIxC.Text.ToDecimal, Ref, 61, Conc, Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera)
ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -TxtIvaIxC.Text.ToDecimal, Ref, 61, Conc, Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=If(PorcentajeIVA.ToString().Contiene("0.08", "0.16"), PorcentajeIVA, 0))
End If
'Bancos
@@ -2862,7 +2863,8 @@ Partial Class Bancos_IE
If DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDecimal <> 0 Then
Dim CveConIVA As Integer = 61
If UsuarioActual.CveEmpresa = 70 Then CveConIVA = 299
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, CveConIVA, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera) Then
Dim PorcentajeIVA = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2)
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, CveConIVA, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=PorcentajeIVA) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If
End If

View File

@@ -848,7 +848,7 @@ Partial Class Bancos_PolizaCheque
Next
If Not ValidaConcepto30 Then
Alert("El importe no coicide con el concepto de bancos.", TipoMensaje.MsgAdvertencia)
Alert("El importe no coincide con el concepto de bancos.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If

View File

@@ -933,6 +933,13 @@ Partial Class PopUpVerFactura
Dim NumPermiso As String = ""
Dim Aseguradora As String = ""
Dim NumPolizaSeguro As String = ""
Dim NombreAseguradoraMedioAmbiente As String = ""
Dim NumPolizaSeguroMedioAmbiente As String = ""
Dim NombreAseguradoraCarga As String = ""
Dim NumPolizaSeguroCarga As String = ""
Dim PlacaVM As String = ""
Dim AnioModeloVM As String = ""
'TIMBRADO
@@ -1064,6 +1071,14 @@ Partial Class PopUpVerFactura
NumPermiso = ValorXML(nodeAutotransporteFederal, "NumPermisoSCT", "")
Aseguradora = ValorXML(nodeAutotransporteFederal, "NombreAseg", "")
NumPolizaSeguro = ValorXML(nodeAutotransporteFederal, "NumPolizaSeguro", "")
'Por Definir de donde sale
'NombreAseguradoraMedioAmbiente = ValorXML(nodeAutotransporteFederal, "", "")
'NumPolizaSeguroMedioAmbiente = ValorXML(nodeAutotransporteFederal, "", "")
'NombreAseguradoraCarga = ValorXML(nodeAutotransporteFederal, "", "")
'NumPolizaSeguroCarga = ValorXML(nodeAutotransporteFederal, "", "")
End If
Dim nodeIdentificacionVehicular As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:IdentificacionVehicular", "cartaporte"), namespaces)
@@ -1181,8 +1196,16 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("TransporteInternacional", TransporteInternacional))
params.Add(New ReportParameter("PermisoSTCC", PermisoSTCC))
params.Add(New ReportParameter("NumPermiso", NumPermiso))
params.Add(New ReportParameter("Aseguradora", Aseguradora))
params.Add(New ReportParameter("NumPoliza", NumPolizaSeguro))
params.Add(New ReportParameter("NombreAseguradoraMedioAmbiente", NombreAseguradoraMedioAmbiente))
params.Add(New ReportParameter("NumPolizaSeguroMedioAmbiente", NumPolizaSeguroMedioAmbiente))
params.Add(New ReportParameter("NombreAseguradoraCarga", NombreAseguradoraCarga))
params.Add(New ReportParameter("NumPolizaSeguroCarga", NumPolizaSeguroCarga))
params.Add(New ReportParameter("PlacaVM", PlacaVM))
params.Add(New ReportParameter("AnioVM", AnioModeloVM))
'TIMBRADO

View File

@@ -382,7 +382,7 @@
<RepeatColumnHeaders>true</RepeatColumnHeaders>
<FixedColumnHeaders>true</FixedColumnHeaders>
<DataSetName>DataSet3</DataSetName>
<Top>5.56865cm</Top>
<Top>6.39415cm</Top>
<Left>0.38395cm</Left>
<Height>1.12062cm</Height>
<Width>19.11271cm</Width>
@@ -521,7 +521,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>4.97857cm</Top>
<Top>5.80407cm</Top>
<Left>0.1841in</Left>
<Height>0.5cm</Height>
<Width>7.52776in</Width>
@@ -1001,7 +1001,7 @@
<RepeatColumnHeaders>true</RepeatColumnHeaders>
<FixedColumnHeaders>true</FixedColumnHeaders>
<DataSetName>DataSet2</DataSetName>
<Top>7.3763cm</Top>
<Top>8.2018cm</Top>
<Left>0.42363cm</Left>
<Height>1.12062cm</Height>
<Width>19.10097cm</Width>
@@ -1033,7 +1033,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>6.78622cm</Top>
<Top>7.61172cm</Top>
<Left>0.19973in</Left>
<Height>0.5cm</Height>
<Width>7.52776in</Width>
@@ -1346,7 +1346,7 @@
<RepeatColumnHeaders>true</RepeatColumnHeaders>
<FixedColumnHeaders>true</FixedColumnHeaders>
<DataSetName>DataSet4</DataSetName>
<Top>9.18605cm</Top>
<Top>10.01155cm</Top>
<Left>0.42363cm</Left>
<Height>1.12062cm</Height>
<Width>19.10097cm</Width>
@@ -1378,7 +1378,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>8.59597cm</Top>
<Top>9.42147cm</Top>
<Left>0.19972in</Left>
<Height>0.5cm</Height>
<Width>7.52776in</Width>
@@ -1482,7 +1482,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox45</rd:DefaultName>
<Top>5.82267in</Top>
<Top>6.14767in</Top>
<Left>0.41187cm</Left>
<Height>3.03416cm</Height>
<Width>15.44579cm</Width>
@@ -1501,7 +1501,7 @@
<Source>External</Source>
<Value>=Parameters!QR.Value</Value>
<Sizing>FitProportional</Sizing>
<Top>5.71082in</Top>
<Top>6.03582in</Top>
<Left>6.18415in</Left>
<Height>1.2939in</Height>
<Width>1.53682in</Width>
@@ -1636,7 +1636,7 @@
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>1.13111in</Top>
<Left>0.38395cm</Left>
<Height>0.76862in</Height>
<Height>1.08451in</Height>
<Width>3.73231in</Width>
<ZIndex>9</ZIndex>
<Style>
@@ -1696,10 +1696,10 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Aseguradora: </Value>
<Value>Aseguradora Responsabilidad Civil: </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
<FontSize>7pt</FontSize>
<FontWeight>SemiBold</FontWeight>
</Style>
</TextRun>
@@ -1707,7 +1707,7 @@
<Value>=Parameters!Aseguradora.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
<FontSize>7pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
@@ -1722,7 +1722,7 @@
<Value>Número de Póliza:</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
<FontSize>7pt</FontSize>
<FontWeight>SemiBold</FontWeight>
</Style>
</TextRun>
@@ -1730,7 +1730,99 @@
<Value>=Parameters!NumPoliza.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
<FontSize>7pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Aseguradora Medio Ambiente:</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!NombreAseguradoraMedioAmbiente.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Número de Póliza:</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>SemiBold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!NumPolizaSeguroMedioAmbiente.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Aseguradora Carga:</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!NombreAseguradoraCarga.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Número de Póliza:</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>SemiBold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!NumPolizaSeguroCarga.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
@@ -1745,7 +1837,7 @@
<Value>Placa:</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
<FontSize>7pt</FontSize>
<FontWeight>SemiBold</FontWeight>
</Style>
</TextRun>
@@ -1753,7 +1845,7 @@
<Value>=Parameters!PlacaVM.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
<FontSize>7pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
@@ -1768,7 +1860,7 @@
<Value>Año:</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
<FontSize>7pt</FontSize>
<FontWeight>SemiBold</FontWeight>
</Style>
</TextRun>
@@ -1776,7 +1868,7 @@
<Value>=Parameters!AnioVM.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
<FontSize>7pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
@@ -1784,7 +1876,7 @@
<Value xml:space="preserve"> </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
<FontSize>7pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
@@ -1797,7 +1889,7 @@
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>1.13111in</Top>
<Left>9.86403cm</Left>
<Height>0.76862in</Height>
<Height>1.08451in</Height>
<Width>3.78138in</Width>
<ZIndex>11</ZIndex>
<Style>
@@ -2315,7 +2407,7 @@
<RepeatColumnHeaders>true</RepeatColumnHeaders>
<FixedColumnHeaders>true</FixedColumnHeaders>
<DataSetName>DataSet1</DataSetName>
<Top>11.01962cm</Top>
<Top>11.84512cm</Top>
<Left>0.33883cm</Left>
<Height>1.12062cm</Height>
<Width>19.09433cm</Width>
@@ -2347,7 +2439,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>10.42954cm</Top>
<Top>11.25504cm</Top>
<Left>0.16633in</Left>
<Height>0.5cm</Height>
<Width>7.52776in</Width>
@@ -2384,7 +2476,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>4.896in</Top>
<Top>5.221in</Top>
<Left>6.37477in</Left>
<Height>0.60856cm</Height>
<Width>1.30108in</Width>
@@ -2423,7 +2515,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>12.43583cm</Top>
<Top>13.26133cm</Top>
<Left>5.24863in</Left>
<Height>0.60856cm</Height>
<Width>1.12683in</Width>
@@ -2461,7 +2553,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>5.13559in</Top>
<Top>5.46059in</Top>
<Left>6.37685in</Left>
<Height>0.60856cm</Height>
<Width>1.30108in</Width>
@@ -2503,7 +2595,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>13.04438cm</Top>
<Top>13.86988cm</Top>
<Left>5.25071in</Left>
<Height>0.60856cm</Height>
<Width>1.12683in</Width>
@@ -2541,7 +2633,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>5.37518in</Top>
<Top>5.70018in</Top>
<Left>6.37893in</Left>
<Height>0.60856cm</Height>
<Width>1.30108in</Width>
@@ -2580,7 +2672,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>13.65293cm</Top>
<Top>14.47843cm</Top>
<Left>5.25279in</Left>
<Height>0.60856cm</Height>
<Width>1.12614in</Width>
@@ -2739,7 +2831,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox25</rd:DefaultName>
<Top>12.43583cm</Top>
<Top>13.26133cm</Top>
<Left>0.42248cm</Left>
<Height>2.35375cm</Height>
<Width>12.73266cm</Width>
@@ -2755,7 +2847,7 @@
</Style>
</Textbox>
</ReportItems>
<Height>7.02116in</Height>
<Height>7.34222in</Height>
<Style />
</Body>
<Width>7.82749in</Width>
@@ -3574,6 +3666,30 @@
<Nullable>true</Nullable>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="NombreAseguradoraMedioAmbiente">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="NumPolizaSeguroMedioAmbiente">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="NombreAseguradoraCarga">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="NumPolizaSeguroCarga">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<Language>es-MX</Language>
<rd:ReportUnitType>Cm</rd:ReportUnitType>

View File

@@ -617,9 +617,11 @@
</div>
<div class="form-group form-md-line-input input-iconright" id="Div1" runat="server">
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control select2me" Width="200px" DataTextField="Vendedor" DataValueField="CveVendedor"></asp:DropDownList>
<asp:LinkButton ID="LnkAgregarVendedorSucursal" Visible="false" runat="server" data-toggle="tooltip" data-placement="right" title="Agregar vendedor por sucursal." CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar por Sucursal"></asp:LinkButton>
<label for="<%= DdlVendedor.ClientID.ToString()%>">Vendedor:</label>
</div>
<div class="form-group form-md-line-input input-iconright" id="Div2" runat="server">
@@ -6448,6 +6450,60 @@
</div>
</div>
<%--FIN MODAL CLIENTE PERSONAL ENTREGA--%>
<div id="DivVendedoresSucursales" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpVendedoresSucursales" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Vendedores por Sucursal</h4>
</div>
<div class="modal-body" style="width: 900px;">
<div class="row">
<div class="col-md-2">
<label>Vendedor:</label>
</div>
<div class="col-md-3">
<asp:DropDownList ID="DdlVendedorSucursalAsignar" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="Vendedor" DataValueField="CveVendedor">
</asp:DropDownList>
</div>
<div class="col-md-2">
<label>Sucursal:</label>
</div>
<div class="col-md-3">
<asp:DropDownList ID="DdlSucursalVendedor" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
</asp:DropDownList>
</div>
<div class="col-md-2">
<asp:Button ID="BtnAgregarVendedorSucursal" runat="server" CssClass="btn btn-primary" Text="Agregar" OnClick="BtnAgregarVendedorSucursal_Click" />
</div>
</div>
<br />
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvVendedoresSucursales" runat="server" DataKeyNames="CveVendedor,CveSubProyecto" GridLines="none" CssClass="tabla_correcto grides Widthall mysmallbtn" AutoGenerateColumns="False" ShowHeaderWhenEmpty="False" EmptyDataText="Lista de vendedores por sucursal">
<Columns>
<asp:BoundField HeaderText="Vendedor" ReadOnly="true" DataField="Vendedor" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Sucursal" ReadOnly="true" DataField="SubProyecto" ItemStyle-Width="70%" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%">
<ItemTemplate>
<asp:LinkButton ID="LnkEliminarVendedorSucursal" runat="server" AlternateText="Eliminar" OnClick="LnkEliminarVendedorSucursal_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el vendedor?" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">

View File

@@ -1373,12 +1373,15 @@ Partial Class Clientes
Dim item As New ListItem("Seleccione", "-1")
DdlVendedor.DataSource = dt
DdlVendedorSucursal.DataSource = dt
DdlVendedorSucursalAsignar.DataSource = dt
DdlVendedor.DataBind()
DdlVendedorSucursal.DataBind()
DdlVendedorSucursalAsignar.DataBind()
DdlVendedor.Items.Insert(0, item)
DdlVendedorSucursal.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlVendedorSucursal.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlVendedorSucursalAsignar.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub
@@ -1464,6 +1467,11 @@ Partial Class Clientes
If ObjClientes.Pais = "" Then ObjClientes.Pais = "México"
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCliente > 0 Then
LnkAgregarVendedorSucursal.Visible = True
End If
'Campos para Modificación
LtlCliente.Text = ObjClientes.Nombre
TxtNombre.Text = ObjClientes.Nombre
@@ -8563,7 +8571,11 @@ Partial Class Clientes
'CargaSubProyectos
DdlSubProyectoFiltro.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyectoFiltro.DataBind()
DdlSubProyectoFiltro.DataBind()
DdlSucursalVendedor.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSucursalVendedor.DataBind()
DdlSucursalVendedor.Items.Insert(0, New ListItem("Seleccione", "-1"))
'Vendedor
DdlVendedorFiltro.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
@@ -8577,17 +8589,17 @@ Partial Class Clientes
DdlPSFiltro.setEsWebService(True)
'If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
DdlPSFiltro.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacionFilto.SelectedValue)
DdlPSFiltro.SelectedText = ""
DdlPSFiltro.SelectedValue = "-1"
'Else
' DdlPSFiltro.ddl.Items.Clear()
' DdlPSFiltro.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacionFilto.SelectedValue.ToEntero())
' DdlPSFiltro.ddl.DataBind()
' DdlPSFiltro.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
'End If
DdlPSFiltro.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacionFilto.SelectedValue)
DdlPSFiltro.SelectedText = ""
DdlPSFiltro.SelectedValue = "-1"
'Else
' DdlPSFiltro.ddl.Items.Clear()
' DdlPSFiltro.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacionFilto.SelectedValue.ToEntero())
' DdlPSFiltro.ddl.DataBind()
' DdlPSFiltro.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
'End If
CargaGrupo()
CargaGrupo()
CargaTipoCentroCosto()
End Sub
@@ -10827,6 +10839,74 @@ Partial Class Clientes
End If
End Sub
Protected Sub LnkAgregarVendedorSucursal_Click(sender As Object, e As EventArgs) Handles LnkAgregarVendedorSucursal.Click
If CveCliente > 0 Then
DdlVendedorSucursalAsignar.SelectedValueExist("-1")
DdlSucursalVendedor.SelectedValueExist("-1")
CargaProveedoresSucursales()
RegistraScript("$('#DivVendedoresSucursales').modal('show');")
End If
End Sub
Private Sub CargaProveedoresSucursales()
Using ObjVentas As New ClsVentas
If ObjVentas.GetClientesVendedoresSubProyectos(Me.CveCliente, -1, -1, UsuarioActual.CveEmpresa) Then
GvVendedoresSucursales.DataSource = ObjVentas.DtResultados
End If
End Using
GvVendedoresSucursales.DataBind()
UpVendedoresSucursales.Update()
End Sub
Protected Sub LnkEliminarVendedorSucursal_Click(sender As Object, e As EventArgs)
Dim CveVendedor As Integer = DdlVendedorSucursalAsignar.SelectedValue.ToEntero()
Dim CveSubProyecto As Integer = DdlSucursalVendedor.SelectedValue.ToEntero()
Using ObjVentas As New ClsVentas
If ObjVentas.RemoveClientesVendedoresSubProyectos(Me.CveCliente, CveVendedor, CveSubProyecto, UsuarioActual.CveEmpresa) Then
Alert("Se eliminó el vendedor a la sucursal")
End If
End Using
DdlVendedorSucursalAsignar.SelectedValueExist("-1")
DdlSucursalVendedor.SelectedValueExist("-1")
CargaProveedoresSucursales()
RecargaGlobalDTVendedorSucursal()
End Sub
Protected Sub BtnAgregarVendedorSucursal_Click(sender As Object, e As EventArgs)
Dim CveVendedor As Integer = DdlVendedorSucursalAsignar.SelectedValue.ToEntero()
Dim CveSubProyecto As Integer = DdlSucursalVendedor.SelectedValue.ToEntero()
Dim Guardar As Boolean = True
Using ObjVentas As New ClsVentas
If ObjVentas.GetClientesVendedoresSubProyectos(Me.CveCliente, CveVendedor, CveSubProyecto, UsuarioActual.CveEmpresa) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
Guardar = False
Alert("El vendedor ya existe en esta sucursal", TipoMensaje.MsgAdvertencia)
End If
End If
If Guardar AndAlso ObjVentas.AddClientesVendedoresSubProyectos(Me.CveCliente, CveVendedor, CveSubProyecto, UsuarioActual.CveEmpresa) Then
Alert("Se agregó el vendedor a la sucursal")
End If
End Using
DdlVendedorSucursalAsignar.SelectedValueExist("-1")
DdlSucursalVendedor.SelectedValueExist("-1")
CargaProveedoresSucursales()
RecargaGlobalDTVendedorSucursal()
End Sub
Private Sub RecargaGlobalDTVendedorSucursal()
GlobalDTClientesVendedoresSubProyectos(UsuarioActual.CveEmpresa) = Nothing
End Sub
End Class

View File

@@ -6111,6 +6111,10 @@ Partial Class Ventas
End If
BloqueaCondiconesPago()
DeshabilitarAplicarNotaDeCredito(LblRFC.Text)
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
CargaVendedoresSubProyectos()
End If
End Sub
Private Sub CargaRelacionadasPendientes()
@@ -16572,6 +16576,10 @@ Partial Class Ventas
End If
ObjSubProyectos.Dispose()
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
CargaVendedoresSubProyectos()
End If
UpDetalle.Update()
End Sub
Private Sub CambiaSucursal(Optional RecargarPartidas As Boolean = True)
@@ -16766,6 +16774,10 @@ Partial Class Ventas
DdlVendedor.SelectedValue = "0"
DdlVendedor.Items.Insert(0, New ListItem("Sin Asignar", "0"))
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
CargaVendedoresSubProyectos()
End If
DdlVendedorSucursal.DataSource = DdlVendedor.DataSource
DdlVendedor.DataBind()
@@ -21852,7 +21864,7 @@ Partial Class Ventas
Dim tDT As DataTable = Nothing
Dim ObjOC As New ClsOC
If ObjOC.GetOCFacturacion(CveOC, UsuarioActual.CveEmpresa) Then
tDT = ObjOC.DtResultados
tDT = ObjOC.DtResultados.Copy()
'tTmpDT.Columns.Add("TipoDocto", GetType(String))
'tTmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
'tTmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal))
@@ -21865,10 +21877,14 @@ Partial Class Ventas
If tDT IsNot Nothing AndAlso tDT.Rows.Count > 0 Then
ViewState("CveCliente") = ObjOC.DtResultados.Rows(0)("CveCliente")
ViewState("CveCliente") = tDT.Rows(0)("CveCliente")
HdnCveCliente.Value = CveCliente.ToString()
CargaCliente(CveCliente)
If (DdlTipoComprobante.Items.FindByValue("Rem") IsNot Nothing) Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
End If
For Each Dr As DataRow In tDT.Rows
AgregarProductoServicio(Dr("Cantidad").ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(),
@@ -32586,6 +32602,24 @@ Partial Class Ventas
UpModalSolicitud.Update()
End Sub
Private Sub CargaVendedoresSubProyectos()
Dim DtVendedoresSucursales = GlobalDTClientesVendedoresSubProyectos(UsuarioActual.CveEmpresa, CveCliente:=Me.CveCliente, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero())
If DtVendedoresSucursales IsNot Nothing AndAlso DtVendedoresSucursales.Rows.Count > 0 Then
DdlVendedor.Items.Clear()
DdlVendedor.SelectedValue = Nothing
DdlVendedor.DataSource = DtVendedoresSucursales
DdlVendedor.DataBind()
DdlVendedor.Items.Insert(0, New ListItem("Sin Asignar", "0"))
DtVendedoresSucursales.Dispose()
End If
UpParametros.Update()
End Sub
Public Class MAnticipoRelacionado
Public Property CveVenta As Integer
Public Property FolioFiscal As String