When the cashier saves the sale it will be saved with the date it was saved on. A customer paid for it on another day and:
If the setting is DISABLED: the confirmed and paid sales document will be saved with the date, when this sale was SAVED.
If the setting is ENABLED: the confirmed and paid sales document will be saved with the date, when this sale was CONFIRMED AND PAID.
The setting can be enabled in the POS Settings -> Configuration -> Sale -> Update the document date when saving a pending sale.