Sha256: 4916e8a904c669aa9b11b7404b97cb896b78e9f3e5aad0c5b842d4d2f7b8cc7d

Contents?: true

Size: 1.32 KB

Versions: 3

Compression:

Stored size: 1.32 KB

Contents

# frozen_string_literal: true

module LedgerSync
  module Ledgers
    module NetSuite
      class DashboardURLHelper < LedgerSync::Ledgers::DashboardURLHelper
        def resource_path
          @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

3 entries across 3 versions & 1 rubygems

Version Path
ledger_sync-1.4.2 lib/ledger_sync/ledgers/netsuite/dashboard_url_helper.rb
ledger_sync-1.4.1 lib/ledger_sync/ledgers/netsuite/dashboard_url_helper.rb
ledger_sync-1.4.0 lib/ledger_sync/ledgers/netsuite/dashboard_url_helper.rb