macros/modules/document/helpers/document_helper.php [ 257 ]
252 return $this->_price_helper = new document_helper_price($this);
253 }
254
255 public function item_vat_decimals()
256 {
257 return Payments::set_round_procision($this->payment()->model(), $this->exchange()->exchange());
258 }
259
260 /**
261 * Vrati kurz dokumentu
262 * @return document_exchange_helper
-
MODPATH/document/helpers/document_helper_price.php [ 75 ] edit » document_helper->item_vat_decimals()
70 function (Money $carry, DocumentPriceFormat $vat_price) { 71 return $carry->add($vat_price->asMoney()); 72 }, 73 decimalToMoney(0, Price::get_currency($this->_document->exchange()->exchange())) 74 ); 75 return DocumentPriceFormat::factory(round(moneyToDecimal($price), $this->_document->item_vat_decimals()), $this->_document); 76 } 77 78 public function document() 79 { 80 return $this->_document; -
MODPATH/presenter/models/presenter_payment.php [ 56 ] edit » document_helper_price->with_vat()
51 * @throws Kohana_Exception 52 */ 53 public function find_price($total_price = null, $total_price_without_dph = null) 54 { 55 if (is_null($total_price)) { 56 $total_price = Presenter::basket()->price()->with_vat(false)->asFloat(); 57 } 58 if (is_null($total_price_without_dph)) { 59 $total_price_without_dph = Presenter::basket()->price()->without_vat(false)->asFloat(); 60 } 61 -
MODPATH/presenter/libraries/PresenterPayment.php [ 74 ] edit » Presenter_Payment_Model->find_price()
69 return $this->_payments; 70 } 71 /* @var $payments Presenter_Payment_Model[] */ 72 $payments = ORM::Factory('Presenter_Payment')->in('id', $payment_ids)->find_all(); 73 foreach ($payments as $payment) { 74 if (!$payment->find_price()->loaded()) { 75 continue; 76 } 77 $this->_payments[$payment->id] = $payment; 78 } 79 return $this->_payments; -
MODPATH/presenter/libraries/PresenterPayment.php [ 43 ] edit » PresenterPayment->payments()
38 * @param int $payment_id 39 * @return \Presenter_Payment_Model 40 */ 41 public function payment($payment_id = null) 42 { 43 return arr::get($this->payments(), $payment_id, new Presenter_Payment_Model()); 44 } 45 46 /** 47 * 48 * @param int $transport_id -
MODPATH/presenter/helpers/document_helper_presenter_basket_payment.php [ 32 ] edit » PresenterPayment->payment()
27 { 28 if ($model instanceof Payment_Model) { 29 $this->customerData->paymentId = $model->pk(); 30 return $this; 31 } 32 return app(PresenterPayment::class)->payment($this->id()); 33 } 34 35 public function price_pc() 36 { 37 return $this->model()->price(false, false); -
MODPATH/document/helpers/document_helper_item.php [ 348 ] edit » document_helper_presenter_basket_payment->model()
343 } 344 } 345 346 public function __call($name, $arguments) 347 { 348 if (method_exists($this->model(), $name)) { 349 return call_user_func([$this->model(), $name], $arguments); 350 } 351 } 352 353 public function __toString() -
MODPATH/presenter/helpers/document_helper_presenter_basket.php [ 157 ] edit » document_helper_item->__call()
152 $this->applyDiscountCode(); 153 return $this; 154 } 155 */ 156 // Nactene polozky vratime jako pole do parametru do funkce pro automaticke nastaveni slev 157 $items_arr = Price::readDiscount($this->items()->as_associative_array(), $this->customer(), $this->payment()->pk()); 158 159 foreach ($this->items() as $key => $item) { 160 $item->set_discount(arr::get($items_arr, $key . '.discount', $item->discount())); 161 $item->set_discount_name(arr::get($items_arr, $key . '.discount_name', '')); 162 } -
MODPATH/presenter/helpers/document_helper_presenter_basket.php [ 49 ] edit » document_helper_presenter_basket->reloadItemDiscounts()
44 $this->model() 45 ->customers_condition() 46 ->with('presenter_good') 47 ->find_all() 48 ); 49 $this->reloadItemDiscounts(); 50 } 51 52 53 public function load_from_helper(\document_helper $document_helper) 54 { -
MODPATH/document/helpers/document_helper.php [ 174 ] edit » document_helper_presenter_basket->_load_items()
169 { 170 if (!is_null($this->_items)) { 171 return $this->_items; 172 } 173 $this->_items = new document_helper_item_iterator($this); 174 $this->_load_items(); 175 return $this->_items; 176 } 177 178 abstract protected function _load_items(); 179 -
MODPATH/presenter/libraries/PresenterBasket.php [ 71 ] edit » document_helper->items()
66 * Mnozstvi zbozi v kosiku 67 * @return float 68 */ 69 public function count() 70 { 71 return $this->documentHelper()->items()->total_count(); 72 } 73 74 /** 75 * @return document_helper_item_iterator|document_helper_presenter_basket_item[] 76 */ -
MODPATH/presenter/libraries/PresenterBasket.php [ 278 ] edit » PresenterBasket_Core->count()
273 public function data() 274 { 275 $handlingFeeItem = $this->documentHelper()->handlingFee(); 276 277 return [ 278 'count' => $this->count(), 279 'price' => $this->price()->without_vat(false)->asFloat(), 280 'priceVat' => $this->price()->with_vat(false)->asFloat(), 281 'finalPrice' => $this->price()->without_vat(true)->asFloat(), 282 'finalPriceVat' => $this->price()->with_vat(true)->asFloat(), 283 'currency' => $this->documentHelper()->exchangeModel()->shortcut, -
MODPATH/presenter/libraries/PresenterBasket.php [ 251 ] edit » PresenterBasket_Core->data()
246 public function joinInitScript(PresenterWeb $web = null) 247 { 248 if (! $web) { 249 $web = PresenterWeb::instance(); 250 } 251 $web->addInlineScript(' try { PresenterData.basket = ' . json_encode($this->data()) . '; } catch (error) { console.log("No exist PresenterData.basket ") } '); 252 return $this; 253 } 254 255 /** 256 * Data pro response pri uprave kosiku, aby se aktualizovali moduly, ktere jsou na nej navazane -
MODPATH/presenter/libraries/PresenterLayout.php [ 118 ] edit » PresenterBasket_Core->joinInitScript()
113 } 114 115 foreach ((array) $this->scripts() as $script) { 116 $this->web->js($script); 117 } 118 Presenter::basket()->joinInitScript($this->web); 119 120 // Na koncovem webu chceme vzdy zobrazit potvrzeni se souhlasem s pouzitim cookies 121 PresenterWeb::instance()->withCookieConsent(); 122 123 // Google analytics -
MODPATH/presenter/libraries/PresenterLayout.php [ 274 ] edit » PresenterLayout_Core->initStylesAndScripts()
269 270 public function __construct() 271 { 272 $this->web = new PresenterWeb(); 273 274 $this->initStylesAndScripts(); 275 276 $this->init(); 277 } 278 } -
{PHP internal call} » PresenterLayout_Core->__construct()
-
MODPATH/core/libraries/App.php [ 140 ] edit » ReflectionClass->newInstanceArgs()
135 $constructor = $reflectionClass->getConstructor(); 136 if (! $constructor) { 137 return $reflectionClass->newInstance(); 138 } 139 $params = $this->resolveParams($constructor, $args); 140 return $reflectionClass->newInstanceArgs($params); 141 } 142 143 /** 144 * Resolve reflection method arguments 145 */ -
MODPATH/core/libraries/App.php [ 45 ] edit » App->resolveInstance()
40 } 41 if (in_array($className, $this->singletonClasses())) { 42 return $this->makeSingleton($className); 43 } 44 45 return $this->resolveInstance($className, $args); 46 } 47 48 /** 49 * Invokes callback and resolve its arguments 50 * -
DOCROOT/macros/helpers.php [ 165 ] edit » App->make()
160 * @return ($className is null ? App : ($className is class-string ? TObject : object)) 161 */ 162 function app($className = null, array $args = []) 163 { 164 if ($className) { 165 return App::instance()->make($className, $args); 166 } 167 return App::instance(); 168 } 169 170 /** -
MODPATH/presenter/libraries/PresenterController.php [ 31 ] edit » app()
26 27 public function __construct() 28 { 29 parent::__construct(); 30 31 $this->_layout = app(PresenterLayout::class); 32 33 $this->_breadcrumbs = Presenter::module('Breadcrumbs'); 34 35 $can_access = $this->check_permissions(); 36 -
MODPATH/presenter/controllers/homepage.php [ 7 ] edit » PresenterController_Core->__construct()
2 3 class Homepage_Controller extends PresenterController 4 { 5 public function __construct() 6 { 7 parent::__construct(); 8 9 // Check system config 10 Presenter::checkAppSettings(); 11 } 12 -
{PHP internal call} » Homepage_Controller->__construct()
-
MODPATH/core/libraries/App.php [ 140 ] edit » ReflectionClass->newInstanceArgs()
135 $constructor = $reflectionClass->getConstructor(); 136 if (! $constructor) { 137 return $reflectionClass->newInstance(); 138 } 139 $params = $this->resolveParams($constructor, $args); 140 return $reflectionClass->newInstanceArgs($params); 141 } 142 143 /** 144 * Resolve reflection method arguments 145 */ -
MODPATH/core/libraries/Router.php [ 372 ] edit » App->resolveInstance()
367 368 // Run system.pre_controller 369 //Event::run('system.pre_controller'); 370 371 // Create a new controller instance 372 $_controller = App::instance()->resolveInstance($class); 373 374 // Controller constructor has been executed 375 if ($uri === null) { 376 Event::run('system.post_controller_constructor'); 377 } -
SYSPATH/core/Kohana.php [ 244 ] edit » Router_Core::execute()
239 * @return object instance of controller 240 */ 241 public static function & instance() 242 { 243 if (self::$instance === NULL) { 244 Router::execute(); 245 } 246 247 return self::$instance; 248 } 249 -
SYSPATH/core/Event.php [ 209 ] edit » Kohana::instance()
204 self::$data =& $data; 205 $callbacks = self::get($name); 206 207 foreach ($callbacks as $callback) 208 { 209 call_user_func($callback, $data); 210 } 211 212 // Do this to prevent data from getting 'stuck' 213 $clear_data = ''; 214 self::$data =& $clear_data; -
SYSPATH/core/Bootstrap.php [ 62 ] edit » Event::run()
57 58 // End system_initialization 59 Benchmark::stop(SYSTEM_BENCHMARK.'_system_initialization'); 60 61 // Make the magic happen! 62 Event::run('system.execute'); 63 64 // Clean up and exit 65 Event::run('system.shutdown'); 66 67 // Na 32bitove verzi PHP to koliduje, protože to pracuje s 64bit verzi PHP -
DOCROOT/macros/bootstrap.php [ 82 ] edit » require(arguments)
0string(62) "/www/hosting/macros.cz/motmot/macros/system/core/Bootstrap.php"77 // Defaultni definice promennych 78 require_once(MACROSPATH . 'ini' . EXT); 79 80 bfr_clean(); 81 82 require SYSPATH . 'core/Bootstrap' . EXT; -
DOCROOT/index.php [ 22 ] edit » require(arguments)
0string(50) "/www/hosting/macros.cz/motmot/macros/bootstrap.php"17 //header('location: https://macros.motmot.cz'.$url); 18 19 define('INDEXPATH', __FILE__); 20 21 // Ostry server 22 require 'macros/bootstrap.php';