SQL Expert for Transaction Tracking Query

Job ID: 38310483

Budget: $30 – $250 USD

I have a SQL Server database and I'm looking for a skilled SQL professional to help me create a query or procedure that will help me track in and out transactions.
i have table to record IN Out of inventory - each raw say how much in and how much out . i want to know out transaction happened from which intransation ( this can be from mulpile in )

Date Voucher Quantity Remarks
01/01/2024 1001 10
02/01/2024 1002 20
03/01/2024 1003 -6 This 1 quantity is from voucher 1001
04/01/2024 1004 -8 This 8 quantities are from vouchers 1001 and 1002 (4 quantities from voucher 1001 and 4 quantities from 1003)
05/01/2024 1005 -2 This quantity is from voucher 1002


this is the result i need
Qty Out Qty out from voucher Out Qty By voucher
1003 -6 1001 6
1004 -8 1001 4
1004 -8 1002 4
1005 -2 1002 2