pais_legacy 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39e1f89020868a562e4492b21b02e7a3621ec6eff3cd8ed5d28d41d01fac248e
4
- data.tar.gz: 8f62839b4046d6f9a8fca8d168bc05291a81fa4669d9ff0bafd2655404b63a6b
3
+ metadata.gz: 3e2c0370787b5a04408f023199df9003af302b1d3c03ddd09b9a86d5b28ac822
4
+ data.tar.gz: 7c8f068cb14b3999bd004232e863a64b07edcf2d04439977c82c4eaba7961ed4
5
5
  SHA512:
6
- metadata.gz: 27b5747587a37ae781fcf3e146215008b8a9bd2e453353d865626a02dfb45a137953809e8c23a5a1a8be44ece0eba2cd26f19e4a7860ca4d19b6b1571f34beda
7
- data.tar.gz: a096ed87d7df0c267845e430e10d4a1a7b9dee39b6c6b0e92effea12df06af5c2a2e1edf5bced6fa1178c42186d32dc749f65d678048ad50b5c05460f60397b2
6
+ metadata.gz: 92b99a653b73724caf8765c8d227842e306bacd7b41f9764404634576691ecfb2c99dcba1193a8341c39be077cf0c96d42cd2c76041190dde479b125243ec1d0
7
+ data.tar.gz: 108f1cacf473484dfcf624f678783be010f0a03c999e8f9b1a210547ce34a58d0b8024fd4fcc69898e730608b67bbad994ae542a022aadbe3705fbe6f1146bcf
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PaisLegacy
4
- VERSION = "0.9.1"
4
+ VERSION = "0.9.2"
5
5
  end
data/lib/pais_legacy.rb CHANGED
@@ -58,21 +58,33 @@ module PaisLegacy
58
58
  # --------------------------------------------------------------------------------
59
59
  def self.get_trial_balance(ledger = "1", date_to = "30/06/2021",prior=false,from=1,to=9999)
60
60
  if prior
61
- cmd=rptrun(ledger,date_to,from,to,"rglch01p")
61
+ program="rglch01p"
62
62
  else
63
- cmd=rptrun(ledger,date_to,from,to)
63
+ program="rglch01a"
64
64
  end
65
+
66
+ cmd = ssh + ' "bash -l -c \"'+ fglgo("rptrun") +' pgs 1 pais {{program}} \'\{{printer}} \{{ccode}} \{{ledger}} \spar \{{account_from}} \{{account_to}} \{{date}}\ \1 \N\' \""'
67
+ .gsub("{{program}}",program)
68
+ .gsub("{{printer}}","SCREEN")
69
+ .gsub("{{ccode}}","T1")
70
+ .gsub("{{ledger}}",ledger)
71
+ .gsub("{{account_from}}",from.to_s)
72
+ .gsub("{{account_to}}",to.to_s)
73
+ .gsub("{{date}}",Date.parse(date_to).strftime("%d/%m/%Y") || "30/06/2021")
74
+ .gsub("{{report_type}}","1")
75
+ .gsub("{{subaccs}}","N")
76
+
65
77
  out,_,_=Open3.capture2(cmd)
66
78
 
67
- if from and to
68
- out.split("\n").each_with_index do |line,index|
69
- if index >= from and index <= to
70
- puts "#{index}-#{line}"
71
- end
72
- end
73
- end
79
+ # if from and to
80
+ # out.split("\n").each_with_index do |line,index|
81
+ # if index >= from and index <= to
82
+ # puts "#{index}-#{line}"
83
+ # end
84
+ # end
85
+ # end
74
86
 
75
- out.split("\n")
87
+ [out]
76
88
  end
77
89
 
78
90
  # Get the accounts using the trial balance
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pais_legacy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Pope
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-17 00:00:00.000000000 Z
11
+ date: 2023-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug