this.frm.posting_date is always invalid and should be changed to this.frm.doc.posting_date
The effect of this bug fix is, a default Posting Date value may now be set in Custom Script's onload event, and the default value will be honored.
Example: (Assuming posting date has been included in standard filter)
```
frappe.ui.form.on('Journal Entry', {
before_load(frm) {
var posting_date = $("input[data-fieldname='posting_date']")[0].value
posting_date = moment(posting_date)._d
frm.set_value('posting_date', posting_date )
}
})
```
Without the fix, the posting date will always be today's date. With the bug fix, the default value for posting date which is taken from the posting date's Standard Filter vale is honored.
Co-authored-by: Sagar Vora <sagar@resilient.tech>
* fix(Bank Reconciliation): update/merge CR/DR journal entry search
Prior to this commit, the debit journal entry search (for
credit-side Bank Transaction entries) and the corresponding
credit journal entry search had diverged, with the latter
working but the former not working. Thus, the search for
journal entries matching a credit Bank Transaction (for the
purposes of reconciliation) was never returning any matching
journal entries, making reconciliation difficult.
To fix this, this commit not only updates the debit journal
entry search, but takes advantage of the fact that the two SQL
queries for the two sides (debit/credit) differ only by the
word "debit" or "credit," to merge the code for the two
queries, making the code more DRY and hopefully reducing the
chance of similar bugs occurring in the future.
* fix: message translation
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
* fix: Rename `make_supplier_quotation` to `make_supplier_quotation_from_rfq` in missing places
* fix: Item Barcode and Test
* fix: Over Receipt on subcontracting test
* fix: POS Invoice and Loyalty Program Tests
* fix: POS serialized item test and subcontracting exploded items in PO
* fix: Subcontracting test considering sourced_by_supplier items
* fix: Make only one Additonal Salary List with overwrite set
If you have multi company scenario and many bank accounts that are no longer active, then it becomes difficult in bank statement reconciliation report to filter the account to reconcile and it also shows disabled accounts so futher confusion is created.
https://github.com/frappe/erpnext/issues/23613
* Never add an asset GL entry if CWIP is not enabled
* fix: asset purchase with purchase invoice
* chore: allow enable cwip accounting only if cwip account is set
* fix: cannot create asset if cwip disabled and account not set
Co-authored-by: Saqib Ansari <nextchamp.saqib@gmail.com>