Skip to content

Commit

Permalink
doc: financial transaction (#1008 , PR #1031)
Browse files Browse the repository at this point in the history
  • Loading branch information
yksflip committed Apr 8, 2024
1 parent 38664fd commit b59442f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ group :development do
end

group :development, :test do
gem 'rails-erd', '~> 1.7'
gem 'rubocop', require: false
gem 'rubocop-rails', require: false
gem 'rubocop-rspec', require: false
Expand Down
9 changes: 9 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ GEM
xpath (~> 3.2)
case_transform (0.2)
activesupport
choice (0.2.0)
chronic (0.10.2)
coderay (1.1.3)
commonjs (0.2.7)
Expand Down Expand Up @@ -396,6 +397,11 @@ GEM
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-erd (1.7.2)
activerecord (>= 4.2)
activesupport (>= 4.2)
choice (~> 0.2.0)
ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
Expand Down Expand Up @@ -508,6 +514,8 @@ GEM
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-filemagic (0.7.3)
ruby-graphviz (1.2.5)
rexml
ruby-ole (1.2.12.2)
ruby-prof (1.6.3)
ruby-progressbar (1.13.0)
Expand Down Expand Up @@ -673,6 +681,7 @@ DEPENDENCIES
rack-cors
rails (~> 7.0.8)
rails-assets-listjs (= 0.2.0.beta.4)
rails-erd (~> 1.7)
rails-i18n
rails-settings-cached (= 0.4.3)
rails_tokeninput
Expand Down
26 changes: 26 additions & 0 deletions doc/building blocks/finance/finance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Finance

## Entity-Relationship Diagram

![erd](./finance.png)

> bundle exec erd --cluster --inheritance --open --only "BankAccount,BankGateway,BankTransaction,FinancialLink,FinancialTransactionClass,FinancialTransactionType,FinancialTransaction,Invoice" --title "Foodsoft / Finance" --filetype=png
### Financial Transaction (ft)

* The amount of a Financial Transaction may be `null`, indicating that it's incomplete (e.g., a Mollie online payment).
* Payment attributes can be used by payment provider plugins to keep track of external references/state, etc.

### Financial Transaction Type

Types should be used to add structured information to a transaction. For example, this could be used to have different types depending on the source of money (cash vs. bank transfer).

### Financial Transaction Class

Classes are shown as different columns in the tables and are used to group transactions of specific types. They should be used if not the whole amount of the order group should be used to order food. For example, if there is a deposit or membership fee, which is independent of the normal credit.

### Invoice
### Bank Account
### Bank Gateway
### Bank Transaction
### Financial Link
Binary file added doc/building blocks/finance/finance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b59442f

Please sign in to comment.