123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- function transfer121()
- {
- var registrarCode = Project.Variables.code.Value("codeRegister");
- var url = "C:\\Users\\vendor_qafusi2\\Documents\\EBAE Upload\\Upload Transfer 121\\transfer.str";
- var zip = "C:\\Users\\vendor_qafusi2\\Documents\\EBAE Upload\\Upload Transfer 121\\transfer.zip";
- var account1 = Aliases.browser.pageEBaePtKustodianSentralEfekIn.cell79.innerText;
- var account2 = Aliases.browser.pageEBaePtKustodianSentralEfekIn.cell70.innerText;
- var securityCode = Project.Variables.code.Value("instrumenLocalCode");
-
- var today = new Date();
- var dd = String(today.getDate()).padStart(2, '0');
- var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
- var yyyy = today.getFullYear();
- today = yyyy + mm + dd;
-
- var template =
- '<Message>\n'+
- '<Record name="data">\n'+
- '<Field name="externalReference">ECN013</Field>\n'+
- '<Field name="participantCode">'+registrarCode+'</Field>\n'+
- '<Field name="sourceAccount">'+account1+'</Field>\n'+
- '<Field name="targetAccount">'+account2+'</Field>\n'+
- '<Field name="securityCodeType">ISIN</Field>\n'+
- '<Field name="securityCode">'+securityCode+'</Field>\n'+
- '<Field name="numberOfSecurities">11</Field>\n'+
- '<Field name="settlementDate">'+today+'</Field>\n'+
- '<Field name="description">Testing</Field>\n'+
- '<List name="CertificateList">\n'+
- '<Field name="Certificate">ECN013</Field>\n'+
- '</List>\n'+
- '<Field name="reason">TRAD</Field>\n'+
- '</Record>\n'+
- '</Message>' ;
-
-
- if (aqFile.Create(url) == 0)
- {
-
- aqFile.WriteToTextFile(url, template, aqFile.ctUTF8);
- Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
- }
- else
- {
- aqFile.Delete(url);
- aqFile.Delete(zip);
- if (aqFile.Create(url) == 0)
- {
-
- aqFile.WriteToTextFile(url, template, aqFile.ctUTF8);
- Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
- }
- }
- }
|