Merge branch 'Upstream/develop'

This commit is contained in:
aspangaro 2014-08-31 07:44:46 +02:00
commit 9f92446dba
17 changed files with 104 additions and 64 deletions

View File

@ -129,7 +129,7 @@ case "$1" in
then then
# Create an empty conf.php with permission to web server # Create an empty conf.php with permission to web server
setup_empty_conf setup_empty_conf
else #else
# File already exist. We add params not found. # File already exist. We add params not found.
#echo Add new params to overwrite path to use shared libraries/fonts #echo Add new params to overwrite path to use shared libraries/fonts
#grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config #grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config

View File

@ -32,7 +32,7 @@ AppPublisherURL=http://www.nltechno.com
AppSupportURL=http://www.dolibarr.org AppSupportURL=http://www.dolibarr.org
AppUpdatesURL=http://www.dolibarr.org AppUpdatesURL=http://www.dolibarr.org
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares. AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
AppCopyright=Copyright (C) 2008-2013 Laurent Destailleur, NLTechno AppCopyright=Copyright (C) 2008-2014 Laurent Destailleur, NLTechno
DefaultDirName=c:\dolibarr DefaultDirName=c:\dolibarr
DefaultGroupName=Dolibarr DefaultGroupName=Dolibarr
;LicenseFile=COPYING ;LicenseFile=COPYING

View File

@ -55,6 +55,8 @@ print '</div>';
print '<div class="principal">'; print '<div class="principal">';
$page=GETPOST('menu','alpha'); $page=GETPOST('menu','alpha');
if (empty($page)) $page='facturation';
if (in_array( if (in_array(
$page, $page,
array( array(

View File

@ -65,9 +65,10 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
$sql = "SELECT z.rowid, z.zip, z.town, z.fk_county, z.fk_pays as fk_country"; $sql = "SELECT z.rowid, z.zip, z.town, z.fk_county, z.fk_pays as fk_country";
$sql.= ", c.rowid as fk_country, c.code as country_code, c.label as country"; $sql.= ", c.rowid as fk_country, c.code as country_code, c.label as country";
$sql.= ", d.rowid as fk_county, d.code_departement as county_code, d.nom as county"; $sql.= ", d.rowid as fk_county, d.code_departement as county_code, d.nom as county";
$sql.= " FROM (".MAIN_DB_PREFIX."c_ziptown as z,".MAIN_DB_PREFIX."c_country as c)"; $sql.= " FROM ".MAIN_DB_PREFIX."c_ziptown as z";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX ."c_departements as d ON z.fk_county = d.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX ."c_departements as d ON z.fk_county = d.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r ON d.fk_region = r.code_region"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r ON d.fk_region = r.code_region,";
$sql.= " ".MAIN_DB_PREFIX."c_country as c";
$sql.= " WHERE z.fk_pays = c.rowid"; $sql.= " WHERE z.fk_pays = c.rowid";
$sql.= " AND z.active = 1 AND c.active = 1"; $sql.= " AND z.active = 1 AND c.active = 1";
if ($zipcode) $sql.=" AND z.zip LIKE '" . $db->escape($zipcode) . "%'"; if ($zipcode) $sql.=" AND z.zip LIKE '" . $db->escape($zipcode) . "%'";
@ -81,8 +82,8 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
$sql.= ", c.code as country_code, c.label as country"; $sql.= ", c.code as country_code, c.label as country";
$sql.= ", d.code_departement as county_code , d.nom as county"; $sql.= ", d.code_departement as county_code , d.nom as county";
$sql.= " FROM ".MAIN_DB_PREFIX.'societe as s'; $sql.= " FROM ".MAIN_DB_PREFIX.'societe as s';
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX ."c_departements as d ON fk_departement = d.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX ."c_departements as d ON s.fk_departement = d.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX.'c_country as c ON fk_pays = c.rowid'; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid';
$sql.= " WHERE"; $sql.= " WHERE";
if ($zipcode) $sql.= " s.zip LIKE '".$db->escape($zipcode)."%'"; if ($zipcode) $sql.= " s.zip LIKE '".$db->escape($zipcode)."%'";
if ($town) $sql.= " s.town LIKE '%" . $db->escape($town) . "%'"; if ($town) $sql.= " s.town LIKE '%" . $db->escape($town) . "%'";

View File

@ -48,7 +48,7 @@ abstract class CommonObject
public $array_options=array(); public $array_options=array();
public $thirdparty; public $thirdparty;
public $linkedObjectsIds; // Loaded by ->fetchObjectLinked public $linkedObjectsIds; // Loaded by ->fetchObjectLinked
public $linkedObjects; // Loaded by ->fetchObjectLinked public $linkedObjects; // Loaded by ->fetchObjectLinked
@ -2784,7 +2784,7 @@ abstract class CommonObject
// Price HT // Price HT
print '<td align="right" width="80"><label for="price_ht">'.$langs->trans('PriceUHT').'</label></td>'; print '<td align="right" width="80"><label for="price_ht">'.$langs->trans('PriceUHT').'</label></td>';
if ($conf->global->MAIN_FEATURES_LEVEL > 1) print '<td align="right" width="80">&nbsp;</td>'; if ($inputalsopricewithtax) print '<td align="right" width="80">&nbsp;</td>';
// Qty // Qty
print '<td align="right" width="50"><label for="qty">'.$langs->trans('Qty').'</label></td>'; print '<td align="right" width="50"><label for="qty">'.$langs->trans('Qty').'</label></td>';

View File

@ -298,6 +298,9 @@ class DoliDBPgsql extends DoliDB
$line=str_replace(' LIKE \'',' ILIKE \'',$line); $line=str_replace(' LIKE \'',' ILIKE \'',$line);
$line=str_replace(' LIKE BINARY \'',' LIKE \'',$line); $line=str_replace(' LIKE BINARY \'',' LIKE \'',$line);
// Replace INSERT IGNORE into INSERT
$line=preg_replace('/^INSERT IGNORE/','INSERT',$line);
// Delete using criteria on other table must not declare twice the deleted table // Delete using criteria on other table must not declare twice the deleted table
// DELETE FROM tabletodelete USING tabletodelete, othertable -> DELETE FROM tabletodelete USING othertable // DELETE FROM tabletodelete USING tabletodelete, othertable -> DELETE FROM tabletodelete USING othertable
if (preg_match('/DELETE FROM ([a-z_]+) USING ([a-z_]+), ([a-z_]+)/i',$line,$reg)) if (preg_match('/DELETE FROM ([a-z_]+) USING ([a-z_]+), ([a-z_]+)/i',$line,$reg))

View File

@ -25,8 +25,9 @@
/** /**
* Get value of an HTML field, do Ajax process and show result. * Generic function that return javascript to add to a page to transform a common input field into an autocomplete field by calling an Ajax page (ex: /societe/ajaxcompanies.php).
* The HTML field must be an input text with id=search_$htmlname. * The HTML field must be an input text with id=search_$htmlname.
* This use the jQuery "autocomplete" function.
* *
* @param string $selected Preselecte value * @param string $selected Preselecte value
* @param string $htmlname HTML name of input field * @param string $htmlname HTML name of input field
@ -34,7 +35,7 @@
* @param string $urloption More parameters on URL request * @param string $urloption More parameters on URL request
* @param int $minLength Minimum number of chars to trigger that Ajax search * @param int $minLength Minimum number of chars to trigger that Ajax search
* @param int $autoselect Automatic selection if just one value * @param int $autoselect Automatic selection if just one value
* @param array $ajaxoptions Multiple options array (Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done * @param array $ajaxoptions Multiple options array (Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done)
* @return string Script * @return string Script
*/ */
function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLength=2, $autoselect=0, $ajaxoptions=array()) function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLength=2, $autoselect=0, $ajaxoptions=array())
@ -182,25 +183,28 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
} }
/** /**
* Get value of field, do Ajax process and return result * Generic function that return javascript to add to a page to transform a common input field into an autocomplete field by calling an Ajax page (ex: core/ajax/ziptown.php).
* The Ajax page can also returns several values (json format) to fill several input fields.
* The HTML field must be an input text with id=$htmlname.
* This use the jQuery "autocomplete" function.
* *
* @param string $htmlname Name of field * @param string $htmlname HTML name of input field
* @param string $fields other fields to autocomplete * @param string $fields Other fields to autocomplete
* @param string $url Chemin du fichier de reponse : /chemin/fichier.php * @param string $url URL for ajax request : /chemin/fichier.php
* @param string $option More parameters on URL request * @param string $option More parameters on URL request
* @param int $minLength Minimum number of chars to trigger that Ajax search * @param int $minLength Minimum number of chars to trigger that Ajax search
* @param int $autoselect Automatic selection if just one value * @param int $autoselect Automatic selection if just one value
* @return string Script * @return string Script
*/ */
function ajax_multiautocompleter($htmlname,$fields,$url,$option='',$minLength=2,$autoselect=0) function ajax_multiautocompleter($htmlname, $fields, $url, $option='', $minLength=2, $autoselect=0)
{ {
$script = '<!-- Autocomplete -->'."\n"; $script = '<!-- Autocomplete -->'."\n";
$script.= '<script type="text/javascript">'; $script.= '<script type="text/javascript">';
$script.= 'jQuery(document).ready(function() { $script.= 'jQuery(document).ready(function() {
var fields = '.json_encode($fields).'; var fields = '.json_encode($fields).';
var length = fields.length; var nboffields = fields.length;
var autoselect = '.$autoselect.'; var autoselect = '.$autoselect.';
//alert(fields + " " + length); //alert(fields + " " + nboffields);
jQuery("input#'.$htmlname.'").autocomplete({ jQuery("input#'.$htmlname.'").autocomplete({
dataType: "json", dataType: "json",
@ -214,7 +218,7 @@ function ajax_multiautocompleter($htmlname,$fields,$url,$option='',$minLength=2,
if (item.states) { if (item.states) {
jQuery("#state_id").html(item.states); jQuery("#state_id").html(item.states);
} }
for (i=0;i<length;i++) { for (i=0;i<nboffields;i++) {
if (item[fields[i]]) { // If defined if (item[fields[i]]) { // If defined
//alert(item[fields[i]]); //alert(item[fields[i]]);
jQuery("#" + fields[i]).val(item[fields[i]]); jQuery("#" + fields[i]).val(item[fields[i]]);
@ -226,8 +230,7 @@ function ajax_multiautocompleter($htmlname,$fields,$url,$option='',$minLength=2,
}); });
}, },
select: function( event, ui ) { select: function( event, ui ) {
for (i=0;i<nboffields;i++) {
for (i=0;i<length;i++) {
//alert(fields[i] + " = " + ui.item[fields[i]]); //alert(fields[i] + " = " + ui.item[fields[i]]);
if (fields[i]=="selectcountry_id") if (fields[i]=="selectcountry_id")
{ {

View File

@ -96,7 +96,7 @@ $coldisplay=-1; // We remove first td
<td align="right"><?php $coldisplay++; ?><?php echo $form->load_tva('tva_tx',$line->tva_tx,$seller,$buyer,0,$line->info_bits,$line->product_type); ?></td> <td align="right"><?php $coldisplay++; ?><?php echo $form->load_tva('tva_tx',$line->tva_tx,$seller,$buyer,0,$line->info_bits,$line->product_type); ?></td>
<td align="right"><?php $coldisplay++; ?><input type="text" class="flat" size="8" id="price_ht" name="price_ht" value="<?php echo price($line->subprice,0,'',0); ?>"></td> <td align="right"><?php $coldisplay++; ?><input type="text" class="flat" size="8" id="price_ht" name="price_ht" value="<?php echo price($line->subprice,0,'',0); ?>"></td>
<?php if ($conf->global->MAIN_FEATURES_LEVEL > 1) { ?> <?php if ($inputalsopricewithtax) { ?>
<td align="right"><?php $coldisplay++; ?><input type="text" class="flat" size="8" id="price_ttc" name="price_ttc" value="<?php echo price($pu_ttc,0,'',0); ?>"></td> <td align="right"><?php $coldisplay++; ?><input type="text" class="flat" size="8" id="price_ttc" name="price_ttc" value="<?php echo price($pu_ttc,0,'',0); ?>"></td>
<?php } ?> <?php } ?>

View File

@ -17,9 +17,27 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
* *
* To use this template, the following var must be defined * Need to have following variables defined:
* $object (invoice, order, ...)
* $conf
* $langs
* $dateSelector
* $forceall (0 by default, 1 for supplier invoices/orders)
* $senderissupplier (0 by default, 1 for supplier invoices/orders)
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
*
* $type, $text, $description, $line * $type, $text, $description, $line
*/ */
$usemargins=0;
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
global $forceall, $senderissupplier, $inputalsopricewithtax;
if (empty($dateSelector)) $dateSelector=0;
if (empty($forceall)) $forceall=0;
if (empty($senderissupplier)) $senderissupplier=0;
if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0;
?> ?>
<?php $coldisplay=0; ?> <?php $coldisplay=0; ?>
<!-- BEGIN PHP TEMPLATE objectline_view.tpl.php --> <!-- BEGIN PHP TEMPLATE objectline_view.tpl.php -->
@ -100,7 +118,7 @@
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo price($line->subprice); ?></td> <td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo price($line->subprice); ?></td>
<?php if ($conf->global->MAIN_FEATURES_LEVEL > 1) { ?> <?php if ($inputalsopricewithtax) { ?>
<td align="right" class="nowrap"><?php $coldisplay++; ?>&nbsp;</td> <td align="right" class="nowrap"><?php $coldisplay++; ?>&nbsp;</td>
<?php } ?> <?php } ?>

View File

@ -21,7 +21,7 @@
/** /**
* \file htdocs/fichinter/fiche.php * \file htdocs/fichinter/fiche.php
* \brief Fichier fiche intervention * \brief Page of intervention
* \ingroup ficheinter * \ingroup ficheinter
*/ */
@ -200,7 +200,7 @@ else if ($action == 'add' && $user->rights->ficheinter->creer)
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); $extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
$array_option = $extrafields->getOptionalsFromPost($extralabels); $array_option = $extrafields->getOptionalsFromPost($extralabels);
$object->array_options = $array_option; $object->array_options = $array_option;
$id = $object->create($user); $id = $object->create($user);
@ -278,7 +278,7 @@ else if ($action == 'add' && $user->rights->ficheinter->creer)
$extrafieldsline = new ExtraFields($db); $extrafieldsline = new ExtraFields($db);
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef); $array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
$result = $object->addline( $result = $object->addline(
$user, $user,
@ -317,9 +317,9 @@ else if ($action == 'add' && $user->rights->ficheinter->creer)
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); $extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
$array_option = $extrafields->getOptionalsFromPost($extralabels); $array_option = $extrafields->getOptionalsFromPost($extralabels);
$object->array_options = $array_option; $object->array_options = $array_option;
$result = $object->create($user); $result = $object->create($user);
if ($result > 0) if ($result > 0)
{ {
@ -455,7 +455,7 @@ else if ($action == "addline" && $user->rights->ficheinter->creer)
$date_intervention = dol_mktime(GETPOST('dihour','int'), GETPOST('dimin','int'), 0, GETPOST('dimonth','int'), GETPOST('diday','int'), GETPOST('diyear','int')); $date_intervention = dol_mktime(GETPOST('dihour','int'), GETPOST('dimin','int'), 0, GETPOST('dimonth','int'), GETPOST('diday','int'), GETPOST('diyear','int'));
$duration = convertTime2Seconds(GETPOST('durationhour','int'), GETPOST('durationmin','int')); $duration = convertTime2Seconds(GETPOST('durationhour','int'), GETPOST('durationmin','int'));
// Extrafields // Extrafields
$extrafieldsline = new ExtraFields($db); $extrafieldsline = new ExtraFields($db);
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
@ -553,7 +553,7 @@ else if ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST(
$objectline->datei = $date_inter; $objectline->datei = $date_inter;
$objectline->desc = $desc; $objectline->desc = $desc;
$objectline->duration = $duration; $objectline->duration = $duration;
// Extrafields // Extrafields
$extrafieldsline = new ExtraFields($db); $extrafieldsline = new ExtraFields($db);
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
@ -1469,18 +1469,18 @@ else if ($id > 0 || ! empty($ref))
} }
print '</tr>'; print '</tr>';
$line = new FichinterLigne($db); $line = new FichinterLigne($db);
$line->fetch($objp->rowid); $line->fetch($objp->rowid);
$extrafieldsline = new ExtraFields($db); $extrafieldsline = new ExtraFields($db);
$extralabelslines=$extrafieldsline->fetch_name_optionals_label($line->table_element); $extralabelslines=$extrafieldsline->fetch_name_optionals_label($line->table_element);
$line->fetch_optionals($line->rowid, $extralabelslines); $line->fetch_optionals($line->rowid, $extralabelslines);
print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bc[$var], 'colspan'=>5)); print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bc[$var], 'colspan'=>5));
} }
// Line in update mode // Line in update mode
@ -1509,17 +1509,17 @@ else if ($id > 0 || ! empty($ref))
print '<td align="center" colspan="5" valign="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">'; print '<td align="center" colspan="5" valign="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
print '<br><input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></td>'; print '<br><input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></td>';
print '</tr>' . "\n"; print '</tr>' . "\n";
$line = new FichinterLigne($db); $line = new FichinterLigne($db);
$line->fetch($objp->rowid); $line->fetch($objp->rowid);
$extrafieldsline = new ExtraFields($db); $extrafieldsline = new ExtraFields($db);
$extralabelslines=$extrafieldsline->fetch_name_optionals_label($line->table_element); $extralabelslines=$extrafieldsline->fetch_name_optionals_label($line->table_element);
$line->fetch_optionals($line->rowid, $extralabelslines); $line->fetch_optionals($line->rowid, $extralabelslines);
print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>5)); print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>5));
} }
$i++; $i++;
@ -1570,16 +1570,16 @@ else if ($id > 0 || ! empty($ref))
print '<td align="center" valign="middle" colspan="4"><input type="submit" class="button" value="'.$langs->trans('Add').'" name="addline"></td>'; print '<td align="center" valign="middle" colspan="4"><input type="submit" class="button" value="'.$langs->trans('Add').'" name="addline"></td>';
print '</tr>'; print '</tr>';
//Line extrafield //Line extrafield
$lineadd = new FichinterLigne($db); $lineadd = new FichinterLigne($db);
$extrafieldsline = new ExtraFields($db); $extrafieldsline = new ExtraFields($db);
$extralabelslines=$extrafieldsline->fetch_name_optionals_label($lineadd->table_element); $extralabelslines=$extrafieldsline->fetch_name_optionals_label($lineadd->table_element);
print $lineadd->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>5)); print $lineadd->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>5));
if (! $num) print '</table>'; if (! $num) print '</table>';
} }

View File

@ -194,7 +194,7 @@ class CommandeFournisseur extends CommonOrder
$this->extraparams = (array) json_decode($obj->extraparams, true); $this->extraparams = (array) json_decode($obj->extraparams, true);
$this->db->free($resql); $this->db->free($resql);
// Retreive all extrafield // Retreive all extrafield
// fetch optionals attributes and labels // fetch optionals attributes and labels
require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'); require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php');
@ -658,7 +658,7 @@ class CommandeFournisseur extends CommonOrder
{ {
// Call trigger // Call trigger
$result=$this->call_trigger('ORDER_SUPPLIER_APPROVE',$user); $result=$this->call_trigger('ORDER_SUPPLIER_APPROVE',$user);
if ($result < 0) $error++; if ($result < 0) $error++;
// End call triggers // End call triggers
} }
@ -722,7 +722,7 @@ class CommandeFournisseur extends CommonOrder
$error++; $error++;
$this->db->rollback(); $this->db->rollback();
} }
else else
$this->db->commit(); $this->db->commit();
// End call triggers // End call triggers
} }
@ -774,7 +774,7 @@ class CommandeFournisseur extends CommonOrder
// Call trigger // Call trigger
$result=$this->call_trigger('ORDER_SUPPLIER_CANCEL',$user); $result=$this->call_trigger('ORDER_SUPPLIER_CANCEL',$user);
if ($result < 0) $error++; if ($result < 0) $error++;
// End call triggers // End call triggers
if ($error == 0) if ($error == 0)
@ -967,7 +967,7 @@ class CommandeFournisseur extends CommonOrder
{ {
// Call trigger // Call trigger
$result=$this->call_trigger('ORDER_SUPPLIER_CREATE',$user); $result=$this->call_trigger('ORDER_SUPPLIER_CREATE',$user);
if ($result < 0) if ($result < 0)
{ {
$this->db->rollback(); $this->db->rollback();
return -1; return -1;
@ -1037,7 +1037,7 @@ class CommandeFournisseur extends CommonOrder
// Call trigger // Call trigger
$result=$this->call_trigger('ORDER_SUPPLIER_CLONE',$user); $result=$this->call_trigger('ORDER_SUPPLIER_CLONE',$user);
if ($result < 0) $error++; if ($result < 0) $error++;
// End call triggers // End call triggers
} }
@ -1216,7 +1216,7 @@ class CommandeFournisseur extends CommonOrder
global $conf, $langs, $user; global $conf, $langs, $user;
// Call trigger // Call trigger
$result=$this->call_trigger('LINEORDER_SUPPLIER_CREATE',$user); $result=$this->call_trigger('LINEORDER_SUPPLIER_CREATE',$user);
if ($result < 0) if ($result < 0)
{ {
$this->db->rollback(); $this->db->rollback();
return -1; return -1;
@ -1285,7 +1285,7 @@ class CommandeFournisseur extends CommonOrder
global $conf, $langs, $user; global $conf, $langs, $user;
// Call trigger // Call trigger
$result=$this->call_trigger('LINEORDER_SUPPLIER_DISPATCH',$user); $result=$this->call_trigger('LINEORDER_SUPPLIER_DISPATCH',$user);
if ($result < 0) if ($result < 0)
{ {
$this->db->rollback(); $this->db->rollback();
return -1; return -1;
@ -1347,6 +1347,7 @@ class CommandeFournisseur extends CommonOrder
*/ */
function deleteline($idline, $notrigger=0) function deleteline($idline, $notrigger=0)
{ {
global $user,$langs,$conf;
if ($this->statut == 0) if ($this->statut == 0)
{ {
$this->db->begin(); $this->db->begin();
@ -1355,7 +1356,7 @@ class CommandeFournisseur extends CommonOrder
{ {
// Call trigger // Call trigger
$result=$this->call_trigger('LINEORDER_SUPPLIER_DELETE',$user); $result=$this->call_trigger('LINEORDER_SUPPLIER_DELETE',$user);
if ($result < 0) $error++; if ($result < 0) $error++;
// End call triggers // End call triggers
} }
@ -1403,7 +1404,7 @@ class CommandeFournisseur extends CommonOrder
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$error = 0; $error = 0;
// Call trigger // Call trigger
$result=$this->call_trigger('ORDER_SUPPLIER_DELETE',$user); $result=$this->call_trigger('ORDER_SUPPLIER_DELETE',$user);
if ($result < 0) if ($result < 0)
@ -1412,7 +1413,7 @@ class CommandeFournisseur extends CommonOrder
return -1; return -1;
} }
// End call triggers // End call triggers
$this->db->begin(); $this->db->begin();
@ -1807,7 +1808,7 @@ class CommandeFournisseur extends CommonOrder
global $conf, $langs, $user; global $conf, $langs, $user;
// Call trigger // Call trigger
$result=$this->call_trigger('LINEORDER_SUPPLIER_UPDATE',$user); $result=$this->call_trigger('LINEORDER_SUPPLIER_UPDATE',$user);
if ($result < 0) if ($result < 0)
{ {
$this->db->rollback(); $this->db->rollback();
return -1; return -1;
@ -1951,8 +1952,8 @@ class CommandeFournisseur extends CommonOrder
while ($obj=$this->db->fetch_object($resql)) while ($obj=$this->db->fetch_object($resql))
{ {
$this->nbtodo++; $this->nbtodo++;
$date_to_test = empty($obj->delivery_date) ? $obj->datec : $obj->delivery_date; $date_to_test = empty($obj->delivery_date) ? $obj->datec : $obj->delivery_date;
if ($obj->fk_statut != 3 && $this->db->jdate($date_to_test) < ($now - $conf->commande->fournisseur->warning_delay)) $this->nbtodolate++; if ($obj->fk_statut != 3 && $this->db->jdate($date_to_test) < ($now - $conf->commande->fournisseur->warning_delay)) $this->nbtodolate++;
} }
return 1; return 1;

View File

@ -15,7 +15,7 @@ body
/* Remove the background color to make it transparent */ /* Remove the background color to make it transparent */
background-color: #fff; background-color: #fff;
margin: 20px; margin: 8px;
} }
.cke_editable .cke_editable

View File

@ -297,6 +297,9 @@ create table llx_c_type_resource
active tinyint DEFAULT 1 NOT NULL active tinyint DEFAULT 1 NOT NULL
)ENGINE=innodb; )ENGINE=innodb;
-- Fix llx_c_type_resource when you update from a 3.6-beta
ALTER TABLE llx_c_type_resource CHANGE libelle label VARCHAR(64) NOT NULL;
ALTER TABLE llx_c_type_resource ADD UNIQUE INDEX uk_c_type_resource_id (label, code); ALTER TABLE llx_c_type_resource ADD UNIQUE INDEX uk_c_type_resource_id (label, code);
-- Fix :: account_parent must be an int, not an account number -- Fix :: account_parent must be an int, not an account number

View File

@ -80,11 +80,12 @@ ContractStatusClosed=Closed
ContractStatusRunning=Running ContractStatusRunning=Running
ContractStatusExpired=expired ContractStatusExpired=expired
ContractStatusOnHold=Not running ContractStatusOnHold=Not running
ContractStatusToRun=A mettre en service ContractStatusToRun=To get running
ContractNotRunning=This contract is not running ContractNotRunning=This contract is not running
ErrorProductAlreadyExists=A product with reference %s already exists. ErrorProductAlreadyExists=A product with reference %s already exists.
ErrorProductBadRefOrLabel=Wrong value for reference or label. ErrorProductBadRefOrLabel=Wrong value for reference or label.
ErrorProductClone=There was a problem while trying to clone the product or service. ErrorProductClone=There was a problem while trying to clone the product or service.
ErrorPriceCantBeLowerThanMinPrice=Error Price Can't Be Lower Than Minimum Price.
Suppliers=Suppliers Suppliers=Suppliers
SupplierRef=Supplier's product ref. SupplierRef=Supplier's product ref.
ShowProduct=Show product ShowProduct=Show product

View File

@ -1205,7 +1205,7 @@ class Product extends CommonObject
if ($newvat == '') $newvat=$this->tva_tx; if ($newvat == '') $newvat=$this->tva_tx;
if (! empty($newminprice) && ($newminprice > $newprice)) if (! empty($newminprice) && ($newminprice > $newprice))
{ {
$this->error='ErrorPricCanBeLowerThanMinPrice'; $this->error='ErrorPriceCantBeLowerThanMinPrice';
return -1; return -1;
} }

View File

@ -141,7 +141,7 @@ if ($object->id)
print '</div>'; print '</div>';
$modulepart = 'produit'; $modulepart = 'produit';
$permission = $user->rights->produit->creer; $permission = (($object->type == 0 && $user->rights->produit->creer) || ($object->type == 1 && $user->rights->service->creer));
$param = '&id=' . $object->id; $param = '&id=' . $object->id;
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
} }

View File

@ -244,6 +244,10 @@ a:hover { text-decoration: underline; color: #000000;}
input:focus, textarea:focus, button:focus, select:focus { input:focus, textarea:focus, button:focus, select:focus {
box-shadow: 0 0 4px #8091BF; box-shadow: 0 0 4px #8091BF;
} }
textarea.cke_source:focus
{
box-shadow: none;
}
input, input.flat, textarea, textarea.flat, form.flat select, select.flat { input, input.flat, textarea, textarea.flat, form.flat select, select.flat {
font-size: <?php print $fontsize ?>px; font-size: <?php print $fontsize ?>px;
@ -2555,6 +2559,10 @@ A.none, A.none:active, A.none:visited, A.none:hover {
/* CKEditor */ /* CKEditor */
/* ============================================================================== */ /* ============================================================================== */
.cke_editable
{
margin: 5px !important;
}
.cke_editor table, .cke_editor tr, .cke_editor td .cke_editor table, .cke_editor tr, .cke_editor td
{ {
border: 0px solid #FF0000 !important; border: 0px solid #FF0000 !important;