Fix #1287 Create Field *Next Invoice Date*
Create Field Next Invoice Date in SalesOrders from existing column in table vtiger_invoice_recurring_info.
Merge request reports
Activity
mentioned in issue #1287 (closed)
Added 1 commit:
- 77bc6759 - Fix #1287 (closed) Generates Next Invoice Date when enabling recurring ionvoice generat…
@ruben.estrada I see that here the new entry insertion is been completely neglected, How will the new value get inserted? Please do review this note.
Hi Uma, thanks for taking a look at my pull request.
In fact the insertion and the update statements where purposefully removed (not neglected). The insertion was dead-code that never got executed because that row gets inserted before in the record save process. By the time the aftersave handler gets executed it is already there. In the case of the update statement, it was being executed but was redundant for the same reason. The fields get updated in the record save process.
The delete query was left there because that one still serves the purpose of deleting the row when the recurring option is disabled.
I introduced a new update statement to have the Next Invoice Date filled on record creation (because it is empty) and whenever the start date is moved to a future date, so that Next Invoice Date can never be before Start Period.
@ruben.estrada Thanks! for the clear and comprehensible explanation, will proceed with this.
mentioned in commit 428013d6