Code comment and better error message

This commit is contained in:
Laurent Destailleur 2018-10-09 21:21:10 +02:00
parent 01c32525df
commit df0ec95b22
3 changed files with 12 additions and 11 deletions

View File

@ -504,7 +504,7 @@ if (empty($reshook))
// Action update
else if (
($action == 'settracking_number'
($action == 'settracking_number'
|| $action == 'settracking_url'
|| $action == 'settrueWeight'
|| $action == 'settrueWidth'
@ -1503,11 +1503,11 @@ if ($action == 'create')
print '<!-- Show details of lot -->';
print '<input name="batchl'.$indiceAsked.'_'.$subj.'" type="hidden" value="'.$dbatch->id.'">';
//print $line->fk_product.' - '.$dbatch->batch;
//print '|'.$line->fk_product.'|'.$dbatch->batch.'|<br>';
print $langs->trans("Batch").': ';
$result = $productlotObject->fetch(0, $line->fk_product, $dbatch->batch);
if ($result > 0) print $productlotObject->getNomUrl(1);
else print 'TableLotIncompleteRunRepair';
else print 'TableLotIncompleteRunRepairWithParamStandardEqualConfirmed';
print ' ('.$dbatch->qty.')';
$quantityToBeDelivered -= $deliverableQty;
if ($quantityToBeDelivered < 0)

View File

@ -811,7 +811,7 @@ if ($ok && GETPOST('clean_product_stock_batch','alpha'))
}
// clean_linked_elements: Check and clean linked elements
// clean_product_stock_negative_if_batch
if ($ok && GETPOST('clean_product_stock_negative_if_batch','alpha'))
{
print '<tr><td colspan="2"><br>Clean table product_batch, methodtofix='.$methodtofix.' (possible values: updatestock or updatebatch)</td></tr>';
@ -835,12 +835,13 @@ if ($ok && GETPOST('clean_product_stock_negative_if_batch','alpha'))
$obj=$db->fetch_object($resql);
print '<tr><td>'.$obj->rowid.'-'.$obj->ref.'-'.$obj->fk_entrepot.' -> '.$obj->psrowid.': '.$obj->reel.' != '.$obj->reelbatch;
// TODO
}
}
}
}
// clean_linked_elements: Check and clean linked elements
// set_empty_time_spent_amount
if ($ok && GETPOST('set_empty_time_spent_amount','alpha'))
{
print '<tr><td colspan="2"><br>*** Set value of time spent without amount</td></tr>';
@ -901,7 +902,7 @@ if ($ok && GETPOST('set_empty_time_spent_amount','alpha'))
}
// clean_old_module_entries: Clean data into const when files of module were removed without being
// force_disable_of_modules_not_found
if ($ok && GETPOST('force_disable_of_modules_not_found','alpha'))
{
print '<tr><td colspan="2"><br>*** Force modules not found to be disabled (only modules adding js, css or hooks can be detected as removed)</td></tr>';
@ -1072,7 +1073,7 @@ if ($ok && GETPOST('clean_perm_table','alpha'))
// clean_linked_elements: Check and clean linked elements
// force utf8 on tables
if ($ok && GETPOST('force_utf8_on_tables','alpha'))
{
print '<tr><td colspan="2"><br>*** Force page code and collation of tables into utf8/utf8_unicode_ci (for mysql/mariadb only)</td></tr>';

View File

@ -166,7 +166,7 @@ class Productlot extends CommonObject
$error++;
}
}
if (! $error && ! $notrigger) {
// Uncomment this and change MYOBJECT to your own tag if you
// want this action to call a trigger.
@ -234,7 +234,7 @@ class Productlot extends CommonObject
//$this->ref = $obj->fk_product.'_'.$obj->batch;
$this->batch = $obj->batch;
$this->entity = (!empty($obj->entity)?$obj->entity:$conf->entity); // Prevent "null" entity
$this->entity = (!empty($obj->entity)?$obj->entity:$conf->entity); // Prevent "null" entity
$this->fk_product = $obj->fk_product;
$this->eatby = $this->db->jdate($obj->eatby);
$this->sellby = $this->db->jdate($obj->sellby);
@ -300,7 +300,7 @@ class Productlot extends CommonObject
// Check parameters
// Put here code to add a control on parameters values
if (empty($this->oldcopy))
{
$org=new self($this->db);
@ -340,7 +340,7 @@ class Productlot extends CommonObject
$error++;
}
}
if (!$error && !$notrigger) {
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.