Skip to content
Snippets Groups Projects

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

Approval is optional

Merged by avatar (Apr 12, 2025 2:03am UTC)

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • mentioned in issue #1287 (closed)

  • Ruben A. Estrada Added 1 commit:

    Added 1 commit:

  • @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.

  • Uma Status changed to merged

    Status changed to merged

  • Uma mentioned in commit 428013d6

    mentioned in commit 428013d6

  • Thank you!

Please register or sign in to reply
Loading