There seems no way to repay a potato (or maybe any food) loan if its onlys stored in the food shop at the settlement. Loan screen shows the amount I have in there, ut cant actually be paid. the farm is connected directly to the shop, so a truck never touches the goods. indstallments also fail
Free potatoes (loan cant be repaid)
You have to enable export from the farm, and have a farm that has excess.. Or move your farm. (You can move buildings so long as the new building overlaps the old and you press SHIFT when placing)
Then you can have the potatoes in a storage in between farm and market, and use the BLUE slider on the storage to not export everything into the market - always keep a certain amount in the storage, so you can grab from there to put in the dock
Like this:

(If doing it that way, disable import to the market so your trucks don't keept transporting potatoes that could go automatically)

sure, just thought it was kinda a bug/oversight. was at least not what i expected to happen
It is exactly what I would expect to happen.
Because you connected the farm directly to the market, which has no way to take items out, the only way for potatoes to be truck accessible is if the market fills completely and you have allowed trucks to export from the farm.
Then loan screen should not show the market stock, since it cant be transported from the market. It shows as if you can pay, but you actually cant. The repay screen also usually transports by magic.
Loan screen shows total amount in storage, including storages that cannot be accessed by trucks, or by repay now box. (Food Market)