Merge remote-tracking branch 'upstream/develop' into fix/warnings

This commit is contained in:
Frédéric FRANCE 2022-10-13 09:51:28 +02:00
commit 403055d5f4
252 changed files with 1947 additions and 1485 deletions

View File

@ -28,6 +28,84 @@ Following changes may create regressions for some external modules, but were nec
* All functions fetch_all() are deprecated for naming consitency, use fetchAll() instead * All functions fetch_all() are deprecated for naming consitency, use fetchAll() instead
***** ChangeLog for 16.0.1 compared to 16.0.0 *****
FIX: #16476 on massaction the pdf generation is not using the t…
FIX: #21416 Filter tag no-categorie in members
FIX: #21543
FIX: #21799 inactive companies shall not be selectable for new proposals, orders and invoices
FIX: #21859 Don't show html balise on list for private/public note
FIX: #22164
FIX: #22241
FIX: #22263 Accountancy - Account number expected in place of a rowid on parent account on export
FIX: #22264 Accountancy - Translation on chart of accounts export
FIX: #22265 Accountancy - Account number expected in place of a rowid on export
FIX: #22334
FIX: #22360
FIX: #22379 creating events on supplier order
FIX: #22382 Error on length of supplier reference
FIX: #22386 IBAN not mandatory for International Export Countries
FIX: #22440 Lang Key "UserAccountNotDefined" is missing
FIX: #22482
FIX: #22507
FIX: Accountancy - Some manuals operations are displayed in subledger
FIX: API reception return error 500
FIX: avoid override initial message ($this instead $object)
FIX: avoid some warnings (php8+)
FIX: Bad backtopage and CSRF on link for ticket message
FIX: bad closing select
FIX: broken feature, wrong fk_parent_line after cloning object
FIX: Column label
FIX: compatibility if javascript not actived
FIX: compatibility with Mysql <= 5.7
FIX: contact deletion: execute trigger before really deleting
FIX: CronJob sendBackup
FIX: CSRF + lost value of constant after use save button
FIX: CSS
FIX: data integrity for llx_delivery table
FIX: default value for partnership status
FIX: deletion of the MO_CHILD link
FIX: Dictionary - Display error on cache_vatrates
FIX: Dolibarr#16476 version 2a
FIX: Duplicate creation of invoice when closing shipment linked to order
FIX: Duplicate in list when filtering on categories
FIX: extrafields with value '0' was ''
FIX: filters lost when sorting on productMargin and customerMargins
FIX: fk_expedition in $line can be usefull for triggers
FIX: Import in upgrade when using a socialnetwork field.
FIX: input hidden with fk_product of line on mo production can be usefull
FIX: inventory code must be different at each transation
FIX: inventory total columns
FIX: Issue #16476 on massaction the pdf generation is not using the thirdparty language settings
FIX: Linked object agenda card
FIX: missing check if category module is enabled
FIX: missing check if incoice as a payment (wrong status)
FIX: missing class "societe" when create another object with workflow
FIX: missing error message if image size too large
FIX: Missing reposition
FIX: missing the management of a constant in the Ticket config
FIX: Missing token in different URLs links
FIX: @ must be allowed into dol_eval to allow rules including external module string 'abc@def'
FIX: - php V8 get number doc saphir
FIX: - php V8 propal index last draft
FIX: Preview button position on documents list (case when the file is too long)
FIX: Project - on global view, missing display of ref customer
FIX: Protection against bad value into accurancy setup
FIX: reading of trackid in emailcollector (when on recipient suffix)
FIX: recruitment linked files
FIX: Remove use of code we should not have
FIX: Restore the option MAIN_OPTIMIZEFORTEXTBROWSER
FIX: Rich text is not diplayed
FIX: same thing in deleteline
FIX: Supplier Reference is lost when page breaks
FIX: support of array parameters in "add to bookmark" feature.
FIX: Test that web dir is correct in install
FIX: the shipment PDF was using the full size logo instead of small
FIX: Token Error : delete stock transfer
FIX: ToOfferALinkForOnlinePayment not translated
FIX: tooltip of technical tables added of a module
FIX: wrong result check when update expensereport line
***** ChangeLog for 16.0.0 compared to 15.0.0 ***** ***** ChangeLog for 16.0.0 compared to 15.0.0 *****
@ -236,6 +314,7 @@ Following changes may create regressions for some external modules, but were nec
* Method fetch_all of DolResource has been renamed into fetchAll() to match naming conventions. * Method fetch_all of DolResource has been renamed into fetchAll() to match naming conventions.
* The hook 'upgrade' and 'doUpgrade2" has been renamed 'doUpgradeBefore' and 'doUpgradeAfterDB'. A new trigger 'doUpgradeAfterFiles' has been introduced. * The hook 'upgrade' and 'doUpgrade2" has been renamed 'doUpgradeBefore' and 'doUpgradeAfterDB'. A new trigger 'doUpgradeAfterFiles' has been introduced.
* The context hook 'suppliercard' when on the supplier tab of a thirdparty has been renamed into 'thirdpartysupplier' * The context hook 'suppliercard' when on the supplier tab of a thirdparty has been renamed into 'thirdpartysupplier'
* Because the module Resources highly linked to the Agenda module, the menu for Resources module has been moved into top menu Agenda.
***** ChangeLog for 15.0.3 compared to 15.0.2 ***** ***** ChangeLog for 15.0.3 compared to 15.0.2 *****

View File

@ -12,3 +12,11 @@ Le client règle rapidement et on lui accorde un escompte de 3% (120 € * 3% =
411xxx 3,60 € TTC 411xxx 3,60 € TTC
Et ça marche à l’inverse avec un fournisseur sauf que l’on est en 775000 au lieu de 665000 pour escompte obtenus. Et ça marche à l’inverse avec un fournisseur sauf que l’on est en 775000 au lieu de 665000 pour escompte obtenus.
Un compte comptable de Tiers vente = Acount Receivable
Un compte comptable de Tiers achat = Acount Payable

View File

@ -266,6 +266,9 @@ if (!$user->admin) {
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
print '<div class="info">' . $langs->trans("ConstantIsOn", "FACTURE_DEPOSITS_ARE_JUST_PAYMENTS") . '</div>'; print '<div class="info">' . $langs->trans("ConstantIsOn", "FACTURE_DEPOSITS_ARE_JUST_PAYMENTS") . '</div>';
} }
if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
print '<div class="info">' . $langs->trans("ConstantIsOn", "FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS") . '</div>';
}
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) { if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
print '<div class="info">' . $langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY") . '</div>'; print '<div class="info">' . $langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY") . '</div>';
} }

View File

@ -133,7 +133,7 @@ if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) {
$sql .= " WHERE f.fk_statut > 0"; $sql .= " WHERE f.fk_statut > 0";
$sql .= " AND fd.fk_code_ventilation > 0"; $sql .= " AND fd.fk_code_ventilation > 0";
$sql .= " AND f.entity IN (".getEntity('facture_fourn', 0).")"; // We don't share object for accountancy $sql .= " AND f.entity IN (".getEntity('facture_fourn', 0).")"; // We don't share object for accountancy
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (".FactureFournisseur::TYPE_STANDARD.",".FactureFournisseur::TYPE_REPLACEMENT.",".FactureFournisseur::TYPE_CREDIT_NOTE.",".FactureFournisseur::TYPE_SITUATION.")"; $sql .= " AND f.type IN (".FactureFournisseur::TYPE_STANDARD.",".FactureFournisseur::TYPE_REPLACEMENT.",".FactureFournisseur::TYPE_CREDIT_NOTE.",".FactureFournisseur::TYPE_SITUATION.")";
} else { } else {
$sql .= " AND f.type IN (".FactureFournisseur::TYPE_STANDARD.",".FactureFournisseur::TYPE_REPLACEMENT.",".FactureFournisseur::TYPE_CREDIT_NOTE.",".FactureFournisseur::TYPE_DEPOSIT.",".FactureFournisseur::TYPE_SITUATION.")"; $sql .= " AND f.type IN (".FactureFournisseur::TYPE_STANDARD.",".FactureFournisseur::TYPE_REPLACEMENT.",".FactureFournisseur::TYPE_CREDIT_NOTE.",".FactureFournisseur::TYPE_DEPOSIT.",".FactureFournisseur::TYPE_SITUATION.")";
@ -764,7 +764,7 @@ if (empty($action) || $action == 'view') {
$exportlink = ''; $exportlink = '';
$builddate = dol_now(); $builddate = dol_now();
$description = $langs->trans("DescJournalOnlyBindedVisible").'<br>'; $description = $langs->trans("DescJournalOnlyBindedVisible").'<br>';
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("DepositsAreNotIncluded"); $description .= $langs->trans("DepositsAreNotIncluded");
} else { } else {
$description .= $langs->trans("DepositsAreIncluded"); $description .= $langs->trans("DepositsAreIncluded");

View File

@ -202,6 +202,9 @@ if ($object->nature == 2 || $object->nature == 3) {
} else { } else {
$description .= $langs->trans("DepositsAreIncluded"); $description .= $langs->trans("DepositsAreIncluded");
} }
if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("SupplierDepositsAreNotIncluded");
}
} }
$listofchoices = array('notyet' => $langs->trans("NotYetInGeneralLedger"), 'already' => $langs->trans("AlreadyInGeneralLedger")); $listofchoices = array('notyet' => $langs->trans("NotYetInGeneralLedger"), 'already' => $langs->trans("AlreadyInGeneralLedger"));

View File

