Merge remote-tracking branch 'upstream/develop' into 14a22
This commit is contained in:
commit
7f4040e464
@ -21,7 +21,7 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* API /setup/shipment_methods has been replaced with API /setup/shipping_methods
|
||||
* Field "total" renamed into to "total_ht" in llx_facture, llx_facture_rec for better field name consistency
|
||||
* Field "tva" renamed into to "total_tva" in llx_facture, llx_facture_rec, llx_propal, llx_supplier_proposal, llx_commande, llx_commande_fournisseur for better field name consistency
|
||||
* Field "total" renamed into "total_ttc" in llx_supplier_proposal for better field name consistency
|
||||
* Field "total" renamed into "total_ttc" in llx_propal, llx_supplier_proposal for better field name consistency
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.1 compared to 13.0.0 *****
|
||||
|
||||
@ -288,7 +288,7 @@ class Propal extends CommonObject
|
||||
'total_tva' =>array('type'=>'double(24,8)', 'label'=>'VAT', 'enabled'=>1, 'visible'=>-1, 'position'=>130, 'isameasure'=>1),
|
||||
'localtax1' =>array('type'=>'double(24,8)', 'label'=>'LocalTax1', 'enabled'=>1, 'visible'=>-1, 'position'=>135, 'isameasure'=>1),
|
||||
'localtax2' =>array('type'=>'double(24,8)', 'label'=>'LocalTax2', 'enabled'=>1, 'visible'=>-1, 'position'=>140, 'isameasure'=>1),
|
||||
'total' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>145, 'isameasure'=>1),
|
||||
'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>145, 'isameasure'=>1),
|
||||
'fk_account' =>array('type'=>'integer', 'label'=>'BankAccount', 'enabled'=>1, 'visible'=>-1, 'position'=>150),
|
||||
'fk_currency' =>array('type'=>'varchar(3)', 'label'=>'Currency', 'enabled'=>1, 'visible'=>-1, 'position'=>155),
|
||||
'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'PaymentTerm', 'enabled'=>1, 'visible'=>-1, 'position'=>160),
|
||||
@ -1039,7 +1039,7 @@ class Propal extends CommonObject
|
||||
$sql .= ", remise_percent";
|
||||
$sql .= ", remise_absolue";
|
||||
$sql .= ", total_tva";
|
||||
$sql .= ", total";
|
||||
$sql .= ", total_ttc";
|
||||
$sql .= ", datep";
|
||||
$sql .= ", datec";
|
||||
$sql .= ", ref";
|
||||
@ -1425,7 +1425,7 @@ class Propal extends CommonObject
|
||||
public function fetch($rowid, $ref = '', $ref_ext = '')
|
||||
{
|
||||
$sql = "SELECT p.rowid, p.ref, p.entity, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc";
|
||||
$sql .= ", p.total, p.total_tva, p.localtax1, p.localtax2, p.total_ht";
|
||||
$sql .= ", p.total_ttc, p.total_tva, p.localtax1, p.localtax2, p.total_ht";
|
||||
$sql .= ", p.datec";
|
||||
$sql .= ", p.date_valid as datev";
|
||||
$sql .= ", p.datep as dp";
|
||||
@ -1622,7 +1622,7 @@ class Propal extends CommonObject
|
||||
$sql .= " localtax1=".(isset($this->total_localtax1) ? $this->total_localtax1 : "null").",";
|
||||
$sql .= " localtax2=".(isset($this->total_localtax2) ? $this->total_localtax2 : "null").",";
|
||||
$sql .= " total_ht=".(isset($this->total_ht) ? $this->total_ht : "null").",";
|
||||
$sql .= " total=".(isset($this->total_ttc) ? $this->total_ttc : "null").",";
|
||||
$sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").",";
|
||||
$sql .= " fk_statut=".(isset($this->statut) ? $this->statut : "null").",";
|
||||
$sql .= " fk_user_author=".(isset($this->user_author_id) ? $this->user_author_id : "null").",";
|
||||
$sql .= " fk_user_valid=".(isset($this->user_valid) ? $this->user_valid : "null").",";
|
||||
|
||||
@ -198,7 +198,7 @@ if ($resql)
|
||||
* Draft proposals
|
||||
*/
|
||||
if (!empty($conf->propal->enabled)) {
|
||||
$sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.total_tva, p.total as total_ttc";
|
||||
$sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.total_tva, p.total_ttc";
|
||||
$sql .= ", s.rowid as socid, s.nom as name, s.client, s.canvas, s.code_client, s.email, s.entity, s.code_compta";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."propal as p";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
|
||||
@ -391,7 +391,7 @@ $sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.tow
|
||||
$sql .= " typent.code as typent_code,";
|
||||
$sql .= " ava.rowid as availability,";
|
||||
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
||||
$sql .= ' p.rowid, p.entity, p.note_private, p.total_ht, p.total_tva, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut as status, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,';
|
||||
$sql .= ' p.rowid, p.entity, p.note_private, p.total_ht, p.total_tva, p.total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut as status, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,';
|
||||
$sql .= ' p.fk_multicurrency, p.multicurrency_code, p.multicurrency_tx, p.multicurrency_total_ht, p.multicurrency_total_tva, p.multicurrency_total_ttc,';
|
||||
$sql .= ' p.datec as date_creation, p.tms as date_update, p.date_cloture as date_cloture,';
|
||||
$sql .= ' p.note_public, p.note_private,';
|
||||
@ -450,7 +450,7 @@ if ($search_societe_alias) $sql .= natural_search('s.name_alias', $search_soci
|
||||
if ($search_login) $sql .= natural_search("u.login", $search_login);
|
||||
if ($search_montant_ht != '') $sql .= natural_search("p.total_ht", $search_montant_ht, 1);
|
||||
if ($search_montant_vat != '') $sql .= natural_search("p.total_tva", $search_montant_vat, 1);
|
||||
if ($search_montant_ttc != '') $sql .= natural_search("p.total", $search_montant_ttc, 1);
|
||||
if ($search_montant_ttc != '') $sql .= natural_search("p.total_ttc", $search_montant_ttc, 1);
|
||||
if ($search_multicurrency_code != '') $sql .= ' AND p.multicurrency_code = "'.$db->escape($search_multicurrency_code).'"';
|
||||
if ($search_multicurrency_tx != '') $sql .= natural_search('p.multicurrency_tx', $search_multicurrency_tx, 1);
|
||||
if ($search_multicurrency_montant_ht != '') $sql .= natural_search('p.multicurrency_total_ht', $search_multicurrency_montant_ht, 1);
|
||||
|
||||
@ -3230,10 +3230,7 @@ abstract class CommonObject
|
||||
// Specific code for backward compatibility with old field names
|
||||
if ($this->element == 'facture' || $this->element == 'facturerec') $fieldtva = 'total_tva';
|
||||
if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier') $fieldtva = 'total_tva';
|
||||
if ($this->element == 'propal') {
|
||||
$fieldttc = 'total';
|
||||
$fieldtva = 'total_tva';
|
||||
}
|
||||
if ($this->element == 'propal') $fieldtva = 'total_tva';
|
||||
if ($this->element == 'expensereport') $fieldtva = 'total_tva';
|
||||
if ($this->element == 'supplier_proposal') $fieldtva = 'total_tva';
|
||||
if ($this->element == 'commande') $fieldtva = 'total_tva';
|
||||
|
||||
@ -231,7 +231,7 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '')
|
||||
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
||||
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
||||
|
||||
if (defined('USEDOLIBARREDITOR')) // REPLACEMENT OF LINKS When page called from Dolibarr editor (this case should not happen)
|
||||
if (defined('USEDOLIBARREDITOR')) // REPLACEMENT OF LINKS When page called from Dolibarr editor
|
||||
{
|
||||
// We remove the <head> part of content
|
||||
if ($contenttype == 'html')
|
||||
@ -355,7 +355,9 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '')
|
||||
}
|
||||
}
|
||||
|
||||
//$content = str_replace(' contenteditable="true"', ' contenteditable="false"', $content);
|
||||
if (!defined('USEDOLIBARREDITOR')) {
|
||||
$content = str_replace(' contenteditable="true"', ' contenteditable="false"', $content);
|
||||
}
|
||||
|
||||
if (!empty($conf->global->WEBSITE_ADD_CSS_TO_BODY)) {
|
||||
$content = str_replace('<body id="bodywebsite" class="bodywebsite', '<body id="bodywebsite" class="bodywebsite '.$conf->global->WEBSITE_ADD_CSS_TO_BODY, $content);
|
||||
|
||||
@ -191,7 +191,7 @@ class modPropale extends DolibarrModules
|
||||
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'co.code'=>'CountryCode', 's.phone'=>'Phone',
|
||||
's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 'c.rowid'=>"Id", 'c.ref'=>"Ref", 'c.ref_client'=>"RefCustomer",
|
||||
'c.fk_soc'=>"IdCompany", 'c.datec'=>"DateCreation", 'c.datep'=>"DatePropal", 'c.fin_validite'=>"DateEndPropal", 'c.remise_percent'=>"GlobalDiscount",
|
||||
'c.total_ht'=>"TotalHT", 'c.total'=>"TotalTTC", 'c.fk_statut'=>'Status', 'c.note_public'=>"Note", 'c.date_livraison'=>'DeliveryDate',
|
||||
'c.total_ht'=>"TotalHT", 'c.total_ttc'=>"TotalTTC", 'c.fk_statut'=>'Status', 'c.note_public'=>"Note", 'c.date_livraison'=>'DeliveryDate',
|
||||
'c.fk_user_author'=>'CreatedById', 'uc.login'=>'CreatedByLogin', 'c.fk_user_valid'=>'ValidatedById', 'uv.login'=>'ValidatedByLogin',
|
||||
'pj.ref'=>'ProjectRef', 'cd.rowid'=>'LineId', 'cd.label'=>"Label", 'cd.description'=>"LineDescription", 'cd.product_type'=>'TypeOfLineServiceOrProduct',
|
||||
'cd.tva_tx'=>"LineVATRate", 'cd.qty'=>"LineQty", 'cd.total_ht'=>"LineTotalHT", 'cd.total_tva'=>"LineTotalVAT", 'cd.total_ttc'=>"LineTotalTTC",
|
||||
@ -208,14 +208,14 @@ class modPropale extends DolibarrModules
|
||||
//$this->export_TypeFields_array[$r]=array(
|
||||
// 's.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','co.code'=>'Text','s.phone'=>'Text',
|
||||
// 's.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",
|
||||
// 'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note_public'=>"Text",
|
||||
// 'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total_ttc'=>"Numeric",'c.fk_statut'=>'Status','c.note_public'=>"Text",
|
||||
// 'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",
|
||||
// 'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.rowid'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text'
|
||||
//);
|
||||
$this->export_TypeFields_array[$r] = array(
|
||||
's.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'co.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text',
|
||||
's.ape'=>'Text', 's.idprof4'=>'Text', 'c.ref'=>"Text", 'c.ref_client'=>"Text", 'c.datec'=>"Date", 'c.datep'=>"Date", 'c.fin_validite'=>"Date",
|
||||
'c.remise_percent'=>"Numeric", 'c.total_ht'=>"Numeric", 'c.total'=>"Numeric", 'c.fk_statut'=>'Status', 'c.note_public'=>"Text", 'c.date_livraison'=>'Date',
|
||||
'c.remise_percent'=>"Numeric", 'c.total_ht'=>"Numeric", 'c.total_ttc'=>"Numeric", 'c.fk_statut'=>'Status', 'c.note_public'=>"Text", 'c.date_livraison'=>'Date',
|
||||
'pj.ref'=>'Text', 'cd.description'=>"Text", 'cd.product_type'=>'Boolean', 'cd.tva_tx'=>"Numeric", 'cd.qty'=>"Numeric", 'cd.total_ht'=>"Numeric",
|
||||
'cd.total_tva'=>"Numeric", 'cd.total_ttc'=>"Numeric", 'p.ref'=>'Text', 'p.label'=>'Text'
|
||||
);
|
||||
@ -223,7 +223,7 @@ class modPropale extends DolibarrModules
|
||||
's.rowid'=>"company", 's.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'co.code'=>'company', 's.phone'=>'company',
|
||||
's.siren'=>'company', 's.ape'=>'company', 's.idprof4'=>'company', 's.siret'=>'company', 'c.rowid'=>"propal", 'c.ref'=>"propal", 'c.ref_client'=>"propal",
|
||||
'c.fk_soc'=>"propal", 'c.datec'=>"propal", 'c.datep'=>"propal", 'c.fin_validite'=>"propal", 'c.remise_percent'=>"propal", 'c.total_ht'=>"propal",
|
||||
'c.total'=>"propal", 'c.fk_statut'=>"propal", 'c.note_public'=>"propal", 'c.date_livraison'=>"propal", 'pj.ref'=>'project', 'cd.rowid'=>'propal_line',
|
||||
'c.total_ttc'=>"propal", 'c.fk_statut'=>"propal", 'c.note_public'=>"propal", 'c.date_livraison'=>"propal", 'pj.ref'=>'project', 'cd.rowid'=>'propal_line',
|
||||
'cd.label'=>"propal_line", 'cd.description'=>"propal_line", 'cd.product_type'=>'propal_line', 'cd.tva_tx'=>"propal_line", 'cd.qty'=>"propal_line",
|
||||
'cd.total_ht'=>"propal_line", 'cd.total_tva'=>"propal_line", 'cd.total_ttc'=>"propal_line", 'p.rowid'=>'product', 'p.ref'=>'product', 'p.label'=>'product'
|
||||
);
|
||||
@ -276,7 +276,7 @@ class modPropale extends DolibarrModules
|
||||
'c.fin_validite' => 'DateEndPropal',
|
||||
'c.remise_percent' => 'GlobalDiscount',
|
||||
'c.total_ht' => 'TotalHT',
|
||||
'c.total' => 'TotalTTC',
|
||||
'c.total_ttc' => 'TotalTTC',
|
||||
'c.fk_statut' => 'Status*',
|
||||
'c.note_public' => 'Note',
|
||||
'c.date_livraison' => 'DeliveryDate',
|
||||
@ -313,7 +313,7 @@ class modPropale extends DolibarrModules
|
||||
'c.fin_validite' => '2020-01-01',
|
||||
'c.remise_percent' => '',
|
||||
'c.total_ht' => '0',
|
||||
'c.total' => '0',
|
||||
'c.total_ttc' => '0',
|
||||
'c.fk_statut' => '1',
|
||||
'c.note_public' => '',
|
||||
'c.date_livraison' => '2020-01-01',
|
||||
|
||||
@ -180,6 +180,7 @@ ALTER TABLE llx_commande CHANGE COLUMN tva total_tva double(24,8) default 0;
|
||||
ALTER TABLE llx_supplier_proposal CHANGE COLUMN tva total_tva double(24,8) default 0;
|
||||
ALTER TABLE llx_supplier_proposal CHANGE COLUMN total total_ttc double(24,8) default 0;
|
||||
ALTER TABLE llx_propal CHANGE COLUMN tva total_tva double(24,8) default 0;
|
||||
ALTER TABLE llx_propal CHANGE COLUMN total total_ttc double(24,8) default 0;
|
||||
ALTER TABLE llx_facture CHANGE COLUMN tva total_tva double(24,8) default 0;
|
||||
ALTER TABLE llx_facture CHANGE COLUMN total total_ht double(24,8) default 0;
|
||||
ALTER TABLE llx_facture_rec CHANGE COLUMN tva total_tva double(24,8) default 0;
|
||||
|
||||
@ -51,7 +51,7 @@ create table llx_propal
|
||||
total_tva double(24,8) DEFAULT 0, -- montant total tva apres remise globale
|
||||
localtax1 double(24,8) DEFAULT 0, -- amount total localtax1
|
||||
localtax2 double(24,8) DEFAULT 0, -- amount total localtax2
|
||||
total double(24,8) DEFAULT 0, -- montant total ttc apres remise globale
|
||||
total_ttc double(24,8) DEFAULT 0, -- montant total ttc apres remise globale
|
||||
|
||||
fk_account integer, -- bank account
|
||||
fk_currency varchar(3), -- currency code
|
||||
|
||||
@ -421,7 +421,7 @@ if (!defined('NOTOKENRENEWAL'))
|
||||
// Rolling token at each call ($_SESSION['token'] contains token of previous page)
|
||||
if (isset($_SESSION['newtoken'])) $_SESSION['token'] = $_SESSION['newtoken'];
|
||||
|
||||
// Save in $_SESSION['newtoken'] what will be next token. Into forms, we will add param token = $_SESSION['newtoken']
|
||||
// Save in $_SESSION['newtoken'] what will be next token. Into forms, we will add param token = newToken();
|
||||
$token = dol_hash(uniqid(mt_rand(), true)); // Generates a hash of a random number
|
||||
$_SESSION['newtoken'] = $token;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user