From 8ea27618c55c56d753d76229ce3d04ec74fca791 Mon Sep 17 00:00:00 2001 From: Thomas Mudrunka Date: Tue, 13 Dec 2011 15:56:29 +0100 Subject: [PATCH] Pruvodce na nastavovani prirazky --- assistants/set-margin.inc.php | 14 ++++++++++++++ locale/cs/messages.inc.php | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 assistants/set-margin.inc.php 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', -- 2.30.2