Hi, Ive been at this for ages but cant seem to figure it out.
I have a number of lettings that need to be sorted. I can list the lettings by LETID and then inside each letting show PLAN1 and PLAN2 with the cheapest one first. However, then...dependin g on the cheapest PLAN out of any of the lettings, I need to display each LETID along with its PLAN1 and PLAN2 in ascending order but this is where I get lost.
the xml:
<Lettings>
<Letting>
<LettingTypes >
<LettingType LetID="SM" NumberOfUnits=" 25">
<LettingDescrip tion Name="Supermark et">
<Text>Supermark et in Herring</Text>
</LettingDescript ion>
</LettingType>
</LettingTypes>
<LettingTypes >
<LettingType LetID="DE" NumberOfUnits=" 25">
<LettingDescrip tion Name="Deli">
<Text>Deli in Hindel</Text>
</LettingDescript ion>
</LettingType>
</LettingTypes>
<LettingRates >
<LettingRate LetID="SM" LetPlanCode="PL AN1">
<Rates>
<Rate>
<Total AmountAfterTax= "1040.00"/>
</Rate>
</Rates>
</LettingRate>
<LettingRate LetID="DE" LetPlanCode="PL AN1">
<Rates>
<Rate>
<Total AmountAfterTax= "840.00"/>
</Rate>
</Rates>
</LettingRate>
<LettingRate LetID="SM" LetPlanCode="PL AN2">
<Rates>
<Rate>
<Total AmountAfterTax= "1290.00"/>
</Rate>
</Rates>
</LettingRate>
<LettingRate LetID="DE" LetPlanCode="PL AN2">
<Rates>
<Rate>
<Total AmountAfterTax= "1090.00"/>
</Rate>
</Rates>
</LettingRate>
</LettingRates>
</Letting>
</Lettings>
this is what i have so far:
-- Letting Types / Letting Type --
@Number of Units: 25
@Letting Type Code: SM
Letting Description @Name: Supermarket
Letting Description / Text: Supermarket in Herring
-- Letting Rates / Letting Rate --
@Let ID: SM
@Let Plan Code: PLAN1
Rates / Rate / Total @Amount After Tax: 1040.00
@Let ID: SM
@Let Plan Code: PLAN2
Rates / Rate / Total @Amount After Tax: 1290.00
-- Letting Types / Letting Type --
@Number of Units: 25
@Letting Type Code: DE
Letting Description @Name: Deli
Letting Description / Text: Deli in Hindel
-- Letting Rates / Letting Rate --
@Let ID: DE
@Let Plan Code: PLAN1
Rates / Rate / Total @Amount After Tax: 840.00
@Let ID: DE
@Let Plan Code: PLAN2
Rates / Rate / Total @Amount After Tax: 1090.00
However... because 840.00 is less than 1040, this letting type should be displayed first like:
-- Letting Types / Letting Type --
@Number of Units: 25
@Letting Type Code: DE
Letting Description @Name: Deli
Letting Description / Text: Deli in Hindel
-- Letting Rates / Letting Rate --
@Let ID: DE
@Let Plan Code: PLAN1
Rates / Rate / Total @Amount After Tax: 840.00
@Let ID: DE
@Let Plan Code: PLAN2
Rates / Rate / Total @Amount After Tax: 1090.00
-- Letting Types / Letting Type --
@Number of Units: 25
@Letting Type Code: SM
Letting Description @Name: Supermarket
Letting Description / Text: Supermarket in Herring
-- Letting Rates / Letting Rate --
@Let ID: SM
@Let Plan Code: PLAN1
Rates / Rate / Total @Amount After Tax: 1040.00
@Let ID: SM
@Let Plan Code: PLAN2
Rates / Rate / Total @Amount After Tax: 1290.00
-- Letting Types / Letting Type --
@Number of Units: 25
@Letting Type Code: DE
Letting Description @Name: Deli
Letting Description / Text: Deli in Hindel
-- Letting Rates / Letting Rate --
@Let ID: DE
@Let Plan Code: PLAN1
Rates / Rate / Total @Amount After Tax: 840.00
@Let ID: DE
@Let Plan Code: PLAN2
Rates / Rate / Total @Amount After Tax: 1090.00
--- Please Help! Cheers! sorry about the long post, was just trying to give a good overview of the problem.
I have a number of lettings that need to be sorted. I can list the lettings by LETID and then inside each letting show PLAN1 and PLAN2 with the cheapest one first. However, then...dependin g on the cheapest PLAN out of any of the lettings, I need to display each LETID along with its PLAN1 and PLAN2 in ascending order but this is where I get lost.
the xml:
<Lettings>
<Letting>
<LettingTypes >
<LettingType LetID="SM" NumberOfUnits=" 25">
<LettingDescrip tion Name="Supermark et">
<Text>Supermark et in Herring</Text>
</LettingDescript ion>
</LettingType>
</LettingTypes>
<LettingTypes >
<LettingType LetID="DE" NumberOfUnits=" 25">
<LettingDescrip tion Name="Deli">
<Text>Deli in Hindel</Text>
</LettingDescript ion>
</LettingType>
</LettingTypes>
<LettingRates >
<LettingRate LetID="SM" LetPlanCode="PL AN1">
<Rates>
<Rate>
<Total AmountAfterTax= "1040.00"/>
</Rate>
</Rates>
</LettingRate>
<LettingRate LetID="DE" LetPlanCode="PL AN1">
<Rates>
<Rate>
<Total AmountAfterTax= "840.00"/>
</Rate>
</Rates>
</LettingRate>
<LettingRate LetID="SM" LetPlanCode="PL AN2">
<Rates>
<Rate>
<Total AmountAfterTax= "1290.00"/>
</Rate>
</Rates>
</LettingRate>
<LettingRate LetID="DE" LetPlanCode="PL AN2">
<Rates>
<Rate>
<Total AmountAfterTax= "1090.00"/>
</Rate>
</Rates>
</LettingRate>
</LettingRates>
</Letting>
</Lettings>
this is what i have so far:
-- Letting Types / Letting Type --
@Number of Units: 25
@Letting Type Code: SM
Letting Description @Name: Supermarket
Letting Description / Text: Supermarket in Herring
-- Letting Rates / Letting Rate --
@Let ID: SM
@Let Plan Code: PLAN1
Rates / Rate / Total @Amount After Tax: 1040.00
@Let ID: SM
@Let Plan Code: PLAN2
Rates / Rate / Total @Amount After Tax: 1290.00
-- Letting Types / Letting Type --
@Number of Units: 25
@Letting Type Code: DE
Letting Description @Name: Deli
Letting Description / Text: Deli in Hindel
-- Letting Rates / Letting Rate --
@Let ID: DE
@Let Plan Code: PLAN1
Rates / Rate / Total @Amount After Tax: 840.00
@Let ID: DE
@Let Plan Code: PLAN2
Rates / Rate / Total @Amount After Tax: 1090.00
However... because 840.00 is less than 1040, this letting type should be displayed first like:
-- Letting Types / Letting Type --
@Number of Units: 25
@Letting Type Code: DE
Letting Description @Name: Deli
Letting Description / Text: Deli in Hindel
-- Letting Rates / Letting Rate --
@Let ID: DE
@Let Plan Code: PLAN1
Rates / Rate / Total @Amount After Tax: 840.00
@Let ID: DE
@Let Plan Code: PLAN2
Rates / Rate / Total @Amount After Tax: 1090.00
-- Letting Types / Letting Type --
@Number of Units: 25
@Letting Type Code: SM
Letting Description @Name: Supermarket
Letting Description / Text: Supermarket in Herring
-- Letting Rates / Letting Rate --
@Let ID: SM
@Let Plan Code: PLAN1
Rates / Rate / Total @Amount After Tax: 1040.00
@Let ID: SM
@Let Plan Code: PLAN2
Rates / Rate / Total @Amount After Tax: 1290.00
-- Letting Types / Letting Type --
@Number of Units: 25
@Letting Type Code: DE
Letting Description @Name: Deli
Letting Description / Text: Deli in Hindel
-- Letting Rates / Letting Rate --
@Let ID: DE
@Let Plan Code: PLAN1
Rates / Rate / Total @Amount After Tax: 840.00
@Let ID: DE
@Let Plan Code: PLAN2
Rates / Rate / Total @Amount After Tax: 1090.00
--- Please Help! Cheers! sorry about the long post, was just trying to give a good overview of the problem.
Comment