Unless you happened to get a low quality battery and charger that still don't work, seems like it's an issue with the charging port on the laptop. It's most often a battery issue, but if you got a good Dell battery not a cheap Chinese copy, then next step is having the motherboard looked at and replaced.