Cambios en paqueria
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -2647,12 +2647,12 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
'Paqueterias guias
|
||||
If RbEntregaInterna.Checked AndAlso Not ErrorMovInv Then
|
||||
Dim CveEstatus As Integer = DdlEstatus.SelectedValue.ToEntero()
|
||||
Dim Fecha As String = TxtFechaPaqInterna.Text
|
||||
Dim FechaEstimada As String = If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
||||
Dim NoCajas As Integer = TxtNoCajas.Text.ToEntero()
|
||||
Dim Observaciones As String = TxtObservacionesPaqInterna.Text
|
||||
If RbEntregaInterna.Checked AndAlso Not ErrorMovInv Then
|
||||
Dim CveEstatus As Integer = 0 ' DdlEstatus.SelectedValue.ToEntero()
|
||||
Dim Fecha As String = "-1" 'TxtFechaPaqInterna.Text
|
||||
Dim FechaEstimada As String = "-1" 'If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
||||
Dim NoCajas As Integer = 0 'TxtNoCajas.Text.ToEntero()
|
||||
Dim Observaciones As String = "" 'TxtObservacionesPaqInterna.Text
|
||||
Dim CvePaqueteria As Integer = GlobalDTPaqueterias(UsuarioActual.CveEmpresa, 0).FiltroPrimeroValor("CvePaqueteria", "").ToEntero
|
||||
|
||||
If CveSubProyecto > 0 Then
|
||||
@@ -2661,7 +2661,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If CvePaqueteriaGuia > 0 Then
|
||||
|
||||
If CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then
|
||||
If ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimiento, -1) Then
|
||||
If ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVentaSurtir, -1, CveMovimientoSalida, -1) Then
|
||||
''manda correo
|
||||
MandaCorreoEntrega(CveVentaSurtir)
|
||||
Else
|
||||
@@ -3117,12 +3117,12 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
'Paqueterias Guias
|
||||
If RbEntregaInterna.Checked AndAlso Not ErrorMovInv Then
|
||||
Dim CveEstatus As Integer = DdlEstatus.SelectedValue.ToEntero()
|
||||
Dim Fecha As String = TxtFechaPaqInterna.Text
|
||||
Dim FechaEstimada As String = If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
||||
Dim NoCajas As Integer = TxtNoCajas.Text.ToEntero()
|
||||
Dim Observaciones As String = TxtObservacionesPaqInterna.Text
|
||||
If RbEntregaInterna.Checked AndAlso Not ErrorMovInv Then
|
||||
Dim CveEstatus As Integer = 0 ' DdlEstatus.SelectedValue.ToEntero()
|
||||
Dim Fecha As String = "-1" 'TxtFechaPaqInterna.Text
|
||||
Dim FechaEstimada As String = "-1" 'If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text)
|
||||
Dim NoCajas As Integer = 0 'TxtNoCajas.Text.ToEntero()
|
||||
Dim Observaciones As String = "" 'TxtObservacionesPaqInterna.Text
|
||||
Dim CvePaqueteria As Integer = GlobalDTPaqueterias(UsuarioActual.CveEmpresa, 0).FiltroPrimeroValor("CvePaqueteria", "").ToEntero
|
||||
|
||||
Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(CvePaqueteria, 9, CveEstatus, CveSubProyecto, Fecha, "-1", "-1", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:=True)
|
||||
@@ -3174,6 +3174,11 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
|
||||
Private Sub MandaCorreoEntrega(tCveVenta As Integer)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() EnviarCorreoEntrega(tCveVenta, UsuarioActual))
|
||||
Hilo.Start()
|
||||
End Sub
|
||||
|
||||
Private Sub EnviarCorreoEntrega(tCveVenta As Integer, UsuarioActual As Usuario)
|
||||
Dim Correo As New ClsSisMail()
|
||||
Dim SerieFolio As String = ""
|
||||
Dim Asunto As String = String.Format("{0} Envio de pedido: {1}", UsuarioActual.Empresa.NombreCorto, SerieFolio)
|
||||
@@ -3182,23 +3187,21 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dim MensajeEnviado = False
|
||||
Dim tCvecliente As Integer
|
||||
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
|
||||
If (ObjVentas.GetVenta(tCveVenta, UsuarioActual.CveEmpresa)) Then
|
||||
Dim dr As DataRow = ObjVentas.DtResultados.FiltroPrimero("")
|
||||
Destinatario = String.Format("{0};{1}", dr("CorreoNotificacion"), dr("CorreoVendedorVenta"))
|
||||
|
||||
tCvecliente = dr("CveCliente").ToString.ToEntero
|
||||
|
||||
Dim drC As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=tCvecliente).FiltroPrimero("")
|
||||
Destinatario += String.Format("{0};{1}", drC("CorreoEntregaCompras"), drC("CorreoEntregaAlmacen"))
|
||||
|
||||
Cuerpo.AppendLine(String.Format("Estimado {0} le informamos que los productos de la factura {1} han sido enviados a entrega. <br><br>", dr("ClienteNombre"), dr("SerieFolio")))
|
||||
Cuerpo.AppendLine("<br><br>Dudas y aclaraciones con su coordinador empresarial.")
|
||||
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
Using ObjVentas As New ClsVentas()
|
||||
If ObjVentas.GetVenta(tCveVenta, UsuarioActual.CveEmpresa) Then
|
||||
Dim dr As DataRow = ObjVentas.DtResultados.FiltroPrimero("")
|
||||
Destinatario = String.Format("{0};{1}", dr("CorreoNotificacion"), dr("CorreoVendedorVenta"))
|
||||
|
||||
tCvecliente = dr("CveCliente").ToString.ToEntero
|
||||
|
||||
Dim drC As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=tCvecliente).FiltroPrimero("")
|
||||
Destinatario += String.Format("{0};{1}", drC("CorreoEntregaCompras"), drC("CorreoEntregaAlmacen"))
|
||||
|
||||
Cuerpo.AppendLine(String.Format("Estimado {0} le informamos que los productos de la factura {1} han sido enviados a entrega. <br><br>", dr("ClienteNombre"), dr("SerieFolio")))
|
||||
Cuerpo.AppendLine("<br><br>Dudas y aclaraciones con su coordinador empresarial.")
|
||||
|
||||
End If
|
||||
End Using
|
||||
|
||||
|
||||
' Dim ArchivoAdjunto As New ClsSisMail.ArchivoMail()
|
||||
@@ -3215,10 +3218,9 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
' }
|
||||
|
||||
|
||||
MensajeEnviado = Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString())
|
||||
|
||||
|
||||
MensajeEnviado = Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString())
|
||||
End Sub
|
||||
|
||||
Private Sub Limpia()
|
||||
|
||||
'DATOS DE LA VENTA
|
||||
@@ -3640,7 +3642,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If RbEntregaExterna.Checked Then
|
||||
RegistraScript("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx',800,547,'N')")
|
||||
ElseIf RbEntregaInterna.Checked Then
|
||||
RegistraScript("$('#ModalPaqueteriaInterna').modal('show')")
|
||||
'RegistraScript("$('#ModalPaqueteriaInterna').modal('show')")
|
||||
'RegistraScript($"AbrirVentana('/General/PopUpPaqueteriasGuiasInternas.aspx?CveVenta={CveVentaSurtir}&CveSubProyecto={CveSubProyecto}',800,547,'N')")
|
||||
'CveVentaSurtir
|
||||
ElseIf RbSinEntrega.Checked Then
|
||||
@@ -3660,7 +3662,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If RbEntregaExterna.Checked Then
|
||||
RegistraScript("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx',800,547,'N')")
|
||||
ElseIf RbEntregaInterna.Checked Then
|
||||
RegistraScript("$('#ModalPaqueteriaInterna').modal('show')")
|
||||
'RegistraScript("$('#ModalPaqueteriaInterna').modal('show')")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -3319,6 +3319,9 @@
|
||||
</asp:RadioButtonList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left" id="trPaqueteriaDirectaLabel" runat="server" visible="false">
|
||||
<td id="Td4" runat="server">Tipo de Entrega: <b>Entrega Directa</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -6949,6 +6949,8 @@ Partial Class Ventas
|
||||
Dim ObjEventos As New ClsOIEventos(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjDocCliente As New ClsEdocumentacion(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjGeneral As New ClsGenerales(ObjVentas.IniciaTransacSQL())
|
||||
|
||||
Dim ObjContPaq As ClsContPAQi = Nothing
|
||||
'Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL())
|
||||
ErrorList = New List(Of String)
|
||||
@@ -7033,6 +7035,14 @@ Partial Class Ventas
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
'REGISTRAR UNA ENTREGA DIRECTA
|
||||
If TmpDT.COUNT("EntregaDirecta", "EntregaDirecta = 1") > 0 Then
|
||||
If Not RegistrarPaqueteriaGuia(ObjGeneral, ObjFactura.CveVenta) Then
|
||||
ErrorList.Add("Ocurrió un error al registrar la guia")
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(TipoDoctoViejo) Then
|
||||
@@ -9359,6 +9369,14 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
ObjClientes.Dispose()
|
||||
|
||||
'REGISTRAR UNA ENTREGA DIRECTA
|
||||
If TmpDT.COUNT("EntregaDirecta", "EntregaDirecta = 1") > 0 Then
|
||||
trPaqueteriaOpciones.Visible = False
|
||||
trPaqueteriOpcionesLabel.Visible = False
|
||||
trPaqueteriaDirectaLabel.Visible = True
|
||||
End If
|
||||
|
||||
BtnEmitirImprimir.Text = "Facturar"
|
||||
DdlTipoComprobante.SelectedValue = "Ing"
|
||||
DdlTipoComprobante.Enabled = False
|
||||
@@ -9366,7 +9384,7 @@ Partial Class Ventas
|
||||
Tab.ActiveTab = TabGenerales
|
||||
TabGenerales.Enabled = True
|
||||
Updatetabs.Update()
|
||||
|
||||
UPObservaciones.Update()
|
||||
|
||||
'Else
|
||||
' If TieneContrato Then
|
||||
@@ -22082,6 +22100,38 @@ Partial Class Ventas
|
||||
|
||||
ObjEventos.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Function RegistrarPaqueteriaGuia(ByRef ObjGeneral As ClsGenerales, CveVenta As Integer) As Boolean
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
|
||||
Dim CveSubProyecto As Integer = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
|
||||
Dim CveEstatus As Integer = 1
|
||||
Dim Fecha As String = Now.ToString("dd/MM/yyyy")
|
||||
Dim FechaEstimada As String = "-1"
|
||||
Dim NoCajas As Integer = 0
|
||||
Dim Observaciones As String = ""
|
||||
Dim CvePaqueteria As Integer = -1 ' GlobalDTPaqueterias(UsuarioActual.CveEmpresa, 0).FiltroPrimeroValor("CvePaqueteria", "").ToEntero
|
||||
|
||||
If CveSubProyecto > 0 Then
|
||||
Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(CvePaqueteria, 9, CveEstatus, CveSubProyecto, Fecha, "", "", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ImplicaCosto:=False)
|
||||
|
||||
If CvePaqueteriaGuia > 0 Then
|
||||
|
||||
If CveVenta > 0 OrElse CveSubProyecto > 0 Then
|
||||
If Not ObjGeneral.AddPaqueteriasGuiasDetalles(CvePaqueteriaGuia, CveVenta, -1, -1, -1) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
Return Not ErrorMovInv
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region " APLICAR NOTA DE CREDITO "
|
||||
@@ -25832,6 +25882,7 @@ Partial Class Ventas
|
||||
Dim mostrarOpcionesPaq As Boolean = DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped") And UsuarioActual.Empresa.Funcionalidad(280) = "1"
|
||||
trPaqueteriaOpciones.Visible = mostrarOpcionesPaq
|
||||
trPaqueteriOpcionesLabel.Visible = mostrarOpcionesPaq
|
||||
trPaqueteriaDirectaLabel.Visible = False
|
||||
End Sub
|
||||
|
||||
Private Sub NotificarPaqueteria()
|
||||
|
||||
Reference in New Issue
Block a user