Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0

This commit is contained in:
Laurent Destailleur 2017-03-23 21:23:28 +01:00
commit 22b4d0c276
43 changed files with 250 additions and 151 deletions

View File

@ -1301,8 +1301,18 @@ if ($action == 'create')
// Replicate extrafields
$objectsrc->fetch_optionals($originid);
$object->array_options = $objectsrc->array_options;
if (!empty($conf->multicurrency->enabled))
{
if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code;
if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx;
}
}
}
else
{
if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code;
}
$object = new Propal($db);
@ -1480,7 +1490,6 @@ if ($action == 'create')
print '<tr>';
print '<td>'.fieldLabel('Currency','multicurrency_code').'</td>';
print '<td colspan="3" class="maxwidthonsmartphone">';
$currency_code = (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : ($object->multicurrency_code ? $object->multicurrency_code : $conf->currency));
print $form->selectMultiCurrency($currency_code, 'multicurrency_code', 0);
print '</td></tr>';
}
@ -2018,7 +2027,7 @@ if ($action == 'create')
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
print '</tr></table>';
print '</td><td>';
@ -2029,7 +2038,7 @@ if ($action == 'create')
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
} else {
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code);
if ($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code != $conf->currency) {
if ($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
print '<div class="inline-block"> &nbsp; &nbsp; &nbsp; &nbsp; ';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
print '</div>';

View File

@ -2213,7 +2213,7 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
print '</tr></table>';
print '</td><td>';
@ -2224,7 +2224,7 @@ if ($action == 'create' && $user->rights->commande->creer)
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
} else {
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code);
if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code != $conf->currency) {
if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
print '<div class="inline-block"> &nbsp; &nbsp; &nbsp; &nbsp; ';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
print '</div>';

View File

@ -3257,7 +3257,7 @@ else if ($id > 0 || ! empty($ref))
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
print '</tr></table>';
print '</td><td>';
@ -3268,7 +3268,7 @@ else if ($id > 0 || ! empty($ref))
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
} else {
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code);
if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code != $conf->currency) {
if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
print '<div class="inline-block"> &nbsp; &nbsp; &nbsp; &nbsp; ';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
print '</div>';

View File

@ -2102,7 +2102,7 @@ class Contrat extends CommonObject
$sql = "SELECT count(c.rowid) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."contrat as c";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid";
if (!$user->rights->contrat->lire && !$user->societe_id)
if (!$user->rights->societe->client->voir && !$user->societe_id)
{
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
$sql.= " WHERE sc.fk_user = " .$user->id;

View File

@ -78,8 +78,9 @@ class box_factures_imp extends ModeleBoxes
$sql.= " f.total_ttc,";
$sql.= " f.paye, f.fk_statut, f.rowid as facid";
$sql.= ", sum(pf.amount) as am";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid=pf.fk_facture ";
$sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND f.entity = ".$conf->entity;

View File

@ -106,13 +106,13 @@ class box_produits extends ModeleBoxes
$productstatic->entity = $objp->entity;
$this->info_box_contents[$line][] = array(
'td' => 'align="left"',
'td' => '',
'text' => $productstatic->getNomUrl(1),
'asis' => 1,
);
$this->info_box_contents[$line][] = array(
'td' => 'align="left"',
'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
'text' => $objp->label,
);
@ -144,7 +144,7 @@ class box_produits extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'align="left" class="nowrap"',
'td' => 'class="nowrap"',
'text' => $price_base_type,
);
@ -174,14 +174,14 @@ class box_produits extends ModeleBoxes
$db->free($result);
} else {
$this->info_box_contents[0][0] = array(
'td' => 'align="left"',
'td' => '',
'maxlength'=>500,
'text' => ($db->error().' sql='.$sql),
);
}
} else {
$this->info_box_contents[0][0] = array(
'td' => 'align="left"',
'td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"),
);
}

View File

@ -113,13 +113,13 @@ class box_produits_alerte_stock extends ModeleBoxes
$productstatic->entity = $objp->entity;
$this->info_box_contents[$line][] = array(
'td' => 'align="left"',
'td' => '',
'text' => $productstatic->getNomUrl(1),
'asis' => 1,
);
$this->info_box_contents[$line][] = array(
'td' => 'align="left"',
'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
'text' => $objp->label,
);
@ -153,7 +153,7 @@ class box_produits_alerte_stock extends ModeleBoxes
);
$this->info_box_contents[$line][] = array(
'td' => 'align="left" class="nowrap"',
'td' => 'class="nowrap"',
'text' => $price_base_type,
);
@ -180,7 +180,7 @@ class box_produits_alerte_stock extends ModeleBoxes
else
{
$this->info_box_contents[0][0] = array(
'td' => 'align="left"',
'td' => '',
'maxlength'=>500,
'text' => ($db->error().' sql='.$sql),
);
@ -188,7 +188,7 @@ class box_produits_alerte_stock extends ModeleBoxes
}
else {
$this->info_box_contents[0][0] = array(
'td' => 'align="left"',
'td' => '',
'text' => $langs->trans("ReadPermissionNotAllowed"),
);
}

View File

