This commit is contained in:
Laurent Destailleur
2017-10-04 02:42:44 +02:00
parent bd3a76ee84
commit a6cf934973
3 changed files with 5 additions and 2 deletions

View File

@@ -2085,7 +2085,7 @@ class Facture extends CommonInvoice
* @param string $force_number Reference to force on invoice * @param string $force_number Reference to force on invoice
* @param int $idwarehouse Id of warehouse to use for stock decrease if option to decreasenon stock is on (0=no decrease) * @param int $idwarehouse Id of warehouse to use for stock decrease if option to decreasenon stock is on (0=no decrease)
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, 0=Nothing done because invoice is not a draft, >0 if OK
*/ */
function validate($user, $force_number='', $idwarehouse=0, $notrigger=0) function validate($user, $force_number='', $idwarehouse=0, $notrigger=0)
{ {
@@ -3227,6 +3227,8 @@ class Facture extends CommonInvoice
if (! empty($conf->global->FACTURE_ADDON)) if (! empty($conf->global->FACTURE_ADDON))
{ {
dol_syslog("Call getNextNumRef with FACTURE_ADDON = ".$conf->global->FACTURE_ADDON);
$mybool=false; $mybool=false;
$file = $conf->global->FACTURE_ADDON.".php"; $file = $conf->global->FACTURE_ADDON.".php";

View File

@@ -450,7 +450,7 @@ abstract class CommonInvoice extends CommonObject
$sqltemp = 'SELECT c.type_cdr,c.nbjour,c.decalage'; $sqltemp = 'SELECT c.type_cdr,c.nbjour,c.decalage';
$sqltemp.= ' FROM '.MAIN_DB_PREFIX.'c_payment_term as c'; $sqltemp.= ' FROM '.MAIN_DB_PREFIX.'c_payment_term as c';
$sqltemp.= " WHERE c.entity = " . getEntity('c_payment_term'); $sqltemp.= " WHERE c.entity IN (" . getEntity('c_payment_term').")";
if (is_numeric($cond_reglement)) $sqltemp.= " AND c.rowid=".$cond_reglement; if (is_numeric($cond_reglement)) $sqltemp.= " AND c.rowid=".$cond_reglement;
else $sqltemp.= " AND c.code='".$this->db->escape($cond_reglement)."'"; else $sqltemp.= " AND c.code='".$this->db->escape($cond_reglement)."'";

View File

@@ -723,6 +723,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
// but we should use local year and month of user // but we should use local year and month of user
// For debugging // For debugging
dol_syslog("mask=".$mask);
//include_once(DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'); //include_once(DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php');
//$mask='FA{yy}{mm}-{0000@99}'; //$mask='FA{yy}{mm}-{0000@99}';
//$date=dol_mktime(12, 0, 0, 1, 1, 1900); //$date=dol_mktime(12, 0, 0, 1, 1, 1900);