@ -342,7 +342,7 @@ if (strlen(trim($search_country))) {
if (strlen(trim($search_tvaintra))) { if (strlen(trim($search_tvaintra))) {
$sql .= natural_search("s.tva_intra", $search_tvaintra); $sql .= natural_search("s.tva_intra", $search_tvaintra);
} }
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (".FactureFournisseur::TYPE_STANDARD.",".FactureFournisseur::TYPE_REPLACEMENT.",".FactureFournisseur::TYPE_CREDIT_NOTE.",".FactureFournisseur::TYPE_SITUATION.")"; $sql .= " AND f.type IN (".FactureFournisseur::TYPE_STANDARD.",".FactureFournisseur::TYPE_REPLACEMENT.",".FactureFournisseur::TYPE_CREDIT_NOTE.",".FactureFournisseur::TYPE_SITUATION.")";
} else { } else {
$sql .= " AND f.type IN (".FactureFournisseur::TYPE_STANDARD.",".FactureFournisseur::TYPE_REPLACEMENT.",".FactureFournisseur::TYPE_CREDIT_NOTE.",".FactureFournisseur::TYPE_DEPOSIT.",".FactureFournisseur::TYPE_SITUATION.")"; $sql .= " AND f.type IN (".FactureFournisseur::TYPE_STANDARD.",".FactureFournisseur::TYPE_REPLACEMENT.",".FactureFournisseur::TYPE_CREDIT_NOTE.",".FactureFournisseur::TYPE_DEPOSIT.",".FactureFournisseur::TYPE_SITUATION.")";

View File

@ -585,7 +585,10 @@ if (empty($reshook)) {
$db->commit(); $db->commit();
$rowid = $object->id; $rowid = $object->id;
$id = $object->id; $id = $object->id;
$backtopage = preg_replace('/__ID__/', $id, $backtopage);
} else { } else {
$error++;
$db->rollback(); $db->rollback();
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }
@ -1041,8 +1044,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<td>'.img_picto('', 'object_email').' <input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOSTISSET('member_email') ? GETPOST('member_email', 'alpha') : $soc->email).'"></td></tr>'; print '<td>'.img_picto('', 'object_email').' <input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOSTISSET('member_email') ? GETPOST('member_email', 'alpha') : $soc->email).'"></td></tr>';
// Website // Website
print '<tr><td>'.$form->editfieldkey('Web', 'member_url', '', $object, 0).'</td>'; print '<tr><td>'.$form->editfieldkey('Web', 'member_url', GETPOST('member_url', 'alpha'), $object, 0).'</td>';
print '<td>'.img_picto('', 'globe').' <input type="text" class="maxwidth500 widthcentpercentminusx" name="member_url" id="member_url" value="'.$object->url.'"></td></tr>'; print '<td>'.img_picto('', 'globe').' <input type="text" class="maxwidth500 widthcentpercentminusx" name="member_url" id="member_url" value="'.(GETPOSTISSET('member_url', 'alpha') ? GETPOST('member_url', 'alpha') : $object->url).'"></td></tr>';
// Address // Address
print '<tr><td class="tdtop">'.$langs->trans("Address").'</td><td>'; print '<tr><td class="tdtop">'.$langs->trans("Address").'</td><td>';
@ -1894,7 +1897,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Send // Send
if (empty($user->socid)) { if (empty($user->socid)) {
if (Adherent::STATUS_VALIDATED == $object->statut) { if (Adherent::STATUS_VALIDATED == $object->statut) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n"; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.((int) $object->id).'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n";
} }
} }
@ -1914,7 +1917,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Modify // Modify
if ($user->hasRight('adherent', 'creer')) { if ($user->hasRight('adherent', 'creer')) {
print '<a class="butAction" href="card.php?rowid='.$id.'&action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>'."\n"; print '<a class="butAction" href="card.php?rowid='.((int) $object->id).'&action=edit&token='.newToken().'">'.$langs->trans("Modify").'</a>'."\n";
} else { } else {
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Modify").'</span>'."\n"; print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Modify").'</span>'."\n";
} }
@ -1922,7 +1925,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Validate // Validate
if (Adherent::STATUS_DRAFT == $object->statut) { if (Adherent::STATUS_DRAFT == $object->statut) {
if ($user->hasRight('adherent', 'creer')) { if ($user->hasRight('adherent', 'creer')) {
print '<a class="butAction" href="card.php?rowid='.$id.'&action=valid">'.$langs->trans("Validate").'</a>'."\n"; print '<a class="butAction" href="card.php?rowid='.((int) $object->id).'&action=valid&token='.newToken().'">'.$langs->trans("Validate").'</a>'."\n";
} else { } else {
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Validate").'</span>'."\n"; print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Validate").'</span>'."\n";
} }
@ -1931,7 +1934,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Reactivate // 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->hasRight('adherent', 'creer')) { if ($user->hasRight('adherent', 'creer')) {
print '<a class="butAction" href="card.php?rowid='.$id.'&action=valid">'.$langs->trans("Reenable")."</a>\n"; print '<a class="butAction" href="card.php?rowid='.((int) $object->id).'&action=valid">'.$langs->trans("Reenable")."</a>\n";
} else { } else {
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Reenable").'</span>'."\n"; print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Reenable").'</span>'."\n";
} }
@ -1940,7 +1943,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Resiliate // Resiliate
if (Adherent::STATUS_VALIDATED == $object->statut) { if (Adherent::STATUS_VALIDATED == $object->statut) {
if ($user->rights->adherent->supprimer) { if ($user->rights->adherent->supprimer) {
print '<a class="butAction" href="card.php?rowid='.$id.'&action=resiliate">'.$langs->trans("Resiliate")."</a></span>\n"; print '<a class="butAction" href="card.php?rowid='.((int) $object->id).'&action=resiliate">'.$langs->trans("Resiliate")."</a></span>\n";
} else { } else {
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Resiliate").'</span>'."\n"; print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Resiliate").'</span>'."\n";
} }
@ -1949,7 +1952,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Exclude // Exclude
if (Adherent::STATUS_VALIDATED == $object->statut) { if (Adherent::STATUS_VALIDATED == $object->statut) {
if ($user->rights->adherent->supprimer) { if ($user->rights->adherent->supprimer) {
print '<a class="butAction" href="card.php?rowid='.$id.'&action=exclude">'.$langs->trans("Exclude")."</a></span>\n"; print '<a class="butAction" href="card.php?rowid='.((int) $object->id).'&action=exclude">'.$langs->trans("Exclude")."</a></span>\n";
} else { } else {
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Exclude").'</span>'."\n"; print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Exclude").'</span>'."\n";
} }
@ -1959,7 +1962,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (isModEnabled('societe') && !$object->socid) { if (isModEnabled('societe') && !$object->socid) {
if ($user->rights->societe->creer) { if ($user->rights->societe->creer) {
if (Adherent::STATUS_DRAFT != $object->statut) { if (Adherent::STATUS_DRAFT != $object->statut) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&amp;action=create_thirdparty" title="'.dol_escape_htmltag($langs->trans("CreateDolibarrThirdPartyDesc")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a>'."\n"; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.((int) $object->id).'&amp;action=create_thirdparty" title="'.dol_escape_htmltag($langs->trans("CreateDolibarrThirdPartyDesc")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a>'."\n";
} else { } else {
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a>'."\n"; print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a>'."\n";
} }
@ -1972,7 +1975,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (!$user->socid && !$object->user_id) { if (!$user->socid && !$object->user_id) {
if ($user->rights->user->user->creer) { if ($user->rights->user->user->creer) {
if (Adherent::STATUS_DRAFT != $object->statut) { if (Adherent::STATUS_DRAFT != $object->statut) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&amp;action=create_user" title="'.dol_escape_htmltag($langs->trans("CreateDolibarrLoginDesc")).'">'.$langs->trans("CreateDolibarrLogin").'</a>'."\n"; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.((int) $object->id).'&amp;action=create_user" title="'.dol_escape_htmltag($langs->trans("CreateDolibarrLoginDesc")).'">'.$langs->trans("CreateDolibarrLogin").'</a>'."\n";
} else { } else {
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrLogin").'</a>'."\n"; print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrLogin").'</a>'."\n";
} }
@ -1986,16 +1989,16 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$isinspip = $mailmanspip->is_in_spip($object); $isinspip = $mailmanspip->is_in_spip($object);
if ($isinspip == 1) { if ($isinspip == 1) {
print '<a class="butAction" href="card.php?rowid='.$object->id.'&action=del_spip&token='.newToken().'">'.$langs->trans("DeleteIntoSpip").'</a>'."\n"; print '<a class="butAction" href="card.php?rowid='.((int) $object->id).'&action=del_spip&token='.newToken().'">'.$langs->trans("DeleteIntoSpip").'</a>'."\n";
} }
if ($isinspip == 0) { if ($isinspip == 0) {
print '<a class="butAction" href="card.php?rowid='.$object->id.'&action=add_spip&token='.newToken().'">'.$langs->trans("AddIntoSpip").'</a>'."\n"; print '<a class="butAction" href="card.php?rowid='.((int) $object->id).'&action=add_spip&token='.newToken().'">'.$langs->trans("AddIntoSpip").'</a>'."\n";
} }
} }
// Delete // Delete
if ($user->rights->adherent->supprimer) { if ($user->rights->adherent->supprimer) {
print '<a class="butActionDelete" href="card.php?rowid='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans("Delete").'</a>'."\n"; print '<a class="butActionDelete" href="card.php?rowid='.((int) $object->id).'&action=delete&token='.newToken().'">'.$langs->trans("Delete").'</a>'."\n";
} else { } else {
print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Delete").'</span>'."\n"; print '<span class="butActionRefused classfortooltip" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Delete").'</span>'."\n";
} }

View File

@ -2352,8 +2352,8 @@ class Adherent extends CommonObject
$statusType = 'status1'; $statusType = 'status1';
$labelStatus = $langs->trans("MemberStatusActive"); $labelStatus = $langs->trans("MemberStatusActive");
$labelStatusShort = $langs->trans("MemberStatusActiveShort"); $labelStatusShort = $langs->trans("MemberStatusActiveShort");
} elseif ($date_end_subscription < dol_now()) { } elseif ($date_end_subscription < dol_now()) { // expired
$statusType = 'status3'; $statusType = 'status8';
$labelStatus = $langs->trans("MemberStatusActiveLate"); $labelStatus = $langs->trans("MemberStatusActiveLate");
$labelStatusShort = $langs->trans("MemberStatusActiveLateShort"); $labelStatusShort = $langs->trans("MemberStatusActiveLateShort");
} else { } else {

View File

@ -87,7 +87,9 @@ print load_fiche_titre($langs->trans("MembersArea"), $resultboxes['selectboxlist
$MembersValidated = array(); $MembersValidated = array();
$MembersToValidate = array(); $MembersToValidate = array();
$MembersWaitingSubscription = array();
$MembersUpToDate = array(); $MembersUpToDate = array();
$MembersExpired = array();
$MembersExcluded = array(); $MembersExcluded = array();
$MembersResiliated = array(); $MembersResiliated = array();
@ -137,13 +139,36 @@ if ($resql) {
$now = dol_now(); $now = dol_now();
// Members waiting subscription
$sql = "SELECT count(*) as somme , d.fk_adherent_type";
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
$sql .= " WHERE d.entity IN (".getEntity('adherent').")";
$sql .= " AND d.statut = 1"; // validated
$sql .= " AND (d.datefin IS NULL AND t.subscription = '1')";
$sql .= " AND t.rowid = d.fk_adherent_type";
$sql .= " GROUP BY d.fk_adherent_type";
dol_syslog("index.php::select nb of uptodate members by type", LOG_DEBUG);
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num) {
$objp = $db->fetch_object($resql);
$MembersWaitingSubscription[$objp->fk_adherent_type] = $objp->somme;
$i++;
}
$db->free($resql);
}
// Members up to date list // Members up to date list
// current rule: uptodate = the end date is in future whatever is type // current rule: uptodate = the end date is in future or no subcription required
// old rule: uptodate = if type does not need payment, that end date is null, if type need payment that end date is in future) // old rule: uptodate = if type does not need payment, that end date is null, if type need payment that end date is in future)
$sql = "SELECT count(*) as somme , d.fk_adherent_type"; $sql = "SELECT count(*) as somme , d.fk_adherent_type";
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
$sql .= " WHERE d.entity IN (".getEntity('adherent').")"; $sql .= " WHERE d.entity IN (".getEntity('adherent').")";
$sql .= " AND d.statut = 1 AND (d.datefin >= '".$db->idate($now)."' OR t.subscription = 0)"; $sql .= " AND d.statut = 1"; // validated
$sql .= " AND (d.datefin >= '".$db->idate($now)."' OR t.subscription = '0')"; // end date in future
$sql .= " AND t.rowid = d.fk_adherent_type"; $sql .= " AND t.rowid = d.fk_adherent_type";
$sql .= " GROUP BY d.fk_adherent_type"; $sql .= " GROUP BY d.fk_adherent_type";
@ -160,6 +185,28 @@ if ($resql) {
$db->free($resql); $db->free($resql);
} }
// Members expired list
$sql = "SELECT count(*) as somme , d.fk_adherent_type";
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t";
$sql .= " WHERE d.entity IN (".getEntity('adherent').")";
$sql .= " AND d.statut = 1"; // validated
$sql .= " AND (d.datefin < '".$db->idate($now)."' AND t.subscription = '1')";
$sql .= " AND t.rowid = d.fk_adherent_type";
$sql .= " GROUP BY d.fk_adherent_type";
dol_syslog("index.php::select nb of uptodate members by type", LOG_DEBUG);
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num) {
$objp = $db->fetch_object($resql);
$MembersExpired[$objp->fk_adherent_type] = $objp->somme;
$i++;
}
$db->free($resql);
}
/* /*
* Statistics * Statistics
*/ */
@ -172,8 +219,9 @@ if ($conf->use_javascript_ajax) {
$boxgraph .='<tr><td class="center" colspan="2">'; $boxgraph .='<tr><td class="center" colspan="2">';
$SumToValidate = 0; $SumToValidate = 0;
$SumValidated = 0; $SumWaitingSubscription = 0;
$SumUpToDate = 0; $SumUpToDate = 0;
$SumExpired = 0;
$SumResiliated = 0; $SumResiliated = 0;
$SumExcluded = 0; $SumExcluded = 0;
@ -182,23 +230,26 @@ if ($conf->use_javascript_ajax) {
$i = 0; $i = 0;
foreach ($AdherentType as $key => $adhtype) { foreach ($AdherentType as $key => $adhtype) {
$dataval['draft'][] = array($i, isset($MembersToValidate[$key]) ? $MembersToValidate[$key] : 0); $dataval['draft'][] = array($i, isset($MembersToValidate[$key]) ? $MembersToValidate[$key] : 0);
$dataval['waitingsubscription'][] = array($i, isset($MembersWaitingSubscription[$key]) ? $MembersWaitingSubscription[$key] : 0);
$dataval['uptodate'][] = array($i, isset($MembersUpToDate[$key]) ? $MembersUpToDate[$key] : 0); $dataval['uptodate'][] = array($i, isset($MembersUpToDate[$key]) ? $MembersUpToDate[$key] : 0);
$dataval['notuptodate'][] = array($i, isset($MembersValidated[$key]) ? $MembersValidated[$key] - (isset($MembersUpToDate[$key]) ? $MembersUpToDate[$key] : 0) : 0); $dataval['expired'][] = array($i, isset($MembersExpired[$key]) ? $MembersExpired[$key] : 0);
$dataval['excluded'][] = array($i, isset($MembersExcluded[$key]) ? $MembersExcluded[$key] : 0); $dataval['excluded'][] = array($i, isset($MembersExcluded[$key]) ? $MembersExcluded[$key] : 0);
$dataval['resiliated'][] = array($i, isset($MembersResiliated[$key]) ? $MembersResiliated[$key] : 0); $dataval['resiliated'][] = array($i, isset($MembersResiliated[$key]) ? $MembersResiliated[$key] : 0);
$SumToValidate += isset($MembersToValidate[$key]) ? $MembersToValidate[$key] : 0; $SumToValidate += isset($MembersToValidate[$key]) ? $MembersToValidate[$key] : 0;
$SumValidated += isset($MembersValidated[$key]) ? $MembersValidated[$key] - (isset($MembersUpToDate[$key]) ? $MembersUpToDate[$key] : 0) : 0; $SumWaitingSubscription += isset($MembersWaitingSubscription[$key]) ? $MembersWaitingSubscription[$key] : 0;
$SumUpToDate += isset($MembersUpToDate[$key]) ? $MembersUpToDate[$key] : 0; $SumUpToDate += isset($MembersUpToDate[$key]) ? $MembersUpToDate[$key] : 0;
$SumExpired += isset($MembersExpired[$key]) ? $MembersExpired[$key] : 0;
$SumExcluded += isset($MembersExcluded[$key]) ? $MembersExcluded [$key] : 0; $SumExcluded += isset($MembersExcluded[$key]) ? $MembersExcluded [$key] : 0;
$SumResiliated += isset($MembersResiliated[$key]) ? $MembersResiliated[$key] : 0; $SumResiliated += isset($MembersResiliated[$key]) ? $MembersResiliated[$key] : 0;
$i++; $i++;
} }
$total = $SumToValidate + $SumValidated + $SumUpToDate + $SumExcluded + $SumResiliated; $total = $SumToValidate + $SumWaitingSubscription + $SumUpToDate + $SumExpired + $SumExcluded + $SumResiliated;
$dataseries = array(); $dataseries = array();
$dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusToValid"), round($SumToValidate)); // Draft, not yet validated $dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusToValid"), round($SumToValidate)); // Draft, not yet validated
$dataseries[] = array($langs->transnoentitiesnoconv("WaitingSubscription"), round($SumWaitingSubscription));
$dataseries[] = array($langs->transnoentitiesnoconv("UpToDate"), round($SumUpToDate)); $dataseries[] = array($langs->transnoentitiesnoconv("UpToDate"), round($SumUpToDate));
$dataseries[] = array($langs->transnoentitiesnoconv("OutOfDate"), round($SumValidated)); $dataseries[] = array($langs->transnoentitiesnoconv("OutOfDate"), round($SumExpired));
$dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusExcluded"), round($SumExcluded)); $dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusExcluded"), round($SumExcluded));
$dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusResiliated"), round($SumResiliated)); $dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusResiliated"), round($SumResiliated));
@ -207,7 +258,7 @@ if ($conf->use_javascript_ajax) {
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
$dolgraph = new DolGraph(); $dolgraph = new DolGraph();
$dolgraph->SetData($dataseries); $dolgraph->SetData($dataseries);
$dolgraph->SetDataColor(array('-'.$badgeStatus0, $badgeStatus4, '-'.$badgeStatus1, '-'.$badgeStatus8, $badgeStatus6)); $dolgraph->SetDataColor(array('-'.$badgeStatus0, $badgeStatus1, $badgeStatus4, $badgeStatus8, '-'.$badgeStatus8, $badgeStatus6));
$dolgraph->setShowLegend(2); $dolgraph->setShowLegend(2);
$dolgraph->setShowPercent(1); $dolgraph->setShowPercent(1);
$dolgraph->SetType(array('pie')); $dolgraph->SetType(array('pie'));
@ -217,7 +268,7 @@ if ($conf->use_javascript_ajax) {
$boxgraph .= '</td></tr>'; $boxgraph .= '</td></tr>';
$boxgraph .= '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td class="right">'; $boxgraph .= '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td class="right">';
$boxgraph .= $SumToValidate + $SumValidated + $SumUpToDate + $SumExcluded + $SumResiliated; $boxgraph .= $SumToValidate + $SumWaitingSubscription + $SumUpToDate + $SumExpired + $SumExcluded + $SumResiliated;
$boxgraph .= '</td></tr>'; $boxgraph .= '</td></tr>';
$boxgraph .= '</table>'; $boxgraph .= '</table>';
$boxgraph .= '</div>'; $boxgraph .= '</div>';

View File

@ -395,7 +395,10 @@ if ($search_type > 0) {
$sql .= " AND t.rowid=".((int) $search_type); $sql .= " AND t.rowid=".((int) $search_type);
} }
if ($search_filter == 'withoutsubscription') { if ($search_filter == 'withoutsubscription') {
$sql .= " AND (datefin IS NULL OR t.subscription = '0')"; $sql .= " AND (datefin IS NULL)";
}
if ($search_filter == 'waitingsubscription') {
$sql .= " AND (datefin IS NULL AND t.subscription = '1')";
} }
if ($search_filter == 'uptodate') { if ($search_filter == 'uptodate') {
$sql .= " AND (datefin >= '".$db->idate($now)."' OR t.subscription = '0')"; $sql .= " AND (datefin >= '".$db->idate($now)."' OR t.subscription = '0')";
@ -524,6 +527,9 @@ if (GETPOSTISSET("search_status")) {
if ($search_status == Adherent::STATUS_VALIDATED && $filter == '') { if ($search_status == Adherent::STATUS_VALIDATED && $filter == '') {
$title = $langs->trans("MenuMembersValidated"); $title = $langs->trans("MenuMembersValidated");
} }
if ($search_status == Adherent::STATUS_VALIDATED && $filter == 'waitingsubscription') {
$title = $langs->trans("MembersWithWaitingSubscription");
}
if ($search_status == Adherent::STATUS_VALIDATED && $filter == 'withoutsubscription') { if ($search_status == Adherent::STATUS_VALIDATED && $filter == 'withoutsubscription') {
$title = $langs->trans("MembersWithSubscriptionToReceive"); $title = $langs->trans("MembersWithSubscriptionToReceive");
} }
@ -822,7 +828,8 @@ if (!empty($arrayfields['d.email']['checked'])) {
// End of subscription date // End of subscription date
if (!empty($arrayfields['d.datefin']['checked'])) { if (!empty($arrayfields['d.datefin']['checked'])) {
print '<td class="liste_titre center">'; print '<td class="liste_titre center">';
$selectarray = array('-1'=>'', 'withoutsubscription'=>$langs->trans("WithoutSubscription"), 'uptodate'=>$langs->trans("UpToDate"), 'outofdate'=>$langs->trans("OutOfDate")); //$selectarray = array('-1'=>'', 'withoutsubscription'=>$langs->trans("WithoutSubscription"), 'uptodate'=>$langs->trans("UpToDate"), 'outofdate'=>$langs->trans("OutOfDate"));
$selectarray = array('-1'=>'', 'waitingsubscription'=>$langs->trans("WaitingSubscription"), 'uptodate'=>$langs->trans("UpToDate"), 'outofdate'=>$langs->trans("OutOfDate"));
print $form->selectarray('search_filter', $selectarray, $search_filter); print $form->selectarray('search_filter', $selectarray, $search_filter);
print '</td>'; print '</td>';
} }
@ -936,7 +943,7 @@ if (!empty($arrayfields['d.email']['checked'])) {
print_liste_field_titre($arrayfields['d.email']['label'], $_SERVER["PHP_SELF"], 'd.email', '', $param, '', $sortfield, $sortorder); print_liste_field_titre($arrayfields['d.email']['label'], $_SERVER["PHP_SELF"], 'd.email', '', $param, '', $sortfield, $sortorder);
} }
if (!empty($arrayfields['d.datefin']['checked'])) { if (!empty($arrayfields['d.datefin']['checked'])) {
print_liste_field_titre($arrayfields['d.datefin']['label'], $_SERVER["PHP_SELF"], 'd.datefin', '', $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre($arrayfields['d.datefin']['label'], $_SERVER["PHP_SELF"], 'd.datefin,t.subscription', '', $param, '', $sortfield, $sortorder, 'center ');
} }
// Extra fields // Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
@ -955,7 +962,7 @@ if (!empty($arrayfields['d.tms']['checked'])) {
print_liste_field_titre($arrayfields['d.tms']['label'], $_SERVER["PHP_SELF"], "d.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['d.tms']['label'], $_SERVER["PHP_SELF"], "d.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
} }
if (!empty($arrayfields['d.statut']['checked'])) { if (!empty($arrayfields['d.statut']['checked'])) {
print_liste_field_titre($arrayfields['d.statut']['label'], $_SERVER["PHP_SELF"], "d.statut", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre($arrayfields['d.statut']['label'], $_SERVER["PHP_SELF"], "d.statut,t.subscription,d.datefin", "", $param, 'class="right"', $sortfield, $sortorder);
} }
if (!empty($arrayfields['d.import_key']['checked'])) { if (!empty($arrayfields['d.import_key']['checked'])) {
print_liste_field_titre($arrayfields['d.import_key']['label'], $_SERVER["PHP_SELF"], "d.import_key", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre($arrayfields['d.import_key']['label'], $_SERVER["PHP_SELF"], "d.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
@ -987,6 +994,7 @@ while ($i < min($num, $limit)) {
$memberstatic->morphy = $obj->morphy; $memberstatic->morphy = $obj->morphy;
$memberstatic->note_public = $obj->note_public; $memberstatic->note_public = $obj->note_public;
$memberstatic->note_private = $obj->note_private; $memberstatic->note_private = $obj->note_private;
$memberstatic->need_subscription = $obj->subscription;
if (!empty($obj->fk_soc)) { if (!empty($obj->fk_soc)) {
$memberstatic->fetch_thirdparty(); $memberstatic->fetch_thirdparty();
@ -1200,7 +1208,7 @@ while ($i < min($num, $limit)) {
} }
} else { } else {
if (!empty($obj->subscription)) { if (!empty($obj->subscription)) {
print $langs->trans("SubscriptionNotReceived"); print '<span class="opacitymedium">'.$langs->trans("SubscriptionNotReceived").'</span>';
if ($obj->statut > 0) { if ($obj->statut > 0) {
print " ".img_warning(); print " ".img_warning();
} }

View File

@ -282,10 +282,9 @@ if (count($listinsetup) > 0) {
} }
print '</td>'; print '</td>';
// Delete
print '<td>'; print '<td>';
$label = preg_replace('/_NAME$/', '', $keyforsupportedoauth2array); $label = preg_replace('/_NAME$/', '', $keyforsupportedoauth2array);
print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&provider='.$keyforprovider.'&label='.$label.'">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&provider='.$keyforprovider.'&label='.$label.'">';
print img_picto('', 'delete'); print img_picto('', 'delete');
print '</a>'; print '</a>';
@ -300,41 +299,53 @@ if (count($listinsetup) > 0) {
print '<tr class="oddeven value">'; print '<tr class="oddeven value">';
print '<td>'.$langs->trans("UseTheFollowingUrlAsRedirectURI").'</td>'; print '<td>'.$langs->trans("UseTheFollowingUrlAsRedirectURI").'</td>';
print '<td><input style="width: 80%" type"text" name="uri'.$keyforsupportedoauth2array.'" value="'.$redirect_uri.'" disabled>'; print '<td><input style="width: 80%" type"text" name="uri'.$keyforsupportedoauth2array.'" value="'.$redirect_uri.'" disabled>';
print '</td></tr>'; print '</td>';
print '<td></td>';
print '</tr>';
if ($keyforsupportedoauth2array == 'OAUTH_OTHER_NAME') { if ($keyforsupportedoauth2array == 'OAUTH_OTHER_NAME') {
print '<tr class="oddeven value">'; print '<tr class="oddeven value">';
print '<td>'.$langs->trans("URLOfServiceForAuthorization").'</td>'; print '<td>'.$langs->trans("URLOfServiceForAuthorization").'</td>';
print '<td><input style="width: 80%" type"text" name="'.$key[3].'" value="'.getDolGlobalString($key[3]).'" >'; print '<td><input style="width: 80%" type"text" name="'.$key[3].'" value="'.getDolGlobalString($key[3]).'" >';
print '</td></tr>'; print '</td>';
print '<td></td>';
print '</tr>';
} }
} else { } else {
print '<tr class="oddeven value">'; print '<tr class="oddeven value">';
print '<td>'.$langs->trans("UseTheFollowingUrlAsRedirectURI").'</td>'; print '<td>'.$langs->trans("UseTheFollowingUrlAsRedirectURI").'</td>';
print '<td>'.$langs->trans("FeatureNotYetSupported").'</td>'; print '<td>'.$langs->trans("FeatureNotYetSupported").'</td>';
print '</td></tr>'; print '</td>';
print '<td></td>';
print '</tr>';
} }
// Api Id // Api Id
print '<tr class="oddeven value">'; print '<tr class="oddeven value">';
print '<td><label for="'.$key[1].'">'.$langs->trans("OAUTH_ID").'</label></td>'; print '<td><label for="'.$key[1].'">'.$langs->trans("OAUTH_ID").'</label></td>';
print '<td><input type="text" size="100" id="'.$key[1].'" name="'.$key[1].'" value="'.getDolGlobalString($key[1]).'">'; print '<td><input type="text" size="100" id="'.$key[1].'" name="'.$key[1].'" value="'.getDolGlobalString($key[1]).'">';
print '</td></tr>'; print '</td>';
print '<td></td>';
print '</tr>';
// Api Secret // Api Secret
print '<tr class="oddeven value">'; print '<tr class="oddeven value">';
print '<td><label for="'.$key[2].'">'.$langs->trans("OAUTH_SECRET").'</label></td>'; print '<td><label for="'.$key[2].'">'.$langs->trans("OAUTH_SECRET").'</label></td>';
print '<td><input type="password" size="100" id="'.$key[2].'" name="'.$key[2].'" value="'.getDolGlobalString($key[2]).'">'; print '<td><input type="password" size="100" id="'.$key[2].'" name="'.$key[2].'" value="'.getDolGlobalString($key[2]).'">';
print '</td></tr>'; print '</td>';
print '<td></td>';
print '</tr>';
// TODO Move this into token generation // TODO Move this into token generation ?
if ($supported) { if ($supported) {
if ($keyforsupportedoauth2array == 'OAUTH_OTHER_NAME') { if ($keyforsupportedoauth2array == 'OAUTH_OTHER_NAME') {
print '<tr class="oddeven value">'; print '<tr class="oddeven value">';
print '<td>'.$langs->trans("Scopes").'</td>'; print '<td>'.$langs->trans("Scopes").'</td>';
print '<td>'; print '<td>';
print '<input style="width: 80%" type"text" name="'.$key[4].'" value="'.getDolGlobalString($key[4]).'" >'; print '<input style="width: 80%" type"text" name="'.$key[4].'" value="'.getDolGlobalString($key[4]).'" >';
print '</td></tr>'; print '</td>';
print '<td></td>';
print '</tr>';
} else { } else {
$availablescopes = array_flip(explode(',', $supportedoauth2array[$keyforsupportedoauth2array]['availablescopes'])); $availablescopes = array_flip(explode(',', $supportedoauth2array[$keyforsupportedoauth2array]['availablescopes']));
$currentscopes = explode(',', getDolGlobalString($key[4])); $currentscopes = explode(',', getDolGlobalString($key[4]));
@ -354,13 +365,17 @@ if (count($listinsetup) > 0) {
print '<input type="checkbox" id="'.$keyforprovider.$scope.'" name="'.$key[4].'[]" value="'.$scope.'"'.($val ? ' checked' : '').'>'; print '<input type="checkbox" id="'.$keyforprovider.$scope.'" name="'.$key[4].'[]" value="'.$scope.'"'.($val ? ' checked' : '').'>';
print '<label style="margin-right: 10px" for="'.$keyforprovider.$scope.'">'.$scope.'</label>'; print '<label style="margin-right: 10px" for="'.$keyforprovider.$scope.'">'.$scope.'</label>';
} }
print '</td></tr>'; print '</td>';
print '<td></td>';
print '</tr>';
} }
} else { } else {
print '<tr class="oddeven value">'; print '<tr class="oddeven value">';
print '<td>'.$langs->trans("UseTheFollowingUrlAsRedirectURI").'</td>'; print '<td>'.$langs->trans("UseTheFollowingUrlAsRedirectURI").'</td>';
print '<td>'.$langs->trans("FeatureNotYetSupported").'</td>'; print '<td>'.$langs->trans("FeatureNotYetSupported").'</td>';
print '</td></tr>'; print '</td>';
print '<td></td>';
print '</tr>';
} }
print '</table>'."\n"; print '</table>'."\n";

View File

@ -193,7 +193,7 @@ print '<tr class="oddeven">';
print '<td>'.$langs->trans("MaxNumberOfPostOnPublicPagesByIP").'</td><td class="right">'; print '<td>'.$langs->trans("MaxNumberOfPostOnPublicPagesByIP").'</td><td class="right">';
print '</td>'; print '</td>';
print '<td class="nowrap">'; print '<td class="nowrap">';
print '<input class="flat right width50" name="MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS" type="text" value="'.getDolGlobalInt("MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 1000).'"> '.strtolower($langs->trans("Posts")); print '<input class="flat right width50" name="MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS" type="text" value="'.getDolGlobalInt("MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 1000).'">';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';

View File

@ -321,7 +321,7 @@ if (isModEnabled('supplier_proposal') && $user->rights->supplier_proposal->lire)
/* /*
* Draft customer orders * Draft sales orders
*/ */
if (isModEnabled('commande') && $user->rights->commande->lire) { if (isModEnabled('commande') && $user->rights->commande->lire) {

View File

@ -32,7 +32,7 @@
/** /**
* \file htdocs/commande/card.php * \file htdocs/commande/card.php
* \ingroup commande * \ingroup commande
* \brief Page to show customer order * \brief Page to show sales order
*/ */
// Load Dolibarr environment // Load Dolibarr environment

View File

@ -3395,7 +3395,7 @@ class Commande extends CommonOrder
} }
/** /**
* Delete the customer order * Delete the sales order
* *
* @param User $user User object * @param User $user User object
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
@ -4062,7 +4062,7 @@ class Commande extends CommonOrder
} }
/** /**
* Is the customer order delayed? * Is the sales order delayed?
* *
* @return bool true if late, false if not * @return bool true if late, false if not
*/ */

View File

@ -22,7 +22,7 @@
/** /**
* \file htdocs/commande/index.php * \file htdocs/commande/index.php
* \ingroup commande * \ingroup commande
* \brief Home page of customer order module * \brief Home page of sales order module
*/ */

View File

@ -410,7 +410,7 @@ if ($action == 'create') {
// Amount // Amount
print '<tr><td>'; print '<tr><td>';
print $form->editfieldkey('Amount', 'amount', '', $object, 0, 'string', '', 1).'</td><td>'; print $form->editfieldkey('Amount', 'amount', '', $object, 0, 'string', '', 1).'</td><td>';
print '<input name="amount" id="amount" class="minwidth100 maxwidth150onsmartphone" value="'.$amount.'">'; print '<input name="amount" id="amount" class="minwidth50 maxwidth100" value="'.$amount.'">';
print '</td></tr>'; print '</td></tr>';
// Bank // Bank

View File

@ -97,10 +97,19 @@ class FactureStats extends Stats
if ($this->userid > 0) { if ($this->userid > 0) {
$this->where .= ' AND f.fk_user_author = '.((int) $this->userid); $this->where .= ' AND f.fk_user_author = '.((int) $this->userid);
} }
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if ($mode == 'customer') {
$this->where .= " AND f.type IN (0,1,2,5)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
} else { $this->where .= " AND f.type IN (0,1,2,5)";
$this->where .= " AND f.type IN (0,1,2,3,5)"; } else {
$this->where .= " AND f.type IN (0,1,2,3,5)";
}
}
if ($mode == 'supplier') {
if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$this->where .= " AND f.type IN (0,1,2,5)";
} else {
$this->where .= " AND f.type IN (0,1,2,3,5)";
}
} }
if ($typentid) { if ($typentid) {

View File

@ -114,11 +114,7 @@ if (empty($reshook)) {
} }
$paymentservice = GETPOST('paymentservice'); $paymentservice = GETPOST('paymentservice');
if (preg_match('/stripesepa/', $paymentservice)) { $result = $object->demande_prelevement($user, price2num(GETPOST('withdraw_request_amount', 'alpha')), $newtype, $sourcetype);
$result = $object->demande_prelevement_stripe($user, price2num(GETPOST('withdraw_request_amount', 'alpha')), $newtype, $sourcetype);
} else {
$result = $object->demande_prelevement($user, price2num(GETPOST('withdraw_request_amount', 'alpha')), $newtype, $sourcetype);
}
if ($result > 0) { if ($result > 0) {
$db->commit(); $db->commit();
@ -142,6 +138,14 @@ if (empty($reshook)) {
} }
} }
// Payment with Direct Debit Stripe
if ($action == 'sepastripepayment' && $usercancreate) {
$result = $object->makeStripeSepaRequest($user, GETPOST('did', 'int'), 'direct-debit', 'facture');
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
}
// payments conditions // payments conditions
if ($action == 'setconditions' && $usercancreate) { if ($action == 'setconditions' && $usercancreate) {
$object->fetch($id); $object->fetch($id);
@ -260,7 +264,7 @@ if ($object->id > 0) {
$resteapayeraffiche = $resteapayer; $resteapayeraffiche = $resteapayer;
if ($type == 'bank-transfer') { if ($type == 'bank-transfer') {
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { // Never use this if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) { // Not recommended
$filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
$filtercreditnote = "fk_invoice_supplier_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filtercreditnote = "fk_invoice_supplier_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
} else { } else {
@ -273,7 +277,7 @@ if ($object->id > 0) {
$absolute_discount = price2num($absolute_discount, 'MT'); $absolute_discount = price2num($absolute_discount, 'MT');
$absolute_creditnote = price2num($absolute_creditnote, 'MT'); $absolute_creditnote = price2num($absolute_creditnote, 'MT');
} else { } else {
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { // Not recommended
$filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filterabsolutediscount = "fk_facture_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
$filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filtercreditnote = "fk_facture_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
} else { } else {
@ -871,7 +875,8 @@ if ($object->id > 0) {
print '<td>'; print '<td>';
if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT)) { if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT)) {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=new&paymentservice=stripesepa&token='.newToken().'&did='.$obj->rowid.'&id='.$object->id.'&type='.urlencode($type).'">'.img_picto('', 'stripe', 'class="pictofixedwidth"').$langs->trans("SendToStripe").'</a>'; $langs->load("stripe");
print '<a href="'.$_SERVER["PHP_SELF"].'?action=sepastripepayment&paymentservice=stripesepa&token='.newToken().'&did='.$obj->rowid.'&id='.$object->id.'&type='.urlencode($type).'">'.img_picto('', 'stripe', 'class="pictofixedwidth"').$langs->trans("RequestDirectDebitWithStripe").'</a>';
} }
print '</td>'; print '</td>';

View File

@ -95,7 +95,7 @@ $periodlink = '';
$exportlink = ''; $exportlink = '';
$builddate = dol_now(); $builddate = dol_now();
$description = $langs->trans("DescPurchasesJournal").'<br>'; $description = $langs->trans("DescPurchasesJournal").'<br>';
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("DepositsAreNotIncluded"); $description .= $langs->trans("DepositsAreNotIncluded");
} else { } else {
$description .= $langs->trans("DepositsAreIncluded"); $description .= $langs->trans("DepositsAreIncluded");
@ -119,7 +119,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product";
$sql .= " JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON f.rowid = fd.fk_facture_fourn"; $sql .= " JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON f.rowid = fd.fk_facture_fourn";
$sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
$sql .= " WHERE f.fk_statut > 0 AND f.entity IN (".getEntity('invoice').")"; $sql .= " WHERE f.fk_statut > 0 AND f.entity IN (".getEntity('invoice').")";
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2)"; $sql .= " AND f.type IN (0,1,2)";
} else { } else {
$sql .= " AND f.type IN (0,1,2,3)"; $sql .= " AND f.type IN (0,1,2,3)";

View File

@ -194,6 +194,9 @@ if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') $description.='<br>'.$lan
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description.='<br>'.$langs->trans("DepositsAreNotIncluded"); $description.='<br>'.$langs->trans("DepositsAreNotIncluded");
} }
if (! empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description.='<br>'.$langs->trans("SupplierDepositsAreNotIncluded");
}
*/ */
if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) { if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) {
$description .= $langs->trans("ThisIsAnEstimatedValue"); $description .= $langs->trans("ThisIsAnEstimatedValue");

View File

@ -189,6 +189,9 @@ if ($modecompta == "CREANCES-DETTES") {
} else { } else {
$description .= $langs->trans("DepositsAreIncluded"); $description .= $langs->trans("DepositsAreIncluded");
} }
if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("SupplierDepositsAreNotIncluded");
}
$builddate = dol_now(); $builddate = dol_now();
//$exportlink=$langs->trans("NotYetAvailable"); //$exportlink=$langs->trans("NotYetAvailable");
} elseif ($modecompta == "RECETTES-DEPENSES") { } elseif ($modecompta == "RECETTES-DEPENSES") {
@ -637,7 +640,7 @@ if ($modecompta == 'BOOKKEEPING') {
$sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f";
$sql .= " WHERE f.fk_soc = s.rowid"; $sql .= " WHERE f.fk_soc = s.rowid";
$sql .= " AND f.fk_statut IN (1,2)"; $sql .= " AND f.fk_statut IN (1,2)";
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2)"; $sql .= " AND f.type IN (0,1,2)";
} else { } else {
$sql .= " AND f.type IN (0,1,2,3)"; $sql .= " AND f.type IN (0,1,2,3)";
@ -1341,7 +1344,7 @@ if ($modecompta == 'BOOKKEEPING') {
$sql = "SELECT date_format(f.datef,'%Y-%m') as dm, sum(f.total_tva) as amount"; $sql = "SELECT date_format(f.datef,'%Y-%m') as dm, sum(f.total_tva) as amount";
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
$sql .= " WHERE f.fk_statut IN (1,2)"; $sql .= " WHERE f.fk_statut IN (1,2)";
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2)"; $sql .= " AND f.type IN (0,1,2)";
} else { } else {
$sql .= " AND f.type IN (0,1,2,3)"; $sql .= " AND f.type IN (0,1,2,3)";

View File

@ -165,6 +165,9 @@ if ($modecompta == 'CREANCES-DETTES') {
} else { } else {
$description .= "<br>".$langs->trans("DepositsAreIncluded"); $description .= "<br>".$langs->trans("DepositsAreIncluded");
} }
if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("SupplierDepositsAreNotIncluded");
}
$builddate = dol_now(); $builddate = dol_now();
//$exportlink=$langs->trans("NotYetAvailable"); //$exportlink=$langs->trans("NotYetAvailable");
} elseif ($modecompta == "RECETTES-DEPENSES") { } elseif ($modecompta == "RECETTES-DEPENSES") {
@ -330,7 +333,7 @@ if (isModEnabled('facture') && ($modecompta == 'CREANCES-DETTES' || $modecompta
$sql = "SELECT sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc, date_format(f.datef,'%Y-%m') as dm"; $sql = "SELECT sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc, date_format(f.datef,'%Y-%m') as dm";
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
$sql .= " WHERE f.fk_statut IN (1,2)"; $sql .= " WHERE f.fk_statut IN (1,2)";
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2)"; $sql .= " AND f.type IN (0,1,2)";
} else { } else {
$sql .= " AND f.type IN (0,1,2,3)"; $sql .= " AND f.type IN (0,1,2,3)";
@ -438,7 +441,7 @@ if (isModEnabled('tax') && ($modecompta == 'CREANCES-DETTES' || $modecompta == "
$sql = "SELECT sum(f.total_tva) as amount, date_format(f.datef,'%Y-%m') as dm"; $sql = "SELECT sum(f.total_tva) as amount, date_format(f.datef,'%Y-%m') as dm";
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
$sql .= " WHERE f.fk_statut IN (1,2)"; $sql .= " WHERE f.fk_statut IN (1,2)";
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2)"; $sql .= " AND f.type IN (0,1,2)";
} else { } else {
$sql .= " AND f.type IN (0,1,2,3)"; $sql .= " AND f.type IN (0,1,2,3)";

View File

@ -205,6 +205,9 @@ if ($modecompta == "CREANCES-DETTES") {
} else { } else {
$description .= $langs->trans("DepositsAreIncluded"); $description .= $langs->trans("DepositsAreIncluded");
} }
if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("SupplierDepositsAreNotIncluded");
}
$builddate = dol_now(); $builddate = dol_now();
//$exportlink=$langs->trans("NotYetAvailable"); //$exportlink=$langs->trans("NotYetAvailable");
} elseif ($modecompta == "RECETTES-DEPENSES") { } elseif ($modecompta == "RECETTES-DEPENSES") {
@ -231,8 +234,6 @@ if ($modecompta == "CREANCES-DETTES") {
$exportlink = ''; $exportlink = '';
$description = $langs->trans("RulesResultBookkeepingPersonalized"); $description = $langs->trans("RulesResultBookkeepingPersonalized");
$description .= ' ('.$langs->trans("SeePageForSetup", DOL_URL_ROOT.'/accountancy/admin/categories_list.php?search_country_id='.$mysoc->country_id.'&mainmenu=accountancy&leftmenu=accountancy_admin', $langs->transnoentitiesnoconv("Accountancy").' / '.$langs->transnoentitiesnoconv("Setup").' / '.$langs->transnoentitiesnoconv("AccountingCategory")).')'; $description .= ' ('.$langs->trans("SeePageForSetup", DOL_URL_ROOT.'/accountancy/admin/categories_list.php?search_country_id='.$mysoc->country_id.'&mainmenu=accountancy&leftmenu=accountancy_admin', $langs->transnoentitiesnoconv("Accountancy").' / '.$langs->transnoentitiesnoconv("Setup").' / '.$langs->transnoentitiesnoconv("AccountingCategory")).')';
//if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.= $langs->trans("DepositsAreNotIncluded");
//else $description.= $langs->trans("DepositsAreIncluded");
$builddate = dol_now(); $builddate = dol_now();
} }

View File

@ -225,7 +225,9 @@ if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') {
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= '<br>'.$langs->trans("DepositsAreNotIncluded"); $description .= '<br>'.$langs->trans("DepositsAreNotIncluded");
} }
if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("SupplierDepositsAreNotIncluded");
}
// Customers invoices // Customers invoices
$elementcust = $langs->trans("CustomersInvoices"); $elementcust = $langs->trans("CustomersInvoices");
$productcust = $langs->trans("ProductOrService"); $productcust = $langs->trans("ProductOrService");
@ -256,6 +258,9 @@ if ($modecompta == "CREANCES-DETTES") {
} else { } else {
$description .= $langs->trans("DepositsAreIncluded"); $description .= $langs->trans("DepositsAreIncluded");
} }
if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("SupplierDepositsAreNotIncluded");
}
$builddate = dol_now(); $builddate = dol_now();
} elseif ($modecompta == "RECETTES-DEPENSES") { } elseif ($modecompta == "RECETTES-DEPENSES") {
@ -406,7 +411,7 @@ if ($modecompta == 'CREANCES-DETTES') {
$sql2 .= " WHERE ff.datef >= '".$db->idate($date_start)."'"; $sql2 .= " WHERE ff.datef >= '".$db->idate($date_start)."'";
$sql2 .= " AND ff.datef <= '".$db->idate($date_end)."'"; $sql2 .= " AND ff.datef <= '".$db->idate($date_end)."'";
$sql .= " AND ff.fk_statut in (1,2)"; $sql .= " AND ff.fk_statut in (1,2)";
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND ff.type IN (0,1,2,5)"; $sql .= " AND ff.type IN (0,1,2,5)";
} else { } else {
$sql .= " AND ff.type IN (0,1,2,3,5)"; $sql .= " AND ff.type IN (0,1,2,3,5)";

View File

@ -247,7 +247,6 @@ if ($modecompta == "CREANCES-DETTES") {
} else { } else {
$description .= $langs->trans("DepositsAreIncluded"); $description .= $langs->trans("DepositsAreIncluded");
} }
$builddate = dol_now(); $builddate = dol_now();
} elseif ($modecompta == "RECETTES-DEPENSES") { } elseif ($modecompta == "RECETTES-DEPENSES") {
$name = $langs->trans("TurnoverCollected").', '.$langs->trans("ByProductsAndServices"); $name = $langs->trans("TurnoverCollected").', '.$langs->trans("ByProductsAndServices");

View File

@ -154,6 +154,9 @@ if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') {
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= '<br>'.$langs->trans("DepositsAreNotIncluded"); $description .= '<br>'.$langs->trans("DepositsAreNotIncluded");
} }
if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("SupplierDepositsAreNotIncluded");
}
if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) { if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) {
$description .= '<br>'.$langs->trans("ThisIsAnEstimatedValue"); $description .= '<br>'.$langs->trans("ThisIsAnEstimatedValue");
} }

