Local
This commit is contained in:
@@ -10233,7 +10233,9 @@ Partial Class Clientes
|
||||
If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
|
||||
DivRazonSocial2.Attributes.Add("class", "col-md-8")
|
||||
DVRegimenSociedad.Visible = True
|
||||
|
||||
TxtNombreComercial.Enabled = False
|
||||
Else
|
||||
TxtNombreComercial.Enabled = True
|
||||
End If
|
||||
DdlRegimenFiscal.DataSource = GlobalDTRegimenesFiscales(RdTipoPersona.SelectedValue.ToEntero).FiltraParametros("", "CodigoRegimenFiscal")
|
||||
DdlRegimenFiscal.DataBind()
|
||||
|
||||
@@ -352,6 +352,7 @@ Partial Class ProductosyServicios
|
||||
DivObjetoImpuesto.Visible = True
|
||||
DdlObjetoImpuesto.DataSource = GlobalDTSATObjetosImpuestos
|
||||
DdlObjetoImpuesto.DataBind()
|
||||
DdlObjetoImpuesto.SelectedValue = "02" 'se sugiere este valor, que sería el más utilizado
|
||||
End If
|
||||
|
||||
CreaDtSeccionAlmacen()
|
||||
|
||||
@@ -145,6 +145,16 @@
|
||||
<asp:DropDownList ID="DdlMarca" DataTextField="Marca" DataValueField="CveMarca" CssClass="select2me" runat="server" Width="350px"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="divDistribuidor" runat="server" visible="false">
|
||||
<label class="col-md-2 truncate">Distribuidor:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Distribuidor" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No Distribuidor" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -156,6 +156,13 @@ Partial Class Ventas_Promociones
|
||||
DdlRin.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
'' si es E acumuladora
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
divDistribuidor.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CreaDT()
|
||||
@@ -514,7 +521,7 @@ Partial Class Ventas_Promociones
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
CvePromocion = ObjVentas.AddPromociones(TxtPromocion.Text.Trim, If(IsDate(TxtFechaI.Text), TxtFechaI.Text.ToDate, MinFecha), If(IsDate(TxtFechaF.Text), TxtFechaF.Text.ToDate, MaxFecha),
|
||||
DdlVendedor.SelectedValue.ToEntero, CveCliente, ChkEstatus.Checked, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoAplicacion.SelectedValue.ToString, DdlMarca.SelectedValue.ToEntero)
|
||||
UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoAplicacion.SelectedValue.ToString, DdlMarca.SelectedValue.ToEntero, DdlDistribuidor.SelectedValue.ToEntero)
|
||||
|
||||
If CvePromocion > 0 Then
|
||||
For Each Dr As DataRow In TempDT.Rows
|
||||
@@ -552,7 +559,7 @@ Partial Class Ventas_Promociones
|
||||
|
||||
If ObjVentas.UpdatePromociones(TxtPromocion.Text.Trim, If(IsDate(TxtFechaI.Text), TxtFechaI.Text.ToDate, MinFecha), If(IsDate(TxtFechaF.Text), TxtFechaF.Text.ToDate, MaxFecha),
|
||||
DdlVendedor.SelectedValue.ToEntero, CveCliente, ChkEstatus.Checked, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
|
||||
CvePromocion, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoAplicacion.SELECTEDVALUE.TOENTERO, UsuarioActual.CveEmpresa, CveMarca:=DdlMarca.SelectedValue.ToEntero) Then
|
||||
CvePromocion, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoAplicacion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveMarca:=DdlMarca.SelectedValue.ToEntero, DdlDistribuidor.SelectedValue.ToEntero) Then
|
||||
|
||||
For Each Dr As DataRow In TempDT.FiltraParametros("Estatus = 0").Rows
|
||||
If Not ObjVentas.AddPromocionesDetalle(CvePromocion, Dr("CvePS").ToString.ToEntero, Dr("CveTipoPromocion").ToString.ToEntero, Dr("Promocion").ToString.ToDouble, Dr("PUAnterior").ToString.ToDouble, Dr("PUPromocion").ToString.ToDouble,
|
||||
|
||||
1387
Ventas/Ventas.aspx
1387
Ventas/Ventas.aspx
File diff suppressed because it is too large
Load Diff
@@ -2630,7 +2630,9 @@ Partial Class Ventas
|
||||
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
||||
DdlMoneda.SelectedValueExist(2)
|
||||
Using ObjVentas As New ClsNominas
|
||||
|
||||
If ObjVentas.EmbarqueManifiestoGet(-1, -1, -1, Request("CveEmbarqueManifiesto").ToString().ToEntero()) And ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
DdlSubProyectoDatos.SelectedValueExist(ObjVentas.DtResultados.Rows(0)("CveSubProyecto").ToString())
|
||||
End If
|
||||
If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, "", Request("CveEmbarqueManifiesto").ToEntero()) Then
|
||||
TmpDT = ObjVentas.DtResultados
|
||||
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
|
||||
@@ -4973,6 +4975,9 @@ Partial Class Ventas
|
||||
If (UsuarioActual.TienePermisoProceso(166) Or UsuarioActual.CveRol = 1) AndAlso (LblFolioFiscal.Text = "" Or LblFolioFiscal.Text = "test") Then
|
||||
LkEliminarFactura.Visible = True
|
||||
End If
|
||||
If (UsuarioActual.CveRol = 1) AndAlso (LblFolioFiscal.Text <> "") Then
|
||||
LnkUUIDRelacionados.Visible = True
|
||||
End If
|
||||
|
||||
'Envio Direccion
|
||||
If DbRowVenta("CveDireccionEnvio").ToString().ToEntero() > 0 AndAlso DbRowVenta("CveDireccionEnvio").ToString() IsNot Nothing Then
|
||||
@@ -6198,6 +6203,14 @@ Partial Class Ventas
|
||||
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
|
||||
End If
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
||||
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
'S01 Sin efectos fiscales.
|
||||
DdlUsoCFDI.SelectedValueExist("23")
|
||||
DdlUsoCFDI.Enabled = False
|
||||
RegimenFiscalCliente = "616"
|
||||
ClienteCodigoRegimenFiscal = "616"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -7150,6 +7163,15 @@ Partial Class Ventas
|
||||
|
||||
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString())
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString())
|
||||
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
'S01 Sin efectos fiscales.
|
||||
DdlUsoCFDI.SelectedValueExist("23")
|
||||
DdlUsoCFDI.Enabled = False
|
||||
RegimenFiscalCliente = "616"
|
||||
ClienteCodigoRegimenFiscal = "616"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If CveVenta < 0 Then TxtAtencionA.Text = ObjCliente.DtResultados.Rows(0)("Contacto").ToString()
|
||||
@@ -7183,6 +7205,15 @@ Partial Class Ventas
|
||||
|
||||
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
||||
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
'S01 Sin efectos fiscales.
|
||||
DdlUsoCFDI.SelectedValueExist("23")
|
||||
DdlUsoCFDI.Enabled = False
|
||||
RegimenFiscalCliente = "616"
|
||||
ClienteCodigoRegimenFiscal = "616"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -31399,6 +31430,10 @@ Partial Class Ventas
|
||||
DdlTipoRetencion.Visible = True
|
||||
End If
|
||||
|
||||
If DivCartaPorte.Visible Then
|
||||
HabilitarControlesCartaPorte(True)
|
||||
End If
|
||||
|
||||
UpnTools.Update()
|
||||
UpCliente.Update()
|
||||
UpParametros.Update()
|
||||
@@ -31412,7 +31447,7 @@ Partial Class Ventas
|
||||
UpParametros.Update()
|
||||
UpINV.Update()
|
||||
UpFacturasRelacionadas.Update()
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -34036,12 +34071,12 @@ Partial Class Ventas
|
||||
ValidaConfiguracionVehiculo()
|
||||
End Sub
|
||||
Public Sub CargaVentaCortePorte(CveVenta As Integer)
|
||||
TxtFechaEntregaCP.Enabled = False
|
||||
TxtFechaLlegadaCP.Enabled = False
|
||||
|
||||
Dim CveEntregaAlmacen As Integer = -1
|
||||
Dim CveDireccionOrigen As Integer = -1
|
||||
Dim CveDireccionDestino As Integer = -1
|
||||
Dim CveCamionRemolque1 As Integer = -1
|
||||
Dim CveCamionRemolque2 As Integer = -1
|
||||
Dim CveConfigAutoTransporte As Integer = -1
|
||||
|
||||
Using ObjGral As New ClsGenerales
|
||||
If ObjGral.GetGralTimbre(-1, "Ing", MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa, -1, CveVenta:=CveVenta) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
|
||||
@@ -34050,20 +34085,24 @@ Partial Class Ventas
|
||||
Me.CveTimbreCartaPorteVenta = RowCP("CveTimbre").ToString().ToEntero()
|
||||
If CveTimbreCartaPorteVenta > 0 Then
|
||||
ChkEmitirCartaPorte.Checked = True
|
||||
ChkEmitirCartaPorte.Enabled = False
|
||||
|
||||
|
||||
CveEntregaAlmacen = RowCP("CveEntregaAlmacen").ToString().ToEntero()
|
||||
|
||||
CveDireccionOrigen = RowCP("CveDireccionOrigen").ToString().ToEntero()
|
||||
CveDireccionDestino = RowCP("CveDireccionDestino").ToString().ToEntero()
|
||||
|
||||
TxtFechaEntregaCP.Text = RowCP("FechaEntrega").ToString()
|
||||
TxtFechaLlegadaCP.Text = RowCP("FechaLlegada").ToString()
|
||||
TxtFechaEntregaCP.Text = RowCP("FechaEntrega").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm")
|
||||
TxtFechaLlegadaCP.Text = RowCP("FechaLlegada").ToString().ToDateTime().ToString("dd/MM/yyyy HH:mm")
|
||||
TxtDistancia.Text = RowCP("Distancia").ToString()
|
||||
|
||||
DdlChofer.SelectedValueExist(RowCP("CveChofer").ToString())
|
||||
DdlUnidadCamion.SelectedValueExist(RowCP("CveCamion").ToString())
|
||||
|
||||
CveCamionRemolque1 = RowCP("CveCamionRemolque1").ToString().ToEntero()
|
||||
CveCamionRemolque2 = RowCP("CveCamionRemolque2").ToString().ToEntero()
|
||||
|
||||
CveConfigAutoTransporte = RowCP("CveConfigAutoTransporte").ToString().ToEntero()
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -34072,7 +34111,6 @@ Partial Class Ventas
|
||||
DtMercancias = ObjGral.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
End Using
|
||||
|
||||
If ChkEmitirCartaPorte.Checked AndAlso CveCliente > 0 Then
|
||||
@@ -34093,18 +34131,54 @@ Partial Class Ventas
|
||||
|
||||
GvMercanciasCP.DataSource = DtMercancias
|
||||
GvMercanciasCP.DataBind()
|
||||
|
||||
If DdlUnidadCamion.SelectedValue.ToEntero() > 0 Then
|
||||
If CveConfigAutoTransporte > 0 Then
|
||||
DvRemolque1.Visible = False
|
||||
DvRemolque2.Visible = False
|
||||
|
||||
DdlRemolque1.SelectedValueExist(-1)
|
||||
DdlRemolque2.SelectedValueExist(-1)
|
||||
|
||||
DdlConfigAuto.SelectedValueExist(CveConfigAutoTransporte.ToString())
|
||||
DdlConfigAuto_SelectedIndexChanged(DdlConfigAuto, EventArgs.Empty)
|
||||
|
||||
If CveCamionRemolque1 > 0 Then
|
||||
DdlRemolque1.SelectedValueExist(CveCamionRemolque1.ToString())
|
||||
DdlRemolque1_SelectedIndexChanged(DdlRemolque1, EventArgs.Empty)
|
||||
|
||||
If CveCamionRemolque2 > 0 Then
|
||||
DdlRemolque2.SelectedValueExist(CveCamionRemolque2.ToString())
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
TmpDTDireccionCP = Nothing
|
||||
End If
|
||||
|
||||
DdlChofer.Enabled = False
|
||||
DdlUnidadCamion.Enabled = False
|
||||
DdlDireccionOrigen.Enabled = False
|
||||
DdlDireccionDestino.Enabled = False
|
||||
HabilitarControlesCartaPorte(False)
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub HabilitarControlesCartaPorte(Habilitar As Boolean)
|
||||
ChkEmitirCartaPorte.Enabled = Habilitar
|
||||
TxtFechaEntregaCP.Enabled = Habilitar
|
||||
TxtFechaLlegadaCP.Enabled = Habilitar
|
||||
DdlChofer.Enabled = Habilitar
|
||||
DdlUnidadCamion.Enabled = Habilitar
|
||||
DdlConfigAuto.Enabled = Habilitar
|
||||
DdlRemolque1.Enabled = Habilitar
|
||||
DdlRemolque2.Enabled = Habilitar
|
||||
DdlDireccionOrigen.Enabled = Habilitar
|
||||
DdlDireccionDestino.Enabled = Habilitar
|
||||
TxtDistancia.Enabled = Habilitar
|
||||
LnkAgregarMercancia.Enabled = Habilitar
|
||||
GvMercanciasCP.Columns(3).Visible = Habilitar
|
||||
End Sub
|
||||
|
||||
Private Sub ValidaConfiguracionVehiculo()
|
||||
DvRemolque1.Visible = False
|
||||
DvRemolque2.Visible = False
|
||||
@@ -34262,93 +34336,93 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property SucursalOrigenCP As Modelos.SucursalModel
|
||||
Get
|
||||
If ViewState("SucursalOrigenCP") Is Nothing Then
|
||||
Return Nothing
|
||||
End If
|
||||
Return DirectCast(ViewState("SucursalOrigenCP"), Modelos.SucursalModel)
|
||||
End Get
|
||||
Set(value As Modelos.SucursalModel)
|
||||
ViewState("SucursalOrigenCP") = value
|
||||
End Set
|
||||
End Property
|
||||
Property SucursalDestinoCP As Modelos.SucursalModel
|
||||
Get
|
||||
If ViewState("SucursalDestinoCP") Is Nothing Then
|
||||
Return Nothing
|
||||
End If
|
||||
Return DirectCast(ViewState("SucursalDestinoCP"), Modelos.SucursalModel)
|
||||
End Get
|
||||
Set(value As Modelos.SucursalModel)
|
||||
ViewState("SucursalDestinoCP") = value
|
||||
End Set
|
||||
End Property
|
||||
'Property SucursalOrigenCP As Modelos.SucursalModel
|
||||
' Get
|
||||
' If ViewState("SucursalOrigenCP") Is Nothing Then
|
||||
' Return Nothing
|
||||
' End If
|
||||
' Return DirectCast(ViewState("SucursalOrigenCP"), Modelos.SucursalModel)
|
||||
' End Get
|
||||
' Set(value As Modelos.SucursalModel)
|
||||
' ViewState("SucursalOrigenCP") = value
|
||||
' End Set
|
||||
'End Property
|
||||
'Property SucursalDestinoCP As Modelos.SucursalModel
|
||||
' Get
|
||||
' If ViewState("SucursalDestinoCP") Is Nothing Then
|
||||
' Return Nothing
|
||||
' End If
|
||||
' Return DirectCast(ViewState("SucursalDestinoCP"), Modelos.SucursalModel)
|
||||
' End Get
|
||||
' Set(value As Modelos.SucursalModel)
|
||||
' ViewState("SucursalDestinoCP") = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private Sub CargaDireccionSucursalOrigen(Row As DataRow)
|
||||
If SucursalOrigenCP Is Nothing Then
|
||||
SucursalOrigenCP = New Modelos.SucursalModel
|
||||
Else
|
||||
SucursalOrigenCP = Nothing
|
||||
SucursalOrigenCP = New Modelos.SucursalModel
|
||||
End If
|
||||
'Private Sub CargaDireccionSucursalOrigen(Row As DataRow)
|
||||
' If SucursalOrigenCP Is Nothing Then
|
||||
' SucursalOrigenCP = New Modelos.SucursalModel
|
||||
' Else
|
||||
' SucursalOrigenCP = Nothing
|
||||
' SucursalOrigenCP = New Modelos.SucursalModel
|
||||
' End If
|
||||
|
||||
Dim SBDomicilioSucursal As New StringBuilder()
|
||||
Try
|
||||
If Row IsNot Nothing Then
|
||||
' Dim SBDomicilioSucursal As New StringBuilder()
|
||||
' Try
|
||||
' If Row IsNot Nothing Then
|
||||
|
||||
SucursalOrigenCP.Direccion = Row("Calle").ToString()
|
||||
SucursalOrigenCP.NoExt = Row("NoExt").ToString()
|
||||
SucursalOrigenCP.NoInt = Row("NoInt").ToString()
|
||||
SucursalOrigenCP.Colonia = Row("Colonia").ToString()
|
||||
SucursalOrigenCP.CP = Row("CP").ToString()
|
||||
SucursalOrigenCP.Municipio = Row("Municipio").ToString()
|
||||
SucursalOrigenCP.CveEstado = Row("CveEstado").ToString().ToEntero()
|
||||
SucursalOrigenCP.Estado = Row("Estado").ToString()
|
||||
SucursalOrigenCP.CvePais = Row("CvePais").ToString().ToEntero()
|
||||
SucursalOrigenCP.Pais = Row("Pais").ToString()
|
||||
' SucursalOrigenCP.Direccion = Row("Calle").ToString()
|
||||
' SucursalOrigenCP.NoExt = Row("NoExt").ToString()
|
||||
' SucursalOrigenCP.NoInt = Row("NoInt").ToString()
|
||||
' SucursalOrigenCP.Colonia = Row("Colonia").ToString()
|
||||
' SucursalOrigenCP.CP = Row("CP").ToString()
|
||||
' SucursalOrigenCP.Municipio = Row("Municipio").ToString()
|
||||
' SucursalOrigenCP.CveEstado = Row("CveEstado").ToString().ToEntero()
|
||||
' SucursalOrigenCP.Estado = Row("Estado").ToString()
|
||||
' SucursalOrigenCP.CvePais = Row("CvePais").ToString().ToEntero()
|
||||
' SucursalOrigenCP.Pais = Row("Pais").ToString()
|
||||
|
||||
SBDomicilioSucursal.AppendFormat("{0}", Row("Calle").ToString())
|
||||
' SBDomicilioSucursal.AppendFormat("{0}", Row("Calle").ToString())
|
||||
|
||||
If Row("NoInt").ToString().Length > 0 Then
|
||||
SBDomicilioSucursal.AppendFormat(", No.Int: {0}", Row("NoInt").ToString())
|
||||
End If
|
||||
' If Row("NoInt").ToString().Length > 0 Then
|
||||
' SBDomicilioSucursal.AppendFormat(", No.Int: {0}", Row("NoInt").ToString())
|
||||
' End If
|
||||
|
||||
If Row("Colonia").ToString().Length > 0 Then
|
||||
SBDomicilioSucursal.AppendFormat(", Col: {0}", Row("Colonia").ToString())
|
||||
End If
|
||||
' If Row("Colonia").ToString().Length > 0 Then
|
||||
' SBDomicilioSucursal.AppendFormat(", Col: {0}", Row("Colonia").ToString())
|
||||
' End If
|
||||
|
||||
If Row("CP").ToString().ToEntero > 0 Then
|
||||
SBDomicilioSucursal.AppendFormat(", CP: {0}", Row("CP").ToString())
|
||||
End If
|
||||
' If Row("CP").ToString().ToEntero > 0 Then
|
||||
' SBDomicilioSucursal.AppendFormat(", CP: {0}", Row("CP").ToString())
|
||||
' End If
|
||||
|
||||
If Row("NoExt").ToString().Length > 0 Then
|
||||
SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", Row("NoExt").ToString())
|
||||
End If
|
||||
' If Row("NoExt").ToString().Length > 0 Then
|
||||
' SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", Row("NoExt").ToString())
|
||||
' End If
|
||||
|
||||
Dim CiudadSucursal As String = String.Format("{0},{1}", Row("Municipio").ToString(), Row("Estado").ToString())
|
||||
If CiudadSucursal.Length > 0 Then
|
||||
SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
|
||||
End If
|
||||
' Dim CiudadSucursal As String = String.Format("{0},{1}", Row("Municipio").ToString(), Row("Estado").ToString())
|
||||
' If CiudadSucursal.Length > 0 Then
|
||||
' SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
|
||||
' End If
|
||||
|
||||
If Row("Pais").ToString().Length > 0 Then
|
||||
SBDomicilioSucursal.AppendFormat(", {0}", Row("Pais").ToString())
|
||||
End If
|
||||
' If Row("Pais").ToString().Length > 0 Then
|
||||
' SBDomicilioSucursal.AppendFormat(", {0}", Row("Pais").ToString())
|
||||
' End If
|
||||
|
||||
If Not String.IsNullOrEmpty(Row("Telefono").ToString()) Then
|
||||
SucursalOrigenCP.TelefonoSucursal = Row("Telefono").ToString()
|
||||
End If
|
||||
End If
|
||||
' If Not String.IsNullOrEmpty(Row("Telefono").ToString()) Then
|
||||
' SucursalOrigenCP.TelefonoSucursal = Row("Telefono").ToString()
|
||||
' End If
|
||||
' End If
|
||||
|
||||
Catch ex As Exception
|
||||
SBDomicilioSucursal.Clear()
|
||||
GuardaLog(ex.ToString())
|
||||
End Try
|
||||
' Catch ex As Exception
|
||||
' SBDomicilioSucursal.Clear()
|
||||
' GuardaLog(ex.ToString())
|
||||
' End Try
|
||||
|
||||
'TxtOrigenCP.Text = SBDomicilioSucursal.ToString
|
||||
' 'TxtOrigenCP.Text = SBDomicilioSucursal.ToString
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
' UpEmitirTransitorio.Update()
|
||||
'End Sub
|
||||
|
||||
Protected Sub DdlDireccionEnvio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
'If SucursalDestinoCP Is Nothing Then
|
||||
@@ -34384,73 +34458,73 @@ Partial Class Ventas
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlDireccionOrigen_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If SucursalOrigenCP Is Nothing Then
|
||||
SucursalOrigenCP = New Modelos.SucursalModel
|
||||
Else
|
||||
SucursalOrigenCP = Nothing
|
||||
SucursalOrigenCP = New Modelos.SucursalModel
|
||||
End If
|
||||
'Protected Sub DdlDireccionOrigen_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' If SucursalOrigenCP Is Nothing Then
|
||||
' SucursalOrigenCP = New Modelos.SucursalModel
|
||||
' Else
|
||||
' SucursalOrigenCP = Nothing
|
||||
' SucursalOrigenCP = New Modelos.SucursalModel
|
||||
' End If
|
||||
|
||||
|
||||
If TmpDTDireccionCP IsNot Nothing AndAlso TmpDTDireccionCP.FiltraParametros(String.Format("CveDireccionEnvio = {0}", DdlDireccionOrigen.SelectedValue.ToEntero())).Rows.Count > 0 Then
|
||||
' If TmpDTDireccionCP IsNot Nothing AndAlso TmpDTDireccionCP.FiltraParametros(String.Format("CveDireccionEnvio = {0}", DdlDireccionOrigen.SelectedValue.ToEntero())).Rows.Count > 0 Then
|
||||
|
||||
Dim Row As DataRow = TmpDTDireccionCP.FiltroPrimero(String.Format("CveDireccionEnvio = {0}", DdlDireccionOrigen.SelectedValue.ToEntero()))
|
||||
If Row IsNot Nothing Then
|
||||
' Dim Row As DataRow = TmpDTDireccionCP.FiltroPrimero(String.Format("CveDireccionEnvio = {0}", DdlDireccionOrigen.SelectedValue.ToEntero()))
|
||||
' If Row IsNot Nothing Then
|
||||
|
||||
SucursalOrigenCP.Direccion = Row("EnvioDireccion").ToString()
|
||||
SucursalOrigenCP.Colonia = Row("EnvioColonia").ToString()
|
||||
SucursalOrigenCP.Municipio = Row("EnvioCiudad").ToString()
|
||||
SucursalOrigenCP.CveEstado = Row("CveEstado").ToString().ToEntero()
|
||||
SucursalOrigenCP.Estado = Row("EnvioEstado").ToString()
|
||||
SucursalOrigenCP.CvePais = Row("CvePais").ToString().ToEntero()
|
||||
SucursalOrigenCP.Pais = Row("Pais").ToString()
|
||||
SucursalOrigenCP.CP = Row("EnvioCP").ToString()
|
||||
' SucursalOrigenCP.Direccion = Row("EnvioDireccion").ToString()
|
||||
' SucursalOrigenCP.Colonia = Row("EnvioColonia").ToString()
|
||||
' SucursalOrigenCP.Municipio = Row("EnvioCiudad").ToString()
|
||||
' SucursalOrigenCP.CveEstado = Row("CveEstado").ToString().ToEntero()
|
||||
' SucursalOrigenCP.Estado = Row("EnvioEstado").ToString()
|
||||
' SucursalOrigenCP.CvePais = Row("CvePais").ToString().ToEntero()
|
||||
' SucursalOrigenCP.Pais = Row("Pais").ToString()
|
||||
' SucursalOrigenCP.CP = Row("EnvioCP").ToString()
|
||||
|
||||
'TxtDestinoCP.Text = String.Format("{0} col. {1},CP:{2}, {3},{4},{5}", SucursalDestinoCP.Direccion, SucursalDestinoCP.Colonia, SucursalDestinoCP.CP, SucursalDestinoCP.Municipio, SucursalDestinoCP.Estado, SucursalDestinoCP.Pais)
|
||||
Else
|
||||
'TxtDestinoCP.Text = ""
|
||||
End If
|
||||
Else
|
||||
'TxtDestinoCP.Text = ""
|
||||
End If
|
||||
' 'TxtDestinoCP.Text = String.Format("{0} col. {1},CP:{2}, {3},{4},{5}", SucursalDestinoCP.Direccion, SucursalDestinoCP.Colonia, SucursalDestinoCP.CP, SucursalDestinoCP.Municipio, SucursalDestinoCP.Estado, SucursalDestinoCP.Pais)
|
||||
' Else
|
||||
' 'TxtDestinoCP.Text = ""
|
||||
' End If
|
||||
' Else
|
||||
' 'TxtDestinoCP.Text = ""
|
||||
' End If
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
' UpEmitirTransitorio.Update()
|
||||
'End Sub
|
||||
|
||||
Protected Sub DdlDireccionDestino_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If SucursalDestinoCP Is Nothing Then
|
||||
SucursalDestinoCP = New Modelos.SucursalModel
|
||||
Else
|
||||
SucursalDestinoCP = Nothing
|
||||
SucursalDestinoCP = New Modelos.SucursalModel
|
||||
End If
|
||||
'Protected Sub DdlDireccionDestino_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' If SucursalDestinoCP Is Nothing Then
|
||||
' SucursalDestinoCP = New Modelos.SucursalModel
|
||||
' Else
|
||||
' SucursalDestinoCP = Nothing
|
||||
' SucursalDestinoCP = New Modelos.SucursalModel
|
||||
' End If
|
||||
|
||||
|
||||
If TmpDTDireccionCP IsNot Nothing AndAlso TmpDTDireccionCP.FiltraParametros(String.Format("CveDireccionEnvio = {0}", DdlDireccionDestino.SelectedValue.ToEntero())).Rows.Count > 0 Then
|
||||
' If TmpDTDireccionCP IsNot Nothing AndAlso TmpDTDireccionCP.FiltraParametros(String.Format("CveDireccionEnvio = {0}", DdlDireccionDestino.SelectedValue.ToEntero())).Rows.Count > 0 Then
|
||||
|
||||
Dim Row As DataRow = TmpDTDireccionCP.FiltroPrimero(String.Format("CveDireccionEnvio = {0}", DdlDireccionDestino.SelectedValue.ToEntero()))
|
||||
If Row IsNot Nothing Then
|
||||
' Dim Row As DataRow = TmpDTDireccionCP.FiltroPrimero(String.Format("CveDireccionEnvio = {0}", DdlDireccionDestino.SelectedValue.ToEntero()))
|
||||
' If Row IsNot Nothing Then
|
||||
|
||||
SucursalDestinoCP.Direccion = Row("EnvioDireccion").ToString()
|
||||
SucursalDestinoCP.Colonia = Row("EnvioColonia").ToString()
|
||||
SucursalDestinoCP.Municipio = Row("EnvioCiudad").ToString()
|
||||
SucursalDestinoCP.CveEstado = Row("CveEstado").ToString().ToEntero()
|
||||
SucursalDestinoCP.Estado = Row("EnvioEstado").ToString()
|
||||
SucursalDestinoCP.CvePais = Row("CvePais").ToString().ToEntero()
|
||||
SucursalDestinoCP.Pais = Row("Pais").ToString()
|
||||
SucursalDestinoCP.CP = Row("EnvioCP").ToString()
|
||||
' SucursalDestinoCP.Direccion = Row("EnvioDireccion").ToString()
|
||||
' SucursalDestinoCP.Colonia = Row("EnvioColonia").ToString()
|
||||
' SucursalDestinoCP.Municipio = Row("EnvioCiudad").ToString()
|
||||
' SucursalDestinoCP.CveEstado = Row("CveEstado").ToString().ToEntero()
|
||||
' SucursalDestinoCP.Estado = Row("EnvioEstado").ToString()
|
||||
' SucursalDestinoCP.CvePais = Row("CvePais").ToString().ToEntero()
|
||||
' SucursalDestinoCP.Pais = Row("Pais").ToString()
|
||||
' SucursalDestinoCP.CP = Row("EnvioCP").ToString()
|
||||
|
||||
'TxtDestinoCP.Text = String.Format("{0} col. {1},CP:{2}, {3},{4},{5}", SucursalDestinoCP.Direccion, SucursalDestinoCP.Colonia, SucursalDestinoCP.CP, SucursalDestinoCP.Municipio, SucursalDestinoCP.Estado, SucursalDestinoCP.Pais)
|
||||
Else
|
||||
'TxtDestinoCP.Text = ""
|
||||
End If
|
||||
Else
|
||||
'TxtDestinoCP.Text = ""
|
||||
End If
|
||||
' 'TxtDestinoCP.Text = String.Format("{0} col. {1},CP:{2}, {3},{4},{5}", SucursalDestinoCP.Direccion, SucursalDestinoCP.Colonia, SucursalDestinoCP.CP, SucursalDestinoCP.Municipio, SucursalDestinoCP.Estado, SucursalDestinoCP.Pais)
|
||||
' Else
|
||||
' 'TxtDestinoCP.Text = ""
|
||||
' End If
|
||||
' Else
|
||||
' 'TxtDestinoCP.Text = ""
|
||||
' End If
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
' UpEmitirTransitorio.Update()
|
||||
'End Sub
|
||||
Protected Sub LnkAgregarMercancia_Click(sender As Object, e As EventArgs)
|
||||
TxtCantidadMercancia.Text = ""
|
||||
'DdlPSMercancia.SelectedValue = ""
|
||||
@@ -34462,7 +34536,7 @@ Partial Class Ventas
|
||||
Private Sub CreaDTMercancias()
|
||||
DtMercancias = New DataTable()
|
||||
DtMercancias.Columns.Add(New DataColumn("Consec", GetType(Integer)))
|
||||
DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Integer)))
|
||||
DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
||||
DtMercancias.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
|
||||
DtMercancias.Columns.Add(New DataColumn("CveUnidadMedida", GetType(Integer)))
|
||||
DtMercancias.Columns.Add(New DataColumn("CodigoPS", GetType(String)))
|
||||
@@ -34715,5 +34789,58 @@ Partial Class Ventas
|
||||
UpAgregarMercancia.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkUUIDRelacionados_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, LblRFC.Text, TxtTotal.Text, True)
|
||||
Dim sb As New StringBuilder
|
||||
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||
|
||||
Dim Relacionados = Timbrado.ConsultarUUIDRelacionados(UsuarioActual.Empresa, FolioFiscal, UsuarioActual.Empresa.FacturaProduccion)
|
||||
If Relacionados IsNot Nothing Then
|
||||
Dim sbExtra As New StringBuilder()
|
||||
If Relacionados.Codigo = 500 Then
|
||||
sbExtra.Append("El servicio de verificación de documentos relacionados no esta disponible.")
|
||||
Else
|
||||
sbExtra.Append(Relacionados.Mensaje)
|
||||
|
||||
Dim SbHijos = New StringBuilder()
|
||||
Dim SbPadres = New StringBuilder()
|
||||
|
||||
If Relacionados.RelacionadosPadre IsNot Nothing Then
|
||||
For Each padre In Relacionados.RelacionadosPadre
|
||||
SbPadres.AppendFormat("{0};", padre.Uuid)
|
||||
Next
|
||||
If SbPadres.Length > 0 Then
|
||||
SbPadres.Remove(SbPadres.Length - 1, 1)
|
||||
End If
|
||||
End If
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
|
||||
If SbPadres.Length > 0 Then
|
||||
If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbPadres.ToString(), UsuarioActual.CveEmpresa) Then
|
||||
Dim dtt As DataTable = ObjVentas.DtResultados.FiltraParametros($"CveVenta <> {CveVenta}")
|
||||
|
||||
For Each dr As DataRow In dtt.Rows
|
||||
sb.AppendFormat("{0}-{1}-{2}<br/>", dr("TipoDocto"), dr("SerieFolio"), dr("FolioFiscal"))
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
End If
|
||||
|
||||
If sbExtra.Length > 0 Then
|
||||
LbExtraRefacturacion.Text = $"<br><b>*{sbExtra.ToString()}</b>"
|
||||
End If
|
||||
|
||||
End If
|
||||
Alert(sb.ToString(), TipoMensaje.MsgInformacion)
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user