PATCH_089.js 1.6 KB

12345678910111213141516171819202122232425262728293031
  1. function PATCH_089_UPLOAD_SUBSCRIPTION() {
  2. 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";
  3. var saCode = Project.Variables.login_as_sa.Value("participantCodeSA");
  4. var reference = 'Testing Subscription '+aqConvert.DateTimeToFormatStr(aqDateTime.Today(), "%Y%m%d");
  5. var today = new Date();
  6. var dd = String(today.getDate()).padStart(2, '0');//date today
  7. var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
  8. var yyyy = today.getFullYear();
  9. today = yyyy+mm+dd;
  10. let template =
  11. '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'+
  12. ''+today+'|'+'1'+'|'+saCode+'|'+'TMS69000CKUF0120'+'|'+'LG002MMSFD844600'+'|'+'10000000.00'+'|'+''+'|'+''+'|'+'100000.00'+'|'+''+'|'+''+'|'+''+'|'+''+'|'+''+'|'+''+'|'+''+'|'+''+'|'+reference+''
  13. ;
  14. if (aqFile.Create(url) == 0)
  15. {
  16. aqFile.WriteToTextFile(url, template, aqFile.ctUTF8);
  17. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  18. }
  19. else
  20. {
  21. aqFile.Delete(url);
  22. if (aqFile.Create(url) == 0)
  23. {
  24. aqFile.WriteToTextFile(url, template, aqFile.ctUTF8);
  25. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  26. }
  27. }
  28. }