@@ -14,7 +14,7 @@ |
||
| 14 | 14 | { |
| 15 | 15 | require_once 'Intraface/modules/accounting/Year.php'; |
| 16 | 16 | $year = new Year($this->kernel); |
| 17 | - $year->save(array('from_date' => date('Y') . '-01-01', 'to_date' => date('Y') . '-12-31', 'label' => 'test', 'locked' => 0, 'vat' => 1)); |
|
| 17 | + $year->save(array('from_date' => date('Y').'-01-01', 'to_date' => date('Y').'-12-31', 'label' => 'test', 'locked' => 0, 'vat' => 1)); |
|
| 18 | 18 | $year->createAccounts('standard'); |
| 19 | 19 | $year->setYear(); |
| 20 | 20 | } |
@@ -12,11 +12,11 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | public function createInvoice() |
| 14 | 14 | { |
| 15 | - require_once dirname (__FILE__) . '/Contact.php'; |
|
| 15 | + require_once dirname(__FILE__).'/Contact.php'; |
|
| 16 | 16 | $contact = new Install_Helper_Contact($this->kernel, $this->db); |
| 17 | 17 | $contact_id = $contact->create(); |
| 18 | 18 | |
| 19 | - require_once dirname(__FILE__) . '/Product.php'; |
|
| 19 | + require_once dirname(__FILE__).'/Product.php'; |
|
| 20 | 20 | $product = new Install_Helper_Product($this->kernel, $this->db); |
| 21 | 21 | $product_id = $product->create(); |
| 22 | 22 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | 'contact_id' => $contact_id, |
| 27 | 27 | 'description' => 'Test invoice', |
| 28 | 28 | 'this_date' => date('d-m-Y'), |
| 29 | - 'due_date' => date('d-m-Y', time()+14*60*60*24))); |
|
| 29 | + 'due_date' => date('d-m-Y', time() + 14*60*60*24))); |
|
| 30 | 30 | |
| 31 | 31 | $debtor->loadItem(); |
| 32 | 32 | $debtor->item->save(array('product_id' => $product_id, 'quantity' => 3, 'description' => 'Test description on product')); |
@@ -34,11 +34,11 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | public function createOrder() |
| 36 | 36 | { |
| 37 | - require_once dirname(__FILE__) . '/Contact.php'; |
|
| 37 | + require_once dirname(__FILE__).'/Contact.php'; |
|
| 38 | 38 | $contact = new Install_Helper_Contact($this->kernel, $this->db); |
| 39 | 39 | $contact_id = $contact->create(); |
| 40 | 40 | |
| 41 | - require_once dirname(__FILE__) . '/Product.php'; |
|
| 41 | + require_once dirname(__FILE__).'/Product.php'; |
|
| 42 | 42 | $product = new Install_Helper_Product($this->kernel, $this->db); |
| 43 | 43 | $product_id = $product->create(); |
| 44 | 44 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | 'contact_id' => $contact_id, |
| 49 | 49 | 'description' => 'Test invoice', |
| 50 | 50 | 'this_date' => date('d-m-Y'), |
| 51 | - 'due_date' => date('d-m-Y', time()+14*60*60*24))); |
|
| 51 | + 'due_date' => date('d-m-Y', time() + 14*60*60*24))); |
|
| 52 | 52 | |
| 53 | 53 | $debtor->loadItem(); |
| 54 | 54 | $debtor->item->save(array('product_id' => $product_id, 'quantity' => 3, 'description' => 'Test description on product')); |
@@ -56,11 +56,11 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | public function createOrderFromShop() |
| 58 | 58 | { |
| 59 | - require_once dirname(__FILE__) . '/Contact.php'; |
|
| 59 | + require_once dirname(__FILE__).'/Contact.php'; |
|
| 60 | 60 | $contact = new Install_Helper_Contact($this->kernel, $this->db); |
| 61 | 61 | $contact_id = $contact->create(); |
| 62 | 62 | |
| 63 | - require_once dirname(__FILE__) . '/Product.php'; |
|
| 63 | + require_once dirname(__FILE__).'/Product.php'; |
|
| 64 | 64 | $product = new Install_Helper_Product($this->kernel, $this->db); |
| 65 | 65 | $product_id = $product->create(); |
| 66 | 66 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | 'contact_id' => $contact_id, |
| 71 | 71 | 'description' => 'From shop', |
| 72 | 72 | 'this_date' => date('d-m-Y'), |
| 73 | - 'due_date' => date('d-m-Y', time()+14*60*60*24)), 'webshop', 1); |
|
| 73 | + 'due_date' => date('d-m-Y', time() + 14*60*60*24)), 'webshop', 1); |
|
| 74 | 74 | |
| 75 | 75 | $debtor->loadItem(); |
| 76 | 76 | $debtor->item->save(array('product_id' => $product_id, 'quantity' => 3, 'description' => 'Test description on product')); |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | public function loadPackages() |
| 20 | 20 | { |
| 21 | 21 | |
| 22 | - $sql_structure = file_get_contents(dirname(__FILE__) . '/../database-module_package-values.sql'); |
|
| 22 | + $sql_structure = file_get_contents(dirname(__FILE__).'/../database-module_package-values.sql'); |
|
| 23 | 23 | $sql_arr = Intraface_Install::splitSql($sql_structure); |
| 24 | 24 | |
| 25 | 25 | foreach ($sql_arr as $sql) { |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | $variation->load(); |
| 97 | 97 | $detail = $variation->getDetail(); |
| 98 | 98 | $detail->price_difference = 0; /* Can be reimplemented: ($a1 * $a2); */ |
| 99 | - $detail->weight_difference = -1*($a1 * $a2); |
|
| 99 | + $detail->weight_difference = -1*($a1*$a2); |
|
| 100 | 100 | $detail->save(); |
| 101 | 101 | |
| 102 | 102 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | public function create() |
| 14 | 14 | { |
| 15 | - require_once dirname(__FILE__) . '/Contact.php'; |
|
| 15 | + require_once dirname(__FILE__).'/Contact.php'; |
|
| 16 | 16 | $contact = new Install_Helper_Contact($this->kernel, $this->db); |
| 17 | 17 | $contact_id = $contact->create(); |
| 18 | 18 | |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | |
| 15 | 15 | function renderHtml() |
| 16 | 16 | { |
| 17 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/product'); |
|
| 17 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/product'); |
|
| 18 | 18 | return $smarty->render($this); |
| 19 | 19 | } |
| 20 | 20 | |
@@ -13,9 +13,9 @@ |
||
| 13 | 13 | |
| 14 | 14 | function renderHtml() |
| 15 | 15 | { |
| 16 | - $this->document->setTitle('Set stock for variations for product ' . $this->getProduct()->get('name')); |
|
| 16 | + $this->document->setTitle('Set stock for variations for product '.$this->getProduct()->get('name')); |
|
| 17 | 17 | |
| 18 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/variations'); |
|
| 18 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/variations'); |
|
| 19 | 19 | return $smarty->render($this, array('variations' => $this->getProduct()->getVariations(), 'product' => $this->context->getProduct())); |
| 20 | 20 | } |
| 21 | 21 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | 'procurements' => $procurements |
| 68 | 68 | ); |
| 69 | 69 | |
| 70 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/index'); |
|
| 70 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/index'); |
|
| 71 | 71 | return $smarty->render($this, $data); |
| 72 | 72 | } |
| 73 | 73 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | 'gateway' => $this->getProcurementGateway() |
| 83 | 83 | ); |
| 84 | 84 | |
| 85 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/procurement-edit'); |
|
| 85 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/procurement-edit'); |
|
| 86 | 86 | return $smarty->render($this, $data); |
| 87 | 87 | } |
| 88 | 88 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | if (isset($_GET['change_product'])) { |
| 68 | 68 | $redirect = Intraface_Redirect::factory($this->getKernel(), 'go'); |
| 69 | - $url = $redirect->setDestination(NET_SCHEME . NET_HOST . $this->url('selectproduct'), NET_SCHEME . NET_HOST . $this->url()); |
|
| 69 | + $url = $redirect->setDestination(NET_SCHEME.NET_HOST.$this->url('selectproduct'), NET_SCHEME.NET_HOST.$this->url()); |
|
| 70 | 70 | $redirect->askParameter('product_id'); |
| 71 | 71 | return new k_SeeOther($url); |
| 72 | 72 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | $data = array('procurement' => $procurement, 'values' => $values); |
| 83 | 83 | |
| 84 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/item-edit'); |
|
| 84 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/item-edit'); |
|
| 85 | 85 | return $tpl->render($this, $data); |
| 86 | 86 | |
| 87 | 87 | } |