Hello everyone,
I created custom fields for Start and End Date in Line items in line_items.js and line_items.php.
First, although I set them in vardef.php to be type = ‘date’ they show up, but as text field.
Further, after saving the Quote or Invoice fter populating the line items the fields don’t show up in Detail View, although I set the code for viewing.
When I check I see the values had not been saved. I tried to set it in AOS_Product_Quotes.php in the function save lines, but I did not really know what exactly to do without corrupting the whole system.
Here are the Junks:
Line_items.js:
var j = y.insertCell(0);
j.colSpan = "2";
j.style.color = "rgb(68,68,68)";
j.innerHTML = "<span style='vertical-align: top;' class='product_start_date_c'>" + SUGAR.language.get(module_sugar_grp1, 'LBL_START_DATE') + " : </span>";
j.innerHTML += "<input textarea tabindex='116' name='start_date_c[" + prodln + "]' id='product_start_date_c" + prodln + "' rows='1' cols='23' class='product_start_date_c' ></textarea> "
Line_item.php:
$product .= "<td width='10%' class='tabDetailViewDL' style='text-align: left;padding:2px;' scope='row'>".$mod_strings['LBL_START_DATE']."</td>"
AOS_Product_Quotes/vardefs.php:
'start_date_c' => array(
'name' => 'start_date_c',
'vname' => 'LBL_START_DATE'
'type' => 'date'
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => '0',
'audited' => 1,
'reportable' => true,
'display_default' => '',
'enable_range_search' => true,
'options' => 'date_range_search_dom',
The result in suite crm is attached
So, how can I set them to be date fields?
How can I save them?
How can I show them in Quotes and Invoices in DetailView?
Thank you very much!