Skip to content

Commit

Permalink
note about account lookup when using multitenancy
Browse files Browse the repository at this point in the history
  • Loading branch information
mbulat committed May 12, 2016
1 parent f73fd6d commit 7f1f27e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,19 @@ Plutus.config do |config|
config.tenant_class = 'Tenant'
end
```
*NOTE: When building entries, be sure to specify the account directly, rather than use the 'account_name' feature. Otherwise if you'll probably end up with the wrong account.*

```ruby
debit_account = Plutus::Acount.where(:name => "Cash", :tenant => my_tenant).last
credit_account = Plutus::Acount.where(:name => "Unearned Revenue", :tenant => my_tenant).last
entry = Plutus::Entry.new(
:description => "Order placed for widgets",
:date => Date.yesterday,
:debits => [
{:account => debit_account, :amount => 100.00}],
:credits => [
{:account => credit_account, :amount => 100.00}])
```

Reporting Views
===============
Expand Down

0 comments on commit 7f1f27e

Please sign in to comment.