Fix: php unit test warning

This commit is contained in:
Regis Houssin 2012-03-04 10:13:52 +01:00
parent 68ce569d05
commit 5e402f667e
7 changed files with 11 additions and 7 deletions

View File

@ -354,7 +354,6 @@ if ($action == 'create')
print "</form>";
}
llxFooter();
$db->close();
llxFooter();
?>

View File

@ -660,6 +660,7 @@ class Propal extends CommonObject
$sql.= ", date_livraison";
$sql.= ", fk_availability";
$sql.= ", fk_demand_reason";
$sql.= ", fk_project";
$sql.= ", entity";
$sql.= ") ";
$sql.= " VALUES (";
@ -684,6 +685,7 @@ class Propal extends CommonObject
$sql.= ", ".($this->date_livraison!=''?"'".$this->db->idate($this->date_livraison)."'":"null");
$sql.= ", ".$this->availability_id;
$sql.= ", ".$this->demand_reason_id;
$sql.= ",".($this->fk_project?$this->fk_project:"null");
$sql.= ", ".$conf->entity;
$sql.= ")";

View File

@ -612,7 +612,6 @@ class Commande extends CommonObject
dol_syslog("Commande::create ".$this->error, LOG_ERR);
return -1;
}
if (! $this->fk_project) $this->fk_project = 0;
// $date_commande is deprecated
$date = ($this->date_commande ? $this->date_commande : $this->date);
@ -626,7 +625,8 @@ class Commande extends CommonObject
$sql.= ", remise_absolue, remise_percent";
$sql.= ", entity";
$sql.= ")";
$sql.= " VALUES ('(PROV)',".$this->socid.", ".$this->db->idate(gmmktime()).", ".$user->id.", ".$this->fk_project;
$sql.= " VALUES ('(PROV)',".$this->socid.", ".$this->db->idate(gmmktime()).", ".$user->id;
$sql.= ", ".($this->fk_project?$this->fk_project:"null");
$sql.= ", ".$this->db->idate($date);
$sql.= ", ".($this->source>=0 && $this->source != '' ?$this->source:'null');
$sql.= ", '".$this->db->escape($this->note)."'";

View File

@ -198,6 +198,7 @@ ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_expedition_methode F
-- VMYSQL4.1 UPDATE llx_chargesociales set tms = date_creation WHERE tms = '0000-00-00 00:00:00';
ALTER TABLE llx_propal MODIFY fk_projet integer DEFAULT NULL;
ALTER TABLE llx_propal ADD COLUMN fk_account integer AFTER total;
ALTER TABLE llx_propal ADD COLUMN fk_currency varchar(2) AFTER fk_account;
ALTER TABLE llx_propal ADD INDEX idx_propal_fk_user_author (fk_user_author);
@ -213,6 +214,7 @@ ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_projet FOREIGN KEY (fk_proje
ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_currency FOREIGN KEY (fk_currency) REFERENCES llx_c_currencies (code);
ALTER TABLE llx_propal DROP FOREIGN KEY fk_propal_fk_account;
ALTER TABLE llx_commande MODIFY fk_projet integer DEFAULT NULL;
ALTER TABLE llx_commande ADD COLUMN fk_account integer AFTER facture;
ALTER TABLE llx_commande ADD COLUMN fk_currency varchar(2) AFTER fk_account;
ALTER TABLE llx_commande ADD INDEX idx_commande_fk_user_author (fk_user_author);
@ -228,6 +230,7 @@ ALTER TABLE llx_commande ADD CONSTRAINT fk_commande_fk_projet FOREIGN KEY (fk_p
ALTER TABLE llx_commande ADD CONSTRAINT fk_commande_fk_currency FOREIGN KEY (fk_currency) REFERENCES llx_c_currencies (code);
ALTER TABLE llx_commande DROP FOREIGN KEY fk_commande_fk_account;
ALTER TABLE llx_facture MODIFY fk_projet integer DEFAULT NULL;
ALTER TABLE llx_facture ADD COLUMN fk_account integer AFTER fk_projet;
ALTER TABLE llx_facture ADD COLUMN fk_currency varchar(2) AFTER fk_account;
ALTER TABLE llx_facture ADD INDEX idx_facture_fk_account (fk_account);

View File

@ -29,7 +29,7 @@ create table llx_commande
ref_client varchar(255), -- reference for customer
fk_soc integer NOT NULL,
fk_projet integer DEFAULT 0, -- projet auquel est rattache la commande
fk_projet integer DEFAULT NULL, -- projet auquel est rattache la commande
tms timestamp,
date_creation datetime, -- date de creation

View File

@ -59,7 +59,7 @@ create table llx_facture
fk_user_valid integer, -- valideur de la facture
fk_facture_source integer, -- facture origine si facture avoir
fk_projet integer, -- projet auquel est associee la facture
fk_projet integer DEFAULT NULL, -- projet auquel est associee la facture
fk_account integer, -- bank account
fk_currency varchar(2), -- currency code

View File

@ -30,7 +30,7 @@ create table llx_propal
ref_client varchar(255), -- customer proposal number
fk_soc integer,
fk_projet integer DEFAULT 0, -- projet auquel est rattache la propale
fk_projet integer DEFAULT NULL, -- projet auquel est rattache la propale
tms timestamp,
datec datetime, -- date de creation