View File

@ -211,6 +211,9 @@ if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') {
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= '<br>'.$langs->trans("DepositsAreNotIncluded"); $description .= '<br>'.$langs->trans("DepositsAreNotIncluded");
} }
if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("SupplierDepositsAreNotIncluded");
}
if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) { if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) {
$description .= '<br>'.$langs->trans("ThisIsAnEstimatedValue"); $description .= '<br>'.$langs->trans("ThisIsAnEstimatedValue");
} }

View File

@ -164,6 +164,9 @@ if ($conf->global->TAX_MODE_SELL_SERVICE == 'payment') {
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= '<br>'.$langs->trans("DepositsAreNotIncluded"); $description .= '<br>'.$langs->trans("DepositsAreNotIncluded");
} }
if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("SupplierDepositsAreNotIncluded");
}
if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) { if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) {
$description .= '<br>'.$langs->trans("ThisIsAnEstimatedValue"); $description .= '<br>'.$langs->trans("ThisIsAnEstimatedValue");
} }

View File

@ -1707,8 +1707,8 @@ class Contrat extends CommonObject
$total_localtax1 = $tabprice[9]; $total_localtax1 = $tabprice[9];
$total_localtax2 = $tabprice[10]; $total_localtax2 = $tabprice[10];
$localtax1_type = $localtaxes_type[0]; $localtax1_type = (empty($localtaxes_type[0]) ? '' : $localtaxes_type[0]);
$localtax2_type = $localtaxes_type[2]; $localtax2_type = (empty($localtaxes_type[2]) ? '' : $localtaxes_type[2]);
// TODO A virer // TODO A virer
// Anciens indicateurs: $price, $remise (a ne plus utiliser) // Anciens indicateurs: $price, $remise (a ne plus utiliser)
@ -1741,8 +1741,8 @@ class Contrat extends CommonObject
$sql .= ",tva_tx = ".((float) price2num($tvatx)); $sql .= ",tva_tx = ".((float) price2num($tvatx));
$sql .= ",localtax1_tx = ".((float) price2num($localtax1tx)); $sql .= ",localtax1_tx = ".((float) price2num($localtax1tx));
$sql .= ",localtax2_tx = ".((float) price2num($localtax2tx)); $sql .= ",localtax2_tx = ".((float) price2num($localtax2tx));
$sql .= ",localtax1_type='".$this->db->escape($localtax1_type); $sql .= ",localtax1_type='".$this->db->escape($localtax1_type)."'";
$sql .= ",localtax2_type='".$this->db->escape($localtax2_type); $sql .= ",localtax2_type='".$this->db->escape($localtax2_type)."'";
$sql .= ", total_ht = ".((float) price2num($total_ht)); $sql .= ", total_ht = ".((float) price2num($total_ht));
$sql .= ", total_tva = ".((float) price2num($total_tva)); $sql .= ", total_tva = ".((float) price2num($total_tva));
$sql .= ", total_localtax1 = ".((float) price2num($total_localtax1)); $sql .= ", total_localtax1 = ".((float) price2num($total_localtax1));

