当前位置: 首页>>代码示例>>PHP>>正文


PHP Societe::update_note方法代码示例

本文整理汇总了PHP中Societe::update_note方法的典型用法代码示例。如果您正苦于以下问题:PHP Societe::update_note方法的具体用法?PHP Societe::update_note怎么用?PHP Societe::update_note使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Societe的用法示例。


在下文中一共展示了Societe::update_note方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Header

/*
 * Actions
 */

if ($action == 'add')
{
    $backtopage='';
    if (! empty($GETPOST["backtopage"]))
        $backtopage=$GETPOST["backtopage"];
    else
        $backtopage = DOL_URL_ROOT.'/societe/soc.php?socid='.$socid;

    if (!GETPOST('cancel'))
    {
        $result=$object->update_note($_POST["note"]);
	    if ($result < 0)
    	{
    	     $errors[]=$object->errors;
    	}
    }

    $_GET["socid"]=$_POST["socid"];   // Pour retour sur fiche
    $socid = $_GET["socid"];

    dol_syslog("Back to ".$backtopage);
    Header("Location: ".$backtopage);
}


/*
开发者ID:nrjacker4,项目名称:crm-php,代码行数:30,代码来源:note.php

示例2: testSocieteUpdate

    /**
     * testSocieteUpdate
     *
     * @param	Societe	$localobject	Company
     * @return	Societe	$localobject	Company
	 *
     * @depends	testSocieteFetch
     * The depends says test is run only if previous is ok
     */
    public function testSocieteUpdate($localobject)
    {
    	global $conf,$user,$langs,$db;
		$conf=$this->savconf;
		$user=$this->savuser;
		$langs=$this->savlangs;
		$db=$this->savdb;

		$localobject->note='New note after update';
		//$localobject->note_public='New note public after update';
		$localobject->name='New name';
		$localobject->address='New address';
		$localobject->zip='New zip';
		$localobject->town='New town';
		$localobject->country_id=2;
		$localobject->status=0;
		$localobject->tel='New tel';
		$localobject->fax='New fax';
		$localobject->email='newemail@newemail.com';
		$localobject->url='New url';
		$localobject->idprof1='new idprof1';
		$localobject->idprof2='new idprof2';
		$localobject->idprof3='new idprof3';
		$localobject->idprof4='new idprof4';
		$result=$localobject->update($localobject->id,$user);
    	print __METHOD__." id=".$localobject->id." result=".$result."\n";
    	$this->assertLessThan($result, 0);
		$result=$localobject->update_note($localobject->note);
    	print __METHOD__." id=".$localobject->id." result=".$result."\n";
    	$this->assertLessThan($result, 0);
		//$result=$localobject->update_note_public($localobject->note_public);
    	//print __METHOD__." id=".$localobject->id." result=".$result."\n";
    	//$this->assertLessThan($result, 0);

		$newobject=new Societe($this->savdb);
    	$result=$newobject->fetch($localobject->id);
        print __METHOD__." id=".$localobject->id." result=".$result."\n";
    	$this->assertLessThan($result, 0);

    	$this->assertEquals($localobject->note, $newobject->note);
    	//$this->assertEquals($localobject->note_public, $newobject->note_public);
    	$this->assertEquals($localobject->name, $newobject->name);
    	$this->assertEquals($localobject->address, $newobject->address);
    	$this->assertEquals($localobject->zip, $newobject->zip);
    	$this->assertEquals($localobject->town, $newobject->town);
    	$this->assertEquals($localobject->country_id, $newobject->country_id);
    	$this->assertEquals('BE', $newobject->country_code);
    	$this->assertEquals($localobject->status, $newobject->status);
    	$this->assertEquals($localobject->tel, $newobject->tel);
    	$this->assertEquals($localobject->fax, $newobject->fax);
    	$this->assertEquals($localobject->email, $newobject->email);
    	$this->assertEquals($localobject->url, $newobject->url);
    	$this->assertEquals($localobject->idprof1, $newobject->idprof1);
    	$this->assertEquals($localobject->idprof2, $newobject->idprof2);
    	$this->assertEquals($localobject->idprof3, $newobject->idprof3);
    	$this->assertEquals($localobject->idprof4, $newobject->idprof4);

    	return $localobject;
    }
开发者ID:nrjacker4,项目名称:crm-php,代码行数:68,代码来源:SocieteTest.php


注:本文中的Societe::update_note方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。