24 if ($this->_aCurrSorting === null && isset($aSort[0][
'oxorderdate'])) {
25 $this->_aCurrSorting[][
"max(oxorder.oxorderdate)"] =
"desc";
53 $this->_aViewData[
"menustructure"] = $this->
getNavigation()->getDomXml()->documentElement->childNodes;
55 return "list_order.tpl";
70 $sQ .=
" group by oxorderarticles.oxartnum";
85 $sSql = $oStr->preg_replace(
'/select .* from/',
'select count(*) from ', $sSql);
88 $sSql = $oStr->preg_replace(
'/order by .*$/',
'', $sSql);
91 $this->_iListSize =
oxDb::getDb()->getOne(
"select count(*) from ( $sSql ) as test",
false,
false);
106 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 ';
119 $sSumQ =
getStr()->preg_replace(array(
"/select .*? from/",
"/group by oxorderarticles.oxartnum/"), array(
"select round( sum(oxorderarticles.oxbrutprice*oxorder.oxcurrate),2) from",
""), $sSql);
120 $this->_aViewData[
"sumresult"] =
oxDb::getDb()->getOne($sSumQ,
false,
false);