ledgersmb / LedgerSMB

Double-entry accounting & ERP for the web
https://ledgersmb.org
Other
416 stars 151 forks source link

Warn user of payment before invoice date #897

Open sbts opened 8 years ago

sbts commented 8 years ago

At least for invoices and payments nonsense dates can be entered. eg: invoice due date that is before the invoice date. Payment Date before invoice opening date. This can cause issues with reports showing completely incorrect figures for a given period (even nagative ones) compaired to what the user may expect, although if you run the report over a broad enough window (ie: encompasing all involved dates) the report would be correct.

Some date sanity checking and error reporting is required. Including prevention of future dates being used (although a grace period may be useful) Once we can "lock" periods (eg: previous financial years) historical dates should also raise an error.

einhverfr commented 8 years ago

For prepayments, certainly payments could be made before the invoice was opened, btw.

ehuelsmann commented 4 years ago

if the user decides to go through, we might create an overpayment and a payment-from-overpayment in the background.

ehuelsmann commented 4 years ago

The initial solution I see here is to add a JS check on the invoice and (single) payment screens which warns once and then will simply allow the transaction if the user forces ahead. (From there, we can add other behaviours later.)

ehuelsmann commented 4 years ago

Thinking that this can be achieved with a bit of JS in the invoice entry form as well as the single and bulk payment screens