Sha256: 49f2dbc5e25dd841c6f757cd0409b7a6db93c35e9a2d3fe0a58b3b26cfc209cc

Contents?: true

Size: 1.37 KB

Versions: 5

Compression:

Stored size: 1.37 KB

Contents

# frozen_string_literal: true

module LedgerSync
  module Ledgers
    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
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ledger_sync-1.6.0 lib/ledger_sync/ledgers/netsuite/dashboard_url_helper.rb
ledger_sync-1.5.2 lib/ledger_sync/ledgers/netsuite/dashboard_url_helper.rb
ledger_sync-1.5.1 lib/ledger_sync/ledgers/netsuite/dashboard_url_helper.rb
ledger_sync-1.5.0 lib/ledger_sync/ledgers/netsuite/dashboard_url_helper.rb
ledger_sync-1.4.4 lib/ledger_sync/ledgers/netsuite/dashboard_url_helper.rb