Fixing style errors.
This commit is contained in:
parent
e70604c485
commit
807ff75b6a
@ -91,34 +91,31 @@ print dol_get_fiche_end();
|
||||
|
||||
|
||||
// Buttons
|
||||
if ($action != 'create' && $action != 'edit')
|
||||
{
|
||||
print '<div class="tabsAction">';
|
||||
print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>";
|
||||
print "</div>";
|
||||
if ($action != 'create' && $action != 'edit') {
|
||||
print '<div class="tabsAction">';
|
||||
print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>";
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Creation of an optional field
|
||||
*/
|
||||
if ($action == 'create')
|
||||
{
|
||||
print '<br><div id="newattrib"></div>';
|
||||
print load_fiche_titre($langs->trans('NewAttribute'));
|
||||
if ($action == 'create') {
|
||||
print '<br><div id="newattrib"></div>';
|
||||
print load_fiche_titre($langs->trans('NewAttribute'));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
|
||||
}
|
||||
|
||||
/*
|
||||
* Edition of an optional field
|
||||
*/
|
||||
if ($action == 'edit' && !empty($attrname))
|
||||
{
|
||||
print "<br>";
|
||||
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
|
||||
if ($action == 'edit' && !empty($attrname)) {
|
||||
print "<br>";
|
||||
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||
}
|
||||
|
||||
// End of page
|
||||
|
||||
@ -5122,7 +5122,7 @@ class Product extends CommonObject
|
||||
* @param int $disablestockchangeforsubproduct Disable stock change for sub-products of kit (usefull only if product is a subproduct)
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function correct_stock($user, $id_entrepot, $nbpiece, $movement, $label = '', $price = 0, $inventorycode = '', $origin_element = '', $origin_id = null, $disablestockchangeforsubproduct = 0,$extrafields = null)
|
||||
public function correct_stock($user, $id_entrepot, $nbpiece, $movement, $label = '', $price = 0, $inventorycode = '', $origin_element = '', $origin_id = null, $disablestockchangeforsubproduct = 0, $extrafields = null)
|
||||
{
|
||||
// phpcs:enable
|
||||
if ($id_entrepot) {
|
||||
@ -5145,7 +5145,7 @@ class Product extends CommonObject
|
||||
$result = $movementstock->_create($user, $this->id, $id_entrepot, $op[$movement], $movement, $price, $label, $inventorycode, '', '', '', '', false, 0, $disablestockchangeforsubproduct);
|
||||
|
||||
if ($result >= 0) {
|
||||
if($extrafields){
|
||||
if ($extrafields) {
|
||||
$array_options = $extrafields->getOptionalsFromPost('stock_mouvement');
|
||||
$movementstock->array_options = $array_options;
|
||||
$movementstock->insertExtraFields();
|
||||
@ -5181,7 +5181,7 @@ class Product extends CommonObject
|
||||
* @param int $disablestockchangeforsubproduct Disable stock change for sub-products of kit (usefull only if product is a subproduct)
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function correct_stock_batch($user, $id_entrepot, $nbpiece, $movement, $label = '', $price = 0, $dlc = '', $dluo = '', $lot = '', $inventorycode = '', $origin_element = '', $origin_id = null, $disablestockchangeforsubproduct = 0,$extrafields = null)
|
||||
public function correct_stock_batch($user, $id_entrepot, $nbpiece, $movement, $label = '', $price = 0, $dlc = '', $dluo = '', $lot = '', $inventorycode = '', $origin_element = '', $origin_id = null, $disablestockchangeforsubproduct = 0, $extrafields = null)
|
||||
{
|
||||
// phpcs:enable
|
||||
if ($id_entrepot) {
|
||||
@ -5204,7 +5204,7 @@ class Product extends CommonObject
|
||||
$result = $movementstock->_create($user, $this->id, $id_entrepot, $op[$movement], $movement, $price, $label, $inventorycode, '', $dlc, $dluo, $lot, false, 0, $disablestockchangeforsubproduct);
|
||||
|
||||
if ($result >= 0) {
|
||||
if($extrafields){
|
||||
if ($extrafields) {
|
||||
$array_options = $extrafields->getOptionalsFromPost('stock_mouvement');
|
||||
$movementstock->array_options = $array_options;
|
||||
$movementstock->insertExtraFields();
|
||||
|
||||
@ -26,8 +26,7 @@
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || !is_object($conf))
|
||||
{
|
||||
if (empty($conf) || !is_object($conf)) {
|
||||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user