diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php
index 26ea76d2277..24c605bd930 100644
--- a/htdocs/accountancy/admin/index.php
+++ b/htdocs/accountancy/admin/index.php
@@ -174,6 +174,42 @@ if ($action == 'setenablesubsidiarylist') {
}
}
+if ($action == 'setdisablebindingonsales') {
+ $setdisablebindingonsales = GETPOST('value', 'int');
+ $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_SALES", $setdisablebindingonsales, 'yesno', 0, '', $conf->entity);
+ if (!$res > 0)
+ $error++;
+ if (!$error) {
+ setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
+ } else {
+ setEventMessages($langs->trans("Error"), null, 'mesgs');
+ }
+}
+
+if ($action == 'setdisablebindingonpurchases') {
+ $setdisablebindingonpurchases = GETPOST('value', 'int');
+ $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_PURCHASES", $setdisablebindingonpurchases, 'yesno', 0, '', $conf->entity);
+ if (!$res > 0)
+ $error++;
+ if (!$error) {
+ setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
+ } else {
+ setEventMessages($langs->trans("Error"), null, 'mesgs');
+ }
+}
+
+if ($action == 'setdisablebindingonexpensereports') {
+ $setdisablebindingonexpensereports = GETPOST('value', 'int');
+ $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS", $setdisablebindingonexpensereports, 'yesno', 0, '', $conf->entity);
+ if (!$res > 0)
+ $error++;
+ if (!$error) {
+ setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
+ } else {
+ setEventMessages($langs->trans("Error"), null, 'mesgs');
+ }
+}
+
/*
* View
*/
@@ -226,82 +262,78 @@ print '
';
print ''.$langs->trans('Options').' ';
print " \n";
-if (!empty($user->admin))
+// TO DO Mutualize code for yes/no constants
+
+/* Set this option as a hidden option but keep it for some needs.
+print '';
+print ''.$langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL").' ';
+if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
+}
+print ' ';
+*/
+
+print '';
+print ''.$langs->trans("BANK_DISABLE_DIRECT_INPUT").' ';
+if (!empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
+}
+print ' ';
+
+print '';
+print ''.$langs->trans("ACCOUNTANCY_COMBO_FOR_AUX").' ';
+if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
+}
+print ' ';
+
+print '';
+print ''.$langs->trans("ACCOUNTING_MANAGE_ZERO").' ';
+if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
+}
+print ' ';
+
+// Param a user $user->rights->accounting->chartofaccount can access
+foreach ($list as $key)
{
- // TO DO Mutualize code for yes/no constants
+ print '';
- /* Set this option as a hidden option but keep it for some needs.
- print ' ';
- print ''.$langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL").' ';
- if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) {
- print '';
- print img_picto($langs->trans("Activated"), 'switch_on');
- print ' ';
- } else {
- print '';
- print img_picto($langs->trans("Disabled"), 'switch_off');
- print ' ';
- }
+ if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO) && ($key == 'ACCOUNTING_LENGTH_GACCOUNT' || $key == 'ACCOUNTING_LENGTH_AACCOUNT')) continue;
+
+ // Param
+ $label = $langs->trans($key);
+ print ''.$label.' ';
+ // Value
+ print '';
+ print ' ';
+
+ print ' ';
print ' ';
- */
-
- print '';
- print ''.$langs->trans("BANK_DISABLE_DIRECT_INPUT").' ';
- if (!empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
- print '';
- print img_picto($langs->trans("Activated"), 'switch_on');
- print ' ';
- } else {
- print '';
- print img_picto($langs->trans("Disabled"), 'switch_off');
- print ' ';
- }
- print ' ';
-
- print '';
- print ''.$langs->trans("ACCOUNTANCY_COMBO_FOR_AUX").' ';
- if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
- print '';
- print img_picto($langs->trans("Activated"), 'switch_on');
- print ' ';
- } else {
- print '';
- print img_picto($langs->trans("Disabled"), 'switch_off');
- print ' ';
- }
- print ' ';
-
- print '';
- print ''.$langs->trans("ACCOUNTING_MANAGE_ZERO").' ';
- if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
- print '';
- print img_picto($langs->trans("Activated"), 'switch_on');
- print ' ';
- } else {
- print '';
- print img_picto($langs->trans("Disabled"), 'switch_off');
- print ' ';
- }
- print ' ';
-
- // Param a user $user->rights->accounting->chartofaccount can access
- foreach ($list as $key)
- {
- print '';
-
- if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO) && ($key == 'ACCOUNTING_LENGTH_GACCOUNT' || $key == 'ACCOUNTING_LENGTH_AACCOUNT')) continue;
-
- // Param
- $label = $langs->trans($key);
- print ''.$label.' ';
- // Value
- print '';
- print ' ';
-
- print ' ';
-
- print ' ';
- }
}
print '';
print ' ';
@@ -312,57 +344,91 @@ print '';
print ''.$langs->trans('BindingOptions').' ';
print " \n";
-if (!empty($user->admin))
-{
- // TO DO Mutualize code for yes/no constants
- print '';
- print ''.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO").' ';
- if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
- print '';
- print img_picto($langs->trans("Activated"), 'switch_on');
- print ' ';
- } else {
- print '';
- print img_picto($langs->trans("Disabled"), 'switch_off');
- print ' ';
- }
- print ' ';
-
- print '';
- print ''.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE").' ';
- if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
- print '';
- print img_picto($langs->trans("Activated"), 'switch_on');
- print ' ';
- } else {
- print '';
- print img_picto($langs->trans("Disabled"), 'switch_off');
- print ' ';
- }
- print ' ';
+// TO DO Mutualize code for yes/no constants
+print '';
+print ''.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO").' ';
+if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
}
+print ' ';
+
+print '';
+print ''.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE").' ';
+if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
+}
+print ' ';
// Param a user $user->rights->accounting->chartofaccount can access
foreach ($list_binding as $key)
{
- print '';
+ print ' ';
- // Param
- $label = $langs->trans($key);
- print ''.$label.' ';
- // Value
- print '';
- if ($key == 'ACCOUNTING_DATE_START_BINDING') {
+ // Param
+ $label = $langs->trans($key);
+ print ' '.$label.' ';
+ // Value
+ print '';
+ if ($key == 'ACCOUNTING_DATE_START_BINDING') {
print $form->selectDate(($conf->global->$key ? $db->idate($conf->global->$key) : -1), $key, 0, 0, 1);
} else {
print ' ';
}
- print ' ';
-
- print ' ';
+ print '';
+ print '';
}
+print '';
+print ''.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_SALES").' ';
+if (!empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
+}
+print ' ';
+
+print '';
+print ''.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_PURCHASES").' ';
+if (!empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
+}
+print ' ';
+
+print '';
+print ''.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS").' ';
+if (!empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)) {
+ print '';
+ print img_picto($langs->trans("Activated"), 'switch_on');
+ print ' ';
+} else {
+ print '';
+ print img_picto($langs->trans("Disabled"), 'switch_off');
+ print ' ';
+}
+print ' ';
print '';
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 77aa0e0a1ea..20f705a8ed9 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -818,6 +818,11 @@ class Facture extends CommonInvoice
$origintype = $this->element;
}
+ // init ref_ext
+ if (empty($line->ref_ext)) {
+ $line->ref_ext = '';
+ }
+
$result = $this->addline(
$line->desc,
$line->subprice,
@@ -847,7 +852,8 @@ class Facture extends CommonInvoice
$line->situation_percent,
$line->fk_prev_id,
$line->fk_unit,
- $line->pu_ht_devise
+ $line->pu_ht_devise,
+ $line->ref_ext
);
if ($result < 0)
{
@@ -1073,6 +1079,7 @@ class Facture extends CommonInvoice
$facture->lines[$i]->total_localtax1 = -$facture->lines[$i]->total_localtax1;
$facture->lines[$i]->total_localtax2 = -$facture->lines[$i]->total_localtax2;
$facture->lines[$i]->total_ttc = -$facture->lines[$i]->total_ttc;
+ $facture->lines[$i]->ref_ext = '';
}
}
@@ -1190,6 +1197,8 @@ class Facture extends CommonInvoice
$object->lines[$i]->date_end = $newLast;
}
}
+
+ $object->lines[$i]->ref_ext = ''; // Do not clone ref_ext
}
// Create clone
@@ -1658,7 +1667,7 @@ class Facture extends CommonInvoice
$this->lines = array();
$sql = 'SELECT l.rowid, l.fk_facture, l.fk_product, l.fk_parent_line, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.vat_src_code, l.tva_tx,';
- $sql .= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise_percent, l.fk_remise_except, l.subprice,';
+ $sql .= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise_percent, l.fk_remise_except, l.subprice, l.ref_ext,';
$sql .= ' l.situation_percent, l.fk_prev_id,';
$sql .= ' l.rang, l.special_code,';
$sql .= ' l.date_start as date_start, l.date_end as date_end,';
@@ -1697,6 +1706,7 @@ class Facture extends CommonInvoice
$line->fk_product_type = $objp->fk_product_type; // Type of product
$line->qty = $objp->qty;
$line->subprice = $objp->subprice;
+ $line->ref_ext = $objp->ref_ext; // line external ref
$line->vat_src_code = $objp->vat_src_code;
$line->tva_tx = $objp->tva_tx;
@@ -1819,6 +1829,7 @@ class Facture extends CommonInvoice
// Clean parameters
if (empty($this->type)) $this->type = self::TYPE_STANDARD;
if (isset($this->ref)) $this->ref = trim($this->ref);
+ if (isset($this->ref_ext)) $this->ref_ext = trim($this->ref_ext);
if (isset($this->ref_client)) $this->ref_client = trim($this->ref_client);
if (isset($this->increment)) $this->increment = trim($this->increment);
if (isset($this->close_code)) $this->close_code = trim($this->close_code);
@@ -1837,6 +1848,7 @@ class Facture extends CommonInvoice
// Update request
$sql = "UPDATE ".MAIN_DB_PREFIX."facture SET";
$sql .= " ref=".(isset($this->ref) ? "'".$this->db->escape($this->ref)."'" : "null").",";
+ $sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").",";
$sql .= " type=".(isset($this->type) ? $this->db->escape($this->type) : "null").",";
$sql .= " ref_client=".(isset($this->ref_client) ? "'".$this->db->escape($this->ref_client)."'" : "null").",";
$sql .= " increment=".(isset($this->increment) ? "'".$this->db->escape($this->increment)."'" : "null").",";
@@ -2930,6 +2942,7 @@ class Facture extends CommonInvoice
* @param int $fk_prev_id Previous situation line id reference
* @param string $fk_unit Code of the unit to use. Null to use the default one
* @param double $pu_ht_devise Unit price in currency
+ * @param string $ref_ext External reference of the line
* @return int <0 if KO, Id of line if OK
*/
public function addline(
@@ -2961,7 +2974,8 @@ class Facture extends CommonInvoice
$situation_percent = 100,
$fk_prev_id = 0,
$fk_unit = null,
- $pu_ht_devise = 0
+ $pu_ht_devise = 0,
+ $ref_ext = ''
) {
// Deprecation warning
if ($label) {
@@ -2989,6 +3003,7 @@ class Facture extends CommonInvoice
if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line = 0;
if (empty($fk_prev_id)) $fk_prev_id = 'null';
if (!isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '') $situation_percent = 100;
+ if (empty($ref_ext)) $ref_ext = '';
$remise_percent = price2num($remise_percent);
$qty = price2num($qty);
@@ -3082,6 +3097,7 @@ class Facture extends CommonInvoice
$this->line->fk_facture = $this->id;
$this->line->label = $label; // deprecated
$this->line->desc = $desc;
+ $this->line->ref_ext = $ref_ext;
$this->line->qty = ($this->type == self::TYPE_CREDIT_NOTE ?abs($qty) : $qty); // For credit note, quantity is always positive and unit price negative
$this->line->subprice = ($this->type == self::TYPE_CREDIT_NOTE ?-abs($pu_ht) : $pu_ht); // For credit note, unit price always negative, always positive otherwise
@@ -3189,9 +3205,10 @@ class Facture extends CommonInvoice
* @param string $fk_unit Code of the unit to use. Null to use the default one
* @param double $pu_ht_devise Unit price in currency
* @param int $notrigger disable line update trigger
+ * @param string $ref_ext External reference of the line
* @return int < 0 if KO, > 0 if OK
*/
- public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $info_bits = 0, $type = self::TYPE_STANDARD, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = 0, $situation_percent = 100, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0)
+ public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $info_bits = 0, $type = self::TYPE_STANDARD, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = 0, $situation_percent = 100, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0, $ref_ext = '')
{
global $conf, $user;
// Deprecation warning
@@ -3229,6 +3246,7 @@ class Facture extends CommonInvoice
if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line = 0;
if (empty($special_code) || $special_code == 3) $special_code = 0;
if (!isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '') $situation_percent = 100;
+ if (empty($ref_ext)) $ref_ext = '';
$remise_percent = price2num($remise_percent);
$qty = price2num($qty);
@@ -3319,6 +3337,7 @@ class Facture extends CommonInvoice
$this->line->rowid = $rowid;
$this->line->label = $label;
$this->line->desc = $desc;
+ $this->line->ref_ext = $ref_ext;
$this->line->qty = ($this->type == self::TYPE_CREDIT_NOTE ?abs($qty) : $qty); // For credit note, quantity is always positive and unit price negative
$this->line->vat_src_code = $vat_src_code;
@@ -4722,6 +4741,7 @@ class FactureLigne extends CommonInvoiceLine
public $label;
//! Description ligne
public $desc;
+ public $ref_ext; // External reference of the line
public $localtax1_type; // Local tax 1 type
public $localtax2_type; // Local tax 2 type
@@ -4792,7 +4812,7 @@ class FactureLigne extends CommonInvoiceLine
public function fetch($rowid)
{
$sql = 'SELECT fd.rowid, fd.fk_facture, fd.fk_parent_line, fd.fk_product, fd.product_type, fd.label as custom_label, fd.description, fd.price, fd.qty, fd.vat_src_code, fd.tva_tx,';
- $sql .= ' fd.localtax1_tx, fd. localtax2_tx, fd.remise, fd.remise_percent, fd.fk_remise_except, fd.subprice,';
+ $sql .= ' fd.localtax1_tx, fd. localtax2_tx, fd.remise, fd.remise_percent, fd.fk_remise_except, fd.subprice, fd.ref_ext,';
$sql .= ' fd.date_start as date_start, fd.date_end as date_end, fd.fk_product_fournisseur_price as fk_fournprice, fd.buy_price_ht as pa_ht,';
$sql .= ' fd.info_bits, fd.special_code, fd.total_ht, fd.total_tva, fd.total_ttc, fd.total_localtax1, fd.total_localtax2, fd.rang,';
$sql .= ' fd.fk_code_ventilation,';
@@ -4820,6 +4840,7 @@ class FactureLigne extends CommonInvoiceLine
$this->desc = $objp->description;
$this->qty = $objp->qty;
$this->subprice = $objp->subprice;
+ $this->ref_ext = $objp->ref_ext;
$this->vat_src_code = $objp->vat_src_code;
$this->tva_tx = $objp->tva_tx;
$this->localtax1_tx = $objp->localtax1_tx;
@@ -4902,6 +4923,7 @@ class FactureLigne extends CommonInvoiceLine
if (empty($this->remise_percent)) $this->remise_percent = 0;
if (empty($this->info_bits)) $this->info_bits = 0;
if (empty($this->subprice)) $this->subprice = 0;
+ if (empty($this->ref_ext)) $this->ref_ext = '';
if (empty($this->special_code)) $this->special_code = 0;
if (empty($this->fk_parent_line)) $this->fk_parent_line = 0;
if (empty($this->fk_prev_id)) $this->fk_prev_id = 0;
@@ -4948,7 +4970,7 @@ class FactureLigne extends CommonInvoiceLine
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facturedet';
$sql .= ' (fk_facture, fk_parent_line, label, description, qty,';
$sql .= ' vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,';
- $sql .= ' fk_product, product_type, remise_percent, subprice, fk_remise_except,';
+ $sql .= ' fk_product, product_type, remise_percent, subprice, ref_ext, fk_remise_except,';
$sql .= ' date_start, date_end, fk_code_ventilation, ';
$sql .= ' rang, special_code, fk_product_fournisseur_price, buy_price_ht,';
$sql .= ' info_bits, total_ht, total_tva, total_ttc, total_localtax1, total_localtax2,';
@@ -4971,6 +4993,7 @@ class FactureLigne extends CommonInvoiceLine
$sql .= " ".((int) $this->product_type).",";
$sql .= " ".price2num($this->remise_percent).",";
$sql .= " ".price2num($this->subprice).",";
+ $sql .= " '".$this->db->escape($this->ref_ext)."',";
$sql .= ' '.(!empty($this->fk_remise_except) ? $this->fk_remise_except : "null").',';
$sql .= " ".(!empty($this->date_start) ? "'".$this->db->idate($this->date_start)."'" : "null").",";
$sql .= " ".(!empty($this->date_end) ? "'".$this->db->idate($this->date_end)."'" : "null").",";
@@ -5097,6 +5120,7 @@ class FactureLigne extends CommonInvoiceLine
// Clean parameters
$this->desc = trim($this->desc);
+ if (empty($this->ref_ext)) $this->ref_ext = '';
if (empty($this->tva_tx)) $this->tva_tx = 0;
if (empty($this->localtax1_tx)) $this->localtax1_tx = 0;
if (empty($this->localtax2_tx)) $this->localtax2_tx = 0;
@@ -5136,6 +5160,7 @@ class FactureLigne extends CommonInvoiceLine
// Mise a jour ligne en base
$sql = "UPDATE ".MAIN_DB_PREFIX."facturedet SET";
$sql .= " description='".$this->db->escape($this->desc)."'";
+ $sql .= " ref_ext='".$this->db->escape($this->ref_ext)."'";
$sql .= ", label=".(!empty($this->label) ? "'".$this->db->escape($this->label)."'" : "null");
$sql .= ", subprice=".price2num($this->subprice)."";
$sql .= ", remise_percent=".price2num($this->remise_percent)."";
diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql
index a9f876f10cd..8d4a033efb3 100644
--- a/htdocs/core/menus/init_menu_auguria.sql
+++ b/htdocs/core/menus/init_menu_auguria.sql
@@ -273,15 +273,15 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
-- Accounting period
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->accounting->enabled && $leftmenu=="accountancy_admin" && $conf->global->MAIN_FEATURES_LEVEL > 0', __HANDLER__, 'left', 2450__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_period', 2451__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'FiscalPeriod', 1, 'admin', '', '', 2, 80, __ENTITY__);
-- Binding
- 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->accounting->enabled && $conf->facture->enabled', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 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->accounting->enabled && $conf->facture->enabled && $leftmenu=="accountancy_dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 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->accounting->enabled && $conf->facture->enabled && $leftmenu=="accountancy_dispatch_customer"', __HANDLER__, 'left', 2403__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 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->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled))', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_supplier', 2400__+MAX_llx_menu__, '/accountancy/supplier/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier', 'SuppliersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 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->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 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->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __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->accounting->enabled && $conf->expensereport->enabled', __HANDLER__, 'left', 2420__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_expensereport', 2400__+MAX_llx_menu__, '/accountancy/expensereport/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport', 'ExpenseReportsVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 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->accounting->enabled && $conf->expensereport->enabled && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2421__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 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->accounting->enabled && $conf->expensereport->enabled && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2422__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __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->accounting->enabled && $conf->facture->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 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->accounting->enabled && $conf->facture->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES) && $leftmenu=="accountancy_dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 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->accounting->enabled && $conf->facture->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES) && $leftmenu=="accountancy_dispatch_customer"', __HANDLER__, 'left', 2403__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 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->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES)', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_supplier', 2400__+MAX_llx_menu__, '/accountancy/supplier/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier', 'SuppliersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 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->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES) && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 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->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES) && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __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->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)', __HANDLER__, 'left', 2420__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_expensereport', 2400__+MAX_llx_menu__, '/accountancy/expensereport/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport', 'ExpenseReportsVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 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->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS) && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2421__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 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->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS) && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2422__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__);
-- Journals
--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->accounting->enabled', __HANDLER__, 'left', 2705__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '', 'Journalization', 1, 'main', '$user->rights->accounting->comptarapport->lire', '', 0, 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->accounting->enabled', __HANDLER__, 'left', 2707__+MAX_llx_menu__, 'accountancy', '', 2705__+MAX_llx_menu__, '/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3', 'BankJournal', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php
index f6312f41015..820cb6090e1 100644
--- a/htdocs/core/menus/standard/auguria.lib.php
+++ b/htdocs/core/menus/standard/auguria.lib.php
@@ -385,10 +385,13 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t
$nature = '';
// Must match array $sourceList defined into journals_list.php
- if ($objp->nature == 2 && ! empty($conf->facture->enabled)) $nature="sells";
- if ($objp->nature == 3 && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled))) $nature="purchases";
+ if ($objp->nature == 2 && ! empty($conf->facture->enabled) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)) $nature="sells";
+ if ($objp->nature == 3
+ && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled))
+ && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES))
+ $nature = "purchases";
if ($objp->nature == 4 && ! empty($conf->banque->enabled)) $nature="bank";
- if ($objp->nature == 5 && ! empty($conf->expensereport->enabled)) $nature="expensereports";
+ if ($objp->nature == 5 && ! empty($conf->expensereport->enabled) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)) $nature="expensereports";
if ($objp->nature == 1) $nature="various";
if ($objp->nature == 8) $nature="inventory";
if ($objp->nature == 9) $nature="hasnew";
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 90003e5b53a..f70fdf03d1b 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -1231,7 +1231,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
// Binding
// $newmenu->add("", $langs->trans("Binding"), 0, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch');
- if (!empty($conf->facture->enabled))
+ if (!empty($conf->facture->enabled) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES))
{
$newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy", $langs->trans("CustomersVentilation"), 1, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_customer');
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_customer/', $leftmenu)) {
@@ -1239,7 +1239,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("Binded"), 2, $user->rights->accounting->bind->write);
}
}
- if (!empty($conf->supplier_invoice->enabled))
+ if (!empty($conf->supplier_invoice->enabled) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES))
{
$newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy", $langs->trans("SuppliersVentilation"), 1, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_supplier');
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_supplier/', $leftmenu)) {
@@ -1247,7 +1247,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("Binded"), 2, $user->rights->accounting->bind->write);
}
}
- if (!empty($conf->expensereport->enabled))
+ if (!empty($conf->expensereport->enabled) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS))
{
$newmenu->add("/accountancy/expensereport/index.php?leftmenu=accountancy_dispatch_expensereport&mainmenu=accountancy", $langs->trans("ExpenseReportsVentilation"), 1, $user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_expensereport');
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_expensereport/', $leftmenu)) {
@@ -1283,10 +1283,13 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
$nature = '';
// Must match array $sourceList defined into journals_list.php
- if ($objp->nature == 2 && !empty($conf->facture->enabled)) $nature = "sells";
- if ($objp->nature == 3 && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled))) $nature = "purchases";
+ if ($objp->nature == 2 && !empty($conf->facture->enabled) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)) $nature = "sells";
+ if ($objp->nature == 3
+ && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled))
+ && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES))
+ $nature = "purchases";
if ($objp->nature == 4 && !empty($conf->banque->enabled)) $nature = "bank";
- if ($objp->nature == 5 && !empty($conf->expensereport->enabled)) $nature = "expensereports";
+ if ($objp->nature == 5 && !empty($conf->expensereport->enabled) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)) $nature = "expensereports";
if ($objp->nature == 1) $nature = "various";
if ($objp->nature == 8) $nature = "inventory";
if ($objp->nature == 9) $nature = "hasnew";
diff --git a/htdocs/install/mysql/data/llx_c_forme_juridique.sql b/htdocs/install/mysql/data/llx_c_forme_juridique.sql
index 628d42d4144..a51b2bbd70f 100644
--- a/htdocs/install/mysql/data/llx_c_forme_juridique.sql
+++ b/htdocs/install/mysql/data/llx_c_forme_juridique.sql
@@ -326,3 +326,14 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178,
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17804', 'Sociedad Civil', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17805', 'Sociedad Anónima', 1);
+-- Algeria (id country=13)
+insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1300','Personne physique');
+insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1301','Société à responsabilité limitée (SARL)');
+insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1302','Entreprise unipersonnelle à responsabilité limitée (EURL)');
+insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1303','Société en Nom Collectif (SNC)');
+insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1304','société par actions (SPA)');
+insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1305','Société en Commandite Simple (SCS)');
+insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1306','Société en commandite par actions (SCA)');
+insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1307','Société en participation');
+insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1308','Groupe de sociétés');
+
diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql
index afd3a762ccc..e44a1d42995 100644
--- a/htdocs/install/mysql/data/llx_c_tva.sql
+++ b/htdocs/install/mysql/data/llx_c_tva.sql
@@ -359,6 +359,10 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (23
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2322,232, '12','0','VAT 12%',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2323,232, '8','0','VAT 8%',1);
+-- ALGERIA(id country=13)
+insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 131, 13, '0','0','TVA 0%', 1);
+insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 132, 13, '9','0','TVA 9%',1);
+insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 133, 13, '19','0','TVA 19%', 1);
-- Example of code to insert a vat rate 0 for each country
diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
index 9ec6949e198..a41b6825fa3 100644
--- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
+++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql
@@ -313,3 +313,4 @@ ALTER TABLE llx_actioncomm_reminder ADD INDEX idx_actioncomm_reminder_status (st
ALTER TABLE llx_inventorydet ADD UNIQUE uk_inventorydet(fk_inventory, fk_warehouse, fk_product, batch);
ALTER TABLE llx_commandedet ADD COLUMN ref_ext varchar(255) AFTER label;
+ALTER TABLE llx_facturedet ADD COLUMN ref_ext varchar(255) AFTER multicurrency_total_ttc;
diff --git a/htdocs/install/mysql/tables/llx_facturedet.sql b/htdocs/install/mysql/tables/llx_facturedet.sql
index ff2b28d9a7f..73e64fa1c6a 100644
--- a/htdocs/install/mysql/tables/llx_facturedet.sql
+++ b/htdocs/install/mysql/tables/llx_facturedet.sql
@@ -74,12 +74,7 @@ create table llx_facturedet
multicurrency_subprice double(24,8) DEFAULT 0,
multicurrency_total_ht double(24,8) DEFAULT 0,
multicurrency_total_tva double(24,8) DEFAULT 0,
- multicurrency_total_ttc double(24,8) DEFAULT 0
+ multicurrency_total_ttc double(24,8) DEFAULT 0,
+ ref_ext varchar(255) DEFAULT NULL
)ENGINE=innodb;
---
--- List of codes for special_code
---
--- 1 : frais de port
--- 2 : ecotaxe
---
diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang
index 7b59e33b296..29a857c914b 100644
--- a/htdocs/langs/en_US/accountancy.lang
+++ b/htdocs/langs/en_US/accountancy.lang
@@ -305,6 +305,9 @@ ErrorAccountingJournalIsAlreadyUse=This journal is already use
AccountingAccountForSalesTaxAreDefinedInto=Note: Accounting account for Sales tax are defined into menu %s - %s
NumberOfAccountancyEntries=Number of entries
NumberOfAccountancyMovements=Number of movements
+ACCOUNTING_DISABLE_BINDING_ON_SALES=Disable binding & transfer in accountancy on sales (customer invoices will not be taken into account in accounting)
+ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Disable binding & transfer in accountancy on purchases (vendor invoices will not be taken into account in accounting)
+ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Disable binding & transfer in accountancy on expense reports (expense reports will not be taken into account in accounting)
## Export
ExportDraftJournal=Export draft journal