fix: show correct document creation date on certificate

This commit is contained in:
prafull-opensignlabs
2024-05-03 18:08:53 +05:30
parent c56830b7be
commit a18733ad79
4 changed files with 81 additions and 70 deletions
@@ -25,6 +25,10 @@ async function DocumentBeforesave(request) {
} catch (error) {
console.log('Error updating document count in contracts_users: ' + error.message);
}
if (document?.get('Signers') && document.get('Signers').length > 0) {
document.set('DocSentAt', new Date());
document.save(null, { useMasterKey: true });
}
}
} catch (err) {
console.log('err in document beforesave', err.message);