lapadatcristi
New member
- Local time
- Today, 12:24
- Joined
- Aug 27, 2020
- Messages
- 4
Hello comunity!
I have 3 tables
Table Supplier
SupplierId
Supplier
Adress
Table SupplierInvoices
InvoiceID
SupplierID
Data
SupplierInvoice
TableSupplierPayments
PaymentID
SupplierID
Data
SupplierPayments
The relations: 1 to many from Suppliers table to Payments and Invoices. Linked field: SupplierID
My final result should be a query like
SupplierID
Data
SupplierInvoice
SupplierPayment
So, I want to have a final query/table with lines for each payment and each invoice/supplier in order to calculate how much do I own at a moment to a supplier.
Until now I was working with 1 table that contains payments and invoices also, but I think that this datas should be sepparated.
The final result shoud be like:
Date Payment Invoice
Supplier1 01.01 80
Supplier1 02.01 30
Supplier2 02.01 100
Supplier3 03.01 90
Supplier2 03.01 40
Supplier1 04.01 20
I want this to be able to calculate how much it is my debt to that supplier at one moment.
Can you help me!
PS; Do you think that it is right to create separate tables for invoices and payments? Or to create 1 table that contains Payments and Invoices?
I have 3 tables
Table Supplier
SupplierId
Supplier
Adress
Table SupplierInvoices
InvoiceID
SupplierID
Data
SupplierInvoice
TableSupplierPayments
PaymentID
SupplierID
Data
SupplierPayments
The relations: 1 to many from Suppliers table to Payments and Invoices. Linked field: SupplierID
My final result should be a query like
SupplierID
Data
SupplierInvoice
SupplierPayment
So, I want to have a final query/table with lines for each payment and each invoice/supplier in order to calculate how much do I own at a moment to a supplier.
Until now I was working with 1 table that contains payments and invoices also, but I think that this datas should be sepparated.
The final result shoud be like:
Date Payment Invoice
Supplier1 01.01 80
Supplier1 02.01 30
Supplier2 02.01 100
Supplier3 03.01 90
Supplier2 03.01 40
Supplier1 04.01 20
I want this to be able to calculate how much it is my debt to that supplier at one moment.
Can you help me!
PS; Do you think that it is right to create separate tables for invoices and payments? Or to create 1 table that contains Payments and Invoices?