|
|
|
@ -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 |
|
|
|
@ -151,7 +151,9 @@ def CreateFolderContent(): |
|
|
|
|
'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) |
|
|
|
|