diff --git a/README-FR.md b/README-FR.md index 77bb5a3e27a..81fdff13047 100644 --- a/README-FR.md +++ b/README-FR.md @@ -8,10 +8,12 @@ Il est simple d'utilisation et modulaire, vous permettant de n'activez que les f ![ScreenShot](https://www.dolibarr.org/medias/dolibarr_screenshot1_1920x1080.jpg) + ## LICENCE Dolibarr est distribué sous les termes de la licence GNU General Public License v3+ ou supérieure. + ## INSTALLER DOLIBARR ### Configuration simple @@ -52,6 +54,7 @@ Vous pouvez aussi utiliser un serveur Web et une base de données prise en charg - Suivez les instructions de l'installateur + ## METTRE A JOUR DOLIBARR Pour mettre à jour Dolibarr depuis une vieille version vers celle ci: @@ -64,9 +67,11 @@ Pour mettre à jour Dolibarr depuis une vieille version vers celle ci: *Note: Le processus de migration peut être lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/* + ## CE QUI EST NOUVEAU -Voir fichier ChangeLog. +See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file. + ## CE QUE DOLIBARR PEUT FAIRE @@ -82,15 +87,17 @@ Voir fichier ChangeLog. - Calendrier/Agenda partagé (avec export ical, vcal) - Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...) - Gestion de contrats de services -- Gestion de stock +- Gestion de stock et inventaires - Gestion des expéditions - Gestion des demandes de congès - Gestion des notes de frais +- Gestion de recrutement - GED (Gestion Electronique de Documents) - EMailings de masse - Réalisation de sondages +- Gestion d'adhérents - Point de vente/Caisse enregistreuse -- … +- … (près de 100 modules disponibles en standard, près de 1000 autre sur la place de marché d'extensions) ### Autres modules @@ -135,31 +142,36 @@ Voir fichier ChangeLog. Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com). + ## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE Voici un liste de fonctionnalités pas encore gérées par Dolibarr: -- Dolibarr ne contient pas de module de Gestion de la paie. +- Dolibarr ne contient pas de module de génération de feuille de paie. - Les tâches du module de gestion de projets n'ont pas de dépendances entre elle. - Dolibarr n'embarque pas de Webmail intégré nativement. - Dolibarr ne fait pas le café (pas encore). + ## DOCUMENTATION La documentation utilisateur, développeur et traducteur est disponible sous forme de ressources de la communauté via le site [Wiki](https://wiki.dolibarr.org). + ## CONTRIBUER Ce projet existe grâce à ses nombreux contributeurs [[Contribuer](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]. + ## CREDITS Dolibarr est le résultat du travail de nombreux contributeurs depuis des années et utilise des librairies d'autres contributeurs. Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) + ## ACTUALITES ET RESEAUX SOCIAUX Suivez le projet Dolibarr project sur les réseaux francophones diff --git a/README.md b/README.md index 0a3aeecb9f4..34162fd5682 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ You can freely use, study, modify or distribute it according to its licence. You can use it as a standalone application or as a web application to access it from the Internet or a LAN. -Dolibarr has a large community ready to help you, free forums and [officially preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org) +Dolibarr has a large community ready to help you, free forums and [preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org) ![ScreenShot](https://www.dolibarr.org/medias/dolibarr_screenshot1_1920x1080.jpg) @@ -104,7 +104,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) - Customer & Supplier Orders management - Invoices and payment management - Shipping management -- Warehouse/Stock management +- Warehouse/Stock management/Inventory - Manufacturing Orders - Bank accounts management - Direct debit orders management (European SEPA) @@ -117,11 +117,12 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) - Interventions management - Employee's leave requests management - Expense reports +- Recruitment management - Timesheets - Electronic Document Management (EDM) - Foundations members management - Point of Sale (POS) -- … +- … (around 100 modules available by default, 1000+ on the addon market place) ### Other application/modules diff --git a/dev/examples/zapier/creates/thirdparty.js b/dev/examples/zapier/creates/thirdparty.js index 3e20fd10e41..2abeef6ae4c 100644 --- a/dev/examples/zapier/creates/thirdparty.js +++ b/dev/examples/zapier/creates/thirdparty.js @@ -6,7 +6,7 @@ const createThirdparty = async (z, bundle) => { const response = await z.request({ method: 'POST', url: apiurl, - body: JSON.stringify({ + body: { name: bundle.inputData.name, name_alias: bundle.inputData.name_alias, ref_ext: bundle.inputData.ref_ext, @@ -24,7 +24,7 @@ const createThirdparty = async (z, bundle) => { code_client: bundle.inputData.code_client, code_fournisseur: bundle.inputData.code_fournisseur, sens: 'fromzapier' - }) + } }); const result = z.JSON.parse(response.content); // api returns an integer when ok, a json when ko diff --git a/dev/examples/zapier/package.json b/dev/examples/zapier/package.json index cc0768a27ef..4d5c5daa867 100644 --- a/dev/examples/zapier/package.json +++ b/dev/examples/zapier/package.json @@ -15,7 +15,7 @@ "npm": ">=5.6.0" }, "dependencies": { - "zapier-platform-core": "11.0.0" + "zapier-platform-core": "11.0.1" }, "devDependencies": { "mocha": "^5.2.0", diff --git a/dev/examples/zapier/triggers/thirdparty.js b/dev/examples/zapier/triggers/thirdparty.js index 4656f836e74..0fecd4434ce 100644 --- a/dev/examples/zapier/triggers/thirdparty.js +++ b/dev/examples/zapier/triggers/thirdparty.js @@ -56,6 +56,12 @@ const getThirdparty = (z, bundle) => { fournisseur: bundle.cleanedRequest.fournisseur, code_client: bundle.cleanedRequest.code_client, code_fournisseur: bundle.cleanedRequest.code_fournisseur, + idprof1: bundle.cleanedRequest.idprof1, + idprof2: bundle.cleanedRequest.idprof2, + idprof3: bundle.cleanedRequest.idprof3, + idprof4: bundle.cleanedRequest.idprof4, + idprof5: bundle.cleanedRequest.idprof5, + idprof6: bundle.cleanedRequest.idprof6, authorId: bundle.cleanedRequest.authorId, createdAt: bundle.cleanedRequest.createdAt, action: bundle.cleanedRequest.action @@ -170,7 +176,13 @@ module.exports = { {key: 'client', label: 'Customer/Prospect 0/1/2/3'}, {key: 'fournisseur', label: 'Supplier 0/1'}, {key: 'code_client', label: 'Customer code'}, - {key: 'code_fournisseur', label: 'Supplier code'} + {key: 'code_fournisseur', label: 'Supplier code'}, + {key: 'idprof1', label: 'Id Prof 1'}, + {key: 'idprof2', label: 'Id Prof 2'}, + {key: 'idprof3', label: 'Id Prof 3'}, + {key: 'idprof4', label: 'Id Prof 4'}, + {key: 'idprof5', label: 'Id Prof 5'}, + {key: 'idprof6', label: 'Id Prof 6'} ] } }; diff --git a/htdocs/accountancy/bookkeeping/listbysubaccount.php b/htdocs/accountancy/bookkeeping/listbysubaccount.php index 129e695de3c..43d4acf343f 100644 --- a/htdocs/accountancy/bookkeeping/listbysubaccount.php +++ b/htdocs/accountancy/bookkeeping/listbysubaccount.php @@ -682,7 +682,7 @@ while ($i < min($num, $limit)) { print ""; print ''; if ($line->subledger_account != "" && $line->subledger_account != '-1') { - print $object->get_compte_desc($line->numero_compte).' : '.length_accounta($line->subledger_account); + print $line->subledger_label.' : '.length_accounta($line->subledger_account); } else { // Should not happen: subledger account must be null or a non empty value print ''.$langs->trans("Unknown"); diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index f1815386624..f007208cf57 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -561,9 +561,9 @@ class AccountancyExport $Tab['contrepartie'] = str_repeat(' ', 8); // Force date format : %d%m%y - if (!empty($data->date_echeance)) { - //$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE); - $Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y'); // Format must be ddmmyy + if (!empty($data->date_lim_reglement)) { + //$Tab['date_echeance'] = dol_print_date($data->date_lim_reglement, $conf->global->ACCOUNTING_EXPORT_DATE); + $Tab['date_echeance'] = dol_print_date($data->date_lim_reglement, '%d%m%y'); // Format must be ddmmyy } else { $Tab['date_echeance'] = '000000'; } @@ -660,9 +660,9 @@ class AccountancyExport $Tab['code_stat'] = str_repeat(' ', 4); - if (!empty($data->date_echeance)) { - //$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE); - $Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%Y'); + if (!empty($data->date_lim_reglement)) { + //$Tab['date_echeance'] = dol_print_date($data->date_lim_reglement, $conf->global->ACCOUNTING_EXPORT_DATE); + $Tab['date_echeance'] = dol_print_date($data->date_lim_reglement, '%d%m%Y'); } else { $Tab['date_echeance'] = dol_print_date($data->doc_date, '%d%m%Y'); } diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index 390c288b606..bcb3d7901f5 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; // Load translation files required by the page -$langs->loadLangs(array("compta", "bills", "other", "main", "accountancy")); +$langs->loadLangs(array("compta", "bills", "other", "accountancy")); $socid = GETPOST('socid', 'int'); diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index d33f5e12312..9580e8bca37 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; // Load translation files required by the page -$langs->loadLangs(array("compta", "bills", "other", "main", "accountancy")); +$langs->loadLangs(array("compta", "bills", "other", "accountancy")); // Security check if (empty($conf->accounting->enabled)) { diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php index b4e85fd517a..baeefa1bbfb 100644 --- a/htdocs/accountancy/expensereport/index.php +++ b/htdocs/accountancy/expensereport/index.php @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; // Load translation files required by the page -$langs->loadLangs(array("compta", "bills", "other", "main", "accountancy")); +$langs->loadLangs(array("compta", "bills", "other", "accountancy")); $month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); if (GETPOST("year", 'int')) { diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index a69debeb0c0..c1a3ffe23a6 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; // Load translation files required by the page -$langs->loadLangs(array("compta", "bills", "other", "main", "accountancy")); +$langs->loadLangs(array("compta", "bills", "other", "accountancy")); // Security check if (empty($conf->accounting->enabled)) { diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 5182a6ff778..d20318090e0 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1908,7 +1908,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } // Reactivate - if (Adherent::STATUS_RESILIATED == $object->statut || Adherent::STATUS_EXCLUDED == $Object->statut) { + if (Adherent::STATUS_RESILIATED == $object->statut || Adherent::STATUS_EXCLUDED == $object->statut) { if ($user->rights->adherent->creer) { print ''.$langs->trans("Reenable")."\n"; } else { diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 44629525a26..df691eba688 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -427,11 +427,11 @@ foreach ($boxactivated as $key => $box) { $hasprevious = ($key != 0); print ''.($key + 1).''; print ''; - print ($hasnext ? ''.img_down().' ' : ''); - print ($hasprevious ? ''.img_up().'' : ''); + print ($hasnext ? ''.img_down().' ' : ''); + print ($hasprevious ? ''.img_up().'' : ''); print ''; print ''; - print ''.img_delete().''; + print ''.img_delete().''; print ''; print ''."\n"; diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 1a6d99261bd..5dc660adb9b 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -8,6 +8,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2021 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 @@ -246,6 +247,7 @@ if ($action == 'install') { if ($action == 'set' && $user->admin) { $resarray = activateModule($value); + dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity); if (!empty($resarray['errors'])) { setEventMessages('', $resarray['errors'], 'errors'); } else { @@ -269,6 +271,7 @@ if ($action == 'set' && $user->admin) { exit; } elseif ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes') { $result = unActivateModule($value); + dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity); if ($result) { setEventMessages($result, null, 'errors'); } diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index acf1dfe707e..03c27fd3721 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -91,7 +91,9 @@ print '
'; print ''; print ''; -print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_GENERATE_PROPOSALS_WITH_PICTURE").''; +print '
'.$langs->trans("MAIN_GENERATE_PROPOSALS_WITH_PICTURE"); +print ' ('.$langs->trans("RandomlySelectedIfSeveral").')'; +print ''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('MAIN_GENERATE_PROPOSALS_WITH_PICTURE'); } else { diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 50b27b30964..212fcc6228a 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -122,7 +122,7 @@ if (dol_is_file($xmlfile)) { print ''."\n"; if ($enableremotecheck) { print ' = '; - print '
'; + print '
'; } else { print ' '.$langs->trans("RemoteSignature").' = '.dol_escape_htmltag($xmlremote); if (!GETPOST('xmlremote')) { diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php index 32fbe8ab41c..2a8dfa975cd 100644 --- a/htdocs/admin/system/perf.php +++ b/htdocs/admin/system/perf.php @@ -75,7 +75,7 @@ print '
'; print ''.$langs->trans("Syslog").': '; $test = empty($conf->syslog->enabled); if ($test) { - print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotSlowedDownByThis"); + print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' '.$langs->trans("NotSlowedDownByThis").''; } else { if ($conf->global->SYSLOG_LEVEL > LOG_NOTICE) { print img_picto('', 'warning').' '.$langs->trans("ModuleActivatedWithTooHighLogLevel", $langs->transnoentities("Syslog")); @@ -91,7 +91,7 @@ print '
'; print ''.$langs->trans("DebugBar").': '; $test = empty($conf->debugbar->enabled); if ($test) { - print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' - '.$langs->trans("NotSlowedDownByThis"); + print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled").' '.$langs->trans("NotSlowedDownByThis").''; } else { print img_picto('', 'warning').' '.$langs->trans("ModuleActivated", $langs->transnoentities("DebugBar")); //print ' '.$langs->trans("MoreInformation").' XDebug admin page'; @@ -111,7 +111,7 @@ if ($test) { print ' Memcached module admin page'; } } else { - print img_picto('', 'warning').' '.$langs->trans("MemcachedNotAvailable"); + print $langs->trans("MemcachedNotAvailable"); } print '
'; diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php index 087ad76631d..e972581beaa 100644 --- a/htdocs/admin/system/security.php +++ b/htdocs/admin/system/security.php @@ -65,12 +65,31 @@ if (function_exists('php_ini_loaded_file')) { } print "
\n"; -// Get versionof web server -print "
Web server - ".$langs->trans("Version").": ".$_SERVER["SERVER_SOFTWARE"]."
\n"; +// Get version of web server +print "
Web server - ".$langs->trans("Version").": ".$_SERVER["SERVER_SOFTWARE"]."
\n"; +print ''.$langs->trans("DataRootServer").": ".DOL_DATA_ROOT."
\n"; +// Web user group by default +$labeluser = dol_getwebuser('user'); +$labelgroup = dol_getwebuser('group'); +if ($labeluser && $labelgroup) { + print ''.$langs->trans("WebUserGroup")." (env vars) : ".$labeluser.':'.$labelgroup; + if (function_exists('posix_geteuid') && function_exists('posix_getpwuid')) { + $arrayofinfoofuser = posix_getpwuid(posix_geteuid()); + print ' (POSIX '.$arrayofinfoofuser['name'].':'.$arrayofinfoofuser['gecos'].':'.$arrayofinfoofuser['dir'].':'.$arrayofinfoofuser['shell'].')
'."\n"; + } +} +// Web user group real (detected by 'id' external command) +if (function_exists('exec')) { + $arrayout = array(); $varout = 0; + exec('id', $arrayout, $varout); + if (empty($varout)) { // Test command is ok. Work only on Linux OS. + print ''.$langs->trans("WebUserGroup")." (real, 'id' command) : ".join(',', $arrayout)."
\n"; + } +} print '
'; print "PHP safe_mode = ".(ini_get('safe_mode') ? ini_get('safe_mode') : yn(0)).'   '.$langs->trans("Deprecated")." (removed in PHP 5.4)
\n"; -print "PHP open_basedir = ".(ini_get('open_basedir') ? ini_get('open_basedir') : yn(0).'   ('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("ARestrictedPath")).')')."
\n"; +print "PHP open_basedir = ".(ini_get('open_basedir') ? ini_get('open_basedir') : yn(0).'   ('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("ARestrictedPath").', '.$langs->transnoentitiesnoconv("Example").' '.$_SERVER["DOCUMENT_ROOT"]).')')."
\n"; print "PHP allow_url_fopen = ".(ini_get('allow_url_fopen') ? img_picto($langs->trans("YouShouldSetThisToOff"), 'warning').' '.ini_get('allow_url_fopen') : yn(0)).'   ('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("No")).")
\n"; print "PHP allow_url_include = ".(ini_get('allow_url_include') ? img_picto($langs->trans("YouShouldSetThisToOff"), 'warning').' '.ini_get('allow_url_include') : yn(0)).'   ('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("No")).")
\n"; print "PHP disable_functions = "; diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index acb11e70332..362b29c0163 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -563,6 +563,21 @@ if ($mode == 'searchkey') { print '   '.img_picto($langs->trans('FixOnTransifex'), 'globe').''; } } else { + // retrieve rowid + $sql = "SELECT rowid"; + $sql .= " FROM ".MAIN_DB_PREFIX."overwrite_trans"; + $sql .= " WHERE entity IN (".getEntity('overwrite_trans').")"; + $sql .= " AND transkey = '".$db->escape($key)."'"; + dol_syslog("translation::select from table", LOG_DEBUG); + $result = $db->query($sql); + if ($result) { + $obj = $db->fetch_object($result); + } + print ''.img_edit().''; + print ' '; + print ''.img_delete().''; + print '  '; + $htmltext = $langs->trans("TransKeyWithoutOriginalValue", $key); print $form->textwithpicto('', $htmltext, 1, 'warning'); } diff --git a/htdocs/cashdesk/index_verif.php b/htdocs/cashdesk/index_verif.php index 47a1d90b76c..94e0e7009cf 100644 --- a/htdocs/cashdesk/index_verif.php +++ b/htdocs/cashdesk/index_verif.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php'; require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Auth.class.php'; // Load translation files required by the page -$langs->loadLangs(array("main", "admin", "cashdesk")); +$langs->loadLangs(array("admin", "cashdesk")); $username = GETPOST("txtUsername"); $password = GETPOST("pwdPassword"); diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index d8bcd0efb1b..3943a37e5a7 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1901,6 +1901,12 @@ class ActionComm extends CommonObject $sql .= " AND ar.fk_element = 0"; } } + if ($key == 'module') { + $sql .= " AND c.module LIKE '%".$this->db->escape($value)."'"; + } + if ($key == 'status') { + $sql .= " AND a.status =".((int) $value); + } } $sql .= " AND a.datep IS NOT NULL"; // To exclude corrupted events and avoid errors in lightning/sunbird import @@ -1938,6 +1944,7 @@ class ActionComm extends CommonObject $duration = ($datestart && $dateend) ? ($dateend - $datestart) : 0; $event['summary'] = $obj->label.($obj->socname ? " (".$obj->socname.")" : ""); + $event['desc'] = $obj->note; $event['startdate'] = $datestart; $event['enddate'] = $dateend; // Not required with type 'journal' diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 589559ea426..fab7cfa6fa9 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -184,6 +184,15 @@ if (empty($reshook)) { } } + // transport mode + if ($action == 'settransportmode' && $user->rights->societe->creer) { + $object->fetch($id); + $result = $object->setTransportMode(GETPOST('transport_mode_id', 'alpha')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + // Bank account if ($action == 'setbankaccount' && $user->rights->societe->creer) { $object->fetch($id); @@ -580,9 +589,9 @@ if ($object->id > 0) { print '
'; print ''; if ($action == 'edittransportmode') { - $form->formSelectTransportMode($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->fk_transport_mode, 'fk_transport_mode', 1); + $form->formSelectTransportMode($_SERVER['PHP_SELF'].'?socid='.$object->id, (!empty($object->transport_mode_id) ? $object->transport_mode_id : ''), 'transport_mode_id', 1); } else { - $form->formSelectTransportMode($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->fk_transport_mode, 'none'); + $form->formSelectTransportMode($_SERVER['PHP_SELF'].'?socid='.$object->id, (!empty($object->transport_mode_id) ? $object->transport_mode_id : ''), 'none'); } print ""; print ''; @@ -874,6 +883,7 @@ if ($object->id > 0) { $sql .= ", c.total_ttc"; $sql .= ", c.ref, c.ref_client, c.fk_statut, c.facture"; $sql .= ", c.date_commande as dc"; + $sql .= ", c.facture as billed"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as c"; $sql .= " WHERE c.fk_soc = s.rowid "; $sql .= " AND s.rowid = ".$object->id; diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 86aff8a36e0..d801b4429c7 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -48,6 +48,7 @@ $confirm = GETPOST('confirm', 'alpha'); $urlfrom = GETPOST('urlfrom'); $object = new Mailing($db); + $result = $object->fetch($id); $extrafields = new ExtraFields($db); @@ -78,7 +79,7 @@ $listofmethods['mail'] = 'PHP mail function'; $listofmethods['smtps'] = 'SMTP/SMTPS socket library'; // Security check -if (!$user->rights->mailing->lire || (empty($conf->global->EXTERNAL_USERS_ARE_AUTHORIZED) && $user->socid > 0)) { +if (empty($user->rights->mailing->lire) || (empty($conf->global->EXTERNAL_USERS_ARE_AUTHORIZED) && $user->socid > 0)) { accessforbidden(); } @@ -408,7 +409,7 @@ if (empty($reshook)) { dol_syslog($db->error()); dol_print_error($db); } - + $object->fetch($id); $action = ''; } } diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 359084ddabe..3973071d1f0 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -150,7 +150,7 @@ print '
'; */ $sql = "SELECT c.rowid, c.entity, c.ref, c.fk_statut, date_cloture as datec"; -$sql .= ", s.nom as socname, s.rowid as socid, s.canvas, s.client"; +$sql .= ", s.nom as socname, s.rowid as socid, s.canvas, s.client, s.email, s.code_compta"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as c"; $sql .= ", ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) { @@ -185,6 +185,8 @@ if ($resql) { $companystatic->name = $obj->socname; $companystatic->client = $obj->client; $companystatic->canvas = $obj->canvas; + $companystatic->email = $obj->email; + $companystatic->code_compta = $obj->code_compta; $filename = dol_sanitizeFileName($obj->ref); $filedir = $conf->propal->multidir_output[$obj->entity].'/'.dol_sanitizeFileName($obj->ref); @@ -223,7 +225,7 @@ if ($resql) { * Open (validated) proposals */ if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { - $sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client"; + $sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, s.email, s.code_compta"; $sql .= ", p.rowid as propalid, p.entity, p.total_ttc, p.total_ht, p.ref, p.fk_statut, p.datep as dp, p.fin_validite as dfv"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= ", ".MAIN_DB_PREFIX."propal as p"; @@ -260,6 +262,8 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { $companystatic->name = $obj->socname; $companystatic->client = $obj->client; $companystatic->canvas = $obj->canvas; + $companystatic->email = $obj->email; + $companystatic->code_compta = $obj->code_compta; $filename = dol_sanitizeFileName($obj->ref); $filedir = $conf->propal->multidir_output[$obj->entity].'/'.dol_sanitizeFileName($obj->ref); diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index 85036543e18..6bd6067dcf7 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -44,7 +44,10 @@ class CommandeStats extends Stats public $userid; public $from; + public $from_line; public $field; + public $field_line; + public $categ_link; public $where; public $join; @@ -77,6 +80,7 @@ class CommandeStats extends Stats $this->field = 'total_ht'; $this->field_line = 'total_ht'; //$this->where .= " c.fk_statut > 0"; // Not draft and not cancelled + $this->categ_link = MAIN_DB_PREFIX.'categorie_societe'; } elseif ($mode == 'supplier') { $object = new CommandeFournisseur($this->db); $this->from = MAIN_DB_PREFIX.$object->table_element." as c"; @@ -84,6 +88,7 @@ class CommandeStats extends Stats $this->field = 'total_ht'; $this->field_line = 'total_ht'; //$this->where .= " c.fk_statut > 2"; // Only approved & ordered + $this->categ_link = MAIN_DB_PREFIX.'categorie_fournisseur'; } //$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity; $this->where .= ($this->where ? ' AND ' : '').'c.entity IN ('.getEntity('commande').')'; @@ -104,7 +109,7 @@ class CommandeStats extends Stats } if ($categid) { - $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cats ON cats.fk_soc = c.fk_soc'; + $this->join .= ' LEFT JOIN '.$this->categ_link.' as cats ON cats.fk_soc = c.fk_soc'; $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cat.rowid = cats.fk_categorie'; $this->where .= ' AND cat.rowid = '.((int) $categid); } diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 8c29a9ffc36..e629d7620f0 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -177,6 +177,10 @@ class Account extends CommonObject * @var int ID */ public $fk_accountancy_journal; + /** + * @var string Label of journal + */ + public $accountancy_journal; /** * Currency code @@ -281,6 +285,7 @@ class Account extends CommonObject 'rappro' =>array('type'=>'smallint(6)', 'label'=>'Rappro', 'enabled'=>1, 'visible'=>-1, 'position'=>120), 'url' =>array('type'=>'varchar(128)', 'label'=>'Url', 'enabled'=>1, 'visible'=>-1, 'position'=>125), 'account_number' =>array('type'=>'varchar(32)', 'label'=>'Account number', 'enabled'=>1, 'visible'=>-1, 'position'=>130), + 'fk_accountancy_journal' =>array('type'=>'integer', 'label'=>'Accountancy journal ID', 'enabled'=>1, 'visible'=>-1, 'position'=>132), 'accountancy_journal' =>array('type'=>'varchar(20)', 'label'=>'Accountancy journal', 'enabled'=>1, 'visible'=>-1, 'position'=>135), 'currency_code' =>array('type'=>'varchar(3)', 'label'=>'Currency code', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>140), 'min_allowed' =>array('type'=>'integer', 'label'=>'Min allowed', 'enabled'=>1, 'visible'=>-1, 'position'=>145), @@ -294,7 +299,6 @@ class Account extends CommonObject 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>175), 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>180), 'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>185), - 'fk_accountancy_journal' =>array('type'=>'integer', 'label'=>'Fk accountancy journal', 'enabled'=>1, 'visible'=>-1, 'position'=>190), ); // END MODULEBUILDER PROPERTIES @@ -311,9 +315,11 @@ class Account extends CommonObject */ const TYPE_SAVINGS = 0; + const STATUS_OPEN = 0; const STATUS_CLOSED = 1; + /** * Constructor * diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index f171546f6c1..be7c88c0a1a 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -227,9 +227,10 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) { $accountstatic->id = $obj->bid; $accountstatic->ref = $obj->bref; $accountstatic->number = $obj->bnumber; - $accountstatic->accountancy_number = $obj->account_number; - $accountstatic->accountancy_journal = $obj->accountancy_journal; + $accountstatic->account_number = $obj->account_number; + $accountstatic->fk_accountancy_journal = $obj->fk_accountancy_journal; $accountstatic->label = $obj->blabel; + print $accountstatic->getNomUrl(1); } else { print ' '; @@ -348,9 +349,10 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) { $accountstatic->id = $obj->bid; $accountstatic->ref = $obj->bref; $accountstatic->number = $obj->bnumber; - $accountstatic->accountancy_number = $obj->account_number; - $accountstatic->accountancy_journal = $obj->accountancy_journal; + $accountstatic->account_number = $obj->account_number; + $accountstatic->fk_accountancy_journal = $obj->fk_accountancy_journal; $accountstatic->label = $obj->blabel; + print $accountstatic->getNomUrl(1); } else { print ' '; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index a088d94a01c..be9e23afecc 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2232,6 +2232,14 @@ if (empty($reshook)) { $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)); setEventMessages($mesg, null, 'errors'); } else { + // Add batchinfo if the detail_batch array is defined + if (!empty($conf->productbatch->enabled) && !empty($lines[$i]->detail_batch) && is_array($lines[$i]->detail_batch) && !empty($conf->global->INVOICE_INCUDE_DETAILS_OF_LOTS_SERIALS)) { + $langs->load('productbatch'); + foreach ($lines[$i]->detail_batch as $batchline) { + $desc .= ' '.$langs->trans('Batch').' '.$batchline->batch.' '.$langs->trans('printQty', $batchline->qty).' '; + } + } + // Insert line $result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $date_start, $date_end, 0, $info_bits, '', $price_base_type, $pu_ttc, $type, - 1, $special_code, '', 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_options, $_POST['progress'], '', $fk_unit, $pu_ht_devise); diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index 52dac1c462a..5f7e277076c 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -50,8 +50,7 @@ $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'invoicetemplatelist'; // To manage different context of search - -$socid = GETPOST('socid', 'int'); +$optioncss = GETPOST('optioncss', 'alpha'); $socid = GETPOST('socid', 'int'); @@ -394,7 +393,7 @@ if ($resql) { if ($search_payment_term != '') { $param .= '&search_payment_term='.urlencode($search_payment_term); } - if ($search_recurring != '' && $search_recurrning != '-1') { + if ($search_recurring != '' && $search_recurring != '-1') { $param .= '&search_recurring='.urlencode($search_recurring); } if ($search_frequency > 0) { @@ -570,7 +569,7 @@ if ($resql) { if (!empty($arrayfields['s.nom']['checked'])) { print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER['PHP_SELF'], "s.nom", "", $param, "", $sortfield, $sortorder); } - if (!empty($arrayfields['f.total_total']['checked'])) { + if (!empty($arrayfields['f.total_ht']['checked'])) { print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], "f.total_ht", "", $param, 'class="right"', $sortfield, $sortorder); } if (!empty($arrayfields['f.total_tva']['checked'])) { @@ -789,12 +788,13 @@ if ($resql) { } } // Action column - print ''; + print ''; if ($user->rights->facture->creer && empty($invoicerectmp->suspended)) { if ($invoicerectmp->isMaxNbGenReached()) { print $langs->trans("MaxNumberOfGenerationReached"); } elseif (empty($objp->frequency) || $db->jdate($objp->date_when) <= $today) { print ''; + print img_picto($langs->trans("CreateBill"), 'add', 'class="paddingrightonly"'); print $langs->trans("CreateBill").''; } else { print $form->textwithpicto('', $langs->trans("DateIsNotEnough")); diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 12a6eb97d13..03acd9d88eb 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -8,7 +8,7 @@ * Copyright (C) 2014 Raphaël Doursenaud * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> * Copyright (C) 2015 Juanjo Menent - * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2018-2021 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 @@ -465,7 +465,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie // Date payment print ''.$langs->trans('Date').''; - $datepayment = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datepayment = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); $datepayment = ($datepayment == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE) ?-1 : '') : $datepayment); print $form->selectDate($datepayment, '', '', '', 0, "add_paiement", 1, 1, 0, '', '', $facture->date); print ''; @@ -598,7 +598,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ' '; print "\n"; - $total = 0; + $total_ttc = 0; $totalrecu = 0; $totalrecucreditnote = 0; $totalrecudeposits = 0; @@ -754,15 +754,14 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie // Warning print ''; //print "xx".$amounts[$invoice->id]."-".$amountsresttopay[$invoice->id]."
"; - if ($amounts[$invoice->id] && (abs($amounts[$invoice->id]) > abs($amountsresttopay[$invoice->id])) - || $multicurrency_amounts[$invoice->id] && (abs($multicurrency_amounts[$invoice->id]) > abs($multicurrency_amountsresttopay[$invoice->id]))) { + if (!empty($amounts[$invoice->id]) && (abs($amounts[$invoice->id]) > abs($amountsresttopay[$invoice->id])) + || !empty($multicurrency_amounts[$invoice->id]) && (abs($multicurrency_amounts[$invoice->id]) > abs($multicurrency_amountsresttopay[$invoice->id]))) { print ' '.img_warning($langs->trans("PaymentHigherThanReminderToPay")); } print ''; print "\n"; - $total += $objp->total; $total_ttc += $objp->total_ttc; $totalrecu += $paiement; $totalrecucreditnote += $creditnotes; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 19a040bf091..cf19f1178f6 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -494,24 +494,24 @@ $moreforfilter = ''; if ($user->rights->societe->client->voir || $socid) { $langs->load("commercial"); $moreforfilter .= '
'; - $tmpttile = $langs->trans('ThirdPartiesOfSaleRepresentative'); - $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmpttile, 'maxwidth250'); + $tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250'); $moreforfilter .= '
'; } // If the user can view other users if ($user->rights->user->user->lire) { $moreforfilter .= '
'; - $tmpttile = $langs->trans('LinkedToSpecificUsers'); - $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmpttile, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250'); + $tmptitle = $langs->trans('LinkedToSpecificUsers'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250'); $moreforfilter .= '
'; } // If the user can view categories of products if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
'; - $tmpttile = $langs->trans('IncludingProductWithTag'); + $tmptitle = $langs->trans('IncludingProductWithTag'); $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); - $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmpttile, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); $moreforfilter .= '
'; } @@ -706,6 +706,7 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $ print "\n"; $totalarray = array(); +$totalarray['nbfield'] = 0; $typenArray = array(); $cacheCountryIDCode = array(); diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 72279faf16b..f39c73b5bf0 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2018-2021 Nicolas ZABOURI * Copyright (C) 2018 Juanjo Menent * Copyright (C) 2019 Ferran Marcet * Copyright (C) 2019-2021 Frédéric France @@ -1267,7 +1267,7 @@ if (!$error && $massaction == 'validate' && $permissiontoadd) { if ($nbok > 1) { setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); } else { - setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); } $db->commit(); } else { @@ -1330,7 +1330,7 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == ' if ($nbok > 1) { setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); } else { - setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); + setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); } $db->commit(); } else { diff --git a/htdocs/core/boxes/box_graph_nb_tickets_type.php b/htdocs/core/boxes/box_graph_nb_tickets_type.php index aee3e68ee5d..712c28df851 100644 --- a/htdocs/core/boxes/box_graph_nb_tickets_type.php +++ b/htdocs/core/boxes/box_graph_nb_tickets_type.php @@ -66,6 +66,10 @@ class box_graph_nb_tickets_type extends ModeleBoxes public function loadBox($max = 5) { global $conf, $user, $langs; + global $theme_datacolor, $badgeStatus8; + + require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php"; + $badgeStatus0 = '#cbd3d3'; // draft $badgeStatus1 = '#bc9526'; // validated @@ -98,29 +102,22 @@ class box_graph_nb_tickets_type extends ModeleBoxes if ($resql) { $num = $this->db->num_rows($resql); $i = 0; + $newcolorkey = 0; + $colorused = array(); while ($i < $num) { $objp = $this->db->fetch_object($resql); $listofoppcode[$objp->rowid] = $objp->code; $listofopplabel[$objp->rowid] = $objp->label; - switch ($objp->code) { - case 'COM': - $colorseriesstat[$objp->rowid] = $badgeStatus1; - break; - case 'HELP': - $colorseriesstat[$objp->rowid] = $badgeStatus2; - break; - case 'ISSUE': - $colorseriesstat[$objp->rowid] = $badgeStatus3; - break; - case 'REQUEST': - $colorseriesstat[$objp->rowid] = $badgeStatus4; - break; - case 'OTHER': - $colorseriesstat[$objp->rowid] = $badgeStatus5; - break; - default: - break; + if (empty($colorused[$objp->code])) { + if ($objp->code == 'ISSUE') { + $colorused[$objp->code] = $badgeStatus8; + } else { + $colorused[$objp->code] = colorArrayToHex($theme_datacolor[$newcolorkey]); + $newcolorkey++; + } } + $colorseriesstat[$objp->rowid] = $colorused[$objp->code]; + $i++; } } else { diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 3f4b2dd9ee6..9e312bee679 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2566,7 +2566,7 @@ abstract class CommonObject /** * Change the transport mode methods * - * @param int $id Id of new payment method + * @param int $id Id of transport mode * @return int >0 if OK, <0 if KO */ public function setTransportMode($id) @@ -6397,7 +6397,7 @@ abstract class CommonObject $param = array(); $param['options'] = array(); $reg = array(); - $size = $this->fields[$key]['size']; + $size = !empty($this->fields[$key]['size']) ? $this->fields[$key]['size'] : 0; // Because we work on extrafields if (preg_match('/^(integer|link):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N'); @@ -6430,21 +6430,21 @@ abstract class CommonObject } // Special case that force options and type ($type can be integer, varchar, ...) - if (is_array($this->fields[$key]['arrayofkeyval'])) { + if (!empty($this->fields[$key]['arrayofkeyval']) && is_array($this->fields[$key]['arrayofkeyval'])) { $param['options'] = $this->fields[$key]['arrayofkeyval']; $type = 'select'; } $label = $this->fields[$key]['label']; //$elementtype=$this->fields[$key]['elementtype']; // Seems not used - $default = $this->fields[$key]['default']; - $computed = $this->fields[$key]['computed']; - $unique = $this->fields[$key]['unique']; - $required = $this->fields[$key]['required']; - $autofocusoncreate = $this->fields[$key]['autofocusoncreate']; + $default = (!empty($this->fields[$key]['default']) ? $this->fields[$key]['default'] : ''); + $computed = (!empty($this->fields[$key]['computed']) ? $this->fields[$key]['computed'] : ''); + $unique = (!empty($this->fields[$key]['unique']) ? $this->fields[$key]['unique'] : 0); + $required = (!empty($this->fields[$key]['required']) ? $this->fields[$key]['required'] : 0); + $autofocusoncreate = (!empty($this->fields[$key]['autofocusoncreate']) ? $this->fields[$key]['autofocusoncreate'] : 0); - $langfile = $this->fields[$key]['langfile']; - $list = $this->fields[$key]['list']; + $langfile = (!empty($this->fields[$key]['langfile']) ? $this->fields[$key]['langfile'] : ''); + $list = (!empty($this->fields[$key]['list']) ? $this->fields[$key]['list'] : 0); $hidden = (in_array(abs($this->fields[$key]['visible']), array(0, 2)) ? 1 : 0); $objectid = $this->id; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 1f90b5f4fdc..0944918f815 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5289,9 +5289,9 @@ class Form global $langs; if ($htmlname != "none") { print '
'; - print ''; + print ''; print ''; - $this->selectTransportMode($selected, $htmlname, 2, $addempty, 0, 0, $active); + $this->selectTransportMode($selected, $htmlname, 0, $addempty, 0, 0, $active); print ''; print '
'; } else { @@ -8325,10 +8325,10 @@ class Form $nophoto = 'company'; } else { $nophoto = '/public/theme/common/user_anonymous.png'; - if ($object->gender == 'man') { + if (!empty($object->gender) && $object->gender == 'man') { $nophoto = '/public/theme/common/user_man.png'; } - if ($object->gender == 'woman') { + if (!empty($object->gender) && $object->gender == 'woman') { $nophoto = '/public/theme/common/user_woman.png'; } } diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 3cec6c19789..b10ac80416f 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -259,7 +259,7 @@ class FormTicket $doleditor->Create(); print ''; - if (!empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) { + if ($public && !empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; print ''; print ''; @@ -569,90 +569,194 @@ class FormTicket * @param int $noadmininfo 0=Add admin info, 1=Disable admin info * @param int $maxlength Max length of label * @param string $morecss More CSS + * @param int $use_multilevel if != 0 create a multilevel select ( Do not use any of the other params) * @return void */ - public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '') + public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '', $use_multilevel = 0) { global $langs, $user; - $ticketstat = new Ticket($this->db); + if ($use_multilevel == 0) { + $ticketstat = new Ticket($this->db); - dol_syslog(get_class($this)."::selectCategoryTickets ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG); + dol_syslog(get_class($this)."::selectCategoryTickets ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG); - $ticketstat->loadCacheCategoriesTickets(); + $ticketstat->loadCacheCategoriesTickets(); - print ''; + if ($empty) { + print ''; + } - if (is_array($ticketstat->cache_category_tickets) && count($ticketstat->cache_category_tickets)) { - foreach ($ticketstat->cache_category_tickets as $id => $arraycategories) { - // Exclude some record - if ($filtertype == 'public=1') { - if (empty($arraycategories['public'])) { + if (is_array($ticketstat->cache_category_tickets) && count($ticketstat->cache_category_tickets)) { + foreach ($ticketstat->cache_category_tickets as $id => $arraycategories) { + // Exclude some record + if ($filtertype == 'public=1') { + if (empty($arraycategories['public'])) { + continue; + } + } + + // We discard empty line if showempty is on because an empty line has already been output. + if ($empty && empty($arraycategories['code'])) { continue; } + + if ($format == 0) { + print ''; } - - // We discard empty line if showempty is on because an empty line has already been output. - if ($empty && empty($arraycategories['code'])) { - continue; - } - - if ($format == 0) { - print ''; } - } - print ''; - if ($user->admin && !$noadmininfo) { - print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - } + print ''; + if ($user->admin && !$noadmininfo) { + print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + } - print ajax_combobox('select'.$htmlname); + print ajax_combobox('select'.$htmlname); + } else { + $groupticket=GETPOST('groupticket', 'aZ09'); + $groupticketchild=GETPOST('groupticket_child', 'aZ09'); + $arraycodenotparent[] = ""; + $stringtoprint = ''.$langs->trans("GroupOfTicket").' '; + $stringtoprint .= ''; + } + $stringtoprint .= ' '; + + $stringtoprint .= ''; + + $stringtoprint .=''; + return $stringtoprint; + } } /** diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 45d1bdca12e..61a3869fe1a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8068,7 +8068,7 @@ function picto_from_langcode($codelang, $moreatt = '') * Return default language from country code. * Return null if not found. * - * @param string $countrycode Country code like 'US', 'FR', 'CA', ... + * @param string $countrycode Country code like 'US', 'FR', 'CA', 'ES', 'MX', ... * @return string Value of locale like 'en_US', 'fr_FR', ... */ function getLanguageCodeFromCountryCode($countrycode) @@ -8092,6 +8092,9 @@ function getLanguageCodeFromCountryCode($countrycode) if ($mysoc->country_code == 'DE') { return 'de_CH'; } + if ($mysoc->country_code == 'IT') { + return 'it_CH'; + } } // Locale list taken from: @@ -8232,6 +8235,7 @@ function getLanguageCodeFromCountryCode($countrycode) 'pt-BR', 'pt-PT', 'rm-CH', + 'ro-MD', 'ro-RO', 'ru-RU', 'rw-RW', diff --git a/htdocs/core/lib/payments.lib.php b/htdocs/core/lib/payments.lib.php index 59d9eb4aa4c..4621e22d122 100644 --- a/htdocs/core/lib/payments.lib.php +++ b/htdocs/core/lib/payments.lib.php @@ -158,7 +158,7 @@ function getValidOnlinePaymentMethods($paymentmethod = '') /** * Return string with full online payment Url * - * @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'membersubscription' ...) + * @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'member' ...) * @param string $ref Ref of object * @return string Url string */ @@ -182,7 +182,7 @@ function showOnlinePaymentUrl($type, $ref) /** * Return string with HTML link for online payment * - * @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'membersubscription' ...) + * @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'member' ...) * @param string $ref Ref of object * @param string $label Text or HTML tag to display, if empty it display the URL * @return string Url string @@ -199,7 +199,7 @@ function getHtmlOnlinePaymentLink($type, $ref, $label = '') * Return string with full Url * * @param int $mode 0=True url, 1=Url formated with colors - * @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'membersubscription' ...) + * @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'member' ...) * @param string $ref Ref of object * @param int $amount Amount (required for $type='free' only) * @param string $freetag Free tag @@ -304,7 +304,7 @@ function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag } } elseif ($type == 'member' || $type == 'membersubscription') { $newtype = 'member'; - $out = $urltouse.'/public/payment/newpayment.php?source=membersubscription&ref='.($mode ? '' : ''); + $out = $urltouse.'/public/payment/newpayment.php?source=member&ref='.($mode ? '' : ''); if ($mode == 1) { $out .= 'member_ref'; } diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index ffa06ebd508..9c33744ceb0 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -2693,6 +2693,7 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide // define progress color according to time spend vs workload $progressBarClass = 'progress-bar-info'; + $progressCalculated = 0; if ($task->planned_workload) { $progressCalculated = round(100 * floatval($task->duration_effective) / floatval($task->planned_workload), 2); diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 0aed96df0e5..f75f5ecab56 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -434,13 +434,12 @@ class pdf_cyan extends ModelePDFPropales if (!empty($conf->global->MAIN_ADD_CREATOR_IN_NOTE) && $object->user_author_id > 0) { $tmpuser = new User($this->db); $tmpuser->fetch($object->user_author_id); - $notetoshow .= $langs->trans("CaseFollowedBy").' '.$tmpuser->getFullName($langs); - if ($tmpuser->email) { - $notetoshow .= ', Mail: '.$tmpuser->email; - } - if ($tmpuser->office_phone) { - $notetoshow .= ', Tel: '.$tmpuser->office_phone; - } + + $creator_info = $langs->trans("CaseFollowedBy").' '.$tmpuser->getFullName($langs); + if ($tmpuser->email) $creator_info .= ', '.$langs->trans("EMail").': '.$tmpuser->email; + if ($tmpuser->office_phone) $creator_info .= ', '.$langs->trans("Phone").': '.$tmpuser->office_phone; + + $notetoshow = dol_concatdesc($notetoshow, $creator_info); } $tab_height = $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforsignature - $heightforfooter; 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 8f6d12df1d0..08345647b0f 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -2,7 +2,7 @@ /* Copyright (C) 2010-2011 Juanjo Menent * Copyright (C) 2010-2014 Laurent Destailleur * Copyright (C) 2015 Marcos García - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2021 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 @@ -376,7 +376,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); $pdf->SetFont('', '', $default_font_size - 1); - $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top - 1, dol_htmlentitiesbr($object->note_public), 0, 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top - 1, dol_htmlentitiesbr($notetoshow), 0, 1); $nexY = $pdf->GetY(); $height_note = $nexY - $tab_top; @@ -1062,7 +1062,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices * @param FactureFournisseur $object Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output - * @return void + * @return int */ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) { 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 c60f82e9c4a..245897e1956 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -240,8 +240,15 @@ class pdf_cornas extends ModelePDFSuppliersOrders $realpath = ''; foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - $filename = $obj['photo']; - //if ($obj['photo_vignette']) $filename='thumbs/'.$obj['photo_vignette']; + if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if ($obj['photo_vignette']) { + $filename = $obj['photo_vignette']; + } else { + $filename = $obj['photo']; + } + } else { + $filename = $obj['photo']; + } $realpath = $dir.$filename; break; } 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 c6d9cf8da14..bb12b19c829 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -254,8 +254,15 @@ class pdf_muscadet extends ModelePDFSuppliersOrders } $realpath = ''; foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - $filename = $obj['photo']; - //if ($obj['photo_vignette']) $filename='thumbs/'.$obj['photo_vignette']; + if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if ($obj['photo_vignette']) { + $filename = $obj['photo_vignette']; + } else { + $filename = $obj['photo']; + } + } else { + $filename = $obj['photo']; + } $realpath = $dir.$filename; break; } 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 c6cc6e8d1b1..cbcec7cfdd9 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -245,14 +245,21 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdir = get_exdir($object->lines[$i]->fk_product, 2, 0, 0, $objphoto, 'product').$object->lines[$i]->fk_product."/photos/"; $dir = $conf->product->dir_output.'/'.$pdir; } else { - $pdir = get_exdir(0, 2, 0, 0, $objphoto, 'product').dol_sanitizeFileName($objphoto->ref).'/'; + $pdir = get_exdir(0, 0, 0, 0, $objphoto, 'product'); $dir = $conf->product->dir_output.'/'.$pdir; } $realpath = ''; foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) { - $filename = $obj['photo']; - //if ($obj['photo_vignette']) $filename='thumbs/'.$obj['photo_vignette']; + if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) { // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo + if ($obj['photo_vignette']) { + $filename = $obj['photo_vignette']; + } else { + $filename = $obj['photo']; + } + } else { + $filename = $obj['photo']; + } $realpath = $dir.$filename; break; } diff --git a/htdocs/core/tpl/commonfields_add.tpl.php b/htdocs/core/tpl/commonfields_add.tpl.php index 639be537dba..3a43f04c149 100644 --- a/htdocs/core/tpl/commonfields_add.tpl.php +++ b/htdocs/core/tpl/commonfields_add.tpl.php @@ -82,7 +82,7 @@ foreach ($object->fields as $key => $val) { } else { $value = GETPOST($key, 'alphanohtml'); } - if ($val['noteditable']) { + if (!empty($val['noteditable'])) { print $object->showOutputField($val, $key, $value, '', '', '', 0); } else { print $object->showInputField($val, $key, $value, '', '', '', 0); diff --git a/htdocs/core/tpl/commonfields_view.tpl.php b/htdocs/core/tpl/commonfields_view.tpl.php index 4b7821c2dad..f9da77c5894 100644 --- a/htdocs/core/tpl/commonfields_view.tpl.php +++ b/htdocs/core/tpl/commonfields_view.tpl.php @@ -74,7 +74,7 @@ foreach ($object->fields as $key => $val) { if ($val['type'] == 'text') { print ' wordbreak'; } - if ($val['cssview']) { + if (!empty($val['cssview'])) { print ' '.$val['cssview']; } print '">'; diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index b5dc9b90be0..9af5bc7d7b4 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -180,7 +180,7 @@ if ($disablenofollow) { } ?> -" name="username" class="flat input-icon-user minwidth150" value="" tabindex="1" autofocus="autofocus" /> +" name="username" class="flat input-icon-user minwidth150" value="" tabindex="1" autofocus="autofocus" />
@@ -192,7 +192,7 @@ if ($disablenofollow) { } ?> -" name="password" class="flat input-icon-password minwidth150" type="password" value="" tabindex="2" autocomplete="global->MAIN_LOGIN_ENABLE_PASSWORD_AUTOCOMPLETE) ? 'off' : 'on'; ?>" /> +" name="password" class="flat input-icon-password minwidth150" value="" tabindex="2" autocomplete="global->MAIN_LOGIN_ENABLE_PASSWORD_AUTOCOMPLETE) ? 'off' : 'on'; ?>" /> -" id="username" name="username" class="flat input-icon-user minwidth150" value="" tabindex="1" /> +" id="username" name="username" class="flat input-icon-user minwidth150" value="" tabindex="1" /> diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 8e98030b484..8e23c258d88 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -544,13 +544,18 @@ class InterfaceActionsAuto extends DolibarrTriggers $object->sendtoid = 0; } elseif ($action == 'ORDER_SUPPLIER_REFUSE') { // Load translation files required by the page - $langs->loadLangs(array("agenda", "other", "orders")); + $langs->loadLangs(array("agenda", "other", "orders", "main")); if (empty($object->actionmsg2)) { $object->actionmsg2 = $langs->transnoentities("OrderRefusedInDolibarr", $object->ref); } $object->actionmsg = $langs->transnoentities("OrderRefusedInDolibarr", $object->ref); + if (!empty($object->refuse_note)) { + $object->actionmsg .= '
'; + $object->actionmsg .= $langs->trans("Reason") . ': '.$object->refuse_note; + } + $object->sendtoid = 0; } elseif ($action == 'ORDER_SUPPLIER_SUBMIT') { // Load translation files required by the page diff --git a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php index 28565114a21..d4db5ebccfc 100644 --- a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php @@ -125,6 +125,50 @@ class InterfaceLdapsynchro extends DolibarrTriggers $newparent = $object->_load_ldap_dn($info, 1); $result = $ldap->update($dn, $info, $user, $olddn, $newrdn, $newparent); + + if ($result > 0 && !empty($object->context['newgroupid'])) { // We are in context of adding a new group to user + $usergroup = new Usergroup($this->db); + + $usergroup->fetch($object->context['newgroupid']); + + $oldinfo = $usergroup->_load_ldap_info(); + $olddn = $usergroup->_load_ldap_dn($oldinfo); + + // Verify if entry exist + $container = $usergroup->_load_ldap_dn($oldinfo, 1); + $search = "(".$usergroup->_load_ldap_dn($oldinfo, 2).")"; + $records = $ldap->search($container, $search); + if (count($records) && $records['count'] == 0) { + $olddn = ''; + } + + $info = $usergroup->_load_ldap_info(); // Contains all members, included the new one (insert already done before trigger call) + $dn = $usergroup->_load_ldap_dn($info); + + $result = $ldap->update($dn, $info, $user, $olddn); + } + + if ($result > 0 && !empty($object->context['oldgroupid'])) { // We are in context of removing a group from user + $usergroup = new Usergroup($this->db); + + $usergroup->fetch($object->context['oldgroupid']); + + $oldinfo = $usergroup->_load_ldap_info(); + $olddn = $usergroup->_load_ldap_dn($oldinfo); + + // Verify if an entry exists + $container = $usergroup->_load_ldap_dn($oldinfo, 1); + $search = "(".$usergroup->_load_ldap_dn($oldinfo, 2).")"; + $records = $ldap->search($container, $search); + if (count($records) && $records['count'] == 0) { + $olddn = ''; + } + + $info = $usergroup->_load_ldap_info(); // Contains all members, except the old one (remove already done before trigger call) + $dn = $usergroup->_load_ldap_dn($info); + + $result = $ldap->update($dn, $info, $user, $olddn); + } } if ($result < 0) { diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 2132cbc141b..80371b14889 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -202,7 +202,7 @@ if (empty($reshook)) { $permissiontodelete = $user->rights->cron->delete; $uploaddir = $conf->cron->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; - if ($permissiontoadd) { + if ($massaction && $permissiontoadd) { $tmpcron = new Cronjob($db); foreach ($toselect as $id) { $result = $tmpcron->fetch($id); @@ -600,7 +600,7 @@ if ($num > 0) { print ''; // Output of last run - print ''; + print ''; if (!empty($obj->lastoutput)) { print dol_trunc(nl2br($obj->lastoutput), 50); } diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php index f5f8f1507bf..bb8649106b9 100644 --- a/htdocs/eventorganization/class/conferenceorbooth.class.php +++ b/htdocs/eventorganization/class/conferenceorbooth.class.php @@ -134,6 +134,8 @@ class ConferenceOrBooth extends ActionComm public $status; // END MODULEBUILDER PROPERTIES + public $pubregister; + /** * Constructor * @@ -212,6 +214,8 @@ class ConferenceOrBooth extends ActionComm $this->type_id=$this->fk_action; $this->socid=$this->fk_soc; $this->datef=$this->datep2; + $this->note_private=$this->note; + $this->fk_user_author=$this->fk_user_author; } /** diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php index d84a3785a75..2fbf30b1c70 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -1070,6 +1070,23 @@ class ConferenceOrBoothAttendee extends CommonObject return $error; } + + /** + * Function used to replace a thirdparty id with another one. + * + * @param DoliDB $db Database handler + * @param int $origin_id Old thirdparty id + * @param int $dest_id New thirdparty id + * @return bool + */ + public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id) + { + $tables = array( + 'eventorganization_conferenceorboothattendee' + ); + + return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); + } } diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php index 3e480efca54..15664896700 100644 --- a/htdocs/eventorganization/conferenceorbooth_list.php +++ b/htdocs/eventorganization/conferenceorbooth_list.php @@ -427,7 +427,17 @@ if ($projectid > 0) { print ""; print ''.$langs->trans("EventOrganizationICSLink").''; - print ''; + // Define $urlwithroot + $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); + $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; + + // Show message + $message = 'global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...'); + $message .= "&project=".$projectid.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').''; + $message .= ''; + $message .= '
'; + print $message; print ""; @@ -447,6 +457,7 @@ if ($projectid > 0) { // -------------------------------------------------------------------- $sql = 'SELECT '; $sql .= $object->getFieldList('t'); + // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index cc441d9f50f..ae643ee688a 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -2138,7 +2138,8 @@ if ($action == 'create') { // only show lot numbers from src warehouse when shipping from multiple warehouses $line->fetch($detail_batch->fk_expeditiondet); } - print ''.$formproduct->selectLotStock($detail_batch->fk_origin_stock, 'batchl'.$detail_batch->fk_expeditiondet.'_'.$detail_batch->fk_origin_stock, '', 1, 0, $lines[$i]->fk_product, $line->entrepot_id).''; + $entrepot_id = !empty($detail_batch->entrepot_id)?$detail_batch->entrepot_id:$lines[$i]->entrepot_id; + print ''.$formproduct->selectLotStock($detail_batch->fk_origin_stock, 'batchl'.$detail_batch->fk_expeditiondet.'_'.$detail_batch->fk_origin_stock, '', 1, 0, $lines[$i]->fk_product, $entrepot_id).''; print ''; } // add a 0 qty lot row to be able to add a lot diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index f7c5a1d32a8..ea5bd17fdfb 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -468,11 +468,11 @@ class Expedition extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Create the detail (eat-by date) of the expedition line + * Create the detail of the expedition line. Create 1 record into expeditiondet for each warehouse and n record for each lot in this warehouse into expeditiondet_batch. * - * @param object $line_ext full line informations + * @param object $line_ext Objet with full information of line. $line_ext->detail_batch must be an array of ExpeditionLineBatch * @param array $array_options extrafields array - * @return int <0 if KO, >0 if OK + * @return int <0 if KO, >0 if OK */ public function create_line_batch($line_ext, $array_options = 0) { @@ -496,7 +496,7 @@ class Expedition extends CommonObject // create shipment batch lines for stockLocation foreach ($tab as $detbatch) { if ($detbatch->entrepot_id == $stockLocation) { - if (!($detbatch->create($line_id) > 0)) { // Create an expeditionlinebatch + if (!($detbatch->create($line_id) > 0)) { // Create an ExpeditionLineBatch $error++; } } diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 25ee6072a90..34bef81e5a2 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2015 Laurent Destailleur * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (c) 2018 Frédéric France + * Copyright (c) 2018-2021 Frédéric France * Copyright (C) 2016-2020 Ferran Marcet * * This program is free software; you can redistribute it and/or modify @@ -2478,9 +2478,9 @@ class ExpenseReport extends CommonObject $now = dol_now(); if ($option == 'toapprove') { - return ($this->datevalid ? $this->datevalid : $this->date_valid) < ($now - $conf->expensereport->approve->warning_delay); + return (!empty($this->datevalid) ? $this->datevalid : $this->date_valid) < ($now - $conf->expensereport->approve->warning_delay); } else { - return ($this->datevalid ? $this->datevalid : $this->date_valid) < ($now - $conf->expensereport->payment->warning_delay); + return (!empty($this->datevalid) ? $this->datevalid : $this->date_valid) < ($now - $conf->expensereport->payment->warning_delay); } } diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 88c5a1cefc0..e138c8ed6fe 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1546,8 +1546,9 @@ if ($action == 'create') { // Validate if ($object->statut == Fichinter::STATUS_DRAFT && (count($object->lines) > 0 || !empty($conf->global->FICHINTER_DISABLE_DETAILS))) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->ficheinter->creer) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->ficheinter->ficheinter_advance->validate)) { - print ''; + print ''; + } else { + print '
'.$langs->trans("Validate").'
'; } } @@ -1582,7 +1583,7 @@ if ($action == 'create') { } } - // create intervention model + // Create intervention model if ($conf->global->MAIN_FEATURES_LEVEL >= 1 && $object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer && (count($object->lines) > 0)) { print '
'; print ''.$langs->trans("ChangeIntoRepeatableIntervention").''; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index d094916ef38..e2196d5595d 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -156,6 +156,8 @@ class CommandeFournisseur extends CommonOrder public $user_approve_id; public $user_approve_id2; // Used when SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED is set + public $refuse_note; + public $extraparams = array(); /** @@ -695,7 +697,7 @@ class CommandeFournisseur extends CommonOrder public function LibStatut($status, $mode = 0, $billed = 0) { // phpcs:enable - global $conf, $langs; + global $conf, $langs, $hookmanager; if (empty($this->statuts) || empty($this->statutshort)) { $langs->load('orders'); @@ -754,6 +756,11 @@ class CommandeFournisseur extends CommonOrder $statusLong = $langs->transnoentitiesnoconv($this->statuts[$status]).$billedtext; $statusShort = $langs->transnoentitiesnoconv($this->statutshort[$status]); + $parameters = array('status' => $status, 'mode' => $mode, 'billed' => $billed); + $reshook = $hookmanager->executeHooks('LibStatut', $parameters, $this); // Note that $action and $object may have been modified by hook + if ($reshook > 0) { + return $hookmanager->resPrint; + } return dolGetStatus($statusLong, $statusShort, '', $statusClass, $mode); } diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index 0f8b8341a3d..5457a9ee376 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -333,7 +333,6 @@ class CommandeFournisseurDispatch extends CommonObject */ public function update($user, $notrigger = 0) { - global $conf, $langs; $error = 0; // Clean parameters @@ -411,12 +410,12 @@ class CommandeFournisseurDispatch extends CommonObject } if (!$notrigger) { - // Uncomment this and change MYOBJECT to your own tag if you + // Call triggers $result = $this->call_trigger('LINERECEPTION_UPDATE', $user); if ($result < 0) { $error++; } - //// End call triggers + // End call triggers } } @@ -444,24 +443,22 @@ class CommandeFournisseurDispatch extends CommonObject */ public function delete($user, $notrigger = 0) { - global $conf, $langs; $error = 0; $this->db->begin(); if (!$error) { if (!$notrigger) { - // Uncomment this and change MYOBJECT to your own tag if you - // want this action calls a trigger. - - //// Call triggers - //$result=$this->call_trigger('MYOBJECT_DELETE',$user); - //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} - //// End call triggers + // Call triggers + $result = $this->call_trigger('LINERECEPTION_DELETE', $user); + if ($result < 0) { + $error++; + } + // End call triggers } } - // Remove extrafields + // Remove extrafields if (!$error) { $result = $this->deleteExtraFields(); if ($result < 0) { @@ -496,7 +493,6 @@ class CommandeFournisseurDispatch extends CommonObject } - /** * Load an object from its id and create a new one in database * diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 637f29e87b8..81533dae324 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -214,6 +214,11 @@ class FactureFournisseur extends CommonInvoice public $mode_reglement_id; public $mode_reglement_code; + /** + * @var int transport mode id + */ + public $transport_mode_id; + public $extraparams = array(); /** @@ -670,6 +675,7 @@ class FactureFournisseur extends CommonInvoice $sql .= ' s.nom as socnom, s.rowid as socid,'; $sql .= ' t.fk_incoterms, t.location_incoterms,'; $sql .= " i.libelle as label_incoterms,"; + $sql .= ' t.fk_transport_mode,'; $sql .= ' t.fk_multicurrency, t.multicurrency_code, t.multicurrency_tx, t.multicurrency_total_ht, t.multicurrency_total_tva, t.multicurrency_total_ttc'; $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as t'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON (t.fk_soc = s.rowid)"; @@ -742,14 +748,15 @@ class FactureFournisseur extends CommonInvoice $this->fk_incoterms = $obj->fk_incoterms; $this->location_incoterms = $obj->location_incoterms; $this->label_incoterms = $obj->label_incoterms; + $this->transport_mode_id = $obj->fk_transport_mode; // Multicurrency - $this->fk_multicurrency = $obj->fk_multicurrency; + $this->fk_multicurrency = $obj->fk_multicurrency; $this->multicurrency_code = $obj->multicurrency_code; - $this->multicurrency_tx = $obj->multicurrency_tx; + $this->multicurrency_tx = $obj->multicurrency_tx; $this->multicurrency_total_ht = $obj->multicurrency_total_ht; - $this->multicurrency_total_tva = $obj->multicurrency_total_tva; - $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; + $this->multicurrency_total_tva = $obj->multicurrency_total_tva; + $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; $this->extraparams = (array) json_decode($obj->extraparams, true); diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 8c4aa1e2a54..44a712969c1 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -70,8 +70,6 @@ $socid = GETPOST('socid', 'int'); $projectid = GETPOST('projectid', 'int'); $cancel = GETPOST('cancel', 'alpha'); $lineid = GETPOST('lineid', 'int'); - -$lineid = GETPOST('lineid', 'int'); $origin = GETPOST('origin', 'alpha'); $originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility @@ -960,6 +958,9 @@ if (empty($reshook)) { } if ($action == 'confirm_refuse' && $confirm == 'yes' && $usercanapprove) { + if (GETPOST('refuse_note')) { + $object->refuse_note = GETPOST('refuse_note'); + } $result = $object->refuse($user); if ($result > 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); @@ -1875,7 +1876,16 @@ if ($action == 'create') { // Confirmation de la desapprobation if ($action == 'refuse') { - $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("DenyingThisOrder"), $langs->trans("ConfirmDenyingThisOrder", $object->ref), "confirm_refuse", '', 0, 1); + $formquestion = array( + array( + 'type' => 'text', + 'name' => 'refuse_note', + 'label' => $langs->trans("MotifCP"), + 'value' => '', + 'morecss' => 'minwidth300' + ) + ); + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("DenyingThisOrder"), $langs->trans("ConfirmDenyingThisOrder", $object->ref), "confirm_refuse", $formquestion, 0, 1); } // Confirmation de l'annulation diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 4b8812cf22e..2c847b9a421 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -443,7 +443,7 @@ if ($action == 'updateline' && $user->rights->fournisseur->commande->receptionne $product = $supplierorderdispatch->fk_product; $price = price2num(GETPOST('price'), '', 2); $comment = $supplierorderdispatch->comment; - $eatby = $supplierorderdispatch->fk_product; + $eatby = $supplierorderdispatch->eatby; $sellby = $supplierorderdispatch->sellby; $batch = $supplierorderdispatch->batch; diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index e7f19d0671a..d8959ada7c0 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -881,10 +881,10 @@ if ($resql) { 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); if ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer) { - $arrayofmassactions['createbills'] = $langs->trans("CreateInvoiceForThisSupplier"); + $arrayofmassactions['createbills'] = img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("CreateInvoiceForThisSupplier"); } if ($user->rights->fournisseur->commande->supprimer) { - $arrayofmassactions['predelete'] = img_picto('', 'delete').$langs->trans("Delete"); + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); } if (in_array($massaction, array('presend', 'predelete', 'createbills'))) { $arrayofmassactions = array(); @@ -1287,6 +1287,7 @@ if ($resql) { $objectstatic->id = $obj->rowid; $objectstatic->ref = $obj->ref; + $objectstatic->socid = $obj->socid; $objectstatic->ref_supplier = $obj->ref_supplier; $objectstatic->socid = $obj->socid; $objectstatic->total_ht = $obj->total_ht; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 0bc26ea8f2b..622c494d095 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1791,8 +1791,8 @@ if (!empty($conf->projet->enabled)) { $now = dol_now(); $title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Card'); -$helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores"; -llxHeader('', $title, $helpurl); +$help_url = 'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen'; +llxHeader('', $title, $help_url); // Mode creation if ($action == 'create') { @@ -1875,10 +1875,10 @@ if ($action == 'create') { $objectsrc->fetch_optionals(); $object->array_options = $objectsrc->array_options; } else { - $cond_reglement_id = $societe->cond_reglement_supplier_id; - $mode_reglement_id = $societe->mode_reglement_supplier_id; + $cond_reglement_id = $societe->cond_reglement_supplier_id; + $mode_reglement_id = $societe->mode_reglement_supplier_id; $transport_mode_id = $societe->transport_mode_supplier_id; - $fk_account = $societe->fk_account; + $fk_account = $societe->fk_account; $datetmp = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); $dateinvoice = ($datetmp == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE) ?-1 : '') : $datetmp); $datetmp = dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear']); @@ -2889,12 +2889,12 @@ if ($action == 'create') { // Intracomm report if (!empty($conf->intracommreport->enabled)) { $langs->loadLangs(array("intracommreport")); - print ''; - print ''; diff --git a/htdocs/fourn/paiement/list.php b/htdocs/fourn/paiement/list.php index 6a38ae2033d..4da69cfc0c1 100644 --- a/htdocs/fourn/paiement/list.php +++ b/htdocs/fourn/paiement/list.php @@ -254,10 +254,10 @@ if ($optioncss != '') { if ($search_ref) { $param .= '&search_ref='.urlencode($search_ref); } -if ($saerch_day) { +if ($search_day) { $param .= '&search_day='.urlencode($search_day); } -if ($saerch_month) { +if ($search_month) { $param .= '&search_month='.urlencode($search_month); } if ($search_year) { diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index f411d70af25..ed137fd5d86 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -121,7 +121,7 @@ $form = new Form($db); $productstatic = new Product($db); $companystatic = new Societe($db); -$title = $langs->trans("ProductsAndServices"); +$title = $langs->trans('Supplier')." - ".$langs->trans('ProductsAndServices'); if ($fourn_id) { $supplier = new Fournisseur($db); diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index bab0655b4c2..97a70782e36 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -163,19 +163,23 @@ if (empty($reshook)) { $description = trim(GETPOST('description', 'restricthtml')); // Check that leave is for a user inside the hierarchy or advanced permission for all is set - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->write)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->id == $fuserid && empty($user->rights->holiday->write)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->id != $fuserid && empty($user->rights->holiday->writeall_advance)) - ) { - $error++; - setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors'); + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { + if (empty($user->rights->holiday->write)) { + $error++; + setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors'); + } elseif (!in_array($fuserid, $childids)) { + $error++; + setEventMessages($langs->trans("UserNotInHierachy"), null, 'errors'); + $action = 'create'; + } } else { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)) { - if (!in_array($fuserid, $childids)) { - $error++; - setEventMessages($langs->trans("UserNotInHierachy"), null, 'errors'); - $action = 'create'; - } + if (empty($user->rights->holiday->write) && empty($user->rights->holiday->writeall_advance)) { + $error++; + setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors'); + } elseif (empty($user->rights->holiday->writeall_advance) && !in_array($fuserid, $childids)) { + $error++; + setEventMessages($langs->trans("UserNotInHierachy"), null, 'errors'); + $action = 'create'; } } @@ -1136,7 +1140,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { } // On vérifie si l'utilisateur à le droit de lire cette demande - if ($cancreate) { + if ($canread) { $head = holiday_prepare_head($object); if (($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) || ($action == 'editvalidator')) { diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index b00abadb9c3..c62185d5f2a 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -117,7 +117,7 @@ $search_month_end = GETPOST('search_month_end', 'int'); $search_year_end = GETPOST('search_year_end', 'int'); $search_employee = GETPOST('search_employee', 'int'); $search_valideur = GETPOST('search_valideur', 'int'); -$search_status = GETPOST('search_statut', 'int'); +$search_status = GETPOST('search_status', 'int'); $search_type = GETPOST('search_type', 'int'); // Initialize technical objects @@ -722,6 +722,7 @@ if ($resql) { $i = 0; $totalarray = array(); + $totalarray['nbfield'] = 0; while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index 62991a6e0ee..698d71e5dc7 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -144,16 +144,16 @@ $sql .= " FROM ".MAIN_DB_PREFIX."holiday cp"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user u ON cp.fk_user = u.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_holiday_types ct ON cp.fk_type = ct.rowid"; $sql .= " WHERE cp.rowid > 0"; -$sql .= " AND cp.statut = 3"; // 3 = Approved +$sql .= " AND cp.statut = ".Holiday::STATUS_APPROVED; $sql .= " AND (date_format(cp.date_debut, '%Y-%m') = '".$db->escape($year_month)."' OR date_format(cp.date_fin, '%Y-%m') = '".$db->escape($year_month)."')"; if (!empty($search_ref)) { $sql .= natural_search('cp.ref', $search_ref); } -if (!empty($search_employee)) { - $sql .= " AND cp.fk_user = '".$db->escape($search_employee)."'"; +if (!empty($search_employee) && $search_employee > 0) { + $sql .= " AND cp.fk_user = ".((int) $search_employee); } -if (!empty($search_type)) { +if (!empty($search_type) && $search_type != '-1') { $sql .= ' AND cp.fk_type IN ('.$db->sanitize($search_type).')'; } if (!empty($search_description)) { @@ -413,7 +413,7 @@ if ($num == 0) { print ''; } if (!empty($arrayfields['cp.description']['checked'])) { - print ''; + print ''; } print ''; diff --git a/htdocs/install/mysql/data/llx_00_c_country.sql b/htdocs/install/mysql/data/llx_00_c_country.sql index 677447f1af2..1e2e8b69c39 100644 --- a/htdocs/install/mysql/data/llx_00_c_country.sql +++ b/htdocs/install/mysql/data/llx_00_c_country.sql @@ -216,21 +216,21 @@ INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (18 INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (184,'PL','POL','Pologne',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (185,'PR','PRI','Puerto Rico',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (186,'QA','QAT','Qatar',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (188,'RO','ROU','Roumanie',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (188,'RO','ROU','Romania',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (189,'RW','RWA','Rwanda',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (190,'SH','SHN','Sainte-Hélène',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (191,'KN','KNA','Saint-Christophe-et-Niévès',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (192,'LC','LCA','Sainte-Lucie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (193,'PM','SPM','Saint-Pierre-et-Miquelon',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (194,'VC','VCT','Saint-Vincent-et-les-Grenadines',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (190,'SH','SHN','Saint Helena',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (191,'KN','KNA','Saint Kitts and Nevis',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (192,'LC','LCA','Saint Lucia',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (193,'PM','SPM','Saint Pierre and Miquelon',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (194,'VC','VCT','Saint Vincent and the Grenadines',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (195,'WS','WSM','Samoa',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (196,'SM','SMR','Saint-Marin',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (197,'ST','STP','Sao Tomé-et-Principe',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (198,'RS','SRB','Serbie',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (196,'SM','SMR','San Marino ',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (197,'ST','STP','Saint Thomas and Prince',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (198,'RS','SRB','Serbia',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (199,'SC','SYC','Seychelles',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (200,'SL','SLE','Sierra Leone',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (201,'SK','SVK','Slovaquie',1,0); -INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (202,'SI','SVN','Slovénie',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (201,'SK','SVK','Slovakia',1,0); +INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (202,'SI','SVN','Slovenia',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (203,'SB','SLB','Iles Salomon',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (204,'SO','SOM','Somalie',1,0); INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (205,'ZA','ZAF','South Africa',1,0); diff --git a/htdocs/install/mysql/data/llx_accounting_account_at.sql b/htdocs/install/mysql/data/llx_accounting_account_at.sql index c20d5877dc2..402e6893e6b 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_at.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_at.sql @@ -22,324 +22,324 @@ -- 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, account_number, account_parent, label) VALUES (__ENTITY__, 321, 'AT-BASE','6','GROUP6','66300','0','Leistungserfassung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 1, 'AT-BASE','GROUP0','110','0','Patentrechte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 2, 'AT-BASE','GROUP0','120','0','Software'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3, 'AT-BASE','GROUP0','121','0','ERP System'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 4, 'AT-BASE','GROUP0','122','0','Homepage'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 5, 'AT-BASE','GROUP0','125','0','Software Fremdentwicklung_noch nicht aktivieren'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 6, 'AT-BASE','GROUP0','160','0','Umgründungsmehrwert'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 7, 'AT-BASE','GROUP0','250','0','Mieterinvestitionen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 8, 'AT-BASE','GROUP0','400','0','Maschinen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 9, 'AT-BASE','GROUP0','600','0','Betriebs u. Geschäftsausstattung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 10, 'AT-BASE','GROUP0','601','0','Ausstellungsstücke'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 11, 'AT-BASE','GROUP0','602','0','Leihstellungsstücke'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 12, 'AT-BASE','GROUP0','603','0','Getriebeprüfstand_hinten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 13, 'AT-BASE','GROUP0','604','0','Wuchtstand_links_AQ'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 14, 'AT-BASE','GROUP0','605','0','Messlabor(Messraum)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 15, 'AT-BASE','GROUP0','606','0','PAK-System'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 16, 'AT-BASE','GROUP0','607','0','Server'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 17, 'AT-BASE','GROUP0','608','0','EDV-Ausstattung (Hardware)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 18, 'AT-BASE','GROUP0','609','0','Werkstattausstattung (Werkzeug)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 19, 'AT-BASE','GROUP0','610','0','Wuchtprüfstand neu_noch nicht in Betrieb genommen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 20, 'AT-BASE','GROUP0','611','0','Messequipment/Ausstattung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 21, 'AT-BASE','GROUP0','630','0','PKW'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 22, 'AT-BASE','GROUP0','640','0','LKW'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 23, 'AT-BASE','GROUP0','680','0','GWG-Geschäftsausstattung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 24, 'AT-BASE','GROUP0','710','0','Anlagen in Bau'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 25, 'AT-BASE','GROUP1','1100','0','Rohstoffe'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 26, 'AT-BASE','GROUP1','1200','0','Bezogenen Teile'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 27, 'AT-BASE','GROUP1','1300','0','Hilfsstoffe und Betriebsstoffe'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 28, 'AT-BASE','GROUP1','1400','0','fertige Erzeugnisse'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 29, 'AT-BASE','GROUP1','1500','0','unfertige Erzeugnisse'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 30, 'AT-BASE','GROUP1','1600','0','Waren'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 31, 'AT-BASE','GROUP1','1700','0','Noch nicht abrechenbare Leist.'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 32, 'AT-BASE','GROUP1','1701','0','Bestandsveränderung laufend'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 33, 'AT-BASE','GROUP1','1800','0','Vorrat Verpackungsmaterial'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 34, 'AT-BASE','GROUP1','1810','0','Vorrat Werbematerial'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 35, 'AT-BASE','GROUP2','2000','0','Lieferforderungen Inland I'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 36, 'AT-BASE','GROUP2','2080','0','Einzelwertb. Ford. Inland'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 37, 'AT-BASE','GROUP2','2292','0','geleistete Anzahlungen (20%)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 38, 'AT-BASE','GROUP2','2293','0','gel. Anzahlungen i.g.'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 39, 'AT-BASE','GROUP2','2301','0','Forderung Forschungsprämie'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 40, 'AT-BASE','GROUP2','2302','0','Forderungen gelieferte (noch nicht fakturierte Waren)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 41, 'AT-BASE','GROUP2','2303','0','Vorauszahlung Leasing Server'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 42, 'AT-BASE','GROUP2','2306','0','Kaution Pfauengarten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 43, 'AT-BASE','GROUP2','2307','0','Kaution Werkstatt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 44, 'AT-BASE','GROUP2','2308','0','Kaution Parkplatz PKW'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 45, 'AT-BASE','GROUP2','2309','0','Kaution Werkstatt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 46, 'AT-BASE','GROUP2','2310','0','Kaution Studentenwohnheim'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 47, 'AT-BASE','GROUP2','2311','0','Kaution China'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 48, 'AT-BASE','GROUP2','2312','0','Vorauszahlung Xerox'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 49, 'AT-BASE','GROUP2','2313','0','Verrechnung Bildungsscheck'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 50, 'AT-BASE','GROUP2','2315','0','Aktivierung Körperschaftsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 51, 'AT-BASE','GROUP2','2500','0','Vorsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 52, 'AT-BASE','GROUP2','2501','0','Vorsteuer aus i. g. Erwerb'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 53, 'AT-BASE','GROUP2','2502','0','Vorsteuer reverse charge syst.'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 54, 'AT-BASE','GROUP2','2503','0','Vorsteuer Reverse Charge § 19/1d'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 55, 'AT-BASE','GROUP2','2508','0','Vorsteuer sonstige Leistungen EU'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 56, 'AT-BASE','GROUP2','2509','0','EUSt Forderung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 57, 'AT-BASE','GROUP2','2510','0','Einfuhrumsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 58, 'AT-BASE','GROUP2','2531','0','Vorsteuer Frankreich'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 59, 'AT-BASE','GROUP2','2532','0','Vorsteuer Niederlande'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 60, 'AT-BASE','GROUP2','2533','0','Vorsteuer GB'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 61, 'AT-BASE','GROUP2','2534','0','Vorsteuer Belgien'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 62, 'AT-BASE','GROUP2','2535','0','Vorsteuer GB'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 63, 'AT-BASE','GROUP2','2901','0','Leasingvorauszahlung Vito'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 64, 'AT-BASE','GROUP3','3020','0','Rückstellung für Körperschaftsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 65, 'AT-BASE','GROUP3','3060','0','Rst. für Beratungskosten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 66, 'AT-BASE','GROUP3','3064','0','Rst. für Sonderzahlungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 67, 'AT-BASE','GROUP3','3072','0','Rst. für nicht konsum. Urlaube'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 68, 'AT-BASE','GROUP3','3214','0','Raika 40-00.800.185'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 69, 'AT-BASE','GROUP3','3286','0','Darlehen Dipl. Ing. REICH GMBH'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 70, 'AT-BASE','GROUP3','3287','0','Darlehen Dr.Höfler'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 71, 'AT-BASE','GROUP3','3288','0','Darlehen DI Mayrhofer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 72, 'AT-BASE','GROUP3','3289','0','Darlehen AWS'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 73, 'AT-BASE','GROUP3','3292','0','Anzahlungen von Kunden 20 %'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 74, 'AT-BASE','GROUP3','3294','0','Anzahlungen von Kunden Drittland'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 75, 'AT-BASE','GROUP3','3300','0','Lieferverbindlichkeiten I'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 76, 'AT-BASE','GROUP3','3481','0','Verrechnungskto DI Mayrhofer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 77, 'AT-BASE','GROUP3','3500','0','Umsatzsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 78, 'AT-BASE','GROUP3','3501','0','Umsatzsteuer aus i. g. Erwerb'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 79, 'AT-BASE','GROUP3','3502','0','USt § 19/Art 19 (reverse Charge)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 80, 'AT-BASE','GROUP3','3503','0','Umsatzsteuer Reverse Charge § 19/1d'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 81, 'AT-BASE','GROUP3','3508','0','Umsatzsteuer sonstige Leistung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 82, 'AT-BASE','GROUP3','3531','0','FA-Zahllast Dezember'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 83, 'AT-BASE','GROUP3','3533','0','Umsatzsteuer 2012'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 84, 'AT-BASE','GROUP3','3535','0','Umsatzsteuer 2013'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 85, 'AT-BASE','GROUP3','3536','0','Umsatzsteuer 2014'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 86, 'AT-BASE','GROUP3','3537','0','Umsatzsteuer 2015'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 87, 'AT-BASE','GROUP3','3632','0','Verrechnungskonto EUSt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 88, 'AT-BASE','GROUP3','3892','0','Verbindlichkeiten Anzahlungsrechn.'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 89, 'AT-BASE','GROUP3','3898','0','Abgrenzung Sonderzahlungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 90, 'AT-BASE','GROUP4','4000','0','Erlöse Lieferungen 20 %'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 91, 'AT-BASE','GROUP4','4001','0','Erlöse i.g. Lieferung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 92, 'AT-BASE','GROUP4','4002','0','Erlöse Dienstleistungen EU'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 93, 'AT-BASE','GROUP4','4003','0','Erlöse Dienstleistungen 20 %'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 94, 'AT-BASE','GROUP4','4004','0','Erlöse Software 20 %'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 95, 'AT-BASE','GROUP4','4005','0','Erlöse Software EU'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 96, 'AT-BASE','GROUP4','4006','0','Evidenz Kfd. Reverse Charge'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 97, 'AT-BASE','GROUP4','4050','0','Erlöse 0 % Drittland'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 98, 'AT-BASE','GROUP4','4051','0','Erlöse Dienstleistungen Drittland'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 99, 'AT-BASE','GROUP4','4052','0','Erlöse Software Drittland'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 100, 'AT-BASE','GROUP4','4069','0','Erlöse § 19/1d Schrott'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 101, 'AT-BASE','GROUP4','4400','0','Kundenskonto 20 %'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 102, 'AT-BASE','GROUP4','4405','0','Kundenskonto 0 % Ausfuhrlieferungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 103, 'AT-BASE','GROUP4','4410','0','Skontoaufwand i.g. Lieferung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 104, 'AT-BASE','GROUP4','4413','0','Kundenskonto sonstige Leistung EU'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 105, 'AT-BASE','GROUP4','4420','0','Kundenskonto EU-Land A x %'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 106, 'AT-BASE','GROUP4','4450','0','Kundenrabatt 20%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 107, 'AT-BASE','GROUP4','4500','0','Bestandsveränderungen fertige Erzeugnisse'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 108, 'AT-BASE','GROUP4','4510','0','Best.Veränd.Halbf.Erzeugnisse'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 109, 'AT-BASE','GROUP4','4519','0','Bestandsveränderung laufend'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 110, 'AT-BASE','GROUP4','4520','0','Best.Veränd.n.n.abger.Leist.'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 111, 'AT-BASE','GROUP4','4530','0','Gelieferte (noch nicht fakturierte Waren)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 112, 'AT-BASE','GROUP4','4580','0','Aktivierte Eigenleistung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 113, 'AT-BASE','GROUP4','4630','0','Erträge aus d.Abgang v.Anlagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 114, 'AT-BASE','GROUP4','4801','0','Zuwendungen a.öffentl. Mitteln'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 115, 'AT-BASE','GROUP4','4831','0','sonstige betriebliche Erträge (nicht steuerbar)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 116, 'AT-BASE','GROUP4','4840','0','Sonstige Erlöse 20 %'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 117, 'AT-BASE','GROUP4','4850','0','Erl. Aufwandersätze'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 118, 'AT-BASE','GROUP4','4881','0','Versicherungsvergütungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 119, 'AT-BASE','GROUP4','4885','0','Zuschreibungen zum Umlaufvermögen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 120, 'AT-BASE','GROUP4','4950','0','Privatanteil 20 %'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 121, 'AT-BASE','GROUP4','4991','0','Sachbezüge 20%'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 122, 'AT-BASE','GROUP5','5000','0','Handelswareneinsatz'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 123, 'AT-BASE','GROUP5','5001','0','Materialeinkauf Fremdfertigung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 124, 'AT-BASE','GROUP5','5002','0','Wareneinkauf Verkauf'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 125, 'AT-BASE','GROUP5','5020','0','Materialeinkauf'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 126, 'AT-BASE','GROUP5','5090','0','Bezugskosten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 127, 'AT-BASE','GROUP5','5100','0','Verbrauch Rohstoffe'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 128, 'AT-BASE','GROUP5','5199','0','Aufwand für TW-AFA Vorräte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 129, 'AT-BASE','GROUP5','5200','0','Verbrauch bezogenen Teile'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 130, 'AT-BASE','GROUP5','5300','0','Verbrauch Hilfsstoffe'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 131, 'AT-BASE','GROUP5','5400','0','Hilfsstoffverbrauch'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 132, 'AT-BASE','GROUP5','5440','0','Inventurveränderung Fremdbarb. + GK'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 133, 'AT-BASE','GROUP5','5441','0','GWG Fremdbarb. + GK'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 134, 'AT-BASE','GROUP5','5450','0','Verpackungsmaterial'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 135, 'AT-BASE','GROUP5','5800','0','Fremdleistungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 136, 'AT-BASE','GROUP5','5880','0','Lieferantenskonti'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 137, 'AT-BASE','GROUP5','5900','0','Skontoertrag ig.E. 0% (m.VST)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 138, 'AT-BASE','GROUP5','5920','0','Skontoertrag ig.E. 20% (m.VST)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 139, 'AT-BASE','GROUP6','6000','0','Löhne'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 140, 'AT-BASE','GROUP6','6001','0','Rückerstattung AUVA Arbeiter'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 141, 'AT-BASE','GROUP6','6010','0','Lehrlingsentschädigung Arb.'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 142, 'AT-BASE','GROUP6','6020','0','Nichtleistungslöhne'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 143, 'AT-BASE','GROUP6','6100','0','Leihpersonal Aufwand'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 144, 'AT-BASE','GROUP6','6150','0','Sonderzahlungen Arbeiter'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 145, 'AT-BASE','GROUP6','6200','0','Gehälter'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 146, 'AT-BASE','GROUP6','6201','0','Förderung AMS'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 147, 'AT-BASE','GROUP6','6202','0','Rückerstattung AUVA Angestellte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 148, 'AT-BASE','GROUP6','6210','0','Veränderung Mehrarbeitsvergütung RSt Ang'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 149, 'AT-BASE','GROUP6','6211','0','Veränderung Mehrarbeitsvergütung RSt Arbeiter'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 150, 'AT-BASE','GROUP6','6230','0','Sonderzahlungen Angestellte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 151, 'AT-BASE','GROUP6','6231','0','Dotierung RST Sonderzahlungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 152, 'AT-BASE','GROUP6','6255','0','Geschäftsführerbezüge'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 153, 'AT-BASE','GROUP6','6256','0','Geschäftsführersachbezüge'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 154, 'AT-BASE','GROUP6','6300','0','Sonderzahlung aliquot vorläufig'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 155, 'AT-BASE','GROUP6','6310','0','Dotierung Urlaubsrückstellung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 156, 'AT-BASE','GROUP6','6311','0','Veränderung Urlaubsrückstellung Arbeiter'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 157, 'AT-BASE','GROUP6','6402','0','Betriebliche Vorsorgekassa Arbeiter'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 158, 'AT-BASE','GROUP6','6407','0','Betriebliche Vorsorgekassa Angestellte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 159, 'AT-BASE','GROUP6','6416','0','Veränderung Pensionsrückstellung (Angestellte)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 160, 'AT-BASE','GROUP6','6435','0','sonstige Beiträge für die Altersversorgung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 161, 'AT-BASE','GROUP6','6500','0','Gesetzlicher Sozialaufwand'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 162, 'AT-BASE','GROUP6','6600','0','Gesetzlicher Sozialaufwand Arbeiter'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 163, 'AT-BASE','GROUP6','6605','0','Gesetzlicher Sozialaufwand Angestellte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 164, 'AT-BASE','GROUP6','6610','0','Dienstgeberbeitrag Arbeiter'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 165, 'AT-BASE','GROUP6','6611','0','Dienstgeberbeitrag Angestellte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 166, 'AT-BASE','GROUP6','6620','0','Zuschlag zum DB'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 167, 'AT-BASE','GROUP6','6621','0','Zuschlag zum DB Angestellte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 168, 'AT-BASE','GROUP6','6630','0','Ausgleichstaxe'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 169, 'AT-BASE','GROUP6','6690','0','Lohnsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 170, 'AT-BASE','GROUP6','6693','0','Kommunalsteuer Arbeiter'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 171, 'AT-BASE','GROUP6','6694','0','Kommunalsteuer Angestellte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 172, 'AT-BASE','GROUP6','6700','0','Freiwilliger Sozialaufwand'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 173, 'AT-BASE','GROUP6','6710','0','Arbeitskleidung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 174, 'AT-BASE','GROUP6','6720','0','Fahrspesen Dienstnehmer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 175, 'AT-BASE','GROUP6','6730','0','Weihnachtsgeschenke Arbeitnehmer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 176, 'AT-BASE','GROUP6','6740','0','Betriebsveranstaltungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 177, 'AT-BASE','GROUP6','6750','0','Konto frei'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 178, 'AT-BASE','GROUP6','6760','0','Vergleichszahlung Dienstnehmer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 179, 'AT-BASE','GROUP7','7030','0','Abschreibung G W G'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 180, 'AT-BASE','GROUP7','7070','0','Buchwert ausgeschiedener Anlagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 181, 'AT-BASE','GROUP7','7080','0','Planmäßige AFA immat.WG.'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 182, 'AT-BASE','GROUP7','7081','0','Planmäßige Abschreibung für Sachanlagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 183, 'AT-BASE','GROUP7','7100','0','Nicht abzugsfähige Vorsteuer (VStK)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 184, 'AT-BASE','GROUP7','7110','0','Gebühren und Abgaben_Zoll'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 185, 'AT-BASE','GROUP7','7111','0','Kammerumlage'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 186, 'AT-BASE','GROUP7','7200','0','Instandhaltung Gebäude'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 187, 'AT-BASE','GROUP7','7201','0','Instandhaltung Außenanlagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 188, 'AT-BASE','GROUP7','7202','0','Instandh. - Maschinen u. Anl.'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 189, 'AT-BASE','GROUP7','7204','0','Instandhaltung und Betriebskosten Betriebs und Geschäftsgebäude'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 190, 'AT-BASE','GROUP7','7205','0','Verbrauchsmaterial Werkstatt'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 191, 'AT-BASE','GROUP7','7210','0','Müllentsorgung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 192, 'AT-BASE','GROUP7','7211','0','Entsorgungskosten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 193, 'AT-BASE','GROUP7','7230','0','Reinigungsmaterial (div. Verbrauchsmaterial)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 194, 'AT-BASE','GROUP7','7231','0','Berufsbekleidung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 195, 'AT-BASE','GROUP7','7235','0','Reinigung durch Dritte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 196, 'AT-BASE','GROUP7','7240','0','LKW-Betriebskosten Vito G 437 MB'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 197, 'AT-BASE','GROUP7','7241','0','Leasing Mercedes Vito G 437 MB'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 198, 'AT-BASE','GROUP7','7250','0','KFZ Betriebskosten allgemein'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 199, 'AT-BASE','GROUP7','7251','0','KFZ Leasing allgemein'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 200, 'AT-BASE','GROUP7','7252','0','KFZ Versicherungen allgemein'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 201, 'AT-BASE','GROUP7','7253','0','Wachdienst'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 202, 'AT-BASE','GROUP7','7254','0','Konto frei'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 203, 'AT-BASE','GROUP7','7255','0','Aufwand Leihwagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 204, 'AT-BASE','GROUP7','7256','0','PKW-Betriebskosten VW Golf G 854 SH Versuchsfahrzeug'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 205, 'AT-BASE','GROUP7','7257','0','Leasing VW Golf G 854 SH'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 206, 'AT-BASE','GROUP7','7258','0','Konto frei'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 207, 'AT-BASE','GROUP7','7285','0','Strom'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 208, 'AT-BASE','GROUP7','7286','0','Betriebskosten/Beheizung Mietobjekte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 209, 'AT-BASE','GROUP7','7300','0','Transporte durch Dritte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 210, 'AT-BASE','GROUP7','7330','0','Reise und Fahrtspesen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 211, 'AT-BASE','GROUP7','7331','0','Kilometergelder'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 212, 'AT-BASE','GROUP7','7360','0','Reisediäten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 213, 'AT-BASE','GROUP7','7380','0','Telefon'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 214, 'AT-BASE','GROUP7','7381','0','Internet'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 215, 'AT-BASE','GROUP7','7382','0','Wartung Homepage'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 216, 'AT-BASE','GROUP7','7390','0','Postgebühren'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 217, 'AT-BASE','GROUP7','7400','0','Konto frei'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 218, 'AT-BASE','GROUP7','7401','0','Konto frei'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 219, 'AT-BASE','GROUP7','7402','0','Konto frei'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 220, 'AT-BASE','GROUP7','7403','0','Miete Büro Linz'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 221, 'AT-BASE','GROUP7','7404','0','Miete Gradnerstraße'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 222, 'AT-BASE','GROUP7','7410','0','Maschinen u. Gerätemieten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 223, 'AT-BASE','GROUP7','7411','0','Wartungskosten BuG Ausstattung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 224, 'AT-BASE','GROUP7','7420','0','Mobilien-Leasing '); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 225, 'AT-BASE','GROUP7','7421','0','Konto frei'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 226, 'AT-BASE','GROUP7','7422','0','Leasing Server'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 227, 'AT-BASE','GROUP7','7423','0','Konto frei'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 228, 'AT-BASE','GROUP7','7424','0','Konto frei'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 229, 'AT-BASE','GROUP7','7480','0','Lizenzgebühren'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 230, 'AT-BASE','GROUP7','7540','0','Provisionen an Dritte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 231, 'AT-BASE','GROUP7','7600','0','Büromaterial'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 232, 'AT-BASE','GROUP7','7601','0','EDV-Material'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 233, 'AT-BASE','GROUP7','7610','0','Drucksorten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 234, 'AT-BASE','GROUP7','7620','0','Fachliteratur und Zeitungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 235, 'AT-BASE','GROUP7','7630','0','Gästeunt. u. Zeitschriften'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 236, 'AT-BASE','GROUP7','7650','0','Werbeaufwand/Inserate'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 237, 'AT-BASE','GROUP7','7651','0','Anbahnung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 238, 'AT-BASE','GROUP7','7652','0','Aufwand Messen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 239, 'AT-BASE','GROUP7','7653','0','Konto frei'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 240, 'AT-BASE','GROUP7','7654','0','Inserate'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 241, 'AT-BASE','GROUP7','7670','0','Bewirtungskosten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 242, 'AT-BASE','GROUP7','7690','0','Trinkgelder u. Spenden'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 243, 'AT-BASE','GROUP7','7691','0','Spenden an begünstigte Institutionen/Sponsoring'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 244, 'AT-BASE','GROUP7','7696','0','Säumnis- und Verspätungszuschläge'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 245, 'AT-BASE','GROUP7','7700','0','Betriebsversicherungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 246, 'AT-BASE','GROUP7','7701','0','Transportversicherungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 247, 'AT-BASE','GROUP7','7710','0','Pflichtversich. Unternehmer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 248, 'AT-BASE','GROUP7','7749','0','Aufwand Japan'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 249, 'AT-BASE','GROUP7','7750','0','Steuerberatung (Lohnverrechnung, Buchhaltung)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 250, 'AT-BASE','GROUP7','7751','0','Patentkosten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 251, 'AT-BASE','GROUP7','7752','0','Rechtsberatung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 252, 'AT-BASE','GROUP7','7753','0','Unternehmensberatung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 253, 'AT-BASE','GROUP7','7754','0','Aufwand tectos China'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 254, 'AT-BASE','GROUP7','7755','0','Wartung (Betreuung EDV)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 255, 'AT-BASE','GROUP7','7756','0','Lizenzgebühren Abaqus'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 256, 'AT-BASE','GROUP7','7757','0','Lizenzgebühren Sonstige'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 257, 'AT-BASE','GROUP7','7758','0','Sonstige Beratungskosten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 258, 'AT-BASE','GROUP7','7759','0','EDV-Beratung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 259, 'AT-BASE','GROUP7','7760','0','Mitgliedsbeiträge/freiwillige Beiträge'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 260, 'AT-BASE','GROUP7','7761','0','Prüfung Jahresabschluss'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 261, 'AT-BASE','GROUP7','7770','0','Aus- und Fortbildung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 262, 'AT-BASE','GROUP7','7775','0','Forschung und Entwicklung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 263, 'AT-BASE','GROUP7','7776','0','Messentwicklung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 264, 'AT-BASE','GROUP7','7777','0','Produktentwicklung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 265, 'AT-BASE','GROUP7','7785','0','Freiwillige Verbandsbeiträge'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 266, 'AT-BASE','GROUP7','7790','0','Spesen des Geldverkehrs'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 267, 'AT-BASE','GROUP7','7791','0','Kursdifferenzen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 268, 'AT-BASE','GROUP7','7800','0','Betriebsbedingte Schadensfälle'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 269, 'AT-BASE','GROUP7','7801','0','Ausgaben nicht absetzbar'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 270, 'AT-BASE','GROUP7','7802','0','Strafen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 271, 'AT-BASE','GROUP7','7805','0','Forderungsverluste 20'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 272, 'AT-BASE','GROUP7','7806','0','Abschreibungen auf Forderungen (EU)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 273, 'AT-BASE','GROUP7','7807','0','Abschreibungen auf Forderungen (Drittland)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 274, 'AT-BASE','GROUP7','7810','0','Zuweisung an Einzel-WB Forderungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 275, 'AT-BASE','GROUP7','7811','0','Zuweisung pauschale Wertberichtigungen zu Exportforderungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 276, 'AT-BASE','GROUP7','7812','0','Abschreibungen auf Vorräte'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 277, 'AT-BASE','GROUP7','7820','0','Buchwert abgegangener Sachanlagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 278, 'AT-BASE','GROUP7','7840','0','Gründungskosten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 279, 'AT-BASE','GROUP7','7850','0','Sonstiger Aufwand'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 280, 'AT-BASE','GROUP7','7851','0','Sonstiger Aufwand Gewinnanteil Reich'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 281, 'AT-BASE','GROUP7','7930','0','Aufw. Gewährleistungsverpfl.'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 282, 'AT-BASE','GROUP7','7940','0','Aufwand aus Vorperioden'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 283, 'AT-BASE','GROUP8','8020','0','Gewinnüberrg. v. Organgesell.'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 284, 'AT-BASE','GROUP8','8060','0','Zinserträge'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 285, 'AT-BASE','GROUP8','8090','0','Ertr.a.Ant.a.and. Unternehmen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 286, 'AT-BASE','GROUP8','8100','0','Habenzinsen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 287, 'AT-BASE','GROUP8','8280','0','Zinsen f. Kredite u. Darlehen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 288, 'AT-BASE','GROUP8','8286','0','Kursgewinne/Kursverluste'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 289, 'AT-BASE','GROUP8','8288','0','Zinsen auf Lieferantenkredite'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 290, 'AT-BASE','GROUP8','8291','0','Sonst. Zinsen und ähnliche Aufwendungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 291, 'AT-BASE','GROUP8','8500','0','Körperschaftsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 292, 'AT-BASE','GROUP8','8505','0','Kapitalertragsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 293, 'AT-BASE','GROUP8','8510','0','Körperschaftsteuervorauszahl.'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 294, 'AT-BASE','GROUP8','8511','0','Dotierung KöSt-Rückstellung'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 295, 'AT-BASE','GROUP8','8512','0','Aktivierung Körperschaftsteuer'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 296, 'AT-BASE','GROUP8','8513','0','Köst Vorperioden'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 297, 'AT-BASE','GROUP8','8520','0','Forschungsprämie'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 298, 'AT-BASE','GROUP8','8595','0','Ertrag aus der Aktivierung latenter Steuern'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 299, 'AT-BASE','GROUP8','8610','0','Auflösung sonstiger unversteuerter Rücklagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 300, 'AT-BASE','GROUP8','8700','0','Auflösung gebundener Kapitalrücklage'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 301, 'AT-BASE','GROUP8','8710','0','Auflösung Rücklage für eigene Anteile'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 302, 'AT-BASE','GROUP8','8720','0','Auflösung nicht gebundene Kapitalrücklage'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 303, 'AT-BASE','GROUP8','8750','0','Auflösung gesetzliche Rücklage'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 304, 'AT-BASE','GROUP8','8760','0','Auflösung satzungsmäßige Rücklage'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 305, 'AT-BASE','GROUP8','8770','0','Auflösung andere (freie) Rücklage'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 306, 'AT-BASE','GROUP8','8810','0','Zuweisung sonstige unversteuerte Rücklagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 307, 'AT-BASE','GROUP8','8820','0','Zuweisung Inv. Rücklage'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 308, 'AT-BASE','GROUP8','8890','0','Zuw.Bew.Res.GWG'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 309, 'AT-BASE','GROUP8','8900','0','Zuweisung gesetzliche Rücklagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 310, 'AT-BASE','GROUP8','8910','0','Zuweisung satzungsmäßige Rücklagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 311, 'AT-BASE','GROUP8','8920','0','Zuweisung andere (freie) Rücklagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 312, 'AT-BASE','GROUP9','9390','0','Bilanzgewinn'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 313, 'AT-BASE','GROUP9','9391','0','Bilanzverlust'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 314, 'AT-BASE','GROUP9','9700','0','Wachdienst'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 315, 'AT-BASE','GROUP9','9991','0','Gewinnvortrag'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 316, 'AT-BASE','GROUP9','9993','0','Verlustvortrag'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 317, 'AT-BASE','GROUP9','9994','0','Verlustvortrag'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 318, 'AT-BASE','GROUP5','50200','0','Materialeinkauf'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 319, 'AT-BASE','GROUP6','60000','0','kalk. Löhne u Gehälter'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 320, 'AT-BASE','GROUP6','64160','0','Veränderung Pensionsrückstellung (Angestellte)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 321, 'AT-BASE','GROUP6','66300','0','Leistungserfassung'); diff --git a/htdocs/install/mysql/data/llx_accounting_account_de.sql b/htdocs/install/mysql/data/llx_accounting_account_de.sql index ddb0ab18356..d1b6b00f800 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_de.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_de.sql @@ -2725,20 +2725,20 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3852, 'SKR04', 'Anlagevermögen', 170, 0, 'Geleistete Anzahlungen auf immaterielle Vermögensgegenstände'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3853, 'SKR04', 'Anlagevermögen', 179, 0, 'Anzahlungen auf Geschäfts- oder Firmenwert'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3854, 'SKR04', 'Anlagevermögen', 200, 0, 'Grundstücke, grundstücksgleiche Rechte und Bauten einschließlich der Bauten auf fremden Grundstück'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3855, 'SKR04', 'Anlagevermögen', 210, 3854, Grundstücksgleiche Rechte ohne Bauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3856, 'SKR04', 'Anlagevermögen', 215, 3854, Unbebaute Grundstücke'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3857, 'SKR04', 'Anlagevermögen', 220, 3854, Grundstücksgleiche Rechte (Erbbaurecht, Dauerwohnrecht, unbebaute Grundstücke)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3858, 'SKR04', 'Anlagevermögen', 225, 3854, Grundstücke mit Substanzverkehr'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3859, 'SKR04', 'Anlagevermögen', 229, 3854, Grundstücksanteil des häuslichen Arbeitszimmers'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3860, 'SKR04', 'Anlagevermögen', 230, 3854, Bauten auf eigenen Grundstücken und grundstücksgleichen Rechten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3861, 'SKR04', 'Anlagevermögen', 235, 3854, Grundstückswerte eigener bebauter Grundstücke'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3862, 'SKR04', 'Anlagevermögen', 240, 3854, Geschäftsbauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3863, 'SKR04', 'Anlagevermögen', 250, 3854, Fabrikbauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3864, 'SKR04', 'Anlagevermögen', 260, 3854, Andere Bauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3865, 'SKR04', 'Anlagevermögen', 270, 3854, Garagen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3866, 'SKR04', 'Anlagevermögen', 280, 3854, Außenanlagen für Geschäfts-, Fabrik- und andere Bauten'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3867, 'SKR04', 'Anlagevermögen', 285, 3854, Hof- und Wegbefestigungen'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3868, 'SKR04', 'Anlagevermögen', 290, 3854, Einrichtungen für Geschäfts-. Fabrik- und andere Bauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3855, 'SKR04', 'Anlagevermögen', 210, 3854, 'Grundstücksgleiche Rechte ohne Bauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3856, 'SKR04', 'Anlagevermögen', 215, 3854,'Unbebaute Grundstücke'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3857, 'SKR04', 'Anlagevermögen', 220, 3854, 'Grundstücksgleiche Rechte (Erbbaurecht, Dauerwohnrecht, unbebaute Grundstücke)'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3858, 'SKR04', 'Anlagevermögen', 225, 3854, 'Grundstücke mit Substanzverkehr'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3859, 'SKR04', 'Anlagevermögen', 229, 3854, 'Grundstücksanteil des häuslichen Arbeitszimmers'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3860, 'SKR04', 'Anlagevermögen', 230, 3854, 'Bauten auf eigenen Grundstücken und grundstücksgleichen Rechten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3861, 'SKR04', 'Anlagevermögen', 235, 3854, 'Grundstückswerte eigener bebauter Grundstücke'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3862, 'SKR04', 'Anlagevermögen', 240, 3854, 'Geschäftsbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3863, 'SKR04', 'Anlagevermögen', 250, 3854, 'Fabrikbauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3864, 'SKR04', 'Anlagevermögen', 260, 3854, 'Andere Bauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3865, 'SKR04', 'Anlagevermögen', 270, 3854, 'Garagen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3866, 'SKR04', 'Anlagevermögen', 280, 3854, 'Außenanlagen für Geschäfts-, Fabrik- und andere Bauten'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3867, 'SKR04', 'Anlagevermögen', 285, 3854, 'Hof- und Wegbefestigungen'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3868, 'SKR04', 'Anlagevermögen', 290, 3854, 'Einrichtungen für Geschäfts-. Fabrik- und andere Bauten'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3869, 'SKR04', 'Anlagevermögen', 300, 3854, Wohnbauten'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3870, 'SKR04', 'Anlagevermögen', 305, 3854, Garagen'); --INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label) VALUES (__ENTITY__, 3871, 'SKR04', 'Anlagevermögen', 310, 3854, Außenanlagen'); diff --git a/htdocs/install/mysql/data/llx_accounting_account_es.sql b/htdocs/install/mysql/data/llx_accounting_account_es.sql index b3301de496f..c3d194fab2a 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_es.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_es.sql @@ -42,7 +42,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4008, 'PCG08-PYME','CAPIT', '10', '4001', 'CAPITAL', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4009, 'PCG08-PYME','CAPIT', '100', '4008', 'Capital social', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4010, 'PCG08-PYME','CAPIT', '101', '4008', 'Fondo social', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4011, 'PCG08-PYME','CAPIT', 'CAPITAL', '102', '4008', 'Capital', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4011, 'PCG08-PYME','CAPIT', '102', '4008', 'Capital', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4012, 'PCG08-PYME','CAPIT', '103', '4008', 'Socios por desembolsos no exigidos', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4013, 'PCG08-PYME','CAPIT', '1030', '4012', 'Socios por desembolsos no exigidos capital social', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4014, 'PCG08-PYME','CAPIT', '1034', '4012', 'Socios por desembolsos no exigidos capital pendiente de inscripción', 1); @@ -291,8 +291,8 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4257, 'PCG08-PYME','EXISTENCIAS', '394', '4252', 'Deterioro de valor de los productos semiterminados', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4258, 'PCG08-PYME','EXISTENCIAS', '395', '4252', 'Deterioro de valor de los productos terminados', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4259, 'PCG08-PYME','EXISTENCIAS', '396', '4252', 'Deterioro de valor de los subproductos, residuos y materiales recuperados', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4260, 'PCG08-PYME','ACREEDORES_DEUDORES', 'PROVEEDORES', '40', '4004', 'Proveedores', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4261, 'PCG08-PYME','ACREEDORES_DEUDORES', 'PROVEEDORES', '400', '4260', 'Proveedores', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4260, 'PCG08-PYME','ACREEDORES_DEUDORES', '40', '4004', 'Proveedores', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4261, 'PCG08-PYME','ACREEDORES_DEUDORES', '400', '4260', 'Proveedores', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4262, 'PCG08-PYME','ACREEDORES_DEUDORES', '4000', '4261', 'Proveedores euros', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4263, 'PCG08-PYME','ACREEDORES_DEUDORES', '4004', '4261', 'Proveedores moneda extranjera', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4264, 'PCG08-PYME','ACREEDORES_DEUDORES', '4009', '4261', 'Proveedores facturas pendientes de recibir o formalizar', 1); @@ -314,8 +314,8 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4280, 'PCG08-PYME','ACREEDORES_DEUDORES', '4109', '4277', 'Acreedores por prestaciones de servicios facturas pendientes de recibir o formalizar', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4281, 'PCG08-PYME','ACREEDORES_DEUDORES', '411', '4276', 'Acreedores efectos comerciales a pagar', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4282, 'PCG08-PYME','ACREEDORES_DEUDORES', '419', '4276', 'Acreedores por operaciones en común', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4283, 'PCG08-PYME','ACREEDORES_DEUDORES', 'CLIENTES', '43', '4004', 'Clientes', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4284, 'PCG08-PYME','ACREEDORES_DEUDORES', 'CLIENTES', '430', '4283', 'Clientes', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4283, 'PCG08-PYME','ACREEDORES_DEUDORES', '43', '4004', 'Clientes', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4284, 'PCG08-PYME','ACREEDORES_DEUDORES', '430', '4283', 'Clientes', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4285, 'PCG08-PYME','ACREEDORES_DEUDORES', '4300', '4284', 'Clientes euros', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4286, 'PCG08-PYME','ACREEDORES_DEUDORES', '4304', '4284', 'Clientes moneda extranjera', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4287, 'PCG08-PYME','ACREEDORES_DEUDORES', '4309', '4284', 'Clientes facturas pendientes de formalizar', 1); @@ -501,9 +501,9 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4467, 'PCG08-PYME','FINAN', '567', '4462', 'Intereses pagados por anticipado', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4468, 'PCG08-PYME','FINAN', '568', '4462', 'Intereses cobrados a corto plazo', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4469, 'PCG08-PYME','FINAN', '57', '4005', 'Tesorería', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4470, 'PCG08-PYME','FINAN', 'CAJA', '570', '4469', 'Caja euros', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4470, 'PCG08-PYME','FINAN', '570', '4469', 'Caja euros', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4471, 'PCG08-PYME','FINAN', '571', '4469', 'Caja moneda extranjera', 1); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4472, 'PCG08-PYME','FINAN', 'BANCOS', '572', '4469', 'Bancos e instituciones de crédito cc vista euros', 1); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4472, 'PCG08-PYME','FINAN', '572', '4469', 'Bancos e instituciones de crédito cc vista euros', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4473, 'PCG08-PYME','FINAN', '573', '4469', 'Bancos e instituciones de crédito cc vista moneda extranjera', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4474, 'PCG08-PYME','FINAN', '574', '4469', 'Bancos e instituciones de crédito cuentas de ahorro euros', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4475, 'PCG08-PYME','FINAN', '575', '4469', 'Bancos e instituciones de crédito cuentas de ahorro moneda extranjera', 1); diff --git a/htdocs/install/mysql/data/llx_c_chargesociales.sql b/htdocs/install/mysql/data/llx_c_chargesociales.sql index b728d9c6414..a7e12df0d31 100644 --- a/htdocs/install/mysql/data/llx_c_chargesociales.sql +++ b/htdocs/install/mysql/data/llx_c_chargesociales.sql @@ -50,10 +50,10 @@ insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays -- -- Belgique -- -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (201, 'ONSS', 1,1,'TAXBEONSS' ,'2'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (210, 'Precompte professionnel', 1,1,'TAXBEPREPRO' ,'2'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (220, 'Prime existence', 1,1,'TAXBEPRIEXI' ,'2'); -insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (230, 'Precompte immobilier', 1,1,'TAXBEPREIMMO','2'); +insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ('2', 201, 'ONSS', 1,1,'TAXBEONSS'); +insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ('2', 210, 'Precompte professionnel', 1,1,'TAXBEPREPRO'); +insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ('2', 220, 'Prime existence', 1,1,'TAXBEPRIEXI'); +insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ('2', 230, 'Precompte immobilier', 1,1,'TAXBEPREIMMO'); -- -- Austria diff --git a/htdocs/install/mysql/data/llx_c_email_templates.sql b/htdocs/install/mysql/data/llx_c_email_templates.sql index 5ca98be8545..acc09bad008 100644 --- a/htdocs/install/mysql/data/llx_c_email_templates.sql +++ b/htdocs/install/mysql/data/llx_c_email_templates.sql @@ -20,21 +20,24 @@ -- de l'install et tous les sigles '--' sont supprimés. -- -INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines) VALUES (0,'banque','thirdparty','',0,null,null,'(YourSEPAMandate)',1,'$conf->societe->enabled && $conf->banque->enabled && $conf->prelevement->enabled',0,'__(YourSEPAMandate)__','__(Hello)__,

