';
if ($picto) $return .= ''.img_picto('', $picto, 'class="valignmiddle widthpictotitle pictotitle"', $pictoisfullpath).' ';
$return .= '';
$return .= ''.$titre.'
';
@@ -4267,8 +4289,9 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
print ''; // maring bottom must be same than into load_fiche_tire
// Left
+
+ if ($picto && $titre) print ''.img_picto('', $picto, 'class="valignmiddle pictotitle widthpictotitle"', $pictoisfullpath).' ';
print '';
- if ($picto && $titre) print img_picto('', $picto, 'class="hideonsmartphone valignmiddle opacityhigh pictotitle widthpictotitle"', $pictoisfullpath);
print ''.$titre;
if (!empty($titre) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') print ' ('.$totalnboflines.')';
print '
';
@@ -5344,10 +5367,10 @@ function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $id
/**
* Return yes or no in current language
*
- * @param string $yesno Value to test (1, 'yes', 'true' or 0, 'no', 'false')
- * @param integer $case 1=Yes/No, 0=yes/no, 2=Disabled checkbox, 3=Disabled checkbox + Yes/No
- * @param int $color 0=texte only, 1=Text is formated with a color font style ('ok' or 'error'), 2=Text is formated with 'ok' color.
- * @return string HTML string
+ * @param string|int $yesno Value to test (1, 'yes', 'true' or 0, 'no', 'false')
+ * @param integer $case 1=Yes/No, 0=yes/no, 2=Disabled checkbox, 3=Disabled checkbox + Yes/No
+ * @param int $color 0=texte only, 1=Text is formated with a color font style ('ok' or 'error'), 2=Text is formated with 'ok' color.
+ * @return string HTML string
*/
function yn($yesno, $case = 1, $color = 0)
{
@@ -5559,22 +5582,27 @@ function dol_string_nohtmltag($stringtoclean, $removelinefeed = 1, $pagecodeto =
/**
* Clean a string to keep only desirable HTML tags.
*
- * @param string $stringtoclean String to clean
- * @return string String cleaned
+ * @param string $stringtoclean String to clean
+ * @param string $cleanalsosomestyles Clean also some tags
+ * @return string String cleaned
*
* @see dol_escape_htmltag() strip_tags() dol_string_nohtmltag() dol_string_neverthesehtmltags()
*/
-function dol_string_onlythesehtmltags($stringtoclean)
+function dol_string_onlythesehtmltags($stringtoclean, $cleanalsosomestyles = 1)
{
$allowed_tags = array(
- "html", "head", "meta", "body", "article", "a", "b", "br", "div", "em", "font", "img", "ins", "hr", "i", "li", "link",
+ "html", "head", "meta", "body", "article", "a", "b", "br", "div", "dl", "dd", "dt", "em", "font", "img", "ins", "hr", "i", "li", "link",
"ol", "p", "s", "section", "span", "strong", "title",
"table", "tr", "th", "td", "u", "ul"
);
-
$allowed_tags_string = join("><", $allowed_tags);
$allowed_tags_string = preg_replace('/^>/', '', $allowed_tags_string);
$allowed_tags_string = preg_replace('/<$/', '', $allowed_tags_string);
+ $allowed_tags_string = '<'.$allowed_tags_string.'>';
+
+ if ($cleanalsosomestyles) {
+ $stringtoclean = preg_replace('/position\s*:\s*(absolute|fixed)\s*!\s*important/', '', $stringtoclean); // Note: If hacker try to introduce css comment into string to avoid this, string should be encoded by the dol_htmlentitiesbr so be harmless
+ }
$temp = strip_tags($stringtoclean, $allowed_tags_string);
@@ -5583,14 +5611,16 @@ function dol_string_onlythesehtmltags($stringtoclean)
/**
* Clean a string from some undesirable HTML tags.
+ * Note. Not enough secured as dol_string_onlythesehtmltags().
*
- * @param string $stringtoclean String to clean
- * @param array $disallowed_tags Array of tags not allowed
- * @return string String cleaned
+ * @param string $stringtoclean String to clean
+ * @param array $disallowed_tags Array of tags not allowed
+ * @param string $cleanalsosomestyles Clean also some tags
+ * @return string String cleaned
*
* @see dol_escape_htmltag() strip_tags() dol_string_nohtmltag() dol_string_onlythesehtmltags()
*/
-function dol_string_neverthesehtmltags($stringtoclean, $disallowed_tags = array('textarea'))
+function dol_string_neverthesehtmltags($stringtoclean, $disallowed_tags = array('textarea'), $cleanalsosomestyles = 0)
{
$temp = $stringtoclean;
foreach ($disallowed_tags as $tagtoremove)
@@ -5598,6 +5628,11 @@ function dol_string_neverthesehtmltags($stringtoclean, $disallowed_tags = array(
$temp = preg_replace('/<\/?'.$tagtoremove.'>/', '', $temp);
$temp = preg_replace('/<\/?'.$tagtoremove.'\s+[^>]*>/', '', $temp);
}
+
+ if ($cleanalsosomestyles) {
+ $temp = preg_replace('/position\s*:\s*(absolute|fixed)\s*!\s*important/', '', $temp); // Note: If hacker try to introduce css comment into string to avoid this, string should be encoded by the dol_htmlentitiesbr so be harmless
+ }
+
return $temp;
}
@@ -6095,7 +6130,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
$substitutionarray['__REFCLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null));
$substitutionarray['__REFSUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null);
$substitutionarray['__SUPPLIER_ORDER_DATE_DELIVERY__'] = (isset($object->date_livraison) ? dol_print_date($object->date_livraison, 'day', 0, $outputlangs) : '');
- $substitutionarray['__SUPPLIER_ORDER_DELAY_DELIVERY__'] = $outputlangs->transnoentities("AvailabilityType".$object->availability_code)!=('AvailabilityType'.$object->availability_code)?$outputlangs->transnoentities("AvailabilityType".$object->availability_code):$outputlangs->convToOutputCharset(isset($object->availability)?$object->availability:'');
+ $substitutionarray['__SUPPLIER_ORDER_DELAY_DELIVERY__'] = $outputlangs->transnoentities("AvailabilityType".$object->availability_code) != ('AvailabilityType'.$object->availability_code) ? $outputlangs->transnoentities("AvailabilityType".$object->availability_code) : $outputlangs->convToOutputCharset(isset($object->availability) ? $object->availability : '');
$birthday = dol_print_date($object->birth, 'day');
@@ -6910,6 +6945,24 @@ function utf8_check($str)
return true;
}
+/**
+ * Check if a string is in ASCII
+ *
+ * @param string $str String to check
+ * @return boolean True if string is ASCII, False if not (byte value > 0x7F)
+ */
+function ascii_check($str)
+{
+ if (function_exists('mb_check_encoding')) {
+ //if (mb_detect_encoding($str, 'ASCII', true) return false;
+ if (!mb_check_encoding($str, 'ASCII')) return false;
+ } else {
+ if (preg_match('/[^\x00-\x7f]/', $str)) return false; // Contains a byte > 7f
+ }
+
+ return true;
+}
+
/**
* Return a string encoded into OS filesystem encoding. This function is used to define
@@ -7992,7 +8045,7 @@ function dol_mimetype($file, $default = 'application/octet-stream', $mode = 0)
if (preg_match('/\.bas$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'bas'; $famime = 'file-code-o'; }
if (preg_match('/\.(c)$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'c'; $famime = 'file-code-o'; }
if (preg_match('/\.(cpp)$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'cpp'; $famime = 'file-code-o'; }
- if (preg_match('/\.cs$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'cs'; $famime = 'file-code-o'; }
+ if (preg_match('/\.cs$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'cs'; $famime = 'file-code-o'; }
if (preg_match('/\.(h)$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'h'; $famime = 'file-code-o'; }
if (preg_match('/\.(java|jsp)$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'text.png'; $srclang = 'java'; $famime = 'file-code-o'; }
if (preg_match('/\.php([0-9]{1})?$/i', $tmpfile)) { $mime = 'text/plain'; $imgmime = 'php.png'; $srclang = 'php'; $famime = 'file-code-o'; }
diff --git a/htdocs/core/lib/functionsnumtoword.lib.php b/htdocs/core/lib/functionsnumtoword.lib.php
index e056360ec29..26db2bbec90 100644
--- a/htdocs/core/lib/functionsnumtoword.lib.php
+++ b/htdocs/core/lib/functionsnumtoword.lib.php
@@ -25,7 +25,7 @@
/**
* Function to return number in text.
- *
+ * May use module NUMBERWORDS if found.
*
* @param float $num Number to convert
* @param Translate $langs Language
@@ -38,24 +38,24 @@ function dol_convertToWord($num, $langs, $currency = false, $centimes = false)
global $conf;
$num = str_replace(array(',', ' '), '', trim($num));
- if (! $num) {
+ if (!$num) {
return false;
}
+
if ($centimes && strlen($num) == 1) {
- $num = $num*10;
+ $num = $num * 10;
}
- if (! empty($conf->global->MAIN_MODULE_NUMBERWORDS)) {
-
- if ($currency == true) {
+
+ if (!empty($conf->global->MAIN_MODULE_NUMBERWORDS)) {
+ if ($currency) {
$type = 1;
- }else{
+ } else {
$type = 0;
}
$concatWords = $langs->getLabelFromNumber($num, $type);
return $concatWords;
-
- }else{
+ } else {
$TNum = explode('.', $num);
$num = (int) $TNum[0];
$words = array();
@@ -106,24 +106,24 @@ function dol_convertToWord($num, $langs, $currency = false, $centimes = false)
$num_length = strlen($num);
$levels = (int) (($num_length + 2) / 3);
$max_length = $levels * 3;
- $num = substr('00' . $num, -$max_length);
+ $num = substr('00'.$num, -$max_length);
$num_levels = str_split($num, 3);
$nboflevels = count($num_levels);
for ($i = 0; $i < $nboflevels; $i++) {
$levels--;
$hundreds = (int) ($num_levels[$i] / 100);
- $hundreds = ($hundreds ? ' ' . $list1[$hundreds] . ' '.$langs->transnoentities('hundred') . ( $hundreds == 1 ? '' : 's' ) . ' ': '');
+ $hundreds = ($hundreds ? ' '.$list1[$hundreds].' '.$langs->transnoentities('hundred').($hundreds == 1 ? '' : 's').' ' : '');
$tens = (int) ($num_levels[$i] % 100);
$singles = '';
- if ( $tens < 20 ) {
- $tens = ($tens ? ' ' . $list1[$tens] . ' ' : '' );
+ if ($tens < 20) {
+ $tens = ($tens ? ' '.$list1[$tens].' ' : '');
} else {
$tens = (int) ($tens / 10);
- $tens = ' ' . $list2[$tens] . ' ';
+ $tens = ' '.$list2[$tens].' ';
$singles = (int) ($num_levels[$i] % 10);
- $singles = ' ' . $list1[$singles] . ' ';
+ $singles = ' '.$list1[$singles].' ';
}
- $words[] = $hundreds . $tens . $singles . ( ( $levels && ( int ) ( $num_levels[$i] ) ) ? ' ' . $list3[$levels] . ' ' : '' );
+ $words[] = $hundreds.$tens.$singles.(($levels && (int) ($num_levels[$i])) ? ' '.$list3[$levels].' ' : '');
} //end for loop
$commas = count($words);
if ($commas > 1) {
@@ -133,15 +133,15 @@ function dol_convertToWord($num, $langs, $currency = false, $centimes = false)
// Delete multi whitespaces
$concatWords = trim(preg_replace('/[ ]+/', ' ', $concatWords));
- if(!empty($currency)) {
+ if (!empty($currency)) {
$concatWords .= ' '.$currency;
}
// If we need to write cents call again this function for cents
- if(!empty($TNum[1])) {
- if(!empty($currency)) $concatWords .= ' '.$langs->transnoentities('and');
+ if (!empty($TNum[1])) {
+ if (!empty($currency)) $concatWords .= ' '.$langs->transnoentities('and');
$concatWords .= ' '.dol_convertToWord($TNum[1], $langs, $currency, true);
- if(!empty($currency)) $concatWords .= ' '.$langs->transnoentities('centimes');
+ if (!empty($currency)) $concatWords .= ' '.$langs->transnoentities('centimes');
}
return $concatWords;
}
@@ -165,35 +165,35 @@ function dolNumberToWord($numero, $langs, $numorcurrency = 'number')
return -1;
// Get 2 decimals to cents, another functions round or truncate
$strnumber = number_format($numero, 10);
- $len=strlen($strnumber);
- for ($i=0; $i<$len; $i++)
+ $len = strlen($strnumber);
+ for ($i = 0; $i < $len; $i++)
{
- if ($strnumber[$i]=='.') {
- $parte_decimal = $strnumber[$i+1].$strnumber[$i+2];
+ if ($strnumber[$i] == '.') {
+ $parte_decimal = $strnumber[$i + 1].$strnumber[$i + 2];
break;
}
}
/*In dolibarr 3.6.2 (my current version) doesn't have $langs->default and
in case exist why ask $lang like a parameter?*/
- if (((is_object($langs) && $langs->default == 'es_MX') || (! is_object($langs) && $langs == 'es_MX')) && $numorcurrency == 'currency')
+ if (((is_object($langs) && $langs->default == 'es_MX') || (!is_object($langs) && $langs == 'es_MX')) && $numorcurrency == 'currency')
{
- if ($numero>=1 && $numero<2) {
+ if ($numero >= 1 && $numero < 2) {
return ("UN PESO ".$parte_decimal." / 100 M.N.");
}
- elseif ($numero>=0 && $numero<1){
+ elseif ($numero >= 0 && $numero < 1) {
return ("CERO PESOS ".$parte_decimal." / 100 M.N.");
}
- elseif ($numero>=1000000 && $numero<1000001){
+ elseif ($numero >= 1000000 && $numero < 1000001) {
return ("UN MILLÓN DE PESOS ".$parte_decimal." / 100 M.N.");
}
- elseif ($numero>=1000000000000 && $numero<1000000000001){
+ elseif ($numero >= 1000000000000 && $numero < 1000000000001) {
return ("UN BILLÓN DE PESOS ".$parte_decimal." / 100 M.N.");
}
else {
- $entexto ="";
+ $entexto = "";
$number = $numero;
- if ($number >= 1000000000){
+ if ($number >= 1000000000) {
$CdMMillon = (int) ($numero / 100000000000);
$numero = $numero - $CdMMillon * 100000000000;
$DdMMillon = (int) ($numero / 10000000000);
@@ -203,7 +203,7 @@ function dolNumberToWord($numero, $langs, $numorcurrency = 'number')
$entexto .= hundreds2text($CdMMillon, $DdMMillon, $UdMMillon);
$entexto .= " MIL ";
}
- if ($number >= 1000000){
+ if ($number >= 1000000) {
$CdMILLON = (int) ($numero / 100000000);
$numero = $numero - $CdMILLON * 100000000;
$DdMILLON = (int) ($numero / 10000000);
@@ -211,7 +211,7 @@ function dolNumberToWord($numero, $langs, $numorcurrency = 'number')
$udMILLON = (int) ($numero / 1000000);
$numero = $numero - $udMILLON * 1000000;
$entexto .= hundreds2text($CdMILLON, $DdMILLON, $udMILLON);
- if (!$CdMMillon && !$DdMMillon && !$UdMMillon && !$CdMILLON && !$DdMILLON && $udMILLON==1)
+ if (!$CdMMillon && !$DdMMillon && !$UdMMillon && !$CdMILLON && !$DdMILLON && $udMILLON == 1)
$entexto .= " MILLÓN ";
else
$entexto .= " MILLONES ";
@@ -232,7 +232,7 @@ function dolNumberToWord($numero, $langs, $numorcurrency = 'number')
$d = (int) ($numero / 10);
$u = (int) $numero - $d * 10;
$entexto .= hundreds2text($c, $d, $u);
- if (!$cdm && !$ddm && !$udm && !$c && !$d && !$u && $number>1000000)
+ if (!$cdm && !$ddm && !$udm && !$c && !$d && !$u && $number > 1000000)
$entexto .= " DE";
$entexto .= " PESOS ".$parte_decimal." / 100 M.N.";
}
@@ -250,40 +250,40 @@ function dolNumberToWord($numero, $langs, $numorcurrency = 'number')
*/
function hundreds2text($hundreds, $tens, $units)
{
- if ($hundreds==1 && $tens==0 && $units==0){
+ if ($hundreds == 1 && $tens == 0 && $units == 0) {
return "CIEN";
}
- $centenas = array("CIENTO","DOSCIENTOS","TRESCIENTOS","CUATROCIENTOS","QUINIENTOS","SEISCIENTOS","SETECIENTOS","OCHOCIENTOS","NOVECIENTOS");
- $decenas = array("","","TREINTA ","CUARENTA ","CINCUENTA ","SESENTA ","SETENTA ","OCHENTA ","NOVENTA ");
- $veintis = array("VEINTE","VEINTIUN","VEINTIDÓS","VEINTITRÉS","VEINTICUATRO","VEINTICINCO","VEINTISÉIS","VEINTISIETE","VEINTIOCHO","VEINTINUEVE");
- $diecis = array("DIEZ","ONCE","DOCE","TRECE","CATORCE","QUINCE","DIECISÉIS","DIECISIETE","DIECIOCHO","DIECINUEVE");
- $unidades = array("UN","DOS","TRES","CUATRO","CINCO","SEIS","SIETE","OCHO","NUEVE");
+ $centenas = array("CIENTO", "DOSCIENTOS", "TRESCIENTOS", "CUATROCIENTOS", "QUINIENTOS", "SEISCIENTOS", "SETECIENTOS", "OCHOCIENTOS", "NOVECIENTOS");
+ $decenas = array("", "", "TREINTA ", "CUARENTA ", "CINCUENTA ", "SESENTA ", "SETENTA ", "OCHENTA ", "NOVENTA ");
+ $veintis = array("VEINTE", "VEINTIUN", "VEINTIDÓS", "VEINTITRÉS", "VEINTICUATRO", "VEINTICINCO", "VEINTISÉIS", "VEINTISIETE", "VEINTIOCHO", "VEINTINUEVE");
+ $diecis = array("DIEZ", "ONCE", "DOCE", "TRECE", "CATORCE", "QUINCE", "DIECISÉIS", "DIECISIETE", "DIECIOCHO", "DIECINUEVE");
+ $unidades = array("UN", "DOS", "TRES", "CUATRO", "CINCO", "SEIS", "SIETE", "OCHO", "NUEVE");
$entexto = "";
- if ($hundreds!=0){
- $entexto .= $centenas[$hundreds-1];
+ if ($hundreds != 0) {
+ $entexto .= $centenas[$hundreds - 1];
}
- if ($tens>2){
- if ($hundreds!=0) $entexto .= " ";
- $entexto .= $decenas[$tens-1];
- if ($units!=0){
+ if ($tens > 2) {
+ if ($hundreds != 0) $entexto .= " ";
+ $entexto .= $decenas[$tens - 1];
+ if ($units != 0) {
$entexto .= " Y ";
- $entexto .= $unidades[$units-1];
+ $entexto .= $unidades[$units - 1];
}
return $entexto;
}
- elseif ($tens==2){
- if ($hundreds!=0) $entexto .= " ";
+ elseif ($tens == 2) {
+ if ($hundreds != 0) $entexto .= " ";
$entexto .= " ".$veintis[$units];
return $entexto;
}
- elseif ($tens==1){
- if ($hundreds!=0) $entexto .= " ";
+ elseif ($tens == 1) {
+ if ($hundreds != 0) $entexto .= " ";
$entexto .= $diecis[$units];
return $entexto;
}
- if ($units!=0) {
- if ($hundreds!=0 || $tens!=0) $entexto .= " ";
- $entexto .= $unidades[$units-1];
+ if ($units != 0) {
+ if ($hundreds != 0 || $tens != 0) $entexto .= " ";
+ $entexto .= $unidades[$units - 1];
}
return $entexto;
}
diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php
index 9cf28ff20ee..54555eb018c 100644
--- a/htdocs/core/lib/product.lib.php
+++ b/htdocs/core/lib/product.lib.php
@@ -504,7 +504,7 @@ function measuring_units_string($scale = '', $measuring_style = '', $unit = 0, $
* Return translation label of a unit key
*
* @param int $unit ID of unit (rowid in llx_c_units table)
- * @param string $measuring_style Style of unit: weight, volume,...
+ * @param string $measuring_style Style of unit: 'weight', 'volume', ..., '' = 'net_measure' for option PRODUCT_ADD_NET_MEASURE
* @param string $scale Scale of unit: '0', '-3', '6', ...
* @param int $use_short_label 1=Use short label ('g' instead of 'gram'). Short labels are not translated.
* @return string Unit string
@@ -520,7 +520,14 @@ function measuringUnitString($unit, $measuring_style = '', $scale = '', $use_sho
require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php';
$measuringUnits= new CUnits($db);
- if ($scale !== '')
+ if ($measuring_style == '' && $scale == '')
+ {
+ $arrayforfilter = array(
+ 't.rowid' => $unit,
+ 't.active' => 1
+ );
+ }
+ elseif ($scale !== '')
{
$arrayforfilter = array(
't.scale' => $scale,
diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php
index 93f17422c47..a0ac6ecfae1 100644
--- a/htdocs/core/lib/security.lib.php
+++ b/htdocs/core/lib/security.lib.php
@@ -168,7 +168,7 @@ function dol_verifyHash($chain, $hash, $type = '0')
* If GETPOST('action','aZ09') defined, we also check write and delete permission.
*
* @param User $user User to check
- * @param string $features Features to check (it must be module name. Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...)
+ * @param string $features Features to check (it must be module $object->element. Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...)
* @param int $objectid Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional).
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany modume. Param not used if objectid is null (optional).
* @param string $feature2 Feature to check, second level of permission (optional). Can be a 'or' check with 'sublevela|sublevelb'.
@@ -188,6 +188,11 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
//print ", dbtablename=".$dbtablename.", dbt_socfield=".$dbt_keyfield.", dbt_select=".$dbt_select;
//print ", perm: ".$features."->".$feature2."=".($user->rights->$features->$feature2->lire)." ";
+ if ($features == 'facturerec') $features = 'facture';
+ if ($features == 'mo') $features = 'mrp';
+ if ($features == 'member') $features = 'adherent';
+ if ($features == 'subscription') { $features = 'adherent'; $feature2 = 'cotisation'; };
+
// Get more permissions checks from hooks
$parameters = array('features'=>$features, 'objectid'=>$objectid, 'idtype'=>$dbt_select);
$reshook = $hookmanager->executeHooks('restrictedArea', $parameters);
@@ -311,6 +316,9 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
{
foreach ($feature2 as $subfeature)
{
+ if ($subfeature == 'user' && $user->id == $objectid && $user->rights->user->self->creer) continue; // User can edit its own card
+ if ($subfeature == 'user' && $user->id == $objectid && $user->rights->user->self->password) continue; // User can edit its own password
+
if (empty($user->rights->$feature->$subfeature->creer)
&& empty($user->rights->$feature->$subfeature->write)
&& empty($user->rights->$feature->$subfeature->create)) {
diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php
index 10da4f60fc1..c943220a5ac 100644
--- a/htdocs/core/lib/security2.lib.php
+++ b/htdocs/core/lib/security2.lib.php
@@ -221,7 +221,7 @@ if (!function_exists('dol_loginfunction'))
// Show logo (search in order: small company logo, large company logo, theme logo, common logo)
$width = 0;
- $urllogo = DOL_URL_ROOT.'/theme/login_logo.png';
+ $urllogo=DOL_URL_ROOT.'/theme/common/login_logo.png';
if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
{
diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php
index b7c741bd839..fe7fb4ba5a7 100644
--- a/htdocs/core/lib/ticket.lib.php
+++ b/htdocs/core/lib/ticket.lib.php
@@ -222,7 +222,7 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $
// Print logo
if (! empty($conf->global->TICKET_SHOW_COMPANY_LOGO))
{
- $urllogo = DOL_URL_ROOT . '/theme/login_logo.png';
+ $urllogo = DOL_URL_ROOT . '/theme/common/login_logo.png';
if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_small)) {
$urllogo = DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file=' . urlencode('logos/thumbs/'.$mysoc->logo_small);
diff --git a/htdocs/core/login/functions_googleoauth.php b/htdocs/core/login/functions_googleoauth.php
index 2f1fbcf3667..e621f41e562 100644
--- a/htdocs/core/login/functions_googleoauth.php
+++ b/htdocs/core/login/functions_googleoauth.php
@@ -48,7 +48,7 @@ function check_user_password_googleoauth($usertotest, $passwordtotest, $entityto
$login = '';
// Get identity from user and redirect browser to Google OAuth Server
- if (isset($_POST['username']))
+ if (GETPOSTISSET('username'))
{
/*$openid = new SimpleOpenID();
$openid->SetIdentity($_POST['username']);
diff --git a/htdocs/core/login/functions_openid.php b/htdocs/core/login/functions_openid.php
index c20b2a32f90..87a8acfd800 100644
--- a/htdocs/core/login/functions_openid.php
+++ b/htdocs/core/login/functions_openid.php
@@ -43,7 +43,7 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest)
$login='';
// Get identity from user and redirect browser to OpenID Server
- if (isset($_POST['username']))
+ if (GETPOSISSET('username'))
{
$openid = new SimpleOpenID();
$openid->SetIdentity($_POST['username']);
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index aabc538db41..6e3d887cbce 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -438,7 +438,11 @@ class pdf_einstein extends ModelePDFCommandes
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
@@ -1311,6 +1315,30 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R');
}
+ if (! empty($conf->global->PDF_SHOW_PROJECT_TITLE))
+ {
+ $object->fetch_projet();
+ if (! empty($object->project->ref))
+ {
+ $posy+=3;
+ $pdf->SetXY($posx, $posy);
+ $pdf->SetTextColor(0, 0, 60);
+ $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->title)?'':$object->projet->title), '', 'R');
+ }
+ }
+
+ if (! empty($conf->global->PDF_SHOW_PROJECT))
+ {
+ $object->fetch_projet();
+ if (! empty($object->project->ref))
+ {
+ $posy+=3;
+ $pdf->SetXY($posx, $posy);
+ $pdf->SetTextColor(0, 0, 60);
+ $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : " . (empty($object->project->ref)?'':$object->projet->ref), '', 'R');
+ }
+ }
+
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
index cd9f4c9d6a3..f4fc2b3cb2f 100644
--- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
@@ -577,7 +577,12 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->setPage($pageposbefore + 1);
$curY = $tab_top_newpage;
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
if (!empty($this->cols['photo']) && isset($imglinesize['width']) && isset($imglinesize['height']))
@@ -615,7 +620,11 @@ class pdf_eratosthene extends ModelePDFCommandes
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
@@ -1466,7 +1475,32 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R');
}
+ if (! empty($conf->global->PDF_SHOW_PROJECT_TITLE))
+ {
+ $object->fetch_projet();
+ if (! empty($object->project->ref))
+ {
+ $posy+=3;
+ $pdf->SetXY($posx, $posy);
+ $pdf->SetTextColor(0, 0, 60);
+ $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->title)?'':$object->projet->title), '', 'R');
+ }
+ }
+
+ if (! empty($conf->global->PDF_SHOW_PROJECT))
+ {
+ $object->fetch_projet();
+ if (! empty($object->project->ref))
+ {
+ $posy+=3;
+ $pdf->SetXY($posx, $posy);
+ $pdf->SetTextColor(0, 0, 60);
+ $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : " . (empty($object->project->ref)?'':$object->projet->ref), '', 'R');
+ }
+ }
+
$posy += 4;
+
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
index badf7343295..0058ad524f4 100644
--- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php
+++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
@@ -391,7 +391,12 @@ class pdf_strato extends ModelePDFContract
else
{
// We found a page break
- $showpricebeforepagebreak=0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
index 52e41ea2589..b47149f26a6 100644
--- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
@@ -440,7 +440,12 @@ class pdf_espadon extends ModelePdfExpedition
$pdf->setPage($pageposbefore + 1);
$curY = $tab_top_newpage;
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
@@ -482,7 +487,11 @@ class pdf_espadon extends ModelePdfExpedition
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
@@ -516,12 +525,12 @@ class pdf_espadon extends ModelePdfExpedition
$weighttxt = '';
if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->weight)
{
- $weighttxt = round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units);
+ $weighttxt = round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units, 1);
}
$voltxt = '';
if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->volume)
{
- $voltxt = round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->volume_units ? $object->lines[$i]->volume_units : 0);
+ $voltxt = round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->volume_units ? $object->lines[$i]->volume_units : 0, 1);
}
diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
index 0e9db902662..ad0272f46a1 100644
--- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
@@ -452,7 +452,12 @@ class pdf_rouget extends ModelePdfExpedition
$pdf->setPage($pageposbefore + 1);
$curY = $tab_top_newpage;
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
if (isset($imglinesize['width']) && isset($imglinesize['height']))
@@ -494,7 +499,12 @@ class pdf_rouget extends ModelePdfExpedition
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
@@ -526,12 +536,12 @@ class pdf_rouget extends ModelePdfExpedition
$weighttxt = '';
if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->weight)
{
- $weighttxt = round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units);
+ $weighttxt = round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units, 1);
}
$voltxt = '';
if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->volume)
{
- $voltxt = round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->volume_units ? $object->lines[$i]->volume_units : 0);
+ $voltxt = round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->volume_units ? $object->lines[$i]->volume_units : 0, 1);
}
if (empty($conf->global->SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME))
diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
index 71295335460..0adf7cd2a6a 100644
--- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
@@ -383,7 +383,11 @@ class pdf_standard extends ModeleExpenseReport
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
@@ -572,8 +576,10 @@ class pdf_standard extends ModeleExpenseReport
}
$expensereporttypecode = $object->lines[$linenumber]->type_fees_code;
- $expensereporttypecodetoshow = $outputlangs->trans($expensereporttypecode);
- if ($expensereporttypecodetoshow == $expensereporttypecode) {
+ $expensereporttypecodetoshow = ($outputlangs->trans(($expensereporttypecode)) == $expensereporttypecode ? $object->lines[$linenumber]->type_fees_libelle : $outputlangs->trans($expensereporttypecode));
+
+
+ if ($expensereporttypecodetoshow == $expensereporttypecode) {
$expensereporttypecodetoshow = preg_replace('/^(EX_|TF_)/', '', $expensereporttypecodetoshow);
}
//$expensereporttypecodetoshow = dol_trunc($expensereporttypecodetoshow, 9);
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index c3fc7677f80..6e8918920a6 100644
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -492,7 +492,12 @@ class pdf_crabe extends ModelePDFFactures
$pdf->setPage($pageposbefore + 1);
$curY = $tab_top_newpage;
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
if (isset($imglinesize['width']) && isset($imglinesize['height']))
@@ -532,7 +537,12 @@ class pdf_crabe extends ModelePDFFactures
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
@@ -1697,6 +1707,30 @@ class pdf_crabe extends ModelePDFFactures
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R');
}
+ if (! empty($conf->global->PDF_SHOW_PROJECT_TITLE))
+ {
+ $object->fetch_projet();
+ if (! empty($object->project->ref))
+ {
+ $posy+=3;
+ $pdf->SetXY($posx, $posy);
+ $pdf->SetTextColor(0, 0, 60);
+ $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->title)?'':$object->projet->title), '', 'R');
+ }
+ }
+
+ if (! empty($conf->global->PDF_SHOW_PROJECT))
+ {
+ $object->fetch_projet();
+ if (! empty($object->project->ref))
+ {
+ $posy+=3;
+ $pdf->SetXY($posx, $posy);
+ $pdf->SetTextColor(0, 0, 60);
+ $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : " . (empty($object->project->ref)?'':$object->projet->ref), '', 'R');
+ }
+ }
+
$objectidnext = $object->getIdReplacingInvoice('validated');
if ($object->type == 0 && $objectidnext)
{
diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
index b5e94e62aff..a9d1230fdec 100644
--- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
@@ -396,7 +396,7 @@ class pdf_sponge extends ModelePDFFactures
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
$pagenb++;
- $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs);
+ $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs, $outputlangsbis);
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->MultiCell(0, 3, ''); // Set interline to 3
$pdf->SetTextColor(0, 0, 0);
@@ -607,7 +607,12 @@ class pdf_sponge extends ModelePDFFactures
$pdf->setPage($pageposbefore + 1);
$curY = $tab_top_newpage;
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
if (!empty($this->cols['photo']) && isset($imglinesize['width']) && isset($imglinesize['height']))
@@ -646,7 +651,11 @@ class pdf_sponge extends ModelePDFFactures
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
@@ -804,11 +813,11 @@ class pdf_sponge extends ModelePDFFactures
while ($pagenb < $pageposafter) {
$pdf->setPage($pagenb);
if ($pagenb == $pageposbeforeprintlines) {
- $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code);
+ $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis);
}
else
{
- $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code);
+ $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis);
}
$this->_pagefoot($pdf, $object, $outputlangs, 1);
$pagenb++;
@@ -819,11 +828,11 @@ class pdf_sponge extends ModelePDFFactures
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
if ($pagenb == $pageposafter) {
- $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code);
+ $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis);
}
else
{
- $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code);
+ $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis);
}
$this->_pagefoot($pdf, $object, $outputlangs, 1);
// New page
@@ -837,12 +846,12 @@ class pdf_sponge extends ModelePDFFactures
// Show square
if ($pagenb == $pageposbeforeprintlines)
{
- $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code);
+ $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code, $outputlangsbis);
$bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
}
else
{
- $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code);
+ $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code, $outputlangsbis);
$bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
}
@@ -1123,33 +1132,33 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetFont('', '', $default_font_size - 2);
$pdf->SetXY($posxval, $posy);
- $lib_mode_reg=$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code)!=('PaymentType'.$object->mode_reglement_code)?$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code):$outputlangs->convToOutputCharset($object->mode_reglement);
+ $lib_mode_reg = $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) != ('PaymentType'.$object->mode_reglement_code) ? $outputlangs->transnoentities("PaymentType".$object->mode_reglement_code) : $outputlangs->convToOutputCharset($object->mode_reglement);
$pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L');
// Show online payment link
- $useonlinepayment = ((! empty($conf->paypal->enabled) || ! empty($conf->stripe->enabled) || ! empty($conf->paybox->enabled)) && !empty($conf->global->PDF_SHOW_LINK_TO_ONLINE_PAYMENT));
+ $useonlinepayment = ((!empty($conf->paypal->enabled) || !empty($conf->stripe->enabled) || !empty($conf->paybox->enabled)) && !empty($conf->global->PDF_SHOW_LINK_TO_ONLINE_PAYMENT));
if (($object->mode_reglement_code == 'CB' || $object->mode_reglement_code == 'VAD') && $object->statut != Facture::STATUS_DRAFT && $useonlinepayment) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
global $langs;
$langs->loadLangs(array('payment', 'paybox'));
- $servicename=$langs->transnoentities('Online');
+ $servicename = $langs->transnoentities('Online');
$paiement_url = getOnlinePaymentUrl('', 'invoice', $object->ref, '', '', '');
- $linktopay = $langs->trans("ToOfferALinkForOnlinePayment", $servicename).' '.$outputlangs->transnoentities("ClickHere").' ';
+ $linktopay = $langs->trans("ToOfferALinkForOnlinePayment", $servicename).' '.$outputlangs->transnoentities("ClickHere").' ';
$pdf->writeHTMLCell(80, 10, '', '', dol_htmlentitiesbr($linktopay), 0, 1);
}
- $posy=$pdf->GetY()+2;
+ $posy = $pdf->GetY() + 2;
}
// Show payment mode CHQ
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'CHQ')
{
// If payment mode unregulated or payment mode forced to CHQ
- if (! empty($conf->global->FACTURE_CHQ_NUMBER))
+ if (!empty($conf->global->FACTURE_CHQ_NUMBER))
{
- $diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?3:$conf->global->PDF_DIFFSIZE_TITLE);
+ $diffsizetitle = (empty($conf->global->PDF_DIFFSIZE_TITLE) ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
if ($conf->global->FACTURE_CHQ_NUMBER > 0)
{
@@ -1788,9 +1797,10 @@ class pdf_sponge extends ModelePDFFactures
* @param int $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title
* @param int $hidebottom Hide bottom bar of array
* @param string $currency Currency code
+ * @param Translate $outputlangsbis Langs object bis
* @return void
*/
- protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
+ protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '', $outputlangsbis = null)
{
global $conf;
@@ -1808,6 +1818,10 @@ class pdf_sponge extends ModelePDFFactures
if (empty($hidetop))
{
$titre = $outputlangs->transnoentities("AmountInCurrency", $outputlangs->transnoentitiesnoconv("Currency".$currency));
+ if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
+ $titre .= ' - '.$outputlangsbis->transnoentities("AmountInCurrency", $outputlangsbis->transnoentitiesnoconv("Currency".$currency));
+ }
+
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4);
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
@@ -1839,9 +1853,10 @@ class pdf_sponge extends ModelePDFFactures
* @param Object $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
+ * @param Translate $outputlangsbis Object lang for output bis
* @return void
*/
- protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
+ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null)
{
global $conf, $langs;
@@ -1911,6 +1926,17 @@ class pdf_sponge extends ModelePDFFactures
if ($object->type == 3) $title = $outputlangs->transnoentities("InvoiceDeposit");
if ($object->type == 4) $title = $outputlangs->transnoentities("InvoiceProForma");
if ($this->situationinvoice) $title = $outputlangs->transnoentities("InvoiceSituation");
+ if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
+ $title .= ' - ';
+ if ($object->type == 0) {
+ if ($this->situationinvoice) $title .= $outputlangsbis->transnoentities("InvoiceSituation");
+ $title .= $outputlangsbis->transnoentities("PdfInvoiceTitle");
+ }
+ elseif ($object->type == 1) $title .= $outputlangsbis->transnoentities("InvoiceReplacement");
+ elseif ($object->type == 2) $title .= $outputlangsbis->transnoentities("InvoiceAvoir");
+ elseif ($object->type == 3) $title .= $outputlangsbis->transnoentities("InvoiceDeposit");
+ elseif ($object->type == 4) $title .= $outputlangsbis->transnoentities("InvoiceProForma");
+ }
$pdf->MultiCell($w, 3, $title, '', 'R');
$pdf->SetFont('', 'B', $default_font_size);
@@ -1937,6 +1963,30 @@ class pdf_sponge extends ModelePDFFactures
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R');
}
+ if (! empty($conf->global->PDF_SHOW_PROJECT_TITLE))
+ {
+ $object->fetch_projet();
+ if (! empty($object->project->ref))
+ {
+ $posy+=3;
+ $pdf->SetXY($posx, $posy);
+ $pdf->SetTextColor(0, 0, 60);
+ $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->title)?'':$object->projet->title), '', 'R');
+ }
+ }
+
+ if (! empty($conf->global->PDF_SHOW_PROJECT))
+ {
+ $object->fetch_projet();
+ if (! empty($object->project->ref))
+ {
+ $posy+=3;
+ $pdf->SetXY($posx, $posy);
+ $pdf->SetTextColor(0, 0, 60);
+ $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : " . (empty($object->project->ref)?'':$object->projet->ref), '', 'R');
+ }
+ }
+
$objectidnext = $object->getIdReplacingInvoice('validated');
if ($object->type == 0 && $objectidnext)
{
diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php
index d6c43edd5c3..93d68691a11 100644
--- a/htdocs/core/modules/import/import_csv.modules.php
+++ b/htdocs/core/modules/import/import_csv.modules.php
@@ -123,7 +123,7 @@ class ImportCsv extends ModeleImports
* Output header of an example file for this format
*
* @param Translate $outputlangs Output language
- * @return string
+ * @return string Empty string
*/
public function write_header_example($outputlangs)
{
@@ -137,7 +137,7 @@ class ImportCsv extends ModeleImports
*
* @param Translate $outputlangs Output language
* @param array $headerlinefields Array of fields name
- * @return string$limittoachartaccount
+ * @return string String output
*/
public function write_title_example($outputlangs, $headerlinefields)
{
@@ -152,7 +152,7 @@ class ImportCsv extends ModeleImports
*
* @param Translate $outputlangs Output language
* @param array $contentlinevalues Array of lines
- * @return string
+ * @return string String output
*/
public function write_record_example($outputlangs, $contentlinevalues)
{
@@ -166,7 +166,7 @@ class ImportCsv extends ModeleImports
* Output footer of an example file for this format
*
* @param Translate $outputlangs Output language
- * @return string
+ * @return string Empty string
*/
public function write_footer_example($outputlangs)
{
@@ -175,7 +175,6 @@ class ImportCsv extends ModeleImports
}
-
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Open input file
diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php
index 03b3f941a1d..09628739494 100644
--- a/htdocs/core/modules/import/import_xlsx.modules.php
+++ b/htdocs/core/modules/import/import_xlsx.modules.php
@@ -130,7 +130,7 @@ class ImportXlsx extends ModeleImports
* Output header of an example file for this format
*
* @param Translate $outputlangs Output language
- * @return string
+ * @return string Empty string
*/
public function write_header_example($outputlangs)
{
@@ -164,7 +164,7 @@ class ImportXlsx extends ModeleImports
*
* @param Translate $outputlangs Output language
* @param array $headerlinefields Array of fields name
- * @return string
+ * @return string String output
*/
public function write_title_example($outputlangs, $headerlinefields)
{
@@ -190,7 +190,7 @@ class ImportXlsx extends ModeleImports
*
* @param Translate $outputlangs Output language
* @param array $contentlinevalues Array of lines
- * @return string
+ * @return string Empty string
*/
public function write_record_example($outputlangs, $contentlinevalues)
{
@@ -210,7 +210,7 @@ class ImportXlsx extends ModeleImports
* Output footer of an example file for this format
*
* @param Translate $outputlangs Output language
- * @return string
+ * @return string String output
*/
public function write_footer_example($outputlangs)
{
@@ -258,7 +258,7 @@ class ImportXlsx extends ModeleImports
* Return nb of records. File must be closed.
*
* @param string $file Path of filename
- * @return int <0 if KO, >=0 if OK
+ * @return int <0 if KO, >=0 if OK
*/
public function import_get_nb_of_lines($file)
{
diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php
index 1b6ddf143e0..9c80c6a9020 100644
--- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php
+++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php
@@ -407,7 +407,11 @@ class pdf_typhon extends ModelePDFDeliveryOrder
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
diff --git a/htdocs/core/modules/modContrat.class.php b/htdocs/core/modules/modContrat.class.php
index fe846c1fd4c..3b8a7aa3f8b 100644
--- a/htdocs/core/modules/modContrat.class.php
+++ b/htdocs/core/modules/modContrat.class.php
@@ -165,7 +165,7 @@ class modContrat extends DolibarrModules
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode',
's.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode',
's.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra',
- 'co.rowid'=>"Id",'co.ref'=>"Ref",'co.datec'=>"DateCreation",'co.date_contrat'=>"DateContract",'co.mise_en_service'=>"ContractStartDate",
+ 'co.rowid'=>"Id",'co.ref'=>"Ref",'co.datec'=>"DateCreation",'co.date_contrat'=>"DateContract",
'co.fin_validite'=>"ContractEndDate",'co.date_cloture'=>"Closing",'co.note_private'=>"NotePrivate",'co.note_public'=>"NotePublic",
'cod.rowid'=>'LineId','cod.label'=>"LineLabel",'cod.description'=>"LineDescription",'cod.price_ht'=>"LineUnitPrice",'cod.tva_tx'=>"LineVATRate",
'cod.qty'=>"LineQty",'cod.total_ht'=>"LineTotalHT",'cod.total_tva'=>"LineTotalVAT",'cod.total_ttc'=>"LineTotalTTC",
@@ -175,7 +175,7 @@ class modContrat extends DolibarrModules
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company',
's.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company',
's.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company',
- 'co.rowid'=>"contract",'co.ref'=>"contract",'co.datec'=>"contract",'co.date_contrat'=>"contract",'co.mise_en_service'=>"contract",
+ 'co.rowid'=>"contract",'co.ref'=>"contract",'co.datec'=>"contract",'co.date_contrat'=>"contract",
'co.fin_validite'=>"contract",'co.date_cloture'=>"contract",'co.note_private'=>"contract",'co.note_public'=>"contract",
'cod.rowid'=>'contract_line','cod.label'=>"contract_line",'cod.description'=>"contract_line",'cod.price_ht'=>"contract_line",'cod.tva_tx'=>"contract_line",
'cod.qty'=>"contract_line",'cod.total_ht'=>"contract_line",'cod.total_tva'=>"contract_line",'cod.total_ttc'=>"contract_line",
@@ -185,7 +185,7 @@ class modContrat extends DolibarrModules
$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text',
's.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text',
's.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text',
- 'co.ref'=>"Text",'co.datec'=>"Date",'co.date_contrat'=>"Date",'co.mise_en_service'=>"Date",
+ 'co.ref'=>"Text",'co.datec'=>"Date",'co.date_contrat'=>"Date",
'co.fin_validite'=>"Date",'co.date_cloture'=>"Date",'co.note_private'=>"Text",'co.note_public'=>"Text",
'cod.label'=>"Text",'cod.description'=>"Text",'cod.price_ht'=>"Numeric",'cod.tva_tx'=>"Numeric",
'cod.qty'=>"Numeric",'cod.total_ht'=>"Numeric",'cod.total_tva'=>"Numeric",'cod.total_ttc'=>"Numeric",
diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php
index 2042e8b35da..779f60e26da 100644
--- a/htdocs/core/modules/modFournisseur.class.php
+++ b/htdocs/core/modules/modFournisseur.class.php
@@ -25,7 +25,7 @@
* \ingroup fournisseur
* \brief Description and activation file for module Supplier
*/
-include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
+include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
/**
@@ -58,7 +58,7 @@ class modFournisseur extends DolibarrModules
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
- $this->picto='company';
+ $this->picto = 'company';
// Data directories to create when module is enabled
$this->dirs = array(
@@ -79,7 +79,7 @@ class modFournisseur extends DolibarrModules
// Constants
$this->const = array();
- $r=0;
+ $r = 0;
$this->const[$r][0] = "COMMANDE_SUPPLIER_ADDON_PDF";
$this->const[$r][1] = "chaine";
@@ -120,19 +120,19 @@ class modFournisseur extends DolibarrModules
// Boxes
$this->boxes = array(
- 0=>array('file'=>'box_graph_invoices_supplier_permonth.php','enabledbydefaulton'=>'Home'),
- 1=>array('file'=>'box_graph_orders_supplier_permonth.php','enabledbydefaulton'=>'Home'),
- 2=>array('file'=>'box_fournisseurs.php','enabledbydefaulton'=>'Home'),
- 3=>array('file'=>'box_factures_fourn_imp.php','enabledbydefaulton'=>'Home'),
- 4=>array('file'=>'box_factures_fourn.php','enabledbydefaulton'=>'Home'),
- 5=>array('file'=>'box_supplier_orders.php','enabledbydefaulton'=>'Home'),
- 6=>array('file'=>'box_supplier_orders_awaiting_reception.php','enabledbydefaulton'=>'Home'),
+ 0=>array('file'=>'box_graph_invoices_supplier_permonth.php', 'enabledbydefaulton'=>'Home'),
+ 1=>array('file'=>'box_graph_orders_supplier_permonth.php', 'enabledbydefaulton'=>'Home'),
+ 2=>array('file'=>'box_fournisseurs.php', 'enabledbydefaulton'=>'Home'),
+ 3=>array('file'=>'box_factures_fourn_imp.php', 'enabledbydefaulton'=>'Home'),
+ 4=>array('file'=>'box_factures_fourn.php', 'enabledbydefaulton'=>'Home'),
+ 5=>array('file'=>'box_supplier_orders.php', 'enabledbydefaulton'=>'Home'),
+ 6=>array('file'=>'box_supplier_orders_awaiting_reception.php', 'enabledbydefaulton'=>'Home'),
);
// Permissions
$this->rights = array();
$this->rights_class = 'fournisseur';
- $r=0;
+ $r = 0;
$r++;
$this->rights[$r][0] = 1181;
@@ -205,11 +205,11 @@ class modFournisseur extends DolibarrModules
$this->rights[$r][4] = 'commande';
$this->rights[$r][5] = 'supprimer';
- if (! empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED))
+ if (!empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED))
{
$r++;
$this->rights[$r][0] = 1190;
- $this->rights[$r][1] = 'Approve supplier order (second level)'; // $langs->trans("Permission1190");
+ $this->rights[$r][1] = 'Approve supplier order (second level)'; // $langs->trans("Permission1190");
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'commande';
@@ -275,27 +275,28 @@ class modFournisseur extends DolibarrModules
// Menus
//-------
- $this->menu = 1; // This module add menu entries. They are coded into menu manager.
+ $this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
//--------
- $r=0;
+ $r = 0;
$r++;
- $this->export_code[$r]=$this->rights_class.'_'.$r;
- $this->export_label[$r]='Vendor invoices and lines of invoices';
- $this->export_icon[$r]='bill';
- $this->export_permission[$r]=array(array("fournisseur","facture","export"));
- $this->export_fields_array[$r]=array(
- 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone',
- 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra',
- 'f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.ref_supplier'=>"RefSupplier",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>'DateMaxPayment',
- 'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_public'=>"InvoiceNote",
- 'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",
- 'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId',
- 'p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_buy'=>'ProductAccountancyBuyCode','project.rowid'=>'ProjectId',
- 'project.ref'=>'ProjectRef','project.title'=>'ProjectLabel'
+ $this->export_code[$r] = $this->rights_class.'_'.$r;
+ $this->export_label[$r] = 'Vendor invoices and lines of invoices';
+ $this->export_icon[$r] = 'bill';
+ $this->export_permission[$r] = array(array("fournisseur", "facture", "export"));
+ $this->export_fields_array[$r] = array(
+ 's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 's.phone'=>'Phone',
+ 's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.idprof5'=>'ProfId5', 's.idprof6'=>'ProfId6',
+ 's.code_compta'=>'CustomerAccountancyCode', 's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
+ 'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_supplier'=>"RefSupplier", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>'DateMaxPayment',
+ 'f.total_ht'=>"TotalHT", 'f.total_ttc'=>"TotalTTC", 'f.total_tva'=>"TotalVAT", 'f.paye'=>"InvoicePaid", 'f.fk_statut'=>'InvoiceStatus', 'f.note_public'=>"InvoiceNote",
+ 'fd.rowid'=>'LineId', 'fd.description'=>"LineDescription", 'fd.tva_tx'=>"LineVATRate", 'fd.qty'=>"LineQty", 'fd.remise_percent'=>"Discount", 'fd.total_ht'=>"LineTotalHT",
+ 'fd.total_ttc'=>"LineTotalTTC", 'fd.tva'=>"LineTotalVAT", 'fd.product_type'=>'TypeOfLineServiceOrProduct', 'fd.fk_product'=>'ProductId',
+ 'p.ref'=>'ProductRef', 'p.label'=>'ProductLabel', 'p.accountancy_code_buy'=>'ProductAccountancyBuyCode', 'project.rowid'=>'ProjectId',
+ 'project.ref'=>'ProjectRef', 'project.title'=>'ProjectLabel'
);
//$this->export_TypeFields_array[$r]=array(
// 's.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text',
@@ -303,122 +304,123 @@ class modFournisseur extends DolibarrModules
// 'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_ttc'=>"Numeric",
// 'fd.tva'=>"Numeric",'fd.product_type'=>'Numeric','fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text'
//);
- $this->export_TypeFields_array[$r]=array(
- 's.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text',
- 's.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>'Date','f.total_ht'=>"Numeric",'f.total_ttc'=>"Numeric",
- 'f.total_tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",
- 'fd.total_ttc'=>"Numeric",'fd.tva'=>"Numeric",'fd.product_type'=>'Numeric','fd.fk_product'=>'List:product:label',
- 'p.ref'=>'Text','p.label'=>'Text','project.ref'=>'Text','project.title'=>'Text'
+ $this->export_TypeFields_array[$r] = array(
+ 's.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.idprof5'=>'Text', 's.idprof6'=>'Text',
+ 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text', 'f.ref'=>"Text", 'f.ref_supplier'=>"Text", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>'Date',
+ 'f.total_ht'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.total_tva'=>"Numeric", 'f.paye'=>"Boolean", 'f.fk_statut'=>'Status', 'f.note_public'=>"Text", 'fd.description'=>"Text", 'fd.tva_tx'=>"Text",
+ 'fd.qty'=>"Numeric", 'fd.total_ht'=>"Numeric", 'fd.total_ttc'=>"Numeric", 'fd.tva'=>"Numeric", 'fd.product_type'=>'Numeric', 'fd.fk_product'=>'List:product:label',
+ 'p.ref'=>'Text', 'p.label'=>'Text', 'project.ref'=>'Text', 'project.title'=>'Text'
);
- $this->export_entities_array[$r]=array(
- 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company',
- 's.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.ref'=>"invoice",'f.ref_supplier'=>"invoice",
- 'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>'invoice','f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice',
- 'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",
- 'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product',
- 'p.ref'=>'product','p.label'=>'product','p.accountancy_code_buy'=>'product','project.rowid'=>'project','project.ref'=>'project','project.title'=>'project'
+ $this->export_entities_array[$r] = array(
+ 's.rowid'=>"company", 's.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'c.code'=>'company', 's.phone'=>'company', 's.siren'=>'company', 's.siret'=>'company',
+ 's.ape'=>'company', 's.idprof4'=>'company', 's.idprof5'=>'company', 's.idprof6'=>'company', 's.code_compta'=>'company', 's.code_compta_fournisseur'=>'company', 's.tva_intra'=>'company', 'f.rowid'=>"invoice",
+ 'f.ref'=>"invoice", 'f.ref_supplier'=>"invoice", 'f.datec'=>"invoice", 'f.datef'=>"invoice", 'f.date_lim_reglement'=>'invoice', 'f.total_ht'=>"invoice", 'f.total_ttc'=>"invoice", 'f.total_tva'=>"invoice",
+ 'f.paye'=>"invoice", 'f.fk_statut'=>'invoice', 'f.note_public'=>"invoice", 'fd.rowid'=>'invoice_line', 'fd.description'=>"invoice_line", 'fd.tva_tx'=>"invoice_line", 'fd.qty'=>"invoice_line",
+ 'fd.remise_percent'=>"invoice_line", 'fd.total_ht'=>"invoice_line", 'fd.total_ttc'=>"invoice_line", 'fd.tva'=>"invoice_line", 'fd.product_type'=>'invoice_line', 'fd.fk_product'=>'product',
+ 'p.ref'=>'product', 'p.label'=>'product', 'p.accountancy_code_buy'=>'product', 'project.rowid'=>'project', 'project.ref'=>'project', 'project.title'=>'project'
);
- $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
+ $this->export_dependencies_array[$r] = array('invoice_line'=>'fd.rowid', 'product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
// Add extra fields object
- $sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn' AND entity IN (0, ".$conf->entity.")";
- $resql=$this->db->query($sql);
+ $sql = "SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn' AND entity IN (0, ".$conf->entity.")";
+ $resql = $this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
- while ($obj=$this->db->fetch_object($resql))
+ while ($obj = $this->db->fetch_object($resql))
{
- $fieldname='extra.'.$obj->name;
- $fieldlabel=ucfirst($obj->label);
- $typeFilter="Text";
- switch($obj->type)
+ $fieldname = 'extra.'.$obj->name;
+ $fieldlabel = ucfirst($obj->label);
+ $typeFilter = "Text";
+ switch ($obj->type)
{
case 'int':
case 'double':
case 'price':
- $typeFilter="Numeric";
+ $typeFilter = "Numeric";
break;
case 'date':
case 'datetime':
- $typeFilter="Date";
+ $typeFilter = "Date";
break;
case 'boolean':
- $typeFilter="Boolean";
+ $typeFilter = "Boolean";
break;
case 'sellist':
- $tmp='';
- $tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
- if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp=array_shift(array_keys($tmpparam['options']));
- if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
+ $tmp = '';
+ $tmpparam = unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
+ if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp = array_shift(array_keys($tmpparam['options']));
+ if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter = "List:".$tmp;
break;
}
- $this->export_fields_array[$r][$fieldname]=$fieldlabel;
- $this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
- $this->export_entities_array[$r][$fieldname]='invoice';
+ $this->export_fields_array[$r][$fieldname] = $fieldlabel;
+ $this->export_TypeFields_array[$r][$fieldname] = $typeFilter;
+ $this->export_entities_array[$r][$fieldname] = 'invoice';
}
}
// End add extra fields
// Add extra fields line
- $sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn_det' AND entity IN (0, ".$conf->entity.")";
- $resql=$this->db->query($sql);
+ $sql = "SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn_det' AND entity IN (0, ".$conf->entity.")";
+ $resql = $this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
- while ($obj=$this->db->fetch_object($resql))
+ while ($obj = $this->db->fetch_object($resql))
{
- $fieldname='extraline.'.$obj->name;
- $fieldlabel=ucfirst($obj->label);
- $typeFilter="Text";
- switch($obj->type)
+ $fieldname = 'extraline.'.$obj->name;
+ $fieldlabel = ucfirst($obj->label);
+ $typeFilter = "Text";
+ switch ($obj->type)
{
case 'int':
case 'double':
case 'price':
- $typeFilter="Numeric";
+ $typeFilter = "Numeric";
break;
case 'date':
case 'datetime':
- $typeFilter="Date";
+ $typeFilter = "Date";
break;
case 'boolean':
- $typeFilter="Boolean";
+ $typeFilter = "Boolean";
break;
case 'sellist':
- $tmp='';
- $tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
- if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp=array_shift(array_keys($tmpparam['options']));
- if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
+ $tmp = '';
+ $tmpparam = unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
+ if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp = array_shift(array_keys($tmpparam['options']));
+ if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter = "List:".$tmp;
break;
}
- $this->export_fields_array[$r][$fieldname]=$fieldlabel;
- $this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
- $this->export_entities_array[$r][$fieldname]='invoice_line';
+ $this->export_fields_array[$r][$fieldname] = $fieldlabel;
+ $this->export_TypeFields_array[$r][$fieldname] = $typeFilter;
+ $this->export_entities_array[$r][$fieldname] = 'invoice_line';
}
}
// End add extra fields line
- $this->export_sql_start[$r]='SELECT DISTINCT ';
- $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
- if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
- $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'facture_fourn as f';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet as project on (f.fk_projet = project.rowid)';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn_extrafields as extra ON f.rowid = extra.fk_object';
- $this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'facture_fourn_det as fd';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn_det_extrafields as extraline ON fd.rowid = extraline.fk_object';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
- $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture_fourn';
- $this->export_sql_end[$r] .=' AND f.entity IN ('.getEntity('supplier_invoice').')';
- if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' AND sc.fk_user = '.$user->id;
+ $this->export_sql_start[$r] = 'SELECT DISTINCT ';
+ $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s';
+ if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
+ $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'facture_fourn as f';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as project on (f.fk_projet = project.rowid)';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn_extrafields as extra ON f.rowid = extra.fk_object';
+ $this->export_sql_end[$r] .= ' , '.MAIN_DB_PREFIX.'facture_fourn_det as fd';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn_det_extrafields as extraline ON fd.rowid = extraline.fk_object';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
+ $this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture_fourn';
+ $this->export_sql_end[$r] .= ' AND f.entity IN ('.getEntity('supplier_invoice').')';
+ if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id;
$r++;
- $this->export_code[$r]=$this->rights_class.'_'.$r;
- $this->export_label[$r]='Factures fournisseurs et reglements';
- $this->export_icon[$r]='bill';
- $this->export_permission[$r]=array(array("fournisseur","facture","export"));
- $this->export_fields_array[$r]=array(
- 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone',
- 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6',
- 's.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.ref_supplier'=>"RefSupplier",'f.datec'=>"InvoiceDateCreation",
- 'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",
- 'f.fk_statut'=>'InvoiceStatus','f.note_public'=>"InvoiceNote",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment',
- 'p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber','project.rowid'=>'ProjectId','project.ref'=>'ProjectRef','project.title'=>'ProjectLabel'
+ $this->export_code[$r] = $this->rights_class.'_'.$r;
+ $this->export_label[$r] = 'Factures fournisseurs et reglements';
+ $this->export_icon[$r] = 'bill';
+ $this->export_permission[$r] = array(array("fournisseur", "facture", "export"));
+ $this->export_fields_array[$r] = array(
+ 's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 's.phone'=>'Phone',
+ 's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.idprof5'=>'ProfId5', 's.idprof6'=>'ProfId6',
+ 's.code_compta'=>'CustomerAccountancyCode', 's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
+ 'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_supplier'=>"RefSupplier", 'f.datec'=>"InvoiceDateCreation",
+ 'f.datef'=>"DateInvoice", 'f.total_ht'=>"TotalHT", 'f.total_ttc'=>"TotalTTC", 'f.total_tva'=>"TotalVAT", 'f.paye'=>"InvoicePaid",
+ 'f.fk_statut'=>'InvoiceStatus', 'f.note_public'=>"InvoiceNote", 'p.rowid'=>'PaymentId', 'pf.amount'=>'AmountPayment',
+ 'p.datep'=>'DatePayment', 'p.num_paiement'=>'PaymentNumber', 'project.rowid'=>'ProjectId', 'project.ref'=>'ProjectRef', 'project.title'=>'ProjectLabel'
);
//$this->export_TypeFields_array[$r]=array(
// 's.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text',
@@ -426,200 +428,201 @@ class modFournisseur extends DolibarrModules
// 'f.total_ht'=>"Numeric",'f.total_ttc'=>"Numeric",'f.total_tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",
// 'pf.amount'=>'Numeric','p.datep'=>'Date','p.num_paiement'=>'Numeric'
//);
- $this->export_TypeFields_array[$r]=array(
- 's.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text',
- 's.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Numeric",
- 'f.total_ttc'=>"Numeric",'f.total_tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'pf.amount'=>'Numeric',
- 'p.datep'=>'Date','p.num_paiement'=>'Numeric','project.ref'=>'Text','project.title'=>'Text'
+ $this->export_TypeFields_array[$r] = array(
+ 's.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text',
+ 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text', 'f.ref'=>"Text", 'f.ref_supplier'=>"Text", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.total_ht'=>"Numeric",
+ 'f.total_ttc'=>"Numeric", 'f.total_tva'=>"Numeric", 'f.paye'=>"Boolean", 'f.fk_statut'=>'Status', 'f.note_public'=>"Text", 'pf.amount'=>'Numeric',
+ 'p.datep'=>'Date', 'p.num_paiement'=>'Numeric', 'project.ref'=>'Text', 'project.title'=>'Text'
);
- $this->export_entities_array[$r]=array(
- 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company',
- 's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company',
- 'f.rowid'=>"invoice",'f.ref'=>"invoice",'f.ref_supplier'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",
- 'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment',
- 'p.datep'=>'payment','p.num_paiement'=>'payment','project.rowid'=>'project','project.ref'=>'project','project.title'=>'project');
- $this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
+ $this->export_entities_array[$r] = array(
+ 's.rowid'=>"company", 's.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'c.code'=>'company', 's.phone'=>'company',
+ 's.siren'=>'company', 's.siret'=>'company', 's.ape'=>'company', 's.idprof4'=>'company', 's.idprof5'=>'company', 's.idprof6'=>'company',
+ 's.code_compta'=>'company', 's.code_compta_fournisseur'=>'company', 's.tva_intra'=>'company',
+ 'f.rowid'=>"invoice", 'f.ref'=>"invoice", 'f.ref_supplier'=>"invoice", 'f.datec'=>"invoice", 'f.datef'=>"invoice", 'f.total_ht'=>"invoice",
+ 'f.total_ttc'=>"invoice", 'f.total_tva'=>"invoice", 'f.paye'=>"invoice", 'f.fk_statut'=>'invoice', 'f.note_public'=>"invoice", 'p.rowid'=>'payment', 'pf.amount'=>'payment',
+ 'p.datep'=>'payment', 'p.num_paiement'=>'payment', 'project.rowid'=>'project', 'project.ref'=>'project', 'project.title'=>'project');
+ $this->export_dependencies_array[$r] = array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
// Add extra fields object
- $sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn' AND entity IN (0, ".$conf->entity.")";
- $resql=$this->db->query($sql);
+ $sql = "SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn' AND entity IN (0, ".$conf->entity.")";
+ $resql = $this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
- while ($obj=$this->db->fetch_object($resql))
+ while ($obj = $this->db->fetch_object($resql))
{
- $fieldname='extra.'.$obj->name;
- $fieldlabel=ucfirst($obj->label);
- $typeFilter="Text";
- switch($obj->type)
+ $fieldname = 'extra.'.$obj->name;
+ $fieldlabel = ucfirst($obj->label);
+ $typeFilter = "Text";
+ switch ($obj->type)
{
case 'int':
case 'double':
case 'price':
- $typeFilter="Numeric";
+ $typeFilter = "Numeric";
break;
case 'date':
case 'datetime':
- $typeFilter="Date";
+ $typeFilter = "Date";
break;
case 'boolean':
- $typeFilter="Boolean";
+ $typeFilter = "Boolean";
break;
case 'sellist':
- $tmp='';
- $tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
- if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp=array_shift(array_keys($tmpparam['options']));
- if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
+ $tmp = '';
+ $tmpparam = unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
+ if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp = array_shift(array_keys($tmpparam['options']));
+ if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter = "List:".$tmp;
break;
}
- $this->export_fields_array[$r][$fieldname]=$fieldlabel;
- $this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
- $this->export_entities_array[$r][$fieldname]='invoice';
+ $this->export_fields_array[$r][$fieldname] = $fieldlabel;
+ $this->export_TypeFields_array[$r][$fieldname] = $typeFilter;
+ $this->export_entities_array[$r][$fieldname] = 'invoice';
}
}
// End add extra fields object
- $this->export_sql_start[$r]='SELECT DISTINCT ';
- $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
- if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
- $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'facture_fourn as f';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet as project on (f.fk_projet = project.rowid)';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn_extrafields as extra ON f.rowid = extra.fk_object';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn as p ON pf.fk_paiementfourn = p.rowid';
- $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid';
- $this->export_sql_end[$r] .=' AND f.entity IN ('.getEntity('supplier_invoice').')';
- if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' AND sc.fk_user = '.$user->id;
+ $this->export_sql_start[$r] = 'SELECT DISTINCT ';
+ $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s';
+ if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
+ $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'facture_fourn as f';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as project on (f.fk_projet = project.rowid)';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn_extrafields as extra ON f.rowid = extra.fk_object';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn as p ON pf.fk_paiementfourn = p.rowid';
+ $this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid';
+ $this->export_sql_end[$r] .= ' AND f.entity IN ('.getEntity('supplier_invoice').')';
+ if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id;
// Order
$r++;
- $this->export_code[$r]=$this->rights_class.'_'.$r;
- $this->export_label[$r]='Purchase Orders and lines of purchase orders';
- $this->export_icon[$r]='order';
- $this->export_permission[$r]=array(array("fournisseur","commande","export"));
- $this->export_fields_array[$r]=array(
- 's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone',
- 's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra',
- 'f.rowid'=>"OrderId",'f.ref'=>"Ref",'f.ref_supplier'=>"RefSupplier",'f.date_creation'=>"DateCreation",'f.date_commande'=>"OrderDate",'f.date_livraison'=>"DateDeliveryPlanned",
- 'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.fk_statut'=>'Status','f.date_approve'=>'DateApprove','f.date_approve2'=>'DateApprove2',
- 'f.note_public'=>"NotePublic",'f.note_private'=>"NotePrivate",'ua1.login'=>'ApprovedBy','ua2.login'=>'ApprovedBy2','fd.rowid'=>'LineId','fd.description'=>"LineDescription",
- 'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",
- 'fd.total_tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.ref'=>'RefSupplier','fd.fk_product'=>'ProductId',
- 'p.ref'=>'ProductRef','p.label'=>'ProductLabel','project.rowid'=>'ProjectId','project.ref'=>'ProjectRef','project.title'=>'ProjectLabel'
+ $this->export_code[$r] = $this->rights_class.'_'.$r;
+ $this->export_label[$r] = 'Purchase Orders and lines of purchase orders';
+ $this->export_icon[$r] = 'order';
+ $this->export_permission[$r] = array(array("fournisseur", "commande", "export"));
+ $this->export_fields_array[$r] = array(
+ 's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 's.phone'=>'Phone',
+ 's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.idprof5'=>'ProfId5', 's.idprof6'=>'ProfId6', 's.tva_intra'=>'VATIntra',
+ 'f.rowid'=>"OrderId", 'f.ref'=>"Ref", 'f.ref_supplier'=>"RefSupplier", 'f.date_creation'=>"DateCreation", 'f.date_commande'=>"OrderDate", 'f.date_livraison'=>"DateDeliveryPlanned",
+ 'f.total_ht'=>"TotalHT", 'f.total_ttc'=>"TotalTTC", 'f.tva'=>"TotalVAT", 'f.fk_statut'=>'Status', 'f.date_approve'=>'DateApprove', 'f.date_approve2'=>'DateApprove2',
+ 'f.note_public'=>"NotePublic", 'f.note_private'=>"NotePrivate", 'ua1.login'=>'ApprovedBy', 'ua2.login'=>'ApprovedBy2', 'fd.rowid'=>'LineId', 'fd.description'=>"LineDescription",
+ 'fd.tva_tx'=>"LineVATRate", 'fd.qty'=>"LineQty", 'fd.remise_percent'=>"Discount", 'fd.total_ht'=>"LineTotalHT", 'fd.total_ttc'=>"LineTotalTTC",
+ 'fd.total_tva'=>"LineTotalVAT", 'fd.product_type'=>'TypeOfLineServiceOrProduct', 'fd.ref'=>'RefSupplier', 'fd.fk_product'=>'ProductId',
+ 'p.ref'=>'ProductRef', 'p.label'=>'ProductLabel', 'project.rowid'=>'ProjectId', 'project.ref'=>'ProjectRef', 'project.title'=>'ProjectLabel'
);
if (empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED))
{
unset($this->export_fields_array['f.date_approve2']);
unset($this->export_fields_array['ua2.login']);
}
- $this->export_TypeFields_array[$r]=array(
- 's.rowid'=>"company",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text',
- 's.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.idprof5'=>'Text','s.idprof6'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",
- 'f.date_creation'=>"Date",'f.date_commande'=>"Date",'f.date_livraison'=>"Date",'f.total_ht'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",
- 'f.fk_statut'=>'Status','f.date_approve'=>'Date','f.date_approve2'=>'Date','f.note_public'=>"Text",'f.note_private'=>"Text",'fd.description'=>"Text",
- 'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.remise_percent'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.total_tva'=>"Numeric",
- 'fd.product_type'=>'Numeric','fd.ref'=>'Text','fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','project.ref'=>'Text','project.title'=>'Text'
+ $this->export_TypeFields_array[$r] = array(
+ 's.rowid'=>"company", 's.nom'=>'Text', 's.address'=>'Text', 's.cp'=>'Text', 's.ville'=>'Text', 'c.code'=>'Text', 's.tel'=>'Text', 's.siren'=>'Text',
+ 's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.idprof5'=>'Text', 's.idprof6'=>'Text', 's.tva_intra'=>'Text', 'f.ref'=>"Text", 'f.ref_supplier'=>"Text",
+ 'f.date_creation'=>"Date", 'f.date_commande'=>"Date", 'f.date_livraison'=>"Date", 'f.total_ht'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.tva'=>"Numeric",
+ 'f.fk_statut'=>'Status', 'f.date_approve'=>'Date', 'f.date_approve2'=>'Date', 'f.note_public'=>"Text", 'f.note_private'=>"Text", 'fd.description'=>"Text",
+ 'fd.tva_tx'=>"Numeric", 'fd.qty'=>"Numeric", 'fd.remise_percent'=>"Numeric", 'fd.total_ht'=>"Numeric", 'fd.total_ttc'=>"Numeric", 'fd.total_tva'=>"Numeric",
+ 'fd.product_type'=>'Numeric', 'fd.ref'=>'Text', 'fd.fk_product'=>'List:product:label', 'p.ref'=>'Text', 'p.label'=>'Text', 'project.ref'=>'Text', 'project.title'=>'Text'
);
- $this->export_entities_array[$r]=array(
- 's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company',
- 's.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','ua1.login'=>'user',
- 'ua2.login'=>'user','fd.rowid'=>'order_line','fd.description'=>"order_line",'fd.tva_tx'=>"order_line",'fd.qty'=>"order_line",'fd.remise_percent'=>"order_line",
- 'fd.total_ht'=>"order_line",'fd.total_ttc'=>"order_line",'fd.total_tva'=>"order_line",'fd.product_type'=>'order_line','fd.ref'=>'order_line','fd.fk_product'=>'product',
- 'p.ref'=>'product','p.label'=>'product','project.rowid'=>'project','project.ref'=>'project','project.title'=>'project'
+ $this->export_entities_array[$r] = array(
+ 's.rowid'=>"company", 's.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'c.code'=>'company', 's.phone'=>'company', 's.siren'=>'company',
+ 's.siret'=>'company', 's.ape'=>'company', 's.idprof4'=>'company', 's.idprof5'=>'company', 's.idprof6'=>'company', 's.tva_intra'=>'company', 'ua1.login'=>'user',
+ 'ua2.login'=>'user', 'fd.rowid'=>'order_line', 'fd.description'=>"order_line", 'fd.tva_tx'=>"order_line", 'fd.qty'=>"order_line", 'fd.remise_percent'=>"order_line",
+ 'fd.total_ht'=>"order_line", 'fd.total_ttc'=>"order_line", 'fd.total_tva'=>"order_line", 'fd.product_type'=>'order_line', 'fd.ref'=>'order_line', 'fd.fk_product'=>'product',
+ 'p.ref'=>'product', 'p.label'=>'product', 'project.rowid'=>'project', 'project.ref'=>'project', 'project.title'=>'project'
);
- $this->export_dependencies_array[$r]=array('order_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
+ $this->export_dependencies_array[$r] = array('order_line'=>'fd.rowid', 'product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
// Add extra fields object
- $sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseur' AND entity IN (0, ".$conf->entity.")";
- $resql=$this->db->query($sql);
+ $sql = "SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseur' AND entity IN (0, ".$conf->entity.")";
+ $resql = $this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
- while ($obj=$this->db->fetch_object($resql))
+ while ($obj = $this->db->fetch_object($resql))
{
- $fieldname='extra.'.$obj->name;
- $fieldlabel=ucfirst($obj->label);
- $typeFilter="Text";
- switch($obj->type)
+ $fieldname = 'extra.'.$obj->name;
+ $fieldlabel = ucfirst($obj->label);
+ $typeFilter = "Text";
+ switch ($obj->type)
{
case 'int':
case 'double':
case 'price':
- $typeFilter="Numeric";
+ $typeFilter = "Numeric";
break;
case 'date':
case 'datetime':
- $typeFilter="Date";
+ $typeFilter = "Date";
break;
case 'boolean':
- $typeFilter="Boolean";
+ $typeFilter = "Boolean";
break;
case 'sellist':
- $tmp='';
- $tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
- $tmpkey=array_keys($tmpparam['options']);
- if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp=array_shift($tmpkey);
- if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
+ $tmp = '';
+ $tmpparam = unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
+ $tmpkey = array_keys($tmpparam['options']);
+ if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp = array_shift($tmpkey);
+ if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter = "List:".$tmp;
break;
}
- $this->export_fields_array[$r][$fieldname]=$fieldlabel;
- $this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
- $this->export_entities_array[$r][$fieldname]='order';
+ $this->export_fields_array[$r][$fieldname] = $fieldlabel;
+ $this->export_TypeFields_array[$r][$fieldname] = $typeFilter;
+ $this->export_entities_array[$r][$fieldname] = 'order';
}
}
// End add extra fields object
// Add extra fields line
- $sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseurdet' AND entity IN (0, ".$conf->entity.")";
- $resql=$this->db->query($sql);
+ $sql = "SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseurdet' AND entity IN (0, ".$conf->entity.")";
+ $resql = $this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
- while ($obj=$this->db->fetch_object($resql))
+ while ($obj = $this->db->fetch_object($resql))
{
- $fieldname='extraline.'.$obj->name;
- $fieldlabel=ucfirst($obj->label);
- $typeFilter="Text";
- switch($obj->type)
+ $fieldname = 'extraline.'.$obj->name;
+ $fieldlabel = ucfirst($obj->label);
+ $typeFilter = "Text";
+ switch ($obj->type)
{
case 'int':
case 'double':
case 'price':
- $typeFilter="Numeric";
+ $typeFilter = "Numeric";
break;
case 'date':
case 'datetime':
- $typeFilter="Date";
+ $typeFilter = "Date";
break;
case 'boolean':
- $typeFilter="Boolean";
+ $typeFilter = "Boolean";
break;
case 'sellist':
- $tmp='';
- $tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
+ $tmp = '';
+ $tmpparam = unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null
if ($tmpparam['options'] && is_array($tmpparam['options'])) {
- $tmpparam_param_key=array_keys($tmpparam['options']);
- $tmp=array_shift($tmpparam_param_key);
+ $tmpparam_param_key = array_keys($tmpparam['options']);
+ $tmp = array_shift($tmpparam_param_key);
}
- if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
+ if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter = "List:".$tmp;
break;
}
- $this->export_fields_array[$r][$fieldname]=$fieldlabel;
- $this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
- $this->export_entities_array[$r][$fieldname]='order_line';
+ $this->export_fields_array[$r][$fieldname] = $fieldlabel;
+ $this->export_TypeFields_array[$r][$fieldname] = $typeFilter;
+ $this->export_entities_array[$r][$fieldname] = 'order_line';
}
}
// End add extra fields line
- $this->export_sql_start[$r]='SELECT DISTINCT ';
- $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
- if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
- $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'commande_fournisseur as f';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet as project on (f.fk_projet = project.rowid)';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'user as ua1 ON ua1.rowid = f.fk_user_approve';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'user as ua2 ON ua2.rowid = f.fk_user_approve2';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseur_extrafields as extra ON f.rowid = extra.fk_object,';
- $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'commande_fournisseurdet as fd';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseurdet_extrafields as extraline ON fd.rowid = extraline.fk_object';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
- $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_commande';
- $this->export_sql_end[$r] .=' AND f.entity IN ('.getEntity('supplier_order').')';
- if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' AND sc.fk_user = '.$user->id;
+ $this->export_sql_start[$r] = 'SELECT DISTINCT ';
+ $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s';
+ if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
+ $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'commande_fournisseur as f';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as project on (f.fk_projet = project.rowid)';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as ua1 ON ua1.rowid = f.fk_user_approve';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as ua2 ON ua2.rowid = f.fk_user_approve2';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseur_extrafields as extra ON f.rowid = extra.fk_object,';
+ $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'commande_fournisseurdet as fd';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseurdet_extrafields as extraline ON fd.rowid = extraline.fk_object';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
+ $this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_commande';
+ $this->export_sql_end[$r] .= ' AND f.entity IN ('.getEntity('supplier_order').')';
+ if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id;
}
@@ -638,19 +641,19 @@ class modFournisseur extends DolibarrModules
$this->remove($options);
//ODT template
- $src=DOL_DOCUMENT_ROOT.'/install/doctemplates/supplier_orders/template_supplier_order.odt';
- $dirodt=DOL_DATA_ROOT.'/doctemplates/supplier_orders';
- $dest=$dirodt.'/template_supplier_order.odt';
+ $src = DOL_DOCUMENT_ROOT.'/install/doctemplates/supplier_orders/template_supplier_order.odt';
+ $dirodt = DOL_DATA_ROOT.'/doctemplates/supplier_orders';
+ $dest = $dirodt.'/template_supplier_order.odt';
- if (file_exists($src) && ! file_exists($dest))
+ if (file_exists($src) && !file_exists($dest))
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
dol_mkdir($dirodt);
- $result=dol_copy($src, $dest, 0, 0);
+ $result = dol_copy($src, $dest, 0, 0);
if ($result < 0)
{
$langs->load("errors");
- $this->error=$langs->trans('ErrorFailToCopyFile', $src, $dest);
+ $this->error = $langs->trans('ErrorFailToCopyFile', $src, $dest);
return 0;
}
}
diff --git a/htdocs/core/modules/modMrp.class.php b/htdocs/core/modules/modMrp.class.php
index 1ca8e380aa4..73df7523843 100644
--- a/htdocs/core/modules/modMrp.class.php
+++ b/htdocs/core/modules/modMrp.class.php
@@ -62,7 +62,7 @@ class modMrp extends DolibarrModules
// Used only if file README.md and README-LL.md not found.
$this->descriptionlong = "Module to Manage Manufacturing Orders (MO)";
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
- $this->version = 'experimental';
+ $this->version = 'dolibarr';
// Url to the file with your last numberversion of this module
//$this->url_last_version = 'http://www.example.com/versionmodule.txt';
diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php
index 2cc525bd8aa..b40ca3df78c 100644
--- a/htdocs/core/modules/modSociete.class.php
+++ b/htdocs/core/modules/modSociete.class.php
@@ -247,39 +247,39 @@ class modSociete extends DolibarrModules
// Menus
//-------
- $this->menu = 1; // This module add menu entries. They are coded into menu manager.
+ $this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
//--------
- $r=0;
+ $r = 0;
// Export list of third parties and attributes
$r++;
- $this->export_code[$r]=$this->rights_class.'_'.$r;
- $this->export_label[$r]='ExportDataset_company_1';
- $this->export_icon[$r]='company';
- $this->export_permission[$r]=array(array("societe","export"));
- $this->export_fields_array[$r]=array(
- 's.rowid'=>"Id",'s.nom'=>"Name",'s.name_alias'=>"AliasNameShort",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",
- 's.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"AccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",
- 's.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'d.nom'=>'State','c.label'=>"Country",'c.code'=>"CountryCode",'s.phone'=>"Phone",'s.fax'=>"Fax",
- 's.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",
- 's.idprof5'=>"ProfId5",'s.idprof6'=>"ProfId6",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note_private'=>"NotePrivate",'s.note_public'=>"NotePublic",
- 't.libelle'=>"ThirdPartyType",'ce.code'=>"Staff","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel',
- 'st.code'=>'ProspectStatus','payterm.libelle'=>'PaymentConditions','paymode.libelle'=>'PaymentMode'
+ $this->export_code[$r] = $this->rights_class.'_'.$r;
+ $this->export_label[$r] = 'ExportDataset_company_1';
+ $this->export_icon[$r] = 'company';
+ $this->export_permission[$r] = array(array("societe", "export"));
+ $this->export_fields_array[$r] = array(
+ 's.rowid'=>"Id", 's.nom'=>"Name", 's.name_alias'=>"AliasNameShort", 's.status'=>"Status", 's.client'=>"Customer", 's.fournisseur'=>"Supplier", 's.datec'=>"DateCreation", 's.tms'=>"DateLastModification",
+ 's.code_client'=>"CustomerCode", 's.code_fournisseur'=>"SupplierCode", 's.code_compta'=>"AccountancyCode", 's.code_compta_fournisseur'=>"SupplierAccountancyCode",
+ 's.address'=>"Address", 's.zip'=>"Zip", 's.town'=>"Town", 'd.nom'=>'State', 'c.label'=>"Country", 'c.code'=>"CountryCode", 's.phone'=>"Phone", 's.fax'=>"Fax",
+ 's.url'=>"Url", 's.email'=>"Email", 's.default_lang'=>"DefaultLang", 's.siren'=>"ProfId1", 's.siret'=>"ProfId2", 's.ape'=>"ProfId3", 's.idprof4'=>"ProfId4",
+ 's.idprof5'=>"ProfId5", 's.idprof6'=>"ProfId6", 's.tva_intra'=>"VATIntraShort", 's.capital'=>"Capital", 's.note_private'=>"NotePrivate", 's.note_public'=>"NotePublic",
+ 't.libelle'=>"ThirdPartyType", 'ce.code'=>"Staff", "cfj.libelle"=>"JuridicalStatus", 's.fk_prospectlevel'=>'ProspectLevel',
+ 'st.code'=>'ProspectStatus', 'payterm.libelle'=>'PaymentConditions', 'paymode.libelle'=>'PaymentMode'
);
- if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix';
- if (! empty($conf->global->PRODUIT_MULTIPRICES)) $this->export_fields_array[$r]['s.price_level']='PriceLevel';
+ if (!empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix'] = 'Prefix';
+ if (!empty($conf->global->PRODUIT_MULTIPRICES)) $this->export_fields_array[$r]['s.price_level'] = 'PriceLevel';
// Add multicompany field
- if (! empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED))
+ if (!empty($conf->global->MULTICOMPANY_ENTITY_IN_EXPORT_IF_SHARED))
{
- $nbofallowedentities=count(explode(',', getEntity('societe'))); // If project are shared, nb will be > 1
- if (! empty($conf->multicompany->enabled) && $nbofallowedentities > 1) $this->export_fields_array[$r]+=array('s.entity'=>'Entity');
+ $nbofallowedentities = count(explode(',', getEntity('societe'))); // If project are shared, nb will be > 1
+ if (!empty($conf->multicompany->enabled) && $nbofallowedentities > 1) $this->export_fields_array[$r] += array('s.entity'=>'Entity');
}
- $keyforselect='societe'; $keyforelement='company'; $keyforaliasextra='extra';
+ $keyforselect = 'societe'; $keyforelement = 'company'; $keyforaliasextra = 'extra';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
- $this->export_fields_array[$r]+=array('u.login'=>'SaleRepresentativeLogin','u.firstname'=>'SaleRepresentativeFirstname', 'u.lastname'=>'SaleRepresentativeLastname');
+ $this->export_fields_array[$r] += array('u.login'=>'SaleRepresentativeLogin', 'u.firstname'=>'SaleRepresentativeFirstname', 'u.lastname'=>'SaleRepresentativeLastname');
//$this->export_TypeFields_array[$r]=array(
// 's.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",
// 's.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.zip'=>"Text",'s.town'=>"Text",'c.label'=>"List:c_country:label:label",
@@ -288,101 +288,104 @@ class modSociete extends DolibarrModules
// 't.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code',
// 's.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'List:c_departements:nom:rowid'
//);
- $this->export_TypeFields_array[$r]=array(
- 's.rowid'=>"Numeric", 's.nom'=>"Text",'s.name_alias'=>"Text",'s.status'=>"Numeric",'s.client'=>"Numeric",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",
- 's.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.code_compta'=>"Text",'s.code_compta_fournisseur'=>"Text",'s.address'=>"Text",'s.zip'=>"Text",
- 's.town'=>"Text",'c.label'=>"List:c_country:label:label",'c.code'=>"Text",'s.phone'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",
- 's.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",
- 's.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note_private'=>"Text",'s.note_public'=>"Text",'t.libelle'=>"Text",
- 'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code',
- 'st.code'=>'List:c_stcomm:libelle:code','d.nom'=>'Text','u.login'=>'Text','u.firstname'=>'Text','u.lastname'=>'Text','payterm.libelle'=>'Text',
- 'paymode.libelle'=>'Text','s.entity'=>'Numeric',
+ $this->export_TypeFields_array[$r] = array(
+ 's.rowid'=>"Numeric", 's.nom'=>"Text", 's.name_alias'=>"Text", 's.status'=>"Numeric", 's.client'=>"Numeric", 's.fournisseur'=>"Boolean", 's.datec'=>"Date", 's.tms'=>"Date",
+ 's.code_client'=>"Text", 's.code_fournisseur'=>"Text", 's.code_compta'=>"Text", 's.code_compta_fournisseur'=>"Text", 's.address'=>"Text", 's.zip'=>"Text",
+ 's.town'=>"Text", 'c.label'=>"List:c_country:label:label", 'c.code'=>"Text", 's.phone'=>"Text", 's.fax'=>"Text", 's.url'=>"Text", 's.email'=>"Text",
+ 's.default_lang'=>"Text", 's.siret'=>"Text", 's.siren'=>"Text", 's.ape'=>"Text", 's.idprof4'=>"Text", 's.idprof5'=>"Text", 's.idprof6'=>"Text",
+ 's.tva_intra'=>"Text", 's.capital'=>"Numeric", 's.note_private'=>"Text", 's.note_public'=>"Text", 't.libelle'=>"Text",
+ 'ce.code'=>"List:c_effectif:libelle:code", "cfj.libelle"=>"Text", 's.fk_prospectlevel'=>'List:c_prospectlevel:label:code',
+ 'st.code'=>'List:c_stcomm:libelle:code', 'd.nom'=>'Text', 'u.login'=>'Text', 'u.firstname'=>'Text', 'u.lastname'=>'Text', 'payterm.libelle'=>'Text',
+ 'paymode.libelle'=>'Text', 's.entity'=>'Numeric',
's.price_level'=>'Numeric'
);
- $this->export_entities_array[$r]=array('u.login'=>'user','u.firstname'=>'user','u.lastname'=>'user'); // We define here only fields that use another picto
- $this->export_examplevalues_array[$r]=array('s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 (not a supplier) or 1 (supplier)');
- $this->export_sql_start[$r]='SELECT DISTINCT ';
- $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extra ON s.rowid = extra.fk_object';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as t ON s.fk_typent = t.id';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_effectif as ce ON s.fk_effectif = ce.id';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_forme_juridique as cfj ON s.fk_forme_juridique = cfj.code';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_stcomm as st ON s.fk_stcomm = st.id';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON sc.fk_user = u.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as payterm ON s.cond_reglement = payterm.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as paymode ON s.mode_reglement = paymode.id';
- $this->export_sql_end[$r] .=' WHERE s.entity IN ('.getEntity('societe').')';
+ $this->export_entities_array[$r] = array('u.login'=>'user', 'u.firstname'=>'user', 'u.lastname'=>'user'); // We define here only fields that use another picto
+ $this->export_examplevalues_array[$r] = array('s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)', 's.fournisseur'=>'0 (not a supplier) or 1 (supplier)');
+ $this->export_sql_start[$r] = 'SELECT DISTINCT ';
+ $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extra ON s.rowid = extra.fk_object';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as t ON s.fk_typent = t.id';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_effectif as ce ON s.fk_effectif = ce.id';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_forme_juridique as cfj ON s.fk_forme_juridique = cfj.code';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_stcomm as st ON s.fk_stcomm = st.id';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON sc.fk_user = u.rowid';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as payterm ON s.cond_reglement = payterm.rowid';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as paymode ON s.mode_reglement = paymode.id';
+ $this->export_sql_end[$r] .= ' WHERE s.entity IN ('.getEntity('societe').')';
if (is_object($user) && empty($user->rights->societe->client->voir)) {
- $this->export_sql_end[$r] .=' AND (sc.fk_user = '.$user->id.' ';
- if (! empty($conf->global->SOCIETE_EXPORT_SUBORDINATES_CHILDS)) {
+ $this->export_sql_end[$r] .= ' AND (sc.fk_user = '.$user->id.' ';
+ if (!empty($conf->global->SOCIETE_EXPORT_SUBORDINATES_CHILDS)) {
$subordinatesids = $user->getAllChildIds();
- $this->export_sql_end[$r] .=count($subordinatesids)>0 ? ' OR (sc.fk_user IN ('.implode(',', $subordinatesids).')' : '';
+ $this->export_sql_end[$r] .= count($subordinatesids) > 0 ? ' OR (sc.fk_user IN ('.implode(',', $subordinatesids).')' : '';
}
- $this->export_sql_end[$r] .=')';
+ $this->export_sql_end[$r] .= ')';
}
// Export list of contacts and attributes
$r++;
- $this->export_code[$r]=$this->rights_class.'_'.$r;
- $this->export_label[$r]='ExportDataset_company_2';
- $this->export_icon[$r]='contact';
- $this->export_permission[$r]=array(array("societe","contact","export"));
- $this->export_fields_array[$r]=array(
- 'c.rowid'=>"IdContact",'c.civility'=>"CivilityCode",'c.lastname'=>'Lastname','c.firstname'=>'Firstname','c.poste'=>'PostOrFunction',
- 'c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.zip'=>"Zip",'c.town'=>"Town",
- 'd.nom'=>'State','co.label'=>"Country",'co.code'=>"CountryCode",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.phone_mobile'=>"Mobile",'c.email'=>"EMail",
+ $this->export_code[$r] = $this->rights_class.'_'.$r;
+ $this->export_label[$r] = 'ExportDataset_company_2';
+ $this->export_icon[$r] = 'contact';
+ $this->export_permission[$r] = array(array("societe", "contact", "export"));
+ $this->export_fields_array[$r] = array(
+ 'c.rowid'=>"IdContact", 'c.civility'=>"CivilityCode", 'c.lastname'=>'Lastname', 'c.firstname'=>'Firstname', 'c.poste'=>'PostOrFunction',
+ 'c.datec'=>"DateCreation", 'c.tms'=>"DateLastModification", 'c.priv'=>"ContactPrivate", 'c.address'=>"Address", 'c.zip'=>"Zip", 'c.town'=>"Town",
+ 'd.nom'=>'State', 'co.label'=>"Country", 'co.code'=>"CountryCode", 'c.phone'=>"Phone", 'c.fax'=>"Fax", 'c.phone_mobile'=>"Mobile", 'c.email'=>"EMail",
'c.statut'=>"Status",
- 's.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.status'=>"Status",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",
- 's.client'=>'Customer','s.fournisseur'=>'Supplier',
- 's.address'=>'Address','s.zip'=>"Zip",'s.town'=>"Town",'s.phone'=>'Phone','s.email'=>"Email",
+ 's.rowid'=>"IdCompany", 's.nom'=>"CompanyName", 's.status'=>"Status", 's.code_client'=>"CustomerCode", 's.code_fournisseur'=>"SupplierCode",
+ 's.code_compta'=>"AccountancyCode", 's.code_compta_fournisseur'=>"SupplierAccountancyCode",
+ 's.client'=>'Customer', 's.fournisseur'=>'Supplier',
+ 's.address'=>'Address', 's.zip'=>"Zip", 's.town'=>"Town", 's.phone'=>'Phone', 's.email'=>"Email",
't.libelle'=>"ThirdPartyType"
);
- $this->export_examplevalues_array[$r]=array('s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 (not a supplier) or 1 (supplier)');
- $this->export_TypeFields_array[$r]=array(
- 'c.civility'=>"List:c_civility:label:code",'c.lastname'=>'Text','c.firstname'=>'Text','c.poste'=>'Text','c.datec'=>"Date",'c.priv'=>"Boolean",
- 'c.address'=>"Text",'c.zip'=>"Text",'c.town'=>"Text",'d.nom'=>'Text','co.label'=>"List:c_country:label:rowid",'co.code'=>"Text",'c.phone'=>"Text",
- 'c.fax'=>"Text",'c.email'=>"Text",
+ $this->export_examplevalues_array[$r] = array('s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)', 's.fournisseur'=>'0 (not a supplier) or 1 (supplier)');
+ $this->export_TypeFields_array[$r] = array(
+ 'c.civility'=>"List:c_civility:label:code", 'c.lastname'=>'Text', 'c.firstname'=>'Text', 'c.poste'=>'Text', 'c.datec'=>"Date", 'c.priv'=>"Boolean",
+ 'c.address'=>"Text", 'c.zip'=>"Text", 'c.town'=>"Text", 'd.nom'=>'Text', 'co.label'=>"List:c_country:label:rowid", 'co.code'=>"Text", 'c.phone'=>"Text",
+ 'c.fax'=>"Text", 'c.email'=>"Text",
'c.statut'=>"Status",
- 's.rowid'=>"List:societe:nom::thirdparty",'s.nom'=>"Text",'s.status'=>"Status",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",
- 's.client'=>"Text",'s.fournisseur'=>"Text",
- 's.address'=>"Text",'s.zip'=>"Text",'s.town'=>"Text",'s.phone'=>"Text",'s.email'=>"Text",
+ 's.rowid'=>"List:societe:nom::thirdparty", 's.nom'=>"Text", 's.status'=>"Status", 's.code_client'=>"Text", 's.code_fournisseur'=>"Text",
+ 's.code_compta'=>"Text", 's.code_compta_fournisseur'=>"Text",
+ 's.client'=>"Text", 's.fournisseur'=>"Text",
+ 's.address'=>"Text", 's.zip'=>"Text", 's.town'=>"Text", 's.phone'=>"Text", 's.email'=>"Text",
't.libelle'=>"Text"
);
- $this->export_entities_array[$r]=array(
- 's.rowid'=>"company",'s.nom'=>"company", 's.status'=>'company', 's.code_client'=>"company",'s.code_fournisseur'=>"company", 's.client'=>"company",
- 's.fournisseur'=>"company",
+ $this->export_entities_array[$r] = array(
+ 's.rowid'=>"company", 's.nom'=>"company", 's.status'=>'company', 's.code_client'=>"company", 's.code_fournisseur'=>"company",
+ 's.code_compta'=>"company", 's.code_compta_fournisseur'=>"company",
+ 's.client'=>"company", 's.fournisseur'=>"company",
's.address'=>"company", 's.zip'=>"company", 's.town'=>"company", 's.phone'=>"company", 's.email'=>"company",
't.libelle'=>"company"
- ); // We define here only fields that use another picto
+ ); // We define here only fields that use another picto
if (empty($conf->fournisseur->enabled))
{
unset($this->export_fields_array[$r]['s.code_fournisseur']);
unset($this->export_entities_array[$r]['s.code_fournisseur']);
}
- $keyforselect='socpeople'; $keyforelement='contact'; $keyforaliasextra='extra';
+ $keyforselect = 'socpeople'; $keyforelement = 'contact'; $keyforaliasextra = 'extra';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
- $keyforselect='societe'; $keyforelement='company'; $keyforaliasextra='extrasoc';
+ $keyforselect = 'societe'; $keyforelement = 'company'; $keyforaliasextra = 'extrasoc';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
- $this->export_sql_start[$r]='SELECT DISTINCT ';
- $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'socpeople as c';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON c.fk_soc = s.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extrasoc ON s.rowid = extrasoc.fk_object';
- if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON c.fk_departement = d.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON c.fk_pays = co.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra ON extra.fk_object = c.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as t ON s.fk_typent = t.id';
- $this->export_sql_end[$r] .=' WHERE c.entity IN ('.getEntity('socpeople').')';
+ $this->export_sql_start[$r] = 'SELECT DISTINCT ';
+ $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'socpeople as c';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON c.fk_soc = s.rowid';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extrasoc ON s.rowid = extrasoc.fk_object';
+ if (is_object($user) && empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON c.fk_departement = d.rowid';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON c.fk_pays = co.rowid';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra ON extra.fk_object = c.rowid';
+ $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as t ON s.fk_typent = t.id';
+ $this->export_sql_end[$r] .= ' WHERE c.entity IN ('.getEntity('socpeople').')';
if (is_object($user) && empty($user->rights->societe->client->voir)) {
- $this->export_sql_end[$r] .=' AND (sc.fk_user = '.$user->id.' ';
- if (! empty($conf->global->SOCIETE_EXPORT_SUBORDINATES_CHILDS)) {
+ $this->export_sql_end[$r] .= ' AND (sc.fk_user = '.$user->id.' ';
+ if (!empty($conf->global->SOCIETE_EXPORT_SUBORDINATES_CHILDS)) {
$subordinatesids = $user->getAllChildIds();
- $this->export_sql_end[$r] .=count($subordinatesids)>0 ? ' OR (sc.fk_user IN ('.implode(',', $subordinatesids).')' : '';
+ $this->export_sql_end[$r] .= count($subordinatesids) > 0 ? ' OR (sc.fk_user IN ('.implode(',', $subordinatesids).')' : '';
}
- $this->export_sql_end[$r] .=')';
+ $this->export_sql_end[$r] .= ')';
}
diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php
index 8d7f16fcaf7..fbf560565ee 100644
--- a/htdocs/core/modules/modTicket.class.php
+++ b/htdocs/core/modules/modTicket.class.php
@@ -120,16 +120,16 @@ class modTicket extends DolibarrModules
}
$this->dictionaries = array(
'langs' => 'ticket',
- 'tabname' => array(MAIN_DB_PREFIX . "c_ticket_type", MAIN_DB_PREFIX . "c_ticket_severity", MAIN_DB_PREFIX . "c_ticket_category"),
- 'tablib' => array("TicketDictType", "TicketDictSeverity", "TicketDictCategory"),
- 'tabsql' => array('SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM ' . MAIN_DB_PREFIX . 'c_ticket_type as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM ' . MAIN_DB_PREFIX . 'c_ticket_severity as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM ' . MAIN_DB_PREFIX . 'c_ticket_category as f'),
- 'tabsqlsort' => array("pos ASC", "pos ASC", "pos ASC"),
- 'tabfield' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"),
- 'tabfieldvalue' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"),
- 'tabfieldinsert' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"),
- 'tabrowid' => array("rowid", "rowid", "rowid"),
- 'tabcond' => array($conf->ticket->enabled, $conf->ticket->enabled, $conf->ticket->enabled),
- 'tabhelp' => array(array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1"))),
+ 'tabname' => array(MAIN_DB_PREFIX."c_ticket_type", MAIN_DB_PREFIX."c_ticket_severity", MAIN_DB_PREFIX."c_ticket_category", MAIN_DB_PREFIX."c_ticket_resolution"),
+ 'tablib' => array("TicketDictType", "TicketDictSeverity", "TicketDictCategory", "TicketDictResolution"),
+ 'tabsql' => array('SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_type as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_severity as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_category as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_resolution as f'),
+ 'tabsqlsort' => array("pos ASC", "pos ASC", "pos ASC", "pos ASC"),
+ 'tabfield' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"),
+ 'tabfieldvalue' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"),
+ 'tabfieldinsert' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"),
+ 'tabrowid' => array("rowid", "rowid", "rowid", "rowid"),
+ 'tabcond' => array($conf->ticket->enabled, $conf->ticket->enabled, $conf->ticket->enabled, $conf->ticket->enabled),
+ 'tabhelp' => array(array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1"))),
);
// Boxes
diff --git a/htdocs/core/modules/modUser.class.php b/htdocs/core/modules/modUser.class.php
index ca1a8d22209..c2ce0fec86f 100644
--- a/htdocs/core/modules/modUser.class.php
+++ b/htdocs/core/modules/modUser.class.php
@@ -314,7 +314,8 @@ class modUser extends DolibarrModules
'u.birth'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'
);
$this->import_examplevalues_array[$r] = array(
- 'u.lastname'=>"Doe", 'u.firstname'=>'John', 'u.login'=>'jdoe', 'u.employee'=>'0 or 1',
+ 'u.lastname'=>"Doe", 'u.firstname'=>'John', 'u.login'=>'jdoe', 'u.employee'=>'0 or 1', 'u.job'=>'CTO', 'u.gender'=>'0 or 1',
+ 'u.pass_crypted'=>'Encrypted password',
'u.fk_soc'=>'0 (internal user) or company name (external user)', 'u.datec'=>dol_print_date(dol_now(), '%Y-%m-%d'), 'u.address'=>"61 jump street",
'u.zip'=>"123456", 'u.town'=>"Big town", 'u.fk_country'=>'US, FR, DE...', 'u.office_phone'=>"0101010101", 'u.office_fax'=>"0101010102",
'u.email'=>"test@mycompany.com", 'u.salary'=>"10000", 'u.note'=>"This is an example of note for record", 'u.datec'=>"2015-01-01 or 2015-01-01 12:30:00",
diff --git a/htdocs/core/modules/oauth/github_oauthcallback.php b/htdocs/core/modules/oauth/github_oauthcallback.php
index 919781baa93..e84fd023c78 100644
--- a/htdocs/core/modules/oauth/github_oauthcallback.php
+++ b/htdocs/core/modules/oauth/github_oauthcallback.php
@@ -71,7 +71,7 @@ $credentials = new Credentials(
);
$requestedpermissionsarray=array();
-if (GETPOST('state')) $requestedpermissionsarray=explode(',', GETPOST('state')); // Example: 'userinfo_email,userinfo_profile,cloud_print'. 'state' parameter is standard to retrieve some parameters back
+if (GETPOST('state')) $requestedpermissionsarray=explode(',', GETPOST('state')); // Example: 'user'. 'state' parameter is standard to retrieve some parameters back
if ($action != 'delete' && empty($requestedpermissionsarray))
{
print 'Error, parameter state is not defined';
@@ -93,7 +93,6 @@ $langs->load("oauth");
* Actions
*/
-
if ($action == 'delete')
{
$storage->clearToken('GitHub');
diff --git a/htdocs/core/modules/oauth/google_oauthcallback.php b/htdocs/core/modules/oauth/google_oauthcallback.php
index c9fd9869caf..4a313b6736b 100644
--- a/htdocs/core/modules/oauth/google_oauthcallback.php
+++ b/htdocs/core/modules/oauth/google_oauthcallback.php
@@ -71,7 +71,7 @@ $credentials = new Credentials(
);
$requestedpermissionsarray=array();
-if (GETPOST('state')) $requestedpermissionsarray=explode(',', GETPOST('state')); // Example: 'userinfo_email,userinfo_profile,cloud_print'. 'state' parameter is standard to retrieve some parameters back
+if (GETPOST('state')) $requestedpermissionsarray=explode(',', GETPOST('state')); // Example: 'userinfo_email,userinfo_profile,cloud_print'. 'state' parameter is standard to store a hash value and can be used to retrieve some parameters back
if ($action != 'delete' && empty($requestedpermissionsarray))
{
print 'Error, parameter state is not defined';
diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php
index 910ef3ec1cf..79941dba8d6 100644
--- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php
+++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php
@@ -362,7 +362,13 @@ class pdf_baleine extends ModelePDFProjects
else
{
// We found a page break
- $showpricebeforepagebreak=0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
+
$forcedesconsamepage=1;
if ($forcedesconsamepage)
{
diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php
index b26b46604ff..4072f22bf58 100644
--- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php
+++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php
@@ -512,7 +512,13 @@ class pdf_beluga extends ModelePDFProjects
else
{
// We found a page break
- $showpricebeforepagebreak=0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
+
$forcedesconsamepage=1;
if ($forcedesconsamepage)
{
diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php
index 27822545fa2..0c1eba3c9ac 100644
--- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php
+++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php
@@ -293,7 +293,13 @@ class pdf_timespent extends ModelePDFProjects
else
{
// We found a page break
- $showpricebeforepagebreak=0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
+
$forcedesconsamepage=1;
if ($forcedesconsamepage)
{
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index fada0b8a142..3810ad67237 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -500,7 +500,12 @@ class pdf_azur extends ModelePDFPropales
$pdf->setPage($pageposbefore + 1);
$curY = $tab_top_newpage;
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
if (isset($imglinesize['width']) && isset($imglinesize['height']))
@@ -541,7 +546,12 @@ class pdf_azur extends ModelePDFPropales
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
@@ -1518,6 +1528,30 @@ class pdf_azur extends ModelePDFPropales
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R');
}
+ if (! empty($conf->global->PDF_SHOW_PROJECT_TITLE))
+ {
+ $object->fetch_projet();
+ if (! empty($object->project->ref))
+ {
+ $posy+=3;
+ $pdf->SetXY($posx, $posy);
+ $pdf->SetTextColor(0, 0, 60);
+ $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->title)?'':$object->projet->title), '', 'R');
+ }
+ }
+
+ if (! empty($conf->global->PDF_SHOW_PROJECT))
+ {
+ $object->fetch_projet();
+ if (! empty($object->project->ref))
+ {
+ $posy+=3;
+ $pdf->SetXY($posx, $posy);
+ $pdf->SetTextColor(0, 0, 60);
+ $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : " . (empty($object->project->ref)?'':$object->projet->ref), '', 'R');
+ }
+ }
+
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
index a14c087dbf7..07ceb461803 100644
--- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
@@ -592,7 +592,12 @@ class pdf_cyan extends ModelePDFPropales
$pdf->setPage($pageposbefore + 1);
$curY = $tab_top_newpage;
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
@@ -634,7 +639,11 @@ class pdf_cyan extends ModelePDFPropales
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
@@ -1579,6 +1588,30 @@ class pdf_cyan extends ModelePDFPropales
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R');
}
+ if (! empty($conf->global->PDF_SHOW_PROJECT_TITLE))
+ {
+ $object->fetch_projet();
+ if (! empty($object->project->ref))
+ {
+ $posy+=3;
+ $pdf->SetXY($posx, $posy);
+ $pdf->SetTextColor(0, 0, 60);
+ $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->title)?'':$object->projet->title), '', 'R');
+ }
+ }
+
+ if (! empty($conf->global->PDF_SHOW_PROJECT))
+ {
+ $object->fetch_projet();
+ if (! empty($object->project->ref))
+ {
+ $posy+=3;
+ $pdf->SetXY($posx, $posy);
+ $pdf->SetTextColor(0, 0, 60);
+ $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : " . (empty($object->project->ref)?'':$object->projet->ref), '', 'R');
+ }
+ }
+
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php
index 125c56960ca..f1c2eba89e4 100644
--- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php
+++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php
@@ -374,7 +374,12 @@ class pdf_squille extends ModelePdfReception
$pdf->setPage($pageposbefore + 1);
$curY = $tab_top_newpage;
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
if (isset($imglinesize['width']) && isset($imglinesize['height']))
@@ -417,7 +422,12 @@ class pdf_squille extends ModelePdfReception
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php
index 97c0744c121..b2898c2fbac 100644
--- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php
@@ -383,7 +383,12 @@ class pdf_standard extends ModelePDFStock
else
{
// We found a page break
- $showpricebeforepagebreak=0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php
index 4f59c2510b4..362f17c7e9c 100644
--- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php
+++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php
@@ -543,7 +543,12 @@ class pdf_stdmovement extends ModelePDFMovement
else
{
// We found a page break
- $showpricebeforepagebreak=0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
index f318237a43e..a484343b1c0 100644
--- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
+++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php
@@ -428,7 +428,11 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
else
{
// We found a page break
- $showpricebeforepagebreak=0;
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
index 2a2916cf253..1c266ae89b6 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php
@@ -526,7 +526,12 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf->setPage($pageposbefore + 1);
$curY = $tab_top_newpage;
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
if (!empty($imglinesize['width']) && !empty($imglinesize['height']))
@@ -567,7 +572,11 @@ class pdf_cornas extends ModelePDFSuppliersOrders
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
index 395e461e807..e4cb8f53e66 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
@@ -443,7 +443,12 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->setPage($pageposbefore + 1);
$curY = $tab_top_newpage;
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
if (!empty($imglinesize['width']) && !empty($imglinesize['height']))
@@ -490,7 +495,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if(!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
index 2a6112db9e2..0ad8b391faf 100644
--- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
@@ -363,7 +363,11 @@ class pdf_standard extends ModelePDFSuppliersPayments
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
index db5c5501d53..afaf4987e04 100644
--- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
@@ -428,7 +428,12 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->setPage($pageposbefore + 1);
$curY = $tab_top_newpage;
- $showpricebeforepagebreak = 0;
+
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
if (!empty($imglinesize['width']) && !empty($imglinesize['height']))
@@ -478,7 +483,11 @@ class pdf_aurore extends ModelePDFSupplierProposal
else
{
// We found a page break
- $showpricebeforepagebreak = 0;
+ // Allows data in the first page if description is long enough to break in multiples pages
+ if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE))
+ $showpricebeforepagebreak = 1;
+ else
+ $showpricebeforepagebreak = 0;
}
}
else // No pagebreak
diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php
index 37ca5e1ec10..e695c7aa95f 100644
--- a/htdocs/core/tpl/admin_extrafields_add.tpl.php
+++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php
@@ -148,7 +148,7 @@ $langs->load("modulebuilder");
trans("LabelOrTranslationKey"); ?>
-trans("AttributeCode"); ?> (trans("AlphaNumOnlyLowerCharsAndNoSpace"); ?>)
+trans("AttributeCode"); ?> (trans("AlphaNumOnlyLowerCharsAndNoSpace"); ?>)
trans("Type"); ?>
selectarray('type', $type2label, GETPOST('type', 'alpha')); ?>
diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php
index 478c2dfa4b8..b3b6b5d1bf1 100644
--- a/htdocs/core/tpl/advtarget.tpl.php
+++ b/htdocs/core/tpl/advtarget.tpl.php
@@ -58,24 +58,27 @@ print ''."\n";
print ''."\n";
print ''."\n";
-print ' '."\n";
+print ' '."\n";
print ' '."\n";
print ' '."\n";
-print ''.$langs->trans('AdvTgtNameTemplate').' ';
+print ' '.$langs->trans('AdvTgtNameTemplate').' ';
if (!empty($template_id)) {
$default_template = $template_id;
} else {
$default_template = $advTarget->id;
}
-print $formadvtargetemaling->selectAdvtargetemailingTemplate('template_id', $default_template, 0, $advTarget->type_element);
-print ' ';
-print ' ';
-print ' ';
-print $langs->trans('AdvTgtOrCreateNewFilter');
+print $formadvtargetemaling->selectAdvtargetemailingTemplate('template_id', $default_template, 0, $advTarget->type_element, 'valignmiddle');
+print ' ';
+print ' ';
+print ' ';
+print ' ' . "\n";
+print ' ' . "\n";
+
+print '' . $langs->trans('AdvTgtOrCreateNewFilter') . ' ';
print ' ';
-print ' ';
+print ' ';
print ' '."\n";
print ' '."\n";
diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php
index 1a9a046bf81..169b7753b92 100644
--- a/htdocs/core/tpl/card_presend.tpl.php
+++ b/htdocs/core/tpl/card_presend.tpl.php
@@ -188,7 +188,8 @@ if ($action == 'presend')
}
}
- $formmail->withto = GETPOST('sendto') ? GETPOST('sendto') : $liste;
+ $formmail->withto = $liste;
+ $formmail->withtofree = (GETPOSTISSET('sendto') ? (GETPOST('sendto') ? GETPOST('sendto') : '1') : '');
$formmail->withtocc = $liste;
$formmail->withtoccc = $conf->global->MAIN_EMAIL_USECCC;
$formmail->withtopic = $topicmail;
diff --git a/htdocs/core/tpl/extrafields_list_search_param.tpl.php b/htdocs/core/tpl/extrafields_list_search_param.tpl.php
index ca72293365a..6e6d6305106 100644
--- a/htdocs/core/tpl/extrafields_list_search_param.tpl.php
+++ b/htdocs/core/tpl/extrafields_list_search_param.tpl.php
@@ -8,7 +8,7 @@ if (empty($conf) || !is_object($conf))
}
// Loop to complete $param for extrafields
-if (!empty($search_array_options)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ...
+if (!empty($search_array_options) && is_array($search_array_options)) // $extrafieldsobject is the $object->table_element like 'societe', 'socpeople', ...
{
if (empty($search_options_pattern)) $search_options_pattern = 'search_options_';
diff --git a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php
index 29c67094975..3a0bcf6375c 100644
--- a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php
+++ b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php
@@ -40,7 +40,10 @@ if (! empty($extrafieldsobjectkey) && ! empty($search_array_options) && is_array
if (in_array($typ, array('sellist','link')) && $crit != '0' && $crit != '-1') $mode_search=2; // Search on a foreign key int
if (in_array($typ, array('chkbxlst','checkbox'))) $mode_search=4; // Search on a multiselect field with sql type = text
if (is_array($crit)) $crit = implode(' ', $crit); // natural_search() expects a string
-
+ elseif ($typ === 'select' and is_string($crit) and strpos($crit, ' ') === false) {
+ $sql .= ' AND (' . $extrafieldsobjectprefix.$tmpkey . ' = "' . $db->escape($crit) . '")';
+ continue;
+ }
$sql .= natural_search($extrafieldsobjectprefix.$tmpkey, $crit, $mode_search);
}
}
diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php
index 7663af1c48e..28eb78fa61b 100644
--- a/htdocs/core/tpl/notes.tpl.php
+++ b/htdocs/core/tpl/notes.tpl.php
@@ -1,7 +1,7 @@
* Copyright (C) 2013 Florian Henry
- * Copyright (C) 2014-2017 Laurent Destailleur
+ * Copyright (C) 2014-2020 Laurent Destailleur
*
* 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
@@ -29,69 +29,70 @@ $module = $object->element;
$note_public = 'note_public';
$note_private = 'note_private';
-$colwidth=(isset($colwidth)?$colwidth:(empty($cssclass)?'25':''));
+$colwidth = (isset($colwidth) ? $colwidth : (empty($cssclass) ? '25' : ''));
// Set $permission from the $permissionnote var defined on calling page
-$permission=(isset($permissionnote)?$permissionnote:(isset($permission)?$permission:(isset($user->rights->$module->create)?$user->rights->$module->create:(isset($user->rights->$module->creer)?$user->rights->$module->creer:0))));
-$moreparam=(isset($moreparam)?$moreparam:'');
-$value_public=$object->note_public;
-$value_private=$object->note_private;
-if (! empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_PUBLIC_NOTES))
+$permission = (isset($permissionnote) ? $permissionnote : (isset($permission) ? $permission : (isset($user->rights->$module->create) ? $user->rights->$module->create : (isset($user->rights->$module->creer) ? $user->rights->$module->creer : 0))));
+$moreparam = (isset($moreparam) ? $moreparam : '');
+$value_public = $object->note_public;
+$value_private = $object->note_private;
+if (!empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_PUBLIC_NOTES))
{
- $stringtoadd=dol_print_date(dol_now(), 'dayhour').' '.$user->getFullName($langs).' --';
+ $stringtoadd = dol_print_date(dol_now(), 'dayhour').' '.$user->getFullName($langs).' --';
if (GETPOST('action', 'aZ09') == 'edit'.$note_public)
{
- $value_public=dol_concatdesc($value_public, ($value_public?"\n":"")."-- ".$stringtoadd);
- if (dol_textishtml($value_public)) $value_public.=" \n";
- else $value_public.="\n";
+ $value_public = dol_concatdesc($value_public, ($value_public ? "\n" : "")."-- ".$stringtoadd);
+ if (dol_textishtml($value_public)) $value_public .= " \n";
+ else $value_public .= "\n";
}
}
-if (! empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_PRIVATE_NOTES))
+if (!empty($conf->global->MAIN_AUTO_TIMESTAMP_IN_PRIVATE_NOTES))
{
- $stringtoadd=dol_print_date(dol_now(), 'dayhour').' '.$user->getFullName($langs).' --';
+ $stringtoadd = dol_print_date(dol_now(), 'dayhour').' '.$user->getFullName($langs).' --';
if (GETPOST('action', 'aZ09') == 'edit'.$note_private)
{
- $value_private=dol_concatdesc($value_private, ($value_private?"\n":"")."-- ".$stringtoadd);
- if (dol_textishtml($value_private)) $value_private.=" \n";
- else $value_private.="\n";
+ $value_private = dol_concatdesc($value_private, ($value_private ? "\n" : "")."-- ".$stringtoadd);
+ if (dol_textishtml($value_private)) $value_private .= " \n";
+ else $value_private .= "\n";
}
}
// Special cases
-if ($module == 'propal') { $permission=$user->rights->propale->creer;}
-elseif ($module == 'supplier_proposal') { $permission=$user->rights->supplier_proposal->creer;}
-elseif ($module == 'fichinter') { $permission=$user->rights->ficheinter->creer;}
-elseif ($module == 'project') { $permission=$user->rights->projet->creer;}
-elseif ($module == 'project_task') { $permission=$user->rights->projet->creer;}
-elseif ($module == 'invoice_supplier') { $permission=$user->rights->fournisseur->facture->creer;}
-elseif ($module == 'order_supplier') { $permission=$user->rights->fournisseur->commande->creer;}
-elseif ($module == 'societe') { $permission=$user->rights->societe->creer;}
-elseif ($module == 'contact') { $permission=$user->rights->societe->creer;}
-elseif ($module == 'shipping') { $permission=$user->rights->expedition->creer;}
-elseif ($module == 'product') { $permission=$user->rights->produit->creer;}
+if ($module == 'propal') { $permission = $user->rights->propale->creer; }
+elseif ($module == 'supplier_proposal') { $permission = $user->rights->supplier_proposal->creer; }
+elseif ($module == 'fichinter') { $permission = $user->rights->ficheinter->creer; }
+elseif ($module == 'project') { $permission = $user->rights->projet->creer; }
+elseif ($module == 'project_task') { $permission = $user->rights->projet->creer; }
+elseif ($module == 'invoice_supplier') { $permission = $user->rights->fournisseur->facture->creer; }
+elseif ($module == 'order_supplier') { $permission = $user->rights->fournisseur->commande->creer; }
+elseif ($module == 'societe') { $permission = $user->rights->societe->creer; }
+elseif ($module == 'contact') { $permission = $user->rights->societe->creer; }
+elseif ($module == 'shipping') { $permission = $user->rights->expedition->creer; }
+elseif ($module == 'product') { $permission = $user->rights->produit->creer; }
//else dol_print_error('','Bad value '.$module.' for param module');
-if (! empty($conf->fckeditor->enabled) && ! empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) $typeofdata='ckeditor:dolibarr_notes:100%:200::1:12:95%:0'; // Rem: This var is for all notes, not only thirdparties note.
-else $typeofdata='textarea:12:95%';
+if (!empty($conf->fckeditor->enabled) && !empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) $typeofdata = 'ckeditor:dolibarr_notes:100%:200::1:12:95%:0'; // Rem: This var is for all notes, not only thirdparties note.
+else $typeofdata = 'textarea:12:95%';
print ''."\n";
print ''."\n";
if ($module != 'product') {
// No public note yet on products
print '
'."\n";
- print '
'."\n";
+ print '
'."\n";
print $form->editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam, '', 0);
print '
'."\n";
- print '
'."\n";
+ print '
'."\n";
print $form->editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam, 1)."\n";
print '
'."\n";
print '
'."\n";
}
if (empty($user->socid)) {
+ // Private notes (always hidden to external users)
print '
'."\n";
- print '
'."\n";
+ print '
'."\n";
print $form->editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam, '', 0);
print '
'."\n";
- print '
'."\n";
+ print '
'."\n";
print $form->editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam, 1);
print '
'."\n";
print '
'."\n";
diff --git a/htdocs/dav/dav.class.php b/htdocs/dav/dav.class.php
index 7bb598135f3..145da542976 100644
--- a/htdocs/dav/dav.class.php
+++ b/htdocs/dav/dav.class.php
@@ -175,7 +175,7 @@ class CdavLib
$caldata.="LAST-MODIFIED:".gmdate('Ymd\THis', strtotime($obj->lastupd))."Z\n";
$caldata.="DTSTAMP:".gmdate('Ymd\THis', strtotime($obj->lastupd))."Z\n";
if($obj->sourceuid=='')
- $caldata.="UID:".$obj->id.'-ev-'.$calid.'-cal-'.CDAV_URI_KEY."\n";
+ $caldata.="UID:".$obj->id.'-ev-'.$calid.'-cal-'.constant('CDAV_URI_KEY')."\n";
else
$caldata.="UID:".$obj->sourceuid."\n";
$caldata.="SUMMARY:".$obj->label."\n";
@@ -277,7 +277,7 @@ class CdavLib
{
$calevents[] = array(
'calendardata' => $calendardata,
- 'uri' => $obj->id.'-ev-'.CDAV_URI_KEY,
+ 'uri' => $obj->id.'-ev-'.constant('CDAV_URI_KEY'),
'lastmodified' => strtotime($obj->lastupd),
'etag' => '"'.md5($calendardata).'"',
'calendarid' => $calendarId,
@@ -289,7 +289,7 @@ class CdavLib
{
$calevents[] = array(
// 'calendardata' => $calendardata, not necessary because etag+size are present
- 'uri' => $obj->id.'-ev-'.CDAV_URI_KEY,
+ 'uri' => $obj->id.'-ev-'.constant('CDAV_URI_KEY'),
'lastmodified' => strtotime($obj->lastupd),
'etag' => '"'.md5($calendardata).'"',
'calendarid' => $calendarId,
diff --git a/htdocs/don/payment/payment.php b/htdocs/don/payment/payment.php
index abdc35c850e..4992c9f8495 100644
--- a/htdocs/don/payment/payment.php
+++ b/htdocs/don/payment/payment.php
@@ -197,14 +197,14 @@ if ($action == 'create')
print '';
print '
'.$langs->trans("PaymentMode").' ';
- $form->select_types_paiements(isset($_POST["paymenttype"])?$_POST["paymenttype"]:$object->paymenttype, "paymenttype");
+ $form->select_types_paiements(GETPOSTISSET("paymenttype") ? GETPOST("paymenttype") : $object->paymenttype, "paymenttype");
print " \n";
print '';
print '
';
print ''.$langs->trans('AccountToCredit').' ';
print '';
- $form->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$object->accountid, "accountid", 0, '', 1); // Show open bank account list
+ $form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid") : $object->accountid, "accountid", 0, '', 1); // Show open bank account list
print ' ';
// Number
diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index 66b47ab563f..dde2b2f7f7b 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -241,11 +241,11 @@ if (empty($reshook))
if ($objectsrc->lines[$i]->product_tobatch) // If product need a batch number
{
- if (isset($_POST[$batch]))
+ if (GETPOSTISSET($batch))
{
//shipment line with batch-enable product
$qty .= '_'.$j;
- while (isset($_POST[$batch]))
+ while (GETPOSTISSET($batch))
{
// save line of detail into sub_qty
$sub_qty[$j]['q'] = GETPOST($qty, 'int'); // the qty we want to move for this stock record
@@ -277,11 +277,11 @@ if (empty($reshook))
}
}
}
- elseif (isset($_POST[$stockLocation]))
+ elseif (GETPOSTISSET($stockLocation))
{
//shipment line from multiple stock locations
$qty .= '_'.$j;
- while (isset($_POST[$stockLocation]))
+ while (GETPOSTISSET($stockLocation))
{
// save sub line of warehouse
$stockLine[$i][$j]['qty'] = GETPOST($qty, 'int');
diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index a3f5f21659d..bf20ac42611 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -447,7 +447,7 @@ class Expedition extends CommonObject
* @param array $array_options extrafields array
* @return int <0 if KO, line_id if OK
*/
- public function create_line($entrepot_id, $origin_line_id, $qty, $rang, $array_options = 0)
+ public function create_line($entrepot_id, $origin_line_id, $qty, $rang = 0, $array_options = 0)
{
//phpcs:enable
global $user;
diff --git a/htdocs/expensereport/class/expensereport_ik.class.php b/htdocs/expensereport/class/expensereport_ik.class.php
index bac8522ca74..a62d033af2d 100644
--- a/htdocs/expensereport/class/expensereport_ik.class.php
+++ b/htdocs/expensereport/class/expensereport_ik.class.php
@@ -72,7 +72,7 @@ class ExpenseReportIk extends CoreObject
* Attribute object linked with database
* @var array
*/
- protected $fields=array(
+ public $fields=array(
'rowid'=>array('type'=>'integer','index'=>true)
,'fk_c_exp_tax_cat'=>array('type'=>'integer','index'=>true)
,'fk_range'=>array('type'=>'integer','index'=>true)
diff --git a/htdocs/expensereport/class/expensereport_rule.class.php b/htdocs/expensereport/class/expensereport_rule.class.php
index 9726184a94a..08538ac8f61 100644
--- a/htdocs/expensereport/class/expensereport_rule.class.php
+++ b/htdocs/expensereport/class/expensereport_rule.class.php
@@ -111,7 +111,7 @@ class ExpenseReportRule extends CoreObject
* Attribute object linked with database
* @var array
*/
- protected $fields=array(
+ public $fields=array(
'rowid'=>array('type'=>'integer','index'=>true)
,'dates'=>array('type'=>'date')
,'datee'=>array('type'=>'date')
diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php
index f910001a5e0..a8bb8a68452 100644
--- a/htdocs/exports/export.php
+++ b/htdocs/exports/export.php
@@ -147,6 +147,7 @@ $htmlother = new FormOther($db);
$formfile = new FormFile($db);
$sqlusedforexport = '';
+$head = array();
$upload_dir = $conf->export->dir_temp.'/'.$user->id;
//$usefilters=($conf->global->MAIN_FEATURES_LEVEL > 1);
@@ -410,12 +411,12 @@ if ($step == 4 && $action == 'submitFormField')
$newcode = (string) preg_replace('/\./', '_', $code);
//print 'xxx'.$code."=".$newcode."=".$type."=".$_POST[$newcode]."\n
";
$filterqualified = 1;
- if (!isset($_POST[$newcode]) || $_POST[$newcode] == '') $filterqualified = 0;
- elseif (preg_match('/^List/', $type) && (is_numeric($_POST[$newcode]) && $_POST[$newcode] <= 0)) $filterqualified = 0;
+ if (! GETPOSTISSET($newcode) || GETPOST($newcode, 'restricthtml') == '') $filterqualified = 0;
+ elseif (preg_match('/^List/', $type) && (is_numeric(GETPOST($newcode, 'restricthtml')) && GETPOST($newcode, 'restricthtml') <= 0)) $filterqualified = 0;
if ($filterqualified)
{
//print 'Filter on '.$newcode.' type='.$type.' value='.$_POST[$newcode]."\n";
- $objexport->array_export_FilterValue[0][$code] = $_POST[$newcode];
+ $objexport->array_export_FilterValue[0][$code] = GETPOST($newcode, 'restricthtml');
}
}
$array_filtervalue = (!empty($objexport->array_export_FilterValue[0]) ? $objexport->array_export_FilterValue[0] : '');
@@ -938,7 +939,7 @@ if ($step == 4 && $datatoexport)
// List of filtered fiels
if (isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0]))
{
- print '
'.$langs->trans("FilteredFields").' ';
+ print ''.$langs->trans("FilteredFields").' ';
$list = '';
if (!empty($array_filtervalue))
{
@@ -952,7 +953,7 @@ if ($step == 4 && $datatoexport)
}
}
}
- print ''.(!empty($list) ? $list : $langs->trans("None")).' ';
+ print ''.(!empty($list) ? $list : ''.$langs->trans("None").' ').' ';
print '';
}
@@ -1266,22 +1267,17 @@ if ($step == 5 && $datatoexport)
print '
';
- print '
';
-
if ($sqlusedforexport && $user->admin)
{
- print '';
- print info_admin($langs->trans("SQLUsedForExport").': '.$sqlusedforexport);
- print ' ';
+ print info_admin($langs->trans("SQLUsedForExport").': '.$sqlusedforexport, 0, 0, 1, '', 'TechnicalInformation');
}
- print '
';
if (!is_dir($conf->export->dir_temp)) dol_mkdir($conf->export->dir_temp);
// Show existing generated documents
// NB: La fonction show_documents rescanne les modules qd genallowed=1, sinon prend $liste
- print $formfile->showdocuments('export', '', $upload_dir, $_SERVER["PHP_SELF"].'?step=5&datatoexport='.$datatoexport, $liste, 1, (!empty($_POST['model']) ? $_POST['model'] : 'csv'), 1, 1, 0, 0, 0, '', ' ', '', '', '');
+ print $formfile->showdocuments('export', '', $upload_dir, $_SERVER["PHP_SELF"].'?step=5&datatoexport='.$datatoexport, $liste, 1, (!empty($_POST['model']) ? $_POST['model'] : 'csv'), 1, 1, 0, 0, 0, '', 'none', '', '', '');
}
llxFooter();
diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php
index c096a889ab4..93d5e3339b1 100644
--- a/htdocs/fichinter/card.php
+++ b/htdocs/fichinter/card.php
@@ -96,6 +96,8 @@ if ($id > 0 || !empty($ref))
$permissionnote = $user->rights->ficheinter->creer; // Used by the include of actions_setnotes.inc.php
$permissiondellink = $user->rights->ficheinter->creer; // Used by the include of actions_dellink.inc.php
+$error = 0;
+
/*
* Actions
@@ -818,10 +820,7 @@ llxHeader('', $langs->trans("Intervention"));
if ($action == 'create')
{
- /*
- * Mode creation
- * Creation d'une nouvelle fiche d'intervention
- */
+ // Create new intervention
$soc = new Societe($db);
@@ -831,11 +830,12 @@ if ($action == 'create')
if ($socid) $res = $soc->fetch($socid);
- if (GETPOST('origin') && GETPOST('originid'))
+ if (GETPOST('origin', 'alphanohtml') && GETPOST('originid', 'int'))
{
// Parse element/subelement (ex: project_task)
- $element = $subelement = GETPOST('origin');
- if (preg_match('/^([^_]+)_([^_]+)/i', GETPOST('origin'), $regs))
+ $regs = array();
+ $element = $subelement = GETPOST('origin', 'alphanohtml');
+ if (preg_match('/^([^_]+)_([^_]+)/i', GETPOST('origin', 'alphanohtml'), $regs))
{
$element = $regs[1];
$subelement = $regs[2];
@@ -843,7 +843,7 @@ if ($action == 'create')
if ($element == 'project')
{
- $projectid = GETPOST('originid');
+ $projectid = GETPOST('originid', 'int');
}
else
{
@@ -941,7 +941,7 @@ if ($action == 'create')
$numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid');
if ($numprojet == 0)
{
- print '
'.$langs->trans("AddProject").' ';
+ print '
';
}
print '';
}
@@ -954,7 +954,7 @@ if ($action == 'create')
$numcontrat = $formcontract->select_contract($soc->id, GETPOST('contratid', 'int'), 'contratid', 0, 1);
if ($numcontrat == 0)
{
- print '
'.$langs->trans("AddContract").' ';
+ print '
';
}
print '';
}
@@ -1076,6 +1076,7 @@ if ($action == 'create')
print '
';
print ''.$langs->trans("ThirdParty").' ';
print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300');
+ print ' ';
print ' ';
print '
';
diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php
index 576e6645cb2..d8f7dad8ac0 100644
--- a/htdocs/filefunc.inc.php
+++ b/htdocs/filefunc.inc.php
@@ -165,7 +165,8 @@ if (! defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck))
if ($csrfattack)
{
//print 'NOCSRFCHECK='.defined('NOCSRFCHECK').' REQUEST_METHOD='.$_SERVER['REQUEST_METHOD'].' HTTP_HOST='.$_SERVER['HTTP_HOST'].' HTTP_REFERER='.$_SERVER['HTTP_REFERER'];
- print "Access refused by CSRF protection in main.inc.php. Referer of form (".htmlspecialchars($_SERVER['HTTP_REFERER'], ENT_QUOTES, 'UTF-8').") is outside the server that serve this page (with method = ".$_SERVER['REQUEST_METHOD'].").\n";
+ // Note: We can't use dol_escape_htmltag here to escape output because lib functions.lib.ph is not yet loaded.
+ print "Access refused by CSRF protection in main.inc.php. Referer of form (".htmlentities($_SERVER['HTTP_REFERER'], ENT_COMPAT, 'UTF-8').") is outside the server that serve this page (with method = ".htmlentities($_SERVER['REQUEST_METHOD'], ENT_COMPAT, 'UTF-8').").\n";
print "If you access your server behind a proxy using url rewriting, you might check that all HTTP headers are propagated (or add the line \$dolibarr_nocsrfcheck=1 into your conf.php file to remove this security check).\n";
die;
}
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index bd74d52a4d5..6ca038a8a3d 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -183,6 +183,60 @@ class CommandeFournisseur extends CommonOrder
public $multicurrency_total_tva;
public $multicurrency_total_ttc;
+
+
+ public $fields=array(
+ 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
+ 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>15),
+ 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20),
+ 'ref' =>array('type'=>'varchar(255)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'showoncombobox'=>1, 'position'=>25),
+ 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>30, 'index'=>1),
+ 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>0, 'position'=>35),
+ 'ref_supplier' =>array('type'=>'varchar(255)', 'label'=>'RefSupplier', 'enabled'=>1, 'visible'=>-1, 'position'=>40),
+ 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
+ 'date_creation' =>array('type'=>'datetime', 'label'=>'Date creation', 'enabled'=>1, 'visible'=>-1, 'position'=>50),
+ 'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>55),
+ 'date_approve' =>array('type'=>'datetime', 'label'=>'Date approve', 'enabled'=>1, 'visible'=>-1, 'position'=>60),
+ 'date_approve2' =>array('type'=>'datetime', 'label'=>'Date approve2', 'enabled'=>1, 'visible'=>-1, 'position'=>65),
+ 'date_commande' =>array('type'=>'date', 'label'=>'Date commande', 'enabled'=>1, 'visible'=>-1, 'position'=>70),
+ 'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>75),
+ 'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>80),
+ 'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>85),
+ 'fk_user_approve' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserApproval', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
+ 'fk_user_approve2' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserSecondApproval', 'enabled'=>1, 'visible'=>-1, 'position'=>95),
+ 'source' =>array('type'=>'smallint(6)', 'label'=>'Source', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>100),
+ 'billed' =>array('type'=>'smallint(6)', 'label'=>'Billed', 'enabled'=>1, 'visible'=>-1, 'position'=>110),
+ 'amount_ht' =>array('type'=>'double(24,8)', 'label'=>'Amount ht', 'enabled'=>1, 'visible'=>-1, 'position'=>115),
+ 'remise_percent' =>array('type'=>'double', 'label'=>'Remise percent', 'enabled'=>1, 'visible'=>-1, 'position'=>120),
+ 'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>125),
+ 'tva' =>array('type'=>'double(24,8)', 'label'=>'Tva', 'enabled'=>1, 'visible'=>-1, 'position'=>130, 'isameasure'=>1),
+ 'localtax1' =>array('type'=>'double(24,8)', 'label'=>'Localtax1', 'enabled'=>1, 'visible'=>-1, 'position'=>135, 'isameasure'=>1),
+ 'localtax2' =>array('type'=>'double(24,8)', 'label'=>'Localtax2', 'enabled'=>1, 'visible'=>-1, 'position'=>140, 'isameasure'=>1),
+ 'total_ht' =>array('type'=>'double(24,8)', 'label'=>'TotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>145, 'isameasure'=>1),
+ 'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>150, 'isameasure'=>1),
+ 'note_private' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>155),
+ 'note_public' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>160),
+ 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'ModelPDF', 'enabled'=>1, 'visible'=>0, 'position'=>165),
+ 'fk_input_method' =>array('type'=>'integer', 'label'=>'InputMethod', 'enabled'=>1, 'visible'=>-1, 'position'=>170),
+ 'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'PaymentTerm', 'enabled'=>1, 'visible'=>-1, 'position'=>175),
+ 'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'PaymentMode', 'enabled'=>1, 'visible'=>-1, 'position'=>180),
+ 'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>190),
+ 'date_livraison' =>array('type'=>'datetime', 'label'=>'DeliveryDate', 'enabled'=>1, 'visible'=>-1, 'position'=>195),
+ 'fk_account' =>array('type'=>'integer', 'label'=>'Fk account', 'enabled'=>1, 'visible'=>-1, 'position'=>200),
+ 'fk_incoterms' =>array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>1, 'visible'=>-1, 'position'=>205),
+ 'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'IncotermLocation', 'enabled'=>1, 'visible'=>-1, 'position'=>210),
+ 'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>1, 'visible'=>-1, 'position'=>215),
+ 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'MulticurrencyCode', 'enabled'=>1, 'visible'=>-1, 'position'=>220),
+ 'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyRate', 'enabled'=>1, 'visible'=>-1, 'position'=>225),
+ 'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>230),
+ 'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalVAT', 'enabled'=>1, 'visible'=>-1, 'position'=>235),
+ 'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>240),
+ 'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>1, 'visible'=>-1, 'position'=>245),
+ 'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>-1, 'position'=>500),
+ 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900),
+ );
+
+
/**
* Draft status
*/
@@ -387,6 +441,7 @@ class CommandeFournisseur extends CommonOrder
*/
public function fetch_lines($only_product = 0)
{
+ global $conf;
// phpcs:enable
//$result=$this->fetch_lines();
$this->lines = array();
@@ -399,8 +454,12 @@ class CommandeFournisseur extends CommonOrder
$sql .= " l.fk_unit,";
$sql .= " l.date_start, l.date_end,";
$sql .= ' l.fk_multicurrency, l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc';
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING))
+ $sql.= ", pfp.rowid as fk_pfp, pfp.packaging";
$sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l";
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid';
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING))
+ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON l.fk_product = pfp.fk_product and l.ref = pfp.ref_fourn";
$sql .= " WHERE l.fk_commande = ".$this->id;
if ($only_product) $sql .= ' AND p.fk_product_type = 0';
$sql .= " ORDER BY l.rang, l.rowid";
@@ -451,7 +510,13 @@ class CommandeFournisseur extends CommonOrder
$line->ref_fourn = $objp->ref_supplier; // The supplier ref of price when product was added. May have change since
$line->ref_supplier = $objp->ref_supplier; // The supplier ref of price when product was added. May have change since
- $line->date_start = $this->db->jdate($objp->date_start);
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING))
+ {
+ $line->fk_fournprice = $objp->fk_pfp;
+ $line->packaging = $objp->packaging;
+ }
+
+ $line->date_start = $this->db->jdate($objp->date_start);
$line->date_end = $this->db->jdate($objp->date_end);
$line->fk_unit = $objp->fk_unit;
@@ -1631,6 +1696,26 @@ class CommandeFournisseur extends CommonOrder
return -1;
}
}
+
+ // redefine quantity according to packaging
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING))
+ {
+ $prod = new Product($this->db, $fk_product);
+ $prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc?$this->fk_soc:$this->socid));
+ if ($qty < $prod->packaging)
+ {
+ $qty = $prod->packaging;
+ }
+ else
+ {
+ if (($qty % $prod->packaging) > 0)
+ {
+ $coeff = intval($qty/$prod->packaging) + 1;
+ $qty = $prod->packaging * $coeff;
+ setEventMessage($langs->trans('QtyRecalculatedWithPackaging'), 'mesgs');
+ }
+ }
+ }
}
else
{
@@ -2582,6 +2667,25 @@ class CommandeFournisseur extends CommonOrder
$this->line->fk_commande = $this->id;
//$this->line->label=$label;
$this->line->desc = $desc;
+
+ // redefine quantity according to packaging
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING))
+ {
+ if ($qty < $this->line->packaging)
+ {
+ $qty = $this->line->packaging;
+ }
+ else
+ {
+ if (($qty % $this->line->packaging) > 0)
+ {
+ $coeff = intval($qty/$this->line->packaging) + 1;
+ $qty = $this->line->packaging * $coeff;
+ setEventMessage($langs->trans('QtyRecalculatedWithPackaging'), 'mesgs');
+ }
+ }
+ }
+
$this->line->qty = $qty;
$this->line->ref_supplier = $ref_supplier;
@@ -3336,6 +3440,8 @@ class CommandeFournisseurLigne extends CommonOrderLine
*/
public function fetch($rowid)
{
+ global $conf;
+
$sql = 'SELECT cd.rowid, cd.fk_commande, cd.fk_product, cd.product_type, cd.description, cd.qty, cd.tva_tx, cd.special_code,';
$sql .= ' cd.localtax1_tx, cd.localtax2_tx, cd.localtax1_type, cd.localtax2_type, cd.ref,';
$sql .= ' cd.remise, cd.remise_percent, cd.subprice,';
@@ -3344,8 +3450,12 @@ class CommandeFournisseurLigne extends CommonOrderLine
$sql .= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc,';
$sql .= ' cd.date_start, cd.date_end, cd.fk_unit,';
$sql .= ' cd.multicurrency_subprice, cd.multicurrency_total_ht, cd.multicurrency_total_tva, cd.multicurrency_total_ttc';
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING))
+ $sql.= ", pfp.rowid as fk_pfp, pfp.packaging";
$sql .= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd';
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON cd.fk_product = p.rowid';
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING))
+ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON cd.fk_product = pfp.fk_product and cd.ref = pfp.ref_fourn";
$sql .= ' WHERE cd.rowid = '.$rowid;
$result = $this->db->query($sql);
if ($result)
@@ -3383,6 +3493,11 @@ class CommandeFournisseurLigne extends CommonOrderLine
$this->product_ref = $objp->product_ref;
$this->product_libelle = $objp->product_libelle;
$this->product_desc = $objp->product_desc;
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING))
+ {
+ $this->packaging = $objp->packaging;
+ $this->fk_fournprice = $objp->fk_pfp;
+ }
$this->date_start = $this->db->jdate($objp->date_start);
$this->date_end = $this->db->jdate($objp->date_end);
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index 231a5e9e910..a0cf142a23b 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -217,6 +217,59 @@ class FactureFournisseur extends CommonInvoice
*/
public $fk_facture_source;
+
+ public $fields=array(
+ 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
+ 'ref' =>array('type'=>'varchar(255)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>15),
+ 'ref_supplier' =>array('type'=>'varchar(255)', 'label'=>'RefSupplier', 'enabled'=>1, 'visible'=>-1, 'position'=>20),
+ 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>25, 'index'=>1),
+ 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'RefExt', 'enabled'=>1, 'visible'=>0, 'position'=>30),
+ 'type' =>array('type'=>'smallint(6)', 'label'=>'Type', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>35),
+ 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>40),
+ 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
+ 'datef' =>array('type'=>'date', 'label'=>'Date', 'enabled'=>1, 'visible'=>-1, 'position'=>50),
+ 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>55),
+ 'libelle' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>-1, 'position'=>60),
+ 'paye' =>array('type'=>'smallint(6)', 'label'=>'Paye', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>65),
+ 'amount' =>array('type'=>'double(24,8)', 'label'=>'Amount', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>70),
+ 'remise' =>array('type'=>'double(24,8)', 'label'=>'Discount', 'enabled'=>1, 'visible'=>-1, 'position'=>75),
+ 'close_code' =>array('type'=>'varchar(16)', 'label'=>'CloseCode', 'enabled'=>1, 'visible'=>-1, 'position'=>80),
+ 'close_note' =>array('type'=>'varchar(128)', 'label'=>'CloseNote', 'enabled'=>1, 'visible'=>-1, 'position'=>85),
+ 'tva' =>array('type'=>'double(24,8)', 'label'=>'Tva', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
+ 'localtax1' =>array('type'=>'double(24,8)', 'label'=>'Localtax1', 'enabled'=>1, 'visible'=>-1, 'position'=>95),
+ 'localtax2' =>array('type'=>'double(24,8)', 'label'=>'Localtax2', 'enabled'=>1, 'visible'=>-1, 'position'=>100),
+ 'total_ht' =>array('type'=>'double(24,8)', 'label'=>'TotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>105),
+ 'total_tva' =>array('type'=>'double(24,8)', 'label'=>'TotalVAT', 'enabled'=>1, 'visible'=>-1, 'position'=>110),
+ 'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>115),
+ 'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-1, 'position'=>125),
+ 'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>130),
+ 'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>135),
+ 'fk_facture_source' =>array('type'=>'integer', 'label'=>'Fk facture source', 'enabled'=>1, 'visible'=>-1, 'position'=>140),
+ 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>1, 'visible'=>-1, 'position'=>145),
+ 'fk_account' =>array('type'=>'integer', 'label'=>'Account', 'enabled'=>1, 'visible'=>-1, 'position'=>150),
+ 'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'PaymentTerm', 'enabled'=>1, 'visible'=>-1, 'position'=>155),
+ 'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'PaymentMode', 'enabled'=>1, 'visible'=>-1, 'position'=>160),
+ 'date_lim_reglement' =>array('type'=>'date', 'label'=>'DateLimReglement', 'enabled'=>1, 'visible'=>-1, 'position'=>165),
+ 'note_private' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>170),
+ 'note_public' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>175),
+ 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'ModelPdf', 'enabled'=>1, 'visible'=>0, 'position'=>180),
+ 'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>190),
+ 'fk_incoterms' =>array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>1, 'visible'=>-1, 'position'=>195),
+ 'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'IncotermLocation', 'enabled'=>1, 'visible'=>-1, 'position'=>200),
+ 'fk_multicurrency' =>array('type'=>'integer', 'label'=>'MulticurrencyId', 'enabled'=>1, 'visible'=>-1, 'position'=>205),
+ 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'MulticurrencyCode', 'enabled'=>1, 'visible'=>-1, 'position'=>210),
+ 'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyRate', 'enabled'=>1, 'visible'=>-1, 'position'=>215),
+ 'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>220),
+ 'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalVAT', 'enabled'=>1, 'visible'=>-1, 'position'=>225),
+ 'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>230),
+ 'date_pointoftax' =>array('type'=>'date', 'label'=>'Date pointoftax', 'enabled'=>1, 'visible'=>-1, 'position'=>235),
+ 'date_valid' =>array('type'=>'date', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>240),
+ 'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'Last main doc', 'enabled'=>1, 'visible'=>-1, 'position'=>245),
+ 'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>500),
+ 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900),
+ );
+
+
/**
* Standard invoice
*/
@@ -1953,7 +2006,7 @@ class FactureFournisseur extends CommonInvoice
if (is_array($array_options) && count($array_options) > 0) {
// We replace values in this->line->array_options only for entries defined into $array_options
foreach ($array_options as $key => $value) {
- $this->line->array_options[$key] = $array_options[$key];
+ $line->array_options[$key] = $array_options[$key];
}
}
diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php
index 717a617b0ca..6c139d73707 100644
--- a/htdocs/fourn/class/fournisseur.product.class.php
+++ b/htdocs/fourn/class/fournisseur.product.class.php
@@ -273,6 +273,7 @@ class ProductFournisseur extends Product
$charges = price2num($charges, 'MU');
$qty = price2num($qty, 'MS');
$unitBuyPrice = price2num($buyprice / $qty, 'MU');
+ $packaging = ($this->packaging < $qty) ? $qty : $this->packaging;
$error = 0;
$now = dol_now();
@@ -359,6 +360,7 @@ class ProductFournisseur extends Product
$sql .= " supplier_reputation = ".(empty($supplier_reputation) ? 'NULL' : "'".$this->db->escape($supplier_reputation)."'").",";
$sql .= " barcode = ".(empty($barcode) ? 'NULL' : "'".$this->db->escape($barcode)."'").",";
$sql .= " fk_barcode_type = ".(empty($fk_barcode_type) ? 'NULL' : "'".$this->db->escape($fk_barcode_type)."'");
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql.= ", packaging = ".(empty($packaging) ? 1 : $packaging);
$sql .= " WHERE rowid = ".$this->product_fourn_price_id;
// TODO Add price_base_type and price_ttc
@@ -408,6 +410,7 @@ class ProductFournisseur extends Product
$sql = "INSERT INTO ".MAIN_DB_PREFIX."product_fournisseur_price(";
$sql .= " multicurrency_price, multicurrency_unitprice, multicurrency_tx, fk_multicurrency, multicurrency_code,";
$sql .= "datec, fk_product, fk_soc, ref_fourn, desc_fourn, fk_user, price, quantity, remise_percent, remise, unitprice, tva_tx, charges, fk_availability, default_vat_code, info_bits, entity, delivery_time_days, supplier_reputation, barcode, fk_barcode_type)";
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql.= ", packaging";
$sql .= " values(";
$sql .= (isset($multicurrency_buyprice) ? "'".$this->db->escape(price2num($multicurrency_buyprice))."'" : 'null').",";
$sql .= (isset($multicurrency_unitBuyPrice) ? "'".$this->db->escape(price2num($multicurrency_unitBuyPrice))."'" : 'null').",";
@@ -435,6 +438,7 @@ class ProductFournisseur extends Product
$sql .= (empty($supplier_reputation) ? 'NULL' : "'".$this->db->escape($supplier_reputation)."'").",";
$sql .= (empty($barcode) ? 'NULL' : "'".$this->db->escape($barcode)."'").",";
$sql .= (empty($fk_barcode_type) ? 'NULL' : "'".$this->db->escape($fk_barcode_type)."'");
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql.= ", ".(empty($this->packaging) ? 1 : $this->db->escape($this->packaging)) ;
$sql .= ")";
$this->product_fourn_price_id = 0;
@@ -501,6 +505,7 @@ class ProductFournisseur extends Product
$sql .= " pfp.supplier_reputation, pfp.fk_user, pfp.datec,";
$sql .= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code,";
$sql .= " pfp.barcode, pfp.fk_barcode_type";
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql.= ", pfp.packaging";
$sql .= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp";
$sql .= " WHERE pfp.rowid = ".(int) $rowid;
@@ -544,6 +549,12 @@ class ProductFournisseur extends Product
$this->fourn_barcode = $obj->barcode;
$this->fourn_fk_barcode_type = $obj->fk_barcode_type;
}
+
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) {
+ $this->packaging = $obj->packaging;
+ if ($this->packaging < $this->fourn_qty) $this->packaging = $this->fourn_qty;
+ }
+
if (empty($ignore_expression) && !empty($this->fk_supplier_price_expression))
{
$priceparser = new PriceParser($this->db);
@@ -598,7 +609,8 @@ class ProductFournisseur extends Product
$sql .= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.info_bits, pfp.delivery_time_days, pfp.supplier_reputation,";
$sql .= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code, pfp.datec, pfp.tms,";
$sql .= " pfp.barcode, pfp.fk_barcode_type";
- $sql .= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp, ".MAIN_DB_PREFIX."societe as s";
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql.= ", pfp.packaging";
+ $sql .= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp, ".MAIN_DB_PREFIX."societe as s";
$sql .= " WHERE pfp.entity IN (".getEntity('productsupplierprice').")";
$sql .= " AND pfp.fk_soc = s.rowid";
$sql .= " AND s.status=1"; // only enabled company selected
@@ -647,6 +659,11 @@ class ProductFournisseur extends Product
$prodfourn->fourn_multicurrency_id = $record["fk_multicurrency"];
$prodfourn->fourn_multicurrency_code = $record["multicurrency_code"];
+ if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) {
+ $prodfourn->packaging = $record["packaging"];
+ if ($prodfourn->packaging < $prodfourn->fourn_qty) $prodfourn->packaging = $prodfourn->fourn_qty;
+ }
+
if ($conf->barcode->enabled) {
$prodfourn->barcode = $record["barcode"];
$prodfourn->fk_barcode_type = $record["fk_barcode_type"];
diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index eb9093888af..dd55bb36ffb 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -273,7 +273,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) {
$dto = GETPOST("dto_".$reg[1].'_'.$reg[2]);
//update supplier price
- if (isset($_POST[$saveprice])) {
+ if (GETPOSTISSET($saveprice)) {
// TODO Use class
$sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price";
$sql .= " SET unitprice='".GETPOST($pu)."'";
diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php
index 9b865cae3e6..6dc24c71b57 100644
--- a/htdocs/fourn/facture/list.php
+++ b/htdocs/fourn/facture/list.php
@@ -433,8 +433,8 @@ if ($resql)
}
$param = '&socid='.$socid;
- if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage;
- if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit;
+ if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
+ if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
if ($search_all) $param .= '&search_all='.urlencode($search_all);
if ($day) $param .= '&day='.urlencode($day);
if ($month) $param .= '&month='.urlencode($month);
@@ -455,9 +455,9 @@ if ($resql)
if ($search_amount_no_tax) $param .= '&search_amount_no_tax='.urlencode($search_amount_no_tax);
if ($search_amount_all_tax) $param .= '&search_amount_all_tax='.urlencode($search_amount_all_tax);
if ($search_status >= 0) $param .= "&search_status=".urlencode($search_status);
- if ($show_files) $param .= '&show_files='.$show_files;
- if ($option) $param .= "&option=".$option;
- if ($optioncss != '') $param .= '&optioncss='.$optioncss;
+ if ($show_files) $param .= '&show_files='.urlencode($show_files);
+ if ($option) $param .= "&option=".urlencode($option);
+ if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
@@ -879,7 +879,7 @@ if ($resql)
// Supplier ref
if (!empty($arrayfields['f.ref_supplier']['checked']))
{
- print '
';
+ print ' ';
print $obj->ref_supplier;
print ' ';
if (!$i) $totalarray['nbfield']++;
diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php
index 4c4a5212abd..acd4be35b79 100644
--- a/htdocs/holiday/class/holiday.class.php
+++ b/htdocs/holiday/class/holiday.class.php
@@ -1654,21 +1654,24 @@ class Holiday extends CommonObject
{
if ($type)
{
- // Si utilisateur de Dolibarr
-
- $sql = "SELECT u.rowid";
- $sql .= " FROM ".MAIN_DB_PREFIX."user as u";
+ // If user of Dolibarr
+ $sql = "SELECT";
+ if (! empty($conf->multicompany->enabled) && ! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
+ $sql .= " DISTINCT";
+ }
+ $sql.= " u.rowid";
+ $sql.= " FROM ".MAIN_DB_PREFIX."user as u";
if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))
{
$sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug";
- $sql .= " WHERE (ug.fk_user = u.rowid";
- $sql .= " AND ug.entity = ".$conf->entity.")";
- $sql .= " OR u.admin = 1";
+ $sql .= " WHERE ((ug.fk_user = u.rowid";
+ $sql .= " AND ug.entity IN (".getEntity('usergroup')."))";
+ $sql .= " OR u.entity = 0)"; // Show always superadmin
}
else
{
- $sql .= " WHERE u.entity IN (0,".$conf->entity.")";
+ $sql .= " WHERE u.entity IN (".getEntity('user').")";
}
$sql .= " AND u.statut > 0";
if ($filters) $sql .= $filters;
@@ -1709,7 +1712,7 @@ class Holiday extends CommonObject
// We want only list of vacation balance for user ids
$sql = "SELECT DISTINCT cpu.fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."holiday_users as cpu, ".MAIN_DB_PREFIX."user as u";
- $sql .= " WHERE cpu.fk_user = u.user";
+ $sql .= " WHERE cpu.fk_user = u.rowid";
if ($filters) $sql .= $filters;
$resql = $this->db->query($sql);
@@ -1750,17 +1753,24 @@ class Holiday extends CommonObject
// List for Dolibarr users
if ($type)
{
- $sql = "SELECT u.rowid, u.lastname, u.firstname, u.gender, u.photo, u.employee, u.statut, u.fk_user";
+ // If user of Dolibarr
+ $sql = "SELECT";
+ if (! empty($conf->multicompany->enabled) && ! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
+ $sql .= " DISTINCT";
+ }
+ $sql.= " u.rowid, u.lastname, u.firstname, u.gender, u.photo, u.employee, u.statut, u.fk_user";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
if (! empty($conf->multicompany->enabled) && ! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))
{
- $sql.= ", ".MAIN_DB_PREFIX."usergroup_user as ug";
- $sql.= " WHERE (ug.fk_user = u.rowid";
- $sql.= " AND ug.entity = ".$conf->entity.")";
- $sql.= " OR u.admin = 1";
- } else {
- $sql.= " WHERE u.entity IN (0,".$conf->entity.")";
+ $sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug";
+ $sql .= " WHERE ((ug.fk_user = u.rowid";
+ $sql .= " AND ug.entity IN (".getEntity('usergroup')."))";
+ $sql .= " OR u.entity = 0)"; // Show always superadmin
+ }
+ else
+ {
+ $sql .= " WHERE u.entity IN (".getEntity('user').")";
}
$sql.= " AND u.statut > 0";
diff --git a/htdocs/index.php b/htdocs/index.php
index a856a51ac8d..110de972f2b 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -80,7 +80,7 @@ llxHeader('', $title);
$resultboxes = FormOther::getBoxesArea($user, "0"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb)
-print load_fiche_titre($langs->trans("HomeArea"), $resultboxes['selectboxlist'], 'home');
+print load_fiche_titre($langs->trans("HomeArea"), $resultboxes['selectboxlist'], 'home', 0, '', 'titleforhome');
if (!empty($conf->global->MAIN_MOTD))
{
diff --git a/htdocs/install/default.css b/htdocs/install/default.css
index ab4e36c9f68..65d8e8021a8 100644
--- a/htdocs/install/default.css
+++ b/htdocs/install/default.css
@@ -53,10 +53,9 @@ div.titre {
}
span.titre {
- font-size: 90%;
font-weight: bold;
background: #FFFFFF;
- color: #444;
+ color: rgb(0,113,121);
border: 1px solid #bbb;
padding: 10px 10px 10px 10px;
margin: 0 0 10px 10px;
@@ -347,13 +346,14 @@ ul {
.button {
- background: #fcfcfc;
- border: 1px solid #e0e0e0;
+ background: rgb(0,113,121);
+ color: #fff;
+ /* border: 1px solid #e0e0e0; */
padding: 0.3em 0.7em;
margin: 0 0.5em;
- -moz-border-radius: 5px 5px 5px 5px;
- -webkit-border-radius: 5px 5px 5px 5px;
- border-radius: 5px 5px 5px 5px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
-moz-box-shadow: 2px 2px 3px #ddd;
-webkit-box-shadow: 2px 2px 3px #ddd;
box-shadow: 2px 2px 3px #ddd;
@@ -363,7 +363,7 @@ a.button:hover {
}
.choiceselected {
- background-color: #dfd;
+ background-color: #f4fcf4;
background-repeat: repeat-x;
background-position: top left;
}
diff --git a/htdocs/install/mysql/data/llx_accounting_abc.sql b/htdocs/install/mysql/data/llx_accounting_abc.sql
index be87c743c38..64c49b7a901 100644
--- a/htdocs/install/mysql/data/llx_accounting_abc.sql
+++ b/htdocs/install/mysql/data/llx_accounting_abc.sql
@@ -47,6 +47,8 @@ INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUE
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG14-DEV', 'The developed accountancy french plan 2014', 1);
-- Description of chart of account FR PCG18-ASSOC
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG18-ASSOC', 'French foundation chart of accounts 2018', 1);
+-- Description of chart of account FR PCGAFR14-DEV
+INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCGAFR14-DEV', 'The developed farm accountancy french plan 2014', 1);
-- Description of chart of account BE PCMN-BASE
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 2, 'PCMN-BASE', 'The base accountancy belgium plan', 1);
@@ -67,6 +69,9 @@ INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUE
-- Description of chart of account TN PCT
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 10, 'PCT', 'The Tunisia plan', 1);
+-- Description of chart of account AT AT-BASE
+INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 41, 'AT-BASE', 'Plan Austria', 1);
+
-- Description of chart of account CL CL-PYME
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 67, 'PC-MIPYME', 'The PYME accountancy Chile plan', 1);
diff --git a/htdocs/install/mysql/data/llx_accounting_account_at.sql b/htdocs/install/mysql/data/llx_accounting_account_at.sql
new file mode 100644
index 00000000000..d4893c224ee
--- /dev/null
+++ b/htdocs/install/mysql/data/llx_accounting_account_at.sql
@@ -0,0 +1,345 @@
+-- Copyright (C) 2020 Norbert Penel
+--
+-- 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 .
+--
+
+--
+-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors
+-- de l'install et tous les sigles '--' sont supprimés.
+--
+
+-- Descriptif des plans comptables autrichiens standard
+-- ADD 4100000 to rowid # Do no remove this comment --
+
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 1, 'AT-BASE','0','GROUP0','110','0','Patentrechte');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 2, 'AT-BASE','0','GROUP0','120','0','Software');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 3, 'AT-BASE','0','GROUP0','121','0','ERP System');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 4, 'AT-BASE','0','GROUP0','122','0','Homepage');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 5, 'AT-BASE','0','GROUP0','125','0','Software Fremdentwicklung_noch nicht aktivieren');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 6, 'AT-BASE','0','GROUP0','160','0','Umgründungsmehrwert');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 7, 'AT-BASE','0','GROUP0','250','0','Mieterinvestitionen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 8, 'AT-BASE','0','GROUP0','400','0','Maschinen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 9, 'AT-BASE','0','GROUP0','600','0','Betriebs u. Geschäftsausstattung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 10, 'AT-BASE','0','GROUP0','601','0','Ausstellungsstücke');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 11, 'AT-BASE','0','GROUP0','602','0','Leihstellungsstücke');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 12, 'AT-BASE','0','GROUP0','603','0','Getriebeprüfstand_hinten');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 13, 'AT-BASE','0','GROUP0','604','0','Wuchtstand_links_AQ');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 14, 'AT-BASE','0','GROUP0','605','0','Messlabor(Messraum)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 15, 'AT-BASE','0','GROUP0','606','0','PAK-System');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 16, 'AT-BASE','0','GROUP0','607','0','Server');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 17, 'AT-BASE','0','GROUP0','608','0','EDV-Ausstattung (Hardware)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 18, 'AT-BASE','0','GROUP0','609','0','Werkstattausstattung (Werkzeug)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 19, 'AT-BASE','0','GROUP0','610','0','Wuchtprüfstand neu_noch nicht in Betrieb genommen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 20, 'AT-BASE','0','GROUP0','611','0','Messequipment/Ausstattung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 21, 'AT-BASE','0','GROUP0','630','0','PKW');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 22, 'AT-BASE','0','GROUP0','640','0','LKW');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 23, 'AT-BASE','0','GROUP0','680','0','GWG-Geschäftsausstattung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 24, 'AT-BASE','0','GROUP0','710','0','Anlagen in Bau');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 25, 'AT-BASE','1','GROUP1','1100','0','Rohstoffe');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 26, 'AT-BASE','1','GROUP1','1200','0','Bezogenen Teile');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 27, 'AT-BASE','1','GROUP1','1300','0','Hilfsstoffe und Betriebsstoffe');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 28, 'AT-BASE','1','GROUP1','1400','0','fertige Erzeugnisse');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 29, 'AT-BASE','1','GROUP1','1500','0','unfertige Erzeugnisse');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 30, 'AT-BASE','1','GROUP1','1600','0','Waren');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 31, 'AT-BASE','1','GROUP1','1700','0','Noch nicht abrechenbare Leist.');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 32, 'AT-BASE','1','GROUP1','1701','0','Bestandsveränderung laufend');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 33, 'AT-BASE','1','GROUP1','1800','0','Vorrat Verpackungsmaterial');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 34, 'AT-BASE','1','GROUP1','1810','0','Vorrat Werbematerial');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 35, 'AT-BASE','2','GROUP2','2000','0','Lieferforderungen Inland I');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 36, 'AT-BASE','2','GROUP2','2080','0','Einzelwertb. Ford. Inland');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 37, 'AT-BASE','2','GROUP2','2292','0','geleistete Anzahlungen (20%)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 38, 'AT-BASE','2','GROUP2','2293','0','gel. Anzahlungen i.g.');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 39, 'AT-BASE','2','GROUP2','2301','0','Forderung Forschungsprämie');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 40, 'AT-BASE','2','GROUP2','2302','0','Forderungen gelieferte (noch nicht fakturierte Waren)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 41, 'AT-BASE','2','GROUP2','2303','0','Vorauszahlung Leasing Server');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 42, 'AT-BASE','2','GROUP2','2306','0','Kaution Pfauengarten');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 43, 'AT-BASE','2','GROUP2','2307','0','Kaution Werkstatt');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 44, 'AT-BASE','2','GROUP2','2308','0','Kaution Parkplatz PKW');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 45, 'AT-BASE','2','GROUP2','2309','0','Kaution Werkstatt');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 46, 'AT-BASE','2','GROUP2','2310','0','Kaution Studentenwohnheim');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 47, 'AT-BASE','2','GROUP2','2311','0','Kaution China');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 48, 'AT-BASE','2','GROUP2','2312','0','Vorauszahlung Xerox');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 49, 'AT-BASE','2','GROUP2','2313','0','Verrechnung Bildungsscheck');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 50, 'AT-BASE','2','GROUP2','2315','0','Aktivierung Körperschaftsteuer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 51, 'AT-BASE','2','GROUP2','2500','0','Vorsteuer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 52, 'AT-BASE','2','GROUP2','2501','0','Vorsteuer aus i. g. Erwerb');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 53, 'AT-BASE','2','GROUP2','2502','0','Vorsteuer reverse charge syst.');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 54, 'AT-BASE','2','GROUP2','2503','0','Vorsteuer Reverse Charge § 19/1d');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 55, 'AT-BASE','2','GROUP2','2508','0','Vorsteuer sonstige Leistungen EU');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 56, 'AT-BASE','2','GROUP2','2509','0','EUSt Forderung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 57, 'AT-BASE','2','GROUP2','2510','0','Einfuhrumsatzsteuer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 58, 'AT-BASE','2','GROUP2','2531','0','Vorsteuer Frankreich');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 59, 'AT-BASE','2','GROUP2','2532','0','Vorsteuer Niederlande');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 60, 'AT-BASE','2','GROUP2','2533','0','Vorsteuer GB');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 61, 'AT-BASE','2','GROUP2','2534','0','Vorsteuer Belgien');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 62, 'AT-BASE','2','GROUP2','2535','0','Vorsteuer GB');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 63, 'AT-BASE','2','GROUP2','2901','0','Leasingvorauszahlung Vito');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 64, 'AT-BASE','3','GROUP3','3020','0','Rückstellung für Körperschaftsteuer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 65, 'AT-BASE','3','GROUP3','3060','0','Rst. für Beratungskosten');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 66, 'AT-BASE','3','GROUP3','3064','0','Rst. für Sonderzahlungen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 67, 'AT-BASE','3','GROUP3','3072','0','Rst. für nicht konsum. Urlaube');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 68, 'AT-BASE','3','GROUP3','3214','0','Raika 40-00.800.185');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 69, 'AT-BASE','3','GROUP3','3286','0','Darlehen Dipl. Ing. REICH GMBH');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 70, 'AT-BASE','3','GROUP3','3287','0','Darlehen Dr.Höfler');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 71, 'AT-BASE','3','GROUP3','3288','0','Darlehen DI Mayrhofer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 72, 'AT-BASE','3','GROUP3','3289','0','Darlehen AWS');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 73, 'AT-BASE','3','GROUP3','3292','0','Anzahlungen von Kunden 20 %');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 74, 'AT-BASE','3','GROUP3','3294','0','Anzahlungen von Kunden Drittland');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 75, 'AT-BASE','3','GROUP3','3300','0','Lieferverbindlichkeiten I');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 76, 'AT-BASE','3','GROUP3','3481','0','Verrechnungskto DI Mayrhofer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 77, 'AT-BASE','3','GROUP3','3500','0','Umsatzsteuer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 78, 'AT-BASE','3','GROUP3','3501','0','Umsatzsteuer aus i. g. Erwerb');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 79, 'AT-BASE','3','GROUP3','3502','0','USt § 19/Art 19 (reverse Charge)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 80, 'AT-BASE','3','GROUP3','3503','0','Umsatzsteuer Reverse Charge § 19/1d');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 81, 'AT-BASE','3','GROUP3','3508','0','Umsatzsteuer sonstige Leistung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 82, 'AT-BASE','3','GROUP3','3531','0','FA-Zahllast Dezember');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 83, 'AT-BASE','3','GROUP3','3533','0','Umsatzsteuer 2012');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 84, 'AT-BASE','3','GROUP3','3535','0','Umsatzsteuer 2013');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 85, 'AT-BASE','3','GROUP3','3536','0','Umsatzsteuer 2014');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 86, 'AT-BASE','3','GROUP3','3537','0','Umsatzsteuer 2015');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 87, 'AT-BASE','3','GROUP3','3632','0','Verrechnungskonto EUSt');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 88, 'AT-BASE','3','GROUP3','3892','0','Verbindlichkeiten Anzahlungsrechn.');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 89, 'AT-BASE','3','GROUP3','3898','0','Abgrenzung Sonderzahlungen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 90, 'AT-BASE','4','GROUP4','4000','0','Erlöse Lieferungen 20 %');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 91, 'AT-BASE','4','GROUP4','4001','0','Erlöse i.g. Lieferung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 92, 'AT-BASE','4','GROUP4','4002','0','Erlöse Dienstleistungen EU');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 93, 'AT-BASE','4','GROUP4','4003','0','Erlöse Dienstleistungen 20 %');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 94, 'AT-BASE','4','GROUP4','4004','0','Erlöse Software 20 %');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 95, 'AT-BASE','4','GROUP4','4005','0','Erlöse Software EU');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 96, 'AT-BASE','4','GROUP4','4006','0','Evidenz Kfd. Reverse Charge');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 97, 'AT-BASE','4','GROUP4','4050','0','Erlöse 0 % Drittland');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 98, 'AT-BASE','4','GROUP4','4051','0','Erlöse Dienstleistungen Drittland');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 99, 'AT-BASE','4','GROUP4','4052','0','Erlöse Software Drittland');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 100, 'AT-BASE','4','GROUP4','4069','0','Erlöse § 19/1d Schrott');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 101, 'AT-BASE','4','GROUP4','4400','0','Kundenskonto 20 %');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 102, 'AT-BASE','4','GROUP4','4405','0','Kundenskonto 0 % Ausfuhrlieferungen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 103, 'AT-BASE','4','GROUP4','4410','0','Skontoaufwand i.g. Lieferung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 104, 'AT-BASE','4','GROUP4','4413','0','Kundenskonto sonstige Leistung EU');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 105, 'AT-BASE','4','GROUP4','4420','0','Kundenskonto EU-Land A x %');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 106, 'AT-BASE','4','GROUP4','4450','0','Kundenrabatt 20%');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 107, 'AT-BASE','4','GROUP4','4500','0','Bestandsveränderungen fertige Erzeugnisse');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 108, 'AT-BASE','4','GROUP4','4510','0','Best.Veränd.Halbf.Erzeugnisse');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 109, 'AT-BASE','4','GROUP4','4519','0','Bestandsveränderung laufend');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 110, 'AT-BASE','4','GROUP4','4520','0','Best.Veränd.n.n.abger.Leist.');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 111, 'AT-BASE','4','GROUP4','4530','0','Gelieferte (noch nicht fakturierte Waren)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 112, 'AT-BASE','4','GROUP4','4580','0','Aktivierte Eigenleistung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 113, 'AT-BASE','4','GROUP4','4630','0','Erträge aus d.Abgang v.Anlagen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 114, 'AT-BASE','4','GROUP4','4801','0','Zuwendungen a.öffentl. Mitteln');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 115, 'AT-BASE','4','GROUP4','4831','0','sonstige betriebliche Erträge (nicht steuerbar)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 116, 'AT-BASE','4','GROUP4','4840','0','Sonstige Erlöse 20 %');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 117, 'AT-BASE','4','GROUP4','4850','0','Erl. Aufwandersätze');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 118, 'AT-BASE','4','GROUP4','4881','0','Versicherungsvergütungen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 119, 'AT-BASE','4','GROUP4','4885','0','Zuschreibungen zum Umlaufvermögen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 120, 'AT-BASE','4','GROUP4','4950','0','Privatanteil 20 %');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 121, 'AT-BASE','4','GROUP4','4991','0','Sachbezüge 20%');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 122, 'AT-BASE','5','GROUP5','5000','0','Handelswareneinsatz');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 123, 'AT-BASE','5','GROUP5','5001','0','Materialeinkauf Fremdfertigung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 124, 'AT-BASE','5','GROUP5','5002','0','Wareneinkauf Verkauf');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 125, 'AT-BASE','5','GROUP5','5020','0','Materialeinkauf');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 126, 'AT-BASE','5','GROUP5','5090','0','Bezugskosten');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 127, 'AT-BASE','5','GROUP5','5100','0','Verbrauch Rohstoffe');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 128, 'AT-BASE','5','GROUP5','5199','0','Aufwand für TW-AFA Vorräte');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 129, 'AT-BASE','5','GROUP5','5200','0','Verbrauch bezogenen Teile');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 130, 'AT-BASE','5','GROUP5','5300','0','Verbrauch Hilfsstoffe');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 131, 'AT-BASE','5','GROUP5','5400','0','Hilfsstoffverbrauch');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 132, 'AT-BASE','5','GROUP5','5440','0','Inventurveränderung Fremdbarb. + GK');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 133, 'AT-BASE','5','GROUP5','5441','0','GWG Fremdbarb. + GK');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 134, 'AT-BASE','5','GROUP5','5450','0','Verpackungsmaterial');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 135, 'AT-BASE','5','GROUP5','5800','0','Fremdleistungen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 136, 'AT-BASE','5','GROUP5','5880','0','Lieferantenskonti');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 137, 'AT-BASE','5','GROUP5','5900','0','Skontoertrag ig.E. 0% (m.VST)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 138, 'AT-BASE','5','GROUP5','5920','0','Skontoertrag ig.E. 20% (m.VST)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 139, 'AT-BASE','6','GROUP6','6000','0','Löhne');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 140, 'AT-BASE','6','GROUP6','6001','0','Rückerstattung AUVA Arbeiter');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 141, 'AT-BASE','6','GROUP6','6010','0','Lehrlingsentschädigung Arb.');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 142, 'AT-BASE','6','GROUP6','6020','0','Nichtleistungslöhne');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 143, 'AT-BASE','6','GROUP6','6100','0','Leihpersonal Aufwand');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 144, 'AT-BASE','6','GROUP6','6150','0','Sonderzahlungen Arbeiter');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 145, 'AT-BASE','6','GROUP6','6200','0','Gehälter');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 146, 'AT-BASE','6','GROUP6','6201','0','Förderung AMS');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 147, 'AT-BASE','6','GROUP6','6202','0','Rückerstattung AUVA Angestellte');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 148, 'AT-BASE','6','GROUP6','6210','0','Veränderung Mehrarbeitsvergütung RSt Ang');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 149, 'AT-BASE','6','GROUP6','6211','0','Veränderung Mehrarbeitsvergütung RSt Arbeiter');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 150, 'AT-BASE','6','GROUP6','6230','0','Sonderzahlungen Angestellte');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 151, 'AT-BASE','6','GROUP6','6231','0','Dotierung RST Sonderzahlungen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 152, 'AT-BASE','6','GROUP6','6255','0','Geschäftsführerbezüge');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 153, 'AT-BASE','6','GROUP6','6256','0','Geschäftsführersachbezüge');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 154, 'AT-BASE','6','GROUP6','6300','0','Sonderzahlung aliquot vorläufig');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 155, 'AT-BASE','6','GROUP6','6310','0','Dotierung Urlaubsrückstellung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 156, 'AT-BASE','6','GROUP6','6311','0','Veränderung Urlaubsrückstellung Arbeiter');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 157, 'AT-BASE','6','GROUP6','6402','0','Betriebliche Vorsorgekassa Arbeiter');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 158, 'AT-BASE','6','GROUP6','6407','0','Betriebliche Vorsorgekassa Angestellte');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 159, 'AT-BASE','6','GROUP6','6416','0','Veränderung Pensionsrückstellung (Angestellte)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 160, 'AT-BASE','6','GROUP6','6435','0','sonstige Beiträge für die Altersversorgung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 161, 'AT-BASE','6','GROUP6','6500','0','Gesetzlicher Sozialaufwand');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 162, 'AT-BASE','6','GROUP6','6600','0','Gesetzlicher Sozialaufwand Arbeiter');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 163, 'AT-BASE','6','GROUP6','6605','0','Gesetzlicher Sozialaufwand Angestellte');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 164, 'AT-BASE','6','GROUP6','6610','0','Dienstgeberbeitrag Arbeiter');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 165, 'AT-BASE','6','GROUP6','6611','0','Dienstgeberbeitrag Angestellte');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 166, 'AT-BASE','6','GROUP6','6620','0','Zuschlag zum DB');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 167, 'AT-BASE','6','GROUP6','6621','0','Zuschlag zum DB Angestellte');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 168, 'AT-BASE','6','GROUP6','6630','0','Ausgleichstaxe');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 169, 'AT-BASE','6','GROUP6','6690','0','Lohnsteuer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 170, 'AT-BASE','6','GROUP6','6693','0','Kommunalsteuer Arbeiter');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 171, 'AT-BASE','6','GROUP6','6694','0','Kommunalsteuer Angestellte');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 172, 'AT-BASE','6','GROUP6','6700','0','Freiwilliger Sozialaufwand');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 173, 'AT-BASE','6','GROUP6','6710','0','Arbeitskleidung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 174, 'AT-BASE','6','GROUP6','6720','0','Fahrspesen Dienstnehmer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 175, 'AT-BASE','6','GROUP6','6730','0','Weihnachtsgeschenke Arbeitnehmer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 176, 'AT-BASE','6','GROUP6','6740','0','Betriebsveranstaltungen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 177, 'AT-BASE','6','GROUP6','6750','0','Konto frei');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 178, 'AT-BASE','6','GROUP6','6760','0','Vergleichszahlung Dienstnehmer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 179, 'AT-BASE','7','GROUP7','7030','0','Abschreibung G W G');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 180, 'AT-BASE','7','GROUP7','7070','0','Buchwert ausgeschiedener Anlagen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 181, 'AT-BASE','7','GROUP7','7080','0','Planmäßige AFA immat.WG.');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 182, 'AT-BASE','7','GROUP7','7081','0','Planmäßige Abschreibung für Sachanlagen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 183, 'AT-BASE','7','GROUP7','7100','0','Nicht abzugsfähige Vorsteuer (VStK)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 184, 'AT-BASE','7','GROUP7','7110','0','Gebühren und Abgaben_Zoll');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 185, 'AT-BASE','7','GROUP7','7111','0','Kammerumlage');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 186, 'AT-BASE','7','GROUP7','7200','0','Instandhaltung Gebäude');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 187, 'AT-BASE','7','GROUP7','7201','0','Instandhaltung Außenanlagen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 188, 'AT-BASE','7','GROUP7','7202','0','Instandh. - Maschinen u. Anl.');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 189, 'AT-BASE','7','GROUP7','7204','0','Instandhaltung und Betriebskosten Betriebs und Geschäftsgebäude');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 190, 'AT-BASE','7','GROUP7','7205','0','Verbrauchsmaterial Werkstatt');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 191, 'AT-BASE','7','GROUP7','7210','0','Müllentsorgung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 192, 'AT-BASE','7','GROUP7','7211','0','Entsorgungskosten');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 193, 'AT-BASE','7','GROUP7','7230','0','Reinigungsmaterial (div. Verbrauchsmaterial)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 194, 'AT-BASE','7','GROUP7','7231','0','Berufsbekleidung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 195, 'AT-BASE','7','GROUP7','7235','0','Reinigung durch Dritte');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 196, 'AT-BASE','7','GROUP7','7240','0','LKW-Betriebskosten Vito G 437 MB');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 197, 'AT-BASE','7','GROUP7','7241','0','Leasing Mercedes Vito G 437 MB');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 198, 'AT-BASE','7','GROUP7','7250','0','KFZ Betriebskosten allgemein');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 199, 'AT-BASE','7','GROUP7','7251','0','KFZ Leasing allgemein');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 200, 'AT-BASE','7','GROUP7','7252','0','KFZ Versicherungen allgemein');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 201, 'AT-BASE','7','GROUP7','7253','0','Wachdienst');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 202, 'AT-BASE','7','GROUP7','7254','0','Konto frei');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 203, 'AT-BASE','7','GROUP7','7255','0','Aufwand Leihwagen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 204, 'AT-BASE','7','GROUP7','7256','0','PKW-Betriebskosten VW Golf G 854 SH Versuchsfahrzeug');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 205, 'AT-BASE','7','GROUP7','7257','0','Leasing VW Golf G 854 SH');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 206, 'AT-BASE','7','GROUP7','7258','0','Konto frei');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 207, 'AT-BASE','7','GROUP7','7285','0','Strom');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 208, 'AT-BASE','7','GROUP7','7286','0','Betriebskosten/Beheizung Mietobjekte');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 209, 'AT-BASE','7','GROUP7','7300','0','Transporte durch Dritte');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 210, 'AT-BASE','7','GROUP7','7330','0','Reise und Fahrtspesen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 211, 'AT-BASE','7','GROUP7','7331','0','Kilometergelder');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 212, 'AT-BASE','7','GROUP7','7360','0','Reisediäten');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 213, 'AT-BASE','7','GROUP7','7380','0','Telefon');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 214, 'AT-BASE','7','GROUP7','7381','0','Internet');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 215, 'AT-BASE','7','GROUP7','7382','0','Wartung Homepage');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 216, 'AT-BASE','7','GROUP7','7390','0','Postgebühren');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 217, 'AT-BASE','7','GROUP7','7400','0','Konto frei');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 218, 'AT-BASE','7','GROUP7','7401','0','Konto frei');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 219, 'AT-BASE','7','GROUP7','7402','0','Konto frei');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 220, 'AT-BASE','7','GROUP7','7403','0','Miete Büro Linz');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 221, 'AT-BASE','7','GROUP7','7404','0','Miete Gradnerstraße');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 222, 'AT-BASE','7','GROUP7','7410','0','Maschinen u. Gerätemieten');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 223, 'AT-BASE','7','GROUP7','7411','0','Wartungskosten BuG Ausstattung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 224, 'AT-BASE','7','GROUP7','7420','0','Mobilien-Leasing ');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 225, 'AT-BASE','7','GROUP7','7421','0','Konto frei');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 226, 'AT-BASE','7','GROUP7','7422','0','Leasing Server');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 227, 'AT-BASE','7','GROUP7','7423','0','Konto frei');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 228, 'AT-BASE','7','GROUP7','7424','0','Konto frei');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 229, 'AT-BASE','7','GROUP7','7480','0','Lizenzgebühren');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 230, 'AT-BASE','7','GROUP7','7540','0','Provisionen an Dritte');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 231, 'AT-BASE','7','GROUP7','7600','0','Büromaterial');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 232, 'AT-BASE','7','GROUP7','7601','0','EDV-Material');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 233, 'AT-BASE','7','GROUP7','7610','0','Drucksorten');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 234, 'AT-BASE','7','GROUP7','7620','0','Fachliteratur und Zeitungen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 235, 'AT-BASE','7','GROUP7','7630','0','Gästeunt. u. Zeitschriften');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 236, 'AT-BASE','7','GROUP7','7650','0','Werbeaufwand/Inserate');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 237, 'AT-BASE','7','GROUP7','7651','0','Anbahnung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 238, 'AT-BASE','7','GROUP7','7652','0','Aufwand Messen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 239, 'AT-BASE','7','GROUP7','7653','0','Konto frei');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 240, 'AT-BASE','7','GROUP7','7654','0','Inserate');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 241, 'AT-BASE','7','GROUP7','7670','0','Bewirtungskosten');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 242, 'AT-BASE','7','GROUP7','7690','0','Trinkgelder u. Spenden');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 243, 'AT-BASE','7','GROUP7','7691','0','Spenden an begünstigte Institutionen/Sponsoring');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 244, 'AT-BASE','7','GROUP7','7696','0','Säumnis- und Verspätungszuschläge');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 245, 'AT-BASE','7','GROUP7','7700','0','Betriebsversicherungen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 246, 'AT-BASE','7','GROUP7','7701','0','Transportversicherungen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 247, 'AT-BASE','7','GROUP7','7710','0','Pflichtversich. Unternehmer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 248, 'AT-BASE','7','GROUP7','7749','0','Aufwand Japan');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 249, 'AT-BASE','7','GROUP7','7750','0','Steuerberatung (Lohnverrechnung, Buchhaltung)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 250, 'AT-BASE','7','GROUP7','7751','0','Patentkosten');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 251, 'AT-BASE','7','GROUP7','7752','0','Rechtsberatung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 252, 'AT-BASE','7','GROUP7','7753','0','Unternehmensberatung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 253, 'AT-BASE','7','GROUP7','7754','0','Aufwand tectos China');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 254, 'AT-BASE','7','GROUP7','7755','0','Wartung (Betreuung EDV)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 255, 'AT-BASE','7','GROUP7','7756','0','Lizenzgebühren Abaqus');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 256, 'AT-BASE','7','GROUP7','7757','0','Lizenzgebühren Sonstige');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 257, 'AT-BASE','7','GROUP7','7758','0','Sonstige Beratungskosten');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 258, 'AT-BASE','7','GROUP7','7759','0','EDV-Beratung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 259, 'AT-BASE','7','GROUP7','7760','0','Mitgliedsbeiträge/freiwillige Beiträge');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 260, 'AT-BASE','7','GROUP7','7761','0','Prüfung Jahresabschluss');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 261, 'AT-BASE','7','GROUP7','7770','0','Aus- und Fortbildung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 262, 'AT-BASE','7','GROUP7','7775','0','Forschung und Entwicklung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 263, 'AT-BASE','7','GROUP7','7776','0','Messentwicklung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 264, 'AT-BASE','7','GROUP7','7777','0','Produktentwicklung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 265, 'AT-BASE','7','GROUP7','7785','0','Freiwillige Verbandsbeiträge');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 266, 'AT-BASE','7','GROUP7','7790','0','Spesen des Geldverkehrs');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 267, 'AT-BASE','7','GROUP7','7791','0','Kursdifferenzen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 268, 'AT-BASE','7','GROUP7','7800','0','Betriebsbedingte Schadensfälle');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 269, 'AT-BASE','7','GROUP7','7801','0','Ausgaben nicht absetzbar');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 270, 'AT-BASE','7','GROUP7','7802','0','Strafen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 271, 'AT-BASE','7','GROUP7','7805','0','Forderungsverluste 20');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 272, 'AT-BASE','7','GROUP7','7806','0','Abschreibungen auf Forderungen (EU)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 273, 'AT-BASE','7','GROUP7','7807','0','Abschreibungen auf Forderungen (Drittland)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 274, 'AT-BASE','7','GROUP7','7810','0','Zuweisung an Einzel-WB Forderungen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 275, 'AT-BASE','7','GROUP7','7811','0','Zuweisung pauschale Wertberichtigungen zu Exportforderungen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 276, 'AT-BASE','7','GROUP7','7812','0','Abschreibungen auf Vorräte');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 277, 'AT-BASE','7','GROUP7','7820','0','Buchwert abgegangener Sachanlagen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 278, 'AT-BASE','7','GROUP7','7840','0','Gründungskosten');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 279, 'AT-BASE','7','GROUP7','7850','0','Sonstiger Aufwand');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 280, 'AT-BASE','7','GROUP7','7851','0','Sonstiger Aufwand Gewinnanteil Reich');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 281, 'AT-BASE','7','GROUP7','7930','0','Aufw. Gewährleistungsverpfl.');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 282, 'AT-BASE','7','GROUP7','7940','0','Aufwand aus Vorperioden');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 283, 'AT-BASE','8','GROUP8','8020','0','Gewinnüberrg. v. Organgesell.');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 284, 'AT-BASE','8','GROUP8','8060','0','Zinserträge');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 285, 'AT-BASE','8','GROUP8','8090','0','Ertr.a.Ant.a.and. Unternehmen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 286, 'AT-BASE','8','GROUP8','8100','0','Habenzinsen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 287, 'AT-BASE','8','GROUP8','8280','0','Zinsen f. Kredite u. Darlehen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 288, 'AT-BASE','8','GROUP8','8286','0','Kursgewinne/Kursverluste');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 289, 'AT-BASE','8','GROUP8','8288','0','Zinsen auf Lieferantenkredite');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 290, 'AT-BASE','8','GROUP8','8291','0','Sonst. Zinsen und ähnliche Aufwendungen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 291, 'AT-BASE','8','GROUP8','8500','0','Körperschaftsteuer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 292, 'AT-BASE','8','GROUP8','8505','0','Kapitalertragsteuer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 293, 'AT-BASE','8','GROUP8','8510','0','Körperschaftsteuervorauszahl.');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 294, 'AT-BASE','8','GROUP8','8511','0','Dotierung KöSt-Rückstellung');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 295, 'AT-BASE','8','GROUP8','8512','0','Aktivierung Körperschaftsteuer');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 296, 'AT-BASE','8','GROUP8','8513','0','Köst Vorperioden');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 297, 'AT-BASE','8','GROUP8','8520','0','Forschungsprämie');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 298, 'AT-BASE','8','GROUP8','8595','0','Ertrag aus der Aktivierung latenter Steuern');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 299, 'AT-BASE','8','GROUP8','8610','0','Auflösung sonstiger unversteuerter Rücklagen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 300, 'AT-BASE','8','GROUP8','8700','0','Auflösung gebundener Kapitalrücklage');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 301, 'AT-BASE','8','GROUP8','8710','0','Auflösung Rücklage für eigene Anteile');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 302, 'AT-BASE','8','GROUP8','8720','0','Auflösung nicht gebundene Kapitalrücklage');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 303, 'AT-BASE','8','GROUP8','8750','0','Auflösung gesetzliche Rücklage');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 304, 'AT-BASE','8','GROUP8','8760','0','Auflösung satzungsmäßige Rücklage');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 305, 'AT-BASE','8','GROUP8','8770','0','Auflösung andere (freie) Rücklage');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 306, 'AT-BASE','8','GROUP8','8810','0','Zuweisung sonstige unversteuerte Rücklagen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 307, 'AT-BASE','8','GROUP8','8820','0','Zuweisung Inv. Rücklage');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 308, 'AT-BASE','8','GROUP8','8890','0','Zuw.Bew.Res.GWG');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 309, 'AT-BASE','8','GROUP8','8900','0','Zuweisung gesetzliche Rücklagen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 310, 'AT-BASE','8','GROUP8','8910','0','Zuweisung satzungsmäßige Rücklagen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 311, 'AT-BASE','8','GROUP8','8920','0','Zuweisung andere (freie) Rücklagen');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 312, 'AT-BASE','9','GROUP9','9390','0','Bilanzgewinn');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 313, 'AT-BASE','9','GROUP9','9391','0','Bilanzverlust');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 314, 'AT-BASE','9','GROUP9','9700','0','Wachdienst');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 315, 'AT-BASE','9','GROUP9','9991','0','Gewinnvortrag');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 316, 'AT-BASE','9','GROUP9','9993','0','Verlustvortrag');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 317, 'AT-BASE','9','GROUP9','9994','0','Verlustvortrag');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 318, 'AT-BASE','5','GROUP5','50200','0','Materialeinkauf');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 319, 'AT-BASE','6','GROUP6','60000','0','kalk. Löhne u Gehälter');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 320, 'AT-BASE','6','GROUP6','64160','0','Veränderung Pensionsrückstellung (Angestellte)');
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 321, 'AT-BASE','6','GROUP6','66300','0','Leistungserfassung');
diff --git a/htdocs/install/mysql/data/llx_accounting_account_fr.sql b/htdocs/install/mysql/data/llx_accounting_account_fr.sql
index 8f64f5d108b..a190f0c3c9a 100644
--- a/htdocs/install/mysql/data/llx_accounting_account_fr.sql
+++ b/htdocs/install/mysql/data/llx_accounting_account_fr.sql
@@ -24,11 +24,14 @@
--
-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors
-- de l''install et tous les sigles '--' sont supprimés.
+-- Not: To replace a string thas is '__, 0' inot a increasing num, you can use vi with comment
+-- :let @a=1 | %s/__, 0/\='__, '.(@a+setreg('a',@a+1))/g
--
-- ID 0 - 438
-- ID 1501 - 5999
-- ID 7000 - 7208
+-- ID 8000 - 9120
-- ADD 100000 to rowid # Do no remove this comment --
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1401,'PCG99-ABREGE','CAPIT', 'XXXXXX', '1', '0', 'Fonds propres, provisions pour risques et charges et dettes à plus d''un an', 1);
@@ -1596,4 +1599,1128 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7112,'PCG18-ASSOC','INCOME', 'XXXXXX', '87', '7208', 'Contributions volontaires en nature', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7113,'PCG18-ASSOC','INCOME', 'XXXXXX', '870', '7112', 'Dons en nature', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7114,'PCG18-ASSOC','INCOME', 'XXXXXX', '871', '7112', 'Prestations en nature', 1);
-INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7115,'PCG18-ASSOC','INCOME', 'XXXXXX', '875', '7112', 'Bénévolat', 1);
\ No newline at end of file
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7115,'PCG18-ASSOC','INCOME', 'XXXXXX', '875', '7112', 'Bénévolat', 1);
+
+--
+-- Descriptif des plans comptables FR PCGA14-DEV
+--
+
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8000,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1', '0', 'Comptes de capitaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8001,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '10','8000', 'Capital et réserves', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8002,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '101','8001', 'Capital', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8003,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1011','8002', 'Capital individuel initial (au ../../../)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8004,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1012','8002', 'Variations capital individuel initial', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8005,'PCGAFR14-DEV','CAPIT', 'CAPITAL', '1013','8002', 'Capital souscrit - non appelé', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8006,'PCGAFR14-DEV','CAPIT', 'CAPITAL', '1014','8002', 'Capital souscrit - appelé, versé', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8007,'PCGAFR14-DEV','CAPIT', 'CAPITAL', '1015','8002', 'Capital souscrit - appelé, non versé', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8008,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '10151','8007', 'Capital non amorti', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8009,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '10152','8007', 'Capital amorti', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8010,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1018','8002', 'Capital souscrit soumis à des réglementations particulières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8011,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '104','8001', 'Primes liées au capital social', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8012,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1041','8011', 'Primes d''émission', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8013,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1042','8011', 'Primes de fusion', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8014,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1043','8011', 'Primes d''apport', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8015,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1044','8011', 'Primes de conversion d''obligations en actions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8016,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1045','8011', 'Bons de souscription d''actions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8017,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '105','8001', 'Ecarts de réévaluation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8018,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1051','8017', 'Réserve spéciale de réévaluation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8019,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1052','8017', 'Ecart de réévaluation libre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8020,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1053','8017', 'Réserve de réévaluation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8021,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1055','8017', 'Ecarts de réévaluation (autres opérations légales)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8022,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1057','8017', 'Autres écarts de réévaluation en France', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8023,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1058','8017', 'Autres écarts de réévaluation à l''Etranger', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8024,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '106','8001', 'Réserves', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8025,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1061','8024', 'Réserve légale', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8026,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '10611','8025', 'Réserve légale proprement dite', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8027,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '10612','8025', 'Plus-values nettes à long terme', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8028,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1062','8024', 'Réserves indisponibles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8029,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1063','8024', 'Réserves statutaires ou contractuelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8030,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1064','8024', 'Réserves réglementées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8031,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '10641','8030', 'Plus-values nettes à long terme', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8032,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '10643','8030', 'Réserves consécutives à l''octroi de subventions d''investissement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8033,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '10648','8030', 'Autres réserves réglementées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8034,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1068','8024', 'Autres réserves', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8035,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '10681','8034', 'Réserve de propre assureur', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8036,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '10688','8034', 'Réserves diverses', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8037,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '107','8001', 'Ecart d''équivalence', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8038,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '108','8001', 'Compte de l''exploitant', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8039,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '109','8001', 'Actionnaires et associés : Capital souscrit - non appelé', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8040,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1091','8039', 'Actionnaires : Capital souscrit - non appelé', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8041,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1092','8039', 'Associés : Capital souscrit - non appelé', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8042,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '11','8000', 'Report à nouveau (solde créditeur ou débiteur)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8043,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '110','8042', 'Report à nouveau (solde créditeur)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8044,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '119','8042', 'Report à nouveau (solde débiteur)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8045,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '12','8000', 'Résultat de l''exercice (bénéfice ou perte)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8046,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '120','8045', 'Résultat de l''exercice (bénéfice)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8047,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '129','8045', 'Résultat de l''exercice (perte)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8048,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '13','8000', 'Subventions d''investissement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8049,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '131','8048', 'Subventions d''équipement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8050,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1311','8049', 'Etat', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8051,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1312','8049', 'Régions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8052,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1313','8049', 'Départements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8053,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1314','8049', 'Communes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8054,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1315','8049', 'Collectivités publiques', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8055,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1316','8049', 'Entreprises publiques', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8056,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1317','8049', 'Entreprises et organismes privés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8057,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1318','8049', 'Autres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8058,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '138','8048', 'Autres subventions d''investissement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8059,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '139','8048', 'Subventions d''investissement inscrites au compte de résultat', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8060,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1391','8059', 'Subventions d''équipement inscrites au compte de résultat', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8061,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '13911','8060', 'Etat', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8062,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '13912','8060', 'Régions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8063,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '13913','8060', 'Départements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8064,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '13914','8060', 'Communes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8065,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '13915','8060', 'Collectivités publiques', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8066,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '13916','8060', 'Entreprises publiques', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8067,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '13917','8060', 'Entreprises et organismes privés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8068,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '13918','8060', 'Autres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8069,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1398','8059', 'Autres subventions d''investissement inscrites au compte de résultat', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8070,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '14','8000', 'Provisions réglementées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8071,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '142','8070', 'Provisions réglementées relatives aux immobilisations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8072,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1424','8071', 'Provisions pour investissement (participation des salariés)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8073,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '143','8070', 'Provisions réglementées relatives aux stocks', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8074,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1431','8073', 'Hausse des prix', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8075,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1432','8073', 'Fluctuation des cours', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8076,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '144','8070', 'Provisions réglementées relatives aux autres éléments de l''actif', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8077,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '145','8070', 'Amortissements dérogatoires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8078,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '146','8070', 'Provision spéciale de réévaluation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8079,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '147','8070', 'Plus-values réinvesties', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8080,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '148','8070', 'Autres provisions réglementées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8081,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '15','8000', 'Provisions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8082,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '151','8081', 'Provisions pour risques', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8083,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1511','8082', 'Provisions pour litiges', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8084,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1512','8082', 'Provisions pour garanties données aux clients', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8085,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1513','8082', 'Provisions pour pertes sur marchés à terme', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8086,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1514','8082', 'Provisions pour amendes et pénalités', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8087,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1515','8082', 'Provisions pour pertes de change', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8088,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1516','8082', 'Provisions pour pertes sur contrats', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8089,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1518','8082', 'Autres provisions pour risques', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8090,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '153','8081', 'Provisions pour pensions et obligations similaires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8091,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '154','8081', 'Provisions pour restructurations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8092,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '155','8081', 'Provisions pour impôts', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8093,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '156','8081', 'Provisions pour renouvellement des immobilisations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8094,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '157','8081', 'Provisions pour charges à répartir sur plusieurs exercices', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8095,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1572','8094', 'Provisions pour gros entretien ou grandes révisions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8096,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '158','8081', 'Autres provisions pour charges', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8097,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1581','8096', 'Provisions pour remises en état', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8098,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '16','8000', 'Emprunts et dettes assimilées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8099,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '161','8098', 'Emprunts obligataires convertibles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8100,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '163','8098', 'Autres emprunts obligataires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8101,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '164','8098', 'Emprunts auprès des établissements de crédit', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8102,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1641','8101', 'Emprunts fonciers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8103,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1642','8101', 'Autres emprunts à moyen et long terme', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8104,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1643','8101', 'Emprunts à court terme', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8105,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '165','8098', 'Dépôts et cautionnements reçus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8106,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1651','8105', 'Dépôts', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8107,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1655','8105', 'Cautionnements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8108,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '166','8098', 'Participation des salariés aux résultats', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8109,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1661','8108', 'Comptes bloqués', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8110,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1662','8108', 'Fonds de participation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8111,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '167','8098', 'Emprunts et dettes assortis de conditions particulières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8112,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1671','8111', 'Emissions de titres participatifs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8113,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1674','8111', 'Avances conditionnées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8114,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1675','8111', 'Emprunts participatifs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8115,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '168','8098', 'Autres emprunts et dettes assimilées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8116,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1681','8115', 'Autres emprunts', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8117,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1685','8115', 'Rentes viagères capitalisées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8118,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1687','8115', 'Autres dettes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8119,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1688','8115', 'Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8120,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '16881','8119', 'sur emprunts obligataires convertibles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8121,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '16883','8119', 'sur autres emprunts obligataires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8122,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '16884','8119', 'sur emprunts auprès des établissements de crédit', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8123,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '168841','8122', 'Intérêts courus sur emprunts fonciers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8124,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '168842','8122', 'Intérêts courus sur autres emprunts MLT', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8125,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '168843','8122', 'Intérêts courus sur emprunts court terme', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8126,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '16885','8119', 'sur dépôts et cautionnements reçus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8127,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '16886','8119', 'sur participation des salariés aux résultats', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8128,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '16887','8119', 'sur emprunts et dettes assortis de conditions particulières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8129,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '16888','8119', 'sur autres emprunts et dettes assimilées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8130,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '169','8098', 'Primes de remboursement des obligations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8131,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '17','8000', 'Dettes rattachées à des participations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8132,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '171','8131', 'Dettes rattachées à des participations (groupe)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8133,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1711','8132', 'Principal', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8134,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1712','8132', 'Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8135,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '172','8131', 'Dettes rattachées à des participations à des organismes professionnels agricoles (autres que les établissements de crédit)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8136,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1721','8135', 'Principal', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8137,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1728','8135', 'Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8138,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '174','8131', 'Dettes rattachées à des participations (hors groupe)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8139,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1741','8138', 'Principal', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8140,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1748','8138', 'Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8141,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '178','8131', 'Dettes rattachées à des sociétés en participation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8142,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1781','8141', 'Principal', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8143,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '1788','8141', 'Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8144,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '18','8000', 'Comptes de liaison des établissements et sociétés en participation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8145,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '181','8144', 'Comptes de liaison des établissements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8146,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '186','8144', 'Biens et prestations de services échangés entre établissements (charges)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8147,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '187','8144', 'Biens et prestations de services échangés entre établissements (produits)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8148,'PCGAFR14-DEV','CAPIT', 'XXXXXX', '188','8144', 'Comptes de liaison des sociétés en participation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8149,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2', '0', 'Comptes d''immobilisations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8150,'PCGAFR14-DEV','IMMO', 'XXXXXX', '20','8149', 'Immobilisations incorporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8151,'PCGAFR14-DEV','IMMO', 'XXXXXX', '201','8150', 'Frais d''établissement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8152,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2011','8151', 'Frais de constitution', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8153,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2012','8151', 'Frais de premier établissement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8154,'PCGAFR14-DEV','IMMO', 'XXXXXX', '20121','8153', 'Frais de prospection', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8155,'PCGAFR14-DEV','IMMO', 'XXXXXX', '20122','8153', 'Frais de publicité', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8156,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2013','8151', 'Frais d''augmentation de capital et d''opérations diverses (fusions, scissions, transformations)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8157,'PCGAFR14-DEV','IMMO', 'XXXXXX', '203','8150', 'Frais de recherche et de développement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8158,'PCGAFR14-DEV','IMMO', 'XXXXXX', '205','8150', 'Concessions et droits similaires, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8159,'PCGAFR14-DEV','IMMO', 'XXXXXX', '206','8150', 'Droit au bail', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8160,'PCGAFR14-DEV','IMMO', 'XXXXXX', '207','8150', 'Fonds rural et commercial', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8161,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2071','8160', 'Fonds agricole', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8162,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2072','8160', 'Fonds commercial', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8163,'PCGAFR14-DEV','IMMO', 'XXXXXX', '208','8150', 'Autres immobilisations incorporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8164,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2082','8163', 'Usufruit temporaire', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8165,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21','8149', 'Immobilisations corporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8166,'PCGAFR14-DEV','IMMO', 'XXXXXX', '211','8165', 'Terrains', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8167,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2111','8166', 'Terrains nus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8168,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21111','8167', 'Terrains nus exploités en faire valoir direct', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8169,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21112','8167', 'Autres terrains nus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8170,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2112','8166', 'Terrains aménagés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8171,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2113','8166', 'Sous-sols et sur-sols', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8172,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2114','8166', 'Terrains de gisement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8173,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21141','8172', 'Carrières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8174,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2115','8166', 'Terrains bâtis', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8175,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21151','8174', 'affectés à la production agricole', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8176,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21155','8174', 'affectés à une autre activité professionnelle', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8177,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21158','8174', 'affectés à des opérations non professionnelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8178,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2116','8166', 'Compte d''ordre sur immobilisations (art. 6 du décret 78.737 du 11-07-1978)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8179,'PCGAFR14-DEV','IMMO', 'XXXXXX', '212','8165', 'Agencements et aménagements de terrains', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8182,'PCGAFR14-DEV','IMMO', 'XXXXXX', '213','8165', 'Constructions sur sol propre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8183,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2131','8182', 'Bâtiments', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8184,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21311','8183', 'affectés à la production agricole', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8185,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21315','8183', 'affectés à une autre activité professionnelle', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8186,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21318','8183', 'affectés à des opérations non professionnelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8187,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2135','8182', 'Installations générales - agencements - aménagements des constructions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8188,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21351','8187', 'affectés à la production agricole', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8189,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21355','8187', 'affectés à une autre activité professionnelle', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8190,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21358','8187', 'affectés à des opérations non professionnelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8191,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2138','8182', 'Ouvrages d''infrastructure', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8192,'PCGAFR14-DEV','IMMO', 'XXXXXX', '214','8165', 'Constructions sur sol d''autrui', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8193,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2141','8192', 'Bâtiments', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8194,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21411','8193', 'affectés à la production agricole', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8195,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21415','8193', 'affectés à une autre activité professionnelle', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8196,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21418','8193', 'affectés à des opérations non professionnelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8197,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2145','8192', 'Installations générales - agencements - aménagements des constructions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8198,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21451','8197', 'affectés à la production agricole', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8199,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21455','8197', 'affectés à une autre activité professionnelle', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8200,'PCGAFR14-DEV','IMMO', 'XXXXXX', '21458','8197', 'affectés à des opérations non professionnelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8201,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2148','8192', 'Ouvrages d''infrastructure', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8202,'PCGAFR14-DEV','IMMO', 'XXXXXX', '215','8165', 'Installations techniques, matériels et outillage', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8203,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2151','8202', 'Installations techniques sur sol propre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8204,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2153','8202', 'Installations techniques sur sol d''autrui', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8205,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2154','8202', 'Matériel', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8206,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2155','8202', 'Outillage', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8207,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2157','8202', 'Agencements et aménagements du matériel et outillage industriels', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8208,'PCGAFR14-DEV','IMMO', 'XXXXXX', '217','8165', 'Améliorations du fonds', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8209,'PCGAFR14-DEV','IMMO', 'XXXXXX', '218','8165', 'Autres immobilisations corporelles (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8210,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2181','8209', 'Installations générales, agencements, aménagements divers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8211,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2182','8209', 'Matériel de transport', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8212,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2183','8209', 'Matériel de bureau et matériel informatique', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8213,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2184','8209', 'Mobilier', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8214,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2186','8209', 'Emballages récupérables', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8215,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2188','8209', 'Autres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8216,'PCGAFR14-DEV','IMMO', 'XXXXXX', '22','8149', 'Immobilisations mises en concession', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8217,'PCGAFR14-DEV','IMMO', 'XXXXXX', '23','8149', 'Immobilisations en cours', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8218,'PCGAFR14-DEV','IMMO', 'XXXXXX', '231','8217', 'Immobilisations corporelles en cours (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8219,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2311','8218', 'Terrains (en cours)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8220,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2312','8218', 'Agencements et aménagements de terrains (en cours)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8221,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2313','8218', 'Constructions sur sol propre (en cours)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8222,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2314','8218', 'Constructions sur sol d''autrui (en cours)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8223,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2315','8218', 'Installations techniques, matériel et outillage (en cours)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8224,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2318','8218', 'Autres immobilisations corporelles - hors biens vivants (en cours)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8225,'PCGAFR14-DEV','IMMO', 'XXXXXX', '232','8217', 'Immobilisations incorporelles en cours', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8226,'PCGAFR14-DEV','IMMO', 'XXXXXX', '234','8217', 'Immobilisations corporelles en cours (biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8227,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2341','8226', 'Animaux reproducteurs (jeunes de renouvellement)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8228,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2343','8226', 'Animaux de services (en cours)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8229,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2346','8226', 'Plantations pérennes (en cours)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8230,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2347','8226', 'Autres végétaux immobilisés (en cours)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8231,'PCGAFR14-DEV','IMMO', 'XXXXXX', '237','8217', 'Avances et acomptes versés sur immobilisations incorporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8232,'PCGAFR14-DEV','IMMO', 'XXXXXX', '238','8217', 'Avances et acomptes versés sur commandes d''immobilisations corporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8233,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2381','8232', 'Immobilisations corporelles (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8234,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2384','8232', 'Immobilisations corporelles (biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8235,'PCGAFR14-DEV','IMMO', 'XXXXXX', '24','8149', 'Immobilisations en cours (biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8236,'PCGAFR14-DEV','IMMO', 'XXXXXX', '241','8235', 'Animaux reproducteurs (adultes)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8237,'PCGAFR14-DEV','IMMO', 'XXXXXX', '242','8235', 'Animaux reproducteurs (jeunes de renouvellement)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8238,'PCGAFR14-DEV','IMMO', 'XXXXXX', '243','8235', 'Animaux de services', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8239,'PCGAFR14-DEV','IMMO', 'XXXXXX', '246','8235', 'Plantations pérennes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8240,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2461','8239', 'Plantations pérennes sur sol propre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8241,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2465','8239', 'Plantations pérennes sur sol d''autrui', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8242,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2467','8239', 'Aménagements des plantations pérennes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8243,'PCGAFR14-DEV','IMMO', 'XXXXXX', '247','8235', 'Autres végétaux immobilisés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8244,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2471','8243', 'Autres végétaux immobilisés sur sol propre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8245,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2475','8243', 'Autres végétaux immobilisés sur sol d''autrui', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8246,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2477','8243', 'Aménagements des autres végétaux immobilisés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8247,'PCGAFR14-DEV','IMMO', 'XXXXXX', '25','8149', 'Entreprises liées - parts et créances', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8248,'PCGAFR14-DEV','IMMO', 'XXXXXX', '26','8149', 'Participations et créances rattachées à des participations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8249,'PCGAFR14-DEV','IMMO', 'XXXXXX', '261','8248', 'Titres de participation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8250,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2611','8249', 'Actions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8251,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2618','8249', 'Autres titres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8252,'PCGAFR14-DEV','IMMO', 'XXXXXX', '262','8248', 'Participations à des organismes professionnels agricoles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8253,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2621','8252', 'Sociétés coopératives agricoles (sauf CUMA)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8254,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2622','8252', 'CUMA', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8255,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2624','8252', 'SICA', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8256,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2628','8252', 'Autres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8257,'PCGAFR14-DEV','IMMO', 'XXXXXX', '266','8248', 'Autres formes de participation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8258,'PCGAFR14-DEV','IMMO', 'XXXXXX', '267','8248', 'Créances rattachées à des participations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8259,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2671','8258', 'Créances rattachées à des participations (groupe)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8260,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2672','8258', 'Créances rattachées à des participations à des organismes professionnels agricoles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8261,'PCGAFR14-DEV','IMMO', 'XXXXXX', '26721','8260', 'Sociétés coopératives agricoles (sauf CUMA)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8262,'PCGAFR14-DEV','IMMO', 'XXXXXX', '26722','8260', 'CUMA', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8263,'PCGAFR14-DEV','IMMO', 'XXXXXX', '26724','8260', 'SICA', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8264,'PCGAFR14-DEV','IMMO', 'XXXXXX', '26728','8260', 'Autres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8265,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2674','8258', 'Créances rattachées à d''autres participations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8266,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2675','8258', 'Versements représentatifs d''apports non capitalisés (appel de fonds)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8267,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2676','8258', 'Avances consolidables', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8268,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2678','8258', 'Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8269,'PCGAFR14-DEV','IMMO', 'XXXXXX', '268','8248', 'Créances rattachées à des sociétés en participation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8270,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2681','8269', 'Principal', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8271,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2688','8269', 'Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8272,'PCGAFR14-DEV','IMMO', 'XXXXXX', '269','8248', 'Versements restant à effectuer sur titres de participation non libérés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8273,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2691','8272', 'sur titres de participation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8274,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2692','8272', 'sur participations à des organismes professionnels agricoles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8275,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2696','8272', 'sur autres formes de participation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8276,'PCGAFR14-DEV','IMMO', 'XXXXXX', '27','8149', 'Autres immobilisations financières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8277,'PCGAFR14-DEV','IMMO', 'XXXXXX', '271','8276', 'Titres immobilisés (droit de propriété)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8278,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2711','8277', 'Actions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8279,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2715','8277', 'Parts dans les établissements de crédit', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8280,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2718','8277', 'Autres titres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8281,'PCGAFR14-DEV','IMMO', 'XXXXXX', '272','8276', 'Titres immobilisés (droit de créance)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8282,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2721','8281', 'Obligations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8283,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2722','8281', 'Bons', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8284,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2723','8281', 'Certificats de fonds de développement coopératifs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8285,'PCGAFR14-DEV','IMMO', 'XXXXXX', '273','8276', 'Titres immobilisés de l''activité de portefeuille', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8286,'PCGAFR14-DEV','IMMO', 'XXXXXX', '274','8276', 'Prêts', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8287,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2741','8286', 'Prêts participatifs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8288,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2742','8286', 'Prêts aux associés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8289,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2743','8286', 'Prêts au personnel', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8290,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2748','8286', 'Autres prêts', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8291,'PCGAFR14-DEV','IMMO', 'XXXXXX', '275','8276', 'Dépôts et cautionnements versés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8292,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2751','8291', 'Dépôts', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8293,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2755','8291', 'Cautionnements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8294,'PCGAFR14-DEV','IMMO', 'XXXXXX', '276','8276', 'Autres créances immobilisées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8295,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2761','8294', 'Créances diverses', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8296,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2768','8294', 'Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8297,'PCGAFR14-DEV','IMMO', 'XXXXXX', '27682','8296', 'sur titres immobilisés (droit de créance)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8298,'PCGAFR14-DEV','IMMO', 'XXXXXX', '27684','8296', 'sur prêts', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8299,'PCGAFR14-DEV','IMMO', 'XXXXXX', '27685','8296', 'sur dépôts et cautionnements versés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8300,'PCGAFR14-DEV','IMMO', 'XXXXXX', '27688','8296', 'sur créances diverses', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8301,'PCGAFR14-DEV','IMMO', 'XXXXXX', '277','8276', 'Actions propres ou parts propres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8302,'PCGAFR14-DEV','IMMO', 'XXXXXX', '279','8276', 'Versements restant à effectuer sur titres immobilisés non libérés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8303,'PCGAFR14-DEV','IMMO', 'XXXXXX', '28','8149', 'Amortissements des immobilisations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8304,'PCGAFR14-DEV','IMMO', 'XXXXXX', '280','8303', 'Amortissements des immobilisations incorporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8305,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2801','8304', 'Frais d''établissement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8306,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2803','8304', 'Frais de recherche et de développement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8307,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2805','8304', 'Concessions et droits similaires, brevets, licences, logiciels, droits et valeurs similaires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8308,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2807','8304', 'Fonds commercial', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8309,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2808','8304', 'Autres immobilisations incorporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8310,'PCGAFR14-DEV','IMMO', 'XXXXXX', '28082','8309', 'Usufruit temporaire', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8311,'PCGAFR14-DEV','IMMO', 'ALLOCATION', '281','8303', 'Amortissements des immobilisations corporelles (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8312,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2811','8311', 'Terrains de gisement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8313,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2812','8311', 'Agencements, aménagements de terrains amortissables', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8314,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2813','8311', 'Constructions sur sol propre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8315,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2814','8311', 'Constructions sur sol d''autrui', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8316,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2815','8311', 'Installations, matériel et outillage', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8317,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2818','8311', 'Autres immobilisations corporelles (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8318,'PCGAFR14-DEV','IMMO', 'XXXXXX', '282','8303', 'Amortissement des immobilisations mises en concession', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8319,'PCGAFR14-DEV','IMMO', 'XXXXXX', '284','8303', 'Amortissement des immobilisations corporelles (biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8320,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2841','8319', 'Animaux reproducteurs (adultes)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8321,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2843','8319', 'Animaux de service', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8322,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2846','8319', 'Plantation pérennes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8323,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2847','8319', 'Autres végétaux immobilisés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8324,'PCGAFR14-DEV','IMMO', 'XXXXXX', '29','8149', 'Dépréciations des immobilisations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8325,'PCGAFR14-DEV','IMMO', 'XXXXXX', '290','8324', 'Dépréciations des immobilisations incorporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8326,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2905','8325', 'Marques, procédés, droits et valeurs similaires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8327,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2906','8325', 'Droit au bail', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8328,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2907','8325', 'Fonds rural et commercial', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8329,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2908','8325', 'Autres immobilisations incorporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8330,'PCGAFR14-DEV','IMMO', 'XXXXXX', '291','8324', 'Dépréciations des immobilisations corporelles (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8331,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2911','8330', 'Terrains', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8332,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2912','8330', 'Agencements et aménagements de terrains', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8333,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2913','8330', 'Constructions sur sol propre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8334,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2914','8330', 'Constructions sur sol d''autrui', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8335,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2915','8330', 'Installations techniques, matériel et outillage', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8336,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2917','8330', 'Améliorations du fonds', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8337,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2918','8330', 'Autres immobilisations corporelles (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8338,'PCGAFR14-DEV','IMMO', 'XXXXXX', '292','8324', 'Dépréciations des immobilisations mises en concession', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8339,'PCGAFR14-DEV','IMMO', 'XXXXXX', '293','8324', 'Dépréciations des immobilisations en cours', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8340,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2931','8339', 'Immobilisations corporelles en cours (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8341,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2932','8339', 'Immobilisations incorporelles en cours', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8342,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2934','8339', 'Immobilisations corporelles en cours (biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8343,'PCGAFR14-DEV','IMMO', 'XXXXXX', '294','8324', 'Autres immobilisations corporelles (biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8344,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2941','8343', 'Animaux reproducteurs (adultes)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8345,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2942','8343', 'Animaux reproducteurs (jeunes de renouvellement)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8346,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2943','8343', 'Animaux de service', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8347,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2946','8343', 'Plantation pérennes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8348,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2947','8343', 'Autres végétaux immobilisés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8349,'PCGAFR14-DEV','IMMO', 'XXXXXX', '296','8324', 'Dépréciations des participations et créances rattachées à des participations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8350,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2961','8349', 'Titres de participation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8351,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2962','8349', 'Participations à des organismes professionnels agricoles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8352,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2966','8349', 'Autres formes de participation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8353,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2967','8349', 'Créances rattachées à des participations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8354,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2968','8349', 'Créances rattachées à des sociétés en participation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8355,'PCGAFR14-DEV','IMMO', 'XXXXXX', '297','8324', 'Dépréciations des autres immobilisations financières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8356,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2971','8355', 'Titres immobilisés - droit de propriété', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8357,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2972','8355', 'Titres immobilisés - droit de créances', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8358,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2973','8355', 'Titres immobilisés de l''activité de portefeuille', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8359,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2974','8355', 'Prêts', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8360,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2975','8355', 'Dépôts et cautionnements versés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8361,'PCGAFR14-DEV','IMMO', 'XXXXXX', '2976','8355', 'Autres créances immobilisées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8362,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3',' 0', 'Comptes de stocks et en-cours', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8363,'PCGAFR14-DEV','STOCK', 'XXXXXX', '30','8362', 'Stocks et en-cours', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8364,'PCGAFR14-DEV','STOCK', 'XXXXXX', '301','8363', 'Approvisionnements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8365,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3011','8364', 'Engrais et amendements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8366,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3012','8364', 'Semences et plants', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8367,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3013','8364', 'Produits de défense des végétaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8368,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3014','8364', 'Aliments du bétail', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8369,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3015','8364', 'Produits de défense des animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8370,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3016','8364', 'Produits de reproduction animale', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8371,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3017','8364', 'Emballages', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8372,'PCGAFR14-DEV','STOCK', 'XXXXXX', '30171','8371', 'Emballages perdus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8373,'PCGAFR14-DEV','STOCK', 'XXXXXX', '30175','8371', 'Emballages récupérables non identifiables', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8374,'PCGAFR14-DEV','STOCK', 'XXXXXX', '30177','8371', 'Emballages à usage mixte', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8375,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3018','8364', 'Combustibles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8376,'PCGAFR14-DEV','STOCK', 'XXXXXX', '302','8363', 'Autres approvisionnements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8377,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3021','8376', 'Carburants et lubrifiants', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8378,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3022','8376', 'Produits d''entretien', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8379,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3023','8376', 'Fournitures d''atelier et de magasin', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8380,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3024','8376', 'Fournitures de bureau', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8381,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3025','8376', 'Denrées et fournitures pour le personnel', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8382,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3026','8376', 'Matériaux divers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8383,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3027','8376', 'Autres fournitures consommables', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8384,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3028','8376', 'Matières premières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8385,'PCGAFR14-DEV','STOCK', 'XXXXXX', '307','8363', 'Marchandises', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8386,'PCGAFR14-DEV','STOCK', 'XXXXXX', '31','8362', 'Animaux (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8387,'PCGAFR14-DEV','STOCK', 'XXXXXX', '311','8386', 'Stocks d''animaux (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8388,'PCGAFR14-DEV','STOCK', 'XXXXXX', '32','8362', 'Animaux (cycle court)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8389,'PCGAFR14-DEV','STOCK', 'XXXXXX', '321','8388', 'Stocks d''animaux (cycle court)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8390,'PCGAFR14-DEV','STOCK', 'XXXXXX', '33','8362', 'Végétaux en terre (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8391,'PCGAFR14-DEV','STOCK', 'XXXXXX', '331','8390', 'Avances aux cultures (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8392,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3311','8391', 'Engrais et amendements en terre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8393,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3312','8391', 'Semences et plants en terre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8394,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3313','8391', 'Produit de défense des végétaux en terre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8395,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3314','8391', 'Autres approvisionnements en terre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8396,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3315','8391', 'Façons culturales', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8397,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3318','8391', 'Autres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8398,'PCGAFR14-DEV','STOCK', 'XXXXXX', '34','8362', 'Végétaux en terre (cycle court)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8399,'PCGAFR14-DEV','STOCK', 'XXXXXX', '341','8398', 'Avances aux cultures (cycle court)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8400,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3411','8399', 'Engrais et amendements en terre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8401,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3412','8399', 'Semences et plants en terre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8402,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3413','8399', 'Produit de défense des végétaux en terre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8403,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3414','8399', 'Autres approvisionnements en terre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8404,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3415','8399', 'Façons culturales', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8405,'PCGAFR14-DEV','STOCK', 'XXXXXX', '3418','8399', 'Autres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8406,'PCGAFR14-DEV','STOCK', 'XXXXXX', '348','8398', 'Autres végétaux en terre (cycle court)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8407,'PCGAFR14-DEV','STOCK', 'XXXXXX', '35','8362', 'En-cours de production de biens et services (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8408,'PCGAFR14-DEV','STOCK', 'XXXXXX', '351','8407', 'Biens (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8409,'PCGAFR14-DEV','STOCK', 'XXXXXX', '352','8407', 'Biens (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8410,'PCGAFR14-DEV','STOCK', 'XXXXXX', '353','8407', 'Biens (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8411,'PCGAFR14-DEV','STOCK', 'XXXXXX', '354','8407', 'Biens (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8412,'PCGAFR14-DEV','STOCK', 'XXXXXX', '355','8407', 'Biens (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8413,'PCGAFR14-DEV','STOCK', 'XXXXXX', '356','8407', 'Autres biens (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8414,'PCGAFR14-DEV','STOCK', 'XXXXXX', '357','8407', 'Travaux à façon (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8415,'PCGAFR14-DEV','STOCK', 'XXXXXX', '358','8407', 'Autres services (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8416,'PCGAFR14-DEV','STOCK', 'XXXXXX', '36','8362', 'En-cours de production de biens et services (cycle court)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8417,'PCGAFR14-DEV','STOCK', 'XXXXXX', '361','8416', 'Biens (cycle court) - Produits végétaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8418,'PCGAFR14-DEV','STOCK', 'XXXXXX', '362','8416', 'Biens (cycle court) - Produits animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8419,'PCGAFR14-DEV','STOCK', 'XXXXXX', '363','8416', 'Biens (cycle court) - Vins', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8420,'PCGAFR14-DEV','STOCK', 'XXXXXX', '364','8416', 'Biens (cycle court) - Alcools', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8421,'PCGAFR14-DEV','STOCK', 'XXXXXX', '365','8416', 'Biens (cycle court) - Autres produits transformés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8422,'PCGAFR14-DEV','STOCK', 'XXXXXX', '366','8416', 'Autres biens (activités annexes)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8423,'PCGAFR14-DEV','STOCK', 'XXXXXX', '367','8416', 'Travaux à façon (cycle court)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8424,'PCGAFR14-DEV','STOCK', 'XXXXXX', '368','8416', 'Autres services (cycle court)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8425,'PCGAFR14-DEV','STOCK', 'XXXXXX', '37','8362', 'Stocks de Produits', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8426,'PCGAFR14-DEV','STOCK', 'XXXXXX', '371','8425', 'Produits intermédiaires végétaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8427,'PCGAFR14-DEV','STOCK', 'XXXXXX', '372','8425', 'Produits intermédiaires animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8428,'PCGAFR14-DEV','STOCK', 'XXXXXX', '373','8425', 'Produits intermédiaires transformés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8429,'PCGAFR14-DEV','STOCK', 'XXXXXX', '374','8425', 'Produits finis végétaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8430,'PCGAFR14-DEV','STOCK', 'XXXXXX', '375','8425', 'Produits finis animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8431,'PCGAFR14-DEV','STOCK', 'XXXXXX', '376','8425', 'Produits finis transformés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8432,'PCGAFR14-DEV','STOCK', 'XXXXXX', '377','8425', 'Produits résiduels', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8433,'PCGAFR14-DEV','STOCK', 'XXXXXX', '378','8425', 'Produits (activités annexes)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8434,'PCGAFR14-DEV','STOCK', 'XXXXXX', '38','8362', 'Inventaire permanent', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8435,'PCGAFR14-DEV','STOCK', 'XXXXXX', '39','8362', 'Dépréciations des stocks et en-cours', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8436,'PCGAFR14-DEV','STOCK', 'XXXXXX', '390','8435', 'Dépréciations des approvisionnements et marchandises', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8437,'PCGAFR14-DEV','STOCK', 'XXXXXX', '391','8435', 'Dépréciations des animaux (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8438,'PCGAFR14-DEV','STOCK', 'XXXXXX', '392','8435', 'Dépréciations des animaux (cycle court)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8439,'PCGAFR14-DEV','STOCK', 'XXXXXX', '393','8435', 'Dépréciations des végétaux en terre (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8440,'PCGAFR14-DEV','STOCK', 'XXXXXX', '394','8435', 'Dépréciations des végétaux en terre (cycle court)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8441,'PCGAFR14-DEV','STOCK', 'XXXXXX', '395','8435', 'Dépréciations des en-cours de production de biens et services (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8442,'PCGAFR14-DEV','STOCK', 'XXXXXX', '396','8435', 'Dépréciations des en-cours de production de biens et services (cycle court)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8443,'PCGAFR14-DEV','STOCK', 'XXXXXX', '397','8435', 'Dépréciations des produits', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8444,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4',' 0', 'Comptes de tiers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8445,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '40','8444', 'Fournisseurs et comptes rattachés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8446,'PCGAFR14-DEV','THIRDPARTY','SUPPLIER', '401','8445', 'Fournisseurs d''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8447,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4011','8446', 'Fournisseurs - Achats de biens et de prestations de services', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8448,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4017','8446', 'Fournisseurs - Retenues de garantie', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8449,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '402','8445', 'Fournisseurs d''exploitation - Soldes après compensation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8450,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '403','8445', 'Fournisseurs - Effets à payer', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8451,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4031','8450', 'Fournisseurs d''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8452,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4032','8450', 'Fournisseurs d''exploitation (conventions de compte courant)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8453,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '404','8445', 'Fournisseurs d''immobilisations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8454,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4041','8453', 'Fournisseurs - Achats d''immobilisations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8455,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4047','8453', 'Fournisseurs d''immobilisations - Retenues de garantie', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8456,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '405','8445', 'Fournisseurs d''immobilisations - Effets à payer', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8457,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '408','8445', 'Fournisseurs - Factures non parvenues', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8458,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4081','8457', 'Fournisseurs d''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8459,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4082','8457', 'Fournisseurs d''exploitation (conventions de compte courant)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8460,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4084','8457', 'Fournisseurs d''immobilisations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8461,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4088','8457', 'Fournisseurs - Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8462,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '409','8445', 'Fournisseurs débiteurs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8463,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4091','8462', 'Fournisseurs - Avances et acomptes versés sur commandes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8464,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4096','8462', 'Fournisseurs - Créances pour emballages et matériel à rendre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8465,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4097','8462', 'Fournisseurs - Autres avoirs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8466,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '40971','8465', 'Fournisseurs d''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8467,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '40974','8465', 'Fournisseurs d''immobilisations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8468,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4098','8462', 'Rabais, remises, ristournes à obtenir et autres avoirs non encore reçus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8469,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '41','8444', 'Clients et comptes rattachés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8470,'PCGAFR14-DEV','THIRDPARTY','CUSTOMER', '411','8469', 'Clients', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8471,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4111','8470', 'Clients - Ventes de biens ou de prestations de services', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8472,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4117','8470', 'Clients - Retenues de garantie', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8473,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '412','8469', 'Clients - Soldes après compensation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8474,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '413','8469', 'Clients - Effets à recevoir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8475,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4131','8474', 'Clients', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8476,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4132','8474', 'Clients (conventions de compte courant)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8477,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '416','8469', 'Clients douteux ou litigieux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8478,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '418','8469', 'Clients - Produits non encore facturés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8479,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4181','8478', 'Clients - Factures à établir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8480,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4182','8478', 'Clients (conventions de compte courant)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8481,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4188','8478', 'Clients - Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8482,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '419','8469', 'Clients créditeurs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8483,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4191','8482', 'Clients - Avances et acomptes reçus sur commandes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8484,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4196','8482', 'Clients - Dettes sur emballages et matériels consignés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8485,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4197','8482', 'Clients - Autres avoirs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8486,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4198','8482', 'Rabais, remises, ristournes à accorder et autres avoirs à établir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8487,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '42','8444', 'Personnel et comptes rattachés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8488,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '421','8487', 'Personnel - Rémunérations dues', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8489,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '422','8487', 'Comités d''entreprises, d''établissement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8490,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '424','8487', 'Participation des salariés aux résultats', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8491,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4246','8490', 'Réserve spéciale (art. L. 442-2 du Code du travail)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8492,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4248','8490', 'Comptes courants', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8493,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '425','8487', 'Personnel - Avances et acomptes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8494,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '426','8487', 'Personnel - Dépôts', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8495,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '427','8487', 'Personnel - Oppositions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8496,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '428','8487', 'Personnel - Charges à payer et produits à recevoir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8497,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4282','8496', 'Dettes provisionnées pour congés à payer', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8498,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4284','8496', 'Dettes provisionnées pour participation des salariés aux résultats', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8499,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4286','8496', 'Autres charges à payer', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8500,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4287','8496', 'Produits à recevoir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8501,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '43','8444', 'Mutualité Sociale Agricole et autres organismes sociaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8502,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '431','8501', 'Mutualité Sociale Agricole', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8503,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '437','8501', 'Autres organismes sociaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8504,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '438','8501', 'Organismes sociaux - Charges à payer et produits à recevoir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8505,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4382','8504', 'Charges sociales sur congés à payer', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8506,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4386','8504', 'Autres charges à payer', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8507,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4387','8504', 'Produits à recevoir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8508,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44','8444', 'Etat et autres collectivités publiques', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8509,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '441','8508', 'Etat - Subventions à recevoir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8510,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4411','8509', 'Subventions d''investissement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8511,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4417','8509', 'Subventions d''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8512,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4418','8509', 'Subventions d''équilibre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8513,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4419','8509', 'Avances sur subventions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8514,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '442','8508', 'Etat - Impôts et taxes recouvrables sur des tiers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8515,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4424','8514', 'Obligataires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8516,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4425','8514', 'Associés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8517,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4428','8514', 'Autres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8518,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '443','8508', 'Opérations particulières avec l''Etat, les collectivités publiques, les organismes internationaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8519,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '444','8508', 'Etat - Impôts sur les bénéfices', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8520,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '445','8508', 'Etat - Taxes sur le chiffre d''affaires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8521,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4452','8520', 'TVA due intracommunautaire', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8522,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44528','8521', 'TVA due intracommunautaire sur factures non parvenues', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8523,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4455','8520', 'Taxes sur le chiffre d''affaires à décaisser', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8524,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44551','8523', 'TVA à décaisser', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8525,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44552','8523', 'TVA antérieurement déduite à reverser', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8526,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44558','8523', 'Taxes assimilées à la TVA', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8527,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4456','8520', 'Taxes sur le chiffre d''affaires déductibles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8528,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44562','8527', 'TVA sur immobilisations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8529,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '445622','8528', 'TVA sur intracommunautaire sur immobilisations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8530,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44563','8527', 'TVA transférée par d''autres entreprises', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8531,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44565','8527', 'TVA sur achats à régulariser', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8532,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44566','8527', 'TVA sur autres biens et services', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8533,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '445662','8532', 'TVA sur intracommunautaire sur biens et services', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8534,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44567','8527', 'Crédit de TVA à reporter', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8535,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44568','8527', 'Taxes assimilées à la TVA', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8536,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4457','8520', 'Taxes sur le chiffre d''affaires collectées par l''entreprise', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8537,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44571','8536', 'TVA collectée', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8538,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44575','8536', 'TVA collectée à régulariser', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8539,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44578','8536', 'Taxes assimilées à la TVA', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8540,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4458','8520', 'Taxes sur le chiffre d''affaires à régulariser ou en attente', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8541,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44581','8540', 'Acomptes - Régime simplifié d''imposition', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8542,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44582','8540', 'Acomptes - Régime du forfait', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8543,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44583','8540', 'Remboursement de taxes sur le chiffre d''affaires demandé', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8544,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44584','8540', 'TVA récupérée d''avance', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8545,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44586','8540', 'Taxes sur le chiffre d''affaires sur factures non parvenues', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8546,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '445862','8545', 'TVA sur intracommunautaire sur factures non parvenues', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8547,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '44587','8540', 'Taxes sur le chiffre d''affaires sur factures à établir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8548,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '446','8508', 'Obligations cautionnées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8549,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '447','8508', 'Autres impôts, taxes et versements assimilés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8550,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '448','8508', 'Etat - Charges à payer et produits à recevoir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8551,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4482','8550', 'Charges fiscales sur congés à payer', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8552,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4486','8550', 'Autres charges à payer', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8553,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4487','8550', 'Produits à recevoir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8554,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '45','8444', 'Groupe, communautés d''exploitation et associés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8555,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '451','8554', 'Groupe', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8556,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '452','8554', 'Associés - Opérations faites en commun (GAEC partiels)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8557,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4521','8556', 'Opérations courantes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8558,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4528','8556', 'Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8559,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '453','8554', 'Associés - Opérations faites en commun et en GIE (banques de travail)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8560,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4531','8559', 'Opérations courantes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8561,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4538','8559', 'Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8562,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '454','8554', 'Associés - Opérations faites en commun (autres communautés d''exploitation à objets particuliers)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8563,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4541','8562', 'Opérations courantes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8564,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4548','8562', 'Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8565,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '455','8554', 'Associés - Comptes courants', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8566,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4551','8565', 'Associés - Comptes courants (principal)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8567,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4553','8565', 'Associés - Comptes bloqués (principal)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8568,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4558','8565', 'Associés - Comptes courants (intérêts courus)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8569,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '45581','8568', 'Associés - Comptes courants (intérêts courus)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8570,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '45583','8568', 'Associés - Comptes bloqués (intérêts courus)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8571,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '456','8554', 'Associés - Opérations sur le capital', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8572,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4561','8571', 'Associés - Comptes d''apport en société', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8573,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '45611','8572', 'Apports en nature', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8574,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '45615','8572', 'Apports en numéraire', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8575,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4562','8571', 'Apporteurs - Capital appelé, non versé', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8576,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '45621','8575', 'Actionnaires - Capital souscrit et appelé, non versé', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8577,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '45625','8575', 'Associés - Capital appelé, non versé', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8578,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4563','8571', 'Associés - Versements reçus sur augmentation de capital', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8579,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4564','8571', 'Associés - Versements anticipés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8580,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4566','8571', 'Associés défaillants', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8581,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4567','8571', 'Associés - Capital à rembourser', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8582,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '457','8554', 'Associés - Dividendes à payer', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8583,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '458','8554', 'Associés - Opérations faites en commun et en GIE', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8584,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4581','8583', 'Opérations courantes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8585,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4588','8583', 'Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8586,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '46','8444', 'Débiteurs divers et créditeurs divers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8587,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '461','8586', 'Caisse de péréquation des prix', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8588,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '462','8586', 'Créances sur cessions d''immobilisations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8589,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '464','8586', 'Dettes sur acquisitions de valeurs mobilières de placement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8590,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '465','8586', 'Créances sur cessions de valeurs mobilières de placement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8591,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '467','8586', 'Autres comptes débiteurs ou créditeurs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8592,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4671','8591', 'Autres comptes débiteurs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8593,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4672','8591', 'Autres comptes créditeurs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8594,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '468','8586', 'Divers - Charges à payer et produits à recevoir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8595,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4686','8594', 'Charges à payer', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8596,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4687','8594', 'Produits à recevoir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8597,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '47','8444', 'Comptes transitoires ou d''attente', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8598,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '471','8597', 'Comptes d''attente', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8599,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '472','8597', 'Opérations de compensation (conventions de compte courant)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8600,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '473','8597', 'Comptes d''attente', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8601,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '474','8597', 'Comptes d''attente', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8602,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '475','8597', 'Comptes d''attente', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8603,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '476','8597', 'Différence de conversion - Actif', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8604,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4761','8603', 'Diminution des créances', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8605,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4762','8603', 'Augmentation des dettes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8606,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4768','8603', 'Différences compensées par couverture de change', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8607,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '477','8597', 'Différences de conversion - Passif', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8608,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4771','8607', 'Augmentation des créances', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8609,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4772','8607', 'Diminution des dettes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8610,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4778','8607', 'Différences compensées par couverture de change', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8611,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '478','8597', 'Autres comptes transitoires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8612,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '48','8444', 'Comptes de régularisation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8613,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '481','8612', 'Charges à répartir sur plusieurs exercices', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8614,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4816','8613', 'Frais d''émission des emprunts', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8615,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '486','8612', 'Charges constatées d''avance', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8616,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '487','8612', 'Produits constatés d''avance', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8617,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '488','8612', 'Comptes de répartition périodique des charges et des produits', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8618,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4886','8617', 'Charges', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8619,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4887','8617', 'Produits', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8620,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '49','8444', 'Dépréciations des comptes de tiers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8621,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '491','8620', 'Dépréciations des comptes de clients', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8622,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '495','8620', 'Dépréciations des comptes du groupe, des communautés d''exploitation et des associés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8623,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4951','8622', 'Comptes du groupe', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8624,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4952','8622', 'Opérations faites en commun (GAEC partiels)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8625,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4953','8622', 'Opérations faites en commun et en GIE (banques de travail)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8626,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4954','8622', 'Opérations faites en commun (autres communauté d''exploitation à objets particuliers)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8627,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4955','8622', 'Comptes courants des associés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8628,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4958','8622', 'Opérations faites en commun et en GIE', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8629,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '496','8620', 'Dépréciations des comptes de débiteurs divers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8630,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4961','8629', 'Caisse de péréquation des prix', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8631,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4962','8629', 'Créances sur cessions d''immobilisations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8632,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4965','8629', 'Créances sur cessions de valeurs mobilières de placement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8633,'PCGAFR14-DEV','THIRDPARTY', 'XXXXXX', '4967','8629', 'Autres comptes débiteurs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8634,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5', '0', 'Comptes financiers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8635,'PCGAFR14-DEV','FINAN', 'XXXXXX', '50','8634', 'Valeurs mobilières de placement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8636,'PCGAFR14-DEV','FINAN', 'XXXXXX', '501','8635', 'Parts dans des entreprises liées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8637,'PCGAFR14-DEV','FINAN', 'XXXXXX', '502','8635', 'Actions propres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8638,'PCGAFR14-DEV','FINAN', 'XXXXXX', '503','8635', 'Actions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8639,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5031','8638', 'Titres cotés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8640,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5035','8638', 'Titres non cotés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8641,'PCGAFR14-DEV','FINAN', 'XXXXXX', '504','8635', 'Autres titres conférant un droit de propriété', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8642,'PCGAFR14-DEV','FINAN', 'XXXXXX', '505','8635', 'Obligations et bons émis par la société et rachetés par elle', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8643,'PCGAFR14-DEV','FINAN', 'XXXXXX', '506','8635', 'Obligations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8644,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5061','8643', 'Titres cotés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8645,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5065','8643', 'Titres non cotés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8646,'PCGAFR14-DEV','FINAN', 'XXXXXX', '507','8635', 'Bons du Trésor et bons de caisse à court terme', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8647,'PCGAFR14-DEV','FINAN', 'XXXXXX', '508','8635', 'Autres valeurs mobilières de placement et autres créances assimilées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8648,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5081','8647', 'Autres valeurs mobilières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8649,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5082','8647', 'Bons de souscription', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8650,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5088','8647', 'Intérêts courus sur obligations, bons et valeurs assimilés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8651,'PCGAFR14-DEV','FINAN', 'XXXXXX', '509','8635', 'Versements restant à effectuer sur valeurs mobilières de placement non libérées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8652,'PCGAFR14-DEV','FINAN', 'XXXXXX', '51','8634', 'Banques, établissements financiers et assimilés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8653,'PCGAFR14-DEV','FINAN', 'XXXXXX', '511','8652', 'Valeurs à l''encaissement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8654,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5111','8653', 'Coupons échus à l''encaissement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8655,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5112','8653', 'Chèques à encaisser', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8656,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5113','8653', 'Effets à l''encaissement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8657,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5114','8653', 'Effets à l''escompte', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8658,'PCGAFR14-DEV','FINAN', 'XXXXXX', '512','8652', 'Banques', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8659,'PCGAFR14-DEV','FINAN', 'XXXXXX', '514','8652', 'Chèques postaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8660,'PCGAFR14-DEV','FINAN', 'XXXXXX', '515','8652', 'Caisses du Trésor et des établissements publics', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8661,'PCGAFR14-DEV','FINAN', 'XXXXXX', '516','8652', 'Sociétés de Bourse', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8662,'PCGAFR14-DEV','FINAN', 'XXXXXX', '517','8652', 'Autres organismes financiers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8663,'PCGAFR14-DEV','FINAN', 'XXXXXX', '518','8652', 'Intérêts courus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8664,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5181','8663', 'Intérêts courus à payer', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8665,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5188','8663', 'Intérêts courus à recevoir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8666,'PCGAFR14-DEV','FINAN', 'XXXXXX', '519','8652', 'Concours bancaires courants', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8667,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5191','8666', 'Crédit bancaires de campagne', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8668,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5193','8666', 'Mobilisation de créances nées à l''étranger', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8669,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5197','8666', 'Crédits de mobilisation de créances', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8670,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5198','8666', 'Intérêts courus sur concours bancaires courants', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8671,'PCGAFR14-DEV','FINAN', 'XXXXXX', '52','8634', 'Instruments de trésorerie', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8672,'PCGAFR14-DEV','FINAN', 'XXXXXX', '53','8634', 'Caisse', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8673,'PCGAFR14-DEV','FINAN', 'XXXXXX', '54','8634', 'Régies d''avance et accréditifs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8674,'PCGAFR14-DEV','FINAN', 'XXXXXX', '58','8634', 'Virements internes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8675,'PCGAFR14-DEV','FINAN', 'XXXXXX', '59','8634', 'Dépréciations des comptes financiers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8676,'PCGAFR14-DEV','FINAN', 'XXXXXX', '590','8675', 'Dépréciations des valeurs mobilières de placement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8677,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5903','8676', 'Actions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8678,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5904','8676', 'Autres titres conférant un droit de propriété', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8679,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5906','8676', 'Obligations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8680,'PCGAFR14-DEV','FINAN', 'XXXXXX', '5908','8676', 'Autres valeurs mobilières de placement et créances assimilées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8681,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6', '0', 'Comptes de charges', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8682,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '60','8681', 'Achats (sauf 603)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8683,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '601','8682', 'Achats stockés - approvisionnements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8684,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6011','8683', 'Engrais et amendements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8685,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6012','8683', 'Semences et plants', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8686,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6013','8683', 'Produits de défense des végétaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8687,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6014','8683', 'Aliments du bétail', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8688,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6015','8683', 'Produits de défense des animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8689,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6016','8683', 'Produits de reproduction animale', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8690,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6017','8683', 'Emballages', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8691,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '60171','8690', 'Emballages perdus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8692,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '60172','8690', 'Emballages récupérables non identifiables', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8693,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '60173','8690', 'Emballages à usage mixte', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8694,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6018','8683', 'Combustibles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8695,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '602','8682', 'Achats stockés - Autres approvisionnements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8696,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6021','8695', 'Carburants et lubrifiants', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8697,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6022','8695', 'Produits d''entretien', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8698,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6023','8695', 'Fournitures d''atelier et de magasin', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8699,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6024','8695', 'Fournitures de bureau', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8700,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6025','8695', 'Denrées et fournitures pour le personnel', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8701,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6026','8695', 'Matériaux divers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8702,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6027','8695', 'Autres fournitures consommables', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8703,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6028','8695', 'Matières premières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8704,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '603','8682', 'Variations des stocks (approvisionnements et marchandises)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8705,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6031','8704', 'Variation des stocks d''approvisionnements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8706,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6032','8704', 'Variation des stocks d''autres approvisionnements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8707,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6037','8704', 'Variation des stocks de marchandises', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8708,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '604','8682', 'Achats d''animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8709,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6041','8708', 'Animaux reproducteurs (adultes)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8710,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6042','8708', 'Animaux reproducteurs (jeunes de renouvellement)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8711,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6045','8708', 'Autres animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8712,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '605','8682', 'Achats de travaux et services incorporés aux produits', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8713,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6051','8712', 'Achats de travaux et services incorporés pour productions végétales', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8714,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6054','8712', 'Achats de travaux et services incorporés pour productions animales', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8715,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6058','8712', 'Autres achats de travaux et services', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8716,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '606','8682', 'Achats non stockés et fournitures', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8717,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6061','8716', 'Eau', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8718,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6062','8716', 'Gaz', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8719,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6063','8716', 'Electricités', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8720,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6064','8716', 'Carburants et lubrifiants', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8721,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6065','8716', 'Eau d''irrigation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8722,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6066','8716', 'Fournitures d''entretien et de petit équipement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8723,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6067','8716', 'Fournitures pour productions immobilisées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8724,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6068','8716', 'Autres fournitures non stockés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8725,'PCGAFR14-DEV','EXPENSE', 'PRODUCT', '607','8682', 'Achats de marchandises', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8726,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '608','8682', 'Frais accessoires sur achats', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8727,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '609','8682', 'Rabais, remises et ristournes obtenus sur achats', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8728,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6091','8727', 'RRR sur achats d''autres approvisionnements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8729,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6092','8727', 'RRR sur achats d''approvisionnements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8730,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6094','8727', 'RRR sur achats d''animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8731,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6095','8727', 'RRR sur achats de travaux et services incorporés aux produits', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8732,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6096','8727', 'RRR sur achats de fournitures non stockés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8733,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6097','8727', 'RRR sur achats de marchandises', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8734,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6098','8727', 'Rabais, remises et ristournes non affectés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8735,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '61','8681', 'Services extérieurs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8736,'PCGAFR14-DEV','EXPENSE', 'SERVICE', '611','8735', 'Sous-traitance générale', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8737,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '612','8735', 'Redevances de crédit-bail', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8738,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6122','8737', 'Redevances de crédit-bail mobilier', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8739,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6125','8737', 'Redevances de crédit-bail immobilier', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8740,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '613','8735', 'Locations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8741,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6131','8740', 'Fermages et loyers du foncier', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8742,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6132','8740', 'Locations de matériel', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8743,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6134','8740', 'Locations d''animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8744,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6136','8740', 'Malis sur emballages', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8745,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6138','8740', 'Autres locations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8746,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '614','8735', 'Charges locatives et de copropriété', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8747,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6141','8746', 'Charges locatives du foncier', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8748,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6142','8746', 'Charges locatives du matériel', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8749,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6144','8746', 'Charges locatives des animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8750,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6148','8746', 'Autres charges locatives et de copropriété', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8751,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '615','8735', 'Entretien et réparations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8752,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6151','8751', 'Terrains', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8753,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6152','8751', 'Agencements et aménagements de terrains', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8754,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6153','8751', 'Constructions (sur sol propre)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8755,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6154','8751', 'Constructions (sur sol d''autrui)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8756,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6155','8751', 'Installations techniques, matériel et outillage', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8757,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '61551','6155', 'Matériel et outillage', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8758,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '61552','6155', 'Maintenance', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8759,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6156','8751', 'Plantations pérennes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8760,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6157','8751', 'Autres végétaux immobilisés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8761,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6158','8751', 'Autres immobilisations corporelles (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8762,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '616','8735', 'Primes d''assurances', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8763,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6161','8762', 'Multirisques', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8764,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6162','8762', 'Assurance obligatoire dommage construction', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8765,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6163','8762', 'Assurance - transport (sur achats)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8766,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6164','8762', 'Assurance - transport (sur ventes)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8767,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6165','8762', 'Assurance - transport (sur autres biens)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8768,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6166','8762', 'Risques d''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8769,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6167','8762', 'Insolvabilité clients', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8770,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6168','8762', 'Autres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8771,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '617','8735', 'Etudes et recherches', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8772,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '618','8735', 'Divers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8773,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6181','8772', 'Documentation générale', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8774,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6183','8772', 'Documentation technique', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8775,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6185','8772', 'Frais de colloques, séminaires, conférences', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8776,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '619','8735', 'Rabais, remises et ristournes obtenus sur services extérieurs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8777,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '62','8681', 'Autres services extérieurs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8778,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '621','8777', 'Personnel extérieur à l''entreprise', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8779,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6211','8778', 'Personnel intérimaire', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8780,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6214','8778', 'Personnel détaché ou prêté à l''entreprise', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8781,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '622','8777', 'Rémunérations d''intermédiaires et honoraires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8782,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6221','8781', 'Commissions et courtages sur achats', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8783,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6222','8781', 'Commissions et courtages sur ventes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8784,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6223','8781', 'Rémunérations des transitaires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8785,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6224','8781', 'Rémunérations d''affacturage', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8786,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6225','8781', 'Honoraires vétérinaires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8787,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6226','8781', 'Autres honoraires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8788,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6227','8781', 'Frais d''actes et de contentieux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8789,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6228','8781', 'Divers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8790,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '623','8777', 'Publicité, publications, relations publiques', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8791,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6231','8790', 'Annonces et insertions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8792,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6232','8790', 'Echantillons', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8793,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6233','8790', 'Emplacements foires et expositions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8794,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6234','8790', 'Cadeaux à la clientèle', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8795,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6235','8790', 'Primes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8796,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6236','8790', 'Catalogues et imprimés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8797,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6237','8790', 'Publications', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8798,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6238','8790', 'Divers (pourboire, dons courants, etc)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8799,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '624','8777', 'Transports de biens et transports collectifs du personnel', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8800,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6241','8799', 'Transports sur achats', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8801,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6242','8799', 'Transports sur ventes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8802,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6243','8799', 'Transports entre établissements ou chantiers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8803,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6244','8799', 'Transports administratifs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8804,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6247','8799', 'Transports collectifs du personnel', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8805,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6248','8799', 'Autres transports', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8806,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '625','8777', 'Déplacements, missions et réceptions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8807,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6251','8806', 'Voyages et déplacements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8808,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6255','8806', 'Frais de déménagement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8809,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6256','8806', 'Missions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8810,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6257','8806', 'Réceptions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8811,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '626','8777', 'Frais postaux et de télécommunications', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8812,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '627','8777', 'Services bancaires et assimilés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8813,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6271','8812', 'Frais sur titres (achat, vente, garde)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8814,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6272','8812', 'Commissions et frais sur émission d''emprunts', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8815,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6275','8812', 'Frais sur effets (commissions d''endos…)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8816,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6276','8812', 'Location de coffres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8817,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6278','8812', 'Autres frais et commissions sur prestations de services', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8818,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '628','8777', 'Divers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8819,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6281','8818', 'Cotisations professionnelles (productions animales)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8820,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6284','8818', 'Cotisations professionnelles (productions végétales)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8821,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6286','8818', 'Autres cotisations professionnelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8822,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6287','8818', 'Frais de recrutement de personnel', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8823,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6288','8818', 'Autres services extérieurs divers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8824,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '629','8777', 'Rabais, remises et ristournes obtenus sur autres services extérieurs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8825,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '63','8681', 'Impôts, taxes et versements assimilés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8826,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '631','8825', 'Impôts, taxes et versements assimilés sur rémunérations (administrations des impôts)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8827,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6311','8826', 'Taxe sur les salaires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8828,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6312','8826', 'Taxe d''apprentissage', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8829,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6313','8826', 'Participation des employeurs à la formation professionnelle continue', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8830,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6314','8826', 'Cotisation pour défaut d''investissement obligatoire dans la construction', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8831,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6318','8826', 'Autres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8832,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '633','8825', 'Impôts, taxes et versements assimilés sur rémunérations (autres organismes)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8833,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6331','8832', 'Versement de transport', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8834,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6332','8832', 'Allocations logement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8835,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6333','8832', 'Participation des employeurs à la formation professionnelle continue', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8836,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6334','8832', 'Participation des employeurs à l''effort de construction', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8837,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6335','8832', 'Versements libératoires ouvrant droit à l''exonération de la taxe d''apprentissage', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8838,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6338','8832', 'Autres', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8839,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '634','8825', 'Taxes spécifiques sur les produits de l''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8840,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6341','8839', 'Taxes spécifiques sur les produits végétaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8841,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6342','8839', 'Taxes spécifiques sur les produits animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8842,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6343','8839', 'Taxes spécifiques sur les produits transformés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8843,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6344','8839', 'Taxes spécifiques sur les animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8844,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6345','8839', 'Pénalités sur productions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8845,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6348','8839', 'Taxes spécifiques sur autres produits', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8846,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '635','8825', 'Autres impôts, taxes et versements assimilés (administrations des impôts)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8847,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6351','8846', 'Taxe professionnelle', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8848,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6352','8846', 'Taxes foncières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8849,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6353','8846', 'Autres impôts locaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8850,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6354','8846', 'Autres impôts directs (sauf impôts sur les sociétés)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8851,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6355','8846', 'Taxe sur le chiffre d''affaires non récupérables', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8852,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6356','8846', 'Impôts indirects', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8853,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6357','8846', 'Droits d''enregistrement et de timbre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8854,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6358','8846', 'Autres droits', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8855,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '637','8825', 'Autres impôts, taxes et versements assimilés (autres organismes)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8856,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6371','8855', 'Contribution sociale de solidarité à la charge des sociétés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8857,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6372','8855', 'Taxes perçues par les organismes publics internationaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8858,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6374','8855', 'Impôts et taxes exigibles à l''étranger', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8859,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6378','8855', 'Taxes diverses', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8860,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '64','8681', 'Charges de personnel', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8861,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '641','8860', 'Rémunérations du personnel', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8862,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6411','8861', 'Salaires (personnel salarié)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8863,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '64111','8862', 'Personnel permanent ou régulier', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8864,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '64115','8862', 'Personnel temporaire ou occasionnel', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8865,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6412','8861', 'Rémunérations (associés d''exploitation)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8866,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6413','8861', 'Rémunérations (administrateurs, gérants, associés)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8867,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6415','8861', 'Congés payés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8868,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6416','8861', 'Primes et gratifications', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8869,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6417','8861', 'Indemnités et avantages en espèces divers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8870,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6418','8861', 'Avantages en nature', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8871,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '644','8860', 'Rémunération du travail de l''exploitant', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8872,'PCGAFR14-DEV','EXPENSE', 'SOCIAL', '645','8860', 'Charges de sécurité sociale et de prévoyance', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8873,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6451','8872', 'Cotisations à la Mutualité Sociale Agricole', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8874,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6452','8872', 'Cotisations aux mutuelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8875,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6453','8872', 'Cotisations aux caisses de retraites', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8876,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6454','8872', 'Cotisations aux caisses de chômages', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8877,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6458','8872', 'Cotisations aux autres organismes sociaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8878,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '646','8860', 'Cotisations sociales personnelles de l''exploitant', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8879,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '647','8860', 'Autres charges sociales', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8880,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6472','8879', 'Versements aux comités d''entreprise et d''établissement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8881,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6474','8879', 'Versements aux autres œuvres sociales', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8882,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6475','8879', 'Médecine du travail, pharmacie', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8883,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6478','8879', 'Autres charges sociales diverses', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8884,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '648','8860', 'Autres charges de personnel', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8885,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '65','8681', 'Autres charges de gestion courante', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8886,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '651','8885', 'Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8887,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '653','8885', 'Jetons de présence', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8888,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '654','8885', 'Pertes sur créances irrécouvrables', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8889,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6541','8888', 'Créances de l''exercice', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8890,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6544','8888', 'Créances des exercices antérieurs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8891,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '655','8885', 'Quotes-parts de résultat sur opérations faites en commun', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8892,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6551','8891', 'Quote-part de bénéfice transférée (comptabilité du gérant)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8893,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6555','8891', 'Quote-part de perte supportée (comptabilité des associés non gérants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8894,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '656','8885', 'Valeurs comptables des éléments d''actif cédés (cessions courantes)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8895,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6561','8894', 'Animaux reproducteurs adultes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8896,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6562','8894', 'Animaux reproducteurs (jeunes de renouvellement)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8897,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '658','8885', 'Charges diverses de gestion courante', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8898,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '66','8681', 'Charges financières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8899,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '661','8898', 'Charges d''intérêts', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8900,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6611','8899', 'Intérêts des emprunts fonciers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8901,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6612','8899', 'Intérêts des autres emprunts à moyen et long terme', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8902,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6613','8899', 'Intérêts des emprunts à court terme', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8903,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6614','8899', 'Intérêts des crédits bancaires de campagne', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8904,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6615','8899', 'Intérêts des dettes rattachées à des participations à des organismes professionnels agricoles (autres que les établissements de crédit)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8905,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6616','8899', 'Intérêts des dettes rattachées à d''autres participations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8906,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6617','8899', 'Intérêts du crédit fournisseur', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8907,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6618','8899', 'Autres charges d''intérêt', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8908,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '66181','8907', 'Autres intérêts bancaires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8909,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '66182','8907', 'Intérêts des comptes courants et dépôts créditeurs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8910,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '66183','8907', 'Intérêts des obligations cautionnées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8911,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '66188','8907', 'Intérêts des autres dettes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8912,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '664','8898', 'Pertes sur créances liées à des participations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8913,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '665','8898', 'Escomptes accordés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8914,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '666','8898', 'Pertes de change', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8915,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '667','8898', 'Charges nettes sur cessions de valeurs mobilières de placement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8916,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '668','8898', 'Autres charges financières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8917,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '67','8681', 'Charges exceptionnelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8918,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '671','8917', 'Charges exceptionnelles sur opérations de gestion', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8919,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6711','8918', 'Pénalités sur marchés (et dédits payés sur achats et ventes)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8920,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6712','8918', 'Pénalités, amendes fiscales et pénales', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8921,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6713','8918', 'Dons, libéralités', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8922,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6714','8918', 'Créances devenues irrécouvrables dans l''exercice', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8923,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6715','8918', 'Subventions accordées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8924,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6717','8918', 'Rappel d''impôts (autres qu''impôts sur les bénéfices)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8925,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6718','8918', 'Autres charges exceptionnelles sur opérations de gestion', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8926,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '672','8917', 'Charges sur exercices antérieurs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8927,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '673','8917', 'Charges exeptionnelles relatives aux pénalités statutaires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8928,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6731','8927', 'Indemnités compensatrices', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8929,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6733','8927', 'Pénalités subies en tant qu''associé défaillant', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8930,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6735','8927', 'Frais de poursuite', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8931,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '675','8917', 'Valeurs comptables des éléments d''actif cédés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8932,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6751','8931', 'Immobilisations incorporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8933,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6752','8931', 'Immobilisations corporelles (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8934,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6754','8931', 'Immobilisations corporelles (biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8935,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6756','8931', 'Immobilisations financières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8936,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '678','8917', 'Autres charges exceptionnelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8937,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6781','8936', 'Malis provenant de clauses d''indexation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8938,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6782','8936', 'Lots', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8939,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6783','8936', 'Malis provenant du rachat par l''entreprise d''actions et obligations émises par elle-même', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8940,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6788','8936', 'Charges exceptionnelles diverses', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8941,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '68','8681', 'Dotations aux amortissements, aux dépréciations et aux provisions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8942,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '681','8941', 'Dotations aux amortissements, aux dépréciations et aux provisions - Charges d''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8943,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6811','8942', 'Dotations aux amortissements sur immobilisations incorporelles et corporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8944,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '68111','8943', 'Immobilisations incorporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8945,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '68112','8943', 'Immobilisations corporelles (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8946,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '68114','8943', 'Immobilisations corporelles (biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8947,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6812','8942', 'Dotations aux amortissements des charges d''exploitation à répartir', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8948,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6815','8942', 'Dotations aux provisions d''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8949,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6816','8942', 'Dotations pour dépréciations des immobilisations incorporelles et corporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8950,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '68161','8949', 'Immobilisations incorporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8951,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '68162','8949', 'Immobilisations corporelles (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8952,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '68164','8949', 'Immobilisations corporelles (biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8953,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6817','8942', 'Dotations pour dépréciations des actifs circulants', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8954,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '68173','8953', 'Stocks et en-cours', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8955,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '68174','8953', 'Créances', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8956,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '686','8941', 'Dotations aux amortissements, aux dépréciations et aux provisions - Charges financières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8957,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6861','8956', 'Dotations aux amortissements des primes de remboursement des obligations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8958,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6865','8956', 'Dotations aux provisions financières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8959,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6866','8956', 'Dotations pour dépréciations des éléments financiers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8960,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '68662','8959', 'Immobilisations financières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8961,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '68665','8959', 'Valeurs mobilières de placement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8962,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6868','8956', 'Autres dotations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8963,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '687','8941', 'Dotations aux amortissements, aux dépréciations et aux provisions - Charges exceptionnelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8964,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6871','8963', 'Dotations aux amortissements exceptionnels des immobilisations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8965,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6872','8963', 'Dotations aux provisions réglementées (immobilisations)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8966,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '68725','8965', 'Amortissements dérogatoires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8967,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6873','8963', 'Dotations aux provisions réglementées (stocks)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8968,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6874','8963', 'Dotations aux autres provisions réglementées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8969,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6875','8963', 'Dotations aux provisions exceptionnelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8970,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6876','8963', 'Dotations pour dépréciations exceptionnelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8971,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '69','8681', 'Participation des salariés - Impôts sur les bénéfices et assimilés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8972,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '691','8971', 'Participation des salariés aux résultats', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8973,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '695','8971', 'Impôts sur les bénéfices', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8974,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6951','8973', 'Impôts dus en France', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8975,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6954','8973', 'Impôts dus à l''étranger', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8976,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '697','8971', 'Imposition forfaitaire annuelle des sociétés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8977,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '698','8971', 'Intégration fiscale', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8978,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6981','8977', 'Intégration fiscale - Charges', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8979,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '6982','8977', 'Intégration fiscale - Produits', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8980,'PCGAFR14-DEV','EXPENSE', 'XXXXXX', '699','8971', 'Produits - Reports en arrière des déficits', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8981,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7', '0', 'Comptes de produits', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8982,'PCGAFR14-DEV','INCOME', 'XXXXXX', '70','8981', 'Ventes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8983,'PCGAFR14-DEV','INCOME', 'PRODUCT', '701','8982', 'Ventes de produits végétaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8984,'PCGAFR14-DEV','INCOME', 'XXXXXX', '702','8982', 'Ventes de produits animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8985,'PCGAFR14-DEV','INCOME', 'XXXXXX', '703','8982', 'Ventes de produits transformés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8986,'PCGAFR14-DEV','INCOME', 'XXXXXX', '704','8982', 'Ventes d''animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8987,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7041','8986', 'Animaux reproducteurs (adultes)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8988,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7042','8986', 'Animaux reproducteurs (jeunes de renouvellement)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8989,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7045','8986', 'Autres animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8990,'PCGAFR14-DEV','INCOME', 'XXXXXX', '705','8982', 'Ventes de produits résiduels', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8991,'PCGAFR14-DEV','INCOME', 'SERVICE', '706','8982', 'Travaux à façon', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8992,'PCGAFR14-DEV','INCOME', 'PRODUCT', '707','8982', 'Ventes de marchandises', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8993,'PCGAFR14-DEV','INCOME', 'XXXXXX', '708','8982', 'Produits des activités annexes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8994,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7081','8993', 'Produits des services exploités dans l''intérêt du personnel', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8995,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7082','8993', 'Commissions et courtages', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8996,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7083','8993', 'Locations diverses', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8997,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7084','8993', 'Prestations de services à caractère accessoire', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8998,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7085','8993', 'Ports et frais accessoires facturés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8999,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7086','8993', 'Bonis sur reprises d''emballages consignés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9000,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7087','8993', 'Bonifications obtenues des clients et primes sur ventes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9001,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7088','8993', 'Autres produits d''activités annexes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9002,'PCGAFR14-DEV','INCOME', 'XXXXXX', '709','8982', 'Rabais, remises et ristournes accordés par l''entreprise', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9003,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7091','9002', 'RRR sur ventes de produits végétaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9004,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7092','9002', 'RRR sur ventes de produits animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9005,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7093','9002', 'RRR sur ventes de produits transformés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9006,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7094','9002', 'RRR sur ventes d''animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9007,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7095','9002', 'RRR sur ventes de produits résiduels', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9008,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7096','9002', 'RRR sur travaux à façon', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9009,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7097','9002', 'RRR sur ventes de marchandises', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9010,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7098','9002', 'RRR sur produits des activités annexes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9011,'PCGAFR14-DEV','INCOME', 'XXXXXX', '71','8981', 'Variation d''inventaire (biens vivants, en-cours de production de biens et services, produits)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9012,'PCGAFR14-DEV','INCOME', 'XXXXXX', '712','9011', 'Variation d''inventaire : animaux reproducteurs immobilisés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9013,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7121','9012', 'Animaux reproducteurs (adultes)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9014,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7122','9012', 'Animaux reproducteurs (jeunes de renouvellement)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9015,'PCGAFR14-DEV','INCOME', 'XXXXXX', '713','9011', 'Variation d''inventaire : biens vivants non immobilisés, en-cours de production de biens et services, produits', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9016,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7131','9015', 'Animaux (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9017,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7132','9015', 'Animaux (cycle court)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9018,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7133','9015', 'Végétaux en terre (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9019,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7134','9015', 'Végétaux en terre (cycle court)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9020,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7135','9015', 'En-cours de production de biens et services (cycle long)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9021,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7136','9015', 'En-cours de production de biens et services (cycle court)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9022,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7137','9015', 'Produits', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9023,'PCGAFR14-DEV','INCOME', 'XXXXXX', '72','8981', 'Production immobilisée et autoconsommée', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9024,'PCGAFR14-DEV','INCOME', 'XXXXXX', '721','9023', 'Production immobilisée - Immobilisations incorporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9025,'PCGAFR14-DEV','INCOME', 'XXXXXX', '722','9023', 'Production immobilisée - Immobilisations corporelles (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9026,'PCGAFR14-DEV','INCOME', 'XXXXXX', '724','9023', 'Production immobilisée - Immobilisations corporelles (biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9027,'PCGAFR14-DEV','INCOME', 'XXXXXX', '726','9023', 'Production autoconsommée', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9028,'PCGAFR14-DEV','INCOME', 'XXXXXX', '74','8981', 'Indemnités et Subventions d''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9029,'PCGAFR14-DEV','INCOME', 'XXXXXX', '741','9028', 'Remboursement forfaitaire de TVA', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9030,'PCGAFR14-DEV','INCOME', 'XXXXXX', '742','9028', 'Indemnités d''assurance (exploitation)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9031,'PCGAFR14-DEV','INCOME', 'XXXXXX', '743','9028', 'Indemnités du Fond national de garantie des calamités agricoles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9032,'PCGAFR14-DEV','INCOME', 'XXXXXX', '744','9028', 'Autres indemnités d''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9033,'PCGAFR14-DEV','INCOME', 'XXXXXX', '745','9028', 'Subventions d''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9034,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7451','9033', 'Subventions aux produits végétaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9035,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7452','9033', 'Subventions aux structures (et jachères)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9036,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7453','9033', 'Subventions au revenu', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9037,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7454','9033', 'Subventions aux animaux', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9038,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7458','9033', 'Autres subventions d''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9039,'PCGAFR14-DEV','INCOME', 'XXXXXX', '75','8981', 'Autres produits de gestion courante', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9040,'PCGAFR14-DEV','INCOME', 'XXXXXX', '751','9039', 'Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9041,'PCGAFR14-DEV','INCOME', 'XXXXXX', '752','9039', 'Revenus des immeubles non affectés à des activités professionnelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9042,'PCGAFR14-DEV','INCOME', 'XXXXXX', '753','9039', 'Jetons de présence, rémunérations et indemnités d''administrateurs, etc', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9043,'PCGAFR14-DEV','INCOME', 'XXXXXX', '754','9039', 'Ristournes perçues des coopératives agricoles (provenant des excédents)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9044,'PCGAFR14-DEV','INCOME', 'XXXXXX', '755','9039', 'Quote-parts de résultat sur opérations faites en commun', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9045,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7551','9044', 'Quote-part de perte transférée (comptabilité du gérant)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9046,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7555','9044', 'Quote-part de bénéfice attribuée (comptabilité des associés non - gérants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9047,'PCGAFR14-DEV','INCOME', 'XXXXXX', '756','9039', 'Produits des cessions courantes d''éléments d''actif', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9048,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7561','9047', 'Animaux reproducteurs adultes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9049,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7562','9047', 'Animaux reproducteurs (jeunes de renouvellement)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9050,'PCGAFR14-DEV','INCOME', 'XXXXXX', '758','9039', 'Produits divers de gestion courante', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9051,'PCGAFR14-DEV','INCOME', 'XXXXXX', '76','8981', 'Produits financiers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9052,'PCGAFR14-DEV','INCOME', 'XXXXXX', '761','9051', 'Produits de participations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9053,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7611','9052', 'Revenus des titres de participation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9054,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7612','9052', 'Revenus des participations à des organismes professionnels agricoles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9055,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7616','9052', 'Revenus sur autres formes de participation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9056,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7617','9052', 'Revenus des créances rattachées à des participations', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9057,'PCGAFR14-DEV','INCOME', 'XXXXXX', '762','9051', 'Produits des autres immobilisations financières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9058,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7621','9057', 'Revenus des titres immobilisés', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9059,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7626','9057', 'Revenus des prêts', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9060,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7627','9057', 'Revenus des créances immobilisées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9061,'PCGAFR14-DEV','INCOME', 'XXXXXX', '763','9051', 'Revenus des autres créances', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9062,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7631','9061', 'Revenus des créances commerciales', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9063,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7638','9061', 'Revenus des créances diverses', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9064,'PCGAFR14-DEV','INCOME', 'XXXXXX', '764','9051', 'Revenus des valeurs mobilières de placement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9065,'PCGAFR14-DEV','INCOME', 'XXXXXX', '765','9051', 'Escomptes obtenus', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9066,'PCGAFR14-DEV','INCOME', 'XXXXXX', '766','9051', 'Gains de change', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9067,'PCGAFR14-DEV','INCOME', 'XXXXXX', '767','9051', 'Produits nets sur cessions de valeurs mobilières de placement', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9068,'PCGAFR14-DEV','INCOME', 'XXXXXX', '768','9051', 'Autres produits financiers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9069,'PCGAFR14-DEV','INCOME', 'XXXXXX', '77','8981', 'Produits exceptionnels', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9070,'PCGAFR14-DEV','INCOME', 'XXXXXX', '771','9069', 'Produits exceptionnels sur opérations de gestion', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9071,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7711','9070', 'Dédits et pénalités perçus sur achats et sur ventes', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9072,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7713','9070', 'Libéralités reçues', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9073,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7714','9070', 'Rentrées sur créances amorties', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9074,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7715','9070', 'Subventions d''équilibre', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9075,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7717','9070', 'Dégrèvements d''impôts (autres qu''impôts sur les bénéfices)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9076,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7718','9070', 'Autres produits exceptionnels sur opérations de gestion', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9077,'PCGAFR14-DEV','INCOME', 'XXXXXX', '772','9069', 'Produits sur exercices antérieurs', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9078,'PCGAFR14-DEV','INCOME', 'XXXXXX', '775','9069', 'Produits des cessions d''éléments d''actif', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9079,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7751','9078', 'Immobilisations incorporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9080,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7752','9078', 'Immobilisations corporelles (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9081,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7754','9078', 'Immobilisations corporelles (biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9082,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7756','9078', 'Immobilisations financières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9083,'PCGAFR14-DEV','INCOME', 'XXXXXX', '777','9069', 'Quote-part des subventions d''investissement virée au résultat de l''exercice', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9084,'PCGAFR14-DEV','INCOME', 'XXXXXX', '778','9069', 'Autres produits exceptionnels', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9085,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7781','9084', 'Bonis provenant de clauses d''indexation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9086,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7782','9084', 'Lots', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9087,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7783','9084', 'Bonis provenant du rachat par l''entreprise de titres émis par elle - même', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9088,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7788','9084', 'Produits exceptionnels divers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9089,'PCGAFR14-DEV','INCOME', 'XXXXXX', '78','8981', 'Reprises sur amortissements, dépréciations et provisions', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9090,'PCGAFR14-DEV','INCOME', 'XXXXXX', '781','9089', 'Reprises sur amortissements, dépréciations et provisions (à inscrire dans les produits d''exploitation)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9091,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7811','9090', 'Reprises sur amortissements des immobilisations incorporelles et corporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9092,'PCGAFR14-DEV','INCOME', 'XXXXXX', '78111','9091', 'Immobilisations incorporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9093,'PCGAFR14-DEV','INCOME', 'XXXXXX', '78112','9091', 'Immobilisations corporelles (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9094,'PCGAFR14-DEV','INCOME', 'XXXXXX', '78114','9091', 'Immobilisations corporelles (biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9095,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7815','9090', 'Reprises sur provisions d''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9096,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7816','9090', 'Reprises sur dépréciations des immobilisations incorporelles et corporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9097,'PCGAFR14-DEV','INCOME', 'XXXXXX', '78161','9096', 'Immobilisations incorporelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9098,'PCGAFR14-DEV','INCOME', 'XXXXXX', '78162','9096', 'Immobilisations corporelles (hors biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9099,'PCGAFR14-DEV','INCOME', 'XXXXXX', '78164','9096', 'Immobilisations corporelles (biens vivants)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9100,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7817','9090', 'Reprises sur dépréciations des actifs circulants', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9101,'PCGAFR14-DEV','INCOME', 'XXXXXX', '78173','9100', 'Stocks et en-cours', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9102,'PCGAFR14-DEV','INCOME', 'XXXXXX', '78174','9100', 'Créances', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9103,'PCGAFR14-DEV','INCOME', 'XXXXXX', '786','9089', 'Reprises sur dépréciations et sur provisions (à inscrire dans les produits financiers)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9104,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7865','9103', 'Reprises sur provisions financières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9105,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7866','9103', 'Reprises sur dépréciations des éléments financiers', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9106,'PCGAFR14-DEV','INCOME', 'XXXXXX', '78662','9105', 'Immobilisations financières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9107,'PCGAFR14-DEV','INCOME', 'XXXXXX', '78665','9105', 'Valeurs mobilières de placements', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9108,'PCGAFR14-DEV','INCOME', 'XXXXXX', '787','9089', 'Reprises sur dépréciations et sur provisions (à inscrire dans les produits exceptionnels)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9109,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7872','9108', 'Reprises sur provisions réglementées (immobilisations)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9110,'PCGAFR14-DEV','INCOME', 'XXXXXX', '78725','9109', 'Amortissements dérogatoires', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9111,'PCGAFR14-DEV','INCOME', 'XXXXXX', '78726','9109', 'Provision spéciale de réévaluation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9112,'PCGAFR14-DEV','INCOME', 'XXXXXX', '78727','9109', 'Plus-values réinvesties', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9113,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7873','9108', 'Reprises sur provisions réglementées (stocks)', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9114,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7874','9108', 'Reprises sur autres provisions réglementées', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9115,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7875','9108', 'Reprises sur provisions exceptionnelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9116,'PCGAFR14-DEV','INCOME', 'XXXXXX', '7876','9108', 'Reprises sur dépréciations exceptionnelles', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9117,'PCGAFR14-DEV','INCOME', 'XXXXXX', '79','8981', 'Transferts de charges', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9118,'PCGAFR14-DEV','INCOME', 'XXXXXX', '791','9117', 'Transferts de charges d''exploitation', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9119,'PCGAFR14-DEV','INCOME', 'XXXXXX', '796','9117', 'Transferts de charges financières', 1);
+INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 9120,'PCGAFR14-DEV','INCOME', 'XXXXXX', '797','9117', 'Transferts de charges exceptionnelles', 1);
\ No newline at end of file
diff --git a/htdocs/install/mysql/data/llx_c_ticket_resolution.sql b/htdocs/install/mysql/data/llx_c_ticket_resolution.sql
new file mode 100644
index 00000000000..2fa139b602d
--- /dev/null
+++ b/htdocs/install/mysql/data/llx_c_ticket_resolution.sql
@@ -0,0 +1,22 @@
+-- Copyright (C) 2018 Laurent Destailleur
+--
+-- 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 .
+--
+--
+-- Contenu de la table llx_c_ticket_resolution
+--
+
+INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('SOLVED', '10', 'Solved', 1, 0, NULL);
+INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('CANCELED', '50', 'Canceled', 1, 0, NULL);
+INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('OTHER', '90', 'Other', 1, 0, NULL);
diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql
index 91b068a3fea..246baaadc04 100644
--- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql
+++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql
@@ -44,6 +44,14 @@ ALTER TABLE llx_commande_fournisseur_dispatch_extrafields ADD INDEX idx_commande
-- For v12
+ALTER TABLE llx_holiday_users DROP INDEX uk_holiday_users;
+ALTER TABLE llx_holiday_users ADD UNIQUE INDEX uk_holiday_users(fk_user, fk_type);
+
+ALTER TABLE llx_ticket ADD COLUMN import_key varchar(14);
+
+--ALTER TABLE llx_facturerec DROP COLUMN vat_src_code;
+
+
-- Migration to the new regions (France)
UPDATE llx_c_regions set nom = 'Centre-Val de Loire' WHERE fk_pays = 1 AND code_region = 24;
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (1, 27, '21231', 0, 'Bourgogne-Franche-Comté');
@@ -129,4 +137,29 @@ UPDATE llx_c_forme_juridique set libelle = 'SRL - Société à responsabilité l
ALTER TABLE llx_c_country ADD COLUMN eec integer;
UPDATE llx_c_country SET eec = 1 WHERE code IN ('AT','BE','BG','CY','CZ','DE','DK','EE','ES','FI','FR','GB','GR','HR','NL','HU','IE','IM','IT','LT','LU','LV','MC','MT','PL','PT','RO','SE','SK','SI','UK');
-INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG18-ASSOC', 'French foundation chart of accounts 2018', 1);
\ No newline at end of file
+INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG18-ASSOC', 'French foundation chart of accounts 2018', 1);
+
+INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCGAFR14-DEV', 'The developed farm accountancy french plan 2014', 1);
+
+INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 41, 'AT-BASE', 'Plan Austria', 1);
+
+
+
+create table llx_c_ticket_resolution
+(
+ rowid integer AUTO_INCREMENT PRIMARY KEY,
+ entity integer DEFAULT 1,
+ code varchar(32) NOT NULL,
+ pos varchar(32) NOT NULL,
+ label varchar(128) NOT NULL,
+ active integer DEFAULT 1,
+ use_default integer DEFAULT 1,
+ description varchar(255)
+)ENGINE=innodb;
+
+ALTER TABLE llx_c_ticket_resolution ADD UNIQUE INDEX uk_code (code, entity);
+
+INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('SOLVED', '10', 'Solved', 1, 0, NULL);
+INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('CANCELED', '50', 'Canceled', 1, 0, NULL);
+INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('OTHER', '90', 'Other', 1, 0, NULL);
+
diff --git a/htdocs/install/mysql/tables/llx_c_ticket_resolution.key.sql b/htdocs/install/mysql/tables/llx_c_ticket_resolution.key.sql
new file mode 100644
index 00000000000..ac3690b70bb
--- /dev/null
+++ b/htdocs/install/mysql/tables/llx_c_ticket_resolution.key.sql
@@ -0,0 +1,18 @@
+-- Copyright (C) 2020 Laurent Destailleur
+--
+-- 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 2 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 .
+--
+--
+
+ALTER TABLE llx_c_ticket_resolution ADD UNIQUE INDEX uk_code (code, entity);
diff --git a/htdocs/install/mysql/tables/llx_c_ticket_resolution.sql b/htdocs/install/mysql/tables/llx_c_ticket_resolution.sql
new file mode 100644
index 00000000000..2f6d0d1d3da
--- /dev/null
+++ b/htdocs/install/mysql/tables/llx_c_ticket_resolution.sql
@@ -0,0 +1,28 @@
+-- Copyright (C) 2020 Laurent Destailleur
+--
+-- 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 2 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 .
+--
+--
+
+create table llx_c_ticket_resolution
+(
+ rowid integer AUTO_INCREMENT PRIMARY KEY,
+ entity integer DEFAULT 1,
+ code varchar(32) NOT NULL,
+ pos varchar(32) NOT NULL,
+ label varchar(128) NOT NULL,
+ active integer DEFAULT 1,
+ use_default integer DEFAULT 1,
+ description varchar(255)
+)ENGINE=innodb;
diff --git a/htdocs/install/mysql/tables/llx_const.sql b/htdocs/install/mysql/tables/llx_const.sql
index 059025b49a4..fcca5f57023 100644
--- a/htdocs/install/mysql/tables/llx_const.sql
+++ b/htdocs/install/mysql/tables/llx_const.sql
@@ -29,7 +29,7 @@ create table llx_const
name varchar(180) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
value text NOT NULL, -- max 65535 caracteres
- type varchar(64) DEFAULT 'string',
+ type varchar(64) DEFAULT 'string', -- null or 'encrypted' if param has been encrypted
visible tinyint DEFAULT 1 NOT NULL,
note text,
tms timestamp
diff --git a/htdocs/install/mysql/tables/llx_contrat.sql b/htdocs/install/mysql/tables/llx_contrat.sql
index d3f84a8bb6c..fbb36a5674b 100644
--- a/htdocs/install/mysql/tables/llx_contrat.sql
+++ b/htdocs/install/mysql/tables/llx_contrat.sql
@@ -30,7 +30,6 @@ create table llx_contrat
datec datetime, -- creation date
date_contrat datetime,
statut smallint DEFAULT 0, -- not used. deprecated
- mise_en_service datetime,
fin_validite datetime,
date_cloture datetime,
fk_soc integer NOT NULL,
@@ -39,7 +38,6 @@ create table llx_contrat
fk_commercial_suivi integer, -- obsolete
fk_user_author integer NOT NULL default 0,
fk_user_modif integer,
- fk_user_mise_en_service integer,
fk_user_cloture integer,
note_private text,
note_public text,
diff --git a/htdocs/install/mysql/tables/llx_holiday_users.key.sql b/htdocs/install/mysql/tables/llx_holiday_users.key.sql
index 0a055b6006a..8ac7919e658 100644
--- a/htdocs/install/mysql/tables/llx_holiday_users.key.sql
+++ b/htdocs/install/mysql/tables/llx_holiday_users.key.sql
@@ -1,5 +1,5 @@
-- ===================================================================
--- Copyright (C) 2017 Laurent Destailleur
+-- Copyright (C) 2017-2020 Laurent Destailleur
--
-- 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
@@ -16,4 +16,4 @@
--
-- ===================================================================
-ALTER TABLE llx_holiday_users ADD UNIQUE INDEX uk_holiday_users(fk_user, fk_type, nb_holiday);
+ALTER TABLE llx_holiday_users ADD UNIQUE INDEX uk_holiday_users(fk_user, fk_type);
diff --git a/htdocs/install/mysql/tables/llx_holiday_users.sql b/htdocs/install/mysql/tables/llx_holiday_users.sql
index 1d3bcbc9361..3f9a7e61d0a 100644
--- a/htdocs/install/mysql/tables/llx_holiday_users.sql
+++ b/htdocs/install/mysql/tables/llx_holiday_users.sql
@@ -1,5 +1,5 @@
-- ===================================================================
--- Copyright (C) 2012-2015 Laurent Destailleur
+-- Copyright (C) 2012-2020 Laurent Destailleur
--
-- 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
@@ -14,6 +14,7 @@
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see .
--
+-- Table with remain quantity of holiday for each type of leave.
-- ===================================================================
CREATE TABLE llx_holiday_users
diff --git a/htdocs/install/mysql/tables/llx_ticket.sql b/htdocs/install/mysql/tables/llx_ticket.sql
index 3f3cdf58cd9..82e692a7f0d 100644
--- a/htdocs/install/mysql/tables/llx_ticket.sql
+++ b/htdocs/install/mysql/tables/llx_ticket.sql
@@ -38,5 +38,6 @@ CREATE TABLE llx_ticket
date_read datetime,
date_close datetime,
notify_tiers_at_create tinyint,
- tms timestamp
+ tms timestamp,
+ import_key varchar(14)
)ENGINE=innodb;
diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index c5d1d7837e9..b3ff583042d 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -983,7 +983,7 @@ function migrate_contracts_det($db, $langs, $conf)
print ' ';
print ''.$langs->trans('MigrationContractsUpdate')." \n";
- $sql = "SELECT c.rowid as cref, c.date_contrat, c.statut, c.mise_en_service, c.fin_validite, c.date_cloture, c.fk_product, c.fk_facture, c.fk_user_author,";
+ $sql = "SELECT c.rowid as cref, c.date_contrat, c.statut, c.fk_product, c.fk_facture, c.fk_user_author,";
$sql .= " p.ref, p.label, p.description, p.price, p.tva_tx, p.duration, cd.rowid";
$sql .= " FROM ".MAIN_DB_PREFIX."contrat as c";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p";
@@ -1014,15 +1014,15 @@ function migrate_contracts_det($db, $langs, $conf)
$sql .= "date_ouverture_prevue, date_ouverture, date_fin_validite, tva_tx, qty,";
$sql .= "subprice, price_ht, fk_user_author, fk_user_ouverture)";
$sql .= " VALUES (";
- $sql .= $obj->cref.",".($obj->fk_product ? $obj->fk_product : 0).",";
- $sql .= ($obj->mise_en_service ? "4" : "0").",";
- $sql .= "'".$db->escape($obj->label)."', null,";
- $sql .= ($obj->mise_en_service ? "'".$obj->mise_en_service."'" : ($obj->date_contrat ? "'".$obj->date_contrat."'" : "null")).",";
- $sql .= ($obj->mise_en_service ? "'".$obj->mise_en_service."'" : "null").",";
- $sql .= ($obj->fin_validite ? "'".$obj->fin_validite."'" : "null").",";
- $sql .= "'".$obj->tva_tx."', 1,";
- $sql .= "'".$obj->price."', '".$obj->price."',".$obj->fk_user_author.",";
- $sql .= ($obj->mise_en_service ? $obj->fk_user_author : "null");
+ $sql .= $obj->cref.", ".($obj->fk_product ? $obj->fk_product : 0).", ";
+ $sql .= "0, ";
+ $sql .= "'".$db->escape($obj->label)."', null, ";
+ $sql .= ($obj->date_contrat ? "'".$obj->date_contrat."'" : "null").", ";
+ $sql .= "null, ";
+ $sql .= "null, ";
+ $sql .= "'".$obj->tva_tx."' , 1, ";
+ $sql .= "'".$obj->price."', '".$obj->price."', ".$obj->fk_user_author.",";
+ $sql .= "null";
$sql .= ")";
if ($db->query($sql))
diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang
index c8302b9617e..17d7f9fa1f6 100644
--- a/htdocs/langs/en_US/accountancy.lang
+++ b/htdocs/langs/en_US/accountancy.lang
@@ -228,6 +228,8 @@ ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Third-party unkno
ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Third-party account not defined or third party unknown. Blocking error.
UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Unknown third-party account and waiting account not defined. Blocking error
PaymentsNotLinkedToProduct=Payment not linked to any product / service
+ShowOpeningBalance=Show opening balance
+HideOpeningBalance=Hide opening balance
Pcgtype=Group of account
Pcgsubtype=Subgroup of account
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 7d2d622887e..695be00a14e 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1021,7 +1021,7 @@ CalcLocaltax3Desc=Local Taxes reports are the total of localtaxes sales
LabelUsedByDefault=Label used by default if no translation can be found for code
LabelOnDocuments=Label on documents
LabelOrTranslationKey=Label or translation key
-ValueOfConstantKey=Value of constant
+ValueOfConstantKey=Value of a configuration constant
NbOfDays=No. of days
AtEndOfMonth=At end of month
CurrentNext=Current/Next
@@ -1794,6 +1794,7 @@ BackgroundTableLineEvenColor=Background color for even table lines
MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay)
NbAddedAutomatically=Number of days added to counters of users (automatically) each month
EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters.
+Enter0or1=Enter 0 or 1
UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364]
ColorFormat=The RGB color is in HEX format, eg: FF0000
PositionIntoComboList=Position of line into combo lists
@@ -1974,4 +1975,5 @@ NotAPublicIp=Not a public IP
MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server (done 1 time only after installation) to allow the foundation to count the number of Dolibarr installation.
FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled
EmailTemplate=Template for email
-EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax
\ No newline at end of file
+EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax
+PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some text title in your PDF duplicated in 2 different languages in the same generate PDF, you must set here this second language so generated PDF will contains 2 different languages in same page, the one chosen when generating PDF and this one (only few PDF templates support this). Keep empty for 1 language per PDF.
\ No newline at end of file
diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang
index c160b4ae1d2..e54239e9fb2 100644
--- a/htdocs/langs/en_US/banks.lang
+++ b/htdocs/langs/en_US/banks.lang
@@ -95,7 +95,7 @@ AddBankRecordLong=Add entry manually
Conciliated=Reconciled
ConciliatedBy=Reconciled by
DateConciliating=Reconcile date
-BankLineConciliated=Entry reconciled
+BankLineConciliated=Entry reconciled with bank receipt
Reconciled=Reconciled
NotReconciled=Not reconciled
CustomerInvoicePayment=Customer payment
diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang
index 66391b4f07d..6d7c61784f7 100644
--- a/htdocs/langs/en_US/bills.lang
+++ b/htdocs/langs/en_US/bills.lang
@@ -419,6 +419,7 @@ PaymentCondition14DENDMONTH=Within 14 days following the end of the month
FixAmount=Fixed amount - 1 line with label '%s'
VarAmount=Variable amount (%% tot.)
VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s'
+VarAmountAllLines=Variable amount (%% tot.) - all same lines
# PaymentType
PaymentTypeVIR=Bank transfer
PaymentTypeShortVIR=Bank transfer
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index 4edca737c66..525131b2a61 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -227,6 +227,7 @@ ErrorNoFieldWithAttributeShowoncombobox=No fields has property 'showoncombobox'
ErrorFieldRequiredForProduct=Field '%s' is required for product %s
ProblemIsInSetupOfTerminal=Problem is in setup of terminal %s.
ErrorAddAtLeastOneLineFirst=Add at least one line first
+ErrorRecordAlreadyInAccountingDeletionNotPossible=Error, record is already transferred in accounting, deletion is not possible.
# Warnings
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.
diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang
index 11c6915a25c..9a756ba3a79 100644
--- a/htdocs/langs/en_US/mrp.lang
+++ b/htdocs/langs/en_US/mrp.lang
@@ -1,6 +1,6 @@
Mrp=Manufacturing Orders
MO=Manufacturing Order
-MRPDescription=Module to manage Manufacturing Orders (MO).
+MRPDescription=Module to manage production and Manufacturing Orders (MO).
MRPArea=MRP Area
MrpSetupPage=Setup of module MRP
MenuBOM=Bills of material
@@ -66,3 +66,6 @@ AutoCloseMO=Close automatically the Manufacturing Order if quantities to consume
NoStockChangeOnServices=No stock change on services
ProductQtyToConsumeByMO=Product quantity still to consume by open MO
ProductQtyToProduceByMO=Product quentity still to produce by open MO
+AddNewConsumeLines=Add new line to consume
+ProductsToConsume=Products to consume
+ProductsToProduce=Products to produce
\ No newline at end of file
diff --git a/htdocs/langs/en_US/oauth.lang b/htdocs/langs/en_US/oauth.lang
index ce02c4e23d8..d52422a194a 100644
--- a/htdocs/langs/en_US/oauth.lang
+++ b/htdocs/langs/en_US/oauth.lang
@@ -28,3 +28,5 @@ OAUTH_GITHUB_NAME=OAuth GitHub service
OAUTH_GITHUB_ID=OAuth GitHub Id
OAUTH_GITHUB_SECRET=OAuth GitHub Secret
OAUTH_GITHUB_DESC=Go to this page then "Register a new application" to create OAuth credentials
+OAUTH_STRIPE_TEST_NAME=OAuth Stripe Test
+OAUTH_STRIPE_LIVE_NAME=OAuth Stripe Live
\ No newline at end of file
diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang
index 46424590f31..59950289236 100644
--- a/htdocs/langs/en_US/other.lang
+++ b/htdocs/langs/en_US/other.lang
@@ -30,6 +30,10 @@ PreviousYearOfInvoice=Previous year of invoice date
NextYearOfInvoice=Following year of invoice date
DateNextInvoiceBeforeGen=Date of next invoice (before generation)
DateNextInvoiceAfterGen=Date of next invoice (after generation)
+GraphInBarsAreLimitedTo3Measures=Grapics are limited to 3 measures in 'Bars' mode. The mode 'Lines' was automatically selected instead.
+OnlyOneFieldForXAxisIsPossible=Only 1 field is currently possible as X-Axis. Only the first selected field has been selected.
+AtLeastOneMeasureIsRequired=At least 1 field for measure is required
+AtLeastOneXAxisIsRequired=At least 1 field for X-Axis is required
Notify_ORDER_VALIDATE=Sales order validated
Notify_ORDER_SENTBYMAIL=Sales order sent by mail
diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index b9293b6187c..9b96d5bef54 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -331,6 +331,10 @@ PossibleValues=Possible values
GoOnMenuToCreateVairants=Go on menu %s - %s to prepare attribute variants (like colors, size, ...)
UseProductFournDesc=Add a feature to define the descriptions of products defined by the vendors in addition to descriptions for customers
ProductSupplierDescription=Vendor description for the product
+UseProductSupplierPackaging=Use packaging on supplier prices (recalculate quantities according to packaging set on supplier price when adding/updating line in supplier documents)
+PackagingForThisProduct=Packaging
+QtyRecalculatedWithPackaging=The quantity of the line were recalculated according to supplier packaging
+
#Attributes
VariantAttributes=Variant attributes
ProductAttributes=Variant attributes for products
diff --git a/htdocs/langs/en_US/receiptprinter.lang b/htdocs/langs/en_US/receiptprinter.lang
index 5714ba78151..3df49b9fe67 100644
--- a/htdocs/langs/en_US/receiptprinter.lang
+++ b/htdocs/langs/en_US/receiptprinter.lang
@@ -45,3 +45,19 @@ DOL_ACTIVATE_BUZZER=Activate buzzer
DOL_PRINT_QRCODE=Print QR Code
DOL_PRINT_LOGO=Print logo of my company
DOL_PRINT_LOGO_OLD=Print logo of my company (old printers)
+DOL_BOLD=Bold
+DOL_BOLD_DISABLED=Disable bold
+DOL_DOUBLE_HEIGHT=Double height size
+DOL_DOUBLE_WIDTH=Double width size
+DOL_DEFAULT_HEIGHT_WIDTH=Default height and width size
+DOL_UNDERLINE=Enable underline
+DOL_UNDERLINE_DISABLED=Disable underline
+DOL_BEEP=Beed sound
+DOL_PRINT_TEXT=Print text
+DOL_VALUE_DATE=Invoice date
+DOL_VALUE_DATE_TIME=Invoice date and time
+DOL_VALUE_YEAR=Invoice year
+DOL_VALUE_MONTH_LETTERS=Invoice month in letters
+DOL_VALUE_MONTH=Invoice month
+DOL_VALUE_DAY=Invoice day
+DOL_VALUE_DAY_LETTERS=Inovice day in letters
diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang
index f29c2f4a5ba..46b41c2f958 100644
--- a/htdocs/langs/en_US/ticket.lang
+++ b/htdocs/langs/en_US/ticket.lang
@@ -30,6 +30,7 @@ Permission56005=See tickets of all third parties (not effective for external use
TicketDictType=Ticket - Types
TicketDictCategory=Ticket - Groupes
TicketDictSeverity=Ticket - Severities
+TicketDictResolution=Ticket - Resolution
TicketTypeShortBUGSOFT=Dysfonctionnement logiciel
TicketTypeShortBUGHARD=Dysfonctionnement matériel
TicketTypeShortCOM=Commercial question
@@ -253,7 +254,7 @@ TicketPublicDesc=You can create a support ticket or check from an existing ID.
YourTicketSuccessfullySaved=Ticket has been successfully saved!
MesgInfosPublicTicketCreatedWithTrackId=A new ticket has been created with ID %s and Ref %s.
PleaseRememberThisId=Please keep the tracking number that we might ask you later.
-TicketNewEmailSubject=Ticket creation confirmation - Ref %s
+TicketNewEmailSubject=Ticket creation confirmation - Ref %s (public ticket ID %s)
TicketNewEmailSubjectCustomer=New support ticket
TicketNewEmailBody=This is an automatic email to confirm you have registered a new ticket.
TicketNewEmailBodyCustomer=This is an automatic email to confirm a new ticket has just been created into your account.
@@ -272,7 +273,7 @@ Subject=Subject
ViewTicket=View ticket
ViewMyTicketList=View my ticket list
ErrorEmailMustExistToCreateTicket=Error: email address not found in our database
-TicketNewEmailSubjectAdmin=New ticket created - Ref %s
+TicketNewEmailSubjectAdmin=New ticket created - Ref %s (public ticket ID %s)
TicketNewEmailBodyAdmin=Ticket has just been created with ID #%s, see information:
SeeThisTicketIntomanagementInterface=See ticket in management interface
TicketPublicInterfaceForbidden=The public interface for the tickets was not enabled
diff --git a/htdocs/langs/es_ES/zapier.lang b/htdocs/langs/es_ES/zapier.lang
new file mode 100644
index 00000000000..6b28c81832e
--- /dev/null
+++ b/htdocs/langs/es_ES/zapier.lang
@@ -0,0 +1,28 @@
+# Copyright (C) 2019 Frédéric FRANCE
+#
+# 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 .
+
+#
+# Generic
+#
+
+# Module label 'ModuleZapierForDolibarrName'
+ModuleZapierForDolibarrName = Zapier para Dolibarr
+# Module description 'ModuleZapierForDolibarrDesc'
+ModuleZapierForDolibarrDesc = Zapier para el módulo Dolibarr
+
+#
+# Admin page
+#
+ZapierForDolibarrSetup = Configuración de Zapier para Dolibarr
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 89a9be45633..815674a5b76 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -553,7 +553,7 @@ if (!defined('NOLOGIN'))
// Validation of login/pass/entity
// If ok, the variable login will be returned
// If error, we will put error message in session under the name dol_loginmesg
- if ($test && $goontestloop && GETPOST('actionlogin', 'aZ09') == 'login')
+ if ($test && $goontestloop && (GETPOST('actionlogin', 'aZ09') == 'login' || $dolibarr_main_authentication != 'dolibarr'))
{
$login = checkLoginPassEntity($usertotest, $passwordtotest, $entitytotest, $authmode);
if ($login)
@@ -565,6 +565,7 @@ if (!defined('NOLOGIN'))
$dol_tz_string = preg_replace('/,/', '/', $dol_tz_string);
$dol_tz_string = preg_replace('/\s/', '_', $dol_tz_string);
$dol_dst = 0;
+ // Keep $_POST here. Do not use GETPOSTISSET
if (isset($_POST["dst_first"]) && isset($_POST["dst_second"]))
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
@@ -1391,9 +1392,20 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
}
else
{
- print ''."\n";
- print ''."\n";
- print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ /* Test for jflot 4.2 -> not better than current
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ print ''."\n";
+ */
}
}
// jQuery jeditable
@@ -1703,11 +1715,6 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
if ($helpbaseurl && $helppage)
{
$text = '';
- if (!empty($conf->global->MAIN_SHOWDATABASENAMEINHELPPAGESLINK)) {
- $langs->load('admin');
- $appli .= ' '.$langs->trans("Database").': '.$db->database_name;
- }
- $title = $appli.' ';
$title .= $langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage' : 'GoToHelpPage');
if ($mode == 'wiki') $title .= ' - '.$langs->trans("PageWiki").' "'.dol_escape_htmltag(strtr($helppage, '_', ' ')).'"';
$text .= 'database_name;
+ }
+ $text = ' '.DOL_VERSION.' ';
+ $toprightmenu .= @Form::textwithtooltip('', $appli, 2, 1, $text, 'login_block_elem', 2);
}
diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php
index 41150e913d5..66446e21ddc 100644
--- a/htdocs/master.inc.php
+++ b/htdocs/master.inc.php
@@ -170,7 +170,7 @@ elseif (!empty($_ENV["dol_entity"])) // Entity inside a CLI script
{
$conf->entity = $_ENV["dol_entity"];
}
-elseif (isset($_POST["loginfunction"]) && GETPOST("entity", 'int')) // Just after a login page
+elseif (GETPOSTISSET("loginfunction") && GETPOST("entity", 'int')) // Just after a login page
{
$conf->entity = GETPOST("entity", 'int');
}
diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index bbc4e08df23..531d8d224d9 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -659,6 +659,7 @@ if ($dirins && $action == 'confirm_removefile' && !empty($module))
}
}
+// Build the $fields array from SQL table (initfromtablename)
if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', 'alpha'))
{
$tablename = GETPOST('initfromtablename', 'alpha');
@@ -757,6 +758,7 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray',
// position
$position = $i;
if (in_array($fieldname, array('status', 'statut', 'fk_status', 'fk_statut'))) $position = 500;
+ if ($fieldname == 'import_key') $position = 900;
// index
$index = 0;
if ($fieldname == 'entity') $index = 1;
diff --git a/htdocs/modulebuilder/template/class/actions_mymodule.class.php b/htdocs/modulebuilder/template/class/actions_mymodule.class.php
index 743c46bfc39..45548c28312 100644
--- a/htdocs/modulebuilder/template/class/actions_mymodule.class.php
+++ b/htdocs/modulebuilder/template/class/actions_mymodule.class.php
@@ -238,5 +238,46 @@ class ActionsMyModule
return $ret;
}
+
+
+ /**
+ * Overloading the loadDataForCustomReports function : returns data to complete the customreport tool
+ *
+ * @param array $parameters Hook metadatas (context, etc...)
+ * @param string $action Current action (if set). Generally create or edit or null
+ * @param HookManager $hookmanager Hook manager propagated to allow calling another hook
+ * @return int < 0 on error, 0 on success, 1 to replace standard code
+ */
+ public function loadDataForCustomReports($parameters, &$action, $hookmanager)
+ {
+ global $conf, $user, $langs;
+
+ $langs->load("mymodule@mymodule");
+
+ $this->results = array();
+
+ $head = array();
+ $h = 0;
+
+ if ($parameters['tabfamily'] == 'mymodule') {
+ $head[$h][0] = dol_buildpath('/module/index.php', 1);
+ $head[$h][1] = $langs->trans("Home");
+ $head[$h][2] = 'home';
+ $h++;
+
+ $this->results['title'] = $langs->trans("MyModule");
+ $this->results['picto'] = 'mymodule@mymodule';
+ }
+
+ $head[$h][0] = 'customreports.php?objecttype='.$parameters['objecttype'].(empty($parameters['tabfamily'])?'':'&tabfamily='.$parameters['tabfamily']);
+ $head[$h][1] = $langs->trans("CustomReports");
+ $head[$h][2] = 'customreports';
+
+ $this->results['head'] = $head;
+
+ return 1;
+ }
+
+
/* Add here any other hooked methods... */
}
diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php
index afa906be06c..fe4cc0931fd 100644
--- a/htdocs/modulebuilder/template/class/myobject.class.php
+++ b/htdocs/modulebuilder/template/class/myobject.class.php
@@ -43,7 +43,8 @@ class MyObject extends CommonObject
public $table_element = 'mymodule_myobject';
/**
- * @var int Does myobject support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
+ * @var int Does this object support multicompany module ?
+ * 0=No test on entity, 1=Test with field entity, 'field@table'=Test with link by field@table
*/
public $ismultientitymanaged = 0;
diff --git a/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php
index 43970122919..c8654a14d28 100644
--- a/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php
+++ b/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php
@@ -112,7 +112,7 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets
$sql = " select rowid as id, email, firstname, lastname, plan, partner";
$sql.= " from ".MAIN_DB_PREFIX."myobject";
$sql.= " where email IS NOT NULL AND email != ''";
- if (! empty($_POST['filter']) && $_POST['filter'] != 'none') $sql.= " AND status = '".$this->db->escape($_POST['filter'])."'";
+ if (GETPOSTISSET('filter') && GETPOST('filter', 'alphanohtml') != 'none') $sql.= " AND status = '".$this->db->escape(GETPOST('filter', 'alphanohtml'))."'";
$sql.= " ORDER BY email";
// Stocke destinataires dans target
diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php
index 371a287dffb..09e4902d6f9 100644
--- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php
+++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php
@@ -104,7 +104,7 @@ class mod_myobject_advanced extends ModeleNumRefMyObject
$old_code_type = $mysoc->typent_code;
$mysoc->code_client = 'CCCCCCCCCC';
$mysoc->typent_code = 'TTTTTTTTTT';
- $numExample = $this->getNextValue($mysoc, '');
+ $numExample = $this->getNextValue($mysoc);
$mysoc->code_client = $old_code_client;
$mysoc->typent_code = $old_code_type;
diff --git a/htdocs/modulebuilder/template/mymoduleindex.php b/htdocs/modulebuilder/template/mymoduleindex.php
index 99ed522e273..fe2f932c129 100644
--- a/htdocs/modulebuilder/template/mymoduleindex.php
+++ b/htdocs/modulebuilder/template/mymoduleindex.php
@@ -47,8 +47,8 @@ $langs->loadLangs(array("mymodule@mymodule"));
$action=GETPOST('action', 'alpha');
-// Securite acces client
-if (! $user->rights->mymodule->read) accessforbidden();
+// Security check
+//if (! $user->rights->mymodule->myobject->read) accessforbidden();
$socid=GETPOST('socid', 'int');
if (isset($user->socid) && $user->socid > 0)
{
diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php
index 01f23cb1cf3..9e9b317196e 100644
--- a/htdocs/mrp/class/mo.class.php
+++ b/htdocs/mrp/class/mo.class.php
@@ -513,11 +513,44 @@ class Mo extends CommonObject
return $resarray;
} else {
$this->error = $this->db->lasterror();
- var_dump($this->error);
return array();
}
}
+
+ /**
+ * Count number of movement with origin of MO
+ *
+ * @return int Number of movements
+ */
+ public function countMovements()
+ {
+ $result = 0;
+
+ $sql = 'SELECT COUNT(rowid) as nb FROM '.MAIN_DB_PREFIX.'stock_mouvement as sm';
+ $sql .= " WHERE sm.origintype = 'mo' and sm.fk_origin = ".$this->id;
+
+ $resql = $this->db->query($sql);
+ if ($resql) {
+ $num = $this->db->num_rows($resql);
+
+ $i = 0;
+ while ($i < $num) {
+ $obj = $this->db->fetch_object($resql);
+ if ($obj) {
+ $result = $obj->nb;
+ }
+
+ $i++;
+ }
+ } else {
+ $this->error = $this->db->lasterror();
+ }
+
+ return $result;
+ }
+
+
/**
* Update object into database
*
@@ -559,9 +592,10 @@ class Mo extends CommonObject
* Erase and update the line to produce.
*
* @param User $user User that modifies
+ * @param bool $notrigger false=launch triggers after, true=disable triggers
* @return int <0 if KO, >0 if OK
*/
- public function updateProduction(User $user)
+ public function updateProduction(User $user, $notrigger = true)
{
$error = 0;
@@ -573,66 +607,69 @@ class Mo extends CommonObject
$this->db->begin();
// Insert lines in mrp_production table from BOM data
- if (!$error && $this->fk_bom > 0)
+ if (!$error)
{
// TODO Check that production has not started. If yes, we stop here.
+
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'mrp_production WHERE fk_mo = '.$this->id;
$this->db->query($sql);
- include_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
- $bom = new Bom($this->db);
- $bom->fetch($this->fk_bom);
- if ($bom->id > 0)
- {
- $moline = new MoLine($this->db);
+ $moline = new MoLine($this->db);
- // Line to produce
- $moline->fk_mo = $this->id;
- $moline->qty = $this->qty;
- $moline->fk_product = $this->fk_product;
- $moline->role = 'toproduce';
- $moline->position = 1;
+ // Line to produce
+ $moline->fk_mo = $this->id;
+ $moline->qty = $this->qty;
+ $moline->fk_product = $this->fk_product;
+ $moline->role = 'toproduce';
+ $moline->position = 1;
- $resultline = $moline->create($user);
- if ($resultline <= 0) {
- $error++;
- $this->error = $moline->error;
- $this->errors = $moline->errors;
- dol_print_error($this->db, $moline->error, $moline->errors);
- }
+ $resultline = $moline->create($user, false); // Never use triggers here
+ if ($resultline <= 0) {
+ $error++;
+ $this->error = $moline->error;
+ $this->errors = $moline->errors;
+ dol_print_error($this->db, $moline->error, $moline->errors);
+ }
- // Lines to consume
- if (!$error) {
- foreach ($bom->lines as $line)
- {
- $moline = new MoLine($this->db);
+ if ($this->fk_bom > 0) { // If a BOM is defined, we know what to consume.
+ include_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
+ $bom = new Bom($this->db);
+ $bom->fetch($this->fk_bom);
+ if ($bom->id > 0)
+ {
+ // Lines to consume
+ if (! $error) {
+ foreach ($bom->lines as $line)
+ {
+ $moline = new MoLine($this->db);
- $moline->fk_mo = $this->id;
- if ($line->qty_frozen) {
- $moline->qty = $line->qty; // Qty to consume does not depends on quantity to produce
- } else {
- $moline->qty = round($line->qty * $this->qty / $bom->efficiency, 2);
- }
- if ($moline->qty <= 0) {
- $error++;
- $this->error = "BadValueForquantityToConsume";
- break;
- }
- else {
- $moline->fk_product = $line->fk_product;
- $moline->role = 'toconsume';
- $moline->position = $line->position;
- $moline->qty_frozen = $line->qty_frozen;
- $moline->disable_stock_change = $line->disable_stock_change;
-
- $resultline = $moline->create($user);
- if ($resultline <= 0) {
+ $moline->fk_mo = $this->id;
+ if ($line->qty_frozen) {
+ $moline->qty = $line->qty; // Qty to consume does not depends on quantity to produce
+ } else {
+ $moline->qty = round($line->qty * $this->qty / $bom->efficiency, 2);
+ }
+ if ($moline->qty <= 0) {
$error++;
- $this->error = $moline->error;
- $this->errors = $moline->errors;
- dol_print_error($this->db, $moline->error, $moline->errors);
+ $this->error = "BadValueForquantityToConsume";
break;
}
+ else {
+ $moline->fk_product = $line->fk_product;
+ $moline->role = 'toconsume';
+ $moline->position = $line->position;
+ $moline->qty_frozen = $line->qty_frozen;
+ $moline->disable_stock_change = $line->disable_stock_change;
+
+ $resultline = $moline->create($user, false); // Never use triggers here
+ if ($resultline <= 0) {
+ $error++;
+ $this->error = $moline->error;
+ $this->errors = $moline->errors;
+ dol_print_error($this->db, $moline->error, $moline->errors);
+ break;
+ }
+ }
}
}
}
@@ -1416,6 +1453,11 @@ class MoLine extends CommonObjectLine
*/
public function create(User $user, $notrigger = false)
{
+ if (empty($this->qty)) {
+ $this->error = 'BadValueForQty';
+ return -1;
+ }
+
return $this->createCommon($user, $notrigger);
}
diff --git a/htdocs/mrp/lib/mrp_mo.lib.php b/htdocs/mrp/lib/mrp_mo.lib.php
index e1813a3f99c..241a036cc44 100644
--- a/htdocs/mrp/lib/mrp_mo.lib.php
+++ b/htdocs/mrp/lib/mrp_mo.lib.php
@@ -31,7 +31,7 @@ function moPrepareHead($object)
{
global $db, $langs, $conf;
- $langs->load("mrp");
+ $langs->loadLangs(array("mrp", "stocks"));
$h = 0;
$head = array();
@@ -52,6 +52,13 @@ function moPrepareHead($object)
$head[$h][2] = 'production';
$h++;
+ $head[$h][0] = DOL_URL_ROOT.'/mrp/mo_movements.php?id='.$object->id;
+ $head[$h][1] = $langs->trans("StockMovements");
+ $nbMove = $object->countMovements();
+ $head[$h][1] .= ''.$nbMove.' ';
+ $head[$h][2] = 'stockmovement';
+ $h++;
+
if (isset($object->fields['note_public']) || isset($object->fields['note_private']))
{
$nbNote = 0;
diff --git a/htdocs/mrp/mo_agenda.php b/htdocs/mrp/mo_agenda.php
index 203408ea79e..85ad63e19e0 100644
--- a/htdocs/mrp/mo_agenda.php
+++ b/htdocs/mrp/mo_agenda.php
@@ -25,7 +25,9 @@
// Load Dolibarr environment
require '../main.inc.php';
+require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
dol_include_once('/mrp/class/mo.class.php');
@@ -118,6 +120,7 @@ if (empty($reshook))
$contactstatic = new Contact($db);
$form = new Form($db);
+$formproject = new FormProjets($db);
if ($object->id > 0)
{
@@ -136,49 +139,43 @@ if ($object->id > 0)
// ------------------------------------------------------------
$linkback = ''.$langs->trans("BackToList").' ';
- $morehtmlref = '';
- /*
$morehtmlref = '';
- // Ref customer
- $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
- $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
- // Thirdparty
- $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
- // Project
- if (! empty($conf->projet->enabled))
- {
- $langs->load("projects");
- $morehtmlref.='
'.$langs->trans('Project') . ' ';
- if ($user->rights->mrp->creer)
- {
- if ($action != 'classify')
- //$morehtmlref.='
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
- $morehtmlref.=' : ';
- if ($action == 'classify') {
- //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
- $morehtmlref.='
';
- } else {
- $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
- }
- } else {
- if (! empty($object->fk_project)) {
- $proj = new Project($db);
- $proj->fetch($object->fk_project);
- $morehtmlref.='
';
- $morehtmlref.=$proj->ref;
- $morehtmlref.=' ';
- } else {
- $morehtmlref.='';
- }
- }
- }
+ // Ref customer
+ //$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
+ //$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
+ // Thirdparty
+ $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
+ // Project
+ if (!empty($conf->projet->enabled))
+ {
+ $langs->load("projects");
+ $morehtmlref .= '
'.$langs->trans('Project').' ';
+ if ($permissiontoadd)
+ {
+ if ($action != 'classify')
+ $morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' : ';
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_soc, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref .= '
';
+ } else {
+ $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_soc, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
+ } else {
+ if (!empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref .= $proj->getNomUrl();
+ } else {
+ $morehtmlref .= '';
+ }
+ }
+ }
$morehtmlref .= '
';
- */
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php
index 973e964a1cf..39da2051ed6 100644
--- a/htdocs/mrp/mo_card.php
+++ b/htdocs/mrp/mo_card.php
@@ -47,6 +47,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
+require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
require_once DOL_DOCUMENT_ROOT.'/mrp/lib/mrp_mo.lib.php';
require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php';
@@ -517,7 +518,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '';
print '';
- print ''.$langs->trans("ToConsume").' ';
+ print ''.$langs->trans("ProductsToConsume").' ';
print '';
if (!empty($object->lines))
{
@@ -536,7 +537,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ' ';
print '';
- print ''.$langs->trans("ToProduce").' ';
+ print ''.$langs->trans("ProductsToProduce").' ';
print '';
if (!empty($object->lines))
{
@@ -620,7 +621,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ''.$langs->trans("ToClone").' ';
}
- // Cancel
+ // Cancel - Reopen
if ($permissiontoadd)
{
if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_INPROGRESS)
diff --git a/htdocs/mrp/mo_document.php b/htdocs/mrp/mo_document.php
index eae4daf67c9..d5b6283a584 100644
--- a/htdocs/mrp/mo_document.php
+++ b/htdocs/mrp/mo_document.php
@@ -24,20 +24,22 @@
// Load Dolibarr environment
require '../main.inc.php';
+require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
dol_include_once('/mrp/class/mo.class.php');
dol_include_once('/mrp/lib/mrp_mo.lib.php');
// Load translation files required by the page
-$langs->loadLangs(array("mrp","companies","other","mails"));
+$langs->loadLangs(array("mrp", "companies", "other", "mails"));
-$action=GETPOST('action', 'aZ09');
-$confirm=GETPOST('confirm');
-$id=(GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int'));
+$action = GETPOST('action', 'aZ09');
+$confirm = GETPOST('confirm');
+$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int'));
$ref = GETPOST('ref', 'alpha');
// Security check - Protection if external user
@@ -53,31 +55,31 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined,
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
-if (! $sortorder) $sortorder="ASC";
-if (! $sortfield) $sortfield="name";
+if (!$sortorder) $sortorder = "ASC";
+if (!$sortfield) $sortfield = "name";
//if (! $sortfield) $sortfield="position_name";
// Initialize technical objects
-$object=new Mo($db);
+$object = new Mo($db);
$extrafields = new ExtraFields($db);
-$diroutputmassaction=$conf->mrp->dir_output . '/temp/massgeneration/'.$user->id;
-$hookmanager->initHooks(array('modocument','globalcard')); // Note that conf->hooks_modules contains array
+$diroutputmassaction = $conf->mrp->dir_output.'/temp/massgeneration/'.$user->id;
+$hookmanager->initHooks(array('modocument', 'globalcard')); // Note that conf->hooks_modules contains array
// Fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element);
// Load object
-include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
//if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mrp->multidir_output[$object->entity?$object->entity:$conf->entity] . "/mo/" . dol_sanitizeFileName($object->id);
-if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mrp->multidir_output[$object->entity?$object->entity:$conf->entity] . "/mo/" . dol_sanitizeFileName($object->ref);
+if ($id > 0 || !empty($ref)) $upload_dir = $conf->mrp->multidir_output[$object->entity ? $object->entity : $conf->entity]."/mo/".dol_sanitizeFileName($object->ref);
/*
* Actions
*/
-include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
+include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
/*
@@ -85,9 +87,10 @@ include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
*/
$form = new Form($db);
+$formproject = new FormProjets($db);
-$title=$langs->trans("Mo").' - '.$langs->trans("Files");
-$help_url='';
+$title = $langs->trans("Mo").' - '.$langs->trans("Files");
+$help_url = '';
//$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('', $title, $help_url);
@@ -102,23 +105,61 @@ if ($object->id)
// Build file list
- $filearray=dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC), 1);
- $totalsize=0;
- foreach($filearray as $key => $file)
+ $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1);
+ $totalsize = 0;
+ foreach ($filearray as $key => $file)
{
- $totalsize+=$file['size'];
+ $totalsize += $file['size'];
}
// Object card
// ------------------------------------------------------------
- $linkback = '' . $langs->trans("BackToList") . ' ';
+ $linkback = ''.$langs->trans("BackToList").' ';
+
+ $morehtmlref = '';
+ // Ref customer
+ //$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
+ //$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
+ // Thirdparty
+ $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
+ // Project
+ if (!empty($conf->projet->enabled))
+ {
+ $langs->load("projects");
+ $morehtmlref .= '
'.$langs->trans('Project').' ';
+ if ($permissiontoadd)
+ {
+ if ($action != 'classify')
+ $morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' : ';
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_soc, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref .= '
';
+ } else {
+ $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_soc, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
+ } else {
+ if (!empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref .= $proj->getNomUrl();
+ } else {
+ $morehtmlref .= '';
+ }
+ }
+ }
+ $morehtmlref .= '
';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
print '';
print '
';
- print '
';
+ print '';
// Number of files
print ''.$langs->trans("NbOfAttachedFiles").' '.count($filearray).' ';
@@ -135,12 +176,12 @@ if ($object->id)
$modulepart = 'mrp';
$permission = $user->rights->mrp->write;
$permtoedit = $user->rights->mrp->write;
- $param = '&id=' . $object->id;
+ $param = '&id='.$object->id;
//$relativepathwithnofile='mo/' . dol_sanitizeFileName($object->id).'/';
- $relativepathwithnofile='mo/' . dol_sanitizeFileName($object->ref).'/';
+ $relativepathwithnofile = 'mo/'.dol_sanitizeFileName($object->ref).'/';
- include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
+ include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
}
else
{
diff --git a/htdocs/mrp/mo_movements.php b/htdocs/mrp/mo_movements.php
new file mode 100644
index 00000000000..ace336b7d29
--- /dev/null
+++ b/htdocs/mrp/mo_movements.php
@@ -0,0 +1,888 @@
+
+ *
+ * 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 .
+ */
+
+/**
+ * \file mo_movements.php
+ * \ingroup mrp
+ * \brief Page to show tock movements of a MO
+ */
+
+//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db
+//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user
+//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc
+//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs
+//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters
+//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters
+//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on).
+//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on)
+//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data
+//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu
+//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php
+//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library
+//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too.
+//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
+//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value
+//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler
+//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message
+//if (! defined("FORCECSP")) define('FORCECSP','none'); // Disable all Content Security Policies
+
+
+// Load Dolibarr environment
+require '../main.inc.php';
+
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
+require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
+require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
+require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
+require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
+require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php';
+dol_include_once('/mrp/class/mo.class.php');
+dol_include_once('/mrp/lib/mrp_mo.lib.php');
+
+// Load translation files required by the page
+$langs->loadLangs(array("mrp", "stocks", "other"));
+
+// Get parameters
+$id = GETPOST('id', 'int');
+$ref = GETPOST('ref', 'alpha');
+$action = GETPOST('action', 'aZ09');
+$confirm = GETPOST('confirm', 'alpha');
+$cancel = GETPOST('cancel', 'aZ09');
+$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'mostockmovement'; // To manage different context of search
+$backtopage = GETPOST('backtopage', 'alpha');
+//$lineid = GETPOST('lineid', 'int');
+
+$msid = GETPOST('msid', 'int');
+$year = GETPOST("year", 'int');
+$month = GETPOST("month", 'int');
+$search_ref = GETPOST('search_ref', 'alpha');
+$search_movement = GETPOST("search_movement", 'alpha');
+$search_product_ref = trim(GETPOST("search_product_ref", 'alpha'));
+$search_product = trim(GETPOST("search_product", 'alpha'));
+$search_warehouse = trim(GETPOST("search_warehouse", 'alpha'));
+$search_inventorycode = trim(GETPOST("search_inventorycode", 'alpha'));
+$search_user = trim(GETPOST("search_user", 'alpha'));
+$search_batch = trim(GETPOST("search_batch", 'alpha'));
+$search_qty = trim(GETPOST("search_qty", 'alpha'));
+$search_type_mouvement = GETPOST('search_type_mouvement', 'int');
+
+$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
+$page = GETPOST("page", 'int');
+$sortfield = GETPOST("sortfield", 'alpha');
+$sortorder = GETPOST("sortorder", 'alpha');
+if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
+$offset = $limit * $page;
+if (!$sortfield) $sortfield = "m.datem";
+if (!$sortorder) $sortorder = "DESC";
+
+// Initialize technical objects
+$object = new Mo($db);
+$extrafields = new ExtraFields($db);
+$diroutputmassaction = $conf->mrp->dir_output.'/temp/massgeneration/'.$user->id;
+$hookmanager->initHooks(array('mocard', 'globalcard')); // Note that conf->hooks_modules contains array
+
+// Fetch optionals attributes and labels
+$extrafields->fetch_name_optionals_label($object->table_element);
+
+$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
+
+// Initialize array of search criterias
+$search_all = trim(GETPOST("search_all", 'alpha'));
+$search = array();
+foreach ($object->fields as $key => $val)
+{
+ if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha');
+}
+
+if (empty($action) && empty($id) && empty($ref)) $action = 'view';
+
+// Load object
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
+
+// Security check - Protection if external user
+//if ($user->socid > 0) accessforbidden();
+//if ($user->socid > 0) $socid = $user->socid;
+//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0);
+//$result = restrictedArea($user, 'mrp', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
+
+$objectlist = new MouvementStock($db);
+
+// Definition of fields for list
+$arrayfields = array(
+ 'm.rowid'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
+ 'm.datem'=>array('label'=>$langs->trans("Date"), 'checked'=>1),
+ 'p.ref'=>array('label'=>$langs->trans("ProductRef"), 'checked'=>1, 'css'=>'maxwidth100'),
+ 'p.label'=>array('label'=>$langs->trans("ProductLabel"), 'checked'=>1),
+ 'm.batch'=>array('label'=>$langs->trans("BatchNumberShort"), 'checked'=>1, 'enabled'=>(!empty($conf->productbatch->enabled))),
+ 'pl.eatby'=>array('label'=>$langs->trans("EatByDate"), 'checked'=>0, 'position'=>10, 'enabled'=>(!empty($conf->productbatch->enabled))),
+ 'pl.sellby'=>array('label'=>$langs->trans("SellByDate"), 'checked'=>0, 'position'=>10, 'enabled'=>(!empty($conf->productbatch->enabled))),
+ 'e.ref'=>array('label'=>$langs->trans("Warehouse"), 'checked'=>1),
+ 'm.fk_user_author'=>array('label'=>$langs->trans("Author"), 'checked'=>0),
+ 'm.inventorycode'=>array('label'=>$langs->trans("InventoryCodeShort"), 'checked'=>1),
+ 'm.label'=>array('label'=>$langs->trans("MovementLabel"), 'checked'=>1),
+ 'm.type_mouvement'=>array('label'=>$langs->trans("TypeMovement"), 'checked'=>1),
+ 'origin'=>array('label'=>$langs->trans("Origin"), 'enabled'=>0, 'checked'=>0),
+ 'm.value'=>array('label'=>$langs->trans("Qty"), 'checked'=>1),
+ 'm.price'=>array('label'=>$langs->trans("UnitPurchaseValue"), 'enabled'=>0, 'checked'=>0),
+ //'m.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
+ //'m.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500)
+);
+$objectlist->fields = dol_sort_array($objectlist->fields, 'position');
+$arrayfields = dol_sort_array($arrayfields, 'position');
+
+$permissionnote = $user->rights->mrp->write; // Used by the include of actions_setnotes.inc.php
+$permissiondellink = $user->rights->mrp->write; // Used by the include of actions_dellink.inc.php
+$permissiontoadd = $user->rights->mrp->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
+$permissiontodelete = $user->rights->mrp->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
+$upload_dir = $conf->mrp->multidir_output[isset($object->entity) ? $object->entity : 1];
+
+$permissiontoproduce = $permissiontoadd;
+
+
+/*
+ * Actions
+ */
+
+if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; }
+if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; }
+
+$parameters = array();
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
+if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
+
+include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
+
+// Do we click on purge search criteria ?
+if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // Both test are required to be compatible with all browsers
+{
+ $year = '';
+ $month = '';
+ $search_ref = '';
+ $search_movement = "";
+ $search_type_mouvement = "";
+ $search_inventorycode = "";
+ $search_product_ref = "";
+ $search_product = "";
+ $search_warehouse = "";
+ $search_user = "";
+ $search_batch = "";
+ $search_qty = '';
+ $sall = "";
+ $toselect = '';
+ $search_array_options = array();
+}
+
+if (empty($reshook))
+{
+ $error = 0;
+
+ $backurlforlist = dol_buildpath('/mrp/mo_list.php', 1);
+
+ if (empty($backtopage) || ($cancel && empty($id))) {
+ //var_dump($backurlforlist);exit;
+ if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist;
+ else $backtopage = DOL_URL_ROOT.'/mrp/mo_production.php?id='.($id > 0 ? $id : '__ID__');
+ }
+ $triggermodname = 'MRP_MO_MODIFY'; // Name of trigger action code to execute when we modify record
+
+ // Actions cancel, add, update, delete or clone
+ include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
+
+ // Actions when linking object each other
+ include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
+
+ // Actions when printing a doc from card
+ include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
+
+ // Actions to send emails
+ $triggersendname = 'MO_SENTBYMAIL';
+ $autocopy = 'MAIN_MAIL_AUTOCOPY_MO_TO';
+ $trackid = 'mo'.$object->id;
+ include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
+
+ // Action to move up and down lines of object
+ //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
+
+ if ($action == 'set_thirdparty' && $permissiontoadd)
+ {
+ $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MO_MODIFY');
+ }
+ if ($action == 'classin' && $permissiontoadd)
+ {
+ $object->setProject(GETPOST('projectid', 'int'));
+ }
+
+ if ($action == 'confirm_reopen') {
+ $result = $object->setStatut($object::STATUS_INPROGRESS, 0, '', 'MRP_REOPEN');
+ }
+}
+
+
+
+/*
+ * View
+ */
+
+$form = new Form($db);
+$formproject = new FormProjets($db);
+$formproduct = new FormProduct($db);
+$productstatic = new Product($db);
+$productlot = new ProductLot($db);
+$warehousestatic = new Entrepot($db);
+$userstatic = new User($db);
+
+llxHeader('', $langs->trans('Mo'), '');
+
+// Part to show record
+if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create')))
+{
+ $res = $object->fetch_thirdparty();
+ $res = $object->fetch_optionals();
+
+ $head = moPrepareHead($object);
+ dol_fiche_head($head, 'stockmovement', $langs->trans("MO"), -1, $object->picto);
+
+ $formconfirm = '';
+
+ // Confirmation to delete
+ if ($action == 'delete')
+ {
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteMo'), $langs->trans('ConfirmDeleteMo'), 'confirm_delete', '', 0, 1);
+ }
+ // Confirmation to delete line
+ if ($action == 'deleteline')
+ {
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
+ }
+ // Clone confirmation
+ if ($action == 'clone') {
+ // Create an array for form
+ $formquestion = array();
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneMo', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
+ }
+
+ // Confirmation of action xxxx
+ if ($action == 'xxx')
+ {
+ $formquestion = array();
+ /*
+ $forcecombo=0;
+ if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy
+ $formquestion = array(
+ // 'text' => $langs->trans("ConfirmClone"),
+ // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
+ // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
+ // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo))
+ );
+ */
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220);
+ }
+
+ // Call Hook formConfirm
+ $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid);
+ $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
+ if (empty($reshook)) $formconfirm .= $hookmanager->resPrint;
+ elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint;
+
+ // Print form confirm
+ print $formconfirm;
+
+
+ // Object card
+ // ------------------------------------------------------------
+ $linkback = ''.$langs->trans("BackToList").' ';
+
+ $morehtmlref = '';
+ /*
+ // Ref bis
+ $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mrp->creer, 'string', '', 0, 1);
+ $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mrp->creer, 'string', '', null, null, '', 1);*/
+ // Thirdparty
+ $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
+ // Project
+ if (!empty($conf->projet->enabled))
+ {
+ $langs->load("projects");
+ $morehtmlref .= '
'.$langs->trans('Project').' ';
+ if ($permissiontoadd)
+ {
+ if ($action != 'classify')
+ $morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' : ';
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_soc, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref .= '
';
+ } else {
+ $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_soc, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
+ } else {
+ if (!empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref .= $proj->getNomUrl();
+ } else {
+ $morehtmlref .= '';
+ }
+ }
+ }
+ $morehtmlref .= '
';
+
+
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+
+
+ print '';
+ print '
';
+ print '
';
+ print '
'."\n";
+
+ // Common attributes
+ $keyforbreak = 'fk_warehouse';
+ unset($object->fields['fk_project']);
+ unset($object->fields['fk_soc']);
+ include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
+
+ // Other attributes
+ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
+
+ print '
';
+ print '
';
+ print '
';
+
+ print '
';
+
+ dol_fiche_end();
+
+ /*
+ print '';
+ */
+
+
+ $sql = "SELECT p.rowid, p.ref as product_ref, p.label as produit, p.tobatch, p.fk_product_type as type, p.entity,";
+ $sql .= " e.ref as warehouse_ref, e.rowid as entrepot_id, e.lieu,";
+ $sql .= " m.rowid as mid, m.value as qty, m.datem, m.fk_user_author, m.label, m.inventorycode, m.fk_origin, m.origintype,";
+ $sql .= " m.batch, m.price,";
+ $sql .= " m.type_mouvement,";
+ $sql .= " pl.rowid as lotid, pl.eatby, pl.sellby,";
+ $sql .= " u.login, u.photo, u.lastname, u.firstname";
+ // Add fields from extrafields
+ if (!empty($extrafields->attributes[$objectlist->table_element]['label'])) {
+ foreach ($extrafields->attributes[$objectlist->table_element]['label'] as $key => $val) $sql .= ($extrafields->attributes[$objectlist->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
+ }
+ // Add fields from hooks
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $objectlist may have been modified by hook
+ $sql .= $hookmanager->resPrint;
+ $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e,";
+ $sql .= " ".MAIN_DB_PREFIX."product as p,";
+ $sql .= " ".MAIN_DB_PREFIX."stock_mouvement as m";
+ if (is_array($extrafields->attributes[$objectlist->table_element]['label']) && count($extrafields->attributes[$objectlist->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$objectlist->table_element."_extrafields as ef on (m.rowid = ef.fk_object)";
+ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON m.fk_user_author = u.rowid";
+ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lot as pl ON m.batch = pl.batch AND m.fk_product = pl.fk_product";
+ $sql .= " WHERE m.fk_product = p.rowid";
+ $sql .= " AND m.origintype = 'mo' AND m.fk_origin = ".(int) $object->id;
+ if ($msid > 0) $sql .= " AND m.rowid = ".$msid;
+ $sql .= " AND m.fk_entrepot = e.rowid";
+ $sql .= " AND e.entity IN (".getEntity('stock').")";
+ if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql .= " AND p.fk_product_type = 0";
+ $sql .= dolSqlDateFilter('m.datem', 0, $month, $year);
+ if (!empty($search_ref)) $sql .= natural_search('m.rowid', $search_ref, 1);
+ if (!empty($search_movement)) $sql .= natural_search('m.label', $search_movement);
+ if (!empty($search_inventorycode)) $sql .= natural_search('m.inventorycode', $search_inventorycode);
+ if (!empty($search_product_ref)) $sql .= natural_search('p.ref', $search_product_ref);
+ if (!empty($search_product)) $sql .= natural_search('p.label', $search_product);
+ if ($search_warehouse != '' && $search_warehouse != '-1') $sql .= natural_search('e.rowid', $search_warehouse, 2);
+ if (!empty($search_user)) $sql .= natural_search('u.login', $search_user);
+ if (!empty($search_batch)) $sql .= natural_search('m.batch', $search_batch);
+ if ($search_qty != '') $sql .= natural_search('m.value', $search_qty, 1);
+ if ($search_type_mouvement != '' && $search_type_mouvement != '-1') $sql .= natural_search('m.type_mouvement', $search_type_mouvement, 2);
+ // Add where from extra fields
+ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
+ // Add where from hooks
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $objectlist may have been modified by hook
+ $sql .= $hookmanager->resPrint;
+ $sql .= $db->order($sortfield, $sortorder);
+
+ $nbtotalofrecords = '';
+ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
+ {
+ $result = $db->query($sql);
+ $nbtotalofrecords = $db->num_rows($result);
+ if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
+ {
+ $page = 0;
+ $offset = 0;
+ }
+ }
+ $sql .= $db->plimit($limit + 1, $offset);
+
+ $param = '';
+ if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
+ if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
+ if ($id > 0) $param .= '&id='.urlencode($id);
+ if ($search_movement) $param .= '&search_movement='.urlencode($search_movement);
+ if ($search_inventorycode) $param .= '&search_inventorycode='.urlencode($search_inventorycode);
+ if ($search_type_mouvement) $param .= '&search_type_mouvement='.urlencode($search_type_mouvement);
+ if ($search_product_ref) $param .= '&search_product_ref='.urlencode($search_product_ref);
+ if ($search_product) $param .= '&search_product='.urlencode($search_product);
+ if ($search_batch) $param .= '&search_batch='.urlencode($search_batch);
+ if ($search_warehouse > 0) $param .= '&search_warehouse='.urlencode($search_warehouse);
+ if ($search_user) $param .= '&search_user='.urlencode($search_user);
+
+ // Add $param from extra fields
+ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
+
+ // List of mass actions available
+ $arrayofmassactions = array(
+ // 'presend'=>$langs->trans("SendByMail"),
+ // 'builddoc'=>$langs->trans("PDFMerge"),
+ );
+ //if ($user->rights->stock->supprimer) $arrayofmassactions['predelete']=' '.$langs->trans("Delete");
+ if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
+ $massactionbutton = $form->selectMassAction('', $arrayofmassactions);
+
+ print '";
+}
+
+// End of page
+llxFooter();
+$db->close();
diff --git a/htdocs/mrp/mo_note.php b/htdocs/mrp/mo_note.php
index f76602580a7..e22d3e4b610 100644
--- a/htdocs/mrp/mo_note.php
+++ b/htdocs/mrp/mo_note.php
@@ -18,30 +18,32 @@
/**
* \file mo_note.php
* \ingroup mrp
- * \brief Car with notes on Mo
+ * \brief Card with notes on Mo
*/
// Load Dolibarr environment
require '../main.inc.php';
+require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
dol_include_once('/mrp/class/mo.class.php');
dol_include_once('/mrp/lib/mrp_mo.lib.php');
// Load translation files required by the page
-$langs->loadLangs(array("mrp","companies"));
+$langs->loadLangs(array("mrp", "companies"));
// Get parameters
-$id = GETPOST('id', 'int');
+$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
-$action = GETPOST('action', 'alpha');
+$action = GETPOST('action', 'alpha');
$cancel = GETPOST('cancel', 'aZ09');
$backtopage = GETPOST('backtopage', 'alpha');
// Initialize technical objects
-$object=new Mo($db);
+$object = new Mo($db);
$extrafields = new ExtraFields($db);
-$diroutputmassaction=$conf->mrp->dir_output . '/temp/massgeneration/'.$user->id;
-$hookmanager->initHooks(array('monote','globalcard')); // Note that conf->hooks_modules contains array
+$diroutputmassaction = $conf->mrp->dir_output.'/temp/massgeneration/'.$user->id;
+$hookmanager->initHooks(array('monote', 'globalcard')); // Note that conf->hooks_modules contains array
// Fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element);
@@ -52,10 +54,10 @@ $extrafields->fetch_name_optionals_label($object->table_element);
//$result = restrictedArea($user, 'mrp', $id);
// Load object
-include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
-if ($id > 0 || ! empty($ref)) $upload_dir = $conf->mrp->multidir_output[$object->entity] . "/" . $object->id;
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
+if ($id > 0 || !empty($ref)) $upload_dir = $conf->mrp->multidir_output[$object->entity]."/".$object->id;
-$permissionnote=1;
+$permissionnote = 1;
//$permissionnote=$user->rights->mrp->creer; // Used by the include of actions_setnotes.inc.php
@@ -64,7 +66,7 @@ $permissionnote=1;
* Actions
*/
-include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
+include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
/*
@@ -72,12 +74,13 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
*/
$form = new Form($db);
+$formproject = new FormProjets($db);
//$help_url='EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes';
-$help_url='';
+$help_url = '';
llxHeader('', $langs->trans('Mo'), $help_url);
-if ($id > 0 || ! empty($ref))
+if ($id > 0 || !empty($ref))
{
$object->fetch_thirdparty();
@@ -87,51 +90,45 @@ if ($id > 0 || ! empty($ref))
// Object card
// ------------------------------------------------------------
- $linkback = '' . $langs->trans("BackToList") . ' ';
+ $linkback = ''.$langs->trans("BackToList").' ';
- $morehtmlref = '';
- /*
- $morehtmlref='';
+ $morehtmlref = '
';
// Ref customer
- $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
- $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
+ //$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
+ //$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
// Thirdparty
- $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+ $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
// Project
- if (! empty($conf->projet->enabled))
+ if (!empty($conf->projet->enabled))
{
- $langs->load("projects");
- $morehtmlref.='
'.$langs->trans('Project') . ' ';
- if ($user->rights->mrp->creer)
- {
- if ($action != 'classify')
- //$morehtmlref.='
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
- $morehtmlref.=' : ';
- if ($action == 'classify') {
- //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
- $morehtmlref.='
';
- } else {
- $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
- }
- } else {
- if (! empty($object->fk_project)) {
- $proj = new Project($db);
- $proj->fetch($object->fk_project);
- $morehtmlref.='
';
- $morehtmlref.=$proj->ref;
- $morehtmlref.=' ';
- } else {
- $morehtmlref.='';
- }
- }
+ $langs->load("projects");
+ $morehtmlref .= '
'.$langs->trans('Project').' ';
+ if ($permissiontoadd)
+ {
+ if ($action != 'classify')
+ $morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetProject')).' : ';
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_soc, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref .= '
';
+ } else {
+ $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_soc, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
+ } else {
+ if (!empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref .= $proj->getNomUrl();
+ } else {
+ $morehtmlref .= '';
+ }
+ }
}
- $morehtmlref.='
';
- */
+ $morehtmlref .= '
';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
@@ -140,7 +137,7 @@ if ($id > 0 || ! empty($ref))
print '
';
- $cssclass="titlefield";
+ $cssclass = "titlefield";
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
print '';
diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php
index 8dffd3dad19..5b6db8739d1 100644
--- a/htdocs/mrp/mo_production.php
+++ b/htdocs/mrp/mo_production.php
@@ -47,6 +47,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
+require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
@@ -161,6 +162,25 @@ if (empty($reshook))
$result = $object->setStatut($object::STATUS_INPROGRESS, 0, '', 'MRP_REOPEN');
}
+ if ($action == 'confirm_addconsumeline' && GETPOST('addconsumelinebutton')) {
+ $moline = new MoLine($db);
+
+ // Line to produce
+ $moline->fk_mo = $object->id;
+ $moline->qty = GETPOST('qtytoadd', 'int');;
+ $moline->fk_product = GETPOST('productidtoadd', 'int');
+ $moline->role = 'toconsume';
+ $moline->position = 0;
+
+ $resultline = $moline->create($user, false); // Never use triggers here
+ if ($resultline <= 0) {
+ $error++;
+ setEventMessages($moline->error, $molines->errors, 'errors');
+ }
+
+ $action = '';
+ }
+
if (in_array($action, array('confirm_consumeorproduce', 'confirm_consumeandproduceall'))) {
$stockmove = new MouvementStock($db);
@@ -379,23 +399,6 @@ $tmpbatch = new Productlot($db);
llxHeader('', $langs->trans('Mo'), '');
-// Example : Adding jquery code
-print '';
-
-
-
// Part to show record
if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create')))
{
@@ -424,21 +427,43 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneMo', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
- // Confirmation of action xxxx
- if ($action == 'xxx')
+ // Confirmation of validation
+ if ($action == 'validate')
{
+ // We check that object has a temporary ref
+ $ref = substr($object->ref, 1, 4);
+ if ($ref == 'PROV') {
+ $object->fetch_product();
+ $numref = $object->getNextNumRef($object->fk_product);
+ } else {
+ $numref = $object->ref;
+ }
+
+ $text = $langs->trans('ConfirmValidateMo', $numref);
+ /*if (! empty($conf->notification->enabled))
+ {
+ require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
+ $notify = new Notify($db);
+ $text .= ' ';
+ $text .= $notify->confirmMessage('BOM_VALIDATE', $object->socid, $object);
+ }*/
+
$formquestion = array();
- /*
- $forcecombo=0;
- if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy
- $formquestion = array(
- // 'text' => $langs->trans("ConfirmClone"),
- // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
- // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
- // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo))
- );
- */
- $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220);
+ if (!empty($conf->mrp->enabled))
+ {
+ $langs->load("mrp");
+ require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
+ $formproduct = new FormProduct($db);
+ $forcecombo = 0;
+ if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy
+ $formquestion = array(
+ // 'text' => $langs->trans("ConfirmClone"),
+ // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
+ // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
+ );
+ }
+
+ $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Validate'), $text, 'confirm_validate', $formquestion, 0, 1, 220);
}
// Call Hook formConfirm
@@ -529,6 +554,23 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Note that $action and $object may be modified by hook
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action);
if (empty($reshook)) {
+ // Validate
+ if ($object->status == $object::STATUS_DRAFT)
+ {
+ if ($permissiontoadd)
+ {
+ if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0))
+ {
+ print ''.$langs->trans("Validate").' ';
+ }
+ else
+ {
+ $langs->load("errors");
+ print ''.$langs->trans("Validate").' ';
+ }
+ }
+ }
+
// Consume or produce
if ($object->status == Mo::STATUS_VALIDATED || $object->status == Mo::STATUS_INPROGRESS) {
if ($permissiontoproduce) {
@@ -551,12 +593,25 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ''.$langs->trans('ConsumeAndProduceAll').' ';
}
- // Reopen
- if ($object->status == Mo::STATUS_PRODUCED) {
- if ($permissiontoproduce) {
- print 'id.'&action=confirm_reopen">'.$langs->trans('ReOpen').' ';
- } else {
- print ''.$langs->trans('ReOpen').' ';
+ // Cancel - Reopen
+ if ($permissiontoadd)
+ {
+ if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_INPROGRESS)
+ {
+ print 'id.'&action=confirm_close&confirm=yes">'.$langs->trans("Cancel").' '."\n";
+ }
+
+ if ($object->status == $object::STATUS_CANCELED)
+ {
+ print 'id.'&action=confirm_reopen&confirm=yes">'.$langs->trans("Re-Open").' '."\n";
+ }
+
+ if ($object->status == $object::STATUS_PRODUCED) {
+ if ($permissiontoproduce) {
+ print 'id.'&action=confirm_reopen">'.$langs->trans('ReOpen').' ';
+ } else {
+ print ''.$langs->trans('ReOpen').' ';
+ }
}
}
}
@@ -564,7 +619,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '';
}
- if (in_array($action, array('consumeorproduce', 'consumeandproduceall')))
+ if (in_array($action, array('consumeorproduce', 'consumeandproduceall', 'addconsumeline')))
{
print '