Sha256: dfd8c0606afd3ed0b17ddd1016f47bb26717683c348d54caa57386b72e7bc17c

Contents?: true

Size: 885 Bytes

Versions: 1

Compression:

Stored size: 885 Bytes

Contents

# frozen_string_literal: true

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ledger_sync-1.3.5 lib/ledger_sync/adaptors/netsuite/dashboard_url_helper.rb