Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0
This commit is contained in:
commit
a11a33a804
@ -1924,7 +1924,7 @@ if ($resql) {
|
||||
// Note public
|
||||
if (!empty($arrayfields['p.note_public']['checked'])) {
|
||||
print '<td class="center">';
|
||||
print dol_escape_htmltag($obj->note_public);
|
||||
print dol_string_nohtmltag($obj->note_public);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@ -1933,7 +1933,7 @@ if ($resql) {
|
||||
// Note private
|
||||
if (!empty($arrayfields['p.note_private']['checked'])) {
|
||||
print '<td class="center">';
|
||||
print dol_escape_htmltag($obj->note_private);
|
||||
print dol_string_nohtmltag($obj->note_private);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
|
||||
@ -1832,7 +1832,7 @@ if ($resql) {
|
||||
// Note public
|
||||
if (!empty($arrayfields['c.note_public']['checked'])) {
|
||||
print '<td align="center" class="nowrap">';
|
||||
print dol_escape_htmltag($obj->note_public);
|
||||
print dol_string_nohtmltag($obj->note_public);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@ -1842,7 +1842,7 @@ if ($resql) {
|
||||
// Note private
|
||||
if (!empty($arrayfields['c.note_private']['checked'])) {
|
||||
print '<td align="center" class="nowrap">';
|
||||
print dol_escape_htmltag($obj->note_private);
|
||||
print dol_string_nohtmltag($obj->note_private);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
|
||||
@ -2273,7 +2273,7 @@ if ($resql) {
|
||||
// Note public
|
||||
if (!empty($arrayfields['f.note_public']['checked'])) {
|
||||
print '<td class="center">';
|
||||
print dol_escape_htmltag($obj->note_public);
|
||||
print dol_string_nohtmltag($obj->note_public);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@ -2282,7 +2282,7 @@ if ($resql) {
|
||||
// Note private
|
||||
if (!empty($arrayfields['f.note_private']['checked'])) {
|
||||
print '<td class="center">';
|
||||
print dol_escape_htmltag($obj->note_private);
|
||||
print dol_string_nohtmltag($obj->note_private);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
|
||||
@ -884,6 +884,7 @@ class FormFile
|
||||
|
||||
// Show file name with link to download
|
||||
$out .= '<td class="minwidth200 tdoverflowmax300">';
|
||||
$out .= $this->showPreview($file, $modulepart, $relativepath, 0, $param, 'paddingright')."\n";
|
||||
$out .= '<a class="documentdownload paddingright" href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($relativepath).($param ? '&'.$param : '').'"';
|
||||
|
||||
$mime = dol_mimetype($relativepath, '', 0);
|
||||
@ -892,9 +893,8 @@ class FormFile
|
||||
}
|
||||
$out .= '>';
|
||||
$out .= img_mime($file["name"], $langs->trans("File").': '.$file["name"]);
|
||||
$out .= dol_trunc($file["name"], 40);
|
||||
$out .= '</a>'."\n";
|
||||
$out .= $this->showPreview($file, $modulepart, $relativepath, 0, $param);
|
||||
$out .= dol_trunc($file["name"], 150);
|
||||
$out .= '</a>';
|
||||
$out .= '</td>';
|
||||
|
||||
// Show file size
|
||||
@ -1341,6 +1341,11 @@ class FormFile
|
||||
// File name
|
||||
print '<td class="minwith200 tdoverflowmax500">';
|
||||
|
||||
// Preview link
|
||||
if (!$editline) {
|
||||
print $this->showPreview($file, $modulepart, $filepath, 0, '&entity='.(!empty($object->entity) ? $object->entity : $conf->entity), 'paddingright') . "\n";
|
||||
}
|
||||
|
||||
// Show file name with link to download
|
||||
//print "XX".$file['name']; //$file['name'] must be utf8
|
||||
print '<a class="paddingright valignmiddle" href="'.DOL_URL_ROOT.'/document.php?modulepart='.$modulepart;
|
||||
@ -1372,10 +1377,6 @@ class FormFile
|
||||
print dol_escape_htmltag(dol_trunc($filenametoshow, 200));
|
||||
print '</a>';
|
||||
}
|
||||
// Preview link
|
||||
if (!$editline) {
|
||||
print $this->showPreview($file, $modulepart, $filepath, 0, 'entity='.(!empty($object->entity) ? $object->entity : $conf->entity));
|
||||
}
|
||||
|
||||
print "</td>\n";
|
||||
|
||||
@ -2144,9 +2145,10 @@ class FormFile
|
||||
* @param string $relativepath Relative path of docs
|
||||
* @param integer $ruleforpicto Rule for picto: 0=Use the generic preview picto, 1=Use the picto of mime type of file)
|
||||
* @param string $param More param on http links
|
||||
* @param string $moreclass Add more class to class style
|
||||
* @return string $out Output string with HTML
|
||||
*/
|
||||
public function showPreview($file, $modulepart, $relativepath, $ruleforpicto = 0, $param = '')
|
||||
public function showPreview($file, $modulepart, $relativepath, $ruleforpicto = 0, $param = '', $moreclass = '')
|
||||
{
|
||||
global $langs, $conf;
|
||||
|
||||
@ -2154,7 +2156,7 @@ class FormFile
|
||||
if ($conf->browser->layout != 'phone' && !empty($conf->use_javascript_ajax)) {
|
||||
$urladvancedpreview = getAdvancedPreviewUrl($modulepart, $relativepath, 1, $param); // Return if a file is qualified for preview.
|
||||
if (count($urladvancedpreview)) {
|
||||
$out .= '<a class="pictopreview '.$urladvancedpreview['css'].'" href="'.$urladvancedpreview['url'].'"'.(empty($urladvancedpreview['mime']) ? '' : ' mime="'.$urladvancedpreview['mime'].'"').' '.(empty($urladvancedpreview['target']) ? '' : ' target="'.$urladvancedpreview['target'].'"').'>';
|
||||
$out .= '<a class="pictopreview '.$urladvancedpreview['css'].(!empty($moreclass)?' '.$moreclass:'').'" href="'.$urladvancedpreview['url'].'"'.(empty($urladvancedpreview['mime']) ? '' : ' mime="'.$urladvancedpreview['mime'].'"').' '.(empty($urladvancedpreview['target']) ? '' : ' target="'.$urladvancedpreview['target'].'"').'>';
|
||||
//$out.= '<a class="pictopreview">';
|
||||
if (empty($ruleforpicto)) {
|
||||
//$out.= img_picto($langs->trans('Preview').' '.$file['name'], 'detail');
|
||||
|
||||
@ -698,7 +698,7 @@ if ($resql) {
|
||||
// Note public
|
||||
if (!empty($arrayfields['f.note_public']['checked'])) {
|
||||
print '<td class="center">';
|
||||
print dol_escape_htmltag($obj->note_public);
|
||||
print dol_string_nohtmltag($obj->note_public);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@ -707,7 +707,7 @@ if ($resql) {
|
||||
// Note private
|
||||
if (!empty($arrayfields['f.note_private']['checked'])) {
|
||||
print '<td class="center">';
|
||||
print dol_escape_htmltag($obj->note_private);
|
||||
print dol_string_nohtmltag($obj->note_private);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
|
||||
@ -578,7 +578,7 @@ class ProductFournisseur extends Product
|
||||
$sql .= " pfp.supplier_reputation, pfp.fk_user, pfp.datec,";
|
||||
$sql .= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code,";
|
||||
$sql .= " pfp.barcode, pfp.fk_barcode_type, pfp.packaging,";
|
||||
$sql .= " p.ref as product_ref";
|
||||
$sql .= " p.ref as product_ref, p.tosell as status, p.tobuy as status_buy";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp, ".MAIN_DB_PREFIX."product as p";
|
||||
$sql .= " WHERE pfp.rowid = ".(int) $rowid;
|
||||
$sql .= " AND pfp.fk_product = p.rowid";
|
||||
@ -594,7 +594,8 @@ class ProductFournisseur extends Product
|
||||
$this->fk_product = $obj->fk_product;
|
||||
$this->product_id = $obj->fk_product;
|
||||
$this->product_ref = $obj->product_ref;
|
||||
|
||||
$this->status = $obj->status;
|
||||
$this->status_buy = $obj->status_buy;
|
||||
$this->fourn_id = $obj->fk_soc;
|
||||
$this->fourn_ref = $obj->ref_fourn; // deprecated
|
||||
$this->ref_supplier = $obj->ref_fourn;
|
||||
@ -670,7 +671,7 @@ class ProductFournisseur extends Product
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id, p.ref as product_ref,";
|
||||
$sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id, p.ref as product_ref, p.tosell as status, p.tobuy as status_buy, ";
|
||||
$sql .= " pfp.rowid as product_fourn_pri_id, pfp.entity, pfp.ref_fourn, pfp.desc_fourn, pfp.fk_product as product_fourn_id, pfp.fk_supplier_price_expression,";
|
||||
$sql .= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.info_bits, pfp.delivery_time_days, pfp.supplier_reputation,";
|
||||
$sql .= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code, pfp.datec, pfp.tms,";
|
||||
@ -699,6 +700,8 @@ class ProductFournisseur extends Product
|
||||
|
||||
$prodfourn->product_ref = $record["product_ref"];
|
||||
$prodfourn->product_fourn_price_id = $record["product_fourn_pri_id"];
|
||||
$prodfourn->status = $record["status"];
|
||||
$prodfourn->status_buy = $record["status_buy"];
|
||||
$prodfourn->product_fourn_id = $record["product_fourn_id"];
|
||||
$prodfourn->product_fourn_entity = $record["entity"];
|
||||
$prodfourn->ref_supplier = $record["ref_fourn"];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user