Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
This commit is contained in:
commit
80df9434db
@ -214,6 +214,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '<a id="hide_all" href="#">'.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").'</a> ';
|
print '<a id="hide_all" href="#">'.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").'</a> ';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if ($action == 'treeview') print '<td class="left">'.$langs->trans('ProducedBy').'</td>';
|
||||||
print '<td class="linecolqty right">'.$langs->trans('Quantity').'</td>';
|
print '<td class="linecolqty right">'.$langs->trans('Quantity').'</td>';
|
||||||
print '<td class="linecolstock right">'.$form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1).'</td>';
|
print '<td class="linecolstock right">'.$form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1).'</td>';
|
||||||
print '<td class="linecoltheoricalstock right">'.$form->textwithpicto($langs->trans("VirtualStock"), $langs->trans("VirtualStockDesc")).'</td>';
|
print '<td class="linecoltheoricalstock right">'.$form->textwithpicto($langs->trans("VirtualStock"), $langs->trans("VirtualStockDesc")).'</td>';
|
||||||
@ -226,13 +227,17 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
foreach ($TChildBom as $fk_bom => $TProduct) {
|
foreach ($TChildBom as $fk_bom => $TProduct) {
|
||||||
$repeatChar = ' ';
|
$repeatChar = ' ';
|
||||||
if (!empty($TProduct['bom'])) {
|
if (!empty($TProduct['bom'])) {
|
||||||
|
$prod = new Product($db);
|
||||||
|
$prod->fetch($TProduct['bom']->fk_product);
|
||||||
if ($TProduct['parentid'] != $object->id) print '<tr class="sub_bom_lines oddeven" parentid="'.$TProduct['parentid'].'">';
|
if ($TProduct['parentid'] != $object->id) print '<tr class="sub_bom_lines oddeven" parentid="'.$TProduct['parentid'].'">';
|
||||||
else print '<tr class="oddeven">';
|
else print '<tr class="oddeven">';
|
||||||
print '<td class="linecoldescription">'.str_repeat($repeatChar, $TProduct['level']).$TProduct['bom']->getNomUrl(1);
|
if ($action == 'treeview') print '<td class="linecoldescription">'.str_repeat($repeatChar, $TProduct['level']).$prod->getNomUrl(1);
|
||||||
|
else print '<td class="linecoldescription">'.str_repeat($repeatChar, $TProduct['level']).$TProduct['bom']->getNomUrl(1);
|
||||||
print ' <a class="collapse_bom" id="collapse-'.$fk_bom.'" href="#">';
|
print ' <a class="collapse_bom" id="collapse-'.$fk_bom.'" href="#">';
|
||||||
print img_picto('', 'folder-open');
|
print img_picto('', 'folder-open');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if ($action == 'treeview') print '<td class="left">'.$TProduct['bom']->getNomUrl(1).'</td>';
|
||||||
print '<td class="linecolqty right">'.$TProduct['qty'].'</td>';
|
print '<td class="linecolqty right">'.$TProduct['qty'].'</td>';
|
||||||
print '<td class="linecolstock right"></td>';
|
print '<td class="linecolstock right"></td>';
|
||||||
print '<td class="linecoltheoricalstock right"></td>';
|
print '<td class="linecoltheoricalstock right"></td>';
|
||||||
@ -247,6 +252,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
if ($fk_bom != $object->id) print '<tr class="sub_bom_lines oddeven" parentid="'.$fk_bom.'">';
|
if ($fk_bom != $object->id) print '<tr class="sub_bom_lines oddeven" parentid="'.$fk_bom.'">';
|
||||||
else print '<tr class="oddeven">';
|
else print '<tr class="oddeven">';
|
||||||
print '<td class="linecoldescription">'.str_repeat($repeatChar, $TInfos['level']).$prod->getNomUrl(1).'</td>';
|
print '<td class="linecoldescription">'.str_repeat($repeatChar, $TInfos['level']).$prod->getNomUrl(1).'</td>';
|
||||||
|
if ($action == 'treeview') print '<td></td>';
|
||||||
print '<td class="linecolqty right">'.$TInfos['qty'].'</td>';
|
print '<td class="linecolqty right">'.$TInfos['qty'].'</td>';
|
||||||
print '<td class="linecolstock right">'.price2num($prod->stock_reel, 'MS').'</td>';
|
print '<td class="linecolstock right">'.price2num($prod->stock_reel, 'MS').'</td>';
|
||||||
print '<td class="linecoltheoricalstock right">'.$prod->stock_theorique.'</td>';
|
print '<td class="linecoltheoricalstock right">'.$prod->stock_theorique.'</td>';
|
||||||
@ -290,20 +296,30 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// When clicking on collapse
|
|
||||||
$(".collapse_bom").click(function() {
|
function folderManage(element) {
|
||||||
console.log("We click on collapse");
|
var id_bom_line = element.attr('id').replace('collapse-', '');
|
||||||
var id_bom_line = $(this).attr('id').replace('collapse-', '');
|
let TSubLines = $('[parentid="'+ id_bom_line +'"]');
|
||||||
console.log($(this).html().indexOf('folder-open'));
|
|
||||||
if($(this).html().indexOf('folder-open') <= 0) {
|
if(element.html().indexOf('folder-open') <= 0) {
|
||||||
$('[parentid="'+ id_bom_line +'"]').show();
|
$('[parentid="'+ id_bom_line +'"]').show();
|
||||||
$(this).html('<?php echo dol_escape_js(img_picto('', 'folder-open')); ?>');
|
element.html('<?php echo dol_escape_js(img_picto('', 'folder-open')); ?>');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('[parentid="'+ id_bom_line +'"]').hide();
|
for (let i = 0; i < TSubLines.length; i++) {
|
||||||
$(this).html('<?php echo dol_escape_js(img_picto('', 'folder')); ?>');
|
let subBomFolder = $(TSubLines[i]).children('.linecoldescription').children('.collapse_bom');
|
||||||
|
if (subBomFolder.length > 0) {
|
||||||
|
folderManage(subBomFolder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TSubLines.hide();
|
||||||
|
element.html('<?php echo dol_escape_js(img_picto('', 'folder')); ?>');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// When clicking on collapse
|
||||||
|
$(".collapse_bom").click(function() {
|
||||||
|
folderManage($(this));
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -109,8 +109,7 @@ $search_date_endyear = GETPOST('search_date_endyear', 'int');
|
|||||||
$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
|
$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
|
||||||
$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
|
$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
|
||||||
$search_date_end_startday = GETPOST('search_date_end_startday', 'int');
|
$search_date_end_startday = GETPOST('search_date_end_startday', 'int');
|
||||||
$search_date_end_startmonth = GETPOST('se$sql .= $db->plimit($limit + 1, $offset);
|
$search_date_end_startmonth = GETPOST('search_date_end_startmonth', 'int');
|
||||||
arch_date_end_startmonth', 'int');
|
|
||||||
$search_date_end_startyear = GETPOST('search_date_end_startyear', 'int');
|
$search_date_end_startyear = GETPOST('search_date_end_startyear', 'int');
|
||||||
$search_date_end_endday = GETPOST('search_date_end_endday', 'int');
|
$search_date_end_endday = GETPOST('search_date_end_endday', 'int');
|
||||||
$search_date_end_endmonth = GETPOST('search_date_end_endmonth', 'int');
|
$search_date_end_endmonth = GETPOST('search_date_end_endmonth', 'int');
|
||||||
|
|||||||
@ -837,7 +837,7 @@ if ($action == 'create2') {
|
|||||||
}
|
}
|
||||||
$help_url = 'EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expediciones|DE:Modul_Lieferungen';
|
$help_url = 'EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expediciones|DE:Modul_Lieferungen';
|
||||||
|
|
||||||
llxHeader('', $title, 'Expedition', $help_url);
|
llxHeader('', $title, $help_url);
|
||||||
|
|
||||||
if (empty($action)) {
|
if (empty($action)) {
|
||||||
$action = 'view';
|
$action = 'view';
|
||||||
|
|||||||
@ -599,7 +599,8 @@ class Expedition extends CommonObject
|
|||||||
$this->socid = $obj->socid;
|
$this->socid = $obj->socid;
|
||||||
$this->ref_customer = $obj->ref_customer;
|
$this->ref_customer = $obj->ref_customer;
|
||||||
$this->ref_ext = $obj->ref_ext;
|
$this->ref_ext = $obj->ref_ext;
|
||||||
$this->statut = $obj->fk_statut;
|
$this->status = $obj->fk_statut;
|
||||||
|
$this->statut = $this->status; // Deprecated
|
||||||
$this->user_author_id = $obj->fk_user_author;
|
$this->user_author_id = $obj->fk_user_author;
|
||||||
$this->fk_user_author = $obj->fk_user_author;
|
$this->fk_user_author = $obj->fk_user_author;
|
||||||
$this->date_creation = $this->db->jdate($obj->date_creation);
|
$this->date_creation = $this->db->jdate($obj->date_creation);
|
||||||
|
|||||||
@ -121,3 +121,4 @@ BOMProductsList=BOM's products
|
|||||||
BOMServicesList=BOM's services
|
BOMServicesList=BOM's services
|
||||||
Manufacturing=Manufacturing
|
Manufacturing=Manufacturing
|
||||||
Disassemble=Disassemble
|
Disassemble=Disassemble
|
||||||
|
ProducedBy=Produced by
|
||||||
|
|||||||
@ -119,3 +119,4 @@ BomCantAddChildBom=La nomenclature %s est déjà présente dans l'arbre menant
|
|||||||
BOMNetNeeds = Besoins nets
|
BOMNetNeeds = Besoins nets
|
||||||
BOMProductsList=Les produits de BOM
|
BOMProductsList=Les produits de BOM
|
||||||
BOMServicesList=Les services de BOM
|
BOMServicesList=Les services de BOM
|
||||||
|
ProducedBy=Produit par
|
||||||
Loading…
Reference in New Issue
Block a user