Merge remote-tracking branch 'upstream/develop' into camelCaps

This commit is contained in:
Frédéric FRANCE 2018-08-29 18:45:36 +02:00
commit cbdc669ba9
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
40 changed files with 271 additions and 225 deletions

View File

@ -81,14 +81,22 @@ class AccountingAccount extends CommonObject
var $account_category; var $account_category;
/** /**
* @var string proper name for given parameter * @var string Label of account
*/ */
public $label; public $label;
var $fk_user_author; /**
var $fk_user_modif; * @var int ID
var $active; // duplicate with status */
var $status; public $fk_user_author;
/**
* @var int ID
*/
public $fk_user_modif;
public $active; // duplicate with status
public $status;
/** /**

View File

@ -303,6 +303,8 @@ if ($object->fetch($id) >= 0)
// Sort $modulenames // Sort $modulenames
sort($modulenames); sort($modulenames);
$var = true;
// Loop on each submodule // Loop on each submodule
foreach($modulenames as $modulename) foreach($modulenames as $modulename)
{ {
@ -326,14 +328,18 @@ if ($object->fetch($id) >= 0)
} }
// Si le module mailing est qualifie // Si le module mailing est qualifie
if ($qualified)
{
$var = ! $var;
if ($allowaddtarget) if ($allowaddtarget)
{ {
print '<form class="oddeven tagtr" name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">'; print '<form '.$bctag[$var].' name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
} }
else else
{ {
print '<div class="oddeven tagtr">'; print '<div '.$bctag[$var].'>';
} }
print '<div class="tagtd">'; print '<div class="tagtd">';

View File

@ -379,8 +379,8 @@ class FormAdvTargetEmailing extends Form
* Return combo list of categories * Return combo list of categories
* *
* @param string $htmlname Name of categorie * @param string $htmlname Name of categorie
* @param array $selected_array value selected * @param array $selected_array Value selected
* @param int $type type * @param int $type Type
* @return string HTML combo * @return string HTML combo
*/ */
public function multiselectCategories($htmlname='',$selected_array = array(), $type=0) public function multiselectCategories($htmlname='',$selected_array = array(), $type=0)

View File

@ -3705,7 +3705,7 @@ else if ($id > 0 || ! empty($ref))
$discount = new DiscountAbsolute($db); $discount = new DiscountAbsolute($db);
$result = $discount->fetch(0, $object->id); $result = $discount->fetch(0, $object->id);
if ($result > 0){ if ($result > 0){
print '. '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(), $discount->getNomUrl(1, 'discount')).'<br>'; print '. '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')).'<br>';
} }
} }
print '</td></tr>'; print '</td></tr>';

View File

