Calculating the record value
Maybe if the MySQL version supports, you can use an AFTER INSERT TRIGGER
Here is the code that will help for INSERT statements
    delimiter $$
CREATE TRIGGER mytrigger 
    AFTER INSERT 
ON tblstationerytranscation 
    FOR EACH ROW 
    BEGIN
    declare quan integer;
    set quan = new.quantity;

    if new.trsntype = 'issued' then 
        set quan = -1 * quan;
    END IF;
    
        update tblstationerystock 
        SET balance = balance + quan
        where stationery_code =  new.stationery_code;

end $$