posting date in journal entry should not be nowdate (#12801)

diff --git a/erpnext/hr/doctype/payroll_entry/payroll_entry.py b/erpnext/hr/doctype/payroll_entry/payroll_entry.py
index 0b4e3bf..77cece3 100644
--- a/erpnext/hr/doctype/payroll_entry/payroll_entry.py
+++ b/erpnext/hr/doctype/payroll_entry/payroll_entry.py
@@ -321,7 +321,7 @@
 			journal_entry.user_remark = _('Payment of salary from {0} to {1}')\
 				.format(self.start_date, self.end_date)
 			journal_entry.company = self.company
-			journal_entry.posting_date = nowdate()
+			journal_entry.posting_date = self.posting_date
 
 			payment_amount = flt(total_salary_amount.rounded_total, precision)