you must not connect a 12V inverter to a 24V battery, you will blow its fuse and if it did work for a few seconds it would produce twice the mains voltage that would burn out your PC and lights.
The best you can do is to split the batteries into pairs and feed each pair (12V) into the inverter one pair at a time, but you must try and use them equally so when they are reconnected to the 24V charger both of the batteries are discharged equally, else if one is "flat" and the other is fully charged, the charger will tend to overcharge the all ready charged battery.
Frank