<div dir="ltr"><div><div><div><div><div><div>Hi Guys,<br><br></div>A slight step back in my book but in version 5.4.0 you set the default date to today.<br><br></div>Now it's blank and annoying to put this back every time :(<br>
<br></div>9 / 10 times when creating an invoice the invoice date is today.<br><br></div>I've added a quick patch on my beta version to cater for this for my testing as it started to get annoying.<br><br></div>modules>Vtiger>uitypes>Date.php<br>
<br></div>Made mine bold.<br><div><br>public function getEditViewDisplayValue($value) {<br> if (empty($value) || $value === ' ') {<br> $value = trim($value);<br> $fieldInstance = $this->get('field')->getWebserviceFieldObject();<br>
$moduleName = $this->get('field')->getModule()->getName();<br> $fieldName = $fieldInstance->getFieldName();<br><br> //Restricted Fields for to show Default Value<br> if (($fieldName === 'birthday' && $moduleName === 'Contacts')<br>
|| ($fieldName === 'validtill' && $moduleName === 'Quotes')<br> || $moduleName === 'Products' ) {<br> return $value;<br> }<br>
<br> //Special Condition for field 'support_end_date' in Contacts Module<br> if ($fieldName === 'support_end_date' && $moduleName === 'Contacts') {<br> $value = DateTimeField::convertToUserFormat(date('Y-m-d', strtotime("+1 year")));<br>
} elseif ($fieldName === 'support_start_date' && $moduleName === 'Contacts') {<br> $value = DateTimeField::convertToUserFormat(date('Y-m-d'));<br> }<br>
<b> else<br> {<br> $value = DateTimeField::convertToUserFormat(date('Y-m-d'));<br> }</b><br> } else {<br> $value = DateTimeField::convertToUserFormat($value);<br>
}<br> return $value;<br> }<br><br></div><div>regards<br><br>Danny<br></div></div>