Merge remote-tracking branch 'upstream/develop' into socialnetworks

This commit is contained in:
Frédéric FRANCE 2019-10-15 09:39:57 +02:00
commit d1d9b1ed85
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
57 changed files with 353 additions and 178 deletions

View File

@ -27,8 +27,68 @@ Following changes may create regressions for some external modules, but were nec
* If your logo was visible on the menu bar, you must upload a new logo into 'Home-Setup-Company/Organization' to have it visible agin in menu. * If your logo was visible on the menu bar, you must upload a new logo into 'Home-Setup-Company/Organization' to have it visible agin in menu.
***** ChangeLog for 10.0.2 compared to 10.0.1 ***** ***** ChangeLog for 10.0.3 compared to 10.0.2 *****
FIX: #11702
FIX: #11861 No consistent code to manage measuring units
FIX: #11942
FIX: #12026
FIX: #12040
FIX: #12041
FIX: #12054
FIX: #12083
FIX: #12088
FIX: access to public interface when origin email has an alias.
FIX: Alias name is not into the email recipient label.
FIX: allow standalone credit note even if no invoice
FIX: an admin can not access his own permissions after enabling advanced
FIX: an admin can not access his own permissions after enabling advanced permissions
FIX: Attachement of linked files on ticket when sending a message
FIX: avoid non numeric warning
FIX: Bad currency var used in stripe for connect
FIX: Bad list of ticket on public interface for ticket emailcollector
FIX: Can't modify vendor invoice if transfered into accountancy
FIX: change product type must be allowed if we activate hidden conf
FIX: colspan on VAT quadri report
FIX: CSS
FIX: Debug feature orderstoinvoice for suppliers
FIX: do not output return code on screen after a select of bank account
FIX: Edit of ticket module parameters erased others
FIX: empty cache when we want to load specific warehouses in select
FIX: escape email alias
FIX: expedition.class.php
FIX: Export of leave request show the number of open days
FIX: Filtering the HTTP Header "Accept-Language".
FIX: Filter on project on ticket list
FIX: Filter "Open all" of ticket was ko.
FIX: Force downlaod of file with .noexe as octet-stream mime type
FIX: form not closed.
FIX: hidden conf to prevent from changing product_type
FIX: If product account not suggested during bind, it is not preselected
FIX: If we share invoice, we need to see discount created from a deposit on each entity
FIX: Import of product using units
FIX: label of thirdparty is wrong on open project list
FIX: Look and feel v10
FIX: missing begin()
FIX: missing "$this->id" in "fetch" function
FIX: navigation on ticket tab of projects
FIX: new invoice with generic thirdparty in takepos
FIX: Pb in units of shipments
FIX: regression with option to hide picto on top menu
FIX: selection of project i am contact of.
FIX: Send email from expense report card.
FIX: shipping card: missing user error messages when classifying closed or billed
FIX: SQL injection on qty
FIX: stripe payment when there is a quote into address
FIX: Substitution of __PROJECT_XXX__ not done
FIX: TakePOS no invoice validation control and good payment translate
FIX: the access of the bank account of one user
FIX: top menu right padding
FIX: Update of leave request when CSRF with token is on
FIX: Var not enough sanitized
FIX: wrong test
FIX: XSS
***** ChangeLog for 10.0.2 compared to 10.0.1 *****
FIX: #10460 compatibility with MariaDB 10.4 FIX: #10460 compatibility with MariaDB 10.4
FIX: #11401 Adherent unknown language key FIX: #11401 Adherent unknown language key
FIX: #11422 Can't edit his own events with standard rights FIX: #11422 Can't edit his own events with standard rights

View File

@ -518,9 +518,9 @@ else $buttonLabel = $langs->trans("ExportList");
// Button re-export // Button re-export
if (! empty($conf->global->ACCOUNTING_REEXPORT)) { if (! empty($conf->global->ACCOUNTING_REEXPORT)) {
$newcardbutton ='<a href="'.$_SERVER['PHP_SELF'].'?action=setreexport&value=0'.($param?'&'.$param:'').'">'.img_picto($langs->trans("Activated"), 'switch_on').'</a> '; $newcardbutton ='<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=setreexport&value=0'.($param?'&'.$param:'').'">'.img_picto($langs->trans("Activated"), 'switch_on').'</a> ';
} else { } else {
$newcardbutton ='<a href="'.$_SERVER['PHP_SELF'].'?action=setreexport&value=1'.($param?'&'.$param:'').'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a> '; $newcardbutton ='<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=setreexport&value=1'.($param?'&'.$param:'').'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a> ';
} }
$newcardbutton.= '<span class="valignmiddle marginrightonly">'.$langs->trans("IncludeDocsAlreadyExported").'</span>'; $newcardbutton.= '<span class="valignmiddle marginrightonly">'.$langs->trans("IncludeDocsAlreadyExported").'</span>';

View File

@ -88,7 +88,7 @@ if ($conf->accounting->enabled)
} }
print load_fiche_titre($langs->trans("AccountancyArea"), $showtutorial . $resultboxes['selectboxlist'], 'accountancy'); print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'accountancy', 0, '', '', $showtutorial);
print '<div class="'.($helpisexpanded ? '' : 'hideobject').'" id="idfaq">'; // hideobject is to start hidden print '<div class="'.($helpisexpanded ? '' : 'hideobject').'" id="idfaq">'; // hideobject is to start hidden
print "<br>\n"; print "<br>\n";

View File

