mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
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:
@@ -646,6 +646,7 @@ if (empty($reshook))
|
||||
elseif ($action == 'add' && $usercancreate)
|
||||
{
|
||||
if ($socid > 0) $object->socid = GETPOST('socid', 'int');
|
||||
$selectedLines = GETPOST('toselect', 'array');
|
||||
|
||||
$db->begin();
|
||||
|
||||
@@ -961,6 +962,10 @@ if (empty($reshook))
|
||||
$num = count($lines);
|
||||
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);
|
||||
$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 '</div>';
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
|
||||
// Show origin lines
|
||||
if (is_object($objectsrc)) {
|
||||
print '<br>';
|
||||
@@ -2204,10 +2206,12 @@ if ($action == 'create')
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
$objectsrc->printOriginLinesList();
|
||||
$objectsrc->printOriginLinesList('', $selectedLines);
|
||||
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
print "</form>\n";
|
||||
} else {
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
/* *************************************************************************** */
|
||||
|
||||
Reference in New Issue
Block a user