@ -72,33 +72,46 @@ class box_project extends ModeleBoxes
$totalnb = 0;
$totalnbTask=0;
$textHead = $langs->trans("Projects");
$textHead = $langs->trans("OpenedProjects");
$this->info_box_head = array('text' => $textHead, 'limit'=> dol_strlen($textHead));
// list the summary of the orders
if ($user->rights->projet->lire) {
$sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut ";
include_once(DOL_DOCUMENT_ROOT.'/projet/class/project.class.php');
$projectstatic = new Project($this->db);
$socid=$user->societe_id;
// Get list of project id allowed to user (in a string list separated by coma)
$projectsListId='';
if (! $user->rights->projet->all->lire) $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1,$socid);
$sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut, p.public";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
if($user->socid) $sql.= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid=p.fk_soc";
$sql.= " WHERE p.entity = ".$conf->entity;
if($user->socid) $sql.= " AND s.rowid = ".$user->socid;
$sql.= " WHERE p.entity IN (".getEntity('project',1).')';
if (! $user->rights->projet->all->lire) $sql.= " AND p.rowid IN (".$projectsListId.")"; // public and assigned to, or restricted to company for external users
if ($user->socid) $sql.= " AND s.rowid = ".$user->socid;
$sql.= " AND p.fk_statut = 1"; // Seulement les projets ouverts
$sql.= " ORDER BY p.datec DESC";
$sql.= $db->plimit($max, 0);
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id.") OR (s.rowid IS NULL))";
$sql.= " ORDER BY p.datec DESC";
//$sql.= $db->plimit($max, 0);
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);
$i = 0;
while ($i < $num) {
while ($i < min($num, $max)) {
$objp = $db->fetch_object($result);
$tooltip = $langs->trans('Project') . ': ' . $objp->ref;
$this->info_box_contents[$i][0] = array(
'td' => 'align="left" width="16"',
'logo' => 'object_project',
'logo' => 'object_project'.($objp->public?'pub':''),
'tooltip' => $tooltip,
'url' => DOL_URL_ROOT."/projet/card.php?id=".$objp->rowid,
);
@ -117,30 +130,35 @@ class box_project extends ModeleBoxes
$sql ="SELECT count(*) as nb, sum(progress) as totprogress";
$sql.=" FROM ".MAIN_DB_PREFIX."projet as p LEFT JOIN ".MAIN_DB_PREFIX."projet_task as pt on pt.fk_projet = p.rowid";
$sql.=" WHERE p.entity = ".$conf->entity;
$sql.=" AND p.rowid = ".$objp->rowid;
$sql.= " WHERE p.entity IN (".getEntity('project',1).')';
$sql.=" AND p.rowid = ".$objp->rowid;
$resultTask = $db->query($sql);
if ($resultTask) {
$objTask = $db->fetch_object($resultTask);
$this->info_box_contents[$i][3] = array(
'td' => 'align="right"',
'text' => number_format($objTask->nb, 0, ',', ' ')."&nbsp;".$langs->trans("Tasks"),
'td' => 'class="right"',
'text' => $objTask->nb."&nbsp;".$langs->trans("Tasks"),
);
if ($objTask->nb > 0 )
if ($objTask->nb > 0)
$this->info_box_contents[$i][4] = array(
'td' => 'align="right"',
'text' => number_format(($objTask->totprogress/$objTask->nb), 0, ',', ' ')."%",
'td' => 'class="right"',
'text' => round($objTask->totprogress/$objTask->nb, 0)."%",
);
else
$this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => "N/A&nbsp;");
$totalnbTask += $objTask->nb;
} else {
$this->info_box_contents[$i][3] = array('td' => 'align="right"', 'text' => number_format(0, 0, ',', ' '));
$this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => "N/A&nbsp;");
$this->info_box_contents[$i][3] = array('td' => 'class="right"', 'text' => round(0));
$this->info_box_contents[$i][4] = array('td' => 'class="right"', 'text' => "N/A&nbsp;");
}
$i++;
}
if ($max < $num)
{
$this->info_box_contents[$i][0] = array('td' => 'colspan="5"', 'text' => '...');
$i++;
}
}
}
@ -158,11 +176,11 @@ class box_project extends ModeleBoxes
);
$this->info_box_contents[$i][2] = array(
'td' => 'align="right" ',
'text' => number_format($num, 0, ',', ' ')."&nbsp;".$langs->trans("Projects"),
'text' => round($num, 0)."&nbsp;".$langs->trans("Projects"),
);
$this->info_box_contents[$i][3] = array(
'td' => 'align="right" ',
'text' => number_format($totalnbTask, 0, ',', ' ')."&nbsp;".$langs->trans("Tasks"),
'text' => (($max < $num) ? '' : (round($totalnbTask, 0)."&nbsp;".$langs->trans("Tasks"))),
);
$this->info_box_contents[$i][4] = array(
'td' => '',

View File

@ -135,7 +135,7 @@ class box_services_contracts extends ModeleBoxes
'asis' => 1
);
$this->info_box_contents[$i][] = array('td' => '',
$this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
'text' => $thirdpartytmp->getNomUrl(1),
'asis' => 1
);

View File

@ -1024,7 +1024,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$morehtmlleft.='</div>';
}
}
elseif ($conf->browser->layout != 'phone') // Show no photo link
elseif ($conf->browser->layout != 'phone') // Show No photo link (picto of pbject)
{
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">';
if ($object->element == 'action')
@ -1036,7 +1036,9 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
else
{
$width=14; $cssclass='photorefcenter';
$nophoto=img_picto('', 'object_'.$object->picto, '', false, 1);
$picto = $object->picto;
if ($object->element == 'project' && ! $object->public) $picto = 'project'; // instead of projectpub
$nophoto=img_picto('', 'object_'.$picto, '', false, 1);
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.$nophoto.'"></div></div>';
}
$morehtmlleft.='</div>';

View File

@ -721,7 +721,7 @@ class pdf_standard extends ModeleExpenseReport
* @param string $currency Currency code
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0)
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='')
{
global $conf;

View File

@ -554,6 +554,7 @@ class pdf_azur extends ModelePDFPropales
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
else $tvaligne=$object->lines[$i]->total_tva;
$localtax1ligne=$object->lines[$i]->total_localtax1;
$localtax2ligne=$object->lines[$i]->total_localtax2;
$localtax1_rate=$object->lines[$i]->localtax1_tx;

View File

@ -430,7 +430,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$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
$tvaligne=$object->lines[$i]->total_tva;
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
else $tvaligne=$object->lines[$i]->total_tva;
$localtax1ligne=$object->lines[$i]->total_localtax1;
$localtax2ligne=$object->lines[$i]->total_localtax2;

View File

@ -437,8 +437,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$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
$tvaligne=$object->lines[$i]->total_tva;
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
else $tvaligne=$object->lines[$i]->total_tva;
$localtax1ligne=$object->lines[$i]->total_localtax1;
$localtax2ligne=$object->lines[$i]->total_localtax2;
$localtax1_rate=$object->lines[$i]->localtax1_tx;

View File

@ -460,7 +460,9 @@ class pdf_aurore extends ModelePDFSupplierProposal
*/
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
$tvaligne=$object->lines[$i]->total_tva;
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
else $tvaligne=$object->lines[$i]->total_tva;
$localtax1ligne=$object->lines[$i]->total_localtax1;
$localtax2ligne=$object->lines[$i]->total_localtax2;
$localtax1_rate=$object->lines[$i]->localtax1_tx;
@ -560,7 +562,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$posy=$this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs);
// Affiche zone totaux
$posy=$this->_tableau_tot($pdf, $object, 0, $bottomlasttab, $outputlangs);
//$posy=$this->_tableau_tot($pdf, $object, 0, $bottomlasttab, $outputlangs);
// Affiche zone versements
/*

View File

@ -39,6 +39,9 @@ $result = restrictedArea($user, 'expensereport', $id, 'expensereport');
/*
* View
*/
$form = new Form($db);
$title=$langs->trans("ExpenseReport") . " - " . $langs->trans("Info");
$helpurl="EN:Module_Expense_Reports";
llxHeader("",$title,$helpurl);

View File

