(1) If, in relation to a regulated hire-purchase or conditional sale agreement, it appears to the court just to do so-
(a) on an application for an enforcement order or time order; or
(b) in an action brought by the creditor to recover possession of goods to which the agreement relates, the court may-
(i) make an order (a "return order") for the return to the creditor of goods to which the agreement relates;
(ii) make an order (a "transfer order") for the transfer to the debtor of the creditor's title to certain goods to which the agreement relates ("the transferred goods"), and the return to the creditor of the remainder of the goods.
(2) In determining for the purposes of this section how much of the total price has been paid ("the paid-up sum"), the court may-
(a) treat any sum paid by the debtor, or owed by the creditor, in relation to the goods as part of the paid-up sum;
(b) deduct any sum owed by the debtor in relation to the goods (otherwise than as part of the total price) fro
…