123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- function issuance()
- {
- var registrarCode = Project.Variables.code.Value("codeRegister");
- var url = "C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Issuance\\issuance.sti";
- var zip = "C:\\Users\\vendor_qafusi2\\Documents\\TestComplete 14 Projects\\EBAE Website\\Automation Testing File\\File upload\\Upload Issuance\\issuance.zip";
- var account = Project.Variables.getAccount1.Value("sid1");
- var securityCode = Project.Variables.code.Value("instrumenLocalCode");
- var certif2 = Project.Variables.certificate.Value("certif2");
- var certif3 = Project.Variables.certificate.Value("certif3");
- var certif4 = Project.Variables.certificate.Value("certif4");
- var certif5 = Project.Variables.certificate.Value("certif5");
- var certif6 = Project.Variables.certificate.Value("certif6");
- var certif7 = Project.Variables.certificate.Value("certif7");
- var certif8 = Project.Variables.certificate.Value("certif8");
- var certif9 = Project.Variables.certificate.Value("certif9");
- var certif10 = Project.Variables.certificate.Value("certif10");
- var certif11 = Project.Variables.certificate.Value("certif11");
-
- 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">'+certif2+'</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">20</Field>\n'+
- '<Field name="settlementDate">'+today+'</Field>\n'+
- '<Field name="issuanceType">ISSUANCE</Field>\n'+
- '<Field name="certificateNumber">'+certif2+'</Field>\n'+
- '<Field name="shareRanges">11-30</Field>\n'+
- '<Field name="shareSeries">B</Field>\n'+
- '<Field name="reason">ISSU</Field>\n'+
- '<Field name="otherMemberCode">9X000</Field>\n'+
- '</Record>\n'+
- '<Record name="data">\n'+
- '<Field name="externalReference">'+certif3+'</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">30</Field>\n'+
- '<Field name="settlementDate">'+today+'</Field>\n'+
- '<Field name="issuanceType">ISSUANCE</Field>\n'+
- '<Field name="certificateNumber">'+certif3+'</Field>\n'+
- '<Field name="shareRanges">31-60</Field>\n'+
- '<Field name="shareSeries">B</Field>\n'+
- '<Field name="reason">ISSU</Field>\n'+
- '<Field name="otherMemberCode">9X000</Field>\n'+
- '</Record>\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">ISSUANCE</Field>\n'+
- '<Field name="certificateNumber">'+certif4+'</Field>\n'+
- '<Field name="shareRanges">61-100</Field>\n'+
- '<Field name="shareSeries">B</Field>\n'+
- '<Field name="reason">ISSU</Field>\n'+
- '<Field name="otherMemberCode">9X000</Field>\n'+
- '</Record>\n'+
- '<Record name="data">\n'+
- '<Field name="externalReference">'+certif5+'</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">50</Field>\n'+
- '<Field name="settlementDate">'+today+'</Field>\n'+
- '<Field name="issuanceType">ISSUANCE</Field>\n'+
- '<Field name="certificateNumber">'+certif5+'</Field>\n'+
- '<Field name="shareRanges">101-150</Field>\n'+
- '<Field name="shareSeries">B</Field>\n'+
- '<Field name="reason">ISSU</Field>\n'+
- '<Field name="otherMemberCode">9X000</Field>\n'+
- '</Record>\n'+
- '<Record name="data">\n'+
- '<Field name="externalReference">'+certif6+'</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">60</Field>\n'+
- '<Field name="settlementDate">'+today+'</Field>\n'+
- '<Field name="issuanceType">ISSUANCE</Field>\n'+
- '<Field name="certificateNumber">'+certif6+'</Field>\n'+
- '<Field name="shareRanges">151-210</Field>\n'+
- '<Field name="shareSeries">B</Field>\n'+
- '<Field name="reason">ISSU</Field>\n'+
- '<Field name="otherMemberCode">9X000</Field>\n'+
- '</Record>\n'+
- '<Record name="data">\n'+
- '<Field name="externalReference">'+certif7+'</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">70</Field>\n'+
- '<Field name="settlementDate">'+today+'</Field>\n'+
- '<Field name="issuanceType">ISSUANCE</Field>\n'+
- '<Field name="certificateNumber">'+certif7+'</Field>\n'+
- '<Field name="shareRanges">211-280</Field>\n'+
- '<Field name="shareSeries">B</Field>\n'+
- '<Field name="reason">ISSU</Field>\n'+
- '<Field name="otherMemberCode">9X000</Field>\n'+
- '</Record>\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">ISSUANCE</Field>\n'+
- '<Field name="certificateNumber">'+certif8+'</Field>\n'+
- '<Field name="shareRanges">281-360</Field>\n'+
- '<Field name="shareSeries">B</Field>\n'+
- '<Field name="reason">ISSU</Field>\n'+
- '<Field name="otherMemberCode">9X000</Field>\n'+
- '</Record>\n'+
- '<Record name="data">\n'+
- '<Field name="externalReference">'+certif9+'</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">90</Field>\n'+
- '<Field name="settlementDate">'+today+'</Field>\n'+
- '<Field name="issuanceType">ISSUANCE</Field>\n'+
- '<Field name="certificateNumber">'+certif9+'</Field>\n'+
- '<Field name="shareRanges">361-450</Field>\n'+
- '<Field name="shareSeries">B</Field>\n'+
- '<Field name="reason">ISSU</Field>\n'+
- '<Field name="otherMemberCode">9X000</Field>\n'+
- '</Record>\n'+
- '<Record name="data">\n'+
- '<Field name="externalReference">'+certif10+'</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">100</Field>\n'+
- '<Field name="settlementDate">'+today+'</Field>\n'+
- '<Field name="issuanceType">ISSUANCE</Field>\n'+
- '<Field name="certificateNumber">'+certif10+'</Field>\n'+
- '<Field name="shareRanges">451-550</Field>\n'+
- '<Field name="shareSeries">B</Field>\n'+
- '<Field name="reason">ISSU</Field>\n'+
- '<Field name="otherMemberCode">9X000</Field>\n'+
- '</Record>\n'+
- '<Record name="data">\n'+
- '<Field name="externalReference">'+certif11+'</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">110</Field>\n'+
- '<Field name="settlementDate">'+today+'</Field>\n'+
- '<Field name="issuanceType">ISSUANCE</Field>\n'+
- '<Field name="certificateNumber">'+certif11+'</Field>\n'+
- '<Field name="shareRanges">551-660</Field>\n'+
- '<Field name="shareSeries">B</Field>\n'+
- '<Field name="reason">ISSU</Field>\n'+
- '<Field name="otherMemberCode">9X000</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.");
- }
- }
- }
|