Merge branch 'develop' of ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
04e2a30b02
@ -119,6 +119,16 @@ ALTER TABLE llx_societe ADD COLUMN fk_barcode_type integer DEFAULT 0;
|
||||
|
||||
UPDATE llx_menu SET leftmenu = NULL where leftmenu in ('', '0', '1');
|
||||
|
||||
ALTER TABLE llx_categorie_societe DROP INDEX fk_categorie;
|
||||
ALTER TABLE llx_categorie_societe DROP INDEX fk_societe;
|
||||
|
||||
ALTER TABLE llx_categorie_fournisseur DROP INDEX fk_categorie;
|
||||
ALTER TABLE llx_categorie_fournisseur ADD PRIMARY KEY pk_categorie_fournisseur (fk_categorie, fk_societe);
|
||||
ALTER TABLE llx_categorie_fournisseur ADD INDEX idx_categorie_fournisseur_fk_categorie (fk_categorie);
|
||||
ALTER TABLE llx_categorie_fournisseur ADD INDEX idx_categorie_fournisseur_fk_societe (fk_societe);
|
||||
ALTER TABLE llx_categorie_fournisseur ADD CONSTRAINT fk_categorie_fournisseur_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_fournisseur ADD CONSTRAINT fk_categorie_fournisseur_fk_soc FOREIGN KEY (fk_societe) REFERENCES llx_societe (rowid);
|
||||
|
||||
-- Regions Venezuela (id country=232)
|
||||
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23201, 232, 23201, '', 0, 'Los Andes', 1);
|
||||
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23202, 232, 23202, '', 0, 'Capital', 1);
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
-- Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||
--
|
||||
-- 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
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||
--
|
||||
-- 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
|
||||
@ -19,6 +21,5 @@
|
||||
create table llx_categorie_fournisseur
|
||||
(
|
||||
fk_categorie integer NOT NULL,
|
||||
fk_societe integer NOT NULL,
|
||||
UNIQUE (fk_categorie, fk_societe)
|
||||
fk_societe integer NOT NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
@ -124,7 +124,7 @@ class ContactTest extends PHPUnit_Framework_TestCase
|
||||
$result=$localobject->create($user);
|
||||
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertLessThanOrEqual($result, 0);
|
||||
$this->assertLessThan($result, 0);
|
||||
|
||||
return $result;
|
||||
}
|
||||
@ -143,6 +143,7 @@ class ContactTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
$localobject=new Contact($this->savdb);
|
||||
$result=$localobject->fetch($id);
|
||||
|
||||
print __METHOD__." id=".$id." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0);
|
||||
|
||||
@ -169,7 +170,7 @@ class ContactTest extends PHPUnit_Framework_TestCase
|
||||
$localobject->zip='New zip';
|
||||
$localobject->town='New town';
|
||||
$localobject->country_id=2;
|
||||
$localobject->status=0;
|
||||
//$localobject->status=0;
|
||||
$localobject->phone_pro='New tel pro';
|
||||
$localobject->phone_perso='New tel perso';
|
||||
$localobject->phone_mobile='New tel mobile';
|
||||
@ -192,22 +193,39 @@ class ContactTest extends PHPUnit_Framework_TestCase
|
||||
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0, 'Contact::fetch error');
|
||||
|
||||
print __METHOD__." old=".$localobject->note." new=".$newobject->note."\n";
|
||||
$this->assertEquals($localobject->note, $newobject->note);
|
||||
//print __METHOD__." old=".$localobject->note_public." new=".$newobject->note_public."\n";
|
||||
//$this->assertEquals($localobject->note_public, $newobject->note_public);
|
||||
print __METHOD__." old=".$localobject->lastname." new=".$newobject->lastname."\n";
|
||||
$this->assertEquals($localobject->lastname, $newobject->lastname);
|
||||
print __METHOD__." old=".$localobject->firstname." new=".$newobject->firstname."\n";
|
||||
$this->assertEquals($localobject->firstname, $newobject->firstname);
|
||||
print __METHOD__." old=".$localobject->address." new=".$newobject->address."\n";
|
||||
$this->assertEquals($localobject->address, $newobject->address);
|
||||
print __METHOD__." old=".$localobject->zip." new=".$newobject->zip."\n";
|
||||
$this->assertEquals($localobject->zip, $newobject->zip);
|
||||
print __METHOD__." old=".$localobject->town." new=".$newobject->town."\n";
|
||||
$this->assertEquals($localobject->town, $newobject->town);
|
||||
print __METHOD__." old=".$localobject->country_id." new=".$newobject->country_id."\n";
|
||||
$this->assertEquals($localobject->country_id, $newobject->country_id);
|
||||
print __METHOD__." old=BE new=".$newobject->country_code."\n";
|
||||
$this->assertEquals('BE', $newobject->country_code);
|
||||
$this->assertEquals($localobject->status, $newobject->status);
|
||||
//print __METHOD__." old=".$localobject->status." new=".$newobject->status."\n";
|
||||
//$this->assertEquals($localobject->status, $newobject->status);
|
||||
print __METHOD__." old=".$localobject->phone_pro." new=".$newobject->phone_pro."\n";
|
||||
$this->assertEquals($localobject->phone_pro, $newobject->phone_pro);
|
||||
print __METHOD__." old=".$localobject->phone_pro." new=".$newobject->phone_pro."\n";
|
||||
$this->assertEquals($localobject->phone_perso, $newobject->phone_perso);
|
||||
print __METHOD__." old=".$localobject->phone_mobile." new=".$newobject->phone_mobile."\n";
|
||||
$this->assertEquals($localobject->phone_mobile, $newobject->phone_mobile);
|
||||
print __METHOD__." old=".$localobject->fax." new=".$newobject->fax."\n";
|
||||
$this->assertEquals($localobject->fax, $newobject->fax);
|
||||
print __METHOD__." old=".$localobject->email." new=".$newobject->email."\n";
|
||||
$this->assertEquals($localobject->email, $newobject->email);
|
||||
print __METHOD__." old=".$localobject->jabberid." new=".$newobject->jabberid."\n";
|
||||
$this->assertEquals($localobject->jabberid, $newobject->jabberid);
|
||||
print __METHOD__." old=".$localobject->default_lang." new=".$newobject->default_lang."\n";
|
||||
$this->assertEquals($localobject->default_lang, $newobject->default_lang);
|
||||
|
||||
return $localobject;
|
||||
|
||||
@ -119,10 +119,11 @@ class ContratTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
$localobject=new Contrat($this->savdb);
|
||||
$localobject->initAsSpecimen();
|
||||
$result=$localobject->create($user,$langs,$conf);
|
||||
|
||||
$this->assertLessThan($result, 0);
|
||||
$result=$localobject->create($user);
|
||||
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -140,9 +141,10 @@ class ContratTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
$localobject=new Contrat($this->savdb);
|
||||
$result=$localobject->fetch($id);
|
||||
|
||||
$this->assertLessThan($result, 0);
|
||||
|
||||
print __METHOD__." id=".$id." result=".$result."\n";
|
||||
$this->assertLessThan($result, 0);
|
||||
|
||||
return $localobject;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user