Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with relationship and fixed quantity in invoice database

Featured Replies

  • Newbies

Hi,

I am trying to build a standard invoice solution, the only difference being that the quantity for every purchase being fixed. Some more details:

I have a COSTUMERS, INVOICES and PRODUCTS tables in addition to a LINES table. The database is standard with a relationship between COSTUMERS and INVOICES and LINES as a joint table between INVOICES and PRODUCTS. But there is one relationship that I can't work out. I want the quantity to be dependent on both COSTUMERS and PRODUCTS. So if costumer X buys product Y, the quantity added into LINES (portal) should be inserted automatically.

I am not able to sort out the relationship. I have created a table called MEMBER_QUANTITY but have no clue as to adding relationships. Do I relate MEMBER_QUANTITY to COSTUMERS or PRODUCTS or maybe both.

I add records to LINES through a portal and want the quantity to be added automatically depending on the chosen product in the portal and costumer the invoice is created for.

Can anyone help me with a solution?

Thanx!

Edited by Guest

If I understand you correctly, you'll need to use a new table MemberQuantity to contain Customer, Product and Quantity. Then set the Relationship from Lines to MemberQuantity to be based on Customer and Product. Have Quanity in Lines lookup from MembeQuantity. You could have Customer lookup from Invoice, so you won't have to populate it. Then when you select the Product it will pull Quantity from MemberQuanity. Note that when you have a few lookups the timing can get funky, so you may need to put a script in to get the timing right. What I mean is that the portal row needs to be committed with the Customer before it will lookup the Quantity.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.