View File

@ -1240,6 +1240,45 @@ if (!$error && ($action == 'affecttag' && $confirm == 'yes') && $permissiontoadd
} }
} }
if (!$error && ($action == 'setsupervisor' && $confirm == 'yes') && $permissiontoadd) {
$db->begin();
$supervisortoset=GETPOST('supervisortoset');
if (!empty($supervisortoset)) {
foreach ($toselect as $toselectid) {
$result = $object->fetch($toselectid);
//var_dump($contcats);exit;
if ($result > 0) {
$object->fk_user = $supervisortoset;
$res = $object->update($user);
if ($res > 0) {
$nbok++;
} else {
setEventMessages($object->error, $object->errors, 'errors');
}
} else {
setEventMessages($object->error, $object->errors, 'errors');
$error++;
break;
}
}
} else {
setEventMessage('UserNotFound', 'errors');
$error++;
}
if (!$error) {
if ($nbok > 1) {
setEventMessages($langs->trans("RecordsModified", $nbok), null);
} else {
setEventMessages($langs->trans("RecordsModified", $nbok), null);
}
$db->commit();
$toselect=array();
} else {
$db->rollback();
}
}
if (!$error && ($massaction == 'enable' || ($action == 'enable' && $confirm == 'yes')) && $permissiontoadd) { if (!$error && ($massaction == 'enable' || ($action == 'enable' && $confirm == 'yes')) && $permissiontoadd) {
$db->begin(); $db->begin();

View File

@ -495,7 +495,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box
} }
// We set info of modules // We set info of modules
$widget[$j]['picto'] = $objMod->picto ? img_object('', $objMod->picto) : img_object('', 'generic'); $widget[$j]['picto'] = (empty($objMod->picto) ? (empty($objMod->boximg) ? img_object('', 'generic') : $objMod->boximg) : img_object('', $objMod->picto));
$widget[$j]['file'] = $files[$key]; $widget[$j]['file'] = $files[$key];
$widget[$j]['fullpath'] = $fullpath[$key]; $widget[$j]['fullpath'] = $fullpath[$key];
$widget[$j]['relpath'] = $relpath[$key]; $widget[$j]['relpath'] = $relpath[$key];

File diff suppressed because it is too large Load Diff

View File

