Order Details Taxes array question

Below is the array from CS-Cart that is stored in the Order data table. I am creating an addon that adds new orders into Cs-Cart programatically but I am trying to determine what all the fields of the taxes array do and how to duplicate them properly. I'm stuck on the whole applies array and have no idea what the children arrays and values mean. Can anyone provide any insight into them?



Array
(
[6] => Array
(
[rate_type] => P
[rate_value] => 10.000
[price_includes_tax] => Y
[regnumber] => 1234242
[priority] => 1
[tax_subtotal] => 3
[description] => VAT
[applies] => Array
(
[P] => 0
[S] => 3
[items] => Array
(
[S] => Array
(
[1] => 1
)
[P] => Array
(
)
)
)
)
)

Products and Services. I'm guessing the S => 1 means that a Services tax has been applied.

Thanks!