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 +4 -4
- data/lib/pais_legacy/version.rb +1 -1
- data/lib/pais_legacy.rb +22 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e2c0370787b5a04408f023199df9003af302b1d3c03ddd09b9a86d5b28ac822
|
4
|
+
data.tar.gz: 7c8f068cb14b3999bd004232e863a64b07edcf2d04439977c82c4eaba7961ed4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92b99a653b73724caf8765c8d227842e306bacd7b41f9764404634576691ecfb2c99dcba1193a8341c39be077cf0c96d42cd2c76041190dde479b125243ec1d0
|
7
|
+
data.tar.gz: 108f1cacf473484dfcf624f678783be010f0a03c999e8f9b1a210547ce34a58d0b8024fd4fcc69898e730608b67bbad994ae542a022aadbe3705fbe6f1146bcf
|
data/lib/pais_legacy/version.rb
CHANGED
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
|
-
|
61
|
+
program="rglch01p"
|
62
62
|
else
|
63
|
-
|
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
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2023-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|