Merge branch 'develop' into 7.0-pcg6
This commit is contained in:
commit
5ba64fe620
@ -79,7 +79,7 @@ matrix:
|
||||
notifications:
|
||||
email:
|
||||
on_success: never # [always|never|change] default: change
|
||||
on_failure: change # [always|never|change] default: always
|
||||
on_failure: never # [always|never|change] default: always
|
||||
irc:
|
||||
channels:
|
||||
- "chat.freenode.net#dolibarr"
|
||||
|
||||
@ -36,7 +36,7 @@ Stripe 4.7.0 MIT licence Yes
|
||||
JS libraries:
|
||||
jQuery 3.1.1 MIT License Yes JS library
|
||||
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
|
||||
jQuery select2 4.0.4 GPL and Apache License Yes JS library plugin for sexier multiselect
|
||||
jQuery select2 4.0.5 GPL and Apache License Yes JS library plugin for sexier multiselect
|
||||
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
|
||||
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
||||
jQuery Flot 0.8.3 MIT License Yes JS library to build graph
|
||||
|
||||
@ -29,7 +29,7 @@ class AccountingJournal extends CommonObject
|
||||
public $element='accounting_journal';
|
||||
public $table_element='accounting_journal';
|
||||
public $fk_element = '';
|
||||
protected $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
var $rowid;
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ class Adherent extends CommonObject
|
||||
{
|
||||
public $element='member';
|
||||
public $table_element='adherent';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
var $mesgs;
|
||||
|
||||
|
||||
@ -421,9 +421,13 @@ if ($mode == 'feature')
|
||||
$i=0;
|
||||
foreach($objMod->tabs as $val)
|
||||
{
|
||||
$tmp=explode(':',$val,3);
|
||||
$text.=($i?', ':'').$tmp[0].':'.$tmp[1];
|
||||
$i++;
|
||||
if (is_array($val)) $val=$val['data'];
|
||||
if (is_string($val))
|
||||
{
|
||||
$tmp=explode(':',$val,3);
|
||||
$text.=($i?', ':'').$tmp[0].':'.$tmp[1];
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else $text.=$langs->trans("No");
|
||||
|
||||
@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/ccountry.class.php';
|
||||
class Dictionary extends DolibarrApi
|
||||
{
|
||||
private $translations = null;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@ -52,11 +52,11 @@ class Dictionary extends DolibarrApi
|
||||
* @param int $page Page number {@min 0}
|
||||
* @param int $active Payment type is active or not {@min 0} {@max 1}
|
||||
* @param string $sqlfilters SQL criteria to filter with. Syntax example "(t.code:=:'CHQ')"
|
||||
*
|
||||
*
|
||||
* @url GET payment/types
|
||||
*
|
||||
* @return array [List of payment types]
|
||||
*
|
||||
*
|
||||
* @throws 400 RestException
|
||||
* @throws 200 OK
|
||||
*/
|
||||
@ -104,7 +104,7 @@ class Dictionary extends DolibarrApi
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the list of countries.
|
||||
*
|
||||
@ -121,9 +121,9 @@ class Dictionary extends DolibarrApi
|
||||
* @param string $lang Code of the language the label of the countries must be translated to
|
||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)"
|
||||
* @return List of countries
|
||||
*
|
||||
*
|
||||
* @url GET countries
|
||||
*
|
||||
*
|
||||
* @throws RestException
|
||||
*/
|
||||
function getListOfCountries($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $filter = '', $lang = '', $sqlfilters = '')
|
||||
@ -135,7 +135,7 @@ class Dictionary extends DolibarrApi
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."c_country as t";
|
||||
$sql.=" WHERE 1 = 1";
|
||||
// Add sql filters
|
||||
if ($sqlfilters)
|
||||
if ($sqlfilters)
|
||||
{
|
||||
if (! DolibarrApi::_checkFilters($sqlfilters))
|
||||
{
|
||||
@ -144,7 +144,7 @@ class Dictionary extends DolibarrApi
|
||||
$regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
|
||||
$sql.=" AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
|
||||
}
|
||||
|
||||
|
||||
$sql.= $this->db->order($sortfield, $sortorder);
|
||||
|
||||
if ($limit) {
|
||||
@ -152,7 +152,7 @@ class Dictionary extends DolibarrApi
|
||||
$page = 0;
|
||||
}
|
||||
$offset = $limit * $page;
|
||||
|
||||
|
||||
$sql .= $this->db->plimit($limit, $offset);
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ class Dictionary extends DolibarrApi
|
||||
} else {
|
||||
throw new RestException(503, 'Error when retrieving list of countries : '.$country->error);
|
||||
}
|
||||
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
@ -187,9 +187,9 @@ class Dictionary extends DolibarrApi
|
||||
* @param int $id ID of country
|
||||
* @param string $lang Code of the language the name of the
|
||||
* country must be translated to
|
||||
*
|
||||
*
|
||||
* @url GET countries/{id}
|
||||
*
|
||||
*
|
||||
* @throws RestException
|
||||
*/
|
||||
function getCountryByID($id, $lang = '')
|
||||
@ -217,16 +217,16 @@ class Dictionary extends DolibarrApi
|
||||
function _cleanObjectDatas($object)
|
||||
{
|
||||
$object = parent::_cleanObjectDatas($object);
|
||||
|
||||
|
||||
unset($object->error);
|
||||
unset($object->errors);
|
||||
|
||||
|
||||
return $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate the name of the country to the given language.
|
||||
*
|
||||
*
|
||||
* @param Ccountry $country Country
|
||||
* @param string $lang Code of the language the name of the
|
||||
* country must be translated to
|
||||
@ -249,8 +249,8 @@ class Dictionary extends DolibarrApi
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of events types.
|
||||
*
|
||||
@ -262,7 +262,7 @@ class Dictionary extends DolibarrApi
|
||||
* @param string $module To filter on module events
|
||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)"
|
||||
* @return List of events types
|
||||
*
|
||||
*
|
||||
* @url GET events
|
||||
*
|
||||
* @throws RestException
|
||||
@ -312,9 +312,9 @@ class Dictionary extends DolibarrApi
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the list of extra fields.
|
||||
*
|
||||
@ -323,7 +323,7 @@ class Dictionary extends DolibarrApi
|
||||
* @param string $type Type of element ('adherent', 'commande', 'thirdparty', 'facture', 'propal', 'product', ...)
|
||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.label:like:'SO-%')"
|
||||
* @return List of events types
|
||||
*
|
||||
*
|
||||
* @url GET extrafields
|
||||
*
|
||||
* @throws RestException
|
||||
@ -335,7 +335,7 @@ class Dictionary extends DolibarrApi
|
||||
if ($type == 'thirdparty') $type='societe';
|
||||
if ($type == 'contact') $type='socpeople';
|
||||
|
||||
$sql = "SELECT t.rowid, t.name, t.label, t.type, t.size, t.elementtype, t.fieldunique, t.fieldrequired, t.param, t.pos, t.alwayseditable, t.perms, t.list, t.ishidden, t.fielddefault, t.fieldcomputed";
|
||||
$sql = "SELECT t.rowid, t.name, t.label, t.type, t.size, t.elementtype, t.fieldunique, t.fieldrequired, t.param, t.pos, t.alwayseditable, t.perms, t.list, t.fielddefault, t.fieldcomputed";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."extrafields as t";
|
||||
$sql.= " WHERE t.entity IN (".getEntity('extrafields').")";
|
||||
if (! empty($type)) $sql.= " AND t.elementtype = '".$this->db->escape($type)."'";
|
||||
@ -373,7 +373,6 @@ class Dictionary extends DolibarrApi
|
||||
$list[$tab->elementtype][$tab->name]['alwayseditable']=$tab->alwayseditable;
|
||||
$list[$tab->elementtype][$tab->name]['perms']=$tab->perms;
|
||||
$list[$tab->elementtype][$tab->name]['list']=$tab->list;
|
||||
$list[$tab->elementtype][$tab->name]['ishidden']=$tab->ishidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -388,9 +387,9 @@ class Dictionary extends DolibarrApi
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the list of towns.
|
||||
*
|
||||
@ -402,9 +401,9 @@ class Dictionary extends DolibarrApi
|
||||
* @param string $town To filter on city name
|
||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)"
|
||||
* @return List of towns
|
||||
*
|
||||
*
|
||||
* @url GET towns
|
||||
*
|
||||
*
|
||||
* @throws RestException
|
||||
*/
|
||||
function getListOfTowns($sortfield = "zip,town", $sortorder = 'ASC', $limit = 100, $page = 0, $zipcode = '', $town = '', $sqlfilters = '')
|
||||
@ -426,8 +425,8 @@ class Dictionary extends DolibarrApi
|
||||
$regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
|
||||
$sql.=" AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$sql.= $this->db->order($sortfield, $sortorder);
|
||||
|
||||
if ($limit) {
|
||||
@ -435,10 +434,10 @@ class Dictionary extends DolibarrApi
|
||||
$page = 0;
|
||||
}
|
||||
$offset = $limit * $page;
|
||||
|
||||
|
||||
$sql .= $this->db->plimit($limit, $offset);
|
||||
}
|
||||
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
@ -450,9 +449,9 @@ class Dictionary extends DolibarrApi
|
||||
} else {
|
||||
throw new RestException(503, 'Error when retrieving list of towns : '.$this->db->lasterror());
|
||||
}
|
||||
|
||||
|
||||
return $list;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the list of payments terms.
|
||||
|
||||
@ -30,7 +30,7 @@ class Bookmark extends CommonObject
|
||||
{
|
||||
public $element='bookmark';
|
||||
public $table_element='bookmark';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $picto = 'bookmark';
|
||||
|
||||
var $db;
|
||||
|
||||
@ -155,7 +155,7 @@ $form = new Form($db);
|
||||
|
||||
$help_url='';
|
||||
|
||||
llxHeader('', $langs->trans("WebsiteSetup"), $help_url, '', 0, '', '', '', '', '<!-- Begin div class="fiche" -->'."\n".'<div class="fichebutwithotherclass">');
|
||||
llxHeader('', $langs->trans("WebsiteSetup"), $help_url, '', 0, '', '', '', '', '', '<!-- Begin div class="fiche" -->'."\n".'<div class="fichebutwithotherclass">');
|
||||
|
||||
print "\n".'<form action="'.$_SERVER["PHP_SELF"].'" method="POST"><div>';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
@ -36,7 +36,7 @@ class ActionComm extends CommonObject
|
||||
public $element='action';
|
||||
public $table_element = 'actioncomm';
|
||||
public $table_rowid = 'id';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $picto='action';
|
||||
|
||||
/**
|
||||
@ -928,7 +928,7 @@ class ActionComm extends CommonObject
|
||||
$sql.= ")";
|
||||
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
|
||||
$sql.= " WHERE 1";
|
||||
$sql.= " WHERE 1 = 1";
|
||||
if(empty($load_state_board)) $sql.= " AND a.percent >= 0 AND a.percent < 100";
|
||||
$sql.= " AND a.entity IN (".getEntity('agenda').")";
|
||||
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";
|
||||
|
||||
@ -186,8 +186,12 @@ if (empty($reshook))
|
||||
if ($ret < 0) $error++;
|
||||
if (! $error)
|
||||
{
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0) $error++;
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
if ($error) $action = 'edit_extras';
|
||||
}
|
||||
|
||||
@ -1176,7 +1176,11 @@ if (empty($reshook))
|
||||
if (! $error)
|
||||
{
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0) $error++;
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
if ($error) $action = 'edit_extras';
|
||||
}
|
||||
@ -2191,7 +2195,7 @@ if ($action == 'create')
|
||||
// Show object lines
|
||||
$result = $object->getLinesArray();
|
||||
|
||||
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
|
||||
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#addline' : '#line_' . GETPOST('lineid')) . '" method="POST">
|
||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
|
||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateligne') . '">
|
||||
<input type="hidden" name="mode" value="">
|
||||
|
||||
@ -48,7 +48,7 @@ class Propal extends CommonObject
|
||||
public $table_element='propal';
|
||||
public $table_element_line='propaldet';
|
||||
public $fk_element='fk_propal';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $picto='propal';
|
||||
|
||||
/**
|
||||
|
||||
@ -1226,7 +1226,9 @@ if (empty($reshook))
|
||||
// some hooks
|
||||
if (empty($reshook)) {
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0) {
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
} else if ($reshook < 0)
|
||||
@ -2386,7 +2388,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
*/
|
||||
$result = $object->getLinesArray();
|
||||
|
||||
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
|
||||
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#addline' : '#line_' . GETPOST('lineid')) . '" method="POST">
|
||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
|
||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
|
||||
<input type="hidden" name="mode" value="">
|
||||
|
||||
@ -46,7 +46,7 @@ class Commande extends CommonOrder
|
||||
public $table_element_line = 'commandedet';
|
||||
public $class_element_line = 'OrderLine';
|
||||
public $fk_element = 'fk_commande';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $picto = 'order';
|
||||
|
||||
/**
|
||||
@ -610,6 +610,7 @@ class Commande extends CommonOrder
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -35,7 +35,7 @@ class Deplacement extends CommonObject
|
||||
public $table_element='deplacement';
|
||||
public $table_element_line = '';
|
||||
public $fk_element = '';
|
||||
protected $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
var $datec; // Creation date
|
||||
var $dated;
|
||||
|
||||
@ -2041,8 +2041,10 @@ if (empty($reshook))
|
||||
// some hooks
|
||||
if (empty($reshook)) {
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
} else if ($reshook < 0)
|
||||
$error ++;
|
||||
@ -4076,7 +4078,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
}
|
||||
|
||||
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
|
||||
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#addline' : '#line_' . GETPOST('lineid')) . '" method="POST">
|
||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
|
||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateligne') . '">
|
||||
<input type="hidden" name="mode" value="">
|
||||
|
||||
@ -77,21 +77,6 @@ class Invoices extends DolibarrApi
|
||||
$this->invoice->totaldeposits = $this->invoice->getSumDepositsUsed();
|
||||
$this->invoice->resteapayer = price2num($this->invoice->total_ttc - $this->invoice->totalpaye - $this->invoice->totalcreditnotes - $this->invoice->totaldeposits, 'MT');
|
||||
|
||||
// get available discounts of customer
|
||||
/* TODO Move this into thirdparty API
|
||||
$soc = new Societe($this->db);
|
||||
if ($this->invoice->socid > 0)
|
||||
$res = $soc->fetch($this->invoice->socid);
|
||||
if($res) {
|
||||
$filterabsolutediscount = "fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%'))";
|
||||
$filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')";
|
||||
$absolute_discount = $soc->getAvailableDiscounts('', $filterabsolutediscount);
|
||||
$absolute_creditnote = $soc->getAvailableDiscounts('', $filtercreditnote);
|
||||
$this->invoice->absolute_discount = price2num($absolute_discount, 'MT');
|
||||
$this->invoice->absolute_creditnote = price2num($absolute_creditnote, 'MT');
|
||||
}
|
||||
*/
|
||||
|
||||
if( ! DolibarrApi::_checkAccessToResource('facture',$this->invoice->id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
@ -667,8 +652,96 @@ class Invoices extends DolibarrApi
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a discount line into an invoice (as an invoice line) using an existing absolute discount (Consume the discount)
|
||||
*
|
||||
* @param int $id Id of invoice
|
||||
* @param int $discountid Id of discount
|
||||
*
|
||||
* @url POST {id}/usediscount/{discountid}
|
||||
*
|
||||
* @return int
|
||||
* @throws 400
|
||||
* @throws 401
|
||||
* @throws 404
|
||||
* @throws 405
|
||||
*/
|
||||
function useDiscount($id, $discountid) {
|
||||
|
||||
if(! DolibarrApiAccess::$user->rights->facture->creer) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
if(empty($id)) {
|
||||
throw new RestException(400, 'Invoice ID is mandatory');
|
||||
}
|
||||
if(empty($discountid)) {
|
||||
throw new RestException(400, 'Discount ID is mandatory');
|
||||
}
|
||||
|
||||
if( ! DolibarrApi::_checkAccessToResource('facture',$id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
$result = $this->invoice->fetch($id);
|
||||
if( ! $result ) {
|
||||
throw new RestException(404, 'Invoice not found');
|
||||
}
|
||||
|
||||
$result = $this->invoice->insert_discount($discountid);
|
||||
if( $result < 0) {
|
||||
throw new RestException(405, $this->invoice->error);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an available credit note discount to payments of an existing invoice (Consume the credit note)
|
||||
*
|
||||
* @param int $id Id of invoice
|
||||
* @param int $discountid Id of a discount coming from a credit note
|
||||
*
|
||||
* @url POST {id}/usecreditnote/{creditnoteid}
|
||||
*
|
||||
* @return int
|
||||
* @throws 400
|
||||
* @throws 401
|
||||
* @throws 404
|
||||
* @throws 405
|
||||
*/
|
||||
function useCreditNote($id, $discountid) {
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/discount.class.php';
|
||||
|
||||
if(! DolibarrApiAccess::$user->rights->facture->creer) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
if(empty($id)) {
|
||||
throw new RestException(400, 'Invoice ID is mandatory');
|
||||
}
|
||||
if(empty($creditId)) {
|
||||
throw new RestException(400, 'Credit ID is mandatory');
|
||||
}
|
||||
|
||||
if( ! DolibarrApi::_checkAccessToResource('facture',$id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
$discount = new DiscountAbsolute($this->db);
|
||||
$result = $discount->fetch($discountid);
|
||||
if( ! $result ) {
|
||||
throw new RestException(404, 'Credit not found');
|
||||
}
|
||||
|
||||
$result = $discount->link_to_invoice(0, $id);
|
||||
if( $result < 0) {
|
||||
throw new RestException(405, $discount->error);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a payment list of a given invoice
|
||||
* Get list of payments of a given invoice
|
||||
*
|
||||
* @param int $id Id of invoice
|
||||
*
|
||||
@ -706,8 +779,6 @@ class Invoices extends DolibarrApi
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Clean sensible object datas
|
||||
*
|
||||
|
||||
@ -52,7 +52,7 @@ class Facture extends CommonInvoice
|
||||
public $table_element='facture';
|
||||
public $table_element_line = 'facturedet';
|
||||
public $fk_element = 'fk_facture';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $picto='bill';
|
||||
|
||||
/**
|
||||
@ -1582,7 +1582,7 @@ class Facture extends CommonInvoice
|
||||
|
||||
|
||||
/**
|
||||
* Add a discount line into invoice using an existing absolute discount
|
||||
* Add a discount line into an invoice (as an invoice line) using an existing absolute discount (Consume the discount)
|
||||
*
|
||||
* @param int $idremise Id of absolute discount
|
||||
* @return int >0 if OK, <0 if KO
|
||||
@ -1648,7 +1648,7 @@ class Facture extends CommonInvoice
|
||||
$result=$this->update_price(1);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Create linke between discount and invoice line
|
||||
// Create link between discount and invoice line
|
||||
$result=$remise->link_to_invoice($lineid,0);
|
||||
if ($result < 0)
|
||||
{
|
||||
@ -3505,11 +3505,12 @@ class Facture extends CommonInvoice
|
||||
|
||||
|
||||
/**
|
||||
* Renvoi liste des factures remplacables
|
||||
* Statut validee ou abandonnee pour raison autre + non payee + aucun paiement + pas deja remplacee
|
||||
* Return list of invoices qualified to be replaced by another invoice.
|
||||
* Invoices matching the following rules are returned:
|
||||
* (Status validated or abandonned for a reason 'other') + not payed + no payment at all + not already replaced
|
||||
*
|
||||
* @param int $socid Id societe
|
||||
* @return array Tableau des factures ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
|
||||
* @param int $socid Id thirdparty
|
||||
* @return array Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
|
||||
*/
|
||||
function list_replacable_invoices($socid=0)
|
||||
{
|
||||
@ -3552,12 +3553,12 @@ class Facture extends CommonInvoice
|
||||
|
||||
|
||||
/**
|
||||
* Renvoi liste des factures qualifiables pour correction par avoir
|
||||
* Les factures qui respectent les regles suivantes sont retournees:
|
||||
* (validee + paiement en cours) ou classee (payee completement ou payee partiellement) + pas deja remplacee + pas deja avoir
|
||||
* Return list of invoices qualified to be corrected by a credit note.
|
||||
* Invoices matching the following rules are returned:
|
||||
* (validated + payment on process) or classified (payed completely or payed partiely) + not already replaced + not already a credit note
|
||||
*
|
||||
* @param int $socid Id societe
|
||||
* @return array Tableau des factures ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>)
|
||||
* @param int $socid Id thirdparty
|
||||
* @return array Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>)
|
||||
*/
|
||||
function list_qualified_avoir_invoices($socid=0)
|
||||
{
|
||||
|
||||
@ -386,22 +386,16 @@ if (empty($reshook))
|
||||
// Fill array 'array_options' with data from update form
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
||||
if ($ret < 0)
|
||||
$error ++;
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if (! $error) {
|
||||
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
}
|
||||
} else if ($reshook < 0)
|
||||
$error ++;
|
||||
|
||||
if ($error) {
|
||||
$action = 'edit_extras';
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
if (! $error) {
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add a new line
|
||||
|
||||
@ -39,7 +39,7 @@ class Contact extends CommonObject
|
||||
{
|
||||
public $element='contact';
|
||||
public $table_element='socpeople';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
public $civility_id; // In fact we store civility_code
|
||||
public $civility_code;
|
||||
|
||||
@ -821,21 +821,19 @@ if (empty($reshook))
|
||||
// Fill array 'array_options' with data from update form
|
||||
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
||||
if ($ret < 0)
|
||||
$error ++;
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if (! $error) {
|
||||
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
}
|
||||
} else if ($reshook < 0)
|
||||
$error ++;
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if ($error) {
|
||||
$action = 'edit_extras';
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
elseif ($action=='setref_supplier')
|
||||
|
||||
@ -40,7 +40,7 @@ class Contracts extends DolibarrApi
|
||||
);
|
||||
|
||||
/**
|
||||
* @var Contract $contract {@type Contrat}
|
||||
* @var Contrat $contract {@type Contrat}
|
||||
*/
|
||||
public $contract;
|
||||
|
||||
@ -156,6 +156,7 @@ class Contracts extends DolibarrApi
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$min = min($num, ($limit <= 0 ? $num : $limit));
|
||||
$i=0;
|
||||
while ($i < $min)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
@ -269,8 +270,8 @@ class Contracts extends DolibarrApi
|
||||
$request_data->localtax2_tx,
|
||||
$request_data->fk_product,
|
||||
$request_data->remise_percent,
|
||||
$request_data->date_start, // date ouverture = date_start_real
|
||||
$request_data->date_end, // date_cloture = date_end_real
|
||||
$request_data->date_start, // date_start = date planned start, date ouverture = date_start_real
|
||||
$request_data->date_end, // date_end = date planned end, date_cloture = date_end_real
|
||||
$request_data->HT,
|
||||
$request_data->subprice_excl_tax,
|
||||
$request_data->info_bits,
|
||||
@ -450,7 +451,6 @@ class Contracts extends DolibarrApi
|
||||
* Validate an contract
|
||||
*
|
||||
* @param int $id Contract ID
|
||||
* @param int $idwarehouse Warehouse ID
|
||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||
*
|
||||
* @url POST {id}/validate
|
||||
@ -460,12 +460,10 @@ class Contracts extends DolibarrApi
|
||||
* Error message: "Forbidden: Content type `text/plain` is not supported."
|
||||
* Workaround: send this in the body
|
||||
* {
|
||||
* "idwarehouse": 0,
|
||||
* "notrigger": 0
|
||||
* }
|
||||
*/
|
||||
/*
|
||||
function validate($id, $idwarehouse=0, $notrigger=0)
|
||||
function validate($id, $notrigger=0)
|
||||
{
|
||||
if(! DolibarrApiAccess::$user->rights->contrat->creer) {
|
||||
throw new RestException(401);
|
||||
@ -479,7 +477,7 @@ class Contracts extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
$result = $this->contract->valid(DolibarrApiAccess::$user, $idwarehouse, $notrigger);
|
||||
$result = $this->contract->validate(DolibarrApiAccess::$user, '', $notrigger);
|
||||
if ($result == 0) {
|
||||
throw new RestException(500, 'Error nothing done. May be object is already validated');
|
||||
}
|
||||
@ -494,7 +492,54 @@ class Contracts extends DolibarrApi
|
||||
)
|
||||
);
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Close all services of a contract
|
||||
*
|
||||
* @param int $id Contract ID
|
||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||
*
|
||||
* @url POST {id}/close
|
||||
*
|
||||
* @return array
|
||||
* FIXME An error 403 is returned if the request has an empty body.
|
||||
* Error message: "Forbidden: Content type `text/plain` is not supported."
|
||||
* Workaround: send this in the body
|
||||
* {
|
||||
* "notrigger": 0
|
||||
* }
|
||||
*/
|
||||
function close($id, $notrigger=0)
|
||||
{
|
||||
if(! DolibarrApiAccess::$user->rights->contrat->creer) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
$result = $this->contract->fetch($id);
|
||||
if( ! $result ) {
|
||||
throw new RestException(404, 'Contract not found');
|
||||
}
|
||||
|
||||
if( ! DolibarrApi::_checkAccessToResource('contrat',$this->contract->id)) {
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
$result = $this->contract->closeAll(DolibarrApiAccess::$user, $notrigger);
|
||||
if ($result == 0) {
|
||||
throw new RestException(500, 'Error nothing done. May be object is already close');
|
||||
}
|
||||
if ($result < 0) {
|
||||
throw new RestException(500, 'Error when closing Contract: '.$this->contract->error);
|
||||
}
|
||||
|
||||
return array(
|
||||
'success' => array(
|
||||
'code' => 200,
|
||||
'message' => 'Contract closed (Ref='.$this->contract->ref.'). All services were closed.'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Clean sensible object datas
|
||||
@ -508,6 +553,16 @@ class Contracts extends DolibarrApi
|
||||
|
||||
unset($object->address);
|
||||
|
||||
unset($object->date_ouverture_prevue);
|
||||
unset($object->date_ouverture);
|
||||
unset($object->date_fin_validite);
|
||||
unset($object->date_cloture);
|
||||
unset($object->date_debut_prevue);
|
||||
unset($object->date_debut_reel);
|
||||
unset($object->date_fin_prevue);
|
||||
unset($object->date_fin_reel);
|
||||
unset($object->civility_id);
|
||||
|
||||
return $object;
|
||||
}
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ class Contrat extends CommonObject
|
||||
public $table_element='contrat';
|
||||
public $table_element_line='contratdet';
|
||||
public $fk_element='fk_contrat';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $picto='contract';
|
||||
|
||||
/**
|
||||
@ -298,12 +298,13 @@ class Contrat extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Close all lines of a contract
|
||||
* Close all lines of a contract
|
||||
*
|
||||
* @param User $user Object User making action
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @param User $user Object User making action
|
||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function closeAll($user)
|
||||
function closeAll(User $user, $notrigger=0)
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
@ -330,7 +331,7 @@ class Contrat extends CommonObject
|
||||
|
||||
if ($this->statut == 0)
|
||||
{
|
||||
$result=$this->validate($user);
|
||||
$result=$this->validate($user, '', $notrigger);
|
||||
if ($result < 0) $ok=false;
|
||||
}
|
||||
|
||||
@ -355,7 +356,7 @@ class Contrat extends CommonObject
|
||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function validate($user, $force_number='', $notrigger=0)
|
||||
function validate(User $user, $force_number='', $notrigger=0)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
global $langs, $conf;
|
||||
@ -741,12 +742,12 @@ class Contrat extends CommonObject
|
||||
$line->fk_unit = $objp->fk_unit;
|
||||
|
||||
$line->ref = $objp->product_ref; // deprecated
|
||||
if (empty($objp->fk_product))
|
||||
if (empty($objp->fk_product))
|
||||
{
|
||||
$line->label = ''; // deprecated
|
||||
$line->libelle = $objp->description; // deprecated
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$line->label = $objp->product_label; // deprecated
|
||||
$line->libelle = $objp->product_label; // deprecated
|
||||
@ -757,11 +758,15 @@ class Contrat extends CommonObject
|
||||
|
||||
$line->description = $objp->description;
|
||||
|
||||
$line->date_start = $this->db->jdate($objp->date_ouverture_prevue);
|
||||
$line->date_start_real = $this->db->jdate($objp->date_ouverture);
|
||||
$line->date_end = $this->db->jdate($objp->date_fin_validite);
|
||||
$line->date_end_real = $this->db->jdate($objp->date_cloture);
|
||||
// For backward compatibility
|
||||
$line->date_ouverture_prevue = $this->db->jdate($objp->date_ouverture_prevue);
|
||||
$line->date_ouverture = $this->db->jdate($objp->date_ouverture);
|
||||
$line->date_fin_validite = $this->db->jdate($objp->date_fin_validite);
|
||||
$line->date_cloture = $this->db->jdate($objp->date_cloture);
|
||||
// For backward compatibility
|
||||
$line->date_debut_prevue = $this->db->jdate($objp->date_ouverture_prevue);
|
||||
$line->date_debut_reel = $this->db->jdate($objp->date_ouverture);
|
||||
$line->date_fin_prevue = $this->db->jdate($objp->date_fin_validite);
|
||||
@ -2242,10 +2247,10 @@ class Contrat extends CommonObject
|
||||
$line->total_ht=90;
|
||||
$line->total_ttc=107.64; // 90 * 1.196
|
||||
$line->total_tva=17.64;
|
||||
$line->date_ouverture = dol_now() - 200000;
|
||||
$line->date_ouverture_prevue = dol_now() - 500000;
|
||||
$line->date_fin_validite = dol_now() + 500000;
|
||||
$line->date_cloture = dol_now() - 100000;
|
||||
$line->date_start = dol_now() - 500000;
|
||||
$line->date_start_real = dol_now() - 200000;
|
||||
$line->date_end = dol_now() + 500000;
|
||||
$line->date_end_real = dol_now() - 100000;
|
||||
if ($num_prods > 0)
|
||||
{
|
||||
$prodid = mt_rand(1, $num_prods);
|
||||
@ -2256,17 +2261,18 @@ class Contrat extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Create an array of order lines
|
||||
*
|
||||
* @return int >0 if OK, <0 if KO
|
||||
*/
|
||||
function getLinesArray()
|
||||
{
|
||||
return $this->fetch_lines();
|
||||
}
|
||||
*/
|
||||
function getLinesArray()
|
||||
{
|
||||
return $this->fetch_lines();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Create a document onto disk according to template module.
|
||||
*
|
||||
* @param string $modele Force model to use ('' to not force)
|
||||
@ -2458,6 +2464,12 @@ class ContratLigne extends CommonObjectLine
|
||||
var $product_label;
|
||||
|
||||
var $date_commande;
|
||||
|
||||
var $date_start; // date start planned
|
||||
var $date_start_real; // date start real
|
||||
var $date_end; // date end planned
|
||||
var $date_end_real; // date end real
|
||||
// For backward compatibility
|
||||
var $date_ouverture_prevue; // date start planned
|
||||
var $date_ouverture; // date start real
|
||||
var $date_fin_validite; // date end planned
|
||||
@ -2693,10 +2705,17 @@ class ContratLigne extends CommonObjectLine
|
||||
$this->label = $obj->label; // deprecated. We do not use this field. Only ref and label of product, and description of contract line
|
||||
$this->description = $obj->description;
|
||||
$this->date_commande = $this->db->jdate($obj->date_commande);
|
||||
|
||||
$this->date_start = $this->db->jdate($obj->date_ouverture_prevue);
|
||||
$this->date_start_real = $this->db->jdate($obj->date_ouverture);
|
||||
$this->date_end = $this->db->jdate($obj->date_fin_validite);
|
||||
$this->date_end_real = $this->db->jdate($obj->date_cloture);
|
||||
// For backward compatibility
|
||||
$this->date_ouverture_prevue = $this->db->jdate($obj->date_ouverture_prevue);
|
||||
$this->date_ouverture = $this->db->jdate($obj->date_ouverture);
|
||||
$this->date_fin_validite = $this->db->jdate($obj->date_fin_validite);
|
||||
$this->date_cloture = $this->db->jdate($obj->date_cloture);
|
||||
|
||||
$this->tva_tx = $obj->tva_tx;
|
||||
$this->vat_src_code = $obj->vat_src_code;
|
||||
$this->localtax1_tx = $obj->localtax1_tx;
|
||||
@ -2784,6 +2803,12 @@ class ContratLigne extends CommonObjectLine
|
||||
if (empty($this->localtax1_tx)) $this->localtax1_tx = 0;
|
||||
if (empty($this->localtax2_tx)) $this->localtax2_tx = 0;
|
||||
if (empty($this->remise_percent)) $this->remise_percent = 0;
|
||||
// For backward compatibility
|
||||
if (empty($this->date_start)) $this->date_start=$this->date_ouverture_prevue;
|
||||
if (empty($this->date_start_real)) $this->date_start=$this->date_ouverture;
|
||||
if (empty($this->date_end)) $this->date_start=$this->date_fin_validite;
|
||||
if (empty($this->date_end_real)) $this->date_start=$this->date_cloture;
|
||||
|
||||
|
||||
// Check parameters
|
||||
// Put here code to add control on parameters values
|
||||
|
||||
@ -46,7 +46,11 @@ if ($action == 'add' && ! empty($permissiontoadd))
|
||||
{
|
||||
if (in_array($key, array('rowid', 'entity', 'date_creation', 'tms', 'fk_user_creat', 'fk_user_modif', 'import_key'))) continue; // Ignore special fields
|
||||
|
||||
$object->$key=GETPOST($key,'alpha');
|
||||
$value = GETPOST($key,'alpha');
|
||||
if (preg_match('/^integer:/i', $object->fields[$key]['type']) && $value == '-1') $value=''; // This is an implicit foreign key field
|
||||
if (! empty($object->fields[$key]['foreignkey']) && $value == '-1') $value=''; // This is an explicit foreign key field
|
||||
|
||||
$object->$key=$value;
|
||||
if ($val['notnull'] > 0 && $object->$key == '')
|
||||
{
|
||||
$error++;
|
||||
@ -85,7 +89,11 @@ if ($action == 'update' && ! empty($permissiontoadd))
|
||||
{
|
||||
if (in_array($key, array('rowid', 'entity', 'date_creation', 'tms', 'fk_user_creat', 'fk_user_modif', 'import_key'))) continue; // Ignore special fields
|
||||
|
||||
$object->$key=GETPOST($key,'alpha');
|
||||
$value = GETPOST($key,'alpha');
|
||||
if (preg_match('/^integer:/i', $object->fields[$key]['type']) && $value == '-1') $value=''; // This is an implicit foreign key field
|
||||
if (! empty($object->fields[$key]['foreignkey']) && $value == '-1') $value=''; // This is an explicit foreign key field
|
||||
|
||||
$object->$key=$value;
|
||||
if ($val['notnull'] > 0 && $object->$key == '')
|
||||
{
|
||||
$error++;
|
||||
|
||||
@ -174,7 +174,7 @@ if ($action == 'add')
|
||||
(GETPOST('alwayseditable', 'alpha')?1:0),
|
||||
(GETPOST('perms', 'alpha')?GETPOST('perms', 'alpha'):''),
|
||||
GETPOST('list', 'alpha'), // Same as visible -1=not visible by default in list, 1=visible, 0=not visible in list
|
||||
(GETPOST('ishidden', 'alpha')?1:0),
|
||||
0,
|
||||
GETPOST('computed_value','alpha'),
|
||||
(GETPOST('entitycurrentorall', 'alpha')?0:''),
|
||||
GETPOST('langfile', 'alpha')
|
||||
@ -336,7 +336,7 @@ if ($action == 'update')
|
||||
(GETPOST('alwayseditable', 'alpha')?1:0),
|
||||
(GETPOST('perms', 'alpha')?GETPOST('perms', 'alpha'):''),
|
||||
GETPOST('list', 'alpha'), // Same as visible -1=not visible by default in list, 1=visible, 0=not visible in list
|
||||
(GETPOST('ishidden', 'alpha')?1:0),
|
||||
0,
|
||||
GETPOST('default_value','alpha'),
|
||||
GETPOST('computed_value','alpha'),
|
||||
(GETPOST('entitycurrentorall', 'alpha')?0:''),
|
||||
|
||||
86
htdocs/core/ajax/selectobject.php
Normal file
86
htdocs/core/ajax/selectobject.php
Normal file
@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/ajax/selectobject.php
|
||||
* \brief File to return Ajax response on a selection list request
|
||||
*/
|
||||
|
||||
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); // Disables token renewal
|
||||
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
|
||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
|
||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
|
||||
if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1');
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
$objectdesc=GETPOST('objectdesc', 'alpha');
|
||||
$htmlname=GETPOST('htmlname', 'aZ09');
|
||||
$sqlfilter=GETPOST('sqlfilter', 'alpha');
|
||||
$outjson=(GETPOST('outjson', 'int') ? GETPOST('outjson', 'int') : 0);
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$id=GETPOST('id', 'int');
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
//print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||
|
||||
dol_syslog(join(',', $_GET));
|
||||
//print_r($_GET);
|
||||
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
$form = new Form($db);
|
||||
|
||||
//$langs->load("companies");
|
||||
|
||||
top_httphead();
|
||||
|
||||
if (empty($htmlname)) return;
|
||||
|
||||
|
||||
$InfoFieldList = explode(":", $objectdesc);
|
||||
$classname=$InfoFieldList[0];
|
||||
$classpath=$InfoFieldList[1];
|
||||
if (! empty($classpath))
|
||||
{
|
||||
dol_include_once($classpath);
|
||||
if ($classname && class_exists($classname))
|
||||
{
|
||||
$objecttmp = new $classname($db);
|
||||
}
|
||||
}
|
||||
if (! is_object($objecttmp))
|
||||
{
|
||||
dol_syslog('Error bad param objectdesc', LOG_WARNING);
|
||||
print 'Error bad param objectdesc';
|
||||
}
|
||||
|
||||
// When used from jQuery, the search term is added as GET param "term".
|
||||
$searchkey=(($id && GETPOST($id, 'alpha'))?GETPOST($id, 'alpha'):(($htmlname && GETPOST($htmlname, 'alpha'))?GETPOST($htmlname, 'alpha'):''));
|
||||
|
||||
// TODO Add a security test to avoid to get content of all tables
|
||||
|
||||
$arrayresult=$form->selectForFormsList($objecttmp, $htmlname, '', 0, $searchkey, '', '', '', 0, 1);
|
||||
|
||||
$db->close();
|
||||
|
||||
if ($outjson) print json_encode($arrayresult);
|
||||
@ -269,7 +269,8 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
||||
$out.= img_picto($langs->trans("MoveBox",$this->box_id),'grip_title','class="boxhandle hideonsmartphone cursormove"');
|
||||
$out.= img_picto($langs->trans("CloseBox",$this->box_id),'close_title','class="boxclose cursorpointer" rel="x:y" id="imgclose'.$this->box_id.'"');
|
||||
$label=$head['text'];
|
||||
if (! empty($head['graph'])) $label.=' ('.$langs->trans("Graph").')';
|
||||
//if (! empty($head['graph'])) $label.=' ('.$langs->trans("Graph").')';
|
||||
if (! empty($head['graph'])) $label.=' <span class="fa fa-bar-chart"></span>';
|
||||
$out.= '<input type="hidden" id="boxlabelentry'.$this->box_id.'" value="'.dol_escape_htmltag($label).'">';
|
||||
$out.= '</td></tr></table>';
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -81,14 +81,16 @@ class DolGraph
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $library 'jflot' (default) or 'artichow' (no more supported)
|
||||
*/
|
||||
function __construct()
|
||||
function __construct($library='jflot')
|
||||
{
|
||||
global $conf;
|
||||
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
|
||||
|
||||
// To use old feature
|
||||
if (isset($conf->global->MAIN_GRAPH_LIBRARY) && $conf->global->MAIN_GRAPH_LIBRARY == 'artichow')
|
||||
if ($library == 'artichow')
|
||||
{
|
||||
$this->_library='artichow';
|
||||
|
||||
@ -586,7 +588,7 @@ class DolGraph
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a graph onto disk using correct library
|
||||
* Build a graph into memory using correct library (may also be wrote on disk, depending on library used)
|
||||
*
|
||||
* @param string $file Image file name to use to save onto disk (also used as javascript unique id)
|
||||
* @param string $fileurl Url path to show image if saved onto disk
|
||||
|
||||
@ -46,7 +46,7 @@ class EmailSenderProfile extends CommonObject
|
||||
/**
|
||||
* @var array Does emailsenderprofile support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
*/
|
||||
protected $ismultientitymanaged = 1;
|
||||
public $ismultientitymanaged = 1;
|
||||
/**
|
||||
* @var string String with name of icon for emailsenderprofile
|
||||
*/
|
||||
|
||||
@ -140,8 +140,8 @@ class ExtraFields
|
||||
* @param array|string $param Params for field (ex for select list : array('options' => array(value'=>'label of option')) )
|
||||
* @param int $alwayseditable Is attribute always editable regardless of the document status
|
||||
* @param string $perms Permission to check
|
||||
* @param int $list Into list view by default (-1, 0 or 1)
|
||||
* @param int $ishidden Is hidden extrafield (warning, do not rely on this. If your module need a hidden data, it must use its own table)
|
||||
* @param int $list Visibilty
|
||||
* @param int $ishidden Deprecated. Us visibility instead.
|
||||
* @param string $computed Computed value
|
||||
* @param string $entity Entity of extrafields
|
||||
* @param string $langfile Language file
|
||||
@ -279,8 +279,8 @@ class ExtraFields
|
||||
* @param array|string $param Params for field (ex for select list : array('options' => array(value'=>'label of option')) )
|
||||
* @param int $alwayseditable Is attribute always editable regardless of the document status
|
||||
* @param string $perms Permission to check
|
||||
* @param int $list Into list view by default (-1, 0 or 1)
|
||||
* @param int $ishidden Is hidden extrafield (warning, do not rely on this. If your module need a hidden data, it must use its own table)
|
||||
* @param int $list Visibily
|
||||
* @param int $ishidden Deprecated. Use visibility instead.
|
||||
* @param string $default Default value (in database. use the default_value feature for default value on screen).
|
||||
* @param string $computed Computed value
|
||||
* @param string $entity Entity of extrafields
|
||||
@ -328,7 +328,6 @@ class ExtraFields
|
||||
$sql.= " perms,";
|
||||
$sql.= " langs,";
|
||||
$sql.= " list,";
|
||||
$sql.= " ishidden,";
|
||||
$sql.= " fielddefault,";
|
||||
$sql.= " fieldcomputed,";
|
||||
$sql.= " fk_user_author,";
|
||||
@ -349,7 +348,6 @@ class ExtraFields
|
||||
$sql.= " ".($perms?"'".$this->db->escape($perms)."'":"null").",";
|
||||
$sql.= " ".($langfile?"'".$this->db->escape($langfile)."'":"null").",";
|
||||
$sql.= " ".$list.",";
|
||||
$sql.= " ".$ishidden.",";
|
||||
$sql.= " ".($default?"'".$this->db->escape($default)."'":"null").",";
|
||||
$sql.= " ".($computed?"'".$this->db->escape($computed)."'":"null").",";
|
||||
$sql .= " " . $user->id . ",";
|
||||
@ -483,8 +481,8 @@ class ExtraFields
|
||||
* @param array $param Params for field (ex for select list : array('options' => array(value'=>'label of option')) )
|
||||
* @param int $alwayseditable Is attribute always editable regardless of the document status
|
||||
* @param string $perms Permission to check
|
||||
* @param int $list Into list view by default
|
||||
* @param int $ishidden Is hidden extrafield (warning, do not rely on this. If your module need a hidden data, it must use its own table)
|
||||
* @param int $list Visibility
|
||||
* @param int $ishidden Deprecated. Use visiblity instead.
|
||||
* @param string $default Default value (in database. use the default_value feature for default value on screen).
|
||||
* @param string $computed Computed value
|
||||
* @param string $entity Entity of extrafields
|
||||
@ -589,8 +587,8 @@ class ExtraFields
|
||||
* @param array $param Params for field (ex for select list : array('options' => array(value'=>'label of option')) )
|
||||
* @param int $alwayseditable Is attribute always editable regardless of the document status
|
||||
* @param string $perms Permission to check
|
||||
* @param int $list Into list view by default
|
||||
* @param int $ishidden Is hidden extrafield (warning, do not rely on this. If your module need a hidden data, it must use its own table)
|
||||
* @param int $list Visiblity
|
||||
* @param int $ishidden Deprecated. Use visility instead.
|
||||
* @param string $default Default value (in database. use the default_value feature for default value on screen).
|
||||
* @param string $computed Computed value
|
||||
* @param string $entity Entity of extrafields
|
||||
@ -639,7 +637,6 @@ class ExtraFields
|
||||
$sql.= " alwayseditable,";
|
||||
$sql.= " param,";
|
||||
$sql.= " list,";
|
||||
$sql.= " ishidden,";
|
||||
$sql.= " fielddefault,";
|
||||
$sql.= " fieldcomputed,";
|
||||
$sql.= " fk_user_author,";
|
||||
@ -660,7 +657,6 @@ class ExtraFields
|
||||
$sql.= " '".$alwayseditable."',";
|
||||
$sql.= " '".$param."',";
|
||||
$sql.= " ".$list.", ";
|
||||
$sql.= " ".$ishidden.", ";
|
||||
$sql.= " ".(($default!='')?"'".$this->db->escape($default)."'":"null").",";
|
||||
$sql.= " ".($computed?"'".$this->db->escape($computed)."'":"null").",";
|
||||
$sql .= " " . $user->id . ",";
|
||||
@ -714,7 +710,7 @@ class ExtraFields
|
||||
// We should not have several time this log. If we have, there is some optimization to do by calling a simple $object->fetch_optionals() that include cache management.
|
||||
dol_syslog("fetch_name_optionals_label elementtype=".$elementtype);
|
||||
|
||||
$sql = "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,langs,list,ishidden,fielddefault,fieldcomputed";
|
||||
$sql = "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,langs,list,fielddefault,fieldcomputed";
|
||||
$sql .= ",entity";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."extrafields";
|
||||
$sql.= " WHERE entity IN (0,".$conf->entity.")";
|
||||
@ -749,7 +745,6 @@ class ExtraFields
|
||||
$this->attribute_perms[$tab->name]=$tab->perms;
|
||||
$this->attribute_langfile[$tab->name]=$tab->langs;
|
||||
$this->attribute_list[$tab->name]=$tab->list;
|
||||
$this->attribute_hidden[$tab->name]=$tab->ishidden;
|
||||
$this->attribute_entityid[$tab->name]=$tab->entity;
|
||||
|
||||
// New usage
|
||||
@ -767,7 +762,6 @@ class ExtraFields
|
||||
$this->attributes[$tab->elementtype]['perms'][$tab->name]=$tab->perms;
|
||||
$this->attributes[$tab->elementtype]['langfile'][$tab->name]=$tab->langs;
|
||||
$this->attributes[$tab->elementtype]['list'][$tab->name]=$tab->list;
|
||||
$this->attributes[$tab->elementtype]['ishidden'][$tab->name]=$tab->ishidden;
|
||||
$this->attributes[$tab->elementtype]['entityid'][$tab->name]=$tab->entity;
|
||||
|
||||
if (!empty($conf->multicompany->enabled))
|
||||
@ -802,24 +796,33 @@ class ExtraFields
|
||||
|
||||
/**
|
||||
* Return HTML string to put an input field into a page
|
||||
* Code very similar with showInputField of common object
|
||||
*
|
||||
* @param string $key Key of attribute
|
||||
* @param string $value Preselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value)
|
||||
* @param string $moreparam To add more parametes on html input tag
|
||||
* @param string $keysuffix Prefix string to add into name and id of field (can be used to avoid duplicate names)
|
||||
* @param string $keyprefix Suffix string to add into name and id of field (can be used to avoid duplicate names)
|
||||
* @param string $keysuffix Prefix string to add after name and id of field (can be used to avoid duplicate names)
|
||||
* @param string $keyprefix Suffix string to add before name and id of field (can be used to avoid duplicate names)
|
||||
* @param mixed $showsize Value for css to define size. May also be a numeric.
|
||||
* @param int $objectid Current object id
|
||||
* @return string
|
||||
*/
|
||||
function showInputField($key, $value, $moreparam='', $keysuffix='', $keyprefix='', $showsize=0, $objectid=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
global $conf,$langs,$form;
|
||||
|
||||
if (! is_object($form))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
$form=new Form($this->db);
|
||||
}
|
||||
|
||||
$keyprefix = $keyprefix.'options_'; // Because we work on extrafields
|
||||
|
||||
$label=$this->attribute_label[$key];
|
||||
$type =$this->attribute_type[$key];
|
||||
$size =$this->attribute_size[$key];
|
||||
$elementtype=$this->attribute_elementtype[$key];
|
||||
$elementtype=$this->attribute_elementtype[$key]; // Seems not used
|
||||
$default=$this->attribute_default[$key];
|
||||
$computed=$this->attribute_computed[$key];
|
||||
$unique=$this->attribute_unique[$key];
|
||||
@ -831,7 +834,7 @@ class ExtraFields
|
||||
|
||||
if ($computed)
|
||||
{
|
||||
if ($keyprefix != 'search_') return '<span class="opacitymedium">'.$langs->trans("AutomaticallyCalculated").'</span>';
|
||||
if (! preg_match('/^search_/', $keyprefix)) return '<span class="opacitymedium">'.$langs->trans("AutomaticallyCalculated").'</span>';
|
||||
else return '';
|
||||
}
|
||||
|
||||
@ -847,7 +850,7 @@ class ExtraFields
|
||||
//$showsize=19;
|
||||
$showsize = 'minwidth200imp';
|
||||
}
|
||||
elseif (in_array($type,array('int','double','price')))
|
||||
elseif (in_array($type,array('int','integer','double','price')))
|
||||
{
|
||||
//$showsize=10;
|
||||
$showsize = 'maxwidth75';
|
||||
@ -888,31 +891,27 @@ class ExtraFields
|
||||
// Do not show current date when field not required (see select_date() method)
|
||||
if (!$required && $value == '') $value = '-1';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
global $form;
|
||||
if (! is_object($form)) $form=new Form($this->db);
|
||||
|
||||
// TODO Must also support $moreparam
|
||||
$out = $form->select_date($value, $keyprefix.'options_'.$key.$keysuffix, $showtime, $showtime, $required, '', 1, ($keyprefix != 'search_' ? 1 : 0), 1, 0, 1);
|
||||
$out = $form->select_date($value, $keyprefix.$key.$keysuffix, $showtime, $showtime, $required, '', 1, ($keyprefix != 'search_' ? 1 : 0), 1, 0, 1);
|
||||
}
|
||||
elseif (in_array($type,array('int')))
|
||||
elseif (in_array($type,array('int','integer')))
|
||||
{
|
||||
$tmp=explode(',',$size);
|
||||
$newsize=$tmp[0];
|
||||
$out='<input type="text" class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.'options_'.$key.$keysuffix.'" id="'.$keyprefix.'options_'.$key.$keysuffix.'" maxlength="'.$newsize.'" value="'.$value.'"'.($moreparam?$moreparam:'').'>';
|
||||
$out='<input type="text" class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" maxlength="'.$newsize.'" value="'.$value.'"'.($moreparam?$moreparam:'').'>';
|
||||
}
|
||||
elseif ($type == 'varchar')
|
||||
elseif (preg_match('/varchar/', $type))
|
||||
{
|
||||
$out='<input type="text" class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.'options_'.$key.$keysuffix.'" id="'.$keyprefix.'options_'.$key.$keysuffix.'" maxlength="'.$size.'" value="'.dol_escape_htmltag($value).'"'.($moreparam?$moreparam:'').'>';
|
||||
$out='<input type="text" class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" maxlength="'.$size.'" value="'.dol_escape_htmltag($value).'"'.($moreparam?$moreparam:'').'>';
|
||||
}
|
||||
elseif (in_array($type, array('mail', 'phone', 'url')))
|
||||
{
|
||||
$out='<input type="text" class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.'options_'.$key.$keysuffix.'" id="'.$keyprefix.'options_'.$key.$keysuffix.'" value="'.$value.'" '.($moreparam?$moreparam:'').'>';
|
||||
$out='<input type="text" class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.$value.'" '.($moreparam?$moreparam:'').'>';
|
||||
}
|
||||
elseif ($type == 'text')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor($keyprefix.'options_'.$key.$keysuffix,$value,'',200,'dolibarr_notes','In',false,false,! empty($conf->fckeditor->enabled) && $conf->global->FCKEDITOR_ENABLE_SOCIETE,ROWS_5,'90%');
|
||||
$doleditor=new DolEditor($keyprefix.$key.$keysuffix,$value,'',200,'dolibarr_notes','In',false,false,! empty($conf->fckeditor->enabled) && $conf->global->FCKEDITOR_ENABLE_SOCIETE,ROWS_5,'90%');
|
||||
$out=$doleditor->Create(1);
|
||||
}
|
||||
elseif ($type == 'boolean')
|
||||
@ -923,21 +922,21 @@ class ExtraFields
|
||||
} else {
|
||||
$checked=' value="1" ';
|
||||
}
|
||||
$out='<input type="checkbox" class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.'options_'.$key.$keysuffix.'" id="'.$keyprefix.'options_'.$key.$keysuffix.'" '.$checked.' '.($moreparam?$moreparam:'').'>';
|
||||
$out='<input type="checkbox" class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" '.$checked.' '.($moreparam?$moreparam:'').'>';
|
||||
}
|
||||
elseif ($type == 'price')
|
||||
{
|
||||
if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format.
|
||||
$value=price($value);
|
||||
}
|
||||
$out='<input type="text" class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.'options_'.$key.$keysuffix.'" id="'.$keyprefix.'options_'.$key.$keysuffix.'" value="'.$value.'" '.($moreparam?$moreparam:'').'> '.$langs->getCurrencySymbol($conf->currency);
|
||||
$out='<input type="text" class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.$value.'" '.($moreparam?$moreparam:'').'> '.$langs->getCurrencySymbol($conf->currency);
|
||||
}
|
||||
elseif ($type == 'double')
|
||||
{
|
||||
if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format.
|
||||
$value=price($value);
|
||||
}
|
||||
$out='<input type="text" class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.'options_'.$key.$keysuffix.'" id="'.$keyprefix.'options_'.$key.$keysuffix.'" value="'.$value.'" '.($moreparam?$moreparam:'').'> ';
|
||||
$out='<input type="text" class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.$value.'" '.($moreparam?$moreparam:'').'> ';
|
||||
}
|
||||
elseif ($type == 'select')
|
||||
{
|
||||
@ -945,10 +944,10 @@ class ExtraFields
|
||||
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_EXTRAFIELDS_USE_SELECT2))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||
$out.= ajax_combobox($keyprefix.'options_'.$key.$keysuffix, array(), 0);
|
||||
$out.= ajax_combobox($keyprefix.$key.$keysuffix, array(), 0);
|
||||
}
|
||||
|
||||
$out.='<select class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.'options_'.$key.$keysuffix.'" id="'.$keyprefix.'options_'.$key.$keysuffix.'" '.($moreparam?$moreparam:'').'>';
|
||||
$out.='<select class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" '.($moreparam?$moreparam:'').'>';
|
||||
$out.='<option value="0"> </option>';
|
||||
foreach ($param['options'] as $key => $val)
|
||||
{
|
||||
@ -967,14 +966,15 @@ class ExtraFields
|
||||
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_EXTRAFIELDS_USE_SELECT2))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||
$out.= ajax_combobox($keyprefix.'options_'.$key.$keysuffix, array(), 0);
|
||||
$out.= ajax_combobox($keyprefix.$key.$keysuffix, array(), 0);
|
||||
}
|
||||
|
||||
$out.='<select class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.'options_'.$key.$keysuffix.'" id="'.$keyprefix.'options_'.$key.$keysuffix.'" '.($moreparam?$moreparam:'').'>';
|
||||
$out.='<select class="flat '.$showsize.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" '.($moreparam?$moreparam:'').'>';
|
||||
if (is_array($param['options']))
|
||||
{
|
||||
$param_list=array_keys($param['options']);
|
||||
$InfoFieldList = explode(":", $param_list[0]);
|
||||
$parentName='';
|
||||
// 0 : tableName
|
||||
// 1 : label field name
|
||||
// 2 : key fields name (if differ of rowid)
|
||||
@ -1059,8 +1059,9 @@ class ExtraFields
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
// Several field into label (eq table:code|libelle:rowid)
|
||||
$notrans = false;
|
||||
$fields_label = explode('|',$InfoFieldList[1]);
|
||||
if(is_array($fields_label))
|
||||
if (is_array($fields_label))
|
||||
{
|
||||
$notrans = true;
|
||||
foreach ($fields_label as $field_toshow)
|
||||
@ -1074,7 +1075,7 @@ class ExtraFields
|
||||
}
|
||||
$labeltoshow=dol_trunc($labeltoshow,45);
|
||||
|
||||
if ($value==$obj->rowid)
|
||||
if ($value == $obj->rowid)
|
||||
{
|
||||
foreach ($fields_label as $field_toshow)
|
||||
{
|
||||
@ -1089,7 +1090,7 @@ class ExtraFields
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!$notrans)
|
||||
if (! $notrans)
|
||||
{
|
||||
$translabel=$langs->trans($obj->{$InfoFieldList[1]});
|
||||
if ($translabel!=$obj->{$InfoFieldList[1]}) {
|
||||
@ -1128,23 +1129,19 @@ class ExtraFields
|
||||
}
|
||||
elseif ($type == 'checkbox')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
$form = new Form($db);
|
||||
|
||||
$value_arr=explode(',',$value);
|
||||
$out=$form->multiselectarray($keyprefix.'options_'.$key.$keysuffix, (empty($param['options'])?null:$param['options']), $value_arr, '', 0, '', 0, '100%');
|
||||
|
||||
$out=$form->multiselectarray($keyprefix.$key.$keysuffix, (empty($param['options'])?null:$param['options']), $value_arr, '', 0, '', 0, '100%');
|
||||
}
|
||||
elseif ($type == 'radio')
|
||||
{
|
||||
$out='';
|
||||
foreach ($param['options'] as $keyopt => $val)
|
||||
{
|
||||
$out.='<input class="flat '.$showsize.'" type="radio" name="'.$keyprefix.'options_'.$key.$keysuffix.'" id="'.$keyprefix.'options_'.$key.$keysuffix.'" '.($moreparam?$moreparam:'');
|
||||
$out.='<input class="flat '.$showsize.'" type="radio" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" '.($moreparam?$moreparam:'');
|
||||
$out.=' value="'.$keyopt.'"';
|
||||
$out.=' id="'.$keyprefix.'options_'.$key.$keysuffix.'_'.$keyopt.'"';
|
||||
$out.=' id="'.$keyprefix.$key.$keysuffix.'_'.$keyopt.'"';
|
||||
$out.= ($value==$keyopt?'checked':'');
|
||||
$out.='/><label for="'.$keyprefix.'options_'.$key.$keysuffix.'_'.$keyopt.'">'.$val.'</label><br>';
|
||||
$out.='/><label for="'.$keyprefix.$key.$keysuffix.'_'.$keyopt.'">'.$val.'</label><br>';
|
||||
}
|
||||
}
|
||||
elseif ($type == 'chkbxlst')
|
||||
@ -1283,10 +1280,7 @@ class ExtraFields
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
$form = new Form($db);
|
||||
|
||||
$out=$form->multiselectarray($keyprefix.'options_'.$key.$keysuffix, $data, $value_arr, '', 0, '', 0, '100%');
|
||||
$out=$form->multiselectarray($keyprefix.$key.$keysuffix, $data, $value_arr, '', 0, '', 0, '100%');
|
||||
|
||||
} else {
|
||||
print 'Error in request ' . $sql . ' ' . $this->db->lasterror() . '. Check setup of extra parameters.<br>';
|
||||
@ -1296,41 +1290,17 @@ class ExtraFields
|
||||
}
|
||||
elseif ($type == 'link')
|
||||
{
|
||||
$out='';
|
||||
|
||||
$param_list=array_keys($param['options']);
|
||||
// 0 : ObjectName
|
||||
// 1 : classPath
|
||||
$InfoFieldList = explode(":", $param_list[0]);
|
||||
dol_include_once($InfoFieldList[1]);
|
||||
if ($InfoFieldList[0] && class_exists($InfoFieldList[0]))
|
||||
{
|
||||
$valuetoshow=$value;
|
||||
if (!empty($value))
|
||||
{
|
||||
$object = new $InfoFieldList[0]($this->db);
|
||||
$resfetch=$object->fetch($value);
|
||||
if ($resfetch > 0)
|
||||
{
|
||||
$valuetoshow=$object->ref;
|
||||
if ($object->element == 'societe') $valuetoshow=$object->name; // Special case for thirdparty because ->ref is not name but id (because name is not unique)
|
||||
}
|
||||
}
|
||||
$out.='<input type="text" class="flat '.$showsize.'" name="'.$keyprefix.'options_'.$key.$keysuffix.'" id="'.$keyprefix.'options_'.$key.$keysuffix.'" value="'.$valuetoshow.'" >';
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog('Error bad setup of extrafield', LOG_WARNING);
|
||||
$out.='Error bad setup of extrafield';
|
||||
}
|
||||
$param_list=array_keys($param['options']); // $param_list='ObjectName:classPath'
|
||||
$showempty=(($val['notnull'] == 1 && $val['default'] != '')?0:1);
|
||||
$out=$form->selectForForms($param_list[0], $keyprefix.$key.$keysuffix, $value, $showempty);
|
||||
}
|
||||
elseif ($type == 'password')
|
||||
{
|
||||
// If prefix is 'search_', field is used as a filter, we use a common text field.
|
||||
$out='<input type="'.($keyprefix=='search_'?'text':'password').'" class="flat '.$showsize.'" name="'.$keyprefix.'options_'.$key.$keysuffix.'" id="'.$keyprefix.'options_'.$key.$keysuffix.'" value="'.$value.'" '.($moreparam?$moreparam:'').'>';
|
||||
$out='<input type="'.($keyprefix=='search_'?'text':'password').'" class="flat '.$showsize.'" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.$value.'" '.($moreparam?$moreparam:'').'>';
|
||||
}
|
||||
if (!empty($hidden)) {
|
||||
$out='<input type="hidden" value="'.$value.'" name="'.$keyprefix.'options_'.$key.$keysuffix.'" id="'.$keyprefix.'options_'.$key.$keysuffix.'"/>';
|
||||
$out='<input type="hidden" value="'.$value.'" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'"/>';
|
||||
}
|
||||
/* Add comments
|
||||
if ($type == 'date') $out.=' (YYYY-MM-DD)';
|
||||
@ -1352,7 +1322,7 @@ class ExtraFields
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$elementtype=$this->attribute_elementtype[$key];
|
||||
$elementtype=$this->attribute_elementtype[$key]; // seems not used
|
||||
$label=$this->attribute_label[$key];
|
||||
$type=$this->attribute_type[$key];
|
||||
$size=$this->attribute_size[$key];
|
||||
@ -1360,11 +1330,13 @@ class ExtraFields
|
||||
$computed=$this->attribute_computed[$key];
|
||||
$unique=$this->attribute_unique[$key];
|
||||
$required=$this->attribute_required[$key];
|
||||
$params=$this->attribute_param[$key];
|
||||
$param=$this->attribute_param[$key];
|
||||
$perms=$this->attribute_perms[$key];
|
||||
$langfile=$this->attribute_langfile[$key];
|
||||
$list=$this->attribute_list[$key];
|
||||
$hidden=$this->attribute_hidden[$key]; // warning, do not rely on this. If your module need a hidden data, it must use its own table.
|
||||
$hidden=(abs($list)!=1 ? 1 : 0);
|
||||
|
||||
if ($hidden) return '';
|
||||
|
||||
// If field is a computed field, value must become result of compute
|
||||
if ($computed)
|
||||
@ -1421,11 +1393,11 @@ class ExtraFields
|
||||
}
|
||||
elseif ($type == 'select')
|
||||
{
|
||||
$value=$params['options'][$value];
|
||||
$value=$param['options'][$value];
|
||||
}
|
||||
elseif ($type == 'sellist')
|
||||
{
|
||||
$param_list=array_keys($params['options']);
|
||||
$param_list=array_keys($param['options']);
|
||||
$InfoFieldList = explode(":", $param_list[0]);
|
||||
|
||||
$selectkey="rowid";
|
||||
@ -1502,7 +1474,7 @@ class ExtraFields
|
||||
}
|
||||
elseif ($type == 'radio')
|
||||
{
|
||||
$value=$params['options'][$value];
|
||||
$value=$param['options'][$value];
|
||||
}
|
||||
elseif ($type == 'checkbox')
|
||||
{
|
||||
@ -1511,7 +1483,7 @@ class ExtraFields
|
||||
if (is_array($value_arr))
|
||||
{
|
||||
foreach ($value_arr as $keyval=>$valueval) {
|
||||
$toprint[]='<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #aaa">'.$params['options'][$valueval].'</li>';
|
||||
$toprint[]='<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #aaa">'.$param['options'][$valueval].'</li>';
|
||||
}
|
||||
}
|
||||
$value='<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
|
||||
@ -1520,7 +1492,7 @@ class ExtraFields
|
||||
{
|
||||
$value_arr = explode(',', $value);
|
||||
|
||||
$param_list = array_keys($params['options']);
|
||||
$param_list = array_keys($param['options']);
|
||||
$InfoFieldList = explode(":", $param_list[0]);
|
||||
|
||||
$selectkey = "rowid";
|
||||
@ -1592,22 +1564,26 @@ class ExtraFields
|
||||
// only if something to display (perf)
|
||||
if ($value)
|
||||
{
|
||||
$param_list=array_keys($params['options']);
|
||||
// 0 : ObjectName
|
||||
// 1 : classPath
|
||||
$param_list=array_keys($param['options']); // $param_list='ObjectName:classPath'
|
||||
|
||||
$InfoFieldList = explode(":", $param_list[0]);
|
||||
dol_include_once($InfoFieldList[1]);
|
||||
if ($InfoFieldList[0] && class_exists($InfoFieldList[0]))
|
||||
{
|
||||
$object = new $InfoFieldList[0]($this->db);
|
||||
$object->fetch($value);
|
||||
$value=$object->getNomUrl(3);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog('Error bad setup of extrafield', LOG_WARNING);
|
||||
$out.='Error bad setup of extrafield';
|
||||
}
|
||||
$classname=$InfoFieldList[0];
|
||||
$classpath=$InfoFieldList[1];
|
||||
if (! empty($classpath))
|
||||
{
|
||||
dol_include_once($InfoFieldList[1]);
|
||||
if ($classname && class_exists($classname))
|
||||
{
|
||||
$object = new $classname($this->db);
|
||||
$object->fetch($value);
|
||||
$value=$object->getNomUrl(3);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog('Error bad setup of extrafield', LOG_WARNING);
|
||||
return 'Error bad setup of extrafield';
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($type == 'text')
|
||||
@ -1627,10 +1603,6 @@ class ExtraFields
|
||||
//print $type.'-'.$size;
|
||||
$out=$value;
|
||||
|
||||
if (!empty($hidden)) {
|
||||
$out='';
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ class Fiscalyear extends CommonObject
|
||||
public $table_element='accounting_fiscalyear';
|
||||
public $table_element_line = '';
|
||||
public $fk_element = '';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
var $rowid;
|
||||
|
||||
|
||||
@ -504,7 +504,7 @@ class Form
|
||||
global $conf, $langs;
|
||||
|
||||
$alt = '';
|
||||
if ($tooltiptrigger) $alt=$langs->trans("ClickToShowHelp");
|
||||
if ($tooltiptrigger) $alt=$langs->transnoentitiesnoconv("ClickToShowHelp");
|
||||
|
||||
//For backwards compatibility
|
||||
if ($type == '0') $type = 'info';
|
||||
@ -727,7 +727,7 @@ class Form
|
||||
* @param string $page Defined the form action
|
||||
* @param string $htmlname Name of html select object
|
||||
* @param string $htmloption Options html on select object
|
||||
* @param int $forcecombo Force to use standard combo box (no ajax use)
|
||||
* @param int $forcecombo Force to load all values and output a standard combobox (with no beautification)
|
||||
* @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
||||
* @return string HTML string with select and input
|
||||
*/
|
||||
@ -959,7 +959,7 @@ class Form
|
||||
* @param int $filter Filter on thirdparty
|
||||
* @param int $limit Limit on number of returned lines
|
||||
* @param array $ajaxoptions Options for ajax_autocompleter
|
||||
* @param int $forcecombo Force to use combo box
|
||||
* @param int $forcecombo Force to load all values and output a standard combobox (with no beautification)
|
||||
* @return string Return select box for thirdparty.
|
||||
* @deprecated 3.8 Use select_company instead. For exemple $form->select_thirdparty(GETPOST('socid'),'socid','',0) => $form->select_company(GETPOST('socid'),'socid','',1,0,0,array(),0)
|
||||
*/
|
||||
@ -976,7 +976,7 @@ class Form
|
||||
* @param string $filter optional filters criteras (example: 's.rowid <> x', 's.client IN (1,3)')
|
||||
* @param string $showempty Add an empty field (Can be '1' or text key to use on empty line like 'SelectThirdParty')
|
||||
* @param int $showtype Show third party type in combolist (customer, prospect or supplier)
|
||||
* @param int $forcecombo Force to use combo box
|
||||
* @param int $forcecombo Force to load all values and output a standard combobox (with no beautification)
|
||||
* @param array $events Ajax event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
||||
* @param int $limit Maximum number of elements
|
||||
* @param string $morecss Add more css styles to the SELECT component
|
||||
@ -1007,11 +1007,7 @@ class Form
|
||||
// mode 1
|
||||
$urloption='htmlname='.$htmlname.'&outjson=1&filter='.$filter.($showtype?'&showtype='.$showtype:'');
|
||||
$out.= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions);
|
||||
$out.='<style type="text/css">
|
||||
.ui-autocomplete {
|
||||
z-index: 250;
|
||||
}
|
||||
</style>';
|
||||
$out.='<style type="text/css">.ui-autocomplete { z-index: 250; }</style>';
|
||||
if (empty($hidelabel)) print $langs->trans("RefOrLabel").' : ';
|
||||
else if ($hidelabel > 1) {
|
||||
if (! empty($conf->global->MAIN_HTML5_PLACEHOLDER)) $placeholder=' placeholder="'.$langs->trans("RefOrLabel").'"';
|
||||
@ -1020,7 +1016,7 @@ class Form
|
||||
$out.= img_picto($langs->trans("Search"), 'search');
|
||||
}
|
||||
}
|
||||
$out.= '<input type="text" class="'.$morecss.'" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.$placeholder.' '.(!empty($conf->global->THIRDPARTY_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />';
|
||||
$out.= '<input type="text" class="'.$morecss.'" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.$placeholder.' '.(!empty($conf->global->THIRDPARTY_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />';
|
||||
if ($hidelabel == 3) {
|
||||
$out.= img_picto($langs->trans("Search"), 'search');
|
||||
}
|
||||
@ -1043,7 +1039,7 @@ class Form
|
||||
* @param string $filter optional filters criteras (example: 's.rowid <> x', 's.client in (1,3)')
|
||||
* @param string $showempty Add an empty field (Can be '1' or text to use on empty line like 'SelectThirdParty')
|
||||
* @param int $showtype Show third party type in combolist (customer, prospect or supplier)
|
||||
* @param int $forcecombo Force to use combo box
|
||||
* @param int $forcecombo Force to use standard HTML select component without beautification
|
||||
* @param array $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
||||
* @param string $filterkey Filter on key value
|
||||
* @param int $outputmode 0=HTML select string, 1=Array
|
||||
@ -1152,17 +1148,23 @@ class Form
|
||||
if ($obj->fournisseur) $label.=($obj->client?', ':'').$langs->trans("Supplier");
|
||||
if ($obj->client || $obj->fournisseur) $label.=')';
|
||||
}
|
||||
if ($selected > 0 && $selected == $obj->rowid)
|
||||
|
||||
if (empty($outputmode))
|
||||
{
|
||||
$out.= '<option value="'.$obj->rowid.'" selected>'.$label.'</option>';
|
||||
if ($selected > 0 && $selected == $obj->rowid)
|
||||
{
|
||||
$out.= '<option value="'.$obj->rowid.'" selected>'.$label.'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$out.= '<option value="'.$obj->rowid.'">'.$label.'</option>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$out.= '<option value="'.$obj->rowid.'">'.$label.'</option>';
|
||||
array_push($outarray, array('key'=>$obj->rowid, 'value'=>$label, 'label'=>$label));
|
||||
}
|
||||
|
||||
array_push($outarray, array('key'=>$obj->rowid, 'value'=>$label, 'label'=>$label));
|
||||
|
||||
$i++;
|
||||
if (($i % 10) == 0) $out.="\n";
|
||||
}
|
||||
@ -4749,6 +4751,12 @@ class Form
|
||||
$smin = dol_print_date($set_time, "%M");
|
||||
$ssec = dol_print_date($set_time, "%S");
|
||||
}
|
||||
else
|
||||
{
|
||||
$shour = '';
|
||||
$smin = '';
|
||||
$ssec = '';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -5121,6 +5129,202 @@ class Form
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generic method to select a component from a combo list.
|
||||
* This is the generic method that will replace all specific existing methods.
|
||||
*
|
||||
* @param string $objectdesc Objectclassname:Objectclasspath
|
||||
* @param string $htmlname Name of HTML select component
|
||||
* @param int $preselectedvalue Preselected value (ID of element)
|
||||
* @param string $showempty ''=empty values not allowed, 'string'=value show if we allow empty values (for example 'All', ...)
|
||||
* @param string $searchkey Search criteria
|
||||
* @param string $placeholder Place holder
|
||||
* @param string $morecss More CSS
|
||||
* @param string $moreparams More params provided to ajax call
|
||||
* @param int $forcecombo Force to load all values and output a standard combobox (with no beautification)
|
||||
* @return string Return HTML string
|
||||
* @see selectForFormsList select_thirdparty
|
||||
*/
|
||||
function selectForForms($objectdesc, $htmlname, $preselectedvalue, $showempty='', $searchkey='', $placeholder='', $morecss='', $moreparams='', $forcecombo=0)
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
$objecttmp = null;
|
||||
|
||||
$InfoFieldList = explode(":", $objectdesc);
|
||||
$classname=$InfoFieldList[0];
|
||||
$classpath=$InfoFieldList[1];
|
||||
if (! empty($classpath))
|
||||
{
|
||||
dol_include_once($classpath);
|
||||
if ($classname && class_exists($classname))
|
||||
{
|
||||
$objecttmp = new $classname($this->db);
|
||||
}
|
||||
}
|
||||
if (! is_object($objecttmp))
|
||||
{
|
||||
dol_syslog('Error bad setup of type for field '.$InfoFieldList, LOG_WARNING);
|
||||
return 'Error bad setup of type for field '.join(',', $InfoFieldList);
|
||||
}
|
||||
|
||||
$prefixforautocompletemode=$objecttmp->element;
|
||||
if ($prefixforautocompletemode == 'societe') $prefixforautocompletemode='company';
|
||||
$confkeyforautocompletemode=strtoupper($prefixforautocompletemode).'_USE_SEARCH_TO_SELECT'; // For example COMPANY_USE_SEARCH_TO_SELECT
|
||||
|
||||
dol_syslog(get_class($this)."::selectForForms", LOG_DEBUG);
|
||||
|
||||
$out='';
|
||||
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->$confkeyforautocompletemode) && ! $forcecombo)
|
||||
{
|
||||
$objectdesc=$classname.':'.$classpath;
|
||||
$urlforajaxcall = DOL_URL_ROOT.'/core/ajax/selectobject.php';
|
||||
//if ($objecttmp->element == 'societe') $urlforajaxcall = DOL_URL_ROOT.'/societe/ajax/company.php';
|
||||
|
||||
// No immediate load of all database
|
||||
$urloption='htmlname='.$htmlname.'&outjson=1&objectdesc='.$objectdesc.($moreparams?$moreparams:'');
|
||||
// Activate the auto complete using ajax call.
|
||||
$out.= ajax_autocompleter($preselectedvalue, $htmlname, $urlforajaxcall, $urloption, $conf->global->$confkeyforautocompletemode, 0, array());
|
||||
$out.= '<style type="text/css">.ui-autocomplete { z-index: 250; }</style>';
|
||||
if ($placeholder) $placeholder=' placeholder="'.$placeholder.'"';
|
||||
$out.= '<input type="text" class="'.$morecss.'" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$preselectedvalue.'"'.$placeholder.' />';
|
||||
}
|
||||
else
|
||||
{
|
||||
// Immediate load of all database
|
||||
$out.=$this->selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty, $searchkey, $placeholder, $morecss, $moreparams, $forcecombo);
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Output html form to select an object.
|
||||
* Note, this function is called by selectForForms or by ajax selectobject.php
|
||||
*
|
||||
* @param Object $objecttmp Object
|
||||
* @param string $htmlname Name of HTML select component
|
||||
* @param int $preselectedvalue Preselected value (ID of element)
|
||||
* @param string $showempty ''=empty values not allowed, 'string'=value show if we allow empty values (for example 'All', ...)
|
||||
* @param string $searchkey Search value
|
||||
* @param string $placeholder Place holder
|
||||
* @param string $morecss More CSS
|
||||
* @param string $moreparams More params provided to ajax call
|
||||
* @param int $forcecombo Force to load all values and output a standard combobox (with no beautification)
|
||||
* @param int $outputmode 0=HTML select string, 1=Array
|
||||
* @return string Return HTML string
|
||||
* @see selectForForms
|
||||
*/
|
||||
function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty='', $searchkey='', $placeholder='', $morecss='', $moreparams='', $forcecombo=0, $outputmode=0)
|
||||
{
|
||||
global $conf, $langs, $user;
|
||||
|
||||
$prefixforautocompletemode=$objecttmp->element;
|
||||
if ($prefixforautocompletemode == 'societe') $prefixforautocompletemode='company';
|
||||
$confkeyforautocompletemode=strtoupper($prefixforautocompletemode).'_USE_SEARCH_TO_SELECT'; // For example COMPANY_USE_SEARCH_TO_SELECT
|
||||
|
||||
$fieldstoshow='t.ref';
|
||||
if (! empty($objecttmp->fields))
|
||||
{
|
||||
$tmpfieldstoshow='';
|
||||
foreach($objecttmp->fields as $key => $val)
|
||||
{
|
||||
if ($val['showoncombobox']) $tmpfieldstoshow.=($tmpfieldstoshow?',':'').'t.'.$key;
|
||||
}
|
||||
if ($tmpfieldstoshow) $fieldstoshow = $tmpfieldstoshow;
|
||||
}
|
||||
|
||||
$out='';
|
||||
$outarray=array();
|
||||
|
||||
$num=0;
|
||||
|
||||
// Search data
|
||||
$sql = "SELECT t.rowid, ".$fieldstoshow." FROM ".MAIN_DB_PREFIX .$objecttmp->table_element." as t";
|
||||
if ($objecttmp->ismultientitymanaged == 2)
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE t.entity IN (".getEntity($objecttmp->table_element).")";
|
||||
if ($objecttmp->ismultientitymanaged == 1 && ! empty($user->societe_id)) $sql.= " AND t.fk_soc = ".$user->societe_id;
|
||||
if ($searchkey != '') $sql.=natural_search(explode(',',$fieldstoshow), $searchkey);
|
||||
if ($objecttmp->ismultientitymanaged == 2)
|
||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND t.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
$sql.=$this->db->order($fieldstoshow,"ASC");
|
||||
//$sql.=$this->db->plimit($limit, 0);
|
||||
|
||||
// Build output string
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if ($conf->use_javascript_ajax && ! $forcecombo)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||
$comboenhancement =ajax_combobox($htmlname, null, $conf->global->$confkeyforautocompletemode);
|
||||
$out.= $comboenhancement;
|
||||
}
|
||||
|
||||
// Construct $out and $outarray
|
||||
$out.= '<select id="'.$htmlname.'" class="flat'.($morecss?' '.$morecss:'').'"'.($moreparams?' '.$moreparams:'').' name="'.$htmlname.'">'."\n";
|
||||
|
||||
// Warning: Do not use textifempty = ' ' or ' ' here, or search on key will search on ' key'. Seems it is no more true with selec2 v4
|
||||
$textifempty=' ';
|
||||
|
||||
//if (! empty($conf->use_javascript_ajax) || $forcecombo) $textifempty='';
|
||||
if (! empty($conf->global->$confkeyforautocompletemode))
|
||||
{
|
||||
if ($showempty && ! is_numeric($showempty)) $textifempty=$langs->trans($showempty);
|
||||
else $textifempty.=$langs->trans("All");
|
||||
}
|
||||
if ($showempty) $out.= '<option value="-1">'.$textifempty.'</option>'."\n";
|
||||
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
if ($num)
|
||||
{
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
$label='';
|
||||
$tmparray=explode(',', $fieldstoshow);
|
||||
foreach($tmparray as $key => $val)
|
||||
{
|
||||
$val = preg_replace('/t\./','',$val);
|
||||
$label .= (($label && $obj->$val)?' - ':'').$obj->$val;
|
||||
}
|
||||
if (empty($outputmode))
|
||||
{
|
||||
if ($preselectedvalue > 0 && $preselectedvalue == $obj->rowid)
|
||||
{
|
||||
$out.= '<option value="'.$obj->rowid.'" selected>'.$label.'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$out.= '<option value="'.$obj->rowid.'">'.$label.'</option>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
array_push($outarray, array('key'=>$obj->rowid, 'value'=>$label, 'label'=>$label));
|
||||
}
|
||||
|
||||
$i++;
|
||||
if (($i % 10) == 0) $out.="\n";
|
||||
}
|
||||
}
|
||||
|
||||
$out.= '</select>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
$this->result=array('nbofelement'=>$num);
|
||||
|
||||
if ($outputmode) return $outarray;
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a HTML select string, built from an array of key+value.
|
||||
* Note: Do not apply langs->trans function on returned content, content may be entity encoded twice.
|
||||
@ -5172,7 +5376,9 @@ class Form
|
||||
}
|
||||
}
|
||||
|
||||
$out.='<select id="'.preg_replace('/^\./','',$htmlname).'" '.($disabled?'disabled ':'').'class="flat '.(preg_replace('/^\./','',$htmlname)).($morecss?' '.$morecss:'').'" name="'.preg_replace('/^\./','',$htmlname).'" '.($moreparam?$moreparam:'').'>';
|
||||
$out.='<select id="'.preg_replace('/^\./','',$htmlname).'" '.($disabled?'disabled ':'').'class="flat '.(preg_replace('/^\./','',$htmlname)).($morecss?' '.$morecss:'').'"';
|
||||
$out.=' name="'.preg_replace('/^\./','',$htmlname).'" '.($moreparam?$moreparam:'');
|
||||
$out.='>';
|
||||
|
||||
if ($show_empty)
|
||||
{
|
||||
@ -5209,10 +5415,6 @@ class Form
|
||||
$style=' class="warning"';
|
||||
}
|
||||
}
|
||||
$out.='<option value="'.$key.'"';
|
||||
$out.=$style.$disabled;
|
||||
if ($id != '' && $id == $key && ! $disabled) $out.=' selected'; // To preselect a value
|
||||
$out.='>';
|
||||
|
||||
if ($key_in_label)
|
||||
{
|
||||
@ -5225,6 +5427,12 @@ class Form
|
||||
else $selectOptionValue = $maxlen?dol_trunc($value,$maxlen):$value;
|
||||
if ($value == '' || $value == '-') $selectOptionValue=' ';
|
||||
}
|
||||
|
||||
$out.='<option value="'.$key.'"';
|
||||
$out.=$style.$disabled;
|
||||
if ($id != '' && $id == $key && ! $disabled) $out.=' selected'; // To preselect a value
|
||||
if ($nohtmlescape) $out.=' html="'.dol_escape_htmltag($selectOptionValue).'"';
|
||||
$out.='>';
|
||||
//var_dump($selectOptionValue);
|
||||
$out.=$selectOptionValue;
|
||||
$out.="</option>\n";
|
||||
@ -5300,7 +5508,7 @@ class Form
|
||||
cache: true
|
||||
},
|
||||
language: select2arrayoflanguage,
|
||||
/* dropdownCssClass: "css-'.$htmlname.'", */
|
||||
containerCssClass: \':all:\', /* Line to add class or origin SELECT propagated to the new <span class="select2-selection...> tag */
|
||||
placeholder: "'.dol_escape_js($placeholder).'",
|
||||
escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
|
||||
minimumInputLength: '.$minimumInputLength.',
|
||||
@ -5437,7 +5645,7 @@ class Form
|
||||
*
|
||||
* @param string $htmlname Name of select
|
||||
* @param array $array Array with array of fields we could show. This array may be modified according to setup of user.
|
||||
* @param string $varpage Id of context for page. Can be set with $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||
* @param string $varpage Id of context for page. Can be set by caller with $varpage=(empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage);
|
||||
* @return string HTML multiselect string
|
||||
* @see selectarray
|
||||
*/
|
||||
|
||||
@ -51,7 +51,7 @@ class FormAdmin
|
||||
* @param string $htmlname Name of HTML select
|
||||
* @param int $showauto Show 'auto' choice
|
||||
* @param array $filter Array of keys to exclude in list
|
||||
* @param string $showempty 1=Add empty value or string to show
|
||||
* @param string $showempty '1'=Add empty value or string to show
|
||||
* @param int $showwarning Show a warning if language is not complete
|
||||
* @param int $disabled Disable edit of select
|
||||
* @param string $morecss Add more css styles
|
||||
|
||||
@ -1001,8 +1001,8 @@ class FormOther
|
||||
{
|
||||
if (! empty($boxidactivatedforuser[$box->id])) continue; // Already visible for user
|
||||
$label=$langs->transnoentitiesnoconv($box->boxlabel);
|
||||
if (preg_match('/graph/',$box->class)) $label.=' ('.$langs->trans("Graph").')';
|
||||
//$label = '<span class="fa fa-home fa-fw" aria-hidden="true"></span>'.$label; KO with select2. No html rendering.
|
||||
//if (preg_match('/graph/',$box->class)) $label.=' ('.$langs->trans("Graph").')';
|
||||
if (preg_match('/graph/',$box->class)) $label=$label.' <span class="fa fa-bar-chart"></span>';
|
||||
$arrayboxtoactivatelabel[$box->id]=$label; // We keep only boxes not shown for user, to show into combo list
|
||||
}
|
||||
foreach($boxidactivatedforuser as $boxid)
|
||||
@ -1014,6 +1014,7 @@ class FormOther
|
||||
//var_dump($boxidactivatedforuser);
|
||||
|
||||
// Class Form must have been already loaded
|
||||
$selectboxlist.='<!-- Form with select box list -->'."\n";
|
||||
$selectboxlist.='<form id="addbox" name="addbox" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
$selectboxlist.='<input type="hidden" name="addbox" value="addbox">';
|
||||
$selectboxlist.='<input type="hidden" name="userid" value="'.$user->id.'">';
|
||||
@ -1086,6 +1087,7 @@ class FormOther
|
||||
var self = this; // because JQuery can modify this
|
||||
var boxid=self.id.substring(8);
|
||||
var label=jQuery(\'#boxlabelentry\'+boxid).val();
|
||||
console.log("We close box "+boxid);
|
||||
jQuery(\'#boxto_\'+boxid).remove();
|
||||
if (boxid > 0) jQuery(\'#boxcombo\').append(new Option(label, boxid));
|
||||
updateBoxOrder(1); /* 1 to avoid message after a remove */
|
||||
|
||||
@ -624,7 +624,7 @@ class Translate
|
||||
$str=str_replace(array('<','>','"',),array('__lt__','__gt__','__quot__'),$str);
|
||||
|
||||
// Crypt string into HTML
|
||||
$str=htmlentities($str,ENT_QUOTES,$this->charset_output);
|
||||
$str=htmlentities($str, ENT_COMPAT, $this->charset_output); // Do not convert simple quotes in translation (strings in html are enmbraced by "). Use dol_escape_htmltag around text in HTML content
|
||||
|
||||
// Restore HTML tags
|
||||
$str=str_replace(array('__lt__','__gt__','__quot__'),array('<','>','"',),$str);
|
||||
|
||||
@ -274,7 +274,15 @@ class DoliDBPgsql extends DoliDB
|
||||
$line.= "ALTER TABLE ".$reg[1]." ADD PRIMARY KEY (".$reg[3];
|
||||
}
|
||||
|
||||
// Translate order to drop foreign keys
|
||||
// Translate order to drop primary keys
|
||||
// ALTER TABLE llx_dolibarr_modules DROP PRIMARY KEY pk_xxx
|
||||
if (preg_match('/ALTER\s+TABLE\s*(.*)\s*DROP\s+PRIMARY\s+KEY\s*([^;]+)$/i',$line,$reg))
|
||||
{
|
||||
$line = "-- ".$line." replaced by --\n";
|
||||
$line.= "ALTER TABLE ".$reg[1]." DROP CONSTRAINT ".$reg[2];
|
||||
}
|
||||
|
||||
// Translate order to drop foreign keys
|
||||
// ALTER TABLE llx_dolibarr_modules DROP FOREIGN KEY fk_xxx
|
||||
if (preg_match('/ALTER\s+TABLE\s*(.*)\s*DROP\s+FOREIGN\s+KEY\s*(.*)$/i',$line,$reg))
|
||||
{
|
||||
|
||||
@ -427,6 +427,28 @@ function urlencode(s) {
|
||||
return news;
|
||||
}
|
||||
|
||||
/*
|
||||
* =================================================================
|
||||
* Purpose: Clean string to have it url encoded
|
||||
* Input: s
|
||||
* Author: Laurent Destailleur
|
||||
* Licence: GPL
|
||||
* ==================================================================
|
||||
*/
|
||||
function htmlEntityDecodeJs(inp){
|
||||
var replacements = {'<':'<','>':'>','/':'/','"':'"',''':'\'','&':'&',' ':' '};
|
||||
if (inp)
|
||||
{
|
||||
for(var r in replacements){
|
||||
inp = inp.replace(new RegExp(r,'g'),replacements[r]);
|
||||
}
|
||||
return inp.replace(/&#(\d+);/g, function(match, dec) {
|
||||
return String.fromCharCode(dec);
|
||||
});
|
||||
}
|
||||
else { return ''; }
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* =================================================================
|
||||
|
||||
@ -27,9 +27,9 @@
|
||||
/**
|
||||
* Generic function that return javascript to add to a page to transform a common input field into an autocomplete field by calling an Ajax page (ex: /societe/ajaxcompanies.php).
|
||||
* The HTML field must be an input text with id=search_$htmlname.
|
||||
* This use the jQuery "autocomplete" function.
|
||||
* This use the jQuery "autocomplete" function. If we want to use the select2, we must also convert the input into select on funcntions that call this method.
|
||||
*
|
||||
* @param string $selected Preselecte value
|
||||
* @param string $selected Preselected value
|
||||
* @param string $htmlname HTML name of input field
|
||||
* @param string $url Url for request: /path/page.php. Must return a json array ('key'=>id, 'value'=>String shown into input field once selected, 'label'=>String shown into combo list)
|
||||
* @param string $urloption More parameters on URL request
|
||||
@ -411,17 +411,23 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $
|
||||
width: \''.$widthTypeOfAutocomplete.'\', /* off or resolve */
|
||||
minimumInputLength: '.$minLengthToAutocomplete.',
|
||||
language: select2arrayoflanguage,
|
||||
containerCssClass: \':all:\', /* Line to add class or origin SELECT propagated to the new <span class="select2-selection...> tag */
|
||||
templateResult: function (data, container) { /* Format visible output into combo list */
|
||||
/* Code to add class of origin option propagated to the new select2 li tag */
|
||||
/* Code to add class of origin OPTION propagated to the new select2 <li> tag */
|
||||
if (data.element) {
|
||||
$(container).addClass($(data.element).attr("class"));
|
||||
}
|
||||
|
||||
//console.log(data.html);
|
||||
if ($(data.element).attr("html") != undefined) return htmlEntityDecodeJs($(data.element).attr("html")); // If property html set, we decode html entities and use this
|
||||
return data.text;
|
||||
},
|
||||
templateSelection: function (selection) { /* Format visible output of selected value */
|
||||
return selection.text;
|
||||
},
|
||||
escapeMarkup: function(markup) {
|
||||
return markup;
|
||||
}
|
||||
})';
|
||||
if ($forcefocus) $msg.= '.select2(\'focus\')';
|
||||
$msg.= ';'."\n";
|
||||
|
||||
@ -321,56 +321,27 @@ function GETPOST($paramname, $check='alpha', $method=0, $filter=NULL, $options=N
|
||||
}
|
||||
}
|
||||
// Else, retreive default values if we are not doing a sort
|
||||
elseif (! isset($_GET['sortfield']) && ! empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) // If we did a click on a field to sort, we do no apply default values. Same if option MAIN_ENABLE_DEFAULT_VALUES is not set
|
||||
elseif (! isset($_GET['sortfield'])) // If we did a click on a field to sort, we do no apply default values. Same if option MAIN_ENABLE_DEFAULT_VALUES is not set
|
||||
{
|
||||
if (! empty($_GET['action']) && $_GET['action'] == 'create' && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname]))
|
||||
{
|
||||
if (! empty($user->default_values)) // $user->default_values defined from menu 'Setup - Default values'
|
||||
// Search default value from $object->field
|
||||
global $object;
|
||||
if (is_object($object) && isset($object->fields[$paramname]['default']))
|
||||
{
|
||||
if (isset($user->default_values[$relativepathstring]['createform']))
|
||||
{
|
||||
foreach($user->default_values[$relativepathstring]['createform'] as $defkey => $defval)
|
||||
{
|
||||
$qualified = 0;
|
||||
if ($defkey != '_noquery_')
|
||||
{
|
||||
$tmpqueryarraytohave=explode('&', $defkey);
|
||||
$tmpqueryarraywehave=explode('&', dol_string_nohtmltag($_SERVER['QUERY_STRING']));
|
||||
$foundintru=0;
|
||||
foreach($tmpqueryarraytohave as $tmpquerytohave)
|
||||
{
|
||||
if (! in_array($tmpquerytohave, $tmpqueryarraywehave)) $foundintru=1;
|
||||
}
|
||||
if (! $foundintru) $qualified=1;
|
||||
//var_dump($defkey.'-'.$qualified);
|
||||
}
|
||||
else $qualified = 1;
|
||||
|
||||
if ($qualified)
|
||||
{
|
||||
//var_dump($user->default_values[$relativepathstring][$defkey]['createform']);
|
||||
if (isset($user->default_values[$relativepathstring]['createform'][$defkey][$paramname]))
|
||||
{
|
||||
$out = $user->default_values[$relativepathstring]['createform'][$defkey][$paramname];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$out = $object->fields[$paramname]['default'];
|
||||
}
|
||||
}
|
||||
// Management of default search_filters and sort order
|
||||
//elseif (preg_match('/list.php$/', $_SERVER["PHP_SELF"]) && ! empty($paramname) && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname]))
|
||||
elseif (! empty($paramname) && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname]))
|
||||
if (! empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES))
|
||||
{
|
||||
if (! empty($user->default_values)) // $user->default_values defined from menu 'Setup - Default values'
|
||||
if (! empty($_GET['action']) && $_GET['action'] == 'create' && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname]))
|
||||
{
|
||||
//var_dump($user->default_values[$relativepathstring]);
|
||||
if ($paramname == 'sortfield' || $paramname == 'sortorder') // Sorted on which fields ? ASC or DESC ?
|
||||
// Now search in setup to overwrite default values
|
||||
if (! empty($user->default_values)) // $user->default_values defined from menu 'Setup - Default values'
|
||||
{
|
||||
if (isset($user->default_values[$relativepathstring]['sortorder'])) // Even if paramname is sortfield, data are stored into ['sortorder...']
|
||||
if (isset($user->default_values[$relativepathstring]['createform']))
|
||||
{
|
||||
foreach($user->default_values[$relativepathstring]['sortorder'] as $defkey => $defval)
|
||||
foreach($user->default_values[$relativepathstring]['createform'] as $defkey => $defval)
|
||||
{
|
||||
$qualified = 0;
|
||||
if ($defkey != '_noquery_')
|
||||
@ -389,67 +360,108 @@ function GETPOST($paramname, $check='alpha', $method=0, $filter=NULL, $options=N
|
||||
|
||||
if ($qualified)
|
||||
{
|
||||
$forbidden_chars_to_replace=array(" ","'","/","\\",":","*","?","\"","<",">","|","[","]",";","="); // we accept _, -, . and ,
|
||||
foreach($user->default_values[$relativepathstring]['sortorder'][$defkey] as $key => $val)
|
||||
//var_dump($user->default_values[$relativepathstring][$defkey]['createform']);
|
||||
if (isset($user->default_values[$relativepathstring]['createform'][$defkey][$paramname]))
|
||||
{
|
||||
if ($out) $out.=', ';
|
||||
if ($paramname == 'sortfield')
|
||||
{
|
||||
$out.=dol_string_nospecial($key, '', $forbidden_chars_to_replace);
|
||||
}
|
||||
if ($paramname == 'sortorder')
|
||||
{
|
||||
$out.=dol_string_nospecial($val, '', $forbidden_chars_to_replace);
|
||||
}
|
||||
$out = $user->default_values[$relativepathstring]['createform'][$defkey][$paramname];
|
||||
break;
|
||||
}
|
||||
//break; // No break for sortfield and sortorder so we can cumulate fields (is it realy usefull ?)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (isset($user->default_values[$relativepathstring]['filters']))
|
||||
}
|
||||
// Management of default search_filters and sort order
|
||||
//elseif (preg_match('/list.php$/', $_SERVER["PHP_SELF"]) && ! empty($paramname) && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname]))
|
||||
elseif (! empty($paramname) && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname]))
|
||||
{
|
||||
if (! empty($user->default_values)) // $user->default_values defined from menu 'Setup - Default values'
|
||||
{
|
||||
foreach($user->default_values[$relativepathstring]['filters'] as $defkey => $defval)
|
||||
//var_dump($user->default_values[$relativepathstring]);
|
||||
if ($paramname == 'sortfield' || $paramname == 'sortorder') // Sorted on which fields ? ASC or DESC ?
|
||||
{
|
||||
$qualified = 0;
|
||||
if ($defkey != '_noquery_')
|
||||
if (isset($user->default_values[$relativepathstring]['sortorder'])) // Even if paramname is sortfield, data are stored into ['sortorder...']
|
||||
{
|
||||
$tmpqueryarraytohave=explode('&', $defkey);
|
||||
$tmpqueryarraywehave=explode('&', dol_string_nohtmltag($_SERVER['QUERY_STRING']));
|
||||
$foundintru=0;
|
||||
foreach($tmpqueryarraytohave as $tmpquerytohave)
|
||||
foreach($user->default_values[$relativepathstring]['sortorder'] as $defkey => $defval)
|
||||
{
|
||||
if (! in_array($tmpquerytohave, $tmpqueryarraywehave)) $foundintru=1;
|
||||
}
|
||||
if (! $foundintru) $qualified=1;
|
||||
//var_dump($defkey.'-'.$qualified);
|
||||
}
|
||||
else $qualified = 1;
|
||||
$qualified = 0;
|
||||
if ($defkey != '_noquery_')
|
||||
{
|
||||
$tmpqueryarraytohave=explode('&', $defkey);
|
||||
$tmpqueryarraywehave=explode('&', dol_string_nohtmltag($_SERVER['QUERY_STRING']));
|
||||
$foundintru=0;
|
||||
foreach($tmpqueryarraytohave as $tmpquerytohave)
|
||||
{
|
||||
if (! in_array($tmpquerytohave, $tmpqueryarraywehave)) $foundintru=1;
|
||||
}
|
||||
if (! $foundintru) $qualified=1;
|
||||
//var_dump($defkey.'-'.$qualified);
|
||||
}
|
||||
else $qualified = 1;
|
||||
|
||||
if ($qualified)
|
||||
if ($qualified)
|
||||
{
|
||||
$forbidden_chars_to_replace=array(" ","'","/","\\",":","*","?","\"","<",">","|","[","]",";","="); // we accept _, -, . and ,
|
||||
foreach($user->default_values[$relativepathstring]['sortorder'][$defkey] as $key => $val)
|
||||
{
|
||||
if ($out) $out.=', ';
|
||||
if ($paramname == 'sortfield')
|
||||
{
|
||||
$out.=dol_string_nospecial($key, '', $forbidden_chars_to_replace);
|
||||
}
|
||||
if ($paramname == 'sortorder')
|
||||
{
|
||||
$out.=dol_string_nospecial($val, '', $forbidden_chars_to_replace);
|
||||
}
|
||||
}
|
||||
//break; // No break for sortfield and sortorder so we can cumulate fields (is it realy usefull ?)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (isset($user->default_values[$relativepathstring]['filters']))
|
||||
{
|
||||
foreach($user->default_values[$relativepathstring]['filters'] as $defkey => $defval)
|
||||
{
|
||||
if (isset($_POST['sall']) || isset($_POST['search_all']) || isset($_GET['sall']) || isset($_GET['search_all']))
|
||||
$qualified = 0;
|
||||
if ($defkey != '_noquery_')
|
||||
{
|
||||
// We made a search from quick search menu, do we still use default filter ?
|
||||
if (empty($conf->global->MAIN_DISABLE_DEFAULT_FILTER_FOR_QUICK_SEARCH))
|
||||
$tmpqueryarraytohave=explode('&', $defkey);
|
||||
$tmpqueryarraywehave=explode('&', dol_string_nohtmltag($_SERVER['QUERY_STRING']));
|
||||
$foundintru=0;
|
||||
foreach($tmpqueryarraytohave as $tmpquerytohave)
|
||||
{
|
||||
if (! in_array($tmpquerytohave, $tmpqueryarraywehave)) $foundintru=1;
|
||||
}
|
||||
if (! $foundintru) $qualified=1;
|
||||
//var_dump($defkey.'-'.$qualified);
|
||||
}
|
||||
else $qualified = 1;
|
||||
|
||||
if ($qualified)
|
||||
{
|
||||
if (isset($_POST['sall']) || isset($_POST['search_all']) || isset($_GET['sall']) || isset($_GET['search_all']))
|
||||
{
|
||||
// We made a search from quick search menu, do we still use default filter ?
|
||||
if (empty($conf->global->MAIN_DISABLE_DEFAULT_FILTER_FOR_QUICK_SEARCH))
|
||||
{
|
||||
$forbidden_chars_to_replace=array(" ","'","/","\\",":","*","?","\"","<",">","|","[","]",";","="); // we accept _, -, . and ,
|
||||
$out = dol_string_nospecial($user->default_values[$relativepathstring]['filters'][$defkey][$paramname], '', $forbidden_chars_to_replace);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$forbidden_chars_to_replace=array(" ","'","/","\\",":","*","?","\"","<",">","|","[","]",";","="); // we accept _, -, . and ,
|
||||
$out = dol_string_nospecial($user->default_values[$relativepathstring]['filters'][$defkey][$paramname], '', $forbidden_chars_to_replace);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
$forbidden_chars_to_replace=array(" ","'","/","\\",":","*","?","\"","<",">","|","[","]",";","="); // we accept _, -, . and ,
|
||||
$out = dol_string_nospecial($user->default_values[$relativepathstring]['filters'][$defkey][$paramname], '', $forbidden_chars_to_replace);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Substitution variables for GETPOST (used to get final url with variable parameters or final default value with variable paramaters)
|
||||
|
||||
@ -251,7 +251,11 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir='',
|
||||
foreach($object->fields as $key => $val)
|
||||
{
|
||||
$i++;
|
||||
$texttoinsert.= "\t".$key." ".$val['type'];
|
||||
|
||||
$type = $val['type'];
|
||||
$type = preg_replace('/:.*$/', '', $type); // For case type = 'integer:Societe:societe/class/societe.class.php'
|
||||
|
||||
$texttoinsert.= "\t".$key." ".$type;
|
||||
if ($key == 'rowid') $texttoinsert.= ' AUTO_INCREMENT PRIMARY KEY';
|
||||
if ($key == 'entity') $texttoinsert.= ' DEFAULT 1';
|
||||
else
|
||||
|
||||
@ -155,7 +155,7 @@ function dolIncludeHtmlContent($contentfile)
|
||||
|
||||
$MAXLEVEL=20;
|
||||
|
||||
$fullpathfile=DOL_DATA_ROOT.'/websites/'.$contentfile;
|
||||
$fullpathfile=DOL_DATA_ROOT.'/website/'.$contentfile;
|
||||
|
||||
if (empty($includehtmlcontentopened)) $includehtmlcontentopened=0;
|
||||
$includehtmlcontentopened++;
|
||||
@ -188,29 +188,29 @@ function dolIncludeHtmlContent($contentfile)
|
||||
* Generate a zip with all data of web site.
|
||||
*
|
||||
* @param Website $website Object website
|
||||
* @return void
|
||||
* @return string Path to file with zip
|
||||
*/
|
||||
function exportWebSite($website)
|
||||
{
|
||||
global $db, $conf;
|
||||
|
||||
dol_mkdir($conf->websites->dir_temp);
|
||||
$srcdir = $conf->websites->dir_output.'/'.$website->ref;
|
||||
$destdir = $conf->websites->dir_temp.'/'.$website->ref;
|
||||
dol_mkdir($conf->website->dir_temp);
|
||||
$srcdir = $conf->website->dir_output.'/'.$website->ref;
|
||||
$destdir = $conf->website->dir_temp.'/'.$website->ref;
|
||||
|
||||
$arrayreplacement=array();
|
||||
|
||||
dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacement);
|
||||
|
||||
$srcdir = DOL_DATA_ROOT.'/medias/images/'.$website->ref;
|
||||
$destdir = $conf->websites->dir_temp.'/'.$website->ref.'/medias/images/'.$website->ref;
|
||||
$destdir = $conf->website->dir_temp.'/'.$website->ref.'/medias/images/'.$website->ref;
|
||||
|
||||
dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacement);
|
||||
|
||||
// Build sql file
|
||||
dol_mkdir($conf->websites->dir_temp.'/'.$website->ref.'/export');
|
||||
dol_mkdir($conf->website->dir_temp.'/'.$website->ref.'/export');
|
||||
|
||||
$filesql = $conf->websites->dir_temp.'/'.$website->ref.'/export/pages.sql';
|
||||
$filesql = $conf->website->dir_temp.'/'.$website->ref.'/export/pages.sql';
|
||||
$fp = fopen($filesql,"w");
|
||||
|
||||
$objectpages = new WebsitePage($db);
|
||||
@ -267,9 +267,9 @@ function exportWebSite($website)
|
||||
@chmod($filesql, octdec($conf->global->MAIN_UMASK));
|
||||
|
||||
// Build zip file
|
||||
$filedir = $conf->websites->dir_temp.'/'.$website->ref;
|
||||
$fileglob = $conf->websites->dir_temp.'/'.$website->ref.'/export/'.$website->ref.'_export_*.zip';
|
||||
$filename = $conf->websites->dir_temp.'/'.$website->ref.'/export/'.$website->ref.'_export_'.dol_print_date(dol_now(),'dayhourlog').'.zip';
|
||||
$filedir = $conf->website->dir_temp.'/'.$website->ref;
|
||||
$fileglob = $conf->website->dir_temp.'/'.$website->ref.'/export/website_'.$website->ref.'-*.zip';
|
||||
$filename = $conf->website->dir_temp.'/'.$website->ref.'/export/website_'.$website->ref.'-'.dol_print_date(dol_now(),'dayhourlog').'.zip';
|
||||
|
||||
dol_delete_file($fileglob, 0);
|
||||
dol_compress_file($filedir, $filename, 'zip');
|
||||
@ -278,6 +278,24 @@ function exportWebSite($website)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Open a zip with all data of web site and load it into database.
|
||||
*
|
||||
* @param string $filename Path of zip file
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function importWebSite($filename)
|
||||
{
|
||||
$result = 0;
|
||||
|
||||
|
||||
//$sql = array("INSERT INTO ".MAIN_DB_PREFIX."website(ref, entity, description, status) values('sellyoursaas', '.$conf->entity.', Portal to sell your SaaS', 1)");
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Download all images found into page content $tmp.
|
||||
* If $modifylinks is set, links to images will be replace with a link to viewimage wrapper.
|
||||
|
||||
@ -67,15 +67,15 @@ $langs->load("modulebuilder");
|
||||
{
|
||||
console.log("We enter a computed formula");
|
||||
jQuery("#default_value").val('');
|
||||
/* jQuery("#unique, #required, #alwayseditable, #ishidden, #list").removeAttr('checked'); */
|
||||
jQuery("#default_value, #unique, #required, #alwayseditable, #ishidden, #list").attr('disabled', true);
|
||||
jQuery("tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_ishidden, tr.extra_list").hide();
|
||||
/* jQuery("#unique, #required, #alwayseditable, #list").removeAttr('checked'); */
|
||||
jQuery("#default_value, #unique, #required, #alwayseditable, #list").attr('disabled', true);
|
||||
jQuery("tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_list").hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log("No computed formula");
|
||||
jQuery("#default_value, #unique, #required, #alwayseditable, #ishidden, #list").attr('disabled', false);
|
||||
jQuery("tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_ishidden, tr.extra_list").show();
|
||||
jQuery("#default_value, #unique, #required, #alwayseditable, #list").attr('disabled', false);
|
||||
jQuery("tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_list").show();
|
||||
}
|
||||
|
||||
if (type == 'date') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
@ -151,10 +151,10 @@ $langs->load("modulebuilder");
|
||||
<tr><td>
|
||||
<textarea name="param" id="param" cols="80" rows="<?php echo ROWS_4 ?>"><?php echo GETPOST('param','alpha'); ?></textarea>
|
||||
</td><td>
|
||||
<span id="helpselect"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0)?></span>
|
||||
<span id="helpsellist"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0)?></span>
|
||||
<span id="helpchkbxlst"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0)?></span>
|
||||
<span id="helplink"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0)?></span>
|
||||
<span id="helpselect"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0,'', 0, 2, 'helpvalue1')?></span>
|
||||
<span id="helpsellist"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0,'', 0, 2, 'helpvalue2')?></span>
|
||||
<span id="helpchkbxlst"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0,'', 0, 2, 'helpvalue3')?></span>
|
||||
<span id="helplink"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0,'', 0, 2, 'helpvalue4')?></span>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
@ -173,15 +173,11 @@ $langs->load("modulebuilder");
|
||||
<tr class="extra_required"><td><?php echo $langs->trans("Required"); ?></td><td class="valeur"><input id="required" type="checkbox" name="required"<?php echo (GETPOST('required','alpha')?' checked':''); ?>></td></tr>
|
||||
<!-- Always editable -->
|
||||
<tr class="extra_alwayseditable"><td><?php echo $langs->trans("AlwaysEditable"); ?></td><td class="valeur"><input id="alwayseditable" type="checkbox" name="alwayseditable"<?php echo ((GETPOST('alwayseditable','alpha') || ! GETPOST('button','alpha'))?' checked':''); ?>></td></tr>
|
||||
<!-- Is visible or not -->
|
||||
<?php if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) { ?>
|
||||
<tr class="extra_ishidden"><td><?php echo $langs->trans("Hidden"); ?></td><td class="valeur"><input id="ishidden" type="checkbox" name="ishidden"<?php echo (GETPOST('ishidden','alpha') ?' checked' : ''); ?>></td></tr>
|
||||
<?php } ?>
|
||||
<?php if ($conf->multicompany->enabled) { ?>
|
||||
<tr><td><?php echo $langs->trans("AllEntities"); ?></td><td class="valeur"><input id="entitycurrentorall" type="checkbox" name="entitycurrentorall"<?php echo (GETPOST('entitycurrentorall','alpha') ? '':' checked'); ?>></td></tr>
|
||||
<?php } ?>
|
||||
<!-- By default visible into list -->
|
||||
<tr><td class="extra_list"><?php echo $form->textwithpicto($langs->trans("ByDefaultInList"), $langs->trans("VisibleDesc")); ?>
|
||||
<!-- Visibility -->
|
||||
<tr><td class="extra_list"><?php echo $form->textwithpicto($langs->trans("Visibility"), $langs->trans("VisibleDesc")); ?>
|
||||
</td><td class="valeur"><input id="list" size="1" type="text" name="list" value="<?php echo GETPOST('list','int')!='' ? GETPOST('list','int') : '1'; ?>"></td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@ -65,15 +65,15 @@ $langs->load("modulebuilder");
|
||||
{
|
||||
console.log("We enter a computed formula");
|
||||
jQuery("#default_value").val('');
|
||||
/* jQuery("#unique, #required, #alwayseditable, #ishidden, #list").removeAttr('checked'); */
|
||||
jQuery("#default_value, #unique, #required, #alwayseditable, #ishidden, #list").attr('disabled', true);
|
||||
jQuery("tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_ishidden, tr.extra_list").hide();
|
||||
/* jQuery("#unique, #required, #alwayseditable, #list").removeAttr('checked'); */
|
||||
jQuery("#default_value, #unique, #required, #alwayseditable, #list").attr('disabled', true);
|
||||
jQuery("tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_list").hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log("No computed formula");
|
||||
jQuery("#default_value, #unique, #required, #alwayseditable, #ishidden, #list").attr('disabled', false);
|
||||
jQuery("tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_ishidden, tr.extra_list").show();
|
||||
jQuery("#default_value, #unique, #required, #alwayseditable, #list").attr('disabled', false);
|
||||
jQuery("tr.extra_default_value, tr.extra_unique, tr.extra_required, tr.extra_alwayseditable, tr.extra_list").show();
|
||||
}
|
||||
|
||||
if (type == 'date') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
|
||||
@ -143,7 +143,6 @@ $param=$extrafields->attributes[$elementtype]['param'][$attrname];
|
||||
$perms=$extrafields->attributes[$elementtype]['perms'][$attrname];
|
||||
$langfile=$extrafields->attributes[$elementtype]['langfile'][$attrname];
|
||||
$list=$extrafields->attributes[$elementtype]['list'][$attrname];
|
||||
$ishidden=$extrafields->attributes[$elementtype]['hidden'][$attrname];
|
||||
$entitycurrentorall=$extrafields->attributes[$elementtype]['entityid'][$attrname];
|
||||
|
||||
if((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_array($param))
|
||||
@ -210,10 +209,10 @@ else
|
||||
<tr><td>
|
||||
<textarea name="param" id="param" cols="80" rows="<?php echo ROWS_4 ?>"><?php echo dol_htmlcleanlastbr($param_chain); ?></textarea>
|
||||
</td><td>
|
||||
<span id="helpselect"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0)?></span>
|
||||
<span id="helpsellist"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0)?></span>
|
||||
<span id="helpchkbxlst"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0)?></span>
|
||||
<span id="helplink"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0)?></span>
|
||||
<span id="helpselect"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0,'', 0, 2, 'helpvalue1')?></span>
|
||||
<span id="helpsellist"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0,'', 0, 2, 'helpvalue2')?></span>
|
||||
<span id="helpchkbxlst"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0,'', 0, 2, 'helpvalue3')?></span>
|
||||
<span id="helplink"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0,'', 0, 2, 'helpvalue4')?></span>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
@ -232,15 +231,11 @@ else
|
||||
<tr class="extra_required"><td><?php echo $langs->trans("Required"); ?></td><td class="valeur"><input id="required" type="checkbox" name="required"<?php echo ($required?' checked':''); ?>></td></tr>
|
||||
<!-- Always editable -->
|
||||
<tr class="extra_alwayseditable"><td><?php echo $langs->trans("AlwaysEditable"); ?></td><td class="valeur"><input id="alwayseditable" type="checkbox" name="alwayseditable"<?php echo ($alwayseditable?' checked':''); ?>></td></tr>
|
||||
<!-- Is visible or not -->
|
||||
<?php if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) { ?>
|
||||
<tr><td><?php echo $langs->trans("Hidden"); ?></td><td class="valeur"><input id="ishidden" type="checkbox" name="ishidden"<?php echo ($ishidden ?' checked':''); ?>></td></tr>
|
||||
<?php } ?>
|
||||
<?php if ($conf->multicompany->enabled) { ?>
|
||||
<tr><td><?php echo $langs->trans("AllEntities"); ?></td><td class="valeur"><input id="entitycurrentorall" type="checkbox" name="entitycurrentorall"<?php echo (empty($entitycurrentorall) ?' checked':''); ?>></td></tr>
|
||||
<?php } ?>
|
||||
<!-- By default visible into list -->
|
||||
<tr><td class="extra_list"><?php echo $form->textwithpicto($langs->trans("ByDefaultInList"), $langs->trans("VisibleDesc")); ?>
|
||||
<!-- Visibility -->
|
||||
<tr><td class="extra_list"><?php echo $form->textwithpicto($langs->trans("Visibility"), $langs->trans("VisibleDesc")); ?>
|
||||
</td><td class="valeur"><input id="list" size="1" type="text" name="list" value="<?php echo ($list!=''?$list:'1'); ?>"></td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
@ -81,7 +81,6 @@ if (count($extrafields->attributes[$elementtype]['type']))
|
||||
print '<td align="center">'.yn($extrafields->attributes[$elementtype]['required'][$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attributes[$elementtype]['alwayseditable'][$key])."</td>\n";
|
||||
print '<td align="center">'.$extrafields->attributes[$elementtype]['list'][$key]."</td>\n";
|
||||
if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) print '<td align="center">'.yn($extrafields->attributes[$elementtype]['ishidden'][$key])."</td>\n"; // Add hidden option on not working feature. Why hide if user can't see it.
|
||||
if (! empty($conf->multicompany->enabled)) {
|
||||
print '<td align="center">'.($extrafields->attributes[$elementtype]['entityid'][$key]==0?$langs->trans("All"):$extrafields->attributes[$elementtype]['entitylabel'][$key]).'</td>';
|
||||
}
|
||||
|
||||
@ -34,8 +34,10 @@ if ($action == 'presend')
|
||||
|
||||
$object->fetch_projet();
|
||||
|
||||
if (! in_array($object->element, array('societe', 'user')))
|
||||
if (! in_array($object->element, array('societe', 'user', 'member')))
|
||||
{
|
||||
// TODO get also the main_lastdoc field of $object. If not found, try to guess with following code
|
||||
|
||||
$ref = dol_sanitizeFileName($object->ref);
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||
$fileparams = dol_most_recent_file($diroutput . '/' . $ref, preg_quote($ref, '/').'[^\-]+');
|
||||
@ -75,19 +77,17 @@ if ($action == 'presend')
|
||||
}
|
||||
|
||||
// Build document if it not exists
|
||||
if (! in_array($object->element, array('societe', 'user')))
|
||||
if (! in_array($object->element, array('societe', 'user', 'member')))
|
||||
{
|
||||
if (! $file || ! is_readable($file)) {
|
||||
if ($object->element != 'member')
|
||||
{
|
||||
$result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result <= 0) {
|
||||
dol_print_error($db, $object->error, $object->errors);
|
||||
exit();
|
||||
}
|
||||
$fileparams = dol_most_recent_file($diroutput . '/' . $ref, preg_quote($ref, '/').'[^\-]+');
|
||||
$file = $fileparams['fullname'];
|
||||
if ((! $file || ! is_readable($file)) && method_exists($object, 'generateDocument'))
|
||||
{
|
||||
$result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($result <= 0) {
|
||||
dol_print_error($db, $object->error, $object->errors);
|
||||
exit();
|
||||
}
|
||||
$fileparams = dol_most_recent_file($diroutput . '/' . $ref, preg_quote($ref, '/').'[^\-]+');
|
||||
$file = $fileparams['fullname'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
51
htdocs/core/tpl/commonfields_add.tpl.php
Normal file
51
htdocs/core/tpl/commonfields_add.tpl.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Need to have following variables defined:
|
||||
* $object (invoice, order, ...)
|
||||
* $action
|
||||
* $conf
|
||||
* $langs
|
||||
*/
|
||||
?>
|
||||
<!-- BEGIN PHP TEMPLATE commonfields_add.tpl.php -->
|
||||
<?php
|
||||
|
||||
foreach($object->fields as $key => $val)
|
||||
{
|
||||
if (abs($val['visible']) != 1) continue; // Discard such field from form
|
||||
if (array_key_exists('enabled', $val) && isset($val['enabled']) && ! $val['enabled']) continue; // We don't want this field
|
||||
|
||||
print '<tr id="field_'.$key.'">';
|
||||
print '<td';
|
||||
print ' class="titlefieldcreate';
|
||||
if ($val['notnull'] > 0) print ' fieldrequired';
|
||||
if ($val['type'] == 'text') print ' tdtop';
|
||||
print '"';
|
||||
print '>';
|
||||
print $langs->trans($val['label']);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if (in_array($val['type'], array('int', 'integer'))) $value = GETPOST($key, 'int');
|
||||
elseif ($val['type'] == 'text') $value = GETPOST($key, 'none');
|
||||
else $value = GETPOST($key, 'alpha');
|
||||
print $object->showInputField($val, $key, $value, '', '', '', 0);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<!-- END PHP TEMPLATE commonfields_add.tpl.php -->
|
||||
48
htdocs/core/tpl/commonfields_edit.tpl.php
Normal file
48
htdocs/core/tpl/commonfields_edit.tpl.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Need to have following variables defined:
|
||||
* $object (invoice, order, ...)
|
||||
* $action
|
||||
* $conf
|
||||
* $langs
|
||||
*/
|
||||
?>
|
||||
<!-- BEGIN PHP TEMPLATE commonfields_edit.tpl.php -->
|
||||
<?php
|
||||
|
||||
foreach($object->fields as $key => $val)
|
||||
{
|
||||
if (abs($val['visible']) != 1) continue; // Discard such field from form
|
||||
if (array_key_exists('enabled', $val) && isset($val['enabled']) && ! $val['enabled']) continue; // We don't want this field
|
||||
|
||||
print '<tr><td';
|
||||
print ' class="titlefieldcreate';
|
||||
if ($val['notnull'] > 0) print ' fieldrequired';
|
||||
if ($val['type'] == 'text') print ' tdtop';
|
||||
print '"';
|
||||
print '>'.$langs->trans($val['label']).'</td>';
|
||||
print '<td>';
|
||||
if (in_array($val['type'], array('int', 'integer'))) $value = GETPOSTISSET($key)?GETPOST($key, 'int'):$object->$key;
|
||||
elseif ($val['type'] == 'text') $value = GETPOSTISSET($key)?GETPOST($key,'none'):$object->$key;
|
||||
else $value = GETPOSTISSET($key)?GETPOST($key, 'alpha'):$object->$key;
|
||||
print $object->showInputField($val, $key, $value, '', '', '', 0);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<!-- END PHP TEMPLATE commonfields_edit.tpl.php -->
|
||||
84
htdocs/core/tpl/commonfields_view.tpl.php
Normal file
84
htdocs/core/tpl/commonfields_view.tpl.php
Normal file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Need to have following variables defined:
|
||||
* $object (invoice, order, ...)
|
||||
* $action
|
||||
* $conf
|
||||
* $langs
|
||||
*/
|
||||
?>
|
||||
<!-- BEGIN PHP TEMPLATE commonfields_view.tpl.php -->
|
||||
<?php
|
||||
|
||||
foreach($object->fields as $key => $val)
|
||||
{
|
||||
if (abs($val['visible']) != 1) continue; // Discard such field from form
|
||||
if (array_key_exists('enabled', $val) && isset($val['enabled']) && ! $val['enabled']) continue; // We don't want this field
|
||||
if ($key == 'status') continue; // Status is alreadt in dol_banner
|
||||
|
||||
$value=$object->$key;
|
||||
|
||||
print '<tr><td';
|
||||
print ' class="titlefield';
|
||||
if ($val['notnull'] > 0) print ' fieldrequired';
|
||||
print '"';
|
||||
print '>'.$langs->trans($val['label']).'</td>';
|
||||
print '<td>';
|
||||
print $object->showOutputField($val, $key, $value, '', '', '', 0);
|
||||
//print dol_escape_htmltag($object->$key, 1, 1);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
//if ($key == 'targetsrcfile3') break; // key used for break on second column
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
print '<div class="fichehalfright">';
|
||||
print '<div class="ficheaddleft">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
$alreadyoutput = 1;
|
||||
foreach($object->fields as $key => $val)
|
||||
{
|
||||
if ($alreadyoutput)
|
||||
{
|
||||
//if ($key == 'targetsrcfile3') $alreadyoutput = 0; // key used for break on second column
|
||||
continue;
|
||||
}
|
||||
|
||||
if (abs($val['visible']) != 1) continue; // Discard such field from form
|
||||
if (array_key_exists('enabled', $val) && isset($val['enabled']) && ! $val['enabled']) continue; // We don't want this field
|
||||
if ($key == 'status') continue; // Status is alreadt in dol_banner
|
||||
|
||||
$value=$object->$key;
|
||||
|
||||
print '<tr><td';
|
||||
print ' class="titlefield';
|
||||
if ($val['notnull'] > 0) print ' fieldrequired';
|
||||
print '"';
|
||||
print '>'.$langs->trans($val['label']).'</td>';
|
||||
print '<td>';
|
||||
print $object->showOutputField($val, $key, $value, '', '', '', 0);
|
||||
//print dol_escape_htmltag($object->$key, 1, 1);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<!-- END PHP TEMPLATE commonfields_view.tpl.php -->
|
||||
@ -59,8 +59,7 @@ if (empty($reshook) && ! empty($extrafields->attributes[$object->table_element][
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! empty($extrafields->attributes[$object->table_element]['ishidden'][$key])) print '<tr class="hideobject"><td>';
|
||||
else print '<tr><td>';
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding">';
|
||||
print '<tr>';
|
||||
print '<td';
|
||||
@ -112,7 +111,7 @@ if (empty($reshook) && ! empty($extrafields->attributes[$object->table_element][
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="'.$fieldid.'" value="' . $object->id . '">';
|
||||
|
||||
print $extrafields->showInputField($key, $value,'','','',0,$object->id);
|
||||
print $extrafields->showInputField($key, $value, '', '', '', 0, $object->id);
|
||||
|
||||
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ class Don extends CommonObject
|
||||
public $element='don'; // Id that identify managed objects
|
||||
public $table_element='don'; // Name of table without prefix where object is stored
|
||||
public $fk_element = 'fk_donation';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
var $picto = 'generic';
|
||||
|
||||
var $date;
|
||||
|
||||
@ -173,9 +173,11 @@ if (empty($reshook))
|
||||
$reshook = $hookmanager->executeHooks('insertExtraFields', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if (empty($reshook)) {
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
} else if ($reshook < 0)
|
||||
$error++;
|
||||
}
|
||||
@ -212,8 +214,8 @@ if (empty($reshook))
|
||||
$objectsrc->fetch($object->origin_id);
|
||||
|
||||
$object->socid = $objectsrc->socid;
|
||||
$object->ref_customer = ''; // We don't use $objectsrc->ref_client, this is ref or order not shipment
|
||||
$object->model_pdf = GETPOST('model','alpha');
|
||||
$object->ref_customer = GETPOST('ref_customer','alpha');
|
||||
$object->model_pdf = GETPOST('model');
|
||||
$object->date_delivery = $date_delivery; // Date delivery planed
|
||||
$object->fk_delivery_address = $objectsrc->fk_delivery_address;
|
||||
$object->shipping_method_id = GETPOST('shipping_method_id','int');
|
||||
@ -691,7 +693,7 @@ if ($action == 'create')
|
||||
else if ($origin == 'propal') print $langs->trans('RefCustomerOrder');
|
||||
else print $langs->trans('RefCustomer');
|
||||
print '</td><td colspan="3">';
|
||||
print $object->ref_client;
|
||||
print '<input type="text" name="ref_customer" value="'.$object->ref_client.'" />';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ class Expedition extends CommonObject
|
||||
public $fk_element="fk_expedition";
|
||||
public $table_element="expedition";
|
||||
public $table_element_line="expeditiondet";
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $picto = 'sending';
|
||||
|
||||
var $socid;
|
||||
|
||||
@ -191,9 +191,11 @@ if (empty($reshook))
|
||||
// some hooks
|
||||
if (empty($reshook)) {
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
} else if ($reshook < 0)
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -64,12 +64,12 @@ else
|
||||
else
|
||||
{
|
||||
$range = ExpenseReportIk::getRangeByUser($userauthor, $fk_c_exp_tax_cat);
|
||||
|
||||
|
||||
if (empty($range)) echo json_encode(array('error' => $langs->transnoentitiesnoconv('ErrorRecordNotFound'), 'range' => $range));
|
||||
else
|
||||
{
|
||||
$offset = price($range->offset, 0, $langs, 1, -1, -1, $conf->currency);
|
||||
echo json_encode(array('up' => $range->coef, 'offset' => $range->offset, 'title' => $langs->transnoentitiesnoconv('ExpenseRangeOffset', $offset), 'comment' => 'offset should be apply on addline or updateline'));
|
||||
$ikoffset = price($range->ikoffset, 0, $langs, 1, -1, -1, $conf->currency);
|
||||
echo json_encode(array('up' => $range->coef, 'ikoffset' => $range->ikoffset, 'title' => $langs->transnoentitiesnoconv('ExpenseRangeOffset', $offset), 'comment' => 'offset should be apply on addline or updateline'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,9 +296,11 @@ if (empty($reshook))
|
||||
// some hooks
|
||||
if (empty($reshook)) {
|
||||
$result = $object->insertExtraFields();
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
} else if ($reshook < 0)
|
||||
$error++;
|
||||
}
|
||||
|
||||
@ -1833,13 +1833,13 @@ class ExpenseReport extends CommonObject
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!empty($conf->global->MAIN_EXPENSE_APPLY_ENTIRE_OFFSET)) $offset = $range->offset;
|
||||
else $offset = $range->offset / 12; // The amount of offset is a global value for the year
|
||||
if (!empty($conf->global->MAIN_EXPENSE_APPLY_ENTIRE_OFFSET)) $ikoffset = $range->ikoffset;
|
||||
else $ikoffset = $range->ikoffset / 12; // The amount of offset is a global value for the year
|
||||
|
||||
// Test if offset has been applied for the current month
|
||||
// Test if ikoffset has been applied for the current month
|
||||
if (!$this->offsetAlreadyGiven())
|
||||
{
|
||||
$new_up = $range->coef + ($offset / $this->line->qty);
|
||||
$new_up = $range->coef + ($ikoffset / $this->line->qty);
|
||||
$tmp = calcul_price_total($this->line->qty, $new_up, 0, $this->line->vatrate, 0, 0, 0, 'TTC', 0, $type, $seller);
|
||||
|
||||
$this->line->value_unit = $tmp[5];
|
||||
@ -1854,7 +1854,7 @@ class ExpenseReport extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* If the sql find any rows then the offset is already given (offset is applied at the first expense report line)
|
||||
* If the sql find any rows then the ikoffset is already given (ikoffset is applied at the first expense report line)
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
* \ingroup expenseik
|
||||
* \brief File of class to manage expense ik
|
||||
*/
|
||||
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/coreobject.class.php';
|
||||
|
||||
/**
|
||||
@ -32,30 +32,30 @@ class ExpenseReportIk extends CoreObject
|
||||
public $element='expenseik';
|
||||
public $table_element='expensereport_ik';
|
||||
public $fk_element='fk_expense_ik';
|
||||
|
||||
|
||||
/**
|
||||
* c_exp_tax_cat Id
|
||||
* @var int
|
||||
*/
|
||||
public $fk_c_exp_tax_cat;
|
||||
|
||||
|
||||
/**
|
||||
* c_exp_tax_range id
|
||||
* @var int
|
||||
*/
|
||||
public $fk_range;
|
||||
|
||||
|
||||
/**
|
||||
* Coef
|
||||
* @var double
|
||||
*/
|
||||
public $coef;
|
||||
|
||||
|
||||
/**
|
||||
* Offset
|
||||
* @var double
|
||||
*/
|
||||
public $offset;
|
||||
public $ikoffset;
|
||||
|
||||
/**
|
||||
* Attribute object linked with database
|
||||
@ -66,7 +66,7 @@ class ExpenseReportIk extends CoreObject
|
||||
,'fk_c_exp_tax_cat'=>array('type'=>'integer','index'=>true)
|
||||
,'fk_range'=>array('type'=>'integer','index'=>true)
|
||||
,'coef'=>array('type'=>'double')
|
||||
,'offset'=>array('type'=>'double')
|
||||
,'ikoffset'=>array('type'=>'double')
|
||||
);
|
||||
|
||||
/**
|
||||
@ -74,35 +74,35 @@ class ExpenseReportIk extends CoreObject
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct(DoliDB &$db)
|
||||
public function __construct(DoliDB &$db)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
parent::__construct($db);
|
||||
parent::init();
|
||||
|
||||
|
||||
$this->errors = array();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Return expense categories in array
|
||||
*
|
||||
*
|
||||
* @param int $mode 1=only active; 2=only inactive; other value return all
|
||||
* @return array of category
|
||||
*/
|
||||
public static function getTaxCategories($mode=1)
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
||||
$categories = array();
|
||||
|
||||
|
||||
$sql = 'SELECT rowid, label, entity, active';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'c_exp_tax_cat';
|
||||
$sql.= ' WHERE entity IN (0,'. getEntity('').')';
|
||||
if ($mode == 1) $sql.= ' AND active = 1';
|
||||
elseif ($mode == 2) $sql.= 'AND active = 0';
|
||||
|
||||
|
||||
dol_syslog(get_called_class().'::getTaxCategories sql='.$sql, LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
@ -116,23 +116,23 @@ class ExpenseReportIk extends CoreObject
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
return $categories;
|
||||
}
|
||||
|
||||
|
||||
public static function getRangeByUser(User $userauthor, $fk_c_exp_tax_cat)
|
||||
{
|
||||
$default_range = (int) $userauthor->default_range; // if not defined, then 0
|
||||
$ranges = self::getRangesByCategory($fk_c_exp_tax_cat);
|
||||
|
||||
|
||||
// substract 1 because array start from 0
|
||||
if (empty($ranges) || !isset($ranges[$default_range-1])) return false;
|
||||
else return $ranges[$default_range-1];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return an array of ranges for a category
|
||||
*
|
||||
*
|
||||
* @param int $fk_c_exp_tax_cat category id
|
||||
* @param int $active active
|
||||
* @return array
|
||||
@ -140,15 +140,15 @@ class ExpenseReportIk extends CoreObject
|
||||
public static function getRangesByCategory($fk_c_exp_tax_cat, $active=1)
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
||||
$ranges = array();
|
||||
|
||||
|
||||
$sql = 'SELECT r.rowid FROM '.MAIN_DB_PREFIX.'c_exp_tax_range r';
|
||||
if ($active) $sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'c_exp_tax_cat c ON (r.fk_c_exp_tax_cat = c.rowid)';
|
||||
$sql.= ' WHERE r.fk_c_exp_tax_cat = '.$fk_c_exp_tax_cat;
|
||||
if ($active) $sql.= ' AND r.active = 1 AND c.active = 1';
|
||||
$sql.= ' ORDER BY r.range_ik';
|
||||
|
||||
|
||||
dol_syslog(get_called_class().'::getRangesByCategory sql='.$sql, LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
@ -160,7 +160,7 @@ class ExpenseReportIk extends CoreObject
|
||||
{
|
||||
$object = new ExpenseReportIk($db);
|
||||
$object->fetch($obj->rowid);
|
||||
|
||||
|
||||
$ranges[] = $object;
|
||||
}
|
||||
}
|
||||
@ -169,28 +169,28 @@ class ExpenseReportIk extends CoreObject
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
return $ranges;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return an array of ranges grouped by category
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getAllRanges()
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
||||
$ranges = array();
|
||||
|
||||
|
||||
$sql = ' SELECT r.rowid, r.fk_c_exp_tax_cat, r.range_ik, c.label, i.rowid as fk_expense_ik, r.active as range_active, c.active as cat_active';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'c_exp_tax_range r';
|
||||
$sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'c_exp_tax_cat c ON (r.fk_c_exp_tax_cat = c.rowid)';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'expensereport_ik i ON (r.rowid = i.fk_range)';
|
||||
$sql.= ' WHERE r.entity IN (0, '. getEntity('').')';
|
||||
$sql.= ' ORDER BY r.fk_c_exp_tax_cat, r.range_ik';
|
||||
|
||||
|
||||
dol_syslog(get_called_class().'::getAllRanges sql='.$sql, LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
@ -200,7 +200,7 @@ class ExpenseReportIk extends CoreObject
|
||||
$ik = new ExpenseReportIk($db);
|
||||
if ($obj->fk_expense_ik > 0) $ik->fetch($obj->fk_expense_ik);
|
||||
$obj->ik = $ik;
|
||||
|
||||
|
||||
if (!isset($ranges[$obj->fk_c_exp_tax_cat])) $ranges[$obj->fk_c_exp_tax_cat] = array('label' => $obj->label, 'active' => $obj->cat_active, 'ranges' => array());
|
||||
$ranges[$obj->fk_c_exp_tax_cat]['ranges'][] = $obj;
|
||||
}
|
||||
@ -209,20 +209,20 @@ class ExpenseReportIk extends CoreObject
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
return $ranges;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the max number of range by a category
|
||||
*
|
||||
*
|
||||
* @param int $default_c_exp_tax_cat id
|
||||
* @return int
|
||||
*/
|
||||
public static function getMaxRangeNumber($default_c_exp_tax_cat=0)
|
||||
{
|
||||
global $db,$conf;
|
||||
|
||||
|
||||
$sql = 'SELECT MAX(counted) as nbRange FROM (';
|
||||
$sql.= ' SELECT COUNT(*) as counted';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'c_exp_tax_range r';
|
||||
@ -230,7 +230,7 @@ class ExpenseReportIk extends CoreObject
|
||||
if ($default_c_exp_tax_cat > 0) $sql .= ' AND r.fk_c_exp_tax_cat = '.$default_c_exp_tax_cat;
|
||||
$sql.= ' GROUP BY r.fk_c_exp_tax_cat';
|
||||
$sql .= ') as counts';
|
||||
|
||||
|
||||
dol_syslog(get_called_class().'::getMaxRangeNumber sql='.$sql, LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
@ -242,7 +242,7 @@ class ExpenseReportIk extends CoreObject
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
public $table_element='commande_fournisseur';
|
||||
public $table_element_line = 'commande_fournisseurdet';
|
||||
public $fk_element = 'fk_commande';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $picto='order';
|
||||
|
||||
/**
|
||||
|
||||
@ -44,7 +44,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
public $table_element='facture_fourn';
|
||||
public $table_element_line='facture_fourn_det';
|
||||
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
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $picto='bill';
|
||||
|
||||
/**
|
||||
|
||||
@ -2111,7 +2111,7 @@ elseif (! empty($object->id))
|
||||
//$result = $object->getLinesArray();
|
||||
|
||||
|
||||
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#add':'#line_'.GETPOST('lineid')).'" method="POST">
|
||||
print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#addline':'#line_'.GETPOST('lineid')).'" method="POST">
|
||||
<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">
|
||||
<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
|
||||
<input type="hidden" name="mode" value="">
|
||||
|
||||
@ -2660,7 +2660,7 @@ else
|
||||
/*
|
||||
* Lines
|
||||
*/
|
||||
print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#add':'#line_'.GETPOST('lineid')).'" method="POST">';
|
||||
print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline')?'#addline':'#line_'.GETPOST('lineid')).'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">';
|
||||
print '<input type="hidden" name="mode" value="">';
|
||||
|
||||
@ -34,7 +34,7 @@ class Holiday extends CommonObject
|
||||
{
|
||||
public $element='holiday';
|
||||
public $table_element='holiday';
|
||||
protected $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $picto = 'holiday';
|
||||
|
||||
/**
|
||||
|
||||
@ -32,7 +32,7 @@ class Establishment extends CommonObject
|
||||
public $table_element='establishment';
|
||||
public $table_element_line = '';
|
||||
public $fk_element = 'fk_establishment';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
public $picto='building';
|
||||
|
||||
public $id;
|
||||
|
||||
56
htdocs/includes/jquery/plugins/select2/dist/js/compat/containerCss.js
vendored
Normal file
56
htdocs/includes/jquery/plugins/select2/dist/js/compat/containerCss.js
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
define([
|
||||
'jquery',
|
||||
'./utils'
|
||||
], function ($, CompatUtils) {
|
||||
// No-op CSS adapter that discards all classes by default
|
||||
function _containerAdapter (clazz) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function ContainerCSS () { }
|
||||
|
||||
ContainerCSS.prototype.render = function (decorated) {
|
||||
var $container = decorated.call(this);
|
||||
|
||||
var containerCssClass = this.options.get('containerCssClass') || '';
|
||||
|
||||
if ($.isFunction(containerCssClass)) {
|
||||
containerCssClass = containerCssClass(this.$element);
|
||||
}
|
||||
|
||||
var containerCssAdapter = this.options.get('adaptContainerCssClass');
|
||||
containerCssAdapter = containerCssAdapter || _containerAdapter;
|
||||
|
||||
if (containerCssClass.indexOf(':all:') !== -1) {
|
||||
containerCssClass = containerCssClass.replace(':all:', '');
|
||||
|
||||
var _cssAdapter = containerCssAdapter;
|
||||
|
||||
containerCssAdapter = function (clazz) {
|
||||
var adapted = _cssAdapter(clazz);
|
||||
|
||||
if (adapted != null) {
|
||||
// Append the old one along with the adapted one
|
||||
return adapted + ' ' + clazz;
|
||||
}
|
||||
|
||||
return clazz;
|
||||
};
|
||||
}
|
||||
|
||||
var containerCss = this.options.get('containerCss') || {};
|
||||
|
||||
if ($.isFunction(containerCss)) {
|
||||
containerCss = containerCss(this.$element);
|
||||
}
|
||||
|
||||
CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter);
|
||||
|
||||
$container.css(containerCss);
|
||||
$container.addClass(containerCssClass);
|
||||
|
||||
return $container;
|
||||
};
|
||||
|
||||
return ContainerCSS;
|
||||
});
|
||||
6457
htdocs/includes/jquery/plugins/select2/dist/js/select2.full.js
vendored
Normal file
6457
htdocs/includes/jquery/plugins/select2/dist/js/select2.full.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
htdocs/includes/jquery/plugins/select2/dist/js/select2.full.min.js
vendored
Normal file
1
htdocs/includes/jquery/plugins/select2/dist/js/select2.full.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Select2 4.0.4
|
||||
* Select2 4.0.5
|
||||
* https://select2.github.io
|
||||
*
|
||||
* Released under the MIT license
|
||||
@ -1855,7 +1855,7 @@ S2.define('select2/selection/search',[
|
||||
var $search = $(
|
||||
'<li class="select2-search select2-search--inline">' +
|
||||
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
||||
' autocomplete="off" autocorrect="off" autocapitalize="off"' +
|
||||
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
||||
' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
|
||||
'</li>'
|
||||
);
|
||||
@ -3909,7 +3909,7 @@ S2.define('select2/dropdown/search',[
|
||||
var $search = $(
|
||||
'<span class="select2-search select2-search--dropdown">' +
|
||||
'<input class="select2-search__field" type="search" tabindex="-1"' +
|
||||
' autocomplete="off" autocorrect="off" autocapitalize="off"' +
|
||||
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
|
||||
' spellcheck="false" role="textbox" />' +
|
||||
'</span>'
|
||||
);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
@ -375,7 +375,7 @@ if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
$board=new ActionComm($db);
|
||||
|
||||
|
||||
$dashboardlines[] = $board->load_board($user);
|
||||
}
|
||||
|
||||
@ -688,13 +688,13 @@ $db->close();
|
||||
function showWeather($totallate,$text,$options)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
$out='';
|
||||
$offset=0;
|
||||
$factor=10; // By default
|
||||
|
||||
$used_conf = !empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? 'MAIN_METEO_PERCENTAGE_LEVEL' : 'MAIN_METEO_LEVEL';
|
||||
|
||||
|
||||
$level0=$offset; if (! empty($conf->global->{$used_conf.'0'})) $level0=$conf->global->{$used_conf.'0'};
|
||||
$level1=$offset+1*$factor; if (! empty($conf->global->{$used_conf.'1'})) $level1=$conf->global->{$used_conf.'1'};
|
||||
$level2=$offset+2*$factor; if (! empty($conf->global->{$used_conf.'2'})) $level2=$conf->global->{$used_conf.'2'};
|
||||
|
||||
@ -68,3 +68,49 @@ INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUE
|
||||
|
||||
-- Description of chart of account MA PCG
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 12, 'PCG', 'The Moroccan chart of accounts', 1);
|
||||
|
||||
-- Description of chart of account BJ SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 49,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account BF SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 60,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account CM SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 24,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account CF SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 65,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account KM SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 71,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account CG SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 72,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account CI SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 21,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account GA SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 16,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account GQ SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 87,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account ML SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES (147,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account NE SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES (168,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account CD SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 73,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account SN SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 22,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account TD SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 66,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account TG SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 15,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
|
||||
1227
htdocs/install/mysql/data/llx_accounting_account_bf.sql
Normal file
1227
htdocs/install/mysql/data/llx_accounting_account_bf.sql
Normal file
File diff suppressed because it is too large
Load Diff
1228
htdocs/install/mysql/data/llx_accounting_account_bj.sql
Normal file
1228
htdocs/install/mysql/data/llx_accounting_account_bj.sql
Normal file
File diff suppressed because it is too large
Load Diff
1227
htdocs/install/mysql/data/llx_accounting_account_cd.sql
Normal file
1227
htdocs/install/mysql/data/llx_accounting_account_cd.sql
Normal file
File diff suppressed because it is too large
Load Diff
1227
htdocs/install/mysql/data/llx_accounting_account_cf.sql
Normal file
1227
htdocs/install/mysql/data/llx_accounting_account_cf.sql
Normal file
File diff suppressed because it is too large
Load Diff
1227
htdocs/install/mysql/data/llx_accounting_account_cg.sql
Normal file
1227
htdocs/install/mysql/data/llx_accounting_account_cg.sql
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,259 +1,259 @@
|
||||
--
|
||||
-- Descriptif plan comptable Suisse
|
||||
--
|
||||
INSERT INTO llx_const (name, value, type, note, visible, entity) values ('ACCOUNTING_MANAGE_ZERO','1','chaine','Manage the "0" for the accountancy account',1,0);
|
||||
INSERT INTO llx_const (name, value, type, note, visible, entity) values ('ACCOUNTING_MANAGE_ZERO','1','chaine','Manage the 0 for the accountancy account',1,0);
|
||||
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13000,'PCG_SUISSE','XXXXXX','XXXXXX','1',0,"Actifs",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13001,'PCG_SUISSE','XXXXXX','XXXXXX','10',13000,"Actifs circulants",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13002,'PCG_SUISSE','XXXXXX','XXXXXX','100',13001,"Liquidités",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13003,'PCG_SUISSE','XXXXXX','XXXXXX','1000',13002,"Caisse",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13004,'PCG_SUISSE','XXXXXX','XXXXXX','1020',13002,"Banque (Avoir)",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13005,'PCG_SUISSE','XXXXXX','XXXXXX','106',13001,"Avoirs à courts terme côtés en bourse",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13006,'PCG_SUISSE','XXXXXX','XXXXXX','1060',13005,"Titres",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13007,'PCG_SUISSE','XXXXXX','XXXXXX','1069',13005,"Ajustement de la valeur des titres",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13008,'PCG_SUISSE','XXXXXX','XXXXXX','110',13001,"Créances résultant de livraisons et prestations",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13009,'PCG_SUISSE','XXXXXX','XXXXXX','1100',13008,"Créances provenant de livraisons et de prestations (Débiteurs)",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13010,'PCG_SUISSE','XXXXXX','XXXXXX','1109',13008,"Ducroire",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13011,'PCG_SUISSE','XXXXXX','XXXXXX','1110',13008,"Créances résultant de livr. et prest. envers les sociétés du groupe",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13012,'PCG_SUISSE','XXXXXX','XXXXXX','114',13001,"Autres créances à court terme",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13013,'PCG_SUISSE','XXXXXX','XXXXXX','1140',13012,"Avances et prêts",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13014,'PCG_SUISSE','XXXXXX','XXXXXX','1149',13012,"Ajustement de la valeur des avances et des prêts",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13015,'PCG_SUISSE','XXXXXX','XXXXXX','1170',13008,"Impôt préalable: TVA s/matériel, marchandises, prestations et énergie",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13016,'PCG_SUISSE','XXXXXX','XXXXXX','1171',13008,"Impôt préalable: TVA s/investissements et autres charges d'exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13017,'PCG_SUISSE','XXXXXX','XXXXXX','1176',13008,"Impôt anticipé",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13018,'PCG_SUISSE','XXXXXX','XXXXXX','1180',13008,"Créance envers les assurances sociales et institutions de prévoyance",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13019,'PCG_SUISSE','XXXXXX','XXXXXX','1189',13008,"Impôt à la source",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13020,'PCG_SUISSE','XXXXXX','XXXXXX','1190',13008,"Autres créances à court terme",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13021,'PCG_SUISSE','XXXXXX','XXXXXX','1199',13008,"Ajustement de la valeur des créances à court terme",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13022,'PCG_SUISSE','XXXXXX','XXXXXX','120',13001,"Stocks et prestations non facturées",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13023,'PCG_SUISSE','XXXXXX','XXXXXX','1200',13022,"Marchandises commerciales",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13024,'PCG_SUISSE','XXXXXX','XXXXXX','1210',13022,"Matières premières",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13025,'PCG_SUISSE','XXXXXX','XXXXXX','1220',13022,"Matières auxiliaires",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13026,'PCG_SUISSE','XXXXXX','XXXXXX','1230',13022,"Matières consommables",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13027,'PCG_SUISSE','XXXXXX','XXXXXX','1250',13022,"Marchandises en consignation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13028,'PCG_SUISSE','XXXXXX','XXXXXX','1260',13022,"Stocks de produits fnis",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13029,'PCG_SUISSE','XXXXXX','XXXXXX','1280',13022,"Travaux en cours",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13030,'PCG_SUISSE','XXXXXX','XXXXXX','130',13001,"Compte de régularisation de l'actif",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13031,'PCG_SUISSE','XXXXXX','XXXXXX','1300',13030,"Charges payées d'avance",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13032,'PCG_SUISSE','XXXXXX','XXXXXX','1301',13030,"Produits à recevoir",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13033,'PCG_SUISSE','XXXXXX','XXXXXX','14',13000,"Actifs immobilisés",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13034,'PCG_SUISSE','XXXXXX','XXXXXX','140',13033,"Immobilisations financières",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13035,'PCG_SUISSE','XXXXXX','XXXXXX','1400',13034,"Titres à long terme",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13036,'PCG_SUISSE','XXXXXX','XXXXXX','1409',13034,"Ajustement de la valeur des titres",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13037,'PCG_SUISSE','XXXXXX','XXXXXX','1440',13034,"Prêts",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13038,'PCG_SUISSE','XXXXXX','XXXXXX','1441',13034,"Hypothèques",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13039,'PCG_SUISSE','XXXXXX','XXXXXX','1449',13034,"Ajustement de la valeur des créances à long terme",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13040,'PCG_SUISSE','XXXXXX','XXXXXX','148',13033,"Participations",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13041,'PCG_SUISSE','XXXXXX','XXXXXX','1480',13040,"Participations",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13042,'PCG_SUISSE','XXXXXX','XXXXXX','1489',13040,"Ajustement de la valeur des participations",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13043,'PCG_SUISSE','XXXXXX','XXXXXX','150',13000,"Immobilisations corporelles meublés",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13044,'PCG_SUISSE','XXXXXX','XXXXXX','1500',13043,"Machines et appareils",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13045,'PCG_SUISSE','XXXXXX','XXXXXX','1509',13043,"Ajustement de la valeur des machines et appareils",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13046,'PCG_SUISSE','XXXXXX','XXXXXX','1510',13043,"Mobilier et installations",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13047,'PCG_SUISSE','XXXXXX','XXXXXX','1519',13043,"Ajustement de la valeur du mobilier et des installations",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13048,'PCG_SUISSE','XXXXXX','XXXXXX','1520',13043,"Machines de bureau, informatique, système de communication",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13049,'PCG_SUISSE','XXXXXX','XXXXXX','1529',13043,"Ajustement de la valeur des machines de bureau, inf. et syst. comm.",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13050,'PCG_SUISSE','XXXXXX','XXXXXX','1530',13043,"Véhicules",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13051,'PCG_SUISSE','XXXXXX','XXXXXX','1539',13043,"Ajustement de la valeur des véhicules",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13052,'PCG_SUISSE','XXXXXX','XXXXXX','1540',13043,"Outillages et appareils",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13053,'PCG_SUISSE','XXXXXX','XXXXXX','1549',13043,"Ajustement de la valeur des outillages et appareils",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13054,'PCG_SUISSE','XXXXXX','XXXXXX','160',13000,"Immobilisations corporelles Immeubles",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13055,'PCG_SUISSE','XXXXXX','XXXXXX','1600',13054,"Immeubles d'exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13056,'PCG_SUISSE','XXXXXX','XXXXXX','1609',13054,"Ajustements de la valeur des immeubles d'exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13057,'PCG_SUISSE','XXXXXX','XXXXXX','170',13000,"Immobilisations incorporelles",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13058,'PCG_SUISSE','XXXXXX','XXXXXX','1700',13057,"Brevets, know-how, licences, droits, dév.",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13059,'PCG_SUISSE','XXXXXX','XXXXXX','1709',13057,"Ajustement de la valeur des brevets, know-how, licences, droits, dév.",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13060,'PCG_SUISSE','XXXXXX','XXXXXX','1770',13057,"Goodwill",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13061,'PCG_SUISSE','XXXXXX','XXXXXX','1779',13057,"Ajustement de la valeur du goodwill",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13062,'PCG_SUISSE','XXXXXX','XXXXXX','180',13000,"Capital non versé : capital social, capital de fondation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13063,'PCG_SUISSE','XXXXXX','XXXXXX','1850',13062,"Capital actions, capital social, droits de participations ou capital de fondation non versés",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13064,'PCG_SUISSE','XXXXXX','XXXXXX','2',0,"Passif",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13065,'PCG_SUISSE','XXXXXX','XXXXXX','20',13064,"Dettes à court terme",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13066,'PCG_SUISSE','XXXXXX','XXXXXX','200',13065,"Dettes à court terme résultant d'achats et de prestations de services",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13067,'PCG_SUISSE','XXXXXX','XXXXXX','2000',13066,"Dettes résultant d'achats et des prestations de services (créanciers)",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13068,'PCG_SUISSE','XXXXXX','XXXXXX','2030',13066,"Acomptes de clients",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13069,'PCG_SUISSE','XXXXXX','XXXXXX','2050',13066,"Dettes résultant d'achats et de prestations de services envers des sociétés du groupe",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13070,'PCG_SUISSE','XXXXXX','XXXXXX','210',13065,"Dettes à court terme rémunérés",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13071,'PCG_SUISSE','XXXXXX','XXXXXX','2100',13070,"Dettes bancaires",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13072,'PCG_SUISSE','XXXXXX','XXXXXX','2120',13070,"Engagements de financement par leasing",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13073,'PCG_SUISSE','XXXXXX','XXXXXX','2140',13070,"Autres dettes à court terme rémunérées",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13074,'PCG_SUISSE','XXXXXX','XXXXXX','2151',13070,"Salaires à payer",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13075,'PCG_SUISSE','XXXXXX','XXXXXX','2152',13070,"Charges sociales à payer (AVS/AC/ALFA)",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13076,'PCG_SUISSE','XXXXXX','XXXXXX','21521',13075,"Créancier AVS/AI/APG/AC",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13077,'PCG_SUISSE','XXXXXX','XXXXXX','21522',13075,"Créancier Allocations Familiales",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13078,'PCG_SUISSE','XXXXXX','XXXXXX','2153',13070,"Assurances sociales à payer (LAA, IJM, FT, LPP)",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13079,'PCG_SUISSE','XXXXXX','XXXXXX','21531',13078,"Créancier Assurance Accidents",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13080,'PCG_SUISSE','XXXXXX','XXXXXX','21532',13078,"Créancier Assurance Accidents complémentaire",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13081,'PCG_SUISSE','XXXXXX','XXXXXX','21533',13078,"Créancier Prévoyance Professionnelle",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13082,'PCG_SUISSE','XXXXXX','XXXXXX','21534',13078,"Créancier Prévoyance Professionnelle complémentaire",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13083,'PCG_SUISSE','XXXXXX','XXXXXX','21535',13078,"Créancier Assurance Indemnités Journalières Maladie",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13084,'PCG_SUISSE','XXXXXX','XXXXXX','21536',13078,"Créancier Assurance Indemnités Journalières Maladie complémentaire",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13085,'PCG_SUISSE','XXXXXX','XXXXXX','21539',13078,"Créancier autres caisses et assurances",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13086,'PCG_SUISSE','XXXXXX','XXXXXX','2154',13070,"Impôt source",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13087,'PCG_SUISSE','XXXXXX','XXXXXX','2155',13070,"Autres charges",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13088,'PCG_SUISSE','XXXXXX','XXXXXX','21551',13087,"Taxe réfugiés",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13089,'PCG_SUISSE','XXXXXX','XXXXXX','21552',13087,"Office des Poursuites",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13090,'PCG_SUISSE','XXXXXX','XXXXXX','21553',13087,"Retraite anticipée",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13091,'PCG_SUISSE','XXXXXX','XXXXXX','21554',13087,"Caisse professionnelle",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13092,'PCG_SUISSE','XXXXXX','XXXXXX','21559',13087,"Autres retenues employé à payer",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13093,'PCG_SUISSE','XXXXXX','XXXXXX','2158',13070,"Provisions 13ème et vacances à payer",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13094,'PCG_SUISSE','XXXXXX','XXXXXX','2160',13070,"Indemnités d'assurances",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13095,'PCG_SUISSE','XXXXXX','XXXXXX','21601',13094,"Indemnités d'assurance accidents",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13096,'PCG_SUISSE','XXXXXX','XXXXXX','21602',13094,"Indemnités d'assurance maladie",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13097,'PCG_SUISSE','XXXXXX','XXXXXX','21603',13094,"Indemnités d'assurance maternité",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13098,'PCG_SUISSE','XXXXXX','XXXXXX','21604',13094,"Indemnités d'assurance maternité complémentaire",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13099,'PCG_SUISSE','XXXXXX','XXXXXX','21605',13094,"Indemnités d'assurance APG militaire",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13100,'PCG_SUISSE','XXXXXX','XXXXXX','21606',13094,"Indemnités d'assurance militaire",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13101,'PCG_SUISSE','XXXXXX','XXXXXX','21607',13094,"Indemnités d'assurance chômage",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13102,'PCG_SUISSE','XXXXXX','XXXXXX','21608',13094,"Indemnités d'assurance AI",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13103,'PCG_SUISSE','XXXXXX','XXXXXX','21609',13094,"Autres",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13104,'PCG_SUISSE','XXXXXX','XXXXXX','220',13065,"Autres dettes à court terme",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13105,'PCG_SUISSE','XXXXXX','XXXXXX','2200',13104,"TVA due",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13106,'PCG_SUISSE','XXXXXX','XXXXXX','2201',13104,"Décompte TVA",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13107,'PCG_SUISSE','XXXXXX','XXXXXX','2206',13104,"Impôt anticipé dû",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13108,'PCG_SUISSE','XXXXXX','XXXXXX','2208',13104,"Impôts directs",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13109,'PCG_SUISSE','XXXXXX','XXXXXX','2210',13104,"Autres dettes à court terme",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13110,'PCG_SUISSE','XXXXXX','XXXXXX','2261',13104,"Dividendes",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13111,'PCG_SUISSE','XXXXXX','XXXXXX','2270',13104,"Assurances sociales et institutions de prévoyance",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13112,'PCG_SUISSE','XXXXXX','XXXXXX','2279',13104,"Impôt à la source",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13113,'PCG_SUISSE','XXXXXX','XXXXXX','230',13065,"Passifs de régularisation et provision à court terme",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13114,'PCG_SUISSE','XXXXXX','XXXXXX','2300',13113,"Charges à payer",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13115,'PCG_SUISSE','XXXXXX','XXXXXX','2301',13113,"Produits constatés d'avance",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13116,'PCG_SUISSE','XXXXXX','XXXXXX','2330',13113,"Provisions à court terme",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13117,'PCG_SUISSE','XXXXXX','XXXXXX','24',13064,"Dettes à long terme",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13118,'PCG_SUISSE','XXXXXX','XXXXXX','240',13117,"Dettes à long terme rémunérées",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13119,'PCG_SUISSE','XXXXXX','XXXXXX','2400',13118,"Dettes bancaires",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13120,'PCG_SUISSE','XXXXXX','XXXXXX','2420',13118,"Engagements de financement par leasing",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13121,'PCG_SUISSE','XXXXXX','XXXXXX','2430',13118,"Emprunts obligataires",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13122,'PCG_SUISSE','XXXXXX','XXXXXX','2450',13118,"Emprunts",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13123,'PCG_SUISSE','XXXXXX','XXXXXX','2451',13118,"Hypothèques",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13124,'PCG_SUISSE','XXXXXX','XXXXXX','250',13117,"Autres dettes à long terme",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13125,'PCG_SUISSE','XXXXXX','XXXXXX','2500',13124,"Autres dettes à long terme",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13126,'PCG_SUISSE','XXXXXX','XXXXXX','260',13117,"Provisions à long terme et provisions légales",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13127,'PCG_SUISSE','XXXXXX','XXXXXX','2600',13126,"Provisions",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13128,'PCG_SUISSE','XXXXXX','XXXXXX','28',13064,"Fonds propres (personnes morales)",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13129,'PCG_SUISSE','XXXXXX','XXXXXX','280',13128,"Capital social ou capital de fondation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13130,'PCG_SUISSE','XXXXXX','XXXXXX','2800',13129,"Capital-actions, capital social, capital de fondation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13131,'PCG_SUISSE','XXXXXX','XXXXXX','290',13064,"Réserves / bénéfices et pertes",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13132,'PCG_SUISSE','XXXXXX','XXXXXX','2900',13131,"Réserves légales issues du capital",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13133,'PCG_SUISSE','XXXXXX','XXXXXX','2930',13131,"Réserves sur participations propres au capital",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13134,'PCG_SUISSE','XXXXXX','XXXXXX','2940',13131,"Réserves d'évaluation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13135,'PCG_SUISSE','XXXXXX','XXXXXX','2950',13131,"Réserves légales issues du bénéfice",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13136,'PCG_SUISSE','XXXXXX','XXXXXX','2960',13131,"Réserves libres",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13137,'PCG_SUISSE','XXXXXX','XXXXXX','2970',13131,"Bénéfice / perte reporté",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13138,'PCG_SUISSE','XXXXXX','XXXXXX','2979',13131,"Bénéfice / perte de l'exercice",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13139,'PCG_SUISSE','XXXXXX','XXXXXX','2980',13131,"Propres actions, parts sociales, droits de participations (poste négatif)",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13140,'PCG_SUISSE','XXXXXX','XXXXXX','3',0,"Chiffre d'affaires résultant des ventes et des prestations de services",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13141,'PCG_SUISSE','XXXXXX','XXXXXX','3000',13140,"Ventes de produits fabriqués",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13142,'PCG_SUISSE','XXXXXX','XXXXXX','3200',13140,"Ventes de marchandises",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13143,'PCG_SUISSE','XXXXXX','XXXXXX','3400',13140,"Ventes de prestations",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13144,'PCG_SUISSE','XXXXXX','XXXXXX','3600',13140,"Autres ventes et prestations de services",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13145,'PCG_SUISSE','XXXXXX','XXXXXX','3700',13140,"Prestations propres",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13146,'PCG_SUISSE','XXXXXX','XXXXXX','3710',13140,"Consommations propres",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13147,'PCG_SUISSE','XXXXXX','XXXXXX','3800',13140,"Déductions sur ventes",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13148,'PCG_SUISSE','XXXXXX','XXXXXX','3805',13140,"Pertes sur clients, variations du ducroire",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13149,'PCG_SUISSE','XXXXXX','XXXXXX','3900',13140,"Variation des stocks de produits semis-finis",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13150,'PCG_SUISSE','XXXXXX','XXXXXX','3901',13140,"Variation des stocks de produits finis",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13151,'PCG_SUISSE','XXXXXX','XXXXXX','3904',13140,"Variation de la valeur des prestations non facturées",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13152,'PCG_SUISSE','XXXXXX','XXXXXX','4',0,"Charges de matériel, de marchandises et de prestations de tiers",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13153,'PCG_SUISSE','XXXXXX','XXXXXX','4000',13152,"Charges de matériel de l'atelier",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13154,'PCG_SUISSE','XXXXXX','XXXXXX','4200',13152,"Achats de marchandises destinées à la revente",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13155,'PCG_SUISSE','XXXXXX','XXXXXX','4400',13152,"Prestations / travaux de tiers",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13156,'PCG_SUISSE','XXXXXX','XXXXXX','4500',13152,"Charges d'énergie pour l'exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13157,'PCG_SUISSE','XXXXXX','XXXXXX','4900',13152,"Déductions sur les charges",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13158,'PCG_SUISSE','XXXXXX','XXXXXX','5',0,"Charges de personnel",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13159,'PCG_SUISSE','XXXXXX','XXXXXX','5000',13158,"Salaires",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13160,'PCG_SUISSE','XXXXXX','XXXXXX','5200',13158,"Charges de personnel",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13161,'PCG_SUISSE','XXXXXX','XXXXXX','5201',13158,"Salaires variables, commissions et primes régulières",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13162,'PCG_SUISSE','XXXXXX','XXXXXX','5202',13158,"Primes occasionnelles et participations au bénéfice",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13163,'PCG_SUISSE','XXXXXX','XXXXXX','5203',13158,"Divers soumis",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13164,'PCG_SUISSE','XXXXXX','XXXXXX','5204',13158,"Divers non soumis",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13165,'PCG_SUISSE','XXXXXX','XXXXXX','5210',13158,"Honoraires et indemnités CA",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13166,'PCG_SUISSE','XXXXXX','XXXXXX','5270',13158,"AVS, AI, APG, assurance-chômage",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13167,'PCG_SUISSE','XXXXXX','XXXXXX','5271',13158,"Caisse d'allocations familiales",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13168,'PCG_SUISSE','XXXXXX','XXXXXX','52721',13167,"Prévoyance professionnelle",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13169,'PCG_SUISSE','XXXXXX','XXXXXX','52722',13167,"Prévoyance professionnelle complémentaire",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13170,'PCG_SUISSE','XXXXXX','XXXXXX','52731',13167,"Assurance-accidents",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13171,'PCG_SUISSE','XXXXXX','XXXXXX','52732',13167,"Assurance-accidents complémentaire",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13172,'PCG_SUISSE','XXXXXX','XXXXXX','52741',13167,"Assurance IJM",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13173,'PCG_SUISSE','XXXXXX','XXXXXX','52742',13167,"Assurance IJM complémentaire",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13174,'PCG_SUISSE','XXXXXX','XXXXXX','5275',13158,"Autres assurances",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13175,'PCG_SUISSE','XXXXXX','XXXXXX','5276',13158,"Impôts à la source payé par employeur",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13176,'PCG_SUISSE','XXXXXX','XXXXXX','5278',13158,"Caisse professionnelle",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13177,'PCG_SUISSE','XXXXXX','XXXXXX','5279',13158,"Arrondis sur charges sociales",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13178,'PCG_SUISSE','XXXXXX','XXXXXX','5280',13158,"Autres charges de personnel",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13179,'PCG_SUISSE','XXXXXX','XXXXXX','5281',13158,"Frais de voyages/transport",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13180,'PCG_SUISSE','XXXXXX','XXXXXX','5282',13158,"Frais de repas/hébergement",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13181,'PCG_SUISSE','XXXXXX','XXXXXX','5283',13158,"Frais forfaitaires",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13182,'PCG_SUISSE','XXXXXX','XXXXXX','5284',13158,"Frais de représentation, téléphones, divers",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13183,'PCG_SUISSE','XXXXXX','XXXXXX','5288',13158,"Frais de formation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13184,'PCG_SUISSE','XXXXXX','XXXXXX','5289',13158,"Autres frais de personnel",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13185,'PCG_SUISSE','XXXXXX','XXXXXX','5290',13158,"Prestations de travail de tiers",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13186,'PCG_SUISSE','XXXXXX','XXXXXX','5700',13158,"Charges sociales",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13187,'PCG_SUISSE','XXXXXX','XXXXXX','5800',13158,"Autres charges du personnel",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13188,'PCG_SUISSE','XXXXXX','XXXXXX','5900',13158,"Charges de personnels temporaires",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13189,'PCG_SUISSE','XXXXXX','XXXXXX','6',0,"Autres charges d'exploitation, amortissements et ajustement de valeur, résultat financier",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13190,'PCG_SUISSE','XXXXXX','XXXXXX','6000',13189,"Charges de locaux",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13191,'PCG_SUISSE','XXXXXX','XXXXXX','6100',13189,"Entretien, réparations et remplacement des inst. servant à l'exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13192,'PCG_SUISSE','XXXXXX','XXXXXX','6105',13189,"Leasing immobilisations corporelles meubles",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13193,'PCG_SUISSE','XXXXXX','XXXXXX','6200',13189,"Charges de véhicules et de transport",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13194,'PCG_SUISSE','XXXXXX','XXXXXX','6260',13189,"Leasing et location de véhicule",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13195,'PCG_SUISSE','XXXXXX','XXXXXX','6300',13189,"Assurances-choses, droits, taxes, autorisations",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13196,'PCG_SUISSE','XXXXXX','XXXXXX','6400',13189,"Charges d'énergie et évacuation des déchets",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13197,'PCG_SUISSE','XXXXXX','XXXXXX','6500',13189,"Charges d'administration",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13198,'PCG_SUISSE','XXXXXX','XXXXXX','6510',13189,"Téléphone",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13199,'PCG_SUISSE','XXXXXX','XXXXXX','6511',13189,"Internet",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13200,'PCG_SUISSE','XXXXXX','XXXXXX','6512',13189,"Frais de port",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13201,'PCG_SUISSE','XXXXXX','XXXXXX','6560',13189,"Informatique",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13202,'PCG_SUISSE','XXXXXX','XXXXXX','6570',13189,"Charges et leasing d'informatique",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13203,'PCG_SUISSE','XXXXXX','XXXXXX','6571',13189,"Entretien/Hotline Hardware",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13204,'PCG_SUISSE','XXXXXX','XXXXXX','6573',13189,"Disquettes, CD-Rom, etc. Fourniture d'exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13205,'PCG_SUISSE','XXXXXX','XXXXXX','6600',13189,"Publicité",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13206,'PCG_SUISSE','XXXXXX','XXXXXX','6610',13189,"Imprimés publicitaires",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13207,'PCG_SUISSE','XXXXXX','XXXXXX','6640',13189,"Frais de voyage et conseils à la clientèle",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13208,'PCG_SUISSE','XXXXXX','XXXXXX','6641',13189,"Frais de représentation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13209,'PCG_SUISSE','XXXXXX','XXXXXX','6700',13189,"Autres charges d'exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13210,'PCG_SUISSE','XXXXXX','XXXXXX','6800',13189,"Amortissement et ajustement de valeur des postes sur immobilisations corporelles",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13211,'PCG_SUISSE','XXXXXX','XXXXXX','6801',13189,"Intérêts pour emprunts",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13212,'PCG_SUISSE','XXXXXX','XXXXXX','6840',13189,"Frais de banque et des chèques postaux",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13213,'PCG_SUISSE','XXXXXX','XXXXXX','6850',13189,"Produits financiers",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13214,'PCG_SUISSE','XXXXXX','XXXXXX','6900',13189,"Charges financières",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13215,'PCG_SUISSE','XXXXXX','XXXXXX','6920',13189,"Amortissement s/immobilisé. corporelles meubles",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13216,'PCG_SUISSE','XXXXXX','XXXXXX','6930',13189,"Amortissement s/immobilisé. corporelles immeubles",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13217,'PCG_SUISSE','XXXXXX','XXXXXX','6940',13189,"Amortissement s/immobilisé. incorporelles",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13218,'PCG_SUISSE','XXXXXX','XXXXXX','6950',13189,"Produits financiers",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13219,'PCG_SUISSE','XXXXXX','XXXXXX','7',0,"Résultat des activités annexes d'exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13220,'PCG_SUISSE','XXXXXX','XXXXXX','7000',13219,"Produits accessoires",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13221,'PCG_SUISSE','XXXXXX','XXXXXX','7010',13219,"Charges accessoires",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13222,'PCG_SUISSE','XXXXXX','XXXXXX','7400',13219,"Produits sur placements financiers",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13223,'PCG_SUISSE','XXXXXX','XXXXXX','7410',13219,"Charges sur placements financiers",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13224,'PCG_SUISSE','XXXXXX','XXXXXX','7500',13219,"Produits des immeubles d'exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13225,'PCG_SUISSE','XXXXXX','XXXXXX','7510',13219,"Charges des immeubles d'exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13226,'PCG_SUISSE','XXXXXX','XXXXXX','8',0,"Charges hors exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13227,'PCG_SUISSE','XXXXXX','XXXXXX','8000',13226,"Charges hors exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13228,'PCG_SUISSE','XXXXXX','XXXXXX','8100',13226,"Produits hors exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13229,'PCG_SUISSE','XXXXXX','XXXXXX','8500',13226,"Charges extraordinaires, exceptionnelles ou hors période",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13230,'PCG_SUISSE','XXXXXX','XXXXXX','8510',13226,"Produits extraordinaires, exceptionnels ou hors période",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13231,'PCG_SUISSE','XXXXXX','XXXXXX','8900',13226,"Impôts directs",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13232,'PCG_SUISSE','XXXXXX','XXXXXX','9',0,"Produits de vente et de services",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13233,'PCG_SUISSE','XXXXXX','XXXXXX','9001',13232,"Charges de vente et de services",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13234,'PCG_SUISSE','XXXXXX','XXXXXX','9002',13232,"Résultat brut 1",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13235,'PCG_SUISSE','XXXXXX','XXXXXX','9006',13232,"Charges de personnel de production",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13236,'PCG_SUISSE','XXXXXX','XXXXXX','9007',13232,"Résultat brut 2",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13237,'PCG_SUISSE','XXXXXX','XXXXXX','9008',13232,"Autres charges de personnel",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13238,'PCG_SUISSE','XXXXXX','XXXXXX','9009',13232,"Résultat brut 3",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13239,'PCG_SUISSE','XXXXXX','XXXXXX','9010',13232,"Autres charges d'exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13240,'PCG_SUISSE','XXXXXX','XXXXXX','9011',13232,"Résultat d'exploitation 1",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13241,'PCG_SUISSE','XXXXXX','XXXXXX','9012',13232,"Résultat financier",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13242,'PCG_SUISSE','XXXXXX','XXXXXX','9013',13232,"Résultat d'exploitation 2",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13243,'PCG_SUISSE','XXXXXX','XXXXXX','9014',13232,"Amortissements",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13244,'PCG_SUISSE','XXXXXX','XXXXXX','9015',13232,"Résultat d'exploitation 3",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13245,'PCG_SUISSE','XXXXXX','XXXXXX','9016',13232,"Résultat activités annexes exploitation",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13246,'PCG_SUISSE','XXXXXX','XXXXXX','9017',13232,"Résultat d'exploitation 4",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13247,'PCG_SUISSE','XXXXXX','XXXXXX','9018',13232,"Résultats extraordinaires",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13248,'PCG_SUISSE','XXXXXX','XXXXXX','9019',13232,"Résultat d'entreprise avant impôts",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13249,'PCG_SUISSE','XXXXXX','XXXXXX','9020',13232,"Charges d'impôts",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13250,'PCG_SUISSE','XXXXXX','XXXXXX','9090',13232,"Résultat d'entreprise",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13251,'PCG_SUISSE','XXXXXX','XXXXXX','9100',13232,"Bilan d'ouverture",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13252,'PCG_SUISSE','XXXXXX','XXXXXX','9101',13232,"Bilan de clôture",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13253,'PCG_SUISSE','XXXXXX','XXXXXX','9200',13232,"Bénéfice / perte de l'exercice",'1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13000,'PCG_SUISSE','XXXXXX','XXXXXX','1',0,'Actifs','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13001,'PCG_SUISSE','XXXXXX','XXXXXX','10',13000,'Actifs circulants','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13002,'PCG_SUISSE','XXXXXX','XXXXXX','100',13001,'Liquidités','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13003,'PCG_SUISSE','XXXXXX','XXXXXX','1000',13002,'Caisse','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13004,'PCG_SUISSE','XXXXXX','XXXXXX','1020',13002,'Banque (Avoir)','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13005,'PCG_SUISSE','XXXXXX','XXXXXX','106',13001,'Avoirs à courts terme côtés en bourse','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13006,'PCG_SUISSE','XXXXXX','XXXXXX','1060',13005,'Titres','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13007,'PCG_SUISSE','XXXXXX','XXXXXX','1069',13005,'Ajustement de la valeur des titres','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13008,'PCG_SUISSE','XXXXXX','XXXXXX','110',13001,'Créances résultant de livraisons et prestations','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13009,'PCG_SUISSE','XXXXXX','XXXXXX','1100',13008,'Créances provenant de livraisons et de prestations (Débiteurs)','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13010,'PCG_SUISSE','XXXXXX','XXXXXX','1109',13008,'Ducroire','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13011,'PCG_SUISSE','XXXXXX','XXXXXX','1110',13008,'Créances résultant de livr. et prest. envers les sociétés du groupe','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13012,'PCG_SUISSE','XXXXXX','XXXXXX','114',13001,'Autres créances à court terme','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13013,'PCG_SUISSE','XXXXXX','XXXXXX','1140',13012,'Avances et prêts','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13014,'PCG_SUISSE','XXXXXX','XXXXXX','1149',13012,'Ajustement de la valeur des avances et des prêts','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13015,'PCG_SUISSE','XXXXXX','XXXXXX','1170',13008,'Impôt préalable: TVA s/matériel, marchandises, prestations et énergie','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13016,'PCG_SUISSE','XXXXXX','XXXXXX','1171',13008,'Impôt préalable: TVA s/investissements et autres charges d''exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13017,'PCG_SUISSE','XXXXXX','XXXXXX','1176',13008,'Impôt anticipé','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13018,'PCG_SUISSE','XXXXXX','XXXXXX','1180',13008,'Créance envers les assurances sociales et institutions de prévoyance','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13019,'PCG_SUISSE','XXXXXX','XXXXXX','1189',13008,'Impôt à la source','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13020,'PCG_SUISSE','XXXXXX','XXXXXX','1190',13008,'Autres créances à court terme','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13021,'PCG_SUISSE','XXXXXX','XXXXXX','1199',13008,'Ajustement de la valeur des créances à court terme','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13022,'PCG_SUISSE','XXXXXX','XXXXXX','120',13001,'Stocks et prestations non facturées','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13023,'PCG_SUISSE','XXXXXX','XXXXXX','1200',13022,'Marchandises commerciales','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13024,'PCG_SUISSE','XXXXXX','XXXXXX','1210',13022,'Matières premières','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13025,'PCG_SUISSE','XXXXXX','XXXXXX','1220',13022,'Matières auxiliaires','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13026,'PCG_SUISSE','XXXXXX','XXXXXX','1230',13022,'Matières consommables','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13027,'PCG_SUISSE','XXXXXX','XXXXXX','1250',13022,'Marchandises en consignation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13028,'PCG_SUISSE','XXXXXX','XXXXXX','1260',13022,'Stocks de produits fnis','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13029,'PCG_SUISSE','XXXXXX','XXXXXX','1280',13022,'Travaux en cours','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13030,'PCG_SUISSE','XXXXXX','XXXXXX','130',13001,'Compte de régularisation de l''actif','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13031,'PCG_SUISSE','XXXXXX','XXXXXX','1300',13030,'Charges payées d''avance','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13032,'PCG_SUISSE','XXXXXX','XXXXXX','1301',13030,'Produits à recevoir','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13033,'PCG_SUISSE','XXXXXX','XXXXXX','14',13000,'Actifs immobilisés','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13034,'PCG_SUISSE','XXXXXX','XXXXXX','140',13033,'Immobilisations financières','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13035,'PCG_SUISSE','XXXXXX','XXXXXX','1400',13034,'Titres à long terme','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13036,'PCG_SUISSE','XXXXXX','XXXXXX','1409',13034,'Ajustement de la valeur des titres','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13037,'PCG_SUISSE','XXXXXX','XXXXXX','1440',13034,'Prêts','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13038,'PCG_SUISSE','XXXXXX','XXXXXX','1441',13034,'Hypothèques','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13039,'PCG_SUISSE','XXXXXX','XXXXXX','1449',13034,'Ajustement de la valeur des créances à long terme','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13040,'PCG_SUISSE','XXXXXX','XXXXXX','148',13033,'Participations','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13041,'PCG_SUISSE','XXXXXX','XXXXXX','1480',13040,'Participations','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13042,'PCG_SUISSE','XXXXXX','XXXXXX','1489',13040,'Ajustement de la valeur des participations','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13043,'PCG_SUISSE','XXXXXX','XXXXXX','150',13000,'Immobilisations corporelles meublés','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13044,'PCG_SUISSE','XXXXXX','XXXXXX','1500',13043,'Machines et appareils','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13045,'PCG_SUISSE','XXXXXX','XXXXXX','1509',13043,'Ajustement de la valeur des machines et appareils','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13046,'PCG_SUISSE','XXXXXX','XXXXXX','1510',13043,'Mobilier et installations','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13047,'PCG_SUISSE','XXXXXX','XXXXXX','1519',13043,'Ajustement de la valeur du mobilier et des installations','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13048,'PCG_SUISSE','XXXXXX','XXXXXX','1520',13043,'Machines de bureau, informatique, système de communication','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13049,'PCG_SUISSE','XXXXXX','XXXXXX','1529',13043,'Ajustement de la valeur des machines de bureau, inf. et syst. comm.','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13050,'PCG_SUISSE','XXXXXX','XXXXXX','1530',13043,'Véhicules','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13051,'PCG_SUISSE','XXXXXX','XXXXXX','1539',13043,'Ajustement de la valeur des véhicules','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13052,'PCG_SUISSE','XXXXXX','XXXXXX','1540',13043,'Outillages et appareils','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13053,'PCG_SUISSE','XXXXXX','XXXXXX','1549',13043,'Ajustement de la valeur des outillages et appareils','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13054,'PCG_SUISSE','XXXXXX','XXXXXX','160',13000,'Immobilisations corporelles Immeubles','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13055,'PCG_SUISSE','XXXXXX','XXXXXX','1600',13054,'Immeubles d''exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13056,'PCG_SUISSE','XXXXXX','XXXXXX','1609',13054,'Ajustements de la valeur des immeubles d''exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13057,'PCG_SUISSE','XXXXXX','XXXXXX','170',13000,'Immobilisations incorporelles','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13058,'PCG_SUISSE','XXXXXX','XXXXXX','1700',13057,'Brevets, know-how, licences, droits, dév.','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13059,'PCG_SUISSE','XXXXXX','XXXXXX','1709',13057,'Ajustement de la valeur des brevets, know-how, licences, droits, dév.','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13060,'PCG_SUISSE','XXXXXX','XXXXXX','1770',13057,'Goodwill','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13061,'PCG_SUISSE','XXXXXX','XXXXXX','1779',13057,'Ajustement de la valeur du goodwill','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13062,'PCG_SUISSE','XXXXXX','XXXXXX','180',13000,'Capital non versé : capital social, capital de fondation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13063,'PCG_SUISSE','XXXXXX','XXXXXX','1850',13062,'Capital actions, capital social, droits de participations ou capital de fondation non versés','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13064,'PCG_SUISSE','XXXXXX','XXXXXX','2',0,'Passif','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13065,'PCG_SUISSE','XXXXXX','XXXXXX','20',13064,'Dettes à court terme','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13066,'PCG_SUISSE','XXXXXX','XXXXXX','200',13065,'Dettes à court terme résultant d''achats et de prestations de services','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13067,'PCG_SUISSE','XXXXXX','XXXXXX','2000',13066,'Dettes résultant d''achats et des prestations de services (créanciers)','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13068,'PCG_SUISSE','XXXXXX','XXXXXX','2030',13066,'Acomptes de clients','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13069,'PCG_SUISSE','XXXXXX','XXXXXX','2050',13066,'Dettes résultant d''achats et de prestations de services envers des sociétés du groupe','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13070,'PCG_SUISSE','XXXXXX','XXXXXX','210',13065,'Dettes à court terme rémunérés','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13071,'PCG_SUISSE','XXXXXX','XXXXXX','2100',13070,'Dettes bancaires','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13072,'PCG_SUISSE','XXXXXX','XXXXXX','2120',13070,'Engagements de financement par leasing','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13073,'PCG_SUISSE','XXXXXX','XXXXXX','2140',13070,'Autres dettes à court terme rémunérées','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13074,'PCG_SUISSE','XXXXXX','XXXXXX','2151',13070,'Salaires à payer','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13075,'PCG_SUISSE','XXXXXX','XXXXXX','2152',13070,'Charges sociales à payer (AVS/AC/ALFA)','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13076,'PCG_SUISSE','XXXXXX','XXXXXX','21521',13075,'Créancier AVS/AI/APG/AC','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13077,'PCG_SUISSE','XXXXXX','XXXXXX','21522',13075,'Créancier Allocations Familiales','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13078,'PCG_SUISSE','XXXXXX','XXXXXX','2153',13070,'Assurances sociales à payer (LAA, IJM, FT, LPP)','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13079,'PCG_SUISSE','XXXXXX','XXXXXX','21531',13078,'Créancier Assurance Accidents','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13080,'PCG_SUISSE','XXXXXX','XXXXXX','21532',13078,'Créancier Assurance Accidents complémentaire','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13081,'PCG_SUISSE','XXXXXX','XXXXXX','21533',13078,'Créancier Prévoyance Professionnelle','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13082,'PCG_SUISSE','XXXXXX','XXXXXX','21534',13078,'Créancier Prévoyance Professionnelle complémentaire','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13083,'PCG_SUISSE','XXXXXX','XXXXXX','21535',13078,'Créancier Assurance Indemnités Journalières Maladie','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13084,'PCG_SUISSE','XXXXXX','XXXXXX','21536',13078,'Créancier Assurance Indemnités Journalières Maladie complémentaire','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13085,'PCG_SUISSE','XXXXXX','XXXXXX','21539',13078,'Créancier autres caisses et assurances','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13086,'PCG_SUISSE','XXXXXX','XXXXXX','2154',13070,'Impôt source','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13087,'PCG_SUISSE','XXXXXX','XXXXXX','2155',13070,'Autres charges','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13088,'PCG_SUISSE','XXXXXX','XXXXXX','21551',13087,'Taxe réfugiés','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13089,'PCG_SUISSE','XXXXXX','XXXXXX','21552',13087,'Office des Poursuites','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13090,'PCG_SUISSE','XXXXXX','XXXXXX','21553',13087,'Retraite anticipée','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13091,'PCG_SUISSE','XXXXXX','XXXXXX','21554',13087,'Caisse professionnelle','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13092,'PCG_SUISSE','XXXXXX','XXXXXX','21559',13087,'Autres retenues employé à payer','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13093,'PCG_SUISSE','XXXXXX','XXXXXX','2158',13070,'Provisions 13ème et vacances à payer','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13094,'PCG_SUISSE','XXXXXX','XXXXXX','2160',13070,'Indemnités d''assurances','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13095,'PCG_SUISSE','XXXXXX','XXXXXX','21601',13094,'Indemnités d''assurance accidents','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13096,'PCG_SUISSE','XXXXXX','XXXXXX','21602',13094,'Indemnités d''assurance maladie','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13097,'PCG_SUISSE','XXXXXX','XXXXXX','21603',13094,'Indemnités d''assurance maternité','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13098,'PCG_SUISSE','XXXXXX','XXXXXX','21604',13094,'Indemnités d''assurance maternité complémentaire','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13099,'PCG_SUISSE','XXXXXX','XXXXXX','21605',13094,'Indemnités d''assurance APG militaire','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13100,'PCG_SUISSE','XXXXXX','XXXXXX','21606',13094,'Indemnités d''assurance militaire','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13101,'PCG_SUISSE','XXXXXX','XXXXXX','21607',13094,'Indemnités d''assurance chômage','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13102,'PCG_SUISSE','XXXXXX','XXXXXX','21608',13094,'Indemnités d''assurance AI','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13103,'PCG_SUISSE','XXXXXX','XXXXXX','21609',13094,'Autres','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13104,'PCG_SUISSE','XXXXXX','XXXXXX','220',13065,'Autres dettes à court terme','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13105,'PCG_SUISSE','XXXXXX','XXXXXX','2200',13104,'TVA due','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13106,'PCG_SUISSE','XXXXXX','XXXXXX','2201',13104,'Décompte TVA','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13107,'PCG_SUISSE','XXXXXX','XXXXXX','2206',13104,'Impôt anticipé dû','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13108,'PCG_SUISSE','XXXXXX','XXXXXX','2208',13104,'Impôts directs','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13109,'PCG_SUISSE','XXXXXX','XXXXXX','2210',13104,'Autres dettes à court terme','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13110,'PCG_SUISSE','XXXXXX','XXXXXX','2261',13104,'Dividendes','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13111,'PCG_SUISSE','XXXXXX','XXXXXX','2270',13104,'Assurances sociales et institutions de prévoyance','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13112,'PCG_SUISSE','XXXXXX','XXXXXX','2279',13104,'Impôt à la source','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13113,'PCG_SUISSE','XXXXXX','XXXXXX','230',13065,'Passifs de régularisation et provision à court terme','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13114,'PCG_SUISSE','XXXXXX','XXXXXX','2300',13113,'Charges à payer','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13115,'PCG_SUISSE','XXXXXX','XXXXXX','2301',13113,'Produits constatés d''avance','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13116,'PCG_SUISSE','XXXXXX','XXXXXX','2330',13113,'Provisions à court terme','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13117,'PCG_SUISSE','XXXXXX','XXXXXX','24',13064,'Dettes à long terme','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13118,'PCG_SUISSE','XXXXXX','XXXXXX','240',13117,'Dettes à long terme rémunérées','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13119,'PCG_SUISSE','XXXXXX','XXXXXX','2400',13118,'Dettes bancaires','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13120,'PCG_SUISSE','XXXXXX','XXXXXX','2420',13118,'Engagements de financement par leasing','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13121,'PCG_SUISSE','XXXXXX','XXXXXX','2430',13118,'Emprunts obligataires','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13122,'PCG_SUISSE','XXXXXX','XXXXXX','2450',13118,'Emprunts','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13123,'PCG_SUISSE','XXXXXX','XXXXXX','2451',13118,'Hypothèques','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13124,'PCG_SUISSE','XXXXXX','XXXXXX','250',13117,'Autres dettes à long terme','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13125,'PCG_SUISSE','XXXXXX','XXXXXX','2500',13124,'Autres dettes à long terme','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13126,'PCG_SUISSE','XXXXXX','XXXXXX','260',13117,'Provisions à long terme et provisions légales','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13127,'PCG_SUISSE','XXXXXX','XXXXXX','2600',13126,'Provisions','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13128,'PCG_SUISSE','XXXXXX','XXXXXX','28',13064,'Fonds propres (personnes morales)','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13129,'PCG_SUISSE','XXXXXX','XXXXXX','280',13128,'Capital social ou capital de fondation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13130,'PCG_SUISSE','XXXXXX','XXXXXX','2800',13129,'Capital-actions, capital social, capital de fondation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13131,'PCG_SUISSE','XXXXXX','XXXXXX','290',13064,'Réserves / bénéfices et pertes','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13132,'PCG_SUISSE','XXXXXX','XXXXXX','2900',13131,'Réserves légales issues du capital','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13133,'PCG_SUISSE','XXXXXX','XXXXXX','2930',13131,'Réserves sur participations propres au capital','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13134,'PCG_SUISSE','XXXXXX','XXXXXX','2940',13131,'Réserves d''évaluation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13135,'PCG_SUISSE','XXXXXX','XXXXXX','2950',13131,'Réserves légales issues du bénéfice','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13136,'PCG_SUISSE','XXXXXX','XXXXXX','2960',13131,'Réserves libres','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13137,'PCG_SUISSE','XXXXXX','XXXXXX','2970',13131,'Bénéfice / perte reporté','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13138,'PCG_SUISSE','XXXXXX','XXXXXX','2979',13131,'Bénéfice / perte de l''exercice','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13139,'PCG_SUISSE','XXXXXX','XXXXXX','2980',13131,'Propres actions, parts sociales, droits de participations (poste négatif)','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13140,'PCG_SUISSE','XXXXXX','XXXXXX','3',0,'Chiffre d''affaires résultant des ventes et des prestations de services','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13141,'PCG_SUISSE','XXXXXX','XXXXXX','3000',13140,'Ventes de produits fabriqués','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13142,'PCG_SUISSE','XXXXXX','XXXXXX','3200',13140,'Ventes de marchandises','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13143,'PCG_SUISSE','XXXXXX','XXXXXX','3400',13140,'Ventes de prestations','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13144,'PCG_SUISSE','XXXXXX','XXXXXX','3600',13140,'Autres ventes et prestations de services','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13145,'PCG_SUISSE','XXXXXX','XXXXXX','3700',13140,'Prestations propres','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13146,'PCG_SUISSE','XXXXXX','XXXXXX','3710',13140,'Consommations propres','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13147,'PCG_SUISSE','XXXXXX','XXXXXX','3800',13140,'Déductions sur ventes','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13148,'PCG_SUISSE','XXXXXX','XXXXXX','3805',13140,'Pertes sur clients, variations du ducroire','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13149,'PCG_SUISSE','XXXXXX','XXXXXX','3900',13140,'Variation des stocks de produits semis-finis','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13150,'PCG_SUISSE','XXXXXX','XXXXXX','3901',13140,'Variation des stocks de produits finis','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13151,'PCG_SUISSE','XXXXXX','XXXXXX','3904',13140,'Variation de la valeur des prestations non facturées','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13152,'PCG_SUISSE','XXXXXX','XXXXXX','4',0,'Charges de matériel, de marchandises et de prestations de tiers','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13153,'PCG_SUISSE','XXXXXX','XXXXXX','4000',13152,'Charges de matériel de l''atelier','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13154,'PCG_SUISSE','XXXXXX','XXXXXX','4200',13152,'Achats de marchandises destinées à la revente','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13155,'PCG_SUISSE','XXXXXX','XXXXXX','4400',13152,'Prestations / travaux de tiers','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13156,'PCG_SUISSE','XXXXXX','XXXXXX','4500',13152,'Charges d''énergie pour l''exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13157,'PCG_SUISSE','XXXXXX','XXXXXX','4900',13152,'Déductions sur les charges','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13158,'PCG_SUISSE','XXXXXX','XXXXXX','5',0,'Charges de personnel','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13159,'PCG_SUISSE','XXXXXX','XXXXXX','5000',13158,'Salaires','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13160,'PCG_SUISSE','XXXXXX','XXXXXX','5200',13158,'Charges de personnel','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13161,'PCG_SUISSE','XXXXXX','XXXXXX','5201',13158,'Salaires variables, commissions et primes régulières','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13162,'PCG_SUISSE','XXXXXX','XXXXXX','5202',13158,'Primes occasionnelles et participations au bénéfice','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13163,'PCG_SUISSE','XXXXXX','XXXXXX','5203',13158,'Divers soumis','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13164,'PCG_SUISSE','XXXXXX','XXXXXX','5204',13158,'Divers non soumis','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13165,'PCG_SUISSE','XXXXXX','XXXXXX','5210',13158,'Honoraires et indemnités CA','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13166,'PCG_SUISSE','XXXXXX','XXXXXX','5270',13158,'AVS, AI, APG, assurance-chômage','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13167,'PCG_SUISSE','XXXXXX','XXXXXX','5271',13158,'Caisse d''allocations familiales','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13168,'PCG_SUISSE','XXXXXX','XXXXXX','52721',13167,'Prévoyance professionnelle','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13169,'PCG_SUISSE','XXXXXX','XXXXXX','52722',13167,'Prévoyance professionnelle complémentaire','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13170,'PCG_SUISSE','XXXXXX','XXXXXX','52731',13167,'Assurance-accidents','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13171,'PCG_SUISSE','XXXXXX','XXXXXX','52732',13167,'Assurance-accidents complémentaire','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13172,'PCG_SUISSE','XXXXXX','XXXXXX','52741',13167,'Assurance IJM','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13173,'PCG_SUISSE','XXXXXX','XXXXXX','52742',13167,'Assurance IJM complémentaire','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13174,'PCG_SUISSE','XXXXXX','XXXXXX','5275',13158,'Autres assurances','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13175,'PCG_SUISSE','XXXXXX','XXXXXX','5276',13158,'Impôts à la source payé par employeur','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13176,'PCG_SUISSE','XXXXXX','XXXXXX','5278',13158,'Caisse professionnelle','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13177,'PCG_SUISSE','XXXXXX','XXXXXX','5279',13158,'Arrondis sur charges sociales','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13178,'PCG_SUISSE','XXXXXX','XXXXXX','5280',13158,'Autres charges de personnel','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13179,'PCG_SUISSE','XXXXXX','XXXXXX','5281',13158,'Frais de voyages/transport','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13180,'PCG_SUISSE','XXXXXX','XXXXXX','5282',13158,'Frais de repas/hébergement','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13181,'PCG_SUISSE','XXXXXX','XXXXXX','5283',13158,'Frais forfaitaires','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13182,'PCG_SUISSE','XXXXXX','XXXXXX','5284',13158,'Frais de représentation, téléphones, divers','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13183,'PCG_SUISSE','XXXXXX','XXXXXX','5288',13158,'Frais de formation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13184,'PCG_SUISSE','XXXXXX','XXXXXX','5289',13158,'Autres frais de personnel','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13185,'PCG_SUISSE','XXXXXX','XXXXXX','5290',13158,'Prestations de travail de tiers','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13186,'PCG_SUISSE','XXXXXX','XXXXXX','5700',13158,'Charges sociales','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13187,'PCG_SUISSE','XXXXXX','XXXXXX','5800',13158,'Autres charges du personnel','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13188,'PCG_SUISSE','XXXXXX','XXXXXX','5900',13158,'Charges de personnels temporaires','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13189,'PCG_SUISSE','XXXXXX','XXXXXX','6',0,'Autres charges d''exploitation, amortissements et ajustement de valeur, résultat financier','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13190,'PCG_SUISSE','XXXXXX','XXXXXX','6000',13189,'Charges de locaux','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13191,'PCG_SUISSE','XXXXXX','XXXXXX','6100',13189,'Entretien, réparations et remplacement des inst. servant à l''exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13192,'PCG_SUISSE','XXXXXX','XXXXXX','6105',13189,'Leasing immobilisations corporelles meubles','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13193,'PCG_SUISSE','XXXXXX','XXXXXX','6200',13189,'Charges de véhicules et de transport','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13194,'PCG_SUISSE','XXXXXX','XXXXXX','6260',13189,'Leasing et location de véhicule','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13195,'PCG_SUISSE','XXXXXX','XXXXXX','6300',13189,'Assurances-choses, droits, taxes, autorisations','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13196,'PCG_SUISSE','XXXXXX','XXXXXX','6400',13189,'Charges d''énergie et évacuation des déchets','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13197,'PCG_SUISSE','XXXXXX','XXXXXX','6500',13189,'Charges d''administration','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13198,'PCG_SUISSE','XXXXXX','XXXXXX','6510',13189,'Téléphone','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13199,'PCG_SUISSE','XXXXXX','XXXXXX','6511',13189,'Internet','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13200,'PCG_SUISSE','XXXXXX','XXXXXX','6512',13189,'Frais de port','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13201,'PCG_SUISSE','XXXXXX','XXXXXX','6560',13189,'Informatique','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13202,'PCG_SUISSE','XXXXXX','XXXXXX','6570',13189,'Charges et leasing d''informatique','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13203,'PCG_SUISSE','XXXXXX','XXXXXX','6571',13189,'Entretien/Hotline Hardware','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13204,'PCG_SUISSE','XXXXXX','XXXXXX','6573',13189,'Disquettes, CD-Rom, etc. Fourniture d''exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13205,'PCG_SUISSE','XXXXXX','XXXXXX','6600',13189,'Publicité','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13206,'PCG_SUISSE','XXXXXX','XXXXXX','6610',13189,'Imprimés publicitaires','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13207,'PCG_SUISSE','XXXXXX','XXXXXX','6640',13189,'Frais de voyage et conseils à la clientèle','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13208,'PCG_SUISSE','XXXXXX','XXXXXX','6641',13189,'Frais de représentation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13209,'PCG_SUISSE','XXXXXX','XXXXXX','6700',13189,'Autres charges d''exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13210,'PCG_SUISSE','XXXXXX','XXXXXX','6800',13189,'Amortissement et ajustement de valeur des postes sur immobilisations corporelles','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13211,'PCG_SUISSE','XXXXXX','XXXXXX','6801',13189,'Intérêts pour emprunts','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13212,'PCG_SUISSE','XXXXXX','XXXXXX','6840',13189,'Frais de banque et des chèques postaux','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13213,'PCG_SUISSE','XXXXXX','XXXXXX','6850',13189,'Produits financiers','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13214,'PCG_SUISSE','XXXXXX','XXXXXX','6900',13189,'Charges financières','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13215,'PCG_SUISSE','XXXXXX','XXXXXX','6920',13189,'Amortissement s/immobilisé. corporelles meubles','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13216,'PCG_SUISSE','XXXXXX','XXXXXX','6930',13189,'Amortissement s/immobilisé. corporelles immeubles','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13217,'PCG_SUISSE','XXXXXX','XXXXXX','6940',13189,'Amortissement s/immobilisé. incorporelles','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13218,'PCG_SUISSE','XXXXXX','XXXXXX','6950',13189,'Produits financiers','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13219,'PCG_SUISSE','XXXXXX','XXXXXX','7',0,'Résultat des activités annexes d''exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13220,'PCG_SUISSE','XXXXXX','XXXXXX','7000',13219,'Produits accessoires','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13221,'PCG_SUISSE','XXXXXX','XXXXXX','7010',13219,'Charges accessoires','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13222,'PCG_SUISSE','XXXXXX','XXXXXX','7400',13219,'Produits sur placements financiers','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13223,'PCG_SUISSE','XXXXXX','XXXXXX','7410',13219,'Charges sur placements financiers','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13224,'PCG_SUISSE','XXXXXX','XXXXXX','7500',13219,'Produits des immeubles d''exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13225,'PCG_SUISSE','XXXXXX','XXXXXX','7510',13219,'Charges des immeubles d''exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13226,'PCG_SUISSE','XXXXXX','XXXXXX','8',0,'Charges hors exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13227,'PCG_SUISSE','XXXXXX','XXXXXX','8000',13226,'Charges hors exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13228,'PCG_SUISSE','XXXXXX','XXXXXX','8100',13226,'Produits hors exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13229,'PCG_SUISSE','XXXXXX','XXXXXX','8500',13226,'Charges extraordinaires, exceptionnelles ou hors période','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13230,'PCG_SUISSE','XXXXXX','XXXXXX','8510',13226,'Produits extraordinaires, exceptionnels ou hors période','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13231,'PCG_SUISSE','XXXXXX','XXXXXX','8900',13226,'Impôts directs','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13232,'PCG_SUISSE','XXXXXX','XXXXXX','9',0,'Produits de vente et de services','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13233,'PCG_SUISSE','XXXXXX','XXXXXX','9001',13232,'Charges de vente et de services','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13234,'PCG_SUISSE','XXXXXX','XXXXXX','9002',13232,'Résultat brut 1','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13235,'PCG_SUISSE','XXXXXX','XXXXXX','9006',13232,'Charges de personnel de production','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13236,'PCG_SUISSE','XXXXXX','XXXXXX','9007',13232,'Résultat brut 2','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13237,'PCG_SUISSE','XXXXXX','XXXXXX','9008',13232,'Autres charges de personnel','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13238,'PCG_SUISSE','XXXXXX','XXXXXX','9009',13232,'Résultat brut 3','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13239,'PCG_SUISSE','XXXXXX','XXXXXX','9010',13232,'Autres charges d''exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13240,'PCG_SUISSE','XXXXXX','XXXXXX','9011',13232,'Résultat d''exploitation 1','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13241,'PCG_SUISSE','XXXXXX','XXXXXX','9012',13232,'Résultat financier','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13242,'PCG_SUISSE','XXXXXX','XXXXXX','9013',13232,'Résultat d''exploitation 2','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13243,'PCG_SUISSE','XXXXXX','XXXXXX','9014',13232,'Amortissements','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13244,'PCG_SUISSE','XXXXXX','XXXXXX','9015',13232,'Résultat d''exploitation 3','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13245,'PCG_SUISSE','XXXXXX','XXXXXX','9016',13232,'Résultat activités annexes exploitation','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13246,'PCG_SUISSE','XXXXXX','XXXXXX','9017',13232,'Résultat d''exploitation 4','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13247,'PCG_SUISSE','XXXXXX','XXXXXX','9018',13232,'Résultats extraordinaires','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13248,'PCG_SUISSE','XXXXXX','XXXXXX','9019',13232,'Résultat d''entreprise avant impôts','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13249,'PCG_SUISSE','XXXXXX','XXXXXX','9020',13232,'Charges d''impôts','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13250,'PCG_SUISSE','XXXXXX','XXXXXX','9090',13232,'Résultat d''entreprise','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13251,'PCG_SUISSE','XXXXXX','XXXXXX','9100',13232,'Bilan d''ouverture','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13252,'PCG_SUISSE','XXXXXX','XXXXXX','9101',13232,'Bilan de clôture','1');
|
||||
INSERT INTO llx_accounting_account (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (13253,'PCG_SUISSE','XXXXXX','XXXXXX','9200',13232,'Bénéfice / perte de l''exercice','1');
|
||||
|
||||
1227
htdocs/install/mysql/data/llx_accounting_account_ci.sql
Normal file
1227
htdocs/install/mysql/data/llx_accounting_account_ci.sql
Normal file
File diff suppressed because it is too large
Load Diff
1227
htdocs/install/mysql/data/llx_accounting_account_cm.sql
Normal file
1227
htdocs/install/mysql/data/llx_accounting_account_cm.sql
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1227
htdocs/install/mysql/data/llx_accounting_account_ga.sql
Normal file
1227
htdocs/install/mysql/data/llx_accounting_account_ga.sql
Normal file
File diff suppressed because it is too large
Load Diff
1227
htdocs/install/mysql/data/llx_accounting_account_gq.sql
Normal file
1227
htdocs/install/mysql/data/llx_accounting_account_gq.sql
Normal file
File diff suppressed because it is too large
Load Diff
1227
htdocs/install/mysql/data/llx_accounting_account_km.sql
Normal file
1227
htdocs/install/mysql/data/llx_accounting_account_km.sql
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1227
htdocs/install/mysql/data/llx_accounting_account_ml.sql
Normal file
1227
htdocs/install/mysql/data/llx_accounting_account_ml.sql
Normal file
File diff suppressed because it is too large
Load Diff
1227
htdocs/install/mysql/data/llx_accounting_account_ne.sql
Normal file
1227
htdocs/install/mysql/data/llx_accounting_account_ne.sql
Normal file
File diff suppressed because it is too large
Load Diff
1227
htdocs/install/mysql/data/llx_accounting_account_sn.sql
Normal file
1227
htdocs/install/mysql/data/llx_accounting_account_sn.sql
Normal file
File diff suppressed because it is too large
Load Diff
1227
htdocs/install/mysql/data/llx_accounting_account_td.sql
Normal file
1227
htdocs/install/mysql/data/llx_accounting_account_td.sql
Normal file
File diff suppressed because it is too large
Load Diff
1227
htdocs/install/mysql/data/llx_accounting_account_tg.sql
Normal file
1227
htdocs/install/mysql/data/llx_accounting_account_tg.sql
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -157,6 +157,7 @@ ALTER TABLE llx_loan ADD COLUMN fk_projet integer DEFAULT NULL;
|
||||
|
||||
ALTER TABLE llx_holiday ADD COLUMN fk_user_modif integer;
|
||||
ALTER TABLE llx_projet ADD COLUMN fk_user_modif integer;
|
||||
ALTER TABLE llx_projet_task ADD COLUMN fk_user_modif integer;
|
||||
|
||||
ALTER TABLE llx_projet_task_time ADD COLUMN datec date;
|
||||
ALTER TABLE llx_projet_task_time ADD COLUMN tms timestamp;
|
||||
|
||||
@ -178,6 +178,8 @@ CREATE TABLE llx_websiteaccount(
|
||||
login varchar(64) NOT NULL,
|
||||
pass_crypted varchar(128),
|
||||
pass_temp varchar(128), -- temporary password when asked for forget password
|
||||
fk_soc integer,
|
||||
fk_website integer,
|
||||
date_last_login datetime,
|
||||
date_previous_login datetime,
|
||||
date_creation datetime NOT NULL,
|
||||
@ -185,8 +187,7 @@ CREATE TABLE llx_websiteaccount(
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14),
|
||||
status integer,
|
||||
fk_soc integer
|
||||
status integer
|
||||
) ENGINE=innodb;
|
||||
|
||||
|
||||
@ -217,7 +218,8 @@ CREATE TABLE IF NOT EXISTS llx_expensereport_ik (
|
||||
fk_c_exp_tax_cat integer DEFAULT 0 NOT NULL,
|
||||
fk_range integer DEFAULT 0 NOT NULL,
|
||||
coef double DEFAULT 0 NOT NULL,
|
||||
offset double DEFAULT 0 NOT NULL
|
||||
ikoffset double DEFAULT 0 NOT NULL,
|
||||
active integer DEFAULT 1
|
||||
)ENGINE=innodb;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS llx_c_exp_tax_cat (
|
||||
@ -259,21 +261,21 @@ INSERT INTO llx_c_type_fees (code, label, active, accountancy_code) VALUES
|
||||
('EX_PAR_VP', 'ExpLabelParkingPV', 0, '625160'),
|
||||
('EX_CAM_VP', 'ExpLabelMaintenanceRepairPV', 0, '615300');
|
||||
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (1,4, 1, 0.41, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (2,4, 2, 0.244, 824);
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (3,4, 3, 0.286, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (4,5, 4, 0.493, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (5,5, 5, 0.277, 1082);
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (6,5, 6, 0.332, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (7,6, 7, 0.543, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (8,6, 8, 0.305, 1180);
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (9,6, 9, 0.364, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (10,7, 10, 0.568, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (11,7, 11, 0.32, 1244);
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (12,7, 12, 0.382, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (13,8, 13, 0.595, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (14,8, 14, 0.337, 1288);
|
||||
INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, offset) values (15,8, 15, 0.401, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (1,4, 1, 0.41, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (2,4, 2, 0.244, 824);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (3,4, 3, 0.286, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (4,5, 4, 0.493, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (5,5, 5, 0.277, 1082);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (6,5, 6, 0.332, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (7,6, 7, 0.543, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (8,6, 8, 0.305, 1180);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (9,6, 9, 0.364, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (10,7, 10, 0.568, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (11,7, 11, 0.32, 1244);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (12,7, 12, 0.382, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (13,8, 13, 0.595, 0);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (14,8, 14, 0.337, 1288);
|
||||
INSERT INTO llx_expensereport_ik (rowid, fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (15,8, 15, 0.401, 0);
|
||||
|
||||
|
||||
INSERT INTO llx_c_exp_tax_cat (rowid, label, entity, active) values (1,'ExpAutoCat', 1, 1);
|
||||
@ -349,7 +351,7 @@ ALTER TABLE llx_extrafields ADD COLUMN fk_user_modif integer;
|
||||
ALTER TABLE llx_extrafields ADD COLUMN datec datetime;
|
||||
ALTER TABLE llx_extrafields ADD COLUMN tms timestamp;
|
||||
|
||||
-- We fix value of 'list' fro m0 to 1 for all extrafields created before this migration
|
||||
-- We fix value of 'list' from 0 to 1 for all extrafields created before this migration
|
||||
UPDATE llx_extrafields SET list = 1 WHERE list = 0 AND fk_user_author IS NULL and fk_user_modif IS NULL and datec IS NULL;
|
||||
|
||||
ALTER TABLE llx_extrafields MODIFY COLUMN list integer DEFAULT 1;
|
||||
@ -414,12 +416,12 @@ DELETE FROM llx_const WHERE name = __ENCRYPT('ACCOUNTING_EXPORT_DEVISE')__;
|
||||
DELETE FROM llx_const WHERE name = __ENCRYPT('ACCOUNTING_EXPORT_PIECE')__;
|
||||
DELETE FROM llx_const WHERE name = __ENCRYPT('ACCOUNTING_EXPENSEREPORT_JOURNAL')__;
|
||||
|
||||
ALTER TABLE llx_c_paiement DROP PRIMARY KEY;
|
||||
-- VMYSQL4.1 ALTER TABLE llx_c_paiement DROP PRIMARY KEY;
|
||||
ALTER TABLE llx_c_paiement ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER id;
|
||||
ALTER TABLE llx_c_paiement DROP INDEX uk_c_paiement;
|
||||
ALTER TABLE llx_c_paiement ADD UNIQUE INDEX uk_c_paiement(id, entity, code);
|
||||
|
||||
ALTER TABLE llx_c_payment_term DROP PRIMARY KEY;
|
||||
-- VMYSQL4.1 ALTER TABLE llx_c_payment_term DROP PRIMARY KEY;
|
||||
ALTER TABLE llx_c_payment_term ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid;
|
||||
ALTER TABLE llx_c_payment_term ADD UNIQUE INDEX uk_c_payment_term(rowid, entity, code);
|
||||
|
||||
@ -457,5 +459,17 @@ UPDATE llx_accounting_system SET fk_country = 6 WHERE pcg_version = 'PCG_SUISSE
|
||||
UPDATE llx_accounting_system SET fk_country =140 WHERE pcg_version = 'PCN-LUXEMBURG';
|
||||
UPDATE llx_accounting_system SET fk_country = 12 WHERE pcg_version = 'PCG';
|
||||
|
||||
|
||||
-- VPGSQL8.2 CREATE SEQUENCE llx_supplier_proposal_rowid_seq;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_supplier_proposal ALTER COLUMN rowid SET DEFAULT nextval('llx_supplier_proposal_rowid_seq');
|
||||
-- VPGSQL8.2 ALTER TABLE llx_supplier_proposal ALTER COLUMN rowid SET NOT NULL;
|
||||
-- VPGSQL8.2 SELECT setval('llx_supplier_proposal_rowid_seq', (SELECT MAX(rowid) FROM llx_supplier_proposal));
|
||||
|
||||
-- VPGSQL8.2 CREATE SEQUENCE llx_supplier_proposaldet_rowid_seq;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_supplier_proposaldet ALTER COLUMN rowid SET DEFAULT nextval('llx_supplier_proposaldet_rowid_seq');
|
||||
-- VPGSQL8.2 ALTER TABLE llx_supplier_proposaldet ALTER COLUMN rowid SET NOT NULL;
|
||||
-- VPGSQL8.2 SELECT setval('llx_supplier_proposaldet_rowid_seq', (SELECT MAX(rowid) FROM llx_supplier_proposaldet));
|
||||
|
||||
|
||||
-- May have error due to duplicate keys
|
||||
ALTER TABLE llx_resource ADD UNIQUE INDEX uk_resource_ref (ref, entity);
|
||||
|
||||
@ -25,5 +25,6 @@ CREATE TABLE IF NOT EXISTS llx_expensereport_ik (
|
||||
fk_c_exp_tax_cat integer DEFAULT 0 NOT NULL,
|
||||
fk_range integer DEFAULT 0 NOT NULL,
|
||||
coef double DEFAULT 0 NOT NULL,
|
||||
offset double DEFAULT 0 NOT NULL
|
||||
ikoffset double DEFAULT 0 NOT NULL,
|
||||
active integer DEFAULT 1
|
||||
)ENGINE=innodb;
|
||||
@ -34,9 +34,8 @@ create table llx_extrafields
|
||||
pos integer DEFAULT 0,
|
||||
alwayseditable integer DEFAULT 0, -- 1 if field can be edited whatever is element status
|
||||
param text, -- extra parameters to define possible values of field
|
||||
list integer DEFAULT 1, -- list of values for field that are combo lists
|
||||
list integer DEFAULT 1, -- visibility of field. 0=Never visible, 1=Visible on list and forms, 2=Visible on list only. Using a negative value means field is not shown by default on list but can be selected for viewing
|
||||
langs varchar(64), -- example: fileofmymodule@mymodule
|
||||
ishidden integer DEFAULT 0, -- Can be foreign key of external system
|
||||
fk_user_author integer, -- user making creation
|
||||
fk_user_modif integer, -- user making last change
|
||||
datec datetime, -- date de creation
|
||||
|
||||
@ -36,6 +36,7 @@ create table llx_projet_task
|
||||
progress integer DEFAULT 0, -- percentage increase
|
||||
priority integer DEFAULT 0, -- priority
|
||||
fk_user_creat integer, -- user who created the task
|
||||
fk_user_modif integer, -- user who modify the task
|
||||
fk_user_valid integer, -- user who validated the task
|
||||
fk_statut smallint DEFAULT 0 NOT NULL,
|
||||
note_private text,
|
||||
|
||||
@ -23,7 +23,7 @@ CREATE TABLE llx_website
|
||||
entity integer DEFAULT 1,
|
||||
ref varchar(128) NOT NULL,
|
||||
description varchar(255),
|
||||
status integer,
|
||||
status integer DEFAULT 1,
|
||||
fk_default_home integer,
|
||||
virtualhost varchar(255),
|
||||
fk_user_create integer,
|
||||
|
||||
@ -17,10 +17,12 @@
|
||||
-- BEGIN MODULEBUILDER INDEXES
|
||||
ALTER TABLE llx_websiteaccount ADD INDEX idx_websiteaccount_rowid (rowid);
|
||||
ALTER TABLE llx_websiteaccount ADD INDEX idx_websiteaccount_login (login);
|
||||
ALTER TABLE llx_websiteaccount ADD INDEX idx_websiteaccount_import_key (import_key);
|
||||
ALTER TABLE llx_websiteaccount ADD INDEX idx_websiteaccount_status (status);
|
||||
ALTER TABLE llx_websiteaccount ADD INDEX idx_websiteaccount_fk_website (fk_website);
|
||||
ALTER TABLE llx_websiteaccount ADD INDEX idx_websiteaccount_fk_soc (fk_soc);
|
||||
-- END MODULEBUILDER INDEXES
|
||||
|
||||
ALTER TABLE llx_websiteaccount ADD UNIQUE INDEX uk_websiteaccount_login_website_soc(login, fk_website, fk_soc);
|
||||
|
||||
--ALTER TABLE llx_websiteaccount ADD CONSTRAINT llx_websiteaccount_field_id FOREIGN KEY (fk_field) REFERENCES llx_myotherobject(rowid);
|
||||
|
||||
|
||||
@ -20,6 +20,8 @@ CREATE TABLE llx_websiteaccount(
|
||||
login varchar(64) NOT NULL,
|
||||
pass_crypted varchar(128),
|
||||
pass_temp varchar(128), -- temporary password when asked for forget password
|
||||
fk_soc integer,
|
||||
fk_website integer,
|
||||
date_last_login datetime,
|
||||
date_previous_login datetime,
|
||||
date_creation datetime NOT NULL,
|
||||
@ -27,7 +29,6 @@ CREATE TABLE llx_websiteaccount(
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14),
|
||||
status integer,
|
||||
fk_soc integer
|
||||
status integer
|
||||
-- END MODULEBUILDER FIELDS
|
||||
) ENGINE=innodb;
|
||||
@ -43,7 +43,7 @@ error_reporting(0); // Disable all errors
|
||||
error_reporting($err);
|
||||
|
||||
$action=GETPOST('action','aZ09');
|
||||
$setuplang=(GETPOST('selectlang','',3)?GETPOST('selectlang','',3):'auto');
|
||||
$setuplang=(GETPOST('selectlang','aZ09',3)?GETPOST('selectlang','aZ09',3):'auto');
|
||||
$langs->setDefaultLang($setuplang);
|
||||
|
||||
$langs->load("admin");
|
||||
|
||||
@ -32,7 +32,7 @@ require_once $dolibarr_main_document_root.'/core/lib/admin.lib.php';
|
||||
|
||||
global $langs;
|
||||
|
||||
$setuplang=(GETPOST('selectlang','',3)?GETPOST('selectlang','',3):'auto');
|
||||
$setuplang=(GETPOST('selectlang','aZ09',3)?GETPOST('selectlang','aZ09',3):'auto');
|
||||
$langs->setDefaultLang($setuplang);
|
||||
|
||||
$langs->load("admin");
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user