[ task #811 ] Uniformanize note field

This commit is contained in:
fhenry
2013-04-09 17:18:07 +02:00
parent 7b8be3eb87
commit 275bf67bb7
64 changed files with 776 additions and 406 deletions

View File

@@ -6,6 +6,7 @@
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
*
* 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
@@ -630,7 +631,7 @@ class Commande extends CommonOrder
$this->db->begin();
$sql = "INSERT INTO ".MAIN_DB_PREFIX."commande (";
$sql.= " ref, fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note, note_public, ref_client, ref_int";
$sql.= " ref, fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note_private, note_public, ref_client, ref_int";
$sql.= ", model_pdf, fk_cond_reglement, fk_mode_reglement, fk_availability, fk_input_reason, date_livraison, fk_delivery_address";
$sql.= ", remise_absolue, remise_percent";
$sql.= ", entity";
@@ -639,7 +640,7 @@ class Commande extends CommonOrder
$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)."'";
$sql.= ", '".$this->db->escape($this->note_private)."'";
$sql.= ", '".$this->db->escape($this->note_public)."'";
$sql.= ", '".$this->db->escape($this->ref_client)."'";
$sql.= ", ".($this->ref_int?"'".$this->db->escape($this->ref_int)."'":"null");
@@ -952,7 +953,7 @@ class Commande extends CommonOrder
$this->fk_delivery_address = $object->fk_delivery_address;
$this->contact_id = $object->contactid;
$this->ref_client = $object->ref_client;
$this->note = $object->note;
$this->note_private = $object->note_private;
$this->note_public = $object->note_public;
$this->origin = $object->element;
@@ -1267,7 +1268,7 @@ class Commande extends CommonOrder
$sql.= ', c.date_commande';
$sql.= ', c.date_livraison';
$sql.= ', c.fk_projet, c.remise_percent, c.remise, c.remise_absolue, c.source, c.facture as billed';
$sql.= ', c.note as note_private, c.note_public, c.ref_client, c.ref_ext, c.ref_int, c.model_pdf, c.fk_delivery_address, c.extraparams';
$sql.= ', c.note_private, c.note_public, c.ref_client, c.ref_ext, c.ref_int, c.model_pdf, c.fk_delivery_address, c.extraparams';
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
$sql.= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc';
$sql.= ', ca.code as availability_code';
@@ -2697,7 +2698,7 @@ class Commande extends CommonOrder
$this->availability_code = 'DSP';
$this->demand_reason_code = 'SRC_00';
$this->note_public='This is a comment (public)';
$this->note='This is a comment (private)';
$this->note_private='This is a comment (private)';
// Lines
$nbp = 5;
$xnbp = 0;