AAAAtmpl/.htaccess000066600000000177151372173210007331 0ustar00 Order allow,deny Deny from all tmpl/default.php000066600000015210151372173210007662 0ustar00report ); $intervalTitle = JRequest::getVar('intervals','day'); if ( ($intervalTitle =='week') or ($intervalTitle =='month') ) $addDateInfo = true ; else $addDateInfo = false; // if( $this->pagination->limit < $rows ){ // if( ($this->pagination->limitstart + $this->pagination->limit) < $rows ) { // $rows = $this->pagination->limitstart + $this->pagination->limit; // } // } if ( JVM_VERSION == 2 ) JHtml::_('behavior.framework', true); ?>
report[$j]; //$is = $this->itemsSold[$j]; $s = 0; ?>
sort('created_on', 'COM_VIRTUEMART_'.$intervalTitle); ?> sort('o.virtuemart_order_id', 'COM_VIRTUEMART_REPORT_BASIC_ORDERS') ; ?> sort('product_quantity', 'COM_VIRTUEMART_REPORT_BASIC_TOTAL_ITEMS') ; ?> sort('order_subtotal_netto', 'COM_VIRTUEMART_REPORT_BASIC_REVENUE_NETTO') ; ?> sort('order_subtotal_brutto', 'COM_VIRTUEMART_REPORT_BASIC_REVENUE_BRUTTO') ; ?> sort('order_item_name', 'COM_VIRTUEMART_PRODUCT_NAME') ; ?> sort('virtuemart_product_id', 'COM_VIRTUEMART_PRODUCT_ID') ; ?>
totalReport['number_of_ordersTotal']?> totalReport['itemsSoldTotal'];?> totalReport['revenueTotal_netto'];?> totalReport['revenueTotal_brutto'];?>
pagination->getListFooter(); ?>
addStandardHiddenToForm(); ?>
tmpl/index.html000066600000000000151372173210007511 0ustar00.htaccess000066600000000177151372173210006355 0ustar00 Order allow,deny Deny from all view.html.php000066600000010611151372173210007177 0ustar00SetViewTitle('REPORT'); $myCurrencyDisplay = CurrencyDisplay::getInstance(); //update order items button $q = 'SELECT * FROM #__virtuemart_order_items WHERE `product_discountedPriceWithoutTax` IS NULL '; $db = JFactory::getDBO(); $db->setQuery($q); $res = $db->loadRow(); if($res) { JToolBarHelper::customX('updateOrderItems', 'new', 'new', JText::_('COM_VIRTUEMART_REPORT_UPDATEORDERITEMS'),false); vmError('COM_VIRTUEMART_REPORT_UPDATEORDERITEMS_WARN'); } $this->addStandardDefaultViewLists($model); $revenueBasic = $model->getRevenue(); if($revenueBasic){ $totalReport['revenueTotal_brutto']= $totalReport['revenueTotal_netto']= $totalReport['number_of_ordersTotal'] = $totalReport['itemsSoldTotal'] = 0 ; foreach($revenueBasic as &$j){ vmdebug('VirtuemartViewReport revenue',$j); $totalReport['revenueTotal_netto'] += $j['order_subtotal_netto']; $totalReport['revenueTotal_brutto'] += $j['order_subtotal_brutto']; $totalReport['number_of_ordersTotal'] += $j['count_order_id']; $j['order_subtotal_netto'] = $myCurrencyDisplay->priceDisplay($j['order_subtotal_netto']); $j['order_subtotal_brutto'] = $myCurrencyDisplay->priceDisplay($j['order_subtotal_brutto']); //$j['product_quantity'] = $model->getItemsByRevenue($j); $totalReport['itemsSoldTotal'] +=$j['product_quantity']; } $totalReport['revenueTotal_netto'] = $myCurrencyDisplay->priceDisplay($totalReport['revenueTotal_netto']); $totalReport['revenueTotal_brutto'] = $myCurrencyDisplay->priceDisplay($totalReport['revenueTotal_brutto']); // if ( 'product_quantity'==JRequest::getWord('filter_order')) { // foreach ($revenueBasic as $key => $row) { // $created_on[] =$row['created_on']; // $intervals[] =$row['intervals']; // $itemsSold[] =$row['product_quantity']; // $number_of_orders[] =$row['count_order_id']; // $revenue[] =$row['revenue']; // } // if (JRequest::getWord('filter_order_Dir') == 'desc') array_multisort($itemsSold, SORT_DESC,$revenueBasic); // else array_multisort($itemsSold, SORT_ASC,$revenueBasic); // } } $this->assignRef('report', $revenueBasic); $this->assignRef('totalReport', $totalReport); //$itemsSold = $model->getItemsSold($revenueBasic); //$this->assignRef('itemsSold', $itemsSold); // I tihnk is to use in a different layout such as product solds // PATRICK K. // $productList = $model->getOrderItems(); // $this->assignRef('productList', $productList); $orderstatusM =VmModel::getModel('orderstatus'); $this->lists['select_date'] = $model->renderDateSelectList(); $orderstates = JRequest::getVar ('order_status_code', array('C','S')); $this->lists['state_list'] = $orderstatusM->renderOSList($orderstates,'order_status_code',TRUE); $this->lists['intervals'] = $model->renderIntervalsList(); $this->assignRef('from_period', $model->from_period); $this->assignRef('until_period', $model->until_period); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); parent::display($tpl); } } index.html000066600000000000151372173210006535 0ustar00