Hi,
I want to Creation a algorithm??
I have
customer 1
customer 2
customer 3
order of customer 1
Item quantity
item1 10
item2 2
item3 3
Vendor1 Amount on order
Item quantity cost total home-deliver
item1 10 50 500 100
item2 2 40 80
item3 3 40 120
Vendor2 Amount on order
Item quantity cost total home-deliver
item1 10 60 600 100
item2 2 30 60
item3 3 50 150
Vendor3 Amount on order
Item quantity cost total home-deliver
item1 10 70 700 200
item2 2 50 100
item3 3 30 90
From above we see that
for
item1 vendor1 has low cost 500 and home-deliver 100
so we give it to vendor1
item2 give it to vendor2
item3 vendor1 total 120 +100=220
vendor3 total 90+200=290
So give it to vendor1
For this type of calculation which algorithm is use??
Or how to create it any sample link or sample code please?