basically I need to generate all possible combinations with room accommodations.
For example:
+-----------+----------+--------------------------+
| Room Type | Quantity | Sub quantity from Double |
+-----------+----------+--------------------------+
| Double | 10 | X |
+-----------+----------+--------------------------+
| Single | 5 | 5 |
+-----------+----------+--------------------------+
| Triple | 3 | 10 |
+-----------+----------+--------------------------+
If we look only Quantity column I can generate the all combinations with cartesian function and the result will be something like follows:
But the tricky part is for the last column which is something like "virtual" rooms. It show how many double rooms can be used as Single and Triple.
Again from the example we can use 5 out of 10 double rooms as Single and 10 out of 10 double rooms as Triple.
The result from with the accommodations from the last column should be something like this:
Any hints how this can be achieved?