UltimaVersionFuncional11-abril-2023

SyncUpdate2IONOS
Luis Angel Rendon Arrazola 1 year ago
parent f1efbd589a
commit a64b378e1a
  1. 6
      SyncReferences2IONOS.py
  2. 3
      log/Referencias.txt
  3. 3
      log/fechayHora.txt

@ -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)

@ -0,0 +1,3 @@
23-00307I
23-00429I
23-00648I

@ -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
Loading…
Cancel
Save