So it turns out there was a view.edit.php file in the file location you specified I have tried to modify the file by putting the below code below the function display(){ line however when i run a rebuild and repair and I try to create a new invoice I am unable to access the create invoices area of my crm. Please see below for my php code.
<?php
require_once('include/MVC/View/views/view.edit.php');
class AOS_InvoicesViewEdit extends ViewEdit{
function AOS_InvoicesViewEdit(){
parent::ViewEdit();
}
function display(){
public function display(){
parent::display();
$javascript = <<<'EOT'
<script type="text/javascript">
window.onload=function(){
function toggle_extra_field() {
if(xx_extra_field.value == No) {
document.querySelector('div[data-label="LBL_DEFECT_NUMBER"]').style.display='none';
document.querySelector('div[field="defect_number_c"]').style.display='none';
}
if(xx_extra_field.value == Yes) {
document.querySelector('div[data-label="LBL_DEFECT_NUMBER"]').style.display='';
document.querySelector('div[field="defect_number_c"]').style.display='';
var xx_extra_field_sub = document.getElementById('defect_number_c');
xx_extra_field_sub.value = '';
}
}
var xx_extra_field = document.getElementById('defect_number_required_c');
toggle_extra_field();
xx_extra_field.addEventListener('change', toggle_extra_field, false);
}
</script>
EOT;
echo $javascript;
exit;
}
echo '<script type="text/javascript" src="custom/include/javascript/showhide.js"></script>';
parent::display();
}
}
?>