@ -176,7 +176,7 @@ class CommandeFournisseur extends CommonOrder
// Check parameters
if (empty($id) && empty($ref)) return -1;
$sql = "SELECT c.rowid, c.ref, ref_supplier, c.fk_soc, c.fk_statut, c.amount_ht, c.total_ht, c.total_ttc, c.tva,";
$sql = "SELECT c.rowid, c.ref, ref_supplier, c.fk_soc, c.fk_statut, c.amount_ht, c.total_ht, c.total_ttc, c.tva as total_vat,";
$sql.= " c.localtax1, c.localtax2, ";
$sql.= " c.date_creation, c.date_valid, c.date_approve, c.date_approve2,";
$sql.= " c.fk_user_author, c.fk_user_valid, c.fk_user_approve, c.fk_user_approve2,";
@ -222,7 +222,7 @@ class CommandeFournisseur extends CommonOrder
$this->user_approve_id = $obj->fk_user_approve;
$this->user_approve_id2 = $obj->fk_user_approve2;
$this->total_ht = $obj->total_ht;
$this->total_tva = $obj->tva;
$this->total_tva = $obj->total_vat;
$this->total_localtax1 = $obj->localtax1;
$this->total_localtax2 = $obj->localtax2;
$this->total_ttc = $obj->total_ttc;
@ -1340,9 +1340,11 @@ class CommandeFournisseur extends CommonOrder
* @param array $array_options extrafields array
* @param string $fk_unit Code of the unit to use. Null to use the default one
* @param string $pu_ht_devise Amount in currency
* @param string $origin 'order', ...
* @param int $origin_id Id of origin object
* @return int <=0 if KO, >0 if OK
*/
public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $fk_prod_fourn_price=0, $fourn_ref='', $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $type=0, $info_bits=0, $notrigger=false, $date_start=null, $date_end=null, $array_options=0, $fk_unit=null, $pu_ht_devise=0)
public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $fk_prod_fourn_price=0, $fourn_ref='', $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $type=0, $info_bits=0, $notrigger=false, $date_start=null, $date_end=null, $array_options=0, $fk_unit=null, $pu_ht_devise=0, $origin='', $origin_id=0)
{
global $langs,$mysoc,$conf;
@ -1511,7 +1513,8 @@ class CommandeFournisseur extends CommonOrder
$this->line->total_ttc=$total_ttc;
$this->line->product_type=$type;
$this->line->special_code=$this->special_code;
$this->line->origin=$this->origin;
$this->line->origin=$origin;
$this->line->origin_id=$origin_id;
$this->line->fk_unit=$fk_unit;
$this->line->date_start=$date_start;

View File

@ -1068,7 +1068,10 @@ if (empty($reshook))
null,
null,
array(),
$lines[$i]->fk_unit
$lines[$i]->fk_unit,
0,
$element,
!empty($lines[$i]->id) ? $lines[$i]->id : $lines[$i]->rowid
);
}
@ -1862,7 +1865,7 @@ elseif (! empty($object->id))
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
print '</tr></table>';
print '</td><td>';
@ -1873,7 +1876,7 @@ elseif (! empty($object->id))
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
} else {
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code);
if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code != $conf->currency) {
if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
print '<div class="inline-block"> &nbsp; &nbsp; &nbsp; &nbsp; ';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
print '</div>';

View File

@ -1796,17 +1796,14 @@ if ($action == 'create')
echo '</td></tr>';
print '<tr><td>'.$langs->trans('TotalHT').'</td><td colspan="2">'.price($objectsrc->total_ht).'</td></tr>';
print '<tr><td>'.$langs->trans('TotalVAT').'</td><td colspan="2">'.price($objectsrc->total_tva)."</td></tr>";
if ($mysoc->country_code=='ES')
if ($mysoc->localtax1_assuj=="1" || $object->total_localtax1 != 0) //Localtax1
{
if ($mysoc->localtax1_assuj=="1" || $object->total_localtax1 != 0) //Localtax1
{
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td><td colspan="2">'.price($objectsrc->total_localtax1)."</td></tr>";
}
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td><td colspan="2">'.price($objectsrc->total_localtax1)."</td></tr>";
}
if ($mysoc->localtax2_assuj=="1" || $object->total_localtax2 != 0) //Localtax2
{
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td><td colspan="2">'.price($objectsrc->total_localtax2)."</td></tr>";
}
if ($mysoc->localtax2_assuj=="1" || $object->total_localtax2 != 0) //Localtax2
{
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td><td colspan="2">'.price($objectsrc->total_localtax2)."</td></tr>";
}
print '<tr><td>'.$langs->trans('TotalTTC').'</td><td colspan="2">'.price($objectsrc->total_ttc)."</td></tr>";
@ -2165,7 +2162,7 @@ else
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
@ -2176,7 +2173,7 @@ else
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
} else {
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code);
if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code != $conf->currency) {
if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
print '<div class="inline-block"> &nbsp; &nbsp; &nbsp; &nbsp; ';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
print '</div>';

View File

@ -166,6 +166,7 @@ ALTER TABLE llx_commandedet ADD COLUMN vat_src_code varchar(10) DEFAULT '' AFTER
ALTER TABLE llx_commande_fournisseurdet ADD COLUMN vat_src_code varchar(10) DEFAULT '' AFTER tva_tx;
ALTER TABLE llx_propaldet ADD COLUMN vat_src_code varchar(10) DEFAULT '' AFTER tva_tx;
ALTER TABLE llx_supplier_proposaldet ADD COLUMN vat_src_code varchar(10) DEFAULT '' AFTER tva_tx;
ALTER TABLE llx_supplier_proposaldet ADD COLUMN fk_unit integer DEFAULT NULL;
ALTER TABLE llx_contratdet ADD COLUMN vat_src_code varchar(10) DEFAULT '' AFTER tva_tx;
ALTER TABLE llx_c_payment_term change fdm type_cdr tinyint;

View File

@ -51,5 +51,6 @@ CREATE TABLE llx_supplier_proposaldet (
multicurrency_subprice double(24,8) DEFAULT 0,
multicurrency_total_ht double(24,8) DEFAULT 0,
multicurrency_total_tva double(24,8) DEFAULT 0,
multicurrency_total_ttc double(24,8) DEFAULT 0
multicurrency_total_ttc double(24,8) DEFAULT 0,
fk_unit integer DEFAULT NULL -- lien vers table des unités
) ENGINE=innodb;

View File

@ -82,7 +82,7 @@ Mask=Mask
NextValue=Next value
NextValueForInvoices=Next value (invoices)
NextValueForCreditNotes=Next value (credit notes)
NextValueForDeposit=Next value (deposit)
NextValueForDeposit=Next value (down payment)
NextValueForReplacements=Next value (replacements)
MustBeLowerThanPHPLimit=Note: your PHP limits each file upload's size to <b>%s</b> %s, whatever this parameter's value is
NoMaxSizeByPHPLimit=Note: No limit is set in your PHP configuration
@ -1079,7 +1079,7 @@ TotalNumberOfActivatedModules=Total number of activated feature modules: <b>%s</
YouMustEnableOneModule=You must at least enable 1 module
ClassNotFoundIntoPathWarning=Class %s not found into PHP path
YesInSummer=Yes in summer
OnlyFollowingModulesAreOpenedToExternalUsers=Note, only following modules are open to external users (whatever are permission of such users) and only if permissions were granted:
OnlyFollowingModulesAreOpenedToExternalUsers=Note, only following modules are opened to external users (whatever are permission of such users) and only if permissions were granted:
SuhosinSessionEncrypt=Session storage encrypted by Suhosin
ConditionIsCurrently=Condition is currently %s
YouUseBestDriver=You use driver %s that is best driver available currently.

View File

@ -51,8 +51,8 @@ MemberResiliatedInDolibarr=Member %s terminated
MemberDeletedInDolibarr=Member %s deleted
MemberSubscriptionAddedInDolibarr=Subscription for member %s added
ShipmentValidatedInDolibarr=Shipment %s validated
ShipmentClassifyClosedInDolibarr=Shipment %s classify billed
ShipmentUnClassifyCloseddInDolibarr=Shipment %s classify reopened
ShipmentClassifyClosedInDolibarr=Shipment %s classified billed
ShipmentUnClassifyCloseddInDolibarr=Shipment %s classified reopened
ShipmentDeletedInDolibarr=Shipment %s deleted
OrderCreatedInDolibarr=Order %s created
OrderValidatedInDolibarr=Order %s validated

View File

@ -74,13 +74,13 @@ Conciliate=Reconcile
Conciliation=Reconciliation
ReconciliationLate=Reconciliation late
IncludeClosedAccount=Include closed accounts
OnlyOpenedAccount=Only opened accounts
OnlyOpenedAccount=Only open accounts
AccountToCredit=Account to credit
AccountToDebit=Account to debit
DisableConciliation=Disable reconciliation feature for this account
ConciliationDisabled=Reconciliation feature disabled
LinkedToAConciliatedTransaction=Linked to a conciliated entry
StatusAccountOpened=Opened
StatusAccountOpened=Open
StatusAccountClosed=Closed
AccountIdShort=Number
LineRecord=Transaction

View File

@ -15,9 +15,9 @@ DisabledBecauseNotErasable=Disabled because cannot be erased
InvoiceStandard=Standard invoice
InvoiceStandardAsk=Standard invoice
InvoiceStandardDesc=This kind of invoice is the common invoice.
InvoiceDeposit=Deposit invoice
InvoiceDepositAsk=Deposit invoice
InvoiceDepositDesc=This kind of invoice is done when a deposit has been received.
InvoiceDeposit=Down payment invoice
InvoiceDepositAsk=Down payment invoice
InvoiceDepositDesc=This kind of invoice is done when a down payment has been received.
InvoiceProForma=Proforma invoice
InvoiceProFormaAsk=Proforma invoice
InvoiceProFormaDesc=<b>Proforma invoice</b> is an image of a true invoice but has no accountancy value.
@ -63,7 +63,7 @@ paymentInInvoiceCurrency=in invoices currency
PaidBack=Paid back
DeletePayment=Delete payment
ConfirmDeletePayment=Are you sure you want to delete this payment?
ConfirmConvertToReduc=Do you want to convert this credit note or deposit into an absolute discount?<br>The amount will so be saved among all discounts and could be used as a discount for a current or a future invoice for this customer.
ConfirmConvertToReduc=Do you want to convert this credit note or down payment into an absolute discount?<br>The amount will so be saved among all discounts and could be used as a discount for a current or a future invoice for this customer.
SupplierPayments=Suppliers payments
ReceivedPayments=Received payments
ReceivedCustomersPayments=Payments received from customers
@ -196,12 +196,12 @@ ShowBill=Show invoice
ShowInvoice=Show invoice
ShowInvoiceReplace=Show replacing invoice
ShowInvoiceAvoir=Show credit note
ShowInvoiceDeposit=Show deposit invoice
ShowInvoiceDeposit=Show down payment invoice
ShowInvoiceSituation=Show situation invoice
ShowPayment=Show payment
AlreadyPaid=Already paid
AlreadyPaidBack=Already paid back
AlreadyPaidNoCreditNotesNoDeposits=Already paid (without credit notes and deposits)
AlreadyPaidNoCreditNotesNoDeposits=Already paid (without credit notes and down payments)
Abandoned=Abandoned
RemainderToPay=Remaining unpaid
RemainderToTake=Remaining amount to take
@ -268,10 +268,10 @@ RelativeDiscount=Relative discount
GlobalDiscount=Global discount
CreditNote=Credit note
CreditNotes=Credit notes
Deposit=Deposit
Deposits=Deposits
Deposit=Down payment
Deposits=Down payments
DiscountFromCreditNote=Discount from credit note %s
DiscountFromDeposit=Payments from deposit invoice %s
DiscountFromDeposit=Down payments from invoice %s
AbsoluteDiscountUse=This kind of credit can be used on invoice before its validation
CreditNoteDepositUse=Invoice must be validated to use this kind of credits
NewGlobalDiscount=New absolute discount
@ -422,7 +422,7 @@ ChequeDeposits=Checks deposits
Cheques=Checks
DepositId=Id deposit
NbCheque=Number of checks
CreditNoteConvertedIntoDiscount=This credit note or deposit invoice has been converted into %s
CreditNoteConvertedIntoDiscount=This credit note or down payment invoice has been converted into %s
UsBillingContactAsIncoiveRecipientIfExist=Use customer billing contact address instead of third party address as recipient for invoices
ShowUnpaidAll=Show all unpaid invoices
ShowUnpaidLateOnly=Show late unpaid invoices only
@ -451,9 +451,9 @@ YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice firs
PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (recommended Template)
PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices
TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for deposit invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for down payment invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module.
CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for deposit invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for credit notes and %syymm-nnnn for down payment invoices where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
##### Types de contacts #####
TypeContact_facture_internal_SALESREPFOLL=Representative following-up customer invoice
TypeContact_facture_external_BILLING=Customer invoice contact

View File

@ -254,7 +254,7 @@ CustomerRelativeDiscountShort=Relative discount
CustomerAbsoluteDiscountShort=Absolute discount
CompanyHasRelativeDiscount=This customer has a default discount of <b>%s%%</b>
CompanyHasNoRelativeDiscount=This customer has no relative discount by default
CompanyHasAbsoluteDiscount=This customer still has discount credits or deposits for <b>%s</b> %s
CompanyHasAbsoluteDiscount=This customer has discount available (credits notes or down payments) for <b>%s</b> %s
CompanyHasCreditNote=This customer still has credit notes for <b>%s</b> %s
CompanyHasNoAbsoluteDiscount=This customer has no discount credit available
CustomerAbsoluteDiscountAllUsers=Absolute discounts (granted by all users)
@ -385,7 +385,7 @@ ListCustomersShort=List of customers
ThirdPartiesArea=Third parties and contact area
LastModifiedThirdParties=Latest %s modified third parties
UniqueThirdParties=Total of unique third parties
InActivity=Opened
InActivity=Open
ActivityCeased=Closed
ThirdPartyIsClosed=Third party is closed
ProductsIntoElements=List of products/services into %s

View File

@ -133,8 +133,8 @@ RulesResultDue=- It includes outstanding invoices, expenses, VAT, donations whet
RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT and salaries. <br>- It is based on the payment dates of the invoices, expenses, VAT and salaries. The donation date for donation.
RulesCADue=- It includes the client's due invoices whether they are paid or not. <br>- It is based on the validation date of these invoices.<br>
RulesCAIn=- It includes all the effective payments of invoices received from clients.<br>- It is based on the payment date of these invoices<br>
DepositsAreNotIncluded=- Deposit invoices are nor included
DepositsAreIncluded=- Deposit invoices are included
DepositsAreNotIncluded=- Down payment invoices are nor included
DepositsAreIncluded=- Down payment invoices are included
LT2ReportByCustomersInInputOutputModeES=Report by third party IRPF
LT1ReportByCustomersInInputOutputModeES=Report by third party RE
VATReport=VAT report
@ -168,7 +168,7 @@ DescSellsJournal=Sales Journal
DescPurchasesJournal=Purchases Journal
InvoiceRef=Invoice ref.
CodeNotDef=Not defined
WarningDepositsNotIncluded=Deposits invoices are not included in this version with this accountancy module.
WarningDepositsNotIncluded=Down payment invoices are not included in this version with this accountancy module.
DatePaymentTermCantBeLowerThanObjectDate=Payment term date can't be lower than object date.
Pcg_version=Chart of accounts models
Pcg_type=Pcg type

View File

@ -171,7 +171,7 @@ SearchOf=Search
Valid=Valid
Approve=Approve
Disapprove=Disapprove
ReOpen=Re-Open
ReOpen=Re-Opened
Upload=Send file
ToLink=Link
Select=Select
@ -406,7 +406,7 @@ Duration=Duration
TotalDuration=Total duration
Summary=Summary
DolibarrStateBoard=Statistics
DolibarrWorkBoard=Work tasks board
DolibarrWorkBoard=Open items board
Available=Available
NotYetAvailable=Not yet available
NotAvailable=Not available
@ -434,7 +434,7 @@ Reportings=Reporting
Draft=Draft
Drafts=Drafts
Validated=Validated
Opened=Opened
Opened=Open
New=New
Discount=Discount
Unknown=Unknown

View File

@ -29,9 +29,9 @@ DeleteAProject=Delete a project
DeleteATask=Delete a task
ConfirmDeleteAProject=Are you sure you want to delete this project?
ConfirmDeleteATask=Are you sure you want to delete this task?
OpenedProjects=Opened projects
OpenedTasks=Opened tasks
OpportunitiesStatusForOpenedProjects=Opportunities amount of opened projects by status
OpenedProjects=Open projects
OpenedTasks=Open tasks
OpportunitiesStatusForOpenedProjects=Opportunities amount of open projects by status
OpportunitiesStatusForProjects=Opportunities amount of projects by status
ShowProject=Show project
SetProject=Set project
@ -47,7 +47,7 @@ TaskTimeSpent=Time spent on tasks
TaskTimeUser=User
TaskTimeNote=Note
TaskTimeDate=Date
TasksOnOpenedProject=Tasks on opened projects
TasksOnOpenedProject=Tasks on open projects
WorkloadNotDefined=Workload not defined
NewTimeSpent=New time spent
MyTimeSpent=My time spent
@ -179,9 +179,9 @@ ProjectsStatistics=Statistics on projects/leads
TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible.
IdTaskTime=Id task time
YouCanCompleteRef=If you want to complete the ref with some information (to use it as search filters), it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-ABC. You may also prefer to add search keys into label. But best practice may be to add a dedicated field, also called complementary attributes.
OpenedProjectsByThirdparties=Opened projects by thirdparties
OpenedProjectsByThirdparties=Open projects by thirdparties
OnlyOpportunitiesShort=Only opportunities
OpenedOpportunitiesShort=Opened opportunities
OpenedOpportunitiesShort=Open opportunities
NotAnOpportunityShort=Not an opportunity
OpportunityTotalAmount=Opportunities total amount
OpportunityPonderatedAmount=Opportunities weighted amount

View File

@ -3,7 +3,7 @@ Proposals=Commercial proposals
Proposal=Commercial proposal
ProposalShort=Proposal
ProposalsDraft=Draft commercial proposals
ProposalsOpened=Opened commercial proposals
ProposalsOpened=Open commercial proposals
Prop=Commercial proposals
CommercialProposal=Commercial proposal
ProposalCard=Proposal card
@ -26,9 +26,9 @@ AmountOfProposalsByMonthHT=Amount by month (net of tax)
NbOfProposals=Number of commercial proposals
ShowPropal=Show proposal
PropalsDraft=Drafts
PropalsOpened=Opened
PropalsOpened=Open
PropalStatusDraft=Draft (needs to be validated)
PropalStatusValidated=Validated (proposal is opened)
PropalStatusValidated=Validated (proposal is open)
PropalStatusSigned=Signed (needs billing)
PropalStatusNotSigned=Not signed (closed)
PropalStatusBilled=Billed

View File

@ -51,10 +51,10 @@ ActionsOnShipping=Events on shipment
LinkToTrackYourPackage=Link to track your package
ShipmentCreationIsDoneFromOrder=For the moment, creation of a new shipment is done from the order card.
ShipmentLine=Shipment line
ProductQtyInCustomersOrdersRunning=Product quantity into opened customers orders
ProductQtyInSuppliersOrdersRunning=Product quantity into opened suppliers orders
ProductQtyInShipmentAlreadySent=Product quantity from opened customer order already sent
ProductQtyInSuppliersShipmentAlreadyRecevied=Product quantity from opened supplier order already received
ProductQtyInCustomersOrdersRunning=Product quantity into open customers orders
ProductQtyInSuppliersOrdersRunning=Product quantity into open suppliers orders
ProductQtyInShipmentAlreadySent=Product quantity from oped customer order already sent
ProductQtyInSuppliersShipmentAlreadyRecevied=Product quantity from open supplier order already received
NoProductToShipFoundIntoStock=No product to ship found into warehouse <b>%s</b>. Correct stock or go back to choose another warehouse.
WeightVolShort=Weight/Vol.
ValidateOrderFirstBeforeShipment=You must first validate the order before being able to make shipments.

View File

@ -72,7 +72,7 @@ RealStock=Real Stock
RealStockDesc=Physical or real stock is the stock you currently have into your internal warehouses/emplacements.
RealStockWillAutomaticallyWhen=The real stock will automatically change according to this rules (see stock module setup to change this):
VirtualStock=Virtual stock
VirtualStockDesc=Virtual stock is the stock you will get once all opened pending actions that affect stocks will be closed (supplier order received, customer order shipped, ...)
VirtualStockDesc=Virtual stock is the stock you will get once all open pending actions that affect stocks will be closed (supplier order received, customer order shipped, ...)
IdWarehouse=Id warehouse
DescWareHouse=Description warehouse
LieuWareHouse=Localisation warehouse

View File

@ -8,7 +8,7 @@ SearchRequest=Find a request
DraftRequests=Draft requests
SupplierProposalsDraft=Draft supplier proposals
LastModifiedRequests=Latest %s modified price requests
RequestsOpened=Opened price requests
RequestsOpened=Open price requests
SupplierProposalArea=Supplier proposals area
SupplierProposalShort=Supplier proposal
SupplierProposals=Supplier proposals
@ -23,7 +23,7 @@ ConfirmValidateAsk=Are you sure you want to validate this price request under na
DeleteAsk=Delete request
ValidateAsk=Validate request
SupplierProposalStatusDraft=Draft (needs to be validated)
SupplierProposalStatusValidated=Validated (request is opened)
SupplierProposalStatusValidated=Validated (request is open)
SupplierProposalStatusClosed=Closed
SupplierProposalStatusSigned=Accepted
SupplierProposalStatusNotSigned=Refused

View File

@ -577,9 +577,10 @@ if (! defined('NOLOGIN'))
{
// We are already into an authenticated session
$login=$_SESSION["dol_login"];
dol_syslog("This is an already logged session. _SESSION['dol_login']=".$login, LOG_DEBUG);
$entity=$_SESSION["dol_entity"];
dol_syslog("This is an already logged session. _SESSION['dol_login']=".$login." _SESSION['dol_entity']=".$entity, LOG_DEBUG);
$resultFetchUser=$user->fetch('',$login);
$resultFetchUser=$user->fetch('',$login,'',1,($entity > 0 ? $entity : -1));
if ($resultFetchUser <= 0)
{
// Account has been removed after login

View File

@ -155,7 +155,6 @@ $genPriceOptions = function($level) use ($price_options) {
return $return;
};
?>
<table class="noborder">
@ -173,7 +172,8 @@ $genPriceOptions = function($level) use ($price_options) {
<td class="fieldrequired" style="text-align: center"><?php
echo $langs->trans('SellingPrice').' '.$i;
// Label of price
if (! empty($conf->global->{"PRODUIT_MULTIPRICES_LABEL$i"})) {
$keyforlabel='PRODUIT_MULTIPRICES_LABEL'.$i;
if (! empty($conf->global->$keyforlabel)) {
print ' - '.$langs->trans($conf->global->$keyforlabel);
}
?>

View File

@ -12,7 +12,7 @@
* Copyright (C) 2014 Henry Florian <florian.henry@open-concept.pro>
* Copyright (C) 2014-2016 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2014 Ion agorria <ion@agorria.com>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2016-2017 Ferran Marcet <fmarcet@2byte.es>
*
* 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
@ -816,7 +816,7 @@ class Product extends CommonObject
// End call triggers
}
if (! $error && (is_object($this->oldcopy) && $this->oldcopy->ref != $this->ref))
if (! $error && (is_object($this->oldcopy) && $this->oldcopy->ref !== $this->ref))
{
// We remove directory
if ($conf->product->dir_output)

View File

@ -3,7 +3,8 @@
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014-2017 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
*
* 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
@ -301,7 +302,7 @@ class Project extends CommonObject
}
}
if (! $error && (is_object($this->oldcopy) && $this->oldcopy->ref != $this->ref))
if (! $error && (is_object($this->oldcopy) && $this->oldcopy->ref !== $this->ref))
{
// We remove directory
if ($conf->projet->dir_output)
@ -1736,16 +1737,19 @@ class Project extends CommonObject
*/
function load_state_board()
{
global $conf;
global $user;
$this->nb=array();
$sql = "SELECT count(u.rowid) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as u";
$sql = "SELECT count(p.rowid) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= " WHERE";
//$sql.= " WHERE u.fk_statut > 0";
//$sql.= " AND employee != 0";
$sql.= " u.entity IN (".getEntity('projet', 1).")";
$sql.= " p.entity IN (".getEntity('projet', 1).")";
if (! $user->rights->projet->all->lire)
{
$projectsListId = $this->getProjectsAuthorizedForUser($user,0,1);
$sql .= "AND p.rowid IN (".$projectsListId.")";
}
$resql=$this->db->query($sql);
if ($resql)

View File

@ -680,7 +680,9 @@ foreach ($listofreferent as $key => $value)
{
$addform.='<div class="inline-block valignmiddle">';
if ($testnew) $addform.='<a class="buttonxxx" href="'.$urlnew.'">'.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).'</a>';
else $addform.='<a class="buttonxxx buttonRefused" disabled="disabled" href="#">'.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).'</a>';
elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) {
$addform.='<a class="buttonxxx buttonRefused" disabled="disabled" href="#">'.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).'</a>';
}
$addform.='<div>';
}
@ -1041,7 +1043,7 @@ foreach ($listofreferent as $key => $value)
print '<td align="right">';
if (empty($value['disableamount']))
{
if (! empty($conf->salaries->enabled)) print ''.$langs->trans("TotalHT").' : '.price($total_ht);
if ($tablename != 'projet_task' || ! empty($conf->salaries->enabled)) print ''.$langs->trans("TotalHT").' : '.price($total_ht);
}
print '</td>';
//if (empty($value['disableamount']) && ! in_array($tablename, array('projet_task'))) print '<td align="right" width="100">'.$langs->trans("TotalTTC").' : '.price($total_ttc).'</td>';
@ -1049,8 +1051,7 @@ foreach ($listofreferent as $key => $value)
print '<td align="right">';
if (empty($value['disableamount']))
{
if (! empty($conf->salaries->enabled)) print $langs->trans("TotalTTC").' : '.price($total_ttc);
if ($tablename != 'projet_task' || ! empty($conf->salaries->enabled)) print $langs->trans("TotalTTC").' : '.price($total_ttc);
}
print '</td>';
print '<td>&nbsp;</td>';

View File

@ -196,6 +196,7 @@ $title=$langs->trans("Projects");
if ($search_user == $user->id) $title=$langs->trans("MyProjects");
// Get list of project id allowed to user (in a string list separated by coma)
$projectsListId='';
if (! $user->rights->projet->all->lire) $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1,$socid);
// Get id of types of contacts for projects (This list never contains a lot of elements)
@ -245,7 +246,7 @@ if ($search_user > 0)
$sql.= " WHERE p.entity IN (".getEntity('project',1).')';
if (! $user->rights->projet->all->lire) $sql.= " AND p.rowid IN (".$projectsListId.")"; // public and assigned to, or restricted to company for external users
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$db->escape($search_categ);
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
if ($search_ref) $sql .= natural_search('p.ref', $search_ref);

