mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-01 03:12:39 +02:00
fix: recognize trigger from child table
(cherry picked from commit c55c77f4e9)
This commit is contained in:
@@ -1039,9 +1039,14 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
due_date(doc) {
|
due_date(doc, cdt) {
|
||||||
// due_date is to be changed, payment terms template and/or payment schedule must
|
// due_date is to be changed, payment terms template and/or payment schedule must
|
||||||
// be removed as due_date is automatically changed based on payment terms
|
// be removed as due_date is automatically changed based on payment terms
|
||||||
|
if (doc.doctype !== cdt) {
|
||||||
|
// triggered by change to the due_date field in payment schedule child table
|
||||||
|
// do nothing to avoid infinite clearing loop
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// if there is only one row in payment schedule child table, set its due date as the due date
|
// if there is only one row in payment schedule child table, set its due date as the due date
|
||||||
if (doc.payment_schedule.length == 1){
|
if (doc.payment_schedule.length == 1){
|
||||||
|
|||||||
Reference in New Issue
Block a user