Fixing style errors.
This commit is contained in:
parent
e70604c485
commit
807ff75b6a
@ -91,8 +91,7 @@ print dol_get_fiche_end();
|
|||||||
|
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
if ($action != 'create' && $action != 'edit')
|
if ($action != 'create' && $action != 'edit') {
|
||||||
{
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>";
|
print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create#newattrib\">".$langs->trans("NewAttribute")."</a>";
|
||||||
print "</div>";
|
print "</div>";
|
||||||
@ -102,8 +101,7 @@ if ($action != 'create' && $action != 'edit')
|
|||||||
/*
|
/*
|
||||||
* Creation of an optional field
|
* Creation of an optional field
|
||||||
*/
|
*/
|
||||||
if ($action == 'create')
|
if ($action == 'create') {
|
||||||
{
|
|
||||||
print '<br><div id="newattrib"></div>';
|
print '<br><div id="newattrib"></div>';
|
||||||
print load_fiche_titre($langs->trans('NewAttribute'));
|
print load_fiche_titre($langs->trans('NewAttribute'));
|
||||||
|
|
||||||
@ -113,8 +111,7 @@ if ($action == 'create')
|
|||||||
/*
|
/*
|
||||||
* Edition of an optional field
|
* Edition of an optional field
|
||||||
*/
|
*/
|
||||||
if ($action == 'edit' && !empty($attrname))
|
if ($action == 'edit' && !empty($attrname)) {
|
||||||
{
|
|
||||||
print "<br>";
|
print "<br>";
|
||||||
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
|
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
* @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
|
* @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
|
// phpcs:enable
|
||||||
if ($id_entrepot) {
|
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);
|
$result = $movementstock->_create($user, $this->id, $id_entrepot, $op[$movement], $movement, $price, $label, $inventorycode, '', '', '', '', false, 0, $disablestockchangeforsubproduct);
|
||||||
|
|
||||||
if ($result >= 0) {
|
if ($result >= 0) {
|
||||||
if($extrafields){
|
if ($extrafields) {
|
||||||
$array_options = $extrafields->getOptionalsFromPost('stock_mouvement');
|
$array_options = $extrafields->getOptionalsFromPost('stock_mouvement');
|
||||||
$movementstock->array_options = $array_options;
|
$movementstock->array_options = $array_options;
|
||||||
$movementstock->insertExtraFields();
|
$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)
|
* @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
|
* @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
|
// phpcs:enable
|
||||||
if ($id_entrepot) {
|
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);
|
$result = $movementstock->_create($user, $this->id, $id_entrepot, $op[$movement], $movement, $price, $label, $inventorycode, '', $dlc, $dluo, $lot, false, 0, $disablestockchangeforsubproduct);
|
||||||
|
|
||||||
if ($result >= 0) {
|
if ($result >= 0) {
|
||||||
if($extrafields){
|
if ($extrafields) {
|
||||||
$array_options = $extrafields->getOptionalsFromPost('stock_mouvement');
|
$array_options = $extrafields->getOptionalsFromPost('stock_mouvement');
|
||||||
$movementstock->array_options = $array_options;
|
$movementstock->array_options = $array_options;
|
||||||
$movementstock->insertExtraFields();
|
$movementstock->insertExtraFields();
|
||||||
|
|||||||
@ -26,8 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Protection to avoid direct call of template
|
// 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";
|
print "Error, template page can't be called as URL";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user