\n\n__(FindYourSEPAMandate)__ :
\n__MYCOMPANY_NAME__
\n__MYCOMPANY_FULLADDRESS__

\n__(Sincerely)__
\n__USER_SIGNATURE__',null); +-- Bank Thirdparty +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines) VALUES (0,'banque','thirdparty','',0,null,null,'(YourSEPAMandate)',1,'$conf->societe->enabled && $conf->banque->enabled && $conf->prelevement->enabled',0,'__(YourSEPAMandate)__','__(Hello)__,

\n\n__(FindYourSEPAMandate)__ :
\n__MYCOMPANY_NAME__
\n__MYCOMPANY_FULLADDRESS__

\n__(Sincerely)__
\n__USER_SIGNATURE__',null); +-- Members +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnAutoSubscription)' ,10,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipRequestWasReceived)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourMembershipRequestWasReceived)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',null, 0); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnMemberValidation)' ,20,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasValidated)__', '__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourMembershipWasValidated)__
__(FirstName)__ : __MEMBER_FIRSTNAME__
__(LastName)__ : __MEMBER_LASTNAME__
__(ID)__ : __MEMBER_ID__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',null, 0); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnNewSubscription)' ,30,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__', '__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__
\n\n

\n__(Sincerely)__
__USER_SIGNATURE__',null, 1); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingReminderForExpiredSubscription)',40,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__', '__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfSubscriptionReminderEmail)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',null, 0); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnCancelation)' ,50,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__', '__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(YourMembershipWasCanceled)__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',null, 0); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingAnEMailToMember)' ,60,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__', '__(Hello)__,

