Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 13.0
Conflicts: htdocs/fourn/facture/card.php
This commit is contained in:
commit
e3032ef1c4
@ -646,6 +646,7 @@ if (empty($reshook))
|
|||||||
elseif ($action == 'add' && $usercancreate)
|
elseif ($action == 'add' && $usercancreate)
|
||||||
{
|
{
|
||||||
if ($socid > 0) $object->socid = GETPOST('socid', 'int');
|
if ($socid > 0) $object->socid = GETPOST('socid', 'int');
|
||||||
|
$selectedLines = GETPOST('toselect', 'array');
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
@ -961,6 +962,10 @@ if (empty($reshook))
|
|||||||
$num = count($lines);
|
$num = count($lines);
|
||||||
for ($i = 0; $i < $num; $i++) // TODO handle subprice < 0
|
for ($i = 0; $i < $num; $i++) // TODO handle subprice < 0
|
||||||
{
|
{
|
||||||
|
if (!in_array($lines[$i]->id, $selectedLines)) {
|
||||||
|
continue; // Skip unselected lines
|
||||||
|
}
|
||||||
|
|
||||||
$desc = ($lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle);
|
$desc = ($lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle);
|
||||||
$product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0);
|
$product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0);
|
||||||
|
|
||||||
@ -2192,9 +2197,6 @@ if ($action == 'create')
|
|||||||
print '<input type="button" class="button button-cancel" value="'.$langs->trans("Cancel").'" onClick="javascript:history.go(-1)">';
|
print '<input type="button" class="button button-cancel" value="'.$langs->trans("Cancel").'" onClick="javascript:history.go(-1)">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print "</form>\n";
|
|
||||||
|
|
||||||
|
|
||||||
// Show origin lines
|
// Show origin lines
|
||||||
if (is_object($objectsrc)) {
|
if (is_object($objectsrc)) {
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -2204,10 +2206,12 @@ if ($action == 'create')
|
|||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
|
|
||||||
$objectsrc->printOriginLinesList();
|
$objectsrc->printOriginLinesList('', $selectedLines);
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "</form>\n";
|
||||||
} else {
|
} else {
|
||||||
if ($id > 0 || !empty($ref)) {
|
if ($id > 0 || !empty($ref)) {
|
||||||
/* *************************************************************************** */
|
/* *************************************************************************** */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user