All depends on wether weapons can be made conditional, and apparently not. Because if you add some weapon to the APC (supposing its four slots aren't already full) it will continue firing when the infantry is dismounted. Besides, how would you decide which actual weapon you want the squad to use through the ports, as opposed to the rest of their pack (e.g. assault rifles rather than MGs etc.), and you'd also had to add precise IFV variants matching the infantry weapons date to date.
Other solution (the hard one, as ever

) would be to add some property to the vehicle saying that carried infantry-type units can fire with their own weapons while either: buttoned inside/ opening firing ports/ standing outside hatches/ etc., which would define the vulnerability modifier for both infantry (surface exposed) and vehicle (opening in the armor and NBC impermeability).
That would be hard work even if it was doable, and I suppose it would already have been done if the game allowed it.