Exemple #1
0
 public function getTextDiscount()
 {
     if ($this->type == 1) {
         return $this->discount . "%";
     } else {
         $currency = Wpjb_List_Currency::getCurrency($this->currency);
         $code = $currency['code'] . ' ';
         if ($currency['symbol'] != null) {
             $code = $currency['symbol'];
         }
         return $code . $this->discount;
     }
 }
Exemple #2
0
 public function getTextPrice($format = null)
 {
     $currency = Wpjb_List_Currency::getCurrency($this->currency);
     $price = $this->price;
     if ($format) {
         $price = sprintf($format, $price);
     }
     if ($currency['symbol'] != null) {
         return $currency['symbol'] . $price;
     } else {
         return $currency['code'] . ' ' . $price;
     }
 }
Exemple #3
0
 public static function render()
 {
     $list = new Daq_Db_Query();
     $list->select("t.payment_currency as curr");
     $list->from("Wpjb_Model_Payment t");
     $list->where("payment_paid > 0");
     $list->group("payment_currency");
     $result = $list->fetchAll();
     $curr = array();
     foreach ($result as $r) {
         $c = Wpjb_List_Currency::getCurrency($r->curr);
         $curr[$r->curr] = $c["name"];
     }
     $view = Wpjb_Project::getInstance()->getAdmin()->getView();
     /* @var $view  Daq_View */
     $view->currency = $curr;
     $view->render("dashboard/stats.php");
 }