20. Flexible Calculation of Due Dates for Invoices (House and Guest Database) (2.8, POS) |
Scroll Prev Top Next More |
Instead of the former due days (number) a formula for calculating the due days can now also be used. As usual, a positive result is added to the departure date whereas a negative result is subtracted from the current date (invoice date). Example for the due date on the last day of the month followed by departure:
"GOMONTH(DATE(YEAR(s_reser.departure),MONTH(s_reser.departure),1),2)-1-TTOD(s_reser.departure)".
NEW PMS3: The reservation is available as $data and the invoice guest as $guest. You can work with the " ? : " operator.
Example: $guest['GUESTCODE'] == '25' ? 18 : 35
Example for field in reservation: $data['s_reser']['RUSER03']