Sha256: e5936ab86ad4cfeea19e823ca60418af647d9192ab843aed1ceae412ce910bea

Contents?: true

Size: 1.3 KB

Versions: 15

Compression:

Stored size: 1.3 KB

Contents

# frozen_string_literal: true

module LedgerSync
  module NetSuite
    class DashboardURLHelper < LedgerSync::Ledgers::DashboardURLHelper
      def resource_path # rubocop:disable Metrics/CyclomaticComplexity
        @resource_path = case resource
                         when NetSuite::Account
                           "/app/accounting/account/account.nl?id=#{resource.ledger_id}"
                         when NetSuite::Currency
                           "/app/common/multicurrency/currency.nl?id=#{resource.ledger_id}"
                         when NetSuite::Customer, NetSuite::Vendor
                           "/app/common/entity/entity.nl?id=#{resource.ledger_id}"
                         when NetSuite::Department
                           "/app/common/otherlists/departmenttype.nl?id=#{resource.ledger_id}"
                         when NetSuite::Deposit, NetSuite::Invoice
                           "/app/accounting/transactions/transaction.nl?id=#{resource.ledger_id}"
                         when NetSuite::LedgerClass
                           "/app/common/otherlists/classtype.nl?id=#{resource.ledger_id}"
                         when NetSuite::Subsidiary
                           "/app/common/otherlists/subsidiarytype.nl?id=#{resource.ledger_id}"
                         end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ledger_sync-netsuite-0.7.1 lib/ledger_sync/netsuite/dashboard_url_helper.rb
ledger_sync-netsuite-0.6.2 lib/ledger_sync/netsuite/dashboard_url_helper.rb
ledger_sync-netsuite-0.6.1 lib/ledger_sync/netsuite/dashboard_url_helper.rb
ledger_sync-netsuite-0.6.0 lib/ledger_sync/netsuite/dashboard_url_helper.rb
ledger_sync-netsuite-0.5.0 lib/ledger_sync/netsuite/dashboard_url_helper.rb
ledger_sync-netsuite-0.4.2 lib/ledger_sync/netsuite/dashboard_url_helper.rb
ledger_sync-netsuite-0.3.6 lib/ledger_sync/netsuite/dashboard_url_helper.rb
ledger_sync-netsuite-0.3.5 lib/ledger_sync/netsuite/dashboard_url_helper.rb
ledger_sync-netsuite-0.3.4 lib/ledger_sync/netsuite/dashboard_url_helper.rb
ledger_sync-netsuite-0.3.3 lib/ledger_sync/netsuite/dashboard_url_helper.rb
ledger_sync-netsuite-0.3.2 lib/ledger_sync/netsuite/dashboard_url_helper.rb
ledger_sync-netsuite-0.3.1 lib/ledger_sync/netsuite/dashboard_url_helper.rb
ledger_sync-netsuite-0.3.0 lib/ledger_sync/netsuite/dashboard_url_helper.rb
ledger_sync-netsuite-0.2.0 lib/ledger_sync/netsuite/dashboard_url_helper.rb
ledger_sync-netsuite-0.1.1 lib/ledger_sync/netsuite/dashboard_url_helper.rb