PATCH_093.js.bak 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. function PATCH_093_GET_DATE() {
  2. let url = "C:\\Users\\vendor_qafusi4\\Documents\\S-INVEST GUI\\S-Invest GUI\\Data Source\\Data Input\\12. Unit Transaction Subscription\\patch_089_input_date.txt";
  3. var today = new Date();
  4. var dd = String(today.getDate()).padStart(2, '0');//date today
  5. var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
  6. var yyyy = today.getFullYear();
  7. today = yyyy+'-'+mm+'-'+dd;
  8. let template =
  9. 'transactionDate\n'+
  10. ''+today+''
  11. ;
  12. if (aqFile.Create(url) == 0)
  13. {
  14. aqFile.WriteToTextFile(url, template, aqFile.ctUTF8);
  15. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  16. }
  17. else
  18. {
  19. aqFile.Delete(url);
  20. if (aqFile.Create(url) == 0)
  21. {
  22. aqFile.WriteToTextFile(url, template, aqFile.ctUTF8);
  23. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  24. }
  25. }
  26. }
  27. function PATCH_093_FILE_UPLOAD(){
  28. var ref = Aliases.browser.page1011261948080.textnode.shadowroot.textnodeNo.shadowroot.cellVaadinGridCell123.innerText;
  29. var cbCode = Project.Variables.login_as_cb.Value("participantCode");
  30. let url = "C:\\Users\\vendor_qafusi4\\Documents\\S-INVEST GUI\\S-Invest GUI\\Data Source\\Data Upload\\12. Unit Transaction Subscription\\patch_093_upload_investor_unit_allocation.txt"
  31. var today = new Date();
  32. var dd = String(today.getDate()).padStart(2, '0');//date today
  33. var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
  34. var yyyy = today.getFullYear();
  35. today = yyyy+mm+dd;
  36. let template =
  37. 'transactionDate'+'|'+'transactiontype'+'|'+'cbCode'+'|'+'investorFundUnitA/CNo.'+'|'+'fundCode'+'|'+'numberOfUnits'+'|'+'NAVperUnit'+'|'+'grossTransactionAmount'+'|'+'transactionFee(Nominal)'+'|'+'netTransactionAmount'+'|'+'ReferenceNo.\n'+
  38. ''+today+'|'+'1'+'|'+cbCode+'|'+'TMS69000CKUF0120'+'|'+'LG002MMSFD844600'+'|'+'379.2249'+'|'+'26105.880000'+'|'+'10000000.00'+'|'+'100000.00'+'|'+'9900000.00'+'|'+ref+''
  39. ;
  40. if (aqFile.Create(url) == 0)
  41. {
  42. aqFile.WriteToTextFile(url, template, aqFile.ctUTF8);
  43. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  44. }
  45. else
  46. {
  47. aqFile.Delete(url);
  48. if (aqFile.Create(url) == 0)
  49. {
  50. aqFile.WriteToTextFile(url, template, aqFile.ctUTF8);
  51. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  52. }
  53. }
  54. }
  55. function PATCH_094_FILE_INPUT(){
  56. var ref = Aliases.browser.page1011261948080.textnode.shadowroot.textnodeNo.shadowroot.cellVaadinGridCell163.innerText;
  57. let url = "C:\\Users\\vendor_qafusi4\\Documents\\S-INVEST GUI\\S-Invest GUI\\Data Source\\Data Input\\12. Unit Transaction Subscription\\patch_093_input_investor_unit_allocation.txt"
  58. let template =
  59. 'investorFundUnitA/CNo.'+'|'+'fundCode'+'|'+'numberOfUnits'+'|'+'NAVperUnit'+'|'+'grossTransactionAmount'+'|'+'transactionFee(Nominal)'+'|'+'netTransactionAmount'+'|'+'ReferenceNo.\n'+
  60. ''+'TMS69000CKUF0120'+'|'+'LG002MMSFD844600'+'|'+'379.2249'+'|'+'26105.880000'+'|'+'10000000.00'+'|'+'100000.00'+'|'+'9900000.00'+'|'+'00025445'+''
  61. ;
  62. if (aqFile.Create(url) == 0)
  63. {
  64. aqFile.WriteToTextFile(url, template, aqFile.ctUTF8);
  65. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  66. }
  67. else
  68. {
  69. aqFile.Delete(url);
  70. if (aqFile.Create(url) == 0)
  71. {
  72. aqFile.WriteToTextFile(url, template, aqFile.ctUTF8);
  73. Log.Message("File dibuat dan teks yang ditentukan berhasil ditulis.");
  74. }
  75. }
  76. }