Make one row for every invoice and it’s payment (1 Viewer)

mobarak ahmed

Member
Local time
Today, 15:14
Joined
May 28, 2021
Messages
95
I’m now try to mack clients management database for contracting company
It Consists of two parts invoices and payments
Every invoice have unique number
To be considered that every payment should be against specific invoice and not necessary that the client send all invoice at one time let’s have example for clarification
We make contract with the client by 1000,000 USD
And we have invoiced 4 invoices
Invoice number 1 = 200,000
Invoice number 2 = 300,000
Invoice number 3 = 400,000
Invoice number 4 = 100,000
The client has send 150,000 USD against invoice number 3 by check number 68219 on 15/5/2021
On 20/6/2021 he send another payment 250,000 against invoice number 3 by transfer on account number 99222044
Now we have two payment on invoice number 3 by different methods and different date and
I’m now have to tables one for the invoices and one for payments
I want to make query to collect the same information about the invoice and it’s payment
The problem when i want to do this i have now two different payment method on same invoice which i want to make every row for one invoice and it’s payment
It gave me chooses to sum or average or count
What can i do to mack the two different payment on same invoice appear on same row ?
sorry for talking too much and bad explanation
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:14
Joined
May 7, 2009
Messages
19,237
1. Create a Total query against the payment.
Group by invoice , do not include the date when grouping.(query1)

2. Create another query from invoice table Joining query1 on invoice number.
Show the innvoice, invoice amount, invoice payment.

see Query2 and Query3.
 

Attachments

  • client_mgmnt.accdb
    1.7 MB · Views: 374
Last edited:

mobarak ahmed

Member
Local time
Today, 15:14
Joined
May 28, 2021
Messages
95
1. Create a Total query against the payment.
Group by invoice , do not include the date when grouping.(query1)

2. Create another query from invoice table Joining query1 on invoice number.
Show the innvoice, invoice amount, invoice payment.

see Query2 and Query3.
6666.jpg


sorry i can't find Chr(13) or Chr(10) !!
 

mobarak ahmed

Member
Local time
Today, 15:14
Joined
May 28, 2021
Messages
95
here is my database if you can solve it i have done everything you've said
 

Attachments

  • Mobarak - 20-6-2021.zip
    2 MB · Views: 364

mobarak ahmed

Member
Local time
Today, 15:14
Joined
May 28, 2021
Messages
95
i have two problem now
1- if payment method was the same it appeared once also the date and payment amount
you can see the screen shoot ,
2- it's doesn't appeared in front of each other
like
payment date is 22/6/2021
payment method cancelled
amount 25,000
it appeared 14/6/2021 cancelled 8,200
admin.jpg
 

mobarak ahmed

Member
Local time
Today, 15:14
Joined
May 28, 2021
Messages
95
Notice i could need to make more than 5 or 6 payments against same invoice
 

Attachments

  • Mobarak - 20-6-2021.zip
    2 MB · Views: 326

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:14
Joined
May 7, 2009
Messages
19,237
so it is not obeying the sort order.
i my own custom function AConcat().

see Query3.
 

Attachments

  • Mobarak - 20-6-2021.zip
    2.1 MB · Views: 268

mobarak ahmed

Member
Local time
Today, 15:14
Joined
May 28, 2021
Messages
95
please don't be upset😅 but I've tried to add bank name and check num to query 3
but i failed i don't know why whoever i do the same code
so please do it for me last time if you have time and sorry for Disturb
 

Attachments

  • Mobarak - 21-6-2021.zip
    2.1 MB · Views: 284

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:14
Joined
May 7, 2009
Messages
19,237
see Query3 in design view.
 

Attachments

  • Mobarak - 21-6-2021.zip
    2 MB · Views: 333

mobarak ahmed

Member
Local time
Today, 15:14
Joined
May 28, 2021
Messages
95
i have create new invoices but i wondered why it doesn't appeared in query 2 or query 3 ?
 

Attachments

  • Mobarak - 23-6-2021.zip
    2 MB · Views: 369

Users who are viewing this thread

Top Bottom