introduce priorities to price categories
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Mon, 31 May 2010 19:15:53 +0000 (19:15 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Mon, 31 May 2010 19:15:53 +0000 (19:15 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@487 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

wob/event.wolf

index 557e80d..fe5ac04 100644 (file)
@@ -79,6 +79,7 @@
                <Column name="pricecategoryid" type="int32" primarykey="yes" foreignkey="pricecategory:pricecategoryid"/>
                <Column name="maxavailable" type="int32" notnull="yes"/>
                <Column name="price" type="int32" notnull="yes"/>
+               <Column name="prio" type="int32" notnull="yes" default="10">order in which prices are listet, lowest prio first</Column>
                <Column name="flags" type="string">filter: who can sell tickets in this category for this event</Column>
                <Column name="tags" type="string">internal tags: can be used by macros and printer routines to change behavior or output</Column>
        </Table>
                <Property name="pricecategory" type="PriceCategory"/>
                <Property name="maxavailable" type="int32"/>
                <Property name="price" type="int32"/>
+               <Property name="prio" type="int32"/>
                <Property name="flags" type="string"/>
                <Property name="tags" type="string"/>
                <Property name="canuse" type="bool"/>
                        <Map column="price"/>
                        <Map column="flags"/>
                        <Map column="tags"/>
+                       <Map column="prio"/>
                        <Map property="pricecategory">
                                <Call lang="php" method="WOPriceCategory::fromTablepricecategory(WTpricecategory::getFromDB($table->pricecategoryid))"/>
                        </Map>
                        <Map column="tax"/>
                        <Map column="cancelreason"/>
                        <Map property="price">
-                               <Call lang="php" method="WOEventPrice::fromTableArrayeventprice(WTeventprice::selectFromDB('eventid='.$GLOBALS['db']->escapeInt($table->eventid)))"/>
+                               <Call lang="php" method="WOEventPrice::fromTableArrayeventprice(WTeventprice::selectFromDB('eventid='.$GLOBALS['db']->escapeInt($table->eventid),'ORDER BY prio'))"/>
                        </Map>
                        <Map property="amountSold">
                                <Call lang="php" method="$data->getAmountSoldFromDB()"/>