I have to extract the left most amount and the number of days from the below attached text string and perform mathematical operations depending on the number of days.
<colgroup><col></colgroup><tbody>
</tbody>
Final sum for all the below rows to be calculated according to logic.
Amount*4 ( If number of days if >=4)
Amount*number of days( If number of days is less than 4)
Example
1) The first sum should be 280*4
2) second sum should be 240*3
Condition |
$280 for days 1 through 6, $0 afterwards |
$240 for days 1 through 3, $0 afterwards |
$290 for days 1 through 4, $10 afterwards |
$280 for days 1 through 5, $10 afterwards |
<colgroup><col></colgroup><tbody>
</tbody>
Final sum for all the below rows to be calculated according to logic.
Amount*4 ( If number of days if >=4)
Amount*number of days( If number of days is less than 4)
Example
1) The first sum should be 280*4
2) second sum should be 240*3