12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- function conversion()
- {
- var registrarCode = Project.Variables.code.Value("codeRegister");
- var url = "C:\\Users\\vendor_qafusi2\\Documents\\EBAE Upload\\Upload Conversion Demat\\conv_to_demat.conv";
- var zip = "C:\\Users\\vendor_qafusi2\\Documents\\EBAE Upload\\Upload Conversion Demat\\conv_to_demat.zip";
- var account = Project.Variables.getAccount1.Value("sid1");
- var securityCode = Project.Variables.code.Value("instrumenLocalCode");
- var certif4 = Project.Variables.certificate.Value("certif4");
-
- 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">'+certif4+'</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">40</Field>\n'+
- ' <Field name="settlementDate">'+today+'</Field>\n'+
- ' <Field name="issuanceType">DEISSUANCE</Field>\n'+
- ' <Field name="certificateNumber">'+certif4+'</Field>\n'+
- ' <Field name="shareRanges">61-100</Field>\n'+
- ' <Field name="conversionType">DEMAT</Field>\n'+
- ' <Field name="cbestAccount">123456789</Field>\n'+
- ' <Field name="newCertificateNumber">'+certif4+'</Field>\n'+
- ' <Field name="newShareRanges">61-100</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.");
- }
- }
- }
|