Skip to content

Commit

Permalink
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
eldy committed Jun 4, 2016
2 parents 1472124 + 7bc9d98 commit bbe5e39
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
10 changes: 10 additions & 0 deletions htdocs/adherents/card.php
Expand Up @@ -265,6 +265,11 @@
$langs->load("errors");
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Firstname")), null, 'errors');
}
if ($morphy == 'mor' && empty($societe)) {
$error++;
$langs->load("errors");
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Company")), null, 'errors');
}
// Test si le login existe deja
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
{
Expand Down Expand Up @@ -514,6 +519,11 @@
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Password")), null, 'errors');
}
}
if ($morphy == 'mor' && empty($societe)) {
$error++;
$langs->load("errors");
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Company")), null, 'errors');
}
if ($morphy != 'mor' && empty($lastname)) {
$error++;
$langs->load("errors");
Expand Down
4 changes: 2 additions & 2 deletions htdocs/langs/en_US/bills.lang
Expand Up @@ -356,8 +356,8 @@ PaymentTypeCB=Credit card
PaymentTypeShortCB=Credit card
PaymentTypeCHQ=Check
PaymentTypeShortCHQ=Check
PaymentTypeTIP=Interbank Payment
PaymentTypeShortTIP=Interbank Payment
PaymentTypeTIP=TIP (Documents against Payment)
PaymentTypeShortTIP=TIP Payment
PaymentTypeVAD=On line payment
PaymentTypeShortVAD=On line payment
PaymentTypeTRA=Bank draft
Expand Down
1 change: 0 additions & 1 deletion htdocs/langs/en_US/main.lang
Expand Up @@ -176,7 +176,6 @@ Upload=Send file
ToLink=Link
Select=Select
Choose=Choose
ChooseLangage=Please choose your language
Resize=Resize
Recenter=Recenter
Author=Author
Expand Down
5 changes: 3 additions & 2 deletions htdocs/product/card.php
Expand Up @@ -1121,7 +1121,7 @@
else if ($object->id > 0)
{
// Fiche en mode edition
if ($action == 'edit' && ($user->rights->produit->creer || $user->rights->service->creer))
if ($action == 'edit' && ((($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer))))
{
//WYSIWYG Editor
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
Expand Down Expand Up @@ -1733,7 +1733,8 @@
{
if ($action == '' || $action == 'view')
{
if ($user->rights->produit->creer || $user->rights->service->creer)
if (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer ) ||
($object->type == Product::TYPE_SERVICE && $user->rights->service->creer))
{
if (! isset($object->no_button_edit) || $object->no_button_edit <> 1) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&amp;id='.$object->id.'">'.$langs->trans("Modify").'</a></div>';

Expand Down
7 changes: 4 additions & 3 deletions htdocs/product/stock/replenish.php
Expand Up @@ -241,7 +241,7 @@

$title = $langs->trans('Status');

$sql = 'SELECT p.rowid, p.ref, p.label, p.price,';
$sql = 'SELECT p.rowid, p.ref, p.label,p.description, p.price,';
$sql.= ' p.price_ttc, p.price_base_type,p.fk_product_type,';
$sql.= ' p.tms as datem, p.duration, p.tobuy,';
$sql.= ' p.desiredstock, p.seuil_stock_alerte as alertstock,';
Expand Down Expand Up @@ -490,7 +490,7 @@
// Multilangs
if (! empty($conf->global->MAIN_MULTILANGS))
{
$sql = 'SELECT label';
$sql = 'SELECT label,description';
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'product_lang';
$sql .= ' WHERE fk_product = ' . $objp->rowid;
$sql .= ' AND lang = "' . $langs->getDefaultLang() . '"';
Expand All @@ -500,6 +500,7 @@
if ($resqlm)
{
$objtp = $db->fetch_object($resqlm);
if (!empty($objtp->description)) $objp->description = $objtp->description;
if (!empty($objtp->label)) $objp->label = $objtp->label;
}
}
Expand Down Expand Up @@ -557,7 +558,7 @@

print '<td class="nowrap">'.$prod->getNomUrl(1, '').'</td>';

print '<td>' . $objp->label . '<input type="hidden" name="desc' . $i . '" value="' . $objp->label . '" ></td>';
print '<td>' . $objp->label . '<input type="hidden" name="desc' . $i . '" value="' . $objp->description . '" ></td>';

if (!empty($conf->service->enabled) && $type == 1)
{
Expand Down

0 comments on commit bbe5e39

Please sign in to comment.