Cambios en paqueria
This commit is contained in:
@@ -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