I'm convinced that there is a difference between what you have coded and what is being keyed in Dynamics.
Rekey this doc, manually, and carefully note the things that you have to key. If you have to key a taxscheduleid, they you must code it. If it defaults, you don't need to code it.
Same with the tax window. If the taxes default correctly, then don't code them.
I'm guessing that either you need to specify the TAXSCHEDID in code, or you don't need to code the taxes. They should default.
One more time for emphasis.
-
rekey the doc manually
-
carefully note every keystroke
-
if you have to enter something manually (TAXSCHEDID), you must code it.
-
if you don't have to enter it manually (if it defaults), don't code it.
The answer is in there somewhere.