-- activación de cancelación de venta/remisión al cancelar el viaje! y si tiene pago se genera el ixc
This commit is contained in:
@@ -165,22 +165,17 @@ Partial Class ListadoContratos
|
||||
Dim tempArray() As String
|
||||
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
||||
Dim fDestino = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", $"{CveContrato.ToString}.{ FileExtension}")
|
||||
|
||||
Try
|
||||
If File.Exists(fDestino) Then
|
||||
File.Delete(fDestino)
|
||||
End If
|
||||
|
||||
File.Move(fileItem.FileUrl, fDestino)
|
||||
|
||||
If Not File.Exists(fDestino) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
If ObjContratos.UpdateContratoArchivo(CveContrato, $"{CveContrato.ToString}.{ FileExtension}", UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = False
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
ErrorProceso = True
|
||||
End Try
|
||||
@@ -222,7 +217,6 @@ Partial Class ListadoContratos
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
ObjContratos.Commit()
|
||||
|
||||
@@ -323,7 +317,6 @@ Partial Class ListadoContratos
|
||||
If Not Directory.Exists(folderContratosPath) Then
|
||||
Directory.CreateDirectory(folderContratosPath)
|
||||
End If
|
||||
|
||||
If Not Directory.Exists(Path.Combine(folderContratosPath, "Temp")) Then
|
||||
Directory.CreateDirectory(Path.Combine(folderContratosPath, "Temp"))
|
||||
End If
|
||||
@@ -334,26 +327,20 @@ Partial Class ListadoContratos
|
||||
Session("FileExtension") = FileExtension
|
||||
Dim tempArray() As String
|
||||
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
|
||||
|
||||
|
||||
ViewState("extencion") = FileExtension
|
||||
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", "Temp", fileItem.filename)
|
||||
|
||||
File.Move(fileItem.FileUrl, ViewState("FUrl").ToString)
|
||||
LbArchivo.Text = tempArray(1)
|
||||
|
||||
Next
|
||||
|
||||
UpModal.Update()
|
||||
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1")
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "G E N E R A R E M I S O N"
|
||||
|
||||
|
||||
Private Function GeneraRemision(CveContrato As Integer, ObsPartida As String, Importe As Decimal, CvePS As Integer, ByRef TransaccionSQL As SqlClient.SqlTransaction) As RespuestaFacturacion
|
||||
|
||||
Dim Respuesta As New RespuestaFacturacion()
|
||||
@@ -366,7 +353,6 @@ Partial Class ListadoContratos
|
||||
Dim ObjFactura As Modelos.Factura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, DdlClientes.SelectedValue.ToEntero, CveMoneda, "Rem")
|
||||
|
||||
If ObjFactura IsNot Nothing AndAlso ProcesoOK Then
|
||||
|
||||
ObjFactura.CveMoneda = CveMoneda
|
||||
ObjFactura.CveContrato = CveContrato
|
||||
ObjFactura.Observaciones = ObsPartida
|
||||
@@ -433,8 +419,6 @@ Partial Class ListadoContratos
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub LnkAgregarContrato_Click(sender As Object, e As EventArgs)
|
||||
@@ -442,7 +426,4 @@ Partial Class ListadoContratos
|
||||
RegistraScript("$('#ModalAgregar').modal({ backdrop: 'static', keyboard: false });")
|
||||
UpTitulos.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user