@ -158,7 +158,7 @@ print '<!-- ajaxdirpreview type='.$type.' -->'."\n";
//print '<!-- Page called with mode='.dol_escape_htmltag(isset($mode)?$mode:'').' type='.dol_escape_htmltag($type).' module='.dol_escape_htmltag($module).' url='.dol_escape_htmltag($url).' '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n"; //print '<!-- Page called with mode='.dol_escape_htmltag(isset($mode)?$mode:'').' type='.dol_escape_htmltag($type).' module='.dol_escape_htmltag($module).' url='.dol_escape_htmltag($url).' '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
$param=($sortfield?'&sortfield='.$sortfield:'').($sortorder?'&sortorder='.$sortorder:''); $param=($sortfield?'&sortfield='.$sortfield:'').($sortorder?'&sortorder='.$sortorder:'');
if (! empty($website)) $param.='&website='.$website; if (! empty($websitekey)) $param.='&website='.$websitekey;
if (! empty($pageid)) $param.='&pageid='.$pageid; if (! empty($pageid)) $param.='&pageid='.$pageid;
@ -234,7 +234,7 @@ if ($type == 'directory')
$param.='&file_manager=1'; $param.='&file_manager=1';
if (!preg_match('/website=/',$param)) $param.='&website='.urlencode(GETPOST('website','alpha')); if (!preg_match('/website=/',$param)) $param.='&website='.urlencode(GETPOST('website','alpha'));
if (!preg_match('/pageid=/',$param)) $param.='&pageid='.urlencode(GETPOST('pageid','int')); if (!preg_match('/pageid=/',$param)) $param.='&pageid='.urlencode(GETPOST('pageid','int'));
//if (!preg_match('/backtopage=/',$param)) $param.='&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$website.'&pageid='.$pageid); //if (!preg_match('/backtopage=/',$param)) $param.='&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$websitekey.'&pageid='.$pageid);
} }
} }
else else
@ -315,7 +315,7 @@ if ($useajax || $action == 'delete')
$formquestion['section_id']=array('type'=>'hidden','value'=>$section_id,'name'=>'section_id'); // We must always put field, even if empty because it is fille by javascript later $formquestion['section_id']=array('type'=>'hidden','value'=>$section_id,'name'=>'section_id'); // We must always put field, even if empty because it is fille by javascript later
$formquestion['section_dir']=array('type'=>'hidden','value'=>$section_dir,'name'=>'section_dir'); // We must always put field, even if empty because it is fille by javascript later $formquestion['section_dir']=array('type'=>'hidden','value'=>$section_dir,'name'=>'section_dir'); // We must always put field, even if empty because it is fille by javascript later
if (! empty($action) && $action == 'file_manager') $formquestion['file_manager']=array('type'=>'hidden','value'=>1,'name'=>'file_manager'); if (! empty($action) && $action == 'file_manager') $formquestion['file_manager']=array('type'=>'hidden','value'=>1,'name'=>'file_manager');
if (! empty($website)) $formquestion['website']=array('type'=>'hidden','value'=>$website,'name'=>'website'); if (! empty($websitekey)) $formquestion['website']=array('type'=>'hidden','value'=>$websitekey,'name'=>'website');
if (! empty($pageid) && $pageid > 0) $formquestion['pageid']=array('type'=>'hidden','value'=>$pageid,'name'=>'pageid'); if (! empty($pageid) && $pageid > 0) $formquestion['pageid']=array('type'=>'hidden','value'=>$pageid,'name'=>'pageid');
print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0)); print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0));

View File

@ -201,7 +201,7 @@ if (! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE
// Edit link // Edit link
print '<td align="right" width="18"><a href="'; print '<td align="right" width="18"><a href="';
print DOL_URL_ROOT.'/ecm/dir_card.php?module='.urlencode($modulepart).'&section='.$val['id'].'&relativedir='.urlencode($val['fullrelativename']); print DOL_URL_ROOT.'/ecm/dir_card.php?module='.urlencode($modulepart).'&section='.$val['id'].'&relativedir='.urlencode($val['fullrelativename']);
print '&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$website.'&pageid='.$pageid); print '&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$websitekey.'&pageid='.$pageid);
print '">'.img_edit($langs->trans("Edit").' - '.$langs->trans("View"), 0, 'class="valignmiddle opacitymedium"').'</a></td>'; print '">'.img_edit($langs->trans("Edit").' - '.$langs->trans("View"), 0, 'class="valignmiddle opacitymedium"').'</a></td>';
// Add link // Add link

View File

@ -1,4 +1,21 @@
<?php <?php
/*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/
/** /**
* Class to manage comment * Class to manage comment
*/ */

View File

@ -3786,7 +3786,7 @@ abstract class CommonObject
$num = count($this->lines); $num = count($this->lines);
//Line extrafield // Line extrafield
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafieldsline = new ExtraFields($this->db); $extrafieldsline = new ExtraFields($this->db);
$extralabelslines=$extrafieldsline->fetch_name_optionals_label($this->table_element_line); $extralabelslines=$extrafieldsline->fetch_name_optionals_label($this->table_element_line);
@ -3795,6 +3795,7 @@ abstract class CommonObject
$reshook = $hookmanager->executeHooks('printObjectLineTitle', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks $reshook = $hookmanager->executeHooks('printObjectLineTitle', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook)) if (empty($reshook))
{ {
// Title line
print "<thead>\n"; print "<thead>\n";
print '<tr class="liste_titre nodrag nodrop">'; print '<tr class="liste_titre nodrag nodrop">';
@ -3886,7 +3887,6 @@ abstract class CommonObject
//Line extrafield //Line extrafield
$line->fetch_optionals(); $line->fetch_optionals();
//if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line))) //if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line)))
if (is_object($hookmanager)) // Old code is commented on preceding line. if (is_object($hookmanager)) // Old code is commented on preceding line.
{ {

View File

@ -696,4 +696,3 @@ class Menubase
} }
} }

View File

