public function generateDataciteSymbol(Client $client)
    {
        $prefix = "ANDS.";
        $id = $client->client_id;

        // prefix before the
        if ($id < 100) {
            $prefix .= "CENTRE";
        }

        if ($id < 10) {
            $prefix .= "-";
        } elseif ($id >= 100) {
            // prefix before the ID (new form)
            $prefix .= "C";
        }

        $client->datacite_symbol = $prefix . $id;
        $client->save();

        return $client;
    }
public function generateDataciteSymbol(Client $client)
    {
        $prefix = "ANDS.";
        $id = $client->client_id;

        // prefix before the
        if ($id < 100) {
            $prefix .= "CENTRE";
        }

        if ($id < 10) {
            $prefix .= "-";
        } elseif ($id >= 100) {
            // prefix before the ID (new form)
            $prefix .= "C";
        }

        $client->datacite_symbol = $prefix . $id;
        $client->save();

        return $client;
    }
public function generateDataciteSymbol ( Client $ client ) { $ prefix = "ANDS." ; $ id = $ client -> client_id ; // prefix before the if ( $ id < 100 ) { $ prefix .= "CENTRE" ; } if ( $ id < 10 ) { $ prefix .= "-" ; } elseif ( $ id >= 100 ) { // prefix before the ID (new form) $ prefix .= "C" ; } $ client -> datacite_symbol = $ prefix . $ id ; $ client -> save ( ) ; return $ client ; }
Generate a datacite symbol for the given client
ANDS.CENTRE-1
ANDS.CENTRE-9
ANDS.CENTRE10
ANDS.CENTRE99
ANDS.C100
ANDS.C102

@param Client $client
@return Client
Generate a datacite symbol for the given client ANDS . CENTRE - 1 ANDS . CENTRE - 9 ANDS . CENTRE10 ANDS . CENTRE99 ANDS . C100 ANDS . C102