\n\n__(ThisIsContentOfYourCard)__
\n__(ID)__ : __ID__
\n__(Civiliyty)__ : __MEMBER_CIVILITY__
\n__(Firstname)__ : __MEMBER_FIRSTNAME__
\n__(Lastname)__ : __MEMBER_LASTNAME__
\n__(Fullname)__ : __MEMBER_FULLNAME__
\n__(Company)__ : __MEMBER_COMPANY__
\n__(Address)__ : __MEMBER_ADDRESS__
\n__(Zip)__ : __MEMBER_ZIP__
\n__(Town)__ : __MEMBER_TOWN__
\n__(Country)__ : __MEMBER_COUNTRY__
\n__(Email)__ : __MEMBER_EMAIL__
\n__(Birthday)__ : __MEMBER_BIRTH__
\n__(Photo)__ : __MEMBER_PHOTO__
\n__(Login)__ : __MEMBER_LOGIN__
\n__(Password)__ : __MEMBER_PASSWORD__
\n__(Phone)__ : __MEMBER_PHONE__
\n__(PhonePerso)__ : __MEMBER_PHONEPRO__
\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__

\n__(Sincerely)__
__USER_SIGNATURE__',null, 0); -INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnAutoSubscription)' ,10,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipRequestWasReceived)__','__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourMembershipRequestWasReceived)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',null, 0); -INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnMemberValidation)' ,20,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasValidated)__', '__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourMembershipWasValidated)__
__(FirstName)__ : __MEMBER_FIRSTNAME__
__(LastName)__ : __MEMBER_LASTNAME__
__(ID)__ : __MEMBER_ID__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',null, 0); -INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnNewSubscription)' ,30,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__', '__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__
\n\n

