SVRZ#29377 Inkoopondersteuning
svn path=/Website/branches/v5.4.2/; revision=23461
This commit is contained in:
@@ -2,9 +2,10 @@ REM GEN_EXPORT_NACHTWERK.BAT
|
||||
REM
|
||||
REM SVRZ
|
||||
REM
|
||||
REM Zet bestelopdrachten/bestellingen op Geleverd 'leverdagen'+'notidagen'
|
||||
RWN na aanmaken/verzenden van bestelopdracht.
|
||||
REM LET OP: Pseudo-export; exporteert feitelijk helemaal niets.
|
||||
REM Zet bestelopdrachten/bestellingen op Geleverd 'leverdagen+notidagen'
|
||||
REM na aanmaken/verzenden van bestelopdracht.
|
||||
REM Genereer PDF per (bestel)opdracht die de voorgaande dag is verzonden
|
||||
REM en exporteer/FTP deze naar SVRZ (tbv. Swift Factuur).
|
||||
REM
|
||||
REM Context : roep deze file aan indien nodig, of schedule deze
|
||||
REM Vereist : de randvoorwaarde voor het gebruik van gen_export
|
||||
@@ -17,3 +18,22 @@ REM
|
||||
|
||||
REM ================================================== create exportfile
|
||||
CALL ..\..\..\utils\gen_export\gen_export.bat NACHTWERK
|
||||
|
||||
if not exist swift.bat goto einde
|
||||
|
||||
del *.pdf
|
||||
|
||||
call swift.bat
|
||||
|
||||
for /f "tokens=1,2,3 delims=: " %%a in ('echo %TIME%') do if %%a LSS 10 (set tstamp=0%%a%%b%%c) else (set tstamp=%%a%%b%%c)
|
||||
for /f "tokens=2,3,4 delims=- " %%a in ('echo %date%') do set dstamp=%%c%%b%%a
|
||||
set dtstamp=%dstamp%_%tstamp%
|
||||
|
||||
move swift.bat NACHTWERK/swift%dtstamp%.txt
|
||||
|
||||
REM FTP pdf(s) naar SVRZ
|
||||
REM ftp.exe -n -s:pdf2svrz.scr
|
||||
REM ================================================== copy to final destination
|
||||
copy *.pdf d:\Apps\Facilitor\ftp_sites\LocalUser\SVRZftp\Swift
|
||||
|
||||
:einde
|
||||
|
||||
2
CUST/SVRZ/export/genereer1besopdrpdf.bat
Normal file
2
CUST/SVRZ/export/genereer1besopdrpdf.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
::API 'BESOPDRBON' wijst naar 'appl/bes/bes_opdr_xml.asp' en API 'MLDOPDRBON' wijst naar 'appl/mld/mld_opdr_xml.asp'
|
||||
phantomjs rasterize.js "https://svrz.facilitor.nl/?API=BESOPDRBON&APIKEY=iCzLzvVjZDRHxSOqhxIJEXCPOEoadXLb&opdr_key=%1" %2.pdf A4
|
||||
2
CUST/SVRZ/export/genereer1mldopdrpdf.bat
Normal file
2
CUST/SVRZ/export/genereer1mldopdrpdf.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
::API 'BESOPDRBON' wijst naar 'appl/bes/bes_opdr_xml.asp' en API 'MLDOPDRBON' wijst naar 'appl/mld/mld_opdr_xml.asp'
|
||||
phantomjs rasterize.js "https://svrz.facilitor.nl/?API=MLDOPDRBON&APIKEY=iCzLzvVjZDRHxSOqhxIJEXCPOEoadXLb&opdr_key=%1" %2.pdf A4
|
||||
32
CUST/SVRZ/export/rasterize.js
Normal file
32
CUST/SVRZ/export/rasterize.js
Normal file
@@ -0,0 +1,32 @@
|
||||
var page = require('webpage').create(),
|
||||
system = require('system'),
|
||||
address, output, size;
|
||||
|
||||
if (system.args.length < 3 || system.args.length > 5) {
|
||||
console.log('Usage: rasterize.js URL filename [paperwidth*paperheight|paperformat] [zoom]');
|
||||
console.log(' paper (pdf output) examples: "5in*7.5in", "10cm*20cm", "A4", "Letter"');
|
||||
phantom.exit(1);
|
||||
} else {
|
||||
address = system.args[1];
|
||||
output = system.args[2];
|
||||
page.viewportSize = { width: 600, height: 600 };
|
||||
if (system.args.length > 3 && system.args[2].substr(-4) === ".pdf") {
|
||||
size = system.args[3].split('*');
|
||||
page.paperSize = size.length === 2 ? { width: size[0], height: size[1], margin: '0px' }
|
||||
: { format: system.args[3], orientation: 'portrait', margin: '1cm' };
|
||||
}
|
||||
if (system.args.length > 4) {
|
||||
page.zoomFactor = system.args[4];
|
||||
}
|
||||
page.open(address, function (status) {
|
||||
if (status !== 'success') {
|
||||
console.log('Unable to load the address!');
|
||||
phantom.exit();
|
||||
} else {
|
||||
window.setTimeout(function () {
|
||||
page.render(output);
|
||||
phantom.exit();
|
||||
}, 2000);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user