This commit is contained in:
Laurent Destailleur 2022-01-19 16:54:00 +01:00
commit 4f533c3f9d
9 changed files with 238 additions and 29 deletions

View File

@ -210,6 +210,13 @@ class modCommande extends DolibarrModules
$this->export_fields_array[$r]['c.multicurrency_total_tva'] = 'MulticurrencyAmountVAT';
$this->export_fields_array[$r]['c.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC';
}
// Add multicompany field
if (!empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED)) {
$nbofallowedentities = count(explode(',', getEntity('commande')));
if (!empty($conf->multicompany->enabled) && $nbofallowedentities > 1) {
$this->export_fields_array[$r]['c.entity'] = 'Entity';
}
}
//$this->export_TypeFields_array[$r]=array(
// 's.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','co.label'=>'List:c_country:label:label',
// 'co.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",
@ -224,7 +231,8 @@ class modCommande extends DolibarrModules
'c.date_commande'=>"Date", 'c.date_livraison'=>"Date", 'c.amount_ht'=>"Numeric", 'c.remise_percent'=>"Numeric", 'c.total_ht'=>"Numeric",
'c.total_ttc'=>"Numeric", 'c.facture'=>"Boolean", 'c.fk_statut'=>'Status', 'c.note_public'=>"Text", 'c.date_livraison'=>'Date', 'pj.ref'=>'Text',
'cd.description'=>"Text", 'cd.product_type'=>'Boolean', 'cd.tva_tx'=>"Numeric", 'cd.qty'=>"Numeric", 'cd.total_ht'=>"Numeric", 'cd.total_tva'=>"Numeric",
'cd.total_ttc'=>"Numeric", 'p.rowid'=>'List:product:ref::product', 'p.ref'=>'Text', 'p.label'=>'Text', 'd.nom'=>'Text'
'cd.total_ttc'=>"Numeric", 'p.rowid'=>'List:product:ref::product', 'p.ref'=>'Text', 'p.label'=>'Text', 'd.nom'=>'Text',
'c.entity'=>'List:entity:label:rowid',
);
$this->export_entities_array[$r] = array(
's.rowid'=>"company", 's.nom'=>'company', 'ps.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'd.nom'=>'company', 'co.label'=>'company',

View File

@ -270,6 +270,13 @@ class modFacture extends DolibarrModules
$this->export_fields_array[$r]['f.module_source'] = 'Module';
$this->export_fields_array[$r]['f.pos_source'] = 'POSTerminal';
}
// Add multicompany field
if (!empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED)) {
$nbofallowedentities = count(explode(',', getEntity('invoice')));
if (!empty($conf->multicompany->enabled) && $nbofallowedentities > 1) {
$this->export_fields_array[$r]['f.entity'] = 'Entity';
}
}
$this->export_TypeFields_array[$r] = array(
's.rowid'=>'Numeric', 's.nom'=>'Text', 'ps.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 'cd.nom'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text',
's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text',
@ -280,7 +287,8 @@ class modFacture extends DolibarrModules
'pj.ref'=>'Text', 'pj.title'=>'Text', 'fd.rowid'=>'Numeric', 'fd.label'=>'Text', 'fd.description'=>"Text", 'fd.subprice'=>"Numeric", 'fd.tva_tx'=>"Numeric",
'fd.qty'=>"Numeric", 'fd.total_ht'=>"Numeric", 'fd.total_tva'=>"Numeric", 'fd.total_ttc'=>"Numeric", 'fd.date_start'=>"Date", 'fd.date_end'=>"Date",
'fd.special_code'=>'Numeric', 'fd.product_type'=>"Numeric", 'fd.fk_product'=>'List:product:label', 'p.ref'=>'Text', 'p.label'=>'Text',
$alias_product_perentity . '.accountancy_code_sell'=>'Text'
$alias_product_perentity . '.accountancy_code_sell'=>'Text',
'f.entity'=>'List:entity:label:rowid',
);
if (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->INVOICE_SHOW_POS)) {
$this->export_TypeFields_array[$r]['f.module_source'] = 'Text';

View File

@ -204,6 +204,13 @@ class modPropale extends DolibarrModules
$this->export_fields_array[$r]['c.multicurrency_total_tva'] = 'MulticurrencyAmountVAT';
$this->export_fields_array[$r]['c.multicurrency_total_ttc'] = 'MulticurrencyAmountTTC';
}
// Add multicompany field
if (!empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED)) {
$nbofallowedentities = count(explode(',', getEntity('propal')));
if (!empty($conf->multicompany->enabled) && $nbofallowedentities > 1) {
$this->export_fields_array[$r]['c.entity'] = 'Entity';
}
}
//$this->export_TypeFields_array[$r]=array(
// 's.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','co.code'=>'Text','s.phone'=>'Text',
// 's.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",
@ -216,7 +223,8 @@ class modPropale extends DolibarrModules
's.ape'=>'Text', 's.idprof4'=>'Text', 'c.ref'=>"Text", 'c.ref_client'=>"Text", 'c.datec'=>"Date", 'c.datep'=>"Date", 'c.fin_validite'=>"Date",
'c.remise_percent'=>"Numeric", 'c.total_ht'=>"Numeric", 'c.total_ttc'=>"Numeric", 'c.fk_statut'=>'Status', 'c.note_public'=>"Text", 'c.date_livraison'=>'Date',
'pj.ref'=>'Text', 'cd.description'=>"Text", 'cd.product_type'=>'Boolean', 'cd.tva_tx'=>"Numeric", 'cd.qty'=>"Numeric", 'cd.total_ht'=>"Numeric",
'cd.total_tva'=>"Numeric", 'cd.total_ttc'=>"Numeric", 'p.ref'=>'Text', 'p.label'=>'Text'
'cd.total_tva'=>"Numeric", 'cd.total_ttc'=>"Numeric", 'p.ref'=>'Text', 'p.label'=>'Text',
'c.entity'=>'List:entity:label:rowid',
);
$this->export_entities_array[$r] = array(
's.rowid'=>"company", 's.nom'=>'company', 'ps.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'co.code'=>'company', 's.phone'=>'company',

View File

@ -327,7 +327,7 @@ class modSociete extends DolibarrModules
'payterm.libelle'=>'Text', 'paymode.libelle'=>'Text',
's.outstanding_limit'=>'Numeric', 'pbacc.ref'=>'Text', 'incoterm.code'=>'Text',
'u.login'=>'Text', 'u.firstname'=>'Text', 'u.lastname'=>'Text',
's.entity'=>'Numeric', 's.price_level'=>'Numeric',
's.entity'=>'List:entity:label:rowid', 's.price_level'=>'Numeric',
's.accountancy_code_sell'=>'Text', 's.accountancy_code_buy'=>'Text'
);
@ -376,6 +376,20 @@ class modSociete extends DolibarrModules
's.address'=>'Address', 's.zip'=>"Zip", 's.town'=>"Town", 's.phone'=>'Phone', 's.email'=>"Email",
't.libelle'=>"ThirdPartyType"
);
// Add multicompany field
if (! empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED)) {
if (!empty($conf->multicompany->enabled)) {
$nbofallowedentities = count(explode(',', getEntity('socpeople')));
if ($nbofallowedentities > 1) {
$this->export_fields_array[$r]['c.entity'] = 'Entity';
}
$nbofallowedentities = count(explode(',', getEntity('societe')));
if ($nbofallowedentities > 1) {
$this->export_fields_array[$r]['s.entity'] = 'Entity';
}
}
}
$this->export_examplevalues_array[$r] = array('s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)', 's.fournisseur'=>'0 (not a supplier) or 1 (supplier)');
$this->export_TypeFields_array[$r] = array(
'c.civility'=>"List:c_civility:label:code", 'c.lastname'=>'Text', 'c.firstname'=>'Text', 'c.poste'=>'Text', 'c.datec'=>"Date", 'c.priv'=>"Boolean",
@ -386,14 +400,17 @@ class modSociete extends DolibarrModules
's.code_compta'=>"Text", 's.code_compta_fournisseur'=>"Text",
's.client'=>"Text", 's.fournisseur'=>"Text",
's.address'=>"Text", 's.zip'=>"Text", 's.town'=>"Text", 's.phone'=>"Text", 's.email'=>"Text",
't.libelle'=>"Text"
't.libelle'=>"Text",
'c.entity'=>'List:entity:label:rowid',
's.entity'=>'List:entity:label:rowid',
);
$this->export_entities_array[$r] = array(
's.rowid'=>"company", 's.nom'=>"company", 's.status'=>'company', 's.code_client'=>"company", 's.code_fournisseur'=>"company",
's.code_compta'=>"company", 's.code_compta_fournisseur'=>"company",
's.client'=>"company", 's.fournisseur'=>"company",
's.address'=>"company", 's.zip'=>"company", 's.town'=>"company", 's.phone'=>"company", 's.email'=>"company",
't.libelle'=>"company"
't.libelle'=>"company",
's.entity'=>'company',
); // We define here only fields that use another picto
if (empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) {
unset($this->export_fields_array[$r]['s.code_fournisseur']);

View File

@ -0,0 +1,97 @@
<?php
namespace OAuth\OAuth2\Service;
use OAuth\Common\Consumer\CredentialsInterface;
use OAuth\Common\Http\Client\ClientInterface;
use OAuth\Common\Http\Uri\UriInterface;
use OAuth\Common\Storage\TokenStorageInterface;
use OAuth\OAuth2\Token\StdOAuth2Token;
use OAuth\Common\Http\Exception\TokenResponseException;
use OAuth\OAuth2\Service\Exception\InvalidAccessTypeException;
use OAuth\Common\Http\Uri\Uri;
class WordPress extends AbstractService
{
protected $accessType = 'online';
public function __construct(
CredentialsInterface $credentials,
ClientInterface $httpClient,
TokenStorageInterface $storage,
$scopes = array(),
UriInterface $baseApiUri = null
) {
parent::__construct($credentials, $httpClient, $storage, $scopes, $baseApiUri, true);
if (null === $baseApiUri) {
$this->baseApiUri = new Uri('https://addresse_de_votre_site_wordpress');
}
}
/*
// LDR CHANGE Add approval_prompt to force the prompt if value is set to 'force' so it force return of a "refresh token" in addition to "standard token"
public $approvalPrompt='auto';
public function setApprouvalPrompt($prompt)
{
if (!in_array($prompt, array('auto', 'force'), true)) {
// @todo Maybe could we rename this exception
throw new InvalidAccessTypeException('Invalid approuvalPrompt, expected either auto or force.');
}
$this->approvalPrompt = $prompt;
}*/
/**
* {@inheritdoc}
*/
public function getAuthorizationEndpoint()
{
return new Uri(sprintf('%s/oauth/authorize', $this->baseApiUri));
}
/**
* {@inheritdoc}
*/
public function getAccessTokenEndpoint()
{
return new Uri(sprintf('%s/oauth/token', $this->baseApiUri));
}
/**
* {@inheritdoc}
*/
protected function getAuthorizationMethod()
{
global $conf;
return empty($conf->global->OAUTH_WORDPRESS_AUTHORIZATION_METHOD_QUERY_STRING) ? static::AUTHORIZATION_METHOD_HEADER_BEARER : static::AUTHORIZATION_METHOD_QUERY_STRING;
}
/**
* {@inheritdoc}
*/
protected function parseAccessTokenResponse($responseBody)
{
$data = json_decode($responseBody, true);
if (null === $data || !is_array($data)) {
throw new TokenResponseException('Unable to parse response: "'.(isset($responseBody)?$responseBody:'NULL').'"');
} elseif (isset($data['error'])) {
throw new TokenResponseException('Error in retrieving token: "' . $data['error'] . '" : "'.$data['error_description'].'"');
}
$token = new StdOAuth2Token();
$token->setAccessToken($data['access_token']);
$token->setLifetime($data['expires_in']);
if (isset($data['refresh_token'])) {
$token->setRefreshToken($data['refresh_token']);
unset($data['refresh_token']);
}
unset($data['access_token']);
unset($data['expires_in']);
$token->setExtraParams($data);
return $token;
}
}

View File

@ -129,9 +129,9 @@ if ($id > 0 || !empty($ref)) {
//Calcul total qty and amount for global if full scan list
$total_qty_toconsume = 0;
$total_qty_toproduce = 0;
$product_cache=array();
$bom_data_result = array();
//Qauntity to produce
$sql = "SELECT b.rowid as rowid, b.ref, b.status, b.date_valid, b.fk_product,";
$sql .= " b.qty as qty_toproduce";
@ -166,8 +166,20 @@ if ($id > 0 || !empty($ref)) {
$objp = $db->fetch_object($result);
$bomtmp->id = $objp->rowid;
$bomtmp->ref = $objp->ref;
$product = new Product($db);
if (!empty($objp->fk_product)) {
if (!array_key_exists($product->id, $product_cache)) {
$resultFetch = $product->fetch($objp->fk_product);
if ($resultFetch < 0) {
setEventMessages($product->error, $product->errors, 'errors');
} else {
$product_cache[$product->id] = $product;
}
}
}
$bomtmp->fk_product = $objp->fk_product;
$bom_data_result[$objp->rowid]['link'] = $bomtmp->getNomUrl(1, 'production');
$bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache)? $product_cache[$objp->fk_product]->getNomUrl(1): '');
$bom_data_result[$objp->rowid]['qty_toproduce'] += ($objp->qty_toproduce > 0 ? $objp->qty_toproduce : 0);
$bom_data_result[$objp->rowid]['qty_toconsume'] = 0;
$bom_data_result[$objp->rowid]['date_valid'] = dol_print_date($db->jdate($objp->date_valid), 'dayhour');
@ -215,10 +227,22 @@ if ($id > 0 || !empty($ref)) {
$objp = $db->fetch_object($result);
$bomtmp->id = $objp->rowid;
$bomtmp->ref = $objp->ref;
$product = new Product($db);
if (!empty($objp->fk_product)) {
if (!array_key_exists($product->id, $product_cache)) {
$resultFetch = $product->fetch($objp->fk_product);
if ($resultFetch < 0) {
setEventMessages($product->error, $product->errors, 'errors');
} else {
$product_cache[$product->id] = $product;
}
}
}
$bomtmp->fk_product = $objp->fk_product;
if (!array_key_exists($objp->rowid, $bom_data_result)) {
$bom_data_result[$objp->rowid]['link'] = $bomtmp->getNomUrl(1, 'production');
$bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache)? $product_cache[$objp->fk_product]->getNomUrl(1): '');
$bom_data_result[$objp->rowid]['qty_toproduce'] = 0;
$bom_data_result[$objp->rowid]['qty_toconsume'] += ($objp->qty_toconsume > 0 ? $objp->qty_toconsume : 0);
$bom_data_result[$objp->rowid]['date_valid'] = dol_print_date($db->jdate($objp->date_valid), 'dayhour');
@ -234,7 +258,6 @@ if ($id > 0 || !empty($ref)) {
}
$db->free($result);
if ($limit > 0 && $limit != $conf->liste_limit) {
$option .= '&limit='.urlencode($limit);
}
@ -267,6 +290,7 @@ if ($id > 0 || !empty($ref)) {
print '<tr class="liste_titre">';
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "b.rowid", "", "&amp;id=".$product->id, '', $sortfield, $sortorder);
print_liste_field_titre("Product", $_SERVER["PHP_SELF"], "b.fk_product", "", "&amp;id=".$product->id, '', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "b.date_valid", "", "&amp;id=".$product->id, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("RowMaterial", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("Finished", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$product->id, '', $sortfield, $sortorder, 'center ');
@ -279,6 +303,9 @@ if ($id > 0 || !empty($ref)) {
print '<td>';
print $data['link'];
print "</td>\n";
print '<td>';
print $data['product'];
print "</td>\n";
print "<td align=\"center\">";
print $data['date_valid']."</td>";
print '<td class="center">'.$data['qty_toconsume'].'</td>';

View File

@ -53,6 +53,8 @@ if (empty($user->rights->takepos->run)) {
accessforbidden();
}
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks
$hookmanager->initHooks(array('takeposproductsearch'));
/*
* View
@ -109,13 +111,30 @@ if ($action == 'getProducts') {
}
}
$sql = 'SELECT rowid, ref, label, tosell, tobuy, barcode, price FROM '.MAIN_DB_PREFIX.'product as p';
$sql = 'SELECT rowid, ref, label, tosell, tobuy, barcode, price' ;
// Add fields from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= ' FROM '.MAIN_DB_PREFIX.'product as p';
// Add tables from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListTables', $parameters); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= ' WHERE entity IN ('.getEntity('product').')';
if ($filteroncategids) {
$sql .= ' AND EXISTS (SELECT cp.fk_product FROM '.MAIN_DB_PREFIX.'categorie_product as cp WHERE cp.fk_product = p.rowid AND cp.fk_categorie IN ('.$db->sanitize($filteroncategids).'))';
}
$sql .= ' AND tosell = 1';
$sql .= natural_search(array('ref', 'label', 'barcode'), $term);
// Add where from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$resql = $db->query($sql);
if ($resql) {
$rows = array();

View File

@ -335,7 +335,11 @@ function LoadProducts(position, issubcat) {
var titlestring = <?php echo $titlestring; ?>;
<?php if (!$conf->global->TAKEPOS_HIDE_PRODUCT_IMAGES) {
echo '$("#prodivdesc"+ishow).show();';
echo '$("#prodesc"+ishow).text(data[parseInt(idata)][\'label\']);';
if ($conf->global->TAKEPOS_SHOW_PRODUCT_REFERENCE == 1) {
echo '$("#prodesc"+ishow).html(data[parseInt(idata)][\'ref\'].bold() + \' - \' + data[parseInt(idata)][\'label\']);';
} else {
echo '$("#prodesc"+ishow).text(data[parseInt(idata)][\'label\']);';
}
echo '$("#proimg"+ishow).attr("title", titlestring);';
echo '$("#proimg"+ishow).attr("src", "genimg/index.php?query=pro&id="+data[idata][\'id\']);';
} else {
@ -401,7 +405,12 @@ function MoreProducts(moreorless) {
else if ((data[idata]['status']) == "1") {
//Only show products with status=1 (for sell)
$("#prodivdesc"+ishow).show();
$("#prodesc"+ishow).text(data[parseInt(idata)]['label']);
<?php
if ($conf->global->TAKEPOS_SHOW_PRODUCT_REFERENCE == 1) { ?>
$("#prodesc"+ishow).html(data[parseInt(idata)]['ref'].bold() + ' - ' + data[parseInt(idata)]['label']);
<?php } else { ?>
$("#prodesc"+ishow).text(data[parseInt(idata)]['label']);
<?php } ?>
$("#probutton"+ishow).text(data[parseInt(idata)]['label']);
$("#probutton"+ishow).show();
if (data[parseInt(idata)]['price_formated']) {
@ -579,7 +588,12 @@ function Search2(keyCodeForEnter) {
$titlestring .= " + ' - ".dol_escape_js($langs->trans("Barcode").': ')."' + data[i]['barcode']";
?>
var titlestring = <?php echo $titlestring; ?>;
$("#prodesc" + i).text(data[i]['label']);
<?php
if ($conf->global->TAKEPOS_SHOW_PRODUCT_REFERENCE == 1) { ?>
$("#prodesc" + i).html(data[i]['ref'].bold() + ' - ' + data[i]['label']);
<?php } else { ?>
$("#prodesc" + i).text(data[i]['label']);
<?php } ?>
$("#prodivdesc" + i).show();
$("#probutton" + i).text(data[i]['label']);
$("#probutton" + i).show();
@ -1203,11 +1217,15 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
} ?>">
<!-- Show categories -->
<div class="div4">
<?php
$count = 0;
while ($count < $MAXCATEG) {
?>
<?php
if ($conf->global->TAKEPOS_HIDE_CATEGORIES == 1) {
print '<div class="div4" style= "display: none;">';
} else {
print '<div class="div4">';
}
$count = 0;
while ($count < $MAXCATEG) {
?>
<div class="wrapper" <?php if ($count == ($MAXCATEG - 2)) {
echo 'onclick="MoreCategories(\'less\');"';
} elseif ($count == ($MAXCATEG - 1)) {
@ -1235,25 +1253,28 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
<?php } ?>
<div class="catwatermark" id='catwatermark<?php echo $count; ?>'>...</div>
</div>
<?php
$count++;
}
?>
<?php
$count++;
}
?>
</div>
<!-- Show product -->
<div class="div5">
<div class="div5"<?php if ($conf->global->TAKEPOS_HIDE_CATEGORIES == 1) {
print ' style="width:100%;"';
} ?>>
<?php
$count = 0;
while ($count < $MAXPRODUCT) {
print '<div class="wrapper2" id="prodiv'.$count.'" ';
?>
<div class="wrapper2" id='prodiv<?php echo $count; ?>' <?php if ($count == ($MAXPRODUCT - 2)) {
<?php if ($count == ($MAXPRODUCT - 2)) {
?> onclick="MoreProducts('less');" <?php
} if ($count == ($MAXPRODUCT - 1)) {
?> onclick="MoreProducts('more');" <?php
} else {
echo 'onclick="ClickProduct('.$count.');"';
} ?>>
} if ($count == ($MAXPRODUCT - 1)) {
?> onclick="MoreProducts('more');" <?php
} else {
echo 'onclick="ClickProduct('.$count.');"';
} ?>>
<?php
if ($count == ($MAXPRODUCT - 2)) {
//echo '<img class="imgwrapper" src="img/arrow-prev-top.png" height="100%" id="proimg'.$count.'" />';

View File

@ -1473,7 +1473,11 @@ if ($placeid > 0) {
$tooltiptext .= $line->desc;
}
}
$htmlforlines .= $form->textwithpicto($line->product_label ? $line->product_label : ($line->product_ref ? $line->product_ref : dolGetFirstLineOfText($line->desc, 1)), $tooltiptext);
if ($conf->global->TAKEPOS_SHOW_PRODUCT_REFERENCE == 1) {
$htmlforlines .= $form->textwithpicto($line->product_label ? '<b>' . $line->product_ref . '</b> - ' . $line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext);
} else {
$htmlforlines .= $form->textwithpicto($line->product_label ? $line->product_label : ($line->product_ref ? $line->product_ref : dolGetFirstLineOfText($line->desc, 1)), $tooltiptext);
}
} else {
if ($line->product_label) {
$htmlforlines .= $line->product_label;