\n__(Sincerely)__
__USER_SIGNATURE__',null, 1); -INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingReminderForExpiredSubscription)',40,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__', '__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(ThisIsContentOfSubscriptionReminderEmail)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',null, 0); -INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnCancelation)' ,50,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__', '__(Hello)__ __MEMBER_FULLNAME__,

\n\n__(YourMembershipWasCanceled)__
\n

\n__(Sincerely)__
__USER_SIGNATURE__',null, 0); -INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingAnEMailToMember)' ,60,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__', '__(Hello)__,

\n\n__(ThisIsContentOfYourCard)__
\n__(ID)__ : __ID__
\n__(Civiliyty)__ : __MEMBER_CIVILITY__
\n__(Firstname)__ : __MEMBER_FIRSTNAME__
\n__(Lastname)__ : __MEMBER_LASTNAME__
\n__(Fullname)__ : __MEMBER_FULLNAME__
\n__(Company)__ : __MEMBER_COMPANY__
\n__(Address)__ : __MEMBER_ADDRESS__
\n__(Zip)__ : __MEMBER_ZIP__
\n__(Town)__ : __MEMBER_TOWN__
\n__(Country)__ : __MEMBER_COUNTRY__
\n__(Email)__ : __MEMBER_EMAIL__
\n__(Birthday)__ : __MEMBER_BIRTH__
\n__(Photo)__ : __MEMBER_PHOTO__
\n__(Login)__ : __MEMBER_LOGIN__
\n__(Password)__ : __MEMBER_PASSWORD__
\n__(Phone)__ : __MEMBER_PHONE__
\n__(PhonePerso)__ : __MEMBER_PHONEPRO__
\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__