@ -1327,8 +1327,10 @@ class DolibarrModules // Can not be abstract, because we need to insta
$status = isset($this->cronjobs[$key]['status'])?$this->cronjobs[$key]['status']:''; $status = isset($this->cronjobs[$key]['status'])?$this->cronjobs[$key]['status']:'';
$priority = isset($this->cronjobs[$key]['priority'])?$this->cronjobs[$key]['priority']:''; $priority = isset($this->cronjobs[$key]['priority'])?$this->cronjobs[$key]['priority']:'';
$test = isset($this->cronjobs[$key]['test'])?$this->cronjobs[$key]['test']:''; // Line must be visible $test = isset($this->cronjobs[$key]['test'])?$this->cronjobs[$key]['test']:''; // Line must be visible
$datestart = isset($this->cronjobs[$key]['datestart'])?$this->cronjobs[$key]['datestart']:'';
$dateend = isset($this->cronjobs[$key]['dateend'])?$this->cronjobs[$key]['dateend']:'';
// Search if boxes def already present // Search if cron entry already present
$sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."cronjob"; $sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."cronjob";
$sql.= " WHERE module_name = '".$this->db->escape($this->rights_class)."'"; $sql.= " WHERE module_name = '".$this->db->escape($this->rights_class)."'";
if ($class) $sql.= " AND classesname = '".$this->db->escape($class)."'"; if ($class) $sql.= " AND classesname = '".$this->db->escape($class)."'";
@ -1349,7 +1351,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
if (! $err) if (! $err)
{ {
$sql = "INSERT INTO ".MAIN_DB_PREFIX."cronjob (module_name, datec, datestart, label, jobtype, classesname, objectname, methodename, command, params, note,"; $sql = "INSERT INTO ".MAIN_DB_PREFIX."cronjob (module_name, datec, datestart, dateend, label, jobtype, classesname, objectname, methodename, command, params, note,";
if(is_int($frequency)){ $sql.= ' frequency,'; } if(is_int($frequency)){ $sql.= ' frequency,'; }
if(is_int($unitfrequency)){ $sql.= ' unitfrequency,'; } if(is_int($unitfrequency)){ $sql.= ' unitfrequency,'; }
if(is_int($priority)){ $sql.= ' priority,'; } if(is_int($priority)){ $sql.= ' priority,'; }
@ -1358,7 +1360,8 @@ class DolibarrModules // Can not be abstract, because we need to insta
$sql.= " VALUES ("; $sql.= " VALUES (";
$sql.= "'".$this->db->escape($this->rights_class)."', "; $sql.= "'".$this->db->escape($this->rights_class)."', ";
$sql.= "'".$this->db->idate($now)."', "; $sql.= "'".$this->db->idate($now)."', ";
$sql.= "'".$this->db->idate($now)."', "; $sql.= ($datestart ? "'".$this->db->idate($datestart)."'" : "NULL").", ";
$sql.= ($dateend ? "'".$this->db->idate($dateend)."'" : "NULL").", ";
$sql.= "'".$this->db->escape($label)."', "; $sql.= "'".$this->db->escape($label)."', ";
$sql.= "'".$this->db->escape($jobtype)."', "; $sql.= "'".$this->db->escape($jobtype)."', ";
$sql.= ($class?"'".$this->db->escape($class)."'":"null").","; $sql.= ($class?"'".$this->db->escape($class)."'":"null").",";

View File

@ -74,7 +74,7 @@ print '<div class="inline-block toolbarbutton centpercent">';
if ($permtoadd) if ($permtoadd)
{ {
print '<a href="'.DOL_URL_ROOT.'/ecm/dir_add_card.php?action=create&module='.urlencode($module).($website?'&website='.$website:'').($pageid?'&pageid='.$pageid:'').'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$website.'&pageid='.$pageid).'" class="inline-block valignmiddle toolbarbutton" title="'.dol_escape_htmltag($langs->trans('ECMAddSection')).'">'; print '<a href="'.DOL_URL_ROOT.'/ecm/dir_add_card.php?action=create&module='.urlencode($module).($websitekey?'&website='.$websitekey:'').($pageid?'&pageid='.$pageid:'').'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$websitekey.'&pageid='.$pageid).'" class="inline-block valignmiddle toolbarbutton" title="'.dol_escape_htmltag($langs->trans('ECMAddSection')).'">';
print '<img class="toolbarbutton" border="0" src="'.DOL_URL_ROOT.'/theme/common/folder-new.png">'; print '<img class="toolbarbutton" border="0" src="'.DOL_URL_ROOT.'/theme/common/folder-new.png">';
print '</a>'; print '</a>';
} }

View File

@ -676,7 +676,9 @@ class FactureFournisseur extends CommonInvoice
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines() function fetch_lines()
{ {
$sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.vat_src_code, f.tva_tx'; $this->lines = array();
$sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.vat_src_code, f.tva_tx';
$sql.= ', f.localtax1_tx, f.localtax2_tx, f.localtax1_type, f.localtax2_type, f.total_localtax1, f.total_localtax2, f.fk_facture_fourn '; $sql.= ', f.localtax1_tx, f.localtax2_tx, f.localtax1_type, f.localtax2_type, f.total_localtax1, f.total_localtax2, f.fk_facture_fourn ';
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit'; $sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit';
$sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc'; $sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc';
@ -686,7 +688,6 @@ class FactureFournisseur extends CommonInvoice
$sql.= ' WHERE fk_facture_fourn='.$this->id; $sql.= ' WHERE fk_facture_fourn='.$this->id;
$sql.= ' ORDER BY f.rang, f.rowid'; $sql.= ' ORDER BY f.rang, f.rowid';
dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG);
$resql_rows = $this->db->query($sql); $resql_rows = $this->db->query($sql);
if ($resql_rows) if ($resql_rows)
@ -704,6 +705,9 @@ class FactureFournisseur extends CommonInvoice
$line->id = $obj->rowid; $line->id = $obj->rowid;
$line->rowid = $obj->rowid; $line->rowid = $obj->rowid;
$line->description = $obj->description; $line->description = $obj->description;
$line->date_start = $obj->date_start;
$line->date_end = $obj->date_end;
$line->product_ref = $obj->product_ref; $line->product_ref = $obj->product_ref;
$line->ref = $obj->product_ref; $line->ref = $obj->product_ref;
$line->ref_supplier = $obj->ref_supplier; $line->ref_supplier = $obj->ref_supplier;
@ -1741,7 +1745,7 @@ class FactureFournisseur extends CommonInvoice
public function updateline($id, $desc, $pu, $vatrate, $txlocaltax1=0, $txlocaltax2=0, $qty=1, $idproduct=0, $price_base_type='HT', $info_bits=0, $type=0, $remise_percent=0, $notrigger=false, $date_start='', $date_end='', $array_options=0, $fk_unit = null, $pu_ht_devise=0, $ref_supplier='') public function updateline($id, $desc, $pu, $vatrate, $txlocaltax1=0, $txlocaltax2=0, $qty=1, $idproduct=0, $price_base_type='HT', $info_bits=0, $type=0, $remise_percent=0, $notrigger=false, $date_start='', $date_end='', $array_options=0, $fk_unit = null, $pu_ht_devise=0, $ref_supplier='')
{ {
global $mysoc; global $mysoc;
dol_syslog(get_class($this)."::updateline $id,$desc,$pu,$vatrate,$qty,$idproduct,$price_base_type,$info_bits,$type,$remise_percent,$fk_unit,$pu_ht_devise,$ref_supplier", LOG_DEBUG); dol_syslog(get_class($this)."::updateline $id,$desc,$pu,$vatrate,$qty,$idproduct,$price_base_type,$info_bits,$type,$remise_percent,$notrigger,$date_start,$date_end,$fk_unit,$pu_ht_devise,$ref_supplier", LOG_DEBUG);
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
$pu = price2num($pu); $pu = price2num($pu);
@ -1821,6 +1825,9 @@ class FactureFournisseur extends CommonInvoice
$line->remise_percent = $remise_percent; $line->remise_percent = $remise_percent;
$line->ref_supplier = $ref_supplier; $line->ref_supplier = $ref_supplier;
$line->date_start = $date_start;
$line->date_end = $date_end;
$line->vat_src_code=$vat_src_code; $line->vat_src_code=$vat_src_code;
$line->tva_tx = $vatrate; $line->tva_tx = $vatrate;
$line->localtax1_tx = $txlocaltax1; $line->localtax1_tx = $txlocaltax1;
@ -2665,6 +2672,9 @@ class SupplierInvoiceLine extends CommonObjectLine
*/ */
public $description; public $description;
public $date_start;
public $date_end;
public $skip_update_total; // Skip update price total for special lines public $skip_update_total; // Skip update price total for special lines
/** /**
@ -2722,7 +2732,7 @@ class SupplierInvoiceLine extends CommonObjectLine
*/ */
public function fetch($rowid) public function fetch($rowid)
{ {
$sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx'; $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx';
$sql.= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 '; $sql.= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 ';
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_facture_fourn, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit'; $sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_facture_fourn, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit';
$sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc'; $sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc';
@ -2749,6 +2759,8 @@ class SupplierInvoiceLine extends CommonObjectLine
$this->rowid = $obj->rowid; $this->rowid = $obj->rowid;
$this->fk_facture_fourn = $obj->fk_facture_fourn; $this->fk_facture_fourn = $obj->fk_facture_fourn;
$this->description = $obj->description; $this->description = $obj->description;
$this->date_start = $obj->date_start;
$this->date_end = $obj->date_end;
$this->product_ref = $obj->product_ref; $this->product_ref = $obj->product_ref;
$this->ref_supplier = $obj->ref_supplier; $this->ref_supplier = $obj->ref_supplier;
$this->libelle = $obj->label; $this->libelle = $obj->label;
@ -2880,6 +2892,8 @@ class SupplierInvoiceLine extends CommonObjectLine
$sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET"; $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET";
$sql.= " description ='".$this->db->escape($this->description)."'"; $sql.= " description ='".$this->db->escape($this->description)."'";
$sql.= ", ref ='".$this->db->escape($this->ref_supplier ? $this->ref_supplier : $this->ref)."'"; $sql.= ", ref ='".$this->db->escape($this->ref_supplier ? $this->ref_supplier : $this->ref)."'";
$sql.= ", date_start = ".($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : "null");
$sql.= ", date_end = ".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : "null");
$sql.= ", pu_ht = ".price2num($this->pu_ht); $sql.= ", pu_ht = ".price2num($this->pu_ht);
$sql.= ", pu_ttc = ".price2num($this->pu_ttc); $sql.= ", pu_ttc = ".price2num($this->pu_ttc);
$sql.= ", qty = ".price2num($this->qty); $sql.= ", qty = ".price2num($this->qty);
@ -3054,12 +3068,11 @@ class SupplierInvoiceLine extends CommonObjectLine
$sql.= ", ".price2num($this->multicurrency_total_ttc); $sql.= ", ".price2num($this->multicurrency_total_ttc);
$sql.= ')'; $sql.= ')';
dol_syslog(get_class($this)."::insert", LOG_DEBUG);
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
if ($resql) if ($resql)
{ {
$this->id=$this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); $this->id=$this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element);
$this->rowid=$this->id; $this->rowid=$this->id; // backward compatibility
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
{ {

View File

@ -1097,6 +1097,7 @@ if (empty($reshook))
$product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):'');
$date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start' . $predef . 'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); $date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start' . $predef . 'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year'));
$date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end' . $predef . 'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); $date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end' . $predef . 'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year'));
$prod_entry_mode = GETPOST('prod_entry_mode'); $prod_entry_mode = GETPOST('prod_entry_mode');
if ($prod_entry_mode == 'free') if ($prod_entry_mode == 'free')
{ {

View File

@ -17,7 +17,7 @@
/** /**
* \file htdocs/loan/class/loanschedule.class.php * \file htdocs/loan/class/loanschedule.class.php
* \ingroup facture * \ingroup loan
* \brief File of class to manage schedule of loans * \brief File of class to manage schedule of loans
*/ */

View File

@ -45,10 +45,10 @@ class Task extends CommonObject
public $picto = 'task'; public $picto = 'task';
protected $childtables=array('projet_task_time'); // To test if we can delete object protected $childtables=array('projet_task_time'); // To test if we can delete object
var $fk_task_parent; public $fk_task_parent;
/** /**
* @var string proper name for given parameter * @var string Label of task
*/ */
public $label; public $label;

View File

@ -19,7 +19,6 @@
* \file resource/class/resource.class.php * \file resource/class/resource.class.php
* \ingroup resource * \ingroup resource
* \brief Class file for resource object * \brief Class file for resource object
*/ */
require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"; require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php";

View File

@ -52,7 +52,7 @@ class Ticket extends CommonObject
/** /**
* @var int Does ticketcore support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * @var int Does ticketcore support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
*/ */
public $ismultientitymanaged = 0; public $ismultientitymanaged = 1;
/** /**
* @var int Does ticketcore support extrafields ? 0=No, 1=Yes * @var int Does ticketcore support extrafields ? 0=No, 1=Yes