2
0
forked from Wavyzz/dolibarr

Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0

This commit is contained in:
Laurent Destailleur
2020-04-11 01:09:36 +02:00
3 changed files with 8 additions and 7 deletions

View File

@@ -1086,7 +1086,7 @@ if (empty($reshook))
if ($action == 'add' && $user->rights->fournisseur->commande->creer) if ($action == 'add' && $user->rights->fournisseur->commande->creer)
{ {
$error = 0; $error = 0;
$selectedLines = GETPOST('toselect', 'array');
if ($socid < 1) if ($socid < 1)
{ {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Supplier')), null, 'errors'); setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Supplier')), null, 'errors');
@@ -1178,7 +1178,7 @@ if (empty($reshook))
for ($i = 0; $i < $num; $i++) for ($i = 0; $i < $num; $i++)
{ {
if (empty($lines[$i]->subprice) || $lines[$i]->qty <= 0) if (empty($lines[$i]->subprice) || $lines[$i]->qty <= 0 || !in_array($lines[$i]->id, $selectedLines))
continue; continue;
$label = (!empty($lines[$i]->label) ? $lines[$i]->label : ''); $label = (!empty($lines[$i]->label) ? $lines[$i]->label : '');
@@ -1756,7 +1756,7 @@ if ($action == 'create')
print '<input type="button" class="button" value="'.$langs->trans("Cancel").'" onClick="javascript:history.go(-1)">'; print '<input type="button" class="button" value="'.$langs->trans("Cancel").'" onClick="javascript:history.go(-1)">';
print '</div>'; print '</div>';
print "</form>\n";
// Show origin lines // Show origin lines
if (!empty($origin) && !empty($originid) && is_object($objectsrc)) if (!empty($origin) && !empty($originid) && is_object($objectsrc))
@@ -1766,10 +1766,11 @@ 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";
} }
elseif (!empty($object->id)) elseif (!empty($object->id))
{ {

View File

@@ -215,7 +215,7 @@ if ($action == "view_ticketlist")
't.date_close' => array('label' => $langs->trans("TicketCloseOn"), 'checked' => 0), 't.date_close' => array('label' => $langs->trans("TicketCloseOn"), 'checked' => 0),
't.ref' => array('label' => $langs->trans("Ref"), 'checked' => 1), 't.ref' => array('label' => $langs->trans("Ref"), 'checked' => 1),
//'t.track_id' => array('label' => $langs->trans("IDTracking"), 'checked' => 0), //'t.track_id' => array('label' => $langs->trans("IDTracking"), 'checked' => 0),
't.fk_statut' => array('label' => $langs->trans("Statut"), 'checked' => 1), 't.fk_statut' => array('label' => $langs->trans("Status"), 'checked' => 1),
't.subject' => array('label' => $langs->trans("Subject"), 'checked' => 1), 't.subject' => array('label' => $langs->trans("Subject"), 'checked' => 1),
'type.code' => array('label' => $langs->trans("Type"), 'checked' => 1), 'type.code' => array('label' => $langs->trans("Type"), 'checked' => 1),
'category.code' => array('label' => $langs->trans("Category"), 'checked' => 1), 'category.code' => array('label' => $langs->trans("Category"), 'checked' => 1),

View File

@@ -281,7 +281,7 @@ if ($action == "addline")
$localtax1_tx = get_localtax($tva_tx, 1, $customer, $mysoc, $tva_npr); $localtax1_tx = get_localtax($tva_tx, 1, $customer, $mysoc, $tva_npr);
$localtax2_tx = get_localtax($tva_tx, 2, $customer, $mysoc, $tva_npr); $localtax2_tx = get_localtax($tva_tx, 2, $customer, $mysoc, $tva_npr);
$idoflineadded = $invoice->addline($prod->description, $price, 1, $tva_tx, $localtax1_tx, $localtax2_tx, $idproduct, $customer->remise_percent, '', 0, 0, 0, '', $price_base_type, $price_ttc, $prod->type, -1, 0, '', 0, 0, null, 0, '', 0, 100, '', null, 0); $idoflineadded = $invoice->addline($prod->description, $price, 1, $tva_tx, $localtax1_tx, $localtax2_tx, $idproduct, $customer->remise_percent, '', 0, 0, 0, '', $price_base_type, $price_ttc, $prod->type, -1, 0, '', 0, 0, null, '', '', 0, 100, '', null, 0);
$invoice->fetch($placeid); $invoice->fetch($placeid);
} }
@@ -295,7 +295,7 @@ if ($action == "freezone") {
$localtax1_tx = get_localtax($tva_tx, 1, $customer, $mysoc, $tva_npr); $localtax1_tx = get_localtax($tva_tx, 1, $customer, $mysoc, $tva_npr);
$localtax2_tx = get_localtax($tva_tx, 2, $customer, $mysoc, $tva_npr); $localtax2_tx = get_localtax($tva_tx, 2, $customer, $mysoc, $tva_npr);
$invoice->addline($desc, $number, 1, $tva_tx, $localtax1_tx, $localtax2_tx, 0, 0, '', 0, 0, 0, '', 'TTC', $number, 0, -1, 0, '', 0, 0, null, 0, '', 0, 100, '', null, 0); $invoice->addline($desc, $number, 1, $tva_tx, $localtax1_tx, $localtax2_tx, 0, 0, '', 0, 0, 0, '', 'TTC', $number, 0, -1, 0, '', 0, 0, null, '', '', 0, 100, '', null, 0);
$invoice->fetch($placeid); $invoice->fetch($placeid);
} }