fix: format_row broke Document Name link validation
#35540 broke Voucher Matching, leading to an invalid link exception on submission. This is because the format_row() function overwrites the row data instead of just providing a formatter on the DataTable column, and therefore passes through the formatted (linked) column data instead of the Document Name only.
This patch moves the appropriate frappe.form.formatters.Link function to a dedicated format hook on the DataTable columns definition, both fixing the error and retaining the functionality of #35540.
(cherry picked from commit 7ab55b1bb2)
# Conflicts:
# erpnext/public/js/bank_reconciliation_tool/dialog_manager.js
* fix: Remove current fiscal year from Global Defaults (#35960)
* fix: Remove current fiscal year from Global Defaults
* fix: Remove button to set default
* fix: Add utils to get fiscal year
* fix: Incorrect import
* feat: Add hook for naming series parser
(cherry picked from commit 6270607c6d)
# Conflicts:
# erpnext/accounts/doctype/fiscal_year/fiscal_year.py
# erpnext/patches.txt
# erpnext/public/js/utils.js
* chore: resolve conflicts
---------
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
fix: improve "Update Items" modal (#36105)
* fix: make "Update Items" modal larger
* fix: remove conversion factor from overview
Conversion factor doesn't make much sense without two different UOMs
next to it, hence moving it to row detail view
(cherry picked from commit d5fe1432f8)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
fix: click handler should not attempt indexed access of empty array (#35013)
fix: click handler should not attempt indexed access
of empty array
(cherry picked from commit 3d90b970d1)
Co-authored-by: tundebabzy <tundebabzy@gmail.com>
fix!: require sender and message for contact us page (#34707)
* fix: require sender and message for contact us page
* refactor: dont override frappe.send_message from client side
used override_whitelisted_method hook for the same
(cherry picked from commit f193393f57)
Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>
* fix: Taxes aren't discounted on early payment discount
- Deductions in payment entry must be split into income loss and tax loss
- Compute total discount in percentage, makes discounting different amounts proportionately easier
(cherry picked from commit 768c3a4927)
* fix: Recalculate difference amount after setting deductions
(cherry picked from commit 75ec0a0a85)
* fix: Set deductions in base currency
- Use field precision to get more accurate values
(cherry picked from commit dc2998f544)
* fix: Back update discounted amount in Invoice based on discount type
- Discount value was always trated as a percentage on back updation
(cherry picked from commit 2ae5834290)
* test: PE from SI with early payment discount amount & PE assertions in discount % test
(cherry picked from commit c217bb2018)
* fix: Set deduction amount in company currency on Doctype
- Even via JS, deductions amount is always in company currency
- Since there is nothing dynamic about this field, set it in the doctype spec itself
- fixed: Inconsistency between label currency and field currency formatted value
(cherry picked from commit 7f2e7badff)
* fix: Don't add to deductions if amount is 0
- misc: better docstring
(cherry picked from commit f02fc8acf0)
* fix: Paid amount must be discounted considering accounting currency
- Accounting is in the same currency if party currency and company currency is the same
- If accounting is in the same currency, paid and recvd amount is in the base currency
- Then, discount amount must also be in the base currency as it is deducted from paid amount
- Received amount must be in base currency if not multi currency
- cleanup: Deductions setting broken into smaller functions
(cherry picked from commit 761f68d7bf)
* fix: Multi-currency SI with base currency PE
- Return total discount loss in base currency
- Allocate payment based on terms: Set allocated amount in references table in base currency if accounting is in that currency
- Allocate payment based on terms: While back updating set paid amount (payment schedule) in transaction currency always
- minor: discount msgprint in correct currency
(cherry picked from commit b09c2381ca)
* test: Multi currency SI with multi-currency accounting and single currency accounting + Early payment discount
(cherry picked from commit 9abf0ef615)
* fix: Handle rounding more gracefully
- Round off pending discount loss to avoid miniscule losses rounded to 0.0 that are added in deductions
- Use base amounts to calculate base losses instead of using conversion factor which increases rounding error
- Round of total base loss instead of individual income and tax losses to reduce rounding error
- Use default round off account for pending rounding loss in deductions
(cherry picked from commit caa1a3dccf)
* fix: Provision to apply early payment discount if payment is recorded late
- Party could have paid on time but payment is recorded late
- Prompt for reference date so that discount is applied while mapping
- Prompt only if discount in payment schedule of valid doctypes
- test: Reference date and impact on PE
- `make_payment_entry` (JS) must be able to access `this`
(cherry picked from commit d6d0163514)
* feat: Make Tax loss booking optional
- Checkbox in Accounts Settings
- Apply checkbox in PE deductions setting logic
- Adjust tests
(cherry picked from commit 216a46bd66)
# Conflicts:
# erpnext/accounts/doctype/accounts_settings/accounts_settings.json
* fix: Merge conflicts
---------
Co-authored-by: marination <maricadsouza221197@gmail.com>
* fix: incorrect currency symbol in Bank Reconciliation tool
(cherry picked from commit 2d14d92b32)
* refactor: allow for concurrent use of reconciliation tool
1. set default filter dates a period of one month from current date
(cherry picked from commit 1eea585d29)
---------
Co-authored-by: ruthra kumar <ruthra@erpnext.com>
feat: bank reconciliation and plaid changes (#33986)
fix: plaid link refresh: update account ids
fix: plaid transactions for credit cards & add accounts on link refresh if they don't exist
fix: bank reconciliation amount matching
fix: bank reconciliation dialog usability
feat: rewrite bank transaction reconciliation to allow multiple transactions to reconcile against vouchers before clearance
fix: matching transaction amounts and race condition bug
fix: ensure there is a reference number in plaid transactions and other tweaks
feat: add references to Payroll Entry Bank Journal Entry
feat: only clear Voucher once all Bank GLEs are allocated to Bank Transactions
fix: strange type error
feat: add payment method field to bank and plaid transactions and prepopulate relevant bank reconciliation new voucher fields
feat: bank reconciliation - allow bank transactions to reconcile against themselves for when there are banking amendments
fix: bank transaction self-reconcile bug and tidy
fix: bank reconciliation datatable index update
Co-authored-by: Richard Case <110036763+casesolved-co-uk@users.noreply.github.com>
* feat: Filter out alternative item rows in taxes and totals for Quotation
- Added a Quotation Item field `is_alternative_item`
- Use filtered rows for taxes and totals computation
(cherry picked from commit 91982d1e4f)
# Conflicts:
# erpnext/selling/doctype/quotation_item/quotation_item.json
* feat: Consider filtered items table in JS for totals computation
- Set `_items` as filtered rows if quotation else the entire table. Set at entry point of JS API
- Use `_items` instead of `items` to compute taxes and charges. Exclude alternative item rows
(cherry picked from commit f19eadab9a)
* feat: Dialog to select alternative item before creating Sales order
- Users can leave the row blank in the dialog if original item is to be used
- Else users can select an alternative item against an original item
- In the document, users must check `Is Alternative Item` if needed and also specify which item it is an altenrative to since there are no documented mappings
(cherry picked from commit cef7dfd0b4)
# Conflicts:
# erpnext/selling/doctype/quotation/quotation.js
# erpnext/selling/doctype/quotation_item/quotation_item.json
* feat: Filter rows to be mapped on server side mapping function
- Pass dialog selections to `make_sales_order`
- Map either original item or its alternative depending on mapping
- Only qty check for simple rows (without alternatives and not an alternative itself)
(cherry picked from commit 94cacb60de)
* chore: Validate 'alternative_to' field values, must be a valid non-alterntaive item from table
(cherry picked from commit fa9b327501)
* fix: Iterate over list instead of map's output and formatting
(cherry picked from commit ece6358e60)
* fix: Consider only ordered alternative/original item for Quotation status
- The original and its alternatives make a set of items where one is chosen
- While setting order status of Quotation, check if the chosen item from the set is fully ordered or not
- Filter out unselected items from the set
- Create a map containing the set of items and if they were ordered or not for ease of grouping
- The simple items will work as it used to
(cherry picked from commit b3fe7c6dad)
* chore: Code simplification
- Map is not required, avoid filter multiple times, use single loop instead
- Better variable name
- Reduce LOC
(cherry picked from commit 03321f5f13)
* refactor: Order based alternative items mapping
- Alternatives must be followed by a non-alternative item row
- On submit, store non-alternative rows in hidden checkbox to avoid recomputation
- Check for valid/mappable rows by row name
- UI: Select from table rows.Add single row for original/alternative item in dialog
- UI: Indicator for alternative items in dialog grid
- UI: Indicator legend and description of table
- DB: Added check field 'Has Alternative Item' not to be confused with 'Has Alternative' in Mfg
(cherry picked from commit db2076db69)
# Conflicts:
# erpnext/selling/doctype/quotation_item/quotation_item.json
* test: Alternative items in Quotation
- Taxes and totals, mapping, back updation
(cherry picked from commit 74fab53e28)
* fix: Use block variable
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
(cherry picked from commit 3c96791d52)
* fix: Handle `Get Items From` in Sales Order
- Map all non alternatives from Quotation to SO if no selected items
- Show disclaimer mentioning that Qtns with alternatives must be mapped to SO from the Qtn form
(cherry picked from commit 19456127cf)
* fix: Map only non alternative items from Quotation in Sales Invoice
- Since there's no item selection, only Quotation selection :/
(cherry picked from commit 6b789e2f04)
* fix: Merge conflicts
---------
Co-authored-by: marination <maricadsouza221197@gmail.com>
fix(minor): Dirty the form after clicking on Get advances button in Invoices (#34323)
fix(minor): Dirty form after clicking on Get advances button
(cherry picked from commit 2feb27e399)
Co-authored-by: Marica <maricadsouza221197@gmail.com>
fix: Amount for debit and credit notes with 0 qty line items (#33902)
(cherry picked from commit 47c91324b1)
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
refactor: make payments app a soft dependency (#33245)
refactor: make payment app a soft dependency
(cherry picked from commit 0b86b1baca)
Co-authored-by: Ankush Menat <ankush@frappe.io>
* Update bank_reconciliation_tool.py
Applying date filter on transactions and all the bank entries and also gives the filter the bank entries as per reference date. Sorted all transactions and entries as per date in ascending order.
Also added posting date columns in all bank entries and default checkbox tick of journal entry, hide the sales invoice and purchase invoice checkbox.
(cherry picked from commit e5a1189bec)
* Filters on Bank Reconciliation
Applying date filter on transactions and all the bank entries and also gives the filter the bank entries as per reference date. Sorted all transactions and entries as per date in ascending order. Also added posting date columns in all bank entries and default checkbox tick of journal entry, hide the sales invoice and purchase invoice checkbox.
(cherry picked from commit 447272aa4d)
* Update bank_reconciliation_tool.json
Adding fields in bank reconciliation tool
(cherry picked from commit 8e7c8a6482)
* Feat:Filter on Payment Entries and Journal Entries
Applying filters on Payement entries and Journal Entries as per reference date and posting date
(cherry picked from commit 408c89df03)
* feat:filters on bank reconciliation
Added date filters on bank transactions, payment entries and journal entries and sorted list as per date in ascending order.
(cherry picked from commit 05b6fce03d)
* feat: added arguments of posting date and reference date
(cherry picked from commit 645869e6ff)
* fix: linters
(cherry picked from commit 6b5276398e)
* fix: json issue
(cherry picked from commit 81e5f71172)
* fix: filtered as per reference date
On bank reconciliation, transactions will be filtered as per date selected in 'from_date' and 'to_date' fields , In dialog, all the bank entries will be fetched as per the posting date selected and if filtered by reference date checkbox is tick then then there will be two fields 'from_reference_date' and 'to_reference_date' then all bank entries in dialog box came as per reference date, selected. And by default journal entry checkbox is tick.
Also sorted the bank transactions and bank entries as per ascending order date wise.
(cherry picked from commit 3aaa2f5326)
* fix: pre-commit
(cherry picked from commit e2614b8a21)
* fix: passing from_date and to_date filters in test cases
passing from_date and to_date filters in test_linked_payments and test_debit_credit_output for unit testing
(cherry picked from commit f1810803e1)
* fix: pre-commit
(cherry picked from commit 35c29e0226)
* fix: pre-commit
(cherry picked from commit c764f14f53)
* feat: consolidated auto bank reconciliation
Added a button of Auto Reconcile, to reconcile the bank entries as per the matching reference number with the bank transaction and count of transactions reconciled message will be pop up on clicking the auto reconcile button.
(cherry picked from commit d65243eb65)
* fix: data format
(cherry picked from commit 12822f7c36)
* fix: remove comments
(cherry picked from commit 917b2190aa)
* chore: fix fieldnames and order
(cherry picked from commit 232726288a)
Co-authored-by: sonali <sonali@8848digital.com>
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>