From: Thomas Mudrunka Date: Tue, 13 Dec 2011 14:56:29 +0000 (+0100) Subject: Pruvodce na nastavovani prirazky X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=8ea27618c55c56d753d76229ce3d04ec74fca791;p=mirrors%2FSokoMan.git Pruvodce na nastavovani prirazky --- diff --git a/assistants/set-margin.inc.php b/assistants/set-margin.inc.php new file mode 100644 index 0000000..90f8e19 --- /dev/null +++ b/assistants/set-margin.inc.php @@ -0,0 +1,14 @@ +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; +} diff --git a/locale/cs/messages.inc.php b/locale/cs/messages.inc.php index 00710ce..e5d5382 100644 --- a/locale/cs/messages.inc.php +++ b/locale/cs/messages.inc.php @@ -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',