Joseph Marie Alba
8115be58a3
fix: Posting Date bug in load_defaults ( #23415 )
...
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>
2020-10-19 17:02:04 +05:30
..
2020-10-14 10:29:53 +05:30
2020-06-12 15:29:40 +05:30
2019-08-15 17:06:32 +05:30
2020-04-06 16:32:33 +05:30
2020-10-07 15:13:57 +05:30
2020-05-01 13:26:26 +05:30
2020-07-22 18:21:04 +05:30
2020-07-22 18:21:04 +05:30
2020-04-23 12:19:30 +05:30
2020-04-23 12:19:30 +05:30
2020-08-03 20:42:15 +05:30
2020-04-06 16:32:33 +05:30
2020-08-17 10:51:53 +05:30
2020-09-14 21:12:36 +05:30
2020-09-04 19:08:08 +05:30
2019-07-03 10:34:31 +05:30
2020-02-18 17:49:57 +05:30
2020-10-06 15:15:29 +05:30
2020-03-25 02:08:42 +05:30
2020-10-14 10:29:53 +05:30
2019-04-22 12:08:18 +05:30
2020-06-20 12:33:41 +05:30
2020-08-25 14:35:49 +05:30
2020-02-27 18:32:19 +05:30
2020-06-08 12:20:21 +05:30
2020-08-07 15:57:31 +05:30
2020-07-23 15:45:03 +05:30
2020-07-23 15:45:03 +05:30
2020-04-07 16:42:50 +05:30
2019-06-28 12:38:40 +05:30
2019-06-02 19:35:18 +05:30
2020-08-18 10:57:10 +05:30
2020-07-06 12:37:28 +05:30
2020-07-06 12:37:28 +05:30
2020-09-18 18:27:24 +05:30
2020-10-19 17:02:04 +05:30
2020-06-24 17:49:50 +05:30
2020-05-01 18:38:13 +05:30
2020-04-25 18:13:01 +05:30
2020-07-23 18:51:26 +05:30
2020-10-13 16:53:10 +05:30
2020-09-18 18:27:24 +05:30
2019-06-02 19:35:18 +05:30
2020-06-28 17:08:12 +05:30
2019-07-29 12:14:49 +05:30
2020-10-09 21:44:23 +05:30
2020-04-23 16:07:36 +05:30
2019-06-02 19:35:18 +05:30
2020-09-04 19:59:01 +05:30
2020-09-04 12:17:56 +05:30
2020-10-16 16:04:56 +05:30
2020-07-22 17:59:37 +05:30
2020-07-22 17:59:37 +05:30
2020-07-24 17:19:56 +05:30
2020-04-23 16:07:36 +05:30
2020-10-14 22:48:46 +05:30
2020-04-23 16:07:36 +05:30
2020-09-18 18:27:24 +05:30
2020-10-13 16:53:10 +05:30
2020-07-23 18:51:26 +05:30
2020-07-23 18:51:26 +05:30
2019-12-26 11:59:19 +05:30
2020-10-18 19:28:26 +05:30
2020-07-23 18:51:26 +05:30
2020-10-08 11:23:21 +05:30
2020-07-23 18:51:26 +05:30
2020-09-19 19:33:21 +05:30
2020-07-23 18:51:26 +05:30
2020-07-23 18:51:26 +05:30
2020-10-12 17:10:37 +05:30
2020-07-23 18:51:26 +05:30
2020-09-18 15:27:17 +05:30
2020-10-07 13:35:53 +05:30
2020-09-03 18:09:02 +05:30
2020-08-11 16:23:47 +05:30
2020-08-11 16:23:47 +05:30
2019-07-21 00:02:09 +05:30
2020-08-11 16:23:47 +05:30
2020-08-11 16:23:47 +05:30
2020-10-16 15:26:27 +05:30
2020-08-20 15:53:58 +05:30
2020-09-18 18:27:24 +05:30
2020-09-18 18:27:24 +05:30
2020-10-13 21:23:26 +05:30
2020-08-20 15:53:58 +05:30
2020-08-03 20:42:15 +05:30
2019-05-26 12:31:01 +05:30
2020-08-10 15:17:58 +05:30
2020-05-03 20:17:47 +05:30
2019-05-23 11:29:39 +05:30
2019-11-18 17:52:19 +05:30
2020-08-26 18:23:21 +05:30
2020-10-12 12:15:49 +05:30
2020-07-23 11:11:23 +05:30
2020-07-23 11:11:23 +05:30
2020-07-23 11:11:23 +05:30
2020-07-23 11:11:23 +05:30
2020-08-30 19:42:24 +05:30
2020-09-29 18:39:45 +05:30
2020-10-12 12:39:08 +05:30