Text this: Dynamic program modelling for a retail system under trade credit