Merge pull request #848 from GPCsolutions/note

Note update fixes batch
This commit is contained in:
Juanjo Menent 2013-04-20 00:43:05 -07:00
commit 2d9da0c4cf
9 changed files with 10 additions and 10 deletions

View File

@ -541,7 +541,7 @@ else if ($action == 'setnote_public' && $user->rights->commande->creer)
else if ($action == 'setnote_private' && $user->rights->commande->creer)
{
$result=$object->update_note_rivate(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES));
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES), '_private');
if ($result < 0) dol_print_error($db,$object->error);
}

View File

@ -50,7 +50,7 @@ $object->fetch($id,$ref);
if ($action == 'setnote_public' && $user->rights->contrat->creer)
{
$result=$object->update_note(dol_html_entity_decode(dol_htmlcleanlastbr(GETPOST('note_public')), ENT_QUOTES),'_pubic');
$result=$object->update_note(dol_html_entity_decode(dol_htmlcleanlastbr(GETPOST('note_public')), ENT_QUOTES),'_public');
if ($result < 0) dol_print_error($db,$object->error);
}

View File

@ -386,7 +386,7 @@ else if ($action == 'setnote_public' && $user->rights->ficheinter->creer)
else if ($action == 'setnote_private' && $user->rights->ficheinter->creer)
{
$object->fetch($id);
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES));
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES), '_private');
if ($result < 0) dol_print_error($db,$object->error);
}

View File

@ -54,9 +54,9 @@ if ($action == 'setnote_public' && $user->rights->fournisseur->commande->creer)
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public');
if ($result < 0) dol_print_error($db,$object->error);
}
elseif ($action == 'setnote' && $user->rights->fournisseur->commande->creer)
elseif ($action == 'setnote_private' && $user->rights->fournisseur->commande->creer)
{
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES), '_private');
if ($result < 0) dol_print_error($db,$object->error);
}

View File

@ -1048,7 +1048,7 @@ class Project extends CommonObject
}
$this->db->begin();
$res=$clone_project->update_note(dol_html_entity_decode($clone_project->note_private, ENT_QUOTES));
$res=$clone_project->update_note(dol_html_entity_decode($clone_project->note_private, ENT_QUOTES), '_private');
if ($res < 0)
{
$this->error.=$clone_project->error;

View File

@ -1064,7 +1064,7 @@ class Task extends CommonObject
}
$this->db->begin();
$res=$clone_task->update_note(dol_html_entity_decode($clone_task->note_private, ENT_QUOTES));
$res=$clone_task->update_note(dol_html_entity_decode($clone_task->note_private, ENT_QUOTES), '_private');
if ($res < 0)
{
$this->error.=$clone_task->error;

View File

@ -63,7 +63,7 @@ if ($action == 'setnote_public' && $user->rights->projet->creer)
if ($action == 'setnote_private' && $user->rights->projet->creer)
{
$object->fetch($id);
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES));
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES), '_private');
if ($result < 0) dol_print_error($db,$object->error);
}

View File

@ -93,7 +93,7 @@ if ($action == 'setnote_public' && ! empty($permission))
else if ($action == 'setnote_private' && ! empty($permission))
{
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES));
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES), '_private');
if ($result < 0) dol_print_error($db,$object->error);
}

View File

@ -58,7 +58,7 @@ if ($action == 'update' && $user->rights->user->user->creer && ! $_POST["cancel"
{
$db->begin();
$res=$fuser->update_note($_POST["note"],$user);
$res=$fuser->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
if ($res < 0)
{
$mesg='<div class="error">'.$adh->error.'</div>';