Fix scrutinizer errors
This commit is contained in:
parent
70b73c73f7
commit
553f5b990c
@ -669,7 +669,7 @@ if ($id)
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
fieldList($fieldlist,$obj,$tabname[$id],'add');
|
||||
fieldListAccountingCategories($fieldlist,$obj,$tabname[$id],'add');
|
||||
}
|
||||
|
||||
print '<td colspan="4" align="right">';
|
||||
@ -858,7 +858,7 @@ if ($id)
|
||||
$error=$hookmanager->error; $errors=$hookmanager->errors;
|
||||
|
||||
// Show fields
|
||||
if (empty($reshook)) fieldList($fieldlist,$obj,$tabname[$id],'edit');
|
||||
if (empty($reshook)) fieldListAccountingCategories($fieldlist,$obj,$tabname[$id],'edit');
|
||||
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
@ -1147,7 +1147,7 @@ $db->close();
|
||||
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
|
||||
* @return void
|
||||
*/
|
||||
function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $context='')
|
||||
{
|
||||
global $conf,$langs,$db;
|
||||
global $form, $mysoc;
|
||||
|
||||
@ -1753,15 +1753,16 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
print '<td>';
|
||||
$transfound=0;
|
||||
// Special case for labels
|
||||
if ($tabname == MAIN_DB_PREFIX.'c_payment_term') {
|
||||
if ($tabname == MAIN_DB_PREFIX.'c_payment_term')
|
||||
{
|
||||
$langs->load("bills");
|
||||
$transkey="PaymentCondition".strtoupper($obj->code);
|
||||
if ($langs->trans($transkey) != $transkey)
|
||||
{
|
||||
$transfound=1;
|
||||
print $form->textwithpicto($langs->trans($transkey), $langs->trans("GoIntoTranslationMenuToChangeThis"));
|
||||
}
|
||||
}
|
||||
if ($langs->trans($transkey) != $transkey)
|
||||
{
|
||||
$transfound=1;
|
||||
print $form->textwithpicto($langs->trans($transkey), $langs->trans("GoIntoTranslationMenuToChangeThis"));
|
||||
}
|
||||
if (! $transfound)
|
||||
{
|
||||
print '<textarea cols="30" rows="'.ROWS_2.'" class="flat" name="'.$fieldlist[$field].'">'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'</textarea>';
|
||||
|
||||
@ -585,7 +585,7 @@ class Mailing extends CommonObject
|
||||
* @param strin $desc Desc error
|
||||
* @return string Label
|
||||
*/
|
||||
static public function libStatutDest($statut,$mode=0,$desc='')
|
||||
public static function libStatutDest($statut,$mode=0,$desc='')
|
||||
{
|
||||
global $langs;
|
||||
$langs->load('mails');
|
||||
|
||||
@ -2875,11 +2875,6 @@ class Commande extends CommonOrder
|
||||
$this->error=$langs->trans('ErrorStockIsNotEnoughToAddProductOnOrder', $product->ref);
|
||||
dol_syslog(get_class($this)."::addline error=Product ".$product->ref.": ".$this->error, LOG_ERR);
|
||||
$this->db->rollback();
|
||||
unset($_POST['productid']);
|
||||
unset($_POST['tva_tx']);
|
||||
unset($_POST['price_ht']);
|
||||
unset($_POST['qty']);
|
||||
unset($_POST['buying_price']);
|
||||
return self::STOCK_NOT_ENOUGH_FOR_ORDER;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user