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