View File

@ -354,7 +354,7 @@ if (empty($reshook))
$array_options = $lines[$i]->array_options;
}
$result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $lines[$i]->tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, 'HT', 0, $lines[$i]->info_bits, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_options);
$result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $lines[$i]->tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, 'HT', 0, $lines[$i]->info_bits, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_options, $lines[$i]->ref_fourn, $lines[$i]->fk_unit);
if ($result > 0) {
$lineid = $result;
@ -633,7 +633,8 @@ if (empty($reshook))
$buyingprice,
$label,
$array_options,
$ref_fourn
$ref_fourn,
$fk_unit
);
//var_dump($tva_tx);var_dump($productsupplier->fourn_pu);var_dump($price_base_type);exit;
}
@ -683,7 +684,7 @@ if (empty($reshook))
$price_base_type = 'HT';
}
$result = $object->addline($desc, $ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $ttc, $info_bits, $type, - 1, 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_options, $ref_fourn);
$result = $object->addline($desc, $ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $ttc, $info_bits, $type, - 1, 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_options, $ref_fourn, $fk_unit);
//$result = $object->addline($desc, $ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, 0, 0, '', $remise_percent, $price_base_type, $ttc, $type,'','', $date_start, $date_end, $array_options, $fk_unit);
}
@ -826,7 +827,8 @@ if (empty($reshook))
if (! $error) {
$db->begin();
$ref_fourn = GETPOST('fourn_ref');
$result = $object->updateline(GETPOST('lineid'), $pu_ht, GETPOST('qty'), GETPOST('remise_percent'), $vat_rate, $localtax1_rate, $localtax2_rate, $description, 'HT', $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $array_options, $ref_fourn);
$fk_unit = GETPOST('units');
$result = $object->updateline(GETPOST('lineid'), $pu_ht, GETPOST('qty'), GETPOST('remise_percent'), $vat_rate, $localtax1_rate, $localtax2_rate, $description, 'HT', $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $array_options, $ref_fourn, $fk_unit);
if ($result >= 0) {
$db->commit();
@ -1040,6 +1042,15 @@ if ($action == 'create')
$objectsrc->fetch_optionals($originid);
$object->array_options = $objectsrc->array_options;
if (!empty($conf->multicurrency->enabled))
{
if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code;
if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx;
}
}
else
{
if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code;
}
$object = new SupplierProposal($db);
@ -1149,7 +1160,6 @@ if ($action == 'create')
print '<tr>';
print '<td>'.fieldLabel('Currency','multicurrency_code').'</td>';
print '<td colspan="3" class="maxwidthonsmartphone">';
$currency_code = (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : ($object->multicurrency_code ? $object->multicurrency_code : $conf->currency));
print $form->selectMultiCurrency($currency_code, 'multicurrency_code');
print '</td></tr>';
}
@ -1196,6 +1206,13 @@ if ($action == 'create')
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax2) . "</td></tr>";
}
print '<tr><td>' . $langs->trans('TotalTTC') . '</td><td colspan="2">' . price($objectsrc->total_ttc) . "</td></tr>";
if (!empty($conf->multicurrency->enabled))
{
print '<tr><td>' . $langs->trans('MulticurrencyTotalHT') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('MulticurrencyTotalVAT') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_tva) . "</td></tr>";
print '<tr><td>' . $langs->trans('MulticurrencyTotalTTC') . '</td><td colspan="2">' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>";
}
}
print "</table>\n";
@ -1491,14 +1508,22 @@ if ($action == 'create')
print '<table class="nobordernopadding" width="100%"><tr><td>';
print fieldLabel('CurrencyRate','multicurrency_tx');
print '</td>';
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon))
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'editmulticurrencyrate') {
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') {
if($action == 'actualizemulticurrencyrate') {
list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code);
}
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
} else {
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code);
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code);
if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
print '<div class="inline-block"> &nbsp; &nbsp; &nbsp; &nbsp; ';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
print '</div>';
}
}
print '</td></tr>';
}

