Fix scrutinizer errors
This commit is contained in:
parent
70b73c73f7
commit
553f5b990c
@ -669,7 +669,7 @@ if ($id)
|
|||||||
|
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
fieldList($fieldlist,$obj,$tabname[$id],'add');
|
fieldListAccountingCategories($fieldlist,$obj,$tabname[$id],'add');
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td colspan="4" align="right">';
|
print '<td colspan="4" align="right">';
|
||||||
@ -858,7 +858,7 @@ if ($id)
|
|||||||
$error=$hookmanager->error; $errors=$hookmanager->errors;
|
$error=$hookmanager->error; $errors=$hookmanager->errors;
|
||||||
|
|
||||||
// Show fields
|
// 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>';
|
||||||
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
|
* @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
|
* @return void
|
||||||
*/
|
*/
|
||||||
function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $context='')
|
||||||
{
|
{
|
||||||
global $conf,$langs,$db;
|
global $conf,$langs,$db;
|
||||||
global $form, $mysoc;
|
global $form, $mysoc;
|
||||||
|
|||||||
@ -1753,14 +1753,15 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
$transfound=0;
|
$transfound=0;
|
||||||
// Special case for labels
|
// Special case for labels
|
||||||
if ($tabname == MAIN_DB_PREFIX.'c_payment_term') {
|
if ($tabname == MAIN_DB_PREFIX.'c_payment_term')
|
||||||
|
{
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$transkey="PaymentCondition".strtoupper($obj->code);
|
$transkey="PaymentCondition".strtoupper($obj->code);
|
||||||
}
|
|
||||||
if ($langs->trans($transkey) != $transkey)
|
if ($langs->trans($transkey) != $transkey)
|
||||||
{
|
{
|
||||||
$transfound=1;
|
$transfound=1;
|
||||||
print $form->textwithpicto($langs->trans($transkey), $langs->trans("GoIntoTranslationMenuToChangeThis"));
|
print $form->textwithpicto($langs->trans($transkey), $langs->trans("GoIntoTranslationMenuToChangeThis"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (! $transfound)
|
if (! $transfound)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -585,7 +585,7 @@ class Mailing extends CommonObject
|
|||||||
* @param strin $desc Desc error
|
* @param strin $desc Desc error
|
||||||
* @return string Label
|
* @return string Label
|
||||||
*/
|
*/
|
||||||
static public function libStatutDest($statut,$mode=0,$desc='')
|
public static function libStatutDest($statut,$mode=0,$desc='')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load('mails');
|
$langs->load('mails');
|
||||||
|
|||||||
@ -2875,11 +2875,6 @@ class Commande extends CommonOrder
|
|||||||
$this->error=$langs->trans('ErrorStockIsNotEnoughToAddProductOnOrder', $product->ref);
|
$this->error=$langs->trans('ErrorStockIsNotEnoughToAddProductOnOrder', $product->ref);
|
||||||
dol_syslog(get_class($this)."::addline error=Product ".$product->ref.": ".$this->error, LOG_ERR);
|
dol_syslog(get_class($this)."::addline error=Product ".$product->ref.": ".$this->error, LOG_ERR);
|
||||||
$this->db->rollback();
|
$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;
|
return self::STOCK_NOT_ENOUGH_FOR_ORDER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user