function PATCH_089_UPLOAD_SUBSCRIPTION() { let url = "C:\\Users\\vendor_qafusi4\\Documents\\S-INVEST GUI\\S-Invest GUI\\Data Source\\Data Upload\\12. Unit Transaction Subscription\\patch_089_upload_subscription_transaction.txt"; var saCode = Project.Variables.login_as_sa.Value("participantCodeSA"); var reference = 'Testing Subscription '+aqConvert.DateTimeToFormatStr(aqDateTime.Today(), "%Y%m%d"); 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'+'|'+'saCode'+'|'+'investorFundUnitA/CNo.'+'|'+'fundCode'+'|'+'amount(Nominal)'+'|'+'amount(Unit)'+'|'+'amount(AllUnits)'+'|'+'fee(Nominal)'+'|'+'fee(Unit)'+'|'+'fee(%)'+'|'+'redmPaymentA/CSequentialCode'+'|'+'redmPaymentBankBICCode'+'|'+'redmPaymentBankBIMemberCode'+'|'+'redmPaymentA/CNo.'+'|'+'paymentDate'+'|'+'transferType'+'|'+'taReferenceNo.\n'+ ''+today+'|'+'1'+'|'+saCode+'|'+'TMS69000CKUF0120'+'|'+'LG002MMSFD844600'+'|'+'10000000.00'+'|'+''+'|'+''+'|'+'100000.00'+'|'+''+'|'+''+'|'+''+'|'+''+'|'+''+'|'+''+'|'+''+'|'+''+'|'+reference+'' ; 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."); } } }