Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
This commit is contained in:
commit
bea3ced763
@ -22,6 +22,8 @@
|
||||
* \brief Page to define emailing targets
|
||||
*/
|
||||
|
||||
if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1');
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/comm/mailing/class/mailing.class.php';
|
||||
@ -404,14 +406,8 @@ if ($_POST["button_removefilter"]) {
|
||||
* View
|
||||
*/
|
||||
|
||||
$extrajs = array (
|
||||
'/includes/jquery/plugins/multiselect/js/ui.multiselect.js'
|
||||
);
|
||||
$extracss = array (
|
||||
'/includes/jquery/plugins/multiselect/css/ui.multiselect.css',
|
||||
);
|
||||
|
||||
llxHeader('', $langs->trans("MailAdvTargetRecipients"), '', '', '', '', $extrajs, $extracss);
|
||||
llxHeader('', $langs->trans("MailAdvTargetRecipients"));
|
||||
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -474,7 +474,7 @@ class AdvanceTargetingMailing extends CommonObject
|
||||
$sql.= " LEFT OUTER JOIN " . MAIN_DB_PREFIX . "societe_commerciaux as saleman ON saleman.fk_soc=t.rowid ";
|
||||
}
|
||||
if (array_key_exists('cust_categ', $arrayquery)) {
|
||||
$sql.= " LEFT OUTER JOIN " . MAIN_DB_PREFIX . "categorie_societe as custcateg ON custcateg.fk_societe=t.rowid ";
|
||||
$sql.= " LEFT OUTER JOIN " . MAIN_DB_PREFIX . "categorie_societe as custcateg ON custcateg.fk_soc=t.rowid ";
|
||||
}
|
||||
|
||||
if (!empty($arrayquery['cust_name'])) {
|
||||
|
||||
@ -89,7 +89,7 @@ class FormAdvTargetEmailing extends Form
|
||||
|
||||
$langs->load("dict");
|
||||
$maxlength = 0;
|
||||
|
||||
|
||||
$out = '';
|
||||
$countryArray = array();
|
||||
$label = array ();
|
||||
@ -252,7 +252,7 @@ class FormAdvTargetEmailing extends Form
|
||||
// $sql.= ' WHERE entity = '.$conf->entity;
|
||||
|
||||
$options_array = array();
|
||||
|
||||
|
||||
dol_syslog(get_class($this) . "::".__METHOD__,LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
@ -335,49 +335,8 @@ class FormAdvTargetEmailing extends Form
|
||||
function advMultiselectarray($htmlname, $options_array = array(), $selected_array = array(), $showempty = 0) {
|
||||
global $conf, $langs;
|
||||
|
||||
$return = '';
|
||||
$return .= '<script type="text/javascript" language="javascript">
|
||||
$(document).ready(function() {
|
||||
$.extend($.ui.multiselect.locale, {
|
||||
addAll:\'' . $langs->transnoentities ( "AddAll" ) . '\',
|
||||
removeAll:\'' . $langs->transnoentities ( "RemoveAll" ) . '\',
|
||||
itemsCount:\'' . $langs->transnoentities ( "ItemsCount" ) . '\'
|
||||
});
|
||||
|
||||
$(function(){
|
||||
$("#' . $htmlname . '").addClass("' . $htmlname . '").attr("multiple","multiple").attr("name","' . $htmlname . '[]");
|
||||
$(".multiselect").multiselect({sortable: false, searchable: false});
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
$return .= '<select id="' . $htmlname . '" class="multiselect" multiple="multiple" name="' . $htmlname . '[]" style="display: none;">';
|
||||
//$return .= '<select id="' . $htmlname . '" class="multiselect" multiple="multiple" name="' . $htmlname . '[]">';
|
||||
|
||||
if ($showempty)
|
||||
$return .= '<option value=""> </option>';
|
||||
|
||||
// Find if keys is in selected array value
|
||||
if (is_array($selected_array) && count($selected_array)>0) {
|
||||
$intersect_array = array_intersect_key($options_array, array_flip($selected_array));
|
||||
} else {
|
||||
$intersect_array=array();
|
||||
}
|
||||
|
||||
if (count($options_array) > 0) {
|
||||
foreach ($options_array as $keyoption => $valoption) {
|
||||
// If key is in intersect table then it have to e selected
|
||||
$selected = '';
|
||||
if (count ( $intersect_array ) > 0) {
|
||||
if (array_key_exists ( $keyoption, $intersect_array )) {
|
||||
$selected = ' selected="selected"';
|
||||
}
|
||||
}
|
||||
$return .= '<option' . $selected . ' value="' . $keyoption . '">' . $valoption . '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
$return .= '</select>';
|
||||
|
||||
$form=new Form($this->db);
|
||||
$return = $form->multiselectarray($htmlname, $options_array, $selected_array,0,0,'',0,295);
|
||||
return $return;
|
||||
}
|
||||
|
||||
@ -448,7 +407,7 @@ class FormAdvTargetEmailing extends Form
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
return $this->advMultiselectarray ( $htmlname, $options_array, $selected_array );
|
||||
return $this->advMultiselectarray( $htmlname, $options_array, $selected_array );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -83,14 +83,14 @@ class modProduct extends DolibarrModules
|
||||
$this->const[$r][3] = 'Module to control product codes';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
|
||||
/*$this->const[$r][0] = "PRODUCT_ADDON_PDF";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "standard";
|
||||
$this->const[$r][3] = 'Default module for document generation';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;*/
|
||||
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array(
|
||||
0=>array('file'=>'box_produits.php','enabledbydefaulton'=>'Home'),
|
||||
@ -133,7 +133,7 @@ class modProduct extends DolibarrModules
|
||||
|
||||
// Menus
|
||||
//-------
|
||||
|
||||
|
||||
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
|
||||
/* We can't enable this here because it must be enabled in both product and service module and this create duplicate insert
|
||||
$r=0;
|
||||
@ -159,7 +159,7 @@ class modProduct extends DolibarrModules
|
||||
$this->export_label[$r]="Products"; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
$this->export_permission[$r]=array(array("produit","export"));
|
||||
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.url'=>"PublicUrl",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.length'=>"Length",'p.width'=>"Width",'p.height'=>"Height",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.weight'=>"Weight",'p.customcode'=>'CustomCode','p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell",'p.tobuy'=>"OnBuy",'p.datec'=>'DateCreation','p.tms'=>'DateModification');
|
||||
if ($mysoc->useNPR()) $this->export_fields_array[$r]['p.recuperableonly']='NPR';
|
||||
if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['p.recuperableonly']='NPR';
|
||||
if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.stock'=>'Stock','p.seuil_stock_alerte'=>'StockLimit','p.desiredstock'=>'DesiredStock','p.pmp'=>'PMPValue'));
|
||||
if (! empty($conf->barcode->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.barcode'=>'BarCode'));
|
||||
if (! empty($conf->fournisseur->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('s.nom'=>'Supplier','pf.ref_fourn'=>'SupplierRef','pf.unitprice'=>'SuppliersPrices'));
|
||||
@ -189,7 +189,7 @@ class modProduct extends DolibarrModules
|
||||
if (! empty($conf->fournisseur->enabled)) $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_fournisseur_price as pf ON pf.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'societe s ON s.rowid = pf.fk_soc';
|
||||
$this->export_sql_end[$r] .=' WHERE p.fk_product_type = 0 AND p.entity IN ('.getEntity('product').')';
|
||||
if (! empty($conf->global->EXPORTTOOL_CATEGORIES)) $this->export_sql_order[$r] =' GROUP BY p.rowid'; // FIXME The group by used a generic value to say "all fields in select except function fields"
|
||||
|
||||
|
||||
if (! empty($conf->global->PRODUIT_MULTIPRICES))
|
||||
{
|
||||
// Exports product multiprice
|
||||
@ -203,7 +203,7 @@ class modProduct extends DolibarrModules
|
||||
'pr.price_min'=>"MinPriceLevelUnitPriceHT",'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC",
|
||||
'pr.tva_tx'=>'PriceLevelVATRate',
|
||||
'pr.date_price'=>'DateCreation');
|
||||
if ($mysoc->useNPR()) $this->export_fields_array[$r]['pr.recuperableonly']='NPR';
|
||||
if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['pr.recuperableonly']='NPR';
|
||||
//$this->export_TypeFields_array[$r]=array('p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",'p.note'=>"Text",'p.length'=>"Numeric",'p.surface'=>"Numeric",'p.volume'=>"Numeric",'p.weight'=>"Numeric",'p.customcode'=>'Text','p.price_base_type'=>"Text",'p.price'=>"Numeric",'p.price_ttc'=>"Numeric",'p.tva_tx'=>'Numeric','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean",'p.datec'=>'Date','p.tms'=>'Date');
|
||||
$this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",
|
||||
'pr.price_base_type'=>"product",'pr.price_level'=>"product",'pr.price'=>"product",
|
||||
@ -246,7 +246,7 @@ class modProduct extends DolibarrModules
|
||||
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'product_association as pa, '.MAIN_DB_PREFIX.'product as p2';
|
||||
$this->export_sql_end[$r] .=' WHERE p.fk_product_type = 0 AND p.entity IN ('.getEntity('product').')';
|
||||
$this->export_sql_end[$r] .=' AND p.rowid = pa.fk_product_pere AND p2.rowid = pa.fk_product_fils';
|
||||
}
|
||||
}
|
||||
|
||||
// Imports
|
||||
//--------
|
||||
@ -262,7 +262,7 @@ class modProduct extends DolibarrModules
|
||||
$this->import_fields_array[$r]=array('p.ref'=>"Ref*",'p.label'=>"Label*",'p.description'=>"Description",'p.url'=>"PublicUrl",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.weight'=>"Weight",'p.duration'=>"Duration",'p.customcode'=>'CustomCode','p.price'=>"SellingPriceHT",'p.price_ttc'=>"SellingPriceTTC",'p.tva_tx'=>'VAT','p.tosell'=>"OnSell*",'p.tobuy'=>"OnBuy*",'p.fk_product_type'=>"Type*",'p.finished'=>'Nature','p.datec'=>'DateCreation');
|
||||
if (! empty($conf->stock->enabled)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('p.seuil_stock_alerte'=>'StockLimit','p.desiredstock'=>'DesiredStock','p.pmp'=>'PMPValue'));
|
||||
if (! empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('p.cost_price'=>'CostPrice'));
|
||||
if ($mysoc->useNPR()) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('p.recuperableonly'=>'NPR'));
|
||||
if (is_object($mysoc) && $mysoc->useNPR()) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('p.recuperableonly'=>'NPR'));
|
||||
if (! empty($conf->barcode->enabled)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('p.barcode'=>'BarCode'));
|
||||
// Add extra fields
|
||||
$import_extrafield_sample=array();
|
||||
@ -331,7 +331,7 @@ class modProduct extends DolibarrModules
|
||||
'pr.price_min'=>"MinPriceLevelUnitPriceHT",'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC",
|
||||
'pr.tva_tx'=>'PriceLevelVATRate',
|
||||
'pr.date_price'=>'DateCreation*');
|
||||
if ($mysoc->useNPR()) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('pr.recuperableonly'=>'NPR'));
|
||||
if (is_object($mysoc) && $mysoc->useNPR()) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r],array('pr.recuperableonly'=>'NPR'));
|
||||
$this->import_regex_array[$r]=array('pr.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','pr.recuperableonly'=>'^[0|1]$');
|
||||
$this->import_examplevalues_array[$r]=array('pr.fk_product'=>"1",
|
||||
'pr.price_base_type'=>"HT",'pr.price_level'=>"1",
|
||||
|
||||
@ -74,7 +74,7 @@ ALTER TABLE llx_holiday ADD COLUMN ref varchar(30) NULL;
|
||||
ALTER TABLE llx_holiday ADD COLUMN ref_ext varchar(255);
|
||||
|
||||
|
||||
create table llx_notify_def_object
|
||||
CREATE TABLE llx_notify_def_object
|
||||
(
|
||||
id integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
@ -129,14 +129,15 @@ ALTER TABLE llx_bank_account ADD COLUMN extraparams varchar(255);
|
||||
-- VMYSQL4.1 ALTER TABLE llx_adherent MODIFY COLUMN country integer DEFAULT NULL;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_adherent MODIFY COLUMN country integer USING country::integer;
|
||||
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PRODUCT_CREATE','Product or service created','Executed when a product or sevice is created','product',30);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PRODUCT_MODIFY','Product or service modified','Executed when a product or sevice is modified','product',30);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PRODUCT_DELETE','Product or service deleted','Executed when a product or sevice is deleted','product',30);
|
||||
INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) VALUES ('PRODUCT_CREATE','Product or service created','Executed when a product or sevice is created','product',30);
|
||||
INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) VALUES ('PRODUCT_MODIFY','Product or service modified','Executed when a product or sevice is modified','product',30);
|
||||
INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) VALUES ('PRODUCT_DELETE','Product or service deleted','Executed when a product or sevice is deleted','product',30);
|
||||
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_CREATE','Expense report created','Executed when an expense report is created','expense_report',201);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expense_report',202);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_APPROVE','Expense report approved','Executed when an expense report is approved','expense_report',203);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_PAYED','Expense report billed','Executed when an expense report is set as billed','expense_report',204);
|
||||
INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) VALUES ('EXPENSE_REPORT_CREATE','Expense report created','Executed when an expense report is created','expense_report',201);
|
||||
INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) VALUES ('EXPENSE_REPORT_CREATE','Expense report created','Executed when an expense report is created','expense_report',201);
|
||||
INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) VALUES ('EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expense_report',202);
|
||||
INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) VALUES ('EXPENSE_REPORT_APPROVE','Expense report approved','Executed when an expense report is approved','expense_report',203);
|
||||
INSERT INTO llx_c_action_trigger (code,label,description,elementtype,rang) VALUES ('EXPENSE_REPORT_PAYED','Expense report billed','Executed when an expense report is set as billed','expense_report',204);
|
||||
|
||||
ALTER TABLE llx_c_email_templates ADD COLUMN content_lines text;
|
||||
|
||||
@ -196,7 +197,7 @@ CREATE TABLE llx_product_attribute_combination
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE llx_bank_account drop foreign key bank_fk_accountancy_journal;
|
||||
ALTER TABLE llx_bank_account DROP FOREIGN KEY bank_fk_accountancy_journal;
|
||||
|
||||
-- Fix missing entity column after init demo
|
||||
ALTER TABLE llx_accounting_journal ADD COLUMN entity integer DEFAULT 1;
|
||||
@ -209,18 +210,18 @@ INSERT INTO llx_accounting_journal (rowid, code, label, nature, active) VALUES (
|
||||
INSERT INTO llx_accounting_journal (rowid, code, label, nature, active) VALUES (5,'AN', 'Has new journal', 9, 1);
|
||||
INSERT INTO llx_accounting_journal (rowid, code, label, nature, active) VALUES (6,'ER', 'Expense report journal', 5, 1);
|
||||
-- Fix old entries
|
||||
UPDATE llx_accounting_journal SET nature = 1 where code = 'OD' and nature = 0;
|
||||
UPDATE llx_accounting_journal SET nature = 2 where code = 'VT' and nature = 1;
|
||||
UPDATE llx_accounting_journal SET nature = 3 where code = 'AC' and nature = 2;
|
||||
UPDATE llx_accounting_journal SET nature = 4 where (code = 'BK' or code = 'BQ') and nature = 3;
|
||||
UPDATE llx_accounting_journal SET nature = 1 WHERE code = 'OD' AND nature = 0;
|
||||
UPDATE llx_accounting_journal SET nature = 2 WHERE code = 'VT' AND nature = 1;
|
||||
UPDATE llx_accounting_journal SET nature = 3 WHERE code = 'AC' AND nature = 2;
|
||||
UPDATE llx_accounting_journal SET nature = 4 WHERE (code = 'BK' OR code = 'BQ') AND nature = 3;
|
||||
|
||||
UPDATE llx_bank_account as ba set accountancy_journal = 'BQ' where accountancy_journal = 'BK';
|
||||
UPDATE llx_bank_account as ba set accountancy_journal = 'OD' where accountancy_journal IS NULL;
|
||||
UPDATE llx_bank_account SET accountancy_journal = 'BQ' WHERE accountancy_journal = 'BK';
|
||||
UPDATE llx_bank_account SET accountancy_journal = 'OD' WHERE accountancy_journal IS NULL;
|
||||
|
||||
ALTER TABLE llx_bank_account ADD COLUMN fk_accountancy_journal integer;
|
||||
ALTER TABLE llx_bank_account ADD INDEX idx_fk_accountancy_journal (fk_accountancy_journal);
|
||||
|
||||
UPDATE llx_bank_account as ba set fk_accountancy_journal = (SELECT rowid FROM llx_accounting_journal as aj where ba.accountancy_journal = aj.code) where accountancy_journal not in ('1', '2', '3', '4', '5', '6', '5', '8', '9', '10', '11', '12', '13', '14', '15');
|
||||
UPDATE llx_bank_account AS ba SET fk_accountancy_journal = (SELECT rowid FROM llx_accounting_journal AS aj WHERE ba.accountancy_journal = aj.code) WHERE accountancy_journal NOT IN ('1', '2', '3', '4', '5', '6', '5', '8', '9', '10', '11', '12', '13', '14', '15');
|
||||
ALTER TABLE llx_bank_account ADD CONSTRAINT fk_bank_account_accountancy_journal FOREIGN KEY (fk_accountancy_journal) REFERENCES llx_accounting_journal (rowid);
|
||||
|
||||
--Update general ledger for FEC format & harmonization
|
||||
@ -233,7 +234,7 @@ ALTER TABLE llx_accounting_bookkeeping ADD COLUMN subledger_account varchar(32);
|
||||
ALTER TABLE llx_accounting_bookkeeping CHANGE COLUMN thirdparty_label subledger_label varchar(255); -- If field was already created, rename it
|
||||
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN subledger_label varchar(255) AFTER subledger_account; -- If field dod not exists yet
|
||||
|
||||
update llx_accounting_bookkeeping set subledger_account = numero_compte where subledger_account IS NULL;
|
||||
UPDATE llx_accounting_bookkeeping SET subledger_account = numero_compte WHERE subledger_account IS NULL;
|
||||
|
||||
ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN label_compte varchar(255);
|
||||
ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN code_journal varchar(32);
|
||||
@ -358,9 +359,9 @@ ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_tx d
|
||||
ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_price double(24,8) DEFAULT NULL;
|
||||
ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_price_ttc double(24,8) DEFAULT NULL;
|
||||
|
||||
UPDATE llx_contrat set ref = rowid where ref is null or ref = '';
|
||||
UPDATE llx_contrat SET ref = rowid WHERE ref IS NULL OR ref = '';
|
||||
|
||||
create table llx_payment_various
|
||||
CREATE TABLE llx_payment_various
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp,
|
||||
@ -381,7 +382,7 @@ create table llx_payment_various
|
||||
)ENGINE=innodb;
|
||||
|
||||
|
||||
create table llx_default_values
|
||||
CREATE TABLE llx_default_values
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
@ -441,27 +442,27 @@ ALTER TABLE llx_inventorydet ADD INDEX idx_inventorydet_tms (tms);
|
||||
ALTER TABLE llx_inventorydet ADD INDEX idx_inventorydet_datec (datec);
|
||||
ALTER TABLE llx_inventorydet ADD INDEX idx_inventorydet_fk_inventory (fk_inventory);
|
||||
|
||||
insert into llx_c_tva(fk_pays,taux,code,recuperableonly,note,active) values (1, '8.5', '85', '0','VAT standard rate (DOM sauf Guyane et Saint-Martin)',0);
|
||||
insert into llx_c_tva(fk_pays,taux,code,recuperableonly,note,active) values (1, '8.5', '85NPR', '1','VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0);
|
||||
insert into llx_c_tva(fk_pays,taux,code,recuperableonly,localtax1,localtax1_type,note,active) values (1, '8.5', '85NPROM', '1', 2, 3, 'VAT standard rate (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer',0);
|
||||
insert into llx_c_tva(fk_pays,taux,code,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) values (1, '8.5', '85NPROMOMR', '1', 2, 3, 2.5, 3, 'VAT standard rate (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer et Octroi de Mer Regional',0);
|
||||
INSERT INTO llx_c_tva(fk_pays,taux,code,recuperableonly,note,active) VALUES (1, '8.5', '85', '0','VAT standard rate (DOM sauf Guyane et Saint-Martin)',0);
|
||||
INSERT INTO llx_c_tva(fk_pays,taux,code,recuperableonly,note,active) VALUES (1, '8.5', '85NPR', '1','VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0);
|
||||
INSERT INTO llx_c_tva(fk_pays,taux,code,recuperableonly,localtax1,localtax1_type,note,active) VALUES (1, '8.5', '85NPROM', '1', 2, 3, 'VAT standard rate (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer',0);
|
||||
INSERT INTO llx_c_tva(fk_pays,taux,code,recuperableonly,localtax1,localtax1_type,localtax2,localtax2_type,note,active) VALUES (1, '8.5', '85NPROMOMR', '1', 2, 3, 2.5, 3, 'VAT standard rate (DOM sauf Guyane et Saint-Martin), NPR, Octroi de Mer et Octroi de Mer Regional',0);
|
||||
|
||||
ALTER TABLE llx_events MODIFY COLUMN ip varchar(250);
|
||||
|
||||
ALTER TABLE llx_facture ADD COLUMN fk_fac_rec_source integer;
|
||||
|
||||
DELETE from llx_c_actioncomm where code in ('AC_PROP','AC_COM','AC_FAC','AC_SHIP','AC_SUP_ORD','AC_SUP_INV') AND id NOT IN (SELECT DISTINCT fk_action FROM llx_actioncomm);
|
||||
DELETE FROM llx_c_actioncomm WHERE code IN ('AC_PROP','AC_COM','AC_FAC','AC_SHIP','AC_SUP_ORD','AC_SUP_INV') AND id NOT IN (SELECT DISTINCT fk_action FROM llx_actioncomm);
|
||||
|
||||
-- Fix: delete orphelin category.
|
||||
delete from llx_categorie_product where fk_categorie not in (select rowid from llx_categorie where type = 0);
|
||||
delete from llx_categorie_societe where fk_categorie not in (select rowid from llx_categorie where type in (1, 2));
|
||||
delete from llx_categorie_member where fk_categorie not in (select rowid from llx_categorie where type = 3);
|
||||
delete from llx_categorie_contact where fk_categorie not in (select rowid from llx_categorie where type = 4);
|
||||
delete from llx_categorie_project where fk_categorie not in (select rowid from llx_categorie where type = 5);
|
||||
DELETE FROM llx_categorie_product WHERE fk_categorie NOT IN (SELECT rowid FROM llx_categorie WHERE type = 0);
|
||||
DELETE FROM llx_categorie_societe WHERE fk_categorie NOT IN (SELECT rowid FROM llx_categorie WHERE type IN (1, 2));
|
||||
DELETE FROM llx_categorie_member WHERE fk_categorie NOT IN (SELECT rowid FROM llx_categorie WHERE type = 3);
|
||||
DELETE FROM llx_categorie_contact WHERE fk_categorie NOT IN (SELECT rowid FROM llx_categorie WHERE type = 4);
|
||||
DELETE FROM llx_categorie_project WHERE fk_categorie NOT IN (SELECT rowid FROM llx_categorie WHERE type = 5);
|
||||
|
||||
ALTER TABLE llx_inventory ADD COLUMN ref varchar(48);
|
||||
|
||||
create table llx_loan_schedule
|
||||
CREATE TABLE llx_loan_schedule
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
fk_loan integer,
|
||||
@ -559,3 +560,5 @@ ALTER TABLE llx_blockedlog_authority ADD INDEX signature (signature);
|
||||
|
||||
UPDATE llx_bank SET label= '(SupplierInvoicePayment)' WHERE label= 'Règlement fournisseur';
|
||||
UPDATE llx_bank SET label= '(CustomerInvoicePayment)' WHERE label= 'Règlement client';
|
||||
|
||||
ALTER TABLE llx_mailing_cibles MODIFY COLUMN source_url varchar(255);
|
||||
|
||||
@ -30,7 +30,7 @@ create table llx_mailing_cibles
|
||||
other varchar(255) NULL,
|
||||
tag varchar(128) NULL,
|
||||
statut smallint NOT NULL DEFAULT 0, -- -1 = error, 0 = not sent, ...
|
||||
source_url varchar(160),
|
||||
source_url varchar(255),
|
||||
source_id integer,
|
||||
source_type varchar(16),
|
||||
date_envoi datetime,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user