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


PHP get_next_value函数代码示例

本文整理汇总了PHP中get_next_value函数的典型用法代码示例。如果您正苦于以下问题:PHP get_next_value函数的具体用法?PHP get_next_value怎么用?PHP get_next_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: loop

function loop($units)
{
    printf("Loop every %ss\n", SLEEP_SECONDS);
    $serial = getSerialConnection();
    while (true) {
        foreach ($units as &$unit) {
            $unit['actual'] = get_next_value($unit['actual'], $unit['range']);
            print "Sending {$unit['actual']} .. ";
            $value = chr($unit['actual']);
            $serial->sendMessage($value);
            print "OK\n";
            usleep(SLEEP_SECONDS * 1000000);
        }
    }
}
开发者ID:adryledo,项目名称:arduino-stuff,代码行数:15,代码来源:generator.php

示例2: getNextValue

	/**		\brief      Renvoi prochaine valeur attribuee
	*      	\param      objsoc      Objet societe
	*      	\param      ficheinter	Object ficheinter
	*      	\return     string      Valeur
	*/
    function getNextValue($objsoc=0,$object='')
    {
		global $db,$conf;

		require_once(DOL_DOCUMENT_ROOT ."/lib/functions2.lib.php");

		// On d�fini critere recherche compteur
		$mask=$conf->global->FICHINTER_ARTIC_MASK;

		if (! $mask)
		{
			$this->error='NotConfigured';
			return 0;
		}

		$numFinal=get_next_value($db,$mask,'fichinter','ref','',$objsoc->code_client,$object->date);

		return  $numFinal;
  }
开发者ID:remyyounes,项目名称:dolibarr,代码行数:24,代码来源:mod_arctic.php

示例3: getNextValue

 /**
  *  Return next value
  *
  *  @param	Societe		$objsoc     Object third party
  * 	@param	Propal		$propal		Object commercial proposal
  *  @return string      			Value if OK, 0 if KO
  */
 function getNextValue($objsoc, $propal)
 {
     global $db, $conf;
     require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
     // On defini critere recherche compteur
     $mask = $conf->global->PROPALE_SAPHIR_MASK;
     if (!$mask) {
         $this->error = 'NotConfigured';
         return 0;
     }
     $date = $propal->datep;
     $customercode = $objsoc->code_client;
     $numFinal = get_next_value($db, $mask, 'propal', 'ref', '', $customercode, $date);
     return $numFinal;
 }
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:22,代码来源:mod_propale_saphir.php

示例4: getNextValue

 /**
  *  Return next value
  *
  *  @param	Societe		$objsoc     	Object third party
  *  @param  Object		$object			Object delivery
  *  @return string      				Value if OK, 0 if KO
  */
 function getNextValue($objsoc, $object)
 {
     global $db, $conf;
     require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
     // On defini critere recherche compteur
     $mask = $conf->global->LIVRAISON_SAPHIR_MASK;
     if (!$mask) {
         $this->error = 'NotConfigured';
         return 0;
     }
     $numFinal = get_next_value($db, $mask, 'livraison', 'ref', '', $objsoc->code_client, $object->date_livraison);
     return $numFinal;
 }
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:20,代码来源:mod_livraison_saphir.php

示例5: getNextValue

    /**		Return next value
     *      @param      objsoc      Object third party
     *      @param      facture		Object invoice
     *      @param      mode        'next' for next value or 'last' for last value
     *      @return     string      Value if OK, 0 if KO
     */
    function getNextValue($objsoc,$facture,$mode='next')
    {
        global $db,$conf;

        require_once(DOL_DOCUMENT_ROOT ."/lib/functions2.lib.php");

        // Get Mask value
        $mask = '';
        if (is_object($facture) && $facture->type == 2) $mask=$conf->global->FACTURE_MERCURE_MASK_CREDIT;
        else $mask=$conf->global->FACTURE_MERCURE_MASK_INVOICE;
        if (! $mask)
        {
            $this->error='NotConfigured';
            return 0;
        }

        $where='';
        //if ($facture->type == 2) $where.= " AND type = 2";
        //else $where.=" AND type != 2";

        $numFinal=get_next_value($db,$mask,'facture','facnumber',$where,$objsoc,$facture->date,$mode);
        if (! preg_match('/([0-9])+/',$numFinal)) $this->error = $numFinal;

        return  $numFinal;
    }
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:mod_facture_mercure.php

