Cutomisable Cash Flow Reports (#12969)

* add child doctype - Cash Flow Mapping Account

* adds new doctype - Cash Flow Mapping

* adds new doctype - Cash Flow Mapper

* adds new doctype Cash Flow Mapping Template

* adds new doctype Cash Flow Mapping Template

* adds adjustments to Cash Flow Mapper:
- remove fields from Cash Flow Mapping Template Details
- update in Cash FLow Mapper

* get cash_flow_accouts from Cash Flow Mapping

* change `tmp` to `mappers` and make sure `mappers` is sorted by its `position` field

* changes description from 'Net Profit/Loss' to 'Profit for the year'

* set `net_profit_loss` `parent_account` properly

* modify `get_account_type_based_data`:
- changed signature such that `account_type` parameter is now `account_name`
- where clause in query is now based on `name`

* remove zero rows

* de-duplicates row, summing similar accounts in the process

* makes gl sum calculation use `parent_account` as a condition

* add the `section_leader` immediately after adding net profit, sorts `accounts` by `is_working_capital` field

* adds `is_working_capital` to "account_types" so that we can use this to determine when to add "Changes in working capital" for operating activities

* add "Movement in working capital" subheader

* refactor code for readability

* adds new fields to `Cash Flow Mapping`:
- `is_interest_paid` to allow me recognise accounts for 'Interest Paid'
- `is_income_tax_paid` to allow me recognise accounts for 'Income Taxes Paid'

* allow `Cash Flow Mapping` to be renamable

* adds new field - `section_subtotal` useful for only Operating Activities

* changes `Cash Flow Mapping` doctype fields:
- remove `is_income_tax`_field
- add `is_income_tax_liability` field to identify tax payable accounts
- add `is_income_tax_expense` field to identify tax expense accounts in P or L

* calculates and shows tax paid adjustment in cash flow statement

* renames `is_interest_paid` to `is_finance_cost`

* - adds finance costs calculation
- correctly sets opening balance dates

* prevents users from selecting extra options in Cash Flow Mapping

* adds validation to prevent selecting multiple options

* adds new fields to Cash Flow Mapping

* calculate non cash p or l items (2nd pass)

* separates default cash flow generation from custom

* adds new setting to Accounts Settings:
- allow user elect to use customised cash flow report

* clean up

* removes mandatory constraint from accounts field

* allow rename, disallow create and delete

* adds patch to add default Cash Flow Mappers

* refactors custom_cashflow

* add article to explain configuration

* refactor

* further refactor

* final clean up (hopefully)

* clean up for codacy

* more codacy fixes

* more codacy fixes

* fix broken patch

* rename article to .md

* create default mappers after install

* PEP 8

* create the tables in `after_install` call
57 files changed
tree: 452c69a3fd7e806e1eb7172c0bddc3749267c101
  1. .github/
  2. erpnext/
  3. test_sites/
  4. travis/
  5. .eslintrc
  6. .gitignore
  7. .travis.yml
  8. __init__.py
  9. attributions.md
  10. CODE_OF_CONDUCT.md
  11. license.txt
  12. MANIFEST.in
  13. README.md
  14. requirements.txt
  15. setup.py
  16. sponsors.md
README.md

Build Status Gitter

https://erpnext.com

Includes: Accounting, Inventory, Manufacturing, CRM, Sales, Purchase, Project Management, HRMS. Requires MariaDB.

ERPNext is built on the Frappé Framework, a full-stack web app framework in Python & JavaScript.


Full Install

The Easy Way: our install script for bench will install all dependencies (e.g. MariaDB). See https://github.com/frappe/bench for more details.

New passwords will be created for the ERPNext "Administrator" user, the MariaDB root user, and the frappe user (the script displays the passwords and saves them to ~/frappe_passwords.txt).

Virtual Image

You can download a virtual image to run ERPNext in a virtual machine on your local system.

System and user credentials are listed on the download page.


License

GNU/General Public License (see LICENSE.txt)

The ERPNext code is licensed as GNU General Public License (v3) and the Documentation is licensed as Creative Commons (CC-BY-SA-3.0) and the copyright is owned by Frappé Technologies Pvt Ltd (Frappé) and Contributors.


Contributing

  1. Issue Guidelines
  2. Pull Request Requirements
  3. Translations
  4. Chart of Accounts

Logo and Trademark

The brand name ERPNext and the logo are trademarks of Frappé Technologies Pvt. Ltd.

Introduction

Frappé Technologies Pvt. Ltd. (Frappé) owns and oversees the trademarks for the ERPNext name and logos. We have developed this trademark usage policy with the following goals in mind:

  • We’d like to make it easy for anyone to use the ERPNext name or logo for community-oriented efforts that help spread and improve ERPNext.
  • We’d like to make it clear how ERPNext-related businesses and projects can (and cannot) use the ERPNext name and logo.
  • We’d like to make it hard for anyone to use the ERPNext name and logo to unfairly profit from, trick or confuse people who are looking for official ERPNext resources.

Frappé Trademark Usage Policy

Permission from Frappé is required to use the ERPNext name or logo as part of any project, product, service, domain or company name.

We will grant permission to use the ERPNext name and logo for projects that meet the following criteria:

  • The primary purpose of your project is to promote the spread and improvement of the ERPNext software.
  • Your project is non-commercial in nature (it can make money to cover its costs or contribute to non-profit entities, but it cannot be run as a for-profit project or business). Your project neither promotes nor is associated with entities that currently fail to comply with the GPL license under which ERPNext is distributed.
  • If your project meets these criteria, you will be permitted to use the ERPNext name and logo to promote your project in any way you see fit with one exception: Please do not use ERPNext as part of a domain name.

Use of the ERPNext name and logo is additionally allowed in the following situations:

All other ERPNext-related businesses or projects can use the ERPNext name and logo to refer to and explain their services, but they cannot use them as part of a product, project, service, domain, or company name and they cannot use them in any way that suggests an affiliation with or endorsement by ERPNext or Frappé Technologies or the ERPNext open source project. For example, a consulting company can describe its business as “123 Web Services, offering ERPNext consulting for small businesses,” but cannot call its business “The ERPNext Consulting Company.”

Similarly, it’s OK to use the ERPNext logo as part of a page that describes your products or services, but it is not OK to use it as part of your company or product logo or branding itself. Under no circumstances is it permitted to use ERPNext as part of a top-level domain name.

We do not allow the use of the trademark in advertising, including AdSense/AdWords.

Please note that it is not the goal of this policy to limit commercial activity around ERPNext. We encourage ERPNext-based businesses, and we would love to see hundreds of them.

When in doubt about your use of the ERPNext name or logo, please contact Frappé Technologies for clarification.

(inspired by WordPress)