Pruvodce na nastavovani prirazky
authorThomas Mudrunka <tomas@mudrunka.cz>
Tue, 13 Dec 2011 14:56:29 +0000 (15:56 +0100)
committerThomas Mudrunka <tomas@mudrunka.cz>
Tue, 13 Dec 2011 14:56:29 +0000 (15:56 +0100)
assistants/set-margin.inc.php [new file with mode: 0644]
locale/cs/messages.inc.php

diff --git a/assistants/set-margin.inc.php b/assistants/set-margin.inc.php
new file mode 100644 (file)
index 0000000..90f8e19
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+switch($SUBPATH[0]) {
+       default: case 1:
+               echo $this->html->form("$URL/2", 'GET', array(
+                       array('margin','40','text',false,'autofocus','margin (%):'),
+                       array(false,'SET-MARGIN','submit')
+               ));
+               break;
+       case 2:
+               $margin = 1+($_GET['margin']/100);
+               $this->db->safe_query("UPDATE model SET model_price_out = CEIL(model_price_in * $margin)");
+               echo(T('Margin set to').' '.($margin*100-100).'%');
+               break;
+}
index 00710ceac6487cf3f4e741b18378cf97fa0beeb4..e5d53821a37bfe80d9fefbe7b8a8d7cfd72b9423 100644 (file)
@@ -81,6 +81,7 @@ $LOCALE_MESSAGES = array(
                'dispose' => 'vyskladnit',
                'sell' => 'prodat',
                'stats' => 'statistiky',
+               'set-margin' => 'nastavit přirážku',
                'store' => 'naskladnit',
                'store-single' => 'naskladnit 1ks',
                'category-tree' => 'strom kategorií',
@@ -94,11 +95,14 @@ $LOCALE_MESSAGES = array(
                'DISPOSE' => 'VYSKLADNIT',
                'SELL' => 'PRODAT',
                'STORE' => 'NASKLADNIT',
+               'SET-MARGIN' => 'PŘIRAZIT',
                'filter' => 'filtr',
                //'go' => 'jdi',
                'sure?' => 'opravdu?',
                'Logout' => 'Odhlásit',
                'Home' => 'Domů',
+               'margin' => 'přirážka',
+               'margin set to' => 'přirážka nastavena na',
 
                'edit' => 'Upravit',
                'history' => 'Historie',
This page took 0.140133 seconds and 4 git commands to generate.