0

I need help on Invoicing Table

Hello, 

I am doing a DB for one of my friends with tables as follow: 

Invoice

Contacts 

Products

Appointments

 

In Invoice table, there is a type drop down Offer/Invoice.

 

I can't figure out how to: 

 

- When switching to Invoice from Offer, to create a copy of Offer. 

- Installment Payment option, to send a part of invoice as a deposit. 

- QR Code invoice print as in paper or PDF. 

 

Any help or advise here is greatly appreciated. 

 

Thank you

Bujar  

4 replies

null
    • Fred
    • 3 yrs ago
    • Reported - view

    Where are you copying the "offer" to? If I follow you:

     

    1) you have a record in invoice that starts off with a drop down field = Offer

    2) when you switch the field from Offer to Invoice what table do you want this record copied to?

     

    On a side note, do you only have one product per invoice?

    • Bujar
    • 3 yrs ago
    • Reported - view

    Hi Fred, 

    Yes, I am using a default template from Ninox, when you create a record with a drop down menu of Offer &  Invoice, first I create an offer, when the client accepts it, I switch it to Invoice, however I would like to keep a copy of the offer. 

    I have a hidden product table, which is not relevant after the invoice is created. 

    Not sure if I have the right concept for this workaround. 

    • Fred
    • 3 yrs ago
    • Reported - view

    Are you using the Invoice DB that is available when you select New Database?

     

    What have you modified in that DB?

     

    What field are you using to track Offer/Invoice?

    • Fred
    • 3 yrs ago
    • Reported - view

    To create a copy of the offer you will need to create a new table, i.e. OfferHistory or anything you want.

     

    Then you will need to create all the fields you want to copy over data from the Invoice table. You can name them the same.

     

    Then you will need to create a table reference to Invoice, so you can link the two records. You can leave the name as Invoice or call it anything you want.

     

    Then go back to your invoice table and create a new button and put this in the On Click section:

     

    let curRec := this;<--gathers all the data for current record

    let newRec := (create OfferHistory);<--creates a new record in the OfferHistory table. make sure to put the exact name of your new table. if you have a space in the name you need to put single quotes around it

    newRec.(Invoice := curRec);<--links the Invoice reference field in OfferHistory to the current record you on in the Invoice table

     

    You will see a new record is created in the OfferHistory table that is linked to the current Invoice you are on. You will see this record in the OfferHisotry view that is automatically created when you created the table reference in OfferTable.

     

    Let us know how it goes and then we can add the next steps.