In my own opinion, this sentence should be "将在外，军令不受".
I can hardly imagine any use of "有" and "所" here. Could someone explain the structure of this sentence?
This is classical Chinese, not modern Chinese.
Normally in Classical Chinese 所 stands for an omitted object of a verb. 所 + Verb means ‘Verb 的东西 (the thing that is verb-ed), which is equivalent to a kind of relative clause marker (RM) in English ‘what/that is Verb-ed’. It makes the sentence passive.
The 有 just means 有.
In modern Chinese I would write it as: 如果将军在外面大战，朝廷的命令有可以不被将军接受的。
On Baidu I found this explanation:
(If you are reading these texts, your Chinese should be good enough to understand the explanation :-) ).
Grammar is explained by @BertR very well, but your question has an error...
To interprete this sentense, it means: "when a general is outside, there are some orders can be ignored."
structure of "将在外" is quite obvious. "将" refers to "general" which is the subject of the sentence. "在外" is an adjunct of the sentsence to tell the place.
The underline structure for "军令有所不受" is "不受军令"("no" "accept" "order" ). "所" here is a marker which caused a movement of the complement of verb from the back to the front. Meanwhile, "所" here also played a role like a pronoun which coindex with "军令"（order）. Therefore we have "有"(have) in front of it to be its initial verb. Just like "There have some orders that....".