split numbers (1 Viewer)

bhelmy

Registered User.
Local time
Today, 10:26
Joined
Dec 6, 2015
Messages
62
Hi my friends
I have a big issue

First I have a 2 table the first on contain the name of transaction and quantity

EX :
quantity Name of transaction
4000 HQ1
4500 HQ2
1500 HQ3

The second table contain the split data

EX :
Split to quantity
baher 5000
yassin 3000
selim 2000


So I need make query or code split the table on depend on table to
And give me the following result :

Split to New quantity For example to you
baher 4000 Total 5000 we will take 4000 from HQ1 and 1000 from HQ2
baher 1000
yassin 3000 The remaining quantity from HQ2 ( 3000 )
selim 500 The remaining quantity from HQ2 ( 500 ) and HQ3
selim 1500


That’s a simple example for I need so please I need the idea
How can I make it ?
 

Attachments

  • test1.mdb
    340 KB · Views: 56
  • 123.JPG
    123.JPG
    72.4 KB · Views: 60
Last edited:

jdraw

Super Moderator
Staff member
Local time
Today, 03:26
Joined
Jan 23, 2006
Messages
15,379
Please step back and describe the logic that gives you this result

Code:
Split to New quantity For example to you
baher 4000 Total 5000 we will take 4000 from HQ1 and 1000 from HQ2
baher 1000
yassin 3000 The remaining quantity from HQ2 ( 3000 )
selim 500 The remaining quantity from HQ2 ( 500 ) and HQ3
selim 1500

There is something that says this is the priority of the people and amounts who should be assigned values/fulfilled, and
this is the order in which transactions should be processed.

You may find more info (even if only for reference) by searching FIFO Inventory or LIFO to see that there is logic to identify what amounts to assign to which person/group.
 
Last edited:

bhelmy

Registered User.
Local time
Today, 10:26
Joined
Dec 6, 2015
Messages
62
i cant get it so please i need more explain
 

Users who are viewing this thread

Top Bottom