\n__(Sincerely)__
__USER_SIGNATURE__',null, 0); +-- Recruiting +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,

\n\n__(YourCandidatureAnswerMessage)__
__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n

\n__(Sincerely)__
__USER_SIGNATURE__',null, 0); -INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,

\n\n__(YourCandidatureAnswerMessage)__
__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n

\n__(Sincerely)__
__USER_SIGNATURE__',null, 0); - -INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailAskConf', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__', null, '1', null); -INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailAskBooth', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__', null, '1', null); -INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailSubsBooth', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__', null, '1', null); -INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailSubsEvent', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__', '__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__

__(Sincerely)__

__MYCOMPANY_NAME__
__USER_SIGNATURE__', null, '1', null); -INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationMassEmailAttendees', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__

__(Sincerely)__
__USER_SIGNATURE__', null, '1', null); -INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationMassEmailSpeakers', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__

__(Sincerely)__
__USER_SIGNATURE__', null, '1', null); +-- Event organization +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailAskConf', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailAskBooth', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailSubsBooth', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__

__ONLINE_PAYMENT_TEXT_AND_URL__


__(Sincerely)__
__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailSubsEvent', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__', '__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__

__(Sincerely)__

__MYCOMPANY_NAME__
__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationMassEmailAttendees', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__

__(Sincerely)__
__USER_SIGNATURE__', null, '1', null); +INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationMassEmailSpeakers', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__ __THIRDPARTY_NAME__,

