Custom Quote Numbers in ver 7.9.7

I am trying to create a custom quote number (ID-YYYY-MM-DD-NNN) and have not had success. I reviewed a previous topic and attempted to implement the change in the current AOS_Quotes.php script without success.

I think that the lines below are where I need to make the changes (ID-YYYY-MM-DD-NNN), but the line numbers are different that described in the other topic. Any assistance is appreciated

        if($sugar_config['dbconfig']['db_type'] == 'mssql'){
            $this->number = $this->db->getOne("SELECT MAX(CAST(number as INT))+1 FROM aos_quotes");
        } else {
            $this->number = $this->db->getOne("SELECT MAX(CAST(number as UNSIGNED))+1 FROM aos_quotes");
        }

        if($this->number < $sugar_config['aos']['quotes']['initialNumber']){
            $this->number = $sugar_config['aos']['quotes']['initialNumber'];

Yes you have to change these lines if you want to change the “quote number numeration method”. Field “NUMBER” is an integer and you can’t write on it a string of char.

If yuo want to write something like ID-YYYY-MM-DD-NNN you must use another field. You can create your custom number field.