When you plug in the mains power lead it will operate a switch that disables battery power - perhaps the switch is defective and permanently disconnecting the battery.
Perhaps the battery holder has bad connections.
Nobody here can see it to make a diagnosis.
Good Luck...
February 2017