本文整理汇总了PHP中get_next_value函数的典型用法代码示例。如果您正苦于以下问题:PHP get_next_value函数的具体用法?PHP get_next_value怎么用?PHP get_next_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_next_value函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: getNextValue
/**
* Return next value
*
* @param Societe $objsoc third party object
* @param Object $contract contract object
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc, $contract)
{
global $db, $conf;
require_once DOL_DOCUMENT_ROOT . "/core/lib/functions2.lib.php";
$mask = $conf->global->CONTRACT_MAGRE_MASK;
if (!$mask) {
$this->error = 'NotConfigured';
return 0;
}
$numFinal = get_next_value($db, $mask, 'contrat', 'ref', '', $objsoc->code_client, $contract->date_contrat);
return $numFinal;
}
开发者ID:nrjacker4,项目名称:crm-php,代码行数:19,代码来源:mod_contract_magre.php
示例17: getNextValue
/** Return next value
* @param objsoc Object third party
* @param ticket Object ticket
* @param mode 'next' for next value or 'last' for last value
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc, $facsim, $mode = 'next')
{
global $db, $conf;
require_once DOL_DOCUMENT_ROOT . "/core/lib/functions2.lib.php";
// Get Mask value
$mask = '';
if (is_object($facsim) && $facsim->type == 2) {
$mask = $conf->global->FACSIM_MURO_MASK_CREDIT;
} else {
$mask = $conf->global->FACSIM_MURO_MASK;
}
if (!$mask) {
$this->error = 'NotConfigured';
return 0;
}
$where = '';
//ww para warehouse
if (preg_match('/\\{(w+)\\}/i', $mask, $regWare)) {
dol_include_once("/pos/class/cash.class.php");
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php';
$terminal = new Cash($db);
$terminal->fetch($facsim->fk_cash);
$warehouse = new Entrepot($db);
$warehouse->fetch($terminal->fk_warehouse);
$maskware = $regWare[1];
$maskware_value = substr($warehouse->libelle, 0, dol_strlen($regWare[1]));
//get n first characters of warehouse ref where n is length in mask
$maskware_value = str_pad($maskware_value, dol_strlen($regWare[1]), "#", STR_PAD_RIGHT);
$maskware_maskbefore = '{' . $maskware . '}';
$maskware_maskafter = $maskware_value;
$mask = str_replace($maskware_maskbefore, $maskware_maskafter, $mask);
}
//kk para terminal
if (preg_match('/\\{(k+)\\}/i', $mask, $regTerm)) {
dol_include_once("/pos/class/cash.class.php");
$terminal = new Cash($db);
$terminal->fetch($facsim->fk_cash);
$maskterm = $regTerm[1];
$maskterm_value = substr($terminal->ref, 0, dol_strlen($regTerm[1]));
//get n first characters of warehouse ref where n is length in mask
$maskterm_value = str_pad($maskterm_value, dol_strlen($regTerm[1]), "#", STR_PAD_RIGHT);
$maskterm_maskbefore = '{' . $maskterm . '}';
$maskterm_maskafter = $maskterm_value;
$mask = str_replace($maskterm_maskbefore, $maskterm_maskafter, $mask);
}
$numFinal = get_next_value($db, $mask, 'facture', 'facnumber', $where, $objsoc, time(), $mode);
if (!preg_match('/([0-9])+/', $numFinal)) {
$this->error = $numFinal;
}
return $numFinal;
}
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:57,代码来源:mod_facsim_muro.php
示例18: getNumero
function getNumero(&$PDOdb, $save = false)
{
global $db;
if (empty($this->numero)) {
dol_include_once('core/lib/functions2.lib.php');
$mask = 'OF{00000}';
$numero = get_next_value($db, $mask, 'assetOf', 'numero');
if ($save) {
$this->numero = $numero;
$wc = $this->withChild;
$this->withChild = false;
parent::save($PDOdb);
$this->withChild = $wc;
}
} else {
$numero = $this->numero;
}
return $numero;
}
开发者ID:ATM-Consulting,项目名称:dolibarr_module_of,代码行数:19,代码来源:ordre_fabrication_asset.class.php
注:本文中的get_next_value函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论