Fix debug car reception: Fill/reset link, colspan, translation
This commit is contained in:
parent
4c39816ce6
commit
bb94ea7334
@ -7496,7 +7496,7 @@ abstract class CommonObject
|
|||||||
|
|
||||||
if ($display_type == 'card') {
|
if ($display_type == 'card') {
|
||||||
$out .= '<tr '.($html_id ? 'id="'.$html_id.'" ' : '').$csstyle.' class="valuefieldcreate '.$class.$this->element.'_extras_'.$key.' trextrafields_collapse'.$extrafields_collapse_num.(!empty($this->id)?'_'.$this->id:'').'" '.$domData.' >';
|
$out .= '<tr '.($html_id ? 'id="'.$html_id.'" ' : '').$csstyle.' class="valuefieldcreate '.$class.$this->element.'_extras_'.$key.' trextrafields_collapse'.$extrafields_collapse_num.(!empty($this->id)?'_'.$this->id:'').'" '.$domData.' >';
|
||||||
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER) && $action == 'view') {
|
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER) && ($action == 'view' || $action == 'editline')) {
|
||||||
$out .= '<td></td>';
|
$out .= '<td></td>';
|
||||||
}
|
}
|
||||||
$out .= '<td class="wordbreak';
|
$out .= '<td class="wordbreak';
|
||||||
|
|||||||
@ -379,7 +379,11 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("QtyToShip").'/'.$langs->transnoentitiesnoconv("Warehouse")), null, 'errors');
|
$labelfieldmissing = $langs->transnoentitiesnoconv("QtyToShip");
|
||||||
|
if (!empty($conf->stock->enabled)) {
|
||||||
|
$labelfieldmissing .= '/'.$langs->transnoentitiesnoconv("Warehouse");
|
||||||
|
}
|
||||||
|
setEventMessages($langs->trans("ErrorFieldRequired", $labelfieldmissing), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -796,6 +800,10 @@ $help_url = 'EN:Module_Shipments|FR:Module_Expéditions|ES:Módulo_Expedic
|
|||||||
|
|
||||||
llxHeader('', $langs->trans('Shipment'), 'Expedition', $help_url);
|
llxHeader('', $langs->trans('Shipment'), 'Expedition', $help_url);
|
||||||
|
|
||||||
|
if (empty($action)) {
|
||||||
|
$action = 'view';
|
||||||
|
}
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
$formproduct = new FormProduct($db);
|
$formproduct = new FormProduct($db);
|
||||||
@ -1007,9 +1015,9 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
$numAsked = count($object->lines);
|
$numAsked = count($object->lines);
|
||||||
|
|
||||||
print '<script type="text/javascript" language="javascript">
|
print '<script type="text/javascript" language="javascript">'."\n";
|
||||||
jQuery(document).ready(function() {
|
print 'jQuery(document).ready(function() {'."\n";
|
||||||
jQuery("#autofill").click(function() {';
|
print 'jQuery("#autofill").click(function() {';
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $numAsked) {
|
while ($i < $numAsked) {
|
||||||
print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n";
|
print 'jQuery("#qtyl'.$i.'").val(jQuery("#qtyasked'.$i.'").val() - jQuery("#qtydelivered'.$i.'").val());'."\n";
|
||||||
@ -1018,10 +1026,11 @@ if ($action == 'create') {
|
|||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '});
|
print 'return false; });'."\n";
|
||||||
jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0); });
|
print 'jQuery("#autoreset").click(function() { console.log("Reset values to 0"); jQuery(".qtyl").val(0);'."\n";
|
||||||
});
|
print 'return false; });'."\n";
|
||||||
</script>';
|
print '});'."\n";
|
||||||
|
print '</script>'."\n";
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
@ -1182,7 +1191,7 @@ if ($action == 'create') {
|
|||||||
$deliverableQty = GETPOST('qtyl'.$indiceAsked, 'int');
|
$deliverableQty = GETPOST('qtyl'.$indiceAsked, 'int');
|
||||||
}
|
}
|
||||||
print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
|
print '<input name="idl'.$indiceAsked.'" type="hidden" value="'.$line->id.'">';
|
||||||
print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" type="text" size="4" value="'.$deliverableQty.'">';
|
print '<input name="qtyl'.$indiceAsked.'" id="qtyl'.$indiceAsked.'" class="qtyl center" type="text" size="4" value="'.$deliverableQty.'">';
|
||||||
} else {
|
} else {
|
||||||
print $langs->trans("NA");
|
print $langs->trans("NA");
|
||||||
}
|
}
|
||||||
@ -2199,7 +2208,7 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
if ($action == 'editline' && $lines[$i]->id == $line_id) {
|
if ($action == 'editline' && $lines[$i]->id == $line_id) {
|
||||||
// edit mode
|
// edit mode
|
||||||
print '<td colspan="'.$editColspan.'" class="center"><table class="nobordernopadding">';
|
print '<td colspan="'.$editColspan.'" class="center"><table class="nobordernopadding centpercent">';
|
||||||
if (is_array($lines[$i]->detail_batch) && count($lines[$i]->detail_batch) > 0) {
|
if (is_array($lines[$i]->detail_batch) && count($lines[$i]->detail_batch) > 0) {
|
||||||
print '<!-- case edit 1 -->';
|
print '<!-- case edit 1 -->';
|
||||||
$line = new ExpeditionLigne($db);
|
$line = new ExpeditionLigne($db);
|
||||||
@ -2389,10 +2398,11 @@ if ($action == 'create') {
|
|||||||
$line = $lines[$i];
|
$line = $lines[$i];
|
||||||
$line->fetch_optionals();
|
$line->fetch_optionals();
|
||||||
|
|
||||||
|
// TODO Show all in same line by setting $display_type = 'line'
|
||||||
if ($action == 'editline' && $line->id == $line_id) {
|
if ($action == 'editline' && $line->id == $line_id) {
|
||||||
print $lines[$i]->showOptionals($extrafields, 'edit', array('colspan'=>$colspan), $indiceAsked);
|
print $lines[$i]->showOptionals($extrafields, 'edit', array('colspan'=>$colspan), $indiceAsked, '', 0, 'card');
|
||||||
} else {
|
} else {
|
||||||
print $lines[$i]->showOptionals($extrafields, 'view', array('colspan'=>$colspan), $indiceAsked);
|
print $lines[$i]->showOptionals($extrafields, 'view', array('colspan'=>$colspan), $indiceAsked, '', 0, 'card');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user