0

Price books and ninox

I will work with price books. Articles can have a special discount or price per customer. If no special price or discount, I use the normal sale price from the product. How can I do this in Ninox?

5 replies

null
    • Fred
    • 3 yrs ago
    • Reported - view

    if you have the following number fields:

    price

    discount <-- data is stored as decimal, so you would type .1 instead of 10

    then a formula field called 'final price', or whatever you want to call it, would be created that has the following formula:

    if discount != null then

    price * discount

    else

    price

    end

    Very simple as we don't know much about your structure.

    • krebbe
    • 3 yrs ago
    • Reported - view

    I use at the moment Filemaker. In filemaker i have a table articles with prices. I have also a table Pricebook. In this table i can create a record where i choose the customer, the article and put a special price for this article. 

    If i create a sales order and i add the artikel to the sales order, i use a script where i searche first in the table pricebook if there is a special price i use the special price and if there is no record i use the normal price from the article. 

    • John_Halls
    • 3 yrs ago
    • Reported - view

    Hi Danny

     

    I too have a FileMaker background. Where you can be quite specific about the nature of a join in FileMaker this is not so in Ninox, but then Ninox is much better at extracting records and tables that do not have any joins

     

    So I would treat your PriceBook as a join table in a many-to-many relationship between Customers and Articles . The PriceBook also holds the Price. Create the Customer table first, then the Artice table and finally the PriceBook table. While you are creating this add the two relationships to Customers and Articles. This way you get the 1:Many relationship the right way round.

     

    Keep this arrangement seperate to your Invoicing hierarchy: Customr -> Invoice -> Invoice Line. At the Invoice Line level you can use a select statement to find the price for that Customer and Article in the PriceBook and update the Price. In FileMaker you might have used a Table Occurence to get your price but this won't work in Ninox, unless I am mistaken.

     

    Regards

     

    John

    • Fred
    • 3 yrs ago
    • Reported - view

    So let us say you have the following tables:

    Customer

    Article

    Pricebook reference field to Customer and Article

    Sales Order reference field to Article and Customer

    You want to create a new Sales Order for a customer so you create a new record, then you select a Customer, then you select an Article. If a customer can have multiple Articles then you will need another table (i.e. Sales Order Items) to store all those relationships.

    Then you would create the following formula fields in your Sales Order table:

    Article Price : Article.Price <--where you pull the price of the article through the Pricebook table

    Discount : would be a if statement that looks in the Pricebook table for any records matching on Customer and if it is null you put 0 or else it would be Pricebook.Discount.

    Final Price : 'Article Price' - ('Article Price'*Discount) <--here you take the two fields you created in Sales Order and do the math to find the final.

    Again, this is a very simple description but should point you in the right direction.

    • krebbe
    • 3 yrs ago
    • Reported - view

    Thanks for the quick reply. I'm trying to set up something.

Content aside

  • 3 yrs agoLast active
  • 5Replies
  • 410Views