示例6: getNextValue

 /**
  * Return next value
  *
  * @param	Societe		$objsoc     Object third party
  * @param  	Object	    $object		Object
  * @param	string		$mode       'next' for next value or 'last' for last value
  * @return 	string      			Value if OK, 0 if KO
  */
 function getNextValue($objsoc, $object, $mode = 'next')
 {
     global $db, $conf;
     require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
     // On defini critere recherche compteur
     $mask = $conf->global->SUPPLIER_INVOICE_TULIP_MASK;
     if (!$mask) {
         $this->error = 'NotConfigured';
         return 0;
     }
     $numFinal = get_next_value($db, $mask, 'facture_fourn', 'ref', '', $objsoc->code_fournisseur, $object->datef);
     return $numFinal;
 }
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:21,代码来源:mod_facture_fournisseur_tulip.php

示例7: getNextValue

 /**
  * Return next value
  *
  * @param	Product		$objproduct     Object product
  * @param  	int		    $type       Produit ou service (0:product, 1:service)
  * @return 	string      			Value if OK, '' if module not configured, <0 if KO
  */
 function getNextValue($objproduct = 0, $type = -1)
 {
     global $db, $conf;
     require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
     // Get Mask value
     $mask = '';
     if ($type == 0 && !empty($conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT)) {
         $mask = $conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT;
     } else {
         if ($type == 1 && !empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE)) {
             $mask = $conf->global->PRODUCT_ELEPHANT_MASK_SERVICE;
         }
     }
     if (empty($mask)) {
         $this->error = 'NotConfigured';
         return '';
     }
     $field = '';
     $where = '';
     if ($type == 0) {
         $field = 'ref';
         //$where = ' AND client in (1,2)';
     } else {
         if ($type == 1) {
             $field = 'ref';
             //$where = ' AND fournisseur = 1';
         } else {
             return -1;
         }
     }
     $now = dol_now();
     $numFinal = get_next_value($db, $mask, 'product', $field, $where, '', $now);
     return $numFinal;
 }
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:41,代码来源:mod_codeproduct_elephant.php

示例8: getNextValue

 /**
  *	Return next value
  *
  *	@param	Societe		$objsoc     Third party object
  *	@param	Object		$shipment	Shipment object
  *	@return string      			Value if OK, 0 if KO
  */
 function getNextValue($objsoc, $shipment)
 {
     global $db, $conf;
     require_once DOL_DOCUMENT_ROOT . "/core/lib/functions2.lib.php";
     $mask = $conf->global->EXPEDITION_RIBERA_MASK;
     if (!$mask) {
         $this->error = 'NotConfigured';
         return 0;
     }
     $numFinal = get_next_value($db, $mask, 'expedition', 'ref', '', $objsoc->code_client, $shipment->date_expedition);
     return $numFinal;
 }
开发者ID:nrjacker4,项目名称:crm-php,代码行数:19,代码来源:mod_expedition_ribera.php

