As rightly noted in #8109 , the cash flow report is mostly incorrect. This is because it is impossible to correctly guess how all accounts in the chart of accounts should affect the cash flow report.
To fix this, the user will need to give hints to ERPNext about where accounts belong in the report.
This PR introduces two new doctypes - Cash Flow Mapper and Cash Flow Mapping, which give users the ability to customise cash flow reports.
Cash Flow Mappers
Three of them by default representing the three sections in cash flow statement
Example Mapper for 'Operating Activities'
...For 'Investing Activities'
...And for 'Financing Activities'
ERPNext will calculate the effect of all the accounts in the above Cash Flow Mapping and display it in the report using the text in the
If you want the line to appear as 'Fixed assets purchased', simply change the label field to 'Fixed assets purchased', save and refresh your cash flow report.
To use custom cash flow reports, you will need to activate it in Accounts Settings
The text was updated successfully, but these errors were encountered:
…accounts` by `is_working_capital` field
…to determine when to add "Changes in working capital" for operating activities
* remove old stock entry method/rewrite test case * [Fix] Bug fix in customer_primary_address frappe call (frappe#12880) * [deadlock fix] Save if not set * closes frappe#12872 (frappe#12888) * Python 3 fixes [merge asap] (frappe#12884) * Python 3 fixes * fixed compare * [Fix] Allow to make disbursement entry even if payment account in not set in the employee loan (frappe#12882) * Fixed test dependencies * Remove total_projected_qty (frappe#12889) * [deadlock fix] Save if not set (frappe#12896) * [Fix] Price list exchange rate is not visible when base currency and price list currency is different (frappe#12898) * Delete .swp (frappe#12894) * Delete .swp * updated gitignore to exclude temp vim files * Fixed iteritems and exceptions * bumped to version 10.0.22 * Update journal-entry.md (frappe#12909) * Update stock-reconciliation-for-non-serialized-item.md (frappe#12908) * Added Hub Company Logo * python3-fixes * python3-fixes * fixed iteritems * [Fix] Not able to select delivery note in delivery trip (frappe#12912) * Python 3 fixes. (frappe#12916) * Fixed iteritems and exceptions * python3-fixes * fixed iteritems * Fixed translations and tests (frappe#12900) * Fixed translations and tests * minor fixes * minor test fixes * add company pages * Patch to enable translatable * tree parent working * Update entity properties * [hub] cleanups * [hub] cleanups * Fix parenthesis in buying controller (frappe#12923) * Updated Python 3 fixes * replaced string_types with basestring * iteritems * [new] B2C limit fetch from GST Settings (frappe#12905) * [new] b2c limit fetch from gst setting * [fix] Patch Added for b2c limit * Update gstr_1.py * bumped to version 10.0.23 * [Fix] Invalid Syntax in gstr_1.py (frappe#12946) * [Fix] Added missing parenthesis in gstr_1.py * Minor change * Update gstr_1.py * Update set_b2c_limit.py * Update set_b2c_limit.py * Rename Offer Letter to Job Offer (frappe#12934) * Update hub domain
💥* avoid overlap with dropdown (frappe#12941) * Customer and Supplier link fields in Member DocType (frappe#12942) * added link fields customer and supplier * fixed a typo * [Fix] Incorrect rate in item-wise sales register (frappe#12943) * remove deprecated processing payroll video links (frappe#12947) * Calculate due date in Purchase Invoice on the basis of Supplier invoice date (frappe#12913) * pass bill_date as parameter and calculate due_date on that basis * calculate payment_schedule on the basis of bill_date if present else posting_date * add bill_date as an argument to get_party_details * pass bill_date on supplier trigger in purchase invoice * [fix] Validate Party in not present in Party Type (frappe#12910) * [fix] Validate Party in not present in Party Type * [fix] Minor Changes * [fix] Valid Customer and Supplier fetch * [WIP] Allow and prevent for creating party * [fix] minor changes * [fix] Requested Changes * [fix] Codacy issue * Update opening_invoice_creation_tool.py * Payment reco auto allocation and maintain same order of records (frappe#12963) * Automatically allocate amount after selecting invoice against a payment entry * codacy fixes * Gstr reports (frappe#12940) * GSTR1 for B2B (frappe#12296) * [minor] Modified GSTR1 report to identify missing GST Account in GST Settings (frappe#12426) * [minor] Modified GSTR1 report to identify missing GST Account in GST Settings * Update gstr_1.py * GSTR1 for B2B, B2CL and B2CS (frappe#12459) * [Report] GSTR - 1 CDNR Report (frappe#12554) * [wip] cdnr * [WIP] cdnr with optional data * [wip] Export GSTR-1 * [minor] Minor changes in export * [new] Custom field added for GST * [fix] Minor changes in GSTR1 Report * [minor] Minor changes in gstr1 * [fix] Codacy Fixed * Update setup.py * [wip] Gstr2 * [fix] Fetch correct Tax Details * [minor] ITC data append to row * [fix] CDNR negative value * Cleanup and fixes on GSTR-2 * Minor fixes in gstr reports (frappe#12848) * [new] B2C limit fetch from GST Settings (frappe#12905) * [new] b2c limit fetch from gst setting * [fix] Patch Added for b2c limit * Update gstr_1.py * Update utils.py * Cusotm fields related GSTR2 * minor fixes * minor fixes * some more fixes * Added duplicate patch and some tests as not required on develop * Validate Bank name in Setup wizard on the same slide (frappe#12968) * validate bank name before moving on to next slide * Update setup_wizard.js * [Bug] Wrong Calculation of Total Weight at Purchase Invoice item for Purchasing in Different Unit (UoM) frappe#12965 (frappe#12966) * [Hot Fix] barcode_type auto set to a wrong value (frappe#12957) * Fix barcode_type auto set to a wrong value This fix a problem that arise, for some weird reason that i can't figure out, when the barcode length == 8, 9,10 or 12,13 and barcode_type is not set; barcode_type become "ean8, ean9, ean10, ean11, ean12, ean13" * codacy fix * Refactor Expense Claim (frappe#12883) * patch for custom workflow * deleted field approval_status * replaced approval_status with workflow_state * updated test cases * validation to check expense approver * check if workflow_state_name already exists * fixes * modified notifications.py * removed field exp_approval and modified test cases * Warehouse wise Item Balance, Age and Value (frappe#12879) * Create warehouse_wise_item_balanace_age_and_value.py * Create warehouse_wise_item_balance_age_and_value.js * Create warehouse_wise_item_balance_age_and_value.json * Update warehouse_wise_item_balance_age_and_value.json * Update warehouse_wise_item_balance_age_and_value.json * Update warehouse_wise_item_balance_age_and_value.json * Update warehouse_wise_item_balance_age_and_value.js * Rename warehouse_wise_item_balanace_age_and_value.py to warehouse_wise_item_balance_age_and_value.py * Update warehouse_wise_item_balance_age_and_value.py * Braintree integration documentation (frappe#12775) * Braintree integration documentation * Cleanup documentation * Better handling of auto set barcode_type issue (frappe#12970) Get barcode_type options and check if value is included * Update requirements.txt * [fix] section break for raw_material_details (frappe#12976) * Added Payment Details to Sales Payment Summary Report (frappe#12358) * [fix] frappe#12357 * label changes * fix total field (frappe#12992) * Outstanding Amount not getting updated in Payment Entry frappe#12713 (frappe#12975) * allow to `set_missing_ref_details` by force * update payment entry references during submit and cancel * [minor] Balance Qty added in reorder level email notification (frappe#13000) * Code cleanup online POS (frappe#12985) * Currency filter in Pricing Rule (frappe#11776) * added currency filter * modified files * pull margin only if currency matches * Renamed price to rate in pricing rule * fetch rate only if currency matches * rebase with develop * rebase with develop * patch to set currency in existing docs * currency field mandatory in pricing rule * modified test cases * rebase with develop * fixed test case * Sales Payment Summary - fix for change amount (frappe#12981) * [fix] frappe#12980 * apply change amount to cash * item balance report (frappe#12983) * item balance report * remove hard coding * Update item_balance.json * Update item_balance.json Change name to "Item Balance (Simple)" * Update item_balance.json * [enhance] Production Plan (frappe#12160) * [enhance] Production plan * Test cases * Removed production planning tool * Documentation * Added actual qty in material request production item * Renamed field 'Use Multilevel BOM' to 'Include Exploded Items' * Changes for Rollup (frappe#12924) * Changes for rollup * remove variables.less * Transaction Log for France (frappe#12795) * Regional overrides for France * Addition of tests and documentation * db_update instead of save to avoid unnecessary validations (frappe#13009) * [Hotfix] Selecting create on blank field throws error (frappe#13014) * selecting create on blank field error fix * error when fetching default_print_format * Add total row in all trends reports (frappe#13010) * total in sales order trends report * total in all trends reports * disable expand_all button for BOM (frappe#13015) * Daily work summary refactor (frappe#12944) * added daily work summary setting doctype and code to support feature this will allow multiple setting for daily work summary * added daily work summary setting user doctype * made changes in daily work summary code * [minor] entry change in hr config file * deleted previous daily work summary settings (and its company) doctype * removed unwanted permission check * toggled read_only option for enabled field * removed print statements * add patch for the changes * doc changes * [minor] indentation fix * fixed tests * indentation fixes * codacy issue fix * formatting fixes * renamed doctype Renamed Daily Work Summary Setting to Daily Work Summary Group and did related code and doc changes * fixed typo * updated doc * codacy issue fix * [minor] renamed doctype name in json * Renamed old doctype * fixed indentation * codacy fix * indentation fix * renamed doctype * handled patch exception * fixed exception * Update daily_work_summary_group.py * rename patch file removed abbreviation in file name * handled exception in patch code * removed Unnecessary pass statement * [minor] indentation fix * [new] Leader board * [new] Filter based on company: * [fix] Codacy Issue * [fix] Sales partner details get from sales Order and company currency details from selected company * [fix] Codacy issue * Credit card default account should be debtors frappe#12989 (frappe#13029) * allow receivable account type in mode of payment * update `default_account` field description * clear log if no attachments (frappe#13023) * Update Territory & Customer Group across all transaction (frappe#13004) * added method for update query based on changes * patch added * updated function, moved util function * [Enhance] Quality Inspection Template (frappe#12988) * [Enhance] Quality Inspection Template * Test case and patch * Update make_quality_inspection_template.py * Optionally allow overlap on Timesheet frappe#12893 (frappe#13018) * give user option to ignore time overlap validation * move settings to new Projects Settings * clean up - remove trailing space * Cutomisable Cash Flow Reports (frappe#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 * [Fix] BOM Update Tool not update grandparent's exploded BOM (frappe#13026) * Cleanup and fixes on leaderboard * fix indentation * Fixed develop version * bumped to version 10.1.0 * patch exception fixes (frappe#13037) * patch exception fixes * reload daily_work_summary_group_user doctype * [fix] remove gstr2 fields from Sales Invoice and Delivery Note too (frappe#13047) * bumped to version 10.1.1 * Update added_extra_gst_custom_field_in_gstr2.py * bumped to version 10.1.2 * Fetch timesheet based on project * Clean inline css found in chapter and grant for loops! (frappe#13038) * Clean inline css found in chapter and grant for loops! * Remove redundant css * remove unwanted ide files and append gitignore * remove unnecessary line from build.json * restore import for variable.less * remove kdev from gitignore * Patch optimization (frappe#13060) * Patch fixes * fix codacy * Update item_barcode_childtable_migrate.py * [Fix] PDC amount, PDC print layout issue (frappe#13062) * [Translation] Updated Translations (frappe#13059) * improve validation (frappe#13058) * auto name on the basis of naming series (frappe#13056) * [Fix] Item wise sales register report (frappe#13055) * verify payment entry amount is positive (frappe#13066) * verify payment entry amount is positive * Update sales_invoice.py * Update sales_invoice.py * bumped to version 10.1.3 * fix permission issue for stock balance report - Item Group (frappe#13069) * bumped to version 10.1.4 * [FIX] sorting multiple compares * optimize patch for faster execution (frappe#13068) * Update territory and customer_group patch optimization (frappe#13076) * Update territory and customer_group patch optimization * Update update_territory_and_customer_group.py * Projected Qty in Auto reorder email * Validity of Quotation frappe#12858 (frappe#13078) * add new setting for default valid_till date * codacy cleanup * [Fix] UX for delivery trip (frappe#13046) * [Fix] UX for delivery trip * Fixed test cases * Fixed logic in itemwise recommended reorder level * [Fix] POS discount issue * New Report Employee Advance Summary (frappe#13040) * New Report Employee Advance Summary * JSON style column definition * minor fix (frappe#13095) * Don't validate serial nos while cancelling the transaction * filter students on basis of category and button to show fees * minor fixes for member (frappe#13101) * [Translation] Updated Translations (frappe#13097) * rename valid_email to validate_email (frappe#13103) * Update Territory & Customer Group across all transaction (frappe#13004) * added method for update query based on changes * patch added * updated function, moved util function * optimize patch for faster execution (frappe#13068) * Update territory and customer_group patch optimization (frappe#13076) * Update territory and customer_group patch optimization * Update update_territory_and_customer_group.py * python 3 fix (frappe#13127) * Use range instead xrange (frappe#13128) * Use range instead of xrange * convert float to int * updated develop_version to 11 (frappe#13133) * order by modified instead of item name (frappe#13113) * self.assertEqual * [Fix] Test case for serial no (frappe#13136) * Get valuation rate from historical SLE even if it is zero (frappe#13129) * Don't overwrite start and end date comes from payroll entry * Get valuation rate from historical SLE even if it is zero, if records exists * Valid till should be autoset if not any default value * Set status of expense claim based on is_paid check * Do not validate payment schedule for POS (frappe#13115) * display image fnd description for root BOM also (frappe#13099) * Make Expense Claim from Employee Advance frappe#13053 (frappe#13074) * allow to make expense claim from employee advance * make expense claim only if claimed amount < paid_amount * expense claim made from employee advance is paid * Set auto created serial nos in incoming transactions in case of multi UOM (frappe#13112) * Create user from Employee * Set auto created serial nos in incoming transactions in case of multi uom * wrong query formed to delete events (frappe#13119) * Gocardless integration (frappe#13008) * GoCardless integration * Addition of a method for determining if the email should be sent or not * Correction for Tests * Codacy fix * Documents moved to ERPNext * Codacy fix * Codacy fixes * Remove method where not necessary and replace with hasattr * Multi-UOM for sales/purchase return (frappe#13132) * Multi-UOM for sales/purchase return * Update sales_and_purchase_return.py * [Feature] Supplier warehouse link field on purchase order (frappe#13051) * Multiple Features: [New] Supplier warehouse link field on purchase order for sub-contracting [New] Auto select supplier warehouse while making purchase receipt from purchase order * Set default to_warehouse in stock entry as the supplier warehouse * [Fix] Sales invoice email prompt not working * Editable unallocated amount in pe (frappe#13130) * editable unallocated amount in payment entry to handle multi currency * set unallocated amount on server side * some minor fixes * Fixes in territory patch * removed print * minor fixes * [Fix] Timeout issue while saving multilevel BOM (frappe#13118) * [Fix] Stock Ageing report does not work with group warehouse (frappe#13151) * [Fix] Wrong salary slips showing when click on view salary slips from payroll entry (frappe#13152) * [Fix] System only shows 20 attribute values while making variants (frappe#13155) * leave application assigned by naming_series (frappe#13158) * Doc imp (frappe#13148) * added intro, item and prices video, fixed image links in item and prices * update 2: first 5 videos added * added all videos to the user manual * updated .gitignore * improve multiple add dialog, populate parent's depends on with child tasks (frappe#13142) * [new] Create multiple warehouse address and fetch address to stock entry (frappe#13109) * [new] Create multiple warehouse address and fetch address to stock entry * [fix] Deleted unwanted field and added patch to link warehouse details to Address * [fix] Codacy fixed * [fix] Modified patch for warehouse address * [fix] Modified patch for warehouse address * [fix] Patch updated and removed contact details from stock entry * [fix] Patch Updated * Fix status updater (frappe#13033) * fix the status updater for multiple sources * patch for updating the status * patch for updating the sales order item * Update update_status_for_multiple_source_in_po.py * changes according to the workflow (frappe#13160) * remove updating territory for customers on change (frappe#13162) * Patches fixes (frappe#13163) * [fix] if serialised items not found then return * [fix] unicode encoding in patch * bumped to version 10.1.5 * Update patches.txt * [fix] setup_party_account_field on init * fix the desktop icon for course schedule * [fix] use join instead of subquery * Add new logo in splash image and optimise pngs (frappe#13206) * allow renaming of the guardian * bumped to version 10.1.6 * Allow Item variant Rename (frappe#13161) * [WIP] Item varient rename * [wip] Item Variant * [fix] Item Varient Rename * [fix] Item Attribution Rename * removed unwanted code * Provision to include exploded items while making transfer entry of raw materials for subcontrtacted item (frappe#13043) * [Fixes] Chapter DocType (frappe#13213) * fetch chapter head from member doctype instead of user * add enabled in grid view and set default as 1 * minor fix for key error * fetch journal entry details (frappe#13218) * corrected setup wizard tax rates for Switzerland 2018 (frappe#13220) (frappe#13221) * fix patch that causes error on bench update (frappe#13222) * [FIX] use text_type instead of unicode, use cmp from past.builtins * Healthcare - Patient Appointment - Service unit based scheduling and booking (frappe#13211) * New Document - Patient Service Unit * Physician - schedule based on patient service unit * Consultation - Remove validation on submit * Consultation - Label changed from Drug Prescription to Medication * Availability check and book appointment based on service unit, appointment invoice creation optimized * patch fixes * Patient Service Unit - field - overlap_appointments * Patient Appointment - Service Unit based scheduling and booking * Patient Appointment - issue fixed frappe#13016 Healthcare Patient Appointment Save Button Issue - remove validation on save and enable save on book appointment * Codacy fixes on PR frappe#13211 * Codacy fixes on PR frappe#13211 * Fee validity test -fixes * Fee Validity - test - fixes * [FIX] filter to list * fixed tabs * fixed tabs * fixed tabs * indentation fix * removed has_key * fix- cannot cancel consultation, remove updating age (frappe#13226) * [Fix] Discount in offline POS is enabled even is it's disabled in POS Profile (frappe#13233) * Bank POS transactions in bank reconciliation (frappe#13225) * Fixes for frappe#13071 (frappe#13234) * [Enhance] Fetch Customer's Item code based on Customer Name or Customer Group (frappe#13198) * customer code can be assigned based on customer group * improvise customer group selection * requested changes made * fetch delivery date on add-row only if item_code exists (frappe#13250) * [Feature Request] Add Payment Mode field on Payment Terms Template frappe#13117 (frappe#13243) * add mode of payment field to Payment Term * add mode of payment field to Payment Terms Template Detail * add mode of payment field to Payment Schedule * add mode of payment in `get_payment_term_details` * Data import Tool bug fix (frappe#13165) * fixes frappe#13064 * commonified naming series checks * test fixes replaced test employee names according to naming series * removed has_key, used pythonic in (frappe#13236) * removed has_key, used pythonic in * Update bom.py * prevent deletion of sales invoices if country is nepal * Fixes for regional feature of Nepal * commonfied regional function for checking delete permission * subctracting stock entry should also be considered as consumed qty * sort by name accounts * sort by name accounts * Update shopping_cart.js * bumped to version 10.1.7 * Payment Terms Template added in test_ignore for Company * [charts] update charts API * add has variants in standard filter (frappe#13251) * payment terms video tutorial in videos/learn (frappe#13258) * payment terms video tutorial in videos/learn * Update payment-terms.md