From 102e561ab4ef0b9ec0d614b6a776e830edae2cf8 Mon Sep 17 00:00:00 2001 From: Arthur Egberink Date: Tue, 16 May 2017 11:25:20 +0000 Subject: [PATCH] FSN#37813 -- Implementatie PCHW Gemeente Westland svn path=/Website/branches/v2016.3/; revision=33869 --- CUST/PCHW/export/gen_export_exact.bat | 26 ++++++++++++++++++++++++++ CUST/PCHW/export/sendmail.vbs | 19 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 CUST/PCHW/export/gen_export_exact.bat create mode 100644 CUST/PCHW/export/sendmail.vbs diff --git a/CUST/PCHW/export/gen_export_exact.bat b/CUST/PCHW/export/gen_export_exact.bat new file mode 100644 index 0000000000..f1344d08c8 --- /dev/null +++ b/CUST/PCHW/export/gen_export_exact.bat @@ -0,0 +1,26 @@ +REM GEN_EXPORT_EXACT.BAT +REM +REM PCHW +REM +REM Exporteert informatie naar een export-bestand +REM +REM Context : roep deze file aan indien nodig, of schedule deze +REM Verseist: de randvoorwaarde voor het gebruik van gen_export +REM +REM $Revision$ +REM $Id$ +REM +REM (c) 2010, SG|facilitor bv, +31 (53) 4800700, support@sgfacilitor.nl +REM + +copy .\EXACT\*_fac*.xml .\EXACT\backup +del .\EXACT\*_fac*.log +del .\EXACT\*_fac*.xml +CALL ..\..\..\utils\gen_export\gen_export.bat EXACT + +if not exist ".\EXACT\*_fac*.xml" goto einde +cscript sendmail.vbs +:einde + + +CALL ..\..\..\utils\gen_export\gen_export.bat VERWERK_EXACT diff --git a/CUST/PCHW/export/sendmail.vbs b/CUST/PCHW/export/sendmail.vbs new file mode 100644 index 0000000000..6f49e87d0b --- /dev/null +++ b/CUST/PCHW/export/sendmail.vbs @@ -0,0 +1,19 @@ + +Dim fso, folder, files +Set fso = CreateObject("Scripting.FileSystemObject") + +Set folder = fso.GetFolder("d:\Apps\Facilitor\Fplace5i\CUST\PCHW\export\EXACT") +Set files = folder.Files +For each folderIdx In files + If InStrRev(folderIdx.Name, ".xml") > 0 Then + Set objEmail = CreateObject("CDO.Message") + objEmail.From = "no_reply@pchw.facilitor.nl" + objEmail.To = "fa@pch-dienstengroep.nl" + objEmail.Subject = "Facilitor: Bestand met inkoopfacturen Westland" + objEmail.Textbody = "Automatisch verzonden bestand van geexporteerde facturen." + objEmail.AddAttachment "d:\Apps\Facilitor\Fplace5i\CUST\PCHW\export\EXACT\" + folderIdx.Name + objEmail.Send + End If +Next + +