diff --git a/SyncReferences2IONOS.py b/SyncReferences2IONOS.py index 0df6cdd..8cb3748 100644 --- a/SyncReferences2IONOS.py +++ b/SyncReferences2IONOS.py @@ -102,7 +102,7 @@ def CreateFolderContent(): cursor.execute("""SELECT P.sReferencia, p.Archivo, P.Aduana, P.Patente, P.Pedimento, P.[Pedimento Fecha Pago], Peds.nTipoCambio, P.Clave, P.Cliente FROM SIR.Admin.SIR_VT_PedimPagados P INNER JOIN SIR.SIR.SIR_149_PEDIMENTO AS Peds ON Peds.nIdPedimento149=ID - WHERE P.ClienteClave=2096 and p.[Pedimento FechaPago]>=CAST( GETDATE()-5 AS Date )""") + WHERE P.ClienteClave=2096 and p.[Pedimento FechaPago]>=CAST( GETDATE()-2 AS Date )""") for row in cursor: referencia = row[0] archivoM = row[1] @@ -136,7 +136,7 @@ def CreateFolderContent(): # Procesar archivo if WriteToLog(reference): processed_references.append(reference) - URL = 'http://localhost:5000/api/AmazonInvoice/UploadSIRReference?ArchivoM=' +\ + URL = 'https://www.gemcousa.mx/GEMCOBackend/api/AmazonInvoice/UploadSIRReference?ArchivoM=' +\ archivoM+'&aduana='+aduana+'&patente='+patente + \ '&pedimento='+pedimento+'&fPago=' + \ str(fPago)+'&TipoCambio='+str(tipoCambio)+'&clave='+clave @@ -150,8 +150,10 @@ def CreateFolderContent(): 'fPago' : str(fPago), 'tipoCambio' : str(tipoCambio), 'clave': clave + } + print( f"la referencia {reference} ya ha sido posteada." ) r = requests.post(url=URL,files=multiple_files, verify=False, timeout=30) except Exception as e: print("Error: %s" % e) diff --git a/log/Referencias.txt b/log/Referencias.txt new file mode 100644 index 0000000..9fc2b64 --- /dev/null +++ b/log/Referencias.txt @@ -0,0 +1,3 @@ +23-00307I +23-00429I +23-00648I diff --git a/log/fechayHora.txt b/log/fechayHora.txt new file mode 100644 index 0000000..0e725d3 --- /dev/null +++ b/log/fechayHora.txt @@ -0,0 +1,3 @@ +2023-04-11 17:13:14 - 23-00307I +2023-04-11 17:13:26 - 23-00429I +2023-04-11 17:13:27 - 23-00648I