Skip to content

Commit

Permalink
Better translation
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 16, 2015
1 parent 1d0a8ce commit 9e39c73
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
5 changes: 4 additions & 1 deletion htdocs/langs/en_US/margins.lang
Expand Up @@ -30,10 +30,13 @@ UseDiscountAsProduct=As a product
UseDiscountAsService=As a service
UseDiscountOnTotal=On subtotal
MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Defines if a global discount is treated as a product, a service, or only on subtotal for margin calculation.
MARGIN_TYPE=Margin type
MARGIN_TYPE=Buying/Cost price suggested by default for margin calculation
MargeBrute=Raw margin
MargeNette=Net margin
MargeType1=Margin on Best supplier price
MargeType2=Margin on Weighted Average Price (WAP)
MARGIN_TYPE_DETAILS=Raw margin : Selling price - Buying price<br/>Net margin : Selling price - Cost price
MarginTypeDesc=Margin on best buying price : Selling price - Best supplier price defined on product card<br/>Margin on Weighted Average Price (WAP) : Selling price - Product Weighted Average Price
CostPrice=Cost price
BuyingCost=Cost price
UnitCharges=Unit charges
Expand Down
15 changes: 9 additions & 6 deletions htdocs/margin/admin/margin.php
Expand Up @@ -31,6 +31,7 @@
$langs->load("admin");
$langs->load("bills");
$langs->load("margins");
$langs->load("stocks");

if (! $user->admin) accessforbidden();

Expand Down Expand Up @@ -137,11 +138,13 @@
print "<input type=\"hidden\" name=\"action\" value=\"typemarges\">";
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("MARGIN_TYPE").'</td>';
print '<td align="right">'.$langs->trans('MargeBrute');
print '<td>';
print ' <input type="radio" name="MARGIN_TYPE" value="1" ';
if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == '1')
print 'checked ';
print '/><br>';
print '/> ';
print $langs->trans('MargeType1');
print '<br>';
/*print $langs->trans('MargeNette');
print ' <input type="radio" name="MARGIN_TYPE" value="2" ';
if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == '2')
Expand All @@ -150,18 +153,18 @@
// TODO Check that PMP is available when stock module is not enabled. If not, make this choice greyed when stock module disabled.
//if (! empty($conf->stock->enabled))
//{
print $langs->trans('MargeNette');
print ' <input type="radio" name="MARGIN_TYPE" value="pmp" ';
if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp')
print 'checked ';
print '/>';
print '/> ';
print $langs->trans('MargeType2');
//}
print '</td>';
print '<td>';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" class="button">';
print '</td>';
print '<td>'.$langs->trans('MARGIN_TYPE_DETAILS');
print ' ('.$langs->trans("PMP").')';
print '<td>'.$langs->trans('MarginTypeDesc');
print ' ('.$langs->trans("PMPValueShort").')';
print '</td>';
print '</tr>';
print '</form>';
Expand Down

0 comments on commit 9e39c73

Please sign in to comment.