0

Paiement status update with "due date" in another table

Hi,

I need some help.

I manage registrations with a paiement for each registration. I have to handle the status of these paiements in my db.

I have 2 categories in each registration.

- Payment date
- Payment status = not payed / payed / overdue

When I indicate a payment date, the status is automatically change to « paid » . This works perfect :-)

But how can I make the status automatically go into « overdue" when the due date is exceeded? The difficult part is that this due date is in another table.

For example : I make a registration in the registrations table for an activity. So I link a member to an activity and the « due date » is in this activity record.

I hope it’s clear :-)

Thanks a lot ;-)

8 replies

null
    • SMoore
    • 5 yrs ago
    • Reported - view

    I’ve wanted to do something similar to where after a date surpasses it changes a field automatically for me. Though, I have not found a way. Trigger after update does not work, only if I change something on the field. I am interested in a response for this as well.

     

    I have a field “date closed” I want after that date surpasses it to change a status from open1 to closed2

    • Nick
    • 5 yrs ago
    • Reported - view

    Try this

    --

    if 'Due Date' != null and 'Due Date' = 'Pay Date' then
    "Paid"
    else
    if 'Due Date' != null and 'Due Date' < 'Pay Date' then
    "Overdue"
    else
    "Not Paid"
    end
    end

    --

     

    Nick

    • Nick
    • 5 yrs ago
    • Reported - view

    Ignore my previous post...

     

    Create a formula field in the payments table -> 'Due Date' = Activity.'Due Date'

     

    then in the Status:

     

    if 'Pay Date' <= date('Due Date') then
    "Paid"
    else
    if 'Pay Date' > date('Due Date') then
    "Overdue"
    else
    "Not Paid"
    end
    end

     

    I hope it helps.

     

    Nick

    • Nick
    • 5 yrs ago
    • Reported - view

    OK, final proposal...

    (My setup is for Customer with numeric 'Terms' field)

    --

    let dd := Date + Customer.Terms;
    let pd := 'Pay Date';
    if pd = null then
    "Not Paid"
    else
    if pd > date(dd) then "Overdue" else "Paid" end
    end

    --

     

    Nick

    • centroequibalance
    • 5 yrs ago
    • Reported - view

    Hi there,

    Which formula is the one that entering the payment date in the invoices, the status changes to paid? Also where is this suposed to go? Thank you, I am learning how Ninox works, but I am not proficient in coding...Cheers!

    • centroequibalance
    • 5 yrs ago
    • Reported - view

    bump

    • Sakshi_Singh
    • 5 yrs ago
    • Reported - view

    Hi,

    We can help you via a call. Please book the call here, https://calendly.com/sakshi-singh-ninox/30min

     

    Regards, 

    Sakshi- Ninox

    • Nick
    • 5 yrs ago
    • Reported - view

    Hi,

    I don't know you setup, but in general:

    create a formula field named e.g. Invoice Status and type in the formula editor the code:

    --

    if 'Payment Date' = null then "Not Paid" else "Paid" end

    --

     

    Nick

Content aside

  • 5 yrs agoLast active
  • 8Replies
  • 3090Views