';
- print '';
+ print '| ';
print $langs->trans('ReceptionMethod');
print ' | ';
@@ -1584,7 +1596,7 @@ if ($action == 'create') {
// Product/Service
print ''.$langs->trans("Products").' | ';
// Comment
- print ''.$langs->trans("Description").' | ';
+ print ''.$langs->trans("Comment").' | ';
// Qty
print ''.$langs->trans("QtyOrdered").' | ';
if ($origin && $origin_id > 0) {
@@ -1747,9 +1759,9 @@ if ($action == 'create') {
}
if ($action == 'editline' && $lines[$i]->id == $line_id) {
- print ' '.$lines[$i]->comment.' | ';
+ print ' | ';
} else {
- print ''.$lines[$i]->comment.' | ';
+ print ''.dol_escape_htmltag($lines[$i]->comment).' | ';
}
@@ -1778,7 +1790,7 @@ if ($action == 'create') {
$htmltext = $langs->trans("DateValidation").' : '.(empty($receptionline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($receptionline_var['date_valid'], 'dayhour'));
if (!empty($conf->stock->enabled) && $receptionline_var['warehouse'] > 0) {
$warehousestatic->fetch($receptionline_var['warehouse']);
- $htmltext .= ' '.$langs->trans("From").' : '.$warehousestatic->getNomUrl(1);
+ $htmltext .= ' '.$langs->trans("From").' : '.$warehousestatic->getNomUrl(1, '', 0, 1);
}
print ' '.$form->textwithpicto('', $htmltext, 1);
}
diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php
index 946990f0c7b..33034f290d1 100644
--- a/htdocs/reception/class/reception.class.php
+++ b/htdocs/reception/class/reception.class.php
@@ -1043,13 +1043,15 @@ class Reception extends CommonObject
$line = new CommandeFournisseurDispatch($this->db);
$line->fetch($obj->rowid);
$line->fetch_product();
- $sql_commfourndet = 'SELECT qty, ref, label, tva_tx, vat_src_code, subprice, multicurrency_subprice, remise_percent FROM llx_commande_fournisseurdet WHERE rowid='.$line->fk_commandefourndet;
+ $sql_commfourndet = 'SELECT qty, ref, label, description, tva_tx, vat_src_code, subprice, multicurrency_subprice, remise_percent';
+ $sql_commfourndet .= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet';
+ $sql_commfourndet .= ' WHERE rowid = '.((int) $line->fk_commandefourndet);
$resql_commfourndet = $this->db->query($sql_commfourndet);
if (!empty($resql_commfourndet)) {
$obj = $this->db->fetch_object($resql_commfourndet);
$line->qty_asked = $obj->qty;
- $line->description = $line->comment;
- $line->desc = $line->comment;
+ $line->description = $obj->description;
+ $line->desc = $obj->description;
$line->tva_tx = $obj->tva_tx;
$line->vat_src_code = $obj->vat_src_code;
$line->subprice = $obj->subprice;
@@ -1060,6 +1062,7 @@ class Reception extends CommonObject
} else {
$line->qty_asked = 0;
$line->description = '';
+ $line->desc = '';
$line->label = $obj->label;
}
diff --git a/htdocs/reception/contact.php b/htdocs/reception/contact.php
index c99b44074eb..609cb0d12b7 100644
--- a/htdocs/reception/contact.php
+++ b/htdocs/reception/contact.php
@@ -35,9 +35,7 @@ if (!empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
}
-$langs->load("orders");
-$langs->load("receptions");
-$langs->load("companies");
+$langs->loadLangs(array("orders", "receptions", "companies"));
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
@@ -62,7 +60,6 @@ if ($id > 0 || !empty($ref)) {
}
}
-
// Security check
if ($user->socid > 0) {
$socid = $user->socid;
@@ -70,11 +67,8 @@ if ($user->socid > 0) {
if ($origin == 'reception') {
$result = restrictedArea($user, $origin, $object->id);
} else {
- $result = restrictedArea($user, 'reception');
- if ($origin == 'supplierorder') {
- if (empty($user->rights->fournisseur->commande->lire) && empty($user->rights->fournisseur->commande->read)) {
- accessforbidden();
- }
+ if ($origin == 'supplierorder' || $origin == 'order_supplier') {
+ $result = restrictedArea($user, 'fournisseur', $origin_id, 'commande_fournisseur', 'commande');
} elseif (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) {
accessforbidden();
}
@@ -119,13 +113,6 @@ if ($action == 'addcontact' && $user->rights->reception->creer) {
dol_print_error($db);
}
}
-/*
-elseif ($action == 'setaddress' && $user->rights->reception->creer)
-{
- $object->fetch($id);
- $result=$object->setDeliveryAddress($_POST['fk_address']);
- if ($result < 0) dol_print_error($db,$object->error);
-}*/
/*
@@ -141,11 +128,7 @@ $contactstatic = new Contact($db);
$userstatic = new User($db);
-/* *************************************************************************** */
-/* */
-/* Mode vue et edition */
-/* */
-/* *************************************************************************** */
+// View mode
if ($id > 0 || !empty($ref)) {
$langs->trans("OrderCard");
@@ -199,7 +182,6 @@ if ($id > 0 || !empty($ref)) {
}
$morehtmlref .= '';
- $object->picto = 'sending';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
diff --git a/htdocs/reception/note.php b/htdocs/reception/note.php
index a3a2b31589c..f343e56e14d 100644
--- a/htdocs/reception/note.php
+++ b/htdocs/reception/note.php
@@ -70,13 +70,14 @@ if ($user->socid > 0) {
if ($origin == 'reception') {
$result = restrictedArea($user, $origin, $object->id);
} else {
- $result = restrictedArea($user, 'reception');
- if ($origin == 'supplierorder') {
- if (empty($user->rights->fournisseur->commande->lire) && empty($user->rights->fournisseur->commande->read)) {
+ if ($origin == 'reception') {
+ $result = restrictedArea($user, $origin, $object->id);
+ } else {
+ if ($origin == 'supplierorder' || $origin == 'order_supplier') {
+ $result = restrictedArea($user, 'fournisseur', $origin_id, 'commande_fournisseur', 'commande');
+ } elseif (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) {
accessforbidden();
}
- } elseif (empty($user->rights->{$origin}->lire) && empty($user->rights->{$origin}->read)) {
- accessforbidden();
}
}
@@ -147,7 +148,6 @@ if ($id > 0 || !empty($ref)) {
}
$morehtmlref .= '';
- $object->picto = 'sending';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
|