Merge branch '3.7' into bug-1765
This commit is contained in:
commit
95c7ba33ba
10
ChangeLog
10
ChangeLog
@ -2,6 +2,7 @@
|
||||
English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
|
||||
***** ChangeLog for 3.7 compared to 3.6.* *****
|
||||
For users:
|
||||
- New: Match other auth system: Login can be done entering login or user
|
||||
@ -100,9 +101,11 @@ For users:
|
||||
- Fix: [ bug #1501 ] DEPLACEMENT_CREATE trigger do not intercept trigger action
|
||||
- Fix: [ bug #1506, #1507 ] ECM trigger error problem
|
||||
- Fix: [ bug #1469 ] Triggers CONTACT_MODIFY and CONTACT_DELETE duplicates error message
|
||||
- Fix: [ bug #1533 ] Links triggers do not show trigger error message
|
||||
- Fix: [ bug #1537 ] Difference between societe.nom and adherent.societe.
|
||||
- Fix: [ bug #1535 ] Supplier invoice Extrafields are not shown
|
||||
- Fix: datepicker first day of week can be monday by setting into display setup
|
||||
- Fix: [ bug #575 ] GED doesn't works if there is "/" in a mask
|
||||
|
||||
For users, new experimental module (need to set feature level of instance to experimental to see them):
|
||||
- New: Module Accounting Expert to manage accountancy
|
||||
@ -149,6 +152,7 @@ For developers:
|
||||
- Qual: Renamed all files & links "fiche.php" into "card.php".
|
||||
- Qual: Replace all constants COMPTA_* by ACCOUNTING_*.
|
||||
- Qual: Replace all constants ACCOUNTINGEX_* by ACCOUNTING_* to simplify migration of the module
|
||||
- Fix: [ bug #1724 ] Can't add a submenu to projects
|
||||
|
||||
WARNING: Following changes may create regression for some external modules, but was necessary to make
|
||||
Dolibarr better:
|
||||
@ -182,6 +186,9 @@ Dolibarr better:
|
||||
- Fix: [ bug #1624 ] Use lowest buying price for margin when selling with POS
|
||||
- Fix: [ bug #1749 ] Undefined $mailchimp
|
||||
- Fix: [ bug #1736 ] Failing supplier Elephant numeration module with some masks
|
||||
- Fix: [ bug #1649 ] Cancel button of several thirdparty actions, does the same thing as modify
|
||||
- Fix: [ bug #1736 ] Failing supplier Elephant numeration module with some masks
|
||||
- Fix: [ bug #1731 ] Can't use quick navigation on project tasks secondary tabs
|
||||
|
||||
***** ChangeLog for 3.6.1 compared to 3.6.* *****
|
||||
For users:
|
||||
@ -324,6 +331,9 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f
|
||||
|
||||
***** ChangeLog for 3.5.7 compared to 3.5.6 *****
|
||||
Fix: Paypal link were broken dur to SSL v3 closed.
|
||||
Fix: [ bug #1769 ] Error when installing to a PostgreSQL DB that contains numbers
|
||||
Fix: [ bug #1752 ] Date filter of margins module, filters since 12H instead of 00H
|
||||
Fix: [ bug #1757 ] Sorting breaks product/service statistics
|
||||
|
||||
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
||||
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
||||
|
||||
@ -80,15 +80,20 @@ $parameters = array('socid' => $id);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
//Some actions show a "cancel" input submit button with name="cancel"
|
||||
$cancelbutton = GETPOST('cancel');
|
||||
|
||||
if ($action == 'setcustomeraccountancycode')
|
||||
{
|
||||
$result=$object->fetch($id);
|
||||
$object->code_compta=$_POST["customeraccountancycode"];
|
||||
$result=$object->update($object->id,$user,1,1,0);
|
||||
if ($result < 0)
|
||||
if (! $cancelbutton)
|
||||
{
|
||||
setEventMessage($object->errors, 'errors');
|
||||
$result=$object->fetch($id);
|
||||
$object->code_compta=$_POST["customeraccountancycode"];
|
||||
$result=$object->update($object->id,$user,1,1,0);
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessage($object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
$action="";
|
||||
}
|
||||
@ -140,10 +145,13 @@ if ($action == 'cstc')
|
||||
// Update communication level
|
||||
if ($action == 'setOutstandingBill')
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->outstanding_limit=GETPOST('OutstandingBill');
|
||||
$result=$object->set_OutstandingBill($user);
|
||||
if ($result < 0) setEventMessage($object->error,'errors');
|
||||
if (!$cancelbutton)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->outstanding_limit=GETPOST('OutstandingBill');
|
||||
$result=$object->set_OutstandingBill($user);
|
||||
if ($result < 0) setEventMessage($object->error,'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -289,24 +297,15 @@ if ($id > 0)
|
||||
print '</tr>';
|
||||
|
||||
// Local Taxes
|
||||
if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
|
||||
if ($mysoc->useLocalTax(1))
|
||||
{
|
||||
print '<tr><td class="nowrap">'.$langs->trans('LocalTax1IsUsedES').'</td><td colspan="3">';
|
||||
print yn($object->localtax1_assuj);
|
||||
print '</td></tr>';
|
||||
print '<tr><td class="nowrap">'.$langs->trans('LocalTax2IsUsedES').'</td><td colspan="3">';
|
||||
print yn($object->localtax2_assuj);
|
||||
print '</td></tr>';
|
||||
}
|
||||
elseif($mysoc->localtax1_assuj=="1")
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("LocalTax1IsUsedES").'</td><td colspan="3">';
|
||||
print '<tr><td class="nowrap">'.$langs->trans("LocalTax1IsUsedES").'</td><td colspan="3">';
|
||||
print yn($object->localtax1_assuj);
|
||||
print '</td></tr>';
|
||||
}
|
||||
elseif($mysoc->localtax2_assuj=="1")
|
||||
if ($mysoc->useLocalTax(2))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("LocalTax2IsUsedES").'</td><td colspan="3">';
|
||||
print '<tr><td class="nowrap">'.$langs->trans("LocalTax2IsUsedES").'</td><td colspan="3">';
|
||||
print yn($object->localtax2_assuj);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -189,8 +189,8 @@ else if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->pr
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) { $tmp=getListOfModels($db, 'propal'); $keys=array_keys($tmp); $model=$keys[0]; }
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
}
|
||||
@ -499,9 +499,6 @@ else if ($action == 'add' && $user->rights->propal->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'propal'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
|
||||
@ -47,6 +47,11 @@ class Propal extends CommonObject
|
||||
public $fk_element='fk_propal';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $id;
|
||||
|
||||
var $socid; // Id client
|
||||
|
||||
@ -922,8 +922,8 @@ else if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->co
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) { $tmp=getListOfModels($db, 'order'); $keys=array_keys($tmp); $model=$keys[0]; }
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
}
|
||||
@ -971,8 +971,8 @@ else if ($action == 'confirm_modif' && $user->rights->commande->creer) {
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) { $tmp=getListOfModels($db, 'order'); $keys=array_keys($tmp); $model=$keys[0]; }
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,6 +44,11 @@ class Commande extends CommonOrder
|
||||
public $fk_element = 'fk_commande';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $id;
|
||||
|
||||
var $socid; // Id client
|
||||
|
||||
@ -417,8 +417,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->factu
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) { $tmp=getListOfModels($db, 'invoice'); $keys=array_keys($tmp); $model=$keys[0]; }
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
@ -500,8 +500,8 @@ else if ($action == 'confirm_modif' && ((empty($conf->global->MAIN_USE_ADVANCED_
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) { $tmp=getListOfModels($db, 'invoice'); $keys=array_keys($tmp); $model=$keys[0]; }
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
}
|
||||
@ -1328,8 +1328,8 @@ else if ($action == 'addline' && $user->rights->facture->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) { $tmp=getListOfModels($db, 'invoice'); $keys=array_keys($tmp); $model=$keys[0]; }
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
|
||||
@ -50,6 +50,11 @@ class Facture extends CommonInvoice
|
||||
public $fk_element = 'fk_facture';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'facnumber';
|
||||
|
||||
var $id;
|
||||
//! Id client
|
||||
var $socid;
|
||||
@ -833,7 +838,6 @@ class Facture extends CommonInvoice
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get object and lines from database
|
||||
*
|
||||
|
||||
@ -34,6 +34,11 @@ class ChargeSociales extends CommonObject
|
||||
public $table='chargesociales';
|
||||
public $table_element='chargesociales';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $id;
|
||||
var $ref;
|
||||
var $date_ech;
|
||||
|
||||
@ -44,6 +44,11 @@ class Contrat extends CommonObject
|
||||
public $fk_element='fk_contrat';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $id;
|
||||
var $ref;
|
||||
var $ref_supplier;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2011-2014 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2014 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -54,6 +54,12 @@ abstract class CommonObject
|
||||
|
||||
// No constructor as it is an abstract class
|
||||
|
||||
/**
|
||||
* Column name of the ref field.
|
||||
* @var string
|
||||
*/
|
||||
protected $table_ref_field = '';
|
||||
|
||||
|
||||
/**
|
||||
* Check an object id/ref exists
|
||||
@ -631,6 +637,32 @@ abstract class CommonObject
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Looks for an object with ref matching the wildcard provided
|
||||
* It does only work when $this->table_ref_field is set
|
||||
*
|
||||
* @param string $ref Wildcard
|
||||
* @return int >1 = OK, 0 = Not found or table_ref_field not defined, <0 = KO
|
||||
*/
|
||||
public function fetchOneLike($ref)
|
||||
{
|
||||
if (!$this->table_ref_field) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$this->table_element.' WHERE '.$this->table_ref_field.' LIKE "'.$this->db->escape($ref).'" LIMIT 1';
|
||||
|
||||
$query = $this->db->query($sql);
|
||||
|
||||
if (!$this->db->num_rows($query)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$result = $this->db->fetch_object($query);
|
||||
|
||||
return $this->fetch($result->rowid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load data for barcode into properties ->barcode_type*
|
||||
* Properties ->barcode_type that is id of barcode. Type is used to find other properties, but
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2013 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
@ -400,14 +400,26 @@ class Form
|
||||
else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag
|
||||
$s="";
|
||||
if (empty($notabs)) $s.='<table class="nobordernopadding" summary=""><tr>';
|
||||
if ($direction < 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.'</'.$tag.'>';
|
||||
if ($direction < 0) {
|
||||
$s.='<'.$tag.$paramfortooltipimg;
|
||||
if ($tag == 'td') {
|
||||
$s .= 'valign="top" ';
|
||||
}
|
||||
$s.= 'width="14">'.$img.'</'.$tag.'>';
|
||||
}
|
||||
// Use another method to help avoid having a space in value in order to use this value with jquery
|
||||
// TODO add this in css
|
||||
//if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.(($direction < 0)?' ':'').$text.(($direction > 0)?' ':'').'</'.$tag.'>';
|
||||
$paramfortooltiptd.= (($direction < 0)?' style="padding-left: 3px !important;"':'');
|
||||
$paramfortooltiptd.= (($direction > 0)?' style="padding-right: 3px !important;"':'');
|
||||
if ((string) $text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.$text.'</'.$tag.'>';
|
||||
if ($direction > 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.'</'.$tag.'>';
|
||||
if ($direction > 0) {
|
||||
$s.='<'.$tag.$paramfortooltipimg;
|
||||
if ($tag == 'td') {
|
||||
$s .= 'valign="top" ';
|
||||
}
|
||||
$s.= 'width="14">'.$img.'</'.$tag.'>';
|
||||
}
|
||||
if (empty($notabs)) $s.='</tr></table>';
|
||||
|
||||
return $s;
|
||||
|
||||
@ -997,7 +997,6 @@ class FormFile
|
||||
if ($modulepart == 'user') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $id=(isset($reg[1])?$reg[1]:'');}
|
||||
|
||||
if (! $id && ! $ref) continue;
|
||||
|
||||
$found=0;
|
||||
if (! empty($this->cache_objects[$modulepart.'_'.$id.'_'.$ref]))
|
||||
{
|
||||
@ -1006,7 +1005,19 @@ class FormFile
|
||||
else
|
||||
{
|
||||
//print 'Fetch '.$id." - ".$ref.'<br>';
|
||||
$result=$object_instance->fetch($id,$ref);
|
||||
|
||||
if ($id) {
|
||||
$result = $object_instance->fetch($id);
|
||||
} else {
|
||||
//fetchOneLike looks for objects with wildcards in its reference.
|
||||
//It is useful for those masks who get underscores instead of their actual symbols
|
||||
//fetchOneLike requires some info in the object. If it doesn't have it, then 0 is returned
|
||||
//that's why we look only look fetchOneLike when fetch returns 0
|
||||
if (!$result = $object_instance->fetch('', $ref)) {
|
||||
$result = $object_instance->fetchOneLike($ref);
|
||||
}
|
||||
}
|
||||
|
||||
if ($result > 0) { $found=1; $this->cache_objects[$modulepart.'_'.$id.'_'.$ref]=dol_clone($object_instance); } // Save object into a cache
|
||||
if ($result == 0) { $found=1; $this->cache_objects[$modulepart.'_'.$id.'_'.$ref]='notfound'; unset($filearray[$key]); }
|
||||
}
|
||||
|
||||
@ -356,9 +356,18 @@ class FormOther
|
||||
global $conf,$langs;
|
||||
$langs->load('users');
|
||||
|
||||
$out = '';
|
||||
$nodatarole = '';
|
||||
// Enhance with select2
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||
$out.= ajax_combobox($htmlname);
|
||||
$nodatarole=' data-role="none"';
|
||||
}
|
||||
// Select each sales and print them in a select input
|
||||
$moreforfilter ='<select class="flat" name="'.$htmlname.'">';
|
||||
$moreforfilter.='<option value=""> </option>';
|
||||
$out.='<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.$nodatarole.'>';
|
||||
$out.='<option value=""> </option>';
|
||||
|
||||
// Get list of users allowed to be viewed
|
||||
$sql_usr = "SELECT u.rowid, u.lastname, u.firstname, u.statut, u.login";
|
||||
@ -383,34 +392,35 @@ class FormOther
|
||||
{
|
||||
while ($obj_usr = $this->db->fetch_object($resql_usr))
|
||||
{
|
||||
$moreforfilter.='<option value="'.$obj_usr->rowid.'"';
|
||||
|
||||
if ($obj_usr->rowid == $selected) $moreforfilter.=' selected="selected"';
|
||||
$out.='<option value="'.$obj_usr->rowid.'"';
|
||||
|
||||
$moreforfilter.='>';
|
||||
$moreforfilter.=dolGetFirstLastname($obj_usr->firstname,$obj_usr->lastname);
|
||||
if ($obj_usr->rowid == $selected) $out.=' selected="selected"';
|
||||
|
||||
$out.='>';
|
||||
$out.=dolGetFirstLastname($obj_usr->firstname,$obj_usr->lastname);
|
||||
// Complete name with more info
|
||||
$moreinfo=0;
|
||||
if (! empty($conf->global->MAIN_SHOW_LOGIN))
|
||||
{
|
||||
$moreforfilter.=($moreinfo?' - ':' (').$obj_usr->login;
|
||||
$moreinfo++;
|
||||
$out.=($moreinfo?' - ':' (').$obj_usr->login;
|
||||
$moreinfo++;
|
||||
}
|
||||
if ($showstatus >= 0)
|
||||
{
|
||||
if ($obj_usr->statut == 1 && $showstatus == 1)
|
||||
{
|
||||
$moreforfilter.=($moreinfo?' - ':' (').$langs->trans('Enabled');
|
||||
$out.=($moreinfo?' - ':' (').$langs->trans('Enabled');
|
||||
$moreinfo++;
|
||||
}
|
||||
if ($obj_usr->statut == 0)
|
||||
{
|
||||
$moreforfilter.=($moreinfo?' - ':' (').$langs->trans('Disabled');
|
||||
$out.=($moreinfo?' - ':' (').$langs->trans('Disabled');
|
||||
$moreinfo++;
|
||||
}
|
||||
}
|
||||
$moreforfilter.=($moreinfo?')':'');
|
||||
$moreforfilter.='</option>';
|
||||
$out.=($moreinfo?')':'');
|
||||
$out.='</option>';
|
||||
}
|
||||
$this->db->free($resql_usr);
|
||||
}
|
||||
@ -418,9 +428,9 @@ class FormOther
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
$moreforfilter.='</select>';
|
||||
$out.='</select>';
|
||||
|
||||
return $moreforfilter;
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -187,7 +187,7 @@ class Link extends CommonObject
|
||||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('LINK_MODIFY',$user);
|
||||
if ($result < 0) $error++;
|
||||
if ($result < 0) $error++;
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
@ -197,6 +197,7 @@ class Link extends CommonObject
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
} else {
|
||||
setEventMessages('', $this->errors, 'errors');
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -389,7 +389,7 @@ class DoliDBPgsql extends DoliDB
|
||||
if ((! empty($host) && $host == "socket") && ! defined('NOLOCALSOCKETPGCONNECT'))
|
||||
{
|
||||
$con_string = "dbname='".$name."' user='".$login."' password='".$passwd."'"; // $name may be empty
|
||||
$this->db = pg_connect($con_string);
|
||||
$this->db = @pg_connect($con_string);
|
||||
}
|
||||
|
||||
// if local connection failed or not requested, use TCP/IP
|
||||
@ -399,7 +399,7 @@ class DoliDBPgsql extends DoliDB
|
||||
if (! $port) $port = 5432;
|
||||
|
||||
$con_string = "host='".$host."' port='".$port."' dbname='".$name."' user='".$login."' password='".$passwd."'";
|
||||
$this->db = pg_connect($con_string);
|
||||
$this->db = @pg_connect($con_string);
|
||||
}
|
||||
|
||||
// now we test if at least one connect method was a success
|
||||
@ -838,7 +838,7 @@ class DoliDBPgsql extends DoliDB
|
||||
// Test charset match LC_TYPE (pgsql error otherwise)
|
||||
//print $charset.' '.setlocale(LC_CTYPE,'0'); exit;
|
||||
|
||||
$sql='CREATE DATABASE '.$database.' OWNER '.$owner.' ENCODING \''.$charset.'\'';
|
||||
$sql='CREATE DATABASE "'.$database.'" OWNER "'.$owner.'" ENCODING \''.$charset.'\'';
|
||||
dol_syslog($sql,LOG_DEBUG);
|
||||
$ret=$this->query($sql);
|
||||
return $ret;
|
||||
|
||||
@ -149,7 +149,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
|
||||
if (! empty($conf->browser->phone)) print '</div>';
|
||||
else print '</td>';
|
||||
|
||||
if (! empty($conf->browser->phone)) print '<div class="fichehalfright" valign="middle">';
|
||||
if (! empty($conf->browser->phone)) print '<div class="fichehalfright">';
|
||||
else print '<td align="center" valign="middle" class="nowrap">';
|
||||
|
||||
print '<table><tr><td align="center">';
|
||||
|
||||
@ -2607,10 +2607,11 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a title (deprecated. use print_fiche_titre instead)
|
||||
* Show a title.
|
||||
*
|
||||
* @param string $title Title to show
|
||||
* @return string Title to show
|
||||
* @deprecated Use print_fiche_titre instead
|
||||
*/
|
||||
function print_titre($title)
|
||||
{
|
||||
|
||||
@ -573,7 +573,7 @@ function array2table($data,$tableMarkup=1,$tableoptions='',$troptions='',$tdopti
|
||||
/**
|
||||
* Return last or next value for a mask (according to area we should not reset)
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $mask Mask to use
|
||||
* @param string $table Table containing field with counter
|
||||
* @param string $field Field containing already used values of counter
|
||||
@ -581,8 +581,8 @@ function array2table($data,$tableMarkup=1,$tableoptions='',$troptions='',$tdopti
|
||||
* @param Societe $objsoc The company that own the object we need a counter for
|
||||
* @param string $date Date to use for the {y},{m},{d} tags.
|
||||
* @param string $mode 'next' for next value or 'last' for last value
|
||||
* @param bool $bentityon activate the entity filterdefault is true (for modules not compatible with multicompany)
|
||||
* @return string New value (numeric) or error message
|
||||
* @param bool $bentityon Activate the entity filter. Default is true (for modules not compatible with multicompany)
|
||||
* @return string New value (numeric) or error message
|
||||
*/
|
||||
function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$mode='next', $bentityon=true)
|
||||
{
|
||||
@ -787,7 +787,6 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
||||
$sql.= " AND ".$field." NOT LIKE '(PROV%)'";
|
||||
if ($bentityon) // only if entity enable
|
||||
$sql.= " AND entity IN (".getEntity($table, 1).")";
|
||||
|
||||
if ($where) $sql.=$where;
|
||||
if ($sqlwhere) $sql.=' AND '.$sqlwhere;
|
||||
|
||||
|
||||
@ -232,7 +232,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3601__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/card.php?leftmenu=projects&action=create', 'NewProject', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3602__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/list.php?leftmenu=projects', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__);
|
||||
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3610__+MAX_llx_menu__, 'project', '', 7__+MAX_llx_menu__, '/projet/index.php?leftmenu=projects&mode=mine', 'MyProjects', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3610__+MAX_llx_menu__, 'project', 'myprojects', 7__+MAX_llx_menu__, '/projet/index.php?leftmenu=projects&mode=mine', 'MyProjects', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3611__+MAX_llx_menu__, 'project', '', 3610__+MAX_llx_menu__, '/projet/card.php?leftmenu=projects&action=create&mode=mine', 'NewProject', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3612__+MAX_llx_menu__, 'project', '', 3610__+MAX_llx_menu__, '/projet/list.php?leftmenu=projects&mode=mine', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__);
|
||||
|
||||
|
||||
@ -1132,12 +1132,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$langs->load("projects");
|
||||
|
||||
// Project affected to user
|
||||
$newmenu->add("/projet/index.php?leftmenu=projects&mode=mine", $langs->trans("MyProjects"), 0, $user->rights->projet->lire, '', $mainmenu, 'projects');
|
||||
$newmenu->add("/projet/index.php?leftmenu=projects&mode=mine", $langs->trans("MyProjects"), 0, $user->rights->projet->lire, '', $mainmenu, 'myprojects');
|
||||
$newmenu->add("/projet/card.php?leftmenu=projects&action=create&mode=mine", $langs->trans("NewProject"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/list.php?leftmenu=projects&mode=mine", $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||
|
||||
// All project i have permission on
|
||||
$newmenu->add("/projet/index.php?leftmenu=projects", $langs->trans("Projects"), 0, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/index.php?leftmenu=projects", $langs->trans("Projects"), 0, $user->rights->projet->lire && $user->rights->projet->lire, '', $mainmenu, 'projects');
|
||||
$newmenu->add("/projet/card.php?leftmenu=projects&action=create", $langs->trans("NewProject"), 1, $user->rights->projet->creer && $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/list.php?leftmenu=projects", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
|
||||
|
||||
@ -72,11 +72,16 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||
$link->id = $linkid;
|
||||
$link->fetch();
|
||||
$res = $link->delete($user);
|
||||
|
||||
$langs->load('link');
|
||||
if ($res) {
|
||||
if ($res > 0) {
|
||||
setEventMessage($langs->trans("LinkRemoved", $link->label));
|
||||
} else {
|
||||
setEventMessage($langs->trans("ErrorFailedToDeleteLink", $link->label), 'errors');
|
||||
if (count($link->errors)) {
|
||||
setEventMessages('', $link->errors, 'errors');
|
||||
} else {
|
||||
setEventMessage($langs->trans("ErrorFailedToDeleteLink", $link->label), 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id.(!empty($withproject)?'&withproject=1':''));
|
||||
|
||||
@ -409,7 +409,7 @@ if (! empty($conf->global->ECM_AUTO_TREE_ENABLED))
|
||||
if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersInvoices"), 'desc'=>$langs->trans("ECMDocsByInvoices")); }
|
||||
if (! empty($conf->tax->enabled)) { $langs->load("compta"); $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'tax', 'test'=>$conf->tax->enabled, 'label'=>$langs->trans("SocialContributions"), 'desc'=>$langs->trans("ECMDocsBySocialContributions")); }
|
||||
if (! empty($conf->projet->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'project', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsByProjects")); }
|
||||
if (! empty($conf->ficheinter->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsByInterventions")); }
|
||||
if (! empty($conf->ficheinter->enabled)) { $langs->load("interventions"); $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'fichinter', 'test'=>$conf->ficheinter->enabled, 'label'=>$langs->trans("Interventions"), 'desc'=>$langs->trans("ECMDocsByInterventions")); }
|
||||
$rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'user', 'test'=>1, 'label'=>$langs->trans("Users"), 'desc'=>$langs->trans("ECMDocsByUsers"));
|
||||
|
||||
}
|
||||
|
||||
@ -279,10 +279,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->exped
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'shipping'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
|
||||
@ -37,6 +37,11 @@ class Fichinter extends CommonObject
|
||||
public $fk_element='fk_fichinter';
|
||||
public $table_element_line='fichinterdet';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $id;
|
||||
|
||||
var $socid; // Id client
|
||||
|
||||
@ -62,13 +62,17 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
||||
|
||||
if ($action == 'setsupplieraccountancycode')
|
||||
{
|
||||
$result=$object->fetch($id);
|
||||
$object->code_compta_fournisseur=$_POST["supplieraccountancycode"];
|
||||
$result=$object->update($object->id,$user,1,0,1);
|
||||
if ($result < 0)
|
||||
{
|
||||
$mesg=join(',',$object->errors);
|
||||
}
|
||||
$cancelbutton = GETPOST('cancel');
|
||||
if (! $cancelbutton)
|
||||
{
|
||||
$result=$object->fetch($id);
|
||||
$object->code_compta_fournisseur=$_POST["supplieraccountancycode"];
|
||||
$result=$object->update($object->id,$user,1,0,1);
|
||||
if ($result < 0)
|
||||
{
|
||||
$mesg=join(',',$object->errors);
|
||||
}
|
||||
}
|
||||
$action="";
|
||||
}
|
||||
// conditions de reglement
|
||||
@ -174,24 +178,15 @@ if ($object->fetch($id))
|
||||
print '</tr>';
|
||||
|
||||
// Local Taxes
|
||||
if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
|
||||
if ($mysoc->useLocalTax(1))
|
||||
{
|
||||
print '<tr><td class="nowrap">'.$langs->trans('LocalTax1IsUsedES').'</td><td colspan="3">';
|
||||
print yn($object->localtax1_assuj);
|
||||
print '</td></tr>';
|
||||
print '<tr><td class="nowrap">'.$langs->trans('LocalTax2IsUsedES').'</td><td colspan="3">';
|
||||
print yn($object->localtax2_assuj);
|
||||
print '</td></tr>';
|
||||
}
|
||||
elseif($mysoc->localtax1_assuj=="1")
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("LocalTax1IsUsedES").'</td><td colspan="3">';
|
||||
print '<tr><td class="nowrap">'.$langs->trans("LocalTax1IsUsed").'</td><td colspan="3">';
|
||||
print yn($object->localtax1_assuj);
|
||||
print '</td></tr>';
|
||||
}
|
||||
elseif($mysoc->localtax2_assuj=="1")
|
||||
if ($mysoc->useLocalTax(2))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("LocalTax2IsUsedES").'</td><td colspan="3">';
|
||||
print '<tr><td class="nowrap">'.$langs->trans("LocalTax2IsUsed").'</td><td colspan="3">';
|
||||
print yn($object->localtax2_assuj);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -45,6 +45,11 @@ class CommandeFournisseur extends CommonOrder
|
||||
public $fk_element = 'fk_commande';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $id;
|
||||
|
||||
var $ref; // TODO deprecated
|
||||
|
||||
@ -43,6 +43,11 @@ class FactureFournisseur extends CommonInvoice
|
||||
public $fk_element='fk_facture_fourn';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $rowid;
|
||||
var $ref;
|
||||
var $product_ref;
|
||||
|
||||
@ -357,10 +357,8 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'order_supplier'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
@ -462,10 +460,8 @@ else if ($action == 'update_line' && $user->rights->fournisseur->commande->creer
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'order_supplier'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
@ -526,10 +522,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->fourn
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'order_supplier'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
|
||||
@ -711,10 +711,8 @@ elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'invoice_supplier'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
@ -793,10 +791,8 @@ elseif ($action == 'edit' && $user->rights->fournisseur->facture->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'invoice_supplier'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
|
||||
@ -220,8 +220,8 @@ create table llx_accounting_fiscalyear
|
||||
fk_user_modif integer NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_contrat ADD COLUMN ref_ext varchar(30) after ref;
|
||||
ALTER TABLE llx_contrat ADD COLUMN ref_supplier varchar(30) after ref_ext;
|
||||
ALTER TABLE llx_contrat ADD COLUMN ref_supplier varchar(30) after ref;
|
||||
ALTER TABLE llx_contrat ADD COLUMN ref_ext varchar(30) after ref_supplier;
|
||||
|
||||
ALTER TABLE llx_propal ADD COLUMN fk_shipping_method integer AFTER date_livraison;
|
||||
ALTER TABLE llx_commande ADD COLUMN fk_shipping_method integer AFTER date_livraison;
|
||||
|
||||
@ -21,6 +21,6 @@ CREATE TABLE IF NOT EXISTS llx_usergroup_extrafields (
|
||||
tms timestamp,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=InnoDB ;
|
||||
)ENGINE=innodb;
|
||||
|
||||
|
||||
|
||||
@ -28,10 +28,10 @@ ProductsAndServicesStatistics=Products and Services statistics
|
||||
ProductsStatistics=Products statistics
|
||||
ProductsOnSell=Available products
|
||||
ProductsNotOnSell=Obsolete products
|
||||
ProductsOnSellAndOnBuy=Products not for sale nor purchase
|
||||
ProductsOnSellAndOnBuy=Products for sale and for purchase
|
||||
ServicesOnSell=Available services
|
||||
ServicesNotOnSell=Obsolete services
|
||||
ServicesOnSellAndOnBuy=Services not for sale nor purchase
|
||||
ServicesOnSellAndOnBuy=Services for sale and for purchase
|
||||
InternalRef=Internal reference
|
||||
LastRecorded=Last products/services on sell recorded
|
||||
LastRecordedProductsAndServices=Last %s recorded products/services
|
||||
|
||||
@ -3,6 +3,7 @@ RefProject=Ref. project
|
||||
ProjectId=Project Id
|
||||
Project=Project
|
||||
Projects=Projects
|
||||
ProjectStatus=Project status
|
||||
SharedProject=Everybody
|
||||
PrivateProject=Contacts of project
|
||||
MyProjectsDesc=This view is limited to projects you are a contact for (whatever is the type).
|
||||
@ -11,7 +12,6 @@ ProjectsDesc=This view presents all projects (your user permissions grant you pe
|
||||
MyTasksDesc=This view is limited to projects or tasks you are a contact for (whatever is the type).
|
||||
TasksPublicDesc=This view presents all projects and tasks you are allowed to read.
|
||||
TasksDesc=This view presents all projects and tasks (your user permissions grant you permission to view everything).
|
||||
Myprojects=My projects
|
||||
ProjectsArea=Projects area
|
||||
NewProject=New project
|
||||
AddProject=Create project
|
||||
@ -131,4 +131,4 @@ ProjectReferers=Refering objects
|
||||
SearchAProject=Search a project
|
||||
ProjectMustBeValidatedFirst=Project must be validated first
|
||||
ProjectDraft=Draft projects
|
||||
FirstAddRessourceToAllocateTime=Associate a ressource to allocate time
|
||||
FirstAddRessourceToAllocateTime=Associate a ressource to allocate time
|
||||
|
||||
@ -3,6 +3,7 @@ RefProject=Ref. proyecto
|
||||
ProjectId=Id proyecto
|
||||
Project=Proyecto
|
||||
Projects=Proyectos
|
||||
ProjectStatus=Estado del proyecto
|
||||
SharedProject=Proyecto compartido
|
||||
PrivateProject=Contactos del proyecto
|
||||
MyProjectsDesc=Esta vista muestra aquellos proyectos en los que usted es un contacto afectado (cualquier tipo).
|
||||
|
||||
@ -204,3 +204,11 @@ ACCOUNTING_ACCOUNT_SUPPLIER=Code comptable par défaut des tiers fournisseurs
|
||||
CloneTax=Cloner une charge sociale
|
||||
ConfirmCloneTax=Confirmer le clonage de la charge sociale
|
||||
CloneTaxForNextMonth=Cloner pour le mois suivant
|
||||
COMPTA_PRODUCT_BUY_ACCOUNT=Code comptable par défaut pour l'achat de produits
|
||||
COMPTA_PRODUCT_SOLD_ACCOUNT=Code comptable par défaut pour la vente de produits
|
||||
COMPTA_SERVICE_BUY_ACCOUNT=Code comptable par défaut pour l'achat de services
|
||||
COMPTA_SERVICE_SOLD_ACCOUNT=Code comptable par défaut pour la vente de services
|
||||
COMPTA_VAT_ACCOUNT=Code comptable par défaut pour l'encaissement de TVA
|
||||
COMPTA_VAT_BUY_ACCOUNT=Code comptable par défaut pour le versement de la TVA
|
||||
COMPTA_ACCOUNT_CUSTOMER=Code comptable par défaut des tiers clients
|
||||
COMPTA_ACCOUNT_SUPPLIER=Code comptable par défaut des tiers fournisseurs
|
||||
|
||||
@ -135,10 +135,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->exped
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
if (empty($model)) {
|
||||
$tmp=getListOfModels($db, 'delivery'); $keys=array_keys($tmp); $model=$keys[0];
|
||||
}
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
$result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result < 0) dol_print_error($db,$result);
|
||||
}
|
||||
|
||||
@ -57,9 +57,9 @@ $pagenext = $page + 1;
|
||||
$startdate=$enddate='';
|
||||
|
||||
if (!empty($_POST['startdatemonth']))
|
||||
$startdate = dol_mktime(12, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']);
|
||||
$startdate = dol_mktime(0, 0, 0, $_POST['startdatemonth'], $_POST['startdateday'], $_POST['startdateyear']);
|
||||
if (!empty($_POST['enddatemonth']))
|
||||
$enddate = dol_mktime(12, 0, 0, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
|
||||
$enddate = dol_mktime(23, 59, 59, $_POST['enddatemonth'], $_POST['enddateday'], $_POST['enddateyear']);
|
||||
|
||||
/*
|
||||
* View
|
||||
|
||||
@ -93,7 +93,7 @@ llxHeader('',$langs->trans("PaypalSetup"));
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre(' - '.$langs->trans("ModuleSetup"),$linkback,'paypal_logo@paypal');
|
||||
print_fiche_titre($langs->trans("ModuleSetup").' PayPal',$linkback);
|
||||
print '<br>';
|
||||
|
||||
$head=paypaladmin_prepare_head();
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
@ -46,6 +46,11 @@ class Product extends CommonObject
|
||||
protected $isnolinkedbythird = 1; // No field fk_soc
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $regeximgext='\.jpg|\.jpeg|\.bmp|\.gif|\.png|\.tiff';
|
||||
|
||||
//! Identifiant unique
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -71,7 +72,9 @@ llxHeader('','',$helpurl);
|
||||
$sql = "SELECT count(*) as c";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product";
|
||||
$sql.= ' WHERE entity IN ('.getEntity('product', 1).')';
|
||||
if (isset($type)) $sql.= " AND fk_product_type = ".$type;
|
||||
if ($type !== '') {
|
||||
$sql.= " AND fk_product_type = ".$type;
|
||||
}
|
||||
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
@ -82,11 +85,14 @@ if ($result)
|
||||
|
||||
$param = '';
|
||||
$title = $langs->trans("ListProductServiceByPopularity");
|
||||
if (isset($type))
|
||||
{
|
||||
if ($type !== '') {
|
||||
$param = '&type='.$type;
|
||||
$title = $langs->trans("ListProductByPopularity");
|
||||
if ($type == 1) $title = $langs->trans("ListServiceByPopularity");
|
||||
|
||||
if ($type == 1) {
|
||||
$title = $langs->trans("ListServiceByPopularity");
|
||||
} else {
|
||||
$title = $langs->trans("ListProductByPopularity");
|
||||
}
|
||||
}
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"],$param,"","","",$num);
|
||||
@ -106,7 +112,9 @@ $sql.= " FROM ".MAIN_DB_PREFIX."propaldet as pd";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= ' WHERE p.entity IN ('.getEntity('product', 1).')';
|
||||
$sql.= " AND p.rowid = pd.fk_product";
|
||||
if (isset($type)) $sql.= " AND fk_product_type = ".$type;
|
||||
if ($type !== '') {
|
||||
$sql.= " AND fk_product_type = ".$type;
|
||||
}
|
||||
$sql.= " GROUP BY (p.rowid)";
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($limit, $offset);
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -155,7 +156,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateInvoice"),$_SERVER["PHP_SELF"],"f.datef","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"],"d.qty","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"f.paye,f.fk_statut","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -38,6 +38,11 @@ class Project extends CommonObject
|
||||
public $fk_element = 'fk_projet';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
var $id;
|
||||
var $ref;
|
||||
var $description;
|
||||
@ -568,16 +573,9 @@ class Project extends CommonObject
|
||||
{
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('PROJECT_DELETE',$user);
|
||||
if ($result < 0)
|
||||
{
|
||||
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
if (! empty($interface->errors))
|
||||
{
|
||||
foreach ($interface->errors as $errmsg ) {
|
||||
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
||||
$this->errors[] =$errmsg;
|
||||
}
|
||||
}
|
||||
}
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
@ -460,8 +460,8 @@ $langs->load("suppliers");
|
||||
$langs->load("bills");
|
||||
$langs->load("orders");
|
||||
$langs->load("proposals");
|
||||
$langs->load("margin");
|
||||
print_titre($langs->trans("Profit"));
|
||||
$langs->load("margins");
|
||||
print_fiche_titre($langs->trans("Profit"),'','');
|
||||
print '<table class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="left" width="200">'.$langs->trans("Element").'</td>';
|
||||
|
||||
@ -57,7 +57,7 @@ $projectstatic = new Project($db);
|
||||
// Add new contact
|
||||
if ($action == 'addcontact' && $user->rights->projet->creer)
|
||||
{
|
||||
$result = $object->fetch($id);
|
||||
$result = $object->fetch($id, $ref);
|
||||
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
@ -87,7 +87,7 @@ if ($action == 'addcontact' && $user->rights->projet->creer)
|
||||
// bascule du statut d'un contact
|
||||
if ($action == 'swapstatut' && $user->rights->projet->creer)
|
||||
{
|
||||
if ($object->fetch($id))
|
||||
if ($object->fetch($id, $ref))
|
||||
{
|
||||
$result=$object->swapContactStatus(GETPOST('ligne'));
|
||||
}
|
||||
@ -100,7 +100,7 @@ if ($action == 'swapstatut' && $user->rights->projet->creer)
|
||||
// Efface un contact
|
||||
if ($action == 'deleteline' && $user->rights->projet->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->fetch($id, $ref);
|
||||
$result = $object->delete_contact($_GET["lineid"]);
|
||||
|
||||
if ($result >= 0)
|
||||
@ -152,7 +152,7 @@ $userstatic = new User($db);
|
||||
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
if ($object->fetch($id) > 0)
|
||||
if ($object->fetch($id, $ref) > 0)
|
||||
{
|
||||
$result=$projectstatic->fetch($object->fk_project);
|
||||
if (! empty($projectstatic->socid)) $projectstatic->fetch_thirdparty();
|
||||
|
||||
@ -97,7 +97,7 @@ print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Project").'</td>';
|
||||
print '<td>'.$langs->trans("Status").'</td>';
|
||||
print '<td>'.$langs->trans("ProjectStatus").'</td>';
|
||||
print '<td>'.$langs->trans("RefTask").'</td>';
|
||||
print '<td>'.$langs->trans("LabelTask").'</td>';
|
||||
print '<td align="center">'.$langs->trans("DateStart").'</td>';
|
||||
|
||||
@ -73,7 +73,7 @@ if ($action == 'addtimespent' && $user->rights->projet->creer)
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->fetch($id, $ref);
|
||||
$object->fetch_projet();
|
||||
|
||||
if (empty($object->projet->statut))
|
||||
@ -119,7 +119,7 @@ if ($action == 'updateline' && ! $_POST["cancel"] && $user->rights->projet->cree
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->fetch($id, $ref);
|
||||
|
||||
$object->timespent_id = $_POST["lineid"];
|
||||
$object->timespent_note = $_POST["timespent_note_line"];
|
||||
@ -194,7 +194,7 @@ if ($id > 0 || ! empty($ref))
|
||||
/*
|
||||
* Fiche projet en mode visu
|
||||
*/
|
||||
if ($object->fetch($id) >= 0)
|
||||
if ($object->fetch($id, $ref) >= 0)
|
||||
{
|
||||
$result=$projectstatic->fetch($object->fk_project);
|
||||
if (! empty($projectstatic->socid)) $projectstatic->fetch_thirdparty();
|
||||
|
||||
@ -22,7 +22,7 @@ if [ -f "$1.odt" ]
|
||||
nbprocess=$(pgrep -c soffice)
|
||||
if [ $nbprocess -ne 1 ]
|
||||
then
|
||||
soffice --invisible --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard --headless&
|
||||
soffice --invisible --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard --headless &
|
||||
retcode=$?
|
||||
if [ $retcode -ne 0 ]
|
||||
then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user