function PATCH_095_FILE_UPLOAD(){ var cbCode = Project.Variables.login_as_cb.Value("participantCode"); let url = "C:\\Users\\vendor_qafusi4\\Documents\\S-INVEST GUI\\S-Invest GUI\\Data Source\\Data Upload\\12. Unit Transaction Subscription\\patch_095_upload_fund_unit_allocation.txt" var today = new Date(); var dd = String(today.getDate()).padStart(2, '0');//date today var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0! var yyyy = today.getFullYear(); today = yyyy+mm+dd; let template = 'transactionDate'+'|'+'transactiontype'+'|'+'cbCode'+'|'+'fundCode'+'|'+'numberOfUnits'+'|'+'NAVperUnit'+'|'+'grossTransactionAmount'+'|'+'transactionFee'+'|'+'netTransactionAmount\n'+ ''+today+'|'+'1'+'|'+cbCode+'|'+'LG002MMSFD844600'+'|'+'379.2249'+'|'+'26105.880000'+'|'+'10000000.00'+'|'+'100000.00'+'|'+'9900000.00'+'' ; 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); if (aqFile.Create(url) == 0) { aqFile.WriteToTextFile(url, template, aqFile.ctUTF8); Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis."); } } }