1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- function conversion()
- {
- var registrarCode = Project.Variables.code.Value("codeRegister");
- var url = "C:\\Users\\vendor_qafusi2\\Documents\\EBAE Upload\\Upload Deissuance\\deissuance.sti";
- var zip = "C:\\Users\\vendor_qafusi2\\Documents\\EBAE Upload\\Upload Deissuance\\deissuance.zip";
- var account = Project.Variables.getAccount1.Value("sid1");
- var securityCode = Project.Variables.code.Value("instrumenLocalCode");
- var certif8 = Project.Variables.certificate.Value("certif8");
-
- var today = new Date();
- var dd = String(today.getDate()).padStart(2, '0');
- var mm = String(today.getMonth() + 1).padStart(2, '0');
- var yyyy = today.getFullYear();
- today = yyyy + mm + dd;
-
- var template =
- '<Message>\n'+
- '<Record name="data">\n'+
- '<Field name="externalReference">'+certif8+'</Field>\n'+
- '<Field name="participantCode">'+registrarCode+'</Field>\n'+
- '<Field name="account">'+account+'</Field>\n'+
- '<Field name="securityCodeType">LOCAL</Field>\n'+
- '<Field name="securityCode">'+securityCode+'</Field>\n'+
- '<Field name="issuedQuantity">80</Field>\n'+
- '<Field name="settlementDate">'+today+'</Field>\n'+
- '<Field name="issuanceType">DEISSUANCE</Field>\n'+
- '<Field name="certificateNumber">'+certif8+'</Field>\n'+
- '<Field name="shareRanges">281-360</Field>\n'+
- '<Field name="shareSeries">B</Field>\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.");
- }
- }
- }
|