Built files from Bizgaze WebServer
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

fiscalyear.js 3.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. var Bizgaze;
  2. (function (Bizgaze) {
  3. let Apps;
  4. (function (Apps) {
  5. let Transact;
  6. (function (Transact) {
  7. let Controls;
  8. (function (Controls) {
  9. class FiscalYear extends Unibase.Platform.Core.BaseComponent {
  10. refreshFiscalYear() {
  11. var instance = this;
  12. var InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
  13. var PartitionId = 0;
  14. instance.fileCacheHelper.loadJsFile("platform/apps/components/partition.js", function () {
  15. if (Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + Unibase.Themes.Providers.DetailHelper.installedAppId + "_partitionid") != undefined) {
  16. $(".DetailSetting_" + InstalledAppId + "_RefreshFiscalYear").click(function () {
  17. PartitionId = Number(Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_partitionid").Value);
  18. Unibase.Platform.Apps.Components.Partition.Instance().createPartitionTables(PartitionId);
  19. });
  20. }
  21. else {
  22. Unibase.Platform.Apps.Components.Partition.Instance().refreshAllPartitions();
  23. }
  24. });
  25. }
  26. getFiscalyear(fiscalyearid, fromdate, todate) {
  27. debugger;
  28. var instance = this;
  29. var fdate = moment(fromdate.replaceAll("/", "-"), "DD-MM-YYYY").format("YYYY-MM-DD");
  30. var tdate = moment(todate.replaceAll("/", "-"), "DD-MM-YYYY").format("YYYY-MM-DD");
  31. if (fiscalyearid != 0 && fiscalyearid != null && fiscalyearid != undefined) {
  32. bootbox.confirm("Are you sure you want save this ?", function (result) {
  33. if (result == true) {
  34. instance.fileCacheHelper.loadJsFile("apps/transact/managers/ledgers/ledgermanager.js", function () {
  35. Bizgaze.Apps.Transact.Managers.LedgerManager.Instance().SaveClosingbalance(fiscalyearid, fdate, tdate).then(function (response) {
  36. if (response.status != Unibase.Data.Status.Error) {
  37. Unibase.Platform.Helpers.NavigationHelper.Instance().loadList(Unibase.Themes.Providers.DetailHelper.installedAppId, null);
  38. }
  39. });
  40. });
  41. }
  42. });
  43. }
  44. }
  45. static Instance() {
  46. if (this._instance === undefined)
  47. this._instance = new FiscalYear();
  48. return this._instance;
  49. }
  50. }
  51. Controls.FiscalYear = FiscalYear;
  52. })(Controls = Transact.Controls || (Transact.Controls = {}));
  53. })(Transact = Apps.Transact || (Apps.Transact = {}));
  54. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  55. })(Bizgaze || (Bizgaze = {}));