__(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__

__(Sincerely)__
__USER_SIGNATURE__', null, '1', null); diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql index c9736e429c4..3fb671fa9b2 100644 --- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -67,6 +67,13 @@ INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUE INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 154, 'SAT/24-2019', 'Catalogo y codigo agrupador fiscal del 2019', 1); +UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'auguria'; +UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'bureau2crea'; +UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'amarok'; +UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'cameleo'; +DELETE FROM llx_user_param where param = 'MAIN_THEME' and value in ('auguria', 'amarok', 'cameleo'); + + -- For v14 ALTER TABLE llx_product_lot ADD COLUMN eol_date datetime NULL; @@ -411,7 +418,7 @@ UPDATE llx_propal SET fk_user_signature = fk_user_cloture WHERE fk_user_signatur UPDATE llx_propal SET date_signature = date_cloture WHERE date_signature IS NULL AND date_cloture IS NOT NULL; -ALTER TABLE llx_product ADD COLUMN batch_mask VARCHAR(32) NULL; +ALTER TABLE llx_product ADD COLUMN batch_mask VARCHAR(32) DEFAULT NULL; ALTER TABLE llx_product ADD COLUMN lifetime INTEGER NULL; ALTER TABLE llx_product ADD COLUMN qc_frequency INTEGER NULL; diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index 73b4473a5a4..4aad3393137 100644 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -59,7 +59,7 @@ create table llx_product tobuy tinyint DEFAULT 1, -- Product you buy onportal tinyint DEFAULT 0, -- If it is a product you sell and you want to sell it on portal (module website must be on) tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch management (eat-by or lot management) - batch_mask varchar(32), -- If the product has batch feature, you may want to use a batch mask per product + batch_mask varchar(32) DEFAULT NULL, -- If the product has batch feature, you may want to use a batch mask per product fk_product_type integer DEFAULT 0, -- Type of product: 0 for regular product, 1 for service, 9 for other (used by external module) duration varchar(6), seuil_stock_alerte float DEFAULT NULL, @@ -95,7 +95,7 @@ create table llx_product canvas varchar(32) DEFAULT NULL, finished tinyint DEFAULT NULL, -- see dictionnary c_product_nature lifetime integer DEFAULT NULL, - qc_frequency integer DEFAULT NULL, + qc_frequency integer DEFAULT NULL, -- Quality control periodicity hidden tinyint DEFAULT 0, -- Not used. Deprecated. import_key varchar(14), -- Import key model_pdf varchar(255), -- model save dodument used diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 2eaba13de3c..b7618f64739 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1987,7 +1987,7 @@ MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF -MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add picture on proposal ligne +MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add picture on proposal line MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING=Add electronic sign in PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups @@ -2140,4 +2140,5 @@ CheckForModuleUpdateHelp=This action will connect to editors of external modules ModuleUpdateAvailable=An update is available NoExternalModuleWithUpdate=No updates found for external modules SwaggerDescriptionFile=Swagger API description file (for use with redoc for example) -YouEnableDeprecatedWSAPIsUseRESTAPIsInstead=You enabled deprecated WS API. You should use REST API instead. \ No newline at end of file +YouEnableDeprecatedWSAPIsUseRESTAPIsInstead=You enabled deprecated WS API. You should use REST API instead. +RandomlySelectedIfSeveral=Randomly selected if several pictures are available \ No newline at end of file diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index 9f75374f2a0..335c257b224 100644 --- a/htdocs/langs/en_US/eventorganization.lang +++ b/htdocs/langs/en_US/eventorganization.lang @@ -1,4 +1,5 @@ # Copyright (C) 2021 Florian Henry +# Copyright (C) 2021 Dorian Vabre # # 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 @@ -81,6 +82,7 @@ PriceOfBoothHelp=Subscription price to stand a booth EventOrganizationICSLink=Link ICS for events ConferenceOrBoothInformation=Conference Or Booth informations Attendees = Attendees +DownloadICSLink = Download ICS link EVENTORGANIZATION_SECUREKEY = Secure Key of the public registration link to a conference SERVICE_BOOTH_LOCATION = Service used for the invoice row about a booth location SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION = Service used for the invoice row about an attendee subscription to a conference @@ -96,9 +98,13 @@ EvntOrgCancelled = Cancelled # # Public page # +SuggestForm = Suggestion page RegisterPage = Page for conferences or booth -EvntOrgRegistrationWelcomeMessage = Welcome on the conference or booth suggestion page. -EvntOrgRegistrationHelpMessage = Here, you can suggest a new conference or a new booth for the project +EvntOrgRegistrationHelpMessage = Here, you can vote for an event, or suggest a new conference or booth for the project +EvntOrgRegistrationConfHelpMessage = Here, you can suggest a new conference for the project +EvntOrgRegistrationBoothHelpMessage = Here, you can suggest a new booth for the project +ListOfSuggestedConferences = List of suggested conferences +ListOfSuggestedBooths = List of suggested booths SuggestConference = Suggest a new conference SuggestBooth = Suggest a booth ViewAndVote = View and vote for suggested events @@ -107,6 +113,20 @@ MissingOrBadSecureKey = The security key is invalid or missing EvntOrgWelcomeMessage = This form allows you to register as a new participant to the conference : '%s' EvntOrgDuration = This conference starts on %s and ends on %s. ConferenceAttendeeFee = Conference attendee fee for the event : '%s' occurring from %s to %s. +BoothLocationFee = Booth location for the event : '%s' occurring from %s to %s +EventType = Event type + +# +# Vote page +# +EvntOrgRegistrationWelcomeMessage = Welcome on the conference or booth suggestion page. +EvntOrgRegistrationConfWelcomeMessage = Welcome on the conference suggestion page. +EvntOrgRegistrationBoothWelcomeMessage = Welcome on the booth suggestion page. +EvntOrgVoteHelpMessage = Here, you can view and vote for the suggested events for the project +VoteOk = Your vote has been accepted. +AlreadyVoted = You have already voted for this event. +VoteError = An error has occurred during the vote, please try again. + # # SubscriptionOk page # @@ -118,5 +138,6 @@ ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to a co # # Payment page # -Attendee = Participant -PaymentConferenceAttendee = Paiement de participation à une conférence +Attendee = Attendee +PaymentConferenceAttendee = Conference attendee payment +PaymentBoothLocation = Booth location payment diff --git a/htdocs/langs/en_US/knowledgemanagement.lang b/htdocs/langs/en_US/knowledgemanagement.lang index 269007e60f8..68f5cced76c 100644 --- a/htdocs/langs/en_US/knowledgemanagement.lang +++ b/htdocs/langs/en_US/knowledgemanagement.lang @@ -47,7 +47,7 @@ KnowledgeManagementArea = Knowledge Management # Menu # MenuKnowledgeRecord = Knowledge base -ListOfArticles = List of articles +ListKnowledgeRecord = List of articles NewKnowledgeRecord = New article ValidateReply = Validate solution KnowledgeRecords = Articles diff --git a/htdocs/langs/en_US/languages.lang b/htdocs/langs/en_US/languages.lang index 015e6dcfa25..cbc94b4481c 100644 --- a/htdocs/langs/en_US/languages.lang +++ b/htdocs/langs/en_US/languages.lang @@ -84,6 +84,7 @@ Language_nl_NL=Dutch Language_pl_PL=Polish Language_pt_BR=Portuguese (Brazil) Language_pt_PT=Portuguese +Language_ro_MD=Romanian (Moldavia) Language_ro_RO=Romanian Language_ru_RU=Russian Language_ru_UA=Russian (Ukraine) diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 93cf9e9e037..977aab588a2 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -255,3 +255,4 @@ MakeMovementsAndClose=Generate movements and close AutofillWithExpected=Fill real quantity with expected quantity ShowAllBatchByDefault=By default, show batch details on product "stock" tab CollapseBatchDetailHelp=You can set batch detail default display in stocks module configuration +FieldCannotBeNegative=Field "%s" cannot be negative \ No newline at end of file diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 2ccc5e63c8f..f76a6fec0ad 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -5422,11 +5422,11 @@ class Product extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Retourne tableau de toutes les photos du produit + * Return an array with all photos of product found on disk. There is no sorting criteria. * - * @param string $dir Repertoire a scanner - * @param int $nbmax Nombre maximum de photos (0=pas de max) - * @return array Tableau de photos + * @param string $dir Directory to scan + * @param int $nbmax Number maxium of photos (0=no maximum) + * @return array Array of photos */ public function liste_photos($dir, $nbmax = 0) { @@ -5447,9 +5447,10 @@ class Product extends CommonObject if (dol_is_file($dir.$file) && image_format_supported($file) >= 0) { $nbphoto++; - // On determine nom du fichier vignette + // We forge name of thumb. $photo = $file; $photo_vignette = ''; + $regs = array(); if (preg_match('/('.$this->regeximgext.')$/i', $photo, $regs)) { $photo_vignette = preg_replace('/'.$regs[0].'/i', '', $photo).'_small'.$regs[0]; } @@ -5467,7 +5468,7 @@ class Product extends CommonObject $tabobj[$nbphoto - 1] = $obj; - // On continue ou on arrete de boucler ? + // Do we have to continue with next photo ? if ($nbmax && $nbphoto >= $nbmax) { break; } @@ -5482,9 +5483,9 @@ class Product extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Efface la photo du produit et sa vignette + * Delete a photo and its thumbs * - * @param string $file Chemin de l'image + * @param string $file Path to image file * @return void */ public function delete_photo($file) diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 2abc830eb7c..89394e56e29 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -160,7 +160,7 @@ if ($action == 'update' && !empty($user->rights->stock->mouvement->creer)) { if (! $error) { $db->commit(); } else { - $db->rollbak(); + $db->rollback(); } } @@ -185,8 +185,11 @@ if ($action =='updateinventorylines' && $permissiontoadd) { if (GETPOST("id_".$lineid, 'alpha') != '') { // If a value was set ('0' or something else) $qtytoupdate = price2num(GETPOST("id_".$lineid, 'alpha'), 'MS'); - $result = $inventoryline->fetch($lineid); + if ($qtytoupdate < 0) { + $result = -1; + setEventMessages($langs->trans("FieldCannotBeNegative", $langs->transnoentitiesnoconv("RealQty")), null, 'errors'); + } if ($result > 0) { $inventoryline->qty_view = $qtytoupdate; $resultupdate = $inventoryline->update($user); @@ -251,7 +254,10 @@ if (empty($reshook)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors'); } - + if (price2num(GETPOST('qtytoadd'), 'MS') < 0) { + $error++; + setEventMessages($langs->trans("FieldCannotBeNegative", $langs->transnoentitiesnoconv("RealQty")), null, 'errors'); + } if (!$error && !empty($conf->productbatch->enabled)) { $tmpproduct = new Product($db); $result = $tmpproduct->fetch($fk_product); @@ -654,7 +660,7 @@ if ($object->id > 0) { // Real quantity print ''; diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 959336c1671..5e609bbe301 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -370,8 +370,12 @@ class MouvementStock extends CommonObject if (!empty($conf->productbatch->enabled) && $product->hasbatch() && !$skip_batch) { $foundforbatch = 0; $qtyisnotenough = 0; + foreach ($product->stock_warehouse[$entrepot_id]->detail_batch as $batchcursor => $prodbatch) { - if ($batch != $batchcursor) continue; + if ((string) $batch != (string) $batchcursor) { // Lot '59' must be different than lot '59c' + continue; + } + $foundforbatch = 1; if ($prodbatch->qty < abs($qty)) $qtyisnotenough = $prodbatch->qty; break; diff --git a/htdocs/product/stock/productlot_document.php b/htdocs/product/stock/productlot_document.php index 5b19288deff..820ad4d38bb 100644 --- a/htdocs/product/stock/productlot_document.php +++ b/htdocs/product/stock/productlot_document.php @@ -94,7 +94,9 @@ $usercanread = $user->rights->produit->lire; $usercancreate = $user->rights->produit->creer; $usercandelete = $user->rights->produit->supprimer; -$upload_dir = $conf->productbatch->multidir_output[$conf->entity]; +if (empty($upload_dir)) { + $upload_dir = $conf->productbatch->multidir_output[$conf->entity]; +} $permissiontoread = $usercanread; $permissiontoadd = $usercancreate; diff --git a/htdocs/product/stock/stockatdate.php b/htdocs/product/stock/stockatdate.php index b36d530d624..52addeba637 100644 --- a/htdocs/product/stock/stockatdate.php +++ b/htdocs/product/stock/stockatdate.php @@ -45,7 +45,7 @@ if ($user->socid) { $result = restrictedArea($user, 'produit|service'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array('stockreplenishlist')); +$hookmanager->initHooks(array('stockatdate')); //checks if a product has been ordered diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php index 2aaeb12de23..a0e7ea817a7 100644 --- a/htdocs/public/agenda/agendaexport.php +++ b/htdocs/public/agenda/agendaexport.php @@ -135,7 +135,12 @@ if (GETPOST("notolderthan", 'int')) { } else { $filters['notolderthan'] = $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY; } - +if (GETPOST("module", 'alpha')) { + $filters['module'] = GETPOST("module", 'alpha'); +} +if (GETPOST("status", 'int')) { + $filters['status'] = GETPOST("status", 'int'); +} // Check config if (empty($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY)) { $user->getrights(); @@ -201,6 +206,15 @@ foreach ($filters as $key => $value) { if ($key == 'notactiontype') { $filename .= '-notactiontype'.$value; } + if ($key == 'actiontype') { + $filename .= '-actiontype'.$value; + } + if ($key == 'module') { + $filename .= '-module'.$value; + } + if ($key == 'status') { + $filename .= '-status'.$value; + } } // Add extension if ($format == 'vcal') { @@ -212,9 +226,7 @@ if ($format == 'ical') { if ($format == 'rss') { $shortfilename .= '.rss'; $filename .= '.rss'; } - if ($shortfilename == 'dolibarrcalendar') { - $langs->load("main"); $langs->load("errors"); llxHeaderVierge(); print '
'.$langs->trans("ErrorWrongValueForParameterX", 'format').'
'; diff --git a/htdocs/public/eventorganization/attendee_subscription.php b/htdocs/public/eventorganization/attendee_subscription.php index 70e994d57cd..a81ac456353 100644 --- a/htdocs/public/eventorganization/attendee_subscription.php +++ b/htdocs/public/eventorganization/attendee_subscription.php @@ -1,11 +1,5 @@ - * Copyright (C) 2001-2002 Jean-Louis Bergamo - * Copyright (C) 2006-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2012 J. Fernando Lagrange - * Copyright (C) 2018-2019 Frédéric France - * Copyright (C) 2018 Alexandre Spangaro +/* Copyright (C) 2021 Dorian Vabre * * 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 diff --git a/htdocs/public/eventorganization/subscriptionok.php b/htdocs/public/eventorganization/subscriptionok.php index 02fb456f7d2..8586535f5ab 100644 --- a/htdocs/public/eventorganization/subscriptionok.php +++ b/htdocs/public/eventorganization/subscriptionok.php @@ -3,6 +3,7 @@ * Copyright (C) 2006-2013 Laurent Destailleur * Copyright (C) 2012 Regis Houssin * Copyright (C) 2021 Waël Almoman + * Copyright (C) 2021 Dorian Vabre * * 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 diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index b58a57fc706..3a7f9a4ed9f 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -5,6 +5,7 @@ * Copyright (C) 2018 Juanjo Menent * Copyright (C) 2018-2019 Thibault FOUCART * Copyright (C) 2021 Waël Almoman + * Copyright (C) 2021 Dorian Vabre * * 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 @@ -142,6 +143,23 @@ if ($source == 'conferencesubscription') { } } } +} elseif ($source == 'boothlocation') { + // Getting the amount to pay, the invoice, finding the thirdparty + $invoiceid = GETPOST('ref'); + $invoice = new Facture($db); + $resultinvoice = $invoice->fetch($invoiceid); + if ($resultinvoice <= 0) { + setEventMessages(null, $invoice->errors, "errors"); + } else { + $amount = price2num($invoice->total_ttc); + // Finding the associated thirdparty + $thirdparty = new Societe($db); + $resultthirdparty = $thirdparty->fetch($invoice->socid); + if ($resultthirdparty <= 0) { + setEventMessages(null, $thirdparty->errors, "errors"); + } + $object = $thirdparty; + } } @@ -260,16 +278,21 @@ if ($tmpsource == 'membersubscription') { } $valid = true; if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + $token = ''; + $tokenoldcompat = ''; if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { if ($tmpsource && $REF) { $token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$tmpsource.$REF, 2); // Use the source in the hash to avoid duplicates if the references are identical + if ($tmpsource != $source) { + $tokenoldcompat = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.$source.$REF, 2); // for retro-compatibility (token may have been hashed with membersubscription in external module) + } } else { $token = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2); } } else { $token = $conf->global->PAYMENT_SECURITY_TOKEN; } - if ($SECUREKEY != $token) { + if ($SECUREKEY != $token && (empty($tokenoldcompat) || $SECUREKEY != $tokenoldcompat)) { if (empty($conf->global->PAYMENT_SECURITY_ACCEPT_ANY_TOKEN)) { $valid = false; // PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is for backward compatibility } else { @@ -889,7 +912,6 @@ print ''."\n"; // Amount - print ''."\n"; // Tag - print ''."\n"; @@ -977,14 +999,14 @@ if ($source == 'order') { $fulltag = dol_string_unaccent($fulltag); // Creditor - print ''."\n"; // Debitor - print ''."\n"; // Object @@ -992,8 +1014,8 @@ if ($source == 'order') { if (GETPOST('desc', 'alpha')) { $text = ''.$langs->trans(GETPOST('desc', 'alpha')).''; } - print ''."\n"; // Amount - print ''."\n"; // Tag - print ''."\n"; @@ -1101,14 +1123,14 @@ if ($source == 'invoice') { $fulltag = dol_string_unaccent($fulltag); // Creditor - print ''."\n"; // Debitor - print ''."\n"; // Object @@ -1116,8 +1138,8 @@ if ($source == 'invoice') { if (GETPOST('desc', 'alpha')) { $text = ''.$langs->trans(GETPOST('desc', 'alpha')).''; } - print ''."\n"; // Amount - print ''."\n"; // Tag - print ''."\n"; @@ -1272,14 +1294,14 @@ if ($source == 'contractline') { } // Creditor - print ''."\n"; // Debitor - print ''."\n"; // Object @@ -1301,8 +1323,8 @@ if ($source == 'contractline') { if (GETPOST('desc', 'alpha')) { $text = ''.$langs->trans(GETPOST('desc', 'alpha')).''; } - print ''; - print ''; + print ''."\n"; // Amount - print ''."\n"; // Tag - print ''."\n"; @@ -1433,14 +1455,14 @@ if ($source == 'member' || $source == 'membersubscription') { $fulltag = dol_string_unaccent($fulltag); // Creditor - print ''."\n"; // Debitor - print ''."\n"; if ($object->datefin > 0) { - print ''."\n"; } if ($member->last_subscription_date || $member->last_subscription_amount) { // Last subscription date - print ''."\n"; // Last subscription amount - print ''."\n"; if (empty($amount) && !GETPOST('newamount', 'alpha')) { @@ -1495,8 +1517,8 @@ if ($source == 'member' || $source == 'membersubscription') { $amountbytype = $adht->amountByType(1); // Last member type - print '\n"; // Set the new member type @@ -1508,25 +1530,25 @@ if ($source == 'member' || $source == 'membersubscription') { // Set amount for the subscription $amount = (!empty($amountbytype[$member->typeid])) ? $amountbytype[$member->typeid] : $member->last_subscription_amount; - print '\n"; } elseif ($action == dopayment) { - print '\n"; } } else { - print '\n"; } } // Amount - print ''."\n"; // Tag - print ''."\n"; @@ -1659,14 +1681,14 @@ if ($source == 'donation') { $fulltag = dol_string_unaccent($fulltag); // Creditor - print ''."\n"; // Debitor - print ''."\n"; // Amount - print ''."\n"; // Tag - print ''."\n"; @@ -1793,32 +1815,29 @@ if ($source == 'conferencesubscription') { $fulltag = dol_string_unaccent($fulltag); // Creditor - print ''."\n"; // Debitor - print ''."\n"; // Object $text = ''.$langs->trans("PaymentConferenceAttendee").''; - if (GETPOST('desc', 'alpha')) { - $text = ''.$langs->trans(GETPOST('desc', 'alpha')).''; - } - print ''."\n"; // Amount - print ''."\n"; // Tag - print ''."\n"; + + // Shipping address + $shipToName = $thirdparty->getFullName($langs); + $shipToStreet = $thirdparty->address; + $shipToCity = $thirdparty->town; + $shipToState = $thirdparty->state_code; + $shipToCountryCode = $thirdparty->country_code; + $shipToZip = $thirdparty->zip; + $shipToStreet2 = ''; + $phoneNum = $thirdparty->phone; + if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip) { + print ''; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + } else { + print ''."\n"; + } + print ''."\n"; + print ''."\n"; + $labeldesc = $langs->trans("PaymentSubscription"); + if (GETPOST('desc', 'alpha')) { + $labeldesc = GETPOST('desc', 'alpha'); + } + print ''."\n"; +} + +if ($source == 'boothlocation') { + $found = true; + $langs->load("members"); + + if (GETPOST('fulltag', 'alpha')) { + $fulltag = GETPOST('fulltag', 'alpha'); + } else { + $fulltag = 'BOO='.GETPOST("booth").'.DAT='.dol_print_date(dol_now(), '%Y%m%d%H%M%S'); + if (!empty($TAG)) { + $tag = $TAG; $fulltag .= '.TAG='.$TAG; + } + } + $fulltag = dol_string_unaccent($fulltag); + + // Creditor + print ''."\n"; + + // Debitor + print ''."\n"; + + // Object + $text = ''.$langs->trans("PaymentBoothLocation").''; + print ''."\n"; + + // Amount + print ''."\n"; + + // Tag + print ''."\n"; diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index de9deb7d249..b589a6c37e0 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -4,6 +4,7 @@ * Copyright (C) 2012 Regis Houssin * Copyright (C) 2021 Waël Almoman * Copyright (C) 2021 Maxime Demarest + * Copyright (C) 2021 Dorian Vabre * * 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 @@ -52,6 +53,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; +require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php'; if (!empty($conf->paypal->enabled)) { require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php'; @@ -1024,52 +1026,55 @@ if ($ispaymentok) { if ($resultattendee < 0) { setEventMessages(null, $attendeetovalidate->errors, "errors"); } else { - $attendeetovalidate->setStatut(1); + $attendeetovalidate->validate($user); // Sending mail $thirdparty = new Societe($db); - $thirdparty->fetch($attendeetovalidate->fk_soc); - - require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; - $formmail = new FormMail($db); - // Set output language - $outputlangs = new Translate('', $conf); - $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang); - // Load traductions files required by page - $outputlangs->loadLangs(array("main", "members")); - // Get email content from template - $arraydefaultmessage = null; - - $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT; - if (!empty($labeltouse)) { - $arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, ''); - } - - if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { - $subject = $arraydefaultmessage->topic; - $msg = $arraydefaultmessage->content; - } - - $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty); - complete_substitutions_array($substitutionarray, $outputlangs, $object); - - $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); - $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs); - - $sendto = $thirdparty->email; - $from = $conf->global->MAILING_EMAIL_FROM; - $urlback = $_SERVER["REQUEST_URI"]; - - $ishtml = dol_textishtml($texttosend); // May contain urls - - $mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(), '', '', 0, $ishtml); - - $result = $mailfile->sendfile(); - if ($result) { - dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_payment'); + $resultthirdparty = $thirdparty->fetch($attendeetovalidate->fk_soc); + if ($resultthirdparty < 0) { + setEventMessages(null, $attendeetovalidate->errors, "errors"); } else { - dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment'); + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + // Set output language + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang); + // Load traductions files required by page + $outputlangs->loadLangs(array("main", "members")); + // Get email content from template + $arraydefaultmessage = null; + + $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT; + if (!empty($labeltouse)) { + $arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, ''); + } + + if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { + $subject = $arraydefaultmessage->topic; + $msg = $arraydefaultmessage->content; + } + + $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty); + complete_substitutions_array($substitutionarray, $outputlangs, $object); + + $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); + $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs); + + $sendto = $thirdparty->email; + $from = $conf->global->MAILING_EMAIL_FROM; + $urlback = $_SERVER["REQUEST_URI"]; + + $ishtml = dol_textishtml($texttosend); // May contain urls + + $mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(), '', '', 0, $ishtml); + + $result = $mailfile->sendfile(); + if ($result) { + dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_payment'); + } else { + dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment'); + } } } } else { @@ -1085,7 +1090,192 @@ if ($ispaymentok) { $ispostactionok = -1; } } elseif (array_key_exists('BOO', $tmptag) && $tmptag['BOO'] > 0) { - // @todo BOOTH CASE (to copy and adapt from above) + // Record payment + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + $object = new Facture($db); + $result = $object->fetch($ref); + if ($result) { + $FinalPaymentAmt = $_SESSION["FinalPaymentAmt"]; + + $paymentTypeId = 0; + if ($paymentmethod == 'paybox') { + $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS; + } + if ($paymentmethod == 'paypal') { + $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS; + } + if ($paymentmethod == 'stripe') { + $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS; + } + if (empty($paymentTypeId)) { + $paymentType = $_SESSION["paymentType"]; + if (empty($paymentType)) { + $paymentType = 'CB'; + } + $paymentTypeId = dol_getIdFromCode($db, $paymentType, 'c_paiement', 'code', 'id', 1); + } + + $currencyCodeType = $_SESSION['currencyCodeType']; + + // Do action only if $FinalPaymentAmt is set (session variable is cleaned after this page to avoid duplicate actions when page is POST a second time) + if (!empty($FinalPaymentAmt) && $paymentTypeId > 0) { + $resultvalidate = $object->validate($user); + if ($resultvalidate < 0) { + $postactionmessages[] = 'Cannot validate invoice'; + $ispostactionok = -1; + $error++; // Not yet supported + } else { + $db->begin(); + + // Creation of payment line + include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; + $paiement = new Paiement($db); + $paiement->datepaye = $now; + if ($currencyCodeType == $conf->currency) { + $paiement->amounts = array($object->id => $FinalPaymentAmt); // Array with all payments dispatching with invoice id + } else { + $paiement->multicurrency_amounts = array($object->id => $FinalPaymentAmt); // Array with all payments dispatching + + $postactionmessages[] = 'Payment was done in a different currency that currency expected of company'; + $ispostactionok = -1; + $error++; // Not yet supported + } + $paiement->paiementid = $paymentTypeId; + $paiement->num_payment = ''; + $paiement->note_public = 'Online payment '.dol_print_date($now, 'standard').' from '.$ipaddress; + $paiement->ext_payment_id = $TRANSACTIONID; + $paiement->ext_payment_site = $service; + + if (!$error) { + $paiement_id = $paiement->create($user, 1); // This include closing invoices and regenerating documents + if ($paiement_id < 0) { + $postactionmessages[] = $paiement->error.' '.join("
\n", $paiement->errors); + $ispostactionok = -1; + $error++; + } else { + $postactionmessages[] = 'Payment created'; + $ispostactionok = 1; + } + } + + if (!$error && !empty($conf->banque->enabled)) { + $bankaccountid = 0; + if ($paymentmethod == 'paybox') { + $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS; + } elseif ($paymentmethod == 'paypal') { + $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS; + } elseif ($paymentmethod == 'stripe') { + $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS; + } + + if ($bankaccountid > 0) { + $label = '(CustomerInvoicePayment)'; + if ($object->type == Facture::TYPE_CREDIT_NOTE) { + $label = '(CustomerInvoicePaymentBack)'; // Refund of a credit note + } + $result = $paiement->addPaymentToBank($user, 'payment', $label, $bankaccountid, '', ''); + if ($result < 0) { + $postactionmessages[] = $paiement->error.' '.join("
\n", $paiement->errors); + $ispostactionok = -1; + $error++; + } else { + $postactionmessages[] = 'Bank transaction of payment created'; + $ispostactionok = 1; + } + } else { + $postactionmessages[] = 'Setup of bank account to use in module '.$paymentmethod.' was not set. No way to record the payment.'; + $ispostactionok = -1; + $error++; + } + } + + if (!$error) { + // Putting the booth to "suggested" state + $booth = new ConferenceOrBooth($db); + $resultbooth = $booth->fetch($tmptag['BOO']); + if ($resultbooth < 0) { + $error++; + setEventMessages(null, $booth->errors, "errors"); + } else { + $booth->status = CONFERENCEORBOOTH::STATUS_SUGGESTED; + $resultboothupdate = $booth->update($user); + if ($resultboothupdate<0) { + // Finding the thirdparty by getting the invoice + $invoice = new Facture($db); + $resultinvoice = $invoice->fetch($ref); + if ($resultinvoice<0) { + $postactionmessages[] = 'Could not find the associated invoice.'; + $ispostactionok = -1; + $error++; + } else { + $thirdparty = new Societe($db); + $resultthirdparty = $thirdparty->fetch($invoice->socid); + if ($resultthirdparty<0) { + $error++; + setEventMessages(null, $thirdparty->errors, "errors"); + } else { + // Sending mail + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + // Set output language + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang); + // Load traductions files required by page + $outputlangs->loadLangs(array("main", "members")); + // Get email content from template + $arraydefaultmessage = null; + + $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT; + if (!empty($labeltouse)) { + $arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, ''); + } + + if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { + $subject = $arraydefaultmessage->topic; + $msg = $arraydefaultmessage->content; + } + + $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty); + complete_substitutions_array($substitutionarray, $outputlangs, $object); + + $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); + $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs); + + $sendto = $thirdparty->email; + $from = $conf->global->MAILING_EMAIL_FROM; + $urlback = $_SERVER["REQUEST_URI"]; + + $ishtml = dol_textishtml($texttosend); // May contain urls + + $mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(), '', '', 0, $ishtml); + + $result = $mailfile->sendfile(); + if ($result) { + dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_payment'); + } else { + dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment'); + } + } + } + } + } + } + + if (!$error) { + $db->commit(); + } else { + $db->rollback(); + } + } + } else { + $postactionmessages[] = 'Failed to get a valid value for "amount paid" ('.$FinalPaymentAmt.') or "payment type" ('.$paymentType.') to record the payment of invoice '.$tmptag['ATT'].'. May be payment was already recorded.'; + $ispostactionok = -1; + } + } else { + $postactionmessages[] = 'Invoice paid '.$tmptag['ATT'].' was not found'; + $ispostactionok = -1; + } } else { // Nothing done } diff --git a/htdocs/public/project/index.php b/htdocs/public/project/index.php index ce48db9e729..48c77944d72 100644 --- a/htdocs/public/project/index.php +++ b/htdocs/public/project/index.php @@ -1,10 +1,5 @@ - * Copyright (C) 2006-2017 Laurent Destailleur - * Copyright (C) 2009-2012 Regis Houssin - * Copyright (C) 2018 Juanjo Menent - * Copyright (C) 2018-2019 Thibault FOUCART - * Copyright (C) 2021 Waël Almoman +/* Copyright (C) 2021 Dorian Vabre * * 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 @@ -72,7 +67,7 @@ $hookmanager->initHooks(array('newpayment')); global $dolibarr_main_instance_unique_id; // Load translation files -$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", "paybox", "paypal", "stripe")); // File with generic data +$langs->loadLangs(array("other", "dict", "bills", "companies", "errors", "paybox", "paypal", "stripe")); // File with generic data // Security check // No check on module enabled. Done later according to $validpaymentmethod @@ -103,6 +98,23 @@ if ($resultproject < 0) { * Actions */ +if (GETPOST('suggestbooth')) { + header("Location: ".dol_buildpath('/public/project/suggestbooth.php', 1).'?id='.$id."&securekey=".$securekeyreceived); + exit; +} + +if (GETPOST('suggestconference')) { + header("Location: ".dol_buildpath('/public/project/suggestconference.php', 1).'?id='.$id."&securekey=".$securekeyreceived); + exit; +} + +if (GETPOST('viewandvote')) { + header("Location: ".dol_buildpath('/public/project/viewandvote.php', 1).'?id='.$id."&securekey=".$securekeyreceived); + exit; +} + + + /* * View @@ -117,17 +129,7 @@ $conf->dol_hide_topmenu = 1; $conf->dol_hide_leftmenu = 1; $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '
' : '').'
'; -llxHeader($head, $langs->trans("PaymentForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea); - - -// Show sandbox warning -if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled) && (!empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox', 'int'))) { // We can force sand box with param 'forcesandbox' - dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Paypal'), '', 'warning'); -} -if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'int'))) { - dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); -} - +llxHeader($head, $langs->trans("SuggestForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea); print ''."\n"; print '
'."\n"; @@ -135,8 +137,9 @@ print '
'."\n"; print ''."\n"; print ''."\n"; -print ''."\n"; -print ''."\n"; +//print ''."\n"; +print ''."\n"; +print ''."\n"; print ''; print ''; print "\n"; @@ -200,15 +203,16 @@ print "\n"; // Show all action buttons print '
'; // Output introduction text -if ($project->accept_conference_suggestions) { - print ''; +if ($project->accept_booth_suggestions) { + print ''; print '

'; } -print ''; -print '

'; -if ($project->accept_booth_suggestions) { - print ''; +if ($project->accept_conference_suggestions) { + print ''; + print '

'; } +print ''; + diff --git a/htdocs/public/project/new.php b/htdocs/public/project/new.php index 048df9c41b3..e4a8b495d7c 100644 --- a/htdocs/public/project/new.php +++ b/htdocs/public/project/new.php @@ -60,13 +60,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; // Init vars $errmsg = ''; -$num = 0; $error = 0; $backtopage = GETPOST('backtopage', 'alpha'); $action = GETPOST('action', 'aZ09'); // Load translation files -$langs->loadLangs(array("main", "members", "companies", "install", "other")); +$langs->loadLangs(array("members", "companies", "install", "other")); // Security check if (empty($conf->projet->enabled)) { diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php new file mode 100644 index 00000000000..65b15578b7d --- /dev/null +++ b/htdocs/public/project/suggestbooth.php @@ -0,0 +1,646 @@ + + * + * 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 htdocs/public/members/new.php + * \ingroup member + * \brief Example of form to add a new member + * + * Note that you can add following constant to change behaviour of page + * MEMBER_NEWFORM_AMOUNT Default amount for auto-subscribe form + * MEMBER_NEWFORM_EDITAMOUNT 0 or 1 = Amount can be edited + * MEMBER_NEWFORM_PAYONLINE Suggest payment with paypal, paybox or stripe + * MEMBER_NEWFORM_DOLIBARRTURNOVER Show field turnover (specific for dolibarr foundation) + * MEMBER_URL_REDIRECT_SUBSCRIPTION Url to redirect once subscribe submitted + * MEMBER_NEWFORM_FORCETYPE Force type of member + * MEMBER_NEWFORM_FORCEMORPHY Force nature of member (mor/phy) + * MEMBER_NEWFORM_FORCECOUNTRYCODE Force country + */ + +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} + +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retrieve from object ref and not from url. +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.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.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/paymentterm.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; + +global $dolibarr_main_instance_unique_id; +global $dolibarr_main_url_root; + +// Init vars +$errmsg = ''; +$num = 0; +$error = 0; +$backtopage = GETPOST('backtopage', 'alpha'); +$action = GETPOST('action', 'aZ09'); + +$eventtype = GETPOST("eventtype"); +$email = GETPOST("email"); +$societe = GETPOST("societe"); +$label = GETPOST("label"); +$note = GETPOST("note"); +$datestart = GETPOST("datestart"); +$dateend = GETPOST("dateend"); + +$id = GETPOST('id'); + +$project = new Project($db); +$resultproject = $project->fetch($id); +if ($resultproject < 0) { + $error++; + $errmsg .= $project->error; +} + +// Security check +$securekeyreceived = GETPOST("securekey"); +$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); + +if ($securekeytocompare != $securekeyreceived) { + print $langs->trans('MissingOrBadSecureKey'); + exit; +} + +// Load translation files +$langs->loadLangs(array("main", "companies", "install", "other", "eventorganization")); + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('publicnewmembercard', 'globalcard')); + +$extrafields = new ExtraFields($db); + +$user->loadDefaultValues(); + +$cactioncomm = new CActionComm($db); +$arrayofeventtype = $cactioncomm->liste_array('', 'id', '', 0, 'module=\'booth@eventorganization\''); + +/** + * Show header for new member + * + * @param string $title Title + * @param string $head Head array + * @param int $disablejs More content into html header + * @param int $disablehead More content into html header + * @param array $arrayofjs Array of complementary js files + * @param array $arrayofcss Array of complementary css files + * @return void + */ +function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') +{ + global $user, $conf, $langs, $mysoc; + + top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers + + print ''; + + // Define urllogo + $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?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small); + } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { + $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); + } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { + $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; + } + + print '
'; + // Output html code for logo + if ($urllogo) { + print '
'; + print '
'; + print ''; + print '
'; + if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { + print ''; + } + print '
'; + } + print '
'; + + print '
'; +} + +/** + * Show footer for new member + * + * @return void + */ +function llxFooterVierge() +{ + print '
'; + + printCommonFooter('public'); + + print "\n"; + print "\n"; +} + + + +/* + * Actions + */ +global $mysoc; +$parameters = array(); +// Note that $action and $object may have been modified by some hooks +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} + +// Action called when page is submitted +if (empty($reshook) && $action == 'add') { + $error = 0; + + $urlback = ''; + + $db->begin(); + + if (!GETPOST("email")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."
\n"; + } + if (!GETPOST("label")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label"))."
\n"; + } + if (!GETPOST("note")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Note"))."
\n"; + } + if (!GETPOST("datestart")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateStart"))."
\n"; + } + if (!GETPOST("dateend")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd"))."
\n"; + } + if (!GETPOST("email")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."
\n"; + } + if (!GETPOST("lastname")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Name"))."
\n"; + } + if (!GETPOST("societe")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Societe"))."
\n"; + } + if (GETPOST("email") && !isValidEmail(GETPOST("email"))) { + $error++; + $langs->load("errors"); + $errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."
\n"; + } + if (!GETPOST("country_id") && !empty(floatval($project->price_booth))) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Country"))."
\n"; + } + + if (!$error) { + // Getting the thirdparty or creating it + $thirdparty = new Societe($db); + $resultfetchthirdparty = $thirdparty->fetch('', $societe); + + if ($resultfetchthirdparty<=0) { + // Need to create a new one (not found or multiple with the same name) + $thirdparty->name = $societe; + $thirdparty->address = GETPOST("address"); + $thirdparty->zip = GETPOST("zipcode"); + $thirdparty->town = GETPOST("town"); + $thirdparty->client = 2; + $thirdparty->fournisseur = 0; + $thirdparty->country_id = GETPOST("country_id", 'int'); + $thirdparty->state_id = GETPOST("state_id", 'int'); + $thirdparty->email = $email; + + // Load object modCodeTiers + $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON : 'mod_codeclient_leopard'); + if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { + $module = substr($module, 0, dol_strlen($module) - 4); + } + $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); + foreach ($dirsociete as $dirroot) { + $res = dol_include_once($dirroot.$module.'.php'); + if ($res) { + break; + } + } + $modCodeClient = new $module($db); + + if (empty($tmpcode) && !empty($modCodeClient->code_auto)) { + $tmpcode = $modCodeClient->getNextValue($thirdparty, 0); + } + $thirdparty->code_client = $tmpcode; + $readythirdparty = $thirdparty->create($user); + if ($readythirdparty <0) { + $error++; + $errmsg .= $thirdparty->error; + } else { + $thirdparty->country_code = getCountry($thirdparty->country_id, 2, $db, $langs); + $thirdparty->country = getCountry($thirdparty->country_code, 0, $db, $langs); + } + } + // From there we have a thirdparty, now looking for the contact + if (!$error) { + $contact = new Contact($db); + $resultcontact = $contact->fetch('', '', '', $email); + if ($resultcontact<=0) { + // Need to create a contact + $contact->socid = $thirdparty->id; + $contact->lastname = (string) GETPOST("lastname", 'alpha'); + $contact->firstname = (string) GETPOST("firstname", 'alpha'); + $contact->address = (string) GETPOST("address", 'alpha'); + $contact->zip = (string) GETPOST("zipcode", 'alpha'); + $contact->town = (string) GETPOST("town", 'alpha'); + $contact->country_id = (int) GETPOST("country_id", 'int'); + $contact->state_id = (int) GETPOST("state_id", 'int'); + $contact->email = $email; + $contact->statut = 1; //Default status to Actif + + $resultcreatecontact = $contact->create($user); + if ($resultcreatecontact<0) { + $error++; + $errmsg .= $contact->error; + } + } + } + + if (!$error) { + // Adding supplier tag and tag from setup to thirdparty + $category = new Categorie($db); + + $resultcategory = $category->fetch($conf->global->EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH); + + if ($resultcategory<=0) { + $error++; + $errmsg .= $category->error; + } else { + $resultsetcategory = $thirdparty->setCategoriesCommon(array($category->id), CATEGORIE::TYPE_CUSTOMER, false); + if ($resultsetcategory < 0) { + $error++; + $errmsg .= $thirdparty->error; + } else { + $thirdparty->fournisseur = 1; + + // Load object modCodeFournisseur + $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON : 'mod_codeclient_leopard'); + if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { + $module = substr($module, 0, dol_strlen($module) - 4); + } + $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); + foreach ($dirsociete as $dirroot) { + $res = dol_include_once($dirroot.$module.'.php'); + if ($res) { + break; + } + } + $modCodeFournisseur = new $module; + if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) { + $tmpcode = $modCodeFournisseur->getNextValue($thirdparty, 1); + } + $thirdparty->code_fournisseur = $tmpcode; + + $res = $thirdparty->update(0, $user, 1, 1, 1); + + if ($res <= 0) { + $error++; + } + } + } + } + + if (!$error) { + // We have the contact and the thirdparty + $conforbooth = new ConferenceOrBooth($db); + $conforbooth->label = $label; + $conforbooth->fk_soc = $thirdparty->id; + $conforbooth->fk_project = $project->id; + $conforbooth->note = $note; + $conforbooth->fk_action = $eventtype; + $conforbooth->datep =$datestart; + $conforbooth->datep2 = $dateend; + $conforbooth->datec = dol_now(); + $conforbooth->tms = dol_now(); + $resultconforbooth = $conforbooth->create($user); + if ($resultconforbooth<=0) { + $error++; + $errmsg .= $conforbooth->error; + } else { + // Adding the contact to the project + $resultaddcontact = $conforbooth->add_contact($contact->id, 'RESPONSIBLE'); + if ($resultaddcontact<0) { + $error++; + $errmsg .= $conforbooth->error; + } else { + // If this is a paying booth, we have to redirect to payment page and create an invoice + if (!empty(floatval($project->price_booth))) { + $productforinvoicerow = new Product($db); + $resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_BOOTH_LOCATION); + if ($resultprod < 0) { + $error++; + $errmsg .= $productforinvoicerow->error; + } else { + $facture = new Facture($db); + $facture->type = Facture::TYPE_STANDARD; + $facture->socid = $thirdparty->id; + $facture->paye = 0; + $facture->date = dol_now(); + $facture->cond_reglement_id = $contact->cond_reglement_id; + + if (empty($facture->cond_reglement_id)) { + $paymenttermstatic = new PaymentTerm($contact->db); + $facture->cond_reglement_id = $paymenttermstatic->getDefaultId(); + if (empty($facture->cond_reglement_id)) { + $error++; + $contact->error = 'ErrorNoPaymentTermRECEPFound'; + $contact->errors[] = $contact->error; + } + } + $resultfacture = $facture->create($user); + if ($resultfacture <= 0) { + $contact->error = $facture->error; + $contact->errors = $facture->errors; + $error++; + } else { + $db->commit(); + $facture->add_object_linked($contact->element, $contact->id); + } + } + + if (!$error) { + // Add line to draft invoice + $vattouse = get_default_tva($mysoc, $thirdparty, $productforinvoicerow->id); + $result = $facture->addline($langs->trans("BoothLocationFee", $conforbooth->label, dol_print_date($conforbooth->datep, '%d/%m/%y %H:%M:%S'), dol_print_date($conforbooth->datep2, '%d/%m/%y %H:%M:%S')), floatval($project->price_booth), 1, $vattouse, 0, 0, $productforinvoicerow->id, 0, dol_now(), '', 0, 0, '', 'HT', 0, 1); + if ($result <= 0) { + $contact->error = $facture->error; + $contact->errors = $facture->errors; + $error++; + } + if (!$error) { + $valid = true; + $sourcetouse = 'boothlocation'; + $reftouse = $facture->id; + $redirection = $dolibarr_main_url_root.'/public/payment/newpayment.php?source='.$sourcetouse.'&ref='.$reftouse.'&booth='.$conforbooth->id; + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN)) { + if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { + $redirection .= '&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $sourcetouse . $reftouse, 2); // Use the source in the hash to avoid duplicates if the references are identical + } else { + $redirection .= '&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN; + } + } + Header("Location: ".$redirection); + exit; + } + } + } else { + // If no price has been set for the booth, we confirm it as suggested and we update + $conforbooth->status = ConferenceOrBooth::STATUS_SUGGESTED; + $conforbooth->update($user); + // Sending mail + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + // Set output language + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang); + // Load traductions files required by page + $outputlangs->loadLangs(array("main", "members")); + // Get email content from template + $arraydefaultmessage = null; + + $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH; + if (!empty($labeltouse)) { + $arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, ''); + } + + if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { + $subject = $arraydefaultmessage->topic; + $msg = $arraydefaultmessage->content; + } + + $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty); + complete_substitutions_array($substitutionarray, $outputlangs, $object); + + $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); + $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs); + + $sendto = $thirdparty->email; + $from = $conf->global->MAILING_EMAIL_FROM; + $urlback = $_SERVER["REQUEST_URI"]; + + $ishtml = dol_textishtml($texttosend); // May contain urls + + $mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(), '', '', 0, $ishtml); + + $result = $mailfile->sendfile(); + if ($result) { + dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_payment'); + } else { + dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment'); + } + } + } + } + } + } + if (!$error) { + $db->commit(); + $securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); + $redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.$id.'&securekey='.$securekeyurl; + Header("Location: ".$redirection); + exit; + } else { + $db->rollback(); + } +} + + +/* + * View + */ + +$form = new Form($db); +$formcompany = new FormCompany($db); + +llxHeaderVierge($langs->trans("NewSuggestion")); + + +print load_fiche_titre($langs->trans("NewSuggestion"), '', '', 0, 0, 'center'); + + +print '
'; +print '
'; +print '
'; + +// Welcome message +$text = '