@ -1048,6 +1048,7 @@ class BlockedLog
if (empty($conf->global->BLOCKEDLOG_ENTITY_FINGERPRINT)) { // creation of a unique fingerprint if (empty($conf->global->BLOCKEDLOG_ENTITY_FINGERPRINT)) { // creation of a unique fingerprint
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
$fingerprint = dol_hash(print_r($mysoc, true).getRandomPassword(1), '5'); $fingerprint = dol_hash(print_r($mysoc, true).getRandomPassword(1), '5');

View File

@ -551,7 +551,7 @@ class Mailing extends CommonObject
$result = ''; $result = '';
$companylink = ''; $companylink = '';
$label = '<u>' . $langs->trans("ShowEmailing") . '</u>'; $label = '<u>' . $langs->trans("ShowEMailing") . '</u>';
$label.= '<br>'; $label.= '<br>';
$label.= '<b>' . $langs->trans('Ref') . ':</b> ' . $this->ref; $label.= '<b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
@ -570,7 +570,7 @@ class Mailing extends CommonObject
{ {
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{ {
$label=$langs->trans("ShowEmailing"); $label=$langs->trans("ShowEMailing");
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"'; $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
} }
$linkclose.=' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose.=' title="'.dol_escape_htmltag($label, 1).'"';

View File

@ -91,15 +91,13 @@ if ($_socid > 0)
dol_fiche_head($head, $tabchoice, $langs->trans("ThirdParty"), 0, 'company'); dol_fiche_head($head, $tabchoice, $langs->trans("ThirdParty"), 0, 'company');
print '<table width="100%" border="0">'; print '<table class="border centpercent">';
print '<tr><td class="tdtop">';
print '<table class="border" width="100%">';
print '<tr><td colspan="2" width="25%">'; print '<tr><td class="titlefieldcreate">';
print $langs->trans("PriceLevel").'</td><td colspan="2">'.$objsoc->price_level."</td></tr>"; print $langs->trans("PriceLevel").'</td><td>'.$objsoc->price_level."</td></tr>";
print '<tr><td colspan="2">'; print '<tr><td>';
print $langs->trans("NewValue").'</td><td colspan="2">'; print $langs->trans("NewValue").'</td><td>';
print '<select name="price_level" class="flat">'; print '<select name="price_level" class="flat">';
for($i=1;$i<=$conf->global->PRODUIT_MULTIPRICES_LIMIT;$i++) for($i=1;$i<=$conf->global->PRODUIT_MULTIPRICES_LIMIT;$i++)
{ {
@ -116,12 +114,6 @@ if ($_socid > 0)
print "</table>"; print "</table>";
print "</td>\n";
print "</td></tr>";
print "</table>";
dol_fiche_end(); dol_fiche_end();
print '<div align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>'; print '<div align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
@ -157,8 +149,8 @@ if ($_socid > 0)
while ($i < $num ) while ($i < $num )
{ {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
$tag = !$tag;
print '<tr '.$bc[$tag].'>'; print '<tr class="oddeven">';
print '<td>'.dol_print_date($db->jdate($obj->dc), "dayhour").'</td>'; print '<td>'.dol_print_date($db->jdate($obj->dc), "dayhour").'</td>';
print '<td>'.$obj->price_level.' </td>'; print '<td>'.$obj->price_level.' </td>';
$userstatic->id=$obj->uid; $userstatic->id=$obj->uid;

View File

@ -1287,7 +1287,11 @@ class Propal extends CommonObject
$object->datep = $now; // deprecated $object->datep = $now; // deprecated
$object->fin_validite = $object->date + ($object->duree_validite * 24 * 3600); $object->fin_validite = $object->date + ($object->duree_validite * 24 * 3600);
if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $object->ref_client = ''; if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $object->ref_client = '';
if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING==1)
{
$object->note_private = '';
$object->note_public = '';
}
// Create clone // Create clone
$object->context['createfromclone']='createfromclone'; $object->context['createfromclone']='createfromclone';
$result=$object->create($user); $result=$object->create($user);

View File

@ -60,6 +60,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
$offset = $conf->liste_limit * $page; $offset = $conf->liste_limit * $page;
$pageprev = $page - 1; $pageprev = $page - 1;
$pagenext = $page + 1; $pagenext = $page + 1;
if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; }
if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; }
if (! $sortorder) $sortorder="ASC"; if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name"; if (! $sortfield) $sortfield="name";

View File

@ -59,6 +59,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
$offset = $conf->liste_limit * $page; $offset = $conf->liste_limit * $page;
$pageprev = $page - 1; $pageprev = $page - 1;
$pagenext = $page + 1; $pagenext = $page + 1;
if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; }
if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; }
if (! $sortorder) $sortorder="ASC"; if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name"; if (! $sortfield) $sortfield="name";

View File

@ -454,7 +454,7 @@ foreach ($accounts as $key=>$type)
if (! empty($arrayfields['b.account_number']['checked'])) if (! empty($arrayfields['b.account_number']['checked']))
{ {
print '<td>'; print '<td>';
if (! empty($conf->accounting->enabled)) if (! empty($conf->accounting->enabled) && ! empty($objecttmp->account_number))
{ {
$accountingaccount = new AccountingAccount($db); $accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch('', $objecttmp->account_number, 1); $accountingaccount->fetch('', $objecttmp->account_number, 1);
@ -472,7 +472,7 @@ foreach ($accounts as $key=>$type)
if (! empty($arrayfields['b.fk_accountancy_journal']['checked'])) if (! empty($arrayfields['b.fk_accountancy_journal']['checked']))
{ {
print '<td>'; print '<td>';
if (! empty($conf->accounting->enabled)) if (! empty($conf->accounting->enabled) && ! empty($objecttmp->fk_accountancy_journal))
{ {
$accountingjournal = new AccountingJournal($db); $accountingjournal = new AccountingJournal($db);
$accountingjournal->fetch($objecttmp->fk_accountancy_journal); $accountingjournal->fetch($objecttmp->fk_accountancy_journal);
@ -505,8 +505,13 @@ foreach ($accounts as $key=>$type)
if ($result<0) { if ($result<0) {
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
} else { } else {
print $result->nbtodo; print '<span class="badge badge-info classfortooltip" title="'.dol_htmlentities($langs->trans("TransactionsToConciliate")).'">'.$result->nbtodo.'</span>';
if ($result->nbtodolate) print ' &nbsp; ('.$result->nbtodolate.img_warning($langs->trans("Late")).')'; if ($result->nbtodolate) {
print '&nbsp;';
print '<span title="'.dol_htmlentities($langs->trans("Late")).'" class="classfortooltip badge badge-danger">';
print '<i class="fa fa-exclamation-triangle"></i> '.$result->nbtodolate;
print '</span>';
}
} }
} }
else print $langs->trans("FeatureDisabled"); else print $langs->trans("FeatureDisabled");

View File

@ -1046,6 +1046,11 @@ class Facture extends CommonInvoice
$object->close_code = ''; $object->close_code = '';
$object->close_note = ''; $object->close_note = '';
$object->products = $object->lines; // For backward compatibility $object->products = $object->lines; // For backward compatibility
if ($conf->global->MAIN_DONT_KEEP_NOTE_ON_CLONING==1)
{
$object->note_private = '';
$object->note_public = '';
}
// Loop on each line of new invoice // Loop on each line of new invoice
foreach($object->lines as $i => $line) foreach($object->lines as $i => $line)

View File

@ -260,6 +260,7 @@ if (empty($reshook))
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->contact->supprimer) if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->contact->supprimer)
{ {
$result=$object->fetch($id); $result=$object->fetch($id);
$object->oldcopy = clone $object;
$object->old_lastname = GETPOST("old_lastname"); $object->old_lastname = GETPOST("old_lastname");
$object->old_firstname = GETPOST("old_firstname"); $object->old_firstname = GETPOST("old_firstname");

View File

@ -1557,8 +1557,8 @@ class Contact extends CommonObject
/** /**
* Get Contact roles for a thirdparty * Get Contact roles for a thirdparty
* *
* @param string $element element type * @param string $element Element type
* @return array|int * @return array|int Array of contact roles or -1
* @throws Exception * @throws Exception
*/ */
public function getContactRoles($element = '') public function getContactRoles($element = '')

View File

@ -62,6 +62,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
$offset = $conf->liste_limit * $page; $offset = $conf->liste_limit * $page;
$pageprev = $page - 1; $pageprev = $page - 1;
$pagenext = $page + 1; $pagenext = $page + 1;
if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; }
if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; }
if (! $sortorder) $sortorder="ASC"; if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name"; if (! $sortfield) $sortfield="name";

View File

@ -1,6 +1,7 @@
<?php <?php
/* Copyright (C) 2016 Sergio Sanchis <sergiosanchis@hotmail.com> /* Copyright (C) 2016 Sergio Sanchis <sergiosanchis@hotmail.com>
* Copyright (C) 2017 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2017 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,6 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1');
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1');
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1');

View File

@ -74,7 +74,7 @@ class box_accountancy_suspense_account extends ModeleBoxes
include_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; include_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
$bookkeepingstatic = new BookKeeping($this->db); //$bookkeepingstatic = new BookKeeping($this->db);
$this->info_box_head = array('text' => $langs->trans("BoxTitleSuspenseAccount")); $this->info_box_head = array('text' => $langs->trans("BoxTitleSuspenseAccount"));
@ -103,7 +103,7 @@ class box_accountancy_suspense_account extends ModeleBoxes
$this->info_box_contents[0][1] = array( $this->info_box_contents[0][1] = array(
'td' => 'class="right"', 'td' => 'class="right"',
'text' => '<a href="' . DOL_URL_ROOT . '/accountancy/bookkeeping/list.php?search_accountancy_code_start='.$suspenseAccount.'&search_accountancy_code_end='.$suspenseAccount.'">' . $nbSuspenseAccount . '</a>', 'text' => '<a href="' . DOL_URL_ROOT . '/accountancy/bookkeeping/list.php?search_accountancy_code_start='.urlencode($suspenseAccount).'&search_accountancy_code_end='.urlencode($suspenseAccount).'">' . $nbSuspenseAccount . '</a>',
'asis' => 1 'asis' => 1
); );
} else { } else {

View File

@ -71,7 +71,7 @@ class box_last_modified_ticket extends ModeleBoxes
$this->max = $max; $this->max = $max;
dol_include_once("/ticket/class/ticket.class.php"); require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php";
$text = $langs->trans("BoxLastModifiedTicketDescription", $max); $text = $langs->trans("BoxLastModifiedTicketDescription", $max);
$this->info_box_head = array( $this->info_box_head = array(
@ -87,7 +87,7 @@ class box_last_modified_ticket extends ModeleBoxes
if ($user->rights->ticket->read) { if ($user->rights->ticket->read) {
$sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email "; $sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email ";
$sql.= ", type.label as type_label, category.label as category_label, severity.label as severity_label"; $sql.= ", type.label as type_label, category.label as category_label, severity.label as severity_label";
$sql.= ", s.nom as company_name"; $sql.= ", s.nom as company_name, s.email as socemail, s.client, s.fournisseur";
$sql.= " FROM ".MAIN_DB_PREFIX."ticket as t"; $sql.= " FROM ".MAIN_DB_PREFIX."ticket as t";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_type as type ON type.code=t.type_code"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_type as type ON type.code=t.type_code";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_category as category ON category.code=t.category_code"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_ticket_category as category ON category.code=t.category_code";
@ -107,7 +107,6 @@ class box_last_modified_ticket extends ModeleBoxes
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if ($resql) { if ($resql) {
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);
$now=gmmktime();
$i = 0; $i = 0;
@ -119,23 +118,31 @@ class box_last_modified_ticket extends ModeleBoxes
$late = ''; $late = '';
$ticket = new Ticket($this->db); $ticket = new Ticket($this->db);
$ticket->id = $objp->id;
$ticket->track_id = $objp->track_id;
$ticket->ref = $objp->ref;
$ticket->fk_statut = $objp->fk_statut;
$ticket->subject = $objp->subject;
if ($objp->fk_soc > 0) {
$thirdparty = new Societe($this->db);
$thirdparty->id = $objp->fk_soc;
$thirdparty->email = $objp->socemail;
$thirdparty->client = $objp->client;
$thirdparty->fournisseur = $objp->fournisseur;
$thirdparty->name = $objp->company_name;
$link = $thirdparty->getNomUrl(1);
} else {
$link = dol_print_email($objp->origin_email);
}
$r=0; $r=0;
// Picto // Ticket
$this->info_box_contents[$i][0] = array( $this->info_box_contents[$i][0] = array(
'td' => 'class="left" width="16"',
'logo' => $this->boximg,
'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1),
);
$r++;
// Id
$this->info_box_contents[$i][$r] = array(
'td' => 'class="left"', 'td' => 'class="left"',
'text' => $objp->ref, 'text' => $ticket->getNomUrl(1),
'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1), 'asis' => 1,
); );
$r++; $r++;
@ -143,16 +150,15 @@ class box_last_modified_ticket extends ModeleBoxes
$this->info_box_contents[$i][$r] = array( $this->info_box_contents[$i][$r] = array(
'td' => 'class="left"', 'td' => 'class="left"',
'text' => $objp->subject, // Some event have no ref 'text' => $objp->subject, // Some event have no ref
'url' => dol_buildpath("/ticket/card.php?track_id=".$objp->track_id, 1), 'url' => DOL_URL_ROOT."/ticket/card.php?track_id=".$objp->track_id,
); );
$r++; $r++;
// Customer // Customer
$this->info_box_contents[$i][$r] = array( $this->info_box_contents[$i][$r] = array(
'td' => 'class="left"', 'td' => 'class="left"',
'logo' => ($objp->fk_soc>0?'company':''), 'text' => $link,
'text' => ($objp->company_name?$objp->company_name:$objp->origin_email), 'asis' => 1,
'url' => ($objp->fk_soc>0?DOL_URL_ROOT."/comm/card.php?socid=".$objp->fk_soc:'')
); );
$r++; $r++;
@ -165,11 +171,9 @@ class box_last_modified_ticket extends ModeleBoxes
$r++; $r++;
// Statut // Statut
$ticketstat = new Ticket($this->db);
$ticketstat->fk_statut = $objp->fk_statut;
$this->info_box_contents[$i][$r] = array( $this->info_box_contents[$i][$r] = array(
'td' => 'class="right"', 'td' => 'class="right"',
'text' => $ticketstat->getLibStatut(3) 'text' => $ticket->getLibStatut(3)
); );
$r++; $r++;

View File

@ -1,7 +1,8 @@
<?php <?php
/* Module descriptor for ticket system /* Module descriptor for ticket system
* Copyright (C) - 2013-2016 Jean-François FERRY <hello@librethic.io> * Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
* 2016 Christophe Battarel <christophe@altairis.fr> * Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -70,7 +71,7 @@ class box_last_ticket extends ModeleBoxes
$this->max = $max; $this->max = $max;
dol_include_once("/ticket/class/ticket.class.php"); require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php";
$text = $langs->trans("BoxLastTicketDescription", $max); $text = $langs->trans("BoxLastTicketDescription", $max);
$this->info_box_head = array( $this->info_box_head = array(
@ -86,7 +87,7 @@ class box_last_ticket extends ModeleBoxes
if ($user->rights->ticket->read) { if ($user->rights->ticket->read) {
$sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email "; $sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email ";
$sql .= ", type.label as type_label, category.label as category_label, severity.label as severity_label"; $sql .= ", type.label as type_label, category.label as category_label, severity.label as severity_label";
$sql .= ", s.nom as company_name"; $sql .= ", s.nom as company_name, s.email as socemail, s.client, s.fournisseur";
$sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t"; $sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_ticket_type as type ON type.code=t.type_code"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_ticket_type as type ON type.code=t.type_code";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_ticket_category as category ON category.code=t.category_code"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_ticket_category as category ON category.code=t.category_code";
@ -108,7 +109,6 @@ class box_last_ticket extends ModeleBoxes
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if ($resql) { if ($resql) {
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);
$now = gmmktime();
$i = 0; $i = 0;
@ -120,22 +120,30 @@ class box_last_ticket extends ModeleBoxes
$late = ''; $late = '';
$ticket = new Ticket($this->db); $ticket = new Ticket($this->db);
$ticket->id = $objp->id;
$ticket->track_id = $objp->track_id;
$ticket->ref = $objp->ref;
$ticket->fk_statut = $objp->fk_statut;
$ticket->subject = $objp->subject;
if ($objp->fk_soc > 0) {
$thirdparty = new Societe($this->db);
$thirdparty->id = $objp->fk_soc;
$thirdparty->email = $objp->socemail;
$thirdparty->client = $objp->client;
$thirdparty->fournisseur = $objp->fournisseur;
$thirdparty->name = $objp->company_name;
$link = $thirdparty->getNomUrl(1);
} else {
$link = dol_print_email($objp->origin_email);
}
$r = 0; $r = 0;
// Picto // Ticket
$this->info_box_contents[$i][0] = array(
'td' => 'class="left" width="16"',
'logo' => $this->boximg,
'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1),
);
$r++;
// Id
$this->info_box_contents[$i][$r] = array( $this->info_box_contents[$i][$r] = array(
'td' => 'class="left"', 'td' => 'class="left"',
'text' => $objp->ref, 'text' => $ticket->getNomUrl(1),
'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1), 'asis' => 1
); );
$r++; $r++;
@ -143,16 +151,15 @@ class box_last_ticket extends ModeleBoxes
$this->info_box_contents[$i][$r] = array( $this->info_box_contents[$i][$r] = array(
'td' => 'class="left"', 'td' => 'class="left"',
'text' => $objp->subject, // Some event have no ref 'text' => $objp->subject, // Some event have no ref
'url' => dol_buildpath("/ticket/card.php?track_id=" . $objp->track_id, 1), 'url' => DOL_URL_ROOT."/ticket/card.php?track_id=" . $objp->track_id,
); );
$r++; $r++;
// Customer // Customer
$this->info_box_contents[$i][$r] = array( $this->info_box_contents[$i][$r] = array(
'td' => 'class="left"', 'td' => 'class="left"',
'logo' => ($objp->fk_soc > 0 ? 'company' : ''), 'text' => $link,
'text' => ($objp->company_name ? $objp->company_name : $objp->origin_email), 'asis' => 1,
'url' => ($objp->fk_soc > 0 ? DOL_URL_ROOT . "/comm/card.php?socid=" . $objp->fk_soc : ''),
); );
$r++; $r++;
@ -164,11 +171,9 @@ class box_last_ticket extends ModeleBoxes
$r++; $r++;
// Statut // Statut
$ticketstat = new Ticket($this->db);
$ticketstat->fk_statut = $objp->fk_statut;
$this->info_box_contents[$i][$r] = array( $this->info_box_contents[$i][$r] = array(
'td' => 'class="right"', 'td' => 'class="right"',
'text' => $ticketstat->getLibStatut(3), 'text' => $ticket->getLibStatut(3),
); );
$r++; $r++;

View File

@ -227,10 +227,7 @@ class Conf
$filesList = explode(":", $this->global->LOCAL_CONSTS_FILES); $filesList = explode(":", $this->global->LOCAL_CONSTS_FILES);
foreach ($filesList as $file) { foreach ($filesList as $file) {
$file=dol_sanitizeFileName($file); $file=dol_sanitizeFileName($file);
include_once DOL_DOCUMENT_ROOT . "/".$file."/".$file."_consts.php"; include_once DOL_DOCUMENT_ROOT . "/".$file."/".$file."_consts.php"; // This file must set $this->global->XXX vars.
foreach ($file2bddconsts as $key=>$value) {
$this->global->$key=$value;
}
} }
} }
@ -442,7 +439,6 @@ class Conf
// Set some default values // Set some default values
//$this->global->MAIN_LIST_FILTER_ON_DAY=1; // On filter that show date, we must show input field for day before or after month //$this->global->MAIN_LIST_FILTER_ON_DAY=1; // On filter that show date, we must show input field for day before or after month
$this->global->MAIN_ACTIVATE_HTML5=1;
$this->global->MAIN_MAIL_USE_MULTI_PART=1; $this->global->MAIN_MAIL_USE_MULTI_PART=1;
// societe // societe
@ -669,6 +665,8 @@ class Conf
if (! isset($this->global->MAIN_EXTRAFIELDS_IN_ONE_TD)) $this->global->MAIN_EXTRAFIELDS_IN_ONE_TD = 1; if (! isset($this->global->MAIN_EXTRAFIELDS_IN_ONE_TD)) $this->global->MAIN_EXTRAFIELDS_IN_ONE_TD = 1;
if (! isset($this->global->MAIN_USE_OLD_TITLE_BUTTON)) $this->global->MAIN_USE_OLD_TITLE_BUTTON = 0;
if (empty($this->global->MAIN_MODULE_DOLISTORE_API_SRV)) $this->global->MAIN_MODULE_DOLISTORE_API_SRV='https://www.dolistore.com'; if (empty($this->global->MAIN_MODULE_DOLISTORE_API_SRV)) $this->global->MAIN_MODULE_DOLISTORE_API_SRV='https://www.dolistore.com';
if (empty($this->global->MAIN_MODULE_DOLISTORE_API_KEY)) $this->global->MAIN_MODULE_DOLISTORE_API_KEY='dolistorecatalogpublickey1234567'; if (empty($this->global->MAIN_MODULE_DOLISTORE_API_KEY)) $this->global->MAIN_MODULE_DOLISTORE_API_KEY='dolistorecatalogpublickey1234567';

View File

@ -4152,9 +4152,9 @@ function load_fiche_titre($titre, $morehtmlright = '', $picto = 'generic', $pict
if ($picto == 'setup') $picto='generic'; if ($picto == 'setup') $picto='generic';
$return.= "\n"; $return.= "\n";
$return.= '<table '.($id?'id="'.$id.'" ':'').'class="centpercent notopnoleftnoright'.($morecssontable?' '.$morecssontable:'').'" style="margin-bottom: 6px;"><tr>'; // maring bottom must be same than into print_barre_list $return.= '<table '.($id?'id="'.$id.'" ':'').'class="centpercent notopnoleftnoright table-fiche-title '.($morecssontable?' '.$morecssontable:'').'"><tr>'; // maring bottom must be same than into print_barre_list
if ($picto) $return.= '<td class="nobordernopadding widthpictotitle opacityhigh valignmiddle">'.img_picto('', $picto, 'class="valignmiddle widthpictotitle pictotitle"', $pictoisfullpath).'</td>'; if ($picto) $return.= '<td class="nobordernopadding widthpictotitle opacityhigh valignmiddle col-picto">'.img_picto('', $picto, 'class="valignmiddle widthpictotitle pictotitle"', $pictoisfullpath).'</td>';
$return.= '<td class="nobordernopadding valignmiddle">'; $return.= '<td class="nobordernopadding valignmiddle col-title">';
$return.= '<div class="titre inline-block">'.$titre.'</div>'; $return.= '<div class="titre inline-block">'.$titre.'</div>';
$return.= '</td>'; $return.= '</td>';
if (dol_strlen($morehtmlcenter)) if (dol_strlen($morehtmlcenter))
@ -4214,11 +4214,10 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
print "\n"; print "\n";
print "<!-- Begin title '".$titre."' -->\n"; print "<!-- Begin title '".$titre."' -->\n";
print '<table class="centpercent notopnoleftnoright'.($morecss?' '.$morecss:'').'" style="margin-bottom: 6px; border: 0"><tr>'; // maring bottom must be same than into load_fiche_tire print '<table class="centpercent notopnoleftnoright table-fiche-title'.($morecss?' '.$morecss:'').'"><tr>'; // maring bottom must be same than into load_fiche_tire
// Left // Left
//if ($picto && $titre) print '<td class="nobordernopadding hideonsmartphone left valignmiddle" style="width: 40px">'.img_picto('', $picto, 'id="pictotitle"', $pictoisfullpath).'</td>'; print '<td class="nobordernopadding valignmiddle col-title">';
print '<td class="nobordernopadding valignmiddle">';
if ($picto && $titre) print img_picto('', $picto, 'class="hideonsmartphone valignmiddle opacityhigh pictotitle widthpictotitle"', $pictoisfullpath); if ($picto && $titre) print img_picto('', $picto, 'class="hideonsmartphone valignmiddle opacityhigh pictotitle widthpictotitle"', $pictoisfullpath);
print '<div class="titre inline-block">'.$titre; print '<div class="titre inline-block">'.$titre;
if (!empty($titre) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') print ' ('.$totalnboflines.')'; if (!empty($titre) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') print ' ('.$totalnboflines.')';
@ -8310,7 +8309,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
$class = 'btnTitle'; $class = 'btnTitle';
// hidden conf keep during button transition TODO: remove this block // hidden conf keep during button transition TODO: remove this block
if (empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)) { if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) {
$class = 'butActionNew'; $class = 'butActionNew';
} }
if (! empty($params['morecss'])) $class.=' '.$params['morecss']; if (! empty($params['morecss'])) $class.=' '.$params['morecss'];
@ -8328,7 +8327,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
$attr['class'] .= ' refused'; $attr['class'] .= ' refused';
// hidden conf keep during button transition TODO: remove this block // hidden conf keep during button transition TODO: remove this block
if(empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)){ if(!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)){
$attr['class'] = 'butActionNewRefused'; $attr['class'] = 'butActionNewRefused';
} }
@ -8390,7 +8389,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
$button.= '</'.$tag.'>'; $button.= '</'.$tag.'>';
// hidden conf keep during button transition TODO: remove this block // hidden conf keep during button transition TODO: remove this block
if(empty($conf->global->MAIN_USE_NEW_TITLE_BUTTON)){ if(!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)){
$button='<'.$tag.' '.$compiledAttributes.' ><span class="text-plus-circle">'.$label.'</span>'; $button='<'.$tag.' '.$compiledAttributes.' ><span class="text-plus-circle">'.$label.'</span>';
$button.= '<span class="'.$iconClass.' valignmiddle"></span>'; $button.= '<span class="'.$iconClass.' valignmiddle"></span>';
$button.= '</'.$tag.'>'; $button.= '</'.$tag.'>';

View File

@ -151,6 +151,7 @@ function showDirectPublicLink($object)
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$email = CMailFile::getValidAddress($object->origin_email, 2); $email = CMailFile::getValidAddress($object->origin_email, 2);
$url = '';
if ($email) if ($email)
{ {
$url = dol_buildpath('/public/ticket/view.php', 3).'?track_id='.$object->track_id.'&email='.$email; $url = dol_buildpath('/public/ticket/view.php', 3).'?track_id='.$object->track_id.'&email='.$email;

View File

@ -397,7 +397,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print '<a href="'.$_SERVER["PHP_SELF"].($edit?'?action=edit&theme=':'?theme=').$subdir.(GETPOST('optioncss', 'alpha', 1)?'&optioncss='.GETPOST('optioncss', 'alpha', 1):'').($fuser?'&id='.$fuser->id:'').'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">'; print '<a href="'.$_SERVER["PHP_SELF"].($edit?'?action=edit&theme=':'?theme=').$subdir.(GETPOST('optioncss', 'alpha', 1)?'&optioncss='.GETPOST('optioncss', 'alpha', 1):'').($fuser?'&id='.$fuser->id:'').'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">';
if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive"); if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive");
else $title=$langs->trans("ShowPreview"); else $title=$langs->trans("ShowPreview");
print '<img class="shadow" src="'.$url.'" alt="'.$title.'" title="'.$title.'" style="width: 80px; height: 60px; border: none; margin-bottom: 5px;">'; print '<img class="img-skinthumb shadow" src="'.$url.'" alt="'.$title.'" title="'.$title.'" style="border: none; margin-bottom: 5px;">';
print '</a><br>'; print '</a><br>';
if ($subdir == $selected_theme) if ($subdir == $selected_theme)
{ {

View File

@ -433,7 +433,7 @@ function showWebsiteTemplates(Website $website)
if (! empty($urladvanced)) $ret.='<a class="'.$urladvanced['css'].'" target="'.$urladvanced['target'].'" mime="'.$urladvanced['mime'].'" href="'.$urladvanced['url'].'">'; if (! empty($urladvanced)) $ret.='<a class="'.$urladvanced['css'].'" target="'.$urladvanced['target'].'" mime="'.$urladvanced['mime'].'" href="'.$urladvanced['url'].'">';
else $ret.='<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($originalfile).'&cache='.$cache.'">'; else $ret.='<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($originalfile).'&cache='.$cache.'">';
print $ret; print $ret;
print '<img class="websiteskinthumb shadow" src="'.$url.'" border="0" width="80" height="60" alt="'.$title.'" title="'.$title.'" style="margin-bottom: 5px;">'; print '<img class="img-skinthumb shadow" src="'.$url.'" border="0" alt="'.$title.'" title="'.$title.'" style="margin-bottom: 5px;">';
print '</a>'; print '</a>';
print '<br>'; print '<br>';

View File

@ -180,7 +180,9 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile)
if (! empty($location)) fwrite($calfileh, "LOCATION:".$encoding.$location."\n"); if (! empty($location)) fwrite($calfileh, "LOCATION:".$encoding.$location."\n");
if ($fulldayevent) fwrite($calfileh, "X-FUNAMBOL-ALLDAY:1\n"); if ($fulldayevent) fwrite($calfileh, "X-FUNAMBOL-ALLDAY:1\n");
if ($fulldayevent) fwrite($calfileh, "X-MICROSOFT-CDO-ALLDAYEVENT:1\n");
// see https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxcical/0f262da6-c5fd-459e-9f18-145eba86b5d2
if ($fulldayevent) fwrite($calfileh, "X-MICROSOFT-CDO-ALLDAYEVENT:TRUE\n");
// Date must be GMT dates // Date must be GMT dates
// Current date // Current date

View File

@ -47,23 +47,23 @@ abstract class ModeleAction extends CommonDocGenerator
global $conf; global $conf;
$type='action'; $type='action';
$liste=array(); $list=array();
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$liste=getListOfModels($db, $type, $maxfilenamelength); $list=getListOfModels($db, $type, $maxfilenamelength);
return $liste; return $list;
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Create an product document on disk using template defined into PRODUCT_ADDON_PDF * Create a product document on disk using template defined into PRODUCT_ADDON_PDF
* *
* @param DoliDB $db objet base de donnee * @param DoliDB $db data base object
* @param Object $object Object fichinter * @param Object $object Object fichinter
* @param string $modele force le modele a utiliser ('' par defaut) * @param string $modele forces the model to use ('' by default)
* @param Translate $outputlangs objet lang a utiliser pour traduction * @param Translate $outputlangs lang object to use for translation
* @param int $hidedetails Hide details of lines * @param int $hidedetails Hide details of lines
* @param int $hidedesc Hide description * @param int $hidedesc Hide description
* @param int $hideref Hide ref * @param int $hideref Hide ref
@ -79,7 +79,7 @@ function action_create($db, $object, $modele, $outputlangs, $hidedetails = 0, $h
$srctemplatepath=''; $srctemplatepath='';
// Positionne modele sur le nom du modele de fichinter a utiliser // Position modele on the name of fichinter model to use
if (! dol_strlen($modele)) if (! dol_strlen($modele))
{ {
if (! empty($conf->global->ACTION_EVENT_ADDON_PDF)) if (! empty($conf->global->ACTION_EVENT_ADDON_PDF))

View File

@ -307,7 +307,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Positionne $this->atleastonediscount si on a au moins une remise // Set $this->atleastonediscount if you have at least one discount
for ($i = 0 ; $i < $nblines ; $i++) for ($i = 0 ; $i < $nblines ; $i++)
{ {
if ($object->lines[$i]->remise_percent) if ($object->lines[$i]->remise_percent)
@ -361,7 +361,7 @@ class pdf_einstein extends ModelePDFCommandes
} }
} }
// Affiche notes // Displays notes
$notetoshow=empty($object->note_public)?'':$object->note_public; $notetoshow=empty($object->note_public)?'':$object->note_public;
if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) if (! empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE))
{ {
@ -461,7 +461,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->setPage($pageposafter); $curY = $tab_top_newpage; $pdf->setPage($pageposafter); $curY = $tab_top_newpage;
} }
$pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font
// VAT Rate // VAT Rate
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN))
@ -503,7 +503,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetXY($this->postotalht, $curY); $pdf->SetXY($this->postotalht, $curY);
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0); $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva // Collection of totals by value of vat in $this->vat["rate"] = total_tva
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva; if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
else $tvaligne=$object->lines[$i]->total_tva; else $tvaligne=$object->lines[$i]->total_tva;

View File

@ -430,7 +430,7 @@ class pdf_eratosthene extends ModelePDFCommandes
{ {
$pdf->rollbackTransaction(true); $pdf->rollbackTransaction(true);
// prepar pages to receive notes // prepare pages to receive notes
while ($pagenb < $pageposafternote) { while ($pagenb < $pageposafternote) {
$pdf->AddPage(); $pdf->AddPage();
$pagenb++; $pagenb++;
@ -464,7 +464,7 @@ class pdf_eratosthene extends ModelePDFCommandes
} }
// apply note frame to previus pages // apply note frame to previous pages
$i = $pageposbeforenote; $i = $pageposbeforenote;
while ($i < $pageposafternote) { while ($i < $pageposafternote) {
$pdf->setPage($i); $pdf->setPage($i);
@ -526,7 +526,7 @@ class pdf_eratosthene extends ModelePDFCommandes
} }
// Use new auto collum system // Use new auto column system
$this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref); $this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref);
// tab simulation to know line height // tab simulation to know line height
@ -636,7 +636,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->setPage($pageposafter); $curY = $tab_top_newpage; $pdf->setPage($pageposafter); $curY = $tab_top_newpage;
} }
$pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut $pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font
// VAT Rate // VAT Rate
if ($this->getColumnStatus('vat')) if ($this->getColumnStatus('vat'))
@ -701,7 +701,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$reshook=$hookmanager->executeHooks('printPDFline', $parameters, $this); // Note that $object may have been modified by hook $reshook=$hookmanager->executeHooks('printPDFline', $parameters, $this); // Note that $object may have been modified by hook
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva // Collection of totals by value of vat in $this->tva["rate"] = total_tva
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva; if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
else $tvaligne=$object->lines[$i]->total_tva; else $tvaligne=$object->lines[$i]->total_tva;

View File

@ -270,6 +270,7 @@ class modSociete extends DolibarrModules
'st.code'=>'ProspectStatus','payterm.libelle'=>'PaymentConditions','paymode.libelle'=>'PaymentMode' 'st.code'=>'ProspectStatus','payterm.libelle'=>'PaymentConditions','paymode.libelle'=>'PaymentMode'
); );
if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix'; if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix';
if (! empty($conf->global->PRODUIT_MULTIPRICES)) $this->export_fields_array[$r]['s.price_level']='PriceLevel';
// Add multicompany field // Add multicompany field
if (! empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED)) if (! empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED))
{ {
@ -295,7 +296,8 @@ class modSociete extends DolibarrModules
's.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note_private'=>"Text",'s.note_public'=>"Text",'t.libelle'=>"Text", 's.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note_private'=>"Text",'s.note_public'=>"Text",'t.libelle'=>"Text",
'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code', 'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code',
'st.code'=>'List:c_stcomm:libelle:code','d.nom'=>'Text','u.login'=>'Text','u.firstname'=>'Text','u.lastname'=>'Text','payterm.libelle'=>'Text', 'st.code'=>'List:c_stcomm:libelle:code','d.nom'=>'Text','u.login'=>'Text','u.firstname'=>'Text','u.lastname'=>'Text','payterm.libelle'=>'Text',
'paymode.libelle'=>'Text','s.entity'=>'Numeric' 'paymode.libelle'=>'Text','s.entity'=>'Numeric',
's.price_level'=>'Numeric'
); );
$this->export_entities_array[$r]=array('u.login'=>'user','u.firstname'=>'user','u.lastname'=>'user'); // We define here only fields that use another picto $this->export_entities_array[$r]=array('u.login'=>'user','u.firstname'=>'user','u.lastname'=>'user'); // We define here only fields that use another picto

View File

@ -90,16 +90,18 @@ class InterfaceContactRoles extends DolibarrTriggers
if (!empty($cloneFrom->id)) $TContactAlreadyLinked = array_merge($cloneFrom->liste_contact(-1, 'external'), $cloneFrom->liste_contact(-1, 'internal')); if (!empty($cloneFrom->id)) $TContactAlreadyLinked = array_merge($cloneFrom->liste_contact(-1, 'external'), $cloneFrom->liste_contact(-1, 'internal'));
} }
if (is_array($TContact))
{
foreach($TContact as $i => $infos) { foreach($TContact as $i => $infos) {
foreach ($TContactAlreadyLinked as $contactData) { foreach ($TContactAlreadyLinked as $contactData) {
if($contactData['id'] == $infos['fk_socpeople'] && $contactData['fk_c_type_contact'] == $infos['type_contact']) unset($TContact[$i]); if ($contactData['id'] == $infos['fk_socpeople'] && $contactData['fk_c_type_contact'] == $infos['type_contact']) unset($TContact[$i]);
} }
} }
$nb = 0; $nb = 0;
foreach($TContact as $infos) { foreach($TContact as $infos) {
$res = $object->add_contact($infos['fk_socpeople'], $infos['type_contact']); $res = $object->add_contact($infos['fk_socpeople'], $infos['type_contact']);
if($res > 0) $nb++; if ($res > 0) $nb++;
} }
if($nb > 0) { if($nb > 0) {
@ -107,6 +109,7 @@ class InterfaceContactRoles extends DolibarrTriggers
} }
} }
} }
}
return 0; return 0;
} }
} }

View File

@ -399,8 +399,7 @@ class Export
$szFilterField='<input type="text" size="6" name="'.$NameField.'" value="'.$ValueField.'">'; $szFilterField='<input type="text" size="6" name="'.$NameField.'" value="'.$ValueField.'">';
break; break;
case 'Status': case 'Status':
if (! empty($conf->global->MAIN_ACTIVATE_HTML5)) $szFilterField='<input type="number" size="6" name="'.$NameField.'" value="'.$ValueField.'">'; $szFilterField='<input type="number" size="6" name="'.$NameField.'" value="'.$ValueField.'">';
else $szFilterField='<input type="text" size="6" name="'.$NameField.'" value="'.$ValueField.'">';
break; break;
case 'Boolean': case 'Boolean':
$szFilterField='<select name="'.$NameField.'" class="flat">'; $szFilterField='<select name="'.$NameField.'" class="flat">';

View File

@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadlangs(array('exports', 'other', 'users', 'companies', 'projects', 'banks')); $langs->loadlangs(array('admin', 'exports', 'other', 'users', 'companies', 'projects', 'suppliers', 'products', 'bank'));
// Everybody should be able to go on this page // Everybody should be able to go on this page
//if (! $user->admin) //if (! $user->admin)

View File

@ -85,10 +85,7 @@ if (empty($reshook))
$result=$object->fetch($id); $result=$object->fetch($id);
$object->code_compta_fournisseur=$_POST["supplieraccountancycode"]; $object->code_compta_fournisseur=$_POST["supplieraccountancycode"];
$result=$object->update($object->id, $user, 1, 0, 1); $result=$object->update($object->id, $user, 1, 0, 1);
if ($result < 0) if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
{
$mesg=join(',', $object->errors);
}
} }
// terms of the settlement // terms of the settlement
if ($action == 'setconditions' && $user->rights->societe->creer) if ($action == 'setconditions' && $user->rights->societe->creer)

View File

@ -785,7 +785,7 @@ if ($resql)
if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center '); if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center '); if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center ');
if (! empty($arrayfields['f.fk_mode_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'], $_SERVER["PHP_SELF"], "f.fk_mode_reglement", "", $param, "", $sortfield, $sortorder); if (! empty($arrayfields['f.fk_mode_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'], $_SERVER["PHP_SELF"], "f.fk_mode_reglement", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total', '', $param, '', $sortfield, $sortorder, 'right '); if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total_ht', '', $param, '', $sortfield, $sortorder, 'right ');
if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, '', $sortfield, $sortorder, 'right '); if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, '', $sortfield, $sortorder, 'right ');
if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, '', $sortfield, $sortorder, 'right '); if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'], $_SERVER['PHP_SELF'], 'f.localtax1', '', $param, '', $sortfield, $sortorder, 'right ');
if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'], $_SERVER['PHP_SELF'], 'f.localtax2', '', $param, '', $sortfield, $sortorder, 'right '); if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'], $_SERVER['PHP_SELF'], 'f.localtax2', '', $param, '', $sortfield, $sortorder, 'right ');

View File

@ -225,7 +225,7 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read)
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td class="nowraponall">'.$holidaystatic->getNomUrl(1).'</td>'; print '<td class="nowraponall">'.$holidaystatic->getNomUrl(1).'</td>';
print '<td>'.$userstatic->getNomUrl(-1, 'leave').'</td>'; print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(-1, 'leave').'</td>';
print '<td>'.$typeleaves[$obj->fk_type]['label'].'</td>'; print '<td>'.$typeleaves[$obj->fk_type]['label'].'</td>';
$starthalfday=($obj->halfday == -1 || $obj->halfday == 2)?'afternoon':'morning'; $starthalfday=($obj->halfday == -1 || $obj->halfday == 2)?'afternoon':'morning';
@ -304,7 +304,7 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td class="nowraponall">'.$deplacementstatic->getNomUrl(1).'</td>'; print '<td class="nowraponall">'.$deplacementstatic->getNomUrl(1).'</td>';
print '<td>'.$userstatic->getNomUrl(-1).'</td>'; print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(-1).'</td>';
print '<td class="right">'.$obj->km.'</td>'; print '<td class="right">'.$obj->km.'</td>';
print '<td class="right">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>'; print '<td class="right">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>';
print '<td>'.$deplacementstatic->LibStatut($obj->fk_statut, 3).'</td>'; print '<td>'.$deplacementstatic->LibStatut($obj->fk_statut, 3).'</td>';
@ -376,7 +376,7 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td class="nowraponall">'.$expensereportstatic->getNomUrl(1).'</td>'; print '<td class="nowraponall">'.$expensereportstatic->getNomUrl(1).'</td>';
print '<td>'.$userstatic->getNomUrl(-1).'</td>'; print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(-1).'</td>';
print '<td class="right">'.price($obj->total_ttc).'</td>'; print '<td class="right">'.price($obj->total_ttc).'</td>';
print '<td class="right">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>'; print '<td class="right">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>';
print '<td>'.$expensereportstatic->LibStatut($obj->status, 3).'</td>'; print '<td>'.$expensereportstatic->LibStatut($obj->status, 3).'</td>';

View File

@ -212,7 +212,7 @@ if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTAT
'askprice', 'askprice',
'projects', 'projects',
'expensereports', 'expensereports',
'holidays', 'holiday',
'donations' 'donations'
); );
// Dashboard Icon lines // Dashboard Icon lines

View File

@ -1070,6 +1070,7 @@ CompanyTown=Town
CompanyCountry=Country CompanyCountry=Country
CompanyCurrency=Main currency CompanyCurrency=Main currency
CompanyObject=Object of the company CompanyObject=Object of the company
IDCountry=ID country
Logo=Logo Logo=Logo
LogoDesc=Main logo of company. Will be used into generated documents (PDF, ...) LogoDesc=Main logo of company. Will be used into generated documents (PDF, ...)
LogoSquarred=Logo (squarred) LogoSquarred=Logo (squarred)

View File

@ -213,8 +213,8 @@ UseMultipriceRules=Use price segment rules (defined into product module setup) t
PercentVariationOver=%% variation over %s PercentVariationOver=%% variation over %s
PercentDiscountOver=%% discount over %s PercentDiscountOver=%% discount over %s
KeepEmptyForAutoCalculation=Keep empty to have this calculated automatically from weight or volume of products KeepEmptyForAutoCalculation=Keep empty to have this calculated automatically from weight or volume of products
VariantRefExample=Example: COL VariantRefExample=Examples: COL, SIZE
VariantLabelExample=Example: Color VariantLabelExample=Examples: Color, Size
### composition fabrication ### composition fabrication
Build=Produce Build=Produce
ProductsMultiPrice=Products and prices for each price segment ProductsMultiPrice=Products and prices for each price segment

View File

@ -450,7 +450,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Clone // Clone
if (! empty($user->rights->mymodule->write)) if (! empty($user->rights->mymodule->write))
{ {
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&amp;socid=' . $object->socid . '&amp;action=clone&amp;object=order">' . $langs->trans("ToClone") . '</a></div>'; print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&amp;socid=' . $object->socid . '&amp;action=clone&amp;object=order">' . $langs->trans("ToClone") . '</a>'."\n";
} }
/* /*

View File

@ -288,9 +288,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '</div>'."\n"; print '</div>'."\n";
} }
include DOL_DOCUMENT_ROOT.'/product/inventory/tpl/inventory.tpl.php'; include DOL_DOCUMENT_ROOT.'/product/inventory/tpl/inventory.tpl.php';
} }
// End of page // End of page

View File

@ -53,6 +53,19 @@ class Productlot extends CommonObject
*/ */
public $ismultientitymanaged = 1; public $ismultientitymanaged = 1;
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields=array(
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'),
'batch' =>array('type'=>'varchar(30)', 'label'=>'Batch', 'enabled'=>1, 'visible'=>1, 'notnull'=>0, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'comment'=>'Batch'),
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20),
'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500),
'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501),
'fk_user_author'=>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>510, 'foreignkey'=>'llx_user.rowid'),
'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511)
);
/** /**
* @var int Entity * @var int Entity
*/ */

View File

@ -764,7 +764,7 @@ if (empty($reshook))
if ($user->rights->stock->mouvement->creer) if ($user->rights->stock->mouvement->creer)
{ {
if (! $variants) { if (! $variants || ! empty($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) {
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=correction">' . $langs->trans("CorrectStock") . '</a>'; print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=correction">' . $langs->trans("CorrectStock") . '</a>';
} }
else else
@ -780,7 +780,7 @@ if (empty($reshook))
//if (($user->rights->stock->mouvement->creer) && ! $object->hasbatch()) //if (($user->rights->stock->mouvement->creer) && ! $object->hasbatch())
if ($user->rights->stock->mouvement->creer) if ($user->rights->stock->mouvement->creer)
{ {
if (! $variants) { if (! $variants || ! empty($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) {
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=transfert">' . $langs->trans("TransferStock") . '</a>'; print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=transfert">' . $langs->trans("TransferStock") . '</a>';
} }
else else
@ -804,8 +804,8 @@ if (! $variants) {
*/ */
print '<div class="div-table-responsive">'; print '<div class="div-table-responsive">';
print '<table class="noborder centpercent">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="4">' . $langs->trans("Warehouse") . '</td>'; print '<td colspan="4">' . $langs->trans("Warehouse") . '</td>';
print '<td class="right">' . $langs->trans("NumberOfUnit") . '</td>'; print '<td class="right">' . $langs->trans("NumberOfUnit") . '</td>';
@ -924,7 +924,8 @@ if (! $variants) {
print '<td class="center">' . dol_print_date($pdluo->eatby, 'day') . '</td>'; print '<td class="center">' . dol_print_date($pdluo->eatby, 'day') . '</td>';
print '<td class="center">' . dol_print_date($pdluo->sellby, 'day') . '</td>'; print '<td class="center">' . dol_print_date($pdluo->sellby, 'day') . '</td>';
print '<td class="right">' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . '</td>'; print '<td class="right">' . $pdluo->qty . ($pdluo->qty < 0 ? ' ' . img_warning() : '') . '</td>';
print '<td colspan="4"></td></tr>'; print '<td colspan="4"></td>';
print '</tr>';
} }
} }
} }
@ -932,12 +933,13 @@ if (! $variants) {
} }
} else dol_print_error($db); } else dol_print_error($db);
// Total line
print '<tr class="liste_total"><td class="right liste_total" colspan="4">' . $langs->trans("Total") . ':</td>'; print '<tr class="liste_total"><td class="right liste_total" colspan="4">' . $langs->trans("Total") . ':</td>';
print '<td class="liste_total right">' . price2num($total, 'MS') . '</td>'; print '<td class="liste_total right">' . price2num($total, 'MS') . '</td>';
print '<td class="liste_total right">'; print '<td class="liste_total right">';
print ($totalwithpmp ? price(price2num($totalvalue / $totalwithpmp, 'MU')) : '&nbsp;'); // This value may have rounding errors print ($totalwithpmp ? price(price2num($totalvalue / $totalwithpmp, 'MU')) : '&nbsp;'); // This value may have rounding errors
print '</td>'; print '</td>';
// Value purchase // Value purchase
print '<td class="liste_total right">'; print '<td class="liste_total right">';
print $totalvalue ? price(price2num($totalvalue, 'MT'), 1) : '&nbsp;'; print $totalvalue ? price(price2num($totalvalue, 'MT'), 1) : '&nbsp;';
print '</td>'; print '</td>';
@ -945,12 +947,13 @@ if (! $variants) {
if (empty($conf->global->PRODUIT_MULTIPRICES)) print ($total ? price($totalvaluesell / $total, 1) : '&nbsp;'); if (empty($conf->global->PRODUIT_MULTIPRICES)) print ($total ? price($totalvaluesell / $total, 1) : '&nbsp;');
else print $langs->trans("Variable"); else print $langs->trans("Variable");
print '</td>'; print '</td>';
// Value to sell // Value to sell
print '<td class="liste_total right">'; print '<td class="liste_total right">';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($totalvaluesell, 'MT'), 1); if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($totalvaluesell, 'MT'), 1);
else print $langs->trans("Variable"); else print $langs->trans("Variable");
print '</td>'; print '</td>';
print "</tr>"; print "</tr>";
print "</table>"; print "</table>";
print '</div>'; print '</div>';
@ -1073,6 +1076,7 @@ if (! $variants) {
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td colspan="4" class="left">'.$langs->trans("Total").'</td>'; print '<td colspan="4" class="left">'.$langs->trans("Total").'</td>';
print '<td class="right">'.$stock_total.'</td>'; print '<td class="right">'.$stock_total.'</td>';
print '<td></td>';
print '</tr>'; print '</tr>';
} }
else else

View File

@ -62,6 +62,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
$offset = $conf->liste_limit * $page; $offset = $conf->liste_limit * $page;
$pageprev = $page - 1; $pageprev = $page - 1;
$pagenext = $page + 1; $pagenext = $page + 1;
if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; }
if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; }
if (! $sortorder) $sortorder="ASC"; if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name"; if (! $sortfield) $sortfield="name";

