Shareholder and related doctypes (#12215)

* Added doctypes related to shares

- Shareholder doctype, the entity who does the transaction
- Share doctype, a child table to kepp list of all shares
- Share Transfer doctype, Logs of all made transactions

* Added logic for share transfer

- update shareholder automatically on share transfer/issue/purchase
- purchase and transfer have method remove_share which doesn't get executed because of some bug

* Added report view for share ledger

* Removed share number tracking

- removed share number tracking from Share Ledger child table for Shareholder doctype
- new doctype Share Type created

* Share Balance report added

- math behind Share Balance report needs fixing

* Changes in shareholder

- Share numbers are not tracked in Shareholder
- Share Ledger doctype deleted
- Share Balance Report bug fixed

* Shareholder

- fixed report for share balance
- remove bug from share transfer by making share type mandatory
- added buttons to shareholder for direct link to report

* Added tests for Share Transfer

* minor codacy fixes

* Added Shareholder to Party Type

* rate in share ledger & balance report is currency

* First attempt at modelling shares after Item

* Share Manager changes

- on creation of shareholder party it should check if the same combo exists
- in shareholder party make report button visible iff folio no exists
- create folio no on creation of share transfer iff it doesnt already exist
- move reports from shareholder to shareholder party

* Shareholder chages

- delete share child table doctype
- autoname added to folio no
- modify tests for share transfer

* minor changes

* removed share_no child doctype

* Restructured Share Transfer Logic (not tested)

- Everything revolves around Share Balance child table in Shareholder Party
- is_company flag still to be utilized

* Tested Share Tranfer

* minor fixes

* started new shareholder structure

* modified shareholder

* renamed Shareholder Party to Shareholder

* Shareholder rewrite complete

* new tests for shareholder written

* codacy fixes

* Added documentation
This commit is contained in:
Ameya Shenoy
2018-02-12 11:32:47 +05:30
committed by Rushabh Mehta
parent be9a7231d4
commit 5c33a04043
44 changed files with 2616 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
# Share Balance
This is a report view which gives the list of all the shares held by a given Shareholder and its value
> Accounts > Share Balance
<img class="screenshot" alt="Create Shareholder" src="/docs/assets/img/accounts/shareholder/sharebalance_1.png">
<img class="screenshot" alt="Create Shareholder" src="/docs/assets/img/accounts/shareholder/sharebalance_2.png">

View File

@@ -0,0 +1,9 @@
# Share Ledger
This is a report view which gives the list of all the transactions made by a given Shareholder
> Accounts > Share Ledger
<img class="screenshot" alt="Create Shareholder" src="/docs/assets/img/accounts/shareholder/shareledger_1.png">
<img class="screenshot" alt="Create Shareholder" src="/docs/assets/img/accounts/shareholder/shareledger_2.png">

View File

@@ -0,0 +1,9 @@
# Shareholder Transfer
There may be times when you want to change the share structure of your company; either by adding a new shareholder or by changing the existing proportion of shares between shareholders. A share transfer is the process of transferring existing shares from one person to another; either by sale or gift.
You can directly create your Shareholders via
> Accounts > Share Transfer
<img class="screenshot" alt="Create Shareholder" src="/docs/assets/img/accounts/shareholder/sharetransfer_issue_tonystark.png">

View File

@@ -0,0 +1,21 @@
# Shareholder
A shareholder is any person, company or other institution that owns at least one share of a companys stock. Because shareholders are a company's owners, they reap the benefits of the company's successes in the form of increased stock valuation. If the company does poorly, however, shareholders can lose money if the price of its stock declines.
A shareholder is uniquely identified by the Shareholder ID. Normally this ID is a naming series, starting with `SH-`. Also as soon as the Shareholder makes even a single transaction, a Folio number is allocated to him. This also is a unique to the Shareholder.
You can directly create your Shareholders via
> Accounts > Shareholder
<img class="screenshot" alt="Create Shareholder" src="/docs/assets/img/accounts/shareholder/shareholder_tonystark.png">
A Shareholder can avail the features (operations) in the [Share Transfer](/docs/user/manual/en/accounts/share/share_transfer.html) process.
> Note: Shareholders are separate from Contacts and Addresses. A Shareholder can
have multiple Contacts and Addresses.
### Contacts and Addresses
[Contacts and Addresses](/docs/user/manual/en/CRM/contact.html) in ERPNext are stored separately so that you can
attach multiple Contacts or Addresses to Shareholders, Customers and Suppliers