@ -4410,7 +4410,7 @@ abstract class CommonObject
$nb_rows_affected = $this->db->affected_rows($resql); // should be 1 or 0 if status was already correct $nb_rows_affected = $this->db->affected_rows($resql); // should be 1 or 0 if status was already correct
if ($nb_rows_affected >= 0) { if ($nb_rows_affected > 0) {
if (empty($trigkey)) { if (empty($trigkey)) {
// Try to guess trigkey (for backward compatibility, now we should have trigkey defined into the call of setStatus) // Try to guess trigkey (for backward compatibility, now we should have trigkey defined into the call of setStatus)
if ($this->element == 'supplier_proposal' && $status == 2) { if ($this->element == 'supplier_proposal' && $status == 2) {

View File

@ -559,7 +559,7 @@ class DiscountAbsolute
/** /**
* Return amount (with tax) of all deposits invoices used by invoice as a payment. * Return amount (with tax) of all deposits invoices used by invoice as a payment.
* Should always be empty, except if option FACTURE_DEPOSITS_ARE_JUST_PAYMENTS is on (not recommended). * Should always be empty, except if option FACTURE_DEPOSITS_ARE_JUST_PAYMENTS or FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS is on (not recommended).
* *
* @param CommonInvoice $invoice Object invoice (customer of supplier) * @param CommonInvoice $invoice Object invoice (customer of supplier)
* @param int $multicurrency 1=Return multicurrency_amount instead of amount. TODO Add a mode multicurrency = -1 to return array with amount + multicurrency amount * @param int $multicurrency 1=Return multicurrency_amount instead of amount. TODO Add a mode multicurrency = -1 to return array with amount + multicurrency amount

View File

@ -673,7 +673,7 @@ class Form
if ($direction < 0) { if ($direction < 0) {
$s .= '<'.$tag.$paramfortooltipimg; $s .= '<'.$tag.$paramfortooltipimg;
if ($tag == 'td') { if ($tag == 'td') {
$s .= ' class=valigntop" width="14"'; $s .= ' class="valigntop" width="14"';
} }
$s .= '>'.$textfordialog.$img.'</'.$tag.'>'; $s .= '>'.$textfordialog.$img.'</'.$tag.'>';
} }
@ -5759,7 +5759,7 @@ class Form
print '<input type="hidden" name="token" value="'.newToken().'">'; print '<input type="hidden" name="token" value="'.newToken().'">';
print '<div class="inline-block">'; print '<div class="inline-block">';
if (!empty($discount_type)) { if (!empty($discount_type)) {
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
if (!$filter || $filter == "fk_invoice_supplier_source IS NULL") { if (!$filter || $filter == "fk_invoice_supplier_source IS NULL") {
$translationKey = 'HasAbsoluteDiscountFromSupplier'; // If we want deposit to be substracted to payments only and not to total of final invoice $translationKey = 'HasAbsoluteDiscountFromSupplier'; // If we want deposit to be substracted to payments only and not to total of final invoice
} else { } else {

View File

@ -966,13 +966,15 @@ function sanitizeVal($out = '', $check = 'alphanohtml', $filter = null, $options
break; break;
case 'custom': case 'custom':
if (empty($filter)) { if (!empty($out)) {
return 'BadParameterForGETPOST - Param 3 of sanitizeVal()'; if (empty($filter)) {
return 'BadParameterForGETPOST - Param 3 of sanitizeVal()';
}
/*if (empty($options)) {
return 'BadParameterForGETPOST - Param 4 of sanitizeVal()';
}*/
$out = filter_var($out, $filter, $options);
} }
if (empty($options)) {
return 'BadParameterForGETPOST - Param 4 of sanitizeVal()';
}
$out = filter_var($out, $filter, $options);
break; break;
} }
@ -9133,10 +9135,10 @@ function getLanguageCodeFromCountryCode($countrycode)
* @param string $type Value for object where objectvalue can be * @param string $type Value for object where objectvalue can be
* 'thirdparty' to add a tab in third party view * 'thirdparty' to add a tab in third party view
* 'intervention' to add a tab in intervention view * 'intervention' to add a tab in intervention view
* 'supplier_order' to add a tab in supplier order view * 'supplier_order' to add a tab in purchase order view
* 'supplier_invoice' to add a tab in supplier invoice view * 'supplier_invoice' to add a tab in purchase invoice view
* 'invoice' to add a tab in customer invoice view * 'invoice' to add a tab in sales invoice view
* 'order' to add a tab in customer order view * 'order' to add a tab in sales order view
* 'contract' to add a tabl in contract view * 'contract' to add a tabl in contract view
* 'product' to add a tab in product view * 'product' to add a tab in product view
* 'propal' to add a tab in propal view * 'propal' to add a tab in propal view

View File

@ -189,7 +189,7 @@ function order_admin_prepare_head()
/** /**
* Return a HTML table that contains a pie chart of customer orders * Return a HTML table that contains a pie chart of sales orders
* *
* @param int $socid (Optional) Show only results from the customer with this id * @param int $socid (Optional) Show only results from the customer with this id
* @return string A HTML table that contains a pie chart of customer invoices * @return string A HTML table that contains a pie chart of customer invoices

View File

@ -448,7 +448,7 @@ function show_stats_for_company($product, $socid)
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
} }
// Customer orders // Sales orders
if (isModEnabled('commande') && $user->rights->commande->lire) { if (isModEnabled('commande') && $user->rights->commande->lire) {
$nblines++; $nblines++;
$ret = $product->load_stats_commande($socid); $ret = $product->load_stats_commande($socid);

View File

@ -174,10 +174,18 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely) $sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely)
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if ($direction == 'buy') {
$sql .= " AND f.type IN (0,1,2,5)"; if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} else { } else {
$sql .= " AND f.type IN (0,1,2,3,5)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} }
$sql .= " AND f.rowid = d.".$fk_facture; $sql .= " AND f.rowid = d.".$fk_facture;
$sql .= " AND s.rowid = f.fk_soc"; $sql .= " AND s.rowid = f.fk_soc";
@ -222,10 +230,18 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely) $sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely)
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if ($direction == 'buy') {
$sql .= " AND f.type IN (0,1,2,5)"; if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} else { } else {
$sql .= " AND f.type IN (0,1,2,3,5)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} }
$sql .= " AND f.rowid = d.".$fk_facture; $sql .= " AND f.rowid = d.".$fk_facture;
$sql .= " AND s.rowid = f.fk_soc"; $sql .= " AND s.rowid = f.fk_soc";
@ -359,10 +375,18 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely) $sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely)
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if ($direction == 'buy') {
$sql .= " AND f.type IN (0,1,2,5)"; if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} else { } else {
$sql .= " AND f.type IN (0,1,2,3,5)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} }
$sql .= " AND f.rowid = d.".$fk_facture; $sql .= " AND f.rowid = d.".$fk_facture;
$sql .= " AND s.rowid = f.fk_soc"; $sql .= " AND s.rowid = f.fk_soc";
@ -407,10 +431,18 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely) $sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely)
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if ($direction == 'buy') {
$sql .= " AND f.type IN (0,1,2,5)"; if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} else { } else {
$sql .= " AND f.type IN (0,1,2,3,5)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} }
$sql .= " AND f.rowid = d.".$fk_facture; $sql .= " AND f.rowid = d.".$fk_facture;
$sql .= " AND s.rowid = f.fk_soc"; $sql .= " AND s.rowid = f.fk_soc";
@ -730,10 +762,18 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely) $sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely)
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if ($direction == 'buy') {
$sql .= " AND f.type IN (0,1,2,5)"; if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} else { } else {
$sql .= " AND f.type IN (0,1,2,3,5)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} }
if ($y && $m) { if ($y && $m) {
$sql .= " AND f.datef >= '".$db->idate(dol_get_first_day($y, $m, false))."'"; $sql .= " AND f.datef >= '".$db->idate(dol_get_first_day($y, $m, false))."'";
@ -776,10 +816,18 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely) $sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely)
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if ($direction == 'buy') {
$sql .= " AND f.type IN (0,1,2,5)"; if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} else { } else {
$sql .= " AND f.type IN (0,1,2,3,5)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} }
if ($y && $m) { if ($y && $m) {
$sql .= " AND pa.datep >= '".$db->idate(dol_get_first_day($y, $m, false))."'"; $sql .= " AND pa.datep >= '".$db->idate(dol_get_first_day($y, $m, false))."'";
@ -915,10 +963,18 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely) $sql .= " AND f.fk_statut in (1,2)"; // Validated or paid (partially or completely)
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if ($direction == 'buy') {
$sql .= " AND f.type IN (0,1,2,5)"; if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} else { } else {
$sql .= " AND f.type IN (0,1,2,3,5)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} }
if ($y && $m) { if ($y && $m) {
$sql .= " AND f.datef >= '".$db->idate(dol_get_first_day($y, $m, false))."'"; $sql .= " AND f.datef >= '".$db->idate(dol_get_first_day($y, $m, false))."'";
@ -961,10 +1017,18 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p on d.fk_product = p.rowid";
$sql .= " WHERE f.entity IN (".getEntity($invoicetable).")"; $sql .= " WHERE f.entity IN (".getEntity($invoicetable).")";
$sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely) $sql .= " AND f.fk_statut in (1,2)"; // Paid (partially or completely)
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if ($direction == 'buy') {
$sql .= " AND f.type IN (0,1,2,5)"; if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} else { } else {
$sql .= " AND f.type IN (0,1,2,3,5)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (0,1,2,5)";
} else {
$sql .= " AND f.type IN (0,1,2,3,5)";
}
} }
if ($y && $m) { if ($y && $m) {
$sql .= " AND pa.datep >= '".$db->idate(dol_get_first_day($y, $m, false))."'"; $sql .= " AND pa.datep >= '".$db->idate(dol_get_first_day($y, $m, false))."'";

View File

@ -450,7 +450,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4202__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/list.php', 'List', 1, 'members', '$user->rights->adherent->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4202__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/list.php', 'List', 1, 'members', '$user->rights->adherent->lire', '', 2, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4203__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&amp;leftmenu=members&amp;statut=-1', 'MenuMembersToValidate', 2, 'members', '$user->rights->adherent->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4203__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&amp;leftmenu=members&amp;statut=-1', 'MenuMembersToValidate', 2, 'members', '$user->rights->adherent->lire', '', 2, 2, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4204__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&amp;leftmenu=members&amp;statut=1', 'MenuMembersValidated', 2, 'members', '$user->rights->adherent->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4204__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&amp;leftmenu=members&amp;statut=1', 'MenuMembersValidated', 2, 'members', '$user->rights->adherent->lire', '', 2, 3, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4205__+MAX_llx_menu__, 'members', '', 4204__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&amp;leftmenu=members&amp;statut=1&amp;filter=withoutsubscription', 'WithoutSubscription', 2, 'members', '$user->rights->adherent->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4205__+MAX_llx_menu__, 'members', '', 4204__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&amp;leftmenu=members&amp;statut=1&amp;filter=waitingsubscription', 'WaitingSubscription', 2, 'members', '$user->rights->adherent->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4206__+MAX_llx_menu__, 'members', '', 4204__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&amp;leftmenu=members&amp;statut=1&amp;filter=outofdate', 'UpToDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4206__+MAX_llx_menu__, 'members', '', 4204__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&amp;leftmenu=members&amp;statut=1&amp;filter=outofdate', 'UpToDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4207__+MAX_llx_menu__, 'members', '', 4204__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&amp;leftmenu=members&amp;statut=1&amp;filter=uptodate', 'OutOfDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4207__+MAX_llx_menu__, 'members', '', 4204__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&amp;leftmenu=members&amp;statut=1&amp;filter=uptodate', 'OutOfDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 5, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4208__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&amp;leftmenu=members&amp;statut=0', 'MenuMembersResiliated', 2, 'members', '$user->rights->adherent->lire', '', 2, 6, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4208__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&amp;leftmenu=members&amp;statut=0', 'MenuMembersResiliated', 2, 'members', '$user->rights->adherent->lire', '', 2, 6, __ENTITY__);

View File

@ -2405,7 +2405,7 @@ function get_left_menu_members($mainmenu, &$newmenu, $usemenuhider = 1, $leftmen
$newmenu->add("/adherents/list.php?leftmenu=members", $langs->trans("List"), 1, $user->hasRight('adherent', 'read')); $newmenu->add("/adherents/list.php?leftmenu=members", $langs->trans("List"), 1, $user->hasRight('adherent', 'read'));
$newmenu->add("/adherents/list.php?leftmenu=members&amp;statut=-1", $langs->trans("MenuMembersToValidate"), 2, $user->hasRight('adherent', 'read')); $newmenu->add("/adherents/list.php?leftmenu=members&amp;statut=-1", $langs->trans("MenuMembersToValidate"), 2, $user->hasRight('adherent', 'read'));
$newmenu->add("/adherents/list.php?leftmenu=members&amp;statut=1", $langs->trans("MenuMembersValidated"), 2, $user->hasRight('adherent', 'read')); $newmenu->add("/adherents/list.php?leftmenu=members&amp;statut=1", $langs->trans("MenuMembersValidated"), 2, $user->hasRight('adherent', 'read'));
$newmenu->add("/adherents/list.php?leftmenu=members&amp;statut=1&amp;filter=withoutsubscription", $langs->trans("WithoutSubscription"), 3, $user->hasRight('adherent', 'read')); $newmenu->add("/adherents/list.php?leftmenu=members&amp;statut=1&amp;filter=waitingsubscription", $langs->trans("WaitingSubscription"), 3, $user->hasRight('adherent', 'read'));
$newmenu->add("/adherents/list.php?leftmenu=members&amp;statut=1&amp;filter=uptodate", $langs->trans("UpToDate"), 3, $user->hasRight('adherent', 'read')); $newmenu->add("/adherents/list.php?leftmenu=members&amp;statut=1&amp;filter=uptodate", $langs->trans("UpToDate"), 3, $user->hasRight('adherent', 'read'));
$newmenu->add("/adherents/list.php?leftmenu=members&amp;statut=1&amp;filter=outofdate", $langs->trans("OutOfDate"), 3, $user->hasRight('adherent', 'read')); $newmenu->add("/adherents/list.php?leftmenu=members&amp;statut=1&amp;filter=outofdate", $langs->trans("OutOfDate"), 3, $user->hasRight('adherent', 'read'));
$newmenu->add("/adherents/list.php?leftmenu=members&amp;statut=0", $langs->trans("MenuMembersResiliated"), 2, $user->hasRight('adherent', 'read')); $newmenu->add("/adherents/list.php?leftmenu=members&amp;statut=0", $langs->trans("MenuMembersResiliated"), 2, $user->hasRight('adherent', 'read'));

View File

@ -26,7 +26,7 @@
require_once DOL_DOCUMENT_ROOT.'/core/modules/asset/modules_asset.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/asset/modules_asset.php';
/** /**
* Class to manage customer order numbering rules standard * Class to manage the Standard numbering rule for Asset
*/ */
class mod_asset_standard extends ModeleNumRefAsset class mod_asset_standard extends ModeleNumRefAsset
{ {

View File

@ -25,7 +25,7 @@
require_once DOL_DOCUMENT_ROOT.'/core/modules/bom/modules_bom.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/bom/modules_bom.php';
/** /**
* Class to manage customer order numbering rules standard * Class to manage the Standard numbering rule for BOM
*/ */
class mod_bom_standard extends ModeleNumRefboms class mod_bom_standard extends ModeleNumRefboms
{ {

View File

@ -20,12 +20,12 @@
/** /**
* \file htdocs/core/modules/commande/mod_commande_marbre.php * \file htdocs/core/modules/commande/mod_commande_marbre.php
* \ingroup commande * \ingroup commande
* \brief File of class to manage customer order numbering rules Marbre * \brief File of class to manage Sales Order numbering rules Marbre
*/ */
require_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php';
/** /**
* Class to manage customer order numbering rules Marbre * Class to manage Sales Order numbering rules Marbre
*/ */
class mod_commande_marbre extends ModeleNumRefCommandes class mod_commande_marbre extends ModeleNumRefCommandes
{ {

View File

@ -23,14 +23,14 @@
/** /**
* \file htdocs/core/modules/commande/mod_commande_saphir.php * \file htdocs/core/modules/commande/mod_commande_saphir.php
* \ingroup commande * \ingroup commande
* \brief Fichier contenant la classe du modele de numerotation de reference de commande Saphir * \brief File of class to manage Sales Order numbering rules Saphir
*/ */
require_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php';
/** /**
* Class to manage customer order numbering rules Saphir * Class to manage Sales Order numbering rules Saphir
*/ */
class mod_commande_saphir extends ModeleNumRefCommandes class mod_commande_saphir extends ModeleNumRefCommandes
{ {

View File

@ -26,7 +26,7 @@ dol_include_once('/core/modules/hrm/modules_evaluation.php');
/** /**
* Class to manage customer order numbering rules standard * Class to manage the Standard numbering rule for HR evaluation
*/ */
class mod_evaluation_standard extends ModeleNumRefEvaluation class mod_evaluation_standard extends ModeleNumRefEvaluation
{ {

View File

@ -107,7 +107,7 @@ class modApi extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -137,7 +137,7 @@ class modAsset extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -156,7 +156,7 @@ class modBom extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -34,11 +34,10 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
/** /**
* Class to describe module customer orders * Class to describe module Sales Orders
*/ */
class modCommande extends DolibarrModules class modCommande extends DolibarrModules
{ {
/** /**
* Constructor. Define names, constants, directories, boxes, permissions * Constructor. Define names, constants, directories, boxes, permissions
* *

View File

@ -162,7 +162,7 @@ class modDataPolicy extends DolibarrModules {
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -131,7 +131,7 @@ class modDav extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -131,7 +131,7 @@ class modEmailCollector extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -169,7 +169,7 @@ class modEventOrganization extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -5,6 +5,7 @@
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2022 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -238,7 +239,7 @@ class modFacture extends DolibarrModules
$this->import_fields_array[$r] = array( $this->import_fields_array[$r] = array(
'f.ref' => 'InvoiceRef*', 'f.ref' => 'InvoiceRef*',
'f.ref_ext' => 'ExternalRef', 'f.ref_ext' => 'ExternalRef',
'f.ref_client' => 'CutomerRef', 'f.ref_client' => 'CustomerRef',
'f.type' => 'Type*', 'f.type' => 'Type*',
'f.fk_soc' => 'Customer*', 'f.fk_soc' => 'Customer*',
'f.datec' => 'InvoiceDateCreation', 'f.datec' => 'InvoiceDateCreation',
@ -350,7 +351,7 @@ class modFacture extends DolibarrModules
) )
); );
//Import Supplier Invoice Lines // Import Invoice Lines
$r++; $r++;
$this->import_code[$r] = $this->rights_class.'_'.$r; $this->import_code[$r] = $this->rights_class.'_'.$r;
$this->import_label[$r] = "InvoiceLine"; // Translation key $this->import_label[$r] = "InvoiceLine"; // Translation key

View File

@ -141,7 +141,7 @@ class modHRM extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -184,7 +184,7 @@ class modKnowledgeManagement extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -168,7 +168,7 @@ class modMrp extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -113,7 +113,7 @@ class modMultiCurrency extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -199,7 +199,7 @@ class modPartnership extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -177,7 +177,7 @@ class modRecruitment extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -120,7 +120,7 @@ class modResource extends DolibarrModules
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'invoice' to add a tab in customer invoice view // 'invoice' to add a tab in customer invoice view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'product' to add a tab in product view // 'product' to add a tab in product view
// 'stock' to add a tab in stock view // 'stock' to add a tab in stock view
// 'propal' to add a tab in propal view // 'propal' to add a tab in propal view

View File

@ -166,7 +166,7 @@ class modStockTransfer extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -142,7 +142,7 @@ class modTakePos extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -183,7 +183,7 @@ class modWebhook extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -166,7 +166,7 @@ class modWorkstation extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -172,7 +172,7 @@ class modZapier extends DolibarrModules
// 'invoice_supplier' to add a tab in supplier invoice view // 'invoice_supplier' to add a tab in supplier invoice view
// 'member' to add a tab in fundation member view // 'member' to add a tab in fundation member view
// 'opensurveypoll' to add a tab in opensurvey poll view // 'opensurveypoll' to add a tab in opensurvey poll view
// 'order' to add a tab in customer order view // 'order' to add a tab in sales order view
// 'order_supplier' to add a tab in supplier order view // 'order_supplier' to add a tab in supplier order view
// 'payment' to add a tab in payment view // 'payment' to add a tab in payment view
// 'payment_supplier' to add a tab in supplier payment view // 'payment_supplier' to add a tab in supplier payment view

View File

@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/propale/modules_propale.php';
/** /**
* Class to manage customer order numbering rules Marbre * Class to manage business proposition rules Marbre
*/ */
class mod_propale_marbre extends ModeleNumRefPropales class mod_propale_marbre extends ModeleNumRefPropales
{ {

View File

@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/modules/stocktransfer/modules_stocktrans
/** /**
* Class to manage customer order numbering rules standard * Class to manage the Standard numbering rule for Stock
*/ */
class mod_stocktransfer_standard extends ModeleNumRefStockTransfer class mod_stocktransfer_standard extends ModeleNumRefStockTransfer
{ {

View File

@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_proposal/modules_supplier
/** /**
* Class to manage customer order numbering rules Marbre * Class to manage the Marbre numbering rule for Request for quotation
*/ */
class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal
{ {

View File

@ -26,7 +26,7 @@
require_once DOL_DOCUMENT_ROOT . '/core/modules/workstation/modules_workstation.php'; require_once DOL_DOCUMENT_ROOT . '/core/modules/workstation/modules_workstation.php';
/** /**
* Class to manage customer order numbering rules standard * Class to manage the Standard numbering rule for Workstation
*/ */
class mod_workstation_standard extends ModeleNumRefWorkstation class mod_workstation_standard extends ModeleNumRefWorkstation
{ {

View File

@ -78,6 +78,24 @@ if ($massaction == 'preaffecttag' && isModEnabled('category')) {
} }
} }
if ($massaction == 'presetsupervisor') {
$formquestion = array();
$valuefield = '<div style="display: flex; align-items: center; justify-content: flex-end; padding-right: 150px">';
$valuefield .= img_picto('', 'user').' ';
$valuefield .= $form->select_dolusers('', 'supervisortoset', 1, $arrayofselected, 0, '', 0, $object->entity, 0, 0, '', 0, '', 'widthcentpercentminusx maxwidth300');
$valuefield .= '</div>';
$formquestion[] = array(
'type' => 'other',
'name' => 'supervisortoset',
'label' => $langs->trans("Supervisor"),
'value' => $valuefield
);
print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmSetSupervisor"), $langs->trans("ConfirmSetSupervisorQuestion", count($toselect)), "setsupervisor", $formquestion, 1, 0, 200, 500, 1);
}
if ($massaction == 'presend') { if ($massaction == 'presend') {
$langs->load("mails"); $langs->load("mails");

View File

@ -203,7 +203,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers
// case 'MYECMDIR_CREATE': // case 'MYECMDIR_CREATE':
// case 'MYECMDIR_MODIFY': // case 'MYECMDIR_MODIFY':
// Customer orders // Sales orders
case 'ORDER_CREATE': case 'ORDER_CREATE':
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
while ($resql && $obj = $this->db->fetch_array($resql)) { while ($resql && $obj = $this->db->fetch_array($resql)) {

View File

@ -28,12 +28,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
require_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT .'/comm/propal/class/propal.class.php'; // Customer Proposal require_once DOL_DOCUMENT_ROOT .'/comm/propal/class/propal.class.php'; // Customer Proposal
require_once DOL_DOCUMENT_ROOT .'/commande/class/commande.class.php'; // Customer Order require_once DOL_DOCUMENT_ROOT .'/commande/class/commande.class.php'; // Sale Order
require_once DOL_DOCUMENT_ROOT .'/compta/facture/class/facture.class.php'; // Customer Invoice require_once DOL_DOCUMENT_ROOT .'/compta/facture/class/facture.class.php'; // Customer Invoice
require_once DOL_DOCUMENT_ROOT .'/contact/class/contact.class.php'; // Contact / Address require_once DOL_DOCUMENT_ROOT .'/contact/class/contact.class.php'; // Contact / Address
require_once DOL_DOCUMENT_ROOT .'/expedition/class/expedition.class.php'; // Shipping / Delivery require_once DOL_DOCUMENT_ROOT .'/expedition/class/expedition.class.php'; // Shipping / Delivery
require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.commande.class.php'; // Supplier Order require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.commande.class.php'; // Purchase Order
require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.facture.class.php'; // Supplier Invoice require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.facture.class.php'; // Purchase Invoice
require_once DOL_DOCUMENT_ROOT .'/projet/class/project.class.php'; // Project require_once DOL_DOCUMENT_ROOT .'/projet/class/project.class.php'; // Project
require_once DOL_DOCUMENT_ROOT .'/reception/class/reception.class.php'; // Reception require_once DOL_DOCUMENT_ROOT .'/reception/class/reception.class.php'; // Reception
require_once DOL_DOCUMENT_ROOT .'/recruitment/class/recruitmentcandidature.class.php'; // Recruiting require_once DOL_DOCUMENT_ROOT .'/recruitment/class/recruitmentcandidature.class.php'; // Recruiting
@ -1766,7 +1766,7 @@ class EmailCollector extends CommonObject
if ($reg[1] == 'pro') { // Customer Proposal if ($reg[1] == 'pro') { // Customer Proposal
$objectemail = new Propal($this->db); $objectemail = new Propal($this->db);
} }
if ($reg[1] == 'ord') { // Customer Order if ($reg[1] == 'ord') { // Sale Order
$objectemail = new Commande($this->db); $objectemail = new Commande($this->db);
} }
if ($reg[1] == 'shi') { // Shipment if ($reg[1] == 'shi') { // Shipment

View File

@ -1832,7 +1832,7 @@ class CommandeFournisseur extends CommonOrder
// If we want a dedicated supplier price, we must provide $fk_prod_fourn_price. // If we want a dedicated supplier price, we must provide $fk_prod_fourn_price.
$result = $prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', (isset($this->fk_soc) ? $this->fk_soc : $this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$ref_supplier/$this->fk_soc $result = $prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', (isset($this->fk_soc) ? $this->fk_soc : $this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$ref_supplier/$this->fk_soc
// If supplier order created from customer order, we take best supplier price // If supplier order created from sales order, we take best supplier price
// If $pu (defined previously from pu_ht or pu_ttc) is not defined at all, we also take the best supplier price // If $pu (defined previously from pu_ht or pu_ttc) is not defined at all, we also take the best supplier price
if ($result > 0 && ($origin == 'commande' || $pu === '')) { if ($result > 0 && ($origin == 'commande' || $pu === '')) {
$pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice $pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice
@ -2608,11 +2608,11 @@ class CommandeFournisseur extends CommonOrder
} }
/** /**
* Update a supplier order from a customer order * Update a supplier order from a sales order
* *
* @param User $user User that create * @param User $user User that create
* @param int $idc Id of supplier order to update * @param int $idc Id of purchase order to update
* @param int $comclientid Id of customer order to use as template * @param int $comclientid Id of sale order to use as template
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function updateFromCommandeClient($user, $idc, $comclientid) public function updateFromCommandeClient($user, $idc, $comclientid)

View File

@ -419,7 +419,11 @@ class ProductFournisseur extends Product
$productfournisseurprice->array_options[$key] = $value; $productfournisseurprice->array_options[$key] = $value;
} }
$res = $productfournisseurprice->update($user); $res = $productfournisseurprice->update($user);
if ($res < 0) $error++; if ($res < 0) {
$this->error = $productfournisseurprice->error;
$this->errors = $productfournisseurprice->errors;
$error++;
}
} }
} }
} }
@ -506,6 +510,7 @@ class ProductFournisseur extends Product
if ($resql) { if ($resql) {
$this->product_fourn_price_id = $this->db->last_insert_id(MAIN_DB_PREFIX."product_fournisseur_price"); $this->product_fourn_price_id = $this->db->last_insert_id(MAIN_DB_PREFIX."product_fournisseur_price");
} else { } else {
$this->error = $this->db->lasterror();
$error++; $error++;
} }
@ -518,7 +523,11 @@ class ProductFournisseur extends Product
$productfournisseurprice->array_options[$key] = $value; $productfournisseurprice->array_options[$key] = $value;
} }
$res = $productfournisseurprice->update($user); $res = $productfournisseurprice->update($user);
if ($res < 0) $error++; if ($res < 0) {
$this->error = $productfournisseurprice->error;
$this->errors = $productfournisseurprice->errors;
$error++;
}
} }
} }
} }

View File

@ -2121,7 +2121,7 @@ if ($action == 'create') {
print '</tr>'; print '</tr>';
// Relative and absolute discounts // Relative and absolute discounts
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) {
$filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
$filtercreditnote = "fk_invoice_supplier_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filtercreditnote = "fk_invoice_supplier_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
} else { } else {

View File

@ -527,7 +527,7 @@ if (empty($reshook)) {
} }
} }
$cmd->classifyBilled($user); // TODO Move this in workflow like done for customer orders $cmd->classifyBilled($user); // TODO Move this in workflow like done for sales orders
if (!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) { if (!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) {
$TFactThird[$cmd->socid] = $objecttmp; $TFactThird[$cmd->socid] = $objecttmp;

View File

@ -2641,7 +2641,7 @@ if ($action == 'create') {
} }
$resteapayeraffiche = $resteapayer; $resteapayeraffiche = $resteapayer;
if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { // Never use this if (!empty($conf->global->FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS)) { // Never use this
$filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filterabsolutediscount = "fk_invoice_supplier_source IS NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
$filtercreditnote = "fk_invoice_supplier_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice $filtercreditnote = "fk_invoice_supplier_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice
} else { } else {

View File

@ -194,7 +194,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
$dashboardlines[$board->element.'_signed'] = $board->load_board($user, "signed"); $dashboardlines[$board->element.'_signed'] = $board->load_board($user, "signed");
} }
// Number of customer orders a deal // Number of sales orders a deal
if (isModEnabled('commande') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight('commande', 'lire')) { if (isModEnabled('commande') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight('commande', 'lire')) {
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
$board = new Commande($db); $board = new Commande($db);

View File

@ -48,11 +48,11 @@
INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('VT', 'ACCOUNTING_SELL_JOURNAL', 2, 1, 1); INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('VT', 'ACCOUNTING_SELL_JOURNAL', 2, 1, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('AC', 'ACCOUNTING_PURCHASE_JOURNAL', 3, 1, 1); INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('AC', 'ACCOUNTING_PURCHASE_JOURNAL', 3, 1, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('BQ', 'FinanceJournal', 4, 1, 1); INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('BQ', 'ACCOUNTING_BANK_JOURNAL', 4, 1, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('ER', 'ACCOUNTING_EXPENSEREPORT_JOURNAL', 5, 1, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('OD', 'ACCOUNTING_MISCELLANEOUS_JOURNAL', 1, 1, 1); INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('OD', 'ACCOUNTING_MISCELLANEOUS_JOURNAL', 1, 1, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('AN', 'ACCOUNTING_HAS_NEW_JOURNAL', 9, 1, 1); INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('AN', 'ACCOUNTING_HAS_NEW_JOURNAL', 9, 0, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('ER', 'ExpenseReportsJournal', 5, 1, 1); INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('INV', 'ACCOUNTING_INVENTORY_JOURNAL', 8, 0, 1);
INSERT INTO llx_accounting_journal (code, label, nature, active, entity) VALUES ('INV', 'InventoryJournal', 8, 1, 1);

View File

@ -136,7 +136,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__, 93,'PCG99-ABREGE','INCOME', '75', '1407', 'Autres produits de gestion courante', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 93,'PCG99-ABREGE','INCOME', '75', '1407', 'Autres produits de gestion courante', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 94,'PCG99-ABREGE','INCOME', '753', '93', 'Jetons de présence et rémunérations d''administrateurs, gérants,...', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 94,'PCG99-ABREGE','INCOME', '753', '93', 'Jetons de présence et rémunérations d''administrateurs, gérants,...', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 95,'PCG99-ABREGE','INCOME', '754', '93', 'Ristournes perçues des coopératives', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 95,'PCG99-ABREGE','INCOME', '754', '93', 'Ristournes perçues des coopératives', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 96,'PCG99-ABREGE','INCOME', '755', '93', 'Quotes-parts de résultat sur opérations faites en commun', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 96,'PCG99-ABREGE','INCOME', '755', '93', 'Quotes-parts de résultat sur opérations faites en commun', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 97,'PCG99-ABREGE','INCOME', '76', '1407', 'Produits financiers', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 97,'PCG99-ABREGE','INCOME', '76', '1407', 'Produits financiers', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 98,'PCG99-ABREGE','INCOME', '77', '1407', 'Produits exceptionnels', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 98,'PCG99-ABREGE','INCOME', '77', '1407', 'Produits exceptionnels', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 99,'PCG99-ABREGE','INCOME', '781', '1407', 'Reprises sur amortissements et provisions', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 99,'PCG99-ABREGE','INCOME', '781', '1407', 'Reprises sur amortissements et provisions', 1);

View File

@ -26,10 +26,10 @@
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71501, 'ENG-BASE', 'CAPIT', '1', '0', 'Equity, provisions for liabilities and charges and liabilities at more than one year', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71501, 'ENG-BASE', 'CAPIT', '1', '0', 'Equity, provisions for liabilities and charges and liabilities at more than one year', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71502, 'ENG-BASE', 'IMMO', '2', '0', 'Administration fees.Fixed assets and receivables over one year', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71502, 'ENG-BASE', 'IMMO', '2', '0', 'Administration fees.Fixed assets and receivables over one year', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71503, 'ENG-BASE', 'STOCK', '3', '0', 'Stock and orders running', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71503, 'ENG-BASE', 'STOCK', '3', '0', 'Stock and orders running', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71504, 'ENG-BASE', 'TIERS', '4', '0', 'Amounts receivable and payable within one year', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71504, 'ENG-BASE', 'THIRDPARTY', '4', '0', 'Amounts receivable and payable within one year', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71505, 'ENG-BASE', 'FINAN', '5', '0', 'Placing of cash and cash equivalents', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71505, 'ENG-BASE', 'FINAN', '5', '0', 'Placing of cash and cash equivalents', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71506, 'ENG-BASE', 'CHARGE','6', '0', 'Charges', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71506, 'ENG-BASE', 'EXPENSE','6', '0', 'Charges', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71507, 'ENG-BASE', 'PROD', '7', '0', 'Products', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 71507, 'ENG-BASE', 'INCOME', '7', '0', 'Products', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70103, 'ENG-BASE', 'CAPIT', '10', '71501', 'Capital and reserves', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70103, 'ENG-BASE', 'CAPIT', '10', '71501', 'Capital and reserves', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70104, 'ENG-BASE', 'CAPIT', '101', '70103', 'Capital', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70104, 'ENG-BASE', 'CAPIT', '101', '70103', 'Capital', 1);
@ -158,70 +158,70 @@ 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__, 70227, 'ENG-BASE', 'STOCK', '394', '70223', 'Provisions for depreciation of work in process', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70227, 'ENG-BASE', 'STOCK', '394', '70223', 'Provisions for depreciation of work in process', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70228, 'ENG-BASE', 'STOCK', '395', '70223', 'Provisions for depreciation of inventories of products', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70228, 'ENG-BASE', 'STOCK', '395', '70223', 'Provisions for depreciation of inventories of products', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70229, 'ENG-BASE', 'STOCK', '397', '70223', 'Provisions for depreciation of inventories of goods', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70229, 'ENG-BASE', 'STOCK', '397', '70223', 'Provisions for depreciation of inventories of goods', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70230, 'ENG-BASE', 'TIERS', '40', '71504', 'Accounts payable', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70230, 'ENG-BASE', 'THIRDPARTY', '40', '71504', 'Accounts payable', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70231, 'ENG-BASE', 'TIERS', '400', '70230', 'Accounts payable', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70231, 'ENG-BASE', 'THIRDPARTY', '400', '70230', 'Accounts payable', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70232, 'ENG-BASE', 'TIERS', '401', '70230', 'Suppliers', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70232, 'ENG-BASE', 'THIRDPARTY', '401', '70230', 'Suppliers', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70233, 'ENG-BASE', 'TIERS', '403', '70230', 'Suppliers - Payables', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70233, 'ENG-BASE', 'THIRDPARTY', '403', '70230', 'Suppliers - Payables', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70234, 'ENG-BASE', 'TIERS', '404', '70230', 'Suppliers of fixed assets', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70234, 'ENG-BASE', 'THIRDPARTY', '404', '70230', 'Suppliers of fixed assets', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70235, 'ENG-BASE', 'TIERS', '405', '70230', 'Capital Suppliers - Payables', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70235, 'ENG-BASE', 'THIRDPARTY', '405', '70230', 'Capital Suppliers - Payables', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70236, 'ENG-BASE', 'TIERS', '408', '70230', 'Supplier invoices not yet received', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70236, 'ENG-BASE', 'THIRDPARTY', '408', '70230', 'Supplier invoices not yet received', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70237, 'ENG-BASE', 'TIERS', '409', '70230', 'Debtors suppliers', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70237, 'ENG-BASE', 'THIRDPARTY', '409', '70230', 'Debtors suppliers', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70238, 'ENG-BASE', 'TIERS', '41', '71504', 'Accounts receivable', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70238, 'ENG-BASE', 'THIRDPARTY', '41', '71504', 'Accounts receivable', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70239, 'ENG-BASE', 'TIERS', '410', '70238', 'Customers and Related Accounts', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70239, 'ENG-BASE', 'THIRDPARTY', '410', '70238', 'Customers and Related Accounts', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70240, 'ENG-BASE', 'TIERS', '411', '70238', 'Customers', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70240, 'ENG-BASE', 'THIRDPARTY', '411', '70238', 'Customers', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70241, 'ENG-BASE', 'TIERS', '413', '70238', 'Accounts Receivable', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70241, 'ENG-BASE', 'THIRDPARTY', '413', '70238', 'Accounts Receivable', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70242, 'ENG-BASE', 'TIERS', '416', '70238', 'Doubtful or contentious customers', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70242, 'ENG-BASE', 'THIRDPARTY', '416', '70238', 'Doubtful or contentious customers', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70243, 'ENG-BASE', 'TIERS', '418', '70238', 'Customers - Products not yet billed', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70243, 'ENG-BASE', 'THIRDPARTY', '418', '70238', 'Customers - Products not yet billed', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70244, 'ENG-BASE', 'TIERS', '419', '70238', 'Accounts payable', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70244, 'ENG-BASE', 'THIRDPARTY', '419', '70238', 'Accounts payable', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70245, 'ENG-BASE', 'TIERS', '42', '71504', 'Personnel and related accounts', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70245, 'ENG-BASE', 'THIRDPARTY', '42', '71504', 'Personnel and related accounts', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70246, 'ENG-BASE', 'TIERS', '421', '70245', 'Staff - Remuneration due', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70246, 'ENG-BASE', 'THIRDPARTY', '421', '70245', 'Staff - Remuneration due', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70247, 'ENG-BASE', 'TIERS', '422', '70245', 'Works councils, establishment, ...', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70247, 'ENG-BASE', 'THIRDPARTY', '422', '70245', 'Works councils, establishment, ...', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70248, 'ENG-BASE', 'TIERS', '424', '70245', 'Employee participation in results', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70248, 'ENG-BASE', 'THIRDPARTY', '424', '70245', 'Employee participation in results', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70249, 'ENG-BASE', 'TIERS', '425', '70245', 'Staff - Advances and Advances', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70249, 'ENG-BASE', 'THIRDPARTY', '425', '70245', 'Staff - Advances and Advances', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70250, 'ENG-BASE', 'TIERS', '426', '70245', 'Staff - Deposits', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70250, 'ENG-BASE', 'THIRDPARTY', '426', '70245', 'Staff - Deposits', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70251, 'ENG-BASE', 'TIERS', '427', '70245', 'Staff - Oppositions', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70251, 'ENG-BASE', 'THIRDPARTY', '427', '70245', 'Staff - Oppositions', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70252, 'ENG-BASE', 'TIERS', '428', '70245', 'Personnel - Accrued expenses and accrued income', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70252, 'ENG-BASE', 'THIRDPARTY', '428', '70245', 'Personnel - Accrued expenses and accrued income', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70253, 'ENG-BASE', 'TIERS', '43', '71504', 'Social security and other social organizations', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70253, 'ENG-BASE', 'THIRDPARTY', '43', '71504', 'Social security and other social organizations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70254, 'ENG-BASE', 'TIERS', '431', '70253', 'Social Security', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70254, 'ENG-BASE', 'THIRDPARTY', '431', '70253', 'Social Security', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70255, 'ENG-BASE', 'TIERS', '437', '70253', 'Other social organizations', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70255, 'ENG-BASE', 'THIRDPARTY', '437', '70253', 'Other social organizations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70256, 'ENG-BASE', 'TIERS', '438', '70253', 'Social organizations - Accrued expenses and accrued income', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70256, 'ENG-BASE', 'THIRDPARTY', '438', '70253', 'Social organizations - Accrued expenses and accrued income', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70257, 'ENG-BASE', 'TIERS', '44', '71504', 'State and other public authorities', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70257, 'ENG-BASE', 'THIRDPARTY', '44', '71504', 'State and other public authorities', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70258, 'ENG-BASE', 'TIERS', '441', '70257', 'Status - Grants Receivable', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70258, 'ENG-BASE', 'THIRDPARTY', '441', '70257', 'Status - Grants Receivable', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70259, 'ENG-BASE', 'TIERS', '442', '70257', 'Statement - Taxes and taxes recoverable on third parties', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70259, 'ENG-BASE', 'THIRDPARTY', '442', '70257', 'Statement - Taxes and taxes recoverable on third parties', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70260, 'ENG-BASE', 'TIERS', '443', '70257', 'Special operations with the State, public authorities, international organizations', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70260, 'ENG-BASE', 'THIRDPARTY', '443', '70257', 'Special operations with the State, public authorities, international organizations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70261, 'ENG-BASE', 'TIERS', '444', '70257', 'State - Income taxes', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70261, 'ENG-BASE', 'THIRDPARTY', '444', '70257', 'State - Income taxes', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70262, 'ENG-BASE', 'TIERS', '445', '70257', 'State - Taxes on turnover', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70262, 'ENG-BASE', 'THIRDPARTY', '445', '70257', 'State - Taxes on turnover', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70263, 'ENG-BASE', 'TIERS', '446', '70257', 'Bonded Bonds', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70263, 'ENG-BASE', 'THIRDPARTY', '446', '70257', 'Bonded Bonds', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70264, 'ENG-BASE', 'TIERS', '447', '70257', 'Other taxes, duties and similar payments', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70264, 'ENG-BASE', 'THIRDPARTY', '447', '70257', 'Other taxes, duties and similar payments', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70265, 'ENG-BASE', 'TIERS', '448', '70257', 'Statement of Accounts Payable and Accrued Income', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70265, 'ENG-BASE', 'THIRDPARTY', '448', '70257', 'Statement of Accounts Payable and Accrued Income', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70266, 'ENG-BASE', 'TIERS', '449', '70257', 'Emission quotas to be returned to the State', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70266, 'ENG-BASE', 'THIRDPARTY', '449', '70257', 'Emission quotas to be returned to the State', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70267, 'ENG-BASE', 'TIERS', '45', '71504', 'Group and Associates', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70267, 'ENG-BASE', 'THIRDPARTY', '45', '71504', 'Group and Associates', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70268, 'ENG-BASE', 'TIERS', '451', '70267', 'Group', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70268, 'ENG-BASE', 'THIRDPARTY', '451', '70267', 'Group', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70269, 'ENG-BASE', 'TIERS', '455', '70267', 'Associates - Current Accounts', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70269, 'ENG-BASE', 'THIRDPARTY', '455', '70267', 'Associates - Current Accounts', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70270, 'ENG-BASE', 'TIERS', '456', '70267', 'Associates - Capital transactions', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70270, 'ENG-BASE', 'THIRDPARTY', '456', '70267', 'Associates - Capital transactions', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70271, 'ENG-BASE', 'TIERS', '457', '70267', 'Associates - Dividends payable', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70271, 'ENG-BASE', 'THIRDPARTY', '457', '70267', 'Associates - Dividends payable', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70272, 'ENG-BASE', 'TIERS', '458', '70267', 'Associates- Joint and EIG Operations', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70272, 'ENG-BASE', 'THIRDPARTY', '458', '70267', 'Associates- Joint and EIG Operations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70273, 'ENG-BASE', 'TIERS', '46', '71504', 'Miscellaneous receivables and creditors', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70273, 'ENG-BASE', 'THIRDPARTY', '46', '71504', 'Miscellaneous receivables and creditors', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70274, 'ENG-BASE', 'TIERS', '462', '70273', 'Receivables on disposals of fixed assets', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70274, 'ENG-BASE', 'THIRDPARTY', '462', '70273', 'Receivables on disposals of fixed assets', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70275, 'ENG-BASE', 'TIERS', '464', '70273', 'Debts on acquisitions of marketable securities', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70275, 'ENG-BASE', 'THIRDPARTY', '464', '70273', 'Debts on acquisitions of marketable securities', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70276, 'ENG-BASE', 'TIERS', '465', '70273', 'Receivables on disposals of marketable securities', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70276, 'ENG-BASE', 'THIRDPARTY', '465', '70273', 'Receivables on disposals of marketable securities', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70277, 'ENG-BASE', 'TIERS', '467', '70273', 'Other accounts receivable or payable', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70277, 'ENG-BASE', 'THIRDPARTY', '467', '70273', 'Other accounts receivable or payable', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70278, 'ENG-BASE', 'TIERS', '468', '70273', 'Miscellaneous - Accrued expenses and accrued income', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70278, 'ENG-BASE', 'THIRDPARTY', '468', '70273', 'Miscellaneous - Accrued expenses and accrued income', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70279, 'ENG-BASE', 'TIERS', '47', '71504', 'Transition or suspense accounts', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70279, 'ENG-BASE', 'THIRDPARTY', '47', '71504', 'Transition or suspense accounts', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70280, 'ENG-BASE', 'TIERS', '471', '70279', 'Waiting Accounts', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70280, 'ENG-BASE', 'THIRDPARTY', '471', '70279', 'Waiting Accounts', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70281, 'ENG-BASE', 'TIERS', '476', '70279', 'Conversion Difference - Assets', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70281, 'ENG-BASE', 'THIRDPARTY', '476', '70279', 'Conversion Difference - Assets', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70282, 'ENG-BASE', 'TIERS', '477', '70279', 'Translation differences - Liabilities', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70282, 'ENG-BASE', 'THIRDPARTY', '477', '70279', 'Translation differences - Liabilities', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70283, 'ENG-BASE', 'TIERS', '478', '70279', 'Other transitional accounts', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70283, 'ENG-BASE', 'THIRDPARTY', '478', '70279', 'Other transitional accounts', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70284, 'ENG-BASE', 'TIERS', '48', '71504', 'regularisation account', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70284, 'ENG-BASE', 'THIRDPARTY', '48', '71504', 'regularisation account', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70285, 'ENG-BASE', 'TIERS', '481', '70284', 'Expenses to be spread over several financial years', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70285, 'ENG-BASE', 'THIRDPARTY', '481', '70284', 'Expenses to be spread over several financial years', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70286, 'ENG-BASE', 'TIERS', '486', '70284', 'Prepaid expenses', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70286, 'ENG-BASE', 'THIRDPARTY', '486', '70284', 'Prepaid expenses', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70287, 'ENG-BASE', 'TIERS', '487', '70284', 'Deferred income', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70287, 'ENG-BASE', 'THIRDPARTY', '487', '70284', 'Deferred income', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70288, 'ENG-BASE', 'TIERS', '488', '70284', 'Accounts for the periodic distribution of expenses and revenues', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70288, 'ENG-BASE', 'THIRDPARTY', '488', '70284', 'Accounts for the periodic distribution of expenses and revenues', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70289, 'ENG-BASE', 'TIERS', '489', '70284', 'Emission allowances allocated by the State', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70289, 'ENG-BASE', 'THIRDPARTY', '489', '70284', 'Emission allowances allocated by the State', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70290, 'ENG-BASE', 'TIERS', '49', '71504', 'Provisions for depreciation of third party accounts', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70290, 'ENG-BASE', 'THIRDPARTY', '49', '71504', 'Provisions for depreciation of third party accounts', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70291, 'ENG-BASE', 'TIERS', '491', '70290', 'Provisions for depreciation of customer accounts', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70291, 'ENG-BASE', 'THIRDPARTY', '491', '70290', 'Provisions for depreciation of customer accounts', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70292, 'ENG-BASE', 'TIERS', '495', '70290', 'Provisions for impairment of group and associate accounts', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70292, 'ENG-BASE', 'THIRDPARTY', '495', '70290', 'Provisions for impairment of group and associate accounts', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70293, 'ENG-BASE', 'TIERS', '496', '70290', 'Provisions for depreciation of accounts receivable', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70293, 'ENG-BASE', 'THIRDPARTY', '496', '70290', 'Provisions for depreciation of accounts receivable', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70294, 'ENG-BASE', 'FINAN', '50', '71505', 'Marketable securities', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70294, 'ENG-BASE', 'FINAN', '50', '71505', 'Marketable securities', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70295, 'ENG-BASE', 'FINAN', '501', '70294', 'Shares in related companies', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70295, 'ENG-BASE', 'FINAN', '501', '70294', 'Shares in related companies', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70296, 'ENG-BASE', 'FINAN', '502', '70294', 'Treasury shares', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70296, 'ENG-BASE', 'FINAN', '502', '70294', 'Treasury shares', 1);
@ -250,120 +250,120 @@ 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__, 70319, 'ENG-BASE', 'FINAN', '58', '71505', 'Internal transfers', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70319, 'ENG-BASE', 'FINAN', '58', '71505', 'Internal transfers', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70320, 'ENG-BASE', 'FINAN', '59', '71505', 'Provisions for impairment of financial accounts', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70320, 'ENG-BASE', 'FINAN', '59', '71505', 'Provisions for impairment of financial accounts', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70321, 'ENG-BASE', 'FINAN', '590', '70320', 'Provisions for depreciation of marketable securities', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70321, 'ENG-BASE', 'FINAN', '590', '70320', 'Provisions for depreciation of marketable securities', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70322, 'ENG-BASE', 'CHARGE', '60', '71506', 'Shopping', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70322, 'ENG-BASE', 'EXPENSE', '60', '71506', 'Shopping', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70323, 'ENG-BASE', 'CHARGE', '601', '70322', 'Stored Procurement - Raw Materials (and Supplies)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70323, 'ENG-BASE', 'EXPENSE', '601', '70322', 'Stored Procurement - Raw Materials (and Supplies)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70324, 'ENG-BASE', 'CHARGE', '602', '70322', 'Stored Procurement - Other Supplies', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70324, 'ENG-BASE', 'EXPENSE', '602', '70322', 'Stored Procurement - Other Supplies', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70325, 'ENG-BASE', 'CHARGE', '603', '70322', 'Inventory Changes (Supplies and Commodities)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70325, 'ENG-BASE', 'EXPENSE', '603', '70322', 'Inventory Changes (Supplies and Commodities)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70326, 'ENG-BASE', 'CHARGE', '604', '70322', 'Stored Procurement - Raw Materials (and Supplies)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70326, 'ENG-BASE', 'EXPENSE', '604', '70322', 'Stored Procurement - Raw Materials (and Supplies)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70327, 'ENG-BASE', 'CHARGE', '605', '70322', 'Purchase of equipment, works and equipment', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70327, 'ENG-BASE', 'EXPENSE', '605', '70322', 'Purchase of equipment, works and equipment', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70328, 'ENG-BASE', 'CHARGE', '606', '70322', 'Non-stock purchases of materials and supplies', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70328, 'ENG-BASE', 'EXPENSE', '606', '70322', 'Non-stock purchases of materials and supplies', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70329, 'ENG-BASE', 'CHARGE', '607', '70322', 'Purchases of goods', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70329, 'ENG-BASE', 'EXPENSE', '607', '70322', 'Purchases of goods', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70330, 'ENG-BASE', 'CHARGE', '608', '70322', 'Reserved account, where applicable, to the recapitulation of incidental expenses included in purchases', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70330, 'ENG-BASE', 'EXPENSE', '608', '70322', 'Reserved account, where applicable, to the recapitulation of incidental expenses included in purchases', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70331, 'ENG-BASE', 'CHARGE', '609', '70322', 'Discounts, rebates and rebates obtained on purchases', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70331, 'ENG-BASE', 'EXPENSE', '609', '70322', 'Discounts, rebates and rebates obtained on purchases', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70332, 'ENG-BASE', 'CHARGE', '61', '71506', 'Outside services', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70332, 'ENG-BASE', 'EXPENSE', '61', '71506', 'Outside services', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70333, 'ENG-BASE', 'CHARGE', '611', '70332', 'General subcontracting', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70333, 'ENG-BASE', 'EXPENSE', '611', '70332', 'General subcontracting', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70334, 'ENG-BASE', 'CHARGE', '612', '70332', 'Lease payments', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70334, 'ENG-BASE', 'EXPENSE', '612', '70332', 'Lease payments', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70335, 'ENG-BASE', 'CHARGE', '613', '70332', 'Rentals', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70335, 'ENG-BASE', 'EXPENSE', '613', '70332', 'Rentals', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70336, 'ENG-BASE', 'CHARGE', '614', '70332', 'Rental and condominium expenses', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70336, 'ENG-BASE', 'EXPENSE', '614', '70332', 'Rental and condominium expenses', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70337, 'ENG-BASE', 'CHARGE', '615', '70332', 'Maintenance and repairs', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70337, 'ENG-BASE', 'EXPENSE', '615', '70332', 'Maintenance and repairs', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70338, 'ENG-BASE', 'CHARGE', '616', '70332', 'Insurance premiums', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70338, 'ENG-BASE', 'EXPENSE', '616', '70332', 'Insurance premiums', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70339, 'ENG-BASE', 'CHARGE', '617', '70332', 'Studies and research', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70339, 'ENG-BASE', 'EXPENSE', '617', '70332', 'Studies and research', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70340, 'ENG-BASE', 'CHARGE', '618', '70332', 'Various', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70340, 'ENG-BASE', 'EXPENSE', '618', '70332', 'Various', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70341, 'ENG-BASE', 'CHARGE', '619', '70332', 'Discounts, rebates and rebates obtained on external services', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70341, 'ENG-BASE', 'EXPENSE', '619', '70332', 'Discounts, rebates and rebates obtained on external services', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70342, 'ENG-BASE', 'CHARGE', '62', '71506', 'Other services', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70342, 'ENG-BASE', 'EXPENSE', '62', '71506', 'Other services', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70343, 'ENG-BASE', 'CHARGE', '621', '70342', 'Staff outside the company', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70343, 'ENG-BASE', 'EXPENSE', '621', '70342', 'Staff outside the company', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70344, 'ENG-BASE', 'CHARGE', '622', '70342', 'Remuneration of intermediaries and fees', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70344, 'ENG-BASE', 'EXPENSE', '622', '70342', 'Remuneration of intermediaries and fees', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70345, 'ENG-BASE', 'CHARGE', '623', '70342', 'Advertising, publications, public relations', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70345, 'ENG-BASE', 'EXPENSE', '623', '70342', 'Advertising, publications, public relations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70346, 'ENG-BASE', 'CHARGE', '624', '70342', 'Transport of goods and public transport of personnel', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70346, 'ENG-BASE', 'EXPENSE', '624', '70342', 'Transport of goods and public transport of personnel', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70347, 'ENG-BASE', 'CHARGE', '625', '70342', 'Travel, missions and receptions', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70347, 'ENG-BASE', 'EXPENSE', '625', '70342', 'Travel, missions and receptions', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70348, 'ENG-BASE', 'CHARGE', '626', '70342', 'Postal and telecommunications costs', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70348, 'ENG-BASE', 'EXPENSE', '626', '70342', 'Postal and telecommunications costs', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70349, 'ENG-BASE', 'CHARGE', '627', '70342', 'Banking and related services', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70349, 'ENG-BASE', 'EXPENSE', '627', '70342', 'Banking and related services', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70350, 'ENG-BASE', 'CHARGE', '628', '70342', 'Various', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70350, 'ENG-BASE', 'EXPENSE', '628', '70342', 'Various', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70351, 'ENG-BASE', 'CHARGE', '629', '70342', 'Discounts, rebates and rebates obtained on other external services', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70351, 'ENG-BASE', 'EXPENSE', '629', '70342', 'Discounts, rebates and rebates obtained on other external services', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70352, 'ENG-BASE', 'CHARGE', '63', '71506', 'Taxes other and payments', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70352, 'ENG-BASE', 'EXPENSE', '63', '71506', 'Taxes other and payments', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70353, 'ENG-BASE', 'CHARGE', '631', '70352', 'Taxes and similar payments on remuneration (tax administrations)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70353, 'ENG-BASE', 'EXPENSE', '631', '70352', 'Taxes and similar payments on remuneration (tax administrations)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70354, 'ENG-BASE', 'CHARGE', '633', '70352', 'Taxes and similar payments on remuneration (other bodies)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70354, 'ENG-BASE', 'EXPENSE', '633', '70352', 'Taxes and similar payments on remuneration (other bodies)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70355, 'ENG-BASE', 'CHARGE', '635', '70352', 'Other taxes, duties and similar payments (tax administrations)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70355, 'ENG-BASE', 'EXPENSE', '635', '70352', 'Other taxes, duties and similar payments (tax administrations)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70356, 'ENG-BASE', 'CHARGE', '637', '70352', 'Other taxes, duties and similar payments (other bodies)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70356, 'ENG-BASE', 'EXPENSE', '637', '70352', 'Other taxes, duties and similar payments (other bodies)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70357, 'ENG-BASE', 'CHARGE', '64', '71506', 'Staff costs', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70357, 'ENG-BASE', 'EXPENSE', '64', '71506', 'Staff costs', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70358, 'ENG-BASE', 'CHARGE', '641', '70357', 'Remuneration of staff', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70358, 'ENG-BASE', 'EXPENSE', '641', '70357', 'Remuneration of staff', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70359, 'ENG-BASE', 'CHARGE', '644', '70357', 'Remuneration of the operator''s work', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70359, 'ENG-BASE', 'EXPENSE', '644', '70357', 'Remuneration of the operator''s work', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70360, 'ENG-BASE', 'CHARGE', '645', '70357', 'Social Security and Welfare Expenses', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70360, 'ENG-BASE', 'EXPENSE', '645', '70357', 'Social Security and Welfare Expenses', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70361, 'ENG-BASE', 'CHARGE', '646', '70357', 'Personal social contributions of the operator', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70361, 'ENG-BASE', 'EXPENSE', '646', '70357', 'Personal social contributions of the operator', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70362, 'ENG-BASE', 'CHARGE', '647', '70357', 'Other payroll taxes', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70362, 'ENG-BASE', 'EXPENSE', '647', '70357', 'Other payroll taxes', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70363, 'ENG-BASE', 'CHARGE', '648', '70357', 'Other staff costs', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70363, 'ENG-BASE', 'EXPENSE', '648', '70357', 'Other staff costs', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70364, 'ENG-BASE', 'CHARGE', '65', '71506', 'Other current operating expenses', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70364, 'ENG-BASE', 'EXPENSE', '65', '71506', 'Other current operating expenses', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70365, 'ENG-BASE', 'CHARGE', '651', '70364', 'Royalties for concessions, patents, licenses, trademarks, processes, software, rights and similar values', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70365, 'ENG-BASE', 'EXPENSE', '651', '70364', 'Royalties for concessions, patents, licenses, trademarks, processes, software, rights and similar values', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70366, 'ENG-BASE', 'CHARGE', '653', '70364', 'Attendance fees', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70366, 'ENG-BASE', 'EXPENSE', '653', '70364', 'Attendance fees', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70367, 'ENG-BASE', 'CHARGE', '654', '70364', 'Loss on bad debts', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70367, 'ENG-BASE', 'EXPENSE', '654', '70364', 'Loss on bad debts', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70368, 'ENG-BASE', 'CHARGE', '655', '70364', 'Share of profit or loss on transactions made jointly', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70368, 'ENG-BASE', 'EXPENSE', '655', '70364', 'Share of profit or loss on transactions made jointly', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70369, 'ENG-BASE', 'CHARGE', '658', '70364', 'Miscellaneous operating expenses', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70369, 'ENG-BASE', 'EXPENSE', '658', '70364', 'Miscellaneous operating expenses', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70370, 'ENG-BASE', 'CHARGE', '66', '71506', 'Financial expenses', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70370, 'ENG-BASE', 'EXPENSE', '66', '71506', 'Financial expenses', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70371, 'ENG-BASE', 'CHARGE', '661', '70370', 'Interest charges', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70371, 'ENG-BASE', 'EXPENSE', '661', '70370', 'Interest charges', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70372, 'ENG-BASE', 'CHARGE', '664', '70370', 'Loss on receivables related to investments', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70372, 'ENG-BASE', 'EXPENSE', '664', '70370', 'Loss on receivables related to investments', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70373, 'ENG-BASE', 'CHARGE', '665', '70370', 'Discounts granted', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70373, 'ENG-BASE', 'EXPENSE', '665', '70370', 'Discounts granted', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70374, 'ENG-BASE', 'CHARGE', '666', '70370', 'Exchange losses', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70374, 'ENG-BASE', 'EXPENSE', '666', '70370', 'Exchange losses', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70375, 'ENG-BASE', 'CHARGE', '667', '70370', 'Net expense on disposals of marketable securities', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70375, 'ENG-BASE', 'EXPENSE', '667', '70370', 'Net expense on disposals of marketable securities', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70376, 'ENG-BASE', 'CHARGE', '668', '70370', 'Other financial expenses', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70376, 'ENG-BASE', 'EXPENSE', '668', '70370', 'Other financial expenses', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70377, 'ENG-BASE', 'CHARGE', '67', '71506', 'Extraordinary charges', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70377, 'ENG-BASE', 'EXPENSE', '67', '71506', 'Extraordinary charges', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70378, 'ENG-BASE', 'CHARGE', '671', '70377', 'Exceptional charges on management operations', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70378, 'ENG-BASE', 'EXPENSE', '671', '70377', 'Exceptional charges on management operations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70379, 'ENG-BASE', 'CHARGE', '672', '70377', 'Account available to entities to record, in the course of the financial year, expenses over previous financial years', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70379, 'ENG-BASE', 'EXPENSE', '672', '70377', 'Account available to entities to record, in the course of the financial year, expenses over previous financial years', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70380, 'ENG-BASE', 'CHARGE', '675', '70377', 'Book value of assets sold', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70380, 'ENG-BASE', 'EXPENSE', '675', '70377', 'Book value of assets sold', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70381, 'ENG-BASE', 'CHARGE', '678', '70377', 'Other extraordinary expenses', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70381, 'ENG-BASE', 'EXPENSE', '678', '70377', 'Other extraordinary expenses', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70382, 'ENG-BASE', 'CHARGE', '68', '71506', 'Depreciation, amortization and provisions', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70382, 'ENG-BASE', 'EXPENSE', '68', '71506', 'Depreciation, amortization and provisions', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70383, 'ENG-BASE', 'CHARGE', '681', '70382', 'Depreciation, amortization and provisions - Operating expenses', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70383, 'ENG-BASE', 'EXPENSE', '681', '70382', 'Depreciation, amortization and provisions - Operating expenses', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70384, 'ENG-BASE', 'CHARGE', '686', '70382', 'Depreciation, amortization and provisions - Financial expense', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70384, 'ENG-BASE', 'EXPENSE', '686', '70382', 'Depreciation, amortization and provisions - Financial expense', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70385, 'ENG-BASE', 'CHARGE', '687', '70382', 'Depreciation, amortization and provisions - Extraordinary expenses', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70385, 'ENG-BASE', 'EXPENSE', '687', '70382', 'Depreciation, amortization and provisions - Extraordinary expenses', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70386, 'ENG-BASE', 'CHARGE', '69', '71506', 'Employee participation - income tax and assimilated', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70386, 'ENG-BASE', 'EXPENSE', '69', '71506', 'Employee participation - income tax and assimilated', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70387, 'ENG-BASE', 'CHARGE', '691', '70386', 'Employee participation in results', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70387, 'ENG-BASE', 'EXPENSE', '691', '70386', 'Employee participation in results', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70388, 'ENG-BASE', 'CHARGE', '695', '70386', 'Income taxes', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70388, 'ENG-BASE', 'EXPENSE', '695', '70386', 'Income taxes', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70389, 'ENG-BASE', 'CHARGE', '696', '70386', 'Corporate income tax related to distributions', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70389, 'ENG-BASE', 'EXPENSE', '696', '70386', 'Corporate income tax related to distributions', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70390, 'ENG-BASE', 'CHARGE', '697', '70386', 'Annual corporation tax', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70390, 'ENG-BASE', 'EXPENSE', '697', '70386', 'Annual corporation tax', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70391, 'ENG-BASE', 'CHARGE', '698', '70386', 'Tax integration', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70391, 'ENG-BASE', 'EXPENSE', '698', '70386', 'Tax integration', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70392, 'ENG-BASE', 'CHARGE', '699', '70386', 'Products - Reports back deficits', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70392, 'ENG-BASE', 'EXPENSE', '699', '70386', 'Products - Reports back deficits', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70393, 'ENG-BASE', 'PROD', '70', '71507', 'Sales of manufactured goods, services, goods', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70393, 'ENG-BASE', 'INCOME', '70', '71507', 'Sales of manufactured goods, services, goods', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70394, 'ENG-BASE', 'PROD', '701', '70393', 'Sales of finished products', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70394, 'ENG-BASE', 'INCOME', '701', '70393', 'Sales of finished products', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70395, 'ENG-BASE', 'PROD', '702', '70393', 'Sales of intermediate products', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70395, 'ENG-BASE', 'INCOME', '702', '70393', 'Sales of intermediate products', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70396, 'ENG-BASE', 'PROD', '703', '70393', 'Sales of residual products', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70396, 'ENG-BASE', 'INCOME', '703', '70393', 'Sales of residual products', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70397, 'ENG-BASE', 'PROD', '704', '70393', 'Works', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70397, 'ENG-BASE', 'INCOME', '704', '70393', 'Works', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70398, 'ENG-BASE', 'PROD', '705', '70393', 'Studies', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70398, 'ENG-BASE', 'INCOME', '705', '70393', 'Studies', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70399, 'ENG-BASE', 'PROD', '706', '70393', 'Services', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70399, 'ENG-BASE', 'INCOME', '706', '70393', 'Services', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70400, 'ENG-BASE', 'PROD', '707', '70393', 'Sale of goods', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70400, 'ENG-BASE', 'INCOME', '707', '70393', 'Sale of goods', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70401, 'ENG-BASE', 'PROD', '708', '70393', 'Income from ancillary activities', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70401, 'ENG-BASE', 'INCOME', '708', '70393', 'Income from ancillary activities', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70402, 'ENG-BASE', 'PROD', '709', '70393', 'Discounts, rebates and rebates granted by the company', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70402, 'ENG-BASE', 'INCOME', '709', '70393', 'Discounts, rebates and rebates granted by the company', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70403, 'ENG-BASE', 'PROD', '71', '71507', 'Stored production (or destocking)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70403, 'ENG-BASE', 'INCOME', '71', '71507', 'Stored production (or destocking)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70404, 'ENG-BASE', 'PROD', '713', '70403', 'Change in stocks (in-process production, products)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70404, 'ENG-BASE', 'INCOME', '713', '70403', 'Change in stocks (in-process production, products)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70405, 'ENG-BASE', 'PROD', '72', '71507', 'Immobilised production', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70405, 'ENG-BASE', 'INCOME', '72', '71507', 'Immobilised production', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70406, 'ENG-BASE', 'PROD', '721', '70405', 'Intangible assets', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70406, 'ENG-BASE', 'INCOME', '721', '70405', 'Intangible assets', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70407, 'ENG-BASE', 'PROD', '722', '70405', 'Property, plant and equipment', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70407, 'ENG-BASE', 'INCOME', '722', '70405', 'Property, plant and equipment', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70408, 'ENG-BASE', 'PROD', '74', '71507', 'Operating grants', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70408, 'ENG-BASE', 'INCOME', '74', '71507', 'Operating grants', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70409, 'ENG-BASE', 'PROD', '75', '71507', 'Other management products', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70409, 'ENG-BASE', 'INCOME', '75', '71507', 'Other management products', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70410, 'ENG-BASE', 'PROD', '751', '70409', 'Royalties for concessions, patents, licenses, trademarks, processes, software, rights and similar values', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70410, 'ENG-BASE', 'INCOME', '751', '70409', 'Royalties for concessions, patents, licenses, trademarks, processes, software, rights and similar values', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70411, 'ENG-BASE', 'PROD', '752', '70409', 'Income from buildings not used for professional purposes', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70411, 'ENG-BASE', 'INCOME', '752', '70409', 'Income from buildings not used for professional purposes', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70412, 'ENG-BASE', 'PROD', '753', '70409', 'Directors'' fees and remuneration of directors, managers, ...', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70412, 'ENG-BASE', 'INCOME', '753', '70409', 'Directors'' fees and remuneration of directors, managers, ...', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70413, 'ENG-BASE', 'PROD', '754', '70409', 'Perceived refunds of cooperatives (from surplus)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70413, 'ENG-BASE', 'INCOME', '754', '70409', 'Perceived refunds of cooperatives (from surplus)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70414, 'ENG-BASE', 'PROD', '755', '70409', 'Share of profits on transactions made jointly', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70414, 'ENG-BASE', 'INCOME', '755', '70409', 'Share of profits on transactions made jointly', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70415, 'ENG-BASE', 'PROD', '758', '70409', 'Miscellaneous current management products', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70415, 'ENG-BASE', 'INCOME', '758', '70409', 'Miscellaneous current management products', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70416, 'ENG-BASE', 'PROD', '76', '71507', 'Financial products', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70416, 'ENG-BASE', 'INCOME', '76', '71507', 'Financial products', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70417, 'ENG-BASE', 'PROD', '761', '70416', 'Income from participations', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70417, 'ENG-BASE', 'INCOME', '761', '70416', 'Income from participations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70418, 'ENG-BASE', 'PROD', '762', '70416', 'Income from other financial assets', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70418, 'ENG-BASE', 'INCOME', '762', '70416', 'Income from other financial assets', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70419, 'ENG-BASE', 'PROD', '763', '70416', 'Revenue from other receivables', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70419, 'ENG-BASE', 'INCOME', '763', '70416', 'Revenue from other receivables', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70420, 'ENG-BASE', 'PROD', '764', '70416', 'Income from marketable securities', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70420, 'ENG-BASE', 'INCOME', '764', '70416', 'Income from marketable securities', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70421, 'ENG-BASE', 'PROD', '765', '70416', 'Discounts obtained', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70421, 'ENG-BASE', 'INCOME', '765', '70416', 'Discounts obtained', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70422, 'ENG-BASE', 'PROD', '766', '70416', 'Exchange gains', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70422, 'ENG-BASE', 'INCOME', '766', '70416', 'Exchange gains', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70423, 'ENG-BASE', 'PROD', '767', '70416', 'Net proceeds on disposals of marketable securities', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70423, 'ENG-BASE', 'INCOME', '767', '70416', 'Net proceeds on disposals of marketable securities', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70424, 'ENG-BASE', 'PROD', '768', '70416', 'Other financial income', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70424, 'ENG-BASE', 'INCOME', '768', '70416', 'Other financial income', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70425, 'ENG-BASE', 'PROD', '77', '71507', 'Exceptional products', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70425, 'ENG-BASE', 'INCOME', '77', '71507', 'Exceptional products', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70426, 'ENG-BASE', 'PROD', '771', '70425', 'Extraordinary income from management operations', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70426, 'ENG-BASE', 'INCOME', '771', '70425', 'Extraordinary income from management operations', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70427, 'ENG-BASE', 'PROD', '772', '70425', 'Account available to entities to record, during the financial year, the revenues over previous financial years', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70427, 'ENG-BASE', 'INCOME', '772', '70425', 'Account available to entities to record, during the financial year, the revenues over previous financial years', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70428, 'ENG-BASE', 'PROD', '775', '70425', 'Proceeds from disposals of assets', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70428, 'ENG-BASE', 'INCOME', '775', '70425', 'Proceeds from disposals of assets', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70429, 'ENG-BASE', 'PROD', '777', '70425', 'Share of investment grants transferred to profit or loss for the year', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70429, 'ENG-BASE', 'INCOME', '777', '70425', 'Share of investment grants transferred to profit or loss for the year', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70430, 'ENG-BASE', 'PROD', '778', '70425', 'Other extraordinary income', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70430, 'ENG-BASE', 'INCOME', '778', '70425', 'Other extraordinary income', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70431, 'ENG-BASE', 'PROD', '78', '71507', 'Reversals of depreciation and provisions', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70431, 'ENG-BASE', 'INCOME', '78', '71507', 'Reversals of depreciation and provisions', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70432, 'ENG-BASE', 'PROD', '781', '70431', 'Reversals of depreciation and provisions (to be included in revenue)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70432, 'ENG-BASE', 'INCOME', '781', '70431', 'Reversals of depreciation and provisions (to be included in revenue)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70433, 'ENG-BASE', 'PROD', '786', '70431', 'Reversals of provisions for risks (to be recorded in financial income)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70433, 'ENG-BASE', 'INCOME', '786', '70431', 'Reversals of provisions for risks (to be recorded in financial income)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70434, 'ENG-BASE', 'PROD', '787', '70431', 'Reversals of provisions (to be recorded in exceptional income)', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70434, 'ENG-BASE', 'INCOME', '787', '70431', 'Reversals of provisions (to be recorded in exceptional income)', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70435, 'ENG-BASE', 'PROD', '79', '71507', 'Transfers of charges', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70435, 'ENG-BASE', 'INCOME', '79', '71507', 'Transfers of charges', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70436, 'ENG-BASE', 'PROD', '791', '70435', 'Transfers of operating expenses', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70436, 'ENG-BASE', 'INCOME', '791', '70435', 'Transfers of operating expenses', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70437, 'ENG-BASE', 'PROD', '796', '70435', 'Transfers of financial expenses', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70437, 'ENG-BASE', 'INCOME', '796', '70435', 'Transfers of financial expenses', 1);
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70438, 'ENG-BASE', 'PROD', '797', '70435', 'Transfers of Exceptional Charges', 1); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 70438, 'ENG-BASE', 'INCOME', '797', '70435', 'Transfers of Exceptional Charges', 1);

View File

@ -365,7 +365,52 @@ ALTER TABLE llx_bank_account ADD COLUMN pti_in_ctti smallint DEFAULT 0 AFTER dom
-- Set default ticket type to OTHER if no default exists -- Set default ticket type to OTHER if no default exists
UPDATE llx_c_ticket_type SET use_default=1 WHERE code='OTHER' AND NOT EXISTS(SELECT * FROM (SELECT * FROM llx_c_ticket_type) AS t WHERE use_default=1); UPDATE llx_c_ticket_type SET use_default=1 WHERE code='OTHER' AND NOT EXISTS(SELECT * FROM (SELECT * FROM llx_c_ticket_type) AS t WHERE use_default=1);
-- Assets - New module -- Assets - New module
CREATE TABLE llx_asset(
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
ref varchar(128) NOT NULL,
entity integer DEFAULT 1 NOT NULL,
label varchar(255),
fk_asset_model integer,
reversal_amount_ht double(24,8),
acquisition_value_ht double(24,8) DEFAULT NULL,
recovered_vat double(24,8),
reversal_date date,
date_acquisition date NOT NULL,
date_start date NOT NULL,
qty real DEFAULT 1 NOT NULL,
acquisition_type smallint DEFAULT 0 NOT NULL,
asset_type smallint DEFAULT 0 NOT NULL,
not_depreciated integer DEFAULT 0,
disposal_date date,
disposal_amount_ht double(24,8),
fk_disposal_type integer,
disposal_depreciated integer DEFAULT 0,
disposal_subject_to_vat integer DEFAULT 0,
note_public text,
note_private text,
date_creation datetime NOT NULL,
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
fk_user_creat integer NOT NULL,
fk_user_modif integer,
last_main_doc varchar(255),
import_key varchar(14),
model_pdf varchar(255),
status integer NOT NULL
) ENGINE=innodb;
ALTER TABLE llx_asset DROP FOREIGN KEY fk_asset_asset_type; ALTER TABLE llx_asset DROP FOREIGN KEY fk_asset_asset_type;
ALTER TABLE llx_asset DROP INDEX idx_asset_fk_asset_type; ALTER TABLE llx_asset DROP INDEX idx_asset_fk_asset_type;

View File

@ -22,8 +22,9 @@
CREATE TABLE llx_establishment ( CREATE TABLE llx_establishment (
rowid integer NOT NULL auto_increment PRIMARY KEY, rowid integer NOT NULL auto_increment PRIMARY KEY,
entity integer NOT NULL DEFAULT 1, entity integer NOT NULL DEFAULT 1,
label varchar(255) NOT NULL, label varchar(255),
ref varchar(30), ref varchar(30),
label varchar(255) NOT NULL,
name varchar(128), name varchar(128),
address varchar(255), address varchar(255),
zip varchar(25), zip varchar(25),

View File

@ -26,7 +26,7 @@ dol_include_once('/knowledgemanagement/core/modules/knowledgemanagement/modules_
/** /**
* Class to manage customer order numbering rules standard * Class to manage the knowledgerecord numbering rules standard
*/ */
class mod_knowledgerecord_standard extends ModeleNumRefKnowledgeRecord class mod_knowledgerecord_standard extends ModeleNumRefKnowledgeRecord
{ {

View File

@ -118,7 +118,7 @@ if (empty($reshook)) {
$triggermodname = 'KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_MODIFY'; // Name of trigger action code to execute when we modify record $triggermodname = 'KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_MODIFY'; // Name of trigger action code to execute when we modify record
// Upadate / add for lang // Update / add for lang
if (($action == 'update' || $action == 'add') && !empty($permissiontoadd)) { if (($action == 'update' || $action == 'add') && !empty($permissiontoadd)) {
$object->lang = (GETPOSTISSET('langkm') ? GETPOST('langkm', 'aZ09') : $object->lang); $object->lang = (GETPOSTISSET('langkm') ? GETPOST('langkm', 'aZ09') : $object->lang);
} }

View File

@ -1,2 +0,0 @@
# Dolibarr language file - Source file is en_US - projects
ServiceToUseOnLines=Service to use on lines by default

View File

@ -21,8 +21,6 @@ SessionSaveHandler=Sessionmanager
YourSession=Ihre Anmeldung YourSession=Ihre Anmeldung
Sessions=Benutzeranmeldungen Sessions=Benutzeranmeldungen
DolibarrSetup=Dolibarr installieren oder aktualisieren DolibarrSetup=Dolibarr installieren oder aktualisieren
InternalUser=interner Nutzer
ExternalUser=externer Nutzer
InternalUsers=interne Nutzer InternalUsers=interne Nutzer
ExternalUsers=externe Nutzer ExternalUsers=externe Nutzer
UploadNewTemplate=Neue Vorlage(n) hochladen UploadNewTemplate=Neue Vorlage(n) hochladen

View File

@ -39,7 +39,6 @@ CountriesNotInEEC=Nicht EWR - Staaten
CountriesInEECExceptMe=Länder im EWR ausser %s CountriesInEECExceptMe=Länder im EWR ausser %s
CountriesExceptMe=Alle Staaten, ausser %s CountriesExceptMe=Alle Staaten, ausser %s
AccountantFiles=Geschäftsvorgänge exportieren AccountantFiles=Geschäftsvorgänge exportieren
ExportAccountingSourceDocHelp=With this tool, you can search and export the source events that are used to generate your accountancy. <br>The exported ZIP file will contain the lists of requested items in CSV, as well as their attached files in their original format (PDF, ODT, DOCX...).
ExportAccountingSourceDocHelp2=Die Journale exportierst du im Menu %s - %s. ExportAccountingSourceDocHelp2=Die Journale exportierst du im Menu %s - %s.
VueByAccountAccounting=Anzeigen nach Buchhaltungskonto VueByAccountAccounting=Anzeigen nach Buchhaltungskonto
VueBySubAccountAccounting=Anzeigen nach Nebenbuchkonto VueBySubAccountAccounting=Anzeigen nach Nebenbuchkonto
@ -232,7 +231,6 @@ AccountingAccountForSalesTaxAreDefinedInto=Obacht: Das Buchhaltungskonto für d
NumberOfAccountancyEntries=Anzahl Einträge NumberOfAccountancyEntries=Anzahl Einträge
NumberOfAccountancyMovements=Anzahl Bewegungen NumberOfAccountancyMovements=Anzahl Bewegungen
ACCOUNTING_DISABLE_BINDING_ON_SALES=Bindung & Übertragung in der Verkaufsbuchhaltung deaktivieren (Kundenrechnungen werden in der Buchhaltung nicht berücksichtigt) ACCOUNTING_DISABLE_BINDING_ON_SALES=Bindung & Übertragung in der Verkaufsbuchhaltung deaktivieren (Kundenrechnungen werden in der Buchhaltung nicht berücksichtigt)
NotifiedValidationDate=Validate and Lock the exported entries <span class="warning">(same effect than the "%s" feature, modification and deletion of the lines will DEFINITELY not be possible)</span>
ConfirmExportFile=Bestätigen der Generierung der Buchhaltungsexportdatei ? ConfirmExportFile=Bestätigen der Generierung der Buchhaltungsexportdatei ?
ExportDraftJournal=Exportiere Entwurfsjournal ExportDraftJournal=Exportiere Entwurfsjournal
Modelcsv=Exportformat Modelcsv=Exportformat

View File

@ -256,7 +256,6 @@ SetAsDefault=Als Standard definieren
InstalledInto=Installiert im Verzeichnis %s InstalledInto=Installiert im Verzeichnis %s
BarcodeInitForThirdparties=Barcode Init. für alle Partner BarcodeInitForThirdparties=Barcode Init. für alle Partner
BarcodeInitForProductsOrServices=Alle Strichcodes für Produkte oder Services initialisieren oder zurücksetzen BarcodeInitForProductsOrServices=Alle Strichcodes für Produkte oder Services initialisieren oder zurücksetzen
InitEmptyBarCode=Init value for the %s empty barcodes
EraseAllCurrentBarCode=Alle aktuellen Barcode-Werte löschen EraseAllCurrentBarCode=Alle aktuellen Barcode-Werte löschen
ConfirmEraseAllCurrentBarCode=Wirklich alle aktuellen Barcode-Werte löschen? ConfirmEraseAllCurrentBarCode=Wirklich alle aktuellen Barcode-Werte löschen?
AllBarcodeReset=Alle Barcode-Werte wurden entfernt AllBarcodeReset=Alle Barcode-Werte wurden entfernt
@ -396,7 +395,6 @@ Permission215=Lieferanten einrichten
Permission255=Andere Passwörter ändern Permission255=Andere Passwörter ändern
Permission272=Rechnungen anzeigen Permission272=Rechnungen anzeigen
Permission273=Ausgabe Rechnungen Permission273=Ausgabe Rechnungen
Permission300=Barcodes auslesen
Permission301=Barcodes erzeugen und ändern. Permission301=Barcodes erzeugen und ändern.
Permission331=Lesezeichen einsehen Permission331=Lesezeichen einsehen
Permission430=PHP Debug Bar verwenden Permission430=PHP Debug Bar verwenden

View File

@ -35,8 +35,5 @@ Stats=Verkaufsstatistik
StatusProsp=Interessenten Status StatusProsp=Interessenten Status
NoLimit=Kein Limit NoLimit=Kein Limit
ToOfferALinkForOnlineSignature=Link zur Digitalen Unterschrift ToOfferALinkForOnlineSignature=Link zur Digitalen Unterschrift
WelcomeOnOnlineSignaturePage=Willkommen auf der Seite zum Offerten von %s zu aktzeptieren.
ThisScreenAllowsYouToSignDocFrom=Hier kannst du die Offerte akzeptieren, unterzeichen oder zurückweisen.
ThisIsInformationOnDocumentToSign=Hier die Informationen zum Dokument, das zu akzeptieren oder zurückzuweisen ist.
SignatureProposalRef=Unterschrift zur Offerte %s SignatureProposalRef=Unterschrift zur Offerte %s
FeatureOnlineSignDisabled=Hoppla, online unterschreiben ist entweder deaktiviert - oder die Offerte wurde erstellt, bevor online unterschreiben aktiviert worden war. FeatureOnlineSignDisabled=Hoppla, online unterschreiben ist entweder deaktiviert - oder die Offerte wurde erstellt, bevor online unterschreiben aktiviert worden war.

View File

@ -1,3 +0,0 @@
# Dolibarr language file - Source file is en_US - members
ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.<br><br>
CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type

View File

@ -1,2 +0,0 @@
# Dolibarr language file - Source file is en_US - projects
ServiceToUseOnLines=Service to use on lines by default

View File

@ -1,3 +0,0 @@
# Dolibarr language file - Source file is en_US - members
ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.<br><br>
CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type

View File

@ -1,2 +0,0 @@
# Dolibarr language file - Source file is en_US - projects
ServiceToUseOnLines=Service to use on lines by default

View File

@ -1,3 +0,0 @@
# Dolibarr language file - Source file is en_US - members
ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.<br><br>
CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type

View File

@ -1,2 +0,0 @@
# Dolibarr language file - Source file is en_US - projects
ServiceToUseOnLines=Service to use on lines by default

View File

@ -1,3 +0,0 @@
# Dolibarr language file - Source file is en_US - members
ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded. Please find your invoice here enclosed.<br><br>
CanEditAmount=Visitor can choose/edit amount of its contribution regardless of the member type

Some files were not shown because too many files have changed in this diff Show More