示例9: getNextValue

 /**
  *  Return next value
  *
  *  @param	Societe		$objsoc		Object third party
  *  @param   Project		$project	Object project
  *  @return  string					Value if OK, 0 if KO
  */
 function getNextValue($objsoc, $project)
 {
     global $db, $conf;
     require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
     // On defini critere recherche compteur
     $mask = $conf->global->PROJECT_TASK_UNIVERSAL_MASK;
     if (!$mask) {
         $this->error = 'NotConfigured';
         return 0;
     }
     $date = empty($project->date_c) ? dol_now() : $project->date_c;
     $numFinal = get_next_value($db, $mask, 'projet_task', 'ref', '', $objsoc->code_client, $date);
     return $numFinal;
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:21,代码来源:mod_task_universal.php

示例10: getNextValue

 /**
  * 	Return next free value
  *
  *  @param	Societe		$objsoc     Object thirdparty
  *  @param  Object		$object		Object we need next value for
  *  @return string      			Value if KO, <0 if KO
  */
 function getNextValue($objsoc, $object)
 {
     global $db, $conf;
     require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
     // We get cursor rule
     $mask = $conf->global->PAYMENT_ANT_MASK;
     if (!$mask) {
         $this->error = 'NotConfigured';
         return 0;
     }
     $numFinal = get_next_value($db, $mask, 'paiement', 'ref', '', $objsoc, $object->datepaye);
     return $numFinal;
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:20,代码来源:mod_payment_ant.php

示例11: getNextValue

	/**		\brief      Return next value
	 *     	\param      objsoc      Object third party
	 *	    \param      $type       Client ou fournisseur (1:client, 2:fournisseur)
	 *     	\return     string      Value if OK, '' if module not configured, <0 if KO
	 */
	function getNextValue($objsoc=0,$type=-1)
	{
		global $db,$conf;

		require_once(DOL_DOCUMENT_ROOT ."/lib/functions2.lib.php");

		// Get Mask value
		$mask = '';
		if ($type==0) $mask = $conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER;
		if ($type==1) $mask = $conf->global->COMPANY_ELEPHANT_MASK_SUPPLIER;
		if (! $mask)
		{
			$this->error='NotConfigured';
			return '';
		}

		$field='';$where='';
		if ($type == 0)
		{
			$field = 'code_client';
			//$where = ' AND client in (1,2)';
		}
		else if ($type == 1)
		{
			$field = 'code_fournisseur';
			//$where = ' AND fournisseur = 1';
		}
		else return -1;

		$now=gmmktime();

		$numFinal=get_next_value($db,$mask,'societe',$field,$where,'',$now);

		return  $numFinal;
	}
开发者ID:remyyounes,项目名称:dolibarr,代码行数:40,代码来源:mod_codeclient_elephant.php

示例12: getNextValue

 /**
  *  Return next value
  *
  *  @param	Societe		$objsoc     Object third party
  *  @param  Object	    $object		Object
  *  @return string      			Value if OK, 0 if KO
  */
 function getNextValue($objsoc = 0, $object = '')
 {
     global $db, $conf;
     require_once DOL_DOCUMENT_ROOT . "/core/lib/functions2.lib.php";
     // On defini critere recherche compteur
     $mask = $conf->global->COMMANDE_FOURNISSEUR_ORCHIDEE_MASK;
     if (!$mask) {
         $this->error = 'NotConfigured';
         return 0;
     }
     $numFinal = get_next_value($db, $mask, 'commande_fournisseur', 'ref', '', $objsoc->code_fournisseur, $object->date_commande);
     return $numFinal;
 }
开发者ID:nrjacker4,项目名称:crm-php,代码行数:20,代码来源:mod_commande_fournisseur_orchidee.php

示例13: getNextValue

 /**
  * 	Return next free value
  *
  *  @param	Societe		$objsoc     Object thirdparty
  *  @param  Object		$object		Object we need next value for
  *  @return string      			Value if KO, <0 if KO
  */
 function getNextValue($objsoc, $object)
 {
     global $db, $conf;
     require_once DOL_DOCUMENT_ROOT . "/core/lib/functions2.lib.php";
     // We get cursor rule
     $mask = $conf->global->COMMANDE_SAPHIR_MASK;
     if (!$mask) {
         $this->error = 'NotConfigured';
         return 0;
     }
     $numFinal = get_next_value($db, $mask, 'commande', 'ref', '', $objsoc->code_client, $object->date);
     return $numFinal;
 }
开发者ID:nrjacker4,项目名称:crm-php,代码行数:20,代码来源:mod_commande_saphir.php

示例14: getNextValue

 /**
  * Return next value
  *
  * @param int $fk_user User creating
  * @param Societe $objsoc Party
  * @param Lead $lead Lead
  * @return string Valeur
  */
 function getNextValue($fk_user, $objsoc, $lead)
 {
     global $db, $conf;
     require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
     // On defini critere recherche compteur
     $mask = $conf->global->LEAD_UNIVERSAL_MASK;
     if (!$mask) {
         $this->error = 'NotConfigured';
         return 0;
     }
     $numFinal = get_next_value($db, $mask, 'lead', 'ref', '', $objsoc->code_client, dol_now());
     return $numFinal;
 }
开发者ID:ndrosis,项目名称:lead,代码行数:21,代码来源:mod_lead_universal.php

示例15: getNextValue

 /**
  * Return next value
  *
  * @param	Product		$objproduct     Object product
  * @param	string		$type       	type of barcode (EAN, ISBN, ...)
  * @return 	string      				Value if OK, '' if module not configured, <0 if KO
  */
 function getNextValue($objproduct, $type = '')
 {
     global $db, $conf;
     require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
     // TODO
     // Get Mask value
     $mask = '';
     if (!empty($conf->global->BARCODE_STANDARD_PRODUCT_MASK)) {
         $mask = $conf->global->BARCODE_STANDARD_PRODUCT_MASK;
     }
     if (empty($mask)) {
         $this->error = 'NotConfigured';
         return '';
     }
     $field = 'barcode';
     $where = '';
     $now = dol_now();
     $numFinal = get_next_value($db, $mask, 'product', $field, $where, '', $now);
     return $numFinal;
 }
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:27,代码来源:mod_barcode_product_standard.php


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