0

Query regarding View Element

Hello,

I was going through your post " https://forum.ninox.com/t/g9hbyt2/pass-current-viewing-record-id-to-a-view-element-column-formula " as my query is also almost the same, but honestly I could not understand anything as I am still in the phase of learning the constructs of Ninox. I just realised that whatever I have made in Ninox till date is actually all provided by Ninox by default. The real work starts now and I don't even know how to do simple data selection from different tables in Ninox. There is a lot to learn how Ninox works.

I am making a "Account Receivables" table to record customer payments:

1. Sometimes the customers make late payments or part payments for an order. Eg: customer gave order on 01 Aug 2024, we delivered the order on 02 Aug 2024, however the customer made part payment (say 50%) on 02 Aug 2024 and the balance (50%) payment on 08 Aug 2024.

2. Sometimes the customer may take two orders before even making any payment.

3. Sometimes the customers make full payment on the spot when the order is delivered.

 

I want to achieve two things:

1. From within the Receivables form I want to record the payments of the customers as they come in and record them against the specific orders which are unpaid or partly paid. So I put a View element on the form that displays all the records (where balanceDue > 0 ) specific to that customer that has been selected on the form (in the Customer reference field). Reference field is a text field that should get filled automatically when I choose one of the correct options (Partial or Paid in Full) from the Order form.

I understand that I do not need to enter data directly from the Receivables form, rather create records in this table through code from within the Order form when a payment is received against an order. The reason I am making data entry using the Receivables form is 'cuz customers might make collective payments for a couple of orders together, so it is easy to just enter data from Receivables form as it shows only orders with pending payments from every particular customer.

2. Be able to create a record in the Receivables table through code from the Order form when a customer makes a payment on the spot and the OrderNumber of the current order to get stored in the Reference field in Receivables table.

3 replies

null
    • Database App Developer
    • vermau81
    • 4 mths ago
    • Reported - view

    I think I have a solution to this problem. I will create a Record Payment button on the Order form and write the code in the click event of that button.

    • John_Halls
    • 4 mths ago
    • Reported - view

    Hi  Your payments need to be in the same table as your invoices and credit notes, then have an allocations table to allocate payments and credit notes to invoices. This way invoices can be unpaid, part-paid or fully paid, and payments can be allocated to as few or many of your invoices.

    Orders are to do with work effort and stock and are not financial until the order is used to create an invoice. I'd keep your orders and returns in a separate table to your financial transactions, and allocations tables.

    Regards John

      • Database App Developer
      • vermau81
      • 4 mths ago
      • Reported - view

       Hello John, thank you for your input and advise. My idea is similar to yours except for the fact that in my case there is no need to generate as invoice and give to the customer as mine is just a home based and run food business.

      That's why I have a Record Payment button on the Order form itself. As soon as a payment is realised, a new record will be created in the Receivables table automatically and the OrderNumber and PaymentAmount will be saved in that record denoting against which order the payment was received and how much money was received, hence the orders are either fully paid or partly paid.

      I just need one clarification from you... When you said "Your payments need to be in the same table as your invoices and credit notes, then have an allocations table to allocate payments and credit notes to invoices", what do you exactly mean by payments being in the same table as the invoices.

      1. Do you mean that I should make a column named PmtReceived inside the Invoices table.

      Your Allocations table is my AccountsReceivable table.

      Attached is the snapshot of my Orders table.

Content aside

  • Status Answered
  • 4 mths agoLast active
  • 3Replies
  • 42Views
  • 2 Following