View File

@ -827,6 +827,7 @@ if (empty($reshook))
if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer) if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer)
{ {
$object->fetch($socid); $object->fetch($socid);
$object->oldcopy = clone $object;
$result = $object->delete($socid, $user); $result = $object->delete($socid, $user);
if ($result > 0) if ($result > 0)

View File

@ -292,7 +292,7 @@ class Contacts extends DolibarrApi
{ {
throw new RestException(401, 'Access not allowed for login ' . DolibarrApiAccess::$user->login); throw new RestException(401, 'Access not allowed for login ' . DolibarrApiAccess::$user->login);
} }
$this->contact->oldcopy = clone $this->contact;
return $this->contact->delete($id); return $this->contact->delete($id);
} }

View File

@ -418,7 +418,7 @@ class Thirdparties extends DolibarrApi
// External modules should update their ones too // External modules should update their ones too
if (!$errors) if (!$errors)
{ {
$reshook = $hookmanager->executeHooks('replaceThirdparty', array( $reshook = $hookmanager->executeHooks('replaceThirdparty', array(
'soc_origin' => $soc_origin->id, 'soc_origin' => $soc_origin->id,
'soc_dest' => $object->id 'soc_dest' => $object->id
), $soc_dest, $action); ), $soc_dest, $action);
@ -488,6 +488,7 @@ $reshook = $hookmanager->executeHooks('replaceThirdparty', array(
if( ! DolibarrApi::_checkAccessToResource('societe', $this->company->id)) { if( ! DolibarrApi::_checkAccessToResource('societe', $this->company->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
} }
$this->company->oldcopy = clone $this->company;
return $this->company->delete($id); return $this->company->delete($id);
} }

View File

@ -55,6 +55,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
$offset = $conf->liste_limit * $page; $offset = $conf->liste_limit * $page;
$pageprev = $page - 1; $pageprev = $page - 1;
$pagenext = $page + 1; $pagenext = $page + 1;
if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; }
if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; }
if (! $sortorder) $sortorder="ASC"; if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="position_name"; if (! $sortfield) $sortfield="position_name";

View File

@ -167,10 +167,9 @@ TITLE BUTTON
.btnTitle, a.btnTitle { .btnTitle, a.btnTitle {
display: inline-block; display: inline-block;
padding: 6px 12px; padding: 4px 12px 4px 12px;
font-size: 14px
font-weight: 400; font-weight: 400;
line-height: 1.4; /* line-height: 1; */
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
vertical-align: middle; vertical-align: middle;
@ -192,6 +191,7 @@ TITLE BUTTON
font-size: 12px; font-size: 12px;
font-weight: 300; font-weight: 300;
background-color: #fbfbfb; background-color: #fbfbfb;
border: 1px solid #fff;
} }
.btnTitle > .btnTitle-icon{ .btnTitle > .btnTitle-icon{
@ -203,12 +203,13 @@ TITLE BUTTON
} }
.btnTitle:hover, a.btnTitle:hover { .btnTitle:hover, a.btnTitle:hover {
border: 1px solid #bbb;
border-radius: 3px; border-radius: 3px;
position: relative; position: relative;
margin: 0 0 0 10px; margin: 0 0 0 10px;
text-align: center; text-align: center;
color: #ffffff; /* color: #ffffff;
background-color: rgb(<?php print $colortextlink; ?>); background-color: rgb(<?php print $colortextlink; ?>); */
font-size: 12px; font-size: 12px;
text-decoration: none; text-decoration: none;
box-shadow: none; box-shadow: none;
@ -222,7 +223,7 @@ TITLE BUTTON
} }
.btnTitle:hover .btnTitle-label{ .btnTitle:hover .btnTitle-label{
color: #ffffff; /* color: #ffffff; */
} }
.btnTitle.refused .btnTitle-label, .btnTitle.refused:hover .btnTitle-label{ .btnTitle.refused .btnTitle-label, .btnTitle.refused:hover .btnTitle-label{
@ -243,6 +244,15 @@ div.pagination li:first-child a.btnTitle{
color: #aaa; color: #aaa;
} }
/* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */
@media only screen and (max-width: <?php echo empty($conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2) ? round($nbtopmenuentries * 69, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2; ?>px) /* reduction 2 */
{
.btnTitle, a.btnTitle {
display: inline-block;
padding: 4px 4px 4px 4px;
min-width: unset;
}
}
<?php if (! empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) && (! $user->admin)) { ?> <?php if (! empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) && (! $user->admin)) { ?>
.butActionRefused, .butActionNewRefused, .btnTitle.refused { .butActionRefused, .butActionNewRefused, .btnTitle.refused {

View File

@ -2,7 +2,7 @@
if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
/* <style type="text/css" > dont remove this line it's an ide hack */ /* <style type="text/css" > dont remove this line it's an ide hack */
/* /*
* Dropdown * Dropdown of user popup
*/ */
.open>.dropdown-menu{ .open>.dropdown-menu{

View File

@ -789,6 +789,12 @@ table[summary="list_of_modules"] .fa-cog {
min-width: 100px; min-width: 100px;
} }
.img-skinthumb {
width: 160px;
height: 120px;
}
/* ============================================================================== */ /* ============================================================================== */
/* Styles to hide objects */ /* Styles to hide objects */
/* ============================================================================== */ /* ============================================================================== */
@ -1059,19 +1065,19 @@ td.showDragHandle {
table-layout: fixed; table-layout: fixed;
} }
#id-right, #id-left { #id-right, #id-left {
padding-top: 20px;
display: table-cell; /* DOL_XXX Empeche fonctionnement correct du scroll horizontal sur tableau, avec datatable ou CSS */ display: table-cell; /* DOL_XXX Empeche fonctionnement correct du scroll horizontal sur tableau, avec datatable ou CSS */
float: none; float: none;
vertical-align: top; vertical-align: top;
} }
#id-left { #id-left {
padding-top: 20px;
padding-bottom: 5px; padding-bottom: 5px;
<?php if (! empty($conf->global->MAIN_USE_TOP_MENU_SEARCH_DROPDOWN) && ! empty($conf->global->MAIN_USE_TOP_MENU_BOOKMARK_DROPDOWN)) { ?> <?php if (! empty($conf->global->MAIN_USE_TOP_MENU_SEARCH_DROPDOWN) && ! empty($conf->global->MAIN_USE_TOP_MENU_BOOKMARK_DROPDOWN)) { ?>
padding-top: 8px; padding-top: 8px;
<?php } ?> <?php } ?>
} }
#id-right { /* This must stay id-right and not be replaced with echo $right */ #id-right { /* This must stay id-right and not be replaced with echo $right */
padding-top: 10px;
width: 100%; width: 100%;
background: rgb(<?php print $colorbackbody; ?>); background: rgb(<?php print $colorbackbody; ?>);
padding-bottom: 20px; padding-bottom: 20px;
@ -1108,8 +1114,8 @@ div.blockvmenulogo
} }
.menulogocontainer { .menulogocontainer {
margin: <?php echo $disableimages?'0':'6'; ?>px; margin: <?php echo $disableimages?'0':'6'; ?>px;
margin-left: 12px; margin-left: 11px;
margin-right: 4px; margin-right: 9px;
padding: 0; padding: 0;
height: <?php echo $disableimages?'20':'32'; ?>px; height: <?php echo $disableimages?'20':'32'; ?>px;
/* width: 100px; */ /* width: 100px; */
@ -1378,6 +1384,9 @@ div.nopadding {
.pictomodule { .pictomodule {
width: 14px; width: 14px;
} }
.pictomodule {
width: 14px;
}
.fiche .arearef img.pictoedit, .fiche .arearef span.pictoedit, .fiche .arearef img.pictoedit, .fiche .arearef span.pictoedit,
.fiche .fichecenter img.pictoedit, .fiche .fichecenter span.pictoedit, .fiche .fichecenter img.pictoedit, .fiche .fichecenter span.pictoedit,
.tagtdnote span.pictoedit { .tagtdnote span.pictoedit {
@ -2337,6 +2346,7 @@ li.expanded > a.fmdirlia.jqft.ecmjqft {
/* ============================================================================== */ /* ============================================================================== */
div.tabs { div.tabs {
text-align: <?php print $left; ?>; text-align: <?php print $left; ?>;
padding-top: 10px;
padding-left: 6px !important; padding-left: 6px !important;
padding-right: 6px !important; padding-right: 6px !important;
clear:both; clear:both;
@ -2790,8 +2800,9 @@ div.pagination li {
display: inline-block; display: inline-block;
padding-left: 0px; padding-left: 0px;
padding-right: 0px; padding-right: 0px;
padding-top: 6px; padding-top: 10px;
padding-bottom: 5px; padding-bottom: 5px;
font-size: 1.1em;
} }
.pagination { .pagination {
display: inline-block; display: inline-block;
@ -2893,6 +2904,8 @@ div.pagination li.pagination .active {
div.pagination li.paginationafterarrows { div.pagination li.paginationafterarrows {
margin-left: 10px; margin-left: 10px;
padding-top: 0;
/*padding-bottom: 10px;*/
} }
.paginationatbottom { .paginationatbottom {
margin-top: 9px; margin-top: 9px;
@ -3610,6 +3623,13 @@ div.titre, .secondary {
color: rgb(<?php print $colortexttitlenotab; ?>); color: rgb(<?php print $colortexttitlenotab; ?>);
} }
table.table-fiche-title .col-title div.titre{
line-height: 40px;
}
table.table-fiche-title {
margin-bottom: 5px;
}
#dolpaymenttable { min-width: 320px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */ #dolpaymenttable { min-width: 320px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */
#tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; padding: 20px; } #tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; padding: 20px; }
#tablepublicpayment .CTableRow1 { background-color: #F0F0F0 !important; } #tablepublicpayment .CTableRow1 { background-color: #F0F0F0 !important; }
@ -5091,6 +5111,11 @@ dl.dropdown {
.dropdown dd ul li a:hover { .dropdown dd ul li a:hover {
background-color:#eee; background-color:#eee;
} }
dd.dropdowndd ul li {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
/* ============================================================================== */ /* ============================================================================== */

View File

@ -67,10 +67,10 @@ $colorbacklinepairhover='230,237,244'; // line hover
$colorbacklinepairchecked='230,237,244'; // line checked $colorbacklinepairchecked='230,237,244'; // line checked
$colorbacklinebreak='233,228,230'; // line break $colorbacklinebreak='233,228,230'; // line break
$colorbackbody='255,255,255'; $colorbackbody='255,255,255';
$colortexttitlenotab='110,80,20'; $colortexttitlenotab='140,80,10'; // 140,80,10 or 10,140,80
$colortexttitle='0,0,0'; $colortexttitle='0,0,0';
$colortext='0,0,0'; $colortext='0,0,0';
$colortextlink='10, 20, 110'; $colortextlink='10, 20, 100';
$fontsize='0.86em'; $fontsize='0.86em';
$fontsizesmaller='0.75em'; $fontsizesmaller='0.75em';
$topMenuFontSize='1.2em'; $topMenuFontSize='1.2em';

View File

@ -3631,6 +3631,10 @@ div.titre, .secondary {
color: rgb(<?php print $colortexttitlenotab; ?>); color: rgb(<?php print $colortexttitlenotab; ?>);
} }
table.table-fiche-title .col-title div.titre{
line-height: 40px;
}
#dolpaymenttable { min-width: 320px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */ #dolpaymenttable { min-width: 320px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */
#tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; padding: 20px; } #tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; padding: 20px; }
#tablepublicpayment .CTableRow1 { background-color: #F0F0F0 !important; } #tablepublicpayment .CTableRow1 { background-color: #F0F0F0 !important; }
@ -5038,6 +5042,11 @@ dl.dropdown {
background-color: #eee; background-color: #eee;
} }
dd.dropdowndd ul li {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
/* ============================================================================== */ /* ============================================================================== */

View File

@ -873,7 +873,14 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
print '</td></tr>'; print '</td></tr>';
// User assigned // User assigned
print '<tr><td>' . $langs->trans("AssignedTo") . '</td><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
print $langs->trans("AssignedTo");
if ($object->fk_statut < 8 && GETPOST('set', 'alpha') != "assign_ticket" && $user->rights->ticket->manage) {
print '<td class="right"><a class="editfielda" href="' . $url_page_current . '?track_id=' . $object->track_id . '&action=view&set=assign_ticket">' . img_edit($langs->trans('Modify'), '') . '</a></td>';
}
print '</tr></table>';
print '</td><td>';
if ($object->fk_user_assign > 0) { if ($object->fk_user_assign > 0) {
$userstat->fetch($object->fk_user_assign); $userstat->fetch($object->fk_user_assign);
print $userstat->getNomUrl(1); print $userstat->getNomUrl(1);
@ -892,9 +899,6 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
print ' <input class="button" type="submit" name="btn_assign_user" value="' . $langs->trans("Validate") . '" />'; print ' <input class="button" type="submit" name="btn_assign_user" value="' . $langs->trans("Validate") . '" />';
print '</form>'; print '</form>';
} }
if ($object->fk_statut < 8 && GETPOST('set', 'alpha') != "assign_ticket" && $user->rights->ticket->manage) {
print '<a href="' . $url_page_current . '?track_id=' . $object->track_id . '&action=view&set=assign_ticket">' . img_picto('', 'edit') . ' ' . $langs->trans('Modify') . '</a>';
}
print '</td></tr>'; print '</td></tr>';
// Progression // Progression

View File

@ -197,7 +197,7 @@ class ActionsTicket
print $langs->trans("InitialMessage"); print $langs->trans("InitialMessage");
print '</td><td>'; print '</td><td>';
if ($user->rights->ticket->manage) { if ($user->rights->ticket->manage) {
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=edit_message_init&amp;track_id=' . $object->track_id . '">' . img_edit($langs->trans('Modify')) . '</a>'; print '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=edit_message_init&amp;track_id=' . $object->track_id . '">' . img_edit($langs->trans('Modify')) . '</a>';
} }
print '</td></tr>'; print '</td></tr>';
@ -208,7 +208,7 @@ class ActionsTicket
$msg = GETPOST('message_initial', 'alpha') ? GETPOST('message_initial', 'alpha') : $object->message; $msg = GETPOST('message_initial', 'alpha') ? GETPOST('message_initial', 'alpha') : $object->message;
include_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
$uselocalbrowser = true; $uselocalbrowser = true;
$doleditor = new DolEditor('message_initial', $msg, '100%', 250, 'dolibarr_details', 'In', true, $uselocalbrowser, $conf->global->FCKEDITOR_ENABLE_TICKET); $doleditor = new DolEditor('message_initial', $msg, '100%', 250, 'dolibarr_details', 'In', true, $uselocalbrowser, $conf->global->FCKEDITOR_ENABLE_TICKET, ROWS_4, '95%');
$doleditor->Create(); $doleditor->Create();
} else { } else {
// Deal with format differences (text / HTML) // Deal with format differences (text / HTML)

View File

@ -1609,7 +1609,7 @@ class Ticket extends CommonObject
* @param array $filename_list List of files to attach (full path of filename on file system) * @param array $filename_list List of files to attach (full path of filename on file system)
* @param array $mimetype_list List of MIME type of attached files * @param array $mimetype_list List of MIME type of attached files
* @param array $mimefilename_list List of attached file name in message * @param array $mimefilename_list List of attached file name in message
* @return void * @return int <0 if KO, >0 if OK
*/ */
public function createTicketMessage($user, $notrigger = 0, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array()) public function createTicketMessage($user, $notrigger = 0, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array())
{ {

View File

@ -157,6 +157,7 @@ if (empty($reshook)) {
$object = new User($db); $object = new User($db);
$object->fetch($id); $object->fetch($id);
$object->oldcopy = clone $object;
$result = $object->delete($user); $result = $object->delete($user);
if ($result < 0) { if ($result < 0) {

View File

@ -350,7 +350,7 @@ class Users extends DolibarrApi
{ {
throw new RestException(401, 'Access not allowed for login ' . DolibarrApiAccess::$user->login); throw new RestException(401, 'Access not allowed for login ' . DolibarrApiAccess::$user->login);
} }
$this->useraccount->oldcopy = clone $this->useraccount;
return $this->useraccount->delete(DolibarrApiAccess::$user); return $this->useraccount->delete(DolibarrApiAccess::$user);
} }

View File

@ -377,6 +377,7 @@ if (! empty($id) || ! empty($ref))
dol_fiche_end(); dol_fiche_end();
$listofvariantselected = '';
// Create or edit a varian // Create or edit a varian
if ($action == 'add' || ($action == 'edit')) { if ($action == 'add' || ($action == 'edit')) {
@ -386,7 +387,7 @@ if (! empty($id) || ! empty($ref))
//print dol_fiche_head(); //print dol_fiche_head();
$features = $_SESSION['addvariant_'.$object->id]; $features = $_SESSION['addvariant_'.$object->id];
//First, sanitize //First, sanitize
print '<div id="parttoaddvariant">'; $listofvariantselected = '<div id="parttoaddvariant">';
if (! empty($features)) { if (! empty($features)) {
foreach ($features as $feature) { foreach ($features as $feature) {
@ -400,16 +401,14 @@ if (! empty($id) || ! empty($ref))
continue; continue;
} }
print '<i>' . $prodattr->label . '</i>:'. $prodattr_val->value . ' '; $listofvariantselected .= '<i>' . $prodattr->label . '</i>:'. $prodattr_val->value . ' ';
} }
} }
print '</div>'; $listofvariantselected .= '</div>';
print '<br><br>';
//print dol_fiche_end(); //print dol_fiche_end();
} else { } else {
$title = $langs->trans('EditProductCombination'); $title = $langs->trans('EditProductCombination');
} }
print load_fiche_titre($title);
if ($action == 'add') { if ($action == 'add') {
$prodattr_all = $prodattr->fetchAll(); $prodattr_all = $prodattr->fetchAll();
@ -499,6 +498,10 @@ if (! empty($id) || ! empty($ref))
<?php <?php
} }
print '<br>';
print load_fiche_titre($title);
print '<form method="post" id="combinationform" action="'.$_SERVER["PHP_SELF"].'">'."\n"; print '<form method="post" id="combinationform" action="'.$_SERVER["PHP_SELF"].'">'."\n";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="id" value="'.dol_escape_htmltag($id).'">'."\n"; print '<input type="hidden" name="id" value="'.dol_escape_htmltag($id).'">'."\n";
@ -524,6 +527,7 @@ if (! empty($id) || ! empty($ref))
print '<option value="-1">&nbsp;</option>'; print '<option value="-1">&nbsp;</option>';
foreach ($prodattr_all as $attr) foreach ($prodattr_all as $attr)
{ {
//print '<option value="'.$attr->id.'"'.($attr->id == GETPOST('attribute', 'int') ? ' selected="selected"' : '').'>'.$attr->label.'</option>';
print '<option value="'.$attr->id.'">'.$attr->label.'</option>'; print '<option value="'.$attr->id.'">'.$attr->label.'</option>';
} }
print '</select>'; print '</select>';
@ -561,6 +565,10 @@ if (! empty($id) || ! empty($ref))
<input type="submit" class="button" name="selectvariant" id="selectvariant" value="<?php echo dol_escape_htmltag($langs->trans("SelectCombination")); ?>"> <input type="submit" class="button" name="selectvariant" id="selectvariant" value="<?php echo dol_escape_htmltag($langs->trans("SelectCombination")); ?>">
</td> </td>
</tr> </tr>
<tr><td></td><td>
<?php echo $listofvariantselected; ?>
</td>
</tr>
</table> </table>
<?php <?php
} }
@ -781,8 +789,8 @@ if (! empty($id) || ! empty($ref))
</td> </td>
<td class="right"><?php echo ($currcomb->variation_price >= 0 ? '+' : '').price($currcomb->variation_price).($currcomb->variation_price_percentage ? ' %' : '') ?></td> <td class="right"><?php echo ($currcomb->variation_price >= 0 ? '+' : '').price($currcomb->variation_price).($currcomb->variation_price_percentage ? ' %' : '') ?></td>
<?php if ($object->isProduct()) print '<td class="right">'.($currcomb->variation_weight >= 0 ? '+' : '').price($currcomb->variation_weight).' '.measuring_units_string($prodstatic->weight_units, 'weight').'</td>'; ?> <?php if ($object->isProduct()) print '<td class="right">'.($currcomb->variation_weight >= 0 ? '+' : '').price($currcomb->variation_weight).' '.measuring_units_string($prodstatic->weight_units, 'weight').'</td>'; ?>
<td class="center;"><?php echo $prodstatic->getLibStatut(2, 0) ?></td> <td class="center"><?php echo $prodstatic->getLibStatut(2, 0) ?></td>
<td class="center;"><?php echo $prodstatic->getLibStatut(2, 1) ?></td> <td class="center"><?php echo $prodstatic->getLibStatut(2, 1) ?></td>
<td class="right"> <td class="right">
<a class="paddingleft paddingright" href="<?php echo dol_buildpath('/variants/combinations.php?id='.$id.'&action=edit&valueid='.$currcomb->id, 2) ?>"><?php echo img_edit() ?></a> <a class="paddingleft paddingright" href="<?php echo dol_buildpath('/variants/combinations.php?id='.$id.'&action=edit&valueid='.$currcomb->id, 2) ?>"><?php echo img_edit() ?></a>
<a class="paddingleft paddingright" href="<?php echo dol_buildpath('/variants/combinations.php?id='.$id.'&action=delete&valueid='.$currcomb->id, 2) ?>"><?php echo img_delete() ?></a> <a class="paddingleft paddingright" href="<?php echo dol_buildpath('/variants/combinations.php?id='.$id.'&action=delete&valueid='.$currcomb->id, 2) ?>"><?php echo img_delete() ?></a>