Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: refactor cashboxes #324

Closed
jniles opened this issue Apr 17, 2016 · 2 comments
Closed

Proposal: refactor cashboxes #324

jniles opened this issue Apr 17, 2016 · 2 comments
Assignees

Comments

@jniles
Copy link
Collaborator

jniles commented Apr 17, 2016

I propose we refactor cashboxes in the following way:

  1. Remove is_bank. If necessary, banks can be modeled properly in bhima. However, most bank transactions can be journal vouchers.
  2. Rename the following columns:
    1. is_auxillary --> is_auxiliary (proper spelling)
    2. text --> label (consistency)
    3. virement_account_id --> transfer_account_id (English name)

Question: Do we need two separate gain_exchange_account_id and loss_exchange_account_id ? Can we make this an enterprise setting and have a single account (gain_loss_exchange_account_id)?

@jniles jniles added this to the 2.x Process milestone Apr 17, 2016
@sfount
Copy link
Contributor

sfount commented Apr 18, 2016

This sounds like a good proposal, with the additional issue about gain and loss on exchange accounts #327 this should mostly just be a cosmetic change.

I agree that banks can be modeled completely separately if we need them - I assume they have lots of specific attributes not in common.

@jniles
Copy link
Collaborator Author

jniles commented Apr 18, 2016

Sounds good.

In my cash posting journal PR, I'll be adding the gain_account_id and loss_account_id to the enterprise table as requested in #327. Whoever tackles this issue can simply remove the dangling accounts on the cash_box_account_currency table.

@jniles jniles self-assigned this Apr 18, 2016
jniles referenced this issue in jniles/bhima Apr 19, 2016
This commit implements the initial cash posting journal route by porting
journal/voucher.js to the journal/cash.js.

It also implements the following optimizations/cleanups:
  1) The @Date, @currencyId, @enterpriseId, and @projectid are all
  performed in a single SQL `SELECT ... INTO` statement for both the
  cash and voucher posting.  This improves readability and performance.
  2) `gain_account_id` and `loss_account_id` are implemented as an
  enterprise setting, as required by #327 and requested in #324.

In a future commit, the gain/loss accounts should be removed from the
cashboxes.

Closes #327.
jniles referenced this issue in jniles/bhima Apr 20, 2016
This commit implements the initial cash posting journal route by porting
journal/voucher.js to the journal/cash.js.

It also implements the following optimizations/cleanups:
  1) The @Date, @currencyId, @enterpriseId, and @projectid are all
  performed in a single SQL `SELECT ... INTO` statement for both the
  cash and voucher posting.  This improves readability and performance.
  2) `gain_account_id` and `loss_account_id` are implemented as an
  enterprise setting, as required by #327 and requested in #324.

In a future commit, the gain/loss accounts should be removed from the
cashboxes.

Closes #327.
jniles referenced this issue in jniles/bhima Apr 20, 2016
This commit refactors cashboxes to no longer manage the gain/loss on
exchange accounts and implements suggestions found in #324.  The
cashboxes API has changed slightly and modernized.  Next, the
client-side services will be analyzed to ensure they will continue to
behave properly.
jniles referenced this issue in jniles/bhima Apr 20, 2016
This commit does a lot of work:
 1) Both cashboxes and account use "?detailed=1" query string parameter
 instead of "?full=1".  Tests, services and controllers have been
 updated to reflect this.
 2) The `Accounts.list()` method has been removed.  It's replacement is
 the standards-compliant `Accounts.read()` method, which doesn't attach
 children to the accounts list.
 3) Cashboxes client no longer offers `<select>` elements for gain/loss
 on exchange accounts.
 4) The Cashbox Currency Modal now uses `bh-submit` to manage the
 loading state.

Closes #324.
jniles referenced this issue in jniles/bhima Apr 20, 2016
This commit implements the initial cash posting journal route by porting
journal/voucher.js to the journal/cash.js.

It also implements the following optimizations/cleanups:
  1) The @Date, @currencyId, @enterpriseId, and @projectid are all
  performed in a single SQL `SELECT ... INTO` statement for both the
  cash and voucher posting.  This improves readability and performance.
  2) `gain_account_id` and `loss_account_id` are implemented as an
  enterprise setting, as required by #327 and requested in #324.

In a future commit, the gain/loss accounts should be removed from the
cashboxes.

Closes #327.
jniles referenced this issue in jniles/bhima Apr 20, 2016
This commit refactors cashboxes to no longer manage the gain/loss on
exchange accounts and implements suggestions found in #324.  The
cashboxes API has changed slightly and modernized.  Next, the
client-side services will be analyzed to ensure they will continue to
behave properly.
@sfount sfount closed this as completed in 9b5042e Apr 21, 2016
bors bot added a commit that referenced this issue Jan 11, 2019
3538: Update snyk to the latest version 🚀 r=jniles a=greenkeeper[bot]


## The dependency [snyk](https://github.com/snyk/snyk) was updated from `1.121.0` to `1.122.0`.
This version is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

---

<details>
<summary>Release Notes for v1.122.0</summary>

<h1><a href="https://urls.greenkeeper.io/snyk/snyk/compare/v1.121.1...v1.122.0">1.122.0</a> (2019-01-10)</h1>
<h3>Bug Fixes</h3>
<ul>
<li>Undefined base image (<a href="https://urls.greenkeeper.io/snyk/snyk/commit/962810a">962810a</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li>send docker image layers SHAs (<a href="https://urls.greenkeeper.io/snyk/snyk/commit/0827c2e">0827c2e</a>)</li>
</ul>
</details>

<details>
<summary>Commits</summary>
<p>The new version differs by 8 commits.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/a8c561dbc5d343127ef485b93e9e2f807c5dae8a"><code>a8c561d</code></a> <code>Merge pull request #327 from snyk/fix/undefined-base-image</code></li>
<li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/962810abd641d46c303b9ceb54ef0caac82cf5cf"><code>962810a</code></a> <code>fix: Undefined base image</code></li>
<li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/bc828428c262ea7c63a5e156ade15a72bea2353c"><code>bc82842</code></a> <code>Merge pull request #325 from snyk/chore/run-travis-on-node-10</code></li>
<li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/32d1d8c3415627a673a92f9abd7088cc2991ff95"><code>32d1d8c</code></a> <code>chore: Run CI against Node 10 (current LTS)</code></li>
<li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/2e80014bad633be78c92ad10c173694bfe2f5621"><code>2e80014</code></a> <code>Merge pull request #323 from snyk/feat/send-docker-image-layers-shas</code></li>
<li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/f5a01ea36f08729f1fdcb377cb5c6dc383419208"><code>f5a01ea</code></a> <code>Merge pull request #324 from snyk/fix/bump_gradle_plugin</code></li>
<li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/518a4becfe4df6285a8bdd041fddc2eb3af3350e"><code>518a4be</code></a> <code>fix: bumping snyk-gradle-plugin</code></li>
<li><a href="https://urls.greenkeeper.io/snyk/snyk/commit/0827c2edecbb662559e858dae5604786b35fd96c"><code>0827c2e</code></a> <code>feat: send docker image layers SHAs</code></li>
</ul>
<p>See the <a href="https://urls.greenkeeper.io/snyk/snyk/compare/ecac358cc1da7cee3715e709cfa368838c598af6...a8c561dbc5d343127ef485b93e9e2f807c5dae8a">full diff</a></p>
</details>

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴



Co-authored-by: greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants