Merge remote-tracking branch 'refs/remotes/Dolibarr/5.0' into 5.0
This commit is contained in:
commit
e75dea4f8d
@ -81,14 +81,15 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||||||
- Standing orders management (European SEPA)
|
- Standing orders management (European SEPA)
|
||||||
- Bank accounts management
|
- Bank accounts management
|
||||||
- Shared calendar/agenda (with ical and vcal export for third party tools integration)
|
- Shared calendar/agenda (with ical and vcal export for third party tools integration)
|
||||||
- Opportunities and/or project management (following project benefit including invoices, expense reports, time spent, ...)
|
- Opportunities and/or project management
|
||||||
- Projects management
|
- Projects management
|
||||||
- Contracts management
|
- Contracts management
|
||||||
- Stock management
|
- Stock management
|
||||||
- Shipping management
|
- Shipping management
|
||||||
- Interventions management
|
- Interventions management
|
||||||
- Employee's leave requests management
|
- Employee's leave requests management
|
||||||
- Expense report management
|
- Expense reports
|
||||||
|
- Timesheets
|
||||||
- Electronic Document Management (EDM)
|
- Electronic Document Management (EDM)
|
||||||
- Foundations members management
|
- Foundations members management
|
||||||
- Mass emailing
|
- Mass emailing
|
||||||
|
|||||||
@ -628,12 +628,6 @@ if ($id)
|
|||||||
if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); }
|
if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); }
|
||||||
if ($fieldlist[$field]=='newbymonth') { $valuetoshow=$langs->trans("NewByMonth"); }
|
if ($fieldlist[$field]=='newbymonth') { $valuetoshow=$langs->trans("NewByMonth"); }
|
||||||
|
|
||||||
if ($id == 2) // Special cas for state page
|
|
||||||
{
|
|
||||||
if ($fieldlist[$field]=='region_id') { $valuetoshow=' '; $showfield=1; }
|
|
||||||
if ($fieldlist[$field]=='region') { $valuetoshow=$langs->trans("Country").'/'.$langs->trans("Region"); $showfield=1; }
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($valuetoshow != '')
|
if ($valuetoshow != '')
|
||||||
{
|
{
|
||||||
print '<td align="'.$align.'">';
|
print '<td align="'.$align.'">';
|
||||||
@ -675,36 +669,15 @@ if ($id)
|
|||||||
|
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
if ($tabname[$id] == MAIN_DB_PREFIX.'c_email_templates' && $action == 'edit')
|
fieldList($fieldlist,$obj,$tabname[$id],'add');
|
||||||
{
|
|
||||||
fieldList($fieldlist,$obj,$tabname[$id],'hide');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fieldList($fieldlist,$obj,$tabname[$id],'add');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td colspan="4" align="right">';
|
print '<td colspan="4" align="right">';
|
||||||
if ($tabname[$id] != MAIN_DB_PREFIX.'c_email_templates' || $action != 'edit')
|
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||||
{
|
|
||||||
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
|
|
||||||
}
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
if ($tabname[$id] == MAIN_DB_PREFIX.'c_email_templates')
|
|
||||||
{
|
|
||||||
print '<tr><td colspan="8">* '.$langs->trans("AvailableVariables").": ";
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
|
||||||
$formmail=new FormMail($db);
|
|
||||||
$tmp=$formmail->getAvailableSubstitKey('form');
|
|
||||||
print implode(', ', $tmp);
|
|
||||||
print '</td></tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
$colspan=count($fieldlist)+3;
|
$colspan=count($fieldlist)+3;
|
||||||
if ($id == 4) $colspan++;
|
|
||||||
|
|
||||||
if (! empty($alabelisused)) // If there is one label among fields, we show legend of *
|
if (! empty($alabelisused)) // If there is one label among fields, we show legend of *
|
||||||
{
|
{
|
||||||
@ -1175,7 +1148,7 @@ $db->close();
|
|||||||
function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||||
{
|
{
|
||||||
global $conf,$langs,$db;
|
global $conf,$langs,$db;
|
||||||
global $form;
|
global $form, $mysoc;
|
||||||
global $region_id;
|
global $region_id;
|
||||||
global $elementList,$sourceList,$localtax_typeList;
|
global $elementList,$sourceList,$localtax_typeList;
|
||||||
global $bc;
|
global $bc;
|
||||||
@ -1197,7 +1170,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|||||||
} // For state page, we do not show the country input (we link to region, not country)
|
} // For state page, we do not show the country input (we link to region, not country)
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$fieldname='country';
|
$fieldname='country';
|
||||||
print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:'')), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone');
|
print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:$mysoc->country_code)), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
elseif ($fieldlist[$field] == 'country_id')
|
elseif ($fieldlist[$field] == 'country_id')
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
@ -87,7 +87,8 @@ if ($action == 'update') {
|
|||||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($list as $constname) {
|
foreach ($list as $constname)
|
||||||
|
{
|
||||||
$constvalue = GETPOST($constname, 'alpha');
|
$constvalue = GETPOST($constname, 'alpha');
|
||||||
|
|
||||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||||
@ -278,13 +279,17 @@ foreach ($list as $key)
|
|||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
|
|
||||||
print '<tr ' . $bc[$var] . ' class="value">';
|
print '<tr ' . $bc[$var] . ' class="value">';
|
||||||
|
|
||||||
|
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO) && ($key == 'ACCOUNTING_LENGTH_GACCOUNT' || $key == 'ACCOUNTING_LENGTH_AACCOUNT')) continue;
|
||||||
|
|
||||||
// Param
|
// Param
|
||||||
$label = $langs->trans($key);
|
$label = $langs->trans($key);
|
||||||
print '<td>'.$label.'</td>';
|
print '<td>'.$label.'</td>';
|
||||||
// Value
|
// Value
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . $conf->global->$key . '">';
|
print '<input type="text" class="maxwidth100" id="' . $key . '" name="' . $key . '" value="' . $conf->global->$key . '">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,7 +306,7 @@ print '<div class="center"><input type="submit" class="button" value="' . $langs
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print $langs->trans("AccountancySetupDoneFromAccountancyMenu", $langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy"));
|
print $langs->trans("AccountancySetupDoneFromAccountancyMenu", $langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy"));
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2009-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2014-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
@ -496,7 +496,7 @@ class Adherent extends CommonObject
|
|||||||
if ($this->pass != $this->pass_indatabase && $this->pass != $this->pass_indatabase_crypted)
|
if ($this->pass != $this->pass_indatabase && $this->pass != $this->pass_indatabase_crypted)
|
||||||
{
|
{
|
||||||
$isencrypted = empty($conf->global->DATABASE_PWD_ENCRYPTED)?0:1;
|
$isencrypted = empty($conf->global->DATABASE_PWD_ENCRYPTED)?0:1;
|
||||||
|
|
||||||
// If password to set differs from the one found into database
|
// If password to set differs from the one found into database
|
||||||
$result=$this->setPassword($user,$this->pass,$isencrypted,$notrigger,$nosyncuserpass);
|
$result=$this->setPassword($user,$this->pass,$isencrypted,$notrigger,$nosyncuserpass);
|
||||||
if (! $nbrowsaffected) $nbrowsaffected++;
|
if (! $nbrowsaffected) $nbrowsaffected++;
|
||||||
@ -862,7 +862,7 @@ class Adherent extends CommonObject
|
|||||||
$this->pass=$password;
|
$this->pass=$password;
|
||||||
$this->pass_indatabase=$password_indatabase;
|
$this->pass_indatabase=$password_indatabase;
|
||||||
$this->pass_indatabase_crypted=$password_crypted;
|
$this->pass_indatabase_crypted=$password_crypted;
|
||||||
|
|
||||||
if ($this->user_id && ! $nosyncuser)
|
if ($this->user_id && ! $nosyncuser)
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||||
@ -1122,7 +1122,7 @@ class Adherent extends CommonObject
|
|||||||
$this->pass = $obj->pass;
|
$this->pass = $obj->pass;
|
||||||
$this->pass_indatabase = $obj->pass;
|
$this->pass_indatabase = $obj->pass;
|
||||||
$this->pass_indatabase_crypted = $obj->pass_crypted;
|
$this->pass_indatabase_crypted = $obj->pass_crypted;
|
||||||
|
|
||||||
$this->state_id = $obj->state_id;
|
$this->state_id = $obj->state_id;
|
||||||
$this->state_code = $obj->state_id?$obj->state_code:'';
|
$this->state_code = $obj->state_id?$obj->state_code:'';
|
||||||
$this->state = $obj->state_id?$obj->state:'';
|
$this->state = $obj->state_id?$obj->state:'';
|
||||||
@ -1160,7 +1160,7 @@ class Adherent extends CommonObject
|
|||||||
|
|
||||||
$this->user_id = $obj->user_id;
|
$this->user_id = $obj->user_id;
|
||||||
$this->user_login = $obj->user_login;
|
$this->user_login = $obj->user_login;
|
||||||
|
|
||||||
$this->model_pdf = $obj->model_pdf;
|
$this->model_pdf = $obj->model_pdf;
|
||||||
|
|
||||||
// Retreive all extrafield for thirdparty
|
// Retreive all extrafield for thirdparty
|
||||||
@ -1456,7 +1456,7 @@ class Adherent extends CommonObject
|
|||||||
if (! empty($conf->global->ADHERENT_USE_MAILMAN) && ! empty($conf->mailmanspip->enabled))
|
if (! empty($conf->global->ADHERENT_USE_MAILMAN) && ! empty($conf->mailmanspip->enabled))
|
||||||
{
|
{
|
||||||
$result=$mailmanspip->add_to_mailman($this);
|
$result=$mailmanspip->add_to_mailman($this);
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
if (! empty($mailmanspip->error)) $this->errors[]=$mailmanspip->error;
|
if (! empty($mailmanspip->error)) $this->errors[]=$mailmanspip->error;
|
||||||
@ -1815,9 +1815,9 @@ class Adherent extends CommonObject
|
|||||||
public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
|
public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
// Positionne le modele sur le nom du modele a utiliser
|
// Positionne le modele sur le nom du modele a utiliser
|
||||||
if (! dol_strlen($modele))
|
if (! dol_strlen($modele))
|
||||||
{
|
{
|
||||||
@ -1830,13 +1830,13 @@ class Adherent extends CommonObject
|
|||||||
$modele = 'standard';
|
$modele = 'standard';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$modelpath = "core/modules/member/doc/";
|
$modelpath = "core/modules/member/doc/";
|
||||||
|
|
||||||
return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialise an instance with random values.
|
* Initialise an instance with random values.
|
||||||
* Used to build previews or test instances.
|
* Used to build previews or test instances.
|
||||||
@ -1926,27 +1926,28 @@ class Adherent extends CommonObject
|
|||||||
$this->fullname=$this->getFullName($langs);
|
$this->fullname=$this->getFullName($langs);
|
||||||
|
|
||||||
// Member
|
// Member
|
||||||
if ($this->fullname && ! empty($conf->global->LDAP_MEMBER_FIELD_FULLNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname;
|
if ($this->fullname && ! empty($conf->global->LDAP_MEMBER_FIELD_FULLNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname;
|
||||||
if ($this->lastname && ! empty($conf->global->LDAP_MEMBER_FIELD_NAME)) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->lastname;
|
if ($this->lastname && ! empty($conf->global->LDAP_MEMBER_FIELD_NAME)) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->lastname;
|
||||||
if ($this->firstname && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->firstname;
|
if ($this->firstname && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->firstname;
|
||||||
if ($this->login && ! empty($conf->global->LDAP_MEMBER_FIELD_LOGIN)) $info[$conf->global->LDAP_MEMBER_FIELD_LOGIN] = $this->login;
|
if ($this->login && ! empty($conf->global->LDAP_MEMBER_FIELD_LOGIN)) $info[$conf->global->LDAP_MEMBER_FIELD_LOGIN] = $this->login;
|
||||||
if ($this->pass && ! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
|
if ($this->pass && ! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
|
||||||
if ($this->poste && ! empty($conf->global->LDAP_MEMBER_FIELD_TITLE)) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste;
|
if ($this->pass && ! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED] = dol_hash($this->pass, 4); // md5 for OpenLdap TODO add type of encryption
|
||||||
if ($this->address && ! empty($conf->global->LDAP_MEMBER_FIELD_ADDRESS)) $info[$conf->global->LDAP_MEMBER_FIELD_ADDRESS] = $this->address;
|
if ($this->poste && ! empty($conf->global->LDAP_MEMBER_FIELD_TITLE)) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste;
|
||||||
if ($this->zip && ! empty($conf->global->LDAP_MEMBER_FIELD_ZIP)) $info[$conf->global->LDAP_MEMBER_FIELD_ZIP] = $this->zip;
|
if ($this->address && ! empty($conf->global->LDAP_MEMBER_FIELD_ADDRESS)) $info[$conf->global->LDAP_MEMBER_FIELD_ADDRESS] = $this->address;
|
||||||
if ($this->town && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->town;
|
if ($this->zip && ! empty($conf->global->LDAP_MEMBER_FIELD_ZIP)) $info[$conf->global->LDAP_MEMBER_FIELD_ZIP] = $this->zip;
|
||||||
if ($this->country_code && ! empty($conf->global->LDAP_MEMBER_FIELD_COUNTRY)) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code;
|
if ($this->town && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->town;
|
||||||
if ($this->email && ! empty($conf->global->LDAP_MEMBER_FIELD_MAIL)) $info[$conf->global->LDAP_MEMBER_FIELD_MAIL] = $this->email;
|
if ($this->country_code && ! empty($conf->global->LDAP_MEMBER_FIELD_COUNTRY)) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code;
|
||||||
if ($this->skype && ! empty($conf->global->LDAP_MEMBER_FIELD_SKYPE)) $info[$conf->global->LDAP_MEMBER_FIELD_SKYPE] = $this->skype;
|
if ($this->email && ! empty($conf->global->LDAP_MEMBER_FIELD_MAIL)) $info[$conf->global->LDAP_MEMBER_FIELD_MAIL] = $this->email;
|
||||||
if ($this->phone && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE] = $this->phone;
|
if ($this->skype && ! empty($conf->global->LDAP_MEMBER_FIELD_SKYPE)) $info[$conf->global->LDAP_MEMBER_FIELD_SKYPE] = $this->skype;
|
||||||
if ($this->phone_perso && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO] = $this->phone_perso;
|
if ($this->phone && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE] = $this->phone;
|
||||||
if ($this->phone_mobile && ! empty($conf->global->LDAP_MEMBER_FIELD_MOBILE)) $info[$conf->global->LDAP_MEMBER_FIELD_MOBILE] = $this->phone_mobile;
|
if ($this->phone_perso && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO] = $this->phone_perso;
|
||||||
if ($this->fax && ! empty($conf->global->LDAP_MEMBER_FIELD_FAX)) $info[$conf->global->LDAP_MEMBER_FIELD_FAX] = $this->fax;
|
if ($this->phone_mobile && ! empty($conf->global->LDAP_MEMBER_FIELD_MOBILE)) $info[$conf->global->LDAP_MEMBER_FIELD_MOBILE] = $this->phone_mobile;
|
||||||
if ($this->note_private && ! empty($conf->global->LDAP_MEMBER_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_MEMBER_FIELD_DESCRIPTION] = $this->note_private;
|
if ($this->fax && ! empty($conf->global->LDAP_MEMBER_FIELD_FAX)) $info[$conf->global->LDAP_MEMBER_FIELD_FAX] = $this->fax;
|
||||||
if ($this->note_public && ! empty($conf->global->LDAP_MEMBER_FIELD_NOTE_PUBLIC)) $info[$conf->global->LDAP_MEMBER_FIELD_NOTE_PUBLIC] = $this->note_public;
|
if ($this->note_private && ! empty($conf->global->LDAP_MEMBER_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_MEMBER_FIELD_DESCRIPTION] = $this->note_private;
|
||||||
if ($this->birth && ! empty($conf->global->LDAP_MEMBER_FIELD_BIRTHDATE)) $info[$conf->global->LDAP_MEMBER_FIELD_BIRTHDATE] = dol_print_date($this->birth,'dayhourldap');
|
if ($this->note_public && ! empty($conf->global->LDAP_MEMBER_FIELD_NOTE_PUBLIC)) $info[$conf->global->LDAP_MEMBER_FIELD_NOTE_PUBLIC] = $this->note_public;
|
||||||
if (isset($this->statut) && ! empty($conf->global->LDAP_FIELD_MEMBER_STATUS)) $info[$conf->global->LDAP_FIELD_MEMBER_STATUS] = $this->statut;
|
if ($this->birth && ! empty($conf->global->LDAP_MEMBER_FIELD_BIRTHDATE)) $info[$conf->global->LDAP_MEMBER_FIELD_BIRTHDATE] = dol_print_date($this->birth,'dayhourldap');
|
||||||
if ($this->datefin && ! empty($conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION)) $info[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION] = dol_print_date($this->datefin,'dayhourldap');
|
if (isset($this->statut) && ! empty($conf->global->LDAP_FIELD_MEMBER_STATUS)) $info[$conf->global->LDAP_FIELD_MEMBER_STATUS] = $this->statut;
|
||||||
|
if ($this->datefin && ! empty($conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION)) $info[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION] = dol_print_date($this->datefin,'dayhourldap');
|
||||||
|
|
||||||
// Subscriptions
|
// Subscriptions
|
||||||
if ($this->first_subscription_date && ! empty($conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE)) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE] = dol_print_date($this->first_subscription_date,'dayhourldap');
|
if ($this->first_subscription_date && ! empty($conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE)) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE] = dol_print_date($this->first_subscription_date,'dayhourldap');
|
||||||
@ -2080,7 +2081,7 @@ class Adherent extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return if a member is late (subscription late) or not
|
* Return if a member is late (subscription late) or not
|
||||||
*
|
*
|
||||||
* @return boolean True if late, False if not late
|
* @return boolean True if late, False if not late
|
||||||
*/
|
*/
|
||||||
public function hasDelay()
|
public function hasDelay()
|
||||||
|
|||||||
@ -1034,13 +1034,13 @@ if ($id)
|
|||||||
if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); }
|
if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); }
|
||||||
if ($fieldlist[$field]=='type_cdr') { $valuetoshow=$langs->trans("AtEndOfMonth"); $align="center"; }
|
if ($fieldlist[$field]=='type_cdr') { $valuetoshow=$langs->trans("AtEndOfMonth"); $align="center"; }
|
||||||
if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); }
|
if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); }
|
||||||
if ($fieldlist[$field]=='width' || $fieldlist[$field]=='nx') { $valuetoshow=$langs->trans("Width"); }
|
if ($fieldlist[$field]=='width' || $fieldlist[$field]=='nx') { $valuetoshow=$langs->trans("Width"); }
|
||||||
if ($fieldlist[$field]=='height' || $fieldlist[$field]=='ny') { $valuetoshow=$langs->trans("Height"); }
|
if ($fieldlist[$field]=='height' || $fieldlist[$field]=='ny') { $valuetoshow=$langs->trans("Height"); }
|
||||||
if ($fieldlist[$field]=='unit' || $fieldlist[$field]=='metric') { $valuetoshow=$langs->trans("MeasuringUnit"); }
|
if ($fieldlist[$field]=='unit' || $fieldlist[$field]=='metric') { $valuetoshow=$langs->trans("MeasuringUnit"); }
|
||||||
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $valuetoshow=''; }
|
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $valuetoshow=''; }
|
||||||
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
|
if ($fieldlist[$field]=='accountancy_code') { $valuetoshow=$langs->trans("AccountancyCode"); }
|
||||||
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); }
|
if ($fieldlist[$field]=='accountancy_code_sell') { $valuetoshow=$langs->trans("AccountancyCodeSell"); }
|
||||||
if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); }
|
if ($fieldlist[$field]=='accountancy_code_buy') { $valuetoshow=$langs->trans("AccountancyCodeBuy"); }
|
||||||
if ($fieldlist[$field]=='pcg_version' || $fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
if ($fieldlist[$field]=='pcg_version' || $fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
|
||||||
if ($fieldlist[$field]=='account_parent') { $valuetoshow=$langs->trans("Accountparent"); }
|
if ($fieldlist[$field]=='account_parent') { $valuetoshow=$langs->trans("Accountparent"); }
|
||||||
if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); }
|
if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); }
|
||||||
@ -1063,7 +1063,7 @@ if ($id)
|
|||||||
if ($fieldlist[$field]=='custom_y') { $valuetoshow=$langs->trans("CustomY"); }
|
if ($fieldlist[$field]=='custom_y') { $valuetoshow=$langs->trans("CustomY"); }
|
||||||
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); }
|
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); }
|
||||||
if ($fieldlist[$field]=='percent') { $valuetoshow=$langs->trans("Percentage"); }
|
if ($fieldlist[$field]=='percent') { $valuetoshow=$langs->trans("Percentage"); }
|
||||||
if ($fieldlist[$field]=='affect') { $valuetoshow=$langs->trans("Info"); }
|
if ($fieldlist[$field]=='affect') { $valuetoshow=$langs->trans("WithCounter"); }
|
||||||
if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); }
|
if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); }
|
||||||
if ($fieldlist[$field]=='newbymonth') { $valuetoshow=$langs->trans("NewByMonth"); }
|
if ($fieldlist[$field]=='newbymonth') { $valuetoshow=$langs->trans("NewByMonth"); }
|
||||||
|
|
||||||
@ -1254,7 +1254,7 @@ if ($id)
|
|||||||
if ($fieldlist[$field]=='custom_y') { $valuetoshow=$langs->trans("CustomY"); }
|
if ($fieldlist[$field]=='custom_y') { $valuetoshow=$langs->trans("CustomY"); }
|
||||||
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); }
|
if ($fieldlist[$field]=='content') { $valuetoshow=$langs->trans("Content"); }
|
||||||
if ($fieldlist[$field]=='percent') { $valuetoshow=$langs->trans("Percentage"); }
|
if ($fieldlist[$field]=='percent') { $valuetoshow=$langs->trans("Percentage"); }
|
||||||
if ($fieldlist[$field]=='affect') { $valuetoshow=$langs->trans("Info"); }
|
if ($fieldlist[$field]=='affect') { $valuetoshow=$langs->trans("WithCounter"); }
|
||||||
if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); }
|
if ($fieldlist[$field]=='delay') { $valuetoshow=$langs->trans("NoticePeriod"); }
|
||||||
if ($fieldlist[$field]=='newbymonth') { $valuetoshow=$langs->trans("NewByMonth"); }
|
if ($fieldlist[$field]=='newbymonth') { $valuetoshow=$langs->trans("NewByMonth"); }
|
||||||
|
|
||||||
@ -1833,6 +1833,8 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
$size=''; $class='';
|
$size=''; $class='';
|
||||||
if ($fieldlist[$field]=='code') $class='maxwidth100';
|
if ($fieldlist[$field]=='code') $class='maxwidth100';
|
||||||
|
if ($fieldlist[$field]=='affect') $class='maxwidth50';
|
||||||
|
if ($fieldlist[$field]=='delay') $class='maxwidth50';
|
||||||
if ($fieldlist[$field]=='position') $class='maxwidth50';
|
if ($fieldlist[$field]=='position') $class='maxwidth50';
|
||||||
if ($fieldlist[$field]=='libelle') $class='quatrevingtpercent';
|
if ($fieldlist[$field]=='libelle') $class='quatrevingtpercent';
|
||||||
if ($fieldlist[$field]=='tracking') $class='quatrevingtpercent';
|
if ($fieldlist[$field]=='tracking') $class='quatrevingtpercent';
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.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
|
||||||
|
|||||||
@ -390,6 +390,7 @@ if ($mode != 'marketplace')
|
|||||||
|
|
||||||
// Check filters
|
// Check filters
|
||||||
$modulename=$objMod->getName();
|
$modulename=$objMod->getName();
|
||||||
|
$moduletechnicalname=$objMod->name;
|
||||||
$moduledesc=$objMod->getDesc();
|
$moduledesc=$objMod->getDesc();
|
||||||
$moduledesclong=$objMod->getDescLong();
|
$moduledesclong=$objMod->getDescLong();
|
||||||
$moduleauthor=$objMod->getPublisher();
|
$moduleauthor=$objMod->getPublisher();
|
||||||
@ -399,6 +400,7 @@ if ($mode != 'marketplace')
|
|||||||
{
|
{
|
||||||
$qualified=0;
|
$qualified=0;
|
||||||
if (preg_match('/'.preg_quote($search_keyword).'/i', $modulename)
|
if (preg_match('/'.preg_quote($search_keyword).'/i', $modulename)
|
||||||
|
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduletechnicalname)
|
||||||
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesc)
|
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesc)
|
||||||
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesclong)
|
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesclong)
|
||||||
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduleauthor)
|
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduleauthor)
|
||||||
|
|||||||
@ -248,6 +248,7 @@ class Categories extends DolibarrApi
|
|||||||
if( ! count($obj_ret)) {
|
if( ! count($obj_ret)) {
|
||||||
throw new RestException(404, 'No category found');
|
throw new RestException(404, 'No category found');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $obj_ret;
|
return $obj_ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,9 +352,47 @@ class Categories extends DolibarrApi
|
|||||||
|
|
||||||
$object = parent::_cleanObjectDatas($object);
|
$object = parent::_cleanObjectDatas($object);
|
||||||
|
|
||||||
// Remove the subscriptions because they are handled as a subresource.
|
// Remove fields not relevent to categories
|
||||||
//unset($object->subscriptions);
|
unset($object->country);
|
||||||
|
unset($object->country_id);
|
||||||
|
unset($object->country_code);
|
||||||
|
unset($object->total_ht);
|
||||||
|
unset($object->total_ht);
|
||||||
|
unset($object->total_localtax1);
|
||||||
|
unset($object->total_localtax2);
|
||||||
|
unset($object->total_ttc);
|
||||||
|
unset($object->total_tva);
|
||||||
|
unset($object->lines);
|
||||||
|
unset($object->fk_incoterms);
|
||||||
|
unset($object->libelle_incoterms);
|
||||||
|
unset($object->location_incoterms);
|
||||||
|
unset($object->civility_id);
|
||||||
|
unset($object->name);
|
||||||
|
unset($object->lastname);
|
||||||
|
unset($object->firstname);
|
||||||
|
unset($object->shipping_method_id);
|
||||||
|
unset($object->fk_delivery_address);
|
||||||
|
unset($object->cond_reglement);
|
||||||
|
unset($object->cond_reglement_id);
|
||||||
|
unset($object->mode_reglement_id);
|
||||||
|
unset($object->barcode_type_coder);
|
||||||
|
unset($object->barcode_type_label);
|
||||||
|
unset($object->barcode_type_code);
|
||||||
|
unset($object->barcode_type);
|
||||||
|
unset($object->canvas);
|
||||||
|
unset($object->cats);
|
||||||
|
unset($object->motherof);
|
||||||
|
unset($object->context);
|
||||||
|
unset($object->socid);
|
||||||
|
unset($object->thirdparty);
|
||||||
|
unset($object->contact);
|
||||||
|
unset($object->contact_id);
|
||||||
|
unset($object->user);
|
||||||
|
unset($object->fk_account);
|
||||||
|
unset($object->fk_project);
|
||||||
|
unset($object->note);
|
||||||
|
unset($object->statut);
|
||||||
|
|
||||||
return $object;
|
return $object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -291,7 +291,7 @@ class CategoryApi extends DolibarrApi
|
|||||||
* @url GET /customer/{cusid}/categories
|
* @url GET /customer/{cusid}/categories
|
||||||
*/
|
*/
|
||||||
function getListCustomerCategories($cusid, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) {
|
function getListCustomerCategories($cusid, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) {
|
||||||
return $this->getListForItem('customer', $sortfield, $sortorder, $limit, $page, $cusid);
|
return $this->getListForItem($sortfield, $sortorder, $limit, $page, 'customer', $cusid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1301,8 +1301,18 @@ if ($action == 'create')
|
|||||||
// Replicate extrafields
|
// Replicate extrafields
|
||||||
$objectsrc->fetch_optionals($originid);
|
$objectsrc->fetch_optionals($originid);
|
||||||
$object->array_options = $objectsrc->array_options;
|
$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);
|
$object = new Propal($db);
|
||||||
|
|
||||||
@ -1480,7 +1490,6 @@ if ($action == 'create')
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.fieldLabel('Currency','multicurrency_code').'</td>';
|
print '<td>'.fieldLabel('Currency','multicurrency_code').'</td>';
|
||||||
print '<td colspan="3" class="maxwidthonsmartphone">';
|
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 $form->selectMultiCurrency($currency_code, 'multicurrency_code', 0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
@ -2018,7 +2027,7 @@ if ($action == 'create')
|
|||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print fieldLabel('CurrencyRate','multicurrency_tx');
|
print fieldLabel('CurrencyRate','multicurrency_tx');
|
||||||
print '</td>';
|
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&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
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);
|
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
|
||||||
} else {
|
} 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 != $conf->currency) {
|
if ($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
|
||||||
print '<div class="inline-block"> ';
|
print '<div class="inline-block"> ';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -125,6 +125,8 @@ if ($socid > 0)
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("NewRelativeDiscount"),'','');
|
print load_fiche_titre($langs->trans("NewRelativeDiscount"),'','');
|
||||||
|
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
// New value
|
// New value
|
||||||
|
|||||||
@ -60,6 +60,7 @@ $langs->load('propal');
|
|||||||
$langs->load('deliveries');
|
$langs->load('deliveries');
|
||||||
$langs->load('sendings');
|
$langs->load('sendings');
|
||||||
$langs->load('products');
|
$langs->load('products');
|
||||||
|
$langs->load('other');
|
||||||
if (!empty($conf->incoterm->enabled)) $langs->load('incoterm');
|
if (!empty($conf->incoterm->enabled)) $langs->load('incoterm');
|
||||||
if (! empty($conf->margin->enabled)) $langs->load('margins');
|
if (! empty($conf->margin->enabled)) $langs->load('margins');
|
||||||
if (! empty($conf->productbatch->enabled)) $langs->load("productbatch");
|
if (! empty($conf->productbatch->enabled)) $langs->load("productbatch");
|
||||||
@ -2079,7 +2080,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
print $object->date ? dol_print_date($object->date, 'daytext') : ' ';
|
print $object->date ? dol_print_date($object->date, 'day') : ' ';
|
||||||
if ($object->hasDelay() && empty($object->date_livraison)) {
|
if ($object->hasDelay() && empty($object->date_livraison)) {
|
||||||
print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning");
|
print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning");
|
||||||
}
|
}
|
||||||
@ -2212,7 +2213,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print fieldLabel('CurrencyRate','multicurrency_tx');
|
print fieldLabel('CurrencyRate','multicurrency_tx');
|
||||||
print '</td>';
|
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&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
@ -2223,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);
|
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
|
||||||
} else {
|
} 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 != $conf->currency) {
|
if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
|
||||||
print '<div class="inline-block"> ';
|
print '<div class="inline-block"> ';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -53,6 +53,8 @@ if (! $object->fetch($id, $ref) > 0)
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
|
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
|
||||||
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2012 Andreu Bisquerra Gaya <jove@bisquerra.com>
|
* Copyright (C) 2012 Andreu Bisquerra Gaya <jove@bisquerra.com>
|
||||||
* Copyright (C) 2012 David Rodriguez Martinez <davidrm146@gmail.com>
|
* Copyright (C) 2012 David Rodriguez Martinez <davidrm146@gmail.com>
|
||||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2012-2017 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -122,7 +122,7 @@ if (($action == 'create' || $action == 'add') && !$error)
|
|||||||
}
|
}
|
||||||
if (isset($_POST['orders_to_invoice']))
|
if (isset($_POST['orders_to_invoice']))
|
||||||
{
|
{
|
||||||
$orders_id = GETPOST('orders_to_invoice','',1);
|
$orders_id = GETPOST('orders_to_invoice','',2);
|
||||||
$nn = count($orders_id);
|
$nn = count($orders_id);
|
||||||
$ii = 0;
|
$ii = 0;
|
||||||
|
|
||||||
|
|||||||
@ -91,6 +91,7 @@ $search_dv_end = dol_mktime(0, 0, 0, GETPOST('search_end_dvmonth', 'int'), GETPO
|
|||||||
$search_thirdparty=GETPOST("thirdparty",'alpha');
|
$search_thirdparty=GETPOST("thirdparty",'alpha');
|
||||||
$search_req_nb=GETPOST("req_nb",'alpha');
|
$search_req_nb=GETPOST("req_nb",'alpha');
|
||||||
$search_num_releve=GETPOST("search_num_releve",'alpha');
|
$search_num_releve=GETPOST("search_num_releve",'alpha');
|
||||||
|
$search_conciliated=GETPOST("search_conciliated",'int');
|
||||||
$num_releve=GETPOST("num_releve");
|
$num_releve=GETPOST("num_releve");
|
||||||
$cat=GETPOST("cat");
|
$cat=GETPOST("cat");
|
||||||
|
|
||||||
@ -150,6 +151,7 @@ $arrayfields=array(
|
|||||||
'b.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1, 'position'=>605),
|
'b.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1, 'position'=>605),
|
||||||
'balance'=>array('label'=>$langs->trans("Balance"), 'checked'=>1, 'position'=>1000),
|
'balance'=>array('label'=>$langs->trans("Balance"), 'checked'=>1, 'position'=>1000),
|
||||||
'b.num_releve'=>array('label'=>$langs->trans("AccountStatement"), 'checked'=>1, 'position'=>1010),
|
'b.num_releve'=>array('label'=>$langs->trans("AccountStatement"), 'checked'=>1, 'position'=>1010),
|
||||||
|
'b.conciliated'=>array('label'=>$langs->trans("Conciliated"), 'enabled'=> $object->rappro, 'checked'=>($action == 'reconcile'?1:0), 'position'=>1020),
|
||||||
);
|
);
|
||||||
// Extra fields
|
// Extra fields
|
||||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||||
@ -190,6 +192,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
|
|||||||
$search_req_nb='';
|
$search_req_nb='';
|
||||||
$search_thirdparty='';
|
$search_thirdparty='';
|
||||||
$search_num_releve='';
|
$search_num_releve='';
|
||||||
|
$search_conciliated='';
|
||||||
$thirdparty='';
|
$thirdparty='';
|
||||||
|
|
||||||
$account="";
|
$account="";
|
||||||
@ -444,7 +447,7 @@ else
|
|||||||
llxHeader('', $langs->trans("BankTransactions"), '', '', 0, 0, array(), array(), $param);
|
llxHeader('', $langs->trans("BankTransactions"), '', '', 0, 0, array(), array(), $param);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro, b.num_releve, b.num_chq,";
|
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro as conciliated, b.num_releve, b.num_chq,";
|
||||||
$sql.= " b.fk_account, b.fk_type,";
|
$sql.= " b.fk_account, b.fk_type,";
|
||||||
$sql.= " ba.rowid as bankid, ba.ref as bankref,";
|
$sql.= " ba.rowid as bankid, ba.ref as bankref,";
|
||||||
$sql.= " bu.url_id,";
|
$sql.= " bu.url_id,";
|
||||||
@ -474,6 +477,7 @@ if (dol_strlen($search_dv_end)>0) $sql .= " AND b.datev <= '" . $db->idate($sear
|
|||||||
if ($search_ref) $sql.=natural_search("b.rowid", $search_ref);
|
if ($search_ref) $sql.=natural_search("b.rowid", $search_ref);
|
||||||
if ($search_req_nb) $sql.= natural_search("b.num_chq", $search_req_nb);
|
if ($search_req_nb) $sql.= natural_search("b.num_chq", $search_req_nb);
|
||||||
if ($search_num_releve) $sql.= natural_search("b.num_releve", $search_num_releve);
|
if ($search_num_releve) $sql.= natural_search("b.num_releve", $search_num_releve);
|
||||||
|
if ($search_conciliated != '' && $search_conciliated != '-1') $sql.= " AND b.rappro = ".$search_conciliated;
|
||||||
if ($search_thirdparty) $sql.= natural_search("s.nom", $search_thirdparty);
|
if ($search_thirdparty) $sql.= natural_search("s.nom", $search_thirdparty);
|
||||||
if ($description) $sql.= natural_search("b.label", $description); // Warning some text are just translation keys, not translated strings
|
if ($description) $sql.= natural_search("b.label", $description); // Warning some text are just translation keys, not translated strings
|
||||||
if ($bid) $sql.= " AND b.rowid=l.lineid AND l.fk_categ=".$bid;
|
if ($bid) $sql.= " AND b.rowid=l.lineid AND l.fk_categ=".$bid;
|
||||||
@ -776,6 +780,7 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['b.credit']['checked'])) print_liste_field_titre($arrayfields['b.credit']['label'],$_SERVER['PHP_SELF'],'b.amount','',$param,'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['b.credit']['checked'])) print_liste_field_titre($arrayfields['b.credit']['label'],$_SERVER['PHP_SELF'],'b.amount','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['balance']['checked'])) print_liste_field_titre($arrayfields['balance']['label'],$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['balance']['checked'])) print_liste_field_titre($arrayfields['balance']['label'],$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['b.num_releve']['checked'])) print_liste_field_titre($arrayfields['b.num_releve']['label'],$_SERVER['PHP_SELF'],'b.num_releve','',$param,'align="center"',$sortfield,$sortorder);
|
if (! empty($arrayfields['b.num_releve']['checked'])) print_liste_field_titre($arrayfields['b.num_releve']['label'],$_SERVER['PHP_SELF'],'b.num_releve','',$param,'align="center"',$sortfield,$sortorder);
|
||||||
|
if (! empty($arrayfields['b.conciliated']['checked'])) print_liste_field_titre($arrayfields['b.conciliated']['label'],$_SERVER['PHP_SELF'],'b.rappro','',$param,'align="center"',$sortfield,$sortorder);
|
||||||
// Extra fields
|
// Extra fields
|
||||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
@ -857,11 +862,18 @@ if ($resql)
|
|||||||
print $form->textwithpicto('', $htmltext, 1);
|
print $form->textwithpicto('', $htmltext, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
// Numero statement
|
||||||
if (! empty($arrayfields['b.num_releve']['checked']))
|
if (! empty($arrayfields['b.num_releve']['checked']))
|
||||||
{
|
{
|
||||||
// Numero statement
|
|
||||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" name="search_num_releve" value="'.dol_escape_htmltag($search_num_releve).'" size="3"></td>';
|
print '<td class="liste_titre" align="center"><input type="text" class="flat" name="search_num_releve" value="'.dol_escape_htmltag($search_num_releve).'" size="3"></td>';
|
||||||
}
|
}
|
||||||
|
// Conciliated
|
||||||
|
if (! empty($arrayfields['b.conciliated']['checked']))
|
||||||
|
{
|
||||||
|
print '<td class="liste_titre" align="center">';
|
||||||
|
print $form->selectyesno('search_conciliated', $search_conciliated, 1, False, 1);
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
print '<td class="liste_titre" align="middle">';
|
print '<td class="liste_titre" align="middle">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre" align="middle">';
|
print '<td class="liste_titre" align="middle">';
|
||||||
@ -1207,7 +1219,7 @@ if ($resql)
|
|||||||
// Transaction reconciliated or edit link
|
// Transaction reconciliated or edit link
|
||||||
if ($bankaccount->canBeConciliated() > 0)
|
if ($bankaccount->canBeConciliated() > 0)
|
||||||
{
|
{
|
||||||
if ($objp->rappro) // If line not conciliated and account can be conciliated
|
if ($objp->conciliated) // If line not conciliated and account can be conciliated
|
||||||
{
|
{
|
||||||
print '<a href="releve.php?num='.$objp->num_releve.'&account='.$objp->bankid.'">'.$objp->num_releve.'</a>';
|
print '<a href="releve.php?num='.$objp->num_releve.'&account='.$objp->bankid.'">'.$objp->num_releve.'</a>';
|
||||||
}
|
}
|
||||||
@ -1220,10 +1232,18 @@ if ($resql)
|
|||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! empty($arrayfields['b.conciliated']['checked']))
|
||||||
|
{
|
||||||
|
print '<td class="nowrap" align="center">';
|
||||||
|
print $objp->conciliated?$langs->trans("Yes"):$langs->trans("No");
|
||||||
|
print '</td>';
|
||||||
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
|
||||||
// Action edit/delete
|
// Action edit/delete
|
||||||
print '<td class="nowrap" align="center">';
|
print '<td class="nowrap" align="center">';
|
||||||
// Transaction reconciliated or edit link
|
// Transaction reconciliated or edit link
|
||||||
if ($objp->rappro && $bankaccount->canBeConciliated() > 0) // If line not conciliated and account can be conciliated
|
if ($objp->conciliated && $bankaccount->canBeConciliated() > 0) // If line not conciliated and account can be conciliated
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&account='.$objp->bankid.'&page='.$page.'">';
|
print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&account='.$objp->bankid.'&page='.$page.'">';
|
||||||
print img_edit();
|
print img_edit();
|
||||||
@ -1243,7 +1263,7 @@ if ($resql)
|
|||||||
print img_view();
|
print img_view();
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
if ($bankaccount->canBeConciliated() > 0 && empty($objp->rappro))
|
if ($bankaccount->canBeConciliated() > 0 && empty($objp->conciliated))
|
||||||
{
|
{
|
||||||
if ($db->jdate($objp->dv) < ($now - $conf->bank->rappro->warning_delay))
|
if ($db->jdate($objp->dv) < ($now - $conf->bank->rappro->warning_delay))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -311,13 +311,9 @@ if ($result)
|
|||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
else if ($links[$key]['type']=='company') {
|
else if ($links[$key]['type']=='company') {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/societe/soc.php?socid='.$links[$key]['url_id'].'">';
|
|
||||||
//print img_object($langs->trans('ShowCompany'),'company').' ';
|
|
||||||
$societe=new Societe($db);
|
$societe=new Societe($db);
|
||||||
$societe->fetch($links[$key]['url_id']);
|
$societe->fetch($links[$key]['url_id']);
|
||||||
//print $links[$key]['label'];
|
|
||||||
print $societe->getNomUrl(1);
|
print $societe->getNomUrl(1);
|
||||||
print '</a>';
|
|
||||||
}
|
}
|
||||||
else if ($links[$key]['type']=='sc') {
|
else if ($links[$key]['type']=='sc') {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/sociales/card.php?id='.$links[$key]['url_id'].'">';
|
print '<a href="'.DOL_URL_ROOT.'/compta/sociales/card.php?id='.$links[$key]['url_id'].'">';
|
||||||
|
|||||||
@ -3257,7 +3257,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print fieldLabel('CurrencyRate','multicurrency_tx');
|
print fieldLabel('CurrencyRate','multicurrency_tx');
|
||||||
print '</td>';
|
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&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
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);
|
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
|
||||||
} else {
|
} 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 != $conf->currency) {
|
if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
|
||||||
print '<div class="inline-block"> ';
|
print '<div class="inline-block"> ';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -2102,7 +2102,7 @@ class Contrat extends CommonObject
|
|||||||
$sql = "SELECT count(c.rowid) as nb";
|
$sql = "SELECT count(c.rowid) as nb";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."contrat as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."contrat as c";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid";
|
$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.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
|
||||||
$sql.= " WHERE sc.fk_user = " .$user->id;
|
$sql.= " WHERE sc.fk_user = " .$user->id;
|
||||||
|
|||||||
@ -209,7 +209,26 @@ if (! $error && $massaction == 'confirm_presend')
|
|||||||
if (count($listofqualifiedinvoice) > 0)
|
if (count($listofqualifiedinvoice) > 0)
|
||||||
{
|
{
|
||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
$from = $user->getFullName($langs) . ' <' . $user->email .'>';
|
|
||||||
|
$fromtype = GETPOST('fromtype');
|
||||||
|
if ($fromtype === 'user') {
|
||||||
|
$from = $user->getFullName($langs) .' <'.$user->email.'>';
|
||||||
|
}
|
||||||
|
elseif ($fromtype === 'company') {
|
||||||
|
$from = $conf->global->MAIN_INFO_SOCIETE_NOM .' <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>';
|
||||||
|
}
|
||||||
|
elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) {
|
||||||
|
$tmp=explode(',', $user->email_aliases);
|
||||||
|
$from = trim($tmp[($reg[1] - 1)]);
|
||||||
|
}
|
||||||
|
elseif (preg_match('/global_aliases_(\d+)/', $fromtype, $reg)) {
|
||||||
|
$tmp=explode(',', $conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES);
|
||||||
|
$from = trim($tmp[($reg[1] - 1)]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>';
|
||||||
|
}
|
||||||
|
|
||||||
$replyto = $from;
|
$replyto = $from;
|
||||||
$subject = GETPOST('subject');
|
$subject = GETPOST('subject');
|
||||||
$message = GETPOST('message');
|
$message = GETPOST('message');
|
||||||
|
|||||||
@ -78,8 +78,9 @@ class box_factures_imp extends ModeleBoxes
|
|||||||
$sql.= " f.total_ttc,";
|
$sql.= " f.total_ttc,";
|
||||||
$sql.= " f.paye, f.fk_statut, f.rowid as facid";
|
$sql.= " f.paye, f.fk_statut, f.rowid as facid";
|
||||||
$sql.= ", sum(pf.amount) as am";
|
$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";
|
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.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON f.rowid=pf.fk_facture ";
|
||||||
$sql.= " WHERE f.fk_soc = s.rowid";
|
$sql.= " WHERE f.fk_soc = s.rowid";
|
||||||
$sql.= " AND f.entity = ".$conf->entity;
|
$sql.= " AND f.entity = ".$conf->entity;
|
||||||
|
|||||||
@ -106,13 +106,13 @@ class box_produits extends ModeleBoxes
|
|||||||
$productstatic->entity = $objp->entity;
|
$productstatic->entity = $objp->entity;
|
||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'align="left"',
|
'td' => '',
|
||||||
'text' => $productstatic->getNomUrl(1),
|
'text' => $productstatic->getNomUrl(1),
|
||||||
'asis' => 1,
|
'asis' => 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'align="left"',
|
'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
|
||||||
'text' => $objp->label,
|
'text' => $objp->label,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ class box_produits extends ModeleBoxes
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'align="left" class="nowrap"',
|
'td' => 'class="nowrap"',
|
||||||
'text' => $price_base_type,
|
'text' => $price_base_type,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -174,14 +174,14 @@ class box_produits extends ModeleBoxes
|
|||||||
$db->free($result);
|
$db->free($result);
|
||||||
} else {
|
} else {
|
||||||
$this->info_box_contents[0][0] = array(
|
$this->info_box_contents[0][0] = array(
|
||||||
'td' => 'align="left"',
|
'td' => '',
|
||||||
'maxlength'=>500,
|
'maxlength'=>500,
|
||||||
'text' => ($db->error().' sql='.$sql),
|
'text' => ($db->error().' sql='.$sql),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->info_box_contents[0][0] = array(
|
$this->info_box_contents[0][0] = array(
|
||||||
'td' => 'align="left"',
|
'td' => '',
|
||||||
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -113,13 +113,13 @@ class box_produits_alerte_stock extends ModeleBoxes
|
|||||||
$productstatic->entity = $objp->entity;
|
$productstatic->entity = $objp->entity;
|
||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'align="left"',
|
'td' => '',
|
||||||
'text' => $productstatic->getNomUrl(1),
|
'text' => $productstatic->getNomUrl(1),
|
||||||
'asis' => 1,
|
'asis' => 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'align="left"',
|
'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
|
||||||
'text' => $objp->label,
|
'text' => $objp->label,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ class box_produits_alerte_stock extends ModeleBoxes
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$line][] = array(
|
$this->info_box_contents[$line][] = array(
|
||||||
'td' => 'align="left" class="nowrap"',
|
'td' => 'class="nowrap"',
|
||||||
'text' => $price_base_type,
|
'text' => $price_base_type,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ class box_produits_alerte_stock extends ModeleBoxes
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->info_box_contents[0][0] = array(
|
$this->info_box_contents[0][0] = array(
|
||||||
'td' => 'align="left"',
|
'td' => '',
|
||||||
'maxlength'=>500,
|
'maxlength'=>500,
|
||||||
'text' => ($db->error().' sql='.$sql),
|
'text' => ($db->error().' sql='.$sql),
|
||||||
);
|
);
|
||||||
@ -188,7 +188,7 @@ class box_produits_alerte_stock extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->info_box_contents[0][0] = array(
|
$this->info_box_contents[0][0] = array(
|
||||||
'td' => 'align="left"',
|
'td' => '',
|
||||||
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
'text' => $langs->trans("ReadPermissionNotAllowed"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,33 +72,46 @@ class box_project extends ModeleBoxes
|
|||||||
$totalnb = 0;
|
$totalnb = 0;
|
||||||
$totalnbTask=0;
|
$totalnbTask=0;
|
||||||
|
|
||||||
$textHead = $langs->trans("Projects");
|
$textHead = $langs->trans("OpenedProjects");
|
||||||
$this->info_box_head = array('text' => $textHead, 'limit'=> dol_strlen($textHead));
|
$this->info_box_head = array('text' => $textHead, 'limit'=> dol_strlen($textHead));
|
||||||
|
|
||||||
// list the summary of the orders
|
// list the summary of the orders
|
||||||
if ($user->rights->projet->lire) {
|
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";
|
$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";
|
if($user->socid) $sql.= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid=p.fk_soc";
|
||||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
$sql.= " WHERE p.entity IN (".getEntity('project',1).')';
|
||||||
if($user->socid) $sql.= " AND s.rowid = ".$user->socid;
|
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.= " AND p.fk_statut = 1"; // Seulement les projets ouverts
|
||||||
$sql.= " ORDER BY p.datec DESC";
|
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||||
$sql.= $db->plimit($max, 0);
|
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);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $num) {
|
while ($i < min($num, $max)) {
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
|
|
||||||
$tooltip = $langs->trans('Project') . ': ' . $objp->ref;
|
$tooltip = $langs->trans('Project') . ': ' . $objp->ref;
|
||||||
$this->info_box_contents[$i][0] = array(
|
$this->info_box_contents[$i][0] = array(
|
||||||
'td' => 'align="left" width="16"',
|
'td' => 'align="left" width="16"',
|
||||||
'logo' => 'object_project',
|
'logo' => 'object_project'.($objp->public?'pub':''),
|
||||||
'tooltip' => $tooltip,
|
'tooltip' => $tooltip,
|
||||||
'url' => DOL_URL_ROOT."/projet/card.php?id=".$objp->rowid,
|
'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 ="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.=" 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.= " WHERE p.entity IN (".getEntity('project',1).')';
|
||||||
$sql.=" AND p.rowid = ".$objp->rowid;
|
$sql.=" AND p.rowid = ".$objp->rowid;
|
||||||
$resultTask = $db->query($sql);
|
$resultTask = $db->query($sql);
|
||||||
if ($resultTask) {
|
if ($resultTask) {
|
||||||
$objTask = $db->fetch_object($resultTask);
|
$objTask = $db->fetch_object($resultTask);
|
||||||
$this->info_box_contents[$i][3] = array(
|
$this->info_box_contents[$i][3] = array(
|
||||||
'td' => 'align="right"',
|
'td' => 'class="right"',
|
||||||
'text' => number_format($objTask->nb, 0, ',', ' ')." ".$langs->trans("Tasks"),
|
'text' => $objTask->nb." ".$langs->trans("Tasks"),
|
||||||
);
|
);
|
||||||
if ($objTask->nb > 0 )
|
if ($objTask->nb > 0)
|
||||||
$this->info_box_contents[$i][4] = array(
|
$this->info_box_contents[$i][4] = array(
|
||||||
'td' => 'align="right"',
|
'td' => 'class="right"',
|
||||||
'text' => number_format(($objTask->totprogress/$objTask->nb), 0, ',', ' ')."%",
|
'text' => round($objTask->totprogress/$objTask->nb, 0)."%",
|
||||||
);
|
);
|
||||||
else
|
else
|
||||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => "N/A ");
|
$this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => "N/A ");
|
||||||
$totalnbTask += $objTask->nb;
|
$totalnbTask += $objTask->nb;
|
||||||
} else {
|
} else {
|
||||||
$this->info_box_contents[$i][3] = array('td' => 'align="right"', 'text' => number_format(0, 0, ',', ' '));
|
$this->info_box_contents[$i][3] = array('td' => 'class="right"', 'text' => round(0));
|
||||||
$this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => "N/A ");
|
$this->info_box_contents[$i][4] = array('td' => 'class="right"', 'text' => "N/A ");
|
||||||
}
|
}
|
||||||
|
|
||||||
$i++;
|
$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(
|
$this->info_box_contents[$i][2] = array(
|
||||||
'td' => 'align="right" ',
|
'td' => 'align="right" ',
|
||||||
'text' => number_format($num, 0, ',', ' ')." ".$langs->trans("Projects"),
|
'text' => round($num, 0)." ".$langs->trans("Projects"),
|
||||||
);
|
);
|
||||||
$this->info_box_contents[$i][3] = array(
|
$this->info_box_contents[$i][3] = array(
|
||||||
'td' => 'align="right" ',
|
'td' => 'align="right" ',
|
||||||
'text' => number_format($totalnbTask, 0, ',', ' ')." ".$langs->trans("Tasks"),
|
'text' => (($max < $num) ? '' : (round($totalnbTask, 0)." ".$langs->trans("Tasks"))),
|
||||||
);
|
);
|
||||||
$this->info_box_contents[$i][4] = array(
|
$this->info_box_contents[$i][4] = array(
|
||||||
'td' => '',
|
'td' => '',
|
||||||
|
|||||||
@ -135,7 +135,7 @@ class box_services_contracts extends ModeleBoxes
|
|||||||
'asis' => 1
|
'asis' => 1
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][] = array('td' => '',
|
$this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"',
|
||||||
'text' => $thirdpartytmp->getNomUrl(1),
|
'text' => $thirdpartytmp->getNomUrl(1),
|
||||||
'asis' => 1
|
'asis' => 1
|
||||||
);
|
);
|
||||||
|
|||||||
@ -83,6 +83,8 @@ class box_services_expired extends ModeleBoxes
|
|||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
|
$thirdpartytmp = new Societe($this->db);
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$late='';
|
$late='';
|
||||||
@ -100,13 +102,13 @@ class box_services_expired extends ModeleBoxes
|
|||||||
'text' => ($objp->ref?$objp->ref:$objp->rowid), // Some contracts have no ref
|
'text' => ($objp->ref?$objp->ref:$objp->rowid), // Some contracts have no ref
|
||||||
'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid);
|
'url' => DOL_URL_ROOT."/contrat/card.php?id=".$objp->rowid);
|
||||||
|
|
||||||
$this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"',
|
$thirdpartytmp->id = $objp->socid;
|
||||||
'logo' => 'company',
|
$thirdpartytmp->name = $objp->name;
|
||||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
|
||||||
|
|
||||||
$this->info_box_contents[$i][3] = array('td' => 'class="tdoverflow maxwidth100onsmartphone" align="left"',
|
$this->info_box_contents[$i][2] = array('td' => 'class="tdoverflowmax100 maxwidth100onsmartphone" align="left"',
|
||||||
'text' => $objp->name,
|
'text' => $thirdpartytmp->getNomUrl(1, 'customer'),
|
||||||
'url' => DOL_URL_ROOT."/comm/card.php?socid=".$objp->socid);
|
'asis' => 1
|
||||||
|
);
|
||||||
|
|
||||||
$this->info_box_contents[$i][4] = array('td' => 'align="center"',
|
$this->info_box_contents[$i][4] = array('td' => 'align="center"',
|
||||||
'text' => dol_print_date($dateline,'day'),
|
'text' => dol_print_date($dateline,'day'),
|
||||||
|
|||||||
@ -243,7 +243,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
|||||||
$out.= '>';
|
$out.= '>';
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
$out.= '<table summary="" class="nobordernopadding" width="100%"><tr><td class="tdoverflow maxwidth300onsmartphone">';
|
$out.= '<table summary="" class="nobordernopadding" width="100%"><tr><td class="tdoverflowmax100 maxwidth100onsmartphone">';
|
||||||
}
|
}
|
||||||
if (! empty($head['text']))
|
if (! empty($head['text']))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -304,11 +304,13 @@ abstract class CommonDocGenerator
|
|||||||
|
|
||||||
$now=dol_now('gmt'); // gmt
|
$now=dol_now('gmt'); // gmt
|
||||||
$array_other = array(
|
$array_other = array(
|
||||||
'current_date'=>dol_print_date($now,'day','tzuser'),
|
// Date in default language
|
||||||
'current_datehour'=>dol_print_date($now,'dayhour','tzuser'),
|
'current_date'=>dol_print_date($now,'day','tzuser'),
|
||||||
|
'current_datehour'=>dol_print_date($now,'dayhour','tzuser'),
|
||||||
'current_server_date'=>dol_print_date($now,'day','tzserver'),
|
'current_server_date'=>dol_print_date($now,'day','tzserver'),
|
||||||
'current_server_datehour'=>dol_print_date($now,'dayhour','tzserver'),
|
'current_server_datehour'=>dol_print_date($now,'dayhour','tzserver'),
|
||||||
'current_date_locale'=>dol_print_date($now,'day','tzuser',$outputlangs),
|
// Date in requested output language
|
||||||
|
'current_date_locale'=>dol_print_date($now,'day','tzuser',$outputlangs),
|
||||||
'current_datehour_locale'=>dol_print_date($now,'dayhour','tzuser',$outputlangs),
|
'current_datehour_locale'=>dol_print_date($now,'dayhour','tzuser',$outputlangs),
|
||||||
'current_server_date_locale'=>dol_print_date($now,'day','tzserver',$outputlangs),
|
'current_server_date_locale'=>dol_print_date($now,'day','tzserver',$outputlangs),
|
||||||
'current_server_datehour_locale'=>dol_print_date($now,'dayhour','tzserver',$outputlangs),
|
'current_server_datehour_locale'=>dol_print_date($now,'dayhour','tzserver',$outputlangs),
|
||||||
@ -350,6 +352,7 @@ abstract class CommonDocGenerator
|
|||||||
$array_key.'_ref_customer'=>$object->ref_client,
|
$array_key.'_ref_customer'=>$object->ref_client,
|
||||||
$array_key.'_ref_supplier'=>(! empty($object->ref_fournisseur)?$object->ref_fournisseur:''),
|
$array_key.'_ref_supplier'=>(! empty($object->ref_fournisseur)?$object->ref_fournisseur:''),
|
||||||
$array_key.'_source_invoice_ref'=>$invoice_source->ref,
|
$array_key.'_source_invoice_ref'=>$invoice_source->ref,
|
||||||
|
// Dates
|
||||||
$array_key.'_hour'=>dol_print_date($object->date,'hour'),
|
$array_key.'_hour'=>dol_print_date($object->date,'hour'),
|
||||||
$array_key.'_date'=>dol_print_date($object->date,'day'),
|
$array_key.'_date'=>dol_print_date($object->date,'day'),
|
||||||
$array_key.'_date_rfc'=>dol_print_date($object->date,'dayrfc'),
|
$array_key.'_date_rfc'=>dol_print_date($object->date,'dayrfc'),
|
||||||
@ -360,6 +363,7 @@ abstract class CommonDocGenerator
|
|||||||
$array_key.'_date_validation'=>(! empty($object->date_validation)?dol_print_date($object->date_validation,'dayhour'):''),
|
$array_key.'_date_validation'=>(! empty($object->date_validation)?dol_print_date($object->date_validation,'dayhour'):''),
|
||||||
$array_key.'_date_delivery_planed'=>(! empty($object->date_livraison)?dol_print_date($object->date_livraison,'day'):''),
|
$array_key.'_date_delivery_planed'=>(! empty($object->date_livraison)?dol_print_date($object->date_livraison,'day'):''),
|
||||||
$array_key.'_date_close'=>(! empty($object->date_cloture)?dol_print_date($object->date_cloture,'dayhour'):''),
|
$array_key.'_date_close'=>(! empty($object->date_cloture)?dol_print_date($object->date_cloture,'dayhour'):''),
|
||||||
|
|
||||||
$array_key.'_payment_mode_code'=>$object->mode_reglement_code,
|
$array_key.'_payment_mode_code'=>$object->mode_reglement_code,
|
||||||
$array_key.'_payment_mode'=>($outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code)!='PaymentType'.$object->mode_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code):$object->mode_reglement),
|
$array_key.'_payment_mode'=>($outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code)!='PaymentType'.$object->mode_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code):$object->mode_reglement),
|
||||||
$array_key.'_payment_term_code'=>$object->cond_reglement_code,
|
$array_key.'_payment_term_code'=>$object->cond_reglement_code,
|
||||||
@ -444,10 +448,13 @@ abstract class CommonDocGenerator
|
|||||||
'line_price_ht_locale'=>price($line->total_ht, 0, $outputlangs),
|
'line_price_ht_locale'=>price($line->total_ht, 0, $outputlangs),
|
||||||
'line_price_ttc_locale'=>price($line->total_ttc, 0, $outputlangs),
|
'line_price_ttc_locale'=>price($line->total_ttc, 0, $outputlangs),
|
||||||
'line_price_vat_locale'=>price($line->total_tva, 0, $outputlangs),
|
'line_price_vat_locale'=>price($line->total_tva, 0, $outputlangs),
|
||||||
'line_date_start'=>$line->date_start,
|
// Dates
|
||||||
'line_date_start_rfc'=>dol_print_date($line->date_start,'dayrfc'),
|
'line_date_start'=>dol_print_date($line->date_start, 'day', 'tzuser'),
|
||||||
'line_date_end'=>$line->date_end,
|
'line_date_start_locale'=>dol_print_date($line->date_start, 'day', 'tzuser', $outputlangs),
|
||||||
'line_date_end_rfc'=>dol_print_date($line->date_end,'dayrfc')
|
'line_date_start_rfc'=>dol_print_date($line->date_start, 'dayrfc', 'tzuser'),
|
||||||
|
'line_date_end'=>dol_print_date($line->date_end, 'day', 'tzuser'),
|
||||||
|
'line_date_end_locale'=>dol_print_date($line->date_end, 'day', 'tzuser', $outputlangs),
|
||||||
|
'line_date_end_rfc'=>dol_print_date($line->date_end, 'dayrfc', 'tzuser'),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Retrieve extrafields
|
// Retrieve extrafields
|
||||||
|
|||||||
@ -1223,11 +1223,11 @@ abstract class CommonObject
|
|||||||
* @param int $id To force other object id (should not be used)
|
* @param int $id To force other object id (should not be used)
|
||||||
* @param string $format Data format ('text', 'date'). 'text' is used if not defined
|
* @param string $format Data format ('text', 'date'). 'text' is used if not defined
|
||||||
* @param string $id_field To force rowid field name. 'rowid' is used if not defined
|
* @param string $id_field To force rowid field name. 'rowid' is used if not defined
|
||||||
* @param User|string $user Update last update fields also if user object provided
|
* @param User|string $fuser Update the user of last update field with this user. If not provided, current user is used except if value is 'none'
|
||||||
* @param string $trigkey Trigger key to run (in most cases something like 'XXX_MODIFY')
|
* @param string $trigkey Trigger key to run (in most cases something like 'XXX_MODIFY')
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function setValueFrom($field, $value, $table='', $id=null, $format='', $id_field='', $user='', $trigkey='')
|
function setValueFrom($field, $value, $table='', $id=null, $format='', $id_field='', $fuser=null, $trigkey='')
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
@ -1247,7 +1247,8 @@ abstract class CommonObject
|
|||||||
if ($format == 'text') $sql.= $field." = '".$this->db->escape($value)."'";
|
if ($format == 'text') $sql.= $field." = '".$this->db->escape($value)."'";
|
||||||
else if ($format == 'int') $sql.= $field." = ".$this->db->escape($value);
|
else if ($format == 'int') $sql.= $field." = ".$this->db->escape($value);
|
||||||
else if ($format == 'date') $sql.= $field." = ".($value ? "'".$this->db->idate($value)."'" : "null");
|
else if ($format == 'date') $sql.= $field." = ".($value ? "'".$this->db->idate($value)."'" : "null");
|
||||||
if (is_object($user)) $sql.=", fk_user_modif = ".$user->id;
|
if (! empty($fuser) && is_object($fuser)) $sql.=", fk_user_modif = ".$fuser->id;
|
||||||
|
elseif (empty($fuser) || $fuser != 'none') $sql.=", fk_user_modif = ".$user->id;
|
||||||
$sql.= " WHERE ".$id_field." = ".$id;
|
$sql.= " WHERE ".$id_field." = ".$id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::".__FUNCTION__."", LOG_DEBUG);
|
dol_syslog(get_class($this)."::".__FUNCTION__."", LOG_DEBUG);
|
||||||
@ -1256,7 +1257,7 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
if ($trigkey)
|
if ($trigkey)
|
||||||
{
|
{
|
||||||
$result=$this->call_trigger($trigkey, $user); // This may set this->errors
|
$result=$this->call_trigger($trigkey, (! empty($fuser) && is_object($fuser)) ? $fuser : $user); // This may set this->errors
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5745,7 +5745,13 @@ class Form
|
|||||||
{
|
{
|
||||||
$ret.=dol_htmlentities($object->getFullName($langs));
|
$ret.=dol_htmlentities($object->getFullName($langs));
|
||||||
}
|
}
|
||||||
|
else if (in_array($object->element, array('action', 'agenda')))
|
||||||
|
{
|
||||||
|
$ret.=$object->ref.'<br>'.$object->label;
|
||||||
|
}
|
||||||
else if ($fieldref != 'none') $ret.=dol_htmlentities($object->$fieldref);
|
else if ($fieldref != 'none') $ret.=dol_htmlentities($object->$fieldref);
|
||||||
|
|
||||||
|
|
||||||
if ($morehtmlref)
|
if ($morehtmlref)
|
||||||
{
|
{
|
||||||
$ret.=' '.$morehtmlref;
|
$ret.=' '.$morehtmlref;
|
||||||
|
|||||||
@ -153,7 +153,14 @@ class FormProjets
|
|||||||
$sql.= " WHERE p.entity IN (".getEntity('project', 1).")";
|
$sql.= " WHERE p.entity IN (".getEntity('project', 1).")";
|
||||||
if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||||
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
|
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
|
||||||
if ($socid > 0 && empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) $sql.= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)";
|
if ($socid > 0)
|
||||||
|
{
|
||||||
|
if (empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) $sql.= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)";
|
||||||
|
else if ($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') // PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
|
||||||
|
{
|
||||||
|
$sql.= " AND (p.fk_soc IN (".$socid.", ".$conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") OR p.fk_soc IS NULL)";
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!empty($filterkey)) {
|
if (!empty($filterkey)) {
|
||||||
$sql .= ' AND (';
|
$sql .= ' AND (';
|
||||||
$sql .= ' p.title LIKE "%'.$this->db->escape($filterkey).'%"';
|
$sql .= ' p.title LIKE "%'.$this->db->escape($filterkey).'%"';
|
||||||
@ -586,7 +593,7 @@ class FormProjets
|
|||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
$sellist = '<select class="flat oppstatus'.($morecss?' '.$morecss:'').'" id="'.$htmlname.'" name="'.$htmlname.'">';
|
$sellist = '<select class="flat oppstatus'.($morecss?' '.$morecss:'').'" id="'.$htmlname.'" name="'.$htmlname.'">';
|
||||||
if ($showempty) $sellist.= '<option value="-1"></option>';
|
if ($showempty) $sellist.= '<option value="-1"> </option>'; // Without  , strange move of screen when switching value
|
||||||
if ($showallnone) $sellist.= '<option value="all"'.($preselected == 'all'?' selected="selected"':'').'>--'.$langs->trans("OnlyOpportunitiesShort").'--</option>';
|
if ($showallnone) $sellist.= '<option value="all"'.($preselected == 'all'?' selected="selected"':'').'>--'.$langs->trans("OnlyOpportunitiesShort").'--</option>';
|
||||||
if ($showallnone) $sellist.= '<option value="openedopp"'.($preselected == 'openedopp'?' selected="selected"':'').'>--'.$langs->trans("OpenedOpportunitiesShort").'--</option>';
|
if ($showallnone) $sellist.= '<option value="openedopp"'.($preselected == 'openedopp'?' selected="selected"':'').'>--'.$langs->trans("OpenedOpportunitiesShort").'--</option>';
|
||||||
if ($showallnone) $sellist.= '<option value="none"'.($preselected == 'none'?' selected="selected"':'').'>--'.$langs->trans("NotAnOpportunityShort").'--</option>';
|
if ($showallnone) $sellist.= '<option value="none"'.($preselected == 'none'?' selected="selected"':'').'>--'.$langs->trans("NotAnOpportunityShort").'--</option>';
|
||||||
|
|||||||
@ -107,27 +107,6 @@ class Interfaces
|
|||||||
|
|
||||||
$nbfile++;
|
$nbfile++;
|
||||||
|
|
||||||
$modName = "Interface".ucfirst($reg[3]);
|
|
||||||
//print "file=$file - modName=$modName\n";
|
|
||||||
if (in_array($modName,$modules))
|
|
||||||
{
|
|
||||||
$langs->load("errors");
|
|
||||||
dol_syslog(get_class($this)."::run_triggers action=".$action." ".$langs->trans("ErrorDuplicateTrigger",$modName,"/htdocs/core/triggers/"), LOG_ERR);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
//print 'Todo for '.$modName." : ".$newdir.'/'.$file."\n";
|
|
||||||
include_once $newdir.'/'.$file;
|
|
||||||
//print 'Done for '.$modName."\n";
|
|
||||||
}
|
|
||||||
catch(Exception $e)
|
|
||||||
{
|
|
||||||
dol_syslog('ko for '.$modName." ".$e->getMessage()."\n", LOG_ERROR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if trigger file is disabled by name
|
// Check if trigger file is disabled by name
|
||||||
if (preg_match('/NORUN$/i',$file)) continue;
|
if (preg_match('/NORUN$/i',$file)) continue;
|
||||||
// Check if trigger file is for a particular module
|
// Check if trigger file is for a particular module
|
||||||
@ -145,8 +124,28 @@ class Interfaces
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$modName = "Interface".ucfirst($reg[3]);
|
||||||
|
//print "file=$file - modName=$modName\n";
|
||||||
|
if (in_array($modName,$modules)) // $modules = list of modName already loaded
|
||||||
|
{
|
||||||
|
$langs->load("errors");
|
||||||
|
dol_syslog(get_class($this)."::run_triggers action=".$action." ".$langs->trans("ErrorDuplicateTrigger", $newdir."/".$file, $fullpathfiles[$modName]), LOG_WARNING);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
//print 'Todo for '.$modName." : ".$newdir.'/'.$file."\n";
|
||||||
|
include_once $newdir.'/'.$file;
|
||||||
|
//print 'Done for '.$modName."\n";
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
dol_syslog('ko for '.$modName." ".$e->getMessage()."\n", LOG_ERR);
|
||||||
|
}
|
||||||
|
|
||||||
$modules[$i] = $modName;
|
$modules[$i] = $modName;
|
||||||
$files[$i] = $file;
|
$files[$i] = $file;
|
||||||
|
$fullpathfiles[$modName] = $newdir.'/'.$file;
|
||||||
$orders[$i] = $part1.'_'.$part2.'_'.$part3; // Set sort criteria value
|
$orders[$i] = $part1.'_'.$part2.'_'.$part3; // Set sort criteria value
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -195,7 +195,7 @@ interface Database
|
|||||||
* Execute a SQL request and return the resultset
|
* Execute a SQL request and return the resultset
|
||||||
*
|
*
|
||||||
* @param string $query SQL query string
|
* @param string $query SQL query string
|
||||||
* @param int $usesavepoint 0=Default mode, 1=Run a savepoint before and a rollbock to savepoint if error (this allow to have some request with errors inside global transactions).
|
* @param int $usesavepoint 0=Default mode, 1=Run a savepoint before and a rollback to savepoint if error (this allow to have some request with errors inside global transactions).
|
||||||
* Note that with Mysql, this parameter is not used as Myssql can already commit a transaction even if one request is in error, without using savepoints.
|
* Note that with Mysql, this parameter is not used as Myssql can already commit a transaction even if one request is in error, without using savepoints.
|
||||||
* @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...)
|
* @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...)
|
||||||
* @return resource Resultset of answer
|
* @return resource Resultset of answer
|
||||||
|
|||||||
@ -116,8 +116,9 @@ function length_accountg($account)
|
|||||||
|
|
||||||
if ($account < 0 || empty($account)) return '';
|
if ($account < 0 || empty($account)) return '';
|
||||||
|
|
||||||
|
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) return $account;
|
||||||
|
|
||||||
$g = $conf->global->ACCOUNTING_LENGTH_GACCOUNT;
|
$g = $conf->global->ACCOUNTING_LENGTH_GACCOUNT;
|
||||||
|
|
||||||
if (! empty($g)) {
|
if (! empty($g)) {
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$i = strlen($account);
|
$i = strlen($account);
|
||||||
@ -150,8 +151,9 @@ function length_accounta($accounta)
|
|||||||
|
|
||||||
if ($accounta < 0 || empty($accounta)) return '';
|
if ($accounta < 0 || empty($accounta)) return '';
|
||||||
|
|
||||||
|
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) return $account;
|
||||||
|
|
||||||
$a = $conf->global->ACCOUNTING_LENGTH_AACCOUNT;
|
$a = $conf->global->ACCOUNTING_LENGTH_AACCOUNT;
|
||||||
|
|
||||||
if (! empty($a)) {
|
if (! empty($a)) {
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$i = strlen($accounta);
|
$i = strlen($accounta);
|
||||||
|
|||||||
@ -531,6 +531,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelin
|
|||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
print load_fiche_titre($langs->trans("ProjectsDedicatedToThisThirdParty"),$buttoncreate,'');
|
print load_fiche_titre($langs->trans("ProjectsDedicatedToThisThirdParty"),$buttoncreate,'');
|
||||||
|
print '<div class="div-table-responsive">';
|
||||||
print "\n".'<table class="noborder" width=100%>';
|
print "\n".'<table class="noborder" width=100%>';
|
||||||
|
|
||||||
$sql = "SELECT p.rowid as id, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status";
|
$sql = "SELECT p.rowid as id, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status";
|
||||||
@ -597,7 +598,8 @@ function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelin
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -634,7 +634,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Security:
|
// Security:
|
||||||
// On interdit fichiers caches, remontees de repertoire ainsi que les pipes dans les noms de fichiers.
|
// We refuse cache files/dirs, upload using .. and pipes into filenames.
|
||||||
if (preg_match('/^\./',$src_file) || preg_match('/\.\./',$src_file) || preg_match('/[<>|]/',$src_file))
|
if (preg_match('/^\./',$src_file) || preg_match('/\.\./',$src_file) || preg_match('/[<>|]/',$src_file))
|
||||||
{
|
{
|
||||||
dol_syslog("Refused to deliver file ".$src_file, LOG_WARNING);
|
dol_syslog("Refused to deliver file ".$src_file, LOG_WARNING);
|
||||||
@ -707,6 +707,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
|||||||
* @param int $nohook Disable all hooks
|
* @param int $nohook Disable all hooks
|
||||||
* @param object $object Current object in use
|
* @param object $object Current object in use
|
||||||
* @return boolean True if no error (file is deleted or if glob is used and there's nothing to delete), False if error
|
* @return boolean True if no error (file is deleted or if glob is used and there's nothing to delete), False if error
|
||||||
|
* @see dol_delete_dir
|
||||||
*/
|
*/
|
||||||
function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=null)
|
function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=null)
|
||||||
{
|
{
|
||||||
@ -718,6 +719,14 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=n
|
|||||||
|
|
||||||
dol_syslog("dol_delete_file file=".$file." disableglob=".$disableglob." nophperrors=".$nophperrors." nohook=".$nohook);
|
dol_syslog("dol_delete_file file=".$file." disableglob=".$disableglob." nophperrors=".$nophperrors." nohook=".$nohook);
|
||||||
|
|
||||||
|
// Security:
|
||||||
|
// We refuse transversal using .. and pipes into filenames.
|
||||||
|
if (preg_match('/\.\./',$file) || preg_match('/[<>|]/',$file))
|
||||||
|
{
|
||||||
|
dol_syslog("Refused to delete file ".$file, LOG_WARNING);
|
||||||
|
return False;
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($nohook))
|
if (empty($nohook))
|
||||||
{
|
{
|
||||||
$hookmanager->initHooks(array('fileslib'));
|
$hookmanager->initHooks(array('fileslib'));
|
||||||
@ -782,9 +791,18 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=n
|
|||||||
* @param string $dir Directory to delete
|
* @param string $dir Directory to delete
|
||||||
* @param int $nophperrors Disable all PHP output errors
|
* @param int $nophperrors Disable all PHP output errors
|
||||||
* @return boolean True if success, false if error
|
* @return boolean True if success, false if error
|
||||||
|
* @see dol_delete_file
|
||||||
*/
|
*/
|
||||||
function dol_delete_dir($dir,$nophperrors=0)
|
function dol_delete_dir($dir,$nophperrors=0)
|
||||||
{
|
{
|
||||||
|
// Security:
|
||||||
|
// We refuse transversal using .. and pipes into filenames.
|
||||||
|
if (preg_match('/\.\./',$dir) || preg_match('/[<>|]/',$dir))
|
||||||
|
{
|
||||||
|
dol_syslog("Refused to delete dir ".$dir, LOG_WARNING);
|
||||||
|
return False;
|
||||||
|
}
|
||||||
|
|
||||||
$dir_osencoded=dol_osencode($dir);
|
$dir_osencoded=dol_osencode($dir);
|
||||||
return ($nophperrors?@rmdir($dir_osencoded):rmdir($dir_osencoded));
|
return ($nophperrors?@rmdir($dir_osencoded):rmdir($dir_osencoded));
|
||||||
}
|
}
|
||||||
@ -1355,7 +1373,8 @@ function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('(\.meta
|
|||||||
function dol_check_secure_access_document($modulepart,$original_file,$entity,$fuser='',$refname='')
|
function dol_check_secure_access_document($modulepart,$original_file,$entity,$fuser='',$refname='')
|
||||||
{
|
{
|
||||||
global $user, $conf, $db;
|
global $user, $conf, $db;
|
||||||
|
global $dolibarr_main_data_root;
|
||||||
|
|
||||||
if (! is_object($fuser)) $fuser=$user;
|
if (! is_object($fuser)) $fuser=$user;
|
||||||
|
|
||||||
if (empty($modulepart)) return 'ErrorBadParameter';
|
if (empty($modulepart)) return 'ErrorBadParameter';
|
||||||
@ -1369,141 +1388,140 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
// find the subdirectory name as the reference
|
// find the subdirectory name as the reference
|
||||||
if (empty($refname)) $refname=basename(dirname($original_file)."/");
|
if (empty($refname)) $refname=basename(dirname($original_file)."/");
|
||||||
|
|
||||||
|
$relative_original_file = $original_file;
|
||||||
|
|
||||||
// Wrapping for some images
|
// Wrapping for some images
|
||||||
if ($modulepart == 'companylogo')
|
if ($modulepart == 'companylogo' && !empty($conf->mycompany->dir_output))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->mycompany->dir_output.'/logos/'.$original_file;
|
$original_file=$conf->mycompany->dir_output.'/logos/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping for users photos
|
// Wrapping for users photos
|
||||||
elseif ($modulepart == 'userphoto')
|
elseif ($modulepart == 'userphoto' && !empty($conf->user->dir_output))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->user->dir_output.'/'.$original_file;
|
$original_file=$conf->user->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping for members photos
|
// Wrapping for members photos
|
||||||
elseif ($modulepart == 'memberphoto')
|
elseif ($modulepart == 'memberphoto' && !empty($conf->adherent->dir_output))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->adherent->dir_output.'/'.$original_file;
|
$original_file=$conf->adherent->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les apercu factures
|
// Wrapping pour les apercu factures
|
||||||
elseif ($modulepart == 'apercufacture')
|
elseif ($modulepart == 'apercufacture' && !empty($conf->facture->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->facture->lire) $accessallowed=1;
|
if ($fuser->rights->facture->lire) $accessallowed=1;
|
||||||
$original_file=$conf->facture->dir_output.'/'.$original_file;
|
$original_file=$conf->facture->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les apercu propal
|
// Wrapping pour les apercu propal
|
||||||
elseif ($modulepart == 'apercupropal')
|
elseif ($modulepart == 'apercupropal' && !empty($conf->propal->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->propale->lire) $accessallowed=1;
|
if ($fuser->rights->propale->lire) $accessallowed=1;
|
||||||
$original_file=$conf->propal->dir_output.'/'.$original_file;
|
$original_file=$conf->propal->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les apercu commande
|
// Wrapping pour les apercu commande
|
||||||
elseif ($modulepart == 'apercucommande')
|
elseif ($modulepart == 'apercucommande' && !empty($conf->commande->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->commande->lire) $accessallowed=1;
|
if ($fuser->rights->commande->lire) $accessallowed=1;
|
||||||
$original_file=$conf->commande->dir_output.'/'.$original_file;
|
$original_file=$conf->commande->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les apercu intervention
|
// Wrapping pour les apercu intervention
|
||||||
elseif ($modulepart == 'apercufichinter')
|
elseif ($modulepart == 'apercufichinter' && !empty($conf->ficheinter->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->ficheinter->lire) $accessallowed=1;
|
if ($fuser->rights->ficheinter->lire) $accessallowed=1;
|
||||||
$original_file=$conf->ficheinter->dir_output.'/'.$original_file;
|
$original_file=$conf->ficheinter->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les images des stats propales
|
// Wrapping pour les images des stats propales
|
||||||
elseif ($modulepart == 'propalstats')
|
elseif ($modulepart == 'propalstats' && !empty($conf->propal->dir_temp))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->propale->lire) $accessallowed=1;
|
if ($fuser->rights->propale->lire) $accessallowed=1;
|
||||||
$original_file=$conf->propal->dir_temp.'/'.$original_file;
|
$original_file=$conf->propal->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les images des stats commandes
|
// Wrapping pour les images des stats commandes
|
||||||
elseif ($modulepart == 'orderstats')
|
elseif ($modulepart == 'orderstats' && !empty($conf->commande->dir_temp))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->commande->lire) $accessallowed=1;
|
if ($fuser->rights->commande->lire) $accessallowed=1;
|
||||||
$original_file=$conf->commande->dir_temp.'/'.$original_file;
|
$original_file=$conf->commande->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
elseif ($modulepart == 'orderstatssupplier')
|
elseif ($modulepart == 'orderstatssupplier' && !empty($conf->fournisseur->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->fournisseur->commande->lire) $accessallowed=1;
|
if ($fuser->rights->fournisseur->commande->lire) $accessallowed=1;
|
||||||
$original_file=$conf->fournisseur->dir_output.'/commande/temp/'.$original_file;
|
$original_file=$conf->fournisseur->dir_output.'/commande/temp/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les images des stats factures
|
// Wrapping pour les images des stats factures
|
||||||
elseif ($modulepart == 'billstats')
|
elseif ($modulepart == 'billstats' && !empty($conf->facture->dir_temp))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->facture->lire) $accessallowed=1;
|
if ($fuser->rights->facture->lire) $accessallowed=1;
|
||||||
$original_file=$conf->facture->dir_temp.'/'.$original_file;
|
$original_file=$conf->facture->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
elseif ($modulepart == 'billstatssupplier')
|
elseif ($modulepart == 'billstatssupplier' && !empty($conf->fournisseur->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->fournisseur->facture->lire) $accessallowed=1;
|
if ($fuser->rights->fournisseur->facture->lire) $accessallowed=1;
|
||||||
$original_file=$conf->fournisseur->dir_output.'/facture/temp/'.$original_file;
|
$original_file=$conf->fournisseur->dir_output.'/facture/temp/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les images des stats expeditions
|
// Wrapping pour les images des stats expeditions
|
||||||
elseif ($modulepart == 'expeditionstats')
|
elseif ($modulepart == 'expeditionstats' && !empty($conf->expedition->dir_temp))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->expedition->lire) $accessallowed=1;
|
if ($fuser->rights->expedition->lire) $accessallowed=1;
|
||||||
$original_file=$conf->expedition->dir_temp.'/'.$original_file;
|
$original_file=$conf->expedition->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les images des stats expeditions
|
// Wrapping pour les images des stats expeditions
|
||||||
elseif ($modulepart == 'tripsexpensesstats')
|
elseif ($modulepart == 'tripsexpensesstats' && !empty($conf->deplacement->dir_temp))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->deplacement->lire) $accessallowed=1;
|
if ($fuser->rights->deplacement->lire) $accessallowed=1;
|
||||||
$original_file=$conf->deplacement->dir_temp.'/'.$original_file;
|
$original_file=$conf->deplacement->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les images des stats expeditions
|
// Wrapping pour les images des stats expeditions
|
||||||
elseif ($modulepart == 'memberstats')
|
elseif ($modulepart == 'memberstats' && !empty($conf->adherent->dir_temp))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->adherent->lire) $accessallowed=1;
|
if ($fuser->rights->adherent->lire) $accessallowed=1;
|
||||||
$original_file=$conf->adherent->dir_temp.'/'.$original_file;
|
$original_file=$conf->adherent->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les images des stats produits
|
// Wrapping pour les images des stats produits
|
||||||
elseif (preg_match('/^productstats_/i',$modulepart))
|
elseif (preg_match('/^productstats_/i',$modulepart) && !empty($conf->product->dir_temp))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->produit->lire || $fuser->rights->service->lire) $accessallowed=1;
|
if ($fuser->rights->produit->lire || $fuser->rights->service->lire) $accessallowed=1;
|
||||||
$original_file=(!empty($conf->product->multidir_temp[$entity])?$conf->product->multidir_temp[$entity]:$conf->service->multidir_temp[$entity]).'/'.$original_file;
|
$original_file=(!empty($conf->product->multidir_temp[$entity])?$conf->product->multidir_temp[$entity]:$conf->service->multidir_temp[$entity]).'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping for products or services
|
// Wrapping for products or services
|
||||||
elseif ($modulepart == 'tax')
|
elseif ($modulepart == 'tax' && !empty($conf->tax->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->tax->charges->lire) $accessallowed=1;
|
if ($fuser->rights->tax->charges->lire) $accessallowed=1;
|
||||||
$original_file=$conf->tax->dir_output.'/'.$original_file;
|
$original_file=$conf->tax->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping for products or services
|
// Wrapping for products or services
|
||||||
elseif ($modulepart == 'actions')
|
elseif ($modulepart == 'actions' && !empty($conf->agenda->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->agenda->myactions->read) $accessallowed=1;
|
if ($fuser->rights->agenda->myactions->read) $accessallowed=1;
|
||||||
$original_file=$conf->agenda->dir_output.'/'.$original_file;
|
$original_file=$conf->agenda->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping for categories
|
// Wrapping for categories
|
||||||
elseif ($modulepart == 'category')
|
elseif ($modulepart == 'category' && !empty($conf->categorie->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->categorie->lire) $accessallowed=1;
|
if ($fuser->rights->categorie->lire) $accessallowed=1;
|
||||||
$original_file=$conf->categorie->multidir_output[$entity].'/'.$original_file;
|
$original_file=$conf->categorie->multidir_output[$entity].'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les prelevements
|
// Wrapping pour les prelevements
|
||||||
elseif ($modulepart == 'prelevement')
|
elseif ($modulepart == 'prelevement' && !empty($conf->prelevement->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->prelevement->bons->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->prelevement->bons->lire || preg_match('/^specimen/i',$original_file)) $accessallowed=1;
|
||||||
{
|
|
||||||
$accessallowed=1;
|
|
||||||
}
|
|
||||||
$original_file=$conf->prelevement->dir_output.'/'.$original_file;
|
$original_file=$conf->prelevement->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les graph energie
|
// Wrapping pour les graph energie
|
||||||
elseif ($modulepart == 'graph_stock')
|
elseif ($modulepart == 'graph_stock' && !empty($conf->stock->dir_temp))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->stock->dir_temp.'/'.$original_file;
|
$original_file=$conf->stock->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les graph fournisseurs
|
// Wrapping pour les graph fournisseurs
|
||||||
elseif ($modulepart == 'graph_fourn')
|
elseif ($modulepart == 'graph_fourn' && !empty($conf->fournisseur->dir_temp))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->fournisseur->dir_temp.'/'.$original_file;
|
$original_file=$conf->fournisseur->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les graph des produits
|
// Wrapping pour les graph des produits
|
||||||
elseif ($modulepart == 'graph_product')
|
elseif ($modulepart == 'graph_product' && !empty($conf->product->dir_temp))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->product->multidir_temp[$entity].'/'.$original_file;
|
$original_file=$conf->product->multidir_temp[$entity].'/'.$original_file;
|
||||||
@ -1512,32 +1530,31 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
elseif ($modulepart == 'barcode')
|
elseif ($modulepart == 'barcode')
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
// If viewimage is called for barcode, we try to output an image on the fly,
|
// If viewimage is called for barcode, we try to output an image on the fly, with no build of file on disk.
|
||||||
// with not build of file on disk.
|
|
||||||
//$original_file=$conf->barcode->dir_temp.'/'.$original_file;
|
//$original_file=$conf->barcode->dir_temp.'/'.$original_file;
|
||||||
$original_file='';
|
$original_file='';
|
||||||
}
|
}
|
||||||
// Wrapping pour les icones de background des mailings
|
// Wrapping pour les icones de background des mailings
|
||||||
elseif ($modulepart == 'iconmailing')
|
elseif ($modulepart == 'iconmailing' && !empty($conf->mailing->dir_temp))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->mailing->dir_temp.'/'.$original_file;
|
$original_file=$conf->mailing->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les icones de background des mailings
|
// Wrapping pour le scanner
|
||||||
elseif ($modulepart == 'scanner_user_temp')
|
elseif ($modulepart == 'scanner_user_temp' && !empty($conf->scanner->dir_temp))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->scanner->dir_temp.'/'.$fuser->id.'/'.$original_file;
|
$original_file=$conf->scanner->dir_temp.'/'.$fuser->id.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les images fckeditor
|
// Wrapping pour les images fckeditor
|
||||||
elseif ($modulepart == 'fckeditor')
|
elseif ($modulepart == 'fckeditor' && !empty($conf->fckeditor->dir_output))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->fckeditor->dir_output.'/'.$original_file;
|
$original_file=$conf->fckeditor->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping for third parties
|
// Wrapping for third parties
|
||||||
else if ($modulepart == 'company' || $modulepart == 'societe')
|
else if (($modulepart == 'company' || $modulepart == 'societe') && !empty($conf->societe->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->societe->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->societe->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1548,7 +1565,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping for contact
|
// Wrapping for contact
|
||||||
else if ($modulepart == 'contact')
|
else if ($modulepart == 'contact' && !empty($conf->societe->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->societe->lire)
|
if ($fuser->rights->societe->lire)
|
||||||
{
|
{
|
||||||
@ -1558,7 +1575,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping for invoices
|
// Wrapping for invoices
|
||||||
else if ($modulepart == 'facture' || $modulepart == 'invoice')
|
else if (($modulepart == 'facture' || $modulepart == 'invoice') && !empty($conf->facture->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->facture->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->facture->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1567,7 +1584,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
$original_file=$conf->facture->dir_output.'/'.$original_file;
|
$original_file=$conf->facture->dir_output.'/'.$original_file;
|
||||||
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
|
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
|
||||||
}
|
}
|
||||||
else if ($modulepart == 'massfilesarea_proposals')
|
else if ($modulepart == 'massfilesarea_proposals' && !empty($conf->propal->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->propal->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->propal->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1592,8 +1609,8 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
$original_file=$conf->facture->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file;
|
$original_file=$conf->facture->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les fiches intervention
|
// Wrapping for interventions
|
||||||
else if ($modulepart == 'ficheinter')
|
else if (($modulepart == 'fichinter' || $modulepart == 'ficheinter') && !empty($conf->ficheinter->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->ficheinter->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->ficheinter->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1604,7 +1621,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les deplacements et notes de frais
|
// Wrapping pour les deplacements et notes de frais
|
||||||
else if ($modulepart == 'deplacement')
|
else if ($modulepart == 'deplacement' && !empty($conf->deplacement->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->deplacement->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->deplacement->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1614,7 +1631,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
|
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
|
||||||
}
|
}
|
||||||
// Wrapping pour les propales
|
// Wrapping pour les propales
|
||||||
else if ($modulepart == 'propal')
|
else if ($modulepart == 'propal' && !empty($conf->propal->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->propale->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->propale->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1626,7 +1643,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les commandes
|
// Wrapping pour les commandes
|
||||||
else if ($modulepart == 'commande' || $modulepart == 'order')
|
else if (($modulepart == 'commande' || $modulepart == 'order') && !empty($conf->commande->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->commande->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->commande->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1637,7 +1654,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les projets
|
// Wrapping pour les projets
|
||||||
else if ($modulepart == 'project')
|
else if ($modulepart == 'project' && !empty($conf->projet->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->projet->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->projet->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1646,7 +1663,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
$original_file=$conf->projet->dir_output.'/'.$original_file;
|
$original_file=$conf->projet->dir_output.'/'.$original_file;
|
||||||
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."projet WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
|
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."projet WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
|
||||||
}
|
}
|
||||||
else if ($modulepart == 'project_task')
|
else if ($modulepart == 'project_task' && !empty($conf->projet->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->projet->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->projet->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1655,19 +1672,9 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
$original_file=$conf->projet->dir_output.'/'.$original_file;
|
$original_file=$conf->projet->dir_output.'/'.$original_file;
|
||||||
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."projet WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
|
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."projet WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
|
||||||
}
|
}
|
||||||
// Wrapping for interventions
|
|
||||||
else if ($modulepart == 'fichinter')
|
|
||||||
{
|
|
||||||
if ($fuser->rights->ficheinter->lire || preg_match('/^specimen/i',$original_file))
|
|
||||||
{
|
|
||||||
$accessallowed=1;
|
|
||||||
}
|
|
||||||
$original_file=$conf->ficheinter->dir_output.'/'.$original_file;
|
|
||||||
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wrapping pour les commandes fournisseurs
|
// Wrapping pour les commandes fournisseurs
|
||||||
else if ($modulepart == 'commande_fournisseur' || $modulepart == 'order_supplier')
|
else if (($modulepart == 'commande_fournisseur' || $modulepart == 'order_supplier') && !empty($conf->fournisseur->commande->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->fournisseur->commande->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->fournisseur->commande->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1678,7 +1685,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les factures fournisseurs
|
// Wrapping pour les factures fournisseurs
|
||||||
else if ($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_supplier')
|
else if (($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_supplier') && !empty($conf->fournisseur->facture->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->fournisseur->facture->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->fournisseur->facture->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1689,7 +1696,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les rapport de paiements
|
// Wrapping pour les rapport de paiements
|
||||||
else if ($modulepart == 'facture_paiement')
|
else if ($modulepart == 'facture_paiement' && !empty($conf->facture->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->facture->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->facture->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1700,7 +1707,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping for accounting exports
|
// Wrapping for accounting exports
|
||||||
else if ($modulepart == 'export_compta')
|
else if ($modulepart == 'export_compta' && !empty($conf->accounting->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->accounting->bind->write || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->accounting->bind->write || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1710,7 +1717,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les expedition
|
// Wrapping pour les expedition
|
||||||
else if ($modulepart == 'expedition')
|
else if ($modulepart == 'expedition' && !empty($conf->expedition->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->expedition->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->expedition->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1720,7 +1727,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les bons de livraison
|
// Wrapping pour les bons de livraison
|
||||||
else if ($modulepart == 'livraison')
|
else if ($modulepart == 'livraison' && !empty($conf->livraison->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->expedition->livraison->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->expedition->livraison->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1730,7 +1737,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les actions
|
// Wrapping pour les actions
|
||||||
else if ($modulepart == 'actions')
|
else if ($modulepart == 'actions' && !empty($conf->agenda->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->agenda->myactions->read || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->agenda->myactions->read || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1740,7 +1747,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les actions
|
// Wrapping pour les actions
|
||||||
else if ($modulepart == 'actionsreport')
|
else if ($modulepart == 'actionsreport' && !empty($conf->agenda->dir_temp))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->agenda->allactions->read || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->agenda->allactions->read || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1761,7 +1768,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les contrats
|
// Wrapping pour les contrats
|
||||||
else if ($modulepart == 'contract')
|
else if ($modulepart == 'contract' && !empty($conf->contrat->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->contrat->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->contrat->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1771,7 +1778,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les dons
|
// Wrapping pour les dons
|
||||||
else if ($modulepart == 'donation')
|
else if ($modulepart == 'donation' && !empty($conf->donation->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->don->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->don->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1781,7 +1788,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour les remises de cheques
|
// Wrapping pour les remises de cheques
|
||||||
else if ($modulepart == 'remisecheque')
|
else if ($modulepart == 'remisecheque' && !empty($conf->banque->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->banque->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->banque->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1792,7 +1799,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping for bank
|
// Wrapping for bank
|
||||||
else if ($modulepart == 'bank')
|
else if ($modulepart == 'bank' && !empty($conf->bank->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->banque->lire)
|
if ($fuser->rights->banque->lire)
|
||||||
{
|
{
|
||||||
@ -1802,7 +1809,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping for export module
|
// Wrapping for export module
|
||||||
else if ($modulepart == 'export')
|
else if ($modulepart == 'export' && !empty($conf->export->dir_temp))
|
||||||
{
|
{
|
||||||
// Aucun test necessaire car on force le rep de download sur
|
// Aucun test necessaire car on force le rep de download sur
|
||||||
// le rep export qui est propre a l'utilisateur
|
// le rep export qui est propre a l'utilisateur
|
||||||
@ -1811,47 +1818,42 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping for import module
|
// Wrapping for import module
|
||||||
else if ($modulepart == 'import')
|
else if ($modulepart == 'import' && !empty($conf->import->dir_temp))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->import->dir_temp.'/'.$original_file;
|
$original_file=$conf->import->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour l'editeur wysiwyg
|
// Wrapping pour l'editeur wysiwyg
|
||||||
else if ($modulepart == 'editor')
|
else if ($modulepart == 'editor' && !empty($conf->fckeditor->dir_output))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->fckeditor->dir_output.'/'.$original_file;
|
$original_file=$conf->fckeditor->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping for miscellaneous medias files
|
// Wrapping for miscellaneous medias files
|
||||||
elseif ($modulepart == 'medias')
|
elseif ($modulepart == 'medias' && !empty($dolibarr_main_data_root))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
global $dolibarr_main_data_root;
|
|
||||||
$original_file=$dolibarr_main_data_root.'/medias/'.$original_file;
|
$original_file=$dolibarr_main_data_root.'/medias/'.$original_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping for backups
|
// Wrapping for backups
|
||||||
else if ($modulepart == 'systemtools')
|
else if ($modulepart == 'systemtools' && !empty($conf->admin->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->admin)
|
if ($fuser->admin) $accessallowed=1;
|
||||||
{
|
|
||||||
$accessallowed=1;
|
|
||||||
}
|
|
||||||
$original_file=$conf->admin->dir_output.'/'.$original_file;
|
$original_file=$conf->admin->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping for upload file test
|
// Wrapping for upload file test
|
||||||
else if ($modulepart == 'admin_temp')
|
else if ($modulepart == 'admin_temp' && !empty($conf->admin->dir_temp))
|
||||||
{
|
{
|
||||||
if ($fuser->admin)
|
if ($fuser->admin) $accessallowed=1;
|
||||||
$accessallowed=1;
|
|
||||||
$original_file=$conf->admin->dir_temp.'/'.$original_file;
|
$original_file=$conf->admin->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour BitTorrent
|
// Wrapping pour BitTorrent
|
||||||
else if ($modulepart == 'bittorrent')
|
else if ($modulepart == 'bittorrent' && !empty($conf->bittorrent->dir_output))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$dir='files';
|
$dir='files';
|
||||||
@ -1860,7 +1862,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping pour Foundation module
|
// Wrapping pour Foundation module
|
||||||
else if ($modulepart == 'member')
|
else if ($modulepart == 'member' && !empty($conf->adherent->dir_output))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->adherent->lire || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->adherent->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
@ -1870,7 +1872,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping for Scanner
|
// Wrapping for Scanner
|
||||||
else if ($modulepart == 'scanner_user_temp')
|
else if ($modulepart == 'scanner_user_temp' && !empty($conf->scanner->dir_temp))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->scanner->dir_temp.'/'.$fuser->id.'/'.$original_file;
|
$original_file=$conf->scanner->dir_temp.'/'.$fuser->id.'/'.$original_file;
|
||||||
@ -1883,20 +1885,38 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
// If modulepart=module Allows any module to open a file if file is in directory called DOL_DATA_ROOT/modulepart
|
// If modulepart=module Allows any module to open a file if file is in directory called DOL_DATA_ROOT/modulepart
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (preg_match('/^specimen/i',$original_file)) $accessallowed=1; // If link to a file called specimen. Test must be done before changing $original_file int full path.
|
||||||
|
if ($fuser->admin) $accessallowed=1; // If user is admin
|
||||||
|
|
||||||
// Define $accessallowed
|
// Define $accessallowed
|
||||||
if (preg_match('/^([a-z]+)_user_temp$/i',$modulepart,$reg))
|
if (preg_match('/^([a-z]+)_user_temp$/i',$modulepart,$reg))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->{$reg[1]}->lire || $fuser->rights->{$reg[1]}->read || ($fuser->rights->{$reg[1]}->download)) $accessallowed=1;
|
if (empty($conf->{$reg[1]}->dir_temp)) // modulepart not supported
|
||||||
|
{
|
||||||
|
dol_print_error('','Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($fuser->rights->{$reg[1]}->lire || $fuser->rights->{$reg[1]}->read || ($fuser->rights->{$reg[1]}->download)) $accessallowed=1;
|
||||||
$original_file=$conf->{$reg[1]}->dir_temp.'/'.$fuser->id.'/'.$original_file;
|
$original_file=$conf->{$reg[1]}->dir_temp.'/'.$fuser->id.'/'.$original_file;
|
||||||
}
|
}
|
||||||
else if (preg_match('/^([a-z]+)_temp$/i',$modulepart,$reg))
|
else if (preg_match('/^([a-z]+)_temp$/i',$modulepart,$reg))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->{$reg[1]}->lire || $fuser->rights->{$reg[1]}->read || ($fuser->rights->{$reg[1]}->download)) $accessallowed=1;
|
if (empty($conf->{$reg[1]}->dir_temp)) // modulepart not supported
|
||||||
|
{
|
||||||
|
dol_print_error('','Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($fuser->rights->{$reg[1]}->lire || $fuser->rights->{$reg[1]}->read || ($fuser->rights->{$reg[1]}->download)) $accessallowed=1;
|
||||||
$original_file=$conf->{$reg[1]}->dir_temp.'/'.$original_file;
|
$original_file=$conf->{$reg[1]}->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
else if (preg_match('/^([a-z]+)_user$/i',$modulepart,$reg))
|
else if (preg_match('/^([a-z]+)_user$/i',$modulepart,$reg))
|
||||||
{
|
{
|
||||||
if ($fuser->rights->{$reg[1]}->lire || $fuser->rights->{$reg[1]}->read || ($fuser->rights->{$reg[1]}->download)) $accessallowed=1;
|
if (empty($conf->{$reg[1]}->dir_output)) // modulepart not supported
|
||||||
|
{
|
||||||
|
dol_print_error('','Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($fuser->rights->{$reg[1]}->lire || $fuser->rights->{$reg[1]}->read || ($fuser->rights->{$reg[1]}->download)) $accessallowed=1;
|
||||||
$original_file=$conf->{$reg[1]}->dir_output.'/'.$fuser->id.'/'.$original_file;
|
$original_file=$conf->{$reg[1]}->dir_output.'/'.$fuser->id.'/'.$original_file;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1920,8 +1940,6 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
$original_file=$conf->$modulepart->dir_output.'/'.$original_file;
|
$original_file=$conf->$modulepart->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (preg_match('/^specimen/i',$original_file)) $accessallowed=1; // If link to a specimen
|
|
||||||
if ($fuser->admin) $accessallowed=1; // If user is admin
|
|
||||||
|
|
||||||
// For modules who wants to manage different levels of permissions for documents
|
// For modules who wants to manage different levels of permissions for documents
|
||||||
$subPermCategoryConstName = strtoupper($modulepart).'_SUBPERMCATEGORY_FOR_DOCUMENTS';
|
$subPermCategoryConstName = strtoupper($modulepart).'_SUBPERMCATEGORY_FOR_DOCUMENTS';
|
||||||
@ -1953,7 +1971,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store object in file
|
* Store object in file.
|
||||||
*
|
*
|
||||||
* @param string $directory Directory of cache
|
* @param string $directory Directory of cache
|
||||||
* @param string $filename Name of filecache
|
* @param string $filename Name of filecache
|
||||||
@ -1969,7 +1987,7 @@ function dol_filecache($directory, $filename, $object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test if Refresh needed
|
* Test if Refresh needed.
|
||||||
*
|
*
|
||||||
* @param string $directory Directory of cache
|
* @param string $directory Directory of cache
|
||||||
* @param string $filename Name of filecache
|
* @param string $filename Name of filecache
|
||||||
@ -1985,7 +2003,7 @@ function dol_cache_refresh($directory, $filename, $cachetime)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read object from cachefile
|
* Read object from cachefile.
|
||||||
*
|
*
|
||||||
* @param string $directory Directory of cache
|
* @param string $directory Directory of cache
|
||||||
* @param string $filename Name of filecache
|
* @param string $filename Name of filecache
|
||||||
|
|||||||
@ -1024,7 +1024,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
$morehtmlleft.='</div>';
|
$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">';
|
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">';
|
||||||
if ($object->element == 'action')
|
if ($object->element == 'action')
|
||||||
@ -1036,7 +1036,9 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$width=14; $cssclass='photorefcenter';
|
$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 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>';
|
$morehtmlleft.='</div>';
|
||||||
|
|||||||
@ -635,7 +635,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
|||||||
if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY))
|
if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY))
|
||||||
{
|
{
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
print '<td class="nowrap">';
|
print '<td class="tdoverflowmax100">';
|
||||||
$thirdpartystatic->id=$lines[$i]->socid;
|
$thirdpartystatic->id=$lines[$i]->socid;
|
||||||
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
|
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
|
||||||
print $thirdpartystatic->getNomUrl(1, 'project', 10);
|
print $thirdpartystatic->getNomUrl(1, 'project', 10);
|
||||||
@ -839,10 +839,10 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
|||||||
if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY))
|
if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY))
|
||||||
{
|
{
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
print '<td class="nowrap">';
|
print '<td class="tdoverflowmax100">';
|
||||||
$thirdpartystatic->id=$lines[$i]->thirdparty_id;
|
$thirdpartystatic->id=$lines[$i]->thirdparty_id;
|
||||||
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
|
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
|
||||||
print $thirdpartystatic->getNomUrl(1, 'project', 10);
|
print $thirdpartystatic->getNomUrl(1, 'project');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2008-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2008-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -74,7 +74,7 @@ function dol_decode($chain)
|
|||||||
* If constant MAIN_SECURITY_SALT is defined, we use it as a salt.
|
* If constant MAIN_SECURITY_SALT is defined, we use it as a salt.
|
||||||
*
|
*
|
||||||
* @param string $chain String to hash
|
* @param string $chain String to hash
|
||||||
* @param int $type Type of hash (0:auto, 1:sha1, 2:sha1+md5, 3:md5). Use 3 here, if hash is not needed for security purpose, for security need, prefer 0.
|
* @param int $type Type of hash (0:auto, 1:sha1, 2:sha1+md5, 3:md5, 4:md5 for OpenLdap). Use 3 here, if hash is not needed for security purpose, for security need, prefer 0.
|
||||||
* @return string Hash of string
|
* @return string Hash of string
|
||||||
*/
|
*/
|
||||||
function dol_hash($chain,$type=0)
|
function dol_hash($chain,$type=0)
|
||||||
@ -87,6 +87,7 @@ function dol_hash($chain,$type=0)
|
|||||||
if ($type == 1) return sha1($chain);
|
if ($type == 1) return sha1($chain);
|
||||||
else if ($type == 2) return sha1(md5($chain));
|
else if ($type == 2) return sha1(md5($chain));
|
||||||
else if ($type == 3) return md5($chain);
|
else if ($type == 3) return md5($chain);
|
||||||
|
else if ($type == 4) return '{md5}'.base64_encode(mhash(MHASH_MD5,$chain)); // For OpenLdap with md5
|
||||||
else if (! empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1') return sha1($chain);
|
else if (! empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1') return sha1($chain);
|
||||||
else if (! empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1md5') return sha1(md5($chain));
|
else if (! empty($conf->global->MAIN_SECURITY_HASH_ALGO) && $conf->global->MAIN_SECURITY_HASH_ALGO == 'sha1md5') return sha1(md5($chain));
|
||||||
|
|
||||||
@ -343,7 +344,7 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu
|
|||||||
* This function is also called by restrictedArea
|
* This function is also called by restrictedArea
|
||||||
*
|
*
|
||||||
* @param User $user User to check
|
* @param User $user User to check
|
||||||
* @param array $featuresarray Features/modules to check. Example: ('user','service')
|
* @param array $featuresarray Features/modules to check. Example: ('user','service')
|
||||||
* @param int $objectid Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional).
|
* @param int $objectid Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional).
|
||||||
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany modume. Param not used if objectid is null (optional).
|
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany modume. Param not used if objectid is null (optional).
|
||||||
* @param string $feature2 Feature to check, second level of permission (optional). Can be or check with 'level1|level2'.
|
* @param string $feature2 Feature to check, second level of permission (optional). Can be or check with 'level1|level2'.
|
||||||
@ -367,7 +368,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandsh
|
|||||||
|
|
||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
if ($feature == 'member') $feature='adherent';
|
if ($feature == 'member') $feature='adherent';
|
||||||
|
|
||||||
$check = array('adherent','banque','user','usergroup','produit','service','produit|service','categorie'); // Test on entity only (Objects with no link to company)
|
$check = array('adherent','banque','user','usergroup','produit','service','produit|service','categorie'); // Test on entity only (Objects with no link to company)
|
||||||
$checksoc = array('societe'); // Test for societe object
|
$checksoc = array('societe'); // Test for societe object
|
||||||
$checkother = array('contact'); // Test on entity and link to societe. Allowed if link is empty (Ex: contacts...).
|
$checkother = array('contact'); // Test on entity and link to societe. Allowed if link is empty (Ex: contacts...).
|
||||||
|
|||||||
@ -47,7 +47,7 @@ function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest=
|
|||||||
{
|
{
|
||||||
dol_syslog("functions_dolibarr::check_user_password_dolibarr usertotest=".$usertotest." passwordtotest=".preg_replace('/./','*',$passwordtotest)." entitytotest=".$entitytotest);
|
dol_syslog("functions_dolibarr::check_user_password_dolibarr usertotest=".$usertotest." passwordtotest=".preg_replace('/./','*',$passwordtotest)." entitytotest=".$entitytotest);
|
||||||
|
|
||||||
// If test username/password asked, we define $test=false and $login var if ok, set $_SESSION["dol_loginmesg"] if ko
|
// If test username/password asked, we define $test=false if ko and $login var to login if ok, set also $_SESSION["dol_loginmesg"] if ko
|
||||||
$table = MAIN_DB_PREFIX."user";
|
$table = MAIN_DB_PREFIX."user";
|
||||||
$usernamecol1 = 'login';
|
$usernamecol1 = 'login';
|
||||||
$usernamecol2 = 'email';
|
$usernamecol2 = 'email';
|
||||||
@ -59,6 +59,9 @@ function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest=
|
|||||||
if (preg_match('/@/',$usertotest)) $sql.=' OR '.$usernamecol2." = '".$db->escape($usertotest)."'";
|
if (preg_match('/@/',$usertotest)) $sql.=' OR '.$usernamecol2." = '".$db->escape($usertotest)."'";
|
||||||
$sql.=') AND '.$entitycol." IN (0," . ($entity ? $entity : 1) . ")";
|
$sql.=') AND '.$entitycol." IN (0," . ($entity ? $entity : 1) . ")";
|
||||||
$sql.=' AND statut = 1';
|
$sql.=' AND statut = 1';
|
||||||
|
// Required to first found the user into entity, then the superadmin.
|
||||||
|
// For the case (TODO and that we must avoid) a user has renamed its login with same value than a user in entity 0.
|
||||||
|
$sql.=' ORDER BY entity DESC';
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
@ -1422,7 +1422,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
$newmenu->add('/compta/bank/card.php?id='.$objp->rowid,$objp->label,1,$user->rights->banque->lire);
|
$newmenu->add('/compta/bank/card.php?id='.$objp->rowid,$objp->label,1,$user->rights->banque->lire);
|
||||||
if ($objp->rappro && $objp->courant != Account::TYPE_CASH && empty($objp->clos)) // If not cash account and not closed and can be reconciliate
|
if ($objp->rappro && $objp->courant != Account::TYPE_CASH && empty($objp->clos)) // If not cash account and not closed and can be reconciliate
|
||||||
{
|
{
|
||||||
$newmenu->add('/compta/bank/bankentries.php?id='.$objp->rowid,$langs->trans("Conciliate"),2,$user->rights->banque->consolidate);
|
$newmenu->add('/compta/bank/bankentries.php?action=reconcile&contextpage=banktransactionlist-'.$objp->rowid.'&account='.$objp->rowid.'&id='.$objp->rowid.'&search_conciliated=0',$langs->trans("Conciliate"),2,$user->rights->banque->consolidate);
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,9 +69,10 @@ class html_cerfafr extends ModeleDon
|
|||||||
*
|
*
|
||||||
* @param Don $don Donation object
|
* @param Don $don Donation object
|
||||||
* @param Translate $outputlangs Lang object for output language
|
* @param Translate $outputlangs Lang object for output language
|
||||||
|
* @param string $currency Currency code
|
||||||
* @return int >0 if OK, <0 if KO
|
* @return int >0 if OK, <0 if KO
|
||||||
*/
|
*/
|
||||||
function write_file($don,$outputlangs)
|
function write_file($don,$outputlangs,$currency='')
|
||||||
{
|
{
|
||||||
global $user,$conf,$langs,$mysoc;
|
global $user,$conf,$langs,$mysoc;
|
||||||
|
|
||||||
@ -87,7 +88,9 @@ class html_cerfafr extends ModeleDon
|
|||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
$outputlangs->load("donations");
|
$outputlangs->load("donations");
|
||||||
|
|
||||||
if (! empty($conf->don->dir_output))
|
$currency = !empty($currency) ? $currency : $conf->currency;
|
||||||
|
|
||||||
|
if (! empty($conf->don->dir_output))
|
||||||
{
|
{
|
||||||
// Definition of the object don (for upward compatibility)
|
// Definition of the object don (for upward compatibility)
|
||||||
if (! is_object($don))
|
if (! is_object($don))
|
||||||
@ -165,7 +168,7 @@ class html_cerfafr extends ModeleDon
|
|||||||
//$form = str_replace('__IP__',$user->ip,$form); // TODO $user->ip not exist
|
//$form = str_replace('__IP__',$user->ip,$form); // TODO $user->ip not exist
|
||||||
$form = str_replace('__AMOUNT__',$don->amount,$form);
|
$form = str_replace('__AMOUNT__',$don->amount,$form);
|
||||||
$form = str_replace('__AMOUNTLETTERS__',chiffre_en_lettre($don->amount),$form);
|
$form = str_replace('__AMOUNTLETTERS__',chiffre_en_lettre($don->amount),$form);
|
||||||
$form = str_replace('__CURRENCY__',$outputlangs->transnoentitiesnoconv("Currency".$conf->currency),$form);
|
$form = str_replace('__CURRENCY__',$outputlangs->transnoentitiesnoconv("Currency".$currency),$form);
|
||||||
$form = str_replace('__CURRENCYCODE__',$conf->currency,$form);
|
$form = str_replace('__CURRENCYCODE__',$conf->currency,$form);
|
||||||
$form = str_replace('__MAIN_INFO_SOCIETE_NOM__',$mysoc->name,$form);
|
$form = str_replace('__MAIN_INFO_SOCIETE_NOM__',$mysoc->name,$form);
|
||||||
$form = str_replace('__MAIN_INFO_SOCIETE_ADDRESS__',$mysoc->address,$form);
|
$form = str_replace('__MAIN_INFO_SOCIETE_ADDRESS__',$mysoc->address,$form);
|
||||||
|
|||||||
@ -718,9 +718,10 @@ class pdf_standard extends ModeleExpenseReport
|
|||||||
* @param Translate $outputlangs Output langs
|
* @param Translate $outputlangs Output langs
|
||||||
* @param int $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title
|
* @param int $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title
|
||||||
* @param int $hidebottom Hide bottom bar of array
|
* @param int $hidebottom Hide bottom bar of array
|
||||||
|
* @param string $currency Currency code
|
||||||
* @return void
|
* @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;
|
global $conf;
|
||||||
|
|
||||||
@ -728,12 +729,13 @@ class pdf_standard extends ModeleExpenseReport
|
|||||||
$hidebottom=0;
|
$hidebottom=0;
|
||||||
if ($hidetop) $hidetop=-1;
|
if ($hidetop) $hidetop=-1;
|
||||||
|
|
||||||
|
$currency = !empty($currency) ? $currency : $conf->currency;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
// Amount in (at tab_top - 1)
|
// Amount in (at tab_top - 1)
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$pdf->SetFont('','', $default_font_size - 2);
|
$pdf->SetFont('','', $default_font_size - 2);
|
||||||
$titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentitiesnoconv("Currency".$conf->currency));
|
$titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentitiesnoconv("Currency".$currency));
|
||||||
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 4), $tab_top -4);
|
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 4), $tab_top -4);
|
||||||
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
||||||
|
|
||||||
|
|||||||
@ -1070,6 +1070,8 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// FIXME amount of vat not supported with multicurrency
|
||||||
|
|
||||||
//Local tax 1 before VAT
|
//Local tax 1 before VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
|
|||||||
@ -588,9 +588,9 @@ class ImportCsv extends ModeleImports
|
|||||||
{
|
{
|
||||||
$updatedone = false;
|
$updatedone = false;
|
||||||
$insertdone = false;
|
$insertdone = false;
|
||||||
if(!empty($updatekeys)) {
|
if (!empty($updatekeys)) {
|
||||||
// We do SELECT to get the rowid, if we already have the rowid, it's to be used below for related tables (extrafields)
|
// We do SELECT to get the rowid, if we already have the rowid, it's to be used below for related tables (extrafields)
|
||||||
if(empty($lastinsertid)) {
|
if (empty($lastinsertid)) {
|
||||||
$sqlSelect = 'SELECT rowid FROM '.$tablename;
|
$sqlSelect = 'SELECT rowid FROM '.$tablename;
|
||||||
|
|
||||||
$data = array_combine($listfields, $listvalues);
|
$data = array_combine($listfields, $listvalues);
|
||||||
@ -627,7 +627,7 @@ class ImportCsv extends ModeleImports
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($lastinsertid)) {
|
if (!empty($lastinsertid)) {
|
||||||
// Build SQL UPDATE request
|
// Build SQL UPDATE request
|
||||||
$sqlstart = 'UPDATE '.$tablename;
|
$sqlstart = 'UPDATE '.$tablename;
|
||||||
|
|
||||||
@ -660,7 +660,7 @@ class ImportCsv extends ModeleImports
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update not done, we do insert
|
// Update not done, we do insert
|
||||||
if(!$error && !$updatedone) {
|
if (!$error && !$updatedone) {
|
||||||
// Build SQL INSERT request
|
// Build SQL INSERT request
|
||||||
$sqlstart = 'INSERT INTO '.$tablename.'('.implode(', ', $listfields).', import_key';
|
$sqlstart = 'INSERT INTO '.$tablename.'('.implode(', ', $listfields).', import_key';
|
||||||
$sqlend = ') VALUES('.implode(', ', $listvalues).", '".$importid."'";
|
$sqlend = ') VALUES('.implode(', ', $listvalues).", '".$importid."'";
|
||||||
@ -679,10 +679,10 @@ class ImportCsv extends ModeleImports
|
|||||||
if ($sql)
|
if ($sql)
|
||||||
{
|
{
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
$last_insert_id_array[$tablename] = $this->db->last_insert_id($tablename); // store the last inserted auto_increment id for each table, so that dependent tables can be inserted with the appropriate id. This must be done just after the INSERT request, else we risk losing the id (because another sql query will be issued somewhere in Dolibarr).
|
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$insertdone = true;
|
$last_insert_id_array[$tablename] = $this->db->last_insert_id($tablename); // store the last inserted auto_increment id for each table, so that child tables can be inserted with the appropriate id. This must be done just after the INSERT request, else we risk losing the id (because another sql query will be issued somewhere in Dolibarr).
|
||||||
|
$insertdone = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -44,7 +44,7 @@ class modNotification extends DolibarrModules
|
|||||||
$this->family = "technic";
|
$this->family = "technic";
|
||||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||||
$this->description = "Gestion des notifications (par mail) sur evenement Dolibarr";
|
$this->description = "EMail notifications (push) on business Dolibarr events";
|
||||||
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
|
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
|
||||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||||
$this->special = 1;
|
$this->special = 1;
|
||||||
|
|||||||
@ -554,6 +554,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
// 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;
|
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;
|
||||||
|
|
||||||
$localtax1ligne=$object->lines[$i]->total_localtax1;
|
$localtax1ligne=$object->lines[$i]->total_localtax1;
|
||||||
$localtax2ligne=$object->lines[$i]->total_localtax2;
|
$localtax2ligne=$object->lines[$i]->total_localtax2;
|
||||||
$localtax1_rate=$object->lines[$i]->localtax1_tx;
|
$localtax1_rate=$object->lines[$i]->localtax1_tx;
|
||||||
|
|||||||
@ -388,8 +388,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Unit price before discount
|
// Unit price before discount
|
||||||
|
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails);
|
||||||
$pdf->SetXY($this->posxup, $curY);
|
$pdf->SetXY($this->posxup, $curY);
|
||||||
$pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, price($object->lines[$i]->pu_ht), 0, 'R', 0);
|
$pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, $up_excl_tax, 0, 'R', 0);
|
||||||
|
|
||||||
// Unit price before discount
|
// Unit price before discount
|
||||||
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails);
|
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails);
|
||||||
@ -429,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);
|
$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
|
// 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;
|
$localtax1ligne=$object->lines[$i]->total_localtax1;
|
||||||
$localtax2ligne=$object->lines[$i]->total_localtax2;
|
$localtax2ligne=$object->lines[$i]->total_localtax2;
|
||||||
@ -466,11 +468,11 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->setPage($pagenb);
|
$pdf->setPage($pagenb);
|
||||||
if ($pagenb == 1)
|
if ($pagenb == 1)
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
|
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
|
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code);
|
||||||
}
|
}
|
||||||
$this->_pagefoot($pdf,$object,$outputlangs,1);
|
$this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
@ -482,11 +484,11 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
{
|
{
|
||||||
if ($pagenb == 1)
|
if ($pagenb == 1)
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
|
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
|
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code);
|
||||||
}
|
}
|
||||||
$this->_pagefoot($pdf,$object,$outputlangs,1);
|
$this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||||
// New page
|
// New page
|
||||||
@ -500,12 +502,12 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
// Show square
|
// Show square
|
||||||
if ($pagenb == 1)
|
if ($pagenb == 1)
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
|
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0, $object->multicurrency_code);
|
||||||
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0);
|
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code);
|
||||||
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -593,8 +595,10 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->SetFillColor(255,255,255);
|
$pdf->SetFillColor(255,255,255);
|
||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||||
|
|
||||||
|
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + $object->remise), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + $object->remise), 0, 'R', 1);
|
||||||
|
|
||||||
// Show VAT by rates and total
|
// Show VAT by rates and total
|
||||||
$pdf->SetFillColor(248,248,248);
|
$pdf->SetFillColor(248,248,248);
|
||||||
@ -719,8 +723,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->SetFillColor(224,224,224);
|
$pdf->SetFillColor(224,224,224);
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
|
||||||
|
|
||||||
|
$total_ttc = ($conf->multicurrency->enabled && $object->multiccurency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ttc), $useborder, 'R', 1);
|
||||||
|
|
||||||
if ($deja_regle > 0)
|
if ($deja_regle > 0)
|
||||||
{
|
{
|
||||||
@ -757,9 +762,10 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
* @param Translate $outputlangs Langs object
|
* @param Translate $outputlangs Langs object
|
||||||
* @param int $hidetop Hide top bar of array
|
* @param int $hidetop Hide top bar of array
|
||||||
* @param int $hidebottom Hide bottom bar of array
|
* @param int $hidebottom Hide bottom bar of array
|
||||||
|
* @param string $currency Currency code
|
||||||
* @return void
|
* @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;
|
global $conf;
|
||||||
|
|
||||||
@ -767,6 +773,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$hidebottom=0;
|
$hidebottom=0;
|
||||||
if ($hidetop) $hidetop=-1;
|
if ($hidetop) $hidetop=-1;
|
||||||
|
|
||||||
|
$currency = !empty($currency) ? $currency : $conf->currency;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
// Amount in (at tab_top - 1)
|
// Amount in (at tab_top - 1)
|
||||||
@ -775,7 +782,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
|
|
||||||
if (empty($hidetop))
|
if (empty($hidetop))
|
||||||
{
|
{
|
||||||
$titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentitiesnoconv("Currency".$conf->currency));
|
$titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentitiesnoconv("Currency".$currency));
|
||||||
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top-4);
|
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top-4);
|
||||||
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
||||||
|
|
||||||
|
|||||||
@ -400,8 +400,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Unit price before discount
|
// Unit price before discount
|
||||||
|
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails);
|
||||||
$pdf->SetXY($this->posxup, $curY);
|
$pdf->SetXY($this->posxup, $curY);
|
||||||
$pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, price($object->lines[$i]->subprice), 0, 'R', 0);
|
$pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, $up_excl_tax, 0, 'R', 0);
|
||||||
|
|
||||||
// Quantity
|
// Quantity
|
||||||
$pdf->SetXY($this->posxqty, $curY);
|
$pdf->SetXY($this->posxqty, $curY);
|
||||||
@ -436,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);
|
$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
|
// 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;
|
$localtax1ligne=$object->lines[$i]->total_localtax1;
|
||||||
$localtax2ligne=$object->lines[$i]->total_localtax2;
|
$localtax2ligne=$object->lines[$i]->total_localtax2;
|
||||||
$localtax1_rate=$object->lines[$i]->localtax1_tx;
|
$localtax1_rate=$object->lines[$i]->localtax1_tx;
|
||||||
@ -489,11 +491,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pdf->setPage($pagenb);
|
$pdf->setPage($pagenb);
|
||||||
if ($pagenb == 1)
|
if ($pagenb == 1)
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
|
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
|
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code);
|
||||||
}
|
}
|
||||||
$this->_pagefoot($pdf,$object,$outputlangs,1);
|
$this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
@ -505,11 +507,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
{
|
{
|
||||||
if ($pagenb == 1)
|
if ($pagenb == 1)
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
|
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
|
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code);
|
||||||
}
|
}
|
||||||
$this->_pagefoot($pdf,$object,$outputlangs,1);
|
$this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||||
// New page
|
// New page
|
||||||
@ -523,12 +525,12 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
// Show square
|
// Show square
|
||||||
if ($pagenb == 1)
|
if ($pagenb == 1)
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
|
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0, $object->multicurrency_code);
|
||||||
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0);
|
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code);
|
||||||
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -691,8 +693,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||||
|
|
||||||
|
$total_ht = ($conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht);
|
||||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + (! empty($object->remise)?$object->remise:0)), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ht + (! empty($object->remise)?$object->remise:0)), 0, 'R', 1);
|
||||||
|
|
||||||
// Show VAT by rates and total
|
// Show VAT by rates and total
|
||||||
$pdf->SetFillColor(248,248,248);
|
$pdf->SetFillColor(248,248,248);
|
||||||
@ -826,8 +829,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pdf->SetFillColor(224,224,224);
|
$pdf->SetFillColor(224,224,224);
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
|
||||||
|
|
||||||
|
$total_ttc = ($conf->multicurrency->enabled && $object->multiccurency_tx != 1) ? $object->multicurrency_total_ttc : $object->total_ttc;
|
||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($total_ttc), $useborder, 'R', 1);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
|
|
||||||
@ -876,9 +880,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
* @param Translate $outputlangs Langs object
|
* @param Translate $outputlangs Langs object
|
||||||
* @param int $hidetop Hide top bar of array
|
* @param int $hidetop Hide top bar of array
|
||||||
* @param int $hidebottom Hide bottom bar of array
|
* @param int $hidebottom Hide bottom bar of array
|
||||||
|
* @param string $currency Currency code
|
||||||
* @return void
|
* @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;
|
global $conf;
|
||||||
|
|
||||||
@ -886,6 +891,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$hidebottom=0;
|
$hidebottom=0;
|
||||||
if ($hidetop) $hidetop=-1;
|
if ($hidetop) $hidetop=-1;
|
||||||
|
|
||||||
|
$currency = !empty($currency) ? $currency : $conf->currency;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
// Amount in (at tab_top - 1)
|
// Amount in (at tab_top - 1)
|
||||||
@ -894,7 +900,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
|
|
||||||
if (empty($hidetop))
|
if (empty($hidetop))
|
||||||
{
|
{
|
||||||
$titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentitiesnoconv("Currency".$conf->currency));
|
$titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentitiesnoconv("Currency".$currency));
|
||||||
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top-4);
|
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top-4);
|
||||||
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
||||||
|
|
||||||
@ -1073,14 +1079,14 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
|
|
||||||
if (! empty($object->date_commande))
|
if (! empty($object->date_commande))
|
||||||
{
|
{
|
||||||
$posy+=4;
|
$posy+=5;
|
||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date_commande,"day",false,$outputlangs,true), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date_commande,"day",false,$outputlangs,true), '', 'R');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$posy+=4;
|
$posy+=5;
|
||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(255,0,0);
|
$pdf->SetTextColor(255,0,0);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R');
|
||||||
|
|||||||
@ -460,7 +460,9 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
// 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;
|
$localtax1ligne=$object->lines[$i]->total_localtax1;
|
||||||
$localtax2ligne=$object->lines[$i]->total_localtax2;
|
$localtax2ligne=$object->lines[$i]->total_localtax2;
|
||||||
$localtax1_rate=$object->lines[$i]->localtax1_tx;
|
$localtax1_rate=$object->lines[$i]->localtax1_tx;
|
||||||
@ -560,7 +562,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
$posy=$this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs);
|
$posy=$this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs);
|
||||||
|
|
||||||
// Affiche zone totaux
|
// Affiche zone totaux
|
||||||
$posy=$this->_tableau_tot($pdf, $object, 0, $bottomlasttab, $outputlangs);
|
//$posy=$this->_tableau_tot($pdf, $object, 0, $bottomlasttab, $outputlangs);
|
||||||
|
|
||||||
// Affiche zone versements
|
// Affiche zone versements
|
||||||
/*
|
/*
|
||||||
@ -1089,9 +1091,10 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
* @param Translate $outputlangs Langs object
|
* @param Translate $outputlangs Langs object
|
||||||
* @param int $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title
|
* @param int $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title
|
||||||
* @param int $hidebottom Hide bottom bar of array
|
* @param int $hidebottom Hide bottom bar of array
|
||||||
|
* @param string $currency Currency code
|
||||||
* @return void
|
* @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;
|
global $conf;
|
||||||
|
|
||||||
@ -1099,6 +1102,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
$hidebottom=0;
|
$hidebottom=0;
|
||||||
if ($hidetop) $hidetop=-1;
|
if ($hidetop) $hidetop=-1;
|
||||||
|
|
||||||
|
$currency = !empty($currency) ? $currency : $conf->currency;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
// Amount in (at tab_top - 1)
|
// Amount in (at tab_top - 1)
|
||||||
@ -1107,7 +1111,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
|
|
||||||
if (empty($hidetop))
|
if (empty($hidetop))
|
||||||
{
|
{
|
||||||
$titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentitiesnoconv("Currency".$conf->currency));
|
$titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentitiesnoconv("Currency".$currency));
|
||||||
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top-4);
|
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top-4);
|
||||||
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
|
||||||
|
|
||||||
|
|||||||
@ -6,9 +6,9 @@ require_once(DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php');
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formresources = new FormResource($db);
|
$formresources = new FormResource($db);
|
||||||
|
|
||||||
$out = '<div class="tagtable centpercent border allwidth nohover">';
|
$out = '<div class="tagtable centpercent noborder allwidth nohover">';
|
||||||
|
|
||||||
$out .= '<form class="tagtr '.($var==true?'pair':'impair').'" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
$out .= '<form class="tagtr nohover '.($var==true?'pair':'impair').'" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
$out .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
$out .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
$out .= '<input type="hidden" name="action" value="add_element_resource">';
|
$out .= '<input type="hidden" name="action" value="add_element_resource">';
|
||||||
$out .= '<input type="hidden" name="element" value="'.$element.'">';
|
$out .= '<input type="hidden" name="element" value="'.$element.'">';
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||||
@ -1744,10 +1744,10 @@ else if ($id || $ref)
|
|||||||
{
|
{
|
||||||
$sql = "SELECT obj.rowid, obj.fk_product, obj.label, obj.description, obj.product_type as fk_product_type, obj.qty as qty_asked, obj.date_start, obj.date_end";
|
$sql = "SELECT obj.rowid, obj.fk_product, obj.label, obj.description, obj.product_type as fk_product_type, obj.qty as qty_asked, obj.date_start, obj.date_end";
|
||||||
$sql.= ", ed.rowid as shipmentline_id, ed.qty as qty_shipped, ed.fk_expedition as expedition_id, ed.fk_origin_line, ed.fk_entrepot";
|
$sql.= ", ed.rowid as shipmentline_id, ed.qty as qty_shipped, ed.fk_expedition as expedition_id, ed.fk_origin_line, ed.fk_entrepot";
|
||||||
$sql.= ", e.rowid as shipment_id, e.ref as shipment_ref, e.date_creation, e.date_valid, e.date_delivery, e.date_expedition,";
|
$sql.= ", e.rowid as shipment_id, e.ref as shipment_ref, e.date_creation, e.date_valid, e.date_delivery, e.date_expedition";
|
||||||
//if ($conf->livraison_bon->enabled) $sql .= " l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received,";
|
//if ($conf->livraison_bon->enabled) $sql .= ", l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received";
|
||||||
$sql.= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid, p.tobatch as product_tobatch';
|
$sql.= ', p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid, p.tobatch as product_tobatch';
|
||||||
$sql.= ' p.description as product_desc';
|
$sql.= ', p.description as product_desc';
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed";
|
$sql.= " FROM ".MAIN_DB_PREFIX."expeditiondet as ed";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."expedition as e";
|
$sql.= ", ".MAIN_DB_PREFIX."expedition as e";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX.$origin."det as obj";
|
$sql.= ", ".MAIN_DB_PREFIX.$origin."det as obj";
|
||||||
|
|||||||
@ -39,6 +39,9 @@ $result = restrictedArea($user, 'expensereport', $id, 'expensereport');
|
|||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
$title=$langs->trans("ExpenseReport") . " - " . $langs->trans("Info");
|
$title=$langs->trans("ExpenseReport") . " - " . $langs->trans("Info");
|
||||||
$helpurl="EN:Module_Expense_Reports";
|
$helpurl="EN:Module_Expense_Reports";
|
||||||
llxHeader("",$title,$helpurl);
|
llxHeader("",$title,$helpurl);
|
||||||
|
|||||||
@ -329,7 +329,7 @@ class Export
|
|||||||
$szFilterQuery=" ".$NameField."='".$ValueField."'";
|
$szFilterQuery=" ".$NameField."='".$ValueField."'";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dol_syslog("Error we try to forge an sql export request with a condition on a field with type '".$InfoFieldList[0]."' (defined into module descriptor) but this type is unknown/not supported. It looks like a bug into module descriptor.", LOG_ERROR);
|
dol_syslog("Error we try to forge an sql export request with a condition on a field with type '".$InfoFieldList[0]."' (defined into module descriptor) but this type is unknown/not supported. It looks like a bug into module descriptor.", LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $szFilterQuery;
|
return $szFilterQuery;
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
|
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
|
||||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','5.0.0'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
|
if (! defined('DOL_VERSION')) define('DOL_VERSION','5.0.1'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
|
||||||
|
|
||||||
if (! defined('EURO')) define('EURO',chr(128));
|
if (! defined('EURO')) define('EURO',chr(128));
|
||||||
|
|
||||||
|
|||||||
@ -176,7 +176,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
// Check parameters
|
// Check parameters
|
||||||
if (empty($id) && empty($ref)) return -1;
|
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.localtax1, c.localtax2, ";
|
||||||
$sql.= " c.date_creation, c.date_valid, c.date_approve, c.date_approve2,";
|
$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,";
|
$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_id = $obj->fk_user_approve;
|
||||||
$this->user_approve_id2 = $obj->fk_user_approve2;
|
$this->user_approve_id2 = $obj->fk_user_approve2;
|
||||||
$this->total_ht = $obj->total_ht;
|
$this->total_ht = $obj->total_ht;
|
||||||
$this->total_tva = $obj->tva;
|
$this->total_tva = $obj->total_vat;
|
||||||
$this->total_localtax1 = $obj->localtax1;
|
$this->total_localtax1 = $obj->localtax1;
|
||||||
$this->total_localtax2 = $obj->localtax2;
|
$this->total_localtax2 = $obj->localtax2;
|
||||||
$this->total_ttc = $obj->total_ttc;
|
$this->total_ttc = $obj->total_ttc;
|
||||||
@ -350,10 +350,10 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
||||||
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
||||||
|
|
||||||
$this->special_code = $objp->special_code;
|
$line->special_code = $objp->special_code;
|
||||||
$this->fk_parent_line = $objp->fk_parent_line;
|
$line->fk_parent_line = $objp->fk_parent_line;
|
||||||
|
|
||||||
$this->rang = $objp->rang;
|
$line->rang = $objp->rang;
|
||||||
|
|
||||||
$this->lines[$i] = $line;
|
$this->lines[$i] = $line;
|
||||||
|
|
||||||
@ -1340,9 +1340,11 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
* @param array $array_options extrafields array
|
* @param array $array_options extrafields array
|
||||||
* @param string $fk_unit Code of the unit to use. Null to use the default one
|
* @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 $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
|
* @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;
|
global $langs,$mysoc,$conf;
|
||||||
|
|
||||||
@ -1399,7 +1401,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
if ($prod->fetch($fk_product) > 0)
|
if ($prod->fetch($fk_product) > 0)
|
||||||
{
|
{
|
||||||
$product_type = $prod->type;
|
$product_type = $prod->type;
|
||||||
$label = $prod->libelle;
|
$label = $prod->label;
|
||||||
|
|
||||||
// We use 'none' instead of $fourn_ref, because fourn_ref may not exists anymore. So we will take the first supplier price ok.
|
// We use 'none' instead of $fourn_ref, because fourn_ref may not exists anymore. So we will take the first supplier price ok.
|
||||||
// If we want a dedicated supplier price, we must provide $fk_prod_fourn_price.
|
// If we want a dedicated supplier price, we must provide $fk_prod_fourn_price.
|
||||||
@ -1501,7 +1503,6 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$this->line->product_type=$product_type;
|
$this->line->product_type=$product_type;
|
||||||
$this->line->remise_percent=$remise_percent;
|
$this->line->remise_percent=$remise_percent;
|
||||||
$this->line->subprice=$pu_ht;
|
$this->line->subprice=$pu_ht;
|
||||||
$this->line->rang=$this->rang;
|
|
||||||
$this->line->info_bits=$info_bits;
|
$this->line->info_bits=$info_bits;
|
||||||
|
|
||||||
$this->line->vat_src_code=$vat_src_code;
|
$this->line->vat_src_code=$vat_src_code;
|
||||||
@ -1512,7 +1513,8 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$this->line->total_ttc=$total_ttc;
|
$this->line->total_ttc=$total_ttc;
|
||||||
$this->line->product_type=$type;
|
$this->line->product_type=$type;
|
||||||
$this->line->special_code=$this->special_code;
|
$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->fk_unit=$fk_unit;
|
||||||
|
|
||||||
$this->line->date_start=$date_start;
|
$this->line->date_start=$date_start;
|
||||||
@ -2317,7 +2319,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
||||||
{
|
{
|
||||||
$vat_src_code = $reg[1];
|
$vat_src_code = $reg[1];
|
||||||
$vatrate = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||||
}
|
}
|
||||||
|
|
||||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise);
|
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise);
|
||||||
@ -2951,7 +2953,8 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||||||
$sql.= ' cd.info_bits, cd.total_ht, cd.total_tva, cd.total_ttc,';
|
$sql.= ' cd.info_bits, cd.total_ht, cd.total_tva, cd.total_ttc,';
|
||||||
$sql.= ' cd.total_localtax1, cd.total_localtax2,';
|
$sql.= ' cd.total_localtax1, cd.total_localtax2,';
|
||||||
$sql.= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc,';
|
$sql.= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc,';
|
||||||
$sql.= ' cd.date_start, cd.date_end, cd.fk_unit';
|
$sql.= ' cd.date_start, cd.date_end, cd.fk_unit,';
|
||||||
|
$sql.= ' cd.multicurrency_subprice, cd.multicurrency_total_ht, cd.multicurrency_total_tva, cd.multicurrency_total_ttc';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON cd.fk_product = p.rowid';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON cd.fk_product = p.rowid';
|
||||||
$sql.= ' WHERE cd.rowid = '.$rowid;
|
$sql.= ' WHERE cd.rowid = '.$rowid;
|
||||||
@ -2959,6 +2962,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$objp = $this->db->fetch_object($result);
|
$objp = $this->db->fetch_object($result);
|
||||||
|
|
||||||
$this->rowid = $objp->rowid;
|
$this->rowid = $objp->rowid;
|
||||||
$this->id = $objp->rowid;
|
$this->id = $objp->rowid;
|
||||||
$this->fk_commande = $objp->fk_commande;
|
$this->fk_commande = $objp->fk_commande;
|
||||||
@ -2986,10 +2990,15 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||||||
$this->product_libelle = $objp->product_libelle;
|
$this->product_libelle = $objp->product_libelle;
|
||||||
$this->product_desc = $objp->product_desc;
|
$this->product_desc = $objp->product_desc;
|
||||||
|
|
||||||
$this->date_start = $this->db->jdate($objp->date_start);
|
$this->date_start = $this->db->jdate($objp->date_start);
|
||||||
$this->date_end = $this->db->jdate($objp->date_end);
|
$this->date_end = $this->db->jdate($objp->date_end);
|
||||||
$this->fk_unit = $objp->fk_unit;
|
$this->fk_unit = $objp->fk_unit;
|
||||||
|
|
||||||
|
$this->multicurrency_subprice = $objp->multicurrency_subprice;
|
||||||
|
$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->db->free($result);
|
$this->db->free($result);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -3086,7 +3095,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||||||
$sql.= " total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_unit,";
|
$sql.= " total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_unit,";
|
||||||
$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";
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
$sql.= " VALUES (".$this->fk_commande.", '" . $this->db->escape($this->product_label) . "','" . $this->db->escape($this->desc) . "',";
|
$sql.= " VALUES (".$this->fk_commande.", '" . $this->db->escape($this->label) . "','" . $this->db->escape($this->desc) . "',";
|
||||||
$sql.= " ".($this->date_start?"'".$this->db->idate($this->date_start)."'":"null").",";
|
$sql.= " ".($this->date_start?"'".$this->db->idate($this->date_start)."'":"null").",";
|
||||||
$sql.= " ".($this->date_end?"'".$this->db->idate($this->date_end)."'":"null").",";
|
$sql.= " ".($this->date_end?"'".$this->db->idate($this->date_end)."'":"null").",";
|
||||||
if ($this->fk_product) { $sql.= $this->fk_product.","; }
|
if ($this->fk_product) { $sql.= $this->fk_product.","; }
|
||||||
|
|||||||
@ -2385,8 +2385,9 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
{
|
{
|
||||||
$sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx';
|
$sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx';
|
||||||
$sql.= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 ';
|
$sql.= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 ';
|
||||||
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit';
|
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_facture_fourn, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit';
|
||||||
$sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc';
|
$sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc';
|
||||||
|
$sql.= ', f.multicurrency_subprice, f.multicurrency_total_ht, f.multicurrency_total_tva, multicurrency_total_ttc';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det as f';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det as f';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid';
|
||||||
$sql.= ' WHERE f.rowid = '.$rowid;
|
$sql.= ' WHERE f.rowid = '.$rowid;
|
||||||
@ -2407,6 +2408,7 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
|
|
||||||
$this->id = $obj->rowid;
|
$this->id = $obj->rowid;
|
||||||
$this->rowid = $obj->rowid;
|
$this->rowid = $obj->rowid;
|
||||||
|
$this->fk_facture_fourn = $obj->fk_facture_fourn;
|
||||||
$this->description = $obj->description;
|
$this->description = $obj->description;
|
||||||
$this->product_ref = $obj->product_ref;
|
$this->product_ref = $obj->product_ref;
|
||||||
$this->ref = $obj->product_ref;
|
$this->ref = $obj->product_ref;
|
||||||
@ -2439,6 +2441,11 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
$this->rang = $obj->rang;
|
$this->rang = $obj->rang;
|
||||||
$this->fk_unit = $obj->fk_unit;
|
$this->fk_unit = $obj->fk_unit;
|
||||||
|
|
||||||
|
$this->multicurrency_subprice = $obj->multicurrency_subprice;
|
||||||
|
$this->multicurrency_total_ht = $obj->multicurrency_total_ht;
|
||||||
|
$this->multicurrency_total_tva = $obj->multicurrency_total_tva;
|
||||||
|
$this->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -877,38 +877,10 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'builddoc' && $user->rights->fournisseur->commande->creer) // En get ou en post
|
// Actions to build doc
|
||||||
{
|
$upload_dir = $conf->commande->dir_output;
|
||||||
// Build document
|
$permissioncreate = $user->rights->fournisseur->commande->creer;
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||||
// Save last template used to generate document
|
|
||||||
if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha'));
|
|
||||||
|
|
||||||
$outputlangs = $langs;
|
|
||||||
if (GETPOST('lang_id'))
|
|
||||||
{
|
|
||||||
$outputlangs = new Translate("",$conf);
|
|
||||||
$outputlangs->setDefaultLang(GETPOST('lang_id'));
|
|
||||||
}
|
|
||||||
$result= $object->generateDocument($object->modelpdf,$outputlangs, $hidedetails, $hidedesc, $hideref);
|
|
||||||
if ($result <= 0)
|
|
||||||
{
|
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
|
||||||
$action='';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete file in doc form
|
|
||||||
if ($action == 'remove_file' && $object->id > 0 && $user->rights->fournisseur->commande->creer)
|
|
||||||
{
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
|
||||||
$langs->load("other");
|
|
||||||
$upload_dir = $conf->fournisseur->commande->dir_output;
|
|
||||||
$file = $upload_dir . '/' . GETPOST('file');
|
|
||||||
$ret=dol_delete_file($file,0,0,0,$object);
|
|
||||||
if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
|
|
||||||
else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'update_extras')
|
if ($action == 'update_extras')
|
||||||
{
|
{
|
||||||
@ -1096,7 +1068,10 @@ if (empty($reshook))
|
|||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
array(),
|
array(),
|
||||||
$lines[$i]->fk_unit
|
$lines[$i]->fk_unit,
|
||||||
|
0,
|
||||||
|
$element,
|
||||||
|
!empty($lines[$i]->id) ? $lines[$i]->id : $lines[$i]->rowid
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1890,7 +1865,7 @@ elseif (! empty($object->id))
|
|||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print fieldLabel('CurrencyRate','multicurrency_tx');
|
print fieldLabel('CurrencyRate','multicurrency_tx');
|
||||||
print '</td>';
|
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&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
@ -1901,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);
|
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
|
||||||
} else {
|
} 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 != $conf->currency) {
|
if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
|
||||||
print '<div class="inline-block"> ';
|
print '<div class="inline-block"> ';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -2001,9 +1976,27 @@ elseif (! empty($object->id))
|
|||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
|
if (!empty($conf->multicurrency->enabled))
|
||||||
|
{
|
||||||
|
// Multicurrency Amount HT
|
||||||
|
print '<tr><td class="titlefieldmiddle">' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '</td>';
|
||||||
|
print '<td class="nowrap">' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Multicurrency Amount VAT
|
||||||
|
print '<tr><td>' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '</td>';
|
||||||
|
print '<td class="nowrap">' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Multicurrency Amount TTC
|
||||||
|
print '<tr><td>' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '</td>';
|
||||||
|
print '<td class="nowrap">' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Total
|
// Total
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("AmountHT").'</td>';
|
print '<tr><td class="titlefieldmiddle">'.$langs->trans("AmountHT").'</td>';
|
||||||
print '<td>'.price($object->total_ht,'',$langs,1,-1,-1,$conf->currency).'</td>';
|
print '<td>'.price($object->total_ht,'',$langs,1,-1,-1,$conf->currency).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -2029,24 +2022,6 @@ elseif (! empty($object->id))
|
|||||||
print '<tr><td>'.$langs->trans("AmountTTC").'</td><td>'.price($object->total_ttc,'',$langs,1,-1,-1,$conf->currency).'</td>';
|
print '<tr><td>'.$langs->trans("AmountTTC").'</td><td>'.price($object->total_ttc,'',$langs,1,-1,-1,$conf->currency).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
if (!empty($conf->multicurrency->enabled))
|
|
||||||
{
|
|
||||||
// Multicurrency Amount HT
|
|
||||||
print '<tr><td>' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '</td>';
|
|
||||||
print '<td class="nowrap">' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Multicurrency Amount VAT
|
|
||||||
print '<tr><td>' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '</td>';
|
|
||||||
print '<td class="nowrap">' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Multicurrency Amount TTC
|
|
||||||
print '<tr><td>' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '</td>';
|
|
||||||
print '<td class="nowrap">' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
// Margin Infos
|
// Margin Infos
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2012 Andreu Bisquerra Gaya <jove@bisquerra.com>
|
* Copyright (C) 2012 Andreu Bisquerra Gaya <jove@bisquerra.com>
|
||||||
* Copyright (C) 2012 David Rodriguez Martinez <davidrm146@gmail.com>
|
* Copyright (C) 2012 David Rodriguez Martinez <davidrm146@gmail.com>
|
||||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2012-2017 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
@ -116,7 +116,7 @@ if (($action == 'create' || $action == 'add') && ! $error) {
|
|||||||
$_GET['originid'] = $orders_id[0];
|
$_GET['originid'] = $orders_id[0];
|
||||||
}
|
}
|
||||||
if (isset($_POST['orders_to_invoice'])) {
|
if (isset($_POST['orders_to_invoice'])) {
|
||||||
$orders_id = GETPOST('orders_to_invoice','',1);
|
$orders_id = GETPOST('orders_to_invoice','',2);
|
||||||
$nn = count($orders_id);
|
$nn = count($orders_id);
|
||||||
$ii = 0;
|
$ii = 0;
|
||||||
|
|
||||||
|
|||||||
@ -1796,17 +1796,14 @@ if ($action == 'create')
|
|||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans('TotalHT').'</td><td colspan="2">'.price($objectsrc->total_ht).'</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>";
|
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
|
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->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>";
|
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 '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print fieldLabel('CurrencyRate','multicurrency_tx');
|
print fieldLabel('CurrencyRate','multicurrency_tx');
|
||||||
print '</td>';
|
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&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
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);
|
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
|
||||||
} else {
|
} 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 != $conf->currency) {
|
if($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) {
|
||||||
print '<div class="inline-block"> ';
|
print '<div class="inline-block"> ';
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
@ -2411,6 +2408,7 @@ else
|
|||||||
print $langs->trans('AlreadyPaid');
|
print $langs->trans('AlreadyPaid');
|
||||||
print ' :</td><td align="right"'.(($totalpaye > 0)?' class="amountalreadypaid"':'').'>' . price($totalpaye) . '</td><td> </td></tr>';
|
print ' :</td><td align="right"'.(($totalpaye > 0)?' class="amountalreadypaid"':'').'>' . price($totalpaye) . '</td><td> </td></tr>';
|
||||||
|
|
||||||
|
$resteapayer = $object->total_ttc - $totalpaye;
|
||||||
$resteapayeraffiche = $resteapayer;
|
$resteapayeraffiche = $resteapayer;
|
||||||
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
|
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
|
||||||
|
|
||||||
|
|||||||
@ -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_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_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 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_contratdet ADD COLUMN vat_src_code varchar(10) DEFAULT '' AFTER tva_tx;
|
||||||
|
|
||||||
ALTER TABLE llx_c_payment_term change fdm type_cdr tinyint;
|
ALTER TABLE llx_c_payment_term change fdm type_cdr tinyint;
|
||||||
@ -254,6 +255,10 @@ ALTER TABLE llx_contrat ADD COLUMN fk_user_modif integer;
|
|||||||
|
|
||||||
update llx_accounting_account set account_parent = 0 where account_parent = '';
|
update llx_accounting_account set account_parent = 0 where account_parent = '';
|
||||||
|
|
||||||
|
-- VMYSQL4.3 ALTER TABLE llx_product_price MODIFY COLUMN date_price DATETIME NULL;
|
||||||
|
-- VPGSQL8.2 ALTER TABLE llx_product_price ALTER COLUMN date_price DROP NOT NULL;
|
||||||
|
ALTER TABLE llx_product_price ALTER COLUMN date_price SET DEFAULT NULL;
|
||||||
|
|
||||||
ALTER TABLE llx_product_price ADD COLUMN default_vat_code varchar(10) after tva_tx;
|
ALTER TABLE llx_product_price ADD COLUMN default_vat_code varchar(10) after tva_tx;
|
||||||
ALTER TABLE llx_product_fournisseur_price ADD COLUMN default_vat_code varchar(10) after tva_tx;
|
ALTER TABLE llx_product_fournisseur_price ADD COLUMN default_vat_code varchar(10) after tva_tx;
|
||||||
|
|
||||||
|
|||||||
@ -51,5 +51,6 @@ CREATE TABLE llx_supplier_proposaldet (
|
|||||||
multicurrency_subprice double(24,8) DEFAULT 0,
|
multicurrency_subprice double(24,8) DEFAULT 0,
|
||||||
multicurrency_total_ht double(24,8) DEFAULT 0,
|
multicurrency_total_ht double(24,8) DEFAULT 0,
|
||||||
multicurrency_total_tva 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;
|
) ENGINE=innodb;
|
||||||
@ -105,9 +105,9 @@ ACCOUNTING_LIST_SORT_VENTILATION_DONE=Begin the sorting of the page "Binding don
|
|||||||
|
|
||||||
ACCOUNTING_LENGTH_DESCRIPTION=Truncate product & services description in listings after x chars (Best = 50)
|
ACCOUNTING_LENGTH_DESCRIPTION=Truncate product & services description in listings after x chars (Best = 50)
|
||||||
ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Truncate product & services account description form in listings after x chars (Best = 50)
|
ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Truncate product & services account description form in listings after x chars (Best = 50)
|
||||||
ACCOUNTING_LENGTH_GACCOUNT=Length of the general accounting accounts
|
ACCOUNTING_LENGTH_GACCOUNT=Length of the general accounting accounts (If you set value to 6 here, the account '706' will appear like '706000' on screen)
|
||||||
ACCOUNTING_LENGTH_AACCOUNT=Length of the third party accounting accounts
|
ACCOUNTING_LENGTH_AACCOUNT=Length of the third party accounting accounts (If you set value to 6 here, the account '401' will appear like '401000' on screen)
|
||||||
ACCOUNTING_MANAGE_ZERO=Manage the zero at the end of an accounting account. Needed by some countries. Disabled by default. If set to on, you must also set the 2 following parameters (or it is ignored)
|
ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zero at the end of an accounting account. Needed by some countries (like switzerland). If keep to off (default), you can set the 2 following parameters to ask application to add virtual zero.
|
||||||
BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account
|
BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account
|
||||||
|
|
||||||
ACCOUNTING_SELL_JOURNAL=Sell journal
|
ACCOUNTING_SELL_JOURNAL=Sell journal
|
||||||
|
|||||||
@ -82,7 +82,7 @@ Mask=Mask
|
|||||||
NextValue=Next value
|
NextValue=Next value
|
||||||
NextValueForInvoices=Next value (invoices)
|
NextValueForInvoices=Next value (invoices)
|
||||||
NextValueForCreditNotes=Next value (credit notes)
|
NextValueForCreditNotes=Next value (credit notes)
|
||||||
NextValueForDeposit=Next value (deposit)
|
NextValueForDeposit=Next value (down payment)
|
||||||
NextValueForReplacements=Next value (replacements)
|
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
|
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
|
NoMaxSizeByPHPLimit=Note: No limit is set in your PHP configuration
|
||||||
@ -296,6 +296,7 @@ CallUpdatePage=Go to the page that updates the database structure and data: %s.
|
|||||||
LastStableVersion=Latest stable version
|
LastStableVersion=Latest stable version
|
||||||
LastActivationDate=Latest activation date
|
LastActivationDate=Latest activation date
|
||||||
UpdateServerOffline=Update server offline
|
UpdateServerOffline=Update server offline
|
||||||
|
WithCounter=Manage a counter
|
||||||
GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:<br><b>{000000}</b> corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> same as previous but the counter is reset to zero when month x is reached (x between 1 and 12, or 0 to use the early months of fiscal year defined in your configuration, or 99 to reset to zero every month). If this option is used and x is 2 or higher, then sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br>
|
GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:<br><b>{000000}</b> corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> same as previous but the counter is reset to zero when month x is reached (x between 1 and 12, or 0 to use the early months of fiscal year defined in your configuration, or 99 to reset to zero every month). If this option is used and x is 2 or higher, then sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br>
|
||||||
GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.<br><b>{tttt}</b> The code of third party type on n characters (see dictionary-thirdparty types).<br>
|
GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.<br><b>{tttt}</b> The code of third party type on n characters (see dictionary-thirdparty types).<br>
|
||||||
GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br>
|
GenericMaskCodes3=All other characters in the mask will remain intact.<br>Spaces are not allowed.<br>
|
||||||
@ -1078,7 +1079,7 @@ TotalNumberOfActivatedModules=Total number of activated feature modules: <b>%s</
|
|||||||
YouMustEnableOneModule=You must at least enable 1 module
|
YouMustEnableOneModule=You must at least enable 1 module
|
||||||
ClassNotFoundIntoPathWarning=Class %s not found into PHP path
|
ClassNotFoundIntoPathWarning=Class %s not found into PHP path
|
||||||
YesInSummer=Yes in summer
|
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
|
SuhosinSessionEncrypt=Session storage encrypted by Suhosin
|
||||||
ConditionIsCurrently=Condition is currently %s
|
ConditionIsCurrently=Condition is currently %s
|
||||||
YouUseBestDriver=You use driver %s that is best driver available currently.
|
YouUseBestDriver=You use driver %s that is best driver available currently.
|
||||||
|
|||||||
@ -51,8 +51,8 @@ MemberResiliatedInDolibarr=Member %s terminated
|
|||||||
MemberDeletedInDolibarr=Member %s deleted
|
MemberDeletedInDolibarr=Member %s deleted
|
||||||
MemberSubscriptionAddedInDolibarr=Subscription for member %s added
|
MemberSubscriptionAddedInDolibarr=Subscription for member %s added
|
||||||
ShipmentValidatedInDolibarr=Shipment %s validated
|
ShipmentValidatedInDolibarr=Shipment %s validated
|
||||||
ShipmentClassifyClosedInDolibarr=Shipment %s classify billed
|
ShipmentClassifyClosedInDolibarr=Shipment %s classified billed
|
||||||
ShipmentUnClassifyCloseddInDolibarr=Shipment %s classify reopened
|
ShipmentUnClassifyCloseddInDolibarr=Shipment %s classified reopened
|
||||||
ShipmentDeletedInDolibarr=Shipment %s deleted
|
ShipmentDeletedInDolibarr=Shipment %s deleted
|
||||||
OrderCreatedInDolibarr=Order %s created
|
OrderCreatedInDolibarr=Order %s created
|
||||||
OrderValidatedInDolibarr=Order %s validated
|
OrderValidatedInDolibarr=Order %s validated
|
||||||
|
|||||||
@ -74,13 +74,13 @@ Conciliate=Reconcile
|
|||||||
Conciliation=Reconciliation
|
Conciliation=Reconciliation
|
||||||
ReconciliationLate=Reconciliation late
|
ReconciliationLate=Reconciliation late
|
||||||
IncludeClosedAccount=Include closed accounts
|
IncludeClosedAccount=Include closed accounts
|
||||||
OnlyOpenedAccount=Only opened accounts
|
OnlyOpenedAccount=Only open accounts
|
||||||
AccountToCredit=Account to credit
|
AccountToCredit=Account to credit
|
||||||
AccountToDebit=Account to debit
|
AccountToDebit=Account to debit
|
||||||
DisableConciliation=Disable reconciliation feature for this account
|
DisableConciliation=Disable reconciliation feature for this account
|
||||||
ConciliationDisabled=Reconciliation feature disabled
|
ConciliationDisabled=Reconciliation feature disabled
|
||||||
LinkedToAConciliatedTransaction=Linked to a conciliated entry
|
LinkedToAConciliatedTransaction=Linked to a conciliated entry
|
||||||
StatusAccountOpened=Opened
|
StatusAccountOpened=Open
|
||||||
StatusAccountClosed=Closed
|
StatusAccountClosed=Closed
|
||||||
AccountIdShort=Number
|
AccountIdShort=Number
|
||||||
LineRecord=Transaction
|
LineRecord=Transaction
|
||||||
|
|||||||
@ -15,9 +15,9 @@ DisabledBecauseNotErasable=Disabled because cannot be erased
|
|||||||
InvoiceStandard=Standard invoice
|
InvoiceStandard=Standard invoice
|
||||||
InvoiceStandardAsk=Standard invoice
|
InvoiceStandardAsk=Standard invoice
|
||||||
InvoiceStandardDesc=This kind of invoice is the common invoice.
|
InvoiceStandardDesc=This kind of invoice is the common invoice.
|
||||||
InvoiceDeposit=Deposit invoice
|
InvoiceDeposit=Down payment invoice
|
||||||
InvoiceDepositAsk=Deposit invoice
|
InvoiceDepositAsk=Down payment invoice
|
||||||
InvoiceDepositDesc=This kind of invoice is done when a deposit has been received.
|
InvoiceDepositDesc=This kind of invoice is done when a down payment has been received.
|
||||||
InvoiceProForma=Proforma invoice
|
InvoiceProForma=Proforma invoice
|
||||||
InvoiceProFormaAsk=Proforma invoice
|
InvoiceProFormaAsk=Proforma invoice
|
||||||
InvoiceProFormaDesc=<b>Proforma invoice</b> is an image of a true invoice but has no accountancy value.
|
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
|
PaidBack=Paid back
|
||||||
DeletePayment=Delete payment
|
DeletePayment=Delete payment
|
||||||
ConfirmDeletePayment=Are you sure you want to delete this 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
|
SupplierPayments=Suppliers payments
|
||||||
ReceivedPayments=Received payments
|
ReceivedPayments=Received payments
|
||||||
ReceivedCustomersPayments=Payments received from customers
|
ReceivedCustomersPayments=Payments received from customers
|
||||||
@ -196,12 +196,12 @@ ShowBill=Show invoice
|
|||||||
ShowInvoice=Show invoice
|
ShowInvoice=Show invoice
|
||||||
ShowInvoiceReplace=Show replacing invoice
|
ShowInvoiceReplace=Show replacing invoice
|
||||||
ShowInvoiceAvoir=Show credit note
|
ShowInvoiceAvoir=Show credit note
|
||||||
ShowInvoiceDeposit=Show deposit invoice
|
ShowInvoiceDeposit=Show down payment invoice
|
||||||
ShowInvoiceSituation=Show situation invoice
|
ShowInvoiceSituation=Show situation invoice
|
||||||
ShowPayment=Show payment
|
ShowPayment=Show payment
|
||||||
AlreadyPaid=Already paid
|
AlreadyPaid=Already paid
|
||||||
AlreadyPaidBack=Already paid back
|
AlreadyPaidBack=Already paid back
|
||||||
AlreadyPaidNoCreditNotesNoDeposits=Already paid (without credit notes and deposits)
|
AlreadyPaidNoCreditNotesNoDeposits=Already paid (without credit notes and down payments)
|
||||||
Abandoned=Abandoned
|
Abandoned=Abandoned
|
||||||
RemainderToPay=Remaining unpaid
|
RemainderToPay=Remaining unpaid
|
||||||
RemainderToTake=Remaining amount to take
|
RemainderToTake=Remaining amount to take
|
||||||
@ -268,10 +268,10 @@ RelativeDiscount=Relative discount
|
|||||||
GlobalDiscount=Global discount
|
GlobalDiscount=Global discount
|
||||||
CreditNote=Credit note
|
CreditNote=Credit note
|
||||||
CreditNotes=Credit notes
|
CreditNotes=Credit notes
|
||||||
Deposit=Deposit
|
Deposit=Down payment
|
||||||
Deposits=Deposits
|
Deposits=Down payments
|
||||||
DiscountFromCreditNote=Discount from credit note %s
|
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
|
AbsoluteDiscountUse=This kind of credit can be used on invoice before its validation
|
||||||
CreditNoteDepositUse=Invoice must be validated to use this kind of credits
|
CreditNoteDepositUse=Invoice must be validated to use this kind of credits
|
||||||
NewGlobalDiscount=New absolute discount
|
NewGlobalDiscount=New absolute discount
|
||||||
@ -422,7 +422,7 @@ ChequeDeposits=Checks deposits
|
|||||||
Cheques=Checks
|
Cheques=Checks
|
||||||
DepositId=Id deposit
|
DepositId=Id deposit
|
||||||
NbCheque=Number of checks
|
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
|
UsBillingContactAsIncoiveRecipientIfExist=Use customer billing contact address instead of third party address as recipient for invoices
|
||||||
ShowUnpaidAll=Show all unpaid invoices
|
ShowUnpaidAll=Show all unpaid invoices
|
||||||
ShowUnpaidLateOnly=Show late unpaid invoices only
|
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)
|
PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (recommended Template)
|
||||||
PDFCrevetteDescription=Invoice PDF template Crevette. A complete invoice template for situation invoices
|
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
|
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.
|
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 #####
|
##### Types de contacts #####
|
||||||
TypeContact_facture_internal_SALESREPFOLL=Representative following-up customer invoice
|
TypeContact_facture_internal_SALESREPFOLL=Representative following-up customer invoice
|
||||||
TypeContact_facture_external_BILLING=Customer invoice contact
|
TypeContact_facture_external_BILLING=Customer invoice contact
|
||||||
|
|||||||
@ -13,7 +13,7 @@ MenuNewPrivateIndividual=New private individual
|
|||||||
NewCompany=New company (prospect, customer, supplier)
|
NewCompany=New company (prospect, customer, supplier)
|
||||||
NewThirdParty=New third party (prospect, customer, supplier)
|
NewThirdParty=New third party (prospect, customer, supplier)
|
||||||
CreateDolibarrThirdPartySupplier=Create a third party (supplier)
|
CreateDolibarrThirdPartySupplier=Create a third party (supplier)
|
||||||
CreateThirdPartyOnly=Create thirdpary
|
CreateThirdPartyOnly=Create third party
|
||||||
CreateThirdPartyAndContact=Create a third party + a child contact
|
CreateThirdPartyAndContact=Create a third party + a child contact
|
||||||
ProspectionArea=Prospection area
|
ProspectionArea=Prospection area
|
||||||
IdThirdParty=Id third party
|
IdThirdParty=Id third party
|
||||||
@ -254,7 +254,7 @@ CustomerRelativeDiscountShort=Relative discount
|
|||||||
CustomerAbsoluteDiscountShort=Absolute discount
|
CustomerAbsoluteDiscountShort=Absolute discount
|
||||||
CompanyHasRelativeDiscount=This customer has a default discount of <b>%s%%</b>
|
CompanyHasRelativeDiscount=This customer has a default discount of <b>%s%%</b>
|
||||||
CompanyHasNoRelativeDiscount=This customer has no relative discount by default
|
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
|
CompanyHasCreditNote=This customer still has credit notes for <b>%s</b> %s
|
||||||
CompanyHasNoAbsoluteDiscount=This customer has no discount credit available
|
CompanyHasNoAbsoluteDiscount=This customer has no discount credit available
|
||||||
CustomerAbsoluteDiscountAllUsers=Absolute discounts (granted by all users)
|
CustomerAbsoluteDiscountAllUsers=Absolute discounts (granted by all users)
|
||||||
@ -385,7 +385,7 @@ ListCustomersShort=List of customers
|
|||||||
ThirdPartiesArea=Third parties and contact area
|
ThirdPartiesArea=Third parties and contact area
|
||||||
LastModifiedThirdParties=Latest %s modified third parties
|
LastModifiedThirdParties=Latest %s modified third parties
|
||||||
UniqueThirdParties=Total of unique third parties
|
UniqueThirdParties=Total of unique third parties
|
||||||
InActivity=Opened
|
InActivity=Open
|
||||||
ActivityCeased=Closed
|
ActivityCeased=Closed
|
||||||
ThirdPartyIsClosed=Third party is closed
|
ThirdPartyIsClosed=Third party is closed
|
||||||
ProductsIntoElements=List of products/services into %s
|
ProductsIntoElements=List of products/services into %s
|
||||||
@ -397,7 +397,7 @@ LeopardNumRefModelDesc=The code is free. This code can be modified at any time.
|
|||||||
ManagingDirectors=Manager(s) name (CEO, director, president...)
|
ManagingDirectors=Manager(s) name (CEO, director, president...)
|
||||||
MergeOriginThirdparty=Duplicate third party (third party you want to delete)
|
MergeOriginThirdparty=Duplicate third party (third party you want to delete)
|
||||||
MergeThirdparties=Merge third parties
|
MergeThirdparties=Merge third parties
|
||||||
ConfirmMergeThirdparties=Are you sure you want to merge this third party into the current one? All linked objects (invoices, orders, ...) will be moved to current third party so you will be able to delete the duplicate one.
|
ConfirmMergeThirdparties=Are you sure you want to merge this third party into the current one? All linked objects (invoices, orders, ...) will be moved to current third party, then the thirdparty will be deleted.
|
||||||
ThirdpartiesMergeSuccess=Thirdparties have been merged
|
ThirdpartiesMergeSuccess=Thirdparties have been merged
|
||||||
SaleRepresentativeLogin=Login of sales representative
|
SaleRepresentativeLogin=Login of sales representative
|
||||||
SaleRepresentativeFirstname=First name of sales representative
|
SaleRepresentativeFirstname=First name of sales representative
|
||||||
|
|||||||
@ -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.
|
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>
|
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>
|
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
|
DepositsAreNotIncluded=- Down payment invoices are nor included
|
||||||
DepositsAreIncluded=- Deposit invoices are included
|
DepositsAreIncluded=- Down payment invoices are included
|
||||||
LT2ReportByCustomersInInputOutputModeES=Report by third party IRPF
|
LT2ReportByCustomersInInputOutputModeES=Report by third party IRPF
|
||||||
LT1ReportByCustomersInInputOutputModeES=Report by third party RE
|
LT1ReportByCustomersInInputOutputModeES=Report by third party RE
|
||||||
VATReport=VAT report
|
VATReport=VAT report
|
||||||
@ -168,7 +168,7 @@ DescSellsJournal=Sales Journal
|
|||||||
DescPurchasesJournal=Purchases Journal
|
DescPurchasesJournal=Purchases Journal
|
||||||
InvoiceRef=Invoice ref.
|
InvoiceRef=Invoice ref.
|
||||||
CodeNotDef=Not defined
|
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.
|
DatePaymentTermCantBeLowerThanObjectDate=Payment term date can't be lower than object date.
|
||||||
Pcg_version=Chart of accounts models
|
Pcg_version=Chart of accounts models
|
||||||
Pcg_type=Pcg type
|
Pcg_type=Pcg type
|
||||||
|
|||||||
@ -183,6 +183,7 @@ ErrorUserNotAssignedToTask=User must be assigned to task to be able to enter tim
|
|||||||
ErrorTaskAlreadyAssigned=Task already assigned to user
|
ErrorTaskAlreadyAssigned=Task already assigned to user
|
||||||
ErrorModuleFileSeemsToHaveAWrongFormat=The module package seems to have a wrong format.
|
ErrorModuleFileSeemsToHaveAWrongFormat=The module package seems to have a wrong format.
|
||||||
ErrorFilenameDosNotMatchDolibarrPackageRules=The name of the module package (<strong>%s</strong>) does not match expected name syntax: <strong>%s</strong>
|
ErrorFilenameDosNotMatchDolibarrPackageRules=The name of the module package (<strong>%s</strong>) does not match expected name syntax: <strong>%s</strong>
|
||||||
|
ErrorDuplicateTrigger=Error, duplicate trigger name %s. Already loaded from %s.
|
||||||
|
|
||||||
# Warnings
|
# Warnings
|
||||||
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.
|
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.
|
||||||
|
|||||||
@ -43,6 +43,7 @@ LoanCalcDesc=This <b>mortgage calculator</b> can be used to figure out monthly p
|
|||||||
GoToInterest=%s will go towards INTEREST
|
GoToInterest=%s will go towards INTEREST
|
||||||
GoToPrincipal=%s will go towards PRINCIPAL
|
GoToPrincipal=%s will go towards PRINCIPAL
|
||||||
YouWillSpend=You will spend %s in year %s
|
YouWillSpend=You will spend %s in year %s
|
||||||
|
AddLoan=Create loan
|
||||||
# Admin
|
# Admin
|
||||||
ConfigLoan=Configuration of the module loan
|
ConfigLoan=Configuration of the module loan
|
||||||
LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Accounting account capital by default
|
LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Accounting account capital by default
|
||||||
|
|||||||
@ -171,7 +171,7 @@ SearchOf=Search
|
|||||||
Valid=Valid
|
Valid=Valid
|
||||||
Approve=Approve
|
Approve=Approve
|
||||||
Disapprove=Disapprove
|
Disapprove=Disapprove
|
||||||
ReOpen=Re-Open
|
ReOpen=Re-Opened
|
||||||
Upload=Send file
|
Upload=Send file
|
||||||
ToLink=Link
|
ToLink=Link
|
||||||
Select=Select
|
Select=Select
|
||||||
@ -406,7 +406,7 @@ Duration=Duration
|
|||||||
TotalDuration=Total duration
|
TotalDuration=Total duration
|
||||||
Summary=Summary
|
Summary=Summary
|
||||||
DolibarrStateBoard=Statistics
|
DolibarrStateBoard=Statistics
|
||||||
DolibarrWorkBoard=Work tasks board
|
DolibarrWorkBoard=Open items board
|
||||||
Available=Available
|
Available=Available
|
||||||
NotYetAvailable=Not yet available
|
NotYetAvailable=Not yet available
|
||||||
NotAvailable=Not available
|
NotAvailable=Not available
|
||||||
@ -434,7 +434,7 @@ Reportings=Reporting
|
|||||||
Draft=Draft
|
Draft=Draft
|
||||||
Drafts=Drafts
|
Drafts=Drafts
|
||||||
Validated=Validated
|
Validated=Validated
|
||||||
Opened=Opened
|
Opened=Open
|
||||||
New=New
|
New=New
|
||||||
Discount=Discount
|
Discount=Discount
|
||||||
Unknown=Unknown
|
Unknown=Unknown
|
||||||
|
|||||||
@ -29,9 +29,9 @@ DeleteAProject=Delete a project
|
|||||||
DeleteATask=Delete a task
|
DeleteATask=Delete a task
|
||||||
ConfirmDeleteAProject=Are you sure you want to delete this project?
|
ConfirmDeleteAProject=Are you sure you want to delete this project?
|
||||||
ConfirmDeleteATask=Are you sure you want to delete this task?
|
ConfirmDeleteATask=Are you sure you want to delete this task?
|
||||||
OpenedProjects=Opened projects
|
OpenedProjects=Open projects
|
||||||
OpenedTasks=Opened tasks
|
OpenedTasks=Open tasks
|
||||||
OpportunitiesStatusForOpenedProjects=Opportunities amount of opened projects by status
|
OpportunitiesStatusForOpenedProjects=Opportunities amount of open projects by status
|
||||||
OpportunitiesStatusForProjects=Opportunities amount of projects by status
|
OpportunitiesStatusForProjects=Opportunities amount of projects by status
|
||||||
ShowProject=Show project
|
ShowProject=Show project
|
||||||
SetProject=Set project
|
SetProject=Set project
|
||||||
@ -47,7 +47,7 @@ TaskTimeSpent=Time spent on tasks
|
|||||||
TaskTimeUser=User
|
TaskTimeUser=User
|
||||||
TaskTimeNote=Note
|
TaskTimeNote=Note
|
||||||
TaskTimeDate=Date
|
TaskTimeDate=Date
|
||||||
TasksOnOpenedProject=Tasks on opened projects
|
TasksOnOpenedProject=Tasks on open projects
|
||||||
WorkloadNotDefined=Workload not defined
|
WorkloadNotDefined=Workload not defined
|
||||||
NewTimeSpent=New time spent
|
NewTimeSpent=New time spent
|
||||||
MyTimeSpent=My 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.
|
TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible.
|
||||||
IdTaskTime=Id task time
|
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.
|
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
|
OnlyOpportunitiesShort=Only opportunities
|
||||||
OpenedOpportunitiesShort=Opened opportunities
|
OpenedOpportunitiesShort=Open opportunities
|
||||||
NotAnOpportunityShort=Not an opportunity
|
NotAnOpportunityShort=Not an opportunity
|
||||||
OpportunityTotalAmount=Opportunities total amount
|
OpportunityTotalAmount=Opportunities total amount
|
||||||
OpportunityPonderatedAmount=Opportunities weighted amount
|
OpportunityPonderatedAmount=Opportunities weighted amount
|
||||||
|
|||||||
@ -3,7 +3,7 @@ Proposals=Commercial proposals
|
|||||||
Proposal=Commercial proposal
|
Proposal=Commercial proposal
|
||||||
ProposalShort=Proposal
|
ProposalShort=Proposal
|
||||||
ProposalsDraft=Draft commercial proposals
|
ProposalsDraft=Draft commercial proposals
|
||||||
ProposalsOpened=Opened commercial proposals
|
ProposalsOpened=Open commercial proposals
|
||||||
Prop=Commercial proposals
|
Prop=Commercial proposals
|
||||||
CommercialProposal=Commercial proposal
|
CommercialProposal=Commercial proposal
|
||||||
ProposalCard=Proposal card
|
ProposalCard=Proposal card
|
||||||
@ -26,9 +26,9 @@ AmountOfProposalsByMonthHT=Amount by month (net of tax)
|
|||||||
NbOfProposals=Number of commercial proposals
|
NbOfProposals=Number of commercial proposals
|
||||||
ShowPropal=Show proposal
|
ShowPropal=Show proposal
|
||||||
PropalsDraft=Drafts
|
PropalsDraft=Drafts
|
||||||
PropalsOpened=Opened
|
PropalsOpened=Open
|
||||||
PropalStatusDraft=Draft (needs to be validated)
|
PropalStatusDraft=Draft (needs to be validated)
|
||||||
PropalStatusValidated=Validated (proposal is opened)
|
PropalStatusValidated=Validated (proposal is open)
|
||||||
PropalStatusSigned=Signed (needs billing)
|
PropalStatusSigned=Signed (needs billing)
|
||||||
PropalStatusNotSigned=Not signed (closed)
|
PropalStatusNotSigned=Not signed (closed)
|
||||||
PropalStatusBilled=Billed
|
PropalStatusBilled=Billed
|
||||||
|
|||||||
@ -51,10 +51,10 @@ ActionsOnShipping=Events on shipment
|
|||||||
LinkToTrackYourPackage=Link to track your package
|
LinkToTrackYourPackage=Link to track your package
|
||||||
ShipmentCreationIsDoneFromOrder=For the moment, creation of a new shipment is done from the order card.
|
ShipmentCreationIsDoneFromOrder=For the moment, creation of a new shipment is done from the order card.
|
||||||
ShipmentLine=Shipment line
|
ShipmentLine=Shipment line
|
||||||
ProductQtyInCustomersOrdersRunning=Product quantity into opened customers orders
|
ProductQtyInCustomersOrdersRunning=Product quantity into open customers orders
|
||||||
ProductQtyInSuppliersOrdersRunning=Product quantity into opened suppliers orders
|
ProductQtyInSuppliersOrdersRunning=Product quantity into open suppliers orders
|
||||||
ProductQtyInShipmentAlreadySent=Product quantity from opened customer order already sent
|
ProductQtyInShipmentAlreadySent=Product quantity from oped customer order already sent
|
||||||
ProductQtyInSuppliersShipmentAlreadyRecevied=Product quantity from opened supplier order already received
|
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.
|
NoProductToShipFoundIntoStock=No product to ship found into warehouse <b>%s</b>. Correct stock or go back to choose another warehouse.
|
||||||
WeightVolShort=Weight/Vol.
|
WeightVolShort=Weight/Vol.
|
||||||
ValidateOrderFirstBeforeShipment=You must first validate the order before being able to make shipments.
|
ValidateOrderFirstBeforeShipment=You must first validate the order before being able to make shipments.
|
||||||
|
|||||||
@ -60,16 +60,19 @@ DeStockOnShipment=Decrease real stocks on shipping validation
|
|||||||
DeStockOnShipmentOnClosing=Decrease real stocks on shipping classification closed
|
DeStockOnShipmentOnClosing=Decrease real stocks on shipping classification closed
|
||||||
ReStockOnBill=Increase real stocks on suppliers invoices/credit notes validation
|
ReStockOnBill=Increase real stocks on suppliers invoices/credit notes validation
|
||||||
ReStockOnValidateOrder=Increase real stocks on suppliers orders approbation
|
ReStockOnValidateOrder=Increase real stocks on suppliers orders approbation
|
||||||
ReStockOnDispatchOrder=Increase real stocks on manual dispatching into warehouses, after supplier order receiving
|
ReStockOnDispatchOrder=Increase real stocks on manual dispatching into warehouses, after supplier order receipt of goods
|
||||||
OrderStatusNotReadyToDispatch=Order has not yet or no more a status that allows dispatching of products in stock warehouses.
|
OrderStatusNotReadyToDispatch=Order has not yet or no more a status that allows dispatching of products in stock warehouses.
|
||||||
StockDiffPhysicTeoric=Explanation for difference between physical and theoretical stock
|
StockDiffPhysicTeoric=Explanation for difference between physical and virtual stock
|
||||||
NoPredefinedProductToDispatch=No predefined products for this object. So no dispatching in stock is required.
|
NoPredefinedProductToDispatch=No predefined products for this object. So no dispatching in stock is required.
|
||||||
DispatchVerb=Dispatch
|
DispatchVerb=Dispatch
|
||||||
StockLimitShort=Limit for alert
|
StockLimitShort=Limit for alert
|
||||||
StockLimit=Stock limit for alert
|
StockLimit=Stock limit for alert
|
||||||
PhysicalStock=Physical stock
|
PhysicalStock=Physical stock
|
||||||
RealStock=Real Stock
|
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
|
VirtualStock=Virtual stock
|
||||||
|
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
|
IdWarehouse=Id warehouse
|
||||||
DescWareHouse=Description warehouse
|
DescWareHouse=Description warehouse
|
||||||
LieuWareHouse=Localisation warehouse
|
LieuWareHouse=Localisation warehouse
|
||||||
|
|||||||
@ -8,7 +8,7 @@ SearchRequest=Find a request
|
|||||||
DraftRequests=Draft requests
|
DraftRequests=Draft requests
|
||||||
SupplierProposalsDraft=Draft supplier proposals
|
SupplierProposalsDraft=Draft supplier proposals
|
||||||
LastModifiedRequests=Latest %s modified price requests
|
LastModifiedRequests=Latest %s modified price requests
|
||||||
RequestsOpened=Opened price requests
|
RequestsOpened=Open price requests
|
||||||
SupplierProposalArea=Supplier proposals area
|
SupplierProposalArea=Supplier proposals area
|
||||||
SupplierProposalShort=Supplier proposal
|
SupplierProposalShort=Supplier proposal
|
||||||
SupplierProposals=Supplier proposals
|
SupplierProposals=Supplier proposals
|
||||||
@ -23,7 +23,7 @@ ConfirmValidateAsk=Are you sure you want to validate this price request under na
|
|||||||
DeleteAsk=Delete request
|
DeleteAsk=Delete request
|
||||||
ValidateAsk=Validate request
|
ValidateAsk=Validate request
|
||||||
SupplierProposalStatusDraft=Draft (needs to be validated)
|
SupplierProposalStatusDraft=Draft (needs to be validated)
|
||||||
SupplierProposalStatusValidated=Validated (request is opened)
|
SupplierProposalStatusValidated=Validated (request is open)
|
||||||
SupplierProposalStatusClosed=Closed
|
SupplierProposalStatusClosed=Closed
|
||||||
SupplierProposalStatusSigned=Accepted
|
SupplierProposalStatusSigned=Accepted
|
||||||
SupplierProposalStatusNotSigned=Refused
|
SupplierProposalStatusNotSigned=Refused
|
||||||
|
|||||||
@ -577,9 +577,10 @@ if (! defined('NOLOGIN'))
|
|||||||
{
|
{
|
||||||
// We are already into an authenticated session
|
// We are already into an authenticated session
|
||||||
$login=$_SESSION["dol_login"];
|
$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)
|
if ($resultFetchUser <= 0)
|
||||||
{
|
{
|
||||||
// Account has been removed after login
|
// Account has been removed after login
|
||||||
|
|||||||
@ -155,7 +155,6 @@ $genPriceOptions = function($level) use ($price_options) {
|
|||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
};
|
};
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table class="noborder">
|
<table class="noborder">
|
||||||
@ -173,7 +172,8 @@ $genPriceOptions = function($level) use ($price_options) {
|
|||||||
<td class="fieldrequired" style="text-align: center"><?php
|
<td class="fieldrequired" style="text-align: center"><?php
|
||||||
echo $langs->trans('SellingPrice').' '.$i;
|
echo $langs->trans('SellingPrice').' '.$i;
|
||||||
// Label of price
|
// 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);
|
print ' - '.$langs->trans($conf->global->$keyforlabel);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -264,7 +264,7 @@ class Products extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
function getCategories($id, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) {
|
function getCategories($id, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) {
|
||||||
$categories = new Categories();
|
$categories = new Categories();
|
||||||
return $categories->getListForItem('product', $sortfield, $sortorder, $limit, $page, $id);
|
return $categories->getListForItem($sortfield, $sortorder, $limit, $page, 'product', $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
* Copyright (C) 2014 Henry Florian <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Henry Florian <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2014-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2014 Ion agorria <ion@agorria.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
|
* 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
|
||||||
@ -816,7 +816,7 @@ class Product extends CommonObject
|
|||||||
// End call triggers
|
// 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
|
// We remove directory
|
||||||
if ($conf->product->dir_output)
|
if ($conf->product->dir_output)
|
||||||
|
|||||||
@ -126,10 +126,7 @@ $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lot as pl on pl.fk_product = p.rowi
|
|||||||
if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_product as cp";
|
if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_product as cp";
|
||||||
$sql.= " WHERE p.entity IN (".getEntity('product', 1).")";
|
$sql.= " WHERE p.entity IN (".getEntity('product', 1).")";
|
||||||
if ($search_categ) $sql.= " AND p.rowid = cp.fk_product"; // Join for the needed table to filter by categ
|
if ($search_categ) $sql.= " AND p.rowid = cp.fk_product"; // Join for the needed table to filter by categ
|
||||||
if ($sall)
|
if ($sall) $sql.=natural_search(array('p.ref','p.label','p.description','p.note'), $sall);
|
||||||
{
|
|
||||||
$sql.= " AND (p.ref LIKE '%".$db->escape($sall)."%' OR p.label LIKE '%".$db->escape($sall)."%' OR p.description LIKE '%".$db->escape($sall)."%' OR p.note LIKE '%".$db->escape($sall)."%')";
|
|
||||||
}
|
|
||||||
// if the type is not 1, we show all products (type = 0,2,3)
|
// if the type is not 1, we show all products (type = 0,2,3)
|
||||||
if (dol_strlen($type))
|
if (dol_strlen($type))
|
||||||
{
|
{
|
||||||
@ -163,6 +160,12 @@ $sql.= " pb.batch, pb.eatby, pb.sellby,";
|
|||||||
$sql.= " pl.eatby, pl.sellby";
|
$sql.= " pl.eatby, pl.sellby";
|
||||||
if ($toolowstock) $sql.= " HAVING SUM(".$db->ifsql('ps.reel IS NULL', '0', 'ps.reel').") < p.seuil_stock_alerte"; // Not used yet
|
if ($toolowstock) $sql.= " HAVING SUM(".$db->ifsql('ps.reel IS NULL', '0', 'ps.reel').") < p.seuil_stock_alerte"; // Not used yet
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
|
$nbtotalofrecords = '';
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
|
{
|
||||||
|
$result = $db->query($sql);
|
||||||
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
|
}
|
||||||
$sql.= $db->plimit($limit + 1, $offset);
|
$sql.= $db->plimit($limit + 1, $offset);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|
||||||
@ -193,11 +196,11 @@ if ($resql)
|
|||||||
|
|
||||||
if ($sref || $snom || $sall || GETPOST('search'))
|
if ($sref || $snom || $sall || GETPOST('search'))
|
||||||
{
|
{
|
||||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=".$sref."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy, $sortfield, $sortorder,'',$num, 0, 'title_products');
|
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=".$sref."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy, $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":""), $sortfield, $sortorder,'',$num, 0, 'title_products');
|
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":""), $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($catid))
|
if (! empty($catid))
|
||||||
|
|||||||
@ -524,6 +524,35 @@ class Productlot extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return label of status of object
|
||||||
|
*
|
||||||
|
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||||
|
* @return string Label of status
|
||||||
|
*/
|
||||||
|
function getLibStatut($mode=0)
|
||||||
|
{
|
||||||
|
return $this->LibStatut(0,$mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return label of a given status
|
||||||
|
*
|
||||||
|
* @param int $statut Status
|
||||||
|
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||||
|
* @return string Label of status
|
||||||
|
*/
|
||||||
|
function LibStatut($statut,$mode=0)
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
|
||||||
|
//$langs->load('stocks');
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a link to the a lot card (with optionaly the picto)
|
* Return a link to the a lot card (with optionaly the picto)
|
||||||
* Use this->id,this->lastname, this->firstname
|
* Use this->id,this->lastname, this->firstname
|
||||||
|
|||||||
@ -89,7 +89,7 @@ $arrayfields=array(
|
|||||||
'm.batch'=>array('label'=>$langs->trans("BatchNumberShort"), 'checked'=>1, 'enabled'=>(! empty($conf->productbatch->enabled))),
|
'm.batch'=>array('label'=>$langs->trans("BatchNumberShort"), 'checked'=>1, 'enabled'=>(! empty($conf->productbatch->enabled))),
|
||||||
'pl.eatby'=>array('label'=>$langs->trans("EatByDate"), 'checked'=>0, 'enabled'=>(! empty($conf->productbatch->enabled))),
|
'pl.eatby'=>array('label'=>$langs->trans("EatByDate"), 'checked'=>0, 'enabled'=>(! empty($conf->productbatch->enabled))),
|
||||||
'pl.sellby'=>array('label'=>$langs->trans("SellByDate"), 'checked'=>0, 'position'=>10, 'enabled'=>(! empty($conf->productbatch->enabled))),
|
'pl.sellby'=>array('label'=>$langs->trans("SellByDate"), 'checked'=>0, 'position'=>10, 'enabled'=>(! empty($conf->productbatch->enabled))),
|
||||||
'm.warehouse'=>array('label'=>$langs->trans("Warehouse"), 'checked'=>1, 'enabled'=>(! $id > 0)), // If we are on specific warehouse, we hide it
|
'e.label'=>array('label'=>$langs->trans("Warehouse"), 'checked'=>1, 'enabled'=>(! $id > 0)), // If we are on specific warehouse, we hide it
|
||||||
'm.fk_user_author'=>array('label'=>$langs->trans("Author"), 'checked'=>0),
|
'm.fk_user_author'=>array('label'=>$langs->trans("Author"), 'checked'=>0),
|
||||||
'm.inventorycode'=>array('label'=>$langs->trans("InventoryCodeShort"), 'checked'=>1),
|
'm.inventorycode'=>array('label'=>$langs->trans("InventoryCodeShort"), 'checked'=>1),
|
||||||
'm.label'=>array('label'=>$langs->trans("LabelMovement"), 'checked'=>1),
|
'm.label'=>array('label'=>$langs->trans("LabelMovement"), 'checked'=>1),
|
||||||
@ -640,6 +640,7 @@ if ($resql)
|
|||||||
if ($search_inventorycode) $param.='&search_inventorycode='.urlencode($search_inventorycode);
|
if ($search_inventorycode) $param.='&search_inventorycode='.urlencode($search_inventorycode);
|
||||||
if ($search_product_ref) $param.='&search_product_ref='.urlencode($search_product_ref);
|
if ($search_product_ref) $param.='&search_product_ref='.urlencode($search_product_ref);
|
||||||
if ($search_product) $param.='&search_product='.urlencode($search_product);
|
if ($search_product) $param.='&search_product='.urlencode($search_product);
|
||||||
|
if ($search_batch) $param.='&search_batch='.urlencode($search_batch);
|
||||||
if ($search_warehouse > 0) $param.='&search_warehouse='.urlencode($search_warehouse);
|
if ($search_warehouse > 0) $param.='&search_warehouse='.urlencode($search_warehouse);
|
||||||
if (!empty($sref)) $param.='&sref='.urlencode($sref); // FIXME $sref is not defined
|
if (!empty($sref)) $param.='&sref='.urlencode($sref); // FIXME $sref is not defined
|
||||||
if (!empty($snom)) $param.='&snom='.urlencode($snom); // FIXME $snom is not defined
|
if (!empty($snom)) $param.='&snom='.urlencode($snom); // FIXME $snom is not defined
|
||||||
@ -710,7 +711,7 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['m.batch']['checked'])) print_liste_field_titre($arrayfields['m.batch']['label'],$_SERVER["PHP_SELF"],'m.batch','',$param,'align="center"',$sortfield,$sortorder);
|
if (! empty($arrayfields['m.batch']['checked'])) print_liste_field_titre($arrayfields['m.batch']['label'],$_SERVER["PHP_SELF"],'m.batch','',$param,'align="center"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['pl.eatby']['checked'])) print_liste_field_titre($arrayfields['pl.eatby']['label'],$_SERVER["PHP_SELF"],'pl.eatby','',$param,'align="center"',$sortfield,$sortorder);
|
if (! empty($arrayfields['pl.eatby']['checked'])) print_liste_field_titre($arrayfields['pl.eatby']['label'],$_SERVER["PHP_SELF"],'pl.eatby','',$param,'align="center"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['pl.sellby']['checked'])) print_liste_field_titre($arrayfields['pl.sellby']['label'],$_SERVER["PHP_SELF"],'pl.sellby','',$param,'align="center"',$sortfield,$sortorder);
|
if (! empty($arrayfields['pl.sellby']['checked'])) print_liste_field_titre($arrayfields['pl.sellby']['label'],$_SERVER["PHP_SELF"],'pl.sellby','',$param,'align="center"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['m.warehouse']['checked'])) print_liste_field_titre($arrayfields['m.warehouse']['label'],$_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder); // We are on a specific warehouse card, no filter on other should be possible
|
if (! empty($arrayfields['e.label']['checked'])) print_liste_field_titre($arrayfields['e.label']['label'],$_SERVER["PHP_SELF"], "e.label","",$param,"",$sortfield,$sortorder); // We are on a specific warehouse card, no filter on other should be possible
|
||||||
if (! empty($arrayfields['m.fk_user_author']['checked'])) print_liste_field_titre($arrayfields['m.fk_user_author']['label'],$_SERVER["PHP_SELF"], "m.fk_user_author","",$param,"",$sortfield,$sortorder);
|
if (! empty($arrayfields['m.fk_user_author']['checked'])) print_liste_field_titre($arrayfields['m.fk_user_author']['label'],$_SERVER["PHP_SELF"], "m.fk_user_author","",$param,"",$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['m.inventorycode']['checked'])) print_liste_field_titre($arrayfields['m.inventorycode']['label'],$_SERVER["PHP_SELF"], "m.inventorycode","",$param,"",$sortfield,$sortorder);
|
if (! empty($arrayfields['m.inventorycode']['checked'])) print_liste_field_titre($arrayfields['m.inventorycode']['label'],$_SERVER["PHP_SELF"], "m.inventorycode","",$param,"",$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['m.label']['checked'])) print_liste_field_titre($arrayfields['m.label']['label'],$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
|
if (! empty($arrayfields['m.label']['checked'])) print_liste_field_titre($arrayfields['m.label']['label'],$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
|
||||||
@ -774,7 +775,7 @@ if ($resql)
|
|||||||
// Batch
|
// Batch
|
||||||
if (! empty($arrayfields['m.batch']['checked']))
|
if (! empty($arrayfields['m.batch']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center"><input class="flat" type="text" size="5" name="search_batch" value="'.dol_escape_htmltag($search_batch).'"></td>';
|
print '<td class="liste_titre" align="center"><input class="flat" type="text" size="5" name="search_batch" value="'.dol_escape_htmltag($search_batch).'"></td>';
|
||||||
}
|
}
|
||||||
if (! empty($arrayfields['pl.eatby']['checked']))
|
if (! empty($arrayfields['pl.eatby']['checked']))
|
||||||
{
|
{
|
||||||
@ -787,7 +788,7 @@ if ($resql)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
// Warehouse
|
// Warehouse
|
||||||
if (! empty($arrayfields['m.warehouse']['checked']))
|
if (! empty($arrayfields['e.label']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre maxwidthonsmartphone" align="left">';
|
print '<td class="liste_titre maxwidthonsmartphone" align="left">';
|
||||||
//print '<input class="flat" type="text" size="8" name="search_warehouse" value="'.($search_warehouse).'">';
|
//print '<input class="flat" type="text" size="8" name="search_warehouse" value="'.($search_warehouse).'">';
|
||||||
@ -949,7 +950,7 @@ if ($resql)
|
|||||||
print '<td align="center">'. dol_print_date($objp->sellby,'day') .'</td>';
|
print '<td align="center">'. dol_print_date($objp->sellby,'day') .'</td>';
|
||||||
}
|
}
|
||||||
// Warehouse
|
// Warehouse
|
||||||
if (! empty($arrayfields['m.warehouse']['checked']))
|
if (! empty($arrayfields['e.label']['checked']))
|
||||||
{
|
{
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $warehousestatic->getNomUrl(1);
|
print $warehousestatic->getNomUrl(1);
|
||||||
|
|||||||
@ -270,24 +270,6 @@ llxHeader('','ProductLot','');
|
|||||||
$form=new Form($db);
|
$form=new Form($db);
|
||||||
|
|
||||||
|
|
||||||
// Put here content of your page
|
|
||||||
|
|
||||||
// Example : Adding jquery code
|
|
||||||
print '<script type="text/javascript" language="javascript">
|
|
||||||
jQuery(document).ready(function() {
|
|
||||||
function init_myfunc()
|
|
||||||
{
|
|
||||||
jQuery("#myid").removeAttr(\'disabled\');
|
|
||||||
jQuery("#myid").attr(\'disabled\',\'disabled\');
|
|
||||||
}
|
|
||||||
init_myfunc();
|
|
||||||
jQuery("#mybutton").click(function() {
|
|
||||||
init_myfunc();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>';
|
|
||||||
|
|
||||||
|
|
||||||
// Part to create
|
// Part to create
|
||||||
if ($action == 'create')
|
if ($action == 'create')
|
||||||
{
|
{
|
||||||
@ -335,19 +317,18 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="border centpercent">'."\n";
|
|
||||||
|
|
||||||
$linkback = '<a href="' . DOL_URL_ROOT . '/product/stock/productlot_list.php' . '">' . $langs->trans("BackToList") . '</a>';
|
$linkback = '<a href="' . DOL_URL_ROOT . '/product/stock/productlot_list.php' . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
// Ref
|
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'batch');
|
||||||
print '<tr><td class="titlefield">' . $langs->trans('Batch') . '</td>';
|
|
||||||
print '<td colspan="3">';
|
print '<div class="fichecenter">';
|
||||||
print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'batch');
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
print '<table class="border centpercent">'."\n";
|
||||||
|
|
||||||
// Product
|
// Product
|
||||||
print '<tr><td>'.$langs->trans("Product").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Product").'</td><td>';
|
||||||
$producttmp = new Product($db);
|
$producttmp = new Product($db);
|
||||||
$producttmp->fetch($object->fk_product);
|
$producttmp->fetch($object->fk_product);
|
||||||
print $producttmp->getNomUrl(1, 'stock');
|
print $producttmp->getNomUrl(1, 'stock');
|
||||||
@ -356,7 +337,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
// Eat by
|
// Eat by
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey($langs->trans('Eatby'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
print $form->editfieldkey($langs->trans('Eatby'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||||
print '</td><td colspan="5">';
|
print '</td><td>';
|
||||||
print $form->editfieldval($langs->trans('Eatby'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
print $form->editfieldval($langs->trans('Eatby'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -364,7 +345,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
// Sell by
|
// Sell by
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey($langs->trans('Sellby'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
print $form->editfieldkey($langs->trans('Sellby'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||||
print '</td><td colspan="5">';
|
print '</td><td>';
|
||||||
print $form->editfieldval($langs->trans('Sellby'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
print $form->editfieldval($langs->trans('Sellby'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -375,6 +356,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -413,11 +413,11 @@ if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY))
|
|||||||
{
|
{
|
||||||
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.$langs->trans("PlannedWorkload").'</td>';
|
print '<td align="right" class="maxwidth100">'.$langs->trans("PlannedWorkload").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("ProgressDeclared").'</td>';
|
print '<td align="right" class="maxwidth100">'.$langs->trans("ProgressDeclared").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
|
print '<td align="right" class="maxwidth100">'.$langs->trans("TimeSpent").'</td>';
|
||||||
if ($usertoprocess->id == $user->id) print '<td align="right">'.$langs->trans("TimeSpentByYou").'</td>';
|
if ($usertoprocess->id == $user->id) print '<td align="right" class="maxwidth100">'.$langs->trans("TimeSpentByYou").'</td>';
|
||||||
else print '<td align="right">'.$langs->trans("TimeSpentByUser").'</td>';
|
else print '<td align="right" class="maxwidth100">'.$langs->trans("TimeSpentByUser").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("HourStart").'</td>';
|
print '<td align="center">'.$langs->trans("HourStart").'</td>';
|
||||||
print '<td align="center" colspan="2">'.$langs->trans("Duration").'</td>';
|
print '<td align="center" colspan="2">'.$langs->trans("Duration").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("Note").'</td>';
|
print '<td align="right">'.$langs->trans("Note").'</td>';
|
||||||
|
|||||||
@ -262,7 +262,7 @@ if ($action == 'addtime' && $user->rights->projet->lire)
|
|||||||
setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
|
setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
|
||||||
|
|
||||||
// Redirect to avoid submit twice on back
|
// Redirect to avoid submit twice on back
|
||||||
header('Location: '.$_SERVER["PHP_SELF"].($projectid?'?id='.$projectid:'?').($mode?'&mode='.$mode:''));
|
header('Location: '.$_SERVER["PHP_SELF"].($projectid?'?id='.$projectid:'?').($mode?'&mode='.$mode:'').($day?'&day='.$day:'').($month?'&month='.$month:'').($year?'&year='.$year:''));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -408,17 +408,17 @@ if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY))
|
|||||||
{
|
{
|
||||||
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
||||||
}
|
}
|
||||||
print '<td align="right">'.$langs->trans("PlannedWorkload").'</td>';
|
print '<td align="right" class="maxwidth75">'.$langs->trans("PlannedWorkload").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("ProgressDeclared").'</td>';
|
print '<td align="right" class="maxwidth75">'.$langs->trans("ProgressDeclared").'</td>';
|
||||||
print '<td align="right">'.$langs->trans("TimeSpent").'</td>';
|
print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpent").'</td>';
|
||||||
if ($usertoprocess->id == $user->id) print '<td align="right">'.$langs->trans("TimeSpentByYou").'</td>';
|
if ($usertoprocess->id == $user->id) print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpentByYou").'</td>';
|
||||||
else print '<td align="right">'.$langs->trans("TimeSpentByUser").'</td>';
|
else print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpentByUser").'</td>';
|
||||||
|
|
||||||
$startday=dol_mktime(12, 0, 0, $startdayarray['first_month'], $startdayarray['first_day'], $startdayarray['first_year']);
|
$startday=dol_mktime(12, 0, 0, $startdayarray['first_month'], $startdayarray['first_day'], $startdayarray['first_year']);
|
||||||
|
|
||||||
for($i=0;$i<7;$i++)
|
for($i=0;$i<7;$i++)
|
||||||
{
|
{
|
||||||
print '<td width="7%" align="center" class="hide'.$i.'">'.dol_print_date($startday + ($i * 3600 * 24), '%a').'<br>'.dol_print_date($startday + ($i * 3600 * 24), 'dayreduceformat').'</td>';
|
print '<td width="6%" align="center" class="hide'.$i.'">'.dol_print_date($startday + ($i * 3600 * 24), '%a').'<br>'.dol_print_date($startday + ($i * 3600 * 24), 'dayreduceformat').'</td>';
|
||||||
}
|
}
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -460,13 +460,13 @@ if (count($tasksarray) > 0)
|
|||||||
|
|
||||||
print '<tr class="liste_total">
|
print '<tr class="liste_total">
|
||||||
<td class="liste_total" colspan="'.$colspan.'" align="right">'.$langs->trans("Total").'</td>
|
<td class="liste_total" colspan="'.$colspan.'" align="right">'.$langs->trans("Total").'</td>
|
||||||
<td class="liste_total hide0" width="7%" align="center"><div id="totalDay[0]"> </div></td>
|
<td class="liste_total hide0" align="center"><div id="totalDay[0]"> </div></td>
|
||||||
<td class="liste_total hide1" width="7%" align="center"><div id="totalDay[1]"> </div></td>
|
<td class="liste_total hide1" align="center"><div id="totalDay[1]"> </div></td>
|
||||||
<td class="liste_total hide2" width="7%" align="center"><div id="totalDay[2]"> </div></td>
|
<td class="liste_total hide2" align="center"><div id="totalDay[2]"> </div></td>
|
||||||
<td class="liste_total hide3" width="7%" align="center"><div id="totalDay[3]"> </div></td>
|
<td class="liste_total hide3" align="center"><div id="totalDay[3]"> </div></td>
|
||||||
<td class="liste_total hide4" width="7%" align="center"><div id="totalDay[4]"> </div></td>
|
<td class="liste_total hide4" align="center"><div id="totalDay[4]"> </div></td>
|
||||||
<td class="liste_total hide5" width="7%" align="center"><div id="totalDay[5]"> </div></td>
|
<td class="liste_total hide5" align="center"><div id="totalDay[5]"> </div></td>
|
||||||
<td class="liste_total hide6" width="7%" align="center"><div id="totalDay[6]"> </div></td>
|
<td class="liste_total hide6" align="center"><div id="totalDay[6]"> </div></td>
|
||||||
<td class="liste_total"></td>
|
<td class="liste_total"></td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -591,6 +591,7 @@ if ($action == 'create' && $user->rights->projet->creer)
|
|||||||
// Categories
|
// Categories
|
||||||
print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1);
|
||||||
|
$arrayselected=GETPOST('categories', 'array');
|
||||||
print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%');
|
print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%');
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* 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
|
* 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
|
||||||
@ -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
|
// We remove directory
|
||||||
if ($conf->projet->dir_output)
|
if ($conf->projet->dir_output)
|
||||||
@ -1736,16 +1737,19 @@ class Project extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function load_state_board()
|
function load_state_board()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $user;
|
||||||
|
|
||||||
$this->nb=array();
|
$this->nb=array();
|
||||||
|
|
||||||
$sql = "SELECT count(u.rowid) as nb";
|
$sql = "SELECT count(p.rowid) as nb";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as u";
|
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||||
$sql.= " WHERE";
|
$sql.= " WHERE";
|
||||||
//$sql.= " WHERE u.fk_statut > 0";
|
$sql.= " p.entity IN (".getEntity('projet', 1).")";
|
||||||
//$sql.= " AND employee != 0";
|
if (! $user->rights->projet->all->lire)
|
||||||
$sql.= " u.entity IN (".getEntity('projet', 1).")";
|
{
|
||||||
|
$projectsListId = $this->getProjectsAuthorizedForUser($user,0,1);
|
||||||
|
$sql .= "AND p.rowid IN (".$projectsListId.")";
|
||||||
|
}
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
@ -680,7 +680,9 @@ foreach ($listofreferent as $key => $value)
|
|||||||
{
|
{
|
||||||
$addform.='<div class="inline-block valignmiddle">';
|
$addform.='<div class="inline-block valignmiddle">';
|
||||||
if ($testnew) $addform.='<a class="buttonxxx" href="'.$urlnew.'">'.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).'</a>';
|
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>';
|
$addform.='<div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1041,7 +1043,7 @@ foreach ($listofreferent as $key => $value)
|
|||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
if (empty($value['disableamount']))
|
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>';
|
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>';
|
//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">';
|
print '<td align="right">';
|
||||||
if (empty($value['disableamount']))
|
if (empty($value['disableamount']))
|
||||||
{
|
{
|
||||||
|
if ($tablename != 'projet_task' || ! empty($conf->salaries->enabled)) print $langs->trans("TotalTTC").' : '.price($total_ttc);
|
||||||
if (! empty($conf->salaries->enabled)) print $langs->trans("TotalTTC").' : '.price($total_ttc);
|
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
|
|||||||
@ -196,6 +196,7 @@ $title=$langs->trans("Projects");
|
|||||||
if ($search_user == $user->id) $title=$langs->trans("MyProjects");
|
if ($search_user == $user->id) $title=$langs->trans("MyProjects");
|
||||||
|
|
||||||
// Get list of project id allowed to user (in a string list separated by coma)
|
// 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);
|
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)
|
// 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).')';
|
$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->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
|
// 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 > 0) $sql.= " AND cs.fk_categorie = ".$db->escape($search_categ);
|
||||||
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||||
if ($search_ref) $sql .= natural_search('p.ref', $search_ref);
|
if ($search_ref) $sql .= natural_search('p.ref', $search_ref);
|
||||||
|
|||||||
@ -318,7 +318,7 @@ class Contacts extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
function getCategories($id, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) {
|
function getCategories($id, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) {
|
||||||
$categories = new Categories();
|
$categories = new Categories();
|
||||||
return $categories->getListForItem('contact', $sortfield, $sortorder, $limit, $page, $id);
|
return $categories->getListForItem($sortfield, $sortorder, $limit, $page, 'contact', $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -267,7 +267,7 @@ class Thirdparties extends DolibarrApi
|
|||||||
*/
|
*/
|
||||||
function getCategories($id, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) {
|
function getCategories($id, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) {
|
||||||
$categories = new Categories();
|
$categories = new Categories();
|
||||||
return $categories->getListForItem('customer', $sortfield, $sortorder, $limit, $page, $id);
|
return $categories->getListForItem($sortfield, $sortorder, $limit, $page, 'customer', $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -358,14 +358,16 @@ if ($socid && $action != 'edit' && $action != "create")
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("DefaultRIB"), '', '');
|
print load_fiche_titre($langs->trans("DefaultRIB"), '', '');
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("LabelRIB").'</td>';
|
print '<tr><td class="titlefield">'.$langs->trans("LabelRIB").'</td>';
|
||||||
print '<td colspan="4">'.$account->label.'</td></tr>';
|
print '<td>'.$account->label.'</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("BankName").'</td>';
|
print '<tr><td>'.$langs->trans("BankName").'</td>';
|
||||||
print '<td colspan="4">'.$account->bank.'</td></tr>';
|
print '<td>'.$account->bank.'</td></tr>';
|
||||||
|
|
||||||
// Show fields of bank account
|
// Show fields of bank account
|
||||||
foreach($account->getFieldsToShow(1) as $val)
|
foreach($account->getFieldsToShow(1) as $val)
|
||||||
@ -406,24 +408,24 @@ if ($socid && $action != 'edit' && $action != "create")
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans($val).'</td>';
|
print '<tr><td>'.$langs->trans($val).'</td>';
|
||||||
print '<td colspan="4">'.$content.'</td>';
|
print '<td>'.$content.'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td colspan="4">';
|
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td>';
|
||||||
print $account->domiciliation;
|
print $account->domiciliation;
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td><td colspan="4">';
|
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td><td>';
|
||||||
print $account->proprio;
|
print $account->proprio;
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="4">';
|
print '<tr><td>'.$langs->trans("BankAccountOwnerAddress").'</td><td>';
|
||||||
print $account->owner_address;
|
print $account->owner_address;
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
@ -610,7 +612,7 @@ if ($socid && $action != 'edit' && $action != "create")
|
|||||||
{
|
{
|
||||||
$colspan=8;
|
$colspan=8;
|
||||||
if (! empty($conf->prelevement->enabled)) $colspan+=2;
|
if (! empty($conf->prelevement->enabled)) $colspan+=2;
|
||||||
print '<tr '.$bc[0].'><td colspan="'.$colspan.'" align="center">'.$langs->trans("NoBANRecord").'</td></tr>';
|
print '<tr '.$bc[0].'><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoBANRecord").'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -123,15 +123,14 @@ if (empty($reshook))
|
|||||||
$soc_origin_id = GETPOST('soc_origin', 'int');
|
$soc_origin_id = GETPOST('soc_origin', 'int');
|
||||||
$soc_origin = new Societe($db);
|
$soc_origin = new Societe($db);
|
||||||
|
|
||||||
if ($soc_origin_id < 1)
|
if ($soc_origin_id <= 0)
|
||||||
{
|
{
|
||||||
$langs->load('errors');
|
$langs->load('errors');
|
||||||
$langs->load('companies');
|
$langs->load('companies');
|
||||||
setEventMessages($langs->trans('ErrorProdIdIsMandatory', $langs->trans('MergeOriginThirdparty')), null, 'errors');
|
setEventMessages($langs->trans('ErrorThirdPartyIdIsMandatory', $langs->trans('MergeOriginThirdparty')), null, 'errors');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!$errors && $soc_origin->fetch($soc_origin_id) < 1)
|
if (!$errors && $soc_origin->fetch($soc_origin_id) < 1)
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans('ErrorRecordNotFound'), null, 'errors');
|
setEventMessages($langs->trans('ErrorRecordNotFound'), null, 'errors');
|
||||||
@ -140,8 +139,44 @@ if (empty($reshook))
|
|||||||
|
|
||||||
if (!$errors)
|
if (!$errors)
|
||||||
{
|
{
|
||||||
|
// TODO Move the merge function into class of object.
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
|
// Recopy some data
|
||||||
|
$object->client = $object->client | $soc_origin->client;
|
||||||
|
$object->fournisseur = $object->fournisseur | $soc_origin->fournisseur;
|
||||||
|
$listofproperties=array(
|
||||||
|
'address', 'zip', 'town', 'state_id', 'country_id', 'phone', 'phone_pro', 'fax', 'email', 'skype', 'url', 'barcode', 'idprof1', 'idprof2', 'idprof3', 'idprof4', 'idprof5', 'idprof6',
|
||||||
|
'tva_intra', 'effectif_id', 'forme_juridique', 'remise_percent', 'mode_reglement_supplier_id', 'cond_reglement_supplier_id', 'name_bis',
|
||||||
|
'stcomm_id', 'outstanding_limit', 'price_level', 'parent', 'default_lang', 'ref', 'ref_ext', 'import_key', 'fk_incoterms', 'fk_multicurrency',
|
||||||
|
'code_client', 'code_fournisseur', 'code_compta', 'code_compta_fournisseur',
|
||||||
|
'model_pdf', 'fk_projet'
|
||||||
|
);
|
||||||
|
foreach ($listofproperties as $property)
|
||||||
|
{
|
||||||
|
if (empty($object->$property)) $object->$property = $soc_origin->$property;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Concat some data
|
||||||
|
$listofproperties=array(
|
||||||
|
'note_public', 'note_private'
|
||||||
|
);
|
||||||
|
foreach ($listofproperties as $property)
|
||||||
|
{
|
||||||
|
$object->$property = dol_concatdesc($object->$property, $soc_origin->$property);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Merge extrafields
|
||||||
|
foreach ($soc_origin->array_options as $key => $val)
|
||||||
|
{
|
||||||
|
if (empty($object->array_options[$key])) $object->array_options[$key] = $val;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO Merge categories
|
||||||
|
$object->update($object->id, $user);
|
||||||
|
|
||||||
|
// Move links
|
||||||
$objects = array(
|
$objects = array(
|
||||||
'Adherent' => '/adherents/class/adherent.class.php',
|
'Adherent' => '/adherents/class/adherent.class.php',
|
||||||
'Societe' => '/societe/class/societe.class.php',
|
'Societe' => '/societe/class/societe.class.php',
|
||||||
@ -159,6 +194,7 @@ if (empty($reshook))
|
|||||||
'Fichinter' => '/fichinter/class/fichinter.class.php',
|
'Fichinter' => '/fichinter/class/fichinter.class.php',
|
||||||
'CommandeFournisseur' => '/fourn/class/fournisseur.commande.class.php',
|
'CommandeFournisseur' => '/fourn/class/fournisseur.commande.class.php',
|
||||||
'FactureFournisseur' => '/fourn/class/fournisseur.facture.class.php',
|
'FactureFournisseur' => '/fourn/class/fournisseur.facture.class.php',
|
||||||
|
'SupplierProposal' => '/supplier_proposal/class/supplier_proposal.class.php',
|
||||||
'ProductFournisseur' => '/fourn/class/fournisseur.product.class.php',
|
'ProductFournisseur' => '/fourn/class/fournisseur.product.class.php',
|
||||||
'Livraison' => '/livraison/class/livraison.class.php',
|
'Livraison' => '/livraison/class/livraison.class.php',
|
||||||
'Product' => '/product/class/product.class.php',
|
'Product' => '/product/class/product.class.php',
|
||||||
@ -451,6 +487,7 @@ if (empty($reshook))
|
|||||||
if (empty($object->fournisseur)) $object->code_fournisseur='';
|
if (empty($object->fournisseur)) $object->code_fournisseur='';
|
||||||
|
|
||||||
$result = $object->create($user);
|
$result = $object->create($user);
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
if ($object->particulier)
|
if ($object->particulier)
|
||||||
|
|||||||
@ -354,7 +354,7 @@ if (empty($reshook))
|
|||||||
$array_options = $lines[$i]->array_options;
|
$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) {
|
if ($result > 0) {
|
||||||
$lineid = $result;
|
$lineid = $result;
|
||||||
@ -633,7 +633,8 @@ if (empty($reshook))
|
|||||||
$buyingprice,
|
$buyingprice,
|
||||||
$label,
|
$label,
|
||||||
$array_options,
|
$array_options,
|
||||||
$ref_fourn
|
$ref_fourn,
|
||||||
|
$fk_unit
|
||||||
);
|
);
|
||||||
//var_dump($tva_tx);var_dump($productsupplier->fourn_pu);var_dump($price_base_type);exit;
|
//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';
|
$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);
|
//$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) {
|
if (! $error) {
|
||||||
$db->begin();
|
$db->begin();
|
||||||
$ref_fourn = GETPOST('fourn_ref');
|
$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) {
|
if ($result >= 0) {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
@ -1040,6 +1042,15 @@ if ($action == 'create')
|
|||||||
$objectsrc->fetch_optionals($originid);
|
$objectsrc->fetch_optionals($originid);
|
||||||
$object->array_options = $objectsrc->array_options;
|
$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);
|
$object = new SupplierProposal($db);
|
||||||
@ -1149,7 +1160,6 @@ if ($action == 'create')
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.fieldLabel('Currency','multicurrency_code').'</td>';
|
print '<td>'.fieldLabel('Currency','multicurrency_code').'</td>';
|
||||||
print '<td colspan="3" class="maxwidthonsmartphone">';
|
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 $form->selectMultiCurrency($currency_code, 'multicurrency_code');
|
||||||
print '</td></tr>';
|
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->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>";
|
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";
|
print "</table>\n";
|
||||||
@ -1491,14 +1508,22 @@ if ($action == 'create')
|
|||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print fieldLabel('CurrencyRate','multicurrency_tx');
|
print fieldLabel('CurrencyRate','multicurrency_tx');
|
||||||
print '</td>';
|
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&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
if ($action == 'editmulticurrencyrate') {
|
if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') {
|
||||||
$form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx', $object->multicurrency_code);
|
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 {
|
} 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"> ';
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>';
|
||||||
|
print '</div>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -355,11 +355,12 @@ class SupplierProposal extends CommonObject
|
|||||||
* @param string $label ???
|
* @param string $label ???
|
||||||
* @param array $array_option extrafields array
|
* @param array $array_option extrafields array
|
||||||
* @param string $ref_fourn Supplier price reference
|
* @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
|
* @return int >0 if OK, <0 if KO
|
||||||
*
|
*
|
||||||
* @see add_product
|
* @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;
|
global $mysoc;
|
||||||
|
|
||||||
@ -460,6 +461,7 @@ class SupplierProposal extends CommonObject
|
|||||||
$this->line->product_type=$type;
|
$this->line->product_type=$type;
|
||||||
$this->line->special_code=$special_code;
|
$this->line->special_code=$special_code;
|
||||||
$this->line->fk_parent_line=$fk_parent_line;
|
$this->line->fk_parent_line=$fk_parent_line;
|
||||||
|
$this->line->fk_unit=$fk_unit;
|
||||||
|
|
||||||
$this->line->ref_fourn = $this->db->escape($ref_fourn);
|
$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 int $type 0/1=Product/service
|
||||||
* @param array $array_option extrafields array
|
* @param array $array_option extrafields array
|
||||||
* @param string $ref_fourn Supplier price reference
|
* @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
|
* @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;
|
global $conf,$user,$langs, $mysoc;
|
||||||
|
|
||||||
@ -634,7 +637,8 @@ class SupplierProposal extends CommonObject
|
|||||||
$this->line->special_code = $special_code;
|
$this->line->special_code = $special_code;
|
||||||
$this->line->fk_parent_line = $fk_parent_line;
|
$this->line->fk_parent_line = $fk_parent_line;
|
||||||
$this->line->skip_update_total = $skip_update_total;
|
$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
|
// infos marge
|
||||||
if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) {
|
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.= " 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.= ' 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.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.= " FROM ".MAIN_DB_PREFIX."supplier_proposaldet as d";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON d.fk_product = p.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON d.fk_product = p.rowid";
|
||||||
$sql.= " WHERE d.fk_supplier_proposal = ".$this->id;
|
$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_ht = $objp->multicurrency_total_ht;
|
||||||
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
$line->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
||||||
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
$line->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
||||||
|
$line->fk_unit = $objp->fk_unit;
|
||||||
|
|
||||||
$this->lines[$i] = $line;
|
$this->lines[$i] = $line;
|
||||||
|
|
||||||
@ -2429,7 +2434,7 @@ class SupplierProposal extends CommonObject
|
|||||||
$sql.= ' pt.product_type, pt.rang, pt.fk_parent_line,';
|
$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.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.= ' 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.= ' FROM '.MAIN_DB_PREFIX.'supplier_proposaldet as pt';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product=p.rowid';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product=p.rowid';
|
||||||
$sql.= ' WHERE pt.fk_supplier_proposal = '.$this->id;
|
$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_ht = $obj->multicurrency_total_ht;
|
||||||
$this->lines[$i]->multicurrency_total_tva = $obj->multicurrency_total_tva;
|
$this->lines[$i]->multicurrency_total_tva = $obj->multicurrency_total_tva;
|
||||||
$this->lines[$i]->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
|
$this->lines[$i]->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
|
||||||
|
$this->lines[$i]->fk_unit = $obj->fk_unit;
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -2532,6 +2538,24 @@ class SupplierProposal extends CommonObject
|
|||||||
return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function used to replace a thirdparty id with another one.
|
||||||
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
* @param int $origin_id Old thirdparty id
|
||||||
|
* @param int $dest_id New thirdparty id
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
|
||||||
|
{
|
||||||
|
$tables = array(
|
||||||
|
'supplier_proposal'
|
||||||
|
);
|
||||||
|
|
||||||
|
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2539,7 +2563,7 @@ class SupplierProposal extends CommonObject
|
|||||||
* \class SupplierProposalLine
|
* \class SupplierProposalLine
|
||||||
* \brief Class to manage supplier_proposal lines
|
* \brief Class to manage supplier_proposal lines
|
||||||
*/
|
*/
|
||||||
class SupplierProposalLine extends CommonObject
|
class SupplierProposalLine extends CommonObjectLine
|
||||||
{
|
{
|
||||||
var $db;
|
var $db;
|
||||||
var $error;
|
var $error;
|
||||||
@ -2675,7 +2699,7 @@ class SupplierProposalLine extends CommonObject
|
|||||||
$sql.= ' pd.localtax1_tx, pd.localtax2_tx, pd.total_localtax1, pd.total_localtax2,';
|
$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.= ' 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.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.= ' FROM '.MAIN_DB_PREFIX.'supplier_proposaldet as pd';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pd.fk_product = p.rowid';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pd.fk_product = p.rowid';
|
||||||
$sql.= ' WHERE pd.rowid = '.$rowid;
|
$sql.= ' WHERE pd.rowid = '.$rowid;
|
||||||
@ -2731,6 +2755,7 @@ class SupplierProposalLine extends CommonObject
|
|||||||
$this->multicurrency_total_ht = $objp->multicurrency_total_ht;
|
$this->multicurrency_total_ht = $objp->multicurrency_total_ht;
|
||||||
$this->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
$this->multicurrency_total_tva = $objp->multicurrency_total_tva;
|
||||||
$this->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
$this->multicurrency_total_ttc = $objp->multicurrency_total_ttc;
|
||||||
|
$this->fk_unit = $objp->fk_unit;
|
||||||
|
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
}
|
}
|
||||||
@ -2769,7 +2794,8 @@ class SupplierProposalLine extends CommonObject
|
|||||||
if (empty($this->special_code)) $this->special_code=0;
|
if (empty($this->special_code)) $this->special_code=0;
|
||||||
if (empty($this->fk_parent_line)) $this->fk_parent_line=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_fournprice)) $this->fk_fournprice=0;
|
||||||
|
if (empty($this->fk_unit)) $this->fk_unit=0;
|
||||||
|
|
||||||
if (empty($this->pa_ht)) $this->pa_ht=0;
|
if (empty($this->pa_ht)) $this->pa_ht=0;
|
||||||
|
|
||||||
// if buy price not defined, define buyprice as configured in margin admin
|
// if buy price not defined, define buyprice as configured in margin admin
|
||||||
@ -2798,7 +2824,7 @@ class SupplierProposalLine extends CommonObject
|
|||||||
$sql.= ' info_bits, ';
|
$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.= ' total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_product_fournisseur_price, buy_price_ht, special_code, rang,';
|
||||||
$sql.= ' ref_fourn';
|
$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.= " VALUES (".$this->fk_supplier_proposal.",";
|
||||||
$sql.= " ".($this->fk_parent_line>0?"'".$this->fk_parent_line."'":"null").",";
|
$sql.= " ".($this->fk_parent_line>0?"'".$this->fk_parent_line."'":"null").",";
|
||||||
$sql.= " ".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null").",";
|
$sql.= " ".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null").",";
|
||||||
@ -2831,7 +2857,8 @@ class SupplierProposalLine extends CommonObject
|
|||||||
$sql.= ", ".$this->multicurrency_total_ht;
|
$sql.= ", ".$this->multicurrency_total_ht;
|
||||||
$sql.= ", ".$this->multicurrency_total_tva;
|
$sql.= ", ".$this->multicurrency_total_tva;
|
||||||
$sql.= ", ".$this->multicurrency_total_ttc;
|
$sql.= ", ".$this->multicurrency_total_ttc;
|
||||||
$sql.= ')';
|
$sql.= ", ".$this->fk_unit;
|
||||||
|
$sql.= ')';
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::insert', LOG_DEBUG);
|
dol_syslog(get_class($this).'::insert', LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
@ -2951,7 +2978,8 @@ class SupplierProposalLine extends CommonObject
|
|||||||
if (empty($this->special_code)) $this->special_code=0;
|
if (empty($this->special_code)) $this->special_code=0;
|
||||||
if (empty($this->fk_parent_line)) $this->fk_parent_line=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_fournprice)) $this->fk_fournprice=0;
|
||||||
|
if (empty($this->fk_unit)) $this->fk_unit=0;
|
||||||
|
|
||||||
if (empty($this->pa_ht)) $this->pa_ht=0;
|
if (empty($this->pa_ht)) $this->pa_ht=0;
|
||||||
|
|
||||||
// if buy price not defined, define buyprice as configured in margin admin
|
// if buy price not defined, define buyprice as configured in margin admin
|
||||||
@ -3005,8 +3033,9 @@ class SupplierProposalLine extends CommonObject
|
|||||||
$sql.= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht)."";
|
$sql.= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht)."";
|
||||||
$sql.= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva)."";
|
$sql.= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva)."";
|
||||||
$sql.= " , multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc)."";
|
$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);
|
dol_syslog(get_class($this)."::update", LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 326 B |
@ -577,13 +577,13 @@ div.myavailability {
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.tdoverflowmax100 {
|
.tdoverflowmax100 { /* For tdoverflow, the max-midth become a minimum ! */
|
||||||
max-width: 100px;
|
max-width: 100px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.tdoverflowmax300 {
|
.tdoverflowmax300 { /* For tdoverflow, the max-midth become a minimum ! */
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
@ -2742,11 +2742,12 @@ div.pagination li.paginationafterarrows {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Set the color for hover lines */
|
/* Set the color for hover lines */
|
||||||
.odd:hover, .impair:hover, .even:hover, .pair:hover, .even:hover, .pair:hover, table.dataTable tr.even:hover, table.dataTable tr.odd:hover, .box_pair:hover, .box_impair:hover
|
.odd:hover, .impair:hover, .even:hover, .pair:hover, .even:hover, .pair:hover, table.dataTable tr.even:hover, table.dataTable tr.odd:hover, .box_pair:hover, .box_impair:hover
|
||||||
{
|
{
|
||||||
<?php if ($colorbacklinepairhover) { ?>
|
<?php if ($colorbacklinepairhover) { ?>
|
||||||
background: rgb(<?php echo $colorbacklinepairhover; ?>) !important;
|
background-color: rgb(<?php echo $colorbacklinepairhover; ?>) !important;
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2757,10 +2758,10 @@ div.pagination li.paginationafterarrows {
|
|||||||
color: #202020;
|
color: #202020;
|
||||||
min-height: 18px; /* seems to not be used */
|
min-height: 18px; /* seems to not be used */
|
||||||
|
|
||||||
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
|
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
|
||||||
}
|
}
|
||||||
#GanttChartDIV {
|
#GanttChartDIV {
|
||||||
background: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
|
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?>;
|
||||||
}
|
}
|
||||||
|
|
||||||
.even, .pair, .nohover .even:hover, .nohover .pair:hover, tr.even td.nohover, tr.pair td.nohover {
|
.even, .pair, .nohover .even:hover, .nohover .pair:hover, tr.even td.nohover, tr.pair td.nohover {
|
||||||
@ -2776,13 +2777,14 @@ table.dataTable tr.odd {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For no hover style */
|
/* For no hover style */
|
||||||
table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td, tr.nohover td {
|
table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td, tr.nohover td, form.nohover, form.nohover:hover {
|
||||||
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
|
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
|
||||||
}
|
}
|
||||||
tr.nohoverpair td {
|
tr.nohoverpair td {
|
||||||
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklinepair1)); ?> !important;
|
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklinepair1)); ?> !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
table.dataTable td {
|
table.dataTable td {
|
||||||
padding: 5px 2px 5px 3px !important;
|
padding: 5px 2px 5px 3px !important;
|
||||||
}
|
}
|
||||||
@ -2971,8 +2973,15 @@ div.tabBar .noborder {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
width: 110px;
|
width: 115px;
|
||||||
}
|
}
|
||||||
|
@media only screen and (max-width: 767px)
|
||||||
|
{
|
||||||
|
.boxstats {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.boxstats:hover {
|
.boxstats:hover {
|
||||||
box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.20);
|
box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.20);
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 326 B |
@ -2648,7 +2648,7 @@ table.dataTable tr.odd {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* For no hover style */
|
/* For no hover style */
|
||||||
table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td, tr.nohover td {
|
table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td, tr.nohover td, form.nohover, form.nohover:hover {
|
||||||
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
|
background-color: #<?php echo colorArrayToHex(colorStringToArray($colorbacklineimpair1)); ?> !important;
|
||||||
}
|
}
|
||||||
tr.nohoverpair td {
|
tr.nohoverpair td {
|
||||||
@ -2854,7 +2854,13 @@ div .tdtop {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
width: 110px;
|
width: 115px;
|
||||||
|
}
|
||||||
|
@media only screen and (max-width: 767px)
|
||||||
|
{
|
||||||
|
.boxstats {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.boxstats:hover {
|
.boxstats:hover {
|
||||||
box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.20);
|
box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.20);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user