talamhu
This commit is contained in:
@@ -589,6 +589,9 @@ Public Class ClsCompras
|
|||||||
Catch ex As SqlException
|
Catch ex As SqlException
|
||||||
If ex.Message.Contains("FK_Inv_MovimientosDetalle_Inv_MovimientosDetalleEntrada") Then
|
If ex.Message.Contains("FK_Inv_MovimientosDetalle_Inv_MovimientosDetalleEntrada") Then
|
||||||
Alert(String.Format("No se puede eliminar la compra, porque tiene movimientos de salida de Almacen relacionados."), TipoMensaje.MsgAdvertencia)
|
Alert(String.Format("No se puede eliminar la compra, porque tiene movimientos de salida de Almacen relacionados."), TipoMensaje.MsgAdvertencia)
|
||||||
|
|
||||||
|
ElseIf ex.Message.Contains("50015") Then
|
||||||
|
Alert("No se puede eliminar na compra debido a que el perido esta cerrado.", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
Me.OnError("Ocurrió un error al eliminar la Compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
Me.OnError("Ocurrió un error al eliminar la Compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -6732,7 +6732,7 @@ Partial Class Compras_Compras
|
|||||||
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||||
Dim ContienePSNeteoBonif As Boolean = False
|
Dim ContienePSNeteoBonif As Boolean = False
|
||||||
For Each Dr As DataRow In TmpDT.Rows
|
For Each Dr As DataRow In TmpDT.Rows
|
||||||
If Dr("CveClasificacion").ToString.ToEntero.Contiene(20319) Then 'clasificación de Bonificación, no se incluirá en el neteo
|
If Dr("CveClasificacion").ToString.ToEntero.Contiene(20319) Or DdlTipoCompra.SelectedValue.ToEntero = 11 Then 'clasificación de Bonificación, no se incluirá en el neteo
|
||||||
ContienePSNeteoBonif = True
|
ContienePSNeteoBonif = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ public class TareasJam : IHttpHandler
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
////"ftp://us2.hostedftp.com/", "agrojam", "A12345678";
|
//"ftp://us2.hostedftp.com/", "agrojam", "A12345678";
|
||||||
|
|
||||||
//string FTPServer = "ftp://127.0.0.1/";
|
//string FTPServer = "ftp://127.0.0.1/";
|
||||||
//string TFPUsr = "Toor";
|
//string TFPUsr = "Toor";
|
||||||
//string FTPPass = "agj-3500";
|
//string FTPPass = "agj-3500";
|
||||||
@@ -321,10 +322,10 @@ public class TareasJam : IHttpHandler
|
|||||||
|
|
||||||
if (CargaProductos)
|
if (CargaProductos)
|
||||||
{
|
{
|
||||||
CargaVentas = CargarArchivos(FInfoVentas, FTPServer, TFPUsr, FTPPass);
|
CargaVentas = CargarArchivos(FInfoVentas, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
||||||
if (CargaVentas)
|
if (CargaVentas)
|
||||||
{
|
{
|
||||||
CargaVentas = VerificarArchivo(FInfoVentas, FInfoVentas.Length, FTPServer, TFPUsr, FTPPass);
|
CargaVentas = VerificarArchivo(FInfoVentas, FInfoVentas.Length, $"{FTPServer}/Ventas", TFPUsr, FTPPass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -338,10 +339,10 @@ public class TareasJam : IHttpHandler
|
|||||||
|
|
||||||
if (CargaProductos & CargaVentas)
|
if (CargaProductos & CargaVentas)
|
||||||
{
|
{
|
||||||
CargaClientes = CargarArchivos(FInfoClientes, FTPServer, TFPUsr, FTPPass);
|
CargaClientes = CargarArchivos(FInfoClientes, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
||||||
if (CargaClientes)
|
if (CargaClientes)
|
||||||
{
|
{
|
||||||
CargaClientes = VerificarArchivo(FInfoClientes, FInfoClientes.Length, FTPServer, TFPUsr, FTPPass);
|
CargaClientes = VerificarArchivo(FInfoClientes, FInfoClientes.Length, $"{FTPServer}/Clientes", TFPUsr, FTPPass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -355,10 +356,10 @@ public class TareasJam : IHttpHandler
|
|||||||
|
|
||||||
if (CargaProductos & CargaVentas& CargaClientes )
|
if (CargaProductos & CargaVentas& CargaClientes )
|
||||||
{
|
{
|
||||||
CargaAlmacenes = CargarArchivos(FInfoAlmacenes, FTPServer, TFPUsr, FTPPass);
|
CargaAlmacenes = CargarArchivos(FInfoAlmacenes, $"{FTPServer}/Stock", TFPUsr, FTPPass);
|
||||||
if (CargaClientes)
|
if (CargaClientes)
|
||||||
{
|
{
|
||||||
CargaAlmacenes = VerificarArchivo(FInfoAlmacenes, FInfoAlmacenes.Length, FTPServer, TFPUsr, FTPPass);
|
CargaAlmacenes = VerificarArchivo(FInfoAlmacenes, FInfoAlmacenes.Length, $"{FTPServer}/Stock", TFPUsr, FTPPass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -434,7 +435,7 @@ public class TareasJam : IHttpHandler
|
|||||||
|
|
||||||
ClsSisMail Correo = new ClsSisMail();
|
ClsSisMail Correo = new ClsSisMail();
|
||||||
string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
|
string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
|
||||||
// string Para = "oscar.irigoyen@adssistemas.mx";
|
//string Para = "oscar.irigoyen@adssistemas.mx";
|
||||||
string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}";
|
string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}";
|
||||||
|
|
||||||
Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo, Archivos:ListaArchivos);
|
Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo, Archivos:ListaArchivos);
|
||||||
@@ -446,7 +447,7 @@ public class TareasJam : IHttpHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private bool CargarArchivos(FileInfo FInfo, string FTPServer, string FTPUsr, string FTPPass)
|
private bool CargarArchivos(FileInfo FInfo, string FTPServer, string FTPUsr, string FTPPass )
|
||||||
{
|
{
|
||||||
bool Respuesta;
|
bool Respuesta;
|
||||||
//var FInfo = new FileInfo(RutaArchivo);
|
//var FInfo = new FileInfo(RutaArchivo);
|
||||||
|
|||||||
Reference in New Issue
Block a user