How to fix transfer function to work on Pancakeswap

I added in transfer function a max transaction size calculated as a 1.5% from the total supply and to make this to autoupdate when totalSupply will decrease after burning.

This function works on remix and wallet to wallet, but does not work on pancakeswap, what do I need to change to make it work there too, I can add tokens as liquidity from main wallet, I can buy with any wallet, but I can not sell back to pancakeswap from other wallets, only the founder wallet working for selling back to pancakeswap.

function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual override {
        
        if (sender == communityWallet || recipient == communityWallet || feeState == State.nofees) {
            super._transfer(sender, recipient, amount);
        } else {
                require(amount <= (totalSupply() * 15)/1000, "You are exceeding max transaction limit");
                  
                   
                if(totalSupply()<= _minSupply) {
                    
                uint burnAmount = amount / 100;           
                _burn(sender, burnAmount);

                uint treasuryAmount = amount / 100 ;
                uint fTransfer = amount - (burnAmount + treasuryAmount);
                
                super._transfer(sender, communityWallet, treasuryAmount);
                super._transfer(sender, recipient, fTransfer);


                } else {
                uint burnAmount = amount * burnFee/100;           
                _burn(sender, burnAmount);

                uint treasuryAmount = amount * operationFee/100 ;
                uint fTransfer = amount - (burnAmount + treasuryAmount);
                super._transfer(sender, communityWallet, treasuryAmount);
                super._transfer(sender, recipient, fTransfer);

                }
            

            }

     }   

Thanks for anybody who has time to help me with this !

you can't devide 15 / 1000 because solidity does not allow any decimals