Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pais_legacy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pais_legacy

  • 2.6.11
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source
  • PAIS Legacy

Connects to PAIS Legacy (Informix) custom API over an ssh connection.

** Installation

Add this line to your application's Gemfile:

gem 'pais_legacy'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install pais_legacy

** Usage

Interacting with the GEM

| API | Description | |----------------+-----------------------| | _create | Create a new entry | | _read | Read a single entry | | _index | Get a listing | | _update | Update existing entry | | _delete | Delete a single entry |

*** Chart of Accounts

#+begin_src ruby @pais_codes = PaisLegacy::Pais.glch_read(@pais_ledger) #+end_src

Result; : [{:value=>"1/1", :text=>"1/1-Sales Net Of Tax"}]

*** Trial Balance

**** Get trial balance

Get the trial balance from PAIS Legacy.

#+begin_src ruby PaisLegacy::Pais.get_trial_balance #+end_src

**** Get codes

Extract codes from Trial Balance

#+begin_src ruby @report = PaisLegacy::Pais.get_trial_balance @tb=PaisLegacy::TrialBalance.new(@report) @accounts = @tb.accounts_from_trial_balance #+end_src

Result of @codes; : [{value: "1", text: "1-Sales"}]

**** Save journal entries

This method saves the journal entries from Xero's trial balance but with PAIS Legacy account & sub account codes from the allocation table created by the user.

#+begin_src ruby @params={xero: ["270","200","0"], xero_name: ["Interest Income (270)","Sales (200)","Cash on Hand (0)"], pais: ["250/1","",""], dr: ["","678672.92",""], cr: ["0.75","","123"]} PaisLegacy::Pais.save_journals(ledger_code, @params) #+end_src

Result in CSV file output (FILE: "tmp/pais_journal_post_#{ledger}.csv") : "GJ,2,14/07/2022,5199,,250,1,Auto post (Xero Interest Income (270) -> 250/1),0.75"

**** Post GJ to PAIS Legacy

This reads the CSV created by save_journals and posts them to PAIS Legacy.

#+begin_src ruby @journal_count = PaisLegacy::Pais.post_journals(ledger_code) #+end_src

*** Invoices #+begin_src ruby pais=PaisLegacy.new invoices = pais.legacy_import_invoices(ledger,date) pais.display_invoices(invoices) #+end_src

** Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

*** Publish version

  1. Adjust lib/pais_legacy/version.rb
  2. Commit changes 'Bump '
  3. Gem build : gem build pais_legacy.gemspec
  4. Push : gem push pais_legacy-0.7.3.gem

** Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/map7/pais_legacy.

FAQs

Package last updated on 23 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc