Fix: Show lines details during creation
This commit is contained in:
parent
f36b78444b
commit
4939e2da4d
@ -279,7 +279,7 @@ if ($action == 'add' && $user->rights->fournisseur->facture->creer)
|
|||||||
$element = 'fourn'; $subelement = 'fournisseur.commande';
|
$element = 'fourn'; $subelement = 'fournisseur.commande';
|
||||||
}
|
}
|
||||||
|
|
||||||
$object->origin = $_POST['origin'];
|
$object->origin = $_POST['origin'];
|
||||||
$object->origin_id = $_POST['originid'];
|
$object->origin_id = $_POST['originid'];
|
||||||
|
|
||||||
$id = $object->create($user);
|
$id = $object->create($user);
|
||||||
@ -314,20 +314,20 @@ if ($action == 'add' && $user->rights->fournisseur->facture->creer)
|
|||||||
if ($lines[$i]->date_end) $date_end=$lines[$i]->date_end;
|
if ($lines[$i]->date_end) $date_end=$lines[$i]->date_end;
|
||||||
|
|
||||||
$result = $object->addline(
|
$result = $object->addline(
|
||||||
$desc,
|
$desc,
|
||||||
$lines[$i]->subprice,
|
$lines[$i]->subprice,
|
||||||
$lines[$i]->tva_tx,
|
$lines[$i]->tva_tx,
|
||||||
$lines[$i]->localtax1_tx,
|
$lines[$i]->localtax1_tx,
|
||||||
$lines[$i]->localtax2_tx,
|
$lines[$i]->localtax2_tx,
|
||||||
$lines[$i]->qty,
|
$lines[$i]->qty,
|
||||||
$lines[$i]->fk_product,
|
$lines[$i]->fk_product,
|
||||||
$lines[$i]->remise_percent,
|
$lines[$i]->remise_percent,
|
||||||
$date_start,
|
$date_start,
|
||||||
$date_end,
|
$date_end,
|
||||||
0,
|
0,
|
||||||
$lines[$i]->info_bits,
|
$lines[$i]->info_bits,
|
||||||
'HT',
|
'HT',
|
||||||
$product_type
|
$product_type
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@ -1149,6 +1149,22 @@ if ($action == 'create')
|
|||||||
print '<br><center><input type="submit" class="button" name="bouton" value="'.$langs->trans('CreateDraft').'"></center>';
|
print '<br><center><input type="submit" class="button" name="bouton" value="'.$langs->trans('CreateDraft').'"></center>';
|
||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
|
|
||||||
|
// Show origin lines
|
||||||
|
if (is_object($objectsrc))
|
||||||
|
{
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
$title=$langs->trans('ProductsAndServices');
|
||||||
|
print_titre($title);
|
||||||
|
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
|
$objectsrc->printOriginLinesList($hookmanager);
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1806,7 +1822,7 @@ else
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Linked object block
|
* Linked object block
|
||||||
*/
|
*/
|
||||||
$somethingshown=$object->showLinkedObjectBlock();
|
$somethingshown=$object->showLinkedObjectBlock();
|
||||||
|
|
||||||
print '</td><td valign="top" width="50%">';
|
print '</td><td valign="top" width="50%">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user