Hi
I have a scenario where I need to be able to split the amount over multiple rows. Example of current data
[TABLE="width: 500"]
<tbody>[TR]
[TD]Invoice number[/TD]
[TD]Location[/TD]
[TD]Quantity[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]A[/TD]
[TD]2[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]A[/TD]
[TD]4[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]B[/TD]
[TD]1[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
What I need to do is against invoice 101 be able to split the total invoice amount being 30 over the rows for invoice 101 based on quantity. The calculation needs to be:
Location A 4/5 * 30 = 24
Location B 1/5 * 30 =6
So it needs to look like this
[TABLE="width: 500"]
<tbody>[TR]
[TD]Invoice number[/TD]
[TD]Location[/TD]
[TD]Quantity[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]A[/TD]
[TD]2[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]A[/TD]
[TD]4[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]B[/TD]
[TD]1[/TD]
[TD]6[/TD]
[/TR]
</tbody>[/TABLE]
Thanks
I have a scenario where I need to be able to split the amount over multiple rows. Example of current data
[TABLE="width: 500"]
<tbody>[TR]
[TD]Invoice number[/TD]
[TD]Location[/TD]
[TD]Quantity[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]A[/TD]
[TD]2[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]A[/TD]
[TD]4[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]B[/TD]
[TD]1[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
What I need to do is against invoice 101 be able to split the total invoice amount being 30 over the rows for invoice 101 based on quantity. The calculation needs to be:
Location A 4/5 * 30 = 24
Location B 1/5 * 30 =6
So it needs to look like this
[TABLE="width: 500"]
<tbody>[TR]
[TD]Invoice number[/TD]
[TD]Location[/TD]
[TD]Quantity[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]A[/TD]
[TD]2[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]A[/TD]
[TD]4[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]B[/TD]
[TD]1[/TD]
[TD]6[/TD]
[/TR]
</tbody>[/TABLE]
Thanks