clean indent
This commit is contained in:
parent
16f58f1eee
commit
e203f87c84
@ -12,7 +12,7 @@
|
|||||||
* Copyright (C) 2017 ATM Consulting <support@atm-consulting.fr>
|
* Copyright (C) 2017 ATM Consulting <support@atm-consulting.fr>
|
||||||
* Copyright (C) 2017-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2017-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
|
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -4612,7 +4612,7 @@ abstract class CommonObject
|
|||||||
$parameters = array('modelspath'=>$modelspath,'modele'=>$modele,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'hidedesc'=>$hidedesc,'hideref'=>$hideref, 'moreparams'=>$moreparams);
|
$parameters = array('modelspath'=>$modelspath,'modele'=>$modele,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'hidedesc'=>$hidedesc,'hideref'=>$hideref, 'moreparams'=>$moreparams);
|
||||||
$reshook = $hookmanager->executeHooks('commonGenerateDocument', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks('commonGenerateDocument', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
if(empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
dol_syslog("commonGenerateDocument modele=".$modele." outputlangs->defaultlang=".(is_object($outputlangs)?$outputlangs->defaultlang:'null'));
|
dol_syslog("commonGenerateDocument modele=".$modele." outputlangs->defaultlang=".(is_object($outputlangs)?$outputlangs->defaultlang:'null'));
|
||||||
|
|
||||||
@ -4631,7 +4631,9 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Search template files
|
// Search template files
|
||||||
$file=''; $classname=''; $filefound=0;
|
$file='';
|
||||||
|
$classname='';
|
||||||
|
$filefound=0;
|
||||||
$dirmodels=array('/');
|
$dirmodels=array('/');
|
||||||
if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels, $conf->modules_parts['models']);
|
if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels, $conf->modules_parts['models']);
|
||||||
foreach($dirmodels as $reldir)
|
foreach($dirmodels as $reldir)
|
||||||
@ -4771,8 +4773,7 @@ abstract class CommonObject
|
|||||||
$setsharekey=true;
|
$setsharekey=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($setsharekey)
|
if ($setsharekey) {
|
||||||
{
|
|
||||||
if (empty($ecmfile->share)) // Because object not found or share not set yet
|
if (empty($ecmfile->share)) // Because object not found or share not set yet
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||||
@ -4788,8 +4789,7 @@ abstract class CommonObject
|
|||||||
$ecmfile->description = ''; // indexed content
|
$ecmfile->description = ''; // indexed content
|
||||||
$ecmfile->keyword = ''; // keyword content
|
$ecmfile->keyword = ''; // keyword content
|
||||||
$result = $ecmfile->update($user);
|
$result = $ecmfile->update($user);
|
||||||
if ($result < 0)
|
if ($result < 0) {
|
||||||
{
|
|
||||||
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
|
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4807,8 +4807,7 @@ abstract class CommonObject
|
|||||||
$ecmfile->src_object_id = $this->id;
|
$ecmfile->src_object_id = $this->id;
|
||||||
|
|
||||||
$result = $ecmfile->create($user);
|
$result = $ecmfile->create($user);
|
||||||
if ($result < 0)
|
if ($result < 0) {
|
||||||
{
|
|
||||||
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
|
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4827,9 +4826,9 @@ abstract class CommonObject
|
|||||||
$sql.= ' WHERE rowid = '.$this->id;
|
$sql.= ' WHERE rowid = '.$this->id;
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (! $resql) dol_print_error($this->db);
|
if (! $resql) {
|
||||||
else
|
dol_print_error($this->db);
|
||||||
{
|
} else {
|
||||||
$this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename;
|
$this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6063,8 +6062,9 @@ abstract class CommonObject
|
|||||||
$labeltoshow = dol_trunc($obj->{$InfoFieldList[1]}, 18);
|
$labeltoshow = dol_trunc($obj->{$InfoFieldList[1]}, 18);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (empty($labeltoshow))
|
if (empty($labeltoshow)) {
|
||||||
$labeltoshow = '(not defined)';
|
$labeltoshow = '(not defined)';
|
||||||
|
}
|
||||||
|
|
||||||
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
||||||
$data[$obj->rowid]=$labeltoshow;
|
$data[$obj->rowid]=$labeltoshow;
|
||||||
|
|||||||
@ -967,13 +967,10 @@ if ($action == 'create')
|
|||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
|
|
||||||
// Load receptions already done for same order
|
// Load receptions already done for same order
|
||||||
$object->loadReceptions();
|
$object->loadReceptions();
|
||||||
|
|
||||||
@ -1113,8 +1110,6 @@ if ($action == 'create')
|
|||||||
$stock = + $product->stock_warehouse[$dispatchLines[$indiceAsked]['ent']]->real; // Convert to number
|
$stock = + $product->stock_warehouse[$dispatchLines[$indiceAsked]['ent']]->real; // Convert to number
|
||||||
$deliverableQty=$dispatchLines[$indiceAsked]['qty'];
|
$deliverableQty=$dispatchLines[$indiceAsked]['qty'];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Quantity to send
|
// Quantity to send
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
|
if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
|
||||||
|
|||||||
@ -327,7 +327,6 @@ if (empty($reshook))
|
|||||||
$lines[$i]->rowid,
|
$lines[$i]->rowid,
|
||||||
0,
|
0,
|
||||||
$lines[$i]->ref_supplier
|
$lines[$i]->ref_supplier
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$rcp->add_object_linked('facture_fourn_det', $result);
|
$rcp->add_object_linked('facture_fourn_det', $result);
|
||||||
@ -534,8 +533,8 @@ if ($resql)
|
|||||||
|
|
||||||
|
|
||||||
$arrayofmassactions = array(
|
$arrayofmassactions = array(
|
||||||
// 'presend'=>$langs->trans("SendByMail"),
|
// 'presend'=>$langs->trans("SendByMail"),
|
||||||
);
|
);
|
||||||
|
|
||||||
if($user->rights->fournisseur->facture->creer)$arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisSupplier");
|
if($user->rights->fournisseur->facture->creer)$arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisSupplier");
|
||||||
if($massaction == 'createbills') $arrayofmassactions=array();
|
if($massaction == 'createbills') $arrayofmassactions=array();
|
||||||
|
|||||||
@ -42,20 +42,20 @@ $langs->load("receptions");
|
|||||||
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
||||||
|
|
||||||
$total=0; $ilink=0;
|
$total=0; $ilink=0;
|
||||||
foreach($linkedObjectBlock as $key => $objectlink)
|
foreach ($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
$ilink++;
|
$ilink++;
|
||||||
|
|
||||||
$trclass='oddeven';
|
$trclass='oddeven';
|
||||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||||
?>
|
?>
|
||||||
<tr class="<?php echo $trclass; ?>">
|
<tr class="<?php echo $trclass; ?>">
|
||||||
<td class="linkedcol-element"><?php echo $langs->trans("Reception"); ?>
|
<td class="linkedcol-element"><?php echo $langs->trans("Reception"); ?>
|
||||||
<?php if(!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a'; ?>
|
<?php if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a'; ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="linkedcol-name nowraponall" ><?php echo $objectlink->getNomUrl(1); ?></td>
|
<td class="linkedcol-name nowraponall" ><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||||
<td class="linkedcol-ref" align="center"></td>
|
<td class="linkedcol-ref center"></td>
|
||||||
<td class="linkedcol-date" align="center"><?php echo dol_print_date($objectlink->date_delivery, 'day'); ?></td>
|
<td class="linkedcol-date center"><?php echo dol_print_date($objectlink->date_delivery, 'day'); ?></td>
|
||||||
<td class="linkedcol-amount right"><?php
|
<td class="linkedcol-amount right"><?php
|
||||||
if ($user->rights->reception->lire) {
|
if ($user->rights->reception->lire) {
|
||||||
$total = $total + $objectlink->total_ht;
|
$total = $total + $objectlink->total_ht;
|
||||||
@ -65,7 +65,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
<td class="linkedcol-action right">
|
<td class="linkedcol-action right">
|
||||||
<?php
|
<?php
|
||||||
// For now, receptions must stay linked to order, so link is not deletable
|
// For now, receptions must stay linked to order, so link is not deletable
|
||||||
if($object->element != 'order_supplier') {
|
if ($object->element != 'order_supplier') {
|
||||||
?>
|
?>
|
||||||
<a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a>
|
<a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a>
|
||||||
<?php
|
<?php
|
||||||
@ -73,7 +73,7 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if (count($linkedObjectBlock) > 1)
|
if (count($linkedObjectBlock) > 1)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user