View File

@ -355,11 +355,12 @@ class SupplierProposal extends CommonObject
* @param string $label ???
* @param array $array_option extrafields array
* @param string $ref_fourn Supplier price reference
* @param int $fk_unit Id of the unit to use.
* @return int >0 if OK, <0 if KO
*
* @see add_product
*/
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$array_option=0, $ref_fourn='')
function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$array_option=0, $ref_fourn='', $fk_unit='')
{
global $mysoc;
@ -460,6 +461,7 @@ class SupplierProposal extends CommonObject
$this->line->product_type=$type;
$this->line->special_code=$special_code;
$this->line->fk_parent_line=$fk_parent_line;
$this->line->fk_unit=$fk_unit;
$this->line->ref_fourn = $this->db->escape($ref_fourn);
@ -546,9 +548,10 @@ class SupplierProposal extends CommonObject
* @param int $type 0/1=Product/service
* @param array $array_option extrafields array
* @param string $ref_fourn Supplier price reference
* @param int $fk_unit Id of the unit to use.
* @return int 0 if OK, <0 if KO
*/
function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=0, $pa_ht=0, $label='', $type=0, $array_option=0, $ref_fourn='')
function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=0, $pa_ht=0, $label='', $type=0, $array_option=0, $ref_fourn='', $fk_unit='')
{
global $conf,$user,$langs, $mysoc;
@ -634,7 +637,8 @@ class SupplierProposal extends CommonObject
$this->line->special_code = $special_code;
$this->line->fk_parent_line = $fk_parent_line;
$this->line->skip_update_total = $skip_update_total;
$this->line->ref_fourn = $ref_fourn;
$this->line->ref_fourn = $ref_fourn;
$this->line->fk_unit = $fk_unit;
// infos marge
if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) {
@ -1195,7 +1199,7 @@ class SupplierProposal extends CommonObject
$sql.= " d.info_bits, d.total_ht, d.total_tva, d.total_localtax1, d.total_localtax2, d.total_ttc, d.fk_product_fournisseur_price as fk_fournprice, d.buy_price_ht as pa_ht, d.special_code, d.rang, d.product_type,";
$sql.= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label,';
$sql.= ' d.ref_fourn as ref_produit_fourn,';
$sql.= ' d.fk_multicurrency, d.multicurrency_code, d.multicurrency_subprice, d.multicurrency_total_ht, d.multicurrency_total_tva, d.multicurrency_total_ttc';
$sql.= ' d.fk_multicurrency, d.multicurrency_code, d.multicurrency_subprice, d.multicurrency_total_ht, d.multicurrency_total_tva, d.multicurrency_total_ttc, d.fk_unit';
$sql.= " FROM ".MAIN_DB_PREFIX."supplier_proposaldet as d";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON d.fk_product = p.rowid";
$sql.= " WHERE d.fk_supplier_proposal = ".$this->id;
@ -1261,6 +1265,7 @@ class SupplierProposal extends CommonObject
$line->multicurrency_total_ht = $objp->multicurrency_total_ht;
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
$line->fk_unit = $objp->fk_unit;
$this->lines[$i] = $line;
@ -2429,7 +2434,7 @@ class SupplierProposal extends CommonObject
$sql.= ' pt.product_type, pt.rang, pt.fk_parent_line,';
$sql.= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid,';
$sql.= ' p.description as product_desc, pt.ref_fourn as ref_produit_fourn';
$sql.= ' ,pt.fk_multicurrency, pt.multicurrency_code, pt.multicurrency_subprice, pt.multicurrency_total_ht, pt.multicurrency_total_tva, pt.multicurrency_total_ttc';
$sql.= ' ,pt.fk_multicurrency, pt.multicurrency_code, pt.multicurrency_subprice, pt.multicurrency_total_ht, pt.multicurrency_total_tva, pt.multicurrency_total_ttc, pt.fk_unit';
$sql.= ' FROM '.MAIN_DB_PREFIX.'supplier_proposaldet as pt';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product=p.rowid';
$sql.= ' WHERE pt.fk_supplier_proposal = '.$this->id;
@ -2484,6 +2489,7 @@ class SupplierProposal extends CommonObject
$this->lines[$i]->multicurrency_total_ht = $obj->multicurrency_total_ht;
$this->lines[$i]->multicurrency_total_tva = $obj->multicurrency_total_tva;
$this->lines[$i]->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
$this->lines[$i]->fk_unit = $obj->fk_unit;
$i++;
}
@ -2557,7 +2563,7 @@ class SupplierProposal extends CommonObject
* \class SupplierProposalLine
* \brief Class to manage supplier_proposal lines
*/
class SupplierProposalLine extends CommonObject
class SupplierProposalLine extends CommonObjectLine
{
var $db;
var $error;
@ -2693,7 +2699,7 @@ class SupplierProposalLine extends CommonObject
$sql.= ' pd.localtax1_tx, pd.localtax2_tx, pd.total_localtax1, pd.total_localtax2,';
$sql.= ' p.ref as product_ref, p.label as product_label, p.description as product_desc,';
$sql.= ' pd.product_type, pd.ref_fourn as ref_produit_fourn,';
$sql.= ' pd.fk_multicurrency, pd.multicurrency_code, pd.multicurrency_subprice, pd.multicurrency_total_ht, pd.multicurrency_total_tva, pd.multicurrency_total_ttc';
$sql.= ' pd.fk_multicurrency, pd.multicurrency_code, pd.multicurrency_subprice, pd.multicurrency_total_ht, pd.multicurrency_total_tva, pd.multicurrency_total_ttc, pd.fk_unit';
$sql.= ' FROM '.MAIN_DB_PREFIX.'supplier_proposaldet as pd';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pd.fk_product = p.rowid';
$sql.= ' WHERE pd.rowid = '.$rowid;
@ -2749,6 +2755,7 @@ class SupplierProposalLine extends CommonObject
$this->multicurrency_total_ht = $objp->multicurrency_total_ht;
$this->multicurrency_total_tva = $objp->multicurrency_total_tva;
$this->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
$this->fk_unit = $objp->fk_unit;
$this->db->free($result);
}
@ -2787,7 +2794,8 @@ class SupplierProposalLine extends CommonObject
if (empty($this->special_code)) $this->special_code=0;
if (empty($this->fk_parent_line)) $this->fk_parent_line=0;
if (empty($this->fk_fournprice)) $this->fk_fournprice=0;
if (empty($this->fk_unit)) $this->fk_unit=0;
if (empty($this->pa_ht)) $this->pa_ht=0;
// if buy price not defined, define buyprice as configured in margin admin
@ -2816,7 +2824,7 @@ class SupplierProposalLine extends CommonObject
$sql.= ' info_bits, ';
$sql.= ' total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_product_fournisseur_price, buy_price_ht, special_code, rang,';
$sql.= ' ref_fourn';
$sql.= ', fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc)';
$sql.= ', fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc, fk_unit)';
$sql.= " VALUES (".$this->fk_supplier_proposal.",";
$sql.= " ".($this->fk_parent_line>0?"'".$this->fk_parent_line."'":"null").",";
$sql.= " ".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null").",";
@ -2849,7 +2857,8 @@ class SupplierProposalLine extends CommonObject
$sql.= ", ".$this->multicurrency_total_ht;
$sql.= ", ".$this->multicurrency_total_tva;
$sql.= ", ".$this->multicurrency_total_ttc;
$sql.= ')';
$sql.= ", ".$this->fk_unit;
$sql.= ')';
dol_syslog(get_class($this).'::insert', LOG_DEBUG);
$resql=$this->db->query($sql);
@ -2969,7 +2978,8 @@ class SupplierProposalLine extends CommonObject
if (empty($this->special_code)) $this->special_code=0;
if (empty($this->fk_parent_line)) $this->fk_parent_line=0;
if (empty($this->fk_fournprice)) $this->fk_fournprice=0;
if (empty($this->fk_unit)) $this->fk_unit=0;
if (empty($this->pa_ht)) $this->pa_ht=0;
// if buy price not defined, define buyprice as configured in margin admin
@ -3023,8 +3033,9 @@ class SupplierProposalLine extends CommonObject
$sql.= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht)."";
$sql.= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva)."";
$sql.= " , multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc)."";
$sql.= " , fk_unit=".$this->fk_unit;
$sql.= " WHERE rowid = ".$this->rowid;
$sql.= " WHERE rowid = ".$this->rowid;
dol_syslog(get_class($this)."::update", LOG_DEBUG);
$resql=$this->db->query($sql);

View File

@ -2973,8 +2973,15 @@ div.tabBar .noborder {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 110px;
width: 115px;
}
@media only screen and (max-width: 767px)
{
.boxstats {
width: 100px;
}
}
.boxstats:hover {
box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.20);
}

View File

@ -2854,7 +2854,13 @@ div .tdtop {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 110px;
width: 115px;
}
@media only screen and (max-width: 767px)
{
.boxstats {
width: 100px;
}
}
.boxstats:hover {
box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.20);