pais_legacy 0.9.1 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pais_legacy/version.rb +1 -1
- data/lib/pais_legacy.rb +50 -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: 290af19c91f86a3e75aac7a9980e2ec07da8068b5bc72d5bb6686f4e867011e9
|
4
|
+
data.tar.gz: f42120a6b2fd3d144a04a720276883594bd4f3a09d5cf92cb68da2d0fad38dc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c39d63e4c9285f26c431b790654bce5e7af8eb46c6e93181ccdbfff999334dd598ec5bf84f5980a3fe0a011df7ecba3edb93cf0517a7764ba4230b41ca0f02f
|
7
|
+
data.tar.gz: f43081fd71570cd11921b6971ec79e028b84ea16dfd851111d351dde5d91c9a41d832bcc71b0f2306539446f086a7b0ab9a5284ac6172650d5318b1b36830a9c
|
data/lib/pais_legacy/version.rb
CHANGED
data/lib/pais_legacy.rb
CHANGED
@@ -53,26 +53,66 @@ module PaisLegacy
|
|
53
53
|
JSON.parse(out)
|
54
54
|
end
|
55
55
|
|
56
|
+
# '\SCREEN \T1 \336 \spar \N \2 \1 \2 \3 \4 \5 \01/07/2021 \30/06/2022 '
|
57
|
+
|
58
|
+
# --------------------------------------------------------------------------------
|
59
|
+
# Performance Report
|
60
|
+
# --------------------------------------------------------------------------------
|
61
|
+
def self.get_performance(ledger = "1", date_to = "30/06/2022",prior=false,from=1,to=9999)
|
62
|
+
program="rglch10a"
|
63
|
+
|
64
|
+
date_to = Date.parse(date_to)
|
65
|
+
date_to = Date.parse("30/06/#{date_to.year}")
|
66
|
+
date_from = Date.parse("01/07/#{date_to.year - 1}")
|
67
|
+
|
68
|
+
cmd = ssh + ' "bash -l -c \"'+ fglgo("rptrun") +' pgs 1 pais {{program}} \'\{{printer}} \{{ccode}} \{{ledger}} \spar \N \2 \1 \2 \3 \4 \5 \{{date_from}} \{{date_to}} \' \""'
|
69
|
+
.gsub("{{program}}",program)
|
70
|
+
.gsub("{{printer}}","SCREEN")
|
71
|
+
.gsub("{{ccode}}","T1")
|
72
|
+
.gsub("{{ledger}}",ledger)
|
73
|
+
.gsub("{{account_from}}",from.to_s)
|
74
|
+
.gsub("{{account_to}}",to.to_s)
|
75
|
+
.gsub("{{date_from}}",date_from.strftime("%d/%m/%Y") || "01/07/2021")
|
76
|
+
.gsub("{{date_to}}",date_to.strftime("%d/%m/%Y") || "30/06/2022")
|
77
|
+
.gsub("{{report_type}}","1")
|
78
|
+
.gsub("{{subaccs}}","N")
|
79
|
+
|
80
|
+
out,_,_=Open3.capture2(cmd)
|
81
|
+
[out]
|
82
|
+
end
|
83
|
+
|
56
84
|
# --------------------------------------------------------------------------------
|
57
85
|
# Trial Balance
|
58
86
|
# --------------------------------------------------------------------------------
|
59
87
|
def self.get_trial_balance(ledger = "1", date_to = "30/06/2021",prior=false,from=1,to=9999)
|
60
88
|
if prior
|
61
|
-
|
89
|
+
program="rglch01p"
|
62
90
|
else
|
63
|
-
|
91
|
+
program="rglch01a"
|
64
92
|
end
|
93
|
+
|
94
|
+
cmd = ssh + ' "bash -l -c \"'+ fglgo("rptrun") +' pgs 1 pais {{program}} \'\{{printer}} \{{ccode}} \{{ledger}} \spar \{{account_from}} \{{account_to}} \{{date}}\ \1 \N\' \""'
|
95
|
+
.gsub("{{program}}",program)
|
96
|
+
.gsub("{{printer}}","SCREEN")
|
97
|
+
.gsub("{{ccode}}","T1")
|
98
|
+
.gsub("{{ledger}}",ledger)
|
99
|
+
.gsub("{{account_from}}",from.to_s)
|
100
|
+
.gsub("{{account_to}}",to.to_s)
|
101
|
+
.gsub("{{date}}",Date.parse(date_to).strftime("%d/%m/%Y") || "30/06/2021")
|
102
|
+
.gsub("{{report_type}}","1")
|
103
|
+
.gsub("{{subaccs}}","N")
|
104
|
+
|
65
105
|
out,_,_=Open3.capture2(cmd)
|
66
106
|
|
67
|
-
if from and to
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
end
|
107
|
+
# if from and to
|
108
|
+
# out.split("\n").each_with_index do |line,index|
|
109
|
+
# if index >= from and index <= to
|
110
|
+
# puts "#{index}-#{line}"
|
111
|
+
# end
|
112
|
+
# end
|
113
|
+
# end
|
74
114
|
|
75
|
-
out
|
115
|
+
[out]
|
76
116
|
end
|
77
117
|
|
78
118
|
# 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.3
|
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-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|