fix getting buying price when creating automatically an order from a proposal (with first option activated in workflow module)

This commit is contained in:
Christophe Battarel
2013-03-20 09:30:13 +01:00
parent 8a6adb8a49
commit c7666cbc3d

View File

@@ -914,6 +914,12 @@ class Commande extends CommonOrder
$line->special_code = $object->lines[$i]->special_code;
$line->fk_parent_line = $object->lines[$i]->fk_parent_line;
$line->fk_fournprice = $object->lines[$i]->fk_fournprice;
$marginInfos = getMarginInfos($object->lines[$i]->subprice, $object->lines[$i]->remise_percent, $object->lines[$i]->tva_tx, $object->lines[$i]->localtax1_tx, $object->lines[$i]->localtax2_tx, $object->lines[$i]->fk_fournprice, $object->lines[$i]->pa_ht);
$line->pa_ht = $marginInfos[0];
$line->marge_tx = $marginInfos[1];
$line->marque_tx = $marginInfos[2];
$this->lines[$i] = $line;
}