'; +$text .= ''."\n"; +$text .= ''."\n";; +print $text; +print ''; + +dol_htmloutput_errors($errmsg); + +// Print form +print ''."\n"; +print ''; +print ''; +print ''; +print ''; +print ''; + +print '
'; + +print '
'.$langs->trans("FieldsWithAreMandatory", '*').'
'; +//print $langs->trans("FieldsWithIsForPublic",'**').'
'; + +print dol_get_fiche_head(''); + +print ''; + +print '
'; + print '
'; + print ''; if ($action != 'editmode' && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)) { - print ''; + print ''; } print '
'; print $langs->trans('IntracommReportTransportMode'); print 'id.'">'.img_edit($langs->trans('SetMode'), 1).'id.'">'.img_edit().'
'; print '
'.num_open_day($date_start_inmonth, $date_end_inmonth, 0, 1, $halfdayinmonth).''.dol_escape_htmltag(dolGetFirstLineOfText($obj->description)).''.dol_escape_htmltag(dolGetFirstLineOfText($obj->description)).''; if ($object->status == $object::STATUS_VALIDATED) { - $qty_view = GETPOST("id_".$obj->rowid) ? GETPOST("id_".$obj->rowid) : $obj->qty_view; + $qty_view = GETPOST("id_".$obj->rowid) && price2num(GETPOST("id_".$obj->rowid), 'MS') >= 0 ? GETPOST("id_".$obj->rowid) : $obj->qty_view; $totalfound += price2num($qty_view, 'MS'); print ''; print '
'.$langs->trans("T $found = false; $error = 0; -$var = false; $object = null; @@ -905,17 +927,17 @@ if (!$source) { } // Creditor - print '
'.$langs->trans("Creditor"); - print ''.$creditor.''; + print '
'.$langs->trans("Creditor"); + print ''.$creditor.''; print ''; print '
'.$langs->trans("Amount"); + print '
'.$langs->trans("Amount"); if (empty($amount)) { print ' ('.$langs->trans("ToComplete").')'; } - print ''; + print ''; if (empty($amount) || !is_numeric($amount)) { print ''; print ''; @@ -930,8 +952,8 @@ if (!$source) { print '
'.$langs->trans("PaymentCode"); - print ''.$fulltag.''; + print '
'.$langs->trans("PaymentCode"); + print ''.$fulltag.''; print ''; print ''; print '
'.$langs->trans("Creditor"); - print ''.$creditor.''; + print '
'.$langs->trans("Creditor"); + print ''.$creditor.''; print ''; print '
'.$langs->trans("ThirdParty"); - print ''.$order->thirdparty->name.''; + print '
'.$langs->trans("ThirdParty"); + print ''.$order->thirdparty->name.''; print '
'.$langs->trans("Designation"); - print ''.$text; + print '
'.$langs->trans("Designation"); + print ''.$text; print ''; print ''; print ''; @@ -1006,11 +1028,11 @@ if ($source == 'order') { print '
'.$langs->trans("Amount"); + print '
'.$langs->trans("Amount"); if (empty($amount)) { print ' ('.$langs->trans("ToComplete").')'; } - print ''; + print ''; if (empty($amount) || !is_numeric($amount)) { print ''; print ''; @@ -1025,8 +1047,8 @@ if ($source == 'order') { print '
'.$langs->trans("PaymentCode"); - print ''.$fulltag.''; + print '
'.$langs->trans("PaymentCode"); + print ''.$fulltag.''; print ''; print ''; print '
'.$langs->trans("Creditor"); - print ''.$creditor.''; + print '
'.$langs->trans("Creditor"); + print ''.$creditor.''; print ''; print '
'.$langs->trans("ThirdParty"); - print ''.$invoice->thirdparty->name.''; + print '
'.$langs->trans("ThirdParty"); + print ''.$invoice->thirdparty->name.''; print '
'.$langs->trans("Designation"); - print ''.$text; + print '
'.$langs->trans("Designation"); + print ''.$text; print ''; print ''; print ''; @@ -1130,11 +1152,11 @@ if ($source == 'invoice') { print '
'.$langs->trans("PaymentAmount"); + print '
'.$langs->trans("PaymentAmount"); if (empty($amount) && empty($object->paye)) { print ' ('.$langs->trans("ToComplete").')'; } - print ''; + print ''; if ($object->type == $object::TYPE_CREDIT_NOTE) { print ''.$langs->trans("CreditNote").''; } elseif (empty($object->paye)) { @@ -1156,8 +1178,8 @@ if ($source == 'invoice') { print '
'.$langs->trans("PaymentCode"); - print ''.$fulltag.''; + print '
'.$langs->trans("PaymentCode"); + print ''.$fulltag.''; print ''; print ''; print '
'.$langs->trans("Creditor"); - print ''.$creditor.''; + print '
'.$langs->trans("Creditor"); + print ''.$creditor.''; print ''; print '
'.$langs->trans("ThirdParty"); - print ''.$contract->thirdparty->name.''; + print '
'.$langs->trans("ThirdParty"); + print ''.$contract->thirdparty->name.''; print '
'.$langs->trans("Designation"); - print ''.$text; + print '
'.$langs->trans("Designation"); + print ''.$text; print ''; print ''; print ''; @@ -1331,17 +1353,17 @@ if ($source == 'contractline') { $duration = $contractline->product->duration_value.' '.$dur[$contractline->product->duration_unit]; } } - print '
'.$label.''.($duration ? $duration : $qty).''; + print '
'.$label.''.($duration ? $duration : $qty).''; print ''; print '
'.$langs->trans("Amount"); + print '
'.$langs->trans("Amount"); if (empty($amount)) { print ' ('.$langs->trans("ToComplete").')'; } - print ''; + print ''; if (empty($amount) || !is_numeric($amount)) { print ''; print ''; @@ -1356,8 +1378,8 @@ if ($source == 'contractline') { print '
'.$langs->trans("PaymentCode"); - print ''.$fulltag.''; + print '
'.$langs->trans("PaymentCode"); + print ''.$fulltag.''; print ''; print ''; print '
'.$langs->trans("Creditor"); - print ''.$creditor.''; + print '
'.$langs->trans("Creditor"); + print ''.$creditor.''; print ''; print '
'.$langs->trans("Member"); - print ''; + print '
'.$langs->trans("Member"); + print ''; if ($member->morphy == 'mor' && !empty($member->societe)) { print $member->societe; } else { @@ -1454,29 +1476,29 @@ if ($source == 'member' || $source == 'membersubscription') { if (GETPOST('desc', 'alpha')) { $text = ''.$langs->trans(GETPOST('desc', 'alpha')).''; } - print '
'.$langs->trans("Designation"); - print ''.$text; + print '
'.$langs->trans("Designation"); + print ''.$text; print ''; print ''; print '
'.$langs->trans("DateEndSubscription"); - print ''.dol_print_date($member->datefin, 'day'); + print '
'.$langs->trans("DateEndSubscription"); + print ''.dol_print_date($member->datefin, 'day'); print '
'.$langs->trans("LastSubscriptionDate"); - print ''.dol_print_date($member->last_subscription_date, 'day'); + print '
'.$langs->trans("LastSubscriptionDate"); + print ''.dol_print_date($member->last_subscription_date, 'day'); print '
'.$langs->trans("LastSubscriptionAmount"); - print ''.price($member->last_subscription_amount); + print '
'.$langs->trans("LastSubscriptionAmount"); + print ''.price($member->last_subscription_amount); print '
'.$langs->trans("LastMemberType"); - print ''.dol_escape_htmltag($member->type); + print '
'.$langs->trans("LastMemberType"); + print ''.dol_escape_htmltag($member->type); print "
'.$langs->trans("NewSubscription"); - print ''; + print '
'.$langs->trans("NewSubscription"); + print ''; print $form->selectarray("typeid", $adht->liste_array(1), $member->typeid, 0, 0, 0, 'onchange="window.location.replace(\''.$urlwithroot.'/public/payment/newpayment.php?source='.urlencode($source).'&ref='.urlencode($ref).'&amount='.urlencode($amount).'&typeid=\' + this.value + \'&securekey='.urlencode($SECUREKEY).'\');"', 0, 0, 0, '', '', 1); print "
'.$langs->trans("NewMemberType"); - print ''.dol_escape_htmltag($member->type); + print '
'.$langs->trans("NewMemberType"); + print ''.dol_escape_htmltag($member->type); print ''; print "
'.$langs->trans("MemberType"); - print ''.dol_escape_htmltag($member->type); + print '
'.$langs->trans("MemberType"); + print ''.dol_escape_htmltag($member->type); print "
'.$langs->trans("Amount"); + print '
'.$langs->trans("Amount"); if (empty($amount)) { if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { print ' ('.$langs->trans("ToComplete"); @@ -1538,7 +1560,7 @@ if ($source == 'member' || $source == 'membersubscription') { print ')'; } } - print ''; + print ''; $valtoshow = ''; if (empty($amount) || !is_numeric($amount)) { $valtoshow = price2num(GETPOST("newamount", 'alpha'), 'MT'); @@ -1583,8 +1605,8 @@ if ($source == 'member' || $source == 'membersubscription') { print '
'.$langs->trans("PaymentCode"); - print ''.$fulltag.''; + print '
'.$langs->trans("PaymentCode"); + print ''.$fulltag.''; print ''; print ''; print '
'.$langs->trans("Creditor"); - print ''.$creditor.''; + print '
'.$langs->trans("Creditor"); + print ''.$creditor.''; print ''; print '
'.$langs->trans("ThirdParty"); - print ''; + print '
'.$langs->trans("ThirdParty"); + print ''; if ($don->morphy == 'mor' && !empty($don->societe)) { print $don->societe; } else { @@ -1680,14 +1702,14 @@ if ($source == 'donation') { if (GETPOST('desc', 'alpha')) { $text = ''.$langs->trans(GETPOST('desc', 'alpha')).''; } - print '
'.$langs->trans("Designation"); - print ''.$text; + print '
'.$langs->trans("Designation"); + print ''.$text; print ''; print ''; print '
'.$langs->trans("Amount"); + print '
'.$langs->trans("Amount"); if (empty($amount)) { if (empty($conf->global->MEMBER_NEWFORM_AMOUNT)) { print ' ('.$langs->trans("ToComplete"); @@ -1699,7 +1721,7 @@ if ($source == 'donation') { print ')'; } } - print ''; + print ''; $valtoshow = ''; if (empty($amount) || !is_numeric($amount)) { $valtoshow = price2num(GETPOST("newamount", 'alpha'), 'MT'); @@ -1739,8 +1761,8 @@ if ($source == 'donation') { print '
'.$langs->trans("PaymentCode"); - print ''.$fulltag.''; + print '
'.$langs->trans("PaymentCode"); + print ''.$fulltag.''; print ''; print ''; print '
'.$langs->trans("Creditor"); - print ''.$creditor.''; + print '
'.$langs->trans("Creditor"); + print ''.$creditor.''; print ''; print '
'.$langs->trans("Attendee"); - print ''; + print '
'.$langs->trans("Attendee"); + print ''; print $thirdparty->name; print ''; print '
'.$langs->trans("Designation"); - print ''.$text; + print '
'.$langs->trans("Designation"); + print ''.$text; print ''; print ''; print '
'.$langs->trans("Amount"); - print ''; + print '
'.$langs->trans("Amount"); + print ''; $valtoshow = $amount; print ''.price($valtoshow).''; print ''; @@ -1830,8 +1849,94 @@ if ($source == 'conferencesubscription') { print '
'.$langs->trans("PaymentCode"); - print ''.$fulltag.''; + print '
'.$langs->trans("PaymentCode"); + print ''.$fulltag.''; + print ''; + print ''; + print '
'.$langs->trans("Creditor"); + print ''.$creditor.''; + print ''; + print '
'.$langs->trans("Attendee"); + print ''; + print $thirdparty->name; + print ''; + print '
'.$langs->trans("Designation"); + print ''.$text; + print ''; + print ''; + print '
'.$langs->trans("Amount"); + print ''; + $valtoshow = $amount; + print ''.price($valtoshow).''; + print ''; + print ''; + + // Currency + print ' '.$langs->trans("Currency".$currency).''; + print ''; + print '
'.$langs->trans("PaymentCode"); + print ''.$fulltag.''; print ''; print ''; print '
'.$langs->trans("EvntOrgRegistrationBoothWelcomeMessage").'
'.$langs->trans("EvntOrgRegistrationBoothHelpMessage").' '.$id.'.

'.$project->note_public.'
'."\n"; + +// Name +print ''; +print ''; +print ''; +// Email +print ''."\n"; +// Company +print ''."\n"; +// Type of event +print ''."\n"; +print ''; +// Label +print ''."\n"; +print ''."\n"; +// Note +print ''."\n"; +print ''."\n"; +// Start Date +print ''."\n"; +print ''."\n"; +// End Date +print ''."\n"; +print ''."\n"; +// Address +print ''."\n"; +// Zip / Town +print ''; +// Country +print ''; +// State +if (empty($conf->global->SOCIETE_DISABLE_STATE)) { + print ''; +} + +print "
lastname).'" autofocus="autofocus">
'.$langs->trans("Email").'*
'.$langs->trans("Company").'*'; +print '
'.$langs->trans("EventType").'*'.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).'
'.$langs->trans("Label").'*
'.$langs->trans("Note").'*
'.$langs->trans("DateStart").'*
'.$langs->trans("DateEnd").'*
'.$langs->trans("Address").''."\n"; +print '
'.$langs->trans('Zip').' / '.$langs->trans('Town').''; +print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6, 1); +print ' / '; +print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1); +print '
'.$langs->trans('Country'); +if (!empty(floatval($project->price_booth))) { + print '*'; +} +print ''; +$country_id = GETPOST('country_id'); +if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) { + $country_id = getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs); +} +if (!$country_id && !empty($conf->geoipmaxmind->enabled)) { + $country_code = dol_user_country(); + //print $country_code; + if ($country_code) { + $new_country_id = getCountry($country_code, 3, $db, $langs); + //print 'xxx'.$country_code.' - '.$new_country_id; + if ($new_country_id) { + $country_id = $new_country_id; + } + } +} +$country_code = getCountry($country_id, 2, $db, $langs); +print $form->select_country($country_id, 'country_id'); +print '
'.$langs->trans('State').''; + if ($country_code) { + print $formcompany->select_state(GETPOST("state_id"), $country_code); + } else { + print ''; + } + print '
\n"; + +print dol_get_fiche_end(); + + +// Show all action buttons +print '
'; +print '
'; +print ''; +print '
'; +print '

'; + + + +print "\n"; +print "
"; +print '
'; + + +llxFooterVierge(); + +$db->close(); diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php new file mode 100644 index 00000000000..19eb0801c6a --- /dev/null +++ b/htdocs/public/project/suggestconference.php @@ -0,0 +1,585 @@ + + * + * 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 htdocs/public/members/new.php + * \ingroup member + * \brief Example of form to add a new member + * + * Note that you can add following constant to change behaviour of page + * MEMBER_NEWFORM_AMOUNT Default amount for auto-subscribe form + * MEMBER_NEWFORM_EDITAMOUNT 0 or 1 = Amount can be edited + * MEMBER_NEWFORM_PAYONLINE Suggest payment with paypal, paybox or stripe + * MEMBER_NEWFORM_DOLIBARRTURNOVER Show field turnover (specific for dolibarr foundation) + * MEMBER_URL_REDIRECT_SUBSCRIPTION Url to redirect once subscribe submitted + * MEMBER_NEWFORM_FORCETYPE Force type of member + * MEMBER_NEWFORM_FORCEMORPHY Force nature of member (mor/phy) + * MEMBER_NEWFORM_FORCECOUNTRYCODE Force country + */ + +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} + +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php +// TODO This should be useless. Because entity must be retrieve from object ref and not from url. +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.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.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/paymentterm.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; + +global $dolibarr_main_instance_unique_id; +global $dolibarr_main_url_root; + +// Init vars +$errmsg = ''; +$num = 0; +$error = 0; +$backtopage = GETPOST('backtopage', 'alpha'); +$action = GETPOST('action', 'aZ09'); + +$eventtype = GETPOST("eventtype"); +$email = GETPOST("email"); +$societe = GETPOST("societe"); +$label = GETPOST("label"); +$note = GETPOST("note"); +$datestart = GETPOST("datestart"); +$dateend = GETPOST("dateend"); + +$id = GETPOST('id'); + +$project = new Project($db); +$resultproject = $project->fetch($id); +if ($resultproject < 0) { + $error++; + $errmsg .= $project->error; +} + +// Security check +$securekeyreceived = GETPOST("securekey"); +$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); + +if ($securekeytocompare != $securekeyreceived) { + print $langs->trans('MissingOrBadSecureKey'); + exit; +} + +// Load translation files +$langs->loadLangs(array("main", "companies", "install", "other", "eventorganization")); + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('publicnewmembercard', 'globalcard')); + +$extrafields = new ExtraFields($db); + +$user->loadDefaultValues(); + +$cactioncomm = new CActionComm($db); +$arrayofeventtype = $cactioncomm->liste_array('', 'id', '', 0, 'module=\'conference@eventorganization\''); + +/** + * Show header for new member + * + * @param string $title Title + * @param string $head Head array + * @param int $disablejs More content into html header + * @param int $disablehead More content into html header + * @param array $arrayofjs Array of complementary js files + * @param array $arrayofcss Array of complementary css files + * @return void + */ +function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') +{ + global $user, $conf, $langs, $mysoc; + + top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers + + print ''; + + // Define urllogo + $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?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small); + } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { + $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); + } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { + $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; + } + + print '
'; + // Output html code for logo + if ($urllogo) { + print '
'; + print '
'; + print ''; + print '
'; + if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { + print ''; + } + print '
'; + } + print '
'; + + print '
'; +} + +/** + * Show footer for new member + * + * @return void + */ +function llxFooterVierge() +{ + print '
'; + + printCommonFooter('public'); + + print "\n"; + print "\n"; +} + + + +/* + * Actions + */ +global $mysoc; +$parameters = array(); +// Note that $action and $object may have been modified by some hooks +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} + +// Action called when page is submitted +if (empty($reshook) && $action == 'add') { + $error = 0; + + $urlback = ''; + + $db->begin(); + + if (!GETPOST("email")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."
\n"; + } + if (!GETPOST("label")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label"))."
\n"; + } + if (!GETPOST("note")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Note"))."
\n"; + } + if (!GETPOST("datestart")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateStart"))."
\n"; + } + if (!GETPOST("dateend")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd"))."
\n"; + } + if (!GETPOST("email")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."
\n"; + } + if (!GETPOST("lastname")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Lastname"))."
\n"; + } + if (!GETPOST("firstname")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Firstname"))."
\n"; + } + if (!GETPOST("societe")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Societe"))."
\n"; + } + if (GETPOST("email") && !isValidEmail(GETPOST("email"))) { + $error++; + $langs->load("errors"); + $errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."
\n"; + } + + if (!$error) { + // Getting the thirdparty or creating it + $thirdparty = new Societe($db); + $resultfetchthirdparty = $thirdparty->fetch('', $societe); + + if ($resultfetchthirdparty<=0) { + // Need to create a new one (not found or multiple with the same name) + $thirdparty->name = $societe; + $thirdparty->address = GETPOST("address"); + $thirdparty->zip = GETPOST("zipcode"); + $thirdparty->town = GETPOST("town"); + $thirdparty->client = 2; + $thirdparty->fournisseur = 0; + $thirdparty->country_id = GETPOST("country_id", 'int'); + $thirdparty->state_id = GETPOST("state_id", 'int'); + $thirdparty->email = $email; + + // Load object modCodeTiers + $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON : 'mod_codeclient_leopard'); + if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { + $module = substr($module, 0, dol_strlen($module) - 4); + } + $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); + foreach ($dirsociete as $dirroot) { + $res = dol_include_once($dirroot.$module.'.php'); + if ($res) { + break; + } + } + $modCodeClient = new $module($db); + + if (empty($tmpcode) && !empty($modCodeClient->code_auto)) { + $tmpcode = $modCodeClient->getNextValue($thirdparty, 0); + } + $thirdparty->code_client = $tmpcode; + $readythirdparty = $thirdparty->create($user); + if ($readythirdparty <0) { + $error++; + $errmsg .= $thirdparty->error; + } else { + $thirdparty->country_code = getCountry($thirdparty->country_id, 2, $db, $langs); + $thirdparty->country = getCountry($thirdparty->country_code, 0, $db, $langs); + } + } + // From there we have a thirdparty, now looking for the contact + if (!$error) { + $contact = new Contact($db); + $resultcontact = $contact->fetch('', '', '', $email); + if ($resultcontact<=0) { + // Need to create a contact + $contact->socid = $thirdparty->id; + $contact->lastname = (string) GETPOST("lastname", 'alpha'); + $contact->firstname = (string) GETPOST("firstname", 'alpha'); + $contact->address = (string) GETPOST("address", 'alpha'); + $contact->zip = (string) GETPOST("zipcode", 'alpha'); + $contact->town = (string) GETPOST("town", 'alpha'); + $contact->country_id = (int) GETPOST("country_id", 'int'); + $contact->state_id = (int) GETPOST("state_id", 'int'); + $contact->email = $email; + $contact->statut = 1; //Default status to Actif + $resultcreatecontact = $contact->create($user); + if ($resultcreatecontact<0) { + $error++; + $errmsg .= $contact->error; + } + } + } + + if (!$error) { + // Adding supplier tag and tag from setup to thirdparty + $category = new Categorie($db); + + $resultcategory = $category->fetch($conf->global->EVENTORGANIZATION_CATEG_THIRDPARTY_CONF); + + if ($resultcategory<=0) { + $error++; + $errmsg .= $category->error; + } else { + $resultsetcategory = $thirdparty->setCategoriesCommon(array($category->id), CATEGORIE::TYPE_CUSTOMER, false); + if ($resultsetcategory < 0) { + $error++; + $errmsg .= $thirdparty->error; + } else { + $thirdparty->fournisseur = 1; + + // Load object modCodeFournisseur + $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON : 'mod_codeclient_leopard'); + if (substr($module, 0, 15) == 'mod_codeclient_' && substr($module, -3) == 'php') { + $module = substr($module, 0, dol_strlen($module) - 4); + } + $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); + foreach ($dirsociete as $dirroot) { + $res = dol_include_once($dirroot.$module.'.php'); + if ($res) { + break; + } + } + $modCodeFournisseur = new $module; + if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) { + $tmpcode = $modCodeFournisseur->getNextValue($thirdparty, 1); + } + $thirdparty->code_fournisseur = $tmpcode; + + $res = $thirdparty->update(0, $user, 1, 1, 1); + + if ($res <= 0) { + $error++; + } + } + } + } + + if (!$error) { + // We have the contact and the thirdparty + $conforbooth = new ConferenceOrBooth($db); + $conforbooth->label = $label; + $conforbooth->fk_soc = $thirdparty->id; + $conforbooth->fk_project = $project->id; + $conforbooth->note = $note; + $conforbooth->fk_action = $eventtype; + $conforbooth->datep =$datestart; + $conforbooth->datep2 = $dateend; + $conforbooth->datec = dol_now(); + $conforbooth->tms = dol_now(); + $conforbooth->firstname = $contact->firstname; + $conforbooth->lastname = $contact->lastname; + $resultconforbooth = $conforbooth->create($user); + if ($resultconforbooth<=0) { + $error++; + $errmsg .= $conforbooth->error; + } else { + // Adding the contact to the project + $resultaddcontact = $conforbooth->add_contact($contact->id, 'SPEAKER'); + if ($resultaddcontact<0) { + $error++; + $errmsg .= $conforbooth->error; + } else { + $conforbooth->status = ConferenceOrBooth::STATUS_SUGGESTED; + $conforbooth->update($user); + + // Sending mail + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + // Set output language + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang); + // Load traductions files required by page + $outputlangs->loadLangs(array("main", "members")); + // Get email content from template + $arraydefaultmessage = null; + + $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF; + if (!empty($labeltouse)) { + $arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, ''); + } + + if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { + $subject = $arraydefaultmessage->topic; + $msg = $arraydefaultmessage->content; + } + + $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty); + complete_substitutions_array($substitutionarray, $outputlangs, $object); + + $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); + $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs); + + $sendto = $thirdparty->email; + $from = $conf->global->MAILING_EMAIL_FROM; + $urlback = $_SERVER["REQUEST_URI"]; + + $ishtml = dol_textishtml($texttosend); // May contain urls + + $mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(), '', '', 0, $ishtml); + + $result = $mailfile->sendfile(); + if ($result) { + dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_payment'); + } else { + dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment'); + } + } + } + } + } + if (!$error) { + $db->commit(); + $securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); + $redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.$id.'&securekey='.$securekeyurl; + Header("Location: ".$redirection); + exit; + } else { + $db->rollback(); + } +} + + +/* + * View + */ + +$form = new Form($db); +$formcompany = new FormCompany($db); + +llxHeaderVierge($langs->trans("NewSuggestion")); + + +print load_fiche_titre($langs->trans("NewSuggestion"), '', '', 0, 0, 'center'); + + +print '
'; +print '
'; +print '
'; + +// Welcome message +$text = ''.$langs->trans("EvntOrgRegistrationConfWelcomeMessage").'
'; +$text .= ''.$langs->trans("EvntOrgRegistrationConfHelpMessage").' '.$id.'.

'."\n"; +$text .= ''.$project->note_public.''."\n";; +print $text; +print '
'; + +dol_htmloutput_errors($errmsg); + +// Print form +print '
'."\n"; +print ''; +print ''; +print ''; +print ''; +print ''; + +print '
'; + +print '
'.$langs->trans("FieldsWithAreMandatory", '*').'
'; +//print $langs->trans("FieldsWithIsForPublic",'**').'
'; + +print dol_get_fiche_head(''); + +print ''; + +print ''."\n"; + +// Last Name +print ''; +print ''; +print ''; +// First Name +print ''; +print ''; +print ''; +// Email +print ''."\n"; +// Company +print ''."\n"; +// Type of event +print ''."\n"; +print ''; +// Label +print ''."\n"; +print ''."\n"; +// Note +print ''."\n"; +print ''."\n"; +// Start Date +print ''."\n"; +print ''."\n"; +// End Date +print ''."\n"; +print ''."\n"; +// Address +print ''."\n"; +// Zip / Town +print ''; +// Country +print ''; +// State +if (empty($conf->global->SOCIETE_DISABLE_STATE)) { + print ''; +} + +print "
lastname).'" autofocus="autofocus">
firstname).'" autofocus="autofocus">
'.$langs->trans("Email").'*
'.$langs->trans("Company").'*'; +print '
'.$langs->trans("EventType").'*'.FORM::selectarray('eventtype', $arrayofeventtype, $eventtype).'
'.$langs->trans("Label").'*
'.$langs->trans("Note").'*
'.$langs->trans("DateStart").'
'.$langs->trans("DateEnd").'
'.$langs->trans("Address").''."\n"; +print '
'.$langs->trans('Zip').' / '.$langs->trans('Town').''; +print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6, 1); +print ' / '; +print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1); +print '
'.$langs->trans('Country').''; +$country_id = GETPOST('country_id'); +if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) { + $country_id = getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs); +} +if (!$country_id && !empty($conf->geoipmaxmind->enabled)) { + $country_code = dol_user_country(); + //print $country_code; + if ($country_code) { + $new_country_id = getCountry($country_code, 3, $db, $langs); + //print 'xxx'.$country_code.' - '.$new_country_id; + if ($new_country_id) { + $country_id = $new_country_id; + } + } +} +$country_code = getCountry($country_id, 2, $db, $langs); +print $form->select_country($country_id, 'country_id'); +print '
'.$langs->trans('State').''; + if ($country_code) { + print $formcompany->select_state(GETPOST("state_id"), $country_code); + } else { + print ''; + } + print '
\n"; + +print dol_get_fiche_end(); + + +// Show all action buttons +print '
'; +print '
'; +print ''; +print '

'; + + + + +print "\n"; +print "
"; +print '
'; + + +llxFooterVierge(); + +$db->close(); diff --git a/htdocs/public/project/viewandvote.php b/htdocs/public/project/viewandvote.php new file mode 100644 index 00000000000..9177e0edc8d --- /dev/null +++ b/htdocs/public/project/viewandvote.php @@ -0,0 +1,284 @@ + + * + * 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 htdocs/public/payment/newpayment.php + * \ingroup core + * \brief File to offer a way to make a payment for a particular Dolibarr object + */ + +if (!defined('NOLOGIN')) { + define("NOLOGIN", 1); // This means this output page does not require to be logged. +} +if (!defined('NOCSRFCHECK')) { + define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. +} +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} +if (!defined('NOBROWSERNOTIF')) { + define('NOBROWSERNOTIF', '1'); +} + +// For MultiCompany module. +// Do not use GETPOST here, function is not defined and get of entity must be done before including main.inc.php +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1)))); +if (is_numeric($entity)) { + define("DOLENTITY", $entity); +} + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; +require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; +// Hook to be used by external payment modules (ie Payzen, ...) +include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; +$hookmanager = new HookManager($db); +$hookmanager->initHooks(array('newpayment')); + +// For encryption +global $dolibarr_main_instance_unique_id, $dolibarr_main_url_root; + +// Load translation files +$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", "paybox", "paypal", "stripe")); // File with generic data + +// Security check +// No check on module enabled. Done later according to $validpaymentmethod + +$action = GETPOST('action', 'aZ09'); +$id = GETPOST('id'); +$securekeyreceived = GETPOST("securekey"); +$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); + +if ($securekeytocompare != $securekeyreceived) { + print $langs->trans('MissingOrBadSecureKey'); + exit; +} + +$listofvotes = explode(',', $_SESSION["savevotes"]); + + +// Define $urlwithroot +//$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); +//$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file +$urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current. For Paypal payment, we can use internal URL like localhost. + +$project = new Project($db); +$resultproject = $project->fetch($id); +if ($resultproject < 0) { + $error++; + $errmsg .= $project->error; +} + +/* + * Actions + */ +$tmpthirdparty = new Societe($db); + +$listOfConferences = $listOfBooths = ''.$langs->trans('Label').' + '.$langs->trans('Type').' + '.$langs->trans('DateStart').' + '.$langs->trans('DateEnd').' + '.$langs->trans('Thirdparty').' + '.$langs->trans('Note').''; + +$sql = "SELECT a.id, a.fk_action, a.datep, a.datep2, a.label, a.fk_soc, a.note, ca.libelle + FROM ".MAIN_DB_PREFIX."actioncomm as a + INNER JOIN ".MAIN_DB_PREFIX."c_actioncomm as ca ON (a.fk_action=ca.id) + WHERE a.status<2"; + +$sqlforconf = $sql." AND ca.module='conference@eventorganization'"; +$sqlforbooth = $sql." AND ca.module='booth@eventorganization'"; + +// For conferences +$result = $db->query($sqlforconf); +$i = 0; +while ($i < $db->num_rows($result)) { + $obj = $db->fetch_object($result); + if (!empty($obj->fk_soc)) { + $resultthirdparty = $tmpthirdparty->fetch($obj->fk_soc); + if ($resultthirdparty) { + $thirdpartyname = $tmpthirdparty->name; + } else { + $thirdpartyname = ''; + } + } else { + $thirdpartyname = ''; + } + + $listOfConferences .= ''.$obj->label.''.$obj->libelle.''.$obj->datep.''.$obj->datep2.''.$thirdpartyname.''.$obj->note.''; + $listOfConferences .= ''; + $i++; +} + +// For booths +$result = $db->query($sqlforbooth); +$i = 0; +while ($i < $db->num_rows($result)) { + $obj = $db->fetch_object($result); + if (!empty($obj->fk_soc)) { + $resultthirdparty = $tmpthirdparty->fetch($obj->fk_soc); + if ($resultthirdparty) { + $thirdpartyname = $tmpthirdparty->name; + } else { + $thirdpartyname = ''; + } + } else { + $thirdpartyname = ''; + } + + $listOfBooths .= ''.$obj->label.''.$obj->libelle.''.$obj->datep.''.$obj->datep2.''.$thirdpartyname.''.$obj->note.''; + $listOfBooths .= ''; + $i++; +} + +// Get vote result +$idvote = GETPOST("vote"); +$hashedvote = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'vote'.$idvote); + +if (strlen($idvote)) { + if (in_array($hashedvote, $listofvotes)) { + // Has already voted + $votestatus = 'ko'; + } else { + // Has not already voted + $conforbooth = new ActionComm($db); + $resultconforbooth = $conforbooth->fetch($idvote); + if ($resultconforbooth<=0) { + $error++; + $errmsg .= $conforbooth->error; + } else { + // Process to vote + $conforbooth->num_vote++; + $resupdate = $conforbooth->update($user); + if ($resupdate) { + $votestatus = 'ok'; + $_SESSION["savevotes"] = $hashedvote.','.(empty($_SESSION["savevotes"]) ? '' : $_SESSION["savevotes"]); // Save voter + } else { + //Error during update + $votestatus = 'err'; + } + } + } + if ($votestatus=="ok") { + setEventMessage($langs->trans("VoteOk"), 'mesgs'); + } elseif ($votestatus=="ko") { + setEventMessage($langs->trans("AlreadyVoted"), 'warnings'); + } elseif ($votestatus=="err") { + setEventMessage($langs->trans("VoteError"), 'warnings'); + } + header("Refresh:0;url=".dol_buildpath('/public/project/viewandvote.php?id='.$id.'&securekey=', 1).$securekeyreceived); + exit; +} + + +/* + * View + */ + +$head = ''; +if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) { + $head = ''."\n"; +} + +$conf->dol_hide_topmenu = 1; +$conf->dol_hide_leftmenu = 1; + +$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '
' : '').'
'; +llxHeader($head, $langs->trans("SuggestForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea); + +print ''."\n"; +print '
'."\n"; +print '
'."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +//print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''; +print ''; +print "\n"; + + +// Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo) +// Define logo and logosmall +$logosmall = $mysoc->logo_small; +$logo = $mysoc->logo; +$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; +if (!empty($conf->global->$paramlogo)) { + $logosmall = $conf->global->$paramlogo; +} elseif (!empty($conf->global->ONLINE_PAYMENT_LOGO)) { + $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; +} +//print ''."\n"; +// Define urllogo +$urllogo = ''; +$urllogofull = ''; +if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) { + $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); + $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); +} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { + $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); + $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); +} + +// Output html code for logo +if ($urllogo) { + print '
'; + print '
'; + print ''; + print '
'; + if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { + print ''; + } + print '
'; +} +print ''."\n"; +$text = ''."\n"; +$text .= ''."\n"; +$text .= ''."\n";; +print $text; +print '

'.$langs->trans("EvntOrgRegistrationWelcomeMessage").'
'.$langs->trans("EvntOrgVoteHelpMessage").' : "'.$project->title.'".

'.$project->note_public.'
'."\n"; + +print dol_get_fiche_head(''); + +print ''."\n"; +print ''; +print $listOfConferences.'
'; +print '
'.$langs->trans("ListOfSuggestedConferences").'
'."\n"; + +print '
'; + +print ''."\n"; +print ''; +print $listOfBooths.'
'; +print '
'.$langs->trans("ListOfSuggestedBooths").'
'."\n"; + +$object = null; + +htmlPrintOnlinePaymentFooter($mysoc, $langs, 1, $suffix, $object); + +llxFooter('', 'public'); + +$db->close(); diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 75f5401d401..cd34b0f916f 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -72,7 +72,7 @@ if (!empty($conf->productbatch->enabled)) { } $origin = GETPOST('origin', 'alpha') ?GETPOST('origin', 'alpha') : 'reception'; // Example: commande, propal -$origin_id = GETPOST('id', 'int') ?GETPOST('id', 'int') : ''; +$origin_id = GETPOST('id', 'int') ? GETPOST('id', 'int') : ''; $id = $origin_id; if (empty($origin_id)) { $origin_id = GETPOST('origin_id', 'int'); // Id of order or propal @@ -86,12 +86,12 @@ if (empty($origin_id)) { $ref = GETPOST('ref', 'alpha'); $line_id = GETPOST('lineid', 'int') ?GETPOST('lineid', 'int') : ''; -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'alpha'); //Select mail models is same action as presend if (GETPOST('modelselected')) { $action = 'presend'; } -$confirm = GETPOST('confirm', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); //PDF @@ -117,7 +117,6 @@ $permissiondellink = $user->rights->reception->creer; // Used by the include of $date_delivery = dol_mktime(GETPOST('date_deliveryhour', 'int'), GETPOST('date_deliverymin', 'int'), 0, GETPOST('date_deliverymonth', 'int'), GETPOST('date_deliveryday', 'int'), GETPOST('date_deliveryyear', 'int')); -$object = new Reception($db); if ($id > 0 || !empty($ref)) { $object->fetch($id, $ref); $object->fetch_thirdparty(); @@ -725,13 +724,13 @@ if ($action == 'create') { $classname = ucfirst($origin); } - $object = new $classname($db); - if ($object->fetch($origin_id)) { // This include the fetch_lines + $objectsrc = new $classname($db); + if ($objectsrc->fetch($origin_id)) { // This include the fetch_lines $soc = new Societe($db); - $soc->fetch($object->socid); + $soc->fetch($objectsrc->socid); $author = new User($db); - $author->fetch($object->user_author_id); + $author->fetch($objectsrc->user_author_id); if (!empty($conf->stock->enabled)) { $entrepot = new Entrepot($db); @@ -741,8 +740,7 @@ if ($action == 'create') { print ''; print ''; print ''; - print ''; - print ''; + print ''; if (GETPOST('entrepot_id', 'int')) { print ''; } @@ -754,10 +752,10 @@ if ($action == 'create') { // Ref print ''; if ($origin == 'supplierorder' && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled))) { - print $langs->trans("RefOrder").''.img_object($langs->trans("ShowOrder"), 'order').' '.$object->ref; + print $langs->trans("RefOrder").''.img_object($langs->trans("ShowOrder"), 'order').' '.$objectsrc->ref; } if ($origin == 'propal' && !empty($conf->propal->enabled)) { - print $langs->trans("RefProposal").''.img_object($langs->trans("ShowProposal"), 'propal').' '.$object->ref; + print $langs->trans("RefProposal").''.img_object($langs->trans("ShowProposal"), 'propal').' '.$objectsrc->ref; } print ''; print "\n"; @@ -770,7 +768,7 @@ if ($action == 'create') { print $langs->trans('RefSupplier'); } print ''; - print ''; + print ''; print ''; print ''; @@ -782,8 +780,8 @@ if ($action == 'create') { // Project if (!empty($conf->projet->enabled)) { $projectid = GETPOST('projectid', 'int') ?GETPOST('projectid', 'int') : 0; - if (empty($projectid) && !empty($object->fk_project)) { - $projectid = $object->fk_project; + if (empty($projectid) && !empty($objectsrc->fk_project)) { + $projectid = $objectsrc->fk_project; } if ($origin == 'project') { $projectid = ($originid ? $originid : 0); @@ -802,7 +800,7 @@ if ($action == 'create') { // Date delivery planned print ''.$langs->trans("DateDeliveryPlanned").''; print ''; - $date_delivery = ($date_delivery ? $date_delivery : $object->delivery_date); // $date_delivery comes from GETPOST + $date_delivery = ($date_delivery ? $date_delivery : $objectsrc->delivery_date); // $date_delivery comes from GETPOST print $form->selectDate($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1); print "\n"; print ''; @@ -810,15 +808,15 @@ if ($action == 'create') { // Note Public print ''.$langs->trans("NotePublic").''; print ''; - $doleditor = new DolEditor('note_public', $object->note_public, '', 60, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%'); + $doleditor = new DolEditor('note_public', $objectsrc->note_public, '', 60, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print ""; // Note Private - if ($object->note_private && !$user->socid) { + if ($objectsrc->note_private && !$user->socid) { print ''.$langs->trans("NotePrivate").''; print ''; - $doleditor = new DolEditor('note_private', $object->note_private, '', 60, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%'); + $doleditor = new DolEditor('note_private', $objectsrc->note_private, '', 60, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%'); print $doleditor->Create(1); print ""; } @@ -861,15 +859,15 @@ if ($action == 'create') { // Other attributes $parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"', 'cols' => '3', 'socid'=>$socid); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $recept, $action); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $recept, $action); // Note that $action and $objectsrc may have been modified by hook print $hookmanager->resPrint; - // Here $object can be of an object Order + // Here $object can be of an object Reception $extrafields->fetch_name_optionals_label($object->table_element); if (empty($reshook) && !empty($extrafields->attributes[$object->table_element]['label'])) { // copy from order - if ($object->fetch_optionals() > 0) { - $recept->array_options = array_merge($recept->array_options, $object->array_options); + if ($objectsrc->fetch_optionals() > 0) { + $recept->array_options = array_merge($recept->array_options, $objectsrc->array_options); } print $object->showOptionals($extrafields, 'edit', $parameters); } @@ -877,9 +875,9 @@ if ($action == 'create') { // Incoterms if (!empty($conf->incoterm->enabled)) { print ''; - print ''; + print ''; print ''; - print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : '')); + print $form->select_incoterms((!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), (!empty($objectsrc->location_incoterms) ? $objectsrc->location_incoterms : '')); print ''; } @@ -898,12 +896,14 @@ if ($action == 'create') { print dol_get_fiche_end(); - // Reception lines $numAsked = 0; $dispatchLines = array(); foreach ($_POST as $key => $value) { + // If create form is coming from the button "Create Reception" of previous page + // without batch module enabled + $reg = array(); if (preg_match('/^product_([0-9]+)_([0-9]+)$/i', $key, $reg)) { $numAsked++; @@ -934,6 +934,25 @@ if ($action == 'create') { $fk_commandefourndet = 'fk_commandefourndet_'.$reg[1].'_'.$reg[2]; $dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' =>GETPOST($qty), 'ent' =>GETPOST($ent, 'int'), 'pu' =>GETPOST($pu), 'comment' =>GETPOST('comment'), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'), 'DLC'=> $dDLC, 'DLUO'=> $dDLUO, 'lot'=> GETPOST($lot, 'alpha')); } + + // If create form is coming from same page post was sent but an error occured + if (preg_match('/^productid([0-9]+)$/i', $key, $reg)) { + $numAsked++; + + // eat-by date dispatch + // $numline=$reg[2] + 1; // line of product + $numline = $numAsked; + $prod = 'productid'.$reg[1]; + $comment = 'comment'.$reg[1]; + $qty = 'qtyl'.$reg[1]; + $ent = 'entl'.$reg[1]; + $pu = 'pul'.$reg[1]; + $lot = 'batch'.$reg[1]; + $dDLUO = dol_mktime(12, 0, 0, GETPOST('dluo'.$reg[1].'month', 'int'), GETPOST('dluo'.$reg[1].'day', 'int'), GETPOST('dluo'.$reg[1].'year', 'int')); + $dDLC = dol_mktime(12, 0, 0, GETPOST('dlc'.$reg[1].'month', 'int'), GETPOST('dlc'.$reg[1].'day', 'int'), GETPOST('dlc'.$reg[1].'year', 'int')); + $fk_commandefourndet = 'fk_commandefournisseurdet'.$reg[1]; + $dispatchLines[$numAsked] = array('prod' => GETPOST($prod, 'int'), 'qty' =>GETPOST($qty), 'ent' =>GETPOST($ent, 'int'), 'pu' =>GETPOST($pu), 'comment' =>GETPOST($comment), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'), 'DLC'=> $dDLC, 'DLUO'=> $dDLUO, 'lot'=> GETPOST($lot, 'alpha')); + } } @@ -961,7 +980,7 @@ if ($action == 'create') { print ''; // Load receptions already done for same order - $object->loadReceptions(); + $objectsrc->loadReceptions(); if ($numAsked) { print ''; @@ -993,14 +1012,13 @@ if ($action == 'create') { $indiceAsked = 1; while ($indiceAsked <= $numAsked) { $product = new Product($db); - foreach ($object->lines as $supplierLine) { + foreach ($objectsrc->lines as $supplierLine) { if ($dispatchLines[$indiceAsked]['fk_commandefourndet'] == $supplierLine->id) { $line = $supplierLine; break; } } - // Show product and description $type = $line->product_type ? $line->product_type : $line->fk_product_type; // Try to enhance type detection using date_start and date_end for free lines where type @@ -1012,7 +1030,7 @@ if ($action == 'create') { $type = 1; } - print ''."\n"; + print ''."\n"; print ''."\n"; @@ -1024,12 +1042,10 @@ if ($action == 'create') { print ''; @@ -1075,13 +1091,14 @@ if ($action == 'create') { // Qty print ''; $qtyProdCom = $line->qty; // Qty already received print ''; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index aa8205bfa99..aa5848f1659 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -57,6 +57,10 @@ if (!empty($conf->accounting->enabled)) { if (!empty($conf->accounting->enabled)) { require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; } +if (! empty($conf->eventorganization->enabled)) { + require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; +} + $langs->loadLangs(array("companies", "commercial", "bills", "banks", "users")); if (!empty($conf->adherent->enabled)) { @@ -272,6 +276,7 @@ if (empty($reshook)) { 'Ticket' => '/ticket/class/ticket.class.php', 'User' => '/user/class/user.class.php', 'Account' => '/compta/bank/class/account.class.php', + 'ConferenceOrBoothAttendee' => '/eventorganization/class/conferenceorboothattendee.class.php' ); //First, all core objects must update their tables diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 0a3e9207a96..bf39dbc608c 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -11,7 +11,7 @@ * Copyright (C) 2017 Juanjo Menent * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2020 Open-Dsi - + * Copyright (C) 2021 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 @@ -221,7 +221,7 @@ $checkedprofid6 = 0; $checkprospectlevel = (in_array($contextpage, array('prospectlist')) ? 1 : 0); $checkstcomm = (in_array($contextpage, array('prospectlist')) ? 1 : 0); $arrayfields = array( - 's.rowid'=>array('label'=>"TechnicalID", 'position'=>1, 'checked'=>($conf->global->MAIN_SHOW_TECHNICAL_ID ? 1 : 0), 'enabled'=>($conf->global->MAIN_SHOW_TECHNICAL_ID ? 1 : 0)), + 's.rowid'=>array('label'=>"TechnicalID", 'position'=>1, 'checked'=>(!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)), 'enabled'=>(!empty($conf->global->MAIN_SHOW_TECHNICAL_ID))), 's.nom'=>array('label'=>"ThirdPartyName", 'position'=>2, 'checked'=>1), 's.name_alias'=>array('label'=>"AliasNameShort", 'position'=>3, 'checked'=>1), 's.barcode'=>array('label'=>"Gencod", 'position'=>5, 'checked'=>1, 'enabled'=>(!empty($conf->barcode->enabled))), @@ -508,6 +508,10 @@ if ($search_sale == -2) { } elseif (!empty($search_sale) && $search_sale != '-1' || (empty($user->rights->societe->client->voir) && !$socid)) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } +// Add table from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; $sql .= " WHERE s.entity IN (".getEntity('societe').")"; //if (empty($user->rights->societe->client->voir) && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->societe->client->readallthirdparties_advance)) && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if (empty($user->rights->societe->client->voir) && !$socid) { @@ -667,6 +671,10 @@ if (empty($reshook)) { } } $sql .= $hookmanager->resPrint; +// Add GroupBy from hooks +$parameters = array('all' => $all, 'fieldstosearchall' => $fieldstosearchall); +$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; $sql .= $db->order($sortfield, $sortorder); @@ -942,7 +950,7 @@ if (empty($type) || $type == 'c' || $type == 'p') { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
'; $tmptitle = $langs->trans('Categories'); - $moreforfilter .= img_picto($tmptile, 'category', 'class="pictofixedwidth"'); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"'); $moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $langs->trans('CustomersProspectsCategoriesShort')); $moreforfilter .= '
'; } @@ -953,7 +961,7 @@ if (empty($type) || $type == 'f') { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
'; $tmptitle = $langs->trans('Categories'); - $moreforfilter .= img_picto($tmptilte, 'category', 'class="pictofixedwidth"'); + $moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"'); $moreforfilter .= $formother->select_categories('supplier', $search_categ_sup, 'search_categ_sup', 1, $langs->trans('SuppliersCategoriesShort')); $moreforfilter .= '
'; } @@ -962,8 +970,8 @@ if (empty($type) || $type == 'f') { // If the user can view prospects other than his' if ($user->rights->societe->client->voir || $socid) { $moreforfilter .= '
'; - $tmptile = $langs->trans('SalesRepresentatives'); - $moreforfilter .= img_picto($tmptile, 'user', 'class="pictofixedwidth"'); + $tmptitle = $langs->trans('SalesRepresentatives'); + $moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"'); $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $langs->trans('SalesRepresentatives'), ($conf->dol_optimize_smallscreen ? 'maxwidth200' : 'maxwidth300'), 1); $moreforfilter .= '
'; } @@ -1405,7 +1413,7 @@ while ($i < min($num, $limit)) { } if (!empty($arrayfields['s.name_alias']['checked'])) { print '
\n"; if (!$i) { $totalarray['nbfield']++; @@ -1413,70 +1421,70 @@ while ($i < min($num, $limit)) { } // Barcode if (!empty($arrayfields['s.barcode']['checked'])) { - print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } } // Customer code if (!empty($arrayfields['s.code_client']['checked'])) { - print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } } // Supplier code if (!empty($arrayfields['s.code_fournisseur']['checked'])) { - print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } } // Account customer code if (!empty($arrayfields['s.code_compta']['checked'])) { - print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } } // Account supplier code if (!empty($arrayfields['s.code_compta_fournisseur']['checked'])) { - print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } } // Address if (!empty($arrayfields['s.address']['checked'])) { - print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } } // Zip if (!empty($arrayfields['s.zip']['checked'])) { - print "\n"; + print "\n"; if (!$i) { $totalarray['nbfield']++; } } // Town if (!empty($arrayfields['s.town']['checked'])) { - print "\n"; + print '\n"; if (!$i) { $totalarray['nbfield']++; } } // State if (!empty($arrayfields['state.nom']['checked'])) { - print "\n"; + print "\n"; if (!$i) { $totalarray['nbfield']++; } } // Region if (!empty($arrayfields['region.nom']['checked'])) { - print "\n"; + print "\n"; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 4468c36a7da..70e5229ba28 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -348,7 +348,7 @@ a.butStatus { padding-right: 5px; background-color: transparent; color: var(--colortext) !important; - border: 2px solid var( --butactionbg); + border: 2px solid var( --butactionbg) !important; margin: 0 0.45em !important; } @@ -3894,7 +3894,7 @@ table.noborder.paymenttable { } .paymenttable tr td:first-child, .margintable tr td:first-child { - padding-left: 2px; + //padding-left: 2px; } .paymenttable, .margintable tr td { height: 22px; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index f1fb649f4af..7dd19673b5e 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3902,14 +3902,19 @@ tr.liste_sub_total, tr.liste_sub_total td { } .paymenttable, .margintable { + margin: 0px 0px 0px 0px !important; +} +.paymenttable, .margintable:not(.margintablenotop) { border-top-width: px !important; border-top-color: rgb() !important; border-top-style: solid !important; - margin: 0px 0px 0px 0px !important; +} +.margintable.margintablenotop { + border-top-width: 0; } .paymenttable tr td:first-child, .margintable tr td:first-child { - padding-left: 2px; + //padding-left: 2px; } .paymenttable, .margintable tr td { height: 22px; diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 5e2ef1e804b..96a5ad0c120 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -53,6 +53,7 @@ $ref = GETPOST('ref', 'alpha'); $projectid = GETPOST('projectid', 'int'); $cancel = GETPOST('cancel', 'alpha'); $action = GETPOST('action', 'aZ09'); +$backtopage = GETPOST('$backtopage', 'alpha'); $notifyTiers = GETPOST("notify_tiers_at_create", 'alpha'); @@ -152,7 +153,7 @@ if (empty($reshook)) { } // Action to add an action (not a message) - if (GETPOST('add', 'alpha') && $user->rights->ticket->write) { + if (GETPOST('add', 'alpha') && !empty($user->rights->ticket->write)) { $error = 0; if (!GETPOST("subject", 'alphanohtml')) { diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index eb6193d58f1..b787a437899 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -192,7 +192,7 @@ class ActionsTicket // Initial message print '
'; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print '
'; print ''; // ancre pour retourner sur la ligne + print ''; // Show product and description - $product_static->type = $line->fk_product_type; - $product_static->id = $line->fk_product; - $product_static->ref = $line->ref; - $product_static->status_batch = $line->product_tobatch; + $product_static = $product; $text = $product_static->getNomUrl(1); $text .= ' - '.(!empty($line->label) ? $line->label : $line->product_label); @@ -1067,7 +1083,7 @@ if ($action == 'create') { // Comment //$defaultcomment = 'Line create from order line id '.$line->id; - $defaultcomment = ''; + $defaultcomment = $dispatchLines[$indiceAsked]['comment']; print ''; print ''; print ''.$line->qty; print ''; + print ''; print ''; print ''; - $quantityDelivered = $object->receptions[$line->id]; + $quantityDelivered = $objectsrc->receptions[$line->id]; print $quantityDelivered; print ''; print ''; - print $companystatic->name_alias; + print dol_escape_htmltag($companystatic->name_alias); print "'.$obj->barcode.''.dol_escape_htmltag($obj->barcode).''.$obj->code_client.''.dol_escape_htmltag($obj->code_client).''.$obj->code_fournisseur.''.dol_escape_htmltag($obj->code_fournisseur).''.$obj->code_compta.''.dol_escape_htmltag($obj->code_compta).''.$obj->code_compta_fournisseur.''.dol_escape_htmltag($obj->code_compta_fournisseur).''.$obj->address.''.dol_escape_htmltag($obj->address).'".$obj->zip."".dol_escape_htmltag($obj->zip)."".$obj->town."'.dol_escape_htmltag($obj->town)."".$obj->state_name."".dol_escape_htmltag($obj->state_name)."".$obj->region_name."".dol_escape_htmltag($obj->region_name)."
'; + print '
'; print ''; print "\n"; diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php index e760997f3c8..9fa84042c3a 100644 --- a/htdocs/user/class/api_users.class.php +++ b/htdocs/user/class/api_users.class.php @@ -248,8 +248,8 @@ class Users extends DolibarrApi * * @url GET /info * - * @param int $includepermissions Set this to 1 to have the array of permissions loaded (not done by default for performance purpose) - * @return array|mixed Data without useless information + * @param int $includepermissions Set this to 1 to have the array of permissions loaded (not done by default for performance purpose) + * @return array|mixed Data without useless information * * @throws RestException 401 Insufficient rights * @throws RestException 404 User or group not found @@ -371,11 +371,9 @@ class Users extends DolibarrApi if ($field == 'pass') { if ($this->useraccount->id != DolibarrApiAccess::$user->id && empty(DolibarrApiAccess::$user->rights->user->user->password)) { throw new RestException(401, 'You are not allowed to modify password of other users'); - continue; } if ($this->useraccount->id == DolibarrApiAccess::$user->id && empty(DolibarrApiAccess::$user->rights->user->self->password)) { throw new RestException(401, 'You are not allowed to modify your own password'); - continue; } } if (DolibarrApiAccess::$user->admin) { // If user for API is admin diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index b8e63ea8f19..910edce8c17 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -299,6 +299,11 @@ class User extends CommonObject */ public $nb_rights; + /** + * @var array To store list of groups of user (used by API /info for example) + */ + public $user_group_list; + /** * @var array Cache array of already loaded permissions */ diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 19b78cf06e9..0e60e70e42a 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -1,10 +1,10 @@ - * Copyright (C) 2005-2015 Laurent Destailleur - * Copyright (C) 2005-2017 Regis Houssin - * Copyright (C) 2011 Herve Prot - * Copyright (C) 2012 Florian Henry - * Copyright (C) 2018 Juanjo Menent + * Copyright (C) 2005-2021 Laurent Destailleur + * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2011 Herve Prot + * Copyright (C) 2012 Florian Henry + * Copyright (C) 2018 Juanjo Menent * * 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 @@ -22,7 +22,7 @@ /** * \file htdocs/user/group/card.php - * \brief Onglet groupes utilisateurs + * \brief Tab of a user group */ require '../../main.inc.php'; diff --git a/htdocs/user/group/list.php b/htdocs/user/group/list.php index edd34dfe9b8..302d697c563 100644 --- a/htdocs/user/group/list.php +++ b/htdocs/user/group/list.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2018 Regis Houssin * Copyright (C) 2011 Herve Prot - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019-2021 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 @@ -34,6 +34,7 @@ $langs->load("users"); $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $search_group = GETPOST('search_group'); $optioncss = GETPOST('optioncss', 'alpha'); +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) // Defini si peux lire/modifier utilisateurs et permisssions $caneditperms = ($user->admin || $user->rights->user->user->creer); diff --git a/htdocs/user/list.php b/htdocs/user/list.php index 693590ff7d2..bd82824cb05 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -933,13 +933,13 @@ while ($i < ($limit ? min($num, $limit) : $num)) { } if (!empty($arrayfields['u.office_phone']['checked'])) { - print "\n"; + print '\n"; if (!$i) { $totalarray['nbfield']++; } } if (!empty($arrayfields['u.user_mobile']['checked'])) { - print "\n"; + print '\n"; if (!$i) { $totalarray['nbfield']++; } @@ -992,7 +992,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { // Salary if (!empty($arrayfields['u.salary']['checked'])) { - print ''; + print ''; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/website/index.php b/htdocs/website/index.php index ef5660ce8fa..fe1bdce10d4 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -4098,9 +4098,9 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print $langs->trans("SearchReplaceInto"); print ''; print '
'; - print ' '.$langs->trans("Content").'
'; - print ' '.$langs->trans("Title").' | '.$langs->trans("Description").' | '.$langs->trans("Keywords").'
'; - print ' '.$langs->trans("GlobalCSSorJS").'
'; + print '
'; + print '
'; + print '
'; print '
'; print '';
'; print $langs->trans("InitialMessage"); print ''; @@ -391,7 +391,7 @@ class ActionsTicket { global $langs; - print '
'; + print '

'; + print ''; + print ''; + print '
'; } /** diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 5180abe6140..61a6d15d9a1 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1112,10 +1112,10 @@ class Ticket extends CommonObject } /** - * print selected status + * Print selected status * - * @param string $selected selected status - * @return void + * @param string $selected Selected status + * @return void */ public function printSelectStatus($selected = "") { @@ -1124,9 +1124,9 @@ class Ticket extends CommonObject /** - * Charge dans cache la liste des types de tickets (paramétrable dans dictionnaire) + * Load into a cache the types of tickets (setup done into dictionaries) * - * @return int Number of lines loaded, 0 if already loaded, <0 if KO + * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ public function loadCacheTypesTickets() { diff --git a/htdocs/user/card.php b/htdocs/user/card.php index d189ced83aa..62d815842ce 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1789,7 +1789,9 @@ if ($action == 'create' || $action == 'adduserldap') { if ($object->datepreviouslogin) { print dol_print_date($object->datepreviouslogin, "dayhour").' ('.$langs->trans("Previous").'), '; } - print dol_print_date($object->datelastlogin, "dayhour").' ('.$langs->trans("Current").')'; + if ($object->datelastlogin) { + print dol_print_date($object->datelastlogin, "dayhour").' ('.$langs->trans("Current").')'; + } print '
".dol_print_phone($obj->office_phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone')."'.dol_print_phone($obj->office_phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone')."".dol_print_phone($obj->user_mobile, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'mobile')."'.dol_print_phone($obj->user_mobile, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'mobile')."'.($obj->salary ? price($obj->salary) : '').''.($obj->salary ? price($obj->salary) : '').'