Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
3ee668b4da
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,3 +13,4 @@ dolibarr_install.log
|
||||
doxygen_warnings.log
|
||||
/.project
|
||||
.DS_Store
|
||||
.idea
|
||||
|
||||
@ -52,6 +52,7 @@ class Fichinter extends CommonObject
|
||||
var $note_private;
|
||||
var $note_public;
|
||||
var $fk_project;
|
||||
var $fk_contrat;
|
||||
var $modelpdf;
|
||||
var $extraparams=array();
|
||||
|
||||
@ -67,6 +68,7 @@ class Fichinter extends CommonObject
|
||||
$this->db = $db;
|
||||
$this->products = array();
|
||||
$this->fk_project = 0;
|
||||
$this->fk_contrat = 0;
|
||||
$this->statut = 0;
|
||||
|
||||
// List of language codes for status
|
||||
@ -137,6 +139,7 @@ class Fichinter extends CommonObject
|
||||
$sql.= ", description";
|
||||
$sql.= ", model_pdf";
|
||||
$sql.= ", fk_projet";
|
||||
$sql.= ", fk_contrat";
|
||||
$sql.= ", fk_statut";
|
||||
$sql.= ", note_private";
|
||||
$sql.= ", note_public";
|
||||
@ -150,6 +153,7 @@ class Fichinter extends CommonObject
|
||||
$sql.= ", ".($this->description?"'".$this->db->escape($this->description)."'":"null");
|
||||
$sql.= ", '".$this->modelpdf."'";
|
||||
$sql.= ", ".($this->fk_project ? $this->fk_project : 0);
|
||||
$sql.= ", ".($this->fk_contrat ? $this->fk_contrat : 0);
|
||||
$sql.= ", ".$this->statut;
|
||||
$sql.= ", ".($this->note_private?"'".$this->db->escape($this->note_private)."'":"null");
|
||||
$sql.= ", ".($this->note_public?"'".$this->db->escape($this->note_public)."'":"null");
|
||||
@ -823,6 +827,40 @@ class Fichinter extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Define the label of the contract
|
||||
*
|
||||
* @param User $user Object user who modify
|
||||
* @param string $description description
|
||||
* @return int <0 if ko, >0 if ok
|
||||
*/
|
||||
function set_contrat($user, $contratid)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if ($user->rights->ficheinter->creer)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."fichinter ";
|
||||
$sql.= " SET fk_contrat = '".$contratid."'";
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
//$sql.= " AND fk_statut = 0";
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
$this->fk_contrat = $contratid;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
dol_syslog("Fichinter::set_contrat Erreur SQL");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adding a line of intervention into data base
|
||||
*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -120,6 +120,16 @@ insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '207', 'SC
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '208', 'SNC - Société en nom collectif');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '209', 'GIE - Groupement d intérêt économique');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '210', 'GEIE - Groupement européen d intérêt économique');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '220', 'Eenmanszaak');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '221', 'BVBA - Besloten vennootschap met beperkte aansprakelijkheid');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '222', 'NV - Naamloze Vennootschap');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '223', 'CVBA - Coöperatieve vennootschap met beperkte aansprakelijkheid');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '224', 'VZW - Vereniging zonder winstoogmerk');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '225', 'CVOA - Coöperatieve vennootschap met onbeperkte aansprakelijkheid ');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '226', 'GCV - Gewone commanditaire vennootschap');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '227', 'Comm.VA - Commanditaire vennootschap op aandelen');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '228', 'VOF - Vennootschap onder firma');
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '229', 'VS0 - Vennootschap met sociaal oogmerk');
|
||||
|
||||
-- Germany
|
||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '500', 'GmbH - Gesellschaft mit beschränkter Haftung');
|
||||
|
||||
@ -64,6 +64,9 @@ class MouvementStock
|
||||
$error = 0;
|
||||
dol_syslog(get_class($this)."::_create start userid=$user->id, fk_product=$fk_product, warehouse=$entrepot_id, qty=$qty, type=$type, price=$price label=$label");
|
||||
|
||||
// Clean parameters
|
||||
if (empty($price)) $price=0;
|
||||
|
||||
if (empty($fk_product)) return 0;
|
||||
|
||||
$now=(! empty($datem) ? $datem : dol_now());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user