This commit is contained in:
Frédéric FRANCE 2019-10-20 11:59:21 +02:00
parent 9af0995cfa
commit 7581275316
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
46 changed files with 429 additions and 430 deletions

View File

@ -186,7 +186,7 @@
<!-- Check indent are done with spaces and with correct number --> <!-- Check indent are done with spaces and with correct number -->
<!-- Disabled as this does not support tab --> <!-- Disabled as this does not support tab -->
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> --> <!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
<!-- TODO Enable this
<arg name="tab-width" value="4"/> <arg name="tab-width" value="4"/>
<rule ref="Generic.WhiteSpace.ScopeIndent"> <rule ref="Generic.WhiteSpace.ScopeIndent">
<properties> <properties>
@ -194,7 +194,6 @@
<property name="tabIndent" value="true"/> <property name="tabIndent" value="true"/>
</properties> </properties>
</rule> </rule>
-->
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" /> <rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />

View File

@ -1835,13 +1835,13 @@ class Categorie extends CommonObject
} }
} }
// Call trigger // Call trigger
$result = $this->call_trigger('CATEGORY_SET_MULTILANGS', $user); $result = $this->call_trigger('CATEGORY_SET_MULTILANGS', $user);
if ($result < 0) { if ($result < 0) {
$this->error = $this->db->lasterror(); $this->error = $this->db->lasterror();
return -1; return -1;
} }
// End call triggers // End call triggers
return 1; return 1;
} }

View File

@ -267,7 +267,7 @@ class Opensurveysondage extends CommonObject
$this->db->free($resql); $this->db->free($resql);
} }
else else
{ {
$this->error="Error ".$this->db->lasterror(); $this->error="Error ".$this->db->lasterror();
$ret=-1; $ret=-1;
} }

View File

@ -168,10 +168,10 @@ $genPriceOptions = function ($level) use ($price_options) {
echo $langs->trans('SellingPrice').' '.$i; echo $langs->trans('SellingPrice').' '.$i;
// Label of price // Label of price
$keyforlabel='PRODUIT_MULTIPRICES_LABEL'.$i; $keyforlabel='PRODUIT_MULTIPRICES_LABEL'.$i;
if (! empty($conf->global->$keyforlabel)) { if (! empty($conf->global->$keyforlabel)) {
print ' - '.$langs->trans($conf->global->$keyforlabel); print ' - '.$langs->trans($conf->global->$keyforlabel);
} }
?> ?>
</td> </td>
<td style="text-align: center"> <td style="text-align: center">
<input type="text" style="text-align: right" name="var_percent[<?php echo $i ?>]" size="5" value="<?php echo price(isset($rules[$i]) ? $rules[$i]->var_percent : 0, 2) ?>"> <input type="text" style="text-align: right" name="var_percent[<?php echo $i ?>]" size="5" value="<?php echo price(isset($rules[$i]) ? $rules[$i]->var_percent : 0, 2) ?>">

View File

@ -483,7 +483,7 @@ foreach ($dirmodels as $reldir)
} }
print '</td>'; print '</td>';
// Info // Info
$htmltooltip = ''.$langs->trans("Name").': '.$module->name; $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); $htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
if ($module->type == 'pdf') if ($module->type == 'pdf')

View File

@ -113,7 +113,7 @@ dol_fiche_head('');
<tr><td><?php echo $langs->trans("SellingPrice"); ?></td> <tr><td><?php echo $langs->trans("SellingPrice"); ?></td>
<td><input name="price" size="10" value="<?php echo $object->price; ?>"> <td><input name="price" size="10" value="<?php echo $object->price; ?>">
<?php echo $object->price_base_type; ?> <?php echo $object->price_base_type; ?>
</td></tr> </td></tr>
<tr><td><?php echo $langs->trans("MinPrice"); ?></td> <tr><td><?php echo $langs->trans("MinPrice"); ?></td>
@ -121,7 +121,7 @@ dol_fiche_head('');
</td></tr> </td></tr>
<tr><td width="20%"><?php echo $langs->trans("VATRate"); ?></td><td> <tr><td width="20%"><?php echo $langs->trans("VATRate"); ?></td><td>
<?php echo $object->tva_tx; ?> <?php echo $object->tva_tx; ?>
</td></tr> </td></tr>
</table> </table>

View File

@ -57,7 +57,7 @@ dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref');
<?php if ($object->photos) { ?> <?php if ($object->photos) { ?>
<td valign="middle" align="center" width="30%" rowspan="<?php echo $object->nblines; ?>"> <td valign="middle" align="center" width="30%" rowspan="<?php echo $object->nblines; ?>">
<?php echo $object->photos; ?> <?php echo $object->photos; ?>
</td> </td>
<?php } ?> <?php } ?>

View File

@ -85,7 +85,7 @@ dol_fiche_head('');
<tr><td><?php echo $langs->trans("SellingPrice"); ?></td> <tr><td><?php echo $langs->trans("SellingPrice"); ?></td>
<td><input name="price" size="10" value="<?php echo $object->price; ?>"> <td><input name="price" size="10" value="<?php echo $object->price; ?>">
<?php echo $object->price_base_type; ?> <?php echo $object->price_base_type; ?>
</td></tr> </td></tr>
<tr><td><?php echo $langs->trans("MinPrice"); ?></td> <tr><td><?php echo $langs->trans("MinPrice"); ?></td>
@ -93,7 +93,7 @@ dol_fiche_head('');
</td></tr> </td></tr>
<tr><td width="20%"><?php echo $langs->trans("VATRate"); ?></td><td> <tr><td width="20%"><?php echo $langs->trans("VATRate"); ?></td><td>
<?php echo $object->tva_tx; ?> <?php echo $object->tva_tx; ?>
</td></tr> </td></tr>
</table> </table>

View File

@ -57,7 +57,7 @@ dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref');
<?php if ($object->photos) { ?> <?php if ($object->photos) { ?>
<td valign="middle" align="center" width="30%" rowspan="<?php echo $object->nblines; ?>"> <td valign="middle" align="center" width="30%" rowspan="<?php echo $object->nblines; ?>">
<?php echo $object->photos; ?> <?php echo $object->photos; ?>
</td> </td>
<?php } ?> <?php } ?>

View File

@ -1453,13 +1453,13 @@ else
print '</td></tr>'; print '</td></tr>';
if (empty($conf->global->PRODUCT_DISABLE_SIZE)) if (empty($conf->global->PRODUCT_DISABLE_SIZE))
{ {
// Brut Length // Brut Length
print '<tr><td>'.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").'</td><td colspan="3">'; print '<tr><td>'.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").'</td><td colspan="3">';
print '<input name="size" size="5" value="'.$object->length.'">x'; print '<input name="size" size="5" value="'.$object->length.'">x';
print '<input name="sizewidth" size="5" value="'.$object->width.'">x'; print '<input name="sizewidth" size="5" value="'.$object->width.'">x';
print '<input name="sizeheight" size="5" value="'.$object->height.'"> '; print '<input name="sizeheight" size="5" value="'.$object->height.'"> ';
print $formproduct->selectMeasuringUnits("size_units", "size", $object->length_units, 0, 2); print $formproduct->selectMeasuringUnits("size_units", "size", $object->length_units, 0, 2);
print '</td></tr>'; print '</td></tr>';
} }
if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) if (empty($conf->global->PRODUCT_DISABLE_SURFACE))
{ {
@ -2104,7 +2104,7 @@ if (! empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action =
$html .= '</td></tr>'; $html .= '</td></tr>';
} }
else else
{ {
$html .= '<tr><td style="width: 200px;">'; $html .= '<tr><td style="width: 200px;">';
$html .= $langs->trans("AddToDraftProposals").'</td><td>'; $html .= $langs->trans("AddToDraftProposals").'</td><td>';
$html .= $langs->trans("NoDraftProposals"); $html .= $langs->trans("NoDraftProposals");

View File

@ -1603,85 +1603,85 @@ class Product extends CommonObject
$price_base_type = $this->price_base_type; $price_base_type = $this->price_base_type;
// If price per segment // If price per segment
if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($thirdparty_buyer->price_level)) if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($thirdparty_buyer->price_level))
{ {
$pu_ht = $this->multiprices[$thirdparty_buyer->price_level]; $pu_ht = $this->multiprices[$thirdparty_buyer->price_level];
$pu_ttc = $this->multiprices_ttc[$thirdparty_buyer->price_level]; $pu_ttc = $this->multiprices_ttc[$thirdparty_buyer->price_level];
$price_min = $this->multiprices_min[$thirdparty_buyer->price_level]; $price_min = $this->multiprices_min[$thirdparty_buyer->price_level];
$price_base_type = $this->multiprices_base_type[$thirdparty_buyer->price_level]; $price_base_type = $this->multiprices_base_type[$thirdparty_buyer->price_level];
if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility
{ {
if (isset($this->multiprices_tva_tx[$thirdparty_buyer->price_level])) $tva_tx=$this->multiprices_tva_tx[$thirdparty_buyer->price_level]; if (isset($this->multiprices_tva_tx[$thirdparty_buyer->price_level])) $tva_tx=$this->multiprices_tva_tx[$thirdparty_buyer->price_level];
if (isset($this->multiprices_recuperableonly[$thirdparty_buyer->price_level])) $tva_npr=$this->multiprices_recuperableonly[$thirdparty_buyer->price_level]; if (isset($this->multiprices_recuperableonly[$thirdparty_buyer->price_level])) $tva_npr=$this->multiprices_recuperableonly[$thirdparty_buyer->price_level];
if (empty($tva_tx)) $tva_npr=0; if (empty($tva_tx)) $tva_npr=0;
} }
} }
// If price per customer // If price per customer
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
{ {
require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php';
$prodcustprice = new Productcustomerprice($db); $prodcustprice = new Productcustomerprice($db);
$filter = array('t.fk_product' => $this->id,'t.fk_soc' => $thirdparty_buyer->id); $filter = array('t.fk_product' => $this->id,'t.fk_soc' => $thirdparty_buyer->id);
$result = $prodcustprice->fetch_all('', '', 0, 0, $filter); $result = $prodcustprice->fetch_all('', '', 0, 0, $filter);
if ($result) { if ($result) {
if (count($prodcustprice->lines) > 0) { if (count($prodcustprice->lines) > 0) {
$pu_ht = price($prodcustprice->lines[0]->price); $pu_ht = price($prodcustprice->lines[0]->price);
$pu_ttc = price($prodcustprice->lines[0]->price_ttc); $pu_ttc = price($prodcustprice->lines[0]->price_ttc);
$price_base_type = $prodcustprice->lines[0]->price_base_type; $price_base_type = $prodcustprice->lines[0]->price_base_type;
$tva_tx = $prodcustprice->lines[0]->tva_tx; $tva_tx = $prodcustprice->lines[0]->tva_tx;
if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
$tva_npr = $prodcustprice->lines[0]->recuperableonly; $tva_npr = $prodcustprice->lines[0]->recuperableonly;
if (empty($tva_tx)) $tva_npr=0; if (empty($tva_tx)) $tva_npr=0;
}
}
} }
}
}
// If price per quantity // If price per quantity
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY))
{ {
if ($this->prices_by_qty[0]) // yes, this product has some prices per quantity if ($this->prices_by_qty[0]) // yes, this product has some prices per quantity
{
// Search price into product_price_by_qty from $this->id
foreach($this->prices_by_qty_list[0] as $priceforthequantityarray)
{
if ($priceforthequantityarray['rowid'] != $pqp) continue;
// We found the price
if ($priceforthequantityarray['price_base_type'] == 'HT')
{ {
// Search price into product_price_by_qty from $this->id $pu_ht = $priceforthequantityarray['unitprice'];
foreach($this->prices_by_qty_list[0] as $priceforthequantityarray)
{
if ($priceforthequantityarray['rowid'] != $pqp) continue;
// We found the price
if ($priceforthequantityarray['price_base_type'] == 'HT')
{
$pu_ht = $priceforthequantityarray['unitprice'];
}
else
{
$pu_ttc = $priceforthequantityarray['unitprice'];
}
break;
}
} }
else
{
$pu_ttc = $priceforthequantityarray['unitprice'];
}
break;
} }
}
}
// If price per quantity and customer // If price per quantity and customer
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES))
{ {
if ($this->prices_by_qty[$thirdparty_buyer->price_level]) // yes, this product has some prices per quantity if ($this->prices_by_qty[$thirdparty_buyer->price_level]) // yes, this product has some prices per quantity
{
// Search price into product_price_by_qty from $this->id
foreach($this->prices_by_qty_list[$thirdparty_buyer->price_level] as $priceforthequantityarray)
{
if ($priceforthequantityarray['rowid'] != $pqp) continue;
// We found the price
if ($priceforthequantityarray['price_base_type'] == 'HT')
{ {
// Search price into product_price_by_qty from $this->id $pu_ht = $priceforthequantityarray['unitprice'];
foreach($this->prices_by_qty_list[$thirdparty_buyer->price_level] as $priceforthequantityarray)
{
if ($priceforthequantityarray['rowid'] != $pqp) continue;
// We found the price
if ($priceforthequantityarray['price_base_type'] == 'HT')
{
$pu_ht = $priceforthequantityarray['unitprice'];
}
else
{
$pu_ttc = $priceforthequantityarray['unitprice'];
}
break;
}
} }
else
{
$pu_ttc = $priceforthequantityarray['unitprice'];
}
break;
} }
}
}
return array('pu_ht'=>$pu_ht, 'pu_ttc'=>$pu_ttc, 'price_min'=>$price_min, 'price_base_type'=>$price_base_type, 'tva_tx'=>$tva_tx, 'tva_npr'=>$tva_npr); return array('pu_ht'=>$pu_ht, 'pu_ttc'=>$pu_ttc, 'price_min'=>$price_min, 'price_base_type'=>$price_base_type, 'tva_tx'=>$tva_tx, 'tva_npr'=>$tva_npr);
} }
@ -4293,14 +4293,14 @@ class Product extends CommonObject
{ {
switch ($type) switch ($type)
{ {
case 0: case 0:
return $this->LibStatut($this->status, $mode, $type); return $this->LibStatut($this->status, $mode, $type);
case 1: case 1:
return $this->LibStatut($this->status_buy, $mode, $type); return $this->LibStatut($this->status_buy, $mode, $type);
case 2: case 2:
return $this->LibStatut($this->status_batch, $mode, $type); return $this->LibStatut($this->status_batch, $mode, $type);
default: default:
//Simulate previous behavior but should return an error string //Simulate previous behavior but should return an error string
return $this->LibStatut($this->status_buy, $mode, $type); return $this->LibStatut($this->status_buy, $mode, $type);
} }
} }

View File

@ -6,45 +6,45 @@ require_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php';
$get = GETPOST('get', 'alpha'); $get = GETPOST('get', 'alpha');
$put = GETPOST('put', 'alpha'); $put = GETPOST('put', 'alpha');
switch ($put) switch ($put)
{ {
case 'qty': case 'qty':
if (empty($user->rights->stock->creer)) { echo -1; exit; } if (empty($user->rights->stock->creer)) { echo -1; exit; }
$fk_det_inventory = GETPOST('fk_det_inventory'); $fk_det_inventory = GETPOST('fk_det_inventory');
$det = new InventoryLine($db); $det = new InventoryLine($db);
if( $det->fetch($fk_det_inventory)) if( $det->fetch($fk_det_inventory))
{ {
$det->qty_view+=GETPOST('qty'); $det->qty_view+=GETPOST('qty');
$res = $det->update($user); $res = $det->update($user);
echo $det->qty_view; echo $det->qty_view;
} }
else else
{ {
echo -2; echo -2;
} }
break; break;
case 'pmp': case 'pmp':
if (empty($user->rights->stock->creer) || empty($user->rights->stock->changePMP)) { echo -1; exit; } if (empty($user->rights->stock->creer) || empty($user->rights->stock->changePMP)) { echo -1; exit; }
$fk_det_inventory = GETPOST('fk_det_inventory'); $fk_det_inventory = GETPOST('fk_det_inventory');
$det = new InventoryLine($db); $det = new InventoryLine($db);
if( $det->fetch($fk_det_inventory)) if( $det->fetch($fk_det_inventory))
{ {
$det->new_pmp=price2num(GETPOST('pmp')); $det->new_pmp=price2num(GETPOST('pmp'));
$det->update($user); $det->update($user);
echo $det->new_pmp; echo $det->new_pmp;
} }
else else
{ {
echo -2; echo -2;
} }
break; break;
} }

View File

@ -475,10 +475,10 @@ if (empty($reshook))
{ {
$priceid = GETPOST('priceid', 'int'); $priceid = GETPOST('priceid', 'int');
if (!empty($rowid)) { if (!empty($rowid)) {
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "product_price_by_qty"; $sql = "DELETE FROM " . MAIN_DB_PREFIX . "product_price_by_qty";
$sql .= " WHERE fk_product_price = " . $priceid; $sql .= " WHERE fk_product_price = " . $priceid;
$result = $db->query($sql); $result = $db->query($sql);
} else { } else {
setEventMessages(('delete_price_by_qty'.$langs->transnoentities(MissingIds)), null, 'errors'); setEventMessages(('delete_price_by_qty'.$langs->transnoentities(MissingIds)), null, 'errors');
} }
@ -755,17 +755,17 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUI
if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility
{ {
// TVA // TVA
print '<tr><td>' . $langs->trans("DefaultTaxRate") . '</td><td colspan="2">'; print '<tr><td>' . $langs->trans("DefaultTaxRate") . '</td><td colspan="2">';
$positiverates=''; $positiverates='';
if (price2num($object->multiprices_tva_tx[$soc->price_level])) $positiverates.=($positiverates?'/':'').price2num($object->multiprices_tva_tx[$soc->price_level]); if (price2num($object->multiprices_tva_tx[$soc->price_level])) $positiverates.=($positiverates?'/':'').price2num($object->multiprices_tva_tx[$soc->price_level]);
if (price2num($object->multiprices_localtax1_type[$soc->price_level])) $positiverates.=($positiverates?'/':'').price2num($object->multiprices_localtax1_tx[$soc->price_level]); if (price2num($object->multiprices_localtax1_type[$soc->price_level])) $positiverates.=($positiverates?'/':'').price2num($object->multiprices_localtax1_tx[$soc->price_level]);
if (price2num($object->multiprices_localtax2_type[$soc->price_level])) $positiverates.=($positiverates?'/':'').price2num($object->multiprices_localtax2_tx[$soc->price_level]); if (price2num($object->multiprices_localtax2_type[$soc->price_level])) $positiverates.=($positiverates?'/':'').price2num($object->multiprices_localtax2_tx[$soc->price_level]);
if (empty($positiverates)) $positiverates='0'; if (empty($positiverates)) $positiverates='0';
echo vatrate($positiverates.($object->default_vat_code?' ('.$object->default_vat_code.')':''), '%', $object->tva_npr); echo vatrate($positiverates.($object->default_vat_code?' ('.$object->default_vat_code.')':''), '%', $object->tva_npr);
//print vatrate($object->multiprices_tva_tx[$soc->price_level], true); //print vatrate($object->multiprices_tva_tx[$soc->price_level], true);
print '</td></tr>'; print '</td></tr>';
} }
else else
{ {
@ -791,10 +791,10 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES) || ! empty($conf->global->PRODUI
{ {
if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility
{ {
// We show only vat for level 1 // We show only vat for level 1
print '<tr><td class="titlefield">' . $langs->trans("DefaultTaxRate") . '</td>'; print '<tr><td class="titlefield">' . $langs->trans("DefaultTaxRate") . '</td>';
print '<td colspan="2">' . vatrate($object->multiprices_tva_tx[1], true) . '</td>'; print '<td colspan="2">' . vatrate($object->multiprices_tva_tx[1], true) . '</td>';
print '</tr>'; print '</tr>';
} }
else else
{ {

View File

@ -68,8 +68,8 @@ $extrafields->fetch_name_optionals_label($object->table_element);
// Load object // Load object
if ($id > 0 || ! empty($ref)) { if ($id > 0 || ! empty($ref)) {
$ret = $object->fetch($id, $ref); $ret = $object->fetch($id, $ref);
// if ($ret > 0) // if ($ret > 0)
// $ret = $object->fetch_thirdparty(); // $ret = $object->fetch_thirdparty();
if ($ret <= 0) { if ($ret <= 0) {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
$action = ''; $action = '';

View File

@ -947,8 +947,8 @@ class MouvementStock extends CommonObject
$result=dol_include_once('/'.$origintype.'/class/'.$origintype.'.class.php'); $result=dol_include_once('/'.$origintype.'/class/'.$origintype.'.class.php');
if ($result) if ($result)
{ {
$classname = ucfirst($origintype); $classname = ucfirst($origintype);
$origin = new $classname($this->db); $origin = new $classname($this->db);
} }
} }
break; break;

View File

@ -195,7 +195,7 @@ if ($action == 'createmovements')
if (empty($conf->productbatch->enabled) || ! $product->hasbatch()) // If product does not need lot/serial if (empty($conf->productbatch->enabled) || ! $product->hasbatch()) // If product does not need lot/serial
{ {
// Remove stock // Remove stock
$result1=$product->correct_stock( $result1=$product->correct_stock(
$user, $user,
$id_sw, $id_sw,
$qty, $qty,
@ -211,7 +211,7 @@ if ($action == 'createmovements')
} }
// Add stock // Add stock
$result2=$product->correct_stock( $result2=$product->correct_stock(
$user, $user,
$id_tw, $id_tw,
$qty, $qty,
@ -243,7 +243,7 @@ if ($action == 'createmovements')
} }
// Remove stock // Remove stock
$result1=$product->correct_stock_batch( $result1=$product->correct_stock_batch(
$user, $user,
$id_sw, $id_sw,
$qty, $qty,
@ -262,7 +262,7 @@ if ($action == 'createmovements')
} }
// Add stock // Add stock
$result2=$product->correct_stock_batch( $result2=$product->correct_stock_batch(
$user, $user,
$id_tw, $id_tw,
$qty, $qty,

View File

@ -202,7 +202,7 @@ if ($action == "correct_stock")
$eatby=dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); $eatby=dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear'));
$sellby=dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); $sellby=dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear'));
$result=$product->correct_stock_batch( $result=$product->correct_stock_batch(
$user, $user,
$id, $id,
GETPOST("nbpiece", 'int'), GETPOST("nbpiece", 'int'),
@ -217,7 +217,7 @@ if ($action == "correct_stock")
} }
else else
{ {
$result=$product->correct_stock( $result=$product->correct_stock(
$user, $user,
$id, $id,
GETPOST("nbpiece", 'int'), GETPOST("nbpiece", 'int'),

View File

@ -374,7 +374,7 @@ if ($action == "transfert_stock" && ! $cancel)
if (! $error) if (! $error)
{ {
// Remove stock // Remove stock
$result1=$object->correct_stock_batch( $result1=$object->correct_stock_batch(
$user, $user,
$srcwarehouseid, $srcwarehouseid,
GETPOST("nbpiece", 'int'), GETPOST("nbpiece", 'int'),
@ -389,7 +389,7 @@ if ($action == "transfert_stock" && ! $cancel)
if (! $error) if (! $error)
{ {
// Add stock // Add stock
$result2=$object->correct_stock_batch( $result2=$object->correct_stock_batch(
$user, $user,
GETPOST("id_entrepot_destination", 'int'), GETPOST("id_entrepot_destination", 'int'),
GETPOST("nbpiece", 'int'), GETPOST("nbpiece", 'int'),

View File

@ -180,7 +180,7 @@ if (empty($reshook))
{ {
// Creation KO // Creation KO
if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors');
else setEventMessages($object->error, null, 'errors'); else setEventMessages($object->error, null, 'errors');
$action='create'; $action='create';
} }
} }
@ -369,7 +369,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (empty($reshook)) if (empty($reshook))
{ {
/*TODO if ($user->rights->stock->lire) /*TODO if ($user->rights->stock->lire)
{ {
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a></div>'."\n"; print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a></div>'."\n";
} }
@ -378,7 +378,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
{ {
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a></div>'."\n"; print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a></div>'."\n";
} }
*/ */
} }
print '</div>'."\n"; print '</div>'."\n";

View File

@ -107,10 +107,10 @@ $arrayfields=array(
// Extra fields // Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{ {
foreach($extrafields->attribute_label as $key => $val) foreach($extrafields->attribute_label as $key => $val)
{ {
if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key])); if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key]));
} }
} }
// Load object if id or ref is provided as parameter // Load object if id or ref is provided as parameter

View File

@ -492,7 +492,7 @@ if ($sref || $snom || $sall || $salert || $draftorder || GETPOST('search', 'alph
$filters .= '&mode=' . $mode; $filters .= '&mode=' . $mode;
$filters .= '&fk_supplier=' . $fk_supplier; $filters .= '&fk_supplier=' . $fk_supplier;
$filters .= '&fk_entrepot=' . $fk_entrepot; $filters .= '&fk_entrepot=' . $fk_entrepot;
print_barre_liste( print_barre_liste(
$texte, $texte,
$page, $page,
'replenish.php', 'replenish.php',
@ -511,7 +511,7 @@ print_barre_liste(
$filters .= '&mode=' . $mode; $filters .= '&mode=' . $mode;
$filters .= '&fk_supplier=' . $fk_supplier; $filters .= '&fk_supplier=' . $fk_supplier;
$filters .= '&fk_entrepot=' . $fk_entrepot; $filters .= '&fk_entrepot=' . $fk_entrepot;
print_barre_liste( print_barre_liste(
$texte, $texte,
$page, $page,
'replenish.php', 'replenish.php',

View File

@ -66,28 +66,28 @@ if (empty($conf) || ! is_object($conf)) {
// Warehouse or product // Warehouse or product
print '<tr>'; print '<tr>';
if ($object->element == 'product') if ($object->element == 'product')
{ {
print '<td class="fieldrequired">'.$langs->trans("Warehouse").'</td>'; print '<td class="fieldrequired">'.$langs->trans("Warehouse").'</td>';
print '<td>'; print '<td>';
print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid", 'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot', 'int'):($object->element=='product' && $object->fk_default_warehouse?$object->fk_default_warehouse:'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100'); print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid", 'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot', 'int'):($object->element=='product' && $object->fk_default_warehouse?$object->fk_default_warehouse:'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100');
print ' &nbsp; <select name="mouvement" id="mouvement">'; print ' &nbsp; <select name="mouvement" id="mouvement">';
print '<option value="0">'.$langs->trans("Add").'</option>'; print '<option value="0">'.$langs->trans("Add").'</option>';
print '<option value="1"'.(GETPOST('mouvement')?' selected="selected"':'').'>'.$langs->trans("Delete").'</option>'; print '<option value="1"'.(GETPOST('mouvement')?' selected="selected"':'').'>'.$langs->trans("Delete").'</option>';
print '</select>'; print '</select>';
print '</td>'; print '</td>';
} }
if ($object->element == 'stock') if ($object->element == 'stock')
{ {
print '<td class="fieldrequired">'.$langs->trans("Product").'</td>'; print '<td class="fieldrequired">'.$langs->trans("Product").'</td>';
print '<td>'; print '<td>';
print $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); print $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500');
print ' &nbsp; <select name="mouvement" id="mouvement">'; print ' &nbsp; <select name="mouvement" id="mouvement">';
print '<option value="0">'.$langs->trans("Add").'</option>'; print '<option value="0">'.$langs->trans("Add").'</option>';
print '<option value="1"'.(GETPOST('mouvement')?' selected="selected"':'').'>'.$langs->trans("Delete").'</option>'; print '<option value="1"'.(GETPOST('mouvement')?' selected="selected"':'').'>'.$langs->trans("Delete").'</option>';
print '</select>'; print '</select>';
print '</td>'; print '</td>';
} }
print '<td class="fieldrequired">'.$langs->trans("NumberOfUnit").'</td>'; print '<td class="fieldrequired">'.$langs->trans("NumberOfUnit").'</td>';
print '<td><input name="nbpiece" id="nbpiece" size="10" value="'.GETPOST("nbpiece").'"></td>'; print '<td><input name="nbpiece" id="nbpiece" size="10" value="'.GETPOST("nbpiece").'"></td>';
print '</tr>'; print '</tr>';
@ -96,37 +96,37 @@ if (empty($conf) || ! is_object($conf)) {
print '<tr>'; print '<tr>';
print '<td>'.$langs->trans("UnitPurchaseValue").'</td>'; print '<td>'.$langs->trans("UnitPurchaseValue").'</td>';
print '<td colspan="'.(!empty($conf->projet->enabled) ? '1' : '3').'"><input name="unitprice" id="unitprice" size="10" value="'.GETPOST("unitprice").'"></td>'; print '<td colspan="'.(!empty($conf->projet->enabled) ? '1' : '3').'"><input name="unitprice" id="unitprice" size="10" value="'.GETPOST("unitprice").'"></td>';
if (! empty($conf->projet->enabled)) if (! empty($conf->projet->enabled))
{ {
print '<td>'.$langs->trans('Project').'</td>'; print '<td>'.$langs->trans('Project').'</td>';
print '<td>'; print '<td>';
$formproject->select_projects(-1, '', 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth300'); $formproject->select_projects(-1, '', 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth300');
print '</td>'; print '</td>';
} }
print '</tr>'; print '</tr>';
// Serial / Eat-by date // Serial / Eat-by date
if (! empty($conf->productbatch->enabled) && if (! empty($conf->productbatch->enabled) &&
(($object->element == 'product' && $object->hasbatch()) (($object->element == 'product' && $object->hasbatch())
|| ($object->element == 'stock')) || ($object->element == 'stock'))
) )
{ {
print '<tr>'; print '<tr>';
print '<td'.($object->element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").'</td><td colspan="3">'; print '<td'.($object->element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").'</td><td colspan="3">';
print '<input type="text" name="batch_number" size="40" value="'.GETPOST("batch_number").'">'; print '<input type="text" name="batch_number" size="40" value="'.GETPOST("batch_number").'">';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
print '<tr>'; print '<tr>';
print '<td>'.$langs->trans("EatByDate").'</td><td>'; print '<td>'.$langs->trans("EatByDate").'</td><td>';
$eatbyselected=dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); $eatbyselected=dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear'));
print $form->selectDate($eatbyselected, 'eatby', '', '', 1, ""); print $form->selectDate($eatbyselected, 'eatby', '', '', 1, "");
print '</td>'; print '</td>';
print '<td>'.$langs->trans("SellByDate").'</td><td>'; print '<td>'.$langs->trans("SellByDate").'</td><td>';
$sellbyselected=dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); $sellbyselected=dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear'));
print $form->selectDate($sellbyselected, 'sellby', '', '', 1, ""); print $form->selectDate($sellbyselected, 'sellby', '', '', 1, "");
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
} }
// Label of mouvement of id of inventory // Label of mouvement of id of inventory
$valformovementlabel=((GETPOST("label") && (GETPOST('label') != $langs->trans("MovementCorrectStock", ''))) ? GETPOST("label") : $langs->trans("MovementCorrectStock", $productref)); $valformovementlabel=((GETPOST("label") && (GETPOST('label') != $langs->trans("MovementCorrectStock", ''))) ? GETPOST("label") : $langs->trans("MovementCorrectStock", $productref));

View File

@ -40,18 +40,18 @@ if (empty($conf) || ! is_object($conf)) {
$pdluo = new Productbatch($db); $pdluo = new Productbatch($db);
if ($pdluoid > 0) if ($pdluoid > 0)
{ {
$result=$pdluo->fetch($pdluoid); $result=$pdluo->fetch($pdluoid);
if ($result > 0) if ($result > 0)
{ {
$pdluoid=$pdluo->id; $pdluoid=$pdluo->id;
} }
else else
{ {
dol_print_error($db, $pdluo->error, $pdluo->errors); dol_print_error($db, $pdluo->error, $pdluo->errors);
} }
} }
print load_fiche_titre($langs->trans("StockTransfer"), '', 'generic'); print load_fiche_titre($langs->trans("StockTransfer"), '', 'generic');
@ -62,28 +62,28 @@ if (empty($conf) || ! is_object($conf)) {
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="transfert_stock">'; print '<input type="hidden" name="action" value="transfert_stock">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
if ($pdluoid) if ($pdluoid)
{ {
print '<input type="hidden" name="pdluoid" value="'.$pdluoid.'">'; print '<input type="hidden" name="pdluoid" value="'.$pdluoid.'">';
} }
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Source warehouse or product // Source warehouse or product
print '<tr>'; print '<tr>';
if ($object->element == 'product') if ($object->element == 'product')
{ {
print '<td class="fieldrequired">'.$langs->trans("WarehouseSource").'</td>'; print '<td class="fieldrequired">'.$langs->trans("WarehouseSource").'</td>';
print '<td>'; print '<td>';
print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid", 'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot', 'int'):($object->element=='product' && $object->fk_default_warehouse?$object->fk_default_warehouse:'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1); print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid", 'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot', 'int'):($object->element=='product' && $object->fk_default_warehouse?$object->fk_default_warehouse:'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1);
print '</td>'; print '</td>';
} }
if ($object->element == 'stock') if ($object->element == 'stock')
{ {
print '<td class="fieldrequired">'.$langs->trans("Product").'</td>'; print '<td class="fieldrequired">'.$langs->trans("Product").'</td>';
print '<td>'; print '<td>';
print $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); print $form->select_produits(GETPOST('product_id', 'int'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500');
print '</td>'; print '</td>';
} }
print '<td class="fieldrequired">'.$langs->trans("WarehouseTarget").'</td><td>'; print '<td class="fieldrequired">'.$langs->trans("WarehouseTarget").'</td><td>';
print $formproduct->selectWarehouses(GETPOST('id_entrepot_destination'), 'id_entrepot_destination', 'warehouseopen,warehouseinternal', 1); print $formproduct->selectWarehouses(GETPOST('id_entrepot_destination'), 'id_entrepot_destination', 'warehouseopen,warehouseinternal', 1);
@ -92,35 +92,35 @@ if (empty($conf) || ! is_object($conf)) {
print '</tr>'; print '</tr>';
// Serial / Eat-by date // Serial / Eat-by date
if (! empty($conf->productbatch->enabled) && if (! empty($conf->productbatch->enabled) &&
(($object->element == 'product' && $object->hasbatch()) (($object->element == 'product' && $object->hasbatch())
|| ($object->element == 'stock')) || ($object->element == 'stock'))
) )
{ {
print '<tr>'; print '<tr>';
print '<td'.($object->element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").'</td><td colspan="3">'; print '<td'.($object->element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").'</td><td colspan="3">';
if ($pdluoid > 0) if ($pdluoid > 0)
{ {
// If form was opened for a specific pdluoid, field is disabled // If form was opened for a specific pdluoid, field is disabled
print '<input type="text" name="batch_number_bis" size="40" disabled="disabled" value="'.(GETPOST('batch_number')?GETPOST('batch_number'):$pdluo->batch).'">'; print '<input type="text" name="batch_number_bis" size="40" disabled="disabled" value="'.(GETPOST('batch_number')?GETPOST('batch_number'):$pdluo->batch).'">';
print '<input type="hidden" name="batch_number" value="'.(GETPOST('batch_number')?GETPOST('batch_number'):$pdluo->batch).'">'; print '<input type="hidden" name="batch_number" value="'.(GETPOST('batch_number')?GETPOST('batch_number'):$pdluo->batch).'">';
} }
else else
{ {
print '<input type="text" name="batch_number" size="40" value="'.(GETPOST('batch_number')?GETPOST('batch_number'):$pdluo->batch).'">'; print '<input type="text" name="batch_number" size="40" value="'.(GETPOST('batch_number')?GETPOST('batch_number'):$pdluo->batch).'">';
} }
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
print '<tr>'; print '<tr>';
print '<td>'.$langs->trans("EatByDate").'</td><td>'; print '<td>'.$langs->trans("EatByDate").'</td><td>';
print $form->selectDate(($d_eatby?$d_eatby:$pdluo->eatby), 'eatby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled print $form->selectDate(($d_eatby?$d_eatby:$pdluo->eatby), 'eatby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled
print '</td>'; print '</td>';
print '<td>'.$langs->trans("SellByDate").'</td><td>'; print '<td>'.$langs->trans("SellByDate").'</td><td>';
print $form->selectDate(($d_sellby?$d_sellby:$pdluo->sellby), 'sellby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled print $form->selectDate(($d_sellby?$d_sellby:$pdluo->sellby), 'sellby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
} }
// Label // Label
$valformovementlabel=(GETPOST("label")?GETPOST("label"):$langs->trans("MovementTransferStock", $productref)); $valformovementlabel=(GETPOST("label")?GETPOST("label"):$langs->trans("MovementTransferStock", $productref));

View File

@ -813,23 +813,23 @@ if (count($tasksarray) > 0)
print ' - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong>'; print ' - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong>';
print '</td>'; print '</td>';
for ($idw = 0; $idw < 7; $idw++) for ($idw = 0; $idw < 7; $idw++)
{ {
$cssweekend=''; $cssweekend='';
if (($idw + 1) < $numstartworkingday || ($idw + 1) > $numendworkingday) // This is a day is not inside the setup of working days, so we use a week-end css. if (($idw + 1) < $numstartworkingday || ($idw + 1) > $numendworkingday) // This is a day is not inside the setup of working days, so we use a week-end css.
{ {
$cssweekend='weekend'; $cssweekend='weekend';
} }
$tmpday=dol_time_plus_duree($firstdaytoshow, $idw, 'd'); $tmpday=dol_time_plus_duree($firstdaytoshow, $idw, 'd');
$cssonholiday=''; $cssonholiday='';
if (! $isavailable[$tmpday]['morning'] && ! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayallday '; if (! $isavailable[$tmpday]['morning'] && ! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayallday ';
elseif (! $isavailable[$tmpday]['morning']) $cssonholiday.='onholidaymorning '; elseif (! $isavailable[$tmpday]['morning']) $cssonholiday.='onholidaymorning ';
elseif (! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayafternoon '; elseif (! $isavailable[$tmpday]['afternoon']) $cssonholiday.='onholidayafternoon ';
print '<td class="liste_total hide'.$idw.($cssonholiday?' '.$cssonholiday:'').($cssweekend?' '.$cssweekend:'').'" align="center"><div class="totalDay'.$idw.'">&nbsp;</div></td>'; print '<td class="liste_total hide'.$idw.($cssonholiday?' '.$cssonholiday:'').($cssweekend?' '.$cssweekend:'').'" align="center"><div class="totalDay'.$idw.'">&nbsp;</div></td>';
} }
print '<td class="liste_total center"><div class="totalDayAll">&nbsp;</div></td> print '<td class="liste_total center"><div class="totalDayAll">&nbsp;</div></td>
</tr>'; </tr>';
} }

View File

@ -401,7 +401,7 @@ class Project extends CommonObject
$result = 1; $result = 1;
} }
else else
{ {
$this->db->rollback(); $this->db->rollback();
$result = -1; $result = -1;
} }
@ -1222,7 +1222,7 @@ class Project extends CommonObject
// No filter. Use this if user has permission to see all project // No filter. Use this if user has permission to see all project
} }
$sql.= $filter; $sql.= $filter;
//print $sql; //print $sql;
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
@ -1722,23 +1722,23 @@ class Project extends CommonObject
$num = $this->db->num_rows($resql); $num = $this->db->num_rows($resql);
$i = 0; $i = 0;
// Loop on each record found, so each couple (project id, task id) // Loop on each record found, so each couple (project id, task id)
while ($i < $num) while ($i < $num)
{ {
$obj=$this->db->fetch_object($resql); $obj=$this->db->fetch_object($resql);
$day=$this->db->jdate($obj->task_date); // task_date is date without hours $day=$this->db->jdate($obj->task_date); // task_date is date without hours
if (empty($daylareadyfound[$day])) if (empty($daylareadyfound[$day]))
{ {
$this->weekWorkLoad[$day] = $obj->task_duration; $this->weekWorkLoad[$day] = $obj->task_duration;
$this->weekWorkLoadPerTask[$day][$obj->fk_task] = $obj->task_duration; $this->weekWorkLoadPerTask[$day][$obj->fk_task] = $obj->task_duration;
} }
else else
{ {
$this->weekWorkLoad[$day] += $obj->task_duration; $this->weekWorkLoad[$day] += $obj->task_duration;
$this->weekWorkLoadPerTask[$day][$obj->fk_task] += $obj->task_duration; $this->weekWorkLoadPerTask[$day][$obj->fk_task] += $obj->task_duration;
} }
$daylareadyfound[$day]=1; $daylareadyfound[$day]=1;
$i++; $i++;
} }
$this->db->free($resql); $this->db->free($resql);
return 1; return 1;
} }

View File

@ -852,15 +852,15 @@ class Task extends CommonObject
$sql.=" t.rowid, t.ref, t.label, t.description, t.fk_task_parent, t.duration_effective, t.progress, t.fk_statut,"; $sql.=" t.rowid, t.ref, t.label, t.description, t.fk_task_parent, t.duration_effective, t.progress, t.fk_statut,";
$sql.=" t.dateo, t.datee, t.planned_workload, t.rang,"; $sql.=" t.dateo, t.datee, t.planned_workload, t.rang,";
$sql.=" s.rowid, s.nom, s.email,"; $sql.=" s.rowid, s.nom, s.email,";
$sql.=" p.fk_opp_status, p.opp_amount, p.opp_percent, p.budget_amount"; $sql.=" p.fk_opp_status, p.opp_amount, p.opp_percent, p.budget_amount";
if (!empty($extrafields->attributes['projet']['label'])) if (!empty($extrafields->attributes['projet']['label']))
{ {
foreach ($extrafields->attributes['projet']['label'] as $key => $val) $sql.=($extrafields->attributes['projet']['type'][$key] != 'separate' ? ",efp.".$key : ''); foreach ($extrafields->attributes['projet']['label'] as $key => $val) $sql.=($extrafields->attributes['projet']['type'][$key] != 'separate' ? ",efp.".$key : '');
} }
if (!empty($extrafields->attributes['projet_task']['label'])) if (!empty($extrafields->attributes['projet_task']['label']))
{ {
foreach ($extrafields->attributes['projet_task']['label'] as $key => $val) $sql.=($extrafields->attributes['projet_task']['type'][$key] != 'separate' ? ",efpt.".$key : ''); foreach ($extrafields->attributes['projet_task']['label'] as $key => $val) $sql.=($extrafields->attributes['projet_task']['type'][$key] != 'separate' ? ",efpt.".$key : '');
} }
} }
$sql.= " ORDER BY p.ref, t.rang, t.dateo"; $sql.= " ORDER BY p.ref, t.rang, t.dateo";

View File

@ -863,8 +863,8 @@ foreach ($listofreferent as $key => $value)
if (canApplySubtotalOn($tablename)) if (canApplySubtotalOn($tablename))
{ {
// Sort // Sort
$elementarray = sortElementsByClientName($elementarray); $elementarray = sortElementsByClientName($elementarray);
} }
$num=count($elementarray); $num=count($elementarray);
@ -1077,9 +1077,9 @@ foreach ($listofreferent as $key => $value)
if ($othermessage) print $othermessage; if ($othermessage) print $othermessage;
if (isset($total_ht_by_line)) if (isset($total_ht_by_line))
{ {
if (! $qualifiedfortotal) print '<strike>'; if (! $qualifiedfortotal) print '<strike>';
print price($total_ht_by_line); print price($total_ht_by_line);
if (! $qualifiedfortotal) print '</strike>'; if (! $qualifiedfortotal) print '</strike>';
} }
if ($warning) print ' '.img_warning($warning); if ($warning) print ' '.img_warning($warning);
print '</td>'; print '</td>';
@ -1124,9 +1124,9 @@ foreach ($listofreferent as $key => $value)
if ($othermessage) print $othermessage; if ($othermessage) print $othermessage;
if (isset($total_ttc_by_line)) if (isset($total_ttc_by_line))
{ {
if (! $qualifiedfortotal) print '<strike>'; if (! $qualifiedfortotal) print '<strike>';
print price($total_ttc_by_line); print price($total_ttc_by_line);
if (! $qualifiedfortotal) print '</strike>'; if (! $qualifiedfortotal) print '</strike>';
} }
if ($warning) print ' '.img_warning($warning); if ($warning) print ' '.img_warning($warning);
print '</td>'; print '</td>';

View File

@ -35,11 +35,11 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
$valsamount[$obj->opp_status]=$obj->opp_amount; $valsamount[$obj->opp_status]=$obj->opp_amount;
$totalnb+=$obj->nb; $totalnb+=$obj->nb;
if ($obj->opp_status) $totaloppnb+=$obj->nb; if ($obj->opp_status) $totaloppnb+=$obj->nb;
if (! in_array($obj->code, array('WON', 'LOST'))) if (! in_array($obj->code, array('WON', 'LOST')))
{ {
$totalamount+=$obj->opp_amount; $totalamount+=$obj->opp_amount;
$ponderated_opp_amount+=$obj->ponderated_opp_amount; $ponderated_opp_amount+=$obj->ponderated_opp_amount;
} }
} }
$total+=$row[0]; $total+=$row[0];
} }

View File

@ -143,10 +143,10 @@ $arrayfields=array(
// Extra fields // Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{ {
foreach($extrafields->attribute_label as $key => $val) foreach($extrafields->attribute_label as $key => $val)
{ {
if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key])); if (! empty($extrafields->attribute_list[$key])) $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>(($extrafields->attribute_list[$key]<0)?0:1), 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>(abs($extrafields->attribute_list[$key])!=3 && $extrafields->attribute_perms[$key]));
} }
} }

View File

@ -108,7 +108,7 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
unset($data1); unset($data1);
if ($nocolor) if ($nocolor)
$px->SetDataColor(array ( $px->SetDataColor(array (
array ( array (
220, 220,
220, 220,
@ -130,9 +130,9 @@ $px->SetDataColor(array (
)); ));
$px->SetTitle($langs->trans('OpportunitiesStatusForProjects')); $px->SetTitle($langs->trans('OpportunitiesStatusForProjects'));
$result=$px->draw($filenamenb, $fileurlnb); $result=$px->draw($filenamenb, $fileurlnb);
if ($result<0) { if ($result<0) {
setEventMessages($px->error, null, 'errors'); setEventMessages($px->error, null, 'errors');
} }
} else { } else {
setEventMessages(null, $mesgs, 'errors'); setEventMessages(null, $mesgs, 'errors');
} }

View File

@ -645,7 +645,7 @@ elseif ($id > 0 || ! empty($ref))
print '<br>'; print '<br>';
// Link to create task // Link to create task
$linktocreatetaskParam = array(); $linktocreatetaskParam = array();
$linktocreatetaskUserRight = false; $linktocreatetaskUserRight = false;
if ($user->rights->projet->all->creer || $user->rights->projet->creer) { if ($user->rights->projet->all->creer || $user->rights->projet->creer) {
@ -787,8 +787,8 @@ elseif ($id > 0 || ! empty($ref))
print_liste_field_titre("TaskProgressSummary", $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center '); print_liste_field_titre("TaskProgressSummary", $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center ');
if ($object->usage_bill_time) if ($object->usage_bill_time)
{ {
print_liste_field_titre("TimeToBill", $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'right '); print_liste_field_titre("TimeToBill", $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("TimeBilled", $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'right '); print_liste_field_titre("TimeBilled", $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'right ');
} }
if (! empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) print_liste_field_titre("TaskRessourceLinks", $_SERVER["PHP_SELF"], '', '', '', $sortfield, $sortorder); if (! empty($conf->global->PROJECT_SHOW_CONTACTS_IN_LIST)) print_liste_field_titre("TaskRessourceLinks", $_SERVER["PHP_SELF"], '', '', '', $sortfield, $sortorder);
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', 'width="80"', $sortfield, $sortorder, 'center maxwidthsearch '); print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', 'width="80"', $sortfield, $sortorder, 'center maxwidthsearch ');

View File

@ -356,7 +356,7 @@ if ($id > 0 || ! empty($ref))
/* /*
* Lines of contacts * Lines of contacts
*/ */
/* /*
// Contacts lines (modules that overwrite templates must declare this into descriptor) // Contacts lines (modules that overwrite templates must declare this into descriptor)
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl')); $dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl'));
foreach($dirtpls as $reldir) foreach($dirtpls as $reldir)
@ -364,7 +364,7 @@ if ($id > 0 || ! empty($ref))
$res=@include dol_buildpath($reldir.'/contacts.tpl.php'); $res=@include dol_buildpath($reldir.'/contacts.tpl.php');
if ($res) break; if ($res) break;
} }
*/ */
/* /*
* Add a new contact line * Add a new contact line

View File

@ -616,7 +616,7 @@ if ($id > 0 || ! empty($ref))
{ {
if (! $object->hasChildren() && ! $object->hasTimeSpent()) if (! $object->hasChildren() && ! $object->hasTimeSpent())
{ {
print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=delete&amp;withproject='.$withproject.'">'.$langs->trans('Delete').'</a>'; print '<a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=delete&amp;withproject='.$withproject.'">'.$langs->trans('Delete').'</a>';
} }
else else
{ {

View File

@ -169,7 +169,7 @@ class BankAccountTest extends PHPUnit\Framework\TestCase
return $localobject; return $localobject;
} }
/** /**
* testBankAccountOther * testBankAccountOther
* *
* @param Object $localobject Object contract * @param Object $localobject Object contract

View File

@ -173,7 +173,7 @@ class BonPrelevementTest extends PHPUnit\Framework\TestCase
* @depends testBonPrelevementOther * @depends testBonPrelevementOther
* The depends says test is run only if previous is ok * The depends says test is run only if previous is ok
*/ */
/* public function testBonPrelevementDelete($id) /* public function testBonPrelevementDelete($id)
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
$conf=$this->savconf; $conf=$this->savconf;
@ -189,5 +189,5 @@ class BonPrelevementTest extends PHPUnit\Framework\TestCase
$this->assertLessThan($result, 0); $this->assertLessThan($result, 0);
return $result; return $result;
} }
*/ */
} }

View File

@ -166,7 +166,7 @@ class ContratTest extends PHPUnit\Framework\TestCase
return $localobject; return $localobject;
} }
/** /**
* testContratOther * testContratOther
* *
* @param Object $localobject Object contract * @param Object $localobject Object contract

View File

@ -265,7 +265,7 @@ class ExportTest extends PHPUnit\Framework\TestCase
public function testExportPersonalizedWithFilter() public function testExportPersonalizedWithFilter()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
/* /*
$sql = "SELECT f.ref as f_ref, f.total as f_total, f.tva as f_tva FROM ".MAIN_DB_PREFIX."facture f"; $sql = "SELECT f.ref as f_ref, f.total as f_total, f.tva as f_tva FROM ".MAIN_DB_PREFIX."facture f";
$objexport=new Export($db); $objexport=new Export($db);
@ -303,7 +303,7 @@ class ExportTest extends PHPUnit\Framework\TestCase
$result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $array_filtervalue, $sql); $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, $array_filtervalue, $sql);
$expectedresult=1; $expectedresult=1;
$this->assertEquals($expectedresult,$result); $this->assertEquals($expectedresult,$result);
*/ */
return true; return true;
} }

View File

@ -214,7 +214,7 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase
return $localobject; return $localobject;
} }
/** /**
* testFactureFournisseurOther * testFactureFournisseurOther
* *
* @param Object $localobject Supplier invoice * @param Object $localobject Supplier invoice

View File

@ -241,7 +241,7 @@ class FactureTest extends PHPUnit\Framework\TestCase
return $localobject; return $localobject;
} }
/** /**
* testFactureOther * testFactureOther
* *
* @param Object $localobject Invoice * @param Object $localobject Invoice

View File

@ -190,7 +190,7 @@ class FichinterTest extends PHPUnit\Framework\TestCase
return $localobject; return $localobject;
} }
/** /**
* testFichinterValid * testFichinterValid
* *
* @param Object $localobject Object intervention * @param Object $localobject Object intervention

View File

@ -150,11 +150,11 @@ class FilesLibTest extends PHPUnit\Framework\TestCase
} }
/** /**
* testDolCountNbOfLine * testDolCountNbOfLine
* *
* @return int * @return int
*/ */
public function testDolCountNbOfLine() public function testDolCountNbOfLine()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
@ -171,11 +171,11 @@ class FilesLibTest extends PHPUnit\Framework\TestCase
return $result; return $result;
} }
/** /**
* testDolIsFileDir * testDolIsFileDir
* *
* @return int * @return int
*/ */
public function testDolIsFileDir() public function testDolIsFileDir()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;

View File

@ -118,11 +118,11 @@ class ImagesLibTest extends PHPUnit\Framework\TestCase
print __METHOD__."\n"; print __METHOD__."\n";
} }
/** /**
* testDolCountNbOfLine * testDolCountNbOfLine
* *
* @return int * @return int
*/ */
public function testgetImageSize() public function testgetImageSize()
{ {
$file=dirname(__FILE__).'/img250x50.jpg'; $file=dirname(__FILE__).'/img250x50.jpg';

View File

@ -239,7 +239,7 @@ class PropalTest extends PHPUnit\Framework\TestCase
return $localobject; return $localobject;
} }
/** /**
* testPropalOther * testPropalOther
* *
* @param Propal $localobject Proposal * @param Propal $localobject Proposal

View File

@ -149,30 +149,30 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase
*/ */
public function testRestGetUser() public function testRestGetUser()
{ {
global $conf,$user,$langs,$db; global $conf,$user,$langs,$db;
$url = $this->api_url.'/users/123456789?api_key='.$this->api_key; $url = $this->api_url.'/users/123456789?api_key='.$this->api_key;
//$addheaders=array('Content-Type: application/json'); //$addheaders=array('Content-Type: application/json');
print __METHOD__." Request GET url=".$url."\n"; print __METHOD__." Request GET url=".$url."\n";
$result=getURLContent($url, 'GET', '', 1, array()); $result=getURLContent($url, 'GET', '', 1, array());
//print __METHOD__." Result for unexisting user: ".var_export($result, true)."\n"; //print __METHOD__." Result for unexisting user: ".var_export($result, true)."\n";
print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n";
$this->assertEquals($result['curl_error_no'], ''); $this->assertEquals($result['curl_error_no'], '');
$object=json_decode($result['content'], true); $object=json_decode($result['content'], true);
$this->assertNotNull($object, "Parsing of json result must no be null"); $this->assertNotNull($object, "Parsing of json result must no be null");
$this->assertEquals(404, $object['error']['code']); $this->assertEquals(404, $object['error']['code']);
$url = $this->api_url.'/users/1?api_key='.$this->api_key; $url = $this->api_url.'/users/1?api_key='.$this->api_key;
print __METHOD__." Request GET url=".$url."\n"; print __METHOD__." Request GET url=".$url."\n";
$result=getURLContent($url, 'GET', '', 1, array()); $result=getURLContent($url, 'GET', '', 1, array());
//print __METHOD__." Result for existing user user: ".var_export($result, true)."\n"; //print __METHOD__." Result for existing user user: ".var_export($result, true)."\n";
print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n";
$this->assertEquals($result['curl_error_no'], ''); $this->assertEquals($result['curl_error_no'], '');
$object=json_decode($result['content'], true); $object=json_decode($result['content'], true);
$this->assertNotNull($object, "Parsing of json result must no be null"); $this->assertNotNull($object, "Parsing of json result must no be null");
$this->assertEquals(1, $object['statut']); $this->assertEquals(1, $object['statut']);
} }
/** /**
@ -183,52 +183,52 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase
public function testRestCreateUser() public function testRestCreateUser()
{ {
// attemp to create without mandatory fields : // attemp to create without mandatory fields :
$url = $this->api_url.'/users?api_key='.$this->api_key; $url = $this->api_url.'/users?api_key='.$this->api_key;
$addheaders=array('Content-Type: application/json'); $addheaders=array('Content-Type: application/json');
$bodyobj = array( $bodyobj = array(
"lastname"=>"testRestUser", "lastname"=>"testRestUser",
"password"=>"testRestPassword", "password"=>"testRestPassword",
"email"=>"test@restuser.com" "email"=>"test@restuser.com"
); );
$body = json_encode($bodyobj); $body = json_encode($bodyobj);
print __METHOD__." Request POST url=".$url."\n"; print __METHOD__." Request POST url=".$url."\n";
$result=getURLContent($url, 'POST', $body, 1, $addheaders); $result=getURLContent($url, 'POST', $body, 1, $addheaders);
//print __METHOD__." Result for creating incomplete user".var_export($result, true)."\n"; //print __METHOD__." Result for creating incomplete user".var_export($result, true)."\n";
print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n";
$this->assertEquals($result['curl_error_no'], ''); $this->assertEquals($result['curl_error_no'], '');
$object=json_decode($result['content'], true); $object=json_decode($result['content'], true);
$this->assertNotNull($object, "Parsing of json result must no be null"); $this->assertNotNull($object, "Parsing of json result must no be null");
$this->assertEquals(500, $object['error']['code'], $object['error']['code'].' '.$object['error']['message']); $this->assertEquals(500, $object['error']['code'], $object['error']['code'].' '.$object['error']['message']);
// create regular user // create regular user
unset($result); unset($result);
$bodyobj = array( $bodyobj = array(
"login"=>"testRestLogin".mt_rand(), "login"=>"testRestLogin".mt_rand(),
"lastname"=>"testRestUser", "lastname"=>"testRestUser",
"password"=>"testRestPassword", "password"=>"testRestPassword",
"email"=>"test@restuser.com" "email"=>"test@restuser.com"
); );
$body = json_encode($bodyobj); $body = json_encode($bodyobj);
print __METHOD__." Request POST url=".$url."\n"; print __METHOD__." Request POST url=".$url."\n";
$result=getURLContent($url, 'POST', $body, 1, $addheaders); $result=getURLContent($url, 'POST', $body, 1, $addheaders);
print __METHOD__." Result code for creating user ".var_export($result, true)."\n"; print __METHOD__." Result code for creating user ".var_export($result, true)."\n";
print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n";
$this->assertEquals($result['curl_error_no'], ''); $this->assertEquals($result['curl_error_no'], '');
$resid=json_decode($result['content'], true); $resid=json_decode($result['content'], true);
$this->assertNotNull($resid, "Parsing of json result must no be null"); $this->assertNotNull($resid, "Parsing of json result must no be null");
$this->assertGreaterThan(0, $resid, $object['error']['code'].' '.$object['error']['message']); $this->assertGreaterThan(0, $resid, $object['error']['code'].' '.$object['error']['message']);
// attempt to create duplicated user // attempt to create duplicated user
print __METHOD__." Request POST url=".$url."\n"; print __METHOD__." Request POST url=".$url."\n";
$result=getURLContent($url, 'POST', $body, 1, $addheaders); $result=getURLContent($url, 'POST', $body, 1, $addheaders);
//print __METHOD__." Result for creating duplicate user".var_export($result, true)."\n"; //print __METHOD__." Result for creating duplicate user".var_export($result, true)."\n";
print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n";
$this->assertEquals($result['curl_error_no'], ''); $this->assertEquals($result['curl_error_no'], '');
$object=json_decode($result['content'], true); $object=json_decode($result['content'], true);
$this->assertNotNull($object, "Parsing of json result must no be null"); $this->assertNotNull($object, "Parsing of json result must no be null");
$this->assertEquals(500, $object['error']['code'], $object['error']['code'].' '.$object['error']['message']); $this->assertEquals(500, $object['error']['code'], $object['error']['code'].' '.$object['error']['message']);
} }
} }

View File

@ -231,7 +231,7 @@ class SupplierProposalTest extends PHPUnit\Framework\TestCase
return $localobject; return $localobject;
} }
/** /**
* testSupplierProposalOther * testSupplierProposalOther
* *
* @param SupplierProposal $localobject Proposal * @param SupplierProposal $localobject Proposal

View File

@ -67,14 +67,14 @@ class TakePosFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
), ),
// Geckodriver does not keep the session at the moment?! // Geckodriver does not keep the session at the moment?!
// XPath selectors also don't seem to work // XPath selectors also don't seem to work
// array( //array(
// 'browser' => 'Mozilla Firefox on Linux', // 'browser' => 'Mozilla Firefox on Linux',
// 'browserName' => 'firefox', // 'browserName' => 'firefox',
// 'sessionStrategy' => 'shared', // 'sessionStrategy' => 'shared',
// 'desiredCapabilities' => array( // 'desiredCapabilities' => array(
// 'marionette' => true // 'marionette' => true
// ) // )
// ) //)
); );
/** /**