contract B2BCToken is StandardToken, Ownable{
    
    string public version = "1.8";
    string public name = "B2B Coin Token";
    string public symbol = "B2BC";
    uint8 public  decimals = 18;

    
    uint256 internal constant INITIAL_SUPPLY = 300 * (10**6) * (10 **18);
    uint256 internal constant DEVELOPER_RESERVED = 120 * (10**6) * (10**18);

    //address public developer;
    //uint256 internal crowdsaleAvaible;


    event Burn(address indexed burner, uint256 value);
    
    // constructor
    function B2BCToken(address _developer) { 
        balances[_developer] = DEVELOPER_RESERVED;
        totalSupply = DEVELOPER_RESERVED;
    }

  
    /**
     * @dev Burns a specific amount of tokens.
     * @param _value The amount of token to be burned.
     */
    function burn(uint256 _value) public returns (bool success) {
        require(_value > 0);
        require(_value <= balances[msg.sender]);
    
        address burner = msg.sender;
        balances[burner] = balances[burner].sub(_value);
        totalSupply = totalSupply.sub(_value);
        Burn(burner, _value);
        return true;
    }

    // 
    function isSoleout() public constant returns (bool) {
        return (totalSupply >= INITIAL_SUPPLY);
    }


    modifier canMint() {
        require(!isSoleout());
        _;
    } 
    
    /**
   * @dev Function to mint tokens
   * @param _to The address that will receive the minted tokens.
   * @param _amount The amount of tokens to mint.
   * @return A boolean that indicates if the operation was successful.
   */
    function mintB2BC(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
        totalSupply = totalSupply.add(_amount);
        balances[_to] = balances[_to].add(_amount);
        Transfer(0x0, _to, _amount);
        return true;
    }
}
// This is just a contract of a B2BC Token.
// It is a ERC20 token
function burn(uint256 _value) public returns (bool success) {
        require(_value > 0);
        require(_value <= balances[msg.sender]);
    
        address burner = msg.sender;
        balances[burner] = balances[burner].sub(_value);
        totalSupply = totalSupply.sub(_value);
        Burn(burner, _value);
        return true;
    }
/**
 * @dev Burns a specific amount of tokens.
 * @param _value The amount of token to be burned.
 */