Cannot create a simple invoice with multiple positions

Skip to first unread message

Adam Walczak

Aug 14, 2022, 2:23:21 PMAug 14
to mementodatabase

just wanted to do a simple invoice with many positions but it does not seam to be possible to make it with the following assumptions:
1) an invoice may have many positions
2) a position should be strongly associated invoice for which it was created
a) there can be no positions without an invoice
b) one position is associated with one invoice
c)  deleting the invoice deletes its positions

I can make an "invoice" library and an "invoice position" library bu I cannot link them in a way to ensure (a), (b) and (c). Em I missing something or does this app have no support for such basic use cases with strong associations?

Er Mo

Aug 14, 2022, 2:55:41 PMAug 14
to mementodatabase
Ich glaube was du Suchst sind Attribute . Die können bei einer Verknüpften Bibliothek eingerichtet werden.

I believe what you are looking for are attributes. These can be set up at a Linked Library.


Bill Crews

Aug 15, 2022, 3:03:42 AMAug 15
to Adam Walczak, mementodatabase
I have never heard of an invoice having positions, and I've had a lot of experience implementing orders & invoices, so I'll just describe the normal database implementation of an invoicing system...

[Libraries below are named as plural nouns (like Invoices) designating the entries that are in the library. A typical link to one of these libraries has a singular or plural field name (like Order or Invoice) corresponding to the library name being pointed to -- singular for one-to-many links & plural for many-to-many links.]

Normally you'll have an Invoices library, an Orders library, an Order Line Items library, & an Invoices library, maybe , and one or more of... a Customers library, a Products, Services, or Products & Services library, and an Invoices Line Items library, and if you have distribution as a part, then maybe an Inventory library, a Delivery locations library, a Warehouses library, and so on.

Narrowing in, an Invoice will usually have a link to the Customer & the Order, an Order Line Item will have a link to the Order, one to the Product or Service that was ordered, likely a Quantity or other sizing value & might have sizing units depicted in some way, and any other line item attribute fields you think you need, like color, texture, and so on.

The core of this is an Order, its Order Line Items, and, an Invoice, and possibly Invoice Line Items. The Order Line Items & Invoice Line Items don't have to match up, but they often will.

My guess is that what you call an invoice position is what I (and most of the world) call an invoice line item. Is that a correct guess?

If so, I THINK YOUR #1 makes sense for a position => line item and for #2, a & b depend on how you design your database and the linking between its libraries. I described mine above. c requires that, when you delete an invoice, you delete its line items as well. That is, when you delete an Invoices entry, you delete the corresponding Invoice Line Items library (or rename it for archival purposes). Of course, you may want to archive the invoice itself, as well. Let me know if this answers your question. And if you want to talk further about distribution (or order fulfillment), let me know.

If not, please describe what a position is and how it relates to your libraries and how you want it to work, and maybe we can help with that. Also let us know if you're comfortable with scripting in JavaScript. You need only JavaScript fundamentals for Memento scripting, and you might not need scripting.

You received this message because you are subscribed to the Google Groups "mementodatabase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages