26 if ($this->_aCurrSorting === null && isset($aSort[0][
'oxorderdate'])) {
27 $this->_aCurrSorting[][
"max(oxorder.oxorderdate)"] =
"desc";
55 $this->_aViewData[
"menustructure"] = $this->
getNavigation()->getDomXml()->documentElement->childNodes;
57 return "list_order.tpl";
72 $sQ .=
" group by oxorderarticles.oxartnum";
87 $sSql = $oStr->preg_replace(
'/select .* from/',
'select count(*) from ', $sSql);
90 $sSql = $oStr->preg_replace(
'/order by .*$/',
'', $sSql);
93 $this->_iListSize =
oxDb::getDb()->getOne(
"select count(*) from ( $sSql ) as test",
false,
false);
108 return 'select oxorderarticles.oxid, oxorder.oxid as oxorderid, max(oxorder.oxorderdate) as oxorderdate, oxorderarticles.oxartnum, sum( oxorderarticles.oxamount ) as oxorderamount, oxorderarticles.oxtitle, round( sum(oxorderarticles.oxbrutprice*oxorder.oxcurrate),2) as oxprice from oxorderarticles left join oxorder on oxorder.oxid=oxorderarticles.oxorderid where 1 ';
121 $sSumQ =
getStr()->preg_replace(array(
"/select .*? from/",
"/group by oxorderarticles.oxartnum/"), array(
"select round( sum(oxorderarticles.oxbrutprice*oxorder.oxcurrate),2) from",
""), $sSql);
122 $this->_aViewData[
"sumresult"] =
oxDb::getDb()->getOne($sSumQ,
false,
false);