Class: LedgerSync::Ledgers::NetSuite::DashboardURLHelper

Inherits:
DashboardURLHelper show all
Defined in:
lib/ledger_sync/ledgers/netsuite/dashboard_url_helper.rb

Instance Attribute Summary

Attributes inherited from DashboardURLHelper

#base_url, #resource

Instance Method Summary collapse

Methods inherited from DashboardURLHelper

#initialize, #url

Constructor Details

This class inherits a constructor from LedgerSync::Ledgers::DashboardURLHelper

Instance Method Details

#resource_pathObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/ledger_sync/ledgers/netsuite/